Skip to content

Commit c5e34c4

Browse files
committed
Delete immediate applying of CTCSS/DCS while scrolling options in the menu.
This also caused the option change not to be discarded on EXIT
1 parent b0a01cd commit c5e34c4

File tree

1 file changed

+5
-34
lines changed

1 file changed

+5
-34
lines changed

ui/menu.c

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,7 @@ void UI_DisplayMenu(void)
509509
case MENU_T_DCS:
510510
if (gSubMenuSelection == 0)
511511
strcpy(String, "OFF");
512-
else
513-
if (gSubMenuSelection < 105)
512+
else if (gSubMenuSelection < 105)
514513
sprintf(String, "D%03oN", DCS_Options[gSubMenuSelection - 1]);
515514
else
516515
sprintf(String, "D%03oI", DCS_Options[gSubMenuSelection - 105]);
@@ -519,38 +518,10 @@ void UI_DisplayMenu(void)
519518
case MENU_R_CTCS:
520519
case MENU_T_CTCS:
521520
{
522-
#if 1
523-
unsigned int Code;
524-
FREQ_Config_t *pConfig = (GetCurrentMenuId() == MENU_R_CTCS) ? &gTxVfo->freq_config_RX : &gTxVfo->freq_config_TX;
525-
if (gSubMenuSelection == 0)
526-
{
527-
strcpy(String, "OFF");
528-
529-
if (pConfig->CodeType != CODE_TYPE_CONTINUOUS_TONE)
530-
break;
531-
Code = 0;
532-
pConfig->CodeType = CODE_TYPE_OFF;
533-
pConfig->Code = Code;
534-
535-
BK4819_ExitSubAu();
536-
}
537-
else
538-
{
539-
sprintf(String, "%u.%uHz", CTCSS_Options[gSubMenuSelection - 1] / 10, CTCSS_Options[gSubMenuSelection - 1] % 10);
540-
541-
pConfig->CodeType = CODE_TYPE_CONTINUOUS_TONE;
542-
Code = gSubMenuSelection - 1;
543-
pConfig->Code = Code;
544-
545-
BK4819_SetCTCSSFrequency(CTCSS_Options[Code]);
546-
}
547-
#else
548-
if (gSubMenuSelection == 0)
549-
strcpy(String, "OFF");
550-
else
551-
sprintf(String, "%u.%uHz", CTCSS_Options[gSubMenuSelection - 1] / 10, CTCSS_Options[gSubMenuSelection - 1] % 10);
552-
#endif
553-
521+
if (gSubMenuSelection == 0)
522+
strcpy(String, "OFF");
523+
else
524+
sprintf(String, "%u.%uHz", CTCSS_Options[gSubMenuSelection - 1] / 10, CTCSS_Options[gSubMenuSelection - 1] % 10);
554525
break;
555526
}
556527

0 commit comments

Comments
 (0)