mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 22:31:25 +03:00
Menu wordings + on-screen message when PC config upload/download
This commit is contained in:
parent
aae43131d9
commit
6b42315330
16
app/menu.c
16
app/menu.c
@ -661,9 +661,9 @@ void MENU_AcceptSetting(void)
|
||||
case MENU_PTT_ID:
|
||||
g_tx_vfo->dtmf_ptt_id_tx_mode = g_sub_menu_selection;
|
||||
g_request_save_channel = 1;
|
||||
if (g_sub_menu_selection == PTT_ID_TX_DOWN ||
|
||||
g_sub_menu_selection == PTT_ID_BOTH ||
|
||||
g_sub_menu_selection == PTT_ID_APOLLO)
|
||||
if (g_tx_vfo->dtmf_ptt_id_tx_mode == PTT_ID_TX_DOWN ||
|
||||
g_tx_vfo->dtmf_ptt_id_tx_mode == PTT_ID_BOTH ||
|
||||
g_tx_vfo->dtmf_ptt_id_tx_mode == PTT_ID_APOLLO)
|
||||
{
|
||||
g_eeprom.roger_mode = ROGER_MODE_OFF;
|
||||
break;
|
||||
@ -708,6 +708,16 @@ void MENU_AcceptSetting(void)
|
||||
|
||||
case MENU_ROGER:
|
||||
g_eeprom.roger_mode = g_sub_menu_selection;
|
||||
if (g_eeprom.roger_mode != ROGER_MODE_OFF)
|
||||
{
|
||||
if (g_tx_vfo->dtmf_ptt_id_tx_mode == PTT_ID_TX_DOWN ||
|
||||
g_tx_vfo->dtmf_ptt_id_tx_mode == PTT_ID_BOTH ||
|
||||
g_tx_vfo->dtmf_ptt_id_tx_mode == PTT_ID_APOLLO)
|
||||
{
|
||||
g_tx_vfo->dtmf_ptt_id_tx_mode = PTT_ID_OFF; // // disable PTT ID tail
|
||||
g_request_save_channel = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case MENU_AM:
|
||||
|
@ -235,7 +235,7 @@ static void CMD_0514(const uint8_t *pBuffer)
|
||||
g_fm_radio_count_down_500ms = fm_radio_countdown_500ms;
|
||||
#endif
|
||||
|
||||
g_serial_config_count_down_500ms = 12; // 6 sec
|
||||
g_serial_config_count_down_500ms = serial_config_count_down_500ms;
|
||||
|
||||
// turn the LCD backlight off
|
||||
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
|
||||
@ -252,7 +252,7 @@ static void CMD_051B(const uint8_t *pBuffer)
|
||||
if (pCmd->Timestamp != Timestamp)
|
||||
return;
|
||||
|
||||
g_serial_config_count_down_500ms = 12; // 6 sec
|
||||
g_serial_config_count_down_500ms = serial_config_count_down_500ms;
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
g_fm_radio_count_down_500ms = fm_radio_countdown_500ms;
|
||||
@ -283,7 +283,7 @@ static void CMD_051D(const uint8_t *pBuffer)
|
||||
if (pCmd->Timestamp != Timestamp)
|
||||
return;
|
||||
|
||||
g_serial_config_count_down_500ms = 12; // 6 sec
|
||||
g_serial_config_count_down_500ms = serial_config_count_down_500ms;
|
||||
|
||||
bReloadEeprom = false;
|
||||
|
||||
@ -408,7 +408,7 @@ static void CMD_052F(const uint8_t *pBuffer)
|
||||
if (g_current_function == FUNCTION_POWER_SAVE)
|
||||
FUNCTION_Select(FUNCTION_FOREGROUND);
|
||||
|
||||
g_serial_config_count_down_500ms = 12; // 6 sec
|
||||
g_serial_config_count_down_500ms = serial_config_count_down_500ms;
|
||||
|
||||
Timestamp = pCmd->Timestamp;
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "backlight.h"
|
||||
#include "bsp/dp32g030/gpio.h"
|
||||
#include "driver/backlight.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "settings.h"
|
||||
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
2
misc.c
2
misc.c
@ -35,6 +35,8 @@ const uint8_t dtmf_rx_timeout_500ms = 10000 / 500; // 10 sec
|
||||
const uint8_t dtmf_decode_ring_countdown_500ms = 15000 / 500; // 15 seconds .. time we sound the ringing for
|
||||
const uint8_t dtmf_txstop_countdown_500ms = 3000 / 500; // 6 seconds
|
||||
|
||||
const uint8_t serial_config_count_down_500ms = 3000 / 500; // 3 seconds
|
||||
|
||||
const uint8_t key_input_timeout_500ms = 6000 / 500; // 6 seconds
|
||||
const uint16_t key_repeat_delay_10ms = 400 / 10; // 400ms
|
||||
const uint16_t key_repeat_10ms = 80 / 10; // 80ms .. MUST be less than 'key_repeat_delay'
|
||||
|
2
misc.h
2
misc.h
@ -107,6 +107,8 @@ extern const uint8_t dtmf_rx_timeout_500ms;
|
||||
extern const uint8_t dtmf_decode_ring_countdown_500ms;
|
||||
extern const uint8_t dtmf_txstop_countdown_500ms;
|
||||
|
||||
extern const uint8_t serial_config_count_down_500ms;
|
||||
|
||||
extern const uint8_t key_input_timeout_500ms;
|
||||
|
||||
extern const uint16_t key_repeat_delay_10ms;
|
||||
|
11
ui/main.c
11
ui/main.c
@ -27,6 +27,7 @@
|
||||
#endif
|
||||
#include "bitmaps.h"
|
||||
#include "board.h"
|
||||
#include "driver/backlight.h"
|
||||
#include "driver/bk4819.h"
|
||||
#include "driver/st7565.h"
|
||||
#include "external/printf/printf.h"
|
||||
@ -393,8 +394,18 @@ void UI_DisplayMain(void)
|
||||
// clear the screen
|
||||
memset(g_frame_buffer, 0, sizeof(g_frame_buffer));
|
||||
|
||||
if (g_serial_config_count_down_500ms > 0)
|
||||
{
|
||||
backlight_turn_on();
|
||||
UI_PrintString("UART", 0, LCD_WIDTH, 1, 8);
|
||||
UI_PrintString("CONFIG COMMS", 0, LCD_WIDTH, 3, 8);
|
||||
ST7565_BlitFullScreen();
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_eeprom.key_lock && g_keypad_locked > 0)
|
||||
{ // tell user how to unlock the keyboard
|
||||
backlight_turn_on();
|
||||
UI_PrintString("Long press #", 0, LCD_WIDTH, 1, 8);
|
||||
UI_PrintString("to unlock", 0, LCD_WIDTH, 3, 8);
|
||||
ST7565_BlitFullScreen();
|
||||
|
45
ui/menu.c
45
ui/menu.c
@ -74,7 +74,7 @@ const t_menu_item g_menu_list[] =
|
||||
#ifdef ENABLE_VOICE
|
||||
{"VOICE", VOICE_ID_VOICE_PROMPT, MENU_VOICE },
|
||||
#endif
|
||||
{"SC REV", VOICE_ID_INVALID, MENU_SC_REV },
|
||||
{"S RESU", VOICE_ID_INVALID, MENU_SC_REV }, // was "SC_REV"
|
||||
{"KEYLOC", VOICE_ID_INVALID, MENU_AUTOLK }, // was "AUTOLk"
|
||||
{"S ADD1", VOICE_ID_INVALID, MENU_S_ADD1 },
|
||||
{"S ADD2", VOICE_ID_INVALID, MENU_S_ADD2 },
|
||||
@ -90,7 +90,7 @@ const t_menu_item g_menu_list[] =
|
||||
{"SLIST1", VOICE_ID_INVALID, MENU_SLIST1 },
|
||||
{"SLIST2", VOICE_ID_INVALID, MENU_SLIST2 },
|
||||
#ifdef ENABLE_ALARM
|
||||
{"ALMODE", VOICE_ID_INVALID, MENU_AL_MOD },
|
||||
{"SOS AL", VOICE_ID_INVALID, MENU_AL_MOD }, // was "ALMODE"
|
||||
#endif
|
||||
{"ANI ID", VOICE_ID_ANI_CODE, MENU_ANI_ID },
|
||||
{"UPCODE", VOICE_ID_INVALID, MENU_UPCODE },
|
||||
@ -242,10 +242,10 @@ const char g_sub_menu_mdf[4][15] =
|
||||
|
||||
const char g_sub_menu_D_RSP[4][11] =
|
||||
{
|
||||
"DO\nNOTHING",
|
||||
"NONE",
|
||||
"RING",
|
||||
"REPLY",
|
||||
"BOTH"
|
||||
"RING\nREPLY"
|
||||
};
|
||||
|
||||
const char g_sub_menu_PTT_ID[5][15] =
|
||||
@ -676,16 +676,24 @@ void UI_DisplayMenu(void)
|
||||
case MENU_AM_FIX:
|
||||
#endif
|
||||
case MENU_BCL:
|
||||
case MENU_BEEP:
|
||||
case MENU_S_ADD1:
|
||||
case MENU_S_ADD2:
|
||||
case MENU_STE:
|
||||
case MENU_D_ST:
|
||||
case MENU_D_DCD:
|
||||
case MENU_D_LIVE_DEC:
|
||||
strcpy(String, g_sub_menu_off_on[g_sub_menu_selection]);
|
||||
break;
|
||||
|
||||
case MENU_BEEP:
|
||||
strcpy(String, "KEY BEEP\n");
|
||||
strcat(String + strlen(String), g_sub_menu_off_on[g_sub_menu_selection]);
|
||||
break;
|
||||
|
||||
case MENU_D_ST:
|
||||
strcpy(String, "SIDETONE\n");
|
||||
strcat(String, g_sub_menu_off_on[g_sub_menu_selection]);
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
case MENU_NOAA_S:
|
||||
strcpy(String, "SCAN\n");
|
||||
@ -793,7 +801,8 @@ void UI_DisplayMenu(void)
|
||||
#endif
|
||||
|
||||
case MENU_SC_REV:
|
||||
strcpy(String, g_sub_menu_sc_rev[g_sub_menu_selection]);
|
||||
strcpy(String, "SCAN\nRESUME\n");
|
||||
strcat(String, g_sub_menu_sc_rev[g_sub_menu_selection]);
|
||||
break;
|
||||
|
||||
case MENU_MDF:
|
||||
@ -816,24 +825,29 @@ void UI_DisplayMenu(void)
|
||||
|
||||
#ifdef ENABLE_ALARM
|
||||
case MENU_AL_MOD:
|
||||
sprintf(String, g_sub_menu_AL_MOD[g_sub_menu_selection]);
|
||||
strcpy(String, "TX ALARM\n");
|
||||
sprintf(String + strlen(String), g_sub_menu_AL_MOD[g_sub_menu_selection]);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MENU_ANI_ID:
|
||||
strcpy(String, g_eeprom.ani_dtmf_id);
|
||||
strcpy(String, "YOUR ID\n");
|
||||
strcat(String, g_eeprom.ani_dtmf_id);
|
||||
break;
|
||||
|
||||
case MENU_UPCODE:
|
||||
strcpy(String, g_eeprom.dtmf_up_code);
|
||||
strcpy(String, "TX KEY-UP\n");
|
||||
strcat(String, g_eeprom.dtmf_up_code);
|
||||
break;
|
||||
|
||||
case MENU_DWCODE:
|
||||
strcpy(String, g_eeprom.dtmf_down_code);
|
||||
strcpy(String, "TX KEY-DN\n");
|
||||
strcat(String, g_eeprom.dtmf_down_code);
|
||||
break;
|
||||
|
||||
case MENU_D_RSP:
|
||||
strcpy(String, g_sub_menu_D_RSP[g_sub_menu_selection]);
|
||||
strcpy(String, "RESPONSE\n");
|
||||
strcat(String, g_sub_menu_D_RSP[g_sub_menu_selection]);
|
||||
break;
|
||||
|
||||
case MENU_D_HOLD:
|
||||
@ -864,7 +878,9 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
|
||||
case MENU_D_PRE:
|
||||
sprintf(String, "%d*10ms", g_sub_menu_selection);
|
||||
strcpy(String, "TX DELAY\n");
|
||||
// sprintf(String + strlen(String), "%d*10ms", g_sub_menu_selection);
|
||||
sprintf(String + strlen(String), "%dms", 10 * g_sub_menu_selection);
|
||||
break;
|
||||
|
||||
case MENU_PTT_ID:
|
||||
@ -888,7 +904,8 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
|
||||
case MENU_ROGER:
|
||||
strcpy(String, g_sub_menu_roger_mode[g_sub_menu_selection]);
|
||||
strcpy(String, "TX KEY-DN\n");
|
||||
strcpy(String + strlen(String), g_sub_menu_roger_mode[g_sub_menu_selection]);
|
||||
break;
|
||||
|
||||
case MENU_VOL:
|
||||
|
Loading…
x
Reference in New Issue
Block a user