diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 4033f2c9e..49da6fab5 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -485,12 +485,16 @@ void set_temp_error(TempErrorSource source, uint8_t index, TempErrorType type) } #endif - // set the error state + // set the initial error source + if(!temp_error_state.error) { + temp_error_state.source = (uint8_t)source; + temp_error_state.index = index; + temp_error_state.type = (uint8_t)type; + } + + // always set the error state temp_error_state.error = true; temp_error_state.assert = true; - temp_error_state.source = (uint8_t)source; - temp_error_state.index = index; - temp_error_state.type = (uint8_t)type; } void handle_temp_error();