Fix F4IRT shortcut bug

This commit is contained in:
Armel FAUVEAU
2024-02-05 23:49:56 +01:00
parent ec87fff311
commit e45c2f5904
10 changed files with 53 additions and 22 deletions

View File

@@ -159,7 +159,7 @@ void UI_DisplayAudioBar(void)
#ifdef ENABLE_FEAT_F4HWN
unsigned int line;
if ((gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2 == 0)
if ((gSetting_set_dual_watch_session != DUAL_WATCH_OFF) + (gSetting_set_cross_band_RX_TX_session != CROSS_BAND_OFF) * 2 == 0)
{
line = 5;
}
@@ -228,7 +228,7 @@ void DisplayRSSIBar(const bool now)
};
unsigned int line;
if ((gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2 == 0)
if ((gSetting_set_dual_watch_session != DUAL_WATCH_OFF) + (gSetting_set_cross_band_RX_TX_session != CROSS_BAND_OFF) * 2 == 0)
{
line = 5;
}
@@ -472,7 +472,7 @@ void UI_DisplayMain(void)
const unsigned int line0 = 0; // text screen line
const unsigned int line1 = 4;
unsigned int line;
if ((gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2 == 0)
if ((gSetting_set_dual_watch_session != DUAL_WATCH_OFF) + (gSetting_set_cross_band_RX_TX_session != CROSS_BAND_OFF) * 2 == 0)
{
line = 0;
}
@@ -495,7 +495,7 @@ void UI_DisplayMain(void)
#endif
#ifdef ENABLE_FEAT_F4HWN
if ((gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2 == 0)
if ((gSetting_set_dual_watch_session != DUAL_WATCH_OFF) + (gSetting_set_cross_band_RX_TX_session != CROSS_BAND_OFF) * 2 == 0)
{
if (activeTxVFO != vfo_num)
{
@@ -505,7 +505,7 @@ void UI_DisplayMain(void)
#endif
#ifdef ENABLE_FEAT_F4HWN
if (activeTxVFO != vfo_num || ((gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2 == 0))
if (activeTxVFO != vfo_num || ((gSetting_set_dual_watch_session != DUAL_WATCH_OFF) + (gSetting_set_cross_band_RX_TX_session != CROSS_BAND_OFF) * 2 == 0))
#else
if (activeTxVFO != vfo_num) // this is not active TX VFO
#endif
@@ -562,7 +562,7 @@ void UI_DisplayMain(void)
}
#ifdef ENABLE_FEAT_F4HWN
if ((gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2 == 0)
if ((gSetting_set_dual_watch_session != DUAL_WATCH_OFF) + (gSetting_set_cross_band_RX_TX_session != CROSS_BAND_OFF) * 2 == 0)
{
UI_PrintString(pPrintStr, 2, 0, 5, 8);
isMainOnlyInputDTMF = true;
@@ -767,7 +767,7 @@ void UI_DisplayMain(void)
}
else {
#ifdef ENABLE_FEAT_F4HWN
if ((gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2 == 0)
if ((gSetting_set_dual_watch_session != DUAL_WATCH_OFF) + (gSetting_set_cross_band_RX_TX_session != CROSS_BAND_OFF) * 2 == 0)
{
UI_PrintString(String, 32, 0, line, 8);
}
@@ -786,7 +786,7 @@ void UI_DisplayMain(void)
#endif
#ifdef ENABLE_FEAT_F4HWN
if ((gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2 == 0)
if ((gSetting_set_dual_watch_session != DUAL_WATCH_OFF) + (gSetting_set_cross_band_RX_TX_session != CROSS_BAND_OFF) * 2 == 0)
{
sprintf(String, "%3u.%05u", frequency / 100000, frequency % 100000);
if(frequency < _1GHz_in_KHz) {
@@ -989,7 +989,7 @@ void UI_DisplayMain(void)
sprintf(String, "DTMF %s", gDTMF_RX_live + idx);
#ifdef ENABLE_FEAT_F4HWN
if ((gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2 == 0)
if ((gSetting_set_dual_watch_session != DUAL_WATCH_OFF) + (gSetting_set_cross_band_RX_TX_session != CROSS_BAND_OFF) * 2 == 0)
{
UI_PrintStringSmallNormal(String, 2, 0, 5);
}

View File

@@ -138,7 +138,9 @@ const t_menu_item MenuList[] =
{"Tx 350", VOICE_ID_INVALID, MENU_350TX }, // was "350TX"
{"Tx 500", VOICE_ID_INVALID, MENU_500TX }, // was "500TX"
{"350 En", VOICE_ID_INVALID, MENU_350EN }, // was "350EN"
#ifndef ENABLE_FEAT_F4HWN
{"ScraEn", VOICE_ID_INVALID, MENU_SCREN }, // was "SCREN"
#endif
#ifdef ENABLE_F_CAL_MENU
{"FrCali", VOICE_ID_INVALID, MENU_F_CALI }, // reference xtal calibration
#endif
@@ -679,9 +681,11 @@ void UI_DisplayMenu(void)
case MENU_200TX:
case MENU_500TX:
case MENU_350EN:
#ifndef ENABLE_FEAT_F4HWN
case MENU_SCREN:
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
break;
#endif
case MENU_MEM_CH:
case MENU_1_CALL:

View File

@@ -115,7 +115,9 @@ enum
MENU_350TX,
MENU_500TX,
MENU_350EN,
#ifndef ENABLE_FEAT_F4HWN
MENU_SCREN,
#endif
#ifdef ENABLE_F_CAL_MENU
MENU_F_CALI, // reference xtal calibration
#endif
@@ -174,7 +176,7 @@ extern const char gSubMenu_BAT_TXT[3][8];
extern const char gSubMenu_BATTYP[2][9];
#ifndef ENABLE_FEAT_F4HWN
extern const char gSubMenu_SCRAMBLER[11][7];
extern const char gSubMenu_SCRAMBLER[11][7];
#endif
typedef struct {char* name; uint8_t id;} t_sidefunction;

View File

@@ -131,7 +131,7 @@ void UI_DisplayStatus()
#ifdef ENABLE_FEAT_F4HWN
// PTT indicator
if (gSetting_set_ptt) {
if (gSetting_set_ptt_session) {
memcpy(line + x, BITMAP_PTT_ONE_PUSH, sizeof(BITMAP_PTT_ONE_PUSH));
x1 = x + sizeof(BITMAP_PTT_ONE_PUSH) + 1;
}