fix flash problem

This commit is contained in:
Martin Brodbeck 2024-02-21 11:13:53 +01:00
parent 2c6cd140ee
commit c90100017a

View file

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