merged two if statements

pull/6/head
Tyler Johnson 2020-07-21 19:46:16 -04:00
rodzic 1d4658d63b
commit edf282ad85
1 zmienionych plików z 2 dodań i 5 usunięć

Wyświetl plik

@ -286,17 +286,14 @@ void loop() {
// Serial.println(round((millis()-loop_start)/1000));
if (secsTillPing <= secsTillTx) {
sleepSecs = secsTillPing;
} else {
sleepSecs = secsTillTx;
}
sleepSeconds(sleepSecs);
if (secsTillPing <= secsTillTx) {
secsTillTx -= secsTillPing;
secsTillPing = 0;
} else {
sleepSecs = secsTillTx;
secsTillPing -= secsTillTx;
secsTillTx = 0;
}
sleepSeconds(sleepSecs);
}