Add ENABLE_FEAT_F4HWN_RX_TX_TIMER
This commit is contained in:
4
Makefile
4
Makefile
@@ -43,6 +43,7 @@ ENABLE_SCAN_RANGES ?= 1
|
|||||||
ENABLE_FEAT_F4HWN ?= 1
|
ENABLE_FEAT_F4HWN ?= 1
|
||||||
ENABLE_FEAT_F4HWN_SCREENSHOT ?= 0
|
ENABLE_FEAT_F4HWN_SCREENSHOT ?= 0
|
||||||
ENABLE_FEAT_F4HWN_SPECTRUM ?= 1
|
ENABLE_FEAT_F4HWN_SPECTRUM ?= 1
|
||||||
|
ENABLE_FEAT_F4HWN_RX_TX_TIMER ?= 1
|
||||||
ENABLE_FEAT_F4HWN_CHARGING_C ?= 1
|
ENABLE_FEAT_F4HWN_CHARGING_C ?= 1
|
||||||
ENABLE_FEAT_F4HWN_PMR ?= 0
|
ENABLE_FEAT_F4HWN_PMR ?= 0
|
||||||
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS ?= 0
|
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS ?= 0
|
||||||
@@ -411,6 +412,9 @@ endif
|
|||||||
ifeq ($(ENABLE_FEAT_F4HWN_SPECTRUM),1)
|
ifeq ($(ENABLE_FEAT_F4HWN_SPECTRUM),1)
|
||||||
CFLAGS += -DENABLE_FEAT_F4HWN_SPECTRUM
|
CFLAGS += -DENABLE_FEAT_F4HWN_SPECTRUM
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ENABLE_FEAT_F4HWN_RX_TX_TIMER),1)
|
||||||
|
CFLAGS += -DENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||||
|
endif
|
||||||
ifeq ($(ENABLE_FEAT_F4HWN_CHARGING_C),1)
|
ifeq ($(ENABLE_FEAT_F4HWN_CHARGING_C),1)
|
||||||
CFLAGS += -DENABLE_FEAT_F4HWN_CHARGING_C
|
CFLAGS += -DENABLE_FEAT_F4HWN_CHARGING_C
|
||||||
endif
|
endif
|
||||||
|
@@ -439,7 +439,7 @@ void APP_StartListening(FUNCTION_Type_t function)
|
|||||||
{
|
{
|
||||||
const unsigned int vfo = gEeprom.RX_VFO;
|
const unsigned int vfo = gEeprom.RX_VFO;
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||||
gRxTimerCountdown_500ms = 7200;
|
gRxTimerCountdown_500ms = 7200;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -714,7 +714,7 @@ static void CheckRadioInterrupts(void)
|
|||||||
if (interrupts.sqlLost) {
|
if (interrupts.sqlLost) {
|
||||||
g_SquelchLost = true;
|
g_SquelchLost = true;
|
||||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, true);
|
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, true);
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||||
gRxTimerCountdown_500ms = 7200;
|
gRxTimerCountdown_500ms = 7200;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
2
misc.c
2
misc.c
@@ -163,7 +163,9 @@ volatile bool gTxTimeoutReached;
|
|||||||
volatile uint16_t gTxTimerCountdownAlert_500ms;
|
volatile uint16_t gTxTimerCountdownAlert_500ms;
|
||||||
volatile bool gTxTimeoutReachedAlert;
|
volatile bool gTxTimeoutReachedAlert;
|
||||||
volatile uint16_t gTxTimeoutToneAlert = 800;
|
volatile uint16_t gTxTimeoutToneAlert = 800;
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||||
volatile uint16_t gRxTimerCountdown_500ms;
|
volatile uint16_t gRxTimerCountdown_500ms;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
volatile uint16_t gTailNoteEliminationCountdown_10ms;
|
volatile uint16_t gTailNoteEliminationCountdown_10ms;
|
||||||
|
2
misc.h
2
misc.h
@@ -228,7 +228,9 @@ extern volatile bool gTxTimeoutReached;
|
|||||||
extern volatile uint16_t gTxTimerCountdownAlert_500ms;
|
extern volatile uint16_t gTxTimerCountdownAlert_500ms;
|
||||||
extern volatile bool gTxTimeoutReachedAlert;
|
extern volatile bool gTxTimeoutReachedAlert;
|
||||||
extern volatile uint16_t gTxTimeoutToneAlert;
|
extern volatile uint16_t gTxTimeoutToneAlert;
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||||
extern volatile uint16_t gRxTimerCountdown_500ms;
|
extern volatile uint16_t gRxTimerCountdown_500ms;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern volatile uint16_t gTailNoteEliminationCountdown_10ms;
|
extern volatile uint16_t gTailNoteEliminationCountdown_10ms;
|
||||||
|
@@ -58,7 +58,9 @@ void SystickHandler(void)
|
|||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
DECREMENT_AND_TRIGGER(gTxTimerCountdownAlert_500ms - ALERT_TOT * 2, gTxTimeoutReachedAlert);
|
DECREMENT_AND_TRIGGER(gTxTimerCountdownAlert_500ms - ALERT_TOT * 2, gTxTimeoutReachedAlert);
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||||
DECREMENT(gRxTimerCountdown_500ms);
|
DECREMENT(gRxTimerCountdown_500ms);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DECREMENT_AND_TRIGGER(gTxTimerCountdown_500ms, gTxTimeoutReached);
|
DECREMENT_AND_TRIGGER(gTxTimerCountdown_500ms, gTxTimeoutReached);
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
#include "ui/ui.h"
|
#include "ui/ui.h"
|
||||||
#include "ui/status.h"
|
#include "ui/status.h"
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||||
static void convertTime(uint8_t *line, uint8_t type)
|
static void convertTime(uint8_t *line, uint8_t type)
|
||||||
{
|
{
|
||||||
char str[8] = "";
|
char str[8] = "";
|
||||||
@@ -59,6 +60,7 @@ static void convertTime(uint8_t *line, uint8_t type)
|
|||||||
|
|
||||||
gUpdateStatus = true;
|
gUpdateStatus = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void UI_DisplayStatus()
|
void UI_DisplayStatus()
|
||||||
{
|
{
|
||||||
@@ -150,6 +152,7 @@ void UI_DisplayStatus()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(!SCANNER_IsScanning()) {
|
if(!SCANNER_IsScanning()) {
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||||
if(gCurrentFunction == FUNCTION_TRANSMIT)
|
if(gCurrentFunction == FUNCTION_TRANSMIT)
|
||||||
{
|
{
|
||||||
convertTime(line, 0);
|
convertTime(line, 0);
|
||||||
@@ -159,6 +162,7 @@ void UI_DisplayStatus()
|
|||||||
convertTime(line, 1);
|
convertTime(line, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
uint8_t dw = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2;
|
uint8_t dw = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2;
|
||||||
if(dw == 1 || dw == 3) { // DWR - dual watch + respond
|
if(dw == 1 || dw == 3) { // DWR - dual watch + respond
|
||||||
|
Reference in New Issue
Block a user