diff --git a/CMakeLists.txt b/CMakeLists.txt index 0507265..41e28de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ add_compile_options( -Wno-unused-function ) -add_definitions(-DVERBOSE -DDEBUG) +# add_definitions(-DVERBOSE -DDEBUG) # Add source files from src/ set(SOURCES diff --git a/src/main.cpp b/src/main.cpp index b160f84..682c50e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,7 +13,7 @@ */ // Uncomment if you want debug information about signal strength and motor movements -#define DEBUG +// #define DEBUG // #include // #include @@ -23,6 +23,7 @@ #include "data.hpp" #include "formulas.hpp" #include "pico/stdlib.h" +#include "tusb.h" #include "pins.hpp" #include "rfm/pico_hal.h" #include "stepper.h" @@ -72,6 +73,10 @@ uint8_t speed = 60; int main() { stdio_init_all(); + while (!tud_cdc_connected()) { + sleep_ms(500); + } + // Initialize servo servo_init(); servo_clock_auto();