mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-29 14:51:26 +03:00
Maintain monitor state when up/down freq/chan
This commit is contained in:
parent
9d178c549a
commit
14f154b927
45
am_fix.c
45
am_fix.c
@ -297,7 +297,7 @@ const uint8_t orig_pga = 6; // -3dB
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned int counter = 0;
|
unsigned int counter = 0;
|
||||||
|
|
||||||
int16_t orig_dB_gain = -17;
|
int16_t orig_dB_gain = -17;
|
||||||
|
|
||||||
#ifdef ENABLE_AM_FIX_TEST1
|
#ifdef ENABLE_AM_FIX_TEST1
|
||||||
@ -321,8 +321,14 @@ const uint8_t orig_pga = 6; // -3dB
|
|||||||
// used to limit the max front end gain
|
// used to limit the max front end gain
|
||||||
unsigned int max_index = ARRAY_SIZE(am_fix_gain_table) - 1;
|
unsigned int max_index = ARRAY_SIZE(am_fix_gain_table) - 1;
|
||||||
|
|
||||||
|
#ifndef ENABLE_AM_FIX_TEST1
|
||||||
|
// -89dBm, any higher and the AM demodulator starts to saturate/clip/distort
|
||||||
|
const int16_t desired_rssi = (-89 + 160) * 2;
|
||||||
|
#endif
|
||||||
|
|
||||||
void AM_fix_init(void)
|
void AM_fix_init(void)
|
||||||
{
|
{ // called at boot-up
|
||||||
|
|
||||||
/* unsigned int i;
|
/* unsigned int i;
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
@ -359,6 +365,8 @@ const uint8_t orig_pga = 6; // -3dB
|
|||||||
void AM_fix_reset(const int vfo)
|
void AM_fix_reset(const int vfo)
|
||||||
{ // reset the AM fixer
|
{ // reset the AM fixer
|
||||||
|
|
||||||
|
counter = 0;
|
||||||
|
|
||||||
prev_rssi[vfo] = 0;
|
prev_rssi[vfo] = 0;
|
||||||
|
|
||||||
am_gain_hold_counter[vfo] = 0;
|
am_gain_hold_counter[vfo] = 0;
|
||||||
@ -372,8 +380,6 @@ const uint8_t orig_pga = 6; // -3dB
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
am_fix_gain_table_index_prev[vfo] = 0;
|
am_fix_gain_table_index_prev[vfo] = 0;
|
||||||
|
|
||||||
// AM_fix_init(); // bootup calls this
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// adjust the RX RF gain to try and prevent the AM demodulator from
|
// adjust the RX RF gain to try and prevent the AM demodulator from
|
||||||
@ -388,13 +394,6 @@ const uint8_t orig_pga = 6; // -3dB
|
|||||||
int16_t diff_dB;
|
int16_t diff_dB;
|
||||||
int16_t rssi;
|
int16_t rssi;
|
||||||
|
|
||||||
#ifndef ENABLE_AM_FIX_TEST1
|
|
||||||
// -89dBm, any higher and the AM demodulator starts to saturate/clip/distort
|
|
||||||
const int16_t desired_rssi = (-89 + 160) * 2; // dBm to ADC sample
|
|
||||||
#endif
|
|
||||||
|
|
||||||
counter++;
|
|
||||||
|
|
||||||
// but we're not in FM mode, we're in AM mode
|
// but we're not in FM mode, we're in AM mode
|
||||||
|
|
||||||
switch (gCurrentFunction)
|
switch (gCurrentFunction)
|
||||||
@ -402,6 +401,7 @@ const uint8_t orig_pga = 6; // -3dB
|
|||||||
case FUNCTION_TRANSMIT:
|
case FUNCTION_TRANSMIT:
|
||||||
case FUNCTION_BAND_SCOPE:
|
case FUNCTION_BAND_SCOPE:
|
||||||
case FUNCTION_POWER_SAVE:
|
case FUNCTION_POWER_SAVE:
|
||||||
|
counter = 0;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case FUNCTION_FOREGROUND:
|
case FUNCTION_FOREGROUND:
|
||||||
@ -414,6 +414,10 @@ const uint8_t orig_pga = 6; // -3dB
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (counter > 0)
|
||||||
|
if (++counter >= 20) // limit display update rate to 200ms
|
||||||
|
counter = 0;
|
||||||
|
|
||||||
{ // sample the current RSSI level
|
{ // sample the current RSSI level
|
||||||
// average it with the previous rssi (a bit of noise/spike immunity)
|
// average it with the previous rssi (a bit of noise/spike immunity)
|
||||||
const int16_t new_rssi = BK4819_GetRSSI();
|
const int16_t new_rssi = BK4819_GetRSSI();
|
||||||
@ -427,7 +431,11 @@ const uint8_t orig_pga = 6; // -3dB
|
|||||||
if (gCurrentRSSI[vfo] != new_rssi)
|
if (gCurrentRSSI[vfo] != new_rssi)
|
||||||
{
|
{
|
||||||
gCurrentRSSI[vfo] = new_rssi;
|
gCurrentRSSI[vfo] = new_rssi;
|
||||||
gUpdateDisplay = ((counter & 15u) == 0); // limit the screen update rate to once every 150ms
|
if (counter == 0)
|
||||||
|
{
|
||||||
|
counter = 1;
|
||||||
|
gUpdateDisplay = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -545,13 +553,21 @@ const uint8_t orig_pga = 6; // -3dB
|
|||||||
if (gCurrentRSSI[vfo] != new_rssi)
|
if (gCurrentRSSI[vfo] != new_rssi)
|
||||||
{
|
{
|
||||||
gCurrentRSSI[vfo] = new_rssi;
|
gCurrentRSSI[vfo] = new_rssi;
|
||||||
gUpdateDisplay = ((counter & 15u) == 0); // limit the screen update rate to once every 150ms
|
if (counter == 0)
|
||||||
|
{
|
||||||
|
counter = 1;
|
||||||
|
gUpdateDisplay = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_AM_FIX_SHOW_DATA
|
#ifdef ENABLE_AM_FIX_SHOW_DATA
|
||||||
gUpdateDisplay = ((counter & 15u) == 0); // limit the screen update rate to once every 150ms
|
if (counter == 0)
|
||||||
|
{
|
||||||
|
counter = 1;
|
||||||
|
gUpdateDisplay = true;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -568,6 +584,7 @@ const uint8_t orig_pga = 6; // -3dB
|
|||||||
const int16_t gain_dB = lna_short_dB[lna_short] + lna_dB[lna] + mixer_dB[mixer] + pga_dB[pga];
|
const int16_t gain_dB = lna_short_dB[lna_short] + lna_dB[lna] + mixer_dB[mixer] + pga_dB[pga];
|
||||||
if (s != NULL)
|
if (s != NULL)
|
||||||
sprintf(s, "idx %2d %4ddB %3u", index, gain_dB, prev_rssi[vfo]);
|
sprintf(s, "idx %2d %4ddB %3u", index, gain_dB, prev_rssi[vfo]);
|
||||||
|
counter = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
48
app/action.c
48
app/action.c
@ -66,27 +66,25 @@ void ACTION_Power(void)
|
|||||||
gRequestDisplayScreen = gScreenToDisplay;
|
gRequestDisplayScreen = gScreenToDisplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ACTION_Monitor(void)
|
void ACTION_Monitor(void)
|
||||||
{
|
{
|
||||||
if (gCurrentFunction != FUNCTION_MONITOR)
|
if (gCurrentFunction != FUNCTION_MONITOR)
|
||||||
{
|
{ // enable the monitor
|
||||||
RADIO_SelectVfos();
|
RADIO_SelectVfos();
|
||||||
|
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
if (gRxVfo->CHANNEL_SAVE >= NOAA_CHANNEL_FIRST && gIsNoaaMode)
|
if (gRxVfo->CHANNEL_SAVE >= NOAA_CHANNEL_FIRST && gIsNoaaMode)
|
||||||
gNoaaChannel = gRxVfo->CHANNEL_SAVE - NOAA_CHANNEL_FIRST;
|
gNoaaChannel = gRxVfo->CHANNEL_SAVE - NOAA_CHANNEL_FIRST;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RADIO_SetupRegisters(true);
|
RADIO_SetupRegisters(true);
|
||||||
|
|
||||||
APP_StartListening(FUNCTION_MONITOR, false);
|
APP_StartListening(FUNCTION_MONITOR, false);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gMonitor = false;
|
||||||
|
|
||||||
if (gScanState != SCAN_OFF)
|
if (gScanState != SCAN_OFF)
|
||||||
{
|
{
|
||||||
ScanPauseDelayIn_10ms = 500; // 5 seconds
|
ScanPauseDelayIn_10ms = scan_pause_delay_in_1_10ms;
|
||||||
gScheduleScanListen = false;
|
gScheduleScanListen = false;
|
||||||
gScanPauseMode = true;
|
gScanPauseMode = true;
|
||||||
}
|
}
|
||||||
@ -98,7 +96,7 @@ static void ACTION_Monitor(void)
|
|||||||
gScheduleNOAA = false;
|
gScheduleNOAA = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RADIO_SetupRegisters(true);
|
RADIO_SetupRegisters(true);
|
||||||
|
|
||||||
#ifdef ENABLE_FMRADIO
|
#ifdef ENABLE_FMRADIO
|
||||||
@ -117,14 +115,18 @@ void ACTION_Scan(bool bRestart)
|
|||||||
#ifdef ENABLE_FMRADIO
|
#ifdef ENABLE_FMRADIO
|
||||||
if (gFmRadioMode)
|
if (gFmRadioMode)
|
||||||
{
|
{
|
||||||
if (gCurrentFunction != FUNCTION_RECEIVE && gCurrentFunction != FUNCTION_MONITOR && gCurrentFunction != FUNCTION_TRANSMIT)
|
if (gCurrentFunction != FUNCTION_RECEIVE &&
|
||||||
|
gCurrentFunction != FUNCTION_MONITOR &&
|
||||||
|
gCurrentFunction != FUNCTION_TRANSMIT)
|
||||||
{
|
{
|
||||||
GUI_SelectNextDisplay(DISPLAY_FM);
|
GUI_SelectNextDisplay(DISPLAY_FM);
|
||||||
|
|
||||||
|
gMonitor = false;
|
||||||
|
|
||||||
if (gFM_ScanState != FM_SCAN_OFF)
|
if (gFM_ScanState != FM_SCAN_OFF)
|
||||||
{
|
{
|
||||||
FM_PlayAndUpdate();
|
FM_PlayAndUpdate();
|
||||||
|
|
||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
gAnotherVoiceID = VOICE_ID_SCANNING_STOP;
|
gAnotherVoiceID = VOICE_ID_SCANNING_STOP;
|
||||||
#endif
|
#endif
|
||||||
@ -132,7 +134,7 @@ void ACTION_Scan(bool bRestart)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint16_t Frequency;
|
uint16_t Frequency;
|
||||||
|
|
||||||
if (bRestart)
|
if (bRestart)
|
||||||
{
|
{
|
||||||
gFM_AutoScan = true;
|
gFM_AutoScan = true;
|
||||||
@ -146,16 +148,16 @@ void ACTION_Scan(bool bRestart)
|
|||||||
gFM_ChannelPosition = 0;
|
gFM_ChannelPosition = 0;
|
||||||
Frequency = gEeprom.FM_FrequencyPlaying;
|
Frequency = gEeprom.FM_FrequencyPlaying;
|
||||||
}
|
}
|
||||||
|
|
||||||
BK1080_GetFrequencyDeviation(Frequency);
|
BK1080_GetFrequencyDeviation(Frequency);
|
||||||
FM_Tune(Frequency, 1, bRestart);
|
FM_Tune(Frequency, 1, bRestart);
|
||||||
|
|
||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
gAnotherVoiceID = VOICE_ID_SCANNING_BEGIN;
|
gAnotherVoiceID = VOICE_ID_SCANNING_BEGIN;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -163,6 +165,8 @@ void ACTION_Scan(bool bRestart)
|
|||||||
if (gScreenToDisplay != DISPLAY_SCANNER)
|
if (gScreenToDisplay != DISPLAY_SCANNER)
|
||||||
{ // not scanning
|
{ // not scanning
|
||||||
|
|
||||||
|
gMonitor = false;
|
||||||
|
|
||||||
RADIO_SelectVfos();
|
RADIO_SelectVfos();
|
||||||
|
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
@ -201,6 +205,8 @@ void ACTION_Scan(bool bRestart)
|
|||||||
if (!bRestart)
|
if (!bRestart)
|
||||||
{ // scanning
|
{ // scanning
|
||||||
|
|
||||||
|
gMonitor = false;
|
||||||
|
|
||||||
SCANNER_Stop();
|
SCANNER_Stop();
|
||||||
|
|
||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
@ -241,19 +247,21 @@ void ACTION_Vox(void)
|
|||||||
if (gFmRadioMode)
|
if (gFmRadioMode)
|
||||||
{
|
{
|
||||||
FM_TurnOff();
|
FM_TurnOff();
|
||||||
|
|
||||||
gInputBoxIndex = 0;
|
gInputBoxIndex = 0;
|
||||||
gVoxResumeCountdown = 80;
|
gVoxResumeCountdown = 80;
|
||||||
gFlagReconfigureVfos = true;
|
gFlagReconfigureVfos = true;
|
||||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gMonitor = false;
|
||||||
|
|
||||||
RADIO_SelectVfos();
|
RADIO_SelectVfos();
|
||||||
RADIO_SetupRegisters(true);
|
RADIO_SetupRegisters(true);
|
||||||
|
|
||||||
FM_Start();
|
FM_Start();
|
||||||
|
|
||||||
gInputBoxIndex = 0;
|
gInputBoxIndex = 0;
|
||||||
gRequestDisplayScreen = DISPLAY_FM;
|
gRequestDisplayScreen = DISPLAY_FM;
|
||||||
}
|
}
|
||||||
@ -280,7 +288,7 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
gAnotherVoiceID = VOICE_ID_CANCEL;
|
gAnotherVoiceID = VOICE_ID_CANCEL;
|
||||||
#endif
|
#endif
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
//static void ACTION_FlashLight(void)
|
//static void ACTION_FlashLight(void)
|
||||||
void ACTION_Power(void);
|
void ACTION_Power(void);
|
||||||
//static void ACTION_Monitor(void)
|
void ACTION_Monitor(void);
|
||||||
void ACTION_Scan(bool bFlag);
|
void ACTION_Scan(bool bFlag);
|
||||||
void ACTION_Vox(void);
|
void ACTION_Vox(void);
|
||||||
#ifdef ENABLE_ALARM
|
#ifdef ENABLE_ALARM
|
||||||
|
26
app/app.c
26
app/app.c
@ -203,7 +203,7 @@ static void APP_HandleIncoming(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
APP_StartListening(FUNCTION_RECEIVE, false);
|
APP_StartListening(gMonitor ? FUNCTION_MONITOR : FUNCTION_RECEIVE, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void APP_HandleReceive(void)
|
static void APP_HandleReceive(void)
|
||||||
@ -979,14 +979,14 @@ void APP_Update(void)
|
|||||||
if (IS_FREQ_CHANNEL(gNextMrChannel))
|
if (IS_FREQ_CHANNEL(gNextMrChannel))
|
||||||
{
|
{
|
||||||
if (gCurrentFunction == FUNCTION_INCOMING)
|
if (gCurrentFunction == FUNCTION_INCOMING)
|
||||||
APP_StartListening(FUNCTION_RECEIVE, true);
|
APP_StartListening(gMonitor ? FUNCTION_MONITOR : FUNCTION_RECEIVE, true);
|
||||||
else
|
else
|
||||||
FREQ_NextChannel();
|
FREQ_NextChannel();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (gCurrentCodeType == CODE_TYPE_OFF && gCurrentFunction == FUNCTION_INCOMING)
|
if (gCurrentCodeType == CODE_TYPE_OFF && gCurrentFunction == FUNCTION_INCOMING)
|
||||||
APP_StartListening(FUNCTION_RECEIVE, true);
|
APP_StartListening(gMonitor ? FUNCTION_MONITOR : FUNCTION_RECEIVE, true);
|
||||||
else
|
else
|
||||||
MR_NextChannel();
|
MR_NextChannel();
|
||||||
}
|
}
|
||||||
@ -1726,8 +1726,13 @@ void APP_TimeSlice500ms(void)
|
|||||||
gAskToDelete = false;
|
gAskToDelete = false;
|
||||||
|
|
||||||
#ifdef ENABLE_FMRADIO
|
#ifdef ENABLE_FMRADIO
|
||||||
if (gFmRadioMode && gCurrentFunction != FUNCTION_RECEIVE && gCurrentFunction != FUNCTION_MONITOR && gCurrentFunction != FUNCTION_TRANSMIT)
|
if (gFmRadioMode &&
|
||||||
|
gCurrentFunction != FUNCTION_RECEIVE &&
|
||||||
|
gCurrentFunction != FUNCTION_MONITOR &&
|
||||||
|
gCurrentFunction != FUNCTION_TRANSMIT)
|
||||||
|
{
|
||||||
GUI_SelectNextDisplay(DISPLAY_FM);
|
GUI_SelectNextDisplay(DISPLAY_FM);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_NO_SCAN_TIMEOUT
|
#ifdef ENABLE_NO_SCAN_TIMEOUT
|
||||||
@ -1747,7 +1752,11 @@ void APP_TimeSlice500ms(void)
|
|||||||
if (--gFM_ResumeCountdown_500ms == 0)
|
if (--gFM_ResumeCountdown_500ms == 0)
|
||||||
{
|
{
|
||||||
RADIO_SetVfoState(VFO_STATE_NORMAL);
|
RADIO_SetVfoState(VFO_STATE_NORMAL);
|
||||||
if (gCurrentFunction != FUNCTION_RECEIVE && gCurrentFunction != FUNCTION_TRANSMIT && gCurrentFunction != FUNCTION_MONITOR && gFmRadioMode)
|
|
||||||
|
if (gCurrentFunction != FUNCTION_RECEIVE &&
|
||||||
|
gCurrentFunction != FUNCTION_TRANSMIT &&
|
||||||
|
gCurrentFunction != FUNCTION_MONITOR &&
|
||||||
|
gFmRadioMode)
|
||||||
{ // switch back to FM radio mode
|
{ // switch back to FM radio mode
|
||||||
FM_Start();
|
FM_Start();
|
||||||
GUI_SelectNextDisplay(DISPLAY_FM);
|
GUI_SelectNextDisplay(DISPLAY_FM);
|
||||||
@ -1919,7 +1928,7 @@ void CHANNEL_Next(bool bFlag, int8_t Direction)
|
|||||||
FREQ_NextChannel();
|
FREQ_NextChannel();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScanPauseDelayIn_10ms = 50; // 500ms
|
ScanPauseDelayIn_10ms = scan_pause_delay_in_2_10ms;
|
||||||
gScheduleScanListen = false;
|
gScheduleScanListen = false;
|
||||||
gRxReceptionMode = RX_MODE_NONE;
|
gRxReceptionMode = RX_MODE_NONE;
|
||||||
gScanPauseMode = false;
|
gScanPauseMode = false;
|
||||||
@ -2340,6 +2349,9 @@ Skip:
|
|||||||
gVFO_RSSI_bar_level[1] = 0;
|
gVFO_RSSI_bar_level[1] = 0;
|
||||||
|
|
||||||
gFlagReconfigureVfos = false;
|
gFlagReconfigureVfos = false;
|
||||||
|
|
||||||
|
if (gMonitor)
|
||||||
|
ACTION_Monitor(); // 1of11
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gFlagRefreshSetting)
|
if (gFlagRefreshSetting)
|
||||||
@ -2350,6 +2362,8 @@ Skip:
|
|||||||
|
|
||||||
if (gFlagStartScan)
|
if (gFlagStartScan)
|
||||||
{
|
{
|
||||||
|
gMonitor = false;
|
||||||
|
|
||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
AUDIO_SetVoiceID(0, VOICE_ID_SCANNING_BEGIN);
|
AUDIO_SetVoiceID(0, VOICE_ID_SCANNING_BEGIN);
|
||||||
AUDIO_PlaySingleVoice(true);
|
AUDIO_PlaySingleVoice(true);
|
||||||
|
@ -57,7 +57,7 @@ void MENU_StartCssScan(int8_t Direction)
|
|||||||
|
|
||||||
MENU_SelectNextCode();
|
MENU_SelectNextCode();
|
||||||
|
|
||||||
ScanPauseDelayIn_10ms = 50;
|
ScanPauseDelayIn_10ms = scan_pause_delay_in_2_10ms;
|
||||||
gScheduleScanListen = false;
|
gScheduleScanListen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -746,7 +746,7 @@ void MENU_SelectNextCode(void)
|
|||||||
|
|
||||||
RADIO_SetupRegisters(true);
|
RADIO_SetupRegisters(true);
|
||||||
|
|
||||||
ScanPauseDelayIn_10ms = (gSelectedCodeType == CODE_TYPE_CONTINUOUS_TONE) ? 20 : 30;
|
ScanPauseDelayIn_10ms = (gSelectedCodeType == CODE_TYPE_CONTINUOUS_TONE) ? scan_pause_delay_in_3_10ms : scan_pause_delay_in_4_10ms;
|
||||||
|
|
||||||
gUpdateDisplay = true;
|
gUpdateDisplay = true;
|
||||||
}
|
}
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
@ -125,8 +125,12 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case FUNCTION_MONITOR:
|
case FUNCTION_MONITOR:
|
||||||
|
gMonitor = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case FUNCTION_INCOMING:
|
case FUNCTION_INCOMING:
|
||||||
case FUNCTION_RECEIVE:
|
case FUNCTION_RECEIVE:
|
||||||
|
gMonitor = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FUNCTION_POWER_SAVE:
|
case FUNCTION_POWER_SAVE:
|
||||||
@ -134,6 +138,8 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
|
|||||||
gPowerSaveCountdownExpired = false;
|
gPowerSaveCountdownExpired = false;
|
||||||
|
|
||||||
gRxIdleMode = true;
|
gRxIdleMode = true;
|
||||||
|
|
||||||
|
gMonitor = false;
|
||||||
|
|
||||||
BK4819_DisableVox();
|
BK4819_DisableVox();
|
||||||
BK4819_Sleep();
|
BK4819_Sleep();
|
||||||
|
7
misc.c
7
misc.c
@ -47,6 +47,11 @@ const uint16_t dual_watch_count_noaa_10ms = 70 / 10; // 70ms
|
|||||||
const uint16_t dual_watch_count_after_vox_10ms = 200 / 10; // 200ms
|
const uint16_t dual_watch_count_after_vox_10ms = 200 / 10; // 200ms
|
||||||
const uint16_t dual_watch_count_toggle_10ms = 100 / 10; // 100ms between VFO toggles
|
const uint16_t dual_watch_count_toggle_10ms = 100 / 10; // 100ms between VFO toggles
|
||||||
|
|
||||||
|
const uint16_t scan_pause_delay_in_1_10ms = 5000 / 10; // 5 seconds
|
||||||
|
const uint16_t scan_pause_delay_in_2_10ms = 500 / 10; // 500ms
|
||||||
|
const uint16_t scan_pause_delay_in_3_10ms = 200 / 10; // 200ms
|
||||||
|
const uint16_t scan_pause_delay_in_4_10ms = 300 / 10; // 300ms
|
||||||
|
|
||||||
const uint16_t battery_save_count_10ms = 10000 / 10; // 10 seconds
|
const uint16_t battery_save_count_10ms = 10000 / 10; // 10 seconds
|
||||||
|
|
||||||
const uint16_t power_save1_10ms = 100 / 10; // 100ms
|
const uint16_t power_save1_10ms = 100 / 10; // 100ms
|
||||||
@ -84,6 +89,8 @@ bool gSetting_ScrambleEnable;
|
|||||||
bool gSetting_live_DTMF_decoder;
|
bool gSetting_live_DTMF_decoder;
|
||||||
uint8_t gSetting_battery_text;
|
uint8_t gSetting_battery_text;
|
||||||
|
|
||||||
|
bool gMonitor = false; // true opens the squelch
|
||||||
|
|
||||||
uint32_t gCustomAesKey[4];
|
uint32_t gCustomAesKey[4];
|
||||||
bool bHasCustomAesKey;
|
bool bHasCustomAesKey;
|
||||||
uint32_t gChallenge[4];
|
uint32_t gChallenge[4];
|
||||||
|
7
misc.h
7
misc.h
@ -121,6 +121,11 @@ extern const uint16_t dual_watch_count_toggle_10ms;
|
|||||||
extern const uint16_t dual_watch_count_noaa_10ms;
|
extern const uint16_t dual_watch_count_noaa_10ms;
|
||||||
extern const uint16_t dual_watch_count_after_vox_10ms;
|
extern const uint16_t dual_watch_count_after_vox_10ms;
|
||||||
|
|
||||||
|
extern const uint16_t scan_pause_delay_in_1_10ms;
|
||||||
|
extern const uint16_t scan_pause_delay_in_2_10ms;
|
||||||
|
extern const uint16_t scan_pause_delay_in_3_10ms;
|
||||||
|
extern const uint16_t scan_pause_delay_in_4_10ms;
|
||||||
|
|
||||||
extern const uint16_t gMax_bat_v;
|
extern const uint16_t gMax_bat_v;
|
||||||
extern const uint16_t gMin_bat_v;
|
extern const uint16_t gMin_bat_v;
|
||||||
|
|
||||||
@ -147,6 +152,8 @@ extern bool gSetting_ScrambleEnable;
|
|||||||
extern bool gSetting_live_DTMF_decoder;
|
extern bool gSetting_live_DTMF_decoder;
|
||||||
extern uint8_t gSetting_battery_text;
|
extern uint8_t gSetting_battery_text;
|
||||||
|
|
||||||
|
extern bool gMonitor;
|
||||||
|
|
||||||
extern const uint32_t gDefaultAesKey[4];
|
extern const uint32_t gDefaultAesKey[4];
|
||||||
extern uint32_t gCustomAesKey[4];
|
extern uint32_t gCustomAesKey[4];
|
||||||
extern bool bHasCustomAesKey;
|
extern bool bHasCustomAesKey;
|
||||||
|
6
radio.c
6
radio.c
@ -669,11 +669,7 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
|||||||
// BK4819_SetTailDetection(670); // 67Hz
|
// BK4819_SetTailDetection(670); // 67Hz
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
InterruptMask = 0
|
InterruptMask = BK4819_REG_3F_CxCSS_TAIL | BK4819_REG_3F_SQUELCH_FOUND | BK4819_REG_3F_SQUELCH_LOST;
|
||||||
| BK4819_REG_3F_CxCSS_TAIL
|
|
||||||
| BK4819_REG_3F_SQUELCH_FOUND
|
|
||||||
| BK4819_REG_3F_SQUELCH_LOST;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CODE_TYPE_CONTINUOUS_TONE:
|
case CODE_TYPE_CONTINUOUS_TONE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user