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_PMR ?= 0
|
||||||
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS ?= 0
|
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS ?= 0
|
||||||
ENABLE_FEAT_F4HWN_CA ?= 1
|
ENABLE_FEAT_F4HWN_CA ?= 1
|
||||||
|
ENABLE_FEAT_F4HWN_DEBUG ?= 0
|
||||||
ENABLE_REGA ?= 0
|
ENABLE_REGA ?= 0
|
||||||
|
|
||||||
# ---- DEBUGGING ----
|
# ---- DEBUGGING ----
|
||||||
@@ -470,6 +471,9 @@ endif
|
|||||||
ifeq ($(ENABLE_FEAT_F4HWN_CA),1)
|
ifeq ($(ENABLE_FEAT_F4HWN_CA),1)
|
||||||
CFLAGS += -DENABLE_FEAT_F4HWN_CA
|
CFLAGS += -DENABLE_FEAT_F4HWN_CA
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ENABLE_FEAT_F4HWN_DEBUG),1)
|
||||||
|
CFLAGS += -DENABLE_FEAT_F4HWN_DEBUG
|
||||||
|
endif
|
||||||
|
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
LDFLAGS += -z noexecstack -mcpu=cortex-m0 -nostartfiles -Wl,-T,firmware.ld -Wl,--gc-sections
|
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 \
|
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_SPECTRUM=1 \
|
||||||
ENABLE_FMRADIO=0 \
|
ENABLE_FMRADIO=0 \
|
||||||
ENABLE_AIRCOPY=1 \
|
ENABLE_AIRCOPY=0 \
|
||||||
ENABLE_FEAT_F4HWN_PMR=0 \
|
ENABLE_FEAT_F4HWN_PMR=0 \
|
||||||
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=0 \
|
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=0 \
|
||||||
ENABLE_NOAA=0 \
|
ENABLE_NOAA=0 \
|
||||||
|
4
misc.c
4
misc.c
@@ -130,7 +130,9 @@ enum BacklightOnRxTx_t gSetting_backlight_on_tx_rx;
|
|||||||
#endif
|
#endif
|
||||||
bool gSetting_set_tmr = 0;
|
bool gSetting_set_tmr = 0;
|
||||||
bool gSetting_set_ptt_session;
|
bool gSetting_set_ptt_session;
|
||||||
uint8_t gDebug;
|
#ifdef ENABLE_FEAT_F4HWN_DEBUG
|
||||||
|
uint8_t gDebug;
|
||||||
|
#endif
|
||||||
uint8_t gDW = 0;
|
uint8_t gDW = 0;
|
||||||
uint8_t gCB = 0;
|
uint8_t gCB = 0;
|
||||||
bool gSaveRxMode = false;
|
bool gSaveRxMode = false;
|
||||||
|
4
misc.h
4
misc.h
@@ -183,7 +183,9 @@ extern enum BacklightOnRxTx_t gSetting_backlight_on_tx_rx;
|
|||||||
#endif
|
#endif
|
||||||
extern bool gSetting_set_tmr;
|
extern bool gSetting_set_tmr;
|
||||||
extern bool gSetting_set_ptt_session;
|
extern bool gSetting_set_ptt_session;
|
||||||
extern uint8_t gDebug;
|
#ifdef ENABLE_FEAT_F4HWN_DEBUG
|
||||||
|
extern uint8_t gDebug;
|
||||||
|
#endif
|
||||||
extern uint8_t gDW;
|
extern uint8_t gDW;
|
||||||
extern uint8_t gCB;
|
extern uint8_t gCB;
|
||||||
extern bool gSaveRxMode;
|
extern bool gSaveRxMode;
|
||||||
|
25
ui/status.c
25
ui/status.c
@@ -35,6 +35,7 @@
|
|||||||
#include "ui/status.h"
|
#include "ui/status.h"
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||||
|
#ifndef ENABLE_FEAT_F4HWN_DEBUG
|
||||||
static void convertTime(uint8_t *line, uint8_t type)
|
static void convertTime(uint8_t *line, uint8_t type)
|
||||||
{
|
{
|
||||||
uint16_t t = (type == 0) ? (gTxTimerCountdown_500ms / 2) : (3600 - gRxTimerCountdown_500ms / 2);
|
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;
|
gUpdateStatus = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
void UI_DisplayStatus()
|
void UI_DisplayStatus()
|
||||||
{
|
{
|
||||||
@@ -122,28 +124,23 @@ void UI_DisplayStatus()
|
|||||||
}
|
}
|
||||||
x += 10; // font character width
|
x += 10; // font character width
|
||||||
|
|
||||||
// Only for debug
|
#ifdef ENABLE_FEAT_F4HWN_DEBUG
|
||||||
// Only for debug
|
// Only for debug
|
||||||
// Only for debug
|
// Only for debug
|
||||||
|
// Only for debug
|
||||||
bool debug = false;
|
|
||||||
if(debug)
|
|
||||||
{
|
|
||||||
sprintf(str, "%d", gDebug);
|
sprintf(str, "%d", gDebug);
|
||||||
UI_PrintStringSmallBufferNormal(str, line + x + 1);
|
UI_PrintStringSmallBufferNormal(str, line + x + 1);
|
||||||
x += 16;
|
x += 16;
|
||||||
}
|
#else
|
||||||
else
|
#ifdef ENABLE_VOICE
|
||||||
{
|
|
||||||
|
|
||||||
#ifdef ENABLE_VOICE
|
|
||||||
// VOICE indicator
|
// VOICE indicator
|
||||||
if (gEeprom.VOICE_PROMPT != VOICE_PROMPT_OFF){
|
if (gEeprom.VOICE_PROMPT != VOICE_PROMPT_OFF){
|
||||||
memcpy(line + x, BITMAP_VoicePrompt, sizeof(BITMAP_VoicePrompt));
|
memcpy(line + x, BITMAP_VoicePrompt, sizeof(BITMAP_VoicePrompt));
|
||||||
x1 = x + sizeof(BITMAP_VoicePrompt);
|
x1 = x + sizeof(BITMAP_VoicePrompt);
|
||||||
}
|
}
|
||||||
x += sizeof(BITMAP_VoicePrompt);
|
x += sizeof(BITMAP_VoicePrompt);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(!SCANNER_IsScanning()) {
|
if(!SCANNER_IsScanning()) {
|
||||||
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||||
@@ -185,7 +182,7 @@ void UI_DisplayStatus()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
x += sizeof(gFontDWR) + 3;
|
x += sizeof(gFontDWR) + 3;
|
||||||
}
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_VOX
|
#ifdef ENABLE_VOX
|
||||||
// VOX indicator
|
// VOX indicator
|
||||||
|
Reference in New Issue
Block a user