mirror of
https://github.com/DualTachyon/uv-k5-firmware.git
synced 2024-11-21 05:30:49 +08:00
Added case for F+5.
This commit is contained in:
parent
9264f38e6a
commit
e1147ba977
17
app/main.c
17
app/main.c
@ -100,7 +100,7 @@ void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
if ((Channel - 1) < 10) {
|
||||
Channel += 207;
|
||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||
gEeprom.EEPROM_0E86_0E87[Vfo] = Channel;
|
||||
gEeprom.NoaaChannel[Vfo] = Channel;
|
||||
gEeprom.VfoChannel[Vfo] = Channel;
|
||||
gRequestSaveVFO = true;
|
||||
g_2000039A = 2;
|
||||
@ -169,7 +169,18 @@ void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
g_20000458 = 0;
|
||||
g_20000459 = gEeprom.CROSS_BAND_RX_TX;
|
||||
gEeprom.CROSS_BAND_RX_TX = CROSS_BAND_OFF;
|
||||
return;
|
||||
break;
|
||||
|
||||
case KEY_5:
|
||||
if (gTxRadioInfo->CHANNEL_SAVE < 207) {
|
||||
gEeprom.VfoChannel[Vfo] = gEeprom.NoaaChannel[gEeprom.TX_CHANNEL];
|
||||
} else {
|
||||
gEeprom.VfoChannel[Vfo] = gEeprom.EEPROM_0E82_0E85[gEeprom.TX_CHANNEL];
|
||||
gAnotherVoiceID = VOICE_ID_FREQUENCY_MODE;
|
||||
}
|
||||
gRequestSaveVFO = true;
|
||||
g_2000039A = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
@ -273,7 +284,7 @@ void MAIN_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
}
|
||||
} else {
|
||||
Channel = 207 + NUMBER_AddWithWraparound(gEeprom.VfoChannel[gEeprom.TX_CHANNEL] + 207,Direction, 0, 9);
|
||||
gEeprom.EEPROM_0E86_0E87[gEeprom.TX_CHANNEL] = Channel;
|
||||
gEeprom.NoaaChannel[gEeprom.TX_CHANNEL] = Channel;
|
||||
gEeprom.VfoChannel[gEeprom.TX_CHANNEL] = Channel;
|
||||
}
|
||||
gRequestSaveVFO = true;
|
||||
|
8
board.c
8
board.c
@ -460,14 +460,14 @@ void BOARD_EEPROM_Init(void)
|
||||
gEeprom.EEPROM_0E82_0E85[1] = 205;
|
||||
}
|
||||
if (Data[6] - 207 < 10) {
|
||||
gEeprom.EEPROM_0E86_0E87[0] = Data[6];
|
||||
gEeprom.NoaaChannel[0] = Data[6];
|
||||
} else {
|
||||
gEeprom.EEPROM_0E86_0E87[0] = 207;
|
||||
gEeprom.NoaaChannel[0] = 207;
|
||||
}
|
||||
if (Data[7] - 207 < 10) {
|
||||
gEeprom.EEPROM_0E86_0E87[1] = Data[7];
|
||||
gEeprom.NoaaChannel[1] = Data[7];
|
||||
} else {
|
||||
gEeprom.EEPROM_0E86_0E87[1] = 207;
|
||||
gEeprom.NoaaChannel[1] = 207;
|
||||
}
|
||||
|
||||
// 0E88..0E8F
|
||||
|
@ -58,8 +58,8 @@ void SETTINGS_SaveVfoIndices(void)
|
||||
State[3] = gEeprom.VfoChannel[1];
|
||||
State[4] = gEeprom.EEPROM_0E81_0E84[1];
|
||||
State[5] = gEeprom.EEPROM_0E82_0E85[1];
|
||||
State[6] = gEeprom.EEPROM_0E86_0E87[0];
|
||||
State[7] = gEeprom.EEPROM_0E86_0E87[1];
|
||||
State[6] = gEeprom.NoaaChannel[0];
|
||||
State[7] = gEeprom.NoaaChannel[1];
|
||||
|
||||
EEPROM_WriteBuffer(0x0E80, State);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ typedef struct {
|
||||
uint8_t VfoChannel[2];
|
||||
uint8_t EEPROM_0E82_0E85[2];
|
||||
uint8_t EEPROM_0E81_0E84[2];
|
||||
uint8_t EEPROM_0E86_0E87[2];
|
||||
uint8_t NoaaChannel[2];
|
||||
uint8_t RX_CHANNEL;
|
||||
uint8_t TX_CHANNEL;
|
||||
uint8_t field7_0xa;
|
||||
|
Loading…
Reference in New Issue
Block a user