forked from mirror/uv-k5-firmware
Ability to disable NOAA.
This commit is contained in:
parent
313a67a482
commit
f5cc006b2a
4
Makefile
4
Makefile
@ -2,6 +2,7 @@ TARGET = firmware
|
||||
|
||||
ENABLE_AIRCOPY := 1
|
||||
ENABLE_FMRADIO := 1
|
||||
ENABLE_NOAA := 1
|
||||
ENABLE_OVERLAY := 1
|
||||
ENABLE_UART := 1
|
||||
|
||||
@ -124,6 +125,9 @@ endif
|
||||
ifeq ($(ENABLE_FMRADIO),1)
|
||||
CFLAGS += -DENABLE_FMRADIO
|
||||
endif
|
||||
ifeq ($(ENABLE_NOAA),1)
|
||||
CFLAGS += -DENABLE_NOAA
|
||||
endif
|
||||
ifeq ($(ENABLE_OVERLAY),1)
|
||||
CFLAGS += -DENABLE_OVERLAY
|
||||
endif
|
||||
|
@ -63,9 +63,11 @@ static void ACTION_Monitor(void)
|
||||
{
|
||||
if (gCurrentFunction != FUNCTION_MONITOR) {
|
||||
RADIO_SelectVfos();
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (gRxVfo->CHANNEL_SAVE >= NOAA_CHANNEL_FIRST && gIsNoaaMode) {
|
||||
gNoaaChannel = gRxVfo->CHANNEL_SAVE - NOAA_CHANNEL_FIRST;
|
||||
}
|
||||
#endif
|
||||
RADIO_SetupRegisters(true);
|
||||
APP_StartListening(FUNCTION_MONITOR);
|
||||
return;
|
||||
@ -75,10 +77,12 @@ static void ACTION_Monitor(void)
|
||||
gScheduleScanListen = false;
|
||||
gScanPauseMode = true;
|
||||
}
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_OFF && gIsNoaaMode) {
|
||||
gNOAA_Countdown = 500;
|
||||
gScheduleNOAA = false;
|
||||
}
|
||||
#endif
|
||||
RADIO_SetupRegisters(true);
|
||||
#if defined(ENABLE_FMRADIO)
|
||||
if (gFmRadioMode) {
|
||||
|
30
app/app.c
30
app/app.c
@ -76,10 +76,12 @@ static void APP_CheckForIncoming(void)
|
||||
gRxReceptionMode = RX_MODE_DETECTED;
|
||||
}
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_OFF) {
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (gIsNoaaMode) {
|
||||
gNOAA_Countdown = 20;
|
||||
gScheduleNOAA = false;
|
||||
}
|
||||
#endif
|
||||
FUNCTION_Select(FUNCTION_INCOMING);
|
||||
return;
|
||||
}
|
||||
@ -112,10 +114,12 @@ static void APP_HandleIncoming(void)
|
||||
}
|
||||
|
||||
bFlag = (gScanState == SCAN_OFF && gCurrentCodeType == CODE_TYPE_OFF);
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (IS_NOAA_CHANNEL(gRxVfo->CHANNEL_SAVE) && gSystickCountdown2) {
|
||||
bFlag = true;
|
||||
gSystickCountdown2 = 0;
|
||||
}
|
||||
#endif
|
||||
if (g_CTCSS_Lost && gCurrentCodeType == CODE_TYPE_CONTINUOUS_TONE) {
|
||||
bFlag = true;
|
||||
gFoundCTCSS = false;
|
||||
@ -245,9 +249,11 @@ Skip:
|
||||
switch (Mode) {
|
||||
case END_OF_RX_MODE_END:
|
||||
RADIO_SetupRegisters(true);
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (IS_NOAA_CHANNEL(gRxVfo->CHANNEL_SAVE)) {
|
||||
gSystickCountdown2 = 300;
|
||||
}
|
||||
#endif
|
||||
gUpdateDisplay = true;
|
||||
if (gScanState != SCAN_OFF) {
|
||||
switch (gEeprom.SCAN_RESUME_MODE) {
|
||||
@ -324,6 +330,7 @@ void APP_StartListening(FUNCTION_Type_t Function)
|
||||
}
|
||||
bScanKeepFrequency = true;
|
||||
}
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (IS_NOAA_CHANNEL(gRxVfo->CHANNEL_SAVE) && gIsNoaaMode) {
|
||||
gRxVfo->CHANNEL_SAVE = gNoaaChannel + NOAA_CHANNEL_FIRST;
|
||||
gRxVfo->pRX->Frequency = NoaaFrequencyTable[gNoaaChannel];
|
||||
@ -332,6 +339,7 @@ void APP_StartListening(FUNCTION_Type_t Function)
|
||||
gNOAA_Countdown = 500;
|
||||
gScheduleNOAA = false;
|
||||
}
|
||||
#endif
|
||||
if (gCssScanMode != CSS_SCAN_MODE_OFF) {
|
||||
gCssScanMode = CSS_SCAN_MODE_FOUND;
|
||||
}
|
||||
@ -451,6 +459,7 @@ Skip:
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(ENABLE_NOAA)
|
||||
static void NOAA_NextChannel(void)
|
||||
{
|
||||
gNoaaChannel++;
|
||||
@ -458,9 +467,11 @@ static void NOAA_NextChannel(void)
|
||||
gNoaaChannel = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void DUALWATCH_Alternate(void)
|
||||
{
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (gIsNoaaMode) {
|
||||
if (IS_NOT_NOAA_CHANNEL(gEeprom.ScreenChannel[0]) || IS_NOT_NOAA_CHANNEL(gEeprom.ScreenChannel[1])) {
|
||||
gEeprom.RX_CHANNEL = gEeprom.RX_CHANNEL == 0;
|
||||
@ -472,15 +483,19 @@ static void DUALWATCH_Alternate(void)
|
||||
NOAA_NextChannel();
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
gEeprom.RX_CHANNEL = gEeprom.RX_CHANNEL == 0;
|
||||
gRxVfo = &gEeprom.VfoInfo[gEeprom.RX_CHANNEL];
|
||||
#if defined(ENABLE_NOAA)
|
||||
}
|
||||
#endif
|
||||
RADIO_SetupRegisters(false);
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (gIsNoaaMode) {
|
||||
gDualWatchCountdown = 7;
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
gDualWatchCountdown = 10;
|
||||
}
|
||||
}
|
||||
|
||||
void APP_CheckRadioInterrupts(void)
|
||||
@ -675,12 +690,14 @@ void APP_Update(void)
|
||||
gScheduleScanListen = false;
|
||||
}
|
||||
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_OFF && gIsNoaaMode && gScheduleNOAA && gVoiceWriteIndex == 0) {
|
||||
NOAA_NextChannel();
|
||||
RADIO_SetupRegisters(false);
|
||||
gScheduleNOAA = false;
|
||||
gNOAA_Countdown = 7;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gScreenToDisplay != DISPLAY_SCANNER && gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) {
|
||||
if (gScheduleDualWatch && gVoiceWriteIndex == 0) {
|
||||
@ -725,7 +742,11 @@ void APP_Update(void)
|
||||
) {
|
||||
gBatterySaveCountdown = 1000;
|
||||
} else {
|
||||
if ((IS_NOT_NOAA_CHANNEL(gEeprom.ScreenChannel[0]) && IS_NOT_NOAA_CHANNEL(gEeprom.ScreenChannel[1])) || !gIsNoaaMode) {
|
||||
if ((IS_NOT_NOAA_CHANNEL(gEeprom.ScreenChannel[0]) && IS_NOT_NOAA_CHANNEL(gEeprom.ScreenChannel[1]))
|
||||
#if defined(ENABLE_NOAA)
|
||||
|| !gIsNoaaMode
|
||||
#endif
|
||||
) {
|
||||
FUNCTION_Select(FUNCTION_POWER_SAVE);
|
||||
} else {
|
||||
gBatterySaveCountdown = 1000;
|
||||
@ -1068,6 +1089,7 @@ void APP_TimeSlice500ms(void)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gReducedService) {
|
||||
BOARD_ADC_GetBatteryInfo(&gBatteryCurrentVoltage, &gBatteryCurrent);
|
||||
if (gBatteryCurrent > 500 || gBatteryCalibration[3] < gBatteryCurrentVoltage) {
|
||||
@ -1573,7 +1595,9 @@ Skip:
|
||||
|
||||
if (gFlagReconfigureVfos) {
|
||||
RADIO_SelectVfos();
|
||||
#if defined(ENABLE_NOAA)
|
||||
RADIO_ConfigureNOAA();
|
||||
#endif
|
||||
RADIO_SetupRegisters(true);
|
||||
gDTMF_AUTO_RESET_TIME = 0;
|
||||
gDTMF_CallState = DTMF_CALL_STATE_NONE;
|
||||
|
@ -106,6 +106,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
#if defined(ENABLE_NOAA)
|
||||
uint8_t Channel;
|
||||
|
||||
if (gInputBoxIndex != 2) {
|
||||
@ -124,6 +125,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
@ -216,6 +218,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
break;
|
||||
|
||||
case KEY_5:
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (IS_NOT_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE)) {
|
||||
gEeprom.ScreenChannel[Vfo] = gEeprom.NoaaChannel[gEeprom.TX_CHANNEL];
|
||||
} else {
|
||||
@ -224,6 +227,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
gRequestSaveVFO = true;
|
||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case KEY_6:
|
||||
@ -403,9 +407,11 @@ static void MAIN_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
gAnotherVoiceID = (VOICE_ID_t)0xFE;
|
||||
}
|
||||
} else {
|
||||
#if defined(ENABLE_NOAA)
|
||||
Channel = NOAA_CHANNEL_FIRST + NUMBER_AddWithWraparound(gEeprom.ScreenChannel[gEeprom.TX_CHANNEL] - NOAA_CHANNEL_FIRST, Direction, 0, 9);
|
||||
gEeprom.NoaaChannel[gEeprom.TX_CHANNEL] = Channel;
|
||||
gEeprom.ScreenChannel[gEeprom.TX_CHANNEL] = Channel;
|
||||
#endif
|
||||
}
|
||||
gRequestSaveVFO = true;
|
||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||
|
@ -153,7 +153,10 @@ int MENU_GetLimits(uint8_t Cursor, uint8_t *pMin, uint8_t *pMax)
|
||||
case MENU_S_ADD1: case MENU_S_ADD2:
|
||||
case MENU_STE: case MENU_AL_MOD:
|
||||
case MENU_D_ST: case MENU_D_DCD:
|
||||
case MENU_AM: case MENU_NOAA_S:
|
||||
case MENU_AM:
|
||||
#if defined(ENABLE_NOAA)
|
||||
case MENU_NOAA_S:
|
||||
#endif
|
||||
case MENU_RESET: case MENU_350TX:
|
||||
case MENU_200TX: case MENU_500TX:
|
||||
case MENU_350EN: case MENU_SCREN:
|
||||
@ -471,11 +474,13 @@ void MENU_AcceptSetting(void)
|
||||
gRequestSaveChannel = 1;
|
||||
return;
|
||||
|
||||
#if defined(ENABLE_NOAA)
|
||||
case MENU_NOAA_S:
|
||||
gEeprom.NOAA_AUTO_SCAN = gSubMenuSelection;
|
||||
gRequestSaveSettings = true;
|
||||
gFlagReconfigureVfos = true;
|
||||
return;
|
||||
#endif
|
||||
|
||||
case MENU_DEL_CH:
|
||||
SETTINGS_UpdateChannel(gSubMenuSelection, NULL, false);
|
||||
@ -792,9 +797,11 @@ void MENU_ShowCurrentSetting(void)
|
||||
gSubMenuSelection = gTxVfo->AM_CHANNEL_MODE;
|
||||
break;
|
||||
|
||||
#if defined(ENABLE_NOAA)
|
||||
case MENU_NOAA_S:
|
||||
gSubMenuSelection = gEeprom.NOAA_AUTO_SCAN;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MENU_DEL_CH:
|
||||
gSubMenuSelection = RADIO_FindNextChannel(gEeprom.MrChannel[0], 1, false, 1);
|
||||
|
@ -306,7 +306,9 @@ void SCANNER_Start(void)
|
||||
|
||||
RADIO_SetupRegisters(true);
|
||||
|
||||
#if defined(ENABLE_NOAA)
|
||||
gIsNoaaMode = false;
|
||||
#endif
|
||||
if (gScanSingleFrequency) {
|
||||
gScanCssState = SCAN_CSS_STATE_SCANNING;
|
||||
gScanFrequency = gRxVfo->pRX->Frequency;
|
||||
|
@ -382,7 +382,9 @@ static void CMD_052F(const uint8_t *pBuffer)
|
||||
gEeprom.VfoInfo[0].FREQUENCY_DEVIATION_SETTING = FREQUENCY_DEVIATION_OFF;
|
||||
gEeprom.VfoInfo[0].DTMF_PTT_ID_TX_MODE = PTT_ID_OFF;
|
||||
gEeprom.VfoInfo[0].DTMF_DECODING_ENABLE = false;
|
||||
#if defined(ENABLE_NOAA)
|
||||
gIsNoaaMode = false;
|
||||
#endif
|
||||
if (gCurrentFunction == FUNCTION_POWER_SAVE) {
|
||||
FUNCTION_Select(FUNCTION_FOREGROUND);
|
||||
}
|
||||
|
@ -22,7 +22,9 @@ const uint8_t BITMAP_VoicePrompt[9] = { 0x00, 0x18, 0x18, 0x24, 0x24, 0x42, 0x42
|
||||
#if defined(ENABLE_FMRADIO)
|
||||
const uint8_t BITMAP_FM[12] = { 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F };
|
||||
#endif
|
||||
#if defined(ENABLE_NOAA)
|
||||
const uint8_t BITMAP_NOAA[12] = { 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, 0x46, 0x49, 0x49, 0x49, 0x31 };
|
||||
#endif
|
||||
|
||||
const uint8_t BITMAP_Antenna[5] = { 0x03, 0x05, 0x7F, 0x05, 0x03 };
|
||||
const uint8_t BITMAP_AntennaLevel1[3] = { 0x60, 0x60, 0x00 };
|
||||
|
@ -48,6 +48,7 @@ const uint32_t UpperLimitFrequencyBandTable[7] = {
|
||||
60000000,
|
||||
};
|
||||
|
||||
#if defined(ENABLE_NOAA)
|
||||
const uint32_t NoaaFrequencyTable[10] = {
|
||||
16255000,
|
||||
16240000,
|
||||
@ -60,6 +61,7 @@ const uint32_t NoaaFrequencyTable[10] = {
|
||||
16177500,
|
||||
16327500,
|
||||
};
|
||||
#endif
|
||||
|
||||
const uint16_t StepFrequencyTable[6] = {
|
||||
250,
|
||||
|
@ -35,7 +35,9 @@ typedef enum FREQUENCY_Band_t FREQUENCY_Band_t;
|
||||
extern const uint32_t LowerLimitFrequencyBandTable[7];
|
||||
extern const uint32_t MiddleFrequencyBandTable[7];
|
||||
extern const uint32_t UpperLimitFrequencyBandTable[7];
|
||||
#if defined(ENABLE_NOAA)
|
||||
extern const uint32_t NoaaFrequencyTable[10];
|
||||
#endif
|
||||
extern const uint16_t StepFrequencyTable[6];
|
||||
|
||||
FREQUENCY_Band_t FREQUENCY_GetBand(uint32_t Frequency);
|
||||
|
@ -62,7 +62,10 @@ void BOOT_ProcessMode(BOOT_Mode_t Mode)
|
||||
gMenuCursor = MENU_350TX;
|
||||
gSubMenuSelection = gSetting_350TX;
|
||||
GUI_SelectNextDisplay(DISPLAY_MENU);
|
||||
gMenuListCount = 57;
|
||||
gMenuListCount = 56;
|
||||
#if defined(ENABLE_NOAA)
|
||||
gMenuListCount++;
|
||||
#endif
|
||||
gF_LOCK = true;
|
||||
#if defined(ENABLE_AIRCOPY)
|
||||
} else if (Mode == BOOT_MODE_AIRCOPY) {
|
||||
|
7
main.c
7
main.c
@ -104,7 +104,10 @@ void Main(void)
|
||||
UI_DisplayWelcome();
|
||||
BACKLIGHT_TurnOn();
|
||||
SYSTEM_DelayMs(1000);
|
||||
gMenuListCount = 51;
|
||||
gMenuListCount = 50;
|
||||
#if defined(ENABLE_NOAA)
|
||||
gMenuListCount++;
|
||||
#endif
|
||||
|
||||
BootMode = BOOT_GetMode();
|
||||
if (gEeprom.POWER_ON_PASSWORD < 1000000) {
|
||||
@ -126,7 +129,9 @@ void Main(void)
|
||||
AUDIO_SetVoiceID(1, VOICE_ID_FREQUENCY_MODE);
|
||||
}
|
||||
AUDIO_PlaySingleVoice(0);
|
||||
#if defined(ENABLE_NOAA)
|
||||
RADIO_ConfigureNOAA();
|
||||
#endif
|
||||
}
|
||||
|
||||
while (1) {
|
||||
|
8
misc.c
8
misc.c
@ -57,7 +57,9 @@ volatile uint16_t gBatterySaveCountdown = 1000;
|
||||
volatile uint16_t gDualWatchCountdown;
|
||||
volatile uint16_t gTxTimerCountdown;
|
||||
volatile uint16_t gTailNoteEliminationCountdown;
|
||||
#if defined(ENABLE_NOAA)
|
||||
volatile uint16_t gNOAA_Countdown;
|
||||
#endif
|
||||
bool gEnableSpeaker;
|
||||
uint8_t gKeyLockCountdown;
|
||||
uint8_t gRTTECountdown;
|
||||
@ -129,9 +131,13 @@ uint8_t gAircopySendCountdown;
|
||||
uint8_t gFSKWriteIndex;
|
||||
uint8_t gNeverUsed;
|
||||
|
||||
#if defined(ENABLE_NOAA)
|
||||
bool gIsNoaaMode;
|
||||
#endif
|
||||
volatile bool gNextTimeslice;
|
||||
#if defined(ENABLE_NOAA)
|
||||
uint8_t gNoaaChannel;
|
||||
#endif
|
||||
bool gUpdateDisplay;
|
||||
bool gF_LOCK;
|
||||
uint8_t gShowChPrefix;
|
||||
@ -144,7 +150,9 @@ volatile bool gNextTimeslice40ms;
|
||||
volatile bool gSchedulePowerSave;
|
||||
volatile bool gBatterySaveCountdownExpired;
|
||||
volatile bool gScheduleDualWatch = true;
|
||||
#if defined(ENABLE_NOAA)
|
||||
volatile bool gScheduleNOAA = true;
|
||||
#endif
|
||||
volatile bool gFlagTteComplete;
|
||||
#if defined(ENABLE_FMRADIO)
|
||||
volatile bool gScheduleFM;
|
||||
|
8
misc.h
8
misc.h
@ -108,7 +108,9 @@ extern volatile uint16_t gDualWatchCountdown;
|
||||
extern volatile uint16_t gTxTimerCountdown;
|
||||
extern volatile uint16_t gTailNoteEliminationCountdown;
|
||||
extern volatile uint16_t gFmPlayCountdown;
|
||||
#if defined(ENABLE_NOAA)
|
||||
extern volatile uint16_t gNOAA_Countdown;
|
||||
#endif
|
||||
extern bool gEnableSpeaker;
|
||||
extern uint8_t gKeyLockCountdown;
|
||||
extern uint8_t gRTTECountdown;
|
||||
@ -180,9 +182,13 @@ extern uint8_t gAircopySendCountdown;
|
||||
extern uint8_t gFSKWriteIndex;
|
||||
extern uint8_t gNeverUsed;
|
||||
|
||||
#if defined(ENABLE_NOAA)
|
||||
extern bool gIsNoaaMode;
|
||||
#endif
|
||||
extern volatile bool gNextTimeslice;
|
||||
#if defined(ENABLE_NOAA)
|
||||
extern uint8_t gNoaaChannel;
|
||||
#endif
|
||||
extern bool gUpdateDisplay;
|
||||
extern bool gF_LOCK;
|
||||
extern uint8_t gShowChPrefix;
|
||||
@ -195,7 +201,9 @@ extern volatile bool gNextTimeslice40ms;
|
||||
extern volatile bool gSchedulePowerSave;
|
||||
extern volatile bool gBatterySaveCountdownExpired;
|
||||
extern volatile bool gScheduleDualWatch;
|
||||
#if defined(ENABLE_NOAA)
|
||||
extern volatile bool gScheduleNOAA;
|
||||
#endif
|
||||
extern volatile bool gFlagTteComplete;
|
||||
#if defined(ENABLE_FMRADIO)
|
||||
extern volatile bool gScheduleFM;
|
||||
|
8
radio.c
8
radio.c
@ -154,6 +154,7 @@ void RADIO_ConfigureChannel(uint8_t VFO, uint32_t Arg)
|
||||
|
||||
Channel = gEeprom.ScreenChannel[VFO];
|
||||
if (IS_VALID_CHANNEL(Channel)) {
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (Channel >= NOAA_CHANNEL_FIRST) {
|
||||
RADIO_InitInfo(pRadio, gEeprom.ScreenChannel[VFO], 2, NoaaFrequencyTable[Channel - NOAA_CHANNEL_FIRST]);
|
||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) {
|
||||
@ -163,6 +164,7 @@ void RADIO_ConfigureChannel(uint8_t VFO, uint32_t Arg)
|
||||
gEeprom.CROSS_BAND_RX_TX = CROSS_BAND_OFF;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (IS_MR_CHANNEL(Channel)) {
|
||||
Channel = RADIO_FindNextChannel(Channel, RADIO_CHANNEL_UP, false, VFO);
|
||||
if (Channel == 0xFF) {
|
||||
@ -504,11 +506,15 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
||||
}
|
||||
BK4819_WriteRegister(BK4819_REG_3F, 0);
|
||||
BK4819_WriteRegister(BK4819_REG_7D, gEeprom.MIC_SENSITIVITY_TUNING | 0xE940);
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (IS_NOT_NOAA_CHANNEL(gRxVfo->CHANNEL_SAVE) || !gIsNoaaMode) {
|
||||
Frequency = gRxVfo->pRX->Frequency;
|
||||
} else {
|
||||
Frequency = NoaaFrequencyTable[gNoaaChannel];
|
||||
}
|
||||
#else
|
||||
Frequency = gRxVfo->pRX->Frequency;
|
||||
#endif
|
||||
BK4819_SetFrequency(Frequency);
|
||||
BK4819_SetupSquelch(
|
||||
gRxVfo->SquelchOpenRSSIThresh, gRxVfo->SquelchCloseRSSIThresh,
|
||||
@ -611,6 +617,7 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(ENABLE_NOAA)
|
||||
void RADIO_ConfigureNOAA(void)
|
||||
{
|
||||
uint8_t ChanAB;
|
||||
@ -645,6 +652,7 @@ void RADIO_ConfigureNOAA(void)
|
||||
gIsNoaaMode = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void RADIO_SetTxParameters(void)
|
||||
{
|
||||
|
@ -72,6 +72,7 @@ void SystickHandler(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (gScanState == SCAN_OFF && gCssScanMode == CSS_SCAN_MODE_OFF && gEeprom.DUAL_WATCH == DUAL_WATCH_OFF) {
|
||||
if (gIsNoaaMode && gCurrentFunction != FUNCTION_MONITOR && gCurrentFunction != FUNCTION_TRANSMIT) {
|
||||
if (gCurrentFunction != FUNCTION_RECEIVE) {
|
||||
@ -79,6 +80,7 @@ void SystickHandler(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gScanState != SCAN_OFF || gCssScanMode == CSS_SCAN_MODE_SCANNING) {
|
||||
if (gCurrentFunction != FUNCTION_MONITOR && gCurrentFunction != FUNCTION_TRANSMIT) {
|
||||
|
@ -166,6 +166,7 @@ void UI_DisplayMain(void)
|
||||
c = (gEeprom.ScreenChannel[i] - FREQ_CHANNEL_FIRST) + 1;
|
||||
UI_DisplaySmallDigits(1, &c, 22, Line + 1);
|
||||
} else {
|
||||
#if defined(ENABLE_NOAA)
|
||||
memcpy(pLine1 + 7, BITMAP_NarrowBand, sizeof(BITMAP_NarrowBand));
|
||||
if (gInputBoxIndex == 0 || gEeprom.TX_CHANNEL != i) {
|
||||
NUMBER_ToDigits((gEeprom.ScreenChannel[i] - NOAA_CHANNEL_FIRST) + 1, String);
|
||||
@ -174,6 +175,7 @@ void UI_DisplayMain(void)
|
||||
String[7] = gInputBox[1];
|
||||
}
|
||||
UI_DisplaySmallDigits(2, String + 6, 15, Line + 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
// 0x8FEC
|
||||
|
@ -48,7 +48,10 @@ static const char MenuList[][7] = {
|
||||
"D-PRE", "PTT-ID", "D-DCD", "D-LIST",
|
||||
"PONMSG", "ROGER", "VOL", "AM",
|
||||
// 0x30
|
||||
"NOAA_S", "DEL-CH", "RESET", "350TX",
|
||||
#if defined(ENABLE_NOAA)
|
||||
"NOAA_S",
|
||||
#endif
|
||||
"DEL-CH", "RESET", "350TX",
|
||||
"F-LOCK", "200TX", "500TX", "350EN",
|
||||
// 0x38
|
||||
"SCREN",
|
||||
@ -288,7 +291,9 @@ void UI_DisplayMenu(void)
|
||||
case MENU_D_ST:
|
||||
case MENU_D_DCD:
|
||||
case MENU_AM:
|
||||
#if defined(ENABLE_NOAA)
|
||||
case MENU_NOAA_S:
|
||||
#endif
|
||||
case MENU_350TX:
|
||||
case MENU_200TX:
|
||||
case MENU_500TX:
|
||||
|
114
ui/menu.h
114
ui/menu.h
@ -22,62 +22,64 @@
|
||||
|
||||
enum {
|
||||
MENU_SQL = 0,
|
||||
MENU_STEP = 1,
|
||||
MENU_TXP = 2,
|
||||
MENU_R_DCS = 3,
|
||||
MENU_R_CTCS = 4,
|
||||
MENU_T_DCS = 5,
|
||||
MENU_T_CTCS = 6,
|
||||
MENU_SFT_D = 7,
|
||||
MENU_OFFSET = 8,
|
||||
MENU_W_N = 9,
|
||||
MENU_SCR = 10,
|
||||
MENU_BCL = 11,
|
||||
MENU_MEM_CH = 12,
|
||||
MENU_SAVE = 13,
|
||||
MENU_VOX = 14,
|
||||
MENU_ABR = 15,
|
||||
MENU_TDR = 16,
|
||||
MENU_WX = 17,
|
||||
MENU_BEEP = 18,
|
||||
MENU_TOT = 19,
|
||||
MENU_VOICE = 20,
|
||||
MENU_SC_REV = 21,
|
||||
MENU_MDF = 22,
|
||||
MENU_AUTOLK = 23,
|
||||
MENU_S_ADD1 = 24,
|
||||
MENU_S_ADD2 = 25,
|
||||
MENU_STE = 26,
|
||||
MENU_RP_STE = 27,
|
||||
MENU_MIC = 28,
|
||||
MENU_1_CALL = 29,
|
||||
MENU_S_LIST = 30,
|
||||
MENU_SLIST1 = 31,
|
||||
MENU_SLIST2 = 32,
|
||||
MENU_AL_MOD = 33,
|
||||
MENU_ANI_ID = 34,
|
||||
MENU_UPCODE = 35,
|
||||
MENU_DWCODE = 36,
|
||||
MENU_D_ST = 37,
|
||||
MENU_D_RSP = 38,
|
||||
MENU_D_HOLD = 39,
|
||||
MENU_D_PRE = 40,
|
||||
MENU_PTT_ID = 41,
|
||||
MENU_D_DCD = 42,
|
||||
MENU_D_LIST = 43,
|
||||
MENU_PONMSG = 44,
|
||||
MENU_ROGER = 45,
|
||||
MENU_VOL = 46,
|
||||
MENU_AM = 47,
|
||||
MENU_NOAA_S = 48,
|
||||
MENU_DEL_CH = 49,
|
||||
MENU_RESET = 50,
|
||||
MENU_350TX = 51,
|
||||
MENU_F_LOCK = 52,
|
||||
MENU_200TX = 53,
|
||||
MENU_500TX = 54,
|
||||
MENU_350EN = 55,
|
||||
MENU_SCREN = 56,
|
||||
MENU_STEP,
|
||||
MENU_TXP,
|
||||
MENU_R_DCS,
|
||||
MENU_R_CTCS,
|
||||
MENU_T_DCS,
|
||||
MENU_T_CTCS,
|
||||
MENU_SFT_D,
|
||||
MENU_OFFSET,
|
||||
MENU_W_N,
|
||||
MENU_SCR,
|
||||
MENU_BCL,
|
||||
MENU_MEM_CH,
|
||||
MENU_SAVE,
|
||||
MENU_VOX,
|
||||
MENU_ABR,
|
||||
MENU_TDR,
|
||||
MENU_WX,
|
||||
MENU_BEEP,
|
||||
MENU_TOT,
|
||||
MENU_VOICE,
|
||||
MENU_SC_REV,
|
||||
MENU_MDF,
|
||||
MENU_AUTOLK,
|
||||
MENU_S_ADD1,
|
||||
MENU_S_ADD2,
|
||||
MENU_STE,
|
||||
MENU_RP_STE,
|
||||
MENU_MIC,
|
||||
MENU_1_CALL,
|
||||
MENU_S_LIST,
|
||||
MENU_SLIST1,
|
||||
MENU_SLIST2,
|
||||
MENU_AL_MOD,
|
||||
MENU_ANI_ID,
|
||||
MENU_UPCODE,
|
||||
MENU_DWCODE,
|
||||
MENU_D_ST,
|
||||
MENU_D_RSP,
|
||||
MENU_D_HOLD,
|
||||
MENU_D_PRE,
|
||||
MENU_PTT_ID,
|
||||
MENU_D_DCD,
|
||||
MENU_D_LIST,
|
||||
MENU_PONMSG,
|
||||
MENU_ROGER,
|
||||
MENU_VOL,
|
||||
MENU_AM,
|
||||
#if defined(ENABLE_NOAA)
|
||||
MENU_NOAA_S,
|
||||
#endif
|
||||
MENU_DEL_CH,
|
||||
MENU_RESET,
|
||||
MENU_350TX,
|
||||
MENU_F_LOCK,
|
||||
MENU_200TX,
|
||||
MENU_500TX,
|
||||
MENU_350EN,
|
||||
MENU_SCREN,
|
||||
};
|
||||
|
||||
extern bool gIsInSubMenu;
|
||||
|
@ -77,9 +77,11 @@ void UI_DisplayStatus(void)
|
||||
memcpy(gStatusLine + 21, BITMAP_FM, sizeof(BITMAP_FM));
|
||||
}
|
||||
#endif
|
||||
#if defined(ENABLE_NOAA)
|
||||
if (gIsNoaaMode) {
|
||||
memcpy(gStatusLine + 7, BITMAP_NOAA, sizeof(BITMAP_NOAA));
|
||||
}
|
||||
#endif
|
||||
ST7565_BlitStatusLine();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user