4
Makefile
4
Makefile
@@ -4,7 +4,7 @@
|
|||||||
# 1 = enable
|
# 1 = enable
|
||||||
|
|
||||||
# ---- STOCK QUANSHENG FERATURES ----
|
# ---- STOCK QUANSHENG FERATURES ----
|
||||||
ENABLE_FMRADIO ?= 1
|
ENABLE_FMRADIO ?= 0
|
||||||
ENABLE_UART ?= 1
|
ENABLE_UART ?= 1
|
||||||
ENABLE_AIRCOPY ?= 0
|
ENABLE_AIRCOPY ?= 0
|
||||||
ENABLE_NOAA ?= 0
|
ENABLE_NOAA ?= 0
|
||||||
@@ -213,7 +213,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.8.1
|
VERSION_STRING_2 ?= v3.0
|
||||||
|
|
||||||
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)
|
||||||
|
28
README.md
28
README.md
@@ -41,6 +41,7 @@ Special thanks to Jean-Cyrille F6IWW, Fabrice 14RC123, David F4BPP, Olivier 14RC
|
|||||||
|
|
||||||
* improve default power settings level (Low ~125mW, Mid ~2W and High ~5W),
|
* improve default power settings level (Low ~125mW, Mid ~2W and High ~5W),
|
||||||
* improve s-meter (IARU recommandations),
|
* improve s-meter (IARU recommandations),
|
||||||
|
* improve bandscope (Spectrum Analyser) and add channel name,
|
||||||
* improve UI:
|
* improve UI:
|
||||||
* menu index is always visible, even if a menu is selected,
|
* menu index is always visible, even if a menu is selected,
|
||||||
* s-meter new design (Classic or Tiny),
|
* s-meter new design (Classic or Tiny),
|
||||||
@@ -56,8 +57,9 @@ Special thanks to Jean-Cyrille F6IWW, Fabrice 14RC123, David F4BPP, Olivier 14RC
|
|||||||
* move BatTxt menu from 34/63 to 30/63 (just after BatSave menu 29/63),
|
* move BatTxt menu from 34/63 to 30/63 (just after BatSave menu 29/63),
|
||||||
* rename BackLt to BLTime,
|
* rename BackLt to BLTime,
|
||||||
* rename BltTRX to BLTxRx,
|
* rename BltTRX to BLTxRx,
|
||||||
|
* improve memory channel input,
|
||||||
* and more...
|
* and more...
|
||||||
* new menu entries:
|
* new menu entries and changes:
|
||||||
* 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),
|
||||||
* add SetPtt menu to set PTT mode (Classic or OnePush),
|
* add SetPtt menu to set PTT mode (Classic or OnePush),
|
||||||
* add SetTot menu to set TOT alert (Off, Sound, Visual, All),
|
* add SetTot menu to set TOT alert (Off, Sound, Visual, All),
|
||||||
@@ -71,11 +73,27 @@ Special thanks to Jean-Cyrille F6IWW, Fabrice 14RC123, David F4BPP, Olivier 14RC
|
|||||||
* improve PonMsg menu,
|
* improve PonMsg menu,
|
||||||
* improve BackLt menu,
|
* improve BackLt menu,
|
||||||
* improve TxTOut menu,
|
* improve TxTOut menu,
|
||||||
* improve status bar,
|
* add PMR 446 F Lock band,
|
||||||
|
* add HAM CA F Lock band (for Canadian zone),
|
||||||
|
* add GMRS/FRS/MURS F Lock (for North America zone),
|
||||||
|
* remove blink and SOS functionality,
|
||||||
|
* remove AM Fix menu (AM Fix is ENABLED by default).
|
||||||
|
* improve status bar:
|
||||||
* add SetPtt mode in status bar,
|
* add SetPtt mode in status bar,
|
||||||
* change font and bitmaps,
|
* change font and bitmaps,
|
||||||
* move USB icon to left of battery information,
|
* move USB icon to left of battery information,
|
||||||
* add RX and TX timers,
|
* add RX and TX timers,
|
||||||
|
* improve lists and scan lists options:
|
||||||
|
* add new list 3
|
||||||
|
* add new list 0 (channel without list...)
|
||||||
|
* add new scan lists options
|
||||||
|
* scan list 0 (all channels without list)
|
||||||
|
* scan list 1
|
||||||
|
* scan list 2
|
||||||
|
* scan list 3
|
||||||
|
* scan lists [1, 2, 3]
|
||||||
|
* scan all (all channels with ou without list)
|
||||||
|
* add scan list shortcuts
|
||||||
* new actions:
|
* new actions:
|
||||||
* RX MODE,
|
* RX MODE,
|
||||||
* MAIN ONLY,
|
* MAIN ONLY,
|
||||||
@@ -87,7 +105,8 @@ Special thanks to Jean-Cyrille F6IWW, Fabrice 14RC123, David F4BPP, Olivier 14RC
|
|||||||
* 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 + 8 to quickly switch backlight between BLMin and BLMax on demand (this bypass BackLt strategy),
|
||||||
* add F + 9 to return to BackLt strategy,
|
* add F + 9 to return to BackLt strategy,
|
||||||
* add long press on MENU, in * SCAN mode, to temporarily exclude a memory channel if (not working with * SCAN ALL).
|
* add long press on MENU, in * SCAN mode, to temporarily exclude a memory channel if (not working with * SCAN ALL),
|
||||||
|
* add short press on [0, 1, 2, 3, 4 or 5], in * SCAN mode, to dynamically change scan list.
|
||||||
* many fix:
|
* many fix:
|
||||||
* squelch,
|
* squelch,
|
||||||
* s-meter,
|
* s-meter,
|
||||||
@@ -95,12 +114,11 @@ Special thanks to Jean-Cyrille F6IWW, Fabrice 14RC123, David F4BPP, Olivier 14RC
|
|||||||
* scan list 2 ignored,
|
* scan list 2 ignored,
|
||||||
* scan range limit,
|
* scan range limit,
|
||||||
* clean display on startup,
|
* clean display on startup,
|
||||||
|
* no more PWM noise,
|
||||||
* and more...
|
* and more...
|
||||||
* 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,
|
||||||
* add PMR 446 F Lock band,
|
|
||||||
* remove blink and SOS functionality,
|
|
||||||
* code refactoring and many memory optimization,
|
* code refactoring and many memory optimization,
|
||||||
* and more...
|
* and more...
|
||||||
|
|
||||||
|
@@ -219,7 +219,7 @@ void ACTION_Scan(bool bRestart)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// channel mode. Keep scanning but toggle between scan lists
|
// channel mode. Keep scanning but toggle between scan lists
|
||||||
gEeprom.SCAN_LIST_DEFAULT = (gEeprom.SCAN_LIST_DEFAULT + 1) % 3;
|
gEeprom.SCAN_LIST_DEFAULT = (gEeprom.SCAN_LIST_DEFAULT + 1) % 6;
|
||||||
|
|
||||||
// jump to the next channel
|
// jump to the next channel
|
||||||
CHFRSCANNER_Start(false, gScanStateDir);
|
CHFRSCANNER_Start(false, gScanStateDir);
|
||||||
|
23
app/app.c
23
app/app.c
@@ -1466,6 +1466,12 @@ void APP_TimeSlice500ms(void)
|
|||||||
{
|
{
|
||||||
if (--gKeyInputCountdown == 0)
|
if (--gKeyInputCountdown == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE) && (gInputBoxIndex == 1 || gInputBoxIndex == 2))
|
||||||
|
{
|
||||||
|
SETTINGS_SaveVfoIndices();
|
||||||
|
}
|
||||||
|
|
||||||
cancelUserInputModes();
|
cancelUserInputModes();
|
||||||
|
|
||||||
if (gBeepToPlay != BEEP_NONE)
|
if (gBeepToPlay != BEEP_NONE)
|
||||||
@@ -1474,6 +1480,20 @@ void APP_TimeSlice500ms(void)
|
|||||||
gBeepToPlay = BEEP_NONE;
|
gBeepToPlay = BEEP_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE)) { // user is entering channel number
|
||||||
|
switch (gInputBoxIndex)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
channelMove(gInputBox[0] - 1, false);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
channelMove(((gInputBox[0] * 10) + gInputBox[1]) - 1, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gDTMF_RX_live_timeout > 0)
|
if (gDTMF_RX_live_timeout > 0)
|
||||||
@@ -1849,7 +1869,8 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Key <= KEY_9 || Key == KEY_F) {
|
if (Key <= KEY_9 || Key == KEY_F) {
|
||||||
if (gScanStateDir != SCAN_OFF || gCssBackgroundScan) { // FREQ/CTCSS/DCS scanning
|
//if (gScanStateDir != SCAN_OFF || gCssBackgroundScan) { // FREQ/CTCSS/DCS scanning
|
||||||
|
if (gCssBackgroundScan) { // FREQ/CTCSS/DCS scanning
|
||||||
if (bKeyPressed && !bKeyHeld)
|
if (bKeyPressed && !bKeyHeld)
|
||||||
AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL);
|
AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL);
|
||||||
return;
|
return;
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
#include "functions.h"
|
#include "functions.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
//#include "debugging.h"
|
||||||
|
|
||||||
int8_t gScanStateDir;
|
int8_t gScanStateDir;
|
||||||
bool gScanKeepResult;
|
bool gScanKeepResult;
|
||||||
@@ -194,12 +195,14 @@ static void NextFreqChannel(void)
|
|||||||
static void NextMemChannel(void)
|
static void NextMemChannel(void)
|
||||||
{
|
{
|
||||||
static unsigned int prev_mr_chan = 0;
|
static unsigned int prev_mr_chan = 0;
|
||||||
const bool enabled = (gEeprom.SCAN_LIST_DEFAULT < 2) ? gEeprom.SCAN_LIST_ENABLED[gEeprom.SCAN_LIST_DEFAULT] : true;
|
const bool enabled = (gEeprom.SCAN_LIST_DEFAULT > 0 && gEeprom.SCAN_LIST_DEFAULT < 4) ? gEeprom.SCAN_LIST_ENABLED[gEeprom.SCAN_LIST_DEFAULT - 1] : true;
|
||||||
const int chan1 = (gEeprom.SCAN_LIST_DEFAULT < 2) ? gEeprom.SCANLIST_PRIORITY_CH1[gEeprom.SCAN_LIST_DEFAULT] : -1;
|
const int chan1 = (gEeprom.SCAN_LIST_DEFAULT > 0 && gEeprom.SCAN_LIST_DEFAULT < 4) ? gEeprom.SCANLIST_PRIORITY_CH1[gEeprom.SCAN_LIST_DEFAULT - 1] : -1;
|
||||||
const int chan2 = (gEeprom.SCAN_LIST_DEFAULT < 2) ? gEeprom.SCANLIST_PRIORITY_CH2[gEeprom.SCAN_LIST_DEFAULT] : -1;
|
const int chan2 = (gEeprom.SCAN_LIST_DEFAULT > 0 && gEeprom.SCAN_LIST_DEFAULT < 4) ? gEeprom.SCANLIST_PRIORITY_CH2[gEeprom.SCAN_LIST_DEFAULT - 1] : -1;
|
||||||
const unsigned int prev_chan = gNextMrChannel;
|
const unsigned int prev_chan = gNextMrChannel;
|
||||||
unsigned int chan = 0;
|
unsigned int chan = 0;
|
||||||
|
|
||||||
|
//char str[64] = "";
|
||||||
|
|
||||||
if (enabled)
|
if (enabled)
|
||||||
{
|
{
|
||||||
switch (currentScanList)
|
switch (currentScanList)
|
||||||
@@ -207,28 +210,49 @@ static void NextMemChannel(void)
|
|||||||
case SCAN_NEXT_CHAN_SCANLIST1:
|
case SCAN_NEXT_CHAN_SCANLIST1:
|
||||||
prev_mr_chan = gNextMrChannel;
|
prev_mr_chan = gNextMrChannel;
|
||||||
|
|
||||||
|
//sprintf(str, "-> Chan1 %d\n", chan1 + 1);
|
||||||
|
//LogUart(str);
|
||||||
|
|
||||||
if (chan1 >= 0)
|
if (chan1 >= 0)
|
||||||
{
|
{
|
||||||
if (RADIO_CheckValidChannel(chan1, false, 0))
|
if (RADIO_CheckValidChannel(chan1, false, gEeprom.SCAN_LIST_DEFAULT))
|
||||||
{
|
{
|
||||||
currentScanList = SCAN_NEXT_CHAN_SCANLIST1;
|
currentScanList = SCAN_NEXT_CHAN_SCANLIST1;
|
||||||
gNextMrChannel = chan1;
|
gNextMrChannel = chan1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
case SCAN_NEXT_CHAN_SCANLIST2:
|
case SCAN_NEXT_CHAN_SCANLIST2:
|
||||||
|
|
||||||
|
//sprintf(str, "-> Chan2 %d\n", chan2 + 1);
|
||||||
|
//LogUart(str);
|
||||||
|
|
||||||
if (chan2 >= 0)
|
if (chan2 >= 0)
|
||||||
{
|
{
|
||||||
if (RADIO_CheckValidChannel(chan2, false, 0))
|
if (RADIO_CheckValidChannel(chan2, false, gEeprom.SCAN_LIST_DEFAULT))
|
||||||
{
|
{
|
||||||
currentScanList = SCAN_NEXT_CHAN_SCANLIST2;
|
currentScanList = SCAN_NEXT_CHAN_SCANLIST2;
|
||||||
gNextMrChannel = chan2;
|
gNextMrChannel = chan2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
|
/*
|
||||||
|
case SCAN_NEXT_CHAN_SCANLIST3:
|
||||||
|
if (chan3 >= 0)
|
||||||
|
{
|
||||||
|
if (RADIO_CheckValidChannel(chan3, false, 0))
|
||||||
|
{
|
||||||
|
currentScanList = SCAN_NEXT_CHAN_SCANLIST3;
|
||||||
|
gNextMrChannel = chan3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[[fallthrough]];
|
||||||
|
*/
|
||||||
// this bit doesn't yet work if the other VFO is a frequency
|
// this bit doesn't yet work if the other VFO is a frequency
|
||||||
case SCAN_NEXT_CHAN_DUAL_WATCH:
|
case SCAN_NEXT_CHAN_DUAL_WATCH:
|
||||||
// dual watch is enabled - include the other VFO in the scan
|
// dual watch is enabled - include the other VFO in the scan
|
||||||
@@ -255,13 +279,16 @@ static void NextMemChannel(void)
|
|||||||
|
|
||||||
if (!enabled || chan == 0xff)
|
if (!enabled || chan == 0xff)
|
||||||
{
|
{
|
||||||
chan = RADIO_FindNextChannel(gNextMrChannel + gScanStateDir, gScanStateDir, (gEeprom.SCAN_LIST_DEFAULT < 2) ? true : false, gEeprom.SCAN_LIST_DEFAULT);
|
chan = RADIO_FindNextChannel(gNextMrChannel + gScanStateDir, gScanStateDir, (gEeprom.SCAN_LIST_DEFAULT < 5) ? true : false, gEeprom.SCAN_LIST_DEFAULT);
|
||||||
if (chan == 0xFF)
|
if (chan == 0xFF)
|
||||||
{ // no valid channel found
|
{ // no valid channel found
|
||||||
chan = MR_CHANNEL_FIRST;
|
chan = MR_CHANNEL_FIRST;
|
||||||
}
|
}
|
||||||
|
|
||||||
gNextMrChannel = chan;
|
gNextMrChannel = chan;
|
||||||
|
|
||||||
|
//sprintf(str, "----> Chan %d\n", chan + 1);
|
||||||
|
//LogUart(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gNextMrChannel != prev_chan)
|
if (gNextMrChannel != prev_chan)
|
||||||
|
102
app/main.c
102
app/main.c
@@ -59,11 +59,21 @@ static void toggle_chan_scanlist(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (gTxVfo->SCANLIST1_PARTICIPATION ^ gTxVfo->SCANLIST2_PARTICIPATION){
|
if (gTxVfo->SCANLIST1_PARTICIPATION ^ gTxVfo->SCANLIST2_PARTICIPATION){
|
||||||
gTxVfo->SCANLIST2_PARTICIPATION = gTxVfo->SCANLIST1_PARTICIPATION;
|
gTxVfo->SCANLIST2_PARTICIPATION = gTxVfo->SCANLIST1_PARTICIPATION;
|
||||||
} else {
|
} else {
|
||||||
gTxVfo->SCANLIST1_PARTICIPATION = !gTxVfo->SCANLIST1_PARTICIPATION;
|
gTxVfo->SCANLIST1_PARTICIPATION = !gTxVfo->SCANLIST1_PARTICIPATION;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
uint8_t scanTmp = gTxVfo->SCANLIST1_PARTICIPATION | (gTxVfo->SCANLIST2_PARTICIPATION << 1) | (gTxVfo->SCANLIST3_PARTICIPATION << 2);
|
||||||
|
|
||||||
|
scanTmp = (scanTmp++ < 7) ? scanTmp: 0;
|
||||||
|
|
||||||
|
gTxVfo->SCANLIST1_PARTICIPATION = (scanTmp >> 0) & 0x01;
|
||||||
|
gTxVfo->SCANLIST2_PARTICIPATION = (scanTmp >> 1) & 0x01;
|
||||||
|
gTxVfo->SCANLIST3_PARTICIPATION = (scanTmp >> 2) & 0x01;
|
||||||
|
|
||||||
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, true, true);
|
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, true, true);
|
||||||
|
|
||||||
@@ -306,6 +316,38 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void channelMove(uint16_t Channel, bool End)
|
||||||
|
{
|
||||||
|
const uint8_t Vfo = gEeprom.TX_VFO;
|
||||||
|
|
||||||
|
if(End)
|
||||||
|
{
|
||||||
|
gInputBoxIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!RADIO_CheckValidChannel(Channel, false, 0)) {
|
||||||
|
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_VOICE
|
||||||
|
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
gEeprom.MrChannel[Vfo] = (uint8_t)Channel;
|
||||||
|
gEeprom.ScreenChannel[Vfo] = (uint8_t)Channel;
|
||||||
|
//gRequestSaveVFO = true;
|
||||||
|
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||||
|
|
||||||
|
RADIO_ConfigureChannel(gEeprom.TX_VFO, gVfoConfigureMode);
|
||||||
|
if(End)
|
||||||
|
{
|
||||||
|
SETTINGS_SaveVfoIndices();
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||||
{
|
{
|
||||||
if (bKeyHeld) { // key held down
|
if (bKeyHeld) { // key held down
|
||||||
@@ -332,6 +374,33 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!gWasFKeyPressed) { // F-key wasn't pressed
|
if (!gWasFKeyPressed) { // F-key wasn't pressed
|
||||||
|
|
||||||
|
if (gScanStateDir != SCAN_OFF){
|
||||||
|
switch(Key) {
|
||||||
|
case KEY_0:
|
||||||
|
gEeprom.SCAN_LIST_DEFAULT = 0;
|
||||||
|
break;
|
||||||
|
case KEY_1:
|
||||||
|
gEeprom.SCAN_LIST_DEFAULT = 1;
|
||||||
|
break;
|
||||||
|
case KEY_2:
|
||||||
|
gEeprom.SCAN_LIST_DEFAULT = 2;
|
||||||
|
break;
|
||||||
|
case KEY_3:
|
||||||
|
gEeprom.SCAN_LIST_DEFAULT = 3;
|
||||||
|
break;
|
||||||
|
case KEY_4:
|
||||||
|
gEeprom.SCAN_LIST_DEFAULT = 4;
|
||||||
|
break;
|
||||||
|
case KEY_5:
|
||||||
|
gEeprom.SCAN_LIST_DEFAULT = 5;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const uint8_t Vfo = gEeprom.TX_VFO;
|
const uint8_t Vfo = gEeprom.TX_VFO;
|
||||||
gKeyInputCountdown = key_input_timeout_500ms;
|
gKeyInputCountdown = key_input_timeout_500ms;
|
||||||
INPUTBOX_Append(Key);
|
INPUTBOX_Append(Key);
|
||||||
@@ -339,6 +408,8 @@ 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...
|
||||||
|
|
||||||
if (gInputBoxIndex != 3) {
|
if (gInputBoxIndex != 3) {
|
||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||||
@@ -347,25 +418,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gInputBoxIndex = 0;
|
channelMove(((gInputBox[0] * 100) + (gInputBox[1] * 10) + gInputBox[2]) - 1, true);
|
||||||
|
|
||||||
const uint16_t Channel = ((gInputBox[0] * 100) + (gInputBox[1] * 10) + gInputBox[2]) - 1;
|
|
||||||
|
|
||||||
if (!RADIO_CheckValidChannel(Channel, false, 0)) {
|
|
||||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef ENABLE_VOICE
|
|
||||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
gEeprom.MrChannel[Vfo] = (uint8_t)Channel;
|
|
||||||
gEeprom.ScreenChannel[Vfo] = (uint8_t)Channel;
|
|
||||||
gRequestSaveVFO = true;
|
|
||||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// #ifdef ENABLE_NOAA
|
// #ifdef ENABLE_NOAA
|
||||||
@@ -538,8 +591,6 @@ static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
|||||||
|
|
||||||
static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
||||||
{
|
{
|
||||||
//static uint8_t block = 0;
|
|
||||||
|
|
||||||
if (bKeyPressed && !bKeyHeld) // menu key pressed
|
if (bKeyPressed && !bKeyHeld) // menu key pressed
|
||||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||||
|
|
||||||
@@ -547,21 +598,20 @@ static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
|||||||
if (bKeyPressed) { // long press MENU key
|
if (bKeyPressed) { // long press MENU key
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
if(gScanStateDir != SCAN_OFF && gEeprom.SCAN_LIST_DEFAULT < 2)
|
// Exclude work with list 1, 2, 3 or all list
|
||||||
|
if(gScanStateDir != SCAN_OFF && (gEeprom.SCAN_LIST_DEFAULT > 0 && gEeprom.SCAN_LIST_DEFAULT < 5))
|
||||||
{
|
{
|
||||||
if(FUNCTION_IsRx())
|
if(FUNCTION_IsRx())
|
||||||
{
|
{
|
||||||
gTxVfo->SCANLIST1_PARTICIPATION = 0;
|
gTxVfo->SCANLIST1_PARTICIPATION = 0;
|
||||||
gTxVfo->SCANLIST2_PARTICIPATION = 0;
|
gTxVfo->SCANLIST2_PARTICIPATION = 0;
|
||||||
|
gTxVfo->SCANLIST3_PARTICIPATION = 0;
|
||||||
|
|
||||||
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, true, false);
|
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, true, false);
|
||||||
|
|
||||||
gVfoConfigureMode = VFO_CONFIGURE;
|
gVfoConfigureMode = VFO_CONFIGURE;
|
||||||
gFlagResetVfos = true;
|
gFlagResetVfos = true;
|
||||||
|
|
||||||
//block++;
|
|
||||||
//gDebug = block;
|
|
||||||
|
|
||||||
lastFoundFrqOrChan = lastFoundFrqOrChanOld;
|
lastFoundFrqOrChan = lastFoundFrqOrChanOld;
|
||||||
|
|
||||||
CHFRSCANNER_ContinueScanning();
|
CHFRSCANNER_ContinueScanning();
|
||||||
@@ -678,7 +728,7 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
|||||||
gRequestDisplayScreen = DISPLAY_SCANNER;
|
gRequestDisplayScreen = DISPLAY_SCANNER;
|
||||||
}
|
}
|
||||||
|
|
||||||
gPttWasReleased = true;
|
//gPttWasReleased = true; Fixed issue #138
|
||||||
gUpdateStatus = true;
|
gUpdateStatus = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#include "driver/keyboard.h"
|
#include "driver/keyboard.h"
|
||||||
|
|
||||||
void MAIN_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld);
|
void MAIN_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld);
|
||||||
|
void channelMove(uint16_t Channel, bool End);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
64
app/menu.c
64
app/menu.c
@@ -225,8 +225,10 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
|||||||
*pMax = ARRAY_SIZE(gSubMenu_RX_TX) - 1;
|
*pMax = ARRAY_SIZE(gSubMenu_RX_TX) - 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef ENABLE_AM_FIX
|
#ifndef ENABLE_FEAT_F4HWN
|
||||||
case MENU_AM_FIX:
|
#ifdef ENABLE_AM_FIX
|
||||||
|
case MENU_AM_FIX:
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_AUDIO_BAR
|
#ifdef ENABLE_AUDIO_BAR
|
||||||
case MENU_MIC_BAR:
|
case MENU_MIC_BAR:
|
||||||
@@ -236,6 +238,7 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
|||||||
case MENU_AUTOLK:
|
case MENU_AUTOLK:
|
||||||
case MENU_S_ADD1:
|
case MENU_S_ADD1:
|
||||||
case MENU_S_ADD2:
|
case MENU_S_ADD2:
|
||||||
|
case MENU_S_ADD3:
|
||||||
case MENU_STE:
|
case MENU_STE:
|
||||||
case MENU_D_ST:
|
case MENU_D_ST:
|
||||||
#ifdef ENABLE_DTMF_CALLING
|
#ifdef ENABLE_DTMF_CALLING
|
||||||
@@ -291,6 +294,7 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
|||||||
|
|
||||||
case MENU_SLIST1:
|
case MENU_SLIST1:
|
||||||
case MENU_SLIST2:
|
case MENU_SLIST2:
|
||||||
|
case MENU_SLIST3:
|
||||||
*pMin = -1;
|
*pMin = -1;
|
||||||
*pMax = MR_CHANNEL_LAST;
|
*pMax = MR_CHANNEL_LAST;
|
||||||
break;
|
break;
|
||||||
@@ -307,7 +311,7 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
|||||||
|
|
||||||
case MENU_S_LIST:
|
case MENU_S_LIST:
|
||||||
//*pMin = 0;
|
//*pMin = 0;
|
||||||
*pMax = 2;
|
*pMax = 5;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef ENABLE_DTMF_CALLING
|
#ifdef ENABLE_DTMF_CALLING
|
||||||
@@ -636,6 +640,13 @@ void MENU_AcceptSetting(void)
|
|||||||
gFlagResetVfos = true;
|
gFlagResetVfos = true;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case MENU_S_ADD3:
|
||||||
|
gTxVfo->SCANLIST3_PARTICIPATION = gSubMenuSelection;
|
||||||
|
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, false, true);
|
||||||
|
gVfoConfigureMode = VFO_CONFIGURE;
|
||||||
|
gFlagResetVfos = true;
|
||||||
|
return;
|
||||||
|
|
||||||
case MENU_STE:
|
case MENU_STE:
|
||||||
gEeprom.TAIL_TONE_ELIMINATION = gSubMenuSelection;
|
gEeprom.TAIL_TONE_ELIMINATION = gSubMenuSelection;
|
||||||
break;
|
break;
|
||||||
@@ -748,12 +759,14 @@ void MENU_AcceptSetting(void)
|
|||||||
gRequestSaveChannel = 1;
|
gRequestSaveChannel = 1;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef ENABLE_AM_FIX
|
#ifndef ENABLE_FEAT_F4HWN
|
||||||
case MENU_AM_FIX:
|
#ifdef ENABLE_AM_FIX
|
||||||
gSetting_AM_fix = gSubMenuSelection;
|
case MENU_AM_FIX:
|
||||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
gSetting_AM_fix = gSubMenuSelection;
|
||||||
gFlagResetVfos = true;
|
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||||
break;
|
gFlagResetVfos = true;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
@@ -1083,6 +1096,10 @@ void MENU_ShowCurrentSetting(void)
|
|||||||
gSubMenuSelection = gTxVfo->SCANLIST2_PARTICIPATION;
|
gSubMenuSelection = gTxVfo->SCANLIST2_PARTICIPATION;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MENU_S_ADD3:
|
||||||
|
gSubMenuSelection = gTxVfo->SCANLIST3_PARTICIPATION;
|
||||||
|
break;
|
||||||
|
|
||||||
case MENU_STE:
|
case MENU_STE:
|
||||||
gSubMenuSelection = gEeprom.TAIL_TONE_ELIMINATION;
|
gSubMenuSelection = gEeprom.TAIL_TONE_ELIMINATION;
|
||||||
break;
|
break;
|
||||||
@@ -1114,11 +1131,15 @@ void MENU_ShowCurrentSetting(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_SLIST1:
|
case MENU_SLIST1:
|
||||||
gSubMenuSelection = RADIO_FindNextChannel(0, 1, true, 0);
|
gSubMenuSelection = RADIO_FindNextChannel(0, 1, true, 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_SLIST2:
|
case MENU_SLIST2:
|
||||||
gSubMenuSelection = RADIO_FindNextChannel(0, 1, true, 1);
|
gSubMenuSelection = RADIO_FindNextChannel(0, 1, true, 2);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MENU_SLIST3:
|
||||||
|
gSubMenuSelection = RADIO_FindNextChannel(0, 1, true, 3);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef ENABLE_ALARM
|
#ifdef ENABLE_ALARM
|
||||||
@@ -1177,11 +1198,14 @@ void MENU_ShowCurrentSetting(void)
|
|||||||
gSubMenuSelection = gTxVfo->Modulation;
|
gSubMenuSelection = gTxVfo->Modulation;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef ENABLE_AM_FIX
|
#ifndef ENABLE_FEAT_F4HWN
|
||||||
case MENU_AM_FIX:
|
#ifdef ENABLE_AM_FIX
|
||||||
gSubMenuSelection = gSetting_AM_fix;
|
case MENU_AM_FIX:
|
||||||
break;
|
gSubMenuSelection = gSetting_AM_fix;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
case MENU_NOAA_S:
|
case MENU_NOAA_S:
|
||||||
gSubMenuSelection = gEeprom.NOAA_AUTO_SCAN;
|
gSubMenuSelection = gEeprom.NOAA_AUTO_SCAN;
|
||||||
@@ -1797,10 +1821,16 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
|||||||
bCheckScanList = false;
|
bCheckScanList = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MENU_SLIST3:
|
||||||
|
bCheckScanList = true;
|
||||||
|
VFO = 3;
|
||||||
|
break;
|
||||||
case MENU_SLIST2:
|
case MENU_SLIST2:
|
||||||
VFO = 1;
|
bCheckScanList = true;
|
||||||
[[fallthrough]];
|
VFO = 2;
|
||||||
|
break;
|
||||||
case MENU_SLIST1:
|
case MENU_SLIST1:
|
||||||
|
VFO = 1;
|
||||||
bCheckScanList = true;
|
bCheckScanList = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -66,7 +66,7 @@ static uint16_t blacklistFreqs[15];
|
|||||||
static uint8_t blacklistFreqsIdx;
|
static uint8_t blacklistFreqsIdx;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *bwOptions[] = {" 25k", "12.5k", "6.25k"};
|
const char *bwOptions[] = {"25", "12.5", "6.25"};
|
||||||
const uint8_t modulationTypeTuneSteps[] = {100, 50, 10};
|
const uint8_t modulationTypeTuneSteps[] = {100, 50, 10};
|
||||||
const uint8_t modTypeReg47Values[] = {1, 7, 5};
|
const uint8_t modTypeReg47Values[] = {1, 7, 5};
|
||||||
|
|
||||||
@@ -671,9 +671,10 @@ static void Blacklist() {
|
|||||||
#ifdef ENABLE_SCAN_RANGES
|
#ifdef ENABLE_SCAN_RANGES
|
||||||
static bool IsBlacklisted(uint16_t idx)
|
static bool IsBlacklisted(uint16_t idx)
|
||||||
{
|
{
|
||||||
for(uint8_t i = 0; i < ARRAY_SIZE(blacklistFreqs); i++)
|
if(blacklistFreqs[0]) // cheaper than checking blacklistFreqsIdx
|
||||||
if(blacklistFreqs[i] == idx)
|
for(uint8_t i = 0; i < ARRAY_SIZE(blacklistFreqs); i++)
|
||||||
return true;
|
if(blacklistFreqs[i] == idx)
|
||||||
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -778,7 +779,7 @@ static void DrawF(uint32_t f) {
|
|||||||
|
|
||||||
sprintf(String, "%3s", gModulationStr[settings.modulationType]);
|
sprintf(String, "%3s", gModulationStr[settings.modulationType]);
|
||||||
GUI_DisplaySmallest(String, 116, 1, false, true);
|
GUI_DisplaySmallest(String, 116, 1, false, true);
|
||||||
sprintf(String, "%s", bwOptions[settings.listenBw]);
|
sprintf(String, "%4sk", bwOptions[settings.listenBw]);
|
||||||
GUI_DisplaySmallest(String, 108, 7, false, true);
|
GUI_DisplaySmallest(String, 108, 7, false, true);
|
||||||
|
|
||||||
#ifndef ENABLE_FMRADIO
|
#ifndef ENABLE_FMRADIO
|
||||||
|
BIN
archive/f4hwn.bandscope.packed.v3.0.bin
Normal file
BIN
archive/f4hwn.bandscope.packed.v3.0.bin
Normal file
Binary file not shown.
BIN
archive/f4hwn.broadcast.packed.v3.0.bin
Normal file
BIN
archive/f4hwn.broadcast.packed.v3.0.bin
Normal file
Binary file not shown.
95
bitmaps.c
95
bitmaps.c
@@ -38,19 +38,6 @@ const uint8_t gFontKeyLock[1][9] =
|
|||||||
{0x7c, 0x46, 0x45, 0x45, 0x45, 0x45, 0x45, 0x46, 0x7c}
|
{0x7c, 0x46, 0x45, 0x45, 0x45, 0x45, 0x45, 0x46, 0x7c}
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t gFontScanAll[9] =
|
|
||||||
{
|
|
||||||
0b00111110,
|
|
||||||
0b01000001,
|
|
||||||
0b01000001,
|
|
||||||
0b00100010,
|
|
||||||
0b00011100,
|
|
||||||
0b00100010,
|
|
||||||
0b01000001,
|
|
||||||
0b01000001,
|
|
||||||
0b00111110
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint8_t gFontLight[9] =
|
const uint8_t gFontLight[9] =
|
||||||
{
|
{
|
||||||
0b00001100,
|
0b00001100,
|
||||||
@@ -172,8 +159,53 @@ const uint8_t BITMAP_VFO_NotDefault[8] =
|
|||||||
0b00001000
|
0b00001000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_ScanList0[7] =
|
||||||
|
{ // '0' symbol
|
||||||
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b01000011,
|
||||||
|
0b01011101,
|
||||||
|
0b01100001,
|
||||||
|
0b01111111,
|
||||||
|
0b01111111
|
||||||
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_ScanList1[7] =
|
const uint8_t BITMAP_ScanList1[7] =
|
||||||
{ // 'I' symbol
|
{ // '1' symbol
|
||||||
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b01111011,
|
||||||
|
0b01000001,
|
||||||
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b01111111
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_ScanList2[7] =
|
||||||
|
{ // '2' symbol
|
||||||
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b01001101,
|
||||||
|
0b01010101,
|
||||||
|
0b01011011,
|
||||||
|
0b01111111,
|
||||||
|
0b01111111
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_ScanList3[7] =
|
||||||
|
{ // '3' symbol
|
||||||
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b01011101,
|
||||||
|
0b01010101,
|
||||||
|
0b01101011,
|
||||||
|
0b01111111,
|
||||||
|
0b01111111
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_ScanList123[19] =
|
||||||
|
{
|
||||||
|
// 'All' symbol
|
||||||
0b01111111,
|
0b01111111,
|
||||||
0b01111111,
|
0b01111111,
|
||||||
0b01111011,
|
0b01111011,
|
||||||
@@ -181,17 +213,42 @@ const uint8_t BITMAP_ScanList1[7] =
|
|||||||
0b01111111,
|
0b01111111,
|
||||||
0b01111111,
|
0b01111111,
|
||||||
0b01111111,
|
0b01111111,
|
||||||
};
|
|
||||||
|
|
||||||
const uint8_t BITMAP_ScanList2[7] =
|
|
||||||
{ // 'II' symbol
|
|
||||||
0b01111111,
|
|
||||||
0b01111111,
|
0b01111111,
|
||||||
0b01001101,
|
0b01001101,
|
||||||
0b01010101,
|
0b01010101,
|
||||||
0b01011011,
|
0b01011011,
|
||||||
0b01111111,
|
0b01111111,
|
||||||
0b01111111,
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b01011101,
|
||||||
|
0b01010101,
|
||||||
|
0b01101011,
|
||||||
|
0b01111111,
|
||||||
|
0b01111111
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t BITMAP_ScanListAll[19] =
|
||||||
|
{
|
||||||
|
// 'All' symbol
|
||||||
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b01000011,
|
||||||
|
0b01110101,
|
||||||
|
0b01000011,
|
||||||
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b01000001,
|
||||||
|
0b01011111,
|
||||||
|
0b01011111,
|
||||||
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b01111111,
|
||||||
|
0b01000001,
|
||||||
|
0b01011111,
|
||||||
|
0b01011111,
|
||||||
|
0b01111111,
|
||||||
|
0b01111111
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t BITMAP_compand[6] =
|
const uint8_t BITMAP_compand[6] =
|
||||||
|
@@ -11,7 +11,6 @@ extern const uint8_t gFontF[1][8];
|
|||||||
extern const uint8_t gFontS[1][6];
|
extern const uint8_t gFontS[1][6];
|
||||||
|
|
||||||
extern const uint8_t gFontKeyLock[1][9];
|
extern const uint8_t gFontKeyLock[1][9];
|
||||||
extern const uint8_t gFontScanAll[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];
|
||||||
@@ -31,8 +30,12 @@ extern const uint8_t BITMAP_Ready[7];
|
|||||||
extern const uint8_t BITMAP_Antenna[5];
|
extern const uint8_t BITMAP_Antenna[5];
|
||||||
extern const uint8_t BITMAP_VFO_Default[8];
|
extern const uint8_t BITMAP_VFO_Default[8];
|
||||||
extern const uint8_t BITMAP_VFO_NotDefault[8];
|
extern const uint8_t BITMAP_VFO_NotDefault[8];
|
||||||
|
extern const uint8_t BITMAP_ScanList0[7];
|
||||||
extern const uint8_t BITMAP_ScanList1[7];
|
extern const uint8_t BITMAP_ScanList1[7];
|
||||||
extern const uint8_t BITMAP_ScanList2[7];
|
extern const uint8_t BITMAP_ScanList2[7];
|
||||||
|
extern const uint8_t BITMAP_ScanList3[7];
|
||||||
|
extern const uint8_t BITMAP_ScanList123[19];
|
||||||
|
extern const uint8_t BITMAP_ScanListAll[19];
|
||||||
extern const uint8_t BITMAP_compand[6];
|
extern const uint8_t BITMAP_compand[6];
|
||||||
|
|
||||||
#ifndef ENABLE_CUSTOM_MENU_LAYOUT
|
#ifndef ENABLE_CUSTOM_MENU_LAYOUT
|
||||||
|
@@ -146,8 +146,11 @@ static uint8_t currentBrightness;
|
|||||||
|
|
||||||
void BACKLIGHT_SetBrightness(uint8_t brigtness)
|
void BACKLIGHT_SetBrightness(uint8_t brigtness)
|
||||||
{
|
{
|
||||||
|
const uint8_t value[] = {0, 3, 6, 9, 15, 24, 38, 62, 100, 159, 255};
|
||||||
|
|
||||||
currentBrightness = brigtness;
|
currentBrightness = brigtness;
|
||||||
PWM_PLUS0_CH0_COMP = (1 << brigtness) - 1;
|
PWM_PLUS0_CH0_COMP = value[brigtness] * 4;
|
||||||
|
//PWM_PLUS0_CH0_COMP = (1 << brigtness) - 1;
|
||||||
//PWM_PLUS0_SWLOAD = 1;
|
//PWM_PLUS0_SWLOAD = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -227,6 +227,29 @@ int32_t TX_freq_check(const uint32_t Frequency)
|
|||||||
if (Frequency >= 44600625 && Frequency <= 44619375)
|
if (Frequency >= 44600625 && Frequency <= 44619375)
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case F_LOCK_GMRS_FRS_MURS:
|
||||||
|
// https://forums.radioreference.com/threads/the-great-unofficial-radioreference-frs-gmrs-murs-fact-sheet.275370/
|
||||||
|
if (Frequency >= 46256250 && Frequency <= 46271250) // FRS/GMRS
|
||||||
|
return 0;
|
||||||
|
if (Frequency >= 46756250 && Frequency <= 46771250) // FRS ONLY
|
||||||
|
return 0;
|
||||||
|
if (Frequency >= 46255000 && Frequency <= 46272500) // GMRS ONLY
|
||||||
|
return 0;
|
||||||
|
if (Frequency == 15182000 ||
|
||||||
|
Frequency == 15188000 ||
|
||||||
|
Frequency == 15194000 ||
|
||||||
|
Frequency == 15457000 ||
|
||||||
|
Frequency == 15460000) // MURS
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case F_LOCK_CA:
|
||||||
|
if (Frequency >= 14400000 && Frequency < 14800000)
|
||||||
|
return 0;
|
||||||
|
if (Frequency >= 43000000 && Frequency < 45000000)
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case F_LOCK_ALL:
|
case F_LOCK_ALL:
|
||||||
|
2
misc.c
2
misc.c
@@ -101,7 +101,7 @@ bool gSetting_ScrambleEnable;
|
|||||||
enum BacklightOnRxTx_t gSetting_backlight_on_tx_rx;
|
enum BacklightOnRxTx_t gSetting_backlight_on_tx_rx;
|
||||||
|
|
||||||
#ifdef ENABLE_AM_FIX
|
#ifdef ENABLE_AM_FIX
|
||||||
bool gSetting_AM_fix;
|
bool gSetting_AM_fix = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
|
5
misc.h
5
misc.h
@@ -195,10 +195,11 @@ extern uint16_t gEEPROM_1F8C;
|
|||||||
typedef union {
|
typedef union {
|
||||||
struct {
|
struct {
|
||||||
uint8_t
|
uint8_t
|
||||||
band : 4,
|
band : 3,
|
||||||
compander : 2,
|
compander : 2,
|
||||||
|
scanlist1 : 1,
|
||||||
scanlist2 : 1,
|
scanlist2 : 1,
|
||||||
scanlist1 : 1;
|
scanlist3 : 1;
|
||||||
};
|
};
|
||||||
uint8_t __val;
|
uint8_t __val;
|
||||||
} ChannelAttributes_t;
|
} ChannelAttributes_t;
|
||||||
|
46
radio.c
46
radio.c
@@ -67,14 +67,46 @@ bool RADIO_CheckValidChannel(uint16_t channel, bool checkScanList, uint8_t scanL
|
|||||||
if (att.band > BAND7_470MHz)
|
if (att.band > BAND7_470MHz)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!checkScanList || scanList > 1)
|
if (!checkScanList || scanList > 4)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (scanList ? !att.scanlist2 : !att.scanlist1)
|
/*
|
||||||
|
if(scanList == 0 && (att.scanlist1 == 1 || att.scanlist2 == 1 || att.scanlist3 == 1))
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
else if(scanList == 1 && att.scanlist1 != 1)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if(scanList == 2 && att.scanlist2 != 1)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if(scanList == 3 && att.scanlist3 != 1)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if(scanList == 4 && (att.scanlist1 == 0 && att.scanlist2 == 0 && att.scanlist3 == 0))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
const uint8_t PriorityCh1 = gEeprom.SCANLIST_PRIORITY_CH1[scanList];
|
if ((scanList == 0 && (att.scanlist1 == 1 || att.scanlist2 == 1 || att.scanlist3 == 1)) ||
|
||||||
const uint8_t PriorityCh2 = gEeprom.SCANLIST_PRIORITY_CH2[scanList];
|
(scanList == 1 && att.scanlist1 != 1) ||
|
||||||
|
(scanList == 2 && att.scanlist2 != 1) ||
|
||||||
|
(scanList == 3 && att.scanlist3 != 1) ||
|
||||||
|
(scanList == 4 && (att.scanlist1 == 0 && att.scanlist2 == 0 && att.scanlist3 == 0))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//return true;
|
||||||
|
|
||||||
|
// I don't understand what this code is for...
|
||||||
|
|
||||||
|
const uint8_t PriorityCh1 = gEeprom.SCANLIST_PRIORITY_CH1[scanList - 1];
|
||||||
|
const uint8_t PriorityCh2 = gEeprom.SCANLIST_PRIORITY_CH2[scanList - 1];
|
||||||
|
|
||||||
return PriorityCh1 != channel && PriorityCh2 != channel;
|
return PriorityCh1 != channel && PriorityCh2 != channel;
|
||||||
}
|
}
|
||||||
@@ -103,6 +135,7 @@ void RADIO_InitInfo(VFO_Info_t *pInfo, const uint8_t ChannelSave, const uint32_t
|
|||||||
pInfo->Band = FREQUENCY_GetBand(Frequency);
|
pInfo->Band = FREQUENCY_GetBand(Frequency);
|
||||||
pInfo->SCANLIST1_PARTICIPATION = false;
|
pInfo->SCANLIST1_PARTICIPATION = false;
|
||||||
pInfo->SCANLIST2_PARTICIPATION = false;
|
pInfo->SCANLIST2_PARTICIPATION = false;
|
||||||
|
pInfo->SCANLIST3_PARTICIPATION = false;
|
||||||
pInfo->STEP_SETTING = STEP_12_5kHz;
|
pInfo->STEP_SETTING = STEP_12_5kHz;
|
||||||
pInfo->StepFrequency = gStepFrequencyTable[pInfo->STEP_SETTING];
|
pInfo->StepFrequency = gStepFrequencyTable[pInfo->STEP_SETTING];
|
||||||
pInfo->CHANNEL_SAVE = ChannelSave;
|
pInfo->CHANNEL_SAVE = ChannelSave;
|
||||||
@@ -186,19 +219,24 @@ void RADIO_ConfigureChannel(const unsigned int VFO, const unsigned int configure
|
|||||||
|
|
||||||
bool bParticipation1;
|
bool bParticipation1;
|
||||||
bool bParticipation2;
|
bool bParticipation2;
|
||||||
|
bool bParticipation3;
|
||||||
|
|
||||||
if (IS_MR_CHANNEL(channel)) {
|
if (IS_MR_CHANNEL(channel)) {
|
||||||
bParticipation1 = att.scanlist1;
|
bParticipation1 = att.scanlist1;
|
||||||
bParticipation2 = att.scanlist2;
|
bParticipation2 = att.scanlist2;
|
||||||
|
bParticipation3 = att.scanlist3;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
band = channel - FREQ_CHANNEL_FIRST;
|
band = channel - FREQ_CHANNEL_FIRST;
|
||||||
bParticipation1 = true;
|
bParticipation1 = true;
|
||||||
bParticipation2 = true;
|
bParticipation2 = true;
|
||||||
|
bParticipation3 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
pVfo->Band = band;
|
pVfo->Band = band;
|
||||||
pVfo->SCANLIST1_PARTICIPATION = bParticipation1;
|
pVfo->SCANLIST1_PARTICIPATION = bParticipation1;
|
||||||
pVfo->SCANLIST2_PARTICIPATION = bParticipation2;
|
pVfo->SCANLIST2_PARTICIPATION = bParticipation2;
|
||||||
|
pVfo->SCANLIST3_PARTICIPATION = bParticipation3;
|
||||||
pVfo->CHANNEL_SAVE = channel;
|
pVfo->CHANNEL_SAVE = channel;
|
||||||
|
|
||||||
uint16_t base;
|
uint16_t base;
|
||||||
|
1
radio.h
1
radio.h
@@ -116,6 +116,7 @@ typedef struct VFO_Info_t
|
|||||||
|
|
||||||
uint8_t SCANLIST1_PARTICIPATION;
|
uint8_t SCANLIST1_PARTICIPATION;
|
||||||
uint8_t SCANLIST2_PARTICIPATION;
|
uint8_t SCANLIST2_PARTICIPATION;
|
||||||
|
uint8_t SCANLIST3_PARTICIPATION;
|
||||||
|
|
||||||
uint8_t Band;
|
uint8_t Band;
|
||||||
#ifdef ENABLE_DTMF_CALLING
|
#ifdef ENABLE_DTMF_CALLING
|
||||||
|
75
settings.c
75
settings.c
@@ -225,11 +225,33 @@ void SETTINGS_InitEEPROM(void)
|
|||||||
|
|
||||||
// 0F18..0F1F
|
// 0F18..0F1F
|
||||||
EEPROM_ReadBuffer(0x0F18, Data, 8);
|
EEPROM_ReadBuffer(0x0F18, Data, 8);
|
||||||
gEeprom.SCAN_LIST_DEFAULT = (Data[0] < 3) ? Data[0] : 0; // we now have 'all' channel scan option
|
gEeprom.SCAN_LIST_DEFAULT = (Data[0] < 5) ? Data[0] : 0; // we now have 'all' channel scan option
|
||||||
for (unsigned int i = 0; i < 2; i++)
|
|
||||||
|
// Fake data
|
||||||
|
/*
|
||||||
|
gEeprom.SCAN_LIST_ENABLED[0] = 0;
|
||||||
|
gEeprom.SCAN_LIST_ENABLED[1] = 0;
|
||||||
|
gEeprom.SCAN_LIST_ENABLED[2] = 0;
|
||||||
|
|
||||||
|
gEeprom.SCANLIST_PRIORITY_CH1[0] = 0;
|
||||||
|
gEeprom.SCANLIST_PRIORITY_CH2[0] = 2;
|
||||||
|
|
||||||
|
gEeprom.SCANLIST_PRIORITY_CH1[1] = 14;
|
||||||
|
gEeprom.SCANLIST_PRIORITY_CH2[1] = 15;
|
||||||
|
|
||||||
|
gEeprom.SCANLIST_PRIORITY_CH1[2] = 40;
|
||||||
|
gEeprom.SCANLIST_PRIORITY_CH2[2] = 41;
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Fix me probably after Chirp update...
|
||||||
|
for (unsigned int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
const unsigned int j = 1 + (i * 3);
|
gEeprom.SCAN_LIST_ENABLED[i] = (Data[1] >> i) & 1;
|
||||||
gEeprom.SCAN_LIST_ENABLED[i] = (Data[j + 0] < 2) ? Data[j] : false;
|
}
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
const unsigned int j = 1 + (i * 2);
|
||||||
gEeprom.SCANLIST_PRIORITY_CH1[i] = Data[j + 1];
|
gEeprom.SCANLIST_PRIORITY_CH1[i] = Data[j + 1];
|
||||||
gEeprom.SCANLIST_PRIORITY_CH2[i] = Data[j + 2];
|
gEeprom.SCANLIST_PRIORITY_CH2[i] = Data[j + 2];
|
||||||
}
|
}
|
||||||
@@ -257,8 +279,10 @@ void SETTINGS_InitEEPROM(void)
|
|||||||
#ifdef ENABLE_AUDIO_BAR
|
#ifdef ENABLE_AUDIO_BAR
|
||||||
gSetting_mic_bar = !!(Data[7] & (1u << 4));
|
gSetting_mic_bar = !!(Data[7] & (1u << 4));
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_AM_FIX
|
#ifndef ENABLE_FEAT_F4HWN
|
||||||
gSetting_AM_fix = !!(Data[7] & (1u << 5));
|
#ifdef ENABLE_AM_FIX
|
||||||
|
gSetting_AM_fix = !!(Data[7] & (1u << 5));
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
gSetting_backlight_on_tx_rx = (Data[7] >> 6) & 3u;
|
gSetting_backlight_on_tx_rx = (Data[7] >> 6) & 3u;
|
||||||
|
|
||||||
@@ -274,7 +298,7 @@ void SETTINGS_InitEEPROM(void)
|
|||||||
ChannelAttributes_t *att = &gMR_ChannelAttributes[i];
|
ChannelAttributes_t *att = &gMR_ChannelAttributes[i];
|
||||||
if(att->__val == 0xff){
|
if(att->__val == 0xff){
|
||||||
att->__val = 0;
|
att->__val = 0;
|
||||||
att->band = 0xf;
|
att->band = 0x7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -504,6 +528,8 @@ void SETTINGS_SaveVfoIndices(void)
|
|||||||
void SETTINGS_SaveSettings(void)
|
void SETTINGS_SaveSettings(void)
|
||||||
{
|
{
|
||||||
uint8_t State[8];
|
uint8_t State[8];
|
||||||
|
uint8_t tmp = 0;
|
||||||
|
|
||||||
#ifdef ENABLE_PWRON_PASSWORD
|
#ifdef ENABLE_PWRON_PASSWORD
|
||||||
uint32_t Password[2];
|
uint32_t Password[2];
|
||||||
#endif
|
#endif
|
||||||
@@ -615,13 +641,23 @@ void SETTINGS_SaveSettings(void)
|
|||||||
EEPROM_WriteBuffer(0x0ED8, State);
|
EEPROM_WriteBuffer(0x0ED8, State);
|
||||||
|
|
||||||
State[0] = gEeprom.SCAN_LIST_DEFAULT;
|
State[0] = gEeprom.SCAN_LIST_DEFAULT;
|
||||||
State[1] = gEeprom.SCAN_LIST_ENABLED[0];
|
|
||||||
|
tmp = 0;
|
||||||
|
|
||||||
|
if (gEeprom.SCAN_LIST_ENABLED[0] == 1)
|
||||||
|
tmp = tmp | (1 << 0);
|
||||||
|
if (gEeprom.SCAN_LIST_ENABLED[1] == 1)
|
||||||
|
tmp = tmp | (1 << 1);
|
||||||
|
if (gEeprom.SCAN_LIST_ENABLED[2] == 1)
|
||||||
|
tmp = tmp | (1 << 2);
|
||||||
|
|
||||||
|
State[1] = tmp;
|
||||||
State[2] = gEeprom.SCANLIST_PRIORITY_CH1[0];
|
State[2] = gEeprom.SCANLIST_PRIORITY_CH1[0];
|
||||||
State[3] = gEeprom.SCANLIST_PRIORITY_CH2[0];
|
State[3] = gEeprom.SCANLIST_PRIORITY_CH2[0];
|
||||||
State[4] = gEeprom.SCAN_LIST_ENABLED[1];
|
State[4] = gEeprom.SCANLIST_PRIORITY_CH1[1];
|
||||||
State[5] = gEeprom.SCANLIST_PRIORITY_CH1[1];
|
State[5] = gEeprom.SCANLIST_PRIORITY_CH2[1];
|
||||||
State[6] = gEeprom.SCANLIST_PRIORITY_CH2[1];
|
State[6] = gEeprom.SCANLIST_PRIORITY_CH1[2];
|
||||||
State[7] = 0xFF;
|
State[7] = gEeprom.SCANLIST_PRIORITY_CH2[2];
|
||||||
EEPROM_WriteBuffer(0x0F18, State);
|
EEPROM_WriteBuffer(0x0F18, State);
|
||||||
|
|
||||||
memset(State, 0xFF, sizeof(State));
|
memset(State, 0xFF, sizeof(State));
|
||||||
@@ -646,8 +682,10 @@ void SETTINGS_SaveSettings(void)
|
|||||||
#ifdef ENABLE_AUDIO_BAR
|
#ifdef ENABLE_AUDIO_BAR
|
||||||
if (!gSetting_mic_bar) State[7] &= ~(1u << 4);
|
if (!gSetting_mic_bar) State[7] &= ~(1u << 4);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_AM_FIX
|
#ifndef ENABLE_FEAT_F4HWN
|
||||||
if (!gSetting_AM_fix) State[7] &= ~(1u << 5);
|
#ifdef ENABLE_AM_FIX
|
||||||
|
if (!gSetting_AM_fix) State[7] &= ~(1u << 5);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
State[7] = (State[7] & ~(3u << 6)) | ((gSetting_backlight_on_tx_rx & 3u) << 6);
|
State[7] = (State[7] & ~(3u << 6)) | ((gSetting_backlight_on_tx_rx & 3u) << 6);
|
||||||
|
|
||||||
@@ -656,7 +694,7 @@ void SETTINGS_SaveSettings(void)
|
|||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
memset(State, 0xFF, sizeof(State));
|
memset(State, 0xFF, sizeof(State));
|
||||||
|
|
||||||
int tmp = 0;
|
tmp = 0;
|
||||||
|
|
||||||
if(gSetting_set_inv == 1)
|
if(gSetting_set_inv == 1)
|
||||||
tmp = tmp | (1 << 0);
|
tmp = tmp | (1 << 0);
|
||||||
@@ -766,10 +804,11 @@ void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep,
|
|||||||
{
|
{
|
||||||
uint8_t state[8];
|
uint8_t state[8];
|
||||||
ChannelAttributes_t att = {
|
ChannelAttributes_t att = {
|
||||||
.band = 0xf,
|
.band = 0x7,
|
||||||
.compander = 0,
|
.compander = 0,
|
||||||
.scanlist1 = 0,
|
.scanlist1 = 0,
|
||||||
.scanlist2 = 0,
|
.scanlist2 = 0,
|
||||||
|
.scanlist3 = 0,
|
||||||
}; // default attributes
|
}; // default attributes
|
||||||
|
|
||||||
uint16_t offset = 0x0D60 + (channel & ~7u);
|
uint16_t offset = 0x0D60 + (channel & ~7u);
|
||||||
@@ -779,6 +818,7 @@ void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep,
|
|||||||
att.band = pVFO->Band;
|
att.band = pVFO->Band;
|
||||||
att.scanlist1 = pVFO->SCANLIST1_PARTICIPATION;
|
att.scanlist1 = pVFO->SCANLIST1_PARTICIPATION;
|
||||||
att.scanlist2 = pVFO->SCANLIST2_PARTICIPATION;
|
att.scanlist2 = pVFO->SCANLIST2_PARTICIPATION;
|
||||||
|
att.scanlist3 = pVFO->SCANLIST3_PARTICIPATION;
|
||||||
att.compander = pVFO->Compander;
|
att.compander = pVFO->Compander;
|
||||||
if (check && state[channel & 7u] == att.__val)
|
if (check && state[channel & 7u] == att.__val)
|
||||||
return; // no change in the attributes
|
return; // no change in the attributes
|
||||||
@@ -857,6 +897,9 @@ buf[1] = 0
|
|||||||
#ifdef ENABLE_AM_FIX
|
#ifdef ENABLE_AM_FIX
|
||||||
| (1 << 4)
|
| (1 << 4)
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_SPECTRUM
|
||||||
|
| (1 << 5)
|
||||||
|
#endif
|
||||||
;
|
;
|
||||||
EEPROM_WriteBuffer(0x1FF0, buf);
|
EEPROM_WriteBuffer(0x1FF0, buf);
|
||||||
}
|
}
|
10
settings.h
10
settings.h
@@ -41,12 +41,16 @@ typedef enum POWER_OnDisplayMode_t POWER_OnDisplayMode_t;
|
|||||||
enum TxLockModes_t {
|
enum TxLockModes_t {
|
||||||
F_LOCK_DEF, //all default frequencies + configurable
|
F_LOCK_DEF, //all default frequencies + configurable
|
||||||
F_LOCK_FCC,
|
F_LOCK_FCC,
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_PMR
|
||||||
|
F_LOCK_CA,
|
||||||
|
#endif
|
||||||
F_LOCK_CE,
|
F_LOCK_CE,
|
||||||
F_LOCK_GB,
|
F_LOCK_GB,
|
||||||
F_LOCK_430,
|
F_LOCK_430,
|
||||||
F_LOCK_438,
|
F_LOCK_438,
|
||||||
#ifdef ENABLE_FEAT_F4HWN_PMR
|
#ifdef ENABLE_FEAT_F4HWN_PMR
|
||||||
F_LOCK_PMR,
|
F_LOCK_PMR,
|
||||||
|
F_LOCK_GMRS_FRS_MURS,
|
||||||
#endif
|
#endif
|
||||||
F_LOCK_ALL, // disable TX on all frequencies
|
F_LOCK_ALL, // disable TX on all frequencies
|
||||||
F_LOCK_NONE, // enable TX on all frequencies
|
F_LOCK_NONE, // enable TX on all frequencies
|
||||||
@@ -188,9 +192,9 @@ typedef struct {
|
|||||||
uint8_t BACKLIGHT_TIME;
|
uint8_t BACKLIGHT_TIME;
|
||||||
uint8_t SCAN_RESUME_MODE;
|
uint8_t SCAN_RESUME_MODE;
|
||||||
uint8_t SCAN_LIST_DEFAULT;
|
uint8_t SCAN_LIST_DEFAULT;
|
||||||
bool SCAN_LIST_ENABLED[2];
|
bool SCAN_LIST_ENABLED[3];
|
||||||
uint8_t SCANLIST_PRIORITY_CH1[2];
|
uint8_t SCANLIST_PRIORITY_CH1[3];
|
||||||
uint8_t SCANLIST_PRIORITY_CH2[2];
|
uint8_t SCANLIST_PRIORITY_CH2[3];
|
||||||
|
|
||||||
uint8_t field29_0x26;
|
uint8_t field29_0x26;
|
||||||
uint8_t field30_0x27;
|
uint8_t field30_0x27;
|
||||||
|
41
ui/main.c
41
ui/main.c
@@ -892,12 +892,49 @@ void UI_DisplayMain(void)
|
|||||||
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
|
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
|
||||||
{ // it's a channel
|
{ // it's a channel
|
||||||
|
|
||||||
|
uint8_t countList = 0;
|
||||||
|
uint8_t shiftList = 0;
|
||||||
|
|
||||||
// show the scan list assigment symbols
|
// show the scan list assigment symbols
|
||||||
const ChannelAttributes_t att = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]];
|
const ChannelAttributes_t att = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]];
|
||||||
|
|
||||||
if (att.scanlist1)
|
if (att.scanlist1)
|
||||||
memcpy(p_line0 + 113, BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
|
countList++;
|
||||||
if (att.scanlist2)
|
if (att.scanlist2)
|
||||||
memcpy(p_line0 + 120, BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
|
countList++;
|
||||||
|
if (att.scanlist3)
|
||||||
|
countList++;
|
||||||
|
|
||||||
|
shiftList = countList;
|
||||||
|
|
||||||
|
if (att.scanlist1)
|
||||||
|
{
|
||||||
|
memcpy(p_line0 + 127 - (shiftList * 6), BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
|
||||||
|
shiftList--;
|
||||||
|
}
|
||||||
|
if (att.scanlist2)
|
||||||
|
{
|
||||||
|
memcpy(p_line0 + 127 - (shiftList * 6), BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
|
||||||
|
shiftList--;
|
||||||
|
}
|
||||||
|
if (att.scanlist3)
|
||||||
|
{
|
||||||
|
memcpy(p_line0 + 127 - (shiftList * 6), BITMAP_ScanList3, sizeof(BITMAP_ScanList3));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(countList == 0)
|
||||||
|
{
|
||||||
|
memcpy(p_line0 + 127 - (1 * 6), BITMAP_ScanList0, sizeof(BITMAP_ScanList0));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (att.scanlist1)
|
||||||
|
memcpy(p_line0 + 107, BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
|
||||||
|
if (att.scanlist2)
|
||||||
|
memcpy(p_line0 + 114, BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
|
||||||
|
if (att.scanlist3)
|
||||||
|
memcpy(p_line0 + 121, BITMAP_ScanList3, sizeof(BITMAP_ScanList3));
|
||||||
|
*/
|
||||||
|
|
||||||
// compander symbol
|
// compander symbol
|
||||||
#ifndef ENABLE_BIG_FREQ
|
#ifndef ENABLE_BIG_FREQ
|
||||||
|
81
ui/menu.c
81
ui/menu.c
@@ -57,6 +57,7 @@ const t_menu_item MenuList[] =
|
|||||||
{"Mode", MENU_AM }, // was "AM"
|
{"Mode", MENU_AM }, // was "AM"
|
||||||
{"ScAdd1", MENU_S_ADD1 },
|
{"ScAdd1", MENU_S_ADD1 },
|
||||||
{"ScAdd2", MENU_S_ADD2 },
|
{"ScAdd2", MENU_S_ADD2 },
|
||||||
|
{"ScAdd3", MENU_S_ADD3 },
|
||||||
{"ChSave", MENU_MEM_CH }, // was "MEM-CH"
|
{"ChSave", MENU_MEM_CH }, // was "MEM-CH"
|
||||||
{"ChDele", MENU_DEL_CH }, // was "DEL-CH"
|
{"ChDele", MENU_DEL_CH }, // was "DEL-CH"
|
||||||
{"ChName", MENU_MEM_NAME },
|
{"ChName", MENU_MEM_NAME },
|
||||||
@@ -64,6 +65,7 @@ const t_menu_item MenuList[] =
|
|||||||
{"SList", MENU_S_LIST },
|
{"SList", MENU_S_LIST },
|
||||||
{"SList1", MENU_SLIST1 },
|
{"SList1", MENU_SLIST1 },
|
||||||
{"SList2", MENU_SLIST2 },
|
{"SList2", MENU_SLIST2 },
|
||||||
|
{"SList3", MENU_SLIST3 },
|
||||||
{"ScnRev", MENU_SC_REV },
|
{"ScnRev", MENU_SC_REV },
|
||||||
#ifdef ENABLE_NOAA
|
#ifdef ENABLE_NOAA
|
||||||
{"NOAA-S", MENU_NOAA_S },
|
{"NOAA-S", MENU_NOAA_S },
|
||||||
@@ -116,8 +118,10 @@ const t_menu_item MenuList[] =
|
|||||||
{"D List", MENU_D_LIST },
|
{"D List", MENU_D_LIST },
|
||||||
#endif
|
#endif
|
||||||
{"D Live", MENU_D_LIVE_DEC }, // live DTMF decoder
|
{"D Live", MENU_D_LIVE_DEC }, // live DTMF decoder
|
||||||
#ifdef ENABLE_AM_FIX
|
#ifndef ENABLE_FEAT_F4HWN
|
||||||
{"AM Fix", MENU_AM_FIX },
|
#ifdef ENABLE_AM_FIX
|
||||||
|
{"AM Fix", MENU_AM_FIX },
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_VOX
|
#ifdef ENABLE_VOX
|
||||||
{"VOX", MENU_VOX },
|
{"VOX", MENU_VOX },
|
||||||
@@ -286,12 +290,16 @@ const char * const gSubMenu_F_LOCK[] =
|
|||||||
{
|
{
|
||||||
"DEFAULT+\n137-174\n400-470",
|
"DEFAULT+\n137-174\n400-470",
|
||||||
"FCC HAM\n144-148\n420-450",
|
"FCC HAM\n144-148\n420-450",
|
||||||
|
#ifdef ENABLE_FEAT_F4HWN_PMR
|
||||||
|
"CA HAM\n144-148\n430-450",
|
||||||
|
#endif
|
||||||
"CE HAM\n144-146\n430-440",
|
"CE HAM\n144-146\n430-440",
|
||||||
"GB HAM\n144-148\n430-440",
|
"GB HAM\n144-148\n430-440",
|
||||||
"137-174\n400-430",
|
"137-174\n400-430",
|
||||||
"137-174\n400-438",
|
"137-174\n400-438",
|
||||||
#ifdef ENABLE_FEAT_F4HWN_PMR
|
#ifdef ENABLE_FEAT_F4HWN_PMR
|
||||||
"PMR 446",
|
"PMR 446",
|
||||||
|
"GMRS\nFRS\nMURS",
|
||||||
#endif
|
#endif
|
||||||
"DISABLE\nALL",
|
"DISABLE\nALL",
|
||||||
"UNLOCK\nALL",
|
"UNLOCK\nALL",
|
||||||
@@ -449,10 +457,10 @@ void UI_DisplayMenu(void)
|
|||||||
UI_DisplayClear();
|
UI_DisplayClear();
|
||||||
|
|
||||||
#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, 48, 0, 48, 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)
|
for (uint8_t i = 0; i < 48; i += 2)
|
||||||
{
|
{
|
||||||
gFrameBuffer[5][i] = 0x40;
|
gFrameBuffer[5][i] = 0x40;
|
||||||
}
|
}
|
||||||
@@ -684,13 +692,16 @@ void UI_DisplayMenu(void)
|
|||||||
strcpy(String, gSubMenu_RX_TX[gSubMenuSelection]);
|
strcpy(String, gSubMenu_RX_TX[gSubMenuSelection]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef ENABLE_AM_FIX
|
#ifndef ENABLE_FEAT_F4HWN
|
||||||
case MENU_AM_FIX:
|
#ifdef ENABLE_AM_FIX
|
||||||
|
case MENU_AM_FIX:
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
case MENU_BCL:
|
case MENU_BCL:
|
||||||
case MENU_BEEP:
|
case MENU_BEEP:
|
||||||
case MENU_S_ADD1:
|
case MENU_S_ADD1:
|
||||||
case MENU_S_ADD2:
|
case MENU_S_ADD2:
|
||||||
|
case MENU_S_ADD3:
|
||||||
case MENU_STE:
|
case MENU_STE:
|
||||||
case MENU_D_ST:
|
case MENU_D_ST:
|
||||||
#ifdef ENABLE_DTMF_CALLING
|
#ifdef ENABLE_DTMF_CALLING
|
||||||
@@ -743,7 +754,10 @@ void UI_DisplayMenu(void)
|
|||||||
{
|
{
|
||||||
const uint32_t frequency = SETTINGS_FetchChannelFrequency(gSubMenuSelection);
|
const uint32_t frequency = SETTINGS_FetchChannelFrequency(gSubMenuSelection);
|
||||||
|
|
||||||
if (!gIsInSubMenu || edit_index < 0)
|
//if (!gIsInSubMenu || edit_index < 0)
|
||||||
|
if (!gIsInSubMenu)
|
||||||
|
edit_index = -1;
|
||||||
|
if (edit_index < 0)
|
||||||
{ // show the channel name
|
{ // show the channel name
|
||||||
SETTINGS_FetchChannelName(String, gSubMenuSelection);
|
SETTINGS_FetchChannelName(String, gSubMenuSelection);
|
||||||
char *pPrintStr = String[0] ? String : "--";
|
char *pPrintStr = String[0] ? String : "--";
|
||||||
@@ -751,9 +765,11 @@ void UI_DisplayMenu(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // show the channel name being edited
|
{ // show the channel name being edited
|
||||||
UI_PrintString(edit, menu_item_x1, 0, 2, 8);
|
//UI_PrintString(edit, menu_item_x1, 0, 2, 8);
|
||||||
|
UI_PrintString(edit, menu_item_x1, menu_item_x2, 2, 8);
|
||||||
if (edit_index < 10)
|
if (edit_index < 10)
|
||||||
UI_PrintString("^", menu_item_x1 + (8 * edit_index), 0, 4, 8); // show the cursor
|
//UI_PrintString("^", menu_item_x1 + (8 * edit_index), 0, 4, 8); // show the cursor
|
||||||
|
UI_PrintString("^", menu_item_x1 - 1 + (8 * edit_index),0, 4, 8); // show the cursor
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gAskForConfirmation)
|
if (!gAskForConfirmation)
|
||||||
@@ -801,9 +817,13 @@ void UI_DisplayMenu(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_S_LIST:
|
case MENU_S_LIST:
|
||||||
if (gSubMenuSelection < 2)
|
if (gSubMenuSelection == 0)
|
||||||
sprintf(String, "LIST%u", 1 + gSubMenuSelection);
|
strcpy(String, "LIST [0]\nNO LIST");
|
||||||
else
|
else if (gSubMenuSelection < 4)
|
||||||
|
sprintf(String, "LIST [%u]", gSubMenuSelection);
|
||||||
|
else if (gSubMenuSelection == 4)
|
||||||
|
strcpy(String, "LISTS\n[1, 2, 3]");
|
||||||
|
else if (gSubMenuSelection == 5)
|
||||||
strcpy(String, "ALL");
|
strcpy(String, "ALL");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -867,12 +887,10 @@ void UI_DisplayMenu(void)
|
|||||||
|
|
||||||
case MENU_VOL:
|
case MENU_VOL:
|
||||||
#ifdef ENABLE_FEAT_F4HWN
|
#ifdef ENABLE_FEAT_F4HWN
|
||||||
sprintf(String, "%u.%02uV %u%%\n%s\n%s",
|
sprintf(String, "%s\n%s",
|
||||||
gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100,
|
|
||||||
BATTERY_VoltsToPercent(gBatteryVoltageAverage),
|
|
||||||
AUTHOR_STRING_2,
|
AUTHOR_STRING_2,
|
||||||
VERSION_STRING_2
|
VERSION_STRING_2
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
sprintf(String, "%u.%02uV\n%u%%",
|
sprintf(String, "%u.%02uV\n%u%%",
|
||||||
gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100,
|
gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100,
|
||||||
@@ -996,6 +1014,27 @@ void UI_DisplayMenu(void)
|
|||||||
else
|
else
|
||||||
y = 2 - ((lines + 0) / 2);
|
y = 2 - ((lines + 0) / 2);
|
||||||
|
|
||||||
|
// only for SysInf
|
||||||
|
if(UI_MENU_GetCurrentMenuId() == MENU_VOL)
|
||||||
|
{
|
||||||
|
sprintf(edit, "%u.%02uV %u%%",
|
||||||
|
gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100,
|
||||||
|
BATTERY_VoltsToPercent(gBatteryVoltageAverage)
|
||||||
|
);
|
||||||
|
|
||||||
|
UI_PrintStringSmallNormal(edit, 54, 127, 1);
|
||||||
|
|
||||||
|
#ifdef ENABLE_SPECTRUM
|
||||||
|
#ifndef ENABLE_FMRADIO
|
||||||
|
UI_PrintStringSmallNormal("Bandscope", 54, 127, 6);
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
UI_PrintStringSmallNormal("Broadcast", 54, 127, 6);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
y = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// draw the text lines
|
// draw the text lines
|
||||||
for (i = 0; i < len && lines > 0; lines--)
|
for (i = 0; i < len && lines > 0; lines--)
|
||||||
{
|
{
|
||||||
@@ -1017,9 +1056,15 @@ void UI_DisplayMenu(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UI_MENU_GetCurrentMenuId() == MENU_SLIST1 || UI_MENU_GetCurrentMenuId() == MENU_SLIST2)
|
if (UI_MENU_GetCurrentMenuId() == MENU_SLIST1 || UI_MENU_GetCurrentMenuId() == MENU_SLIST2 || UI_MENU_GetCurrentMenuId() == MENU_SLIST3)
|
||||||
{
|
{
|
||||||
i = (UI_MENU_GetCurrentMenuId() == MENU_SLIST1) ? 0 : 1;
|
if(UI_MENU_GetCurrentMenuId() == MENU_SLIST1)
|
||||||
|
i = 0;
|
||||||
|
else if(UI_MENU_GetCurrentMenuId() == MENU_SLIST2)
|
||||||
|
i = 1;
|
||||||
|
else if(UI_MENU_GetCurrentMenuId() == MENU_SLIST3)
|
||||||
|
i = 2;
|
||||||
|
|
||||||
char *pPrintStr = String;
|
char *pPrintStr = String;
|
||||||
|
|
||||||
if (gSubMenuSelection < 0) {
|
if (gSubMenuSelection < 0) {
|
||||||
|
@@ -66,6 +66,7 @@ enum
|
|||||||
MENU_AUTOLK,
|
MENU_AUTOLK,
|
||||||
MENU_S_ADD1,
|
MENU_S_ADD1,
|
||||||
MENU_S_ADD2,
|
MENU_S_ADD2,
|
||||||
|
MENU_S_ADD3,
|
||||||
MENU_STE,
|
MENU_STE,
|
||||||
MENU_RP_STE,
|
MENU_RP_STE,
|
||||||
MENU_MIC,
|
MENU_MIC,
|
||||||
@@ -77,6 +78,7 @@ enum
|
|||||||
MENU_S_LIST,
|
MENU_S_LIST,
|
||||||
MENU_SLIST1,
|
MENU_SLIST1,
|
||||||
MENU_SLIST2,
|
MENU_SLIST2,
|
||||||
|
MENU_SLIST3,
|
||||||
#ifdef ENABLE_ALARM
|
#ifdef ENABLE_ALARM
|
||||||
MENU_AL_MOD,
|
MENU_AL_MOD,
|
||||||
#endif
|
#endif
|
||||||
|
25
ui/status.c
25
ui/status.c
@@ -50,7 +50,9 @@ static void convertTime(uint8_t *line, uint8_t type)
|
|||||||
m = t / 60;
|
m = t / 60;
|
||||||
s = t - (m * 60);
|
s = t - (m * 60);
|
||||||
|
|
||||||
gStatusLine[14] = 0x00; // Quick fix on display (on scanning I, II, etc.)
|
gStatusLine[0] = 0x00; // Quick fix on display (on scanning I, II, etc.)
|
||||||
|
gStatusLine[7] = 0x00; // Quick fix on display (on scanning I, II, etc.)
|
||||||
|
gStatusLine[14] = 0x00; // Quick fix on display (on scanning I, II, etc.)
|
||||||
|
|
||||||
sprintf(str, "%02d:%02d", m, s);
|
sprintf(str, "%02d:%02d", m, s);
|
||||||
UI_PrintStringSmallBufferNormal(str, line + 0);
|
UI_PrintStringSmallBufferNormal(str, line + 0);
|
||||||
@@ -95,14 +97,23 @@ void UI_DisplayStatus()
|
|||||||
if (gScanStateDir != SCAN_OFF || SCANNER_IsScanning()) {
|
if (gScanStateDir != SCAN_OFF || SCANNER_IsScanning()) {
|
||||||
if (IS_MR_CHANNEL(gNextMrChannel) && !SCANNER_IsScanning()) { // channel mode
|
if (IS_MR_CHANNEL(gNextMrChannel) && !SCANNER_IsScanning()) { // channel mode
|
||||||
switch(gEeprom.SCAN_LIST_DEFAULT) {
|
switch(gEeprom.SCAN_LIST_DEFAULT) {
|
||||||
case 0:
|
case 0:
|
||||||
memcpy(line + x + 2, BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
|
memcpy(line + 0, BITMAP_ScanList0, sizeof(BITMAP_ScanList0));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
memcpy(line + x + 2, BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
|
memcpy(line + 0, BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
memcpy(line + x, gFontScanAll, sizeof(gFontScanAll));
|
memcpy(line + 0, BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
memcpy(line + 0, BITMAP_ScanList3, sizeof(BITMAP_ScanList3));
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
memcpy(line + 0, BITMAP_ScanList123, sizeof(BITMAP_ScanList123));
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
memcpy(line + 0, BITMAP_ScanListAll, sizeof(BITMAP_ScanListAll));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -212,12 +223,10 @@ void UI_DisplayStatus()
|
|||||||
{
|
{
|
||||||
memcpy(line + x + 1, gFontLight, sizeof(gFontLight));
|
memcpy(line + x + 1, gFontLight, sizeof(gFontLight));
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
else if (gChargingWithTypeC)
|
else if (gChargingWithTypeC)
|
||||||
{
|
{
|
||||||
memcpy(line + x + 1, BITMAP_USB_C, sizeof(BITMAP_USB_C));
|
memcpy(line + x + 1, BITMAP_USB_C, sizeof(BITMAP_USB_C));
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
// Battery
|
// Battery
|
||||||
unsigned int x2 = LCD_WIDTH - sizeof(BITMAP_BatteryLevel1) - 0;
|
unsigned int x2 = LCD_WIDTH - sizeof(BITMAP_BatteryLevel1) - 0;
|
||||||
|
Reference in New Issue
Block a user