diff --git a/src/raspi_keyer.cpp b/src/raspi_keyer.cpp index 8c01d96..202cee5 100644 --- a/src/raspi_keyer.cpp +++ b/src/raspi_keyer.cpp @@ -162,8 +162,12 @@ int main() printf("Hello from core0!\n"); - //Settings settings {read_settings()}; - Settings settings; + queue_init(&keyerQueue, sizeof(KeyerQueueData), 2); + multicore_reset_core1(); + multicore_launch_core1(core1_main); + + Settings settings {read_settings()}; + //Settings settings; uint8_t currentWpm, lastWpm {0}; if (settings.wpm == 0) { currentWpm = calcWPM(potiRead(), settings.wpmPotiMin, settings.wpmPotiMax); @@ -172,9 +176,6 @@ int main() } lastWpm = currentWpm; - queue_init(&keyerQueue, sizeof(KeyerQueueData), 2); - multicore_reset_core1(); - multicore_launch_core1(core1_main); KeyerQueueData keyerQueueData {KeyerQueueCommand::Run, currentWpm, settings.mode}; queue_add_blocking(&keyerQueue, &keyerQueueData);