1
0
forked from me/IronOS

Tip short detection at boot

If tip is shorted at boot, prevent the FW from running, with the intent to prevent the MOSFET from being damaged
This commit is contained in:
alextrical
2023-06-30 15:57:11 +01:00
parent 990f42ad1a
commit f81257562d

View File

@@ -206,6 +206,11 @@ void FinishMeasureTipResistance() {
uint8_t newRes = 0;
if (reading > 8000) {
// return; // Change nothing as probably disconnected tip
} else if (reading < 500) {
for (;;) /* Tip shorted, wait until reset */
{
__NOP();
}
} else if (reading < 4000) {
newRes = 62;
} else {