From c90100017a597e69eb54338b6432d59ae0606f94 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Wed, 21 Feb 2024 11:13:53 +0100 Subject: [PATCH] fix flash problem --- src/raspi_keyer.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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);