Skip to content

Commit ffcd79d

Browse files
committed
remove debug logging and now unnecessary conditional
1 parent e45a391 commit ffcd79d

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/components/analogIO/Wippersnapper_AnalogIO.cpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -376,19 +376,8 @@ void Wippersnapper_AnalogIO::update() {
376376
// Does the pin execute on_change?
377377
else if (_analog_input_pins[i].period == 0L) {
378378

379-
// TODO: after testing combine these two conditionals to just send the
380-
// event and not debug print.
381-
if (_analog_input_pins[i].prvPeriod == 0L) {
382-
// first time reading pin, no previous timestamp so send event +
383-
// update prvPeriod WS_DEBUG_PRINT("First time reading pin A");
384-
// WS_DEBUG_PRINTLN(_analog_input_pins[i].pinName);
385-
} else if (timerExpired(millis(), _analog_input_pins[i], 500)) {
386-
// timer expired, send event + update prvPeriod
387-
// WS_DEBUG_PRINT("Timer passed for pin A");
388-
// WS_DEBUG_PRINTLN(_analog_input_pins[i].pinName);
389-
} else {
390-
// last event was too recently, skip this one...
391-
// WS_DEBUG_PRINTLN("Timer has not expired, continue...");
379+
// not first run and timer not expired, skip
380+
if (_analog_input_pins[i].prvPeriod != 0L && !timerExpired(millis(), _analog_input_pins[i], 500)) {
392381
continue;
393382
}
394383

0 commit comments

Comments
 (0)