0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 06:39:49 +03:00

Renames, some code changes

This commit is contained in:
OneOfEleven
2023-10-18 11:31:30 +01:00
parent a60fc80296
commit bf7a837485
32 changed files with 408 additions and 384 deletions

View File

@ -77,7 +77,7 @@ void draw_bar(uint8_t *line, const int len, const int max_width)
#endif
}
#ifdef ENABLE_SHOW_TX_TIMEOUT
#ifdef ENABLE_TX_TIMEOUT_BAR
bool UI_DisplayTXCountdown(const bool now)
{
unsigned int timeout_secs = 0;
@ -152,7 +152,7 @@ void UI_drawBars(uint8_t *p, const unsigned int level)
#pragma GCC diagnostic pop
}
#ifdef ENABLE_AUDIO_BAR
#ifdef ENABLE_TX_AUDIO_BAR
uint32_t sqrt16(uint32_t value)
{ // return square root of 'value'
@ -233,7 +233,7 @@ void UI_drawBars(uint8_t *p, const unsigned int level)
}
#endif
#ifdef ENABLE_RSSI_BAR
#ifdef ENABLE_RX_SIGNAL_BAR
bool UI_DisplayRSSIBar(const int16_t rssi, const bool now)
{
if (g_setting_rssi_bar)
@ -300,6 +300,7 @@ void UI_drawBars(uint8_t *p, const unsigned int level)
void UI_update_rssi(const int16_t rssi, const int vfo)
{
#ifdef ENABLE_RX_SIGNAL_BAR
if (center_line == CENTER_LINE_RSSI)
{ // optional larger RSSI dBm, S-point and bar level
if (g_current_function == FUNCTION_RECEIVE || g_current_function == FUNCTION_MONITOR)
@ -307,6 +308,7 @@ void UI_update_rssi(const int16_t rssi, const int vfo)
UI_DisplayRSSIBar(rssi, true);
}
}
#endif
{ // original little RS bars
@ -754,7 +756,7 @@ void UI_DisplayMain(void)
else
if (mode == 2)
{ // RX signal level
//#ifndef ENABLE_RSSI_BAR
//#ifndef ENABLE_RX_SIGNAL_BAR
// antenna bar graph
if (g_vfo_rssi_bar_level[vfo_num] > 0)
Level = g_vfo_rssi_bar_level[vfo_num];
@ -834,7 +836,7 @@ void UI_DisplayMain(void)
g_current_function == FUNCTION_MONITOR ||
g_current_function == FUNCTION_INCOMING);
#ifdef ENABLE_SHOW_TX_TIMEOUT
#ifdef ENABLE_TX_TIMEOUT_BAR
// show the TX timeout count down
if (UI_DisplayTXCountdown(false))
{
@ -843,7 +845,7 @@ void UI_DisplayMain(void)
else
#endif
#ifdef ENABLE_AUDIO_BAR
#ifdef ENABLE_TX_AUDIO_BAR
// show the TX audio level
if (UI_DisplayAudioBar(false))
{
@ -866,7 +868,7 @@ void UI_DisplayMain(void)
else
#endif
#ifdef ENABLE_RSSI_BAR
#ifdef ENABLE_RX_SIGNAL_BAR
// show the RX RSSI dBm, S-point and signal strength bar graph
if (rx && g_setting_rssi_bar)
{

View File

@ -31,10 +31,10 @@ typedef enum center_line_e center_line_t;
extern center_line_t center_line;
#ifdef ENABLE_SHOW_TX_TIMEOUT
#ifdef ENABLE_TX_TIMEOUT_BAR
bool UI_DisplayTXCountdown(const bool now);
#endif
#ifdef ENABLE_AUDIO_BAR
#ifdef ENABLE_TX_AUDIO_BAR
bool UI_DisplayAudioBar(const bool now);
#endif
void UI_update_rssi(const int16_t rssi, const int vfo);

View File

@ -72,7 +72,9 @@ const t_menu_item g_menu_list[] =
#endif
{"BL ", VOICE_ID_INVALID, MENU_AUTO_BACKLITE }, // was "ABR"
{"BL TRX", VOICE_ID_INVALID, MENU_AUTO_BACKLITE_ON_TX_RX},
#ifdef ENABLE_CONTRAST
{"CTRAST", VOICE_ID_INVALID, MENU_CONTRAST },
#endif
{"BEEP", VOICE_ID_BEEP_PROMPT, MENU_BEEP },
#ifdef ENABLE_VOICE
{"VOICE", VOICE_ID_VOICE_PROMPT, MENU_VOICE },
@ -85,10 +87,10 @@ const t_menu_item g_menu_list[] =
{"RP STE", VOICE_ID_INVALID, MENU_RP_STE },
{"MIC GN", VOICE_ID_INVALID, MENU_MIC_GAIN },
{"COMPND", VOICE_ID_INVALID, MENU_COMPAND },
#ifdef ENABLE_AUDIO_BAR
#ifdef ENABLE_TX_AUDIO_BAR
{"Tx BAR", VOICE_ID_INVALID, MENU_TX_BAR },
#endif
#ifdef ENABLE_RSSI_BAR
#ifdef ENABLE_RX_SIGNAL_BAR
{"Rx BAR", VOICE_ID_INVALID, MENU_RX_BAR },
#endif
{"1 CALL", VOICE_ID_INVALID, MENU_1_CALL },
@ -712,18 +714,20 @@ void UI_DisplayMenu(void)
strcpy(String, g_sub_menu_rx_tx[g_sub_menu_selection]);
break;
case MENU_CONTRAST:
strcpy(String, "CONTRAST\n");
sprintf(String + strlen(String), "%d", g_sub_menu_selection);
//g_setting_contrast = g_sub_menu_selection
ST7565_SetContrast(g_sub_menu_selection);
g_update_display = true;
break;
#ifdef ENABLE_CONTRAST
case MENU_CONTRAST:
strcpy(String, "CONTRAST\n");
sprintf(String + strlen(String), "%d", g_sub_menu_selection);
//g_setting_contrast = g_sub_menu_selection
ST7565_SetContrast(g_sub_menu_selection);
g_update_display = true;
break;
#endif
#ifdef ENABLE_AUDIO_BAR
#ifdef ENABLE_TX_AUDIO_BAR
case MENU_TX_BAR:
#endif
#ifdef ENABLE_RSSI_BAR
#ifdef ENABLE_RX_SIGNAL_BAR
case MENU_RX_BAR:
#endif
#ifdef ENABLE_AM_FIX

View File

@ -66,36 +66,32 @@ enum
#endif
MENU_AUTO_BACKLITE,
MENU_AUTO_BACKLITE_ON_TX_RX,
#ifdef ENABLE_CONTRAST
MENU_CONTRAST,
MENU_BEEP,
#ifdef ENABLE_VOICE
MENU_VOICE,
#endif
MENU_SCAN_CAR_RESUME,
MENU_AUTO_KEY_LOCK,
MENU_S_ADD1,
MENU_S_ADD2,
#ifdef ENABLE_NOAA
MENU_NOAA_SCAN,
#endif
MENU_1_CALL,
MENU_STE,
MENU_RP_STE,
MENU_MIC_GAIN,
MENU_COMPAND,
#ifdef ENABLE_AUDIO_BAR
#ifdef ENABLE_TX_AUDIO_BAR
MENU_TX_BAR,
#endif
#ifdef ENABLE_RSSI_BAR
#ifdef ENABLE_RX_SIGNAL_BAR
MENU_RX_BAR,
#endif
MENU_1_CALL,
MENU_S_LIST,
MENU_SLIST1,
MENU_SLIST2,
#ifdef ENABLE_ALARM
MENU_ALARM_MODE,
#endif
MENU_ANI_ID,
MENU_UP_CODE,
MENU_DN_CODE,
MENU_PTT_ID,
MENU_DTMF_ST,
MENU_DTMF_RSP,
MENU_DTMF_HOLD,
@ -103,8 +99,12 @@ enum
MENU_DTMF_DCD,
MENU_DTMF_LIST,
MENU_DTMF_LIVE_DEC,
MENU_PON_MSG,
MENU_PTT_ID,
MENU_ROGER_MODE,
#ifdef ENABLE_ALARM
MENU_ALARM_MODE,
#endif
MENU_PON_MSG,
MENU_VOLTAGE,
MENU_BAT_TXT,
MENU_MOD_MODE,
@ -114,9 +114,11 @@ enum
#ifdef ENABLE_AM_FIX_TEST1
MENU_AM_FIX_TEST1,
#endif
#ifdef ENABLE_NOAA
MENU_NOAA_SCAN,
MENU_BEEP,
#ifdef ENABLE_VOICE
MENU_VOICE,
#endif
MENU_AUTO_KEY_LOCK,
MENU_SIDE1_SHORT,
MENU_SIDE1_LONG,
MENU_SIDE2_SHORT,