mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 22:31:25 +03:00
Fix channel save problem
This commit is contained in:
parent
618d6962ff
commit
f0ad919418
@ -2305,6 +2305,7 @@ Skip:
|
|||||||
{
|
{
|
||||||
SETTINGS_SaveChannel(gTxVfo->CHANNEL_SAVE, gEeprom.TX_CHANNEL, gTxVfo, gRequestSaveChannel);
|
SETTINGS_SaveChannel(gTxVfo->CHANNEL_SAVE, gEeprom.TX_CHANNEL, gTxVfo, gRequestSaveChannel);
|
||||||
if (gScreenToDisplay != DISPLAY_SCANNER)
|
if (gScreenToDisplay != DISPLAY_SCANNER)
|
||||||
|
if (gVfoConfigureMode == VFO_CONFIGURE_0)
|
||||||
gVfoConfigureMode = VFO_CONFIGURE_1;
|
gVfoConfigureMode = VFO_CONFIGURE_1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2317,7 +2318,6 @@ Skip:
|
|||||||
gRequestSaveChannel = 0;
|
gRequestSaveChannel = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (gVfoConfigureMode != VFO_CONFIGURE_0)
|
if (gVfoConfigureMode != VFO_CONFIGURE_0)
|
||||||
{
|
{
|
||||||
if (gFlagResetVfos)
|
if (gFlagResetVfos)
|
||||||
|
@ -140,17 +140,16 @@ bool DTMF_CompareMessage(const char *pMsg, const char *pTemplate, uint8_t Size,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return DTMF_CALL_MODE_NOT_GROUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DTMF_CheckGroupCall(const char *pMsg, uint32_t Size)
|
DTMF_CallMode_t DTMF_CheckGroupCall(const char *pMsg, uint32_t Size)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
for (i = 0; i < Size; i++)
|
for (i = 0; i < Size; i++)
|
||||||
if (pMsg[i] == gEeprom.DTMF_GROUP_CALL_CODE)
|
if (pMsg[i] == gEeprom.DTMF_GROUP_CALL_CODE)
|
||||||
break;
|
break;
|
||||||
|
return (i != Size) ? DTMF_CALL_MODE_GROUP : DTMF_CALL_MODE_NOT_GROUP;
|
||||||
return (i != Size) ? true : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DTMF_Append(char Code)
|
void DTMF_Append(char Code)
|
||||||
|
@ -88,7 +88,7 @@ bool DTMF_GetContact(const int Index, char *pContact);
|
|||||||
bool DTMF_FindContact(const char *pContact, char *pResult);
|
bool DTMF_FindContact(const char *pContact, char *pResult);
|
||||||
char DTMF_GetCharacter(const uint8_t code);
|
char DTMF_GetCharacter(const uint8_t code);
|
||||||
bool DTMF_CompareMessage(const char *pDTMF, const char *pTemplate, uint8_t Size, bool bFlag);
|
bool DTMF_CompareMessage(const char *pDTMF, const char *pTemplate, uint8_t Size, bool bFlag);
|
||||||
bool DTMF_CheckGroupCall(const char *pDTMF, uint32_t Size);
|
DTMF_CallMode_t DTMF_CheckGroupCall(const char *pDTMF, uint32_t Size);
|
||||||
void DTMF_Append(char Code);
|
void DTMF_Append(char Code);
|
||||||
void DTMF_HandleRequest(void);
|
void DTMF_HandleRequest(void);
|
||||||
void DTMF_Reply(void);
|
void DTMF_Reply(void);
|
||||||
|
@ -47,15 +47,9 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: do something useful with the key
|
// TODO: do something useful with the key
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -379,7 +373,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
RADIO_ConfigureChannel(Vfo, 2);
|
RADIO_ConfigureChannel(Vfo, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Frequency += 75; // is this meant to be rounding to step size?
|
// Frequency += 75; // is this meant to be rounding ?
|
||||||
Frequency += gTxVfo->StepFrequency / 2; // no idea, but this is
|
Frequency += gTxVfo->StepFrequency / 2; // no idea, but this is
|
||||||
|
|
||||||
Frequency = FREQUENCY_FloorToStep(Frequency, gTxVfo->StepFrequency, LowerLimitFrequencyBandTable[gTxVfo->Band]);
|
Frequency = FREQUENCY_FloorToStep(Frequency, gTxVfo->StepFrequency, LowerLimitFrequencyBandTable[gTxVfo->Band]);
|
||||||
|
@ -418,12 +418,14 @@ void MENU_AcceptSetting(void)
|
|||||||
|
|
||||||
case MENU_MEM_CH:
|
case MENU_MEM_CH:
|
||||||
gTxVfo->CHANNEL_SAVE = gSubMenuSelection;
|
gTxVfo->CHANNEL_SAVE = gSubMenuSelection;
|
||||||
gRequestSaveChannel = 2;
|
|
||||||
#if 0
|
#if 0
|
||||||
gEeprom.MrChannel[0] = gSubMenuSelection;
|
gEeprom.MrChannel[0] = gSubMenuSelection;
|
||||||
#else
|
#else
|
||||||
gEeprom.MrChannel[gEeprom.TX_CHANNEL] = gSubMenuSelection;
|
gEeprom.MrChannel[gEeprom.TX_CHANNEL] = gSubMenuSelection;
|
||||||
#endif
|
#endif
|
||||||
|
gRequestSaveChannel = 2;
|
||||||
|
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||||
|
gFlagResetVfos = true;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case MENU_MEM_NAME:
|
case MENU_MEM_NAME:
|
||||||
|
@ -40,7 +40,7 @@ volatile uint16_t ScanPauseDelayIn_10ms;
|
|||||||
uint8_t gScanProgressIndicator;
|
uint8_t gScanProgressIndicator;
|
||||||
uint8_t gScanHitCount;
|
uint8_t gScanHitCount;
|
||||||
bool gScanUseCssResult;
|
bool gScanUseCssResult;
|
||||||
uint8_t gScanState;
|
int8_t gScanState;
|
||||||
bool bScanKeepFrequency;
|
bool bScanKeepFrequency;
|
||||||
|
|
||||||
static void SCANNER_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
static void SCANNER_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||||
|
@ -50,7 +50,7 @@ extern volatile uint16_t ScanPauseDelayIn_10ms;
|
|||||||
extern uint8_t gScanProgressIndicator;
|
extern uint8_t gScanProgressIndicator;
|
||||||
extern uint8_t gScanHitCount;
|
extern uint8_t gScanHitCount;
|
||||||
extern bool gScanUseCssResult;
|
extern bool gScanUseCssResult;
|
||||||
extern uint8_t gScanState;
|
extern int8_t gScanState;
|
||||||
extern bool bScanKeepFrequency;
|
extern bool bScanKeepFrequency;
|
||||||
|
|
||||||
void SCANNER_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld);
|
void SCANNER_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld);
|
||||||
|
2
audio.c
2
audio.c
@ -301,7 +301,7 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
|||||||
|
|
||||||
void AUDIO_SetVoiceID(uint8_t Index, VOICE_ID_t VoiceID)
|
void AUDIO_SetVoiceID(uint8_t Index, VOICE_ID_t VoiceID)
|
||||||
{
|
{
|
||||||
if (Index >= 8)
|
if (Index >= ARRAY_SIZE(gVoiceID))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Index == 0)
|
if (Index == 0)
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
2
radio.c
2
radio.c
@ -246,7 +246,7 @@ void RADIO_ConfigureChannel(uint8_t VFO, uint32_t Arg)
|
|||||||
else
|
else
|
||||||
Base = 0x0C80 + ((Channel - FREQ_CHANNEL_FIRST) * 32) + (VFO * 16);
|
Base = 0x0C80 + ((Channel - FREQ_CHANNEL_FIRST) * 32) + (VFO * 16);
|
||||||
|
|
||||||
if (Arg == 2 || Channel >= FREQ_CHANNEL_FIRST)
|
if (Arg == VFO_CONFIGURE_RELOAD || Channel >= FREQ_CHANNEL_FIRST)
|
||||||
{
|
{
|
||||||
uint8_t Tmp;
|
uint8_t Tmp;
|
||||||
uint8_t Data[8];
|
uint8_t Data[8];
|
||||||
|
15
ui/main.c
15
ui/main.c
@ -109,6 +109,13 @@ void UI_DisplayMain(void)
|
|||||||
{
|
{
|
||||||
char String[16];
|
char String[16];
|
||||||
unsigned int vfo_num;
|
unsigned int vfo_num;
|
||||||
|
bool center_line_is_free = true;
|
||||||
|
|
||||||
|
// #ifdef SINGLE_VFO_CHAN
|
||||||
|
// const bool single_vfo = (gEeprom.DUAL_WATCH == DUAL_WATCH_OFF && gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? true : false;
|
||||||
|
// #else
|
||||||
|
const bool single_vfo = false;
|
||||||
|
// #endif
|
||||||
|
|
||||||
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
|
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
|
||||||
|
|
||||||
@ -120,14 +127,6 @@ void UI_DisplayMain(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// #ifdef SINGLE_VFO_CHAN
|
|
||||||
// const bool single_vfo = (gEeprom.DUAL_WATCH == DUAL_WATCH_OFF && gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? true : false;
|
|
||||||
// #else
|
|
||||||
const bool single_vfo = false;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
bool center_line_is_free = true;
|
|
||||||
|
|
||||||
for (vfo_num = 0; vfo_num < 2; vfo_num++)
|
for (vfo_num = 0; vfo_num < 2; vfo_num++)
|
||||||
{
|
{
|
||||||
uint8_t Channel = gEeprom.TX_CHANNEL;
|
uint8_t Channel = gEeprom.TX_CHANNEL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user