Skip to content

Commit

Permalink
Update sensor.ino
Browse files Browse the repository at this point in the history
Remove delayTime = 0
  • Loading branch information
netmindz authored Sep 16, 2023
1 parent 395003f commit 14bbd7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sensor/src/sensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ const float POWER_PUMP2_HIGH = 0.6;
// Tweak for your tub - would be nice to auto-learn in the future to allow for outside temp etc
const int MINUTES_PER_DEGC = 45;

int delayTime = 40;
#define DELAY_TIME_DEFAULT 40
int delayTime = DELAY_TIME_DEFAULT;

#ifdef ESP32
#define tub Serial2
Expand Down Expand Up @@ -758,7 +759,7 @@ void sendCommand() {
tub.write(byteArray, sizeof(byteArray));
if (digitalRead(PIN_5_PIN) != LOW) {
Serial.printf("ERROR: Pin5 went high before command before flush : %u\n", delayTime);
delayTime = 0;
delayTime = DELAY_TIME_DEFAULT;
sendBuffer.dequeue();
}
// tub.flush(true);
Expand Down

0 comments on commit 14bbd7a

Please sign in to comment.