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

fix key beeps + new copy VFO to chan

This commit is contained in:
OneOfEleven
2023-10-18 20:44:33 +01:00
parent 36ee70df5b
commit 44c1cdbe58
9 changed files with 75 additions and 30 deletions

View File

@ -2544,7 +2544,7 @@ static void APP_process_key(const key_code_t Key, const bool key_pressed, const
// g_ptt_was_pressed = false;
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG)
UART_printf("proc key 1 %3u %u %u %u %u\r\n", Key, key_pressed, key_held, g_fkey_pressed, flag);
// UART_printf("proc key 1 %3u %u %u %u %u\r\n", Key, key_pressed, key_held, g_fkey_pressed, flag);
#endif
}
@ -2566,12 +2566,12 @@ static void APP_process_key(const key_code_t Key, const bool key_pressed, const
// g_ptt_was_released = false;
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG)
UART_printf("proc key 2 %3u %u %u %u %u\r\n", Key, key_pressed, key_held, g_fkey_pressed, flag);
// UART_printf("proc key 2 %3u %u %u %u %u\r\n", Key, key_pressed, key_held, g_fkey_pressed, flag);
#endif
}
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG)
UART_printf("proc key 3 %3u %u %u %u %u\r\n", Key, key_pressed, key_held, g_fkey_pressed, flag);
// UART_printf("proc key 3 %3u %u %u %u %u\r\n", Key, key_pressed, key_held, g_fkey_pressed, flag);
#endif
if (!flag) // this flag is responsible for keys being ignored :(

View File

@ -618,7 +618,8 @@ void MAIN_Key_MENU(const bool key_pressed, const bool key_held)
g_eeprom.vfo_open)
{ // not scanning
const unsigned int vfo = get_RX_VFO();
//const unsigned int vfo = get_RX_VFO();
const unsigned int vfo = g_eeprom.tx_vfo;
if (IS_USER_CHANNEL(g_eeprom.screen_channel[vfo]))
{ // copy channel to VFO, then swap to the VFO
@ -636,7 +637,8 @@ void MAIN_Key_MENU(const bool key_pressed, const bool key_held)
g_request_save_vfo = true;
g_beep_to_play = BEEP_1KHZ_60MS_OPTIONAL;
g_beep_to_play = BEEP_880HZ_60MS_TRIPLE_BEEP;
//g_beep_to_play = BEEP_1KHZ_60MS_OPTIONAL;
g_update_status = true;
g_update_display = true;
@ -645,16 +647,30 @@ void MAIN_Key_MENU(const bool key_pressed, const bool key_held)
if (IS_FREQ_CHANNEL(g_eeprom.screen_channel[vfo]))
{ // copy VFO to channel
#ifdef ENABLE_VOICE
g_another_voice_id = VOICE_ID_MENU;
#endif
// g_request_display_screen = DISPLAY_MENU;
// search the channels to see if the frequency is already present
const unsigned int chan = BOARD_find_channel(g_eeprom.vfo_info[vfo].p_tx->frequency);
g_screen_to_display = DISPLAY_INVALID;
GUI_SelectNextDisplay(DISPLAY_MENU);
g_menu_cursor = MENU_MEM_SAVE;
g_flag_refresh_menu = true;
g_ask_for_confirmation = 0;
g_is_in_sub_menu = true;
g_flag_refresh_menu = false;
g_menu_cursor = MENU_MEM_SAVE;
g_is_in_sub_menu = true;
if (chan <= USER_CHANNEL_LAST)
{ // go straight to the channel that holds the same frequency
g_sub_menu_selection = chan;
}
g_screen_to_display = DISPLAY_MENU;
g_update_display = false;
UI_DisplayMenu();
#ifdef ENABLE_VOICE
g_another_voice_id = VOICE_ID_MENU;
#endif
g_beep_to_play = BEEP_880HZ_60MS_TRIPLE_BEEP;
}
}
else