Fix CTCSS tone not correctly set when decreasing
This commit is contained in:
parent
e5b3ea1bed
commit
ec62bda31a
|
|
@ -872,7 +872,15 @@ static void _ui_fsm_menuMacro(kbd_msg_t msg, bool *sync_rtx)
|
||||||
case 1:
|
case 1:
|
||||||
if(state.channel.mode == OPMODE_FM)
|
if(state.channel.mode == OPMODE_FM)
|
||||||
{
|
{
|
||||||
state.channel.fm.txTone--;
|
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.txTone %= MAX_TONE_INDEX;
|
||||||
state.channel.fm.rxTone = state.channel.fm.txTone;
|
state.channel.fm.rxTone = state.channel.fm.txTone;
|
||||||
*sync_rtx = true;
|
*sync_rtx = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue