Add exclude memory channel
This commit is contained in:
@@ -65,7 +65,7 @@ static void toggle_chan_scanlist(void)
|
|||||||
gTxVfo->SCANLIST1_PARTICIPATION = !gTxVfo->SCANLIST1_PARTICIPATION;
|
gTxVfo->SCANLIST1_PARTICIPATION = !gTxVfo->SCANLIST1_PARTICIPATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true);
|
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, false);
|
||||||
|
|
||||||
gVfoConfigureMode = VFO_CONFIGURE;
|
gVfoConfigureMode = VFO_CONFIGURE;
|
||||||
gFlagResetVfos = true;
|
gFlagResetVfos = true;
|
||||||
@@ -547,9 +547,7 @@ static void MAIN_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
|||||||
gTxVfo->SCANLIST1_PARTICIPATION = 0;
|
gTxVfo->SCANLIST1_PARTICIPATION = 0;
|
||||||
gTxVfo->SCANLIST2_PARTICIPATION = 0;
|
gTxVfo->SCANLIST2_PARTICIPATION = 0;
|
||||||
|
|
||||||
gWriteChannel = false;
|
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, true);
|
||||||
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true);
|
|
||||||
gWriteChannel = true;
|
|
||||||
|
|
||||||
gVfoConfigureMode = VFO_CONFIGURE;
|
gVfoConfigureMode = VFO_CONFIGURE;
|
||||||
gFlagResetVfos = true;
|
gFlagResetVfos = true;
|
||||||
|
@@ -616,14 +616,14 @@ void MENU_AcceptSetting(void)
|
|||||||
|
|
||||||
case MENU_S_ADD1:
|
case MENU_S_ADD1:
|
||||||
gTxVfo->SCANLIST1_PARTICIPATION = gSubMenuSelection;
|
gTxVfo->SCANLIST1_PARTICIPATION = gSubMenuSelection;
|
||||||
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true);
|
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, true);
|
||||||
gVfoConfigureMode = VFO_CONFIGURE;
|
gVfoConfigureMode = VFO_CONFIGURE;
|
||||||
gFlagResetVfos = true;
|
gFlagResetVfos = true;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case MENU_S_ADD2:
|
case MENU_S_ADD2:
|
||||||
gTxVfo->SCANLIST2_PARTICIPATION = gSubMenuSelection;
|
gTxVfo->SCANLIST2_PARTICIPATION = gSubMenuSelection;
|
||||||
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true);
|
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, true);
|
||||||
gVfoConfigureMode = VFO_CONFIGURE;
|
gVfoConfigureMode = VFO_CONFIGURE;
|
||||||
gFlagResetVfos = true;
|
gFlagResetVfos = true;
|
||||||
return;
|
return;
|
||||||
@@ -650,7 +650,7 @@ void MENU_AcceptSetting(void)
|
|||||||
|
|
||||||
case MENU_COMPAND:
|
case MENU_COMPAND:
|
||||||
gTxVfo->Compander = gSubMenuSelection;
|
gTxVfo->Compander = gSubMenuSelection;
|
||||||
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true);
|
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, true);
|
||||||
gVfoConfigureMode = VFO_CONFIGURE;
|
gVfoConfigureMode = VFO_CONFIGURE;
|
||||||
gFlagResetVfos = true;
|
gFlagResetVfos = true;
|
||||||
// gRequestSaveChannel = 1;
|
// gRequestSaveChannel = 1;
|
||||||
@@ -756,7 +756,7 @@ void MENU_AcceptSetting(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case MENU_DEL_CH:
|
case MENU_DEL_CH:
|
||||||
SETTINGS_UpdateChannel(gSubMenuSelection, NULL, false);
|
SETTINGS_UpdateChannel(gSubMenuSelection, NULL, false, true);
|
||||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||||
gFlagResetVfos = true;
|
gFlagResetVfos = true;
|
||||||
return;
|
return;
|
||||||
|
1
misc.c
1
misc.c
@@ -116,7 +116,6 @@ enum BacklightOnRxTx_t gSetting_backlight_on_tx_rx;
|
|||||||
bool gSetting_set_gui = 0;
|
bool gSetting_set_gui = 0;
|
||||||
bool gSetting_set_ptt_session;
|
bool gSetting_set_ptt_session;
|
||||||
uint8_t gDebug;
|
uint8_t gDebug;
|
||||||
bool gWriteChannel = true;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_AUDIO_BAR
|
#ifdef ENABLE_AUDIO_BAR
|
||||||
|
1
misc.h
1
misc.h
@@ -350,7 +350,6 @@ extern volatile uint8_t boot_counter_10ms;
|
|||||||
extern uint8_t gPttOnePushCounter;
|
extern uint8_t gPttOnePushCounter;
|
||||||
extern uint32_t gBlinkCounter;
|
extern uint32_t gBlinkCounter;
|
||||||
extern uint8_t gDebug;
|
extern uint8_t gDebug;
|
||||||
extern bool gWriteChannel;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int32_t NUMBER_AddWithWraparound(int32_t Base, int32_t Add, int32_t LowerLimit, int32_t UpperLimit);
|
int32_t NUMBER_AddWithWraparound(int32_t Base, int32_t Add, int32_t LowerLimit, int32_t UpperLimit);
|
||||||
|
@@ -714,7 +714,7 @@ void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO,
|
|||||||
#endif
|
#endif
|
||||||
EEPROM_WriteBuffer(OffsetVFO + 8, State._8);
|
EEPROM_WriteBuffer(OffsetVFO + 8, State._8);
|
||||||
|
|
||||||
SETTINGS_UpdateChannel(Channel, pVFO, true);
|
SETTINGS_UpdateChannel(Channel, pVFO, true, true);
|
||||||
|
|
||||||
if (IS_MR_CHANNEL(Channel)) {
|
if (IS_MR_CHANNEL(Channel)) {
|
||||||
#ifndef ENABLE_KEEP_MEM_NAME
|
#ifndef ENABLE_KEEP_MEM_NAME
|
||||||
@@ -749,7 +749,7 @@ void SETTINGS_SaveChannelName(uint8_t channel, const char * name)
|
|||||||
EEPROM_WriteBuffer(0x0F58 + offset, buf + 8);
|
EEPROM_WriteBuffer(0x0F58 + offset, buf + 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep)
|
void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep, bool save)
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
if (!IS_NOAA_CHANNEL(channel))
|
if (!IS_NOAA_CHANNEL(channel))
|
||||||
@@ -778,7 +778,7 @@ void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep)
|
|||||||
state[channel & 7u] = att.__val;
|
state[channel & 7u] = att.__val;
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
if(gWriteChannel)
|
if(save)
|
||||||
{
|
{
|
||||||
EEPROM_WriteBuffer(offset, state);
|
EEPROM_WriteBuffer(offset, state);
|
||||||
}
|
}
|
||||||
|
@@ -282,7 +282,7 @@ void SETTINGS_SaveSettings(void);
|
|||||||
void SETTINGS_SaveChannelName(uint8_t channel, const char * name);
|
void SETTINGS_SaveChannelName(uint8_t channel, const char * name);
|
||||||
void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO, uint8_t Mode);
|
void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO, uint8_t Mode);
|
||||||
void SETTINGS_SaveBatteryCalibration(const uint16_t * batteryCalibration);
|
void SETTINGS_SaveBatteryCalibration(const uint16_t * batteryCalibration);
|
||||||
void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep);
|
void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep, bool save);
|
||||||
void SETTINGS_WriteBuildOptions(void);
|
void SETTINGS_WriteBuildOptions(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user