mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 22:58:04 +03:00
fix tx offset entry in menu "Tx OFS"
This commit is contained in:
4
radio.c
4
radio.c
@ -259,7 +259,7 @@ void RADIO_configure_channel(const unsigned int VFO, const unsigned int configur
|
||||
EEPROM_ReadBuffer(Base, &m_channel, sizeof(m_channel));
|
||||
|
||||
p_vfo->freq_config_rx.frequency = m_channel.frequency;
|
||||
p_vfo->tx_offset_freq = (m_channel.offset <= 100000000) ? m_channel.offset : 1000000;
|
||||
p_vfo->tx_offset_freq = (m_channel.offset < 100000000) ? m_channel.offset : 0;
|
||||
p_vfo->tx_offset_freq_dir = (m_channel.tx_offset_dir <= TX_OFFSET_FREQ_DIR_SUB) ? m_channel.tx_offset_dir : TX_OFFSET_FREQ_DIR_OFF;
|
||||
p_vfo->am_mode = m_channel.am_mode;
|
||||
p_vfo->step_setting = (m_channel.step_setting < ARRAY_SIZE(STEP_FREQ_TABLE)) ? m_channel.step_setting : STEP_12_5kHz;
|
||||
@ -356,7 +356,7 @@ void RADIO_configure_channel(const unsigned int VFO, const unsigned int configur
|
||||
else
|
||||
if (Channel > USER_CHANNEL_LAST)
|
||||
{
|
||||
p_vfo->tx_offset_freq = FREQUENCY_floor_to_step(p_vfo->tx_offset_freq, p_vfo->step_freq, 0, p_vfo->tx_offset_freq);
|
||||
p_vfo->tx_offset_freq = FREQUENCY_floor_to_step(p_vfo->tx_offset_freq + (p_vfo->step_freq / 2), p_vfo->step_freq, 0, p_vfo->tx_offset_freq + p_vfo->step_freq);
|
||||
}
|
||||
|
||||
RADIO_ApplyOffset(p_vfo);
|
||||
|
Reference in New Issue
Block a user