Debug refactoring
This commit is contained in:
4
Makefile
4
Makefile
@@ -55,6 +55,7 @@ ENABLE_FEAT_F4HWN_RESET_CHANNEL ?= 0
|
||||
ENABLE_FEAT_F4HWN_PMR ?= 0
|
||||
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS ?= 0
|
||||
ENABLE_FEAT_F4HWN_CA ?= 1
|
||||
ENABLE_FEAT_F4HWN_DEBUG ?= 0
|
||||
ENABLE_REGA ?= 0
|
||||
|
||||
# ---- DEBUGGING ----
|
||||
@@ -470,6 +471,9 @@ endif
|
||||
ifeq ($(ENABLE_FEAT_F4HWN_CA),1)
|
||||
CFLAGS += -DENABLE_FEAT_F4HWN_CA
|
||||
endif
|
||||
ifeq ($(ENABLE_FEAT_F4HWN_DEBUG),1)
|
||||
CFLAGS += -DENABLE_FEAT_F4HWN_DEBUG
|
||||
endif
|
||||
|
||||
LDFLAGS =
|
||||
LDFLAGS += -z noexecstack -mcpu=cortex-m0 -nostartfiles -Wl,-T,firmware.ld -Wl,--gc-sections
|
||||
|
@@ -35,7 +35,7 @@ bandscope() {
|
||||
docker run --rm -v "${PWD}/compiled-firmware/:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "rm ./compiled-firmware/*; cd /app && make -s \
|
||||
ENABLE_SPECTRUM=1 \
|
||||
ENABLE_FMRADIO=0 \
|
||||
ENABLE_AIRCOPY=1 \
|
||||
ENABLE_AIRCOPY=0 \
|
||||
ENABLE_FEAT_F4HWN_PMR=0 \
|
||||
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=0 \
|
||||
ENABLE_NOAA=0 \
|
||||
|
2
misc.c
2
misc.c
@@ -130,7 +130,9 @@ enum BacklightOnRxTx_t gSetting_backlight_on_tx_rx;
|
||||
#endif
|
||||
bool gSetting_set_tmr = 0;
|
||||
bool gSetting_set_ptt_session;
|
||||
#ifdef ENABLE_FEAT_F4HWN_DEBUG
|
||||
uint8_t gDebug;
|
||||
#endif
|
||||
uint8_t gDW = 0;
|
||||
uint8_t gCB = 0;
|
||||
bool gSaveRxMode = false;
|
||||
|
2
misc.h
2
misc.h
@@ -183,7 +183,9 @@ extern enum BacklightOnRxTx_t gSetting_backlight_on_tx_rx;
|
||||
#endif
|
||||
extern bool gSetting_set_tmr;
|
||||
extern bool gSetting_set_ptt_session;
|
||||
#ifdef ENABLE_FEAT_F4HWN_DEBUG
|
||||
extern uint8_t gDebug;
|
||||
#endif
|
||||
extern uint8_t gDW;
|
||||
extern uint8_t gCB;
|
||||
extern bool gSaveRxMode;
|
||||
|
13
ui/status.c
13
ui/status.c
@@ -35,6 +35,7 @@
|
||||
#include "ui/status.h"
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||
#ifndef ENABLE_FEAT_F4HWN_DEBUG
|
||||
static void convertTime(uint8_t *line, uint8_t type)
|
||||
{
|
||||
uint16_t t = (type == 0) ? (gTxTimerCountdown_500ms / 2) : (3600 - gRxTimerCountdown_500ms / 2);
|
||||
@@ -51,6 +52,7 @@ static void convertTime(uint8_t *line, uint8_t type)
|
||||
gUpdateStatus = true;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void UI_DisplayStatus()
|
||||
{
|
||||
@@ -122,20 +124,15 @@ void UI_DisplayStatus()
|
||||
}
|
||||
x += 10; // font character width
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_DEBUG
|
||||
// Only for debug
|
||||
// Only for debug
|
||||
// Only for debug
|
||||
|
||||
bool debug = false;
|
||||
if(debug)
|
||||
{
|
||||
sprintf(str, "%d", gDebug);
|
||||
UI_PrintStringSmallBufferNormal(str, line + x + 1);
|
||||
x += 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#else
|
||||
#ifdef ENABLE_VOICE
|
||||
// VOICE indicator
|
||||
if (gEeprom.VOICE_PROMPT != VOICE_PROMPT_OFF){
|
||||
@@ -185,7 +182,7 @@ void UI_DisplayStatus()
|
||||
}
|
||||
}
|
||||
x += sizeof(gFontDWR) + 3;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_VOX
|
||||
// VOX indicator
|
||||
|
Reference in New Issue
Block a user