Add debug helper in status
This commit is contained in:
1
misc.c
1
misc.c
@@ -115,6 +115,7 @@ enum BacklightOnRxTx_t gSetting_backlight_on_tx_rx;
|
||||
bool gSetting_set_met = 0;
|
||||
bool gSetting_set_gui = 0;
|
||||
bool gSetting_set_ptt_session;
|
||||
uint8_t gDebug;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_AUDIO_BAR
|
||||
|
2
misc.h
2
misc.h
@@ -349,6 +349,8 @@ extern volatile uint8_t boot_counter_10ms;
|
||||
extern uint8_t gBacklightBrightnessOld;
|
||||
extern uint8_t gPttOnePushCounter;
|
||||
extern uint32_t gBlinkCounter;
|
||||
extern uint8_t gDebug;
|
||||
|
||||
#endif
|
||||
|
||||
int32_t NUMBER_AddWithWraparound(int32_t Base, int32_t Add, int32_t LowerLimit, int32_t UpperLimit);
|
||||
|
24
radio.c
24
radio.c
@@ -474,24 +474,38 @@ void RADIO_ConfigureSquelchAndOutputPower(VFO_Info_t *pInfo)
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
// make low and mid even lower
|
||||
|
||||
uint8_t shift[] = {0, 0, 0, 0, 0};
|
||||
|
||||
/*
|
||||
if(Band == 5)
|
||||
{
|
||||
shift[0] = 3;
|
||||
shift[1] = 3;
|
||||
shift[2] = 4;
|
||||
shift[3] = 7;
|
||||
shift[4] = 8;
|
||||
}
|
||||
*/
|
||||
|
||||
if (pInfo->OUTPUT_POWER == OUTPUT_POWER_LOW) {
|
||||
for(uint8_t p = 0; p < 3; p++ )
|
||||
{
|
||||
switch (gSetting_set_low) {
|
||||
case 0:
|
||||
Txp[p] = (Txp[p] * 4) / 25;
|
||||
Txp[p] = (Txp[p] * 4) / 25 - shift[gSetting_set_low];
|
||||
break;
|
||||
case 1:
|
||||
Txp[p] = (Txp[p] * 4) / 19;
|
||||
Txp[p] = (Txp[p] * 4) / 19 + shift[gSetting_set_low];
|
||||
break;
|
||||
case 2:
|
||||
Txp[p] = (Txp[p] * 4) / 13;
|
||||
Txp[p] = (Txp[p] * 4) / 13 + shift[gSetting_set_low];
|
||||
break;
|
||||
case 3:
|
||||
Txp[p] = (Txp[p] * 4) / 10;
|
||||
Txp[p] = (Txp[p] * 4) / 10 + shift[gSetting_set_low];
|
||||
break;
|
||||
case 4:
|
||||
Txp[p] = (Txp[p] * 4) / 7;
|
||||
Txp[p] = (Txp[p] * 4) / 7 + shift[gSetting_set_low];
|
||||
break;
|
||||
}
|
||||
|
||||
|
20
ui/status.c
20
ui/status.c
@@ -101,14 +101,29 @@ void UI_DisplayStatus()
|
||||
}
|
||||
x += 10; // font character width
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
// Only for debug
|
||||
// Only for debug
|
||||
// Only for debug
|
||||
|
||||
bool debug = false;
|
||||
if(debug)
|
||||
{
|
||||
char sDebug[8] = "";
|
||||
sprintf(sDebug, "%d", gDebug);
|
||||
UI_PrintStringSmallBufferNormal(sDebug, line + x + 1);
|
||||
x += 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
// VOICE indicator
|
||||
if (gEeprom.VOICE_PROMPT != VOICE_PROMPT_OFF){
|
||||
memcpy(line + x, BITMAP_VoicePrompt, sizeof(BITMAP_VoicePrompt));
|
||||
x1 = x + sizeof(BITMAP_VoicePrompt);
|
||||
}
|
||||
x += sizeof(BITMAP_VoicePrompt);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if(!SCANNER_IsScanning()) {
|
||||
uint8_t dw = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2;
|
||||
@@ -127,6 +142,7 @@ void UI_DisplayStatus()
|
||||
}
|
||||
}
|
||||
x += sizeof(gFontDWR) + 3;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_VOX
|
||||
// VOX indicator
|
||||
|
Reference in New Issue
Block a user