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

fix up/dn frequency tx offset bug

This commit is contained in:
OneOfEleven
2023-10-27 14:34:52 +01:00
parent ab0c37290f
commit 2a7dbc1e73
13 changed files with 65 additions and 168 deletions

View File

@ -843,9 +843,20 @@ void MAIN_Key_UP_DOWN(bool key_pressed, bool key_held, scan_state_dir_t Directio
// find the first channel that contains this frequency
g_tx_vfo->freq_in_channel = BOARD_find_channel(g_tx_vfo->freq_config_rx.frequency);
// only update eeprom when the key is released - saves a LOT of wear and tear on the little eeprom
SETTINGS_save_channel(g_tx_vfo->channel_save, g_eeprom.tx_vfo, g_tx_vfo, 1);
RADIO_ApplyOffset(g_tx_vfo);
if (!g_tx_vfo->frequency_reverse)
{
g_tx_vfo->p_rx = &g_tx_vfo->freq_config_rx;
g_tx_vfo->p_tx = &g_tx_vfo->freq_config_tx;
}
else
{
g_tx_vfo->p_rx = &g_tx_vfo->freq_config_tx;
g_tx_vfo->p_tx = &g_tx_vfo->freq_config_rx;
}
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG)
// UART_printf("save chan\r\n");
#endif