Set temperatures to invalid value when applicable #700

Merged
muellerr merged 4 commits from set-more-temps-to-invalid-value into v4.0.0-dev 2023-06-22 16:10:35 +02:00
5 changed files with 10 additions and 2 deletions
Showing only changes of commit 3ae7dab8c7 - Show all commits

View File

@@ -30,6 +30,7 @@ void SusHandler::doStartUp() {
void SusHandler::doShutDown() { void SusHandler::doShutDown() {
if (internalState != InternalState::SHUTDOWN) { if (internalState != InternalState::SHUTDOWN) {
PoolReadGuard pg(&dataset); PoolReadGuard pg(&dataset);
dataset.tempC = thermal::INVALID_TEMPERATURE;
dataset.setValidity(false, true); dataset.setValidity(false, true);
internalState = InternalState::SHUTDOWN; internalState = InternalState::SHUTDOWN;
commandExecuted = false; commandExecuted = false;

View File

@@ -37,6 +37,8 @@ void Max31865EiveHandler::doShutDown() {
transitionOk = false; transitionOk = false;
} }
if (state == InternalState::INACTIVE and transitionOk) { if (state == InternalState::INACTIVE and transitionOk) {
sensorDataset.temperatureCelcius = thermal::INVALID_TEMPERATURE;
sensorDataset.setValidity(false, true);
updatePeriodicReply(false, EiveMax31855::RtdCommands::EXCHANGE_SET_ID); updatePeriodicReply(false, EiveMax31855::RtdCommands::EXCHANGE_SET_ID);
setMode(MODE_OFF); setMode(MODE_OFF);
} }