Fix CTCSS tone not correctly set when decreasing

This commit is contained in:
marco 2023-06-28 19:52:53 +02:00 committed by Silvano Seva
parent e5b3ea1bed
commit ec62bda31a
1 changed files with 9 additions and 1 deletions

View File

@ -871,8 +871,16 @@ static void _ui_fsm_menuMacro(kbd_msg_t msg, bool *sync_rtx)
{
case 1:
if(state.channel.mode == OPMODE_FM)
{
if(state.channel.fm.txTone == 0)
{
state.channel.fm.txTone = MAX_TONE_INDEX-1;
}
else
{
state.channel.fm.txTone--;
}
state.channel.fm.txTone %= MAX_TONE_INDEX;
state.channel.fm.rxTone = state.channel.fm.txTone;
*sync_rtx = true;