17
Makefile
17
Makefile
@@ -6,7 +6,7 @@
|
|||||||
# ---- STOCK QUANSHENG FERATURES ----
|
# ---- STOCK QUANSHENG FERATURES ----
|
||||||
ENABLE_FMRADIO ?= 0
|
ENABLE_FMRADIO ?= 0
|
||||||
ENABLE_UART ?= 1
|
ENABLE_UART ?= 1
|
||||||
ENABLE_AIRCOPY ?= 1
|
ENABLE_AIRCOPY ?= 0
|
||||||
ENABLE_NOAA ?= 0
|
ENABLE_NOAA ?= 0
|
||||||
ENABLE_VOICE ?= 0
|
ENABLE_VOICE ?= 0
|
||||||
ENABLE_VOX ?= 1
|
ENABLE_VOX ?= 1
|
||||||
@@ -17,7 +17,7 @@ ENABLE_DTMF_CALLING ?= 0
|
|||||||
ENABLE_FLASHLIGHT ?= 1
|
ENABLE_FLASHLIGHT ?= 1
|
||||||
|
|
||||||
# ---- CUSTOM MODS ----
|
# ---- CUSTOM MODS ----
|
||||||
ENABLE_SPECTRUM ?= 1
|
ENABLE_SPECTRUM ?= 0
|
||||||
ENABLE_BIG_FREQ ?= 1
|
ENABLE_BIG_FREQ ?= 1
|
||||||
ENABLE_SMALL_BOLD ?= 1
|
ENABLE_SMALL_BOLD ?= 1
|
||||||
ENABLE_CUSTOM_MENU_LAYOUT ?= 1
|
ENABLE_CUSTOM_MENU_LAYOUT ?= 1
|
||||||
@@ -48,6 +48,8 @@ ENABLE_FEAT_F4HWN_CHARGING_C ?= 1
|
|||||||
ENABLE_FEAT_F4HWN_SLEEP ?= 1
|
ENABLE_FEAT_F4HWN_SLEEP ?= 1
|
||||||
ENABLE_FEAT_F4HWN_RESTORE_SCAN ?= 1
|
ENABLE_FEAT_F4HWN_RESTORE_SCAN ?= 1
|
||||||
ENABLE_FEAT_F4HWN_NARROWER ?= 1
|
ENABLE_FEAT_F4HWN_NARROWER ?= 1
|
||||||
|
ENABLE_FEAT_F4HWN_CONTRAST ?= 1
|
||||||
|
ENABLE_FEAT_F4HWN_MENU_LOCK ?= 0
|
||||||
ENABLE_FEAT_F4HWN_VOL ?= 0
|
ENABLE_FEAT_F4HWN_VOL ?= 0
|
||||||
ENABLE_FEAT_F4HWN_RESET_CHANNEL ?= 0
|
ENABLE_FEAT_F4HWN_RESET_CHANNEL ?= 0
|
||||||
ENABLE_FEAT_F4HWN_PMR ?= 0
|
ENABLE_FEAT_F4HWN_PMR ?= 0
|
||||||
@@ -222,7 +224,9 @@ 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 ?= v3.6
|
VERSION_STRING_2 ?= v3.7
|
||||||
|
|
||||||
|
EDITION_STRING ?= Custom
|
||||||
|
|
||||||
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)
|
||||||
@@ -411,6 +415,7 @@ ifeq ($(ENABLE_FEAT_F4HWN),1)
|
|||||||
CFLAGS += -DSQL_TONE=550 # For SA818, use 600 and python3 sa818.py --port /dev/ttyS2 radio --frequency 434.975 --ctcss 71.9 --tail Open
|
CFLAGS += -DSQL_TONE=550 # For SA818, use 600 and python3 sa818.py --port /dev/ttyS2 radio --frequency 434.975 --ctcss 71.9 --tail Open
|
||||||
CFLAGS += -DAUTHOR_STRING_1=\"$(AUTHOR_STRING_1)\" -DVERSION_STRING_1=\"$(VERSION_STRING_1)\"
|
CFLAGS += -DAUTHOR_STRING_1=\"$(AUTHOR_STRING_1)\" -DVERSION_STRING_1=\"$(VERSION_STRING_1)\"
|
||||||
CFLAGS += -DAUTHOR_STRING_2=\"$(AUTHOR_STRING_2)\" -DVERSION_STRING_2=\"$(VERSION_STRING_2)\"
|
CFLAGS += -DAUTHOR_STRING_2=\"$(AUTHOR_STRING_2)\" -DVERSION_STRING_2=\"$(VERSION_STRING_2)\"
|
||||||
|
CFLAGS += -DEDITION_STRING=\"$(EDITION_STRING)\"
|
||||||
else
|
else
|
||||||
CFLAGS += -DSQL_TONE=550
|
CFLAGS += -DSQL_TONE=550
|
||||||
endif
|
endif
|
||||||
@@ -435,6 +440,12 @@ endif
|
|||||||
ifeq ($(ENABLE_FEAT_F4HWN_NARROWER),1)
|
ifeq ($(ENABLE_FEAT_F4HWN_NARROWER),1)
|
||||||
CFLAGS += -DENABLE_FEAT_F4HWN_NARROWER
|
CFLAGS += -DENABLE_FEAT_F4HWN_NARROWER
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ENABLE_FEAT_F4HWN_CONTRAST),1)
|
||||||
|
CFLAGS += -DENABLE_FEAT_F4HWN_CONTRAST
|
||||||
|
endif
|
||||||
|
ifneq ($(filter $(ENABLE_FEAT_F4HWN_MENU_LOCK),1 2),)
|
||||||
|
CFLAGS += -DENABLE_FEAT_F4HWN_MENU_LOCK=$(ENABLE_FEAT_F4HWN_MENU_LOCK)
|
||||||
|
endif
|
||||||
ifeq ($(ENABLE_FEAT_F4HWN_VOL),1)
|
ifeq ($(ENABLE_FEAT_F4HWN_VOL),1)
|
||||||
CFLAGS += -DENABLE_FEAT_F4HWN_VOL
|
CFLAGS += -DENABLE_FEAT_F4HWN_VOL
|
||||||
endif
|
endif
|
||||||
|
11
README.md
11
README.md
@@ -216,9 +216,14 @@ This is the least demanding option as you don't have to install enything on your
|
|||||||
|
|
||||||
<img src="images/Code_Space_1.png" width=700 />
|
<img src="images/Code_Space_1.png" width=700 />
|
||||||
|
|
||||||
5. Open `Makefile`
|
5. Open `Makefile`, edit build options and save changes
|
||||||
1. Edit build options, save `Makefile` changes
|
1. If necessary, open `compile-with-docker.sh`, edit build versions and save changes
|
||||||
1. Run `./compile-with-docker.sh` in terminal window
|
1. Run in terminal window
|
||||||
|
- `./compile-with-docker.sh bandscope` to compile bandscope version
|
||||||
|
- `./compile-with-docker.sh broadcast` to compile broadcast version
|
||||||
|
- `./compile-with-docker.sh voxless` to compile voxless version
|
||||||
|
- `./compile-with-docker.sh all` to compile all versions
|
||||||
|
- `./compile-with-docker.sh custom` to compile only with Makefile build options
|
||||||
1. Open folder `compiled-firmware`
|
1. Open folder `compiled-firmware`
|
||||||
1. Right click `firmware.packed.bin`
|
1. Right click `firmware.packed.bin`
|
||||||
1. Click `Download`, now you should have a firmware on your computer that you can proceed to flash on your radio. You can use [online flasher](https://egzumer.github.io/uvtools)
|
1. Click `Download`, now you should have a firmware on your computer that you can proceed to flash on your radio. You can use [online flasher](https://egzumer.github.io/uvtools)
|
||||||
|
@@ -229,6 +229,10 @@ void ACTION_Scan(bool bRestart)
|
|||||||
gScanPauseDelayIn_10ms = 1;
|
gScanPauseDelayIn_10ms = 1;
|
||||||
gScheduleScanListen = false;
|
gScheduleScanListen = false;
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_RESTORE_SCAN
|
||||||
|
gEeprom.CURRENT_STATE = 1;
|
||||||
|
SETTINGS_WriteCurrentState();
|
||||||
|
#endif
|
||||||
// start scanning
|
// start scanning
|
||||||
CHFRSCANNER_Start(true, SCAN_FWD);
|
CHFRSCANNER_Start(true, SCAN_FWD);
|
||||||
|
|
||||||
|
@@ -1398,7 +1398,7 @@ void APP_TimeSlice10ms(void)
|
|||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ENABLE_FEAT_F4HWN
|
#if !defined(ENABLE_FEAT_F4HWN) || defined(ENABLE_FEAT_F4HWN_MENU_LOCK)
|
||||||
#ifdef ENABLE_FLASHLIGHT
|
#ifdef ENABLE_FLASHLIGHT
|
||||||
FlashlightTimeSlice();
|
FlashlightTimeSlice();
|
||||||
#endif
|
#endif
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "flashlight.h"
|
#include "flashlight.h"
|
||||||
|
|
||||||
#ifndef ENABLE_FEAT_F4HWN
|
#if !defined(ENABLE_FEAT_F4HWN) || defined(ENABLE_FEAT_F4HWN_MENU_LOCK)
|
||||||
enum FlashlightMode_t gFlashLightState;
|
enum FlashlightMode_t gFlashLightState;
|
||||||
|
|
||||||
void FlashlightTimeSlice()
|
void FlashlightTimeSlice()
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifndef ENABLE_FEAT_F4HWN
|
#if !defined(ENABLE_FEAT_F4HWN) || defined(ENABLE_FEAT_F4HWN_MENU_LOCK)
|
||||||
enum FlashlightMode_t {
|
enum FlashlightMode_t {
|
||||||
FLASHLIGHT_OFF = 0,
|
FLASHLIGHT_OFF = 0,
|
||||||
FLASHLIGHT_ON,
|
FLASHLIGHT_ON,
|
||||||
|
31
app/main.c
31
app/main.c
@@ -84,6 +84,12 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
|||||||
{
|
{
|
||||||
uint8_t Vfo = gEeprom.TX_VFO;
|
uint8_t Vfo = gEeprom.TX_VFO;
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
if(gEeprom.MENU_LOCK == true) {
|
||||||
|
return; // prevent F function if MENU LOCK is true
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (gScreenToDisplay == DISPLAY_MENU) {
|
if (gScreenToDisplay == DISPLAY_MENU) {
|
||||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||||
return;
|
return;
|
||||||
@@ -427,7 +433,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
|
|
||||||
if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE)) { // user is entering channel number
|
if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE)) { // user is entering channel number
|
||||||
|
|
||||||
gKeyInputCountdown = (key_input_timeout_500ms / 5); // short time...
|
gKeyInputCountdown = (key_input_timeout_500ms / 4); // short time...
|
||||||
|
|
||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||||
@@ -455,7 +461,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gKeyInputCountdown = (key_input_timeout_500ms / 5); // short time...
|
gKeyInputCountdown = (gInputBoxIndex == totalDigits) ? (key_input_timeout_500ms / 16) : (key_input_timeout_500ms / 3);
|
||||||
|
|
||||||
const char *inputStr = INPUTBOX_GetAscii();
|
const char *inputStr = INPUTBOX_GetAscii();
|
||||||
uint8_t inputLength = gInputBoxIndex;
|
uint8_t inputLength = gInputBoxIndex;
|
||||||
@@ -680,11 +686,19 @@ static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
if(gEeprom.MENU_LOCK == false) {
|
||||||
|
#endif
|
||||||
|
|
||||||
gFlagRefreshSetting = true;
|
gFlagRefreshSetting = true;
|
||||||
gRequestDisplayScreen = DISPLAY_MENU;
|
gRequestDisplayScreen = DISPLAY_MENU;
|
||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
gAnotherVoiceID = VOICE_ID_MENU;
|
gAnotherVoiceID = VOICE_ID_MENU;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||||
@@ -694,6 +708,13 @@ static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
|||||||
|
|
||||||
static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
if(gEeprom.MENU_LOCK == true) {
|
||||||
|
return; // prevent F function if MENU LOCK is true
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -927,7 +948,13 @@ void MAIN_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
MAIN_Key_STAR(bKeyPressed, bKeyHeld);
|
MAIN_Key_STAR(bKeyPressed, bKeyHeld);
|
||||||
break;
|
break;
|
||||||
case KEY_F:
|
case KEY_F:
|
||||||
|
#ifndef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
GENERIC_Key_F(bKeyPressed, bKeyHeld);
|
GENERIC_Key_F(bKeyPressed, bKeyHeld);
|
||||||
|
#else
|
||||||
|
if(gEeprom.MENU_LOCK == false) {
|
||||||
|
GENERIC_Key_F(bKeyPressed, bKeyHeld);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case KEY_PTT:
|
case KEY_PTT:
|
||||||
GENERIC_Key_PTT(bKeyPressed);
|
GENERIC_Key_PTT(bKeyPressed);
|
||||||
|
22
app/menu.c
22
app/menu.c
@@ -400,10 +400,12 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
|||||||
//*pMin = 0;
|
//*pMin = 0;
|
||||||
*pMax = ARRAY_SIZE(gSubMenu_SET_TOT) - 1;
|
*pMax = ARRAY_SIZE(gSubMenu_SET_TOT) - 1;
|
||||||
break;
|
break;
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_CONTRAST
|
||||||
case MENU_SET_CTR:
|
case MENU_SET_CTR:
|
||||||
*pMin = 1;
|
*pMin = 1;
|
||||||
*pMax = 15;
|
*pMax = 15;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case MENU_TX_LOCK:
|
case MENU_TX_LOCK:
|
||||||
case MENU_SET_INV:
|
case MENU_SET_INV:
|
||||||
//*pMin = 0;
|
//*pMin = 0;
|
||||||
@@ -430,6 +432,12 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
|||||||
*pMax = 63;
|
*pMax = 63;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
case MENU_SET_KEY:
|
||||||
|
//*pMin = 0;
|
||||||
|
*pMax = 4;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -914,9 +922,11 @@ void MENU_AcceptSetting(void)
|
|||||||
case MENU_SET_EOT:
|
case MENU_SET_EOT:
|
||||||
gSetting_set_eot = gSubMenuSelection;
|
gSetting_set_eot = gSubMenuSelection;
|
||||||
break;
|
break;
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_CONTRAST
|
||||||
case MENU_SET_CTR:
|
case MENU_SET_CTR:
|
||||||
gSetting_set_ctr = gSubMenuSelection;
|
gSetting_set_ctr = gSubMenuSelection;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case MENU_SET_INV:
|
case MENU_SET_INV:
|
||||||
gSetting_set_inv = gSubMenuSelection;
|
gSetting_set_inv = gSubMenuSelection;
|
||||||
break;
|
break;
|
||||||
@@ -941,6 +951,11 @@ void MENU_AcceptSetting(void)
|
|||||||
gEeprom.VOLUME_GAIN = gSubMenuSelection;
|
gEeprom.VOLUME_GAIN = gSubMenuSelection;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
case MENU_SET_KEY:
|
||||||
|
gEeprom.SET_KEY = gSubMenuSelection;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case MENU_SET_TMR:
|
case MENU_SET_TMR:
|
||||||
gSetting_set_tmr = gSubMenuSelection;
|
gSetting_set_tmr = gSubMenuSelection;
|
||||||
break;
|
break;
|
||||||
@@ -1360,9 +1375,11 @@ void MENU_ShowCurrentSetting(void)
|
|||||||
case MENU_SET_EOT:
|
case MENU_SET_EOT:
|
||||||
gSubMenuSelection = gSetting_set_eot;
|
gSubMenuSelection = gSetting_set_eot;
|
||||||
break;
|
break;
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_CONTRAST
|
||||||
case MENU_SET_CTR:
|
case MENU_SET_CTR:
|
||||||
gSubMenuSelection = gSetting_set_ctr;
|
gSubMenuSelection = gSetting_set_ctr;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case MENU_SET_INV:
|
case MENU_SET_INV:
|
||||||
gSubMenuSelection = gSetting_set_inv;
|
gSubMenuSelection = gSetting_set_inv;
|
||||||
break;
|
break;
|
||||||
@@ -1385,6 +1402,11 @@ void MENU_ShowCurrentSetting(void)
|
|||||||
gSubMenuSelection = gEeprom.VOLUME_GAIN;
|
gSubMenuSelection = gEeprom.VOLUME_GAIN;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
case MENU_SET_KEY:
|
||||||
|
gSubMenuSelection = gEeprom.SET_KEY;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case MENU_SET_TMR:
|
case MENU_SET_TMR:
|
||||||
gSubMenuSelection = gSetting_set_tmr;
|
gSubMenuSelection = gSetting_set_tmr;
|
||||||
break;
|
break;
|
||||||
|
@@ -867,6 +867,25 @@ uint8_t Rssi2Y(uint16_t rssi)
|
|||||||
return DrawingEndY - Rssi2PX(rssi, 0, DrawingEndY);
|
return DrawingEndY - Rssi2PX(rssi, 0, DrawingEndY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_SPECTRUM
|
||||||
|
static void DrawSpectrum()
|
||||||
|
{
|
||||||
|
uint8_t ox = 0;
|
||||||
|
for (uint8_t i = 0; i < 128; ++i)
|
||||||
|
{
|
||||||
|
uint16_t rssi = rssiHistory[i >> settings.stepsCount];
|
||||||
|
if (rssi != RSSI_MAX_VALUE)
|
||||||
|
{
|
||||||
|
uint8_t x = i * 128 / GetStepsCount();
|
||||||
|
for (uint8_t xx = ox; xx < x; xx++)
|
||||||
|
{
|
||||||
|
DrawVLine(Rssi2Y(rssi), DrawingEndY, xx, true);
|
||||||
|
}
|
||||||
|
ox = x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
static void DrawSpectrum()
|
static void DrawSpectrum()
|
||||||
{
|
{
|
||||||
for (uint8_t x = 0; x < 128; ++x)
|
for (uint8_t x = 0; x < 128; ++x)
|
||||||
@@ -878,6 +897,7 @@ static void DrawSpectrum()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void DrawStatus()
|
static void DrawStatus()
|
||||||
{
|
{
|
||||||
|
BIN
archive/f4hwn.bandscope.packed.v3.7.bin
Normal file
BIN
archive/f4hwn.bandscope.packed.v3.7.bin
Normal file
Binary file not shown.
BIN
archive/f4hwn.bandscope.packed.v3.7.sa818.bin
Normal file
BIN
archive/f4hwn.bandscope.packed.v3.7.sa818.bin
Normal file
Binary file not shown.
BIN
archive/f4hwn.broadcast.packed.v3.7.bin
Normal file
BIN
archive/f4hwn.broadcast.packed.v3.7.bin
Normal file
Binary file not shown.
BIN
archive/f4hwn.broadcast.packed.v3.7.sa818.bin
Normal file
BIN
archive/f4hwn.broadcast.packed.v3.7.sa818.bin
Normal file
Binary file not shown.
BIN
archive/f4hwn.rescueops.packed.v3.7.bin
Normal file
BIN
archive/f4hwn.rescueops.packed.v3.7.bin
Normal file
Binary file not shown.
BIN
archive/f4hwn.rescueops.packed.v3.7.sa818.bin
Normal file
BIN
archive/f4hwn.rescueops.packed.v3.7.sa818.bin
Normal file
Binary file not shown.
BIN
archive/f4hwn.voxless.packed.v3.7.bin
Normal file
BIN
archive/f4hwn.voxless.packed.v3.7.bin
Normal file
Binary file not shown.
BIN
archive/f4hwn.voxless.packed.v3.7.sa818.bin
Normal file
BIN
archive/f4hwn.voxless.packed.v3.7.sa818.bin
Normal file
Binary file not shown.
46
bitmaps.c
46
bitmaps.c
@@ -22,19 +22,40 @@ const uint8_t gFontPttClassic[2][6] =
|
|||||||
{0x00, 0x7f, 0x40, 0x40, 0x40, 0x40},
|
{0x00, 0x7f, 0x40, 0x40, 0x40, 0x40},
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t gFontF[1][8] =
|
const uint8_t gFontF[8] =
|
||||||
{
|
{
|
||||||
{0x7f, 0x00, 0x76, 0x76, 0x76, 0x76, 0x7e, 0x7f}, // 'F'
|
0b01111111,
|
||||||
|
0b00000000,
|
||||||
|
0b01110110,
|
||||||
|
0b01110110,
|
||||||
|
0b01110110,
|
||||||
|
0b01110110,
|
||||||
|
0b01111110,
|
||||||
|
0b01111111
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t gFontS[1][6] =
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
const uint8_t gFontR[8] =
|
||||||
{
|
{
|
||||||
{0x26, 0x49, 0x49, 0x49, 0x49, 0x32}, // 'S'
|
0b01111111,
|
||||||
|
0b00000000,
|
||||||
|
0b01110110,
|
||||||
|
0b01110110,
|
||||||
|
0b01100110,
|
||||||
|
0b01010110,
|
||||||
|
0b00111001,
|
||||||
|
0b01111111
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const uint8_t gFontS[6] =
|
||||||
|
{
|
||||||
|
0x26, 0x49, 0x49, 0x49, 0x49, 0x32 // 'S'
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t gFontKeyLock[1][9] =
|
const uint8_t gFontKeyLock[9] =
|
||||||
{
|
{
|
||||||
{0x7c, 0x46, 0x45, 0x45, 0x45, 0x45, 0x45, 0x46, 0x7c}
|
0x7c, 0x46, 0x45, 0x45, 0x45, 0x45, 0x45, 0x46, 0x7c
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t gFontLight[9] =
|
const uint8_t gFontLight[9] =
|
||||||
@@ -280,6 +301,7 @@ const uint8_t BITMAP_compand[6] =
|
|||||||
0b00100100
|
0b00100100
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
const uint8_t BITMAP_Ready[7] =
|
const uint8_t BITMAP_Ready[7] =
|
||||||
{
|
{
|
||||||
0b00001000,
|
0b00001000,
|
||||||
@@ -291,6 +313,18 @@ const uint8_t BITMAP_Ready[7] =
|
|||||||
0b00000010,
|
0b00000010,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_NotReady[7] =
|
||||||
|
{
|
||||||
|
0b00000000,
|
||||||
|
0b01000010,
|
||||||
|
0b00100100,
|
||||||
|
0b00011000,
|
||||||
|
0b00100100,
|
||||||
|
0b01000010,
|
||||||
|
0b00000000,
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
const uint8_t BITMAP_PowerUser[3] =
|
const uint8_t BITMAP_PowerUser[3] =
|
||||||
{ // 'arrow' symbol
|
{ // 'arrow' symbol
|
||||||
0b00111110,
|
0b00111110,
|
||||||
|
15
bitmaps.h
15
bitmaps.h
@@ -7,10 +7,15 @@
|
|||||||
extern const uint8_t gFontPowerSave[2][6];
|
extern const uint8_t gFontPowerSave[2][6];
|
||||||
extern const uint8_t gFontPttOnePush[2][6];
|
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 gFontF[1][8];
|
extern const uint8_t gFontF[8];
|
||||||
extern const uint8_t gFontS[1][6];
|
|
||||||
|
|
||||||
extern const uint8_t gFontKeyLock[1][9];
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
extern const uint8_t gFontR[8];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern const uint8_t gFontS[6];
|
||||||
|
|
||||||
|
extern const uint8_t gFontKeyLock[9];
|
||||||
extern const uint8_t gFontLight[9];
|
extern const uint8_t gFontLight[9];
|
||||||
|
|
||||||
extern const uint8_t gFontXB[2][6];
|
extern const uint8_t gFontXB[2][6];
|
||||||
@@ -21,7 +26,11 @@ extern const uint8_t gFontHold[2][5];
|
|||||||
extern const uint8_t BITMAP_BatteryLevel[2];
|
extern const uint8_t BITMAP_BatteryLevel[2];
|
||||||
extern const uint8_t BITMAP_BatteryLevel1[17];
|
extern const uint8_t BITMAP_BatteryLevel1[17];
|
||||||
extern const uint8_t BITMAP_USB_C[9];
|
extern const uint8_t BITMAP_USB_C[9];
|
||||||
|
|
||||||
|
/*
|
||||||
extern const uint8_t BITMAP_Ready[7];
|
extern const uint8_t BITMAP_Ready[7];
|
||||||
|
extern const uint8_t BITMAP_NotReady[7];
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef ENABLE_VOX
|
#ifdef ENABLE_VOX
|
||||||
extern const uint8_t gFontVox[2][6];
|
extern const uint8_t gFontVox[2][6];
|
||||||
|
@@ -1,65 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#export DOCKER_DEFAULT_PLATFORM=linux/amd64
|
|
||||||
IMAGE_NAME="uvk5"
|
|
||||||
rm "${PWD}/compiled-firmware/*"
|
|
||||||
docker build -t $IMAGE_NAME .
|
|
||||||
|
|
||||||
bandscope() {
|
|
||||||
echo "Bandscope compilation..."
|
|
||||||
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_NOAA=0 \
|
|
||||||
TARGET=f4hwn.bandscope \
|
|
||||||
&& cp f4hwn.bandscope* compiled-firmware/"
|
|
||||||
}
|
|
||||||
|
|
||||||
broadcast() {
|
|
||||||
echo "Broadcast compilation..."
|
|
||||||
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make -s \
|
|
||||||
ENABLE_SPECTRUM=0 \
|
|
||||||
ENABLE_FMRADIO=1 \
|
|
||||||
ENABLE_AIRCOPY=1 \
|
|
||||||
ENABLE_NOAA=0 \
|
|
||||||
TARGET=f4hwn.broadcast \
|
|
||||||
&& cp f4hwn.broadcast* compiled-firmware/"
|
|
||||||
}
|
|
||||||
|
|
||||||
voxless() {
|
|
||||||
echo "Voxless compilation..."
|
|
||||||
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make -s \
|
|
||||||
ENABLE_SPECTRUM=1 \
|
|
||||||
ENABLE_FMRADIO=1 \
|
|
||||||
ENABLE_VOX=0 \
|
|
||||||
ENABLE_AIRCOPY=0 \
|
|
||||||
ENABLE_AUDIO_BAR=0 \
|
|
||||||
ENABLE_FEAT_F4HWN_SPECTRUM=0 \
|
|
||||||
ENABLE_NOAA=0 \
|
|
||||||
ENABLE_FEAT_F4HWN_RESTORE_SCAN=0 \
|
|
||||||
ENABLE_FEAT_F4HWN_CHARGING_C=0 \
|
|
||||||
ENABLE_FEAT_F4HWN_NARROWER=0 \
|
|
||||||
TARGET=f4hwn.voxless \
|
|
||||||
&& cp f4hwn.voxless* compiled-firmware/"
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
bandscope)
|
|
||||||
bandscope
|
|
||||||
;;
|
|
||||||
broadcast)
|
|
||||||
broadcast
|
|
||||||
;;
|
|
||||||
voxless)
|
|
||||||
voxless
|
|
||||||
;;
|
|
||||||
all)
|
|
||||||
bandscope
|
|
||||||
broadcast
|
|
||||||
voxless
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 {bandscope|broadcast|voxless|all}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
@@ -1,5 +1,114 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#export DOCKER_DEFAULT_PLATFORM=linux/amd64
|
#export DOCKER_DEFAULT_PLATFORM=linux/amd64
|
||||||
IMAGE_NAME="uvk5"
|
IMAGE_NAME="uvk5"
|
||||||
|
rm "${PWD}/compiled-firmware/*"
|
||||||
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 "rm ./compiled-firmware/*; cd /app && make && cp f4hwn* compiled-firmware/"
|
|
||||||
|
custom() {
|
||||||
|
echo "Custom compilation..."
|
||||||
|
docker run --rm -v "${PWD}/compiled-firmware/:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "rm ./compiled-firmware/*; cd /app && make -s \
|
||||||
|
EDITION_STRING=Custom \
|
||||||
|
TARGET=f4hwn.custom \
|
||||||
|
&& cp f4hwn.custom* compiled-firmware/"
|
||||||
|
}
|
||||||
|
|
||||||
|
standard() {
|
||||||
|
echo "Standard compilation..."
|
||||||
|
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "rm ./compiled-firmware/*; cd /app && make -s \
|
||||||
|
ENABLE_SPECTRUM=0 \
|
||||||
|
ENABLE_FMRADIO=0 \
|
||||||
|
ENABLE_AIRCOPY=0 \
|
||||||
|
ENABLE_NOAA=0 \
|
||||||
|
EDITION_STRING=Standard \
|
||||||
|
TARGET=f4hwn.standard \
|
||||||
|
&& cp f4hwn.standard* compiled-firmware/"
|
||||||
|
}
|
||||||
|
|
||||||
|
bandscope() {
|
||||||
|
echo "Bandscope compilation..."
|
||||||
|
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_NOAA=0 \
|
||||||
|
ENABLE_FEAT_F4HWN_MENU_LOCK=0 \
|
||||||
|
EDITION_STRING=Bandscope \
|
||||||
|
TARGET=f4hwn.bandscope \
|
||||||
|
&& cp f4hwn.bandscope* compiled-firmware/"
|
||||||
|
}
|
||||||
|
|
||||||
|
broadcast() {
|
||||||
|
echo "Broadcast compilation..."
|
||||||
|
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make -s \
|
||||||
|
ENABLE_SPECTRUM=0 \
|
||||||
|
ENABLE_FMRADIO=1 \
|
||||||
|
ENABLE_AIRCOPY=1 \
|
||||||
|
ENABLE_NOAA=0 \
|
||||||
|
EDITION_STRING=Broadcast \
|
||||||
|
ENABLE_FEAT_F4HWN_MENU_LOCK=0 \
|
||||||
|
TARGET=f4hwn.broadcast \
|
||||||
|
&& cp f4hwn.broadcast* compiled-firmware/"
|
||||||
|
}
|
||||||
|
|
||||||
|
voxless() {
|
||||||
|
echo "Voxless compilation..."
|
||||||
|
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make -s \
|
||||||
|
ENABLE_SPECTRUM=1 \
|
||||||
|
ENABLE_FMRADIO=1 \
|
||||||
|
ENABLE_VOX=0 \
|
||||||
|
ENABLE_AIRCOPY=0 \
|
||||||
|
ENABLE_AUDIO_BAR=0 \
|
||||||
|
ENABLE_FEAT_F4HWN_SPECTRUM=0 \
|
||||||
|
ENABLE_NOAA=0 \
|
||||||
|
ENABLE_FEAT_F4HWN_RESTORE_SCAN=0 \
|
||||||
|
ENABLE_FEAT_F4HWN_CHARGING_C=0 \
|
||||||
|
ENABLE_FEAT_F4HWN_NARROWER=0 \
|
||||||
|
ENABLE_FEAT_F4HWN_MENU_LOCK=0 \
|
||||||
|
EDITION_STRING=Voxless \
|
||||||
|
TARGET=f4hwn.voxless \
|
||||||
|
&& cp f4hwn.voxless* compiled-firmware/"
|
||||||
|
}
|
||||||
|
|
||||||
|
rescueops() {
|
||||||
|
echo "RescueOps compilation..."
|
||||||
|
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make -s \
|
||||||
|
ENABLE_SPECTRUM=0 \
|
||||||
|
ENABLE_FMRADIO=0 \
|
||||||
|
ENABLE_AIRCOPY=1 \
|
||||||
|
ENABLE_NOAA=1 \
|
||||||
|
ENABLE_FEAT_F4HWN_MENU_LOCK=1 \
|
||||||
|
EDITION_STRING=RescueOps \
|
||||||
|
TARGET=f4hwn.rescueops \
|
||||||
|
&& cp f4hwn.rescueops* compiled-firmware/"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
custom)
|
||||||
|
custom
|
||||||
|
;;
|
||||||
|
standard)
|
||||||
|
standard
|
||||||
|
;;
|
||||||
|
bandscope)
|
||||||
|
bandscope
|
||||||
|
;;
|
||||||
|
broadcast)
|
||||||
|
broadcast
|
||||||
|
;;
|
||||||
|
voxless)
|
||||||
|
voxless
|
||||||
|
;;
|
||||||
|
rescueops)
|
||||||
|
rescueops
|
||||||
|
;;
|
||||||
|
all)
|
||||||
|
bandscope
|
||||||
|
broadcast
|
||||||
|
voxless
|
||||||
|
rescueops
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {custom|bandscope|broadcast|voxless|standard|all}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
@@ -44,6 +44,13 @@ BOOT_Mode_t BOOT_GetMode(void)
|
|||||||
SYSTEM_DelayMs(20);
|
SYSTEM_DelayMs(20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
if (Keys[0] == (10 + gEeprom.SET_KEY))
|
||||||
|
{
|
||||||
|
return BOOT_MODE_MENU_LOCK; // Secret KEY pressed
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (Keys[0] == Keys[1])
|
if (Keys[0] == Keys[1])
|
||||||
{
|
{
|
||||||
gKeyReading0 = Keys[0];
|
gKeyReading0 = Keys[0];
|
||||||
|
@@ -24,6 +24,9 @@ enum BOOT_Mode_t
|
|||||||
{
|
{
|
||||||
BOOT_MODE_NORMAL = 0,
|
BOOT_MODE_NORMAL = 0,
|
||||||
BOOT_MODE_F_LOCK,
|
BOOT_MODE_F_LOCK,
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
BOOT_MODE_MENU_LOCK,
|
||||||
|
#endif
|
||||||
#ifdef ENABLE_AIRCOPY
|
#ifdef ENABLE_AIRCOPY
|
||||||
BOOT_MODE_AIRCOPY
|
BOOT_MODE_AIRCOPY
|
||||||
#endif
|
#endif
|
||||||
|
38
main.c
38
main.c
@@ -129,7 +129,30 @@ void Main(void)
|
|||||||
AM_fix_init();
|
AM_fix_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const BOOT_Mode_t BootMode = BOOT_GetMode();
|
BOOT_Mode_t BootMode = BOOT_GetMode();
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
if (BootMode == BOOT_MODE_MENU_LOCK)
|
||||||
|
{
|
||||||
|
gEeprom.MENU_LOCK = !gEeprom.MENU_LOCK;
|
||||||
|
SETTINGS_SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(gEeprom.MENU_LOCK == true) // Force Main Only
|
||||||
|
{
|
||||||
|
gEeprom.DUAL_WATCH = 0;
|
||||||
|
gEeprom.CROSS_BAND_RX_TX = 0;
|
||||||
|
//gFlagReconfigureVfos = true;
|
||||||
|
//gUpdateStatus = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
if (BootMode == BOOT_MODE_F_LOCK && gEeprom.MENU_LOCK == true)
|
||||||
|
{
|
||||||
|
BootMode = BOOT_MODE_NORMAL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (BootMode == BOOT_MODE_F_LOCK)
|
if (BootMode == BOOT_MODE_F_LOCK)
|
||||||
{
|
{
|
||||||
@@ -139,13 +162,16 @@ void Main(void)
|
|||||||
gEeprom.KEY_LOCK = 0;
|
gEeprom.KEY_LOCK = 0;
|
||||||
SETTINGS_SaveSettings();
|
SETTINGS_SaveSettings();
|
||||||
#ifndef ENABLE_VOX
|
#ifndef ENABLE_VOX
|
||||||
gMenuCursor = 64; // move to hidden section, fix me if change... !!! Remove VOX and Mic Bar
|
gMenuCursor = 65; // move to hidden section, fix me if change... !!! Remove VOX and Mic Bar
|
||||||
#else
|
#else
|
||||||
#ifdef ENABLE_FEAT_F4HWN_SLEEP
|
gMenuCursor = 68; // move to hidden section, fix me if change... !!!
|
||||||
gMenuCursor = 67; // move to hidden section, fix me if change... !!!
|
|
||||||
#else
|
|
||||||
gMenuCursor = 66; // move to hidden section, fix me if change... !!!
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_NOAA
|
||||||
|
gMenuCursor += 1; // move to hidden section, fix me if change... !!!
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
gMenuCursor += 1; // move to hidden section, fix me if change... !!!
|
||||||
#endif
|
#endif
|
||||||
gSubMenuSelection = gSetting_F_LOCK;
|
gSubMenuSelection = gSetting_F_LOCK;
|
||||||
#endif
|
#endif
|
||||||
|
15
settings.c
15
settings.c
@@ -51,7 +51,13 @@ void SETTINGS_InitEEPROM(void)
|
|||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
gEeprom.NOAA_AUTO_SCAN = (Data[3] < 2) ? Data[3] : false;
|
gEeprom.NOAA_AUTO_SCAN = (Data[3] < 2) ? Data[3] : false;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
gEeprom.KEY_LOCK = (Data[4] & 0x01) != 0;
|
||||||
|
gEeprom.MENU_LOCK = (Data[4] & 0x02) != 0;
|
||||||
|
gEeprom.SET_KEY = ((Data[4] >> 2) & 0x0F) > 4 ? 0 : (Data[4] >> 2) & 0x0F;
|
||||||
|
#else
|
||||||
gEeprom.KEY_LOCK = (Data[4] < 2) ? Data[4] : false;
|
gEeprom.KEY_LOCK = (Data[4] < 2) ? Data[4] : false;
|
||||||
|
#endif
|
||||||
#ifdef ENABLE_VOX
|
#ifdef ENABLE_VOX
|
||||||
gEeprom.VOX_SWITCH = (Data[5] < 2) ? Data[5] : false;
|
gEeprom.VOX_SWITCH = (Data[5] < 2) ? Data[5] : false;
|
||||||
gEeprom.VOX_LEVEL = (Data[6] < 10) ? Data[6] : 1;
|
gEeprom.VOX_LEVEL = (Data[6] < 10) ? Data[6] : 1;
|
||||||
@@ -590,7 +596,13 @@ void SETTINGS_SaveSettings(void)
|
|||||||
#else
|
#else
|
||||||
State[3] = false;
|
State[3] = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
State[4] = (gEeprom.KEY_LOCK ? 0x01 : 0) | (gEeprom.MENU_LOCK ? 0x02 :0) | ((gEeprom.SET_KEY & 0x0F) << 2);
|
||||||
|
#else
|
||||||
State[4] = gEeprom.KEY_LOCK;
|
State[4] = gEeprom.KEY_LOCK;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_VOX
|
#ifdef ENABLE_VOX
|
||||||
State[5] = gEeprom.VOX_SWITCH;
|
State[5] = gEeprom.VOX_SWITCH;
|
||||||
State[6] = gEeprom.VOX_LEVEL;
|
State[6] = gEeprom.VOX_LEVEL;
|
||||||
@@ -987,6 +999,9 @@ State[1] = 0
|
|||||||
#ifdef ENABLE_SPECTRUM
|
#ifdef ENABLE_SPECTRUM
|
||||||
| (1 << 5)
|
| (1 << 5)
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
| (1 << 6)
|
||||||
|
#endif
|
||||||
;
|
;
|
||||||
EEPROM_WriteBuffer(0x1FF0, State);
|
EEPROM_WriteBuffer(0x1FF0, State);
|
||||||
}
|
}
|
||||||
|
@@ -185,6 +185,10 @@ typedef struct {
|
|||||||
bool KEY_LOCK;
|
bool KEY_LOCK;
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
bool KEY_LOCK_PTT;
|
bool KEY_LOCK_PTT;
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
bool MENU_LOCK;
|
||||||
|
uint8_t SET_KEY;
|
||||||
#endif
|
#endif
|
||||||
bool VOX_SWITCH;
|
bool VOX_SWITCH;
|
||||||
uint8_t VOX_LEVEL;
|
uint8_t VOX_LEVEL;
|
||||||
|
24
ui/menu.c
24
ui/menu.c
@@ -141,7 +141,9 @@ const t_menu_item MenuList[] =
|
|||||||
{"SetPTT", MENU_SET_PTT },
|
{"SetPTT", MENU_SET_PTT },
|
||||||
{"SetTOT", MENU_SET_TOT },
|
{"SetTOT", MENU_SET_TOT },
|
||||||
{"SetEOT", MENU_SET_EOT },
|
{"SetEOT", MENU_SET_EOT },
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_CONTRAST
|
||||||
{"SetCtr", MENU_SET_CTR },
|
{"SetCtr", MENU_SET_CTR },
|
||||||
|
#endif
|
||||||
{"SetInv", MENU_SET_INV },
|
{"SetInv", MENU_SET_INV },
|
||||||
{"SetLck", MENU_SET_LCK },
|
{"SetLck", MENU_SET_LCK },
|
||||||
{"SetMet", MENU_SET_MET },
|
{"SetMet", MENU_SET_MET },
|
||||||
@@ -156,6 +158,9 @@ const t_menu_item MenuList[] =
|
|||||||
#ifdef ENABLE_FEAT_F4HWN_VOL
|
#ifdef ENABLE_FEAT_F4HWN_VOL
|
||||||
{"SetVol", MENU_SET_VOL },
|
{"SetVol", MENU_SET_VOL },
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
{"SetKey", MENU_SET_KEY },
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
// hidden menu items from here on
|
// hidden menu items from here on
|
||||||
// enabled if pressing both the PTT and upper side button at power-on
|
// enabled if pressing both the PTT and upper side button at power-on
|
||||||
@@ -395,6 +400,17 @@ const char gSubMenu_SCRAMBLER[][7] =
|
|||||||
"NARROWER"
|
"NARROWER"
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
const char gSubMenu_SET_KEY[][9] =
|
||||||
|
{
|
||||||
|
"KEY_MENU",
|
||||||
|
"KEY_UP",
|
||||||
|
"KEY_DOWN",
|
||||||
|
"KEY_EXIT",
|
||||||
|
"KEY_STAR"
|
||||||
|
};
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const t_sidefunction gSubMenu_SIDEFUNCTIONS[] =
|
const t_sidefunction gSubMenu_SIDEFUNCTIONS[] =
|
||||||
@@ -1013,11 +1029,13 @@ void UI_DisplayMenu(void)
|
|||||||
strcpy(String, gSubMenu_SET_TOT[gSubMenuSelection]); // Same as SET_TOT
|
strcpy(String, gSubMenu_SET_TOT[gSubMenuSelection]); // Same as SET_TOT
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_CONTRAST
|
||||||
case MENU_SET_CTR:
|
case MENU_SET_CTR:
|
||||||
sprintf(String, "%d", gSubMenuSelection);
|
sprintf(String, "%d", gSubMenuSelection);
|
||||||
gSetting_set_ctr = gSubMenuSelection;
|
gSetting_set_ctr = gSubMenuSelection;
|
||||||
ST7565_ContrastAndInv();
|
ST7565_ContrastAndInv();
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case MENU_SET_INV:
|
case MENU_SET_INV:
|
||||||
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
|
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
|
||||||
@@ -1061,6 +1079,12 @@ void UI_DisplayMenu(void)
|
|||||||
(gEeprom.DAC_GAIN << 0)); // AF DAC Gain (after Gain-1 and Gain-2)
|
(gEeprom.DAC_GAIN << 0)); // AF DAC Gain (after Gain-1 and Gain-2)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
case MENU_SET_KEY:
|
||||||
|
strcpy(String, gSubMenu_SET_KEY[gSubMenuSelection]);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -147,6 +147,9 @@ enum
|
|||||||
#ifdef ENABLE_FEAT_F4HWN_VOL
|
#ifdef ENABLE_FEAT_F4HWN_VOL
|
||||||
MENU_SET_VOL,
|
MENU_SET_VOL,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
MENU_SET_KEY,
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
MENU_BATCAL, // battery voltage calibration
|
MENU_BATCAL, // battery voltage calibration
|
||||||
MENU_F1SHRT,
|
MENU_F1SHRT,
|
||||||
@@ -187,6 +190,9 @@ extern const char gSubMenu_D_RSP[4][11];
|
|||||||
#ifdef ENABLE_FEAT_F4HWN_NARROWER
|
#ifdef ENABLE_FEAT_F4HWN_NARROWER
|
||||||
extern const char gSubMenu_SET_NFM[2][9];
|
extern const char gSubMenu_SET_NFM[2][9];
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
extern const char gSubMenu_SET_KEY[][9];
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const char* const gSubMenu_PTT_ID[5];
|
extern const char* const gSubMenu_PTT_ID[5];
|
||||||
|
@@ -213,6 +213,11 @@ void UI_DisplayStatus()
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
else if(gEeprom.MENU_LOCK == true) {
|
||||||
|
memcpy(line + x + 1, gFontR, sizeof(gFontR));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
else if (gBackLight)
|
else if (gBackLight)
|
||||||
{
|
{
|
||||||
memcpy(line + x + 1, gFontLight, sizeof(gFontLight));
|
memcpy(line + x + 1, gFontLight, sizeof(gFontLight));
|
||||||
|
54
ui/welcome.c
54
ui/welcome.c
@@ -48,6 +48,7 @@ void UI_DisplayWelcome(void)
|
|||||||
char WelcomeString0[16];
|
char WelcomeString0[16];
|
||||||
char WelcomeString1[16];
|
char WelcomeString1[16];
|
||||||
char WelcomeString2[16];
|
char WelcomeString2[16];
|
||||||
|
char WelcomeString3[20];
|
||||||
|
|
||||||
memset(gStatusLine, 0, sizeof(gStatusLine));
|
memset(gStatusLine, 0, sizeof(gStatusLine));
|
||||||
|
|
||||||
@@ -128,6 +129,43 @@ void UI_DisplayWelcome(void)
|
|||||||
gFrameBuffer[4][i] ^= 0xFF;
|
gFrameBuffer[4][i] ^= 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sprintf(WelcomeString3, "%s Edition", Edition);
|
||||||
|
UI_PrintStringSmallNormal(WelcomeString3, 0, 127, 6);
|
||||||
|
|
||||||
|
/*
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
#if ENABLE_FEAT_F4HWN_MENU_LOCK > 1
|
||||||
|
UI_PrintStringSmallNormal(Edition, 18, 0, 6);
|
||||||
|
if(gEeprom.MENU_LOCK == true) {
|
||||||
|
memcpy(gFrameBuffer[6] + 103, BITMAP_Ready, sizeof(BITMAP_Ready));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memcpy(gFrameBuffer[6] + 103, BITMAP_NotReady, sizeof(BITMAP_NotReady));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
UI_PrintStringSmallNormal(Edition, 18, 0, 5);
|
||||||
|
memcpy(gFrameBuffer[5] + 103, BITMAP_Ready, sizeof(BITMAP_Ready));
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
UI_PrintStringSmallNormal("RescueOps", 18, 0, 6);
|
||||||
|
if(gEeprom.MENU_LOCK == true) {
|
||||||
|
memcpy(gFrameBuffer[6] + 103, BITMAP_Ready, sizeof(BITMAP_Ready));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memcpy(gFrameBuffer[6] + 103, BITMAP_NotReady, sizeof(BITMAP_NotReady));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
UI_PrintStringSmallNormal(Edition, 18, 0, 6);
|
||||||
|
memcpy(gFrameBuffer[6] + 103, BITMAP_Ready, sizeof(BITMAP_Ready));
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
#ifdef ENABLE_SPECTRUM
|
#ifdef ENABLE_SPECTRUM
|
||||||
#ifdef ENABLE_FMRADIO
|
#ifdef ENABLE_FMRADIO
|
||||||
UI_PrintStringSmallNormal(Based, 0, 127, 5);
|
UI_PrintStringSmallNormal(Based, 0, 127, 5);
|
||||||
@@ -135,13 +173,29 @@ void UI_DisplayWelcome(void)
|
|||||||
#else
|
#else
|
||||||
UI_PrintStringSmallNormal("Bandscope ", 0, 127, 5);
|
UI_PrintStringSmallNormal("Bandscope ", 0, 127, 5);
|
||||||
memcpy(gFrameBuffer[5] + 95, BITMAP_Ready, sizeof(BITMAP_Ready));
|
memcpy(gFrameBuffer[5] + 95, BITMAP_Ready, sizeof(BITMAP_Ready));
|
||||||
|
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
UI_PrintStringSmallNormal("RescueOps ", 0, 127, 6);
|
||||||
|
if(gEeprom.MENU_LOCK == true) {
|
||||||
|
memcpy(gFrameBuffer[6] + 95, BITMAP_Ready, sizeof(BITMAP_Ready));
|
||||||
|
}
|
||||||
|
#else
|
||||||
UI_PrintStringSmallNormal("Broadcast ", 0, 127, 6);
|
UI_PrintStringSmallNormal("Broadcast ", 0, 127, 6);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK
|
||||||
|
UI_PrintStringSmallNormal("RescueOps ", 0, 127, 5);
|
||||||
|
if(gEeprom.MENU_LOCK == true) {
|
||||||
|
memcpy(gFrameBuffer[5] + 95, BITMAP_Ready, sizeof(BITMAP_Ready));
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
UI_PrintStringSmallNormal("Bandscope ", 0, 127, 5);
|
UI_PrintStringSmallNormal("Bandscope ", 0, 127, 5);
|
||||||
|
#endif
|
||||||
UI_PrintStringSmallNormal("Broadcast ", 0, 127, 6);
|
UI_PrintStringSmallNormal("Broadcast ", 0, 127, 6);
|
||||||
memcpy(gFrameBuffer[6] + 95, BITMAP_Ready, sizeof(BITMAP_Ready));
|
memcpy(gFrameBuffer[6] + 95, BITMAP_Ready, sizeof(BITMAP_Ready));
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
#else
|
#else
|
||||||
UI_PrintStringSmallNormal(Version, 0, 127, 6);
|
UI_PrintStringSmallNormal(Version, 0, 127, 6);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -7,8 +7,7 @@
|
|||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
const char Version[] = AUTHOR_STRING_2 " " VERSION_STRING_2;
|
const char Version[] = AUTHOR_STRING_2 " " VERSION_STRING_2;
|
||||||
const char Based[] = "based on";
|
const char Edition[] = EDITION_STRING;
|
||||||
const char Credits[] = AUTHOR_STRING_1 " " VERSION_STRING_1;
|
|
||||||
#else
|
#else
|
||||||
const char Version[] = AUTHOR_STRING VER;
|
const char Version[] = AUTHOR_STRING VER;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user