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

fixed mdc1200 variable access

This commit is contained in:
OneOfEleven 2023-11-03 00:53:08 +00:00
parent ef64d282e3
commit cfbb5b0bbf
5 changed files with 15 additions and 11 deletions

View File

@ -21,7 +21,7 @@ ENABLE_AIRCOPY_RX_REBOOT := 0
ENABLE_FMRADIO_64_76 := 0
ENABLE_FMRADIO_76_90 := 0
ENABLE_FMRADIO_76_108 := 0
ENABLE_FMRADIO_875_108 := 1
ENABLE_FMRADIO_875_108 := 0
ENABLE_FMRADIO_64_108 := 0
# NOAA 1.2 kB
ENABLE_NOAA := 0
@ -36,7 +36,7 @@ ENABLE_REDUCE_LOW_MID_TX_POWER := 1
ENABLE_ALARM := 0
ENABLE_TX1750 := 0
# MDC1200 2.8 kB
ENABLE_MDC1200 := 0
ENABLE_MDC1200 := 1
ENABLE_MDC1200_SHOW_OP_ARG := 1
ENABLE_PWRON_PASSWORD := 0
ENABLE_RESET_AES_KEY := 0

Binary file not shown.

Binary file not shown.

View File

@ -265,7 +265,7 @@ void FUNCTION_Select(function_type_t Function)
if (!DTMF_Reply())
{
#ifdef ENABLE_MDC1200
if (g_current_vfo->mdc1200_mode == MDC1200_MODE_BOT || g_current_vfo->mdc1200_mode == MDC1200_MODE_BOTH)
if (g_current_vfo->channel.mdc1200_mode == MDC1200_MODE_BOT || g_current_vfo->channel.mdc1200_mode == MDC1200_MODE_BOTH)
{
BK4819_WriteRegister(0x30,
(1u << 15) | // enable VCO calibration

View File

@ -327,8 +327,10 @@ void SETTINGS_read_eeprom(void)
// 0F48..0F4F
g_eeprom.config.setting.scan_hold_time = (g_eeprom.config.setting.scan_hold_time > 40) ? 6 : (g_eeprom.config.setting.scan_hold_time < 2) ? 6 : g_eeprom.config.setting.scan_hold_time;
// ****************************************
// EEPROM cleaning
#if 1
memset(&g_eeprom.config.unused13, 0xff, sizeof(g_eeprom.config.unused13));
@ -345,7 +347,7 @@ void SETTINGS_read_eeprom(void)
}
else
{ // used channel
g_eeprom.config.channel_attributes[index].unused = 0;
g_eeprom.config.channel_attributes[index].unused = 0x00;
memset(g_eeprom.config.channel_name[index].unused, 0x00, sizeof(g_eeprom.config.channel_name[index].unused));
}
}
@ -356,11 +358,13 @@ void SETTINGS_read_eeprom(void)
g_eeprom.config.channel_attributes[200 + 7].attributes = 0x00;
memcpy(&g_user_channel_attributes, &g_eeprom.config.channel_attributes, sizeof(g_user_channel_attributes));
SETTINGS_save_attributes();
}
#endif
memcpy(&g_user_channel_attributes, &g_eeprom.config.channel_attributes, sizeof(g_user_channel_attributes));
// ****************************************
memset(&g_eeprom.calib.unused3, 0xff, sizeof(g_eeprom.calib.unused3));