Consolidate "T VFO" and "DUALRX" into one "RXMODE"
This commit is contained in:
28
app/menu.c
28
app/menu.c
@@ -139,12 +139,7 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
|
||||
|
||||
case MENU_TDR:
|
||||
*pMin = 0;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_CHAN) - 1;
|
||||
break;
|
||||
|
||||
case MENU_XB:
|
||||
*pMin = 0;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_XB) - 1;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_RXMode) - 1;
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
@@ -525,20 +520,9 @@ void MENU_AcceptSetting(void)
|
||||
break;
|
||||
|
||||
case MENU_TDR:
|
||||
gEeprom.DUAL_WATCH = gSubMenuSelection;
|
||||
gFlagReconfigureVfos = true;
|
||||
gUpdateStatus = true;
|
||||
break;
|
||||
gEeprom.DUAL_WATCH = (gEeprom.TX_VFO + 1) * (gSubMenuSelection & 1);
|
||||
gEeprom.CROSS_BAND_RX_TX = (gEeprom.TX_VFO + 1) * ((gSubMenuSelection & 2) > 0);
|
||||
|
||||
case MENU_XB:
|
||||
#ifdef ENABLE_NOAA
|
||||
if (IS_NOAA_CHANNEL(gEeprom.ScreenChannel[0]))
|
||||
return;
|
||||
if (IS_NOAA_CHANNEL(gEeprom.ScreenChannel[1]))
|
||||
return;
|
||||
#endif
|
||||
|
||||
gEeprom.CROSS_BAND_RX_TX = gSubMenuSelection;
|
||||
gFlagReconfigureVfos = true;
|
||||
gUpdateStatus = true;
|
||||
break;
|
||||
@@ -956,11 +940,7 @@ void MENU_ShowCurrentSetting(void)
|
||||
break;
|
||||
|
||||
case MENU_TDR:
|
||||
gSubMenuSelection = gEeprom.DUAL_WATCH;
|
||||
break;
|
||||
|
||||
case MENU_XB:
|
||||
gSubMenuSelection = gEeprom.CROSS_BAND_RX_TX;
|
||||
gSubMenuSelection = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2;
|
||||
break;
|
||||
|
||||
case MENU_BEEP:
|
||||
|
41
bitmaps.c
41
bitmaps.c
@@ -197,26 +197,27 @@ const uint8_t BITMAP_F_Key[6] =
|
||||
};
|
||||
#endif
|
||||
|
||||
const uint8_t BITMAP_TDR1[12] =
|
||||
{ // "DW"
|
||||
0b00000000,
|
||||
const uint8_t BITMAP_TDR1[15] =
|
||||
{ // "DWR"
|
||||
0b01111111,
|
||||
0b01000001,
|
||||
0b01000001,
|
||||
0b01000001,
|
||||
0b00111110,
|
||||
0b00000000,
|
||||
0b01111111,
|
||||
0b00100000,
|
||||
0b00011000,
|
||||
0b00100000,
|
||||
0b01111111
|
||||
0b01111111,
|
||||
0b00000000,
|
||||
0b01111111,
|
||||
0b00011001,
|
||||
0b00101001,
|
||||
0b01000110
|
||||
};
|
||||
|
||||
const uint8_t BITMAP_TDR2[12] =
|
||||
const uint8_t BITMAP_TDR2[9] =
|
||||
{ // "><" .. DW on hold
|
||||
0b00000000,
|
||||
0b00000000,
|
||||
0b00100010,
|
||||
0b00110110,
|
||||
0b00011100,
|
||||
@@ -226,7 +227,6 @@ const uint8_t BITMAP_TDR2[12] =
|
||||
0b00011100,
|
||||
0b00110110,
|
||||
0b00100010,
|
||||
0b00000000
|
||||
};
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
@@ -244,27 +244,8 @@ const uint8_t BITMAP_TDR2[12] =
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
const uint8_t BITMAP_FM[12] =
|
||||
{ // "FM"
|
||||
0b00000000,
|
||||
0b01111111,
|
||||
0b00001001,
|
||||
0b00001001,
|
||||
0b00001001,
|
||||
0b00000001,
|
||||
|
||||
0b00000000,
|
||||
0b01111111,
|
||||
0b00000010,
|
||||
0b00001100,
|
||||
0b00000010,
|
||||
0b01111111
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
const uint8_t BITMAP_NOAA[12] =
|
||||
const uint8_t BITMAP_NOAA[11] =
|
||||
{ // "NS"
|
||||
0b00000000,
|
||||
0b01111111,
|
||||
@@ -272,12 +253,10 @@ const uint8_t BITMAP_TDR2[12] =
|
||||
0b00001000,
|
||||
0b00010000,
|
||||
0b01111111,
|
||||
|
||||
0b00000000,
|
||||
0b01000110,
|
||||
0b01001001,
|
||||
0b01001001,
|
||||
0b01001001,
|
||||
0b00110001
|
||||
};
|
||||
#endif
|
||||
|
16
bitmaps.h
16
bitmaps.h
@@ -25,25 +25,17 @@ extern const uint8_t BITMAP_F_Key[6];
|
||||
extern const uint8_t BITMAP_VOX[18];
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
extern const uint8_t BITMAP_WX[12];
|
||||
#else
|
||||
extern const uint8_t BITMAP_XB[12];
|
||||
#endif
|
||||
extern const uint8_t BITMAP_XB[12];
|
||||
|
||||
extern const uint8_t BITMAP_TDR1[12];
|
||||
extern const uint8_t BITMAP_TDR2[12];
|
||||
extern const uint8_t BITMAP_TDR1[15];
|
||||
extern const uint8_t BITMAP_TDR2[9];
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
extern const uint8_t BITMAP_VoicePrompt[9];
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
extern const uint8_t BITMAP_FM[12];
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
extern const uint8_t BITMAP_NOAA[12];
|
||||
extern const uint8_t BITMAP_NOAA[11];
|
||||
#endif
|
||||
|
||||
extern const uint8_t BITMAP_Antenna[5];
|
||||
|
35
ui/main.c
35
ui/main.c
@@ -314,29 +314,23 @@ void UI_DisplayMain(void)
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int activeTxVFO = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF && gRxVfoIsActive) ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||
|
||||
for (vfo_num = 0; vfo_num < 2; vfo_num++)
|
||||
{
|
||||
const unsigned int line = (vfo_num == 0) ? line0 : line1;
|
||||
unsigned int channel = gEeprom.TX_VFO;
|
||||
// unsigned int tx_channel = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||
const bool same_vfo = (channel == vfo_num) ? true : false;
|
||||
const bool isTxVFO = (vfo_num == gEeprom.TX_VFO);
|
||||
uint8_t *p_line0 = gFrameBuffer[line + 0];
|
||||
uint8_t *p_line1 = gFrameBuffer[line + 1];
|
||||
unsigned int mode = 0;
|
||||
|
||||
if (single_vfo)
|
||||
{ // we're in single VFO mode - screen is dedicated to just one VFO
|
||||
|
||||
if (!same_vfo)
|
||||
if (!isTxVFO)
|
||||
continue; // skip the unused vfo
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF && gRxVfoIsActive)
|
||||
channel = gEeprom.RX_VFO; // we're currently monitoring the other VFO
|
||||
|
||||
if (channel != vfo_num)
|
||||
if (activeTxVFO != vfo_num)
|
||||
{
|
||||
if (gDTMF_CallState != DTMF_CALL_STATE_NONE || gDTMF_IsTx || gDTMF_InputMode)
|
||||
{ // show DTMF stuff
|
||||
@@ -381,19 +375,14 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
|
||||
// highlight the selected/used VFO with a marker
|
||||
if (!single_vfo && same_vfo)
|
||||
if (!single_vfo && isTxVFO)
|
||||
memmove(p_line0 + 0, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
||||
else
|
||||
if (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF)
|
||||
memmove(p_line0 + 0, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault));
|
||||
}
|
||||
else
|
||||
if (!single_vfo)
|
||||
else if (!single_vfo)
|
||||
{ // highlight the selected/used VFO with a marker
|
||||
if (same_vfo)
|
||||
if (isTxVFO)
|
||||
memmove(p_line0 + 0, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
||||
else
|
||||
//if (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF)
|
||||
memmove(p_line0 + 0, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault));
|
||||
}
|
||||
|
||||
@@ -406,8 +395,8 @@ void UI_DisplayMain(void)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
channel = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||
if (channel == vfo_num)
|
||||
activeTxVFO = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||
if (activeTxVFO == vfo_num)
|
||||
{ // show the TX symbol
|
||||
mode = 1;
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
@@ -500,8 +489,8 @@ void UI_DisplayMain(void)
|
||||
uint32_t frequency = gEeprom.VfoInfo[vfo_num].pRX->Frequency;
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
{ // transmitting
|
||||
channel = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||
if (channel == vfo_num)
|
||||
activeTxVFO = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||
if (activeTxVFO == vfo_num)
|
||||
frequency = gEeprom.VfoInfo[vfo_num].pTX->Frequency;
|
||||
}
|
||||
|
||||
|
31
ui/menu.c
31
ui/menu.c
@@ -52,7 +52,6 @@ const t_menu_item MenuList[] =
|
||||
{"T CTCS", VOICE_ID_CTCSS, MENU_T_CTCS }, // was "T_CTCS"
|
||||
{"T DIR", VOICE_ID_TX_OFFSET_FREQUENCY_DIRECTION, MENU_SFT_D }, // was "SFT_D"
|
||||
{"T OFFS", VOICE_ID_TX_OFFSET_FREQUENCY, MENU_OFFSET }, // was "OFFSET"
|
||||
{"T VFO", VOICE_ID_INVALID, MENU_XB }, // was "WX"
|
||||
{"T TOUT", VOICE_ID_TRANSMIT_OVER_TIME, MENU_TOT }, // was "TOT"
|
||||
{"W/N", VOICE_ID_CHANNEL_BANDWIDTH, MENU_W_N },
|
||||
{"SCRAM", VOICE_ID_SCRAMBLER_ON, MENU_SCR }, // was "SCR"
|
||||
@@ -67,7 +66,7 @@ const t_menu_item MenuList[] =
|
||||
#endif
|
||||
{"BLT", VOICE_ID_INVALID, MENU_ABR }, // was "ABR"
|
||||
{"BLTTRX", VOICE_ID_INVALID, MENU_ABR_ON_TX_RX },
|
||||
{"DUALRX", VOICE_ID_DUAL_STANDBY, MENU_TDR }, // was "TDR"
|
||||
{"RXMODE", VOICE_ID_DUAL_STANDBY, MENU_TDR },
|
||||
{"BEEP", VOICE_ID_BEEP_PROMPT, MENU_BEEP },
|
||||
#ifdef ENABLE_VOICE
|
||||
{"VOICE", VOICE_ID_VOICE_PROMPT, MENU_VOICE },
|
||||
@@ -186,18 +185,12 @@ const char gSubMenu_TOT[11][7] =
|
||||
"15 min"
|
||||
};
|
||||
|
||||
const char gSubMenu_CHAN[3][10] =
|
||||
const char* gSubMenu_RXMode[4] =
|
||||
{
|
||||
"OFF",
|
||||
"UPPER\nVFO",
|
||||
"LOWER\nVFO"
|
||||
};
|
||||
|
||||
const char gSubMenu_XB[3][10] =
|
||||
{
|
||||
"RX\nVFO",
|
||||
"UPPER\nVFO",
|
||||
"LOWER\nVFO"
|
||||
"MAIN\nONLY", // TX and RX on main only
|
||||
"DUAL RX\nRESPOND", // Watch both and respond
|
||||
"CROSS\nBAND", // TX on main, RX on secondary
|
||||
"MAIN TX\nDUAL RX" // always TX on main, but RX on both
|
||||
};
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
@@ -209,14 +202,14 @@ const char gSubMenu_XB[3][10] =
|
||||
};
|
||||
#endif
|
||||
|
||||
const char gSubMenu_SC_REV[3][13] =
|
||||
const char gSubMenu_SC_REV[3][8] =
|
||||
{
|
||||
"TIME",
|
||||
"CARRIER",
|
||||
"SEARCH"
|
||||
};
|
||||
|
||||
const char gSubMenu_MDF[4][15] =
|
||||
const char* gSubMenu_MDF[4] =
|
||||
{
|
||||
"FREQ",
|
||||
"CHANNEL\nNUMBER",
|
||||
@@ -240,7 +233,7 @@ const char gSubMenu_D_RSP[4][11] =
|
||||
"BOTH"
|
||||
};
|
||||
|
||||
const char gSubMenu_PTT_ID[5][15] =
|
||||
const char* gSubMenu_PTT_ID[5] =
|
||||
{
|
||||
"OFF",
|
||||
"KEY\nUP",
|
||||
@@ -680,11 +673,7 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
|
||||
case MENU_TDR:
|
||||
strcpy(String, gSubMenu_CHAN[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
case MENU_XB:
|
||||
strcpy(String, gSubMenu_XB[gSubMenuSelection]);
|
||||
strcpy(String, gSubMenu_RXMode[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
case MENU_TOT:
|
||||
|
11
ui/menu.h
11
ui/menu.h
@@ -39,7 +39,6 @@ enum
|
||||
MENU_T_CTCS,
|
||||
MENU_SFT_D,
|
||||
MENU_OFFSET,
|
||||
MENU_XB,
|
||||
MENU_TOT,
|
||||
MENU_W_N,
|
||||
MENU_SCR,
|
||||
@@ -128,18 +127,18 @@ extern const char gSubMenu_W_N[2][7];
|
||||
extern const char gSubMenu_OFF_ON[2][4];
|
||||
extern const char gSubMenu_SAVE[5][4];
|
||||
extern const char gSubMenu_TOT[11][7];
|
||||
extern const char gSubMenu_CHAN[3][10];
|
||||
extern const char gSubMenu_XB[3][10];
|
||||
extern const char* gSubMenu_RXMode[4];
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
extern const char gSubMenu_VOICE[3][4];
|
||||
#endif
|
||||
extern const char gSubMenu_SC_REV[3][13];
|
||||
extern const char gSubMenu_MDF[4][15];
|
||||
extern const char gSubMenu_SC_REV[3][8];
|
||||
extern const char* gSubMenu_MDF[4];
|
||||
#ifdef ENABLE_ALARM
|
||||
extern const char gSubMenu_AL_MOD[2][5];
|
||||
#endif
|
||||
extern const char gSubMenu_D_RSP[4][11];
|
||||
extern const char gSubMenu_PTT_ID[5][15];
|
||||
extern const char* gSubMenu_PTT_ID[5];
|
||||
extern const char gSubMenu_PONMSG[4][8];
|
||||
extern const char gSubMenu_ROGER[3][9];
|
||||
extern const char gSubMenu_RESET[2][4];
|
||||
|
37
ui/status.c
37
ui/status.c
@@ -85,15 +85,6 @@ void UI_DisplayStatus(const bool test_display)
|
||||
x1 = x + 10;
|
||||
}
|
||||
else
|
||||
#ifdef ENABLE_FMRADIO
|
||||
// FM indicator
|
||||
if (gFmRadioMode || test_display)
|
||||
{
|
||||
memmove(line + x, BITMAP_FM, sizeof(BITMAP_FM));
|
||||
x1 = x + sizeof(BITMAP_FM);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
// SCAN indicator
|
||||
if (gScanStateDir != SCAN_OFF || gScreenToDisplay == DISPLAY_SCANNER || test_display)
|
||||
{
|
||||
@@ -123,28 +114,23 @@ void UI_DisplayStatus(const bool test_display)
|
||||
memmove(line + x, BITMAP_VoicePrompt, sizeof(BITMAP_VoicePrompt));
|
||||
x1 = x + sizeof(BITMAP_VoicePrompt);
|
||||
}
|
||||
x += sizeof(BITMAP_VoicePrompt);
|
||||
x += sizeof(BITMAP_VoicePrompt) + 2;
|
||||
#else
|
||||
// hmmm, what to put in it's place
|
||||
#endif
|
||||
|
||||
// DUAL-WATCH indicator
|
||||
if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF || test_display)
|
||||
{
|
||||
if (gDualWatchActive || test_display)
|
||||
memmove(line + x, BITMAP_TDR1, sizeof(BITMAP_TDR1));
|
||||
uint8_t dw = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2;
|
||||
if(dw == 1 || dw == 3 || test_display) { // DWR - dual watch + respond
|
||||
if(gDualWatchActive || test_display)
|
||||
memmove(line + x, BITMAP_TDR1, sizeof(BITMAP_TDR1) - (dw==1?0:5));
|
||||
else
|
||||
memmove(line + x, BITMAP_TDR2, sizeof(BITMAP_TDR2));
|
||||
memmove(line + x + 3, BITMAP_TDR2, sizeof(BITMAP_TDR2));
|
||||
}
|
||||
x += sizeof(BITMAP_TDR1);
|
||||
|
||||
// CROSS-VFO indicator
|
||||
if (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF || test_display)
|
||||
{
|
||||
else if(dw == 2) { // XB - crossband
|
||||
memmove(line + x, BITMAP_XB, sizeof(BITMAP_XB));
|
||||
x1 = x + sizeof(BITMAP_XB);
|
||||
}
|
||||
x += sizeof(BITMAP_XB);
|
||||
|
||||
x += sizeof(BITMAP_TDR1) + 2;
|
||||
|
||||
#ifdef ENABLE_VOX
|
||||
// VOX indicator
|
||||
@@ -153,9 +139,12 @@ void UI_DisplayStatus(const bool test_display)
|
||||
memmove(line + x, BITMAP_VOX, sizeof(BITMAP_VOX));
|
||||
x1 = x + sizeof(BITMAP_VOX);
|
||||
}
|
||||
x += sizeof(BITMAP_VOX);
|
||||
x += sizeof(BITMAP_VOX) + 2;
|
||||
#endif
|
||||
|
||||
x = MAX(x, 61);
|
||||
x1 = x;
|
||||
|
||||
// KEY-LOCK indicator
|
||||
if (gEeprom.KEY_LOCK || test_display)
|
||||
{
|
||||
|
Reference in New Issue
Block a user