New design Dual Watch
This commit is contained in:
@@ -393,6 +393,7 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
||||
*pMax = ARRAY_SIZE(gSubMenu_SET_LCK) - 1;
|
||||
break;
|
||||
case MENU_SET_MET:
|
||||
case MENU_SET_GUI:
|
||||
*pMin = 0;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_SET_MET) - 1;
|
||||
break;
|
||||
@@ -866,6 +867,9 @@ void MENU_AcceptSetting(void)
|
||||
case MENU_SET_MET:
|
||||
gSetting_set_met = gSubMenuSelection;
|
||||
break;
|
||||
case MENU_SET_GUI:
|
||||
gSetting_set_gui = gSubMenuSelection;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1258,6 +1262,9 @@ void MENU_ShowCurrentSetting(void)
|
||||
case MENU_SET_MET:
|
||||
gSubMenuSelection = gSetting_set_met;
|
||||
break;
|
||||
case MENU_SET_GUI:
|
||||
gSubMenuSelection = gSetting_set_gui;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
|
1
misc.c
1
misc.c
@@ -113,6 +113,7 @@ enum BacklightOnRxTx_t gSetting_backlight_on_tx_rx;
|
||||
uint8_t gSetting_set_eot = 0;
|
||||
bool gSetting_set_lck = false;
|
||||
bool gSetting_set_met = 0;
|
||||
bool gSetting_set_gui = 0;
|
||||
bool gSetting_set_ptt_session;
|
||||
#endif
|
||||
|
||||
|
1
misc.h
1
misc.h
@@ -165,6 +165,7 @@ extern enum BacklightOnRxTx_t gSetting_backlight_on_tx_rx;
|
||||
extern uint8_t gSetting_set_eot;
|
||||
extern bool gSetting_set_lck;
|
||||
extern bool gSetting_set_met;
|
||||
extern bool gSetting_set_gui;
|
||||
extern bool gSetting_set_ptt_session;
|
||||
#endif
|
||||
|
||||
|
12
settings.c
12
settings.c
@@ -298,6 +298,7 @@ void SETTINGS_InitEEPROM(void)
|
||||
gSetting_set_inv = (((tmp >> 0) & 0x01) < 2) ? ((tmp >> 0) & 0x01): 0;
|
||||
gSetting_set_lck = (((tmp >> 1) & 0x01) < 2) ? ((tmp >> 1) & 0x01): 0;
|
||||
gSetting_set_met = (((tmp >> 2) & 0x01) < 2) ? ((tmp >> 2) & 0x01): 0;
|
||||
gSetting_set_gui = (((tmp >> 3) & 0x01) < 2) ? ((tmp >> 3) & 0x01): 0;
|
||||
gSetting_set_ctr = (((Data[5] & 0x0F)) < 16) ? ((Data[5] & 0x0F)) : 5;
|
||||
|
||||
// And set special session settings for actions
|
||||
@@ -630,19 +631,14 @@ void SETTINGS_SaveSettings(void)
|
||||
|
||||
int tmp = 0;
|
||||
|
||||
/*
|
||||
if (c == 1)
|
||||
tmp = tmp | (1 << 0);
|
||||
if (d == 1)
|
||||
tmp = tmp
|
||||
*/
|
||||
|
||||
if(gSetting_set_inv == 1)
|
||||
tmp = tmp | (1 << 0);
|
||||
if (gSetting_set_lck == 1)
|
||||
tmp = tmp | (1 << 1);
|
||||
if (gSetting_set_met == 1)
|
||||
tmp = tmp | (2 << 1);
|
||||
tmp = tmp | (1 << 2);
|
||||
if (gSetting_set_gui == 1)
|
||||
tmp = tmp | (1 << 3);
|
||||
|
||||
State[5] = ((tmp << 4) | (gSetting_set_ctr & 0x0F));
|
||||
State[6] = ((gSetting_set_tot << 4) | (gSetting_set_eot & 0x0F));
|
||||
|
16
ui/main.c
16
ui/main.c
@@ -371,14 +371,14 @@ void DisplayRSSIBar(const bool now)
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if (isMainOnly())
|
||||
if (isMainOnly() || gSetting_set_gui)
|
||||
{
|
||||
sprintf(str, "%3d", -rssi_dBm);
|
||||
UI_PrintStringSmallNormal(str, LCD_WIDTH + 8, 0, line - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(str, "%04d %s", -rssi_dBm, "dBm");
|
||||
sprintf(str, "% 4d %s", -rssi_dBm, "dBm");
|
||||
GUI_DisplaySmallest(str, 2, 25, false, true);
|
||||
}
|
||||
|
||||
@@ -1008,7 +1008,7 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
|
||||
#if ENABLE_FEAT_F4HWN
|
||||
if (isMainOnly())
|
||||
if (isMainOnly() || gSetting_set_gui)
|
||||
{
|
||||
UI_PrintStringSmallNormal(s, LCD_WIDTH + 24, 0, line + 1);
|
||||
}
|
||||
@@ -1024,7 +1024,7 @@ void UI_DisplayMain(void)
|
||||
{ // show the TX power
|
||||
int i = vfoInfo->OUTPUT_POWER % 3;
|
||||
#if ENABLE_FEAT_F4HWN
|
||||
if (isMainOnly())
|
||||
if (isMainOnly() || gSetting_set_gui)
|
||||
{
|
||||
const char pwr_list[][2] = {"L","M","H"};
|
||||
UI_PrintStringSmallNormal(pwr_list[i], LCD_WIDTH + 46, 0, line + 1);
|
||||
@@ -1045,7 +1045,7 @@ void UI_DisplayMain(void)
|
||||
const char dir_list[][2] = {"", "+", "-"};
|
||||
int i = vfoInfo->TX_OFFSET_FREQUENCY_DIRECTION % 3;
|
||||
#if ENABLE_FEAT_F4HWN
|
||||
if (isMainOnly())
|
||||
if (isMainOnly() || gSetting_set_gui)
|
||||
{
|
||||
UI_PrintStringSmallNormal(dir_list[i], LCD_WIDTH + 54, 0, line + 1);
|
||||
}
|
||||
@@ -1062,7 +1062,7 @@ void UI_DisplayMain(void)
|
||||
if (vfoInfo->FrequencyReverse)
|
||||
#if ENABLE_FEAT_F4HWN
|
||||
{
|
||||
if (isMainOnly())
|
||||
if (isMainOnly() || gSetting_set_gui)
|
||||
{
|
||||
UI_PrintStringSmallNormal("R", LCD_WIDTH + 62, 0, line + 1);
|
||||
}
|
||||
@@ -1076,7 +1076,7 @@ void UI_DisplayMain(void)
|
||||
#endif
|
||||
|
||||
#if ENABLE_FEAT_F4HWN
|
||||
if (isMainOnly())
|
||||
if (isMainOnly() || gSetting_set_gui)
|
||||
{
|
||||
if (vfoInfo->CHANNEL_BANDWIDTH == BANDWIDTH_NARROW)
|
||||
UI_PrintStringSmallNormal("N", LCD_WIDTH + 70, 0, line + 1);
|
||||
@@ -1111,7 +1111,7 @@ void UI_DisplayMain(void)
|
||||
sprintf(String, "%s", "MONIT");
|
||||
}
|
||||
|
||||
if (isMainOnly())
|
||||
if (isMainOnly() || gSetting_set_gui)
|
||||
{
|
||||
if(!gMonitor)
|
||||
{
|
||||
|
@@ -134,6 +134,7 @@ const t_menu_item MenuList[] =
|
||||
{"SetInv", VOICE_ID_INVALID, MENU_SET_INV },
|
||||
{"SetLck", VOICE_ID_INVALID, MENU_SET_LCK },
|
||||
{"SetMet", VOICE_ID_INVALID, MENU_SET_MET },
|
||||
{"SetGui", VOICE_ID_INVALID, MENU_SET_GUI },
|
||||
#endif
|
||||
// hidden menu items from here on
|
||||
// enabled if pressing both the PTT and upper side button at power-on
|
||||
@@ -919,9 +920,6 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
|
||||
case MENU_SET_TOT:
|
||||
strcpy(String, gSubMenu_SET_TOT[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
case MENU_SET_EOT:
|
||||
strcpy(String, gSubMenu_SET_TOT[gSubMenuSelection]); // Same as SET_TOT
|
||||
break;
|
||||
@@ -942,8 +940,10 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
|
||||
case MENU_SET_MET:
|
||||
strcpy(String, gSubMenu_SET_MET[gSubMenuSelection]);
|
||||
case MENU_SET_GUI:
|
||||
strcpy(String, gSubMenu_SET_MET[gSubMenuSelection]); // Same as SET_MET
|
||||
break;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user