mirror of
https://github.com/egzumer/uv-k5-firmware-custom
synced 2024-11-23 19:28:40 +00:00
PTT release denoise update
This commit is contained in:
parent
2f907f82f8
commit
e3e2409854
@ -80,7 +80,7 @@ static void ACTION_Monitor(void)
|
||||
|
||||
if (gScanState != SCAN_OFF)
|
||||
{
|
||||
ScanPauseDelayIn10msec = 500;
|
||||
ScanPauseDelayIn10msec = 500; // 5 seconds
|
||||
gScheduleScanListen = false;
|
||||
gScanPauseMode = true;
|
||||
}
|
||||
|
136
app/app.c
136
app/app.c
@ -102,7 +102,7 @@ static void APP_CheckForIncoming(void)
|
||||
return;
|
||||
}
|
||||
|
||||
ScanPauseDelayIn10msec = 20;
|
||||
ScanPauseDelayIn10msec = 20; // 200ms
|
||||
gScheduleScanListen = false;
|
||||
}
|
||||
|
||||
@ -139,7 +139,9 @@ static void APP_HandleIncoming(void)
|
||||
}
|
||||
|
||||
if (g_CDCSS_Lost && gCDCSSCodeType == CDCSS_POSITIVE_CODE && (gCurrentCodeType == CODE_TYPE_DIGITAL || gCurrentCodeType == CODE_TYPE_REVERSE_DIGITAL))
|
||||
{
|
||||
gFoundCDCSS = false;
|
||||
}
|
||||
else
|
||||
if (!bFlag)
|
||||
return;
|
||||
@ -168,13 +170,11 @@ static void APP_HandleIncoming(void)
|
||||
|
||||
static void APP_HandleReceive(void)
|
||||
{
|
||||
uint8_t Mode;
|
||||
|
||||
#define END_OF_RX_MODE_SKIP 0
|
||||
#define END_OF_RX_MODE_END 1
|
||||
#define END_OF_RX_MODE_TTE 2
|
||||
|
||||
Mode = END_OF_RX_MODE_SKIP;
|
||||
uint8_t Mode = END_OF_RX_MODE_SKIP;
|
||||
|
||||
if (gFlagTteComplete)
|
||||
{
|
||||
@ -193,6 +193,10 @@ static void APP_HandleReceive(void)
|
||||
|
||||
switch (gCurrentCodeType)
|
||||
{
|
||||
default:
|
||||
case CODE_TYPE_OFF:
|
||||
break;
|
||||
|
||||
case CODE_TYPE_CONTINUOUS_TONE:
|
||||
if (gFoundCTCSS && gFoundCTCSSCountdown == 0)
|
||||
{
|
||||
@ -202,6 +206,7 @@ static void APP_HandleReceive(void)
|
||||
goto Skip;
|
||||
}
|
||||
break;
|
||||
|
||||
case CODE_TYPE_DIGITAL:
|
||||
case CODE_TYPE_REVERSE_DIGITAL:
|
||||
if (gFoundCDCSS && gFoundCDCSSCountdown == 0)
|
||||
@ -212,8 +217,6 @@ static void APP_HandleReceive(void)
|
||||
goto Skip;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (g_SquelchLost)
|
||||
@ -259,7 +262,9 @@ static void APP_HandleReceive(void)
|
||||
case CODE_TYPE_DIGITAL:
|
||||
case CODE_TYPE_REVERSE_DIGITAL:
|
||||
if (g_CDCSS_Lost && gCDCSSCodeType == CDCSS_POSITIVE_CODE)
|
||||
{
|
||||
gFoundCDCSS = false;
|
||||
}
|
||||
else
|
||||
if (!gFoundCDCSS)
|
||||
{
|
||||
@ -276,16 +281,18 @@ static void APP_HandleReceive(void)
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
Mode = END_OF_RX_MODE_END;
|
||||
|
||||
if (!gEndOfRxDetectedMaybe && Mode == END_OF_RX_MODE_SKIP && gNextTimeslice40ms && gEeprom.TAIL_NOTE_ELIMINATION && (gCurrentCodeType == CODE_TYPE_DIGITAL || gCurrentCodeType == CODE_TYPE_REVERSE_DIGITAL) && BK4819_GetCTCType() == 1)
|
||||
if (!gEndOfRxDetectedMaybe &&
|
||||
Mode == END_OF_RX_MODE_SKIP &&
|
||||
gNextTimeslice40ms &&
|
||||
gEeprom.TAIL_NOTE_ELIMINATION &&
|
||||
(gCurrentCodeType == CODE_TYPE_DIGITAL || gCurrentCodeType == CODE_TYPE_REVERSE_DIGITAL) &&
|
||||
BK4819_GetCTCType() == 1)
|
||||
Mode = END_OF_RX_MODE_TTE;
|
||||
else
|
||||
gNextTimeslice40ms = false;
|
||||
@ -293,6 +300,9 @@ static void APP_HandleReceive(void)
|
||||
Skip:
|
||||
switch (Mode)
|
||||
{
|
||||
case END_OF_RX_MODE_SKIP:
|
||||
break;
|
||||
|
||||
case END_OF_RX_MODE_END:
|
||||
RADIO_SetupRegisters(true);
|
||||
|
||||
@ -307,21 +317,27 @@ Skip:
|
||||
{
|
||||
switch (gEeprom.SCAN_RESUME_MODE)
|
||||
{
|
||||
case SCAN_RESUME_TO:
|
||||
break;
|
||||
|
||||
case SCAN_RESUME_CO:
|
||||
ScanPauseDelayIn10msec = 360;
|
||||
gScheduleScanListen = false;
|
||||
break;
|
||||
|
||||
case SCAN_RESUME_SE:
|
||||
SCANNER_Stop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case END_OF_RX_MODE_TTE:
|
||||
if (gEeprom.TAIL_NOTE_ELIMINATION)
|
||||
{
|
||||
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
||||
|
||||
gTailNoteEliminationCountdown = 20;
|
||||
gFlagTteComplete = false;
|
||||
gEnableSpeaker = false;
|
||||
@ -338,17 +354,24 @@ static void APP_HandleFunction(void)
|
||||
case FUNCTION_FOREGROUND:
|
||||
APP_CheckForIncoming();
|
||||
break;
|
||||
case FUNCTION_POWER_SAVE:
|
||||
if (!gRxIdleMode)
|
||||
APP_CheckForIncoming();
|
||||
|
||||
case FUNCTION_TRANSMIT:
|
||||
break;
|
||||
|
||||
case FUNCTION_MONITOR:
|
||||
break;
|
||||
|
||||
case FUNCTION_INCOMING:
|
||||
APP_HandleIncoming();
|
||||
break;
|
||||
|
||||
case FUNCTION_RECEIVE:
|
||||
APP_HandleReceive();
|
||||
break;
|
||||
default:
|
||||
|
||||
case FUNCTION_POWER_SAVE:
|
||||
if (!gRxIdleMode)
|
||||
APP_CheckForIncoming();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -363,6 +386,7 @@ void APP_StartListening(FUNCTION_Type_t Function)
|
||||
gVFO_RSSI_Level[gEeprom.RX_CHANNEL == 0] = 0;
|
||||
|
||||
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_AUDIO_PATH);
|
||||
|
||||
gEnableSpeaker = true;
|
||||
|
||||
BACKLIGHT_TurnOn();
|
||||
@ -379,6 +403,7 @@ void APP_StartListening(FUNCTION_Type_t Function)
|
||||
gScanPauseMode = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case SCAN_RESUME_CO:
|
||||
case SCAN_RESUME_SE:
|
||||
ScanPauseDelayIn10msec = 0;
|
||||
@ -851,8 +876,8 @@ void APP_Update(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (gFM_ScanState != FM_SCAN_OFF &&
|
||||
gScheduleFM &&
|
||||
if (gScheduleFM &&
|
||||
gFM_ScanState != FM_SCAN_OFF &&
|
||||
gCurrentFunction != FUNCTION_MONITOR &&
|
||||
gCurrentFunction != FUNCTION_RECEIVE &&
|
||||
gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
@ -867,13 +892,13 @@ void APP_Update(void)
|
||||
if (gSchedulePowerSave)
|
||||
{
|
||||
#ifndef DISABLE_NOAA
|
||||
if (gEeprom.BATTERY_SAVE == 0 ||
|
||||
if (gFmRadioMode ||
|
||||
gPttIsPressed ||
|
||||
gKeyBeingHeld ||
|
||||
gEeprom.BATTERY_SAVE == 0 ||
|
||||
gScanState != SCAN_OFF ||
|
||||
gCssScanMode != CSS_SCAN_MODE_OFF ||
|
||||
gFmRadioMode ||
|
||||
gPttIsPressed ||
|
||||
gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gKeyBeingHeld ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
gBatterySaveCountdown = 1000;
|
||||
else
|
||||
@ -882,13 +907,13 @@ void APP_Update(void)
|
||||
else
|
||||
gBatterySaveCountdown = 1000;
|
||||
#else
|
||||
if (gEeprom.BATTERY_SAVE == 0 ||
|
||||
if (gFmRadioMode ||
|
||||
gPttIsPressed ||
|
||||
gKeyBeingHeld ||
|
||||
gEeprom.BATTERY_SAVE == 0 ||
|
||||
gScanState != SCAN_OFF ||
|
||||
gCssScanMode != CSS_SCAN_MODE_OFF ||
|
||||
gFmRadioMode ||
|
||||
gPttIsPressed ||
|
||||
gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gKeyBeingHeld ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
gBatterySaveCountdown = 1000;
|
||||
else
|
||||
@ -968,34 +993,47 @@ void APP_CheckKeys(void)
|
||||
{
|
||||
if (GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT))
|
||||
{ // PTT released
|
||||
|
||||
// denoise the PTT
|
||||
unsigned int i = 6; // test the PTT button for 6ms
|
||||
unsigned int count = 0;
|
||||
while (i-- > 0)
|
||||
{
|
||||
SYSTEM_DelayMs(1);
|
||||
if (GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT))
|
||||
count++; // PTT still released
|
||||
else
|
||||
if (count > 0)
|
||||
count--; // no it's not
|
||||
}
|
||||
|
||||
if (count >= 3)
|
||||
{ // good enough to end transmission
|
||||
APP_ProcessKey(KEY_PTT, false, false);
|
||||
gPttIsPressed = false;
|
||||
if (gKeyReading1 != KEY_INVALID)
|
||||
gPttWasReleased = true;
|
||||
}
|
||||
#if 0
|
||||
// denoise the PTT
|
||||
unsigned int i = 6; // test the PTT button for 6ms
|
||||
unsigned int count = 0;
|
||||
while (i-- > 0)
|
||||
{
|
||||
SYSTEM_DelayMs(1);
|
||||
if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT))
|
||||
{ // PTT pressed
|
||||
if (count > 0)
|
||||
count--;
|
||||
continue;
|
||||
}
|
||||
if (++count < 3)
|
||||
continue;
|
||||
// stop transmitting
|
||||
APP_ProcessKey(KEY_PTT, false, false);
|
||||
gPttIsPressed = false;
|
||||
if (gKeyReading1 != KEY_INVALID)
|
||||
gPttWasReleased = true;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
if (++gPttDebounceCounter >= 3) // 30ms
|
||||
{ // stop transmitting
|
||||
APP_ProcessKey(KEY_PTT, false, false);
|
||||
gPttIsPressed = false;
|
||||
if (gKeyReading1 != KEY_INVALID)
|
||||
gPttWasReleased = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
gPttDebounceCounter = 0;
|
||||
}
|
||||
else
|
||||
if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT))
|
||||
{ // PTT pressed
|
||||
if (++gPttDebounceCounter >= 4) // 40ms
|
||||
{ // lets start transmitting
|
||||
if (++gPttDebounceCounter >= 3) // 30ms
|
||||
{ // start transmitting
|
||||
gPttDebounceCounter = 0;
|
||||
gPttIsPressed = true;
|
||||
APP_ProcessKey(KEY_PTT, true, false);
|
||||
}
|
||||
@ -1184,7 +1222,7 @@ void APP_TimeSlice10ms(void)
|
||||
BK4819_CssScanResult_t ScanResult;
|
||||
uint16_t CtcssFreq;
|
||||
|
||||
if (gScanDelay)
|
||||
if (gScanDelay > 0)
|
||||
{
|
||||
gScanDelay--;
|
||||
APP_CheckKeys();
|
||||
@ -1203,7 +1241,7 @@ void APP_TimeSlice10ms(void)
|
||||
if (!BK4819_GetFrequencyScanResult(&Result))
|
||||
break;
|
||||
|
||||
Delta = Result - gScanFrequency;
|
||||
Delta = Result - gScanFrequency;
|
||||
gScanFrequency = Result;
|
||||
|
||||
if (Delta < 0)
|
||||
|
2
audio.c
2
audio.c
@ -195,7 +195,7 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
||||
|
||||
VoiceID = gVoiceID[0];
|
||||
|
||||
if (gEeprom.VOICE_PROMPT != VOICE_PROMPT_OFF && gVoiceWriteIndex)
|
||||
if (gEeprom.VOICE_PROMPT != VOICE_PROMPT_OFF && gVoiceWriteIndex > 0)
|
||||
{
|
||||
if (gEeprom.VOICE_PROMPT == VOICE_PROMPT_CHINESE)
|
||||
{ // Chinese
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
19
main.c
19
main.c
@ -35,14 +35,7 @@
|
||||
#include "settings.h"
|
||||
#include "ui/lock.h"
|
||||
#include "ui/welcome.h"
|
||||
|
||||
#ifdef GIT_HASH
|
||||
static const char Version[] = "UV-K5 Firmware, Open Edition, OEFW-"GIT_HASH"\r\n";
|
||||
#else
|
||||
#include "version.h"
|
||||
static const char Version1[] = "UV-K5 Firmware, Open Edition, ";
|
||||
static const char Version2[] = "\r\n";
|
||||
#endif
|
||||
#include "version.h"
|
||||
|
||||
void _putchar(char c)
|
||||
{
|
||||
@ -66,15 +59,7 @@ void Main(void)
|
||||
BOARD_Init();
|
||||
UART_Init();
|
||||
|
||||
#ifdef GIT_HASH
|
||||
UART_Send(Version, sizeof(Version));
|
||||
#else
|
||||
{
|
||||
UART_Send(Version1, sizeof(Version1));
|
||||
UART_Send(Version, strlen(Version));
|
||||
UART_Send(Version2, sizeof(Version2));
|
||||
}
|
||||
#endif
|
||||
UART_Send(UART_Version, strlen(UART_Version));
|
||||
|
||||
// Not implementing authentic device checks
|
||||
|
||||
|
3
misc.c
3
misc.c
@ -18,7 +18,8 @@
|
||||
|
||||
#include "misc.h"
|
||||
|
||||
const uint8_t g_scan_delay = 21; // 21
|
||||
const uint8_t g_scan_delay = 21; // 210ms
|
||||
//const uint8_t g_scan_delay = 2; // 20ms
|
||||
|
||||
const uint8_t g_menu_timeout = 2 * 30; // 30 seconds
|
||||
|
||||
|
249
misc.h
249
misc.h
@ -24,10 +24,8 @@
|
||||
#define IS_FREQ_CHANNEL(x) ((x) >= FREQ_CHANNEL_FIRST && (x) <= FREQ_CHANNEL_LAST)
|
||||
#define IS_VALID_CHANNEL(x) ((x) <= NOAA_CHANNEL_LAST)
|
||||
|
||||
#ifndef DISABLE_NOAA
|
||||
#define IS_NOAA_CHANNEL(x) ((x) >= NOAA_CHANNEL_FIRST && (x) <= NOAA_CHANNEL_LAST)
|
||||
#define IS_NOT_NOAA_CHANNEL(x) ((x) >= MR_CHANNEL_FIRST && (x) <= FREQ_CHANNEL_LAST)
|
||||
#endif
|
||||
#define IS_NOAA_CHANNEL(x) ((x) >= NOAA_CHANNEL_FIRST && (x) <= NOAA_CHANNEL_LAST)
|
||||
#define IS_NOT_NOAA_CHANNEL(x) ((x) >= MR_CHANNEL_FIRST && (x) <= FREQ_CHANNEL_LAST)
|
||||
|
||||
enum {
|
||||
MR_CHANNEL_FIRST = 0,
|
||||
@ -67,155 +65,150 @@ enum ReceptionMode_t {
|
||||
|
||||
typedef enum ReceptionMode_t ReceptionMode_t;
|
||||
|
||||
enum CssScanMode_t {
|
||||
enum CssScanMode_t
|
||||
{
|
||||
CSS_SCAN_MODE_OFF = 0,
|
||||
CSS_SCAN_MODE_SCANNING,
|
||||
CSS_SCAN_MODE_FOUND,
|
||||
};
|
||||
|
||||
typedef enum CssScanMode_t CssScanMode_t;
|
||||
typedef enum CssScanMode_t CssScanMode_t;
|
||||
|
||||
extern const uint8_t g_scan_delay;
|
||||
extern const uint8_t g_scan_delay;
|
||||
|
||||
extern const uint8_t g_menu_timeout;
|
||||
extern const uint8_t g_menu_timeout;
|
||||
|
||||
extern const uint16_t gMax_bat_v;
|
||||
extern const uint16_t gMin_bat_v;
|
||||
extern const uint16_t gMax_bat_v;
|
||||
extern const uint16_t gMin_bat_v;
|
||||
|
||||
extern const uint8_t gMicGain_dB2[5];
|
||||
extern const uint8_t gMicGain_dB2[5];
|
||||
|
||||
extern bool gSetting_350TX;
|
||||
extern bool gSetting_KILLED;
|
||||
extern bool gSetting_200TX;
|
||||
extern bool gSetting_500TX;
|
||||
extern bool gSetting_350EN;
|
||||
extern uint8_t gSetting_F_LOCK;
|
||||
extern bool gSetting_ScrambleEnable;
|
||||
extern uint8_t gSetting_F_LOCK;
|
||||
extern bool gSetting_350TX;
|
||||
extern bool gSetting_KILLED;
|
||||
extern bool gSetting_200TX;
|
||||
extern bool gSetting_500TX;
|
||||
extern bool gSetting_350EN;
|
||||
extern uint8_t gSetting_F_LOCK;
|
||||
extern bool gSetting_ScrambleEnable;
|
||||
|
||||
extern const uint32_t gDefaultAesKey[4];
|
||||
extern uint32_t gCustomAesKey[4];
|
||||
extern bool bHasCustomAesKey;
|
||||
extern uint32_t gChallenge[4];
|
||||
extern uint8_t gTryCount;
|
||||
extern const uint32_t gDefaultAesKey[4];
|
||||
extern uint32_t gCustomAesKey[4];
|
||||
extern bool bHasCustomAesKey;
|
||||
extern uint32_t gChallenge[4];
|
||||
extern uint8_t gTryCount;
|
||||
|
||||
extern uint8_t gEEPROM_1EC0_0[8];
|
||||
extern uint8_t gEEPROM_1EC0_1[8];
|
||||
extern uint8_t gEEPROM_1EC0_2[8];
|
||||
extern uint8_t gEEPROM_1EC0_3[8];
|
||||
extern uint8_t gEEPROM_1EC0_0[8];
|
||||
extern uint8_t gEEPROM_1EC0_1[8];
|
||||
extern uint8_t gEEPROM_1EC0_2[8];
|
||||
extern uint8_t gEEPROM_1EC0_3[8];
|
||||
|
||||
extern uint16_t gEEPROM_RSSI_CALIB[3][4];
|
||||
extern uint16_t gEEPROM_RSSI_CALIB[3][4];
|
||||
|
||||
extern uint16_t gEEPROM_1F8A;
|
||||
extern uint16_t gEEPROM_1F8C;
|
||||
extern uint16_t gEEPROM_1F8A;
|
||||
extern uint16_t gEEPROM_1F8C;
|
||||
|
||||
extern uint8_t gMR_ChannelAttributes[207];
|
||||
extern uint8_t gMR_ChannelAttributes[207];
|
||||
|
||||
extern volatile bool gNextTimeslice500ms;
|
||||
extern volatile uint16_t gBatterySaveCountdown;
|
||||
extern volatile uint16_t gDualWatchCountdown;
|
||||
extern volatile uint16_t gTxTimerCountdown;
|
||||
extern volatile uint16_t gTailNoteEliminationCountdown;
|
||||
extern volatile uint16_t gFmPlayCountdown;
|
||||
extern volatile bool gNextTimeslice500ms;
|
||||
extern volatile uint16_t gBatterySaveCountdown;
|
||||
extern volatile uint16_t gDualWatchCountdown;
|
||||
extern volatile uint16_t gTxTimerCountdown;
|
||||
extern volatile uint16_t gTailNoteEliminationCountdown;
|
||||
extern volatile uint16_t gFmPlayCountdown;
|
||||
#ifndef DISABLE_NOAA
|
||||
extern volatile uint16_t gNOAA_Countdown;
|
||||
#endif
|
||||
extern bool gEnableSpeaker;
|
||||
extern uint8_t gKeyLockCountdown;
|
||||
extern uint8_t gRTTECountdown;
|
||||
extern bool bIsInLockScreen;
|
||||
extern uint8_t gUpdateStatus;
|
||||
extern uint8_t gFoundCTCSS;
|
||||
extern uint8_t gFoundCDCSS;
|
||||
extern bool gEndOfRxDetectedMaybe;
|
||||
extern uint8_t gVFO_RSSI_Level[2];
|
||||
extern uint8_t gReducedService;
|
||||
extern uint8_t gBatteryVoltageIndex;
|
||||
extern CssScanMode_t gCssScanMode;
|
||||
extern bool gUpdateRSSI;
|
||||
extern AlarmState_t gAlarmState;
|
||||
extern uint8_t gVoltageMenuCountdown;
|
||||
extern bool gPttWasReleased;
|
||||
extern bool gPttWasPressed;
|
||||
extern bool gFlagReconfigureVfos;
|
||||
extern uint8_t gVfoConfigureMode;
|
||||
extern bool gFlagResetVfos;
|
||||
extern bool gRequestSaveVFO;
|
||||
extern uint8_t gRequestSaveChannel;
|
||||
extern bool gRequestSaveSettings;
|
||||
extern bool gRequestSaveFM;
|
||||
extern uint8_t gKeypadLocked;
|
||||
extern bool gFlagPrepareTX;
|
||||
extern bool gFlagAcceptSetting;
|
||||
extern bool gFlagRefreshSetting;
|
||||
extern bool gFlagSaveVfo;
|
||||
extern bool gFlagSaveSettings;
|
||||
extern bool gFlagSaveChannel;
|
||||
extern bool gFlagSaveFM;
|
||||
extern uint8_t gDTMF_RequestPending;
|
||||
extern bool g_CDCSS_Lost;
|
||||
extern uint8_t gCDCSSCodeType;
|
||||
extern bool g_CTCSS_Lost;
|
||||
extern bool g_CxCSS_TAIL_Found;
|
||||
extern bool g_VOX_Lost;
|
||||
extern bool g_SquelchLost;
|
||||
extern uint8_t gFlashLightState;
|
||||
extern bool gVOX_NoiseDetected;
|
||||
extern uint16_t gVoxResumeCountdown;
|
||||
extern uint16_t gVoxPauseCountdown;
|
||||
extern volatile uint16_t gFlashLightBlinkCounter;
|
||||
extern bool gFlagEndTransmission;
|
||||
extern uint16_t gLowBatteryCountdown;
|
||||
extern uint8_t gNextMrChannel;
|
||||
extern ReceptionMode_t gRxReceptionMode;
|
||||
extern uint8_t gRestoreMrChannel;
|
||||
extern uint8_t gCurrentScanList;
|
||||
extern uint8_t gPreviousMrChannel;
|
||||
extern uint32_t gRestoreFrequency;
|
||||
extern uint8_t gRxVfoIsActive;
|
||||
extern uint8_t gAlarmToneCounter;
|
||||
extern uint16_t gAlarmRunningCounter;
|
||||
extern bool gKeyBeingHeld;
|
||||
extern bool gPttIsPressed;
|
||||
extern uint8_t gPttDebounceCounter;
|
||||
extern uint8_t gMenuListCount;
|
||||
extern uint8_t gBackupCROSS_BAND_RX_TX;
|
||||
extern uint8_t gScanDelay;
|
||||
extern bool gEnableSpeaker;
|
||||
extern uint8_t gKeyLockCountdown;
|
||||
extern uint8_t gRTTECountdown;
|
||||
extern bool bIsInLockScreen;
|
||||
extern uint8_t gUpdateStatus;
|
||||
extern uint8_t gFoundCTCSS;
|
||||
extern uint8_t gFoundCDCSS;
|
||||
extern bool gEndOfRxDetectedMaybe;
|
||||
extern uint8_t gVFO_RSSI_Level[2];
|
||||
extern uint8_t gReducedService;
|
||||
extern uint8_t gBatteryVoltageIndex;
|
||||
extern CssScanMode_t gCssScanMode;
|
||||
extern bool gUpdateRSSI;
|
||||
extern AlarmState_t gAlarmState;
|
||||
extern uint8_t gVoltageMenuCountdown;
|
||||
extern bool gPttWasReleased;
|
||||
extern bool gPttWasPressed;
|
||||
extern bool gFlagReconfigureVfos;
|
||||
extern uint8_t gVfoConfigureMode;
|
||||
extern bool gFlagResetVfos;
|
||||
extern bool gRequestSaveVFO;
|
||||
extern uint8_t gRequestSaveChannel;
|
||||
extern bool gRequestSaveSettings;
|
||||
extern bool gRequestSaveFM;
|
||||
extern uint8_t gKeypadLocked;
|
||||
extern bool gFlagPrepareTX;
|
||||
extern bool gFlagAcceptSetting;
|
||||
extern bool gFlagRefreshSetting;
|
||||
extern bool gFlagSaveVfo;
|
||||
extern bool gFlagSaveSettings;
|
||||
extern bool gFlagSaveChannel;
|
||||
extern bool gFlagSaveFM;
|
||||
extern uint8_t gDTMF_RequestPending;
|
||||
extern bool g_CDCSS_Lost;
|
||||
extern uint8_t gCDCSSCodeType;
|
||||
extern bool g_CTCSS_Lost;
|
||||
extern bool g_CxCSS_TAIL_Found;
|
||||
extern bool g_VOX_Lost;
|
||||
extern bool g_SquelchLost;
|
||||
extern uint8_t gFlashLightState;
|
||||
extern bool gVOX_NoiseDetected;
|
||||
extern uint16_t gVoxResumeCountdown;
|
||||
extern uint16_t gVoxPauseCountdown;
|
||||
extern volatile uint16_t gFlashLightBlinkCounter;
|
||||
extern bool gFlagEndTransmission;
|
||||
extern uint16_t gLowBatteryCountdown;
|
||||
extern uint8_t gNextMrChannel;
|
||||
extern ReceptionMode_t gRxReceptionMode;
|
||||
extern uint8_t gRestoreMrChannel;
|
||||
extern uint8_t gCurrentScanList;
|
||||
extern uint8_t gPreviousMrChannel;
|
||||
extern uint32_t gRestoreFrequency;
|
||||
extern uint8_t gRxVfoIsActive;
|
||||
extern uint8_t gAlarmToneCounter;
|
||||
extern uint16_t gAlarmRunningCounter;
|
||||
extern bool gKeyBeingHeld;
|
||||
extern bool gPttIsPressed;
|
||||
extern uint8_t gPttDebounceCounter;
|
||||
extern uint8_t gMenuListCount;
|
||||
extern uint8_t gBackupCROSS_BAND_RX_TX;
|
||||
extern uint8_t gScanDelay;
|
||||
#ifndef DISABLE_AIRCOPY
|
||||
extern uint8_t gAircopySendCountdown;
|
||||
extern uint8_t gAircopySendCountdown;
|
||||
#endif
|
||||
extern uint8_t gFSKWriteIndex;
|
||||
extern uint8_t gNeverUsed;
|
||||
|
||||
extern uint8_t gFSKWriteIndex;
|
||||
extern uint8_t gNeverUsed;
|
||||
#ifndef DISABLE_NOAA
|
||||
extern bool gIsNoaaMode;
|
||||
extern uint8_t gNoaaChannel;
|
||||
extern bool gIsNoaaMode;
|
||||
extern uint8_t gNoaaChannel;
|
||||
#endif
|
||||
extern volatile bool gNextTimeslice;
|
||||
extern bool gUpdateDisplay;
|
||||
extern uint8_t gFM_ChannelPosition;
|
||||
extern bool gF_LOCK;
|
||||
extern uint8_t gShowChPrefix;
|
||||
extern volatile uint16_t gSystickCountdown2;
|
||||
extern volatile uint8_t gFoundCDCSSCountdown;
|
||||
extern volatile uint8_t gFoundCTCSSCountdown;
|
||||
extern volatile uint16_t gVoxStopCountdown;
|
||||
extern volatile bool gTxTimeoutReached;
|
||||
extern volatile bool gNextTimeslice40ms;
|
||||
extern volatile bool gSchedulePowerSave;
|
||||
extern volatile bool gBatterySaveCountdownExpired;
|
||||
extern volatile bool gScheduleDualWatch;
|
||||
extern volatile bool gNextTimeslice;
|
||||
extern bool gUpdateDisplay;
|
||||
extern uint8_t gFM_ChannelPosition;
|
||||
extern bool gF_LOCK;
|
||||
extern uint8_t gShowChPrefix;
|
||||
extern volatile uint16_t gSystickCountdown2;
|
||||
extern volatile uint8_t gFoundCDCSSCountdown;
|
||||
extern volatile uint8_t gFoundCTCSSCountdown;
|
||||
extern volatile uint16_t gVoxStopCountdown;
|
||||
extern volatile bool gTxTimeoutReached;
|
||||
extern volatile bool gNextTimeslice40ms;
|
||||
extern volatile bool gSchedulePowerSave;
|
||||
extern volatile bool gBatterySaveCountdownExpired;
|
||||
extern volatile bool gScheduleDualWatch;
|
||||
#ifndef DISABLE_NOAA
|
||||
extern volatile bool gScheduleNOAA;
|
||||
extern volatile bool gScheduleNOAA;
|
||||
#endif
|
||||
extern volatile bool gFlagTteComplete;
|
||||
extern volatile bool gScheduleFM;
|
||||
|
||||
extern uint16_t gCurrentRSSI;
|
||||
|
||||
extern uint8_t gIsLocked;
|
||||
|
||||
// --------
|
||||
extern volatile bool gFlagTteComplete;
|
||||
extern volatile bool gScheduleFM;
|
||||
extern uint16_t gCurrentRSSI;
|
||||
extern uint8_t gIsLocked;
|
||||
|
||||
void NUMBER_Get(char *pDigits, uint32_t *pInteger);
|
||||
void NUMBER_ToDigits(uint32_t Value, char *pDigits);
|
||||
|
@ -1,8 +1,9 @@
|
||||
|
||||
#ifdef GIT_HASH
|
||||
const char Version[] = "OEFW-" GIT_HASH;
|
||||
const char UART_Version[45] = "UV-K5 Firmware, Open Edition, OEFW-"GIT_HASH"\r\n";
|
||||
#define VER GIT_HASH
|
||||
#else
|
||||
const char Version[] = "OEFW-230913";
|
||||
const char UART_Version[45] = "UV-K5 Firmware, Open Edition, OEFW-230913\r\n";
|
||||
#define VER "230913"
|
||||
#endif
|
||||
|
||||
const char Version[] = "OEFW-"VER;
|
||||
const char UART_Version[] = "UV-K5 Firmware, Open Edition, OEFW-"VER"\r\n";
|
||||
|
Loading…
Reference in New Issue
Block a user