Do some stuff
All checks were successful
Build Firmware / build (push) Successful in 2m19s

This commit is contained in:
2025-03-28 22:07:50 +01:00
parent 4fe99744e1
commit 85fb527020
23 changed files with 258 additions and 658 deletions

View File

@@ -45,6 +45,7 @@
#ifdef ENABLE_FEAT_F4HWN
#include "driver/system.h"
#include "app/scanner.h"
#endif
@@ -418,44 +419,6 @@ void UI_MAIN_TimeSlice500ms(void) {
if (FUNCTION_IsRx()) {
DisplayRSSIBar(true);
}
#ifdef ENABLE_FEAT_F4HWN // Blink Green Led for white...
else if (gSetting_set_eot > 0 && RxBlinkLed == 2) {
if (RxBlinkLedCounter <= 8) {
if (RxBlinkLedCounter % 2 == 0) {
if (gSetting_set_eot > 1) {
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, false);
}
} else {
if (gSetting_set_eot > 1) {
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, true);
}
if (gSetting_set_eot == 1 || gSetting_set_eot == 3) {
switch (RxBlinkLedCounter) {
case 1:
AUDIO_PlayBeep(BEEP_400HZ_30MS);
break;
case 3:
AUDIO_PlayBeep(BEEP_400HZ_30MS);
break;
case 5:
AUDIO_PlayBeep(BEEP_500HZ_30MS);
break;
case 7:
AUDIO_PlayBeep(BEEP_600HZ_30MS);
break;
}
}
}
RxBlinkLedCounter += 1;
} else {
RxBlinkLed = 0;
}
}
#endif
}
}
@@ -1010,7 +973,6 @@ void UI_DisplayMain(void) {
#if ENABLE_FEAT_F4HWN
const FREQ_Config_t *pConfig = (mode == VFO_MODE_TX) ? vfoInfo->pTX : vfoInfo->pRX;
int8_t shift = 0;
switch ((int) pConfig->CodeType) {
case 1:
sprintf(String, "%u.%u", CTCSS_Options[pConfig->Code] / 10, CTCSS_Options[pConfig->Code] % 10);
@@ -1029,6 +991,8 @@ void UI_DisplayMain(void) {
shift = -10;
}
UI_PrintStringSmallNormal(s, 50, 0, line + 2);
UI_PrintStringSmallNormal(t, 2, 0, line + 2);
@@ -1047,25 +1011,20 @@ void UI_DisplayMain(void) {
#endif
if (state == VFO_STATE_NORMAL || state == VFO_STATE_ALARM) { // show the TX power
uint8_t currentPower = vfoInfo->OUTPUT_POWER % 8;
const char pwr_short[][3] = {"L1", "L2", "L3", "L4", "L5", "ME",
"HI"};
UI_PrintStringSmallNormal(pwr_short[currentPower], LCD_WIDTH + 25, 0, line + 1);
"HI", "UN"};
UI_PrintStringSmallNormal(pwr_short[vfoInfo->OUTPUT_POWER], LCD_WIDTH + 25, 0, line + 1);
}
if (vfoInfo->freq_config_RX.Frequency != vfoInfo->freq_config_TX.Frequency) { // show the TX offset symbol
int i = vfoInfo->TX_OFFSET_FREQUENCY_DIRECTION % 3;
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
const char dir_list[][2] = {"", "+", "-", "D"};
if(gTxVfo->TX_OFFSET_FREQUENCY_DIRECTION != 0 && gTxVfo->pTX == &gTxVfo->freq_config_RX && !vfoInfo->FrequencyReverse)
{
i = 3;
}
#else
const char dir_list[][2] = {"", "+", "-"};
#endif
#if ENABLE_FEAT_F4HWN
UI_PrintStringSmallNormal(dir_list[i], LCD_WIDTH + 60, 0, line + 1);
@@ -1078,34 +1037,18 @@ void UI_DisplayMain(void) {
if (vfoInfo->FrequencyReverse)
#if ENABLE_FEAT_F4HWN
{
UI_PrintStringSmallNormal("R", LCD_WIDTH + 68, 0, line + 1);
UI_PrintStringSmallNormal("R", LCD_WIDTH + 110, 0, line + 1);
}
#else
UI_PrintStringSmallNormal("R", LCD_WIDTH + 62, 0, line + 1);
UI_PrintStringSmallNormal("R", LCD_WIDTH + 110, 0, line + 1);
#endif
#if ENABLE_FEAT_F4HWN
#ifdef ENABLE_FEAT_F4HWN_NARROWER
bool narrower = 0;
if (vfoInfo->CHANNEL_BANDWIDTH == BANDWIDTH_NARROW && gSetting_set_nfm == 1) {
narrower = 1;
}
const char *bandWidthNames[] = {"WID", "NAR", "NR+"};
UI_PrintStringSmallNormal(bandWidthNames[vfoInfo->CHANNEL_BANDWIDTH + narrower], LCD_WIDTH + 30, 0,
UI_PrintStringSmallNormal(bandWidthNames[vfoInfo->CHANNEL_BANDWIDTH], LCD_WIDTH + 30, 0,
line);
#else
if (gSetting_set_gui)
{
const char *bandWidthNames[] = {"W", "N"};
UI_PrintStringSmallNormal(bandWidthNames[vfoInfo->CHANNEL_BANDWIDTH], LCD_WIDTH + 80, 0, line + 1);
}
else
{
const char *bandWidthNames[] = {"WIDE", "NAR"};
GUI_DisplaySmallest(bandWidthNames[vfoInfo->CHANNEL_BANDWIDTH], 91, line == 0 ? 17 : 49, false, true);
}
#endif
#else
if (vfoInfo->CHANNEL_BANDWIDTH == BANDWIDTH_NARROW)
UI_PrintStringSmallNormal("N", LCD_WIDTH + 70, 0, line + 1);
@@ -1119,8 +1062,8 @@ void UI_DisplayMain(void) {
// show the audio scramble symbol
if (vfoInfo->SCRAMBLING_TYPE > 0) {
sprintf(String, "S%d", vfoInfo->SCRAMBLING_TYPE + 25);
UI_PrintStringSmallNormal(String, 105, 0, line + 2);
sprintf(String, "S%d", inverse_scale_freq(vfoInfo->SCRAMBLING_TYPE));
UI_PrintStringSmallNormal(String, 90, 0, line + 2);
}
#ifdef ENABLE_FEAT_F4HWN