Skip to content

Commit

Permalink
Log state change from and to
Browse files Browse the repository at this point in the history
  • Loading branch information
ximon committed Jun 15, 2020
1 parent ae4c19b commit 495213f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/HotTub-Status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ void HotTub::handleReceivedStatus(unsigned int command)

if (currentState->pumpState != decodedState)
{
char msg[60];
sprintf(msg, "State changed from %s to %s", stateToString(currentState->pumpState), stateToString(decodedState));

currentState->pumpState = decodedState;
currentState->errorCode = 0;
stateChanged("State changed");

stateChanged(msg);
}
}

Expand Down

0 comments on commit 495213f

Please sign in to comment.