Use runaway counter trigger
Some checks failed
CI / tests (push) Has been cancelled
CI / check_c-cpp (push) Has been cancelled
CI / check_python (push) Has been cancelled
CI / check_shell (push) Has been cancelled
CI / check_docs (push) Has been cancelled
CI / build (MHP30) (push) Has been cancelled
CI / build (Pinecil) (push) Has been cancelled
CI / build (Pinecilv2) (push) Has been cancelled
CI / build (S60) (push) Has been cancelled
CI / build (S60P) (push) Has been cancelled
CI / build (T55) (push) Has been cancelled
CI / build (TS100) (push) Has been cancelled
CI / build (TS101) (push) Has been cancelled
CI / build (TS80) (push) Has been cancelled
CI / build (TS80P) (push) Has been cancelled
CI / build_multi-lang (Pinecil) (push) Has been cancelled
CI / build_multi-lang (Pinecilv2) (push) Has been cancelled
CI / upload_metadata (push) Has been cancelled

This commit is contained in:
Ben V. Brown
2025-01-11 13:12:02 +11:00
parent e53f7d480a
commit 82c43ad400
5 changed files with 28 additions and 21 deletions

View File

@@ -83,5 +83,5 @@ OperatingMode showWarnings(const ButtonState buttons, guiContext *cxt);
// Common helpers
int8_t getPowerSourceNumber(void); // Returns number ID of power source
extern bool heaterThermalRunaway;
extern uint8_t heaterThermalRunawayCounter;
#endif

View File

@@ -161,10 +161,10 @@ OperatingMode gui_solderingMode(const ButtonState buttons, guiContext *cxt) {
return OperatingMode::Sleeping;
}
if (heaterThermalRunaway) {
currentTempTargetDegC = 0; // heater control off
heaterThermalRunaway = false;
cxt->transitionMode = TransitionAnimation::Right;
if (heaterThermalRunawayCounter > 8) {
currentTempTargetDegC = 0; // heater control off
heaterThermalRunawayCounter = 0;
cxt->transitionMode = TransitionAnimation::Right;
return OperatingMode::ThermalRunaway;
}
return handleSolderingButtons(buttons, cxt);

View File

@@ -159,9 +159,9 @@ OperatingMode gui_solderingProfileMode(const ButtonState buttons, guiContext *cx
setBuzzer(false);
return OperatingMode::HomeScreen;
}
if (heaterThermalRunaway) {
currentTempTargetDegC = 0; // heater control off
heaterThermalRunaway = false;
if (heaterThermalRunawayCounter > 8) {
currentTempTargetDegC = 0; // heater control off
heaterThermalRunawayCounter = 0;
return OperatingMode::ThermalRunaway;
}

View File

@@ -9,7 +9,7 @@
#include "history.hpp"
#include "ui_drawing.hpp"
extern bool heaterThermalRunaway;
extern uint8_t heaterThermalRunawayCounter;
bool checkExitSoldering(void) {
#ifdef POW_DC