From 8a18c1444cb5ecb37352c415ca9a0bddfd73fb38 Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Tue, 28 Feb 2023 10:23:24 +0000 Subject: [PATCH] Fix precompiler directives I mistakenly deleted an ifndef in 40439a0ead2e3ec9eed83c144c8907d61cabf154 thinking that it wasn't matched by an #endif. This change reverts that error, and it builds properly again. --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 2f4eb95..3dacad9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -168,6 +168,7 @@ void get_eeprom_last_commit(String) return; } +#ifndef UNIT_TEST // don't define setup() and loop() for unit testing void setup() { #if defined(SUPPORT_EEPROM) && defined(MCU_PICO) @@ -238,6 +239,7 @@ void loop() comPort = (HardwareSerial*) &SECONDARY_SERIAL_PORT; bytesAvailable = true; } + #endif if (bytesAvailable) { handle_command(comPort->readStringUntil('\n')); @@ -250,4 +252,4 @@ void loop() for (int i = 0; i < registered_loop_fn_count; i++) registered_loop_functions[i](); } -#endif \ No newline at end of file +#endif //ndef UNIT_TEST \ No newline at end of file