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

fix missing display details

This commit is contained in:
OneOfEleven
2023-11-02 21:44:53 +00:00
parent 3681674b09
commit 98a4cd9483
20 changed files with 401 additions and 444 deletions

View File

@ -83,7 +83,7 @@ static void APP_update_rssi(const int vfo)
#ifdef ENABLE_AM_FIX
// add RF gain adjust compensation
if (g_current_vfo->am_mode > 0 && g_eeprom.config.setting.am_fix)
if (g_current_vfo->channel.am_mode > 0 && g_eeprom.config.setting.am_fix)
rssi -= rssi_gain_diff[vfo];
#endif
@ -214,9 +214,9 @@ static void APP_process_new_receive(void)
{ // not code scanning
#ifdef ENABLE_KILL_REVIVE
if (g_rx_vfo->dtmf_decoding_enable || g_eeprom.config.setting.radio_disabled)
if (g_rx_vfo->channel.dtmf_decoding_enable || g_eeprom.config.setting.radio_disabled)
#else
if (g_rx_vfo->dtmf_decoding_enable)
if (g_rx_vfo->channel.dtmf_decoding_enable)
#endif
{ // DTMF DCD is enabled
@ -520,7 +520,7 @@ bool APP_start_listening(void)
}
// AF gain - original QS values
// if (g_rx_vfo->am_mode > 0)
// if (g_rx_vfo->channel.am_mode > 0)
// {
// BK4819_WriteRegister(0x48, 0xB3A8); // 1011 0011 1010 1000
// }
@ -540,12 +540,12 @@ bool APP_start_listening(void)
#ifdef ENABLE_VOICE
#ifdef MUTE_AUDIO_FOR_VOICE
if (g_voice_write_index == 0)
AUDIO_set_mod_mode(g_rx_vfo->am_mode);
AUDIO_set_mod_mode(g_rx_vfo->channel.am_mode);
#else
AUDIO_set_mod_mode(g_rx_vfo->am_mode);
AUDIO_set_mod_mode(g_rx_vfo->channel.am_mode);
#endif
#else
AUDIO_set_mod_mode(g_rx_vfo->am_mode);
AUDIO_set_mod_mode(g_rx_vfo->channel.am_mode);
#endif
#ifdef ENABLE_FMRADIO
@ -568,7 +568,7 @@ uint32_t APP_set_frequency_by_step(vfo_info_t *pInfo, int8_t Step)
if (pInfo->step_freq == 833)
{
const uint32_t Lower = FREQ_BAND_TABLE[pInfo->band].lower;
const uint32_t Lower = FREQ_BAND_TABLE[pInfo->channel_attributes.band].lower;
const uint32_t Delta = Frequency - Lower;
uint32_t Base = (Delta / 2500) * 2500;
const uint32_t Index = ((Delta - Base) % 2500) / 833;
@ -579,12 +579,12 @@ uint32_t APP_set_frequency_by_step(vfo_info_t *pInfo, int8_t Step)
Frequency = Lower + Base + (Index * 833);
}
// if (Frequency >= FREQ_BAND_TABLE[pInfo->band].upper)
// Frequency = FREQ_BAND_TABLE[pInfo->band].lower;
// if (Frequency >= FREQ_BAND_TABLE[pInfo->channel_attributes.band].upper)
// Frequency = FREQ_BAND_TABLE[pInfo->channel_attributes.band].lower;
// else
// if (Frequency < FREQ_BAND_TABLE[pInfo->band].lower)
// Frequency = FREQUENCY_floor_to_step(FREQ_BAND_TABLE[pInfo->band].upper, pInfo->step_freq, FREQ_BAND_TABLE[pInfo->band].lower);
Frequency = FREQUENCY_wrap_to_step_band(Frequency, pInfo->step_freq, pInfo->band);
// if (Frequency < FREQ_BAND_TABLE[pInfo->channel_attributes.band].lower)
// Frequency = FREQUENCY_floor_to_step(FREQ_BAND_TABLE[pInfo->channel_attributes.band].upper, pInfo->step_freq, FREQ_BAND_TABLE[pInfo->channel_attributes.band].lower);
Frequency = FREQUENCY_wrap_to_step_band(Frequency, pInfo->step_freq, pInfo->channel_attributes.band);
return Frequency;
}
@ -940,9 +940,9 @@ void APP_process_radio_interrupts(void)
}
#ifdef ENABLE_KILL_REVIVE
if (g_rx_vfo->dtmf_decoding_enable || g_eeprom.config.setting.radio_disabled)
if (g_rx_vfo->channel.dtmf_decoding_enable || g_eeprom.config.setting.radio_disabled)
#else
if (g_rx_vfo->dtmf_decoding_enable)
if (g_rx_vfo->channel.dtmf_decoding_enable)
#endif
{
if (g_dtmf_rx_index >= (sizeof(g_dtmf_rx) - 1))
@ -2321,7 +2321,7 @@ void APP_time_slice_10ms(void)
#endif
#ifdef ENABLE_AM_FIX
if (g_rx_vfo->am_mode > 0 && g_eeprom.config.setting.am_fix)
if (g_rx_vfo->channel.am_mode > 0 && g_eeprom.config.setting.am_fix)
AM_fix_10ms(g_rx_vfo_num);
#endif
@ -2686,10 +2686,10 @@ static void APP_process_key(const key_code_t Key, const bool key_pressed, const
BK4819_ExitDTMF_TX(false);
if (g_current_vfo->scrambling_type == 0 || !g_eeprom.config.setting.enable_scrambler)
if (g_current_vfo->channel.scrambler == 0 || !g_eeprom.config.setting.enable_scrambler)
BK4819_DisableScramble();
else
BK4819_EnableScramble(g_current_vfo->scrambling_type - 1);
BK4819_EnableScramble(g_current_vfo->channel.scrambler - 1);
}
}
else