diff --git a/platformio.ini b/platformio.ini index a926263..1a18b7a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -8,16 +8,17 @@ ; Please visit documentation for the other options and examples ; https://docs.platformio.org/page/projectconf.html -[env:pico] +[env:debug] platform = https://github.com/maxgerhardt/platform-raspberrypi.git board = pico framework = arduino board_build.core = earlephilhower debug_tool = cmsis-dap -[env:picow] +[env:release] platform = https://github.com/maxgerhardt/platform-raspberrypi.git -board = rpipicow +board = pico framework = arduino board_build.core = earlephilhower debug_tool = cmsis-dap +build_flags = -DNDEBUG diff --git a/src/main.cpp b/src/main.cpp index 36e4416..6af868a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -130,7 +130,7 @@ static void reflect_state(NxamfGamepadState *state) async_led_on_for_100ms(); mutex_enter_blocking(&d_mutex); - + d.report.y = (uint8_t)state->y; d.report.b = (uint8_t)state->b; d.report.a = (uint8_t)state->a; @@ -293,6 +293,20 @@ void setup() pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, LOW); + + // Blink if the setup routine succeeded. + digitalWrite(LED_BUILTIN, HIGH); + delay(200); + digitalWrite(LED_BUILTIN, LOW); + delay(200); + digitalWrite(LED_BUILTIN, HIGH); + delay(200); + digitalWrite(LED_BUILTIN, LOW); + delay(200); + digitalWrite(LED_BUILTIN, HIGH); + delay(200); + digitalWrite(LED_BUILTIN, LOW); + delay(200); } void loop()