diff options
author | Ben V. Brown <[email protected]> | 2024-03-22 10:03:46 +1100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-22 10:03:46 +1100 |
commit | b5fc1b589185b1a933184d2b4692328218f4af74 (patch) | |
tree | 238cac72a39e7d5c2a0f9c15590b8a392b45d604 | |
parent | a3f036aae4f4edb43ee89a3b2b74b55970b08535 (diff) | |
download | IronOS-b5fc1b589185b1a933184d2b4692328218f4af74.tar.gz IronOS-b5fc1b589185b1a933184d2b4692328218f4af74.zip |
4 ohm tip (#1868)
* Add 4 ohm PTS200 tip for PinecilV2
* Add PTS200 4 ohm tip to TS101
* Update BSP.cpp
-rw-r--r-- | source/Core/BSP/Miniware/BSP.cpp | 2 | ||||
-rw-r--r-- | source/Core/BSP/Pinecilv2/BSP.cpp | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/source/Core/BSP/Miniware/BSP.cpp b/source/Core/BSP/Miniware/BSP.cpp index 0ad8f4d4..d823263c 100644 --- a/source/Core/BSP/Miniware/BSP.cpp +++ b/source/Core/BSP/Miniware/BSP.cpp @@ -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 {
diff --git a/source/Core/BSP/Pinecilv2/BSP.cpp b/source/Core/BSP/Pinecilv2/BSP.cpp index c511be2e..59314453 100644 --- a/source/Core/BSP/Pinecilv2/BSP.cpp +++ b/source/Core/BSP/Pinecilv2/BSP.cpp @@ -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 {
|