0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 22:31:25 +03:00

display updates

This commit is contained in:
OneOfEleven 2023-10-30 00:40:34 +00:00
parent dac0cc0d18
commit 0596b74719
6 changed files with 25 additions and 13 deletions

View File

@ -95,7 +95,7 @@ static void APP_update_rssi(const int vfo)
g_current_rssi[vfo] = rssi; g_current_rssi[vfo] = rssi;
if (g_squelch_open) if (g_squelch_open || g_monitor_enabled)
UI_update_rssi(rssi, vfo); UI_update_rssi(rssi, vfo);
} }

View File

@ -207,16 +207,24 @@ void processFKeyFunction(const key_code_t Key)
if (g_scan_state_dir != SCAN_STATE_DIR_OFF) if (g_scan_state_dir != SCAN_STATE_DIR_OFF)
APP_stop_scan(); APP_stop_scan();
#ifdef ENABLE_FMRADIO if (g_fkey_pressed)
ACTION_FM(); {
#else g_tx_vfo->am_mode = (g_tx_vfo->am_mode + 1) & 1u;
g_request_save_channel = 1;
}
else
{
#ifdef ENABLE_FMRADIO
ACTION_FM();
#else
// TODO: make use of this function key // TODO: make use of this function key
#endif #endif
}
break; break;
case KEY_1: // BAND case KEY_1: // BAND
@ -238,7 +246,7 @@ void processFKeyFunction(const key_code_t Key)
else else
Band = BAND6_400MHz; // jump to next band Band = BAND6_400MHz; // jump to next band
g_tx_vfo->band = Band; g_tx_vfo->band = Band;
g_eeprom.screen_channel[Vfo] = FREQ_CHANNEL_FIRST + Band; g_eeprom.screen_channel[Vfo] = FREQ_CHANNEL_FIRST + Band;
g_eeprom.freq_channel[Vfo] = FREQ_CHANNEL_FIRST + Band; g_eeprom.freq_channel[Vfo] = FREQ_CHANNEL_FIRST + Band;
@ -438,10 +446,10 @@ void MAIN_Key_DIGITS(key_code_t Key, bool key_pressed, bool key_held)
g_request_display_screen = DISPLAY_MAIN; g_request_display_screen = DISPLAY_MAIN;
} }
processFKeyFunction(Key);
g_fkey_pressed = false; g_fkey_pressed = false;
g_update_status = true; g_update_status = true;
processFKeyFunction(Key);
} }
} }
@ -456,6 +464,7 @@ void MAIN_Key_DIGITS(key_code_t Key, bool key_pressed, bool key_held)
if (g_fkey_pressed) if (g_fkey_pressed)
{ // F-key was first pressed { // F-key was first pressed
processFKeyFunction(Key); processFKeyFunction(Key);
g_fkey_pressed = false; g_fkey_pressed = false;
@ -798,7 +807,6 @@ void MAIN_Key_STAR(bool key_pressed, bool key_held)
if (g_scan_state_dir != SCAN_STATE_DIR_OFF || g_current_function == FUNCTION_TRANSMIT) if (g_scan_state_dir != SCAN_STATE_DIR_OFF || g_current_function == FUNCTION_TRANSMIT)
{ // RF scanning or TX'ing { // RF scanning or TX'ing
// g_beep_to_play = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
return; return;
} }

Binary file not shown.

Binary file not shown.

View File

@ -80,11 +80,15 @@ const freq_band_table_t FREQ_BAND_TABLE[7] =
}; };
#endif #endif
// the first 7 values MUST remain in those same positions (to remain compatible with the QS config windows software) // the first 7 values MUST remain in those same positions
// so as to remain compatible with the QS config software
//
const uint16_t STEP_FREQ_TABLE[21] = { const uint16_t STEP_FREQ_TABLE[21] = {
250, 500, 625, 1000, 1250, 2500, 833, 250, 500, 625, 1000, 1250, 2500, 833,
1, 5, 10, 25, 50, 100, 125, 1500, 3000, 5000, 10000, 12500, 25000, 50000 1, 5, 10, 25, 50, 100, 125, 1500, 3000, 5000, 10000, 12500, 25000, 50000
}; };
// the above step sizes will be sorted to appear to be in order to the user
uint16_t step_freq_table_sorted[ARRAY_SIZE(STEP_FREQ_TABLE)]; uint16_t step_freq_table_sorted[ARRAY_SIZE(STEP_FREQ_TABLE)];
unsigned int FREQUENCY_get_step_index(const unsigned int step_size) unsigned int FREQUENCY_get_step_index(const unsigned int step_size)

View File

@ -302,7 +302,7 @@ void UI_update_rssi(const int16_t rssi, const int vfo)
#ifdef ENABLE_RX_SIGNAL_BAR #ifdef ENABLE_RX_SIGNAL_BAR
if (g_center_line == CENTER_LINE_RSSI) if (g_center_line == CENTER_LINE_RSSI)
{ // optional larger RSSI dBm, S-point and bar level { // optional larger RSSI dBm, S-point and bar level
if (g_current_function == FUNCTION_RECEIVE) if (g_current_function == FUNCTION_RECEIVE && g_squelch_open)
{ {
UI_DisplayRSSIBar(rssi, true); UI_DisplayRSSIBar(rssi, true);
} }