From e9b942df3183ac34a36c7ec5f3280bcaac993c8f Mon Sep 17 00:00:00 2001 From: Andrey G Date: Tue, 21 Mar 2023 21:20:19 +0300 Subject: [PATCH] heater_control: hanle no supply state (#219) --- firmware/heater_control.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/firmware/heater_control.cpp b/firmware/heater_control.cpp index 27f414d..f95d123 100644 --- a/firmware/heater_control.cpp +++ b/firmware/heater_control.cpp @@ -194,7 +194,10 @@ static HeaterState GetNextState(struct heater_state &s, HeaterAllow heaterAllowS } break; - case HeaterState::Stopped: break; + case HeaterState::Stopped: + case HeaterState::NoHeaterSupply: + /* nop */ + break; } return s.heaterState; @@ -337,6 +340,8 @@ const char* describeHeaterState(HeaterState state) return "ClosedLoop"; case HeaterState::Stopped: return "Stopped"; + case HeaterState::NoHeaterSupply: + return "NoHeaterSupply"; } return "Unknown";