reuse existing variable
This commit is contained in:
parent
98183b14ec
commit
9208a14033
1 changed files with 4 additions and 2 deletions
|
@ -149,7 +149,8 @@ int main()
|
||||||
|
|
||||||
// If WPM in settings is set to 0 -> take speed from poti
|
// If WPM in settings is set to 0 -> take speed from poti
|
||||||
if (settings.wpm == 0 && (currentWpm != lastWpm)) {
|
if (settings.wpm == 0 && (currentWpm != lastWpm)) {
|
||||||
KeyerQueueData keyerQueueData {KeyerQueueCommand::Config, currentWpm, settings.mode, 0};
|
keyerQueueData.cmd = KeyerQueueCommand::Config;
|
||||||
|
keyerQueueData.wpm = currentWpm;
|
||||||
queue_add_blocking(&keyerQueue, &keyerQueueData);
|
queue_add_blocking(&keyerQueue, &keyerQueueData);
|
||||||
printf("WPM has changed to: %d\n", currentWpm);
|
printf("WPM has changed to: %d\n", currentWpm);
|
||||||
lastWpm = currentWpm;
|
lastWpm = currentWpm;
|
||||||
|
@ -175,7 +176,8 @@ int main()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyerQueueData keyerQueueData {KeyerQueueCommand::Config, currentWpm, settings.mode, 0};
|
keyerQueueData.cmd = KeyerQueueCommand::Config;
|
||||||
|
keyerQueueData.mode = settings.mode;
|
||||||
queue_add_blocking(&keyerQueue, &keyerQueueData);
|
queue_add_blocking(&keyerQueue, &keyerQueueData);
|
||||||
|
|
||||||
display.displayIambicMode(settings.mode);
|
display.displayIambicMode(settings.mode);
|
||||||
|
|
Loading…
Reference in a new issue