* Add 4 ohm PTS200 tip for PinecilV2

* Add PTS200 4 ohm tip to TS101

* Update BSP.cpp
This commit is contained in:
Ben V. Brown
2024-03-22 10:03:46 +11:00
committed by GitHub
parent a3f036aae4
commit b5fc1b5891
2 changed files with 6 additions and 3 deletions

View File

@@ -308,6 +308,8 @@ void FinishMeasureTipResistance() {
return;
} else if (reading < 200) {
tipShorted = true;
} else if (reading < 520) {
newRes = 40;
} else if (reading < 800) {
newRes = 62;
} else {

View File

@@ -193,13 +193,14 @@ void FinishMeasureTipResistance() {
((tipResistanceReadings[1] - tipResistanceReadings[2]) + calculatedSkew) // jump 2 - skew
) //
/ 2; // Take average
// lastTipResistance = reading / 100;
// // As we are only detecting two resistances; we can split the difference for now
// As we are only detecting three resistances; we just bin to nearest
uint8_t newRes = 0;
if (reading > 8000) {
// return; // Change nothing as probably disconnected tip
// Let resistance be cleared to 0
} else if (reading < 500) {
tipShorted = true;
} else if (reading < 2600) {
newRes = 40;
} else if (reading < 4000) {
newRes = 62;
} else {