Add Remove Shift action for RescueOps mode

This commit is contained in:
Armel FAUVEAU
2024-11-23 02:34:03 +01:00
parent 91c95142c7
commit 3bad2a3b0f
5 changed files with 43 additions and 2 deletions

View File

@@ -1243,8 +1243,19 @@ void UI_DisplayMain(void)
if (vfoInfo->freq_config_RX.Frequency != vfoInfo->freq_config_TX.Frequency)
{ // show the TX offset symbol
const char dir_list[][2] = {"", "+", "-"};
int i = vfoInfo->TX_OFFSET_FREQUENCY_DIRECTION % 3;
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
const char dir_list[][2] = {"", "+", "-", "D"};
if(gTxVfo->TX_OFFSET_FREQUENCY_DIRECTION != 0 && gTxVfo->pTX == &gTxVfo->freq_config_RX && !vfoInfo->FrequencyReverse)
{
i = 3;
}
#else
const char dir_list[][2] = {"", "+", "-"};
#endif
#if ENABLE_FEAT_F4HWN
if (gSetting_set_gui)
{
@@ -1252,7 +1263,18 @@ void UI_DisplayMain(void)
}
else
{
UI_PrintStringSmallNormal(dir_list[i], LCD_WIDTH + 41, 0, line + 1);
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
if(i == 3)
{
GUI_DisplaySmallest(dir_list[i], 43, line == 0 ? 17 : 49, false, true);
}
else
{
#endif
UI_PrintStringSmallNormal(dir_list[i], LCD_WIDTH + 41, 0, line + 1);
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
}
#endif
}
#else
UI_PrintStringSmallNormal(dir_list[i], LCD_WIDTH + 54, 0, line + 1);

View File

@@ -448,6 +448,7 @@ const t_sidefunction gSubMenu_SIDEFUNCTIONS[] =
{"WIDE\nNARROW", ACTION_OPT_WN},
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
{"POWER\nHIGH", ACTION_OPT_POWER_HIGH},
{"REMOVE\nSHIFT", ACTION_OPT_REMOVE_SHIFT},
#endif
#endif
};