diff --git a/Makefile b/Makefile index 93b0ce3..3cfb685 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/firmware.bin b/firmware.bin index 9f0c15c..99a6dc1 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index e5f9549..6029547 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ diff --git a/functions.c b/functions.c index 5b5a996..95348c7 100644 --- a/functions.c +++ b/functions.c @@ -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 diff --git a/settings.c b/settings.c index e8c5873..babc8a9 100644 --- a/settings.c +++ b/settings.c @@ -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)); } } @@ -355,12 +357,14 @@ void SETTINGS_read_eeprom(void) g_eeprom.config.channel_attributes[200 + index].attributes = 0xC0 | index; 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)); @@ -575,21 +579,21 @@ void SETTINGS_save_chan_attribs_name(const unsigned int channel, const vfo_info_ unsigned int SETTINGS_find_channel(const uint32_t frequency) { unsigned int chan; - + if (frequency == 0 || frequency == 0xffffffff) return 0xffffffff; - + for (chan = 0; chan <= USER_CHANNEL_LAST; chan++) { const uint32_t freq = g_eeprom.config.channel[chan].frequency; if (g_user_channel_attributes[chan].band > BAND7_470MHz || freq == 0 || freq == 0xffffffff) continue; - + if (freq == frequency) return chan; // found it } - + return 0xffffffff; }