11
Makefile
11
Makefile
@@ -38,7 +38,7 @@ ENABLE_COPY_CHAN_TO_VFO ?= 1
|
|||||||
ENABLE_SPECTRUM ?= 1
|
ENABLE_SPECTRUM ?= 1
|
||||||
ENABLE_REDUCE_LOW_MID_TX_POWER?= 0
|
ENABLE_REDUCE_LOW_MID_TX_POWER?= 0
|
||||||
ENABLE_BYP_RAW_DEMODULATORS ?= 0
|
ENABLE_BYP_RAW_DEMODULATORS ?= 0
|
||||||
ENABLE_BLMIN_TMP_OFF ?= 1
|
ENABLE_BLMIN_TMP_OFF ?= 0
|
||||||
ENABLE_SCAN_RANGES ?= 1
|
ENABLE_SCAN_RANGES ?= 1
|
||||||
ENABLE_FEAT_F4HWN ?= 1
|
ENABLE_FEAT_F4HWN ?= 1
|
||||||
|
|
||||||
@@ -55,7 +55,11 @@ ENABLE_LTO ?= 1
|
|||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_FEAT_F4HWN),1)
|
||||||
|
TARGET = f4hwn
|
||||||
|
else
|
||||||
TARGET = firmware
|
TARGET = firmware
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ENABLE_CLANG),1)
|
ifeq ($(ENABLE_CLANG),1)
|
||||||
# GCC's linker, ld, doesn't understand LLVM's generated bytecode
|
# GCC's linker, ld, doesn't understand LLVM's generated bytecode
|
||||||
@@ -206,7 +210,7 @@ ifeq ($(ENABLE_FEAT_F4HWN),1)
|
|||||||
VERSION_STRING_1 ?= v0.22
|
VERSION_STRING_1 ?= v0.22
|
||||||
|
|
||||||
AUTHOR_STRING_2 ?= F4HWN
|
AUTHOR_STRING_2 ?= F4HWN
|
||||||
VERSION_STRING_2 ?= v2.2
|
VERSION_STRING_2 ?= v2.3
|
||||||
|
|
||||||
AUTHOR_STRING ?= $(AUTHOR_STRING_1)+$(AUTHOR_STRING_2)
|
AUTHOR_STRING ?= $(AUTHOR_STRING_1)+$(AUTHOR_STRING_2)
|
||||||
VERSION_STRING ?= $(VERSION_STRING_2)
|
VERSION_STRING ?= $(VERSION_STRING_2)
|
||||||
@@ -235,7 +239,8 @@ endif
|
|||||||
|
|
||||||
CFLAGS =
|
CFLAGS =
|
||||||
ifeq ($(ENABLE_CLANG),0)
|
ifeq ($(ENABLE_CLANG),0)
|
||||||
CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c2x -MMD
|
CFLAGS += -Oz -Wall -Werror -mcpu=cortex-m0 -fshort-enums -fno-delete-null-pointer-checks -std=c2x -MMD
|
||||||
|
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c2x -MMD
|
||||||
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c11 -MMD
|
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c11 -MMD
|
||||||
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c99 -MMD
|
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c99 -MMD
|
||||||
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=gnu99 -MMD
|
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=gnu99 -MMD
|
||||||
|
@@ -47,6 +47,7 @@ Special thanks to Jean-Cyrille F6IWW, Fabrice 14RC123, David F4BPP, Olivier, Fr
|
|||||||
* Step value,
|
* Step value,
|
||||||
* CTCSS or DCS value,
|
* CTCSS or DCS value,
|
||||||
* KeyLock message,
|
* KeyLock message,
|
||||||
|
* last RX,
|
||||||
* and more...
|
* and more...
|
||||||
* new menu entries:
|
* new menu entries:
|
||||||
* add SetLow menu to set low power (<20mW, 125mW, 250mW, 500mW and 1W),
|
* add SetLow menu to set low power (<20mW, 125mW, 250mW, 500mW and 1W),
|
||||||
@@ -71,6 +72,8 @@ Special thanks to Jean-Cyrille F6IWW, Fabrice 14RC123, David F4BPP, Olivier, Fr
|
|||||||
* new key combinations:
|
* new key combinations:
|
||||||
* add the F + UP or F + DOWN key combination to dynamically change the Squelch level,
|
* add the F + UP or F + DOWN key combination to dynamically change the Squelch level,
|
||||||
* add the F + F1 or F + F2 key combination to dynamically change the Step,
|
* add the F + F1 or F + F2 key combination to dynamically change the Step,
|
||||||
|
* add F+8 to quickly switch backlight between BLMin and BLMax on demand (this bypass BackLt strategy),
|
||||||
|
* add F+9 to return to BackLt strategy.
|
||||||
* many fix:
|
* many fix:
|
||||||
* squelch,
|
* squelch,
|
||||||
* s-meter,
|
* s-meter,
|
||||||
@@ -79,7 +82,6 @@ Special thanks to Jean-Cyrille F6IWW, Fabrice 14RC123, David F4BPP, Olivier, Fr
|
|||||||
* scan range limit,
|
* scan range limit,
|
||||||
* and more...
|
* and more...
|
||||||
* enabled ENABLE_CTCSS_TAIL_PHASE_SHIFT,
|
* enabled ENABLE_CTCSS_TAIL_PHASE_SHIFT,
|
||||||
* enabled ENABLE_BLMIN_TMP_OFF,
|
|
||||||
* disabled ENABLE_DTMF_CALLING,
|
* disabled ENABLE_DTMF_CALLING,
|
||||||
* disabled SCRAMBLER,
|
* disabled SCRAMBLER,
|
||||||
* unlock TX on all bands needs only to be repeat 3 times,
|
* unlock TX on all bands needs only to be repeat 3 times,
|
||||||
|
34
app/action.c
34
app/action.c
@@ -105,6 +105,7 @@ void (*action_opt_table[])(void) = {
|
|||||||
[ACTION_OPT_RXMODE] = &ACTION_RxMode,
|
[ACTION_OPT_RXMODE] = &ACTION_RxMode,
|
||||||
[ACTION_OPT_PTT] = &ACTION_Ptt,
|
[ACTION_OPT_PTT] = &ACTION_Ptt,
|
||||||
[ACTION_OPT_WN] = &ACTION_Wn,
|
[ACTION_OPT_WN] = &ACTION_Wn,
|
||||||
|
[ACTION_OPT_BACKLIGHT] = &ACTION_BackLight,
|
||||||
#else
|
#else
|
||||||
[ACTION_OPT_RXMODE] = &FUNCTION_NOP,
|
[ACTION_OPT_RXMODE] = &FUNCTION_NOP,
|
||||||
#endif
|
#endif
|
||||||
@@ -487,4 +488,37 @@ void ACTION_Wn(void)
|
|||||||
BK4819_SetFilterBandwidth(gTxVfo->CHANNEL_BANDWIDTH, false);
|
BK4819_SetFilterBandwidth(gTxVfo->CHANNEL_BANDWIDTH, false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ACTION_BackLight(void)
|
||||||
|
{
|
||||||
|
if(gBackLight)
|
||||||
|
{
|
||||||
|
gEeprom.BACKLIGHT_TIME = gBacklightTimeOriginal;
|
||||||
|
}
|
||||||
|
gBackLight = false;
|
||||||
|
BACKLIGHT_TurnOn();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ACTION_BackLightOnDemand(void)
|
||||||
|
{
|
||||||
|
if(gBackLight == false)
|
||||||
|
{
|
||||||
|
gBacklightTimeOriginal = gEeprom.BACKLIGHT_TIME;
|
||||||
|
gEeprom.BACKLIGHT_TIME = 7;
|
||||||
|
gBackLight = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(gBacklightBrightnessOld == gEeprom.BACKLIGHT_MAX)
|
||||||
|
{
|
||||||
|
gEeprom.BACKLIGHT_TIME = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gEeprom.BACKLIGHT_TIME = 7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BACKLIGHT_TurnOn();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
@@ -39,6 +39,8 @@ void ACTION_SwitchDemodul(void);
|
|||||||
void ACTION_RxMode(void);
|
void ACTION_RxMode(void);
|
||||||
void ACTION_Ptt(void);
|
void ACTION_Ptt(void);
|
||||||
void ACTION_Wn(void);
|
void ACTION_Wn(void);
|
||||||
|
void ACTION_BackLightOnDemand(void);
|
||||||
|
void ACTION_BackLight(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld);
|
void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld);
|
||||||
|
19
app/main.c
19
app/main.c
@@ -161,15 +161,19 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_2:
|
case KEY_2:
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
|
gVfoConfigureMode = VFO_CONFIGURE;
|
||||||
|
#endif
|
||||||
COMMON_SwitchVFOs();
|
COMMON_SwitchVFOs();
|
||||||
|
|
||||||
if (beep)
|
if (beep)
|
||||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_3:
|
case KEY_3:
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
|
gVfoConfigureMode = VFO_CONFIGURE;
|
||||||
|
#endif
|
||||||
COMMON_SwitchVFOMode();
|
COMMON_SwitchVFOMode();
|
||||||
|
|
||||||
if (beep)
|
if (beep)
|
||||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||||
|
|
||||||
@@ -456,6 +460,17 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
gWasFKeyPressed = false;
|
gWasFKeyPressed = false;
|
||||||
gUpdateStatus = true;
|
gUpdateStatus = true;
|
||||||
|
|
||||||
|
if(Key == 8)
|
||||||
|
{
|
||||||
|
ACTION_BackLightOnDemand();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if(Key == 9)
|
||||||
|
{
|
||||||
|
ACTION_BackLight();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
processFKeyFunction(Key, true);
|
processFKeyFunction(Key, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
app/menu.c
14
app/menu.c
@@ -559,6 +559,9 @@ void MENU_AcceptSetting(void)
|
|||||||
|
|
||||||
case MENU_ABR:
|
case MENU_ABR:
|
||||||
gEeprom.BACKLIGHT_TIME = gSubMenuSelection;
|
gEeprom.BACKLIGHT_TIME = gSubMenuSelection;
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
|
gBackLight = false;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_ABR_MIN:
|
case MENU_ABR_MIN:
|
||||||
@@ -1007,7 +1010,18 @@ void MENU_ShowCurrentSetting(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case MENU_ABR:
|
case MENU_ABR:
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
|
if(gBackLight)
|
||||||
|
{
|
||||||
|
gSubMenuSelection = gBacklightTimeOriginal;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
gSubMenuSelection = gEeprom.BACKLIGHT_TIME;
|
gSubMenuSelection = gEeprom.BACKLIGHT_TIME;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
gSubMenuSelection = gEeprom.BACKLIGHT_TIME;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_ABR_MIN:
|
case MENU_ABR_MIN:
|
||||||
|
17
bitmaps.c
17
bitmaps.c
@@ -44,9 +44,8 @@ const uint8_t gFontKeyLock[1][8] =
|
|||||||
{0x7c, 0x46, 0x45, 0x45, 0x45, 0x45, 0x46, 0x7c}
|
{0x7c, 0x46, 0x45, 0x45, 0x45, 0x45, 0x46, 0x7c}
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t gFontScanAll[10] =
|
const uint8_t gFontScanAll[9] =
|
||||||
{
|
{
|
||||||
0b00000000,
|
|
||||||
0b00111110,
|
0b00111110,
|
||||||
0b01000001,
|
0b01000001,
|
||||||
0b01000001,
|
0b01000001,
|
||||||
@@ -58,12 +57,18 @@ const uint8_t gFontScanAll[10] =
|
|||||||
0b00111110
|
0b00111110
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
const uint8_t gFontLight[9] =
|
||||||
const uint8_t gFontF[1][7] =
|
|
||||||
{
|
{
|
||||||
{0x7f, 0x7f, 0x41, 0x75, 0x75, 0x7f, 0x7f},
|
0b00001100,
|
||||||
|
0b00010010,
|
||||||
|
0b00100001,
|
||||||
|
0b01101101,
|
||||||
|
0b01111001,
|
||||||
|
0b01101101,
|
||||||
|
0b00100001,
|
||||||
|
0b00010010,
|
||||||
|
0b00001100,
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
|
|
||||||
const uint8_t gFontXB[2][6] =
|
const uint8_t gFontXB[2][6] =
|
||||||
{ // "XB"
|
{ // "XB"
|
||||||
|
@@ -11,10 +11,9 @@ extern const uint8_t gFontPttOnePush[2][6];
|
|||||||
extern const uint8_t gFontPttClassic[2][6];
|
extern const uint8_t gFontPttClassic[2][6];
|
||||||
extern const uint8_t gFontFM[2][6];
|
extern const uint8_t gFontFM[2][6];
|
||||||
extern const uint8_t gFontKeyLock[1][8];
|
extern const uint8_t gFontKeyLock[1][8];
|
||||||
extern const uint8_t gFontScanAll[10];
|
extern const uint8_t gFontScanAll[9];
|
||||||
/*
|
extern const uint8_t gFontLight[9];
|
||||||
extern const uint8_t gFontF[1][7];
|
|
||||||
*/
|
|
||||||
extern const uint8_t gFontXB[2][6];
|
extern const uint8_t gFontXB[2][6];
|
||||||
extern const uint8_t gFontMO[2][6];
|
extern const uint8_t gFontMO[2][6];
|
||||||
extern const uint8_t gFontDWR[3][6];
|
extern const uint8_t gFontDWR[3][6];
|
||||||
|
@@ -3,4 +3,4 @@
|
|||||||
IMAGE_NAME="uvk5"
|
IMAGE_NAME="uvk5"
|
||||||
|
|
||||||
docker build -t $IMAGE_NAME .
|
docker build -t $IMAGE_NAME .
|
||||||
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make && cp firmware* compiled-firmware/"
|
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make && cp f4hwn* compiled-firmware/"
|
@@ -24,6 +24,7 @@
|
|||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
#include "driver/system.h"
|
#include "driver/system.h"
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
|
#include "misc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// this is decremented once every 500ms
|
// this is decremented once every 500ms
|
||||||
@@ -57,32 +58,45 @@ void BACKLIGHT_InitHardware()
|
|||||||
0;
|
0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void BACKLIGHT_Sound(void)
|
||||||
|
{
|
||||||
|
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_ALL)
|
||||||
|
{
|
||||||
|
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
||||||
|
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
||||||
|
gK5startup = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void BACKLIGHT_TurnOn(void)
|
void BACKLIGHT_TurnOn(void)
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
|
gBacklightBrightnessOld = BACKLIGHT_GetBrightness();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (gEeprom.BACKLIGHT_TIME == 0) {
|
if (gEeprom.BACKLIGHT_TIME == 0) {
|
||||||
BACKLIGHT_TurnOff();
|
BACKLIGHT_TurnOff();
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
|
if(gK5startup == true)
|
||||||
|
{
|
||||||
|
BACKLIGHT_Sound();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
backlightOn = true;
|
backlightOn = true;
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
static bool k5Startup = true;
|
if(gK5startup == true) {
|
||||||
|
|
||||||
if(k5Startup == true) {
|
|
||||||
for(uint8_t i = 0; i <= gEeprom.BACKLIGHT_MAX; i++)
|
for(uint8_t i = 0; i <= gEeprom.BACKLIGHT_MAX; i++)
|
||||||
{
|
{
|
||||||
BACKLIGHT_SetBrightness(i);
|
BACKLIGHT_SetBrightness(i);
|
||||||
SYSTEM_DelayMs(50);
|
SYSTEM_DelayMs(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_ALL)
|
BACKLIGHT_Sound();
|
||||||
{
|
|
||||||
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
|
||||||
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
|
||||||
}
|
|
||||||
|
|
||||||
k5Startup = false;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
5
misc.c
5
misc.c
@@ -276,7 +276,10 @@ uint8_t gIsLocked = 0xFF;
|
|||||||
|
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
bool gPttOnePush = true;
|
bool gK5startup = true;
|
||||||
|
bool gBackLight = false;
|
||||||
|
uint8_t gBacklightTimeOriginal;
|
||||||
|
uint8_t gBacklightBrightnessOld;
|
||||||
uint8_t gPttOnePushCounter = 0;
|
uint8_t gPttOnePushCounter = 0;
|
||||||
uint32_t gBlinkCounter = 0;
|
uint32_t gBlinkCounter = 0;
|
||||||
#endif
|
#endif
|
||||||
|
4
misc.h
4
misc.h
@@ -343,6 +343,10 @@ extern uint8_t gIsLocked;
|
|||||||
extern volatile uint8_t boot_counter_10ms;
|
extern volatile uint8_t boot_counter_10ms;
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
|
extern bool gK5startup;
|
||||||
|
extern bool gBackLight;
|
||||||
|
extern uint8_t gBacklightTimeOriginal;
|
||||||
|
extern uint8_t gBacklightBrightnessOld;
|
||||||
extern uint8_t gPttOnePushCounter;
|
extern uint8_t gPttOnePushCounter;
|
||||||
extern uint32_t gBlinkCounter;
|
extern uint32_t gBlinkCounter;
|
||||||
#endif
|
#endif
|
||||||
|
13
settings.c
13
settings.c
@@ -528,7 +528,20 @@ void SETTINGS_SaveSettings(void)
|
|||||||
State[2] = gEeprom.CROSS_BAND_RX_TX;
|
State[2] = gEeprom.CROSS_BAND_RX_TX;
|
||||||
State[3] = gEeprom.BATTERY_SAVE;
|
State[3] = gEeprom.BATTERY_SAVE;
|
||||||
State[4] = gEeprom.DUAL_WATCH;
|
State[4] = gEeprom.DUAL_WATCH;
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
|
if(gBackLight)
|
||||||
|
{
|
||||||
|
State[5] = gBacklightTimeOriginal;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
State[5] = gEeprom.BACKLIGHT_TIME;
|
State[5] = gEeprom.BACKLIGHT_TIME;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
State[5] = gEeprom.BACKLIGHT_TIME;
|
||||||
|
#endif
|
||||||
|
|
||||||
State[6] = gEeprom.TAIL_TONE_ELIMINATION;
|
State[6] = gEeprom.TAIL_TONE_ELIMINATION;
|
||||||
State[7] = gEeprom.VFO_OPEN;
|
State[7] = gEeprom.VFO_OPEN;
|
||||||
EEPROM_WriteBuffer(0x0E78, State);
|
EEPROM_WriteBuffer(0x0E78, State);
|
||||||
|
@@ -99,6 +99,7 @@ enum ACTION_OPT_t {
|
|||||||
ACTION_OPT_RXMODE,
|
ACTION_OPT_RXMODE,
|
||||||
ACTION_OPT_PTT,
|
ACTION_OPT_PTT,
|
||||||
ACTION_OPT_WN,
|
ACTION_OPT_WN,
|
||||||
|
ACTION_OPT_BACKLIGHT,
|
||||||
#endif
|
#endif
|
||||||
ACTION_OPT_LEN
|
ACTION_OPT_LEN
|
||||||
};
|
};
|
||||||
|
@@ -199,6 +199,7 @@ static void sort(int16_t *a, int16_t *b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
|
/*
|
||||||
void UI_DrawLineDottedBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black)
|
void UI_DrawLineDottedBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black)
|
||||||
{
|
{
|
||||||
if(x2==x1) {
|
if(x2==x1) {
|
||||||
@@ -218,6 +219,7 @@ static void sort(int16_t *a, int16_t *b)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
void PutPixel(uint8_t x, uint8_t y, bool fill) {
|
void PutPixel(uint8_t x, uint8_t y, bool fill) {
|
||||||
UI_DrawPixelBuffer(gFrameBuffer, x, y, fill);
|
UI_DrawPixelBuffer(gFrameBuffer, x, y, fill);
|
||||||
|
@@ -33,7 +33,7 @@ void UI_DisplayPopup(const char *string);
|
|||||||
|
|
||||||
void UI_DrawPixelBuffer(uint8_t (*buffer)[128], uint8_t x, uint8_t y, bool black);
|
void UI_DrawPixelBuffer(uint8_t (*buffer)[128], uint8_t x, uint8_t y, bool black);
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
void UI_DrawLineDottedBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black);
|
//void UI_DrawLineDottedBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black);
|
||||||
void PutPixel(uint8_t x, uint8_t y, bool fill);
|
void PutPixel(uint8_t x, uint8_t y, bool fill);
|
||||||
void PutPixelStatus(uint8_t x, uint8_t y, bool fill);
|
void PutPixelStatus(uint8_t x, uint8_t y, bool fill);
|
||||||
void GUI_DisplaySmallest(const char *pString, uint8_t x, uint8_t y, bool statusbar, bool fill);
|
void GUI_DisplaySmallest(const char *pString, uint8_t x, uint8_t y, bool statusbar, bool fill);
|
||||||
|
61
ui/main.c
61
ui/main.c
@@ -45,10 +45,12 @@
|
|||||||
center_line_t center_line = CENTER_LINE_NONE;
|
center_line_t center_line = CENTER_LINE_NONE;
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
static bool RxBlink;
|
static int8_t RxBlink;
|
||||||
static int8_t RxBlinkLed = 0;
|
static int8_t RxBlinkLed = 0;
|
||||||
static int8_t RxBlinkLedCounter;
|
static int8_t RxBlinkLedCounter;
|
||||||
static int8_t RxLine;
|
static int8_t RxLine;
|
||||||
|
static uint32_t RxOnVfofrequency;
|
||||||
|
|
||||||
bool isMainOnlyInputDTMF = false;
|
bool isMainOnlyInputDTMF = false;
|
||||||
|
|
||||||
static bool isMainOnly(bool checkGui)
|
static bool isMainOnly(bool checkGui)
|
||||||
@@ -264,6 +266,7 @@ void DisplayRSSIBar(const bool now)
|
|||||||
const unsigned int bar_x = 2 + txt_width + 4; // X coord of bar graph
|
const unsigned int bar_x = 2 + txt_width + 4; // X coord of bar graph
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
|
/*
|
||||||
const char empty[] = {
|
const char empty[] = {
|
||||||
0b00000000,
|
0b00000000,
|
||||||
0b00000000,
|
0b00000000,
|
||||||
@@ -273,6 +276,7 @@ void DisplayRSSIBar(const bool now)
|
|||||||
0b00000000,
|
0b00000000,
|
||||||
0b00000000,
|
0b00000000,
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
unsigned int line;
|
unsigned int line;
|
||||||
if (isMainOnly(false))
|
if (isMainOnly(false))
|
||||||
@@ -284,28 +288,29 @@ void DisplayRSSIBar(const bool now)
|
|||||||
line = 3;
|
line = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
char rx[4];
|
//char rx[4];
|
||||||
//sprintf(String, "%d", RxBlink);
|
//sprintf(String, "%d", RxBlink);
|
||||||
//UI_PrintStringSmallBold(String, 80, 0, RxLine);
|
//UI_PrintStringSmallBold(String, 80, 0, RxLine);
|
||||||
|
|
||||||
if(RxLine >= 0 && center_line != CENTER_LINE_IN_USE)
|
if(RxLine >= 0 && center_line != CENTER_LINE_IN_USE)
|
||||||
{
|
{
|
||||||
if(RxBlink == true)
|
switch(RxBlink)
|
||||||
{
|
{
|
||||||
sprintf(rx, "%s", "RX");
|
case 0:
|
||||||
//UI_PrintStringSmallBold("RX", 14, 0, RxLine);
|
UI_PrintStringSmallBold("RX", 14, 0, RxLine);
|
||||||
RxBlink = false;
|
break;
|
||||||
}
|
case 1:
|
||||||
else
|
UI_PrintStringSmallBold("RX", 14, 0, RxLine);
|
||||||
|
RxBlink = 2;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
for (uint8_t i = 14; i < 30; i++)
|
||||||
{
|
{
|
||||||
sprintf(rx, "%s", " ");
|
gFrameBuffer[RxLine][i] = 0x00;
|
||||||
memcpy(gFrameBuffer[RxLine] + 14, &empty, ARRAY_SIZE(empty));
|
}
|
||||||
memcpy(gFrameBuffer[RxLine] + 21, &empty, ARRAY_SIZE(empty));
|
RxBlink = 1;
|
||||||
|
break;
|
||||||
//UI_PrintStringSmallBold(" ", 14, 0, RxLine);
|
|
||||||
RxBlink = true;
|
|
||||||
}
|
}
|
||||||
UI_PrintStringSmallBold(rx, 14, 0, RxLine);
|
|
||||||
ST7565_BlitLine(RxLine);
|
ST7565_BlitLine(RxLine);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -646,6 +651,9 @@ void UI_DisplayMain(void)
|
|||||||
if(gScanRangeStart) {
|
if(gScanRangeStart) {
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
|
//if(IS_FREQ_CHANNEL(gEeprom.ScreenChannel[0]) && IS_FREQ_CHANNEL(gEeprom.ScreenChannel[1])) {
|
||||||
|
if(IS_FREQ_CHANNEL(gEeprom.ScreenChannel[activeTxVFO])) {
|
||||||
|
|
||||||
uint8_t shift = 0;
|
uint8_t shift = 0;
|
||||||
|
|
||||||
if (isMainOnly(false))
|
if (isMainOnly(false))
|
||||||
@@ -661,6 +669,11 @@ void UI_DisplayMain(void)
|
|||||||
|
|
||||||
if (!isMainOnly(false))
|
if (!isMainOnly(false))
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gScanRangeStart = 0;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
UI_PrintString("ScnRng", 5, 0, line, 8);
|
UI_PrintString("ScnRng", 5, 0, line, 8);
|
||||||
sprintf(String, "%3u.%05u", gScanRangeStart / 100000, gScanRangeStart % 100000);
|
sprintf(String, "%3u.%05u", gScanRangeStart / 100000, gScanRangeStart % 100000);
|
||||||
@@ -745,6 +758,8 @@ void UI_DisplayMain(void)
|
|||||||
memcpy(p_line0 + 0, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault));
|
memcpy(p_line0 + 0, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t frequency = gEeprom.VfoInfo[vfo_num].pRX->Frequency;
|
||||||
|
|
||||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||||
{ // transmitting
|
{ // transmitting
|
||||||
|
|
||||||
@@ -768,14 +783,15 @@ void UI_DisplayMain(void)
|
|||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
RxBlinkLed = 1;
|
RxBlinkLed = 1;
|
||||||
RxBlinkLedCounter = 0;
|
RxBlinkLedCounter = 0;
|
||||||
|
RxLine = line;
|
||||||
|
RxOnVfofrequency = frequency;
|
||||||
if(!isMainVFO)
|
if(!isMainVFO)
|
||||||
{
|
{
|
||||||
RxLine = line;
|
RxBlink = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RxLine = -1;
|
RxBlink = 0;
|
||||||
UI_PrintStringSmallBold("RX", 14, 0, line);
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
UI_PrintStringSmallBold("RX", 14, 0, line);
|
UI_PrintStringSmallBold("RX", 14, 0, line);
|
||||||
@@ -784,6 +800,12 @@ void UI_DisplayMain(void)
|
|||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(RxOnVfofrequency == frequency && !isMainOnly(false))
|
||||||
|
{
|
||||||
|
UI_PrintStringSmallNormal(">>", 14, 0, line);
|
||||||
|
//memcpy(p_line0 + 14, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
||||||
|
}
|
||||||
|
|
||||||
if(RxBlinkLed == 1)
|
if(RxBlinkLed == 1)
|
||||||
RxBlinkLed = 2;
|
RxBlinkLed = 2;
|
||||||
}
|
}
|
||||||
@@ -833,9 +855,6 @@ void UI_DisplayMain(void)
|
|||||||
state = VFO_STATE_ALARM;
|
state = VFO_STATE_ALARM;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32_t frequency = gEeprom.VfoInfo[vfo_num].pRX->Frequency;
|
|
||||||
|
|
||||||
if (state != VFO_STATE_NORMAL)
|
if (state != VFO_STATE_NORMAL)
|
||||||
{
|
{
|
||||||
if (state < ARRAY_SIZE(VfoStateStr))
|
if (state < ARRAY_SIZE(VfoStateStr))
|
||||||
|
@@ -469,7 +469,12 @@ void UI_DisplayMenu(void)
|
|||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
UI_DrawLineBuffer(gFrameBuffer, 50, 0, 50, 55, 1); // Be ware, status zone = 8 lines, the rest = 56 ->total 64
|
UI_DrawLineBuffer(gFrameBuffer, 50, 0, 50, 55, 1); // Be ware, status zone = 8 lines, the rest = 56 ->total 64
|
||||||
UI_DrawLineDottedBuffer(gFrameBuffer, 0, 46, 50, 46, 1);
|
//UI_DrawLineDottedBuffer(gFrameBuffer, 0, 46, 50, 46, 1);
|
||||||
|
|
||||||
|
for (uint8_t i = 0; i < 50; i += 2)
|
||||||
|
{
|
||||||
|
gFrameBuffer[5][i] = 0x40;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ENABLE_CUSTOM_MENU_LAYOUT
|
#ifndef ENABLE_CUSTOM_MENU_LAYOUT
|
||||||
|
11
ui/status.c
11
ui/status.c
@@ -160,11 +160,6 @@ void UI_DisplayStatus()
|
|||||||
x1 = x;
|
x1 = x;
|
||||||
}
|
}
|
||||||
else if (gWasFKeyPressed) {
|
else if (gWasFKeyPressed) {
|
||||||
/*
|
|
||||||
memcpy(line + x, gFontF, sizeof(gFontF));
|
|
||||||
x += sizeof(gFontF);
|
|
||||||
*/
|
|
||||||
|
|
||||||
UI_PrintStringSmallBufferNormal("F", line + x + 1);
|
UI_PrintStringSmallBufferNormal("F", line + x + 1);
|
||||||
x += sizeof(gFontKeyLock);
|
x += sizeof(gFontKeyLock);
|
||||||
|
|
||||||
@@ -174,6 +169,12 @@ void UI_DisplayStatus()
|
|||||||
}
|
}
|
||||||
x1 = x;
|
x1 = x;
|
||||||
}
|
}
|
||||||
|
else if(gBackLight)
|
||||||
|
{
|
||||||
|
memcpy(line + x + 1, gFontLight, sizeof(gFontLight));
|
||||||
|
x += sizeof(gFontLight);
|
||||||
|
x1 = x;
|
||||||
|
}
|
||||||
|
|
||||||
{ // battery voltage or percentage
|
{ // battery voltage or percentage
|
||||||
char s[8] = "";
|
char s[8] = "";
|
||||||
|
11
ui/welcome.c
11
ui/welcome.c
@@ -55,8 +55,8 @@ void UI_DisplayWelcome(void)
|
|||||||
UI_DisplayClear();
|
UI_DisplayClear();
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
ST7565_BlitStatusLine(); // blank status line
|
//ST7565_BlitStatusLine(); // blank status line
|
||||||
ST7565_BlitFullScreen();
|
//ST7565_BlitFullScreen();
|
||||||
|
|
||||||
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_NONE || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND) {
|
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_NONE || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND) {
|
||||||
ST7565_FillScreen(0x00);
|
ST7565_FillScreen(0x00);
|
||||||
@@ -105,13 +105,16 @@ void UI_DisplayWelcome(void)
|
|||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
UI_PrintStringSmallNormal(Version, 0, 128, 4);
|
UI_PrintStringSmallNormal(Version, 0, 128, 4);
|
||||||
|
|
||||||
|
for (uint8_t i = 0; i < 128; i++)
|
||||||
|
{
|
||||||
|
gFrameBuffer[3][i] ^= 0x80;
|
||||||
|
}
|
||||||
|
|
||||||
for (uint8_t i = 18; i < 110; i++)
|
for (uint8_t i = 18; i < 110; i++)
|
||||||
{
|
{
|
||||||
gFrameBuffer[4][i] ^= 0xFF;
|
gFrameBuffer[4][i] ^= 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
UI_DrawLineBuffer(gFrameBuffer, 0, 31, 126, 31, 1);
|
|
||||||
|
|
||||||
UI_PrintStringSmallNormal(Based, 0, 127, 5);
|
UI_PrintStringSmallNormal(Based, 0, 127, 5);
|
||||||
UI_PrintStringSmallNormal(Credits, 0, 127, 6);
|
UI_PrintStringSmallNormal(Credits, 0, 127, 6);
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user