diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 72bafda..947eaff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,10 +17,11 @@ before_script: build: stage: build - script: + script: - "pio run -e nano -e leonardo -e pico -e bluepill -e esp32" - mkdir -p builds - cp .pio/build/pico/firmware.uf2 builds/ + - cp .pio/build/pico/firmware.elf builds/ artifacts: paths: - builds/* \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 3dacad9..6524b19 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -186,13 +186,14 @@ void setup() comPort = (HardwareSerial*) &PRIMARY_SERIAL_PORT; PRIMARY_SERIAL_PORT.begin(115200); - while (!PRIMARY_SERIAL_PORT) - delay(1); - #if defined(SECONDARY_SERIAL_PORT) - SECONDARY_SERIAL_PORT.begin(115200); - while (!SECONDARY_SERIAL_PORT) - delay(1); + #ifdef SECONDARY_SERIAL_PORT + SECONDARY_SERIAL_PORT.begin(115200); + //wait for either port to be ready + while (!PRIMARY_SERIAL_PORT && !SECONDARY_SERIAL_PORT) + #else + while (!PRIMARY_SERIAL_PORT) #endif + delay(1); register_module(core_commands, NULL); diff --git a/test/test_argument_parsing.cpp b/test/test_argument_parsing.cpp index f7c5e68..e923cf5 100644 --- a/test/test_argument_parsing.cpp +++ b/test/test_argument_parsing.cpp @@ -9,7 +9,7 @@ void test_single_argument_parsing(void) String all_args = F("3123.123asdf"); char * args[1]; uint8_t ret = 0; - + ret = parse_arguments(args, all_args, 1); TEST_ASSERT_EQUAL_STRING(expected_single, args[0]); TEST_ASSERT_EQUAL(1, ret); @@ -70,7 +70,8 @@ void test_multiple_argument_parsing(void) void setup() { - comPort->begin(115200); + //TODO: support serial selection in tests + Serial.begin(115200); // NOTE!!! Wait for >2 secs // if board doesn't support software reset via comPort->DTR/RTS delay(2000);