mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Use runaway counter trigger
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "history.hpp"
|
||||
#include "ui_drawing.hpp"
|
||||
|
||||
extern bool heaterThermalRunaway;
|
||||
extern uint8_t heaterThermalRunawayCounter;
|
||||
|
||||
bool checkExitSoldering(void) {
|
||||
#ifdef POW_DC
|
||||
|
||||
Reference in New Issue
Block a user