mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2024-11-19 06:56:08 -05:00
Send audio for 'Exit' menu option correctly
This commit is contained in:
parent
814b646ab0
commit
1b8966103d
11
setup.cpp
11
setup.cpp
@ -565,9 +565,14 @@ void runMenu(const MenuItem_t* const menu_items, const uint16_t num_items)
|
|||||||
|
|
||||||
if(globalSettings.morseMenuOn //Only spend cycles copying menu item into RAM if we actually need to
|
if(globalSettings.morseMenuOn //Only spend cycles copying menu item into RAM if we actually need to
|
||||||
&& (old_index != index)){
|
&& (old_index != index)){
|
||||||
MenuItem_t mi = {"",nullptr};
|
if(num_items-1 > index){
|
||||||
memcpy_P(&mi,&menu_items[index+1],sizeof(mi));//The 0th element in the array is the title, so offset by 1
|
MenuItem_t mi = {"",nullptr};
|
||||||
strncpy_P(b,mi.ItemName,sizeof(b));
|
memcpy_P(&mi,&menu_items[index+1],sizeof(mi));//The 0th element in the array is the title, so offset by 1
|
||||||
|
strncpy_P(b,mi.ItemName,sizeof(b));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
strncpy_P(b,MI_EXIT,sizeof(b));
|
||||||
|
}
|
||||||
morseText(b);
|
morseText(b);
|
||||||
enc_read();//Consume any rotations during morse playback
|
enc_read();//Consume any rotations during morse playback
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user