Skip to content

Commit

Permalink
do not allow pulling hot water if water tank is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
LoQue90 committed Oct 11, 2024
1 parent e1175cc commit 150560a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotWaterHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void checkHotWaterSwitch() {

if (HOTWATERSWITCH_TYPE == Switch::TOGGLE) {
// Set hotWaterOn to 1 when waterswitch is HIGH
if (hotWaterSwitchReading == HIGH) {
if (hotWaterSwitchReading == HIGH && machineState != kWaterEmpty) {
hotWaterOn = 1;
pumpRelay.on();
}
Expand All @@ -26,7 +26,7 @@ void checkHotWaterSwitch() {
if (hotWaterSwitchReading != currStateHotWaterSwitch) {
currStateHotWaterSwitch = hotWaterSwitchReading;

if (currStateHotWaterSwitch == HIGH) {
if (currStateHotWaterSwitch == HIGH && machineState != kWaterEmpty) {
if (hotWaterOn == 0) {
hotWaterOn = 1;
pumpRelay.on();
Expand Down

0 comments on commit 150560a

Please sign in to comment.