Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c3eea2fcb | ||
|
|
ffb26a1f86 | ||
|
|
a8ae1b7739 | ||
|
|
b59df11bd6 | ||
|
|
146c8dede4 | ||
|
|
c2090676d8 | ||
|
|
b29bae88f1 | ||
|
|
c55a40481d | ||
|
|
a37a1ca6ef | ||
|
|
8629b1b867 | ||
|
|
f7c0d4149b | ||
|
|
87fd5c19d0 | ||
|
|
d132969c91 | ||
|
|
a5fa0b1e4b | ||
|
|
a21c8a62ac | ||
|
|
9fd3701f46 | ||
|
|
1d95737088 | ||
|
|
2f7042056a | ||
|
|
13b41abce6 | ||
|
|
b9f9566158 | ||
|
|
710a417e12 | ||
|
|
f11d0fbcda | ||
|
|
96144af9e9 | ||
|
|
4dd2445833 | ||
|
|
6172d942be | ||
|
|
0c0cbb232c | ||
|
|
298ff29cf4 | ||
|
|
f70707e17f | ||
|
|
f1fc04591c | ||
|
|
a26c397417 | ||
|
|
d3a2a7bee9 | ||
|
|
d817ff7e6a | ||
|
|
ec4bec5b1f | ||
|
|
d7c458839c | ||
|
|
cff2f25e56 | ||
|
|
63ac84883e | ||
|
|
f8252df281 | ||
|
|
be00bb99ad | ||
|
|
7e6a78ab6c | ||
|
|
06c2ddf543 | ||
|
|
47f1e80252 | ||
|
|
64bc29d362 | ||
|
|
8d17f5922c |
7
Makefile
7
Makefile
@@ -22,10 +22,10 @@ ENABLE_KEEP_MEM_NAME := 1
|
||||
ENABLE_WIDE_RX := 1
|
||||
ENABLE_TX_WHEN_AM := 0
|
||||
ENABLE_F_CAL_MENU := 0
|
||||
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1
|
||||
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 0
|
||||
ENABLE_BOOT_BEEPS := 0
|
||||
ENABLE_SHOW_CHARGE_LEVEL := 1
|
||||
ENABLE_REVERSE_BAT_SYMBOL := 1
|
||||
ENABLE_REVERSE_BAT_SYMBOL := 0
|
||||
ENABLE_CODE_SCAN_TIMEOUT := 0
|
||||
ENABLE_AM_FIX := 1
|
||||
ENABLE_AM_FIX_SHOW_DATA := 0
|
||||
@@ -104,6 +104,7 @@ ifeq ($(ENABLE_FMRADIO),1)
|
||||
OBJS += app/fm.o
|
||||
endif
|
||||
OBJS += app/generic.o
|
||||
OBJS += app/common.o
|
||||
OBJS += app/main.o
|
||||
OBJS += app/menu.o
|
||||
ifeq ($(ENABLE_SPECTRUM), 1)
|
||||
@@ -209,7 +210,7 @@ endif
|
||||
#CFLAGS += -Wpadded
|
||||
|
||||
# catch any and all warnings
|
||||
#CFLAGS += -Wextra
|
||||
CFLAGS += -Wextra
|
||||
|
||||
CFLAGS += -DPRINTF_INCLUDE_CONFIG_H
|
||||
CFLAGS += -DGIT_HASH=\"$(GIT_HASH)\"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Main features:
|
||||
- OneOfEleven mods, including AM fix
|
||||
- many of OneOfEleven mods, including AM fix
|
||||
- fagci spectrum analyzer (**F+5** to turn on)
|
||||
- better battery percentage calculation (based on real measurement, battery calibration recommended)
|
||||
- battery calibration option available available in the menu (instructions below)
|
||||
- some other smaller mods introduced by me
|
||||
|
||||
Go to [Wiki](https://github.com/egzumer/uv-k5-firmware-custom/wiki) to learn more.
|
||||
|
||||
<img src="images/main.jpg" width=300 /><img src="images/spectrum.jpg" width=300 /><img src="images/audiobar.jpg" width=300 /><img src="images/rssibar.jpg" width=300 />
|
||||
|
||||
|
||||
96
app/action.c
96
app/action.c
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "app/action.h"
|
||||
#include "app/app.h"
|
||||
#include "app/common.h"
|
||||
#include "app/dtmf.h"
|
||||
#ifdef ENABLE_FMRADIO
|
||||
#include "app/fm.h"
|
||||
@@ -45,6 +46,7 @@ static void ACTION_FlashLight(void)
|
||||
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
gFlashLightState++;
|
||||
break;
|
||||
default:
|
||||
@@ -192,7 +194,7 @@ void ACTION_Scan(bool bRestart)
|
||||
gEeprom.SCAN_LIST_DEFAULT = (gEeprom.SCAN_LIST_DEFAULT + 1) % 3;
|
||||
|
||||
// jump to the next channel
|
||||
CHANNEL_Next(true, gScanStateDir);
|
||||
SCANNER_NextChannel(false, gScanStateDir);
|
||||
gScanPauseDelayIn_10ms = 1;
|
||||
gScheduleScanListen = false;
|
||||
|
||||
@@ -211,7 +213,7 @@ void ACTION_Scan(bool bRestart)
|
||||
else
|
||||
{ // start scanning
|
||||
|
||||
CHANNEL_Next(true, SCAN_FWD);
|
||||
SCANNER_NextChannel(true, SCAN_FWD);
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
AUDIO_SetVoiceID(0, VOICE_ID_SCANNING_BEGIN);
|
||||
@@ -234,7 +236,7 @@ void ACTION_Scan(bool bRestart)
|
||||
gEeprom.SCAN_LIST_DEFAULT = (gEeprom.SCAN_LIST_DEFAULT + 1) % 3;
|
||||
|
||||
// jump to the next channel
|
||||
CHANNEL_Next(true, gScanStateDir);
|
||||
SCANNER_NextChannel(false, gScanStateDir);
|
||||
gScanPauseDelayIn_10ms = 1;
|
||||
gScheduleScanListen = false;
|
||||
|
||||
@@ -325,18 +327,15 @@ void ACTION_Scan(bool bRestart)
|
||||
|
||||
void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
uint8_t Short = ACTION_OPT_NONE;
|
||||
uint8_t Long = ACTION_OPT_NONE;
|
||||
|
||||
if (gScreenToDisplay == DISPLAY_MAIN && gDTMF_InputMode)
|
||||
if (gScreenToDisplay == DISPLAY_MAIN && gDTMF_InputMode) // entering DTMF code
|
||||
{
|
||||
if (Key == KEY_SIDE1 && !bKeyHeld && bKeyPressed)
|
||||
if (Key == KEY_SIDE1 && !bKeyHeld && bKeyPressed) // side1 btn pressed
|
||||
{
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
if (gDTMF_InputBox_Index > 0)
|
||||
if (gDTMF_InputBox_Index > 0) // DTMF codes are in the input box
|
||||
{
|
||||
gDTMF_InputBox[--gDTMF_InputBox_Index] = '-';
|
||||
gDTMF_InputBox[--gDTMF_InputBox_Index] = '-'; // delete one code
|
||||
if (gDTMF_InputBox_Index > 0)
|
||||
{
|
||||
gPttWasReleased = true;
|
||||
@@ -350,43 +349,52 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
#endif
|
||||
|
||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||
gDTMF_InputMode = false;
|
||||
gDTMF_InputMode = false; // turn off DTMF input box if no codes left
|
||||
}
|
||||
|
||||
gPttWasReleased = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Key == KEY_SIDE1)
|
||||
{
|
||||
Short = gEeprom.KEY_1_SHORT_PRESS_ACTION;
|
||||
Long = gEeprom.KEY_1_LONG_PRESS_ACTION;
|
||||
}
|
||||
else
|
||||
if (Key == KEY_SIDE2)
|
||||
{
|
||||
Short = gEeprom.KEY_2_SHORT_PRESS_ACTION;
|
||||
Long = gEeprom.KEY_2_LONG_PRESS_ACTION;
|
||||
uint8_t funcShort = ACTION_OPT_NONE;
|
||||
uint8_t funcLong = ACTION_OPT_NONE;
|
||||
switch(Key) {
|
||||
case KEY_SIDE1:
|
||||
funcShort = gEeprom.KEY_1_SHORT_PRESS_ACTION;
|
||||
funcLong = gEeprom.KEY_1_LONG_PRESS_ACTION;
|
||||
break;
|
||||
case KEY_SIDE2:
|
||||
funcShort = gEeprom.KEY_2_SHORT_PRESS_ACTION;
|
||||
funcLong = gEeprom.KEY_2_LONG_PRESS_ACTION;
|
||||
break;
|
||||
case KEY_MENU:
|
||||
funcLong = gEeprom.KEY_M_LONG_PRESS_ACTION;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!bKeyHeld && bKeyPressed)
|
||||
if (!bKeyHeld && bKeyPressed) // button pushed
|
||||
{
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (bKeyHeld || bKeyPressed)
|
||||
// held or released beyond this point
|
||||
|
||||
if(!(bKeyHeld && !bKeyPressed)) // don't beep on released after hold
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
if (bKeyHeld || bKeyPressed) // held
|
||||
{
|
||||
if (!bKeyHeld)
|
||||
return;
|
||||
funcShort = funcLong;
|
||||
|
||||
Short = Long;
|
||||
|
||||
if (!bKeyPressed)
|
||||
if (!bKeyPressed) //ignore release if held
|
||||
return;
|
||||
}
|
||||
|
||||
switch (Short)
|
||||
// held or released after short press beyond this point
|
||||
|
||||
switch (funcShort)
|
||||
{
|
||||
default:
|
||||
case ACTION_OPT_NONE:
|
||||
@@ -404,24 +412,30 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
ACTION_Scan(true);
|
||||
break;
|
||||
case ACTION_OPT_VOX:
|
||||
#ifdef ENABLE_VOX
|
||||
ACTION_Vox();
|
||||
#endif
|
||||
#ifdef ENABLE_VOX
|
||||
ACTION_Vox();
|
||||
#endif
|
||||
break;
|
||||
case ACTION_OPT_ALARM:
|
||||
#ifdef ENABLE_ALARM
|
||||
ACTION_AlarmOr1750(false);
|
||||
#endif
|
||||
#ifdef ENABLE_ALARM
|
||||
ACTION_AlarmOr1750(false);
|
||||
#endif
|
||||
break;
|
||||
#ifdef ENABLE_FMRADIO
|
||||
case ACTION_OPT_FM:
|
||||
ACTION_FM();
|
||||
break;
|
||||
#endif
|
||||
#ifdef ENABLE_FMRADIO
|
||||
case ACTION_OPT_FM:
|
||||
ACTION_FM();
|
||||
break;
|
||||
#endif
|
||||
case ACTION_OPT_1750:
|
||||
#ifdef ENABLE_TX1750
|
||||
ACTION_AlarmOr1750(true);
|
||||
#endif
|
||||
break;
|
||||
case ACTION_OPT_KEYLOCK:
|
||||
COMMON_KeypadLockToggle();
|
||||
break;
|
||||
case ACTION_OPT_A_B:
|
||||
COMMON_SwitchVFOs();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//static void ACTION_FlashLight(void)
|
||||
void ACTION_Power(void);
|
||||
void ACTION_Monitor(void);
|
||||
void ACTION_Scan(bool bFlag);
|
||||
void ACTION_Scan(bool bRestart);
|
||||
#ifdef ENABLE_VOX
|
||||
void ACTION_Vox(void);
|
||||
#endif
|
||||
|
||||
@@ -57,7 +57,7 @@ void AIRCOPY_SendMessage(void)
|
||||
|
||||
BK4819_SendFSKData(g_FSK_Buffer);
|
||||
BK4819_SetupPowerAmplifier(0, 0);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29, false);
|
||||
|
||||
gAircopySendCountdown = 30;
|
||||
}
|
||||
@@ -131,8 +131,7 @@ static void AIRCOPY_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
|
||||
gInputBoxIndex = 0;
|
||||
|
||||
NUMBER_Get(gInputBox, &Frequency);
|
||||
Frequency = StrToUL(INPUTBOX_GetAscii()) * 100;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(frequencyBandTable); i++)
|
||||
{
|
||||
|
||||
564
app/app.c
564
app/app.c
@@ -485,7 +485,7 @@ void APP_StartListening(FUNCTION_Type_t Function, const bool reset_am_fix)
|
||||
|
||||
gEnableSpeaker = true;
|
||||
|
||||
if (gSetting_backlight_on_tx_rx >= 2)
|
||||
if (gSetting_backlight_on_tx_rx >= BACKLIGHT_ON_TR_RX)
|
||||
BACKLIGHT_TurnOn();
|
||||
|
||||
if (gScanStateDir != SCAN_OFF)
|
||||
@@ -535,7 +535,9 @@ void APP_StartListening(FUNCTION_Type_t Function, const bool reset_am_fix)
|
||||
gDualWatchCountdown_10ms = dual_watch_count_after_2_10ms;
|
||||
gScheduleDualWatch = false;
|
||||
|
||||
gRxVfoIsActive = true;
|
||||
// when crossband is active only the main VFO should be used for TX
|
||||
if(gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF)
|
||||
gRxVfoIsActive = true;
|
||||
|
||||
// let the user see DW is not active
|
||||
gDualWatchActive = false;
|
||||
@@ -621,127 +623,6 @@ uint32_t APP_SetFrequencyByStep(VFO_Info_t *pInfo, int8_t Step)
|
||||
return Frequency;
|
||||
}
|
||||
|
||||
static void FREQ_NextChannel(void)
|
||||
{
|
||||
gRxVfo->freq_config_RX.Frequency = APP_SetFrequencyByStep(gRxVfo, gScanStateDir);
|
||||
|
||||
RADIO_ApplyOffset(gRxVfo);
|
||||
RADIO_ConfigureSquelchAndOutputPower(gRxVfo);
|
||||
RADIO_SetupRegisters(true);
|
||||
|
||||
#ifdef ENABLE_FASTER_CHANNEL_SCAN
|
||||
gScanPauseDelayIn_10ms = 9; // 90ms
|
||||
#else
|
||||
gScanPauseDelayIn_10ms = scan_pause_delay_in_6_10ms;
|
||||
#endif
|
||||
|
||||
bScanKeepFrequency = false;
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
|
||||
static void MR_NextChannel(void)
|
||||
{
|
||||
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 int chan1 = (gEeprom.SCAN_LIST_DEFAULT < 2) ? gEeprom.SCANLIST_PRIORITY_CH1[gEeprom.SCAN_LIST_DEFAULT] : -1;
|
||||
const int chan2 = (gEeprom.SCAN_LIST_DEFAULT < 2) ? gEeprom.SCANLIST_PRIORITY_CH2[gEeprom.SCAN_LIST_DEFAULT] : -1;
|
||||
const unsigned int prev_chan = gNextMrChannel;
|
||||
unsigned int chan = 0;
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
switch (gCurrentScanList)
|
||||
{
|
||||
case SCAN_NEXT_CHAN_SCANLIST1:
|
||||
prev_mr_chan = gNextMrChannel;
|
||||
|
||||
if (chan1 >= 0)
|
||||
{
|
||||
if (RADIO_CheckValidChannel(chan1, false, 0))
|
||||
{
|
||||
gCurrentScanList = SCAN_NEXT_CHAN_SCANLIST1;
|
||||
gNextMrChannel = chan1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
case SCAN_NEXT_CHAN_SCANLIST2:
|
||||
if (chan2 >= 0)
|
||||
{
|
||||
if (RADIO_CheckValidChannel(chan2, false, 0))
|
||||
{
|
||||
gCurrentScanList = SCAN_NEXT_CHAN_SCANLIST2;
|
||||
gNextMrChannel = chan2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// this bit doesn't yet work if the other VFO is a frequency
|
||||
case SCAN_NEXT_CHAN_DUAL_WATCH:
|
||||
// dual watch is enabled - include the other VFO in the scan
|
||||
// if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF)
|
||||
// {
|
||||
// chan = (gEeprom.RX_VFO + 1) & 1u;
|
||||
// chan = gEeprom.ScreenChannel[chan];
|
||||
// if (chan <= MR_CHANNEL_LAST)
|
||||
// {
|
||||
// gCurrentScanList = SCAN_NEXT_CHAN_DUAL_WATCH;
|
||||
// gNextMrChannel = chan;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
default:
|
||||
case SCAN_NEXT_CHAN_MR:
|
||||
gCurrentScanList = SCAN_NEXT_CHAN_MR;
|
||||
gNextMrChannel = prev_mr_chan;
|
||||
chan = 0xff;
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
if (!enabled || chan == 0xff)
|
||||
{
|
||||
chan = RADIO_FindNextChannel(gNextMrChannel + gScanStateDir, gScanStateDir, (gEeprom.SCAN_LIST_DEFAULT < 2) ? true : false, gEeprom.SCAN_LIST_DEFAULT);
|
||||
if (chan == 0xFF)
|
||||
{ // no valid channel found
|
||||
|
||||
chan = MR_CHANNEL_FIRST;
|
||||
// return;
|
||||
}
|
||||
|
||||
gNextMrChannel = chan;
|
||||
}
|
||||
|
||||
if (gNextMrChannel != prev_chan)
|
||||
{
|
||||
gEeprom.MrChannel[ gEeprom.RX_VFO] = gNextMrChannel;
|
||||
gEeprom.ScreenChannel[gEeprom.RX_VFO] = gNextMrChannel;
|
||||
|
||||
RADIO_ConfigureChannel(gEeprom.RX_VFO, VFO_CONFIGURE_RELOAD);
|
||||
RADIO_SetupRegisters(true);
|
||||
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FASTER_CHANNEL_SCAN
|
||||
gScanPauseDelayIn_10ms = 9; // 90ms .. <= ~60ms it misses signals (squelch response and/or PLL lock time) ?
|
||||
#else
|
||||
gScanPauseDelayIn_10ms = scan_pause_delay_in_3_10ms;
|
||||
#endif
|
||||
|
||||
bScanKeepFrequency = false;
|
||||
|
||||
if (enabled)
|
||||
if (++gCurrentScanList >= SCAN_NEXT_NUM)
|
||||
gCurrentScanList = SCAN_NEXT_CHAN_SCANLIST1; // back round we go
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
static void NOAA_IncreaseChannel(void)
|
||||
{
|
||||
@@ -904,13 +785,13 @@ void APP_CheckRadioInterrupts(void)
|
||||
if (interrupt_status_bits & BK4819_REG_02_SQUELCH_LOST)
|
||||
{
|
||||
g_SquelchLost = true;
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_GREEN, true);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, true);
|
||||
}
|
||||
|
||||
if (interrupt_status_bits & BK4819_REG_02_SQUELCH_FOUND)
|
||||
{
|
||||
g_SquelchLost = false;
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_GREEN, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, false);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_AIRCOPY
|
||||
@@ -1064,56 +945,38 @@ void APP_Update(void)
|
||||
if (gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
APP_HandleFunction();
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
// if (gFmRadioCountdown_500ms > 0)
|
||||
if (gFmRadioMode && gFmRadioCountdown_500ms > 0) // 1of11
|
||||
return;
|
||||
#endif
|
||||
#ifdef ENABLE_FMRADIO
|
||||
// if (gFmRadioCountdown_500ms > 0)
|
||||
if (gFmRadioMode && gFmRadioCountdown_500ms > 0) // 1of11
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
if (gScreenToDisplay != DISPLAY_SCANNER && gScanStateDir != SCAN_OFF && gScheduleScanListen && !gPttIsPressed && gVoiceWriteIndex == 0)
|
||||
#else
|
||||
if (gScreenToDisplay != DISPLAY_SCANNER && gScanStateDir != SCAN_OFF && gScheduleScanListen && !gPttIsPressed)
|
||||
#endif
|
||||
#ifdef ENABLE_VOICE
|
||||
if (gScreenToDisplay != DISPLAY_SCANNER && gScanStateDir != SCAN_OFF && gScheduleScanListen && !gPttIsPressed && gVoiceWriteIndex == 0)
|
||||
#else
|
||||
if (gScreenToDisplay != DISPLAY_SCANNER && gScanStateDir != SCAN_OFF && gScheduleScanListen && !gPttIsPressed)
|
||||
#endif
|
||||
{ // scanning
|
||||
|
||||
if (IS_FREQ_CHANNEL(gNextMrChannel))
|
||||
{
|
||||
if (gCurrentFunction == FUNCTION_INCOMING)
|
||||
APP_StartListening(gMonitor ? FUNCTION_MONITOR : FUNCTION_RECEIVE, true);
|
||||
else
|
||||
FREQ_NextChannel(); // switch to next frequency
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gCurrentCodeType == CODE_TYPE_OFF && gCurrentFunction == FUNCTION_INCOMING)
|
||||
APP_StartListening(gMonitor ? FUNCTION_MONITOR : FUNCTION_RECEIVE, true);
|
||||
else
|
||||
MR_NextChannel(); // switch to next channel
|
||||
}
|
||||
|
||||
gScanPauseMode = false;
|
||||
gRxReceptionMode = RX_MODE_NONE;
|
||||
gScheduleScanListen = false;
|
||||
SCANNER_ContinueScanning();
|
||||
}
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
if (gCssScanMode == CSS_SCAN_MODE_SCANNING && gScheduleScanListen && gVoiceWriteIndex == 0)
|
||||
#else
|
||||
if (gCssScanMode == CSS_SCAN_MODE_SCANNING && gScheduleScanListen)
|
||||
#endif
|
||||
#ifdef ENABLE_VOICE
|
||||
if (gCssScanMode == CSS_SCAN_MODE_SCANNING && gScheduleScanListen && gVoiceWriteIndex == 0)
|
||||
#else
|
||||
if (gCssScanMode == CSS_SCAN_MODE_SCANNING && gScheduleScanListen)
|
||||
#endif
|
||||
{
|
||||
MENU_SelectNextCode();
|
||||
|
||||
gScheduleScanListen = false;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
#ifdef ENABLE_VOICE
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_OFF && gIsNoaaMode && gScheduleNOAA && gVoiceWriteIndex == 0)
|
||||
#else
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_OFF && gIsNoaaMode && gScheduleNOAA)
|
||||
#endif
|
||||
#ifdef ENABLE_NOAA
|
||||
#ifdef ENABLE_VOICE
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_OFF && gIsNoaaMode && gScheduleNOAA && gVoiceWriteIndex == 0)
|
||||
#else
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_OFF && gIsNoaaMode && gScheduleNOAA)
|
||||
#endif
|
||||
{
|
||||
NOAA_IncreaseChannel();
|
||||
RADIO_SetupRegisters(false);
|
||||
@@ -1121,23 +984,23 @@ void APP_Update(void)
|
||||
gNOAA_Countdown_10ms = 7; // 70ms
|
||||
gScheduleNOAA = false;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// toggle between the VFO's if dual watch is enabled
|
||||
if (gScreenToDisplay != DISPLAY_SCANNER && gEeprom.DUAL_WATCH != DUAL_WATCH_OFF)
|
||||
{
|
||||
#ifdef ENABLE_VOICE
|
||||
if (gScheduleDualWatch && gVoiceWriteIndex == 0)
|
||||
#else
|
||||
if (gScheduleDualWatch)
|
||||
#endif
|
||||
#ifdef ENABLE_VOICE
|
||||
if (gScheduleDualWatch && gVoiceWriteIndex == 0)
|
||||
#else
|
||||
if (gScheduleDualWatch)
|
||||
#endif
|
||||
{
|
||||
if (gScanStateDir == SCAN_OFF && gCssScanMode == CSS_SCAN_MODE_OFF)
|
||||
{
|
||||
if (!gPttIsPressed &&
|
||||
#ifdef ENABLE_FMRADIO
|
||||
!gFmRadioMode &&
|
||||
#endif
|
||||
#ifdef ENABLE_FMRADIO
|
||||
!gFmRadioMode &&
|
||||
#endif
|
||||
gDTMF_CallState == DTMF_CALL_STATE_NONE &&
|
||||
gCurrentFunction != FUNCTION_POWER_SAVE)
|
||||
{
|
||||
@@ -1155,90 +1018,89 @@ void APP_Update(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (gScheduleFM &&
|
||||
gFM_ScanState != FM_SCAN_OFF &&
|
||||
gCurrentFunction != FUNCTION_MONITOR &&
|
||||
gCurrentFunction != FUNCTION_RECEIVE &&
|
||||
gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
{ // switch to FM radio mode
|
||||
FM_Play();
|
||||
gScheduleFM = false;
|
||||
}
|
||||
#endif
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (gScheduleFM &&
|
||||
gFM_ScanState != FM_SCAN_OFF &&
|
||||
gCurrentFunction != FUNCTION_MONITOR &&
|
||||
gCurrentFunction != FUNCTION_RECEIVE &&
|
||||
gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
{ // switch to FM radio mode
|
||||
FM_Play();
|
||||
gScheduleFM = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_VOX
|
||||
if (gEeprom.VOX_SWITCH)
|
||||
APP_HandleVox();
|
||||
#endif
|
||||
#ifdef ENABLE_VOX
|
||||
if (gEeprom.VOX_SWITCH)
|
||||
APP_HandleVox();
|
||||
#endif
|
||||
|
||||
if (gSchedulePowerSave)
|
||||
{
|
||||
#ifdef ENABLE_NOAA
|
||||
if (
|
||||
#ifdef ENABLE_FMRADIO
|
||||
gFmRadioMode ||
|
||||
#endif
|
||||
gPttIsPressed ||
|
||||
gKeyBeingHeld ||
|
||||
gEeprom.BATTERY_SAVE == 0 ||
|
||||
gScanStateDir != SCAN_OFF ||
|
||||
gCssScanMode != CSS_SCAN_MODE_OFF ||
|
||||
gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
{
|
||||
gBatterySaveCountdown_10ms = battery_save_count_10ms;
|
||||
}
|
||||
else
|
||||
if ((IS_NOT_NOAA_CHANNEL(gEeprom.ScreenChannel[0]) && IS_NOT_NOAA_CHANNEL(gEeprom.ScreenChannel[1])) || !gIsNoaaMode)
|
||||
{
|
||||
//if (gCurrentFunction != FUNCTION_POWER_SAVE)
|
||||
FUNCTION_Select(FUNCTION_POWER_SAVE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBatterySaveCountdown_10ms = battery_save_count_10ms;
|
||||
}
|
||||
#else
|
||||
if (
|
||||
#ifdef ENABLE_FMRADIO
|
||||
gFmRadioMode ||
|
||||
#endif
|
||||
gPttIsPressed ||
|
||||
gKeyBeingHeld ||
|
||||
gEeprom.BATTERY_SAVE == 0 ||
|
||||
gScanStateDir != SCAN_OFF ||
|
||||
gCssScanMode != CSS_SCAN_MODE_OFF ||
|
||||
gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
{
|
||||
gBatterySaveCountdown_10ms = battery_save_count_10ms;
|
||||
}
|
||||
else
|
||||
{
|
||||
//if (gCurrentFunction != FUNCTION_POWER_SAVE)
|
||||
FUNCTION_Select(FUNCTION_POWER_SAVE);
|
||||
}
|
||||
#ifdef ENABLE_NOAA
|
||||
if (
|
||||
#ifdef ENABLE_FMRADIO
|
||||
gFmRadioMode ||
|
||||
#endif
|
||||
gPttIsPressed ||
|
||||
gKeyBeingHeld ||
|
||||
gEeprom.BATTERY_SAVE == 0 ||
|
||||
gScanStateDir != SCAN_OFF ||
|
||||
gCssScanMode != CSS_SCAN_MODE_OFF ||
|
||||
gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
{
|
||||
gBatterySaveCountdown_10ms = battery_save_count_10ms;
|
||||
}
|
||||
else if ((IS_NOT_NOAA_CHANNEL(gEeprom.ScreenChannel[0]) && IS_NOT_NOAA_CHANNEL(gEeprom.ScreenChannel[1])) || !gIsNoaaMode)
|
||||
{
|
||||
//if (gCurrentFunction != FUNCTION_POWER_SAVE)
|
||||
FUNCTION_Select(FUNCTION_POWER_SAVE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBatterySaveCountdown_10ms = battery_save_count_10ms;
|
||||
}
|
||||
#else
|
||||
if (
|
||||
#ifdef ENABLE_FMRADIO
|
||||
gFmRadioMode ||
|
||||
#endif
|
||||
gPttIsPressed ||
|
||||
gKeyBeingHeld ||
|
||||
gEeprom.BATTERY_SAVE == 0 ||
|
||||
gScanStateDir != SCAN_OFF ||
|
||||
gCssScanMode != CSS_SCAN_MODE_OFF ||
|
||||
gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
{
|
||||
gBatterySaveCountdown_10ms = battery_save_count_10ms;
|
||||
}
|
||||
else
|
||||
{
|
||||
//if (gCurrentFunction != FUNCTION_POWER_SAVE)
|
||||
FUNCTION_Select(FUNCTION_POWER_SAVE);
|
||||
}
|
||||
|
||||
gSchedulePowerSave = false;
|
||||
#endif
|
||||
gSchedulePowerSave = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
if (gPowerSaveCountdownExpired && gCurrentFunction == FUNCTION_POWER_SAVE && gVoiceWriteIndex == 0)
|
||||
#else
|
||||
if (gPowerSaveCountdownExpired && gCurrentFunction == FUNCTION_POWER_SAVE)
|
||||
#endif
|
||||
#ifdef ENABLE_VOICE
|
||||
if (gPowerSaveCountdownExpired && gCurrentFunction == FUNCTION_POWER_SAVE && gVoiceWriteIndex == 0)
|
||||
#else
|
||||
if (gPowerSaveCountdownExpired && gCurrentFunction == FUNCTION_POWER_SAVE)
|
||||
#endif
|
||||
{ // wake up, enable RX then go back to sleep
|
||||
|
||||
if (gRxIdleMode)
|
||||
{
|
||||
BK4819_Conditional_RX_TurnOn_and_GPIO6_Enable();
|
||||
|
||||
#ifdef ENABLE_VOX
|
||||
if (gEeprom.VOX_SWITCH)
|
||||
BK4819_EnableVox(gEeprom.VOX1_THRESHOLD, gEeprom.VOX0_THRESHOLD);
|
||||
#endif
|
||||
#ifdef ENABLE_VOX
|
||||
if (gEeprom.VOX_SWITCH)
|
||||
BK4819_EnableVox(gEeprom.VOX1_THRESHOLD, gEeprom.VOX0_THRESHOLD);
|
||||
#endif
|
||||
|
||||
if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF &&
|
||||
gScanStateDir == SCAN_OFF &&
|
||||
@@ -1267,7 +1129,7 @@ void APP_Update(void)
|
||||
|
||||
BK4819_DisableVox();
|
||||
BK4819_Sleep();
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28, false);
|
||||
|
||||
// Authentic device checked removed
|
||||
|
||||
@@ -1288,16 +1150,15 @@ void APP_Update(void)
|
||||
// called every 10ms
|
||||
void APP_CheckKeys(void)
|
||||
{
|
||||
KEY_Code_t Key;
|
||||
|
||||
#ifdef ENABLE_AIRCOPY
|
||||
if (gSetting_KILLED || (gScreenToDisplay == DISPLAY_AIRCOPY && gAircopyState != AIRCOPY_READY))
|
||||
return;
|
||||
#else
|
||||
if (gSetting_KILLED)
|
||||
return;
|
||||
#endif
|
||||
#ifdef ENABLE_AIRCOPY
|
||||
if (gSetting_KILLED || (gScreenToDisplay == DISPLAY_AIRCOPY && gAircopyState != AIRCOPY_READY))
|
||||
return;
|
||||
#else
|
||||
if (gSetting_KILLED)
|
||||
return;
|
||||
#endif
|
||||
|
||||
// -------------------- PTT ------------------------
|
||||
if (gPttIsPressed)
|
||||
{
|
||||
if (GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) || gSerialConfigCountDown_500ms > 0)
|
||||
@@ -1313,8 +1174,7 @@ void APP_CheckKeys(void)
|
||||
else
|
||||
gPttDebounceCounter = 0;
|
||||
}
|
||||
else
|
||||
if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) && gSerialConfigCountDown_500ms == 0)
|
||||
else if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) && gSerialConfigCountDown_500ms == 0)
|
||||
{ // PTT pressed
|
||||
if (++gPttDebounceCounter >= 3) // 30ms
|
||||
{ // start transmitting
|
||||
@@ -1327,16 +1187,16 @@ void APP_CheckKeys(void)
|
||||
else
|
||||
gPttDebounceCounter = 0;
|
||||
|
||||
// *****************
|
||||
// --------------------- OTHER KEYS ----------------------------
|
||||
|
||||
// scan the hardware keys
|
||||
Key = KEYBOARD_Poll();
|
||||
KEY_Code_t Key = KEYBOARD_Poll();
|
||||
|
||||
if (Key != KEY_INVALID)
|
||||
if (Key != KEY_INVALID) // any key pressed
|
||||
boot_counter_10ms = 0; // cancel boot screen/beeps if any key pressed
|
||||
|
||||
if (gKeyReading0 != Key)
|
||||
{ // new key pressed
|
||||
if (gKeyReading0 != Key) // new key pressed
|
||||
{
|
||||
|
||||
if (gKeyReading0 != KEY_INVALID && Key != KEY_INVALID)
|
||||
APP_ProcessKey(gKeyReading1, false, gKeyBeingHeld); // key pressed without releasing previous key
|
||||
@@ -1346,18 +1206,19 @@ void APP_CheckKeys(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (++gDebounceCounter == key_debounce_10ms)
|
||||
{ // debounced new key pressed
|
||||
gDebounceCounter++;
|
||||
|
||||
if (Key == KEY_INVALID)
|
||||
if (gDebounceCounter == key_debounce_10ms) // debounced new key pressed
|
||||
{
|
||||
if (Key == KEY_INVALID) //all non PTT keys released
|
||||
{
|
||||
if (gKeyReading1 != KEY_INVALID)
|
||||
if (gKeyReading1 != KEY_INVALID) // some button was pressed before
|
||||
{
|
||||
APP_ProcessKey(gKeyReading1, false, gKeyBeingHeld);
|
||||
APP_ProcessKey(gKeyReading1, false, gKeyBeingHeld); // process last button released event
|
||||
gKeyReading1 = KEY_INVALID;
|
||||
}
|
||||
}
|
||||
else
|
||||
else // process new key pressed
|
||||
{
|
||||
gKeyReading1 = Key;
|
||||
APP_ProcessKey(Key, true, false);
|
||||
@@ -1367,32 +1228,30 @@ void APP_CheckKeys(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (gDebounceCounter < key_repeat_delay_10ms)
|
||||
if (gDebounceCounter < key_repeat_delay_10ms || Key == KEY_INVALID) // the button is not held long enough for repeat yet, or not really pressed
|
||||
return;
|
||||
|
||||
// key is being held pressed
|
||||
|
||||
if (gDebounceCounter == key_repeat_delay_10ms)
|
||||
{ // initial key repeat delay after pressed
|
||||
if (gDebounceCounter == key_repeat_delay_10ms) //initial key repeat with longer delay
|
||||
{
|
||||
if (Key != KEY_PTT)
|
||||
{
|
||||
gKeyBeingHeld = true;
|
||||
APP_ProcessKey(Key, true, true);
|
||||
APP_ProcessKey(Key, true, true); // key held event
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // key repeat
|
||||
if (Key == KEY_UP || Key == KEY_DOWN)
|
||||
else //subsequent fast key repeats
|
||||
{
|
||||
if (Key == KEY_UP || Key == KEY_DOWN) // fast key repeats for up/down buttons
|
||||
{
|
||||
gKeyBeingHeld = true;
|
||||
if ((gDebounceCounter % key_repeat_10ms) == 0)
|
||||
APP_ProcessKey(Key, true, true);
|
||||
APP_ProcessKey(Key, true, true); // key held event
|
||||
}
|
||||
|
||||
if (gDebounceCounter < 0xFFFF)
|
||||
return;
|
||||
|
||||
gDebounceCounter = key_repeat_delay_10ms;
|
||||
gDebounceCounter = key_repeat_delay_10ms+1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1451,6 +1310,35 @@ void APP_TimeSlice10ms(void)
|
||||
|
||||
if (gFlashLightState == FLASHLIGHT_BLINK && (gFlashLightBlinkCounter & 15u) == 0)
|
||||
GPIO_FlipBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
|
||||
else if(gFlashLightState == FLASHLIGHT_SOS) {
|
||||
const uint16_t u = 15;
|
||||
static uint8_t c;
|
||||
static uint16_t next;
|
||||
|
||||
if(gFlashLightBlinkCounter - next > 7*u) {
|
||||
c = 0;
|
||||
next = gFlashLightBlinkCounter+1;
|
||||
}
|
||||
else if(gFlashLightBlinkCounter == next) {
|
||||
if(c==0) {
|
||||
GPIO_ClearBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
|
||||
}
|
||||
else
|
||||
GPIO_FlipBit(&GPIOC->DATA, GPIOC_PIN_FLASHLIGHT);
|
||||
|
||||
if(c == 18) {
|
||||
next += 7*u;
|
||||
c = 0;
|
||||
}
|
||||
else if(c==7 || c==9 || c==11)
|
||||
next += 3*u;
|
||||
else
|
||||
next += u;
|
||||
|
||||
c++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef ENABLE_VOX
|
||||
if (gVoxResumeCountdown > 0)
|
||||
@@ -1489,9 +1377,9 @@ void APP_TimeSlice10ms(void)
|
||||
|
||||
RADIO_EnableCxCSS();
|
||||
BK4819_SetupPowerAmplifier(0, 0);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29, false);
|
||||
BK4819_Enable_AfDac_DiscMode_TxDsp();
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_RED, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, false);
|
||||
|
||||
GUI_DisplayScreen();
|
||||
}
|
||||
@@ -1501,7 +1389,7 @@ void APP_TimeSlice10ms(void)
|
||||
|
||||
GUI_DisplayScreen();
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_RED, true);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, true);
|
||||
RADIO_SetTxParameters();
|
||||
BK4819_TransmitTone(true, 500);
|
||||
SYSTEM_DelayMs(2);
|
||||
@@ -1763,7 +1651,7 @@ void APP_TimeSlice500ms(void)
|
||||
#endif
|
||||
|
||||
if (gBacklightCountdown > 0 && !gAskToSave && gCssScanMode == CSS_SCAN_MODE_OFF)
|
||||
if (gScreenToDisplay != DISPLAY_MENU || gMenuCursor != MENU_ABR) // don't turn off backlight if user is in backlight menu option
|
||||
if (gScreenToDisplay != DISPLAY_MENU || GetCurrentMenuId() != MENU_ABR) // don't turn off backlight if user is in backlight menu option
|
||||
if (--gBacklightCountdown == 0)
|
||||
if (gEeprom.BACKLIGHT < (ARRAY_SIZE(gSubMenu_BACKLIGHT) - 1))
|
||||
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn backlight off
|
||||
@@ -1827,7 +1715,7 @@ void APP_TimeSlice500ms(void)
|
||||
if (gScanStateDir == SCAN_OFF && (gScreenToDisplay != DISPLAY_SCANNER || gScanCssState >= SCAN_CSS_STATE_FOUND))
|
||||
#endif
|
||||
{
|
||||
if (gEeprom.AUTO_KEYPAD_LOCK && gKeyLockCountdown > 0 && !gDTMF_InputMode)
|
||||
if (gEeprom.AUTO_KEYPAD_LOCK && gKeyLockCountdown > 0 && !gDTMF_InputMode && gScreenToDisplay != DISPLAY_MENU)
|
||||
{
|
||||
if (--gKeyLockCountdown == 0)
|
||||
gEeprom.KEY_LOCK = true; // lock the keyboard
|
||||
@@ -1899,24 +1787,24 @@ void APP_TimeSlice500ms(void)
|
||||
if (gCurrentFunction != FUNCTION_POWER_SAVE && gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
updateRSSI(gEeprom.RX_VFO);
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (!gPttIsPressed && gFM_ResumeCountdown_500ms > 0)
|
||||
if (!gPttIsPressed && gVFOStateResumeCountdown_500ms > 0)
|
||||
{
|
||||
if (--gVFOStateResumeCountdown_500ms == 0)
|
||||
{
|
||||
if (--gFM_ResumeCountdown_500ms == 0)
|
||||
{
|
||||
RADIO_SetVfoState(VFO_STATE_NORMAL);
|
||||
|
||||
if (gCurrentFunction != FUNCTION_RECEIVE &&
|
||||
gCurrentFunction != FUNCTION_TRANSMIT &&
|
||||
gCurrentFunction != FUNCTION_MONITOR &&
|
||||
gFmRadioMode)
|
||||
{ // switch back to FM radio mode
|
||||
FM_Start();
|
||||
GUI_SelectNextDisplay(DISPLAY_FM);
|
||||
}
|
||||
RADIO_SetVfoState(VFO_STATE_NORMAL);
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (gCurrentFunction != FUNCTION_RECEIVE &&
|
||||
gCurrentFunction != FUNCTION_TRANSMIT &&
|
||||
gCurrentFunction != FUNCTION_MONITOR &&
|
||||
gFmRadioMode)
|
||||
{ // switch back to FM radio mode
|
||||
FM_Start();
|
||||
GUI_SelectNextDisplay(DISPLAY_FM);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
if (gLowBattery)
|
||||
{
|
||||
@@ -2054,38 +1942,10 @@ void APP_TimeSlice500ms(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
void CHANNEL_Next(const bool bFlag, const int8_t scan_direction)
|
||||
{
|
||||
RADIO_SelectVfos();
|
||||
|
||||
gNextMrChannel = gRxVfo->CHANNEL_SAVE;
|
||||
gCurrentScanList = SCAN_NEXT_CHAN_SCANLIST1;
|
||||
gScanStateDir = scan_direction;
|
||||
|
||||
if (gNextMrChannel <= MR_CHANNEL_LAST)
|
||||
{ // channel mode
|
||||
if (bFlag)
|
||||
gRestoreMrChannel = gNextMrChannel;
|
||||
MR_NextChannel();
|
||||
}
|
||||
else
|
||||
{ // frequency mode
|
||||
if (bFlag)
|
||||
gRestoreFrequency = gRxVfo->freq_config_RX.Frequency;
|
||||
FREQ_NextChannel();
|
||||
}
|
||||
|
||||
gScanPauseDelayIn_10ms = scan_pause_delay_in_2_10ms;
|
||||
gScheduleScanListen = false;
|
||||
gRxReceptionMode = RX_MODE_NONE;
|
||||
gScanPauseMode = false;
|
||||
bScanKeepFrequency = false;
|
||||
}
|
||||
|
||||
static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
bool bFlag = false;
|
||||
|
||||
const bool backlight_was_on = GPIO_CheckBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
|
||||
|
||||
if (Key == KEY_EXIT && !backlight_was_on && gEeprom.BACKLIGHT > 0)
|
||||
@@ -2103,7 +1963,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
if (gEeprom.AUTO_KEYPAD_LOCK)
|
||||
gKeyLockCountdown = 30; // 15 seconds
|
||||
|
||||
if (!bKeyPressed)
|
||||
if (!bKeyPressed) // key released
|
||||
{
|
||||
if (gFlagSaveVfo)
|
||||
{
|
||||
@@ -2136,9 +1996,10 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
GUI_SelectNextDisplay(DISPLAY_MAIN);
|
||||
}
|
||||
}
|
||||
else
|
||||
else // key pressed or held
|
||||
{
|
||||
if (Key != KEY_PTT || gSetting_backlight_on_tx_rx == 1 || gSetting_backlight_on_tx_rx == 3)
|
||||
if (Key != KEY_PTT || gSetting_backlight_on_tx_rx == BACKLIGHT_ON_TR_TX
|
||||
|| gSetting_backlight_on_tx_rx == BACKLIGHT_ON_TR_TXRX)
|
||||
BACKLIGHT_TurnOn();
|
||||
|
||||
if (Key == KEY_EXIT && bKeyHeld)
|
||||
@@ -2190,10 +2051,14 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (Key != KEY_SIDE1 && Key != KEY_SIDE2)
|
||||
// KEY_MENU has a special treatment here, because we want to pass hold event to ACTION_Handle
|
||||
// but we don't want it to complain when initial press happens
|
||||
// we want to react on realese instead
|
||||
else if (Key != KEY_SIDE1 && Key != KEY_SIDE2 && // pass side buttons
|
||||
!(Key == KEY_MENU && bKeyHeld)) // pass KEY_MENU held
|
||||
{
|
||||
if (!bKeyPressed || bKeyHeld)
|
||||
if ((!bKeyPressed || bKeyHeld || (Key == KEY_MENU && bKeyPressed)) && // prevent released or held, prevent KEY_MENU pressed
|
||||
!(Key == KEY_MENU && !bKeyPressed)) // pass KEY_MENU released
|
||||
return;
|
||||
|
||||
// keypad is locked, tell the user
|
||||
@@ -2204,7 +2069,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
}
|
||||
|
||||
if ((Key >= KEY_0 && Key <= KEY_9) || Key == KEY_F)
|
||||
if (Key <= KEY_9 || Key == KEY_F)
|
||||
{
|
||||
if (gScanStateDir != SCAN_OFF || gCssScanMode != CSS_SCAN_MODE_OFF)
|
||||
{ // FREQ/CTCSS/DCS scanning
|
||||
@@ -2214,6 +2079,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
}
|
||||
|
||||
bool bFlag = false;
|
||||
if (Key == KEY_PTT)
|
||||
{
|
||||
if (gPttWasPressed)
|
||||
@@ -2226,8 +2092,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if (gPttWasReleased)
|
||||
else if (gPttWasReleased)
|
||||
{
|
||||
if (bKeyHeld)
|
||||
bFlag = true;
|
||||
@@ -2249,9 +2114,9 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
{ // transmitting
|
||||
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
if (gAlarmState == ALARM_STATE_OFF)
|
||||
#endif
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
if (gAlarmState == ALARM_STATE_OFF)
|
||||
#endif
|
||||
{
|
||||
char Code;
|
||||
|
||||
@@ -2306,7 +2171,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
BK4819_PlayDTMFEx(gEeprom.DTMF_SIDE_TONE, Code);
|
||||
}
|
||||
}
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
else
|
||||
if ((!bKeyHeld && bKeyPressed) || (gAlarmState == ALARM_STATE_TX1750 && bKeyHeld && !bKeyPressed))
|
||||
{
|
||||
@@ -2323,14 +2188,14 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
if (!bKeyHeld)
|
||||
gPttWasReleased = true;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
else
|
||||
if (Key != KEY_SIDE1 && Key != KEY_SIDE2)
|
||||
else if (Key != KEY_SIDE1 && Key != KEY_SIDE2)
|
||||
{
|
||||
switch (gScreenToDisplay)
|
||||
{
|
||||
case DISPLAY_MAIN:
|
||||
|
||||
MAIN_ProcessKeys(Key, bKeyPressed, bKeyHeld);
|
||||
// bKeyHeld = false; // allow the channel setting to be saved
|
||||
break;
|
||||
@@ -2361,16 +2226,15 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
}
|
||||
else
|
||||
#ifdef ENABLE_AIRCOPY
|
||||
if (gScreenToDisplay != DISPLAY_SCANNER && gScreenToDisplay != DISPLAY_AIRCOPY)
|
||||
#else
|
||||
if (gScreenToDisplay != DISPLAY_SCANNER)
|
||||
#endif
|
||||
#ifdef ENABLE_AIRCOPY
|
||||
if (gScreenToDisplay != DISPLAY_SCANNER && gScreenToDisplay != DISPLAY_AIRCOPY)
|
||||
#else
|
||||
if (gScreenToDisplay != DISPLAY_SCANNER)
|
||||
#endif
|
||||
{
|
||||
ACTION_Handle(Key, bKeyPressed, bKeyHeld);
|
||||
}
|
||||
else
|
||||
if (!bKeyHeld && bKeyPressed)
|
||||
else if (!bKeyHeld && bKeyPressed)
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ extern const uint8_t orig_mixer;
|
||||
extern const uint8_t orig_pga;
|
||||
|
||||
void APP_EndTransmission(void);
|
||||
void CHANNEL_Next(const bool bFlag, const int8_t scan_direction);
|
||||
void APP_StartListening(FUNCTION_Type_t Function, const bool reset_am_fix);
|
||||
uint32_t APP_SetFrequencyByStep(VFO_Info_t *pInfo, int8_t Step);
|
||||
void APP_Update(void);
|
||||
|
||||
37
app/common.c
Normal file
37
app/common.c
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "functions.h"
|
||||
#include "misc.h"
|
||||
#include "settings.h"
|
||||
#include "ui/ui.h"
|
||||
|
||||
void COMMON_KeypadLockToggle()
|
||||
{
|
||||
|
||||
if (gScreenToDisplay != DISPLAY_MENU &&
|
||||
gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
{ // toggle the keyboad lock
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = gEeprom.KEY_LOCK ? VOICE_ID_UNLOCK : VOICE_ID_LOCK;
|
||||
#endif
|
||||
|
||||
gEeprom.KEY_LOCK = !gEeprom.KEY_LOCK;
|
||||
|
||||
gRequestSaveSettings = true;
|
||||
}
|
||||
}
|
||||
|
||||
void COMMON_SwitchVFOs()
|
||||
{
|
||||
gEeprom.TX_VFO ^= 1;
|
||||
|
||||
if (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF)
|
||||
gEeprom.CROSS_BAND_RX_TX = gEeprom.TX_VFO + 1;
|
||||
if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF)
|
||||
gEeprom.DUAL_WATCH = gEeprom.TX_VFO + 1;
|
||||
|
||||
gRequestSaveSettings = 1;
|
||||
gFlagReconfigureVfos = true;
|
||||
gScheduleDualWatch = true;
|
||||
|
||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||
}
|
||||
12
app/common.h
Normal file
12
app/common.h
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
#ifndef APP_COMMON_H
|
||||
#define APP_COMMON_H
|
||||
|
||||
#include "functions.h"
|
||||
#include "settings.h"
|
||||
#include "ui/ui.h"
|
||||
|
||||
void COMMON_KeypadLockToggle();
|
||||
void COMMON_SwitchVFOs();
|
||||
|
||||
#endif
|
||||
@@ -356,13 +356,11 @@ void DTMF_HandleRequest(void)
|
||||
|
||||
gUpdateDisplay = true;
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
switch (gEeprom.DTMF_DECODE_RESPONSE)
|
||||
{
|
||||
case DTMF_DEC_RESPONSE_BOTH:
|
||||
gDTMF_DecodeRingCountdown_500ms = DTMF_decode_ring_countdown_500ms;
|
||||
[[fallthrough]];
|
||||
case DTMF_DEC_RESPONSE_REPLY:
|
||||
gDTMF_ReplyState = DTMF_REPLY_AAAAA;
|
||||
break;
|
||||
@@ -376,8 +374,6 @@ void DTMF_HandleRequest(void)
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
if (gDTMF_IsGroupCall)
|
||||
gDTMF_ReplyState = DTMF_REPLY_NONE;
|
||||
}
|
||||
|
||||
4
app/fm.c
4
app/fm.c
@@ -45,7 +45,6 @@ bool gFM_AutoScan;
|
||||
uint8_t gFM_ChannelPosition;
|
||||
bool gFM_FoundFrequency;
|
||||
bool gFM_AutoScan;
|
||||
uint8_t gFM_ResumeCountdown_500ms;
|
||||
uint16_t gFM_RestoreCountdown_10ms;
|
||||
|
||||
bool FM_CheckValidChannel(uint8_t Channel)
|
||||
@@ -278,8 +277,7 @@ static void FM_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
uint32_t Frequency;
|
||||
|
||||
gInputBoxIndex = 0;
|
||||
NUMBER_Get(gInputBox, &Frequency);
|
||||
Frequency /= 10000;
|
||||
Frequency = StrToUL(INPUTBOX_GetAscii());
|
||||
|
||||
if (Frequency < gEeprom.FM_LowerLimit || gEeprom.FM_UpperLimit < Frequency)
|
||||
{
|
||||
|
||||
1
app/fm.h
1
app/fm.h
@@ -39,7 +39,6 @@ extern uint8_t gFM_ChannelPosition;
|
||||
extern uint16_t gFM_FrequencyDeviation;
|
||||
extern bool gFM_FoundFrequency;
|
||||
extern bool gFM_AutoScan;
|
||||
extern uint8_t gFM_ResumeCountdown_500ms;
|
||||
extern uint16_t gFM_RestoreCountdown_10ms;
|
||||
|
||||
bool FM_CheckValidChannel(uint8_t Channel);
|
||||
|
||||
@@ -17,9 +17,12 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "app/app.h"
|
||||
#include "app/common.h"
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
#include "app/fm.h"
|
||||
#endif
|
||||
|
||||
#include "app/generic.h"
|
||||
#include "app/menu.h"
|
||||
#include "app/scanner.h"
|
||||
@@ -37,39 +40,24 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
if (gInputBoxIndex > 0)
|
||||
{
|
||||
if (!bKeyHeld && bKeyPressed)
|
||||
if (!bKeyHeld && bKeyPressed) // short pressed
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (bKeyHeld || !bKeyPressed)
|
||||
if (bKeyHeld || !bKeyPressed) // held or released
|
||||
{
|
||||
if (bKeyHeld || bKeyPressed)
|
||||
if (bKeyHeld || bKeyPressed) // held or pressed (cannot be held and not pressed I guess, so it checks only if HELD?)
|
||||
{
|
||||
if (!bKeyHeld)
|
||||
if (!bKeyHeld) // won't ever pass
|
||||
return;
|
||||
|
||||
if (!bKeyPressed)
|
||||
if (!bKeyPressed) // won't ever pass
|
||||
return;
|
||||
|
||||
if (gScreenToDisplay != DISPLAY_MENU &&
|
||||
gScreenToDisplay != DISPLAY_FM &&
|
||||
#ifdef ENABLE_FMRADIO
|
||||
!gFmRadioMode &&
|
||||
#endif
|
||||
gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
{ // toggle the keyboad lock
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = gEeprom.KEY_LOCK ? VOICE_ID_UNLOCK : VOICE_ID_LOCK;
|
||||
#endif
|
||||
|
||||
gEeprom.KEY_LOCK = !gEeprom.KEY_LOCK;
|
||||
|
||||
gRequestSaveSettings = true;
|
||||
}
|
||||
COMMON_KeypadLockToggle();
|
||||
}
|
||||
else
|
||||
else // released
|
||||
{
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if ((gFmRadioMode || gScreenToDisplay != DISPLAY_MAIN) && gScreenToDisplay != DISPLAY_FM)
|
||||
@@ -79,7 +67,7 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
|
||||
return;
|
||||
#endif
|
||||
|
||||
gWasFKeyPressed = !gWasFKeyPressed;
|
||||
gWasFKeyPressed = !gWasFKeyPressed; // toggle F function
|
||||
|
||||
if (gWasFKeyPressed)
|
||||
gKeyInputCountdown = key_input_timeout_500ms;
|
||||
@@ -92,7 +80,7 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
|
||||
gUpdateStatus = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
else // short pressed
|
||||
{
|
||||
if (gScreenToDisplay != DISPLAY_FM)
|
||||
{
|
||||
@@ -101,7 +89,7 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (gFM_ScanState == FM_SCAN_OFF)
|
||||
if (gFM_ScanState == FM_SCAN_OFF) // not scanning
|
||||
{
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
return;
|
||||
@@ -120,7 +108,6 @@ void GENERIC_Key_PTT(bool bKeyPressed)
|
||||
|
||||
if (!bKeyPressed || gSerialConfigCountDown_500ms > 0)
|
||||
{ // PTT released
|
||||
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
{ // we are transmitting .. stop
|
||||
|
||||
@@ -185,22 +172,22 @@ void GENERIC_Key_PTT(bool bKeyPressed)
|
||||
goto cancel_tx;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (gFM_ScanState != FM_SCAN_OFF)
|
||||
{ // FM radio is scanning .. stop
|
||||
FM_PlayAndUpdate();
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = VOICE_ID_SCANNING_STOP;
|
||||
#endif
|
||||
gRequestDisplayScreen = DISPLAY_FM;
|
||||
goto cancel_tx;
|
||||
}
|
||||
#endif
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (gFM_ScanState != FM_SCAN_OFF)
|
||||
{ // FM radio is scanning .. stop
|
||||
FM_PlayAndUpdate();
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = VOICE_ID_SCANNING_STOP;
|
||||
#endif
|
||||
gRequestDisplayScreen = DISPLAY_FM;
|
||||
goto cancel_tx;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (gScreenToDisplay == DISPLAY_FM)
|
||||
goto start_tx; // listening to the FM radio .. start TX'ing
|
||||
#endif
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (gScreenToDisplay == DISPLAY_FM)
|
||||
goto start_tx; // listening to the FM radio .. start TX'ing
|
||||
#endif
|
||||
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT && gRTTECountdown == 0)
|
||||
{ // already transmitting
|
||||
@@ -259,7 +246,6 @@ start_tx:
|
||||
cancel_tx:
|
||||
if (gPttIsPressed)
|
||||
{
|
||||
gPttIsPressed = false;
|
||||
gPttWasPressed = true;
|
||||
}
|
||||
|
||||
|
||||
202
app/main.c
202
app/main.c
@@ -18,15 +18,18 @@
|
||||
|
||||
#include "app/action.h"
|
||||
#include "app/app.h"
|
||||
#include "app/common.h"
|
||||
#ifdef ENABLE_FMRADIO
|
||||
#include "app/fm.h"
|
||||
#endif
|
||||
#include "app/generic.h"
|
||||
#include "app/main.h"
|
||||
#include "app/scanner.h"
|
||||
|
||||
#ifdef ENABLE_SPECTRUM
|
||||
#include "app/spectrum.h"
|
||||
#endif
|
||||
|
||||
#include "audio.h"
|
||||
#include "board.h"
|
||||
#include "driver/bk4819.h"
|
||||
@@ -37,9 +40,7 @@
|
||||
#include "settings.h"
|
||||
#include "ui/inputbox.h"
|
||||
#include "ui/ui.h"
|
||||
#ifdef ENABLE_SPECTRUM
|
||||
// #include "app/spectrum.h"
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
void toggle_chan_scanlist(void)
|
||||
{ // toggle the selected channels scanlist setting
|
||||
@@ -98,26 +99,71 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
||||
break;
|
||||
|
||||
case KEY_1:
|
||||
if (!IS_FREQ_CHANNEL(gTxVfo->CHANNEL_SAVE))
|
||||
{
|
||||
if (!IS_FREQ_CHANNEL(gTxVfo->CHANNEL_SAVE)) {
|
||||
gWasFKeyPressed = false;
|
||||
gUpdateStatus = true;
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
#ifdef ENABLE_COPY_CHAN_TO_VFO
|
||||
if (gEeprom.VFO_OPEN && gCssScanMode == CSS_SCAN_MODE_OFF)
|
||||
{
|
||||
|
||||
if (gScanStateDir != SCAN_OFF)
|
||||
{
|
||||
if (gCurrentFunction != FUNCTION_INCOMING ||
|
||||
gRxReceptionMode == RX_MODE_NONE ||
|
||||
gScanPauseDelayIn_10ms == 0)
|
||||
{ // scan is running (not paused)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const uint8_t vfo = gEeprom.TX_VFO;
|
||||
|
||||
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo]))
|
||||
{ // copy channel to VFO, then swap to the VFO
|
||||
|
||||
const unsigned int channel = FREQ_CHANNEL_FIRST + gEeprom.VfoInfo[vfo].Band;
|
||||
|
||||
gEeprom.ScreenChannel[vfo] = channel;
|
||||
gEeprom.VfoInfo[vfo].CHANNEL_SAVE = channel;
|
||||
|
||||
RADIO_SelectVfos();
|
||||
RADIO_ApplyOffset(gRxVfo);
|
||||
RADIO_ConfigureSquelchAndOutputPower(gRxVfo);
|
||||
RADIO_SetupRegisters(true);
|
||||
|
||||
//SETTINGS_SaveChannel(channel, gEeprom.RX_VFO, gRxVfo, 1);
|
||||
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
Band = gTxVfo->Band + 1;
|
||||
if (gSetting_350EN || Band != BAND5_350MHz)
|
||||
{
|
||||
if (Band > BAND7_470MHz)
|
||||
Band = BAND1_50MHz;
|
||||
if(gTxVfo->Band == 6 && gTxVfo->pRX->Frequency < 100000000) {
|
||||
gTxVfo->pRX->Frequency = 100000000;
|
||||
return;
|
||||
}
|
||||
else
|
||||
Band = BAND6_400MHz;
|
||||
gTxVfo->Band = Band;
|
||||
else {
|
||||
Band = gTxVfo->Band + 1;
|
||||
if (gSetting_350EN || Band != BAND5_350MHz) {
|
||||
if (Band > BAND7_470MHz)
|
||||
Band = BAND1_50MHz;
|
||||
}
|
||||
else
|
||||
Band = BAND6_400MHz;
|
||||
|
||||
gEeprom.ScreenChannel[Vfo] = FREQ_CHANNEL_FIRST + Band;
|
||||
gEeprom.FreqChannel[Vfo] = FREQ_CHANNEL_FIRST + Band;
|
||||
gTxVfo->Band = Band;
|
||||
|
||||
gEeprom.ScreenChannel[Vfo] = FREQ_CHANNEL_FIRST + Band;
|
||||
gEeprom.FreqChannel[Vfo] = FREQ_CHANNEL_FIRST + Band;
|
||||
}
|
||||
|
||||
gRequestSaveVFO = true;
|
||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||
@@ -130,28 +176,10 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
||||
break;
|
||||
|
||||
case KEY_2:
|
||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_A)
|
||||
gEeprom.CROSS_BAND_RX_TX = CROSS_BAND_CHAN_B;
|
||||
else
|
||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_B)
|
||||
gEeprom.CROSS_BAND_RX_TX = CROSS_BAND_CHAN_A;
|
||||
else
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_A)
|
||||
gEeprom.DUAL_WATCH = DUAL_WATCH_CHAN_B;
|
||||
else
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_B)
|
||||
gEeprom.DUAL_WATCH = DUAL_WATCH_CHAN_A;
|
||||
else
|
||||
gEeprom.TX_VFO = (Vfo + 1) & 1u;
|
||||
|
||||
gRequestSaveSettings = 1;
|
||||
gFlagReconfigureVfos = true;
|
||||
|
||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||
COMMON_SwitchVFOs();
|
||||
|
||||
if (beep)
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
break;
|
||||
|
||||
case KEY_3:
|
||||
@@ -209,7 +237,7 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
||||
|
||||
case KEY_5:
|
||||
if(beep) {
|
||||
#ifdef ENABLE_NOAA
|
||||
#ifdef ENABLE_NOAA
|
||||
|
||||
if (IS_NOT_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE))
|
||||
{
|
||||
@@ -218,9 +246,9 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
||||
else
|
||||
{
|
||||
gEeprom.ScreenChannel[Vfo] = gEeprom.FreqChannel[gEeprom.TX_VFO];
|
||||
#ifdef ENABLE_VOICE
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = VOICE_ID_FREQUENCY_MODE;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
gRequestSaveVFO = true;
|
||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||
@@ -230,9 +258,9 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
#ifdef ENABLE_VOX
|
||||
#ifdef ENABLE_VOX
|
||||
toggle_chan_scanlist();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -242,11 +270,11 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
||||
break;
|
||||
|
||||
case KEY_7:
|
||||
#ifdef ENABLE_VOX
|
||||
ACTION_Vox();
|
||||
#else
|
||||
toggle_chan_scanlist();
|
||||
#endif
|
||||
#ifdef ENABLE_VOX
|
||||
ACTION_Vox();
|
||||
#else
|
||||
toggle_chan_scanlist();
|
||||
#endif
|
||||
break;
|
||||
|
||||
case KEY_8:
|
||||
@@ -259,11 +287,11 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
||||
{
|
||||
gEeprom.MrChannel[Vfo] = gEeprom.CHAN_1_CALL;
|
||||
gEeprom.ScreenChannel[Vfo] = gEeprom.CHAN_1_CALL;
|
||||
#ifdef ENABLE_VOICE
|
||||
AUDIO_SetVoiceID(0, VOICE_ID_CHANNEL_MODE);
|
||||
AUDIO_SetDigitVoice(1, gEeprom.CHAN_1_CALL + 1);
|
||||
gAnotherVoiceID = (VOICE_ID_t)0xFE;
|
||||
#endif
|
||||
#ifdef ENABLE_VOICE
|
||||
AUDIO_SetVoiceID(0, VOICE_ID_CHANNEL_MODE);
|
||||
AUDIO_SetDigitVoice(1, gEeprom.CHAN_1_CALL + 1);
|
||||
gAnotherVoiceID = (VOICE_ID_t)0xFE;
|
||||
#endif
|
||||
gRequestSaveVFO = true;
|
||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||
break;
|
||||
@@ -368,8 +396,8 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
{ // user is entering a frequency
|
||||
|
||||
uint32_t Frequency;
|
||||
|
||||
if (gInputBoxIndex < 6)
|
||||
bool isGigaF = gTxVfo->pRX->Frequency >= 100000000;
|
||||
if (gInputBoxIndex < 6 + isGigaF)
|
||||
{
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||
@@ -379,8 +407,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
|
||||
gInputBoxIndex = 0;
|
||||
|
||||
NUMBER_Get(gInputBox, &Frequency);
|
||||
Frequency = StrToUL(INPUTBOX_GetAscii()) * 100;
|
||||
|
||||
// clamp the frequency entered to some valid value
|
||||
if (Frequency < frequencyBandTable[0].lower)
|
||||
@@ -513,6 +540,7 @@ static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
else
|
||||
{
|
||||
bScanKeepFrequency = false;
|
||||
SCANNER_Stop();
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
@@ -571,51 +599,7 @@ static void MAIN_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
gWasFKeyPressed = false;
|
||||
gUpdateStatus = true;
|
||||
|
||||
#ifdef ENABLE_COPY_CHAN_TO_VFO
|
||||
|
||||
if (gEeprom.VFO_OPEN && gCssScanMode == CSS_SCAN_MODE_OFF)
|
||||
{
|
||||
|
||||
if (gScanStateDir != SCAN_OFF)
|
||||
{
|
||||
if (gCurrentFunction != FUNCTION_INCOMING ||
|
||||
gRxReceptionMode == RX_MODE_NONE ||
|
||||
gScanPauseDelayIn_10ms == 0)
|
||||
{ // scan is running (not paused)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const unsigned int vfo = get_rx_VFO();
|
||||
|
||||
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo]))
|
||||
{ // copy channel to VFO, then swap to the VFO
|
||||
|
||||
const unsigned int channel = FREQ_CHANNEL_FIRST + gEeprom.VfoInfo[vfo].Band;
|
||||
|
||||
gEeprom.ScreenChannel[vfo] = channel;
|
||||
gEeprom.VfoInfo[vfo].CHANNEL_SAVE = channel;
|
||||
gEeprom.TX_VFO = vfo;
|
||||
|
||||
RADIO_SelectVfos();
|
||||
RADIO_ApplyOffset(gRxVfo);
|
||||
RADIO_ConfigureSquelchAndOutputPower(gRxVfo);
|
||||
RADIO_SetupRegisters(true);
|
||||
|
||||
//SETTINGS_SaveChannel(channel, gEeprom.RX_VFO, gRxVfo, 1);
|
||||
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
gUpdateStatus = true;
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
|
||||
#endif
|
||||
ACTION_Handle(KEY_MENU, bKeyPressed, bKeyHeld);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -654,28 +638,28 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
||||
return;
|
||||
}
|
||||
|
||||
if (bKeyHeld && !gWasFKeyPressed)
|
||||
{ // long press .. toggle scanning
|
||||
if (!bKeyPressed)
|
||||
return; // released
|
||||
if (bKeyHeld && !gWasFKeyPressed) // long press
|
||||
{
|
||||
if (!bKeyPressed) // released
|
||||
return;
|
||||
|
||||
ACTION_Scan(false);
|
||||
ACTION_Scan(false);// toggle scanning
|
||||
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (bKeyPressed)
|
||||
{ // just pressed
|
||||
// gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
if (bKeyPressed) // just pressed
|
||||
{
|
||||
// gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
gBeepToPlay = BEEP_880HZ_40MS_OPTIONAL;
|
||||
return;
|
||||
}
|
||||
|
||||
// just released
|
||||
|
||||
if (!gWasFKeyPressed)
|
||||
{ // pressed without the F-key
|
||||
if (!gWasFKeyPressed) // pressed without the F-key
|
||||
{
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
if (gScanStateDir == SCAN_OFF && IS_NOT_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE))
|
||||
@@ -810,7 +794,7 @@ static void MAIN_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
}
|
||||
|
||||
// jump to the next channel
|
||||
CHANNEL_Next(false, Direction);
|
||||
SCANNER_NextChannel(false, Direction);
|
||||
gScanPauseDelayIn_10ms = 1;
|
||||
gScheduleScanListen = false;
|
||||
|
||||
|
||||
196
app/menu.c
196
app/menu.c
@@ -98,9 +98,9 @@ void MENU_StopCssScan(void)
|
||||
RADIO_SetupRegisters(true);
|
||||
}
|
||||
|
||||
int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
|
||||
int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
||||
{
|
||||
switch (Cursor)
|
||||
switch (menu_id)
|
||||
{
|
||||
case MENU_SQL:
|
||||
*pMin = 0;
|
||||
@@ -139,12 +139,7 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
|
||||
|
||||
case MENU_TDR:
|
||||
*pMin = 0;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_CHAN) - 1;
|
||||
break;
|
||||
|
||||
case MENU_XB:
|
||||
*pMin = 0;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_XB) - 1;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_RXMode) - 1;
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
@@ -285,7 +280,6 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
|
||||
|
||||
case MENU_S_LIST:
|
||||
*pMin = 0;
|
||||
// *pMax = 1;
|
||||
*pMax = 2;
|
||||
break;
|
||||
|
||||
@@ -331,6 +325,15 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
|
||||
*pMax = 2200; // 2300
|
||||
break;
|
||||
|
||||
case MENU_F1SHRT:
|
||||
case MENU_F1LONG:
|
||||
case MENU_F2SHRT:
|
||||
case MENU_F2LONG:
|
||||
case MENU_MLONG:
|
||||
*pMin = 0;
|
||||
*pMax = gSubMenu_SIDEFUNCTIONS_size-1;
|
||||
break;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
@@ -345,14 +348,14 @@ void MENU_AcceptSetting(void)
|
||||
uint8_t Code;
|
||||
FREQ_Config_t *pConfig = &gTxVfo->freq_config_RX;
|
||||
|
||||
if (!MENU_GetLimits(gMenuCursor, &Min, &Max))
|
||||
if (!MENU_GetLimits(GetCurrentMenuId(), &Min, &Max))
|
||||
{
|
||||
if (gSubMenuSelection < Min) gSubMenuSelection = Min;
|
||||
else
|
||||
if (gSubMenuSelection > Max) gSubMenuSelection = Max;
|
||||
}
|
||||
|
||||
switch (gMenuCursor)
|
||||
switch (GetCurrentMenuId())
|
||||
{
|
||||
default:
|
||||
return;
|
||||
@@ -408,11 +411,9 @@ void MENU_AcceptSetting(void)
|
||||
gRequestSaveChannel = 1;
|
||||
return;
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
case MENU_T_CTCS:
|
||||
pConfig = &gTxVfo->freq_config_TX;
|
||||
[[fallthrough]];
|
||||
case MENU_R_CTCS:
|
||||
if (gSubMenuSelection == 0)
|
||||
{
|
||||
@@ -439,8 +440,6 @@ void MENU_AcceptSetting(void)
|
||||
gRequestSaveChannel = 1;
|
||||
return;
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
case MENU_SFT_D:
|
||||
gTxVfo->TX_OFFSET_FREQUENCY_DIRECTION = gSubMenuSelection;
|
||||
gRequestSaveChannel = 1;
|
||||
@@ -510,7 +509,7 @@ void MENU_AcceptSetting(void)
|
||||
gEeprom.VOX_SWITCH = gSubMenuSelection != 0;
|
||||
if (gEeprom.VOX_SWITCH)
|
||||
gEeprom.VOX_LEVEL = gSubMenuSelection - 1;
|
||||
BOARD_EEPROM_LoadMoreSettings();
|
||||
BOARD_EEPROM_LoadCalibration();
|
||||
gFlagReconfigureVfos = true;
|
||||
gUpdateStatus = true;
|
||||
break;
|
||||
@@ -525,24 +524,13 @@ void MENU_AcceptSetting(void)
|
||||
break;
|
||||
|
||||
case MENU_TDR:
|
||||
gEeprom.DUAL_WATCH = gSubMenuSelection;
|
||||
gEeprom.DUAL_WATCH = (gEeprom.TX_VFO + 1) * (gSubMenuSelection & 1);
|
||||
gEeprom.CROSS_BAND_RX_TX = (gEeprom.TX_VFO + 1) * ((gSubMenuSelection & 2) > 0);
|
||||
|
||||
gFlagReconfigureVfos = true;
|
||||
gUpdateStatus = true;
|
||||
break;
|
||||
|
||||
case MENU_XB:
|
||||
#ifdef ENABLE_NOAA
|
||||
if (IS_NOAA_CHANNEL(gEeprom.ScreenChannel[0]))
|
||||
return;
|
||||
if (IS_NOAA_CHANNEL(gEeprom.ScreenChannel[1]))
|
||||
return;
|
||||
#endif
|
||||
|
||||
gEeprom.CROSS_BAND_RX_TX = gSubMenuSelection;
|
||||
gFlagReconfigureVfos = true;
|
||||
gUpdateStatus = true;
|
||||
break;
|
||||
|
||||
case MENU_BEEP:
|
||||
gEeprom.BEEP_CONTROL = gSubMenuSelection;
|
||||
break;
|
||||
@@ -595,7 +583,7 @@ void MENU_AcceptSetting(void)
|
||||
|
||||
case MENU_MIC:
|
||||
gEeprom.MIC_SENSITIVITY = gSubMenuSelection;
|
||||
BOARD_EEPROM_LoadMoreSettings();
|
||||
BOARD_EEPROM_LoadCalibration();
|
||||
gFlagReconfigureVfos = true;
|
||||
break;
|
||||
|
||||
@@ -765,23 +753,32 @@ void MENU_AcceptSetting(void)
|
||||
|
||||
case MENU_BATCAL:
|
||||
{
|
||||
uint16_t buf[4];
|
||||
|
||||
gBatteryCalibration[0] = (520ul * gSubMenuSelection) / 760; // 5.20V empty, blinking above this value, reduced functionality below
|
||||
gBatteryCalibration[1] = (700ul * gSubMenuSelection) / 760; // 7.00V, ~5%, 1 bars above this value
|
||||
gBatteryCalibration[2] = (745ul * gSubMenuSelection) / 760; // 7.45V, ~17%, 2 bars above this value
|
||||
gBatteryCalibration[3] = gSubMenuSelection; // 7.6V, ~29%, 3 bars above this value
|
||||
gBatteryCalibration[4] = (788ul * gSubMenuSelection) / 760; // 7.88V, ~65%, 4 bars above this value
|
||||
gBatteryCalibration[5] = 2300;
|
||||
EEPROM_WriteBuffer(0x1F40, gBatteryCalibration);
|
||||
|
||||
EEPROM_ReadBuffer( 0x1F48, buf, sizeof(buf));
|
||||
buf[0] = gBatteryCalibration[4];
|
||||
buf[1] = gBatteryCalibration[5];
|
||||
EEPROM_WriteBuffer(0x1F48, buf);
|
||||
|
||||
break;
|
||||
SETTINGS_SaveBatteryCalibration(gBatteryCalibration);
|
||||
return;
|
||||
}
|
||||
|
||||
case MENU_F1SHRT:
|
||||
case MENU_F1LONG:
|
||||
case MENU_F2SHRT:
|
||||
case MENU_F2LONG:
|
||||
case MENU_MLONG:
|
||||
{
|
||||
uint8_t * fun[]= {
|
||||
&gEeprom.KEY_1_SHORT_PRESS_ACTION,
|
||||
&gEeprom.KEY_1_LONG_PRESS_ACTION,
|
||||
&gEeprom.KEY_2_SHORT_PRESS_ACTION,
|
||||
&gEeprom.KEY_2_LONG_PRESS_ACTION,
|
||||
&gEeprom.KEY_M_LONG_PRESS_ACTION};
|
||||
*fun[GetCurrentMenuId()-MENU_F1SHRT] = gSubMenu_SIDEFUNCTIONS[gSubMenuSelection].id;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
gRequestSaveSettings = true;
|
||||
@@ -791,18 +788,17 @@ void MENU_SelectNextCode(void)
|
||||
{
|
||||
int32_t UpperLimit;
|
||||
|
||||
if (gMenuCursor == MENU_R_DCS)
|
||||
if (GetCurrentMenuId() == MENU_R_DCS)
|
||||
UpperLimit = 208;
|
||||
//UpperLimit = ARRAY_SIZE(DCS_Options);
|
||||
else
|
||||
if (gMenuCursor == MENU_R_CTCS)
|
||||
else if (GetCurrentMenuId() == MENU_R_CTCS)
|
||||
UpperLimit = ARRAY_SIZE(CTCSS_Options) - 1;
|
||||
else
|
||||
return;
|
||||
|
||||
gSubMenuSelection = NUMBER_AddWithWraparound(gSubMenuSelection, gMenuScrollDirection, 1, UpperLimit);
|
||||
|
||||
if (gMenuCursor == MENU_R_DCS)
|
||||
if (GetCurrentMenuId() == MENU_R_DCS)
|
||||
{
|
||||
if (gSubMenuSelection > 104)
|
||||
{
|
||||
@@ -834,7 +830,7 @@ static void MENU_ClampSelection(int8_t Direction)
|
||||
int32_t Min;
|
||||
int32_t Max;
|
||||
|
||||
if (!MENU_GetLimits(gMenuCursor, &Min, &Max))
|
||||
if (!MENU_GetLimits(GetCurrentMenuId(), &Min, &Max))
|
||||
{
|
||||
int32_t Selection = gSubMenuSelection;
|
||||
if (Selection < Min) Selection = Min;
|
||||
@@ -846,7 +842,7 @@ static void MENU_ClampSelection(int8_t Direction)
|
||||
|
||||
void MENU_ShowCurrentSetting(void)
|
||||
{
|
||||
switch (gMenuCursor)
|
||||
switch (GetCurrentMenuId())
|
||||
{
|
||||
case MENU_SQL:
|
||||
gSubMenuSelection = gEeprom.SQUELCH_LEVEL;
|
||||
@@ -956,11 +952,7 @@ void MENU_ShowCurrentSetting(void)
|
||||
break;
|
||||
|
||||
case MENU_TDR:
|
||||
gSubMenuSelection = gEeprom.DUAL_WATCH;
|
||||
break;
|
||||
|
||||
case MENU_XB:
|
||||
gSubMenuSelection = gEeprom.CROSS_BAND_RX_TX;
|
||||
gSubMenuSelection = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2;
|
||||
break;
|
||||
|
||||
case MENU_BEEP:
|
||||
@@ -1153,6 +1145,30 @@ void MENU_ShowCurrentSetting(void)
|
||||
gSubMenuSelection = gBatteryCalibration[3];
|
||||
break;
|
||||
|
||||
case MENU_F1SHRT:
|
||||
case MENU_F1LONG:
|
||||
case MENU_F2SHRT:
|
||||
case MENU_F2LONG:
|
||||
case MENU_MLONG:
|
||||
{
|
||||
uint8_t * fun[]= {
|
||||
&gEeprom.KEY_1_SHORT_PRESS_ACTION,
|
||||
&gEeprom.KEY_1_LONG_PRESS_ACTION,
|
||||
&gEeprom.KEY_2_SHORT_PRESS_ACTION,
|
||||
&gEeprom.KEY_2_LONG_PRESS_ACTION,
|
||||
&gEeprom.KEY_M_LONG_PRESS_ACTION};
|
||||
uint8_t id = *fun[GetCurrentMenuId()-MENU_F1SHRT];
|
||||
|
||||
for(int i = 0; i < gSubMenu_SIDEFUNCTIONS_size; i++) {
|
||||
if(gSubMenu_SIDEFUNCTIONS[i].id==id) {
|
||||
gSubMenuSelection = i;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@@ -1170,12 +1186,12 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
if (gMenuCursor == MENU_MEM_NAME && edit_index >= 0)
|
||||
if (GetCurrentMenuId() == MENU_MEM_NAME && edit_index >= 0)
|
||||
{ // currently editing the channel name
|
||||
|
||||
if (edit_index < 10)
|
||||
{
|
||||
if (Key >= KEY_0 && Key <= KEY_9)
|
||||
if (Key <= KEY_9)
|
||||
{
|
||||
edit[edit_index] = '0' + Key - KEY_0;
|
||||
|
||||
@@ -1198,9 +1214,6 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
if (!gIsInSubMenu)
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
switch (gInputBoxIndex)
|
||||
{
|
||||
case 2:
|
||||
@@ -1220,7 +1233,7 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
gInputBox[0] = gInputBox[1];
|
||||
gInputBoxIndex = 1;
|
||||
|
||||
[[fallthrough]];
|
||||
case 1:
|
||||
Value = gInputBox[0];
|
||||
if (Value > 0 && Value <= gMenuListCount)
|
||||
@@ -1232,15 +1245,13 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
gInputBoxIndex = 0;
|
||||
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (gMenuCursor == MENU_OFFSET)
|
||||
if (GetCurrentMenuId() == MENU_OFFSET)
|
||||
{
|
||||
uint32_t Frequency;
|
||||
|
||||
@@ -1255,15 +1266,18 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||
#endif
|
||||
|
||||
NUMBER_Get(gInputBox, &Frequency);
|
||||
|
||||
Frequency = StrToUL(INPUTBOX_GetAscii());
|
||||
gSubMenuSelection = FREQUENCY_FloorToStep(Frequency + 75, gTxVfo->StepFrequency, 0);
|
||||
|
||||
gInputBoxIndex = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (gMenuCursor == MENU_MEM_CH || gMenuCursor == MENU_DEL_CH || gMenuCursor == MENU_1_CALL || gMenuCursor == MENU_MEM_NAME)
|
||||
|
||||
if (GetCurrentMenuId() == MENU_MEM_CH ||
|
||||
GetCurrentMenuId() == MENU_DEL_CH ||
|
||||
GetCurrentMenuId() == MENU_1_CALL ||
|
||||
GetCurrentMenuId() == MENU_MEM_NAME)
|
||||
{ // enter 3-digit channel number
|
||||
|
||||
if (gInputBoxIndex < 3)
|
||||
@@ -1292,7 +1306,7 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
return;
|
||||
}
|
||||
|
||||
if (MENU_GetLimits(gMenuCursor, &Min, &Max))
|
||||
if (MENU_GetLimits(GetCurrentMenuId(), &Min, &Max))
|
||||
{
|
||||
gInputBoxIndex = 0;
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
@@ -1337,7 +1351,7 @@ static void MENU_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
if (gIsInSubMenu)
|
||||
{
|
||||
if (gInputBoxIndex == 0 || gMenuCursor != MENU_OFFSET)
|
||||
if (gInputBoxIndex == 0 || GetCurrentMenuId() != MENU_OFFSET)
|
||||
{
|
||||
gAskForConfirmation = 0;
|
||||
gIsInSubMenu = false;
|
||||
@@ -1394,12 +1408,12 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
if (!gIsInSubMenu)
|
||||
{
|
||||
#ifdef ENABLE_VOICE
|
||||
if (gMenuCursor != MENU_SCR)
|
||||
if (GetCurrentMenuId() != MENU_SCR)
|
||||
gAnotherVoiceID = MenuList[gMenuCursor].voice_id;
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
if (gMenuCursor == MENU_DEL_CH || gMenuCursor == MENU_MEM_NAME)
|
||||
if (GetCurrentMenuId() == MENU_DEL_CH || GetCurrentMenuId() == MENU_MEM_NAME)
|
||||
if (!RADIO_CheckValidChannel(gSubMenuSelection, false, 0))
|
||||
return; // invalid channel
|
||||
#endif
|
||||
@@ -1407,7 +1421,7 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
gAskForConfirmation = 0;
|
||||
gIsInSubMenu = true;
|
||||
|
||||
// if (gMenuCursor != MENU_D_LIST)
|
||||
// if (GetCurrentMenuId() != MENU_D_LIST)
|
||||
{
|
||||
gInputBoxIndex = 0;
|
||||
edit_index = -1;
|
||||
@@ -1416,7 +1430,7 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
return;
|
||||
}
|
||||
|
||||
if (gMenuCursor == MENU_MEM_NAME)
|
||||
if (GetCurrentMenuId() == MENU_MEM_NAME)
|
||||
{
|
||||
if (edit_index < 0)
|
||||
{ // enter channel name edit mode
|
||||
@@ -1463,10 +1477,10 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
|
||||
if (gIsInSubMenu)
|
||||
{
|
||||
if (gMenuCursor == MENU_RESET ||
|
||||
gMenuCursor == MENU_MEM_CH ||
|
||||
gMenuCursor == MENU_DEL_CH ||
|
||||
gMenuCursor == MENU_MEM_NAME)
|
||||
if (GetCurrentMenuId() == MENU_RESET ||
|
||||
GetCurrentMenuId() == MENU_MEM_CH ||
|
||||
GetCurrentMenuId() == MENU_DEL_CH ||
|
||||
GetCurrentMenuId() == MENU_MEM_NAME)
|
||||
{
|
||||
switch (gAskForConfirmation)
|
||||
{
|
||||
@@ -1479,7 +1493,7 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
|
||||
UI_DisplayMenu();
|
||||
|
||||
if (gMenuCursor == MENU_RESET)
|
||||
if (GetCurrentMenuId() == MENU_RESET)
|
||||
{
|
||||
#ifdef ENABLE_VOICE
|
||||
AUDIO_SetVoiceID(0, VOICE_ID_CONFIRM);
|
||||
@@ -1514,7 +1528,7 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
}
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
if (gMenuCursor == MENU_SCR)
|
||||
if (GetCurrentMenuId() == MENU_SCR)
|
||||
gAnotherVoiceID = (gSubMenuSelection == 0) ? VOICE_ID_SCRAMBLER_OFF : VOICE_ID_SCRAMBLER_ON;
|
||||
else
|
||||
gAnotherVoiceID = VOICE_ID_CONFIRM;
|
||||
@@ -1530,7 +1544,7 @@ static void MENU_Key_STAR(const bool bKeyPressed, const bool bKeyHeld)
|
||||
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
if (gMenuCursor == MENU_MEM_NAME && edit_index >= 0)
|
||||
if (GetCurrentMenuId() == MENU_MEM_NAME && edit_index >= 0)
|
||||
{ // currently editing the channel name
|
||||
|
||||
if (edit_index < 10)
|
||||
@@ -1557,7 +1571,7 @@ static void MENU_Key_STAR(const bool bKeyPressed, const bool bKeyHeld)
|
||||
if (gRxVfo->AM_mode == 0)
|
||||
#endif
|
||||
{
|
||||
if (gMenuCursor == MENU_R_CTCS || gMenuCursor == MENU_R_DCS)
|
||||
if (GetCurrentMenuId() == MENU_R_CTCS || GetCurrentMenuId() == MENU_R_DCS)
|
||||
{ // scan CTCSS or DCS to find the tone/code of the incoming signal
|
||||
|
||||
if (gCssScanMode == CSS_SCAN_MODE_OFF)
|
||||
@@ -1592,7 +1606,7 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
uint8_t Channel;
|
||||
bool bCheckScanList;
|
||||
|
||||
if (gMenuCursor == MENU_MEM_NAME && gIsInSubMenu && edit_index >= 0)
|
||||
if (GetCurrentMenuId() == MENU_MEM_NAME && gIsInSubMenu && edit_index >= 0)
|
||||
{ // change the character
|
||||
if (bKeyPressed && edit_index < 10 && Direction != 0)
|
||||
{
|
||||
@@ -1644,7 +1658,7 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
|
||||
gRequestDisplayScreen = DISPLAY_MENU;
|
||||
|
||||
if (gMenuCursor != MENU_ABR && gEeprom.BACKLIGHT == 0)
|
||||
if (GetCurrentMenuId() != MENU_ABR && gEeprom.BACKLIGHT == 0)
|
||||
{
|
||||
gBacklightCountdown = 0;
|
||||
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn the backlight OFF
|
||||
@@ -1653,7 +1667,7 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
return;
|
||||
}
|
||||
|
||||
if (gMenuCursor == MENU_OFFSET)
|
||||
if (GetCurrentMenuId() == MENU_OFFSET)
|
||||
{
|
||||
int32_t Offset = (Direction * gTxVfo->StepFrequency) + gSubMenuSelection;
|
||||
if (Offset < 99999990)
|
||||
@@ -1671,10 +1685,7 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
|
||||
VFO = 0;
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
switch (gMenuCursor)
|
||||
switch (GetCurrentMenuId())
|
||||
{
|
||||
case MENU_DEL_CH:
|
||||
case MENU_1_CALL:
|
||||
@@ -1684,6 +1695,7 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
|
||||
case MENU_SLIST2:
|
||||
VFO = 1;
|
||||
[[fallthrough]];
|
||||
case MENU_SLIST1:
|
||||
bCheckScanList = true;
|
||||
break;
|
||||
@@ -1694,8 +1706,6 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
return;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
Channel = RADIO_FindNextChannel(gSubMenuSelection + Direction, Direction, bCheckScanList, VFO);
|
||||
if (Channel != 0xFF)
|
||||
gSubMenuSelection = Channel;
|
||||
@@ -1735,7 +1745,7 @@ void MENU_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
MENU_Key_STAR(bKeyPressed, bKeyHeld);
|
||||
break;
|
||||
case KEY_F:
|
||||
if (gMenuCursor == MENU_MEM_NAME && edit_index >= 0)
|
||||
if (GetCurrentMenuId() == MENU_MEM_NAME && edit_index >= 0)
|
||||
{ // currently editing the channel name
|
||||
if (!bKeyHeld && bKeyPressed)
|
||||
{
|
||||
@@ -1767,11 +1777,11 @@ void MENU_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
if (gScreenToDisplay == DISPLAY_MENU)
|
||||
{
|
||||
if (gMenuCursor == MENU_VOL ||
|
||||
if (GetCurrentMenuId() == MENU_VOL ||
|
||||
#ifdef ENABLE_F_CAL_MENU
|
||||
gMenuCursor == MENU_F_CALI ||
|
||||
GetCurrentMenuId() == MENU_F_CALI ||
|
||||
#endif
|
||||
gMenuCursor == MENU_BATCAL)
|
||||
GetCurrentMenuId() == MENU_BATCAL)
|
||||
{
|
||||
gMenuCountdown = menu_timeout_long_500ms;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
void writeXtalFreqCal(const int32_t value, const bool update_eeprom);
|
||||
#endif
|
||||
|
||||
int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax);
|
||||
int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax);
|
||||
void MENU_AcceptSetting(void);
|
||||
void MENU_SelectNextCode(void);
|
||||
void MENU_ShowCurrentSetting(void);
|
||||
|
||||
204
app/scanner.c
204
app/scanner.c
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "app/app.h"
|
||||
#include "app/dtmf.h"
|
||||
#include "app/generic.h"
|
||||
#include "app/scanner.h"
|
||||
@@ -43,6 +44,8 @@ uint8_t gScanHitCount;
|
||||
bool gScanUseCssResult;
|
||||
int8_t gScanStateDir;
|
||||
bool bScanKeepFrequency;
|
||||
uint8_t gRestoreMrChannel;
|
||||
uint8_t gRestoreCROSS_BAND_RX_TX;
|
||||
|
||||
static void SCANNER_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
@@ -362,10 +365,10 @@ void SCANNER_Start(void)
|
||||
|
||||
RADIO_SelectVfos();
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
if (IS_NOAA_CHANNEL(gRxVfo->CHANNEL_SAVE))
|
||||
gRxVfo->CHANNEL_SAVE = FREQ_CHANNEL_FIRST + BAND6_400MHz;
|
||||
#endif
|
||||
#ifdef ENABLE_NOAA
|
||||
if (IS_NOAA_CHANNEL(gRxVfo->CHANNEL_SAVE))
|
||||
gRxVfo->CHANNEL_SAVE = FREQ_CHANNEL_FIRST + BAND6_400MHz;
|
||||
#endif
|
||||
|
||||
BackupStep = gRxVfo->STEP_SETTING;
|
||||
BackupFrequency = gRxVfo->StepFrequency;
|
||||
@@ -377,9 +380,9 @@ void SCANNER_Start(void)
|
||||
|
||||
RADIO_SetupRegisters(true);
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
gIsNoaaMode = false;
|
||||
#endif
|
||||
#ifdef ENABLE_NOAA
|
||||
gIsNoaaMode = false;
|
||||
#endif
|
||||
|
||||
if (gScanSingleFrequency)
|
||||
{
|
||||
@@ -414,9 +417,9 @@ void SCANNER_Start(void)
|
||||
g_CDCSS_Lost = false;
|
||||
gCDCSSCodeType = 0;
|
||||
g_CTCSS_Lost = false;
|
||||
#ifdef ENABLE_VOX
|
||||
g_VOX_Lost = false;
|
||||
#endif
|
||||
#ifdef ENABLE_VOX
|
||||
g_VOX_Lost = false;
|
||||
#endif
|
||||
g_SquelchLost = false;
|
||||
gScannerEditState = 0;
|
||||
gScanProgressIndicator = 0;
|
||||
@@ -424,8 +427,11 @@ void SCANNER_Start(void)
|
||||
|
||||
void SCANNER_Stop(void)
|
||||
{
|
||||
const uint8_t Previous = gRestoreMrChannel;
|
||||
|
||||
if(gRestoreCROSS_BAND_RX_TX != CROSS_BAND_OFF) {
|
||||
gEeprom.CROSS_BAND_RX_TX = gRestoreCROSS_BAND_RX_TX;
|
||||
gRestoreCROSS_BAND_RX_TX = CROSS_BAND_OFF;
|
||||
}
|
||||
|
||||
gScanStateDir = SCAN_OFF;
|
||||
|
||||
if (!bScanKeepFrequency)
|
||||
@@ -433,7 +439,7 @@ void SCANNER_Stop(void)
|
||||
if (gNextMrChannel <= MR_CHANNEL_LAST)
|
||||
{
|
||||
gEeprom.MrChannel[gEeprom.RX_VFO] = gRestoreMrChannel;
|
||||
gEeprom.ScreenChannel[gEeprom.RX_VFO] = Previous;
|
||||
gEeprom.ScreenChannel[gEeprom.RX_VFO] = gRestoreMrChannel;
|
||||
|
||||
RADIO_ConfigureChannel(gEeprom.RX_VFO, VFO_CONFIGURE_RELOAD);
|
||||
}
|
||||
@@ -460,3 +466,175 @@ void SCANNER_Stop(void)
|
||||
|
||||
gUpdateStatus = true;
|
||||
}
|
||||
|
||||
static void SCANNER_NextFreqChannel(void)
|
||||
{
|
||||
gRxVfo->freq_config_RX.Frequency = APP_SetFrequencyByStep(gRxVfo, gScanStateDir);
|
||||
|
||||
RADIO_ApplyOffset(gRxVfo);
|
||||
RADIO_ConfigureSquelchAndOutputPower(gRxVfo);
|
||||
RADIO_SetupRegisters(true);
|
||||
|
||||
#ifdef ENABLE_FASTER_CHANNEL_SCAN
|
||||
gScanPauseDelayIn_10ms = 9; // 90ms
|
||||
#else
|
||||
gScanPauseDelayIn_10ms = scan_pause_delay_in_6_10ms;
|
||||
#endif
|
||||
|
||||
bScanKeepFrequency = false;
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
|
||||
static void SCANNER_NextMemChannel(void)
|
||||
{
|
||||
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 int chan1 = (gEeprom.SCAN_LIST_DEFAULT < 2) ? gEeprom.SCANLIST_PRIORITY_CH1[gEeprom.SCAN_LIST_DEFAULT] : -1;
|
||||
const int chan2 = (gEeprom.SCAN_LIST_DEFAULT < 2) ? gEeprom.SCANLIST_PRIORITY_CH2[gEeprom.SCAN_LIST_DEFAULT] : -1;
|
||||
const unsigned int prev_chan = gNextMrChannel;
|
||||
unsigned int chan = 0;
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
switch (gCurrentScanList)
|
||||
{
|
||||
case SCAN_NEXT_CHAN_SCANLIST1:
|
||||
prev_mr_chan = gNextMrChannel;
|
||||
|
||||
if (chan1 >= 0)
|
||||
{
|
||||
if (RADIO_CheckValidChannel(chan1, false, 0))
|
||||
{
|
||||
gCurrentScanList = SCAN_NEXT_CHAN_SCANLIST1;
|
||||
gNextMrChannel = chan1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
[[fallthrough]];
|
||||
case SCAN_NEXT_CHAN_SCANLIST2:
|
||||
if (chan2 >= 0)
|
||||
{
|
||||
if (RADIO_CheckValidChannel(chan2, false, 0))
|
||||
{
|
||||
gCurrentScanList = SCAN_NEXT_CHAN_SCANLIST2;
|
||||
gNextMrChannel = chan2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
[[fallthrough]];
|
||||
|
||||
// this bit doesn't yet work if the other VFO is a frequency
|
||||
case SCAN_NEXT_CHAN_DUAL_WATCH:
|
||||
// dual watch is enabled - include the other VFO in the scan
|
||||
// if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF)
|
||||
// {
|
||||
// chan = (gEeprom.RX_VFO + 1) & 1u;
|
||||
// chan = gEeprom.ScreenChannel[chan];
|
||||
// if (chan <= MR_CHANNEL_LAST)
|
||||
// {
|
||||
// gCurrentScanList = SCAN_NEXT_CHAN_DUAL_WATCH;
|
||||
// gNextMrChannel = chan;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
default:
|
||||
case SCAN_NEXT_CHAN_MR:
|
||||
gCurrentScanList = SCAN_NEXT_CHAN_MR;
|
||||
gNextMrChannel = prev_mr_chan;
|
||||
chan = 0xff;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!enabled || chan == 0xff)
|
||||
{
|
||||
chan = RADIO_FindNextChannel(gNextMrChannel + gScanStateDir, gScanStateDir, (gEeprom.SCAN_LIST_DEFAULT < 2) ? true : false, gEeprom.SCAN_LIST_DEFAULT);
|
||||
if (chan == 0xFF)
|
||||
{ // no valid channel found
|
||||
|
||||
chan = MR_CHANNEL_FIRST;
|
||||
// return;
|
||||
}
|
||||
|
||||
gNextMrChannel = chan;
|
||||
}
|
||||
|
||||
if (gNextMrChannel != prev_chan)
|
||||
{
|
||||
gEeprom.MrChannel[ gEeprom.RX_VFO] = gNextMrChannel;
|
||||
gEeprom.ScreenChannel[gEeprom.RX_VFO] = gNextMrChannel;
|
||||
|
||||
RADIO_ConfigureChannel(gEeprom.RX_VFO, VFO_CONFIGURE_RELOAD);
|
||||
RADIO_SetupRegisters(true);
|
||||
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FASTER_CHANNEL_SCAN
|
||||
gScanPauseDelayIn_10ms = 9; // 90ms .. <= ~60ms it misses signals (squelch response and/or PLL lock time) ?
|
||||
#else
|
||||
gScanPauseDelayIn_10ms = scan_pause_delay_in_3_10ms;
|
||||
#endif
|
||||
|
||||
bScanKeepFrequency = false;
|
||||
|
||||
if (enabled)
|
||||
if (++gCurrentScanList >= SCAN_NEXT_NUM)
|
||||
gCurrentScanList = SCAN_NEXT_CHAN_SCANLIST1; // back round we go
|
||||
}
|
||||
|
||||
void SCANNER_NextChannel(const bool storeBackupSettings, const int8_t scan_direction)
|
||||
{
|
||||
if (storeBackupSettings) {
|
||||
gRestoreCROSS_BAND_RX_TX = gEeprom.CROSS_BAND_RX_TX;
|
||||
gEeprom.CROSS_BAND_RX_TX = CROSS_BAND_OFF;
|
||||
}
|
||||
|
||||
RADIO_SelectVfos();
|
||||
|
||||
gNextMrChannel = gRxVfo->CHANNEL_SAVE;
|
||||
gCurrentScanList = SCAN_NEXT_CHAN_SCANLIST1;
|
||||
gScanStateDir = scan_direction;
|
||||
|
||||
if (gNextMrChannel <= MR_CHANNEL_LAST)
|
||||
{ // channel mode
|
||||
if (storeBackupSettings)
|
||||
gRestoreMrChannel = gNextMrChannel;
|
||||
SCANNER_NextMemChannel();
|
||||
}
|
||||
else
|
||||
{ // frequency mode
|
||||
if (storeBackupSettings)
|
||||
gRestoreFrequency = gRxVfo->freq_config_RX.Frequency;
|
||||
SCANNER_NextFreqChannel();
|
||||
}
|
||||
|
||||
gScanPauseDelayIn_10ms = scan_pause_delay_in_2_10ms;
|
||||
gScheduleScanListen = false;
|
||||
gRxReceptionMode = RX_MODE_NONE;
|
||||
gScanPauseMode = false;
|
||||
bScanKeepFrequency = false;
|
||||
}
|
||||
|
||||
void SCANNER_ContinueScanning()
|
||||
{
|
||||
if (IS_FREQ_CHANNEL(gNextMrChannel))
|
||||
{
|
||||
if (gCurrentFunction == FUNCTION_INCOMING)
|
||||
APP_StartListening(gMonitor ? FUNCTION_MONITOR : FUNCTION_RECEIVE, true);
|
||||
else
|
||||
SCANNER_NextFreqChannel(); // switch to next frequency
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gCurrentCodeType == CODE_TYPE_OFF && gCurrentFunction == FUNCTION_INCOMING)
|
||||
APP_StartListening(gMonitor ? FUNCTION_MONITOR : FUNCTION_RECEIVE, true);
|
||||
else
|
||||
SCANNER_NextMemChannel(); // switch to next channel
|
||||
}
|
||||
|
||||
gScanPauseMode = false;
|
||||
gRxReceptionMode = RX_MODE_NONE;
|
||||
gScheduleScanListen = false;
|
||||
}
|
||||
@@ -58,6 +58,8 @@ extern bool bScanKeepFrequency;
|
||||
void SCANNER_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld);
|
||||
void SCANNER_Start(void);
|
||||
void SCANNER_Stop(void);
|
||||
void SCANNER_NextChannel(const bool storeBackupSettings, const int8_t scan_direction);
|
||||
void SCANNER_ContinueScanning();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -22,19 +22,8 @@ struct FrequencyBandInfo {
|
||||
uint32_t middle;
|
||||
};
|
||||
|
||||
const struct FrequencyBandInfo FrequencyBandTable[7] = {
|
||||
[BAND1_50MHz ] = {.lower = 1600000, .middle = 6500000, .upper = 7600000},
|
||||
[BAND2_108MHz] = {.lower = 10800000, .middle = 12200000, .upper = 13599990},
|
||||
[BAND3_136MHz] = {.lower = 13600000, .middle = 15000000, .upper = 17399990},
|
||||
[BAND4_174MHz] = {.lower = 17400000, .middle = 26000000, .upper = 34999990},
|
||||
[BAND5_350MHz] = {.lower = 35000000, .middle = 37000000, .upper = 39999990},
|
||||
[BAND6_400MHz] = {.lower = 40000000, .middle = 43500000, .upper = 46999990},
|
||||
[BAND7_470MHz] = {.lower = 47000000, .middle = 55000000, .upper = 130000000},
|
||||
};
|
||||
|
||||
|
||||
#define F_MIN FrequencyBandTable[0].lower
|
||||
#define F_MAX FrequencyBandTable[ARRAY_SIZE(FrequencyBandTable) - 1].upper
|
||||
#define F_MIN frequencyBandTable[0].lower
|
||||
#define F_MAX frequencyBandTable[ARRAY_SIZE(frequencyBandTable) - 1].upper
|
||||
|
||||
const uint16_t RSSI_MAX_VALUE = 65535;
|
||||
|
||||
@@ -76,12 +65,12 @@ SpectrumSettings settings = {stepsCount: STEPS_64,
|
||||
|
||||
uint32_t fMeasure = 0;
|
||||
uint32_t currentFreq, tempFreq;
|
||||
uint16_t rssiHistory[128] = {};
|
||||
uint16_t rssiHistory[128];
|
||||
|
||||
uint8_t freqInputIndex = 0;
|
||||
uint8_t freqInputDotIndex = 0;
|
||||
KEY_Code_t freqInputArr[10];
|
||||
char freqInputString[11] = "----------\0"; // XXXX.XXXXX\0
|
||||
char freqInputString[11];
|
||||
|
||||
uint8_t menuState = 0;
|
||||
uint16_t listenT = 0;
|
||||
@@ -323,7 +312,7 @@ static void ToggleAudio(bool on) {
|
||||
static void ToggleRX(bool on) {
|
||||
isListening = on;
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_GREEN, on);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, on);
|
||||
|
||||
ToggleAudio(on);
|
||||
ToggleAFDAC(on);
|
||||
@@ -638,19 +627,12 @@ static void DrawStatus() {
|
||||
gBatteryVoltages[3]) /
|
||||
4;
|
||||
|
||||
if (gBatteryCalibration[5] < Voltage) {
|
||||
v = 5;
|
||||
} else if (gBatteryCalibration[4] < Voltage) {
|
||||
v = 5;
|
||||
} else if (gBatteryCalibration[3] < Voltage) {
|
||||
v = 4;
|
||||
} else if (gBatteryCalibration[2] < Voltage) {
|
||||
v = 3;
|
||||
} else if (gBatteryCalibration[1] < Voltage) {
|
||||
v = 2;
|
||||
} else if (gBatteryCalibration[0] < Voltage) {
|
||||
v = 1;
|
||||
for(uint8_t i = 5; i > 0; i--) {
|
||||
if(Voltage > gBatteryCalibration[i - 1]) {
|
||||
v = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
gStatusLine[127] = 0b01111110;
|
||||
for (int i = 126; i >= 116; i--) {
|
||||
@@ -686,7 +668,7 @@ static void DrawNums() {
|
||||
}
|
||||
|
||||
if (IsCenterMode()) {
|
||||
sprintf(String, "%u.%05u \xB1%u.%02uk", currentFreq / 100000,
|
||||
sprintf(String, "%u.%05u \x7F%u.%02uk", currentFreq / 100000,
|
||||
currentFreq % 100000, settings.frequencyChangeStep / 100,
|
||||
settings.frequencyChangeStep % 100);
|
||||
GUI_DisplaySmallest(String, 36, 49, false, true);
|
||||
@@ -694,7 +676,7 @@ static void DrawNums() {
|
||||
sprintf(String, "%u.%05u", GetFStart() / 100000, GetFStart() % 100000);
|
||||
GUI_DisplaySmallest(String, 0, 49, false, true);
|
||||
|
||||
sprintf(String, "\xB1%u.%02uk", settings.frequencyChangeStep / 100,
|
||||
sprintf(String, "\x7F%u.%02uk", settings.frequencyChangeStep / 100,
|
||||
settings.frequencyChangeStep % 100);
|
||||
GUI_DisplaySmallest(String, 48, 49, false, true);
|
||||
|
||||
@@ -905,8 +887,8 @@ void OnKeyDownStill(KEY_Code_t key) {
|
||||
break;
|
||||
case KEY_PTT:
|
||||
// TODO: start transmit
|
||||
/* BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_GREEN, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_RED, true); */
|
||||
/* BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, true); */
|
||||
break;
|
||||
case KEY_MENU:
|
||||
if (menuState == ARRAY_SIZE(registerSpecs) - 1) {
|
||||
|
||||
9
audio.c
9
audio.c
@@ -142,9 +142,6 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
||||
|
||||
SYSTEM_DelayMs(60);
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
switch (Beep)
|
||||
{
|
||||
case BEEP_880HZ_60MS_TRIPLE_BEEP:
|
||||
@@ -152,14 +149,14 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
||||
SYSTEM_DelayMs(60);
|
||||
BK4819_EnterTxMute();
|
||||
SYSTEM_DelayMs(20);
|
||||
|
||||
[[fallthrough]];
|
||||
case BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL:
|
||||
case BEEP_500HZ_60MS_DOUBLE_BEEP:
|
||||
BK4819_ExitTxMute();
|
||||
SYSTEM_DelayMs(60);
|
||||
BK4819_EnterTxMute();
|
||||
SYSTEM_DelayMs(20);
|
||||
|
||||
[[fallthrough]];
|
||||
case BEEP_1KHZ_60MS_OPTIONAL:
|
||||
BK4819_ExitTxMute();
|
||||
Duration = 60;
|
||||
@@ -184,8 +181,6 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
SYSTEM_DelayMs(Duration);
|
||||
BK4819_EnterTxMute();
|
||||
SYSTEM_DelayMs(20);
|
||||
|
||||
41
bitmaps.c
41
bitmaps.c
@@ -197,26 +197,27 @@ const uint8_t BITMAP_F_Key[6] =
|
||||
};
|
||||
#endif
|
||||
|
||||
const uint8_t BITMAP_TDR1[12] =
|
||||
{ // "DW"
|
||||
0b00000000,
|
||||
const uint8_t BITMAP_TDR1[15] =
|
||||
{ // "DWR"
|
||||
0b01111111,
|
||||
0b01000001,
|
||||
0b01000001,
|
||||
0b01000001,
|
||||
0b00111110,
|
||||
0b00000000,
|
||||
0b01111111,
|
||||
0b00100000,
|
||||
0b00011000,
|
||||
0b00100000,
|
||||
0b01111111
|
||||
0b01111111,
|
||||
0b00000000,
|
||||
0b01111111,
|
||||
0b00011001,
|
||||
0b00101001,
|
||||
0b01000110
|
||||
};
|
||||
|
||||
const uint8_t BITMAP_TDR2[12] =
|
||||
const uint8_t BITMAP_TDR2[9] =
|
||||
{ // "><" .. DW on hold
|
||||
0b00000000,
|
||||
0b00000000,
|
||||
0b00100010,
|
||||
0b00110110,
|
||||
0b00011100,
|
||||
@@ -226,7 +227,6 @@ const uint8_t BITMAP_TDR2[12] =
|
||||
0b00011100,
|
||||
0b00110110,
|
||||
0b00100010,
|
||||
0b00000000
|
||||
};
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
@@ -244,27 +244,8 @@ const uint8_t BITMAP_TDR2[12] =
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
const uint8_t BITMAP_FM[12] =
|
||||
{ // "FM"
|
||||
0b00000000,
|
||||
0b01111111,
|
||||
0b00001001,
|
||||
0b00001001,
|
||||
0b00001001,
|
||||
0b00000001,
|
||||
|
||||
0b00000000,
|
||||
0b01111111,
|
||||
0b00000010,
|
||||
0b00001100,
|
||||
0b00000010,
|
||||
0b01111111
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
const uint8_t BITMAP_NOAA[12] =
|
||||
const uint8_t BITMAP_NOAA[11] =
|
||||
{ // "NS"
|
||||
0b00000000,
|
||||
0b01111111,
|
||||
@@ -272,12 +253,10 @@ const uint8_t BITMAP_TDR2[12] =
|
||||
0b00001000,
|
||||
0b00010000,
|
||||
0b01111111,
|
||||
|
||||
0b00000000,
|
||||
0b01000110,
|
||||
0b01001001,
|
||||
0b01001001,
|
||||
0b01001001,
|
||||
0b00110001
|
||||
};
|
||||
#endif
|
||||
|
||||
16
bitmaps.h
16
bitmaps.h
@@ -25,25 +25,17 @@ extern const uint8_t BITMAP_F_Key[6];
|
||||
extern const uint8_t BITMAP_VOX[18];
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
extern const uint8_t BITMAP_WX[12];
|
||||
#else
|
||||
extern const uint8_t BITMAP_XB[12];
|
||||
#endif
|
||||
extern const uint8_t BITMAP_XB[12];
|
||||
|
||||
extern const uint8_t BITMAP_TDR1[12];
|
||||
extern const uint8_t BITMAP_TDR2[12];
|
||||
extern const uint8_t BITMAP_TDR1[15];
|
||||
extern const uint8_t BITMAP_TDR2[9];
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
extern const uint8_t BITMAP_VoicePrompt[9];
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
extern const uint8_t BITMAP_FM[12];
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
extern const uint8_t BITMAP_NOAA[12];
|
||||
extern const uint8_t BITMAP_NOAA[11];
|
||||
#endif
|
||||
|
||||
extern const uint8_t BITMAP_Antenna[5];
|
||||
|
||||
19
board.c
19
board.c
@@ -590,7 +590,8 @@ void BOARD_EEPROM_Init(void)
|
||||
|
||||
// 0E90..0E97
|
||||
EEPROM_ReadBuffer(0x0E90, Data, 8);
|
||||
gEeprom.BEEP_CONTROL = (Data[0] < 2) ? Data[0] : true;
|
||||
gEeprom.BEEP_CONTROL = Data[0] & 1;
|
||||
gEeprom.KEY_M_LONG_PRESS_ACTION = ((Data[0] >> 1) < ACTION_OPT_LEN) ? (Data[0] >> 1) : ACTION_OPT_NONE;
|
||||
gEeprom.KEY_1_SHORT_PRESS_ACTION = (Data[1] < ACTION_OPT_LEN) ? Data[1] : ACTION_OPT_MONITOR;
|
||||
gEeprom.KEY_1_LONG_PRESS_ACTION = (Data[2] < ACTION_OPT_LEN) ? Data[2] : ACTION_OPT_FLASHLIGHT;
|
||||
gEeprom.KEY_2_SHORT_PRESS_ACTION = (Data[3] < ACTION_OPT_LEN) ? Data[3] : ACTION_OPT_SCAN;
|
||||
@@ -739,18 +740,18 @@ void BOARD_EEPROM_Init(void)
|
||||
}
|
||||
}
|
||||
|
||||
void BOARD_EEPROM_LoadMoreSettings(void)
|
||||
void BOARD_EEPROM_LoadCalibration(void)
|
||||
{
|
||||
// uint8_t Mic;
|
||||
|
||||
EEPROM_ReadBuffer(0x1EC0, gEEPROM_1EC0_0, 8);
|
||||
memmove(gEEPROM_1EC0_1, gEEPROM_1EC0_0, 8);
|
||||
memmove(gEEPROM_1EC0_2, gEEPROM_1EC0_0, 8);
|
||||
memmove(gEEPROM_1EC0_3, gEEPROM_1EC0_0, 8);
|
||||
EEPROM_ReadBuffer(0x1EC0, gEEPROM_RSSI_CALIB[3], 8);
|
||||
memcpy(gEEPROM_RSSI_CALIB[4], gEEPROM_RSSI_CALIB[3], 8);
|
||||
memcpy(gEEPROM_RSSI_CALIB[5], gEEPROM_RSSI_CALIB[3], 8);
|
||||
memcpy(gEEPROM_RSSI_CALIB[6], gEEPROM_RSSI_CALIB[3], 8);
|
||||
|
||||
// 8 * 16-bit values
|
||||
EEPROM_ReadBuffer(0x1EC0, gEEPROM_RSSI_CALIB[0], 8);
|
||||
EEPROM_ReadBuffer(0x1EC8, gEEPROM_RSSI_CALIB[1], 8);
|
||||
EEPROM_ReadBuffer(0x1EC8, gEEPROM_RSSI_CALIB[0], 8);
|
||||
memcpy(gEEPROM_RSSI_CALIB[1], gEEPROM_RSSI_CALIB[0], 8);
|
||||
memcpy(gEEPROM_RSSI_CALIB[2], gEEPROM_RSSI_CALIB[0], 8);
|
||||
|
||||
EEPROM_ReadBuffer(0x1F40, gBatteryCalibration, 12);
|
||||
if (gBatteryCalibration[0] >= 5000)
|
||||
|
||||
2
board.h
2
board.h
@@ -27,7 +27,7 @@ void BOARD_ADC_Init(void);
|
||||
void BOARD_ADC_GetBatteryInfo(uint16_t *pVoltage, uint16_t *pCurrent);
|
||||
void BOARD_Init(void);
|
||||
void BOARD_EEPROM_Init(void);
|
||||
void BOARD_EEPROM_LoadMoreSettings(void);
|
||||
void BOARD_EEPROM_LoadCalibration(void);
|
||||
uint32_t BOARD_fetchChannelFrequency(const int channel);
|
||||
void BOARD_fetchChannelName(char *s, const int channel);
|
||||
void BOARD_FactoryReset(bool bIsAll);
|
||||
|
||||
2
compile-with-docker.sh
Normal file → Executable file
2
compile-with-docker.sh
Normal file → Executable file
@@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
docker build -t uvk5 .
|
||||
docker run -v $(PWD)/compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make && cp firmware* compiled-firmware/"
|
||||
docker run -v ${PWD}/compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make && cp firmware* compiled-firmware/"
|
||||
|
||||
@@ -95,13 +95,12 @@ enum BK4819_REGISTER_t {
|
||||
typedef enum BK4819_REGISTER_t BK4819_REGISTER_t;
|
||||
|
||||
enum BK4819_GPIO_PIN_t {
|
||||
BK4819_GPIO6_PIN2 = 0,
|
||||
BK4819_GPIO5_PIN1 = 1,
|
||||
BK4819_GPIO4_PIN32 = 2,
|
||||
BK4819_GPIO0_PIN28 = 0,
|
||||
BK4819_GPIO1_PIN29 = 1,
|
||||
BK4819_GPIO3_PIN31 = 3,
|
||||
BK4819_GPIO2_PIN30 = 4,
|
||||
BK4819_GPIO1_PIN29_RED = 5,
|
||||
BK4819_GPIO0_PIN28_GREEN = 6,
|
||||
BK4819_GPIO4_PIN32 = 4,
|
||||
BK4819_GPIO5_PIN1_RED = 5,
|
||||
BK4819_GPIO6_PIN2_GREEN = 6,
|
||||
};
|
||||
|
||||
typedef enum BK4819_GPIO_PIN_t BK4819_GPIO_PIN_t;
|
||||
|
||||
@@ -844,18 +844,18 @@ void BK4819_PickRXFilterPathBasedOnFrequency(uint32_t Frequency)
|
||||
{
|
||||
if (Frequency < 28000000)
|
||||
{
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO2_PIN30, true);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO4_PIN32, true);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO3_PIN31, false);
|
||||
}
|
||||
else
|
||||
if (Frequency == 0xFFFFFFFF)
|
||||
{
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO2_PIN30, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO4_PIN32, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO3_PIN31, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO2_PIN30, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO4_PIN32, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO3_PIN31, true);
|
||||
}
|
||||
}
|
||||
@@ -1198,7 +1198,7 @@ void BK4819_Conditional_RX_TurnOn_and_GPIO6_Enable(void)
|
||||
{
|
||||
if (gRxIdleMode)
|
||||
{
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2, true);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28, true);
|
||||
BK4819_RX_TurnOn();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "driver/eeprom.h"
|
||||
#include "driver/i2c.h"
|
||||
#include "driver/system.h"
|
||||
@@ -38,16 +41,22 @@ void EEPROM_ReadBuffer(uint16_t Address, void *pBuffer, uint8_t Size)
|
||||
|
||||
void EEPROM_WriteBuffer(uint16_t Address, const void *pBuffer)
|
||||
{
|
||||
I2C_Start();
|
||||
if (pBuffer == NULL || Address >= 0x2000)
|
||||
return;
|
||||
|
||||
I2C_Write(0xA0);
|
||||
|
||||
I2C_Write((Address >> 8) & 0xFF);
|
||||
I2C_Write((Address >> 0) & 0xFF);
|
||||
uint8_t buffer[8];
|
||||
EEPROM_ReadBuffer(Address, buffer, 8);
|
||||
if (memcmp(pBuffer, buffer, 8) != 0)
|
||||
{
|
||||
I2C_Start();
|
||||
I2C_Write(0xA0);
|
||||
I2C_Write((Address >> 8) & 0xFF);
|
||||
I2C_Write((Address >> 0) & 0xFF);
|
||||
I2C_WriteBuffer(pBuffer, 8);
|
||||
I2C_Stop();
|
||||
}
|
||||
|
||||
I2C_WriteBuffer(pBuffer, 8);
|
||||
|
||||
I2C_Stop();
|
||||
|
||||
SYSTEM_DelayMs(10);
|
||||
// give the EEPROM time to burn the data in (apparently takes 5ms)
|
||||
SYSTEM_DelayMs(8);
|
||||
}
|
||||
|
||||
580
font.c
580
font.c
@@ -16,201 +16,202 @@
|
||||
|
||||
#include "font.h"
|
||||
|
||||
//const uint8_t gFontBig[95][16] =
|
||||
const uint8_t gFontBig[95][15] =
|
||||
// removed last and middle column which was all 0x00
|
||||
// also the space char is not needed
|
||||
const uint8_t gFontBig[95 - 1][16 - 2] =
|
||||
{
|
||||
#if 0
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // ' '
|
||||
{0x00, 0x00, 0x70, 0xF8, 0xF8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x1B, 0x00, 0x00}, // , 0x00}, // '!'
|
||||
{0x00, 0x1E, 0x3E, 0x00, 0x00, 0x3E, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // '"'
|
||||
{0x40, 0xF0, 0xF0, 0x40, 0xF0, 0xF0, 0x40, 0x00, 0x04, 0x1F, 0x1F, 0x04, 0x1F, 0x1F, 0x04}, // , 0x00}, // '#'
|
||||
{0x70, 0xF8, 0x88, 0x8F, 0x8F, 0x98, 0x30, 0x00, 0x06, 0x0C, 0x08, 0x38, 0x38, 0x0F, 0x07}, // , 0x00}, // '$'
|
||||
{0x60, 0x60, 0x00, 0x00, 0x80, 0xC0, 0x60, 0x00, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x18, 0x18}, // , 0x00}, // '%'
|
||||
{0x00, 0xB0, 0xF8, 0xC8, 0x78, 0xB0, 0x80, 0x00, 0x0F, 0x1F, 0x10, 0x11, 0x0F, 0x1F, 0x10}, // , 0x00}, // '&'
|
||||
{0x00, 0x20, 0x3E, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // '''
|
||||
{0x00, 0x00, 0xE0, 0xF0, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x18, 0x10, 0x00}, // , 0x00}, // '('
|
||||
{0x00, 0x00, 0x08, 0x18, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x18, 0x0F, 0x07, 0x00}, // , 0x00}, // ')'
|
||||
{0x00, 0x40, 0xC0, 0x80, 0x80, 0xC0, 0x40, 0x00, 0x01, 0x05, 0x07, 0x03, 0x03, 0x07, 0x05}, // , 0x01}, // '*'
|
||||
{0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x07, 0x07, 0x01, 0x01}, // , 0x00}, // '+'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3C, 0x1C, 0x00, 0x00}, // , 0x00}, // ','
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01}, // , 0x00}, // '-'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00}, // , 0x00}, // '.'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x60, 0x00, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00, 0x00}, // , 0x00}, // '/'
|
||||
{0xF0, 0xF8, 0x08, 0x88, 0x48, 0xF8, 0xF0, 0x00, 0x0F, 0x1F, 0x12, 0x11, 0x10, 0x1F, 0x0F}, // , 0x00}, // '0'
|
||||
{0x00, 0x20, 0x30, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x1F, 0x10, 0x10}, // , 0x00}, // '1'
|
||||
{0x10, 0x18, 0x08, 0x88, 0xC8, 0x78, 0x30, 0x00, 0x1C, 0x1E, 0x13, 0x11, 0x10, 0x18, 0x18}, // , 0x00}, // '2'
|
||||
{0x10, 0x18, 0x88, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x08, 0x18, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // '3'
|
||||
{0x80, 0xC0, 0x60, 0x30, 0xF8, 0xF8, 0x00, 0x00, 0x01, 0x01, 0x01, 0x11, 0x1F, 0x1F, 0x11}, // , 0x00}, // '4'
|
||||
{0xF8, 0xF8, 0x88, 0x88, 0x88, 0x88, 0x08, 0x00, 0x08, 0x18, 0x10, 0x10, 0x11, 0x1F, 0x0F}, // , 0x00}, // '5'
|
||||
{0xE0, 0xF0, 0x98, 0x88, 0x88, 0x80, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // '6'
|
||||
{0x18, 0x18, 0x08, 0x08, 0x88, 0xF8, 0x78, 0x00, 0x00, 0x00, 0x1E, 0x1F, 0x01, 0x00, 0x00}, // , 0x00}, // '7'
|
||||
{0x70, 0xF8, 0x88, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // '8'
|
||||
{0x70, 0xF8, 0x88, 0x88, 0x88, 0xF8, 0xF0, 0x00, 0x00, 0x10, 0x10, 0x10, 0x18, 0x0F, 0x07}, // , 0x00}, // '9'
|
||||
{0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00}, // , 0x00}, // ':'
|
||||
{0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1C, 0x0C, 0x00, 0x00}, // , 0x00}, // ';'
|
||||
{0x00, 0x00, 0x80, 0xC0, 0x60, 0x30, 0x10, 0x00, 0x00, 0x01, 0x03, 0x06, 0x0C, 0x18, 0x10}, // , 0x00}, // '<'
|
||||
{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04}, // , 0x00}, // '='
|
||||
{0x00, 0x10, 0x30, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x10, 0x18, 0x0C, 0x06, 0x03, 0x01}, // , 0x00}, // '>'
|
||||
{0x30, 0x38, 0x08, 0x88, 0xC8, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x1B, 0x00, 0x00}, // , 0x00}, // '?'
|
||||
{0xE0, 0xF0, 0x10, 0x90, 0x90, 0xF0, 0xE0, 0x00, 0x0F, 0x1F, 0x10, 0x17, 0x17, 0x17, 0x03}, // , 0x00}, // '@'
|
||||
{0xC0, 0xE0, 0x30, 0x18, 0x30, 0xE0, 0xC0, 0x00, 0x1F, 0x1F, 0x01, 0x01, 0x01, 0x1F, 0x1F}, // , 0x00}, // 'A'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'B'
|
||||
{0xE0, 0xF0, 0x18, 0x08, 0x08, 0x18, 0x30, 0x00, 0x07, 0x0F, 0x18, 0x10, 0x10, 0x18, 0x0C}, // , 0x00}, // 'C'
|
||||
{0x08, 0xF8, 0xF8, 0x08, 0x18, 0xF0, 0xE0, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x18, 0x0F, 0x07}, // , 0x00}, // 'D'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0xC8, 0x18, 0x38, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x11, 0x18, 0x1C}, // , 0x00}, // 'E'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0xC8, 0x18, 0x38, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x01, 0x00, 0x00}, // , 0x00}, // 'F'
|
||||
{0xE0, 0xF0, 0x18, 0x08, 0x08, 0x18, 0x30, 0x00, 0x07, 0x0F, 0x18, 0x11, 0x11, 0x0F, 0x1F}, // , 0x00}, // 'G'
|
||||
{0xF8, 0xF8, 0x80, 0x80, 0x80, 0xF8, 0xF8, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'H'
|
||||
{0x00, 0x00, 0x08, 0xF8, 0xF8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'I'
|
||||
{0x00, 0x00, 0x00, 0x08, 0xF8, 0xF8, 0x08, 0x00, 0x0E, 0x1E, 0x10, 0x10, 0x1F, 0x0F, 0x00}, // , 0x00}, // 'J'
|
||||
{0x08, 0xF8, 0xF8, 0x80, 0xE0, 0x78, 0x18, 0x00, 0x10, 0x1F, 0x1F, 0x01, 0x03, 0x1E, 0x1C}, // , 0x00}, // 'K'
|
||||
{0x08, 0xF8, 0xF8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x10, 0x18, 0x1C}, // , 0x00}, // 'L'
|
||||
{0xF8, 0xF8, 0x70, 0xE0, 0x70, 0xF8, 0xF8, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'M'
|
||||
{0xF8, 0xF8, 0x70, 0xE0, 0xC0, 0xF8, 0xF8, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x01, 0x1F, 0x1F}, // , 0x00}, // 'N'
|
||||
{0xE0, 0xF0, 0x18, 0x08, 0x18, 0xF0, 0xE0, 0x00, 0x07, 0x0F, 0x18, 0x10, 0x18, 0x0F, 0x07}, // , 0x00}, // 'O'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x00}, // , 0x00}, // 'P'
|
||||
{0xF0, 0xF8, 0x08, 0x08, 0x08, 0xF8, 0xF0, 0x00, 0x0F, 0x1F, 0x10, 0x1C, 0x78, 0x7F, 0x4F}, // , 0x00}, // 'Q'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0x88, 0xF8, 0x70, 0x00, 0x10, 0x1F, 0x1F, 0x00, 0x01, 0x1F, 0x1E}, // , 0x00}, // 'R'
|
||||
{0x30, 0x78, 0xC8, 0x88, 0x88, 0x38, 0x30, 0x00, 0x0C, 0x1C, 0x10, 0x10, 0x11, 0x1F, 0x0E}, // , 0x00}, // 'S'
|
||||
{0x00, 0x38, 0x18, 0xF8, 0xF8, 0x18, 0x38, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'T'
|
||||
{0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'U'
|
||||
{0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x03, 0x07, 0x0C, 0x18, 0x0C, 0x07, 0x03}, // , 0x00}, // 'V'
|
||||
{0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x07, 0x1F, 0x1C, 0x07, 0x1C, 0x1F, 0x07}, // , 0x00}, // 'W'
|
||||
{0x18, 0x78, 0xE0, 0x80, 0xE0, 0x78, 0x18, 0x00, 0x18, 0x1E, 0x07, 0x01, 0x07, 0x1E, 0x18}, // , 0x00}, // 'X'
|
||||
{0x00, 0x78, 0xF8, 0x80, 0x80, 0xF8, 0x78, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'Y'
|
||||
{0x38, 0x18, 0x08, 0x88, 0xC8, 0x78, 0x38, 0x00, 0x1C, 0x1E, 0x13, 0x11, 0x10, 0x18, 0x1C}, // , 0x00}, // 'Z'
|
||||
{0x00, 0x00, 0xF8, 0xF8, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x10, 0x10, 0x00}, // , 0x00}, // '['
|
||||
{0x70, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0E, 0x1C}, // , 0x00}, // '"\'
|
||||
{0x00, 0x00, 0x08, 0x08, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x1F, 0x00}, // , 0x00}, // ']'
|
||||
{0x10, 0x18, 0x0E, 0x07, 0x0E, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // '^'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40}, // , 0x40}, // '_'
|
||||
{0x00, 0x00, 0x07, 0x0F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // '`'
|
||||
{0x00, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x00, 0x0E, 0x1F, 0x11, 0x11, 0x0F, 0x1F, 0x10}, // , 0x00}, // 'a'
|
||||
{0x08, 0xF8, 0xF8, 0x40, 0xC0, 0x80, 0x00, 0x00, 0x10, 0x1F, 0x0F, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'b'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x18, 0x08}, // , 0x00}, // 'c'
|
||||
{0x00, 0x80, 0xC0, 0x48, 0xF8, 0xF8, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x0F, 0x1F, 0x10}, // , 0x00}, // 'd'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x0F, 0x1F, 0x11, 0x11, 0x11, 0x19, 0x09}, // , 0x00}, // 'e'
|
||||
{0x80, 0xF0, 0xF8, 0x88, 0x18, 0x30, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x00}, // , 0x00}, // 'f'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x80, 0xC0, 0x40, 0x00, 0x4F, 0xDF, 0x90, 0x90, 0xFF, 0x7F, 0x00}, // , 0x00}, // 'g'
|
||||
{0x08, 0xF8, 0xF8, 0x80, 0x40, 0xC0, 0x80, 0x00, 0x10, 0x1F, 0x1F, 0x00, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'h'
|
||||
{0x00, 0x00, 0x40, 0xD8, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'i'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x40, 0xD8, 0xD8, 0x00, 0x00, 0x60, 0xE0, 0x80, 0x80, 0xFF, 0x7F}, // , 0x00}, // 'j'
|
||||
{0x08, 0xF8, 0xF8, 0x00, 0x80, 0xC0, 0x40, 0x00, 0x10, 0x1F, 0x1F, 0x03, 0x07, 0x1C, 0x18}, // , 0x00}, // 'k'
|
||||
{0x00, 0x00, 0x08, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'l'
|
||||
{0xC0, 0xC0, 0xC0, 0x80, 0xC0, 0xC0, 0x80, 0x00, 0x1F, 0x1F, 0x00, 0x1F, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'm'
|
||||
{0x40, 0xC0, 0x80, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'n'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'o'
|
||||
{0x40, 0xC0, 0x80, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x80, 0xFF, 0xFF, 0x90, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'p'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x80, 0xC0, 0x40, 0x00, 0x0F, 0x1F, 0x10, 0x90, 0xFF, 0xFF, 0x80}, // , 0x00}, // 'q'
|
||||
{0x40, 0xC0, 0x80, 0xC0, 0x40, 0xC0, 0x80, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x01}, // , 0x00}, // 'r'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, 0x08, 0x19, 0x13, 0x12, 0x16, 0x1C, 0x08}, // , 0x00}, // 's'
|
||||
{0x40, 0x40, 0xF0, 0xF8, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x18, 0x08}, // , 0x00}, // 't'
|
||||
{0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10, 0x0F, 0x1F, 0x10}, // , 0x00}, // 'u'
|
||||
{0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x07, 0x0F, 0x18, 0x18, 0x0F, 0x07}, // , 0x00}, // 'v'
|
||||
{0xC0, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x0F, 0x1F, 0x18, 0x0E, 0x18, 0x1F, 0x0F}, // , 0x00}, // 'w'
|
||||
{0x40, 0xC0, 0x80, 0x00, 0x80, 0xC0, 0x40, 0x00, 0x10, 0x18, 0x0F, 0x07, 0x0F, 0x18, 0x10}, // , 0x00}, // 'x'
|
||||
{0xC0, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x8F, 0x9F, 0x90, 0x90, 0xD0, 0x7F, 0x3F}, // , 0x00}, // 'y'
|
||||
{0xC0, 0xC0, 0x40, 0x40, 0xC0, 0xC0, 0x40, 0x00, 0x18, 0x1C, 0x16, 0x13, 0x11, 0x18, 0x18}, // , 0x00}, // 'z'
|
||||
{0x00, 0x80, 0x80, 0xF0, 0x78, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10}, // , 0x00}, // '{'
|
||||
{0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x00, 0x00}, // , 0x00}, // '|'
|
||||
{0x00, 0x08, 0x08, 0x78, 0xF0, 0x80, 0x80, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x0F, 0x00, 0x00}, // , 0x00}, // '}'
|
||||
{0x10, 0x18, 0x08, 0x18, 0x10, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // , 0x00} // '->'
|
||||
// {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // ' '
|
||||
{0x00, 0x00, 0x70, 0xF8, 0xF8, 0x70, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x1B, 0x1B, 0x00, 0x00}, // , 0x00}, // '!'
|
||||
{0x00, 0x1E, 0x3E, 0x00, 0x00, 0x3E, 0x1E, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // '"'
|
||||
{0x40, 0xF0, 0xF0, 0x40, 0xF0, 0xF0, 0x40, /*0x00,*/ 0x04, 0x1F, 0x1F, 0x04, 0x1F, 0x1F, 0x04}, // , 0x00}, // '#'
|
||||
{0x70, 0xF8, 0x88, 0x8F, 0x8F, 0x98, 0x30, /*0x00,*/ 0x06, 0x0C, 0x08, 0x38, 0x38, 0x0F, 0x07}, // , 0x00}, // '$'
|
||||
{0x60, 0x60, 0x00, 0x00, 0x80, 0xC0, 0x60, /*0x00,*/ 0x18, 0x0C, 0x06, 0x03, 0x01, 0x18, 0x18}, // , 0x00}, // '%'
|
||||
{0x00, 0xB0, 0xF8, 0xC8, 0x78, 0xB0, 0x80, /*0x00,*/ 0x0F, 0x1F, 0x10, 0x11, 0x0F, 0x1F, 0x10}, // , 0x00}, // '&'
|
||||
{0x00, 0x20, 0x3E, 0x1E, 0x00, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // '''
|
||||
{0x00, 0x00, 0xE0, 0xF0, 0x18, 0x08, 0x00, /*0x00,*/ 0x00, 0x00, 0x07, 0x0F, 0x18, 0x10, 0x00}, // , 0x00}, // '('
|
||||
{0x00, 0x00, 0x08, 0x18, 0xF0, 0xE0, 0x00, /*0x00,*/ 0x00, 0x00, 0x10, 0x18, 0x0F, 0x07, 0x00}, // , 0x00}, // ')'
|
||||
{0x00, 0x40, 0xC0, 0x80, 0x80, 0xC0, 0x40, /*0x00,*/ 0x01, 0x05, 0x07, 0x03, 0x03, 0x07, 0x05}, // , 0x01}, // '*'
|
||||
{0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, /*0x00,*/ 0x00, 0x01, 0x01, 0x07, 0x07, 0x01, 0x01}, // , 0x00}, // '+'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x20, 0x3C, 0x1C, 0x00, 0x00}, // , 0x00}, // ','
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*0x00,*/ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01}, // , 0x00}, // '-'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00}, // , 0x00}, // '.'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x60, /*0x00,*/ 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00, 0x00}, // , 0x00}, // '/'
|
||||
{0xF0, 0xF8, 0x08, 0x88, 0x48, 0xF8, 0xF0, /*0x00,*/ 0x0F, 0x1F, 0x12, 0x11, 0x10, 0x1F, 0x0F}, // , 0x00}, // '0'
|
||||
{0x00, 0x20, 0x30, 0xF8, 0xF8, 0x00, 0x00, /*0x00,*/ 0x00, 0x10, 0x10, 0x1F, 0x1F, 0x10, 0x10}, // , 0x00}, // '1'
|
||||
{0x10, 0x18, 0x08, 0x88, 0xC8, 0x78, 0x30, /*0x00,*/ 0x1C, 0x1E, 0x13, 0x11, 0x10, 0x18, 0x18}, // , 0x00}, // '2'
|
||||
{0x10, 0x18, 0x88, 0x88, 0x88, 0xF8, 0x70, /*0x00,*/ 0x08, 0x18, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // '3'
|
||||
{0x80, 0xC0, 0x60, 0x30, 0xF8, 0xF8, 0x00, /*0x00,*/ 0x01, 0x01, 0x01, 0x11, 0x1F, 0x1F, 0x11}, // , 0x00}, // '4'
|
||||
{0xF8, 0xF8, 0x88, 0x88, 0x88, 0x88, 0x08, /*0x00,*/ 0x08, 0x18, 0x10, 0x10, 0x11, 0x1F, 0x0F}, // , 0x00}, // '5'
|
||||
{0xE0, 0xF0, 0x98, 0x88, 0x88, 0x80, 0x00, /*0x00,*/ 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // '6'
|
||||
{0x18, 0x18, 0x08, 0x08, 0x88, 0xF8, 0x78, /*0x00,*/ 0x00, 0x00, 0x1E, 0x1F, 0x01, 0x00, 0x00}, // , 0x00}, // '7'
|
||||
{0x70, 0xF8, 0x88, 0x88, 0x88, 0xF8, 0x70, /*0x00,*/ 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // '8'
|
||||
{0x70, 0xF8, 0x88, 0x88, 0x88, 0xF8, 0xF0, /*0x00,*/ 0x00, 0x10, 0x10, 0x10, 0x18, 0x0F, 0x07}, // , 0x00}, // '9'
|
||||
{0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00}, // , 0x00}, // ':'
|
||||
{0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x10, 0x1C, 0x0C, 0x00, 0x00}, // , 0x00}, // ';'
|
||||
{0x00, 0x00, 0x80, 0xC0, 0x60, 0x30, 0x10, /*0x00,*/ 0x00, 0x01, 0x03, 0x06, 0x0C, 0x18, 0x10}, // , 0x00}, // '<'
|
||||
{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, /*0x00,*/ 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04}, // , 0x00}, // '='
|
||||
{0x00, 0x10, 0x30, 0x60, 0xC0, 0x80, 0x00, /*0x00,*/ 0x00, 0x10, 0x18, 0x0C, 0x06, 0x03, 0x01}, // , 0x00}, // '>'
|
||||
{0x30, 0x38, 0x08, 0x88, 0xC8, 0x78, 0x30, /*0x00,*/ 0x00, 0x00, 0x00, 0x1B, 0x1B, 0x00, 0x00}, // , 0x00}, // '?'
|
||||
{0xE0, 0xF0, 0x10, 0x90, 0x90, 0xF0, 0xE0, /*0x00,*/ 0x0F, 0x1F, 0x10, 0x17, 0x17, 0x17, 0x03}, // , 0x00}, // '@'
|
||||
{0xC0, 0xE0, 0x30, 0x18, 0x30, 0xE0, 0xC0, /*0x00,*/ 0x1F, 0x1F, 0x01, 0x01, 0x01, 0x1F, 0x1F}, // , 0x00}, // 'A'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0x88, 0xF8, 0x70, /*0x00,*/ 0x10, 0x1F, 0x1F, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'B'
|
||||
{0xE0, 0xF0, 0x18, 0x08, 0x08, 0x18, 0x30, /*0x00,*/ 0x07, 0x0F, 0x18, 0x10, 0x10, 0x18, 0x0C}, // , 0x00}, // 'C'
|
||||
{0x08, 0xF8, 0xF8, 0x08, 0x18, 0xF0, 0xE0, /*0x00,*/ 0x10, 0x1F, 0x1F, 0x10, 0x18, 0x0F, 0x07}, // , 0x00}, // 'D'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0xC8, 0x18, 0x38, /*0x00,*/ 0x10, 0x1F, 0x1F, 0x10, 0x11, 0x18, 0x1C}, // , 0x00}, // 'E'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0xC8, 0x18, 0x38, /*0x00,*/ 0x10, 0x1F, 0x1F, 0x10, 0x01, 0x00, 0x00}, // , 0x00}, // 'F'
|
||||
{0xE0, 0xF0, 0x18, 0x08, 0x08, 0x18, 0x30, /*0x00,*/ 0x07, 0x0F, 0x18, 0x11, 0x11, 0x0F, 0x1F}, // , 0x00}, // 'G'
|
||||
{0xF8, 0xF8, 0x80, 0x80, 0x80, 0xF8, 0xF8, /*0x00,*/ 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'H'
|
||||
{0x00, 0x00, 0x08, 0xF8, 0xF8, 0x08, 0x00, /*0x00,*/ 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'I'
|
||||
{0x00, 0x00, 0x00, 0x08, 0xF8, 0xF8, 0x08, /*0x00,*/ 0x0E, 0x1E, 0x10, 0x10, 0x1F, 0x0F, 0x00}, // , 0x00}, // 'J'
|
||||
{0x08, 0xF8, 0xF8, 0x80, 0xE0, 0x78, 0x18, /*0x00,*/ 0x10, 0x1F, 0x1F, 0x01, 0x03, 0x1E, 0x1C}, // , 0x00}, // 'K'
|
||||
{0x08, 0xF8, 0xF8, 0x08, 0x00, 0x00, 0x00, /*0x00,*/ 0x10, 0x1F, 0x1F, 0x10, 0x10, 0x18, 0x1C}, // , 0x00}, // 'L'
|
||||
{0xF8, 0xF8, 0x70, 0xE0, 0x70, 0xF8, 0xF8, /*0x00,*/ 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'M'
|
||||
{0xF8, 0xF8, 0x70, 0xE0, 0xC0, 0xF8, 0xF8, /*0x00,*/ 0x1F, 0x1F, 0x00, 0x00, 0x01, 0x1F, 0x1F}, // , 0x00}, // 'N'
|
||||
{0xE0, 0xF0, 0x18, 0x08, 0x18, 0xF0, 0xE0, /*0x00,*/ 0x07, 0x0F, 0x18, 0x10, 0x18, 0x0F, 0x07}, // , 0x00}, // 'O'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0x88, 0xF8, 0x70, /*0x00,*/ 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x00}, // , 0x00}, // 'P'
|
||||
{0xF0, 0xF8, 0x08, 0x08, 0x08, 0xF8, 0xF0, /*0x00,*/ 0x0F, 0x1F, 0x10, 0x1C, 0x78, 0x7F, 0x4F}, // , 0x00}, // 'Q'
|
||||
{0x08, 0xF8, 0xF8, 0x88, 0x88, 0xF8, 0x70, /*0x00,*/ 0x10, 0x1F, 0x1F, 0x00, 0x01, 0x1F, 0x1E}, // , 0x00}, // 'R'
|
||||
{0x30, 0x78, 0xC8, 0x88, 0x88, 0x38, 0x30, /*0x00,*/ 0x0C, 0x1C, 0x10, 0x10, 0x11, 0x1F, 0x0E}, // , 0x00}, // 'S'
|
||||
{0x00, 0x38, 0x18, 0xF8, 0xF8, 0x18, 0x38, /*0x00,*/ 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'T'
|
||||
{0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, /*0x00,*/ 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'U'
|
||||
{0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, /*0x00,*/ 0x03, 0x07, 0x0C, 0x18, 0x0C, 0x07, 0x03}, // , 0x00}, // 'V'
|
||||
{0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, /*0x00,*/ 0x07, 0x1F, 0x1C, 0x07, 0x1C, 0x1F, 0x07}, // , 0x00}, // 'W'
|
||||
{0x18, 0x78, 0xE0, 0x80, 0xE0, 0x78, 0x18, /*0x00,*/ 0x18, 0x1E, 0x07, 0x01, 0x07, 0x1E, 0x18}, // , 0x00}, // 'X'
|
||||
{0x00, 0x78, 0xF8, 0x80, 0x80, 0xF8, 0x78, /*0x00,*/ 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'Y'
|
||||
{0x38, 0x18, 0x08, 0x88, 0xC8, 0x78, 0x38, /*0x00,*/ 0x1C, 0x1E, 0x13, 0x11, 0x10, 0x18, 0x1C}, // , 0x00}, // 'Z'
|
||||
{0x00, 0x00, 0xF8, 0xF8, 0x08, 0x08, 0x00, /*0x00,*/ 0x00, 0x00, 0x1F, 0x1F, 0x10, 0x10, 0x00}, // , 0x00}, // '['
|
||||
{0x70, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x01, 0x03, 0x07, 0x0E, 0x1C}, // , 0x00}, // '"\'
|
||||
{0x00, 0x00, 0x08, 0x08, 0xF8, 0xF8, 0x00, /*0x00,*/ 0x00, 0x00, 0x10, 0x10, 0x1F, 0x1F, 0x00}, // , 0x00}, // ']'
|
||||
{0x10, 0x18, 0x0E, 0x07, 0x0E, 0x18, 0x10, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // '^'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*0x00,*/ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40}, // , 0x40}, // '_'
|
||||
{0x00, 0x00, 0x07, 0x0F, 0x08, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // , 0x00}, // '`'
|
||||
{0x00, 0x40, 0x40, 0x40, 0xC0, 0x80, 0x00, /*0x00,*/ 0x0E, 0x1F, 0x11, 0x11, 0x0F, 0x1F, 0x10}, // , 0x00}, // 'a'
|
||||
{0x08, 0xF8, 0xF8, 0x40, 0xC0, 0x80, 0x00, /*0x00,*/ 0x10, 0x1F, 0x0F, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'b'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, /*0x00,*/ 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x18, 0x08}, // , 0x00}, // 'c'
|
||||
{0x00, 0x80, 0xC0, 0x48, 0xF8, 0xF8, 0x00, /*0x00,*/ 0x0F, 0x1F, 0x10, 0x10, 0x0F, 0x1F, 0x10}, // , 0x00}, // 'd'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, /*0x00,*/ 0x0F, 0x1F, 0x11, 0x11, 0x11, 0x19, 0x09}, // , 0x00}, // 'e'
|
||||
{0x80, 0xF0, 0xF8, 0x88, 0x18, 0x30, 0x00, /*0x00,*/ 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x00}, // , 0x00}, // 'f'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x80, 0xC0, 0x40, /*0x00,*/ 0x4F, 0xDF, 0x90, 0x90, 0xFF, 0x7F, 0x00}, // , 0x00}, // 'g'
|
||||
{0x08, 0xF8, 0xF8, 0x80, 0x40, 0xC0, 0x80, /*0x00,*/ 0x10, 0x1F, 0x1F, 0x00, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'h'
|
||||
{0x00, 0x00, 0x40, 0xD8, 0xD8, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'i'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x40, 0xD8, 0xD8, /*0x00,*/ 0x00, 0x60, 0xE0, 0x80, 0x80, 0xFF, 0x7F}, // , 0x00}, // 'j'
|
||||
{0x08, 0xF8, 0xF8, 0x00, 0x80, 0xC0, 0x40, /*0x00,*/ 0x10, 0x1F, 0x1F, 0x03, 0x07, 0x1C, 0x18}, // , 0x00}, // 'k'
|
||||
{0x00, 0x00, 0x08, 0xF8, 0xF8, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x10, 0x1F, 0x1F, 0x10, 0x00}, // , 0x00}, // 'l'
|
||||
{0xC0, 0xC0, 0xC0, 0x80, 0xC0, 0xC0, 0x80, /*0x00,*/ 0x1F, 0x1F, 0x00, 0x1F, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'm'
|
||||
{0x40, 0xC0, 0x80, 0x40, 0x40, 0xC0, 0x80, /*0x00,*/ 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x1F, 0x1F}, // , 0x00}, // 'n'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, /*0x00,*/ 0x0F, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'o'
|
||||
{0x40, 0xC0, 0x80, 0x40, 0x40, 0xC0, 0x80, /*0x00,*/ 0x80, 0xFF, 0xFF, 0x90, 0x10, 0x1F, 0x0F}, // , 0x00}, // 'p'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x80, 0xC0, 0x40, /*0x00,*/ 0x0F, 0x1F, 0x10, 0x90, 0xFF, 0xFF, 0x80}, // , 0x00}, // 'q'
|
||||
{0x40, 0xC0, 0x80, 0xC0, 0x40, 0xC0, 0x80, /*0x00,*/ 0x10, 0x1F, 0x1F, 0x10, 0x00, 0x00, 0x01}, // , 0x00}, // 'r'
|
||||
{0x80, 0xC0, 0x40, 0x40, 0x40, 0xC0, 0x80, /*0x00,*/ 0x08, 0x19, 0x13, 0x12, 0x16, 0x1C, 0x08}, // , 0x00}, // 's'
|
||||
{0x40, 0x40, 0xF0, 0xF8, 0x40, 0x40, 0x00, /*0x00,*/ 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x18, 0x08}, // , 0x00}, // 't'
|
||||
{0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, /*0x00,*/ 0x0F, 0x1F, 0x10, 0x10, 0x0F, 0x1F, 0x10}, // , 0x00}, // 'u'
|
||||
{0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, /*0x00,*/ 0x00, 0x07, 0x0F, 0x18, 0x18, 0x0F, 0x07}, // , 0x00}, // 'v'
|
||||
{0xC0, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0xC0, /*0x00,*/ 0x0F, 0x1F, 0x18, 0x0E, 0x18, 0x1F, 0x0F}, // , 0x00}, // 'w'
|
||||
{0x40, 0xC0, 0x80, 0x00, 0x80, 0xC0, 0x40, /*0x00,*/ 0x10, 0x18, 0x0F, 0x07, 0x0F, 0x18, 0x10}, // , 0x00}, // 'x'
|
||||
{0xC0, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0xC0, /*0x00,*/ 0x8F, 0x9F, 0x90, 0x90, 0xD0, 0x7F, 0x3F}, // , 0x00}, // 'y'
|
||||
{0xC0, 0xC0, 0x40, 0x40, 0xC0, 0xC0, 0x40, /*0x00,*/ 0x18, 0x1C, 0x16, 0x13, 0x11, 0x18, 0x18}, // , 0x00}, // 'z'
|
||||
{0x00, 0x80, 0x80, 0xF0, 0x78, 0x08, 0x08, /*0x00,*/ 0x00, 0x00, 0x00, 0x0F, 0x1F, 0x10, 0x10}, // , 0x00}, // '{'
|
||||
{0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x00, 0x00}, // , 0x00}, // '|'
|
||||
{0x00, 0x08, 0x08, 0x78, 0xF0, 0x80, 0x80, /*0x00,*/ 0x00, 0x10, 0x10, 0x1F, 0x0F, 0x00, 0x00}, // , 0x00}, // '}'
|
||||
{0x10, 0x18, 0x08, 0x18, 0x10, 0x18, 0x08, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // , 0x00} // '->'
|
||||
#else
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0xFC, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x0D, 0x00, 0x00},
|
||||
{0x00, 0x0F, 0x1F, 0x00, 0x00, 0x1F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x20, 0xF8, 0xF8, 0x20, 0xF8, 0xF8, 0x20, 0x00, 0x02, 0x0F, 0x0F, 0x02, 0x0F, 0x0F, 0x02},
|
||||
{0x70, 0xF8, 0x88, 0x8E, 0x8E, 0x98, 0x10, 0x00, 0x04, 0x0C, 0x08, 0x38, 0x38, 0x0F, 0x07},
|
||||
{0x30, 0x30, 0x00, 0x80, 0xC0, 0x60, 0x30, 0x00, 0x0C, 0x06, 0x03, 0x01, 0x00, 0x0C, 0x0C},
|
||||
{0x80, 0xD8, 0x7C, 0xE4, 0xBC, 0xD8, 0x40, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x07, 0x0F, 0x08},
|
||||
{0x00, 0x10, 0x1F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0xF0, 0xF8, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0C, 0x08, 0x00},
|
||||
{0x00, 0x00, 0x04, 0x0C, 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0C, 0x07, 0x03, 0x00},
|
||||
{0x00, 0x80, 0xA0, 0xE0, 0xC0, 0xE0, 0xA0, 0x80, 0x00, 0x00, 0x02, 0x03, 0x01, 0x03, 0x02},
|
||||
{0x00, 0x80, 0x80, 0xE0, 0xE0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1E, 0x0E, 0x00, 0x00},
|
||||
{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x80, 0xC0, 0x60, 0x30, 0x00, 0x0C, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00},
|
||||
{0xF8, 0xFC, 0x84, 0xC4, 0x64, 0xFC, 0xF8, 0x00, 0x07, 0x0F, 0x09, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0x00, 0x10, 0x18, 0xFC, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x0F, 0x0F, 0x08, 0x08},
|
||||
{0x18, 0x1C, 0x04, 0x84, 0xC4, 0x7C, 0x38, 0x00, 0x0C, 0x0E, 0x0B, 0x09, 0x08, 0x08, 0x08},
|
||||
{0x18, 0x1C, 0x44, 0x44, 0x44, 0xFC, 0xB8, 0x00, 0x06, 0x0E, 0x08, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0x80, 0xC0, 0x60, 0x30, 0x18, 0xFC, 0xFC, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x0F},
|
||||
{0x7C, 0x7C, 0x44, 0x44, 0x44, 0xC4, 0x84, 0x00, 0x04, 0x0C, 0x08, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0xF0, 0xF8, 0x4C, 0x44, 0x44, 0xC4, 0x80, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0x04, 0x04, 0x04, 0x84, 0xE4, 0x7C, 0x1C, 0x00, 0x00, 0x00, 0x0E, 0x0F, 0x01, 0x00, 0x00},
|
||||
{0xB8, 0xFC, 0x44, 0x44, 0x44, 0xFC, 0xB8, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0x78, 0xFC, 0x84, 0x84, 0x84, 0xFC, 0xF8, 0x00, 0x00, 0x08, 0x08, 0x08, 0x0C, 0x07, 0x03},
|
||||
{0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0E, 0x06, 0x00, 0x00},
|
||||
{0x00, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x08, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x0C, 0x08},
|
||||
{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02},
|
||||
{0x00, 0x08, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x08, 0x0C, 0x06, 0x03, 0x01, 0x00},
|
||||
{0x38, 0x3C, 0x04, 0x84, 0xC4, 0x7C, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x0D, 0x00, 0x00},
|
||||
{0xF0, 0xF8, 0x08, 0xC8, 0xC8, 0xF8, 0xF0, 0x00, 0x07, 0x0F, 0x08, 0x0B, 0x0B, 0x0B, 0x01},
|
||||
{0xF8, 0xFC, 0x84, 0x84, 0x84, 0xFC, 0xF8, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F},
|
||||
{0xFC, 0xFC, 0x44, 0x44, 0x44, 0xFC, 0xB8, 0x00, 0x0F, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0xF8, 0xFC, 0x04, 0x04, 0x04, 0x1C, 0x18, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0E, 0x06},
|
||||
{0xFC, 0xFC, 0x04, 0x04, 0x0C, 0xF8, 0xF0, 0x00, 0x0F, 0x0F, 0x08, 0x08, 0x0C, 0x07, 0x03},
|
||||
{0xFC, 0xFC, 0x44, 0x44, 0x44, 0x04, 0x04, 0x00, 0x0F, 0x0F, 0x08, 0x08, 0x08, 0x08, 0x08},
|
||||
{0xFC, 0xFC, 0x44, 0x44, 0x44, 0x04, 0x04, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0xF8, 0xFC, 0x04, 0x84, 0x84, 0x9C, 0x98, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0xFC, 0xFC, 0x40, 0x40, 0x40, 0xFC, 0xFC, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F},
|
||||
{0x00, 0x00, 0x04, 0xFC, 0xFC, 0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x0F, 0x08, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x04, 0xFC, 0xFC, 0x04, 0x00, 0x06, 0x0E, 0x08, 0x08, 0x0F, 0x07, 0x00},
|
||||
{0xFC, 0xFC, 0xE0, 0x30, 0x18, 0x0C, 0x04, 0x00, 0x0F, 0x0F, 0x01, 0x03, 0x06, 0x0C, 0x08},
|
||||
{0xFC, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x08, 0x08, 0x08, 0x08, 0x08},
|
||||
{0xFC, 0xFC, 0x18, 0x70, 0x18, 0xFC, 0xFC, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F},
|
||||
{0xFC, 0xFC, 0x60, 0xC0, 0x80, 0xFC, 0xFC, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x01, 0x0F, 0x0F},
|
||||
{0xF8, 0xFC, 0x04, 0x04, 0x04, 0xFC, 0xF8, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0xFC, 0xFC, 0x84, 0x84, 0x84, 0xFC, 0x78, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0xF8, 0xFC, 0x04, 0x04, 0x04, 0xFC, 0xF8, 0x00, 0x07, 0x0F, 0x08, 0x0C, 0x0C, 0x1F, 0x17},
|
||||
{0xFC, 0xFC, 0x84, 0x84, 0x84, 0xFC, 0x78, 0x00, 0x0F, 0x0F, 0x01, 0x03, 0x06, 0x0C, 0x08},
|
||||
{0x38, 0x7C, 0x44, 0x44, 0x44, 0xCC, 0x88, 0x00, 0x06, 0x0E, 0x08, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0x00, 0x04, 0x04, 0xFC, 0xFC, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00},
|
||||
{0xFC, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0xFC, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0x7C, 0xFC, 0x80, 0x00, 0x80, 0xFC, 0x7C, 0x00, 0x00, 0x03, 0x0F, 0x0C, 0x0F, 0x03, 0x00},
|
||||
{0xFC, 0xFC, 0x00, 0x80, 0x00, 0xFC, 0xFC, 0x00, 0x0F, 0x0F, 0x06, 0x03, 0x06, 0x0F, 0x0F},
|
||||
{0x0C, 0x3C, 0xF0, 0xC0, 0xF0, 0x3C, 0x0C, 0x00, 0x0C, 0x0F, 0x03, 0x00, 0x03, 0x0F, 0x0C},
|
||||
{0x00, 0x3C, 0x7C, 0xC0, 0xC0, 0x7C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00},
|
||||
{0x04, 0x04, 0x84, 0xC4, 0x64, 0x3C, 0x1C, 0x00, 0x0E, 0x0F, 0x09, 0x08, 0x08, 0x08, 0x08},
|
||||
{0x00, 0x00, 0xFC, 0xFC, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x08, 0x08, 0x00},
|
||||
{0x38, 0x70, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0E},
|
||||
{0x00, 0x00, 0x04, 0x04, 0xFC, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x0F, 0x0F, 0x00},
|
||||
{0x08, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20},
|
||||
{0x00, 0x00, 0x03, 0x07, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0xA0, 0xA0, 0xA0, 0xA0, 0xE0, 0xC0, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x0F},
|
||||
{0xFC, 0xFC, 0x20, 0x20, 0x20, 0xE0, 0xC0, 0x00, 0x0F, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0x60, 0x40, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0C, 0x04},
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0xFC, 0xFC, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x0F},
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0xE0, 0xC0, 0x00, 0x07, 0x0F, 0x09, 0x09, 0x09, 0x09, 0x01},
|
||||
{0x20, 0x20, 0xF8, 0xFC, 0x24, 0x24, 0x04, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00},
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0xE0, 0xE0, 0x00, 0x07, 0x4F, 0x48, 0x48, 0x48, 0x7F, 0x3F},
|
||||
{0xFC, 0xFC, 0x20, 0x20, 0x20, 0xE0, 0xC0, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F},
|
||||
{0x00, 0x00, 0x20, 0xEC, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x0F, 0x08, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x20, 0xEC, 0xEC, 0x00, 0x00, 0x30, 0x70, 0x40, 0x40, 0x7F, 0x3F},
|
||||
{0xFC, 0xFC, 0x00, 0x80, 0xC0, 0x60, 0x20, 0x00, 0x0F, 0x0F, 0x01, 0x03, 0x06, 0x0C, 0x08},
|
||||
{0x00, 0x00, 0x04, 0xFC, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x0F, 0x08, 0x00},
|
||||
{0xE0, 0xE0, 0x20, 0xE0, 0x20, 0xE0, 0xC0, 0x00, 0x0F, 0x0F, 0x00, 0x0F, 0x00, 0x0F, 0x0F},
|
||||
{0xE0, 0xE0, 0x20, 0x20, 0x20, 0xE0, 0xC0, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F},
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0xE0, 0xC0, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0xE0, 0xE0, 0x20, 0x20, 0x20, 0xE0, 0xC0, 0x00, 0x7F, 0x7F, 0x08, 0x08, 0x08, 0x0F, 0x07},
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0xE0, 0xE0, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08, 0x7F, 0x7F},
|
||||
{0xE0, 0xE0, 0x60, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x08, 0x09, 0x09, 0x09, 0x09, 0x0F, 0x06},
|
||||
{0x20, 0x20, 0xFC, 0xFC, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08},
|
||||
{0xE0, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x0F},
|
||||
{0xE0, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x03, 0x0F, 0x0C, 0x0F, 0x03, 0x00},
|
||||
{0xE0, 0xE0, 0x00, 0x80, 0x00, 0xE0, 0xE0, 0x00, 0x07, 0x0F, 0x08, 0x0F, 0x08, 0x0F, 0x07},
|
||||
{0x60, 0xE0, 0x80, 0x00, 0x80, 0xE0, 0x60, 0x00, 0x0C, 0x0E, 0x03, 0x01, 0x03, 0x0E, 0x0C},
|
||||
{0xE0, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x07, 0x4F, 0x48, 0x48, 0x48, 0x7F, 0x3F},
|
||||
{0x20, 0x20, 0x20, 0xA0, 0xE0, 0x60, 0x20, 0x00, 0x0C, 0x0E, 0x0B, 0x09, 0x08, 0x08, 0x08},
|
||||
{0x00, 0x00, 0x40, 0xF8, 0xBC, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x08, 0x08},
|
||||
{0x00, 0x00, 0x00, 0xBC, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00},
|
||||
{0x00, 0x04, 0x04, 0xBC, 0xF8, 0x40, 0x00, 0x00, 0x00, 0x08, 0x08, 0x0F, 0x07, 0x00, 0x00},
|
||||
{0x08, 0x0C, 0x04, 0x0C, 0x08, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||
// {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ' '
|
||||
{0x00, 0x00, 0x00, 0xFC, 0xFC, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x0D, 0x0D, 0x00, 0x00}, // '!'
|
||||
{0x00, 0x0F, 0x1F, 0x00, 0x00, 0x1F, 0x0F, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // '"'
|
||||
{0x20, 0xF8, 0xF8, 0x20, 0xF8, 0xF8, 0x20, /*0x00,*/ 0x02, 0x0F, 0x0F, 0x02, 0x0F, 0x0F, 0x02}, // '#'
|
||||
{0x70, 0xF8, 0x88, 0x8E, 0x8E, 0x98, 0x10, /*0x00,*/ 0x04, 0x0C, 0x08, 0x38, 0x38, 0x0F, 0x07}, // '$'
|
||||
{0x30, 0x30, 0x00, 0x80, 0xC0, 0x60, 0x30, /*0x00,*/ 0x0C, 0x06, 0x03, 0x01, 0x00, 0x0C, 0x0C}, // '%'
|
||||
{0x80, 0xD8, 0x7C, 0xE4, 0xBC, 0xD8, 0x40, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x07, 0x0F, 0x08}, // '&'
|
||||
{0x00, 0x10, 0x1F, 0x0F, 0x00, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // '''
|
||||
{0x00, 0x00, 0xF0, 0xF8, 0x0C, 0x04, 0x00, /*0x00,*/ 0x00, 0x00, 0x03, 0x07, 0x0C, 0x08, 0x00}, // '('
|
||||
{0x00, 0x00, 0x04, 0x0C, 0xF8, 0xF0, 0x00, /*0x00,*/ 0x00, 0x00, 0x08, 0x0C, 0x07, 0x03, 0x00}, // ')'
|
||||
{0x00, 0x80, 0xA0, 0xE0, 0xC0, 0xE0, 0xA0, /*0x80,*/ 0x00, 0x00, 0x02, 0x03, 0x01, 0x03, 0x02}, // '*'
|
||||
{0x00, 0x80, 0x80, 0xE0, 0xE0, 0x80, 0x80, /*0x00,*/ 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00}, // '+'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x10, 0x1E, 0x0E, 0x00, 0x00}, // ','
|
||||
{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // '-'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00}, // '.'
|
||||
{0x00, 0x00, 0x00, 0x80, 0xC0, 0x60, 0x30, /*0x00,*/ 0x0C, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00}, // '/'
|
||||
{0xF8, 0xFC, 0x84, 0xC4, 0x64, 0xFC, 0xF8, /*0x00,*/ 0x07, 0x0F, 0x09, 0x08, 0x08, 0x0F, 0x07}, // '0'
|
||||
{0x00, 0x10, 0x18, 0xFC, 0xFC, 0x00, 0x00, /*0x00,*/ 0x00, 0x08, 0x08, 0x0F, 0x0F, 0x08, 0x08}, // '1'
|
||||
{0x18, 0x1C, 0x04, 0x84, 0xC4, 0x7C, 0x38, /*0x00,*/ 0x0C, 0x0E, 0x0B, 0x09, 0x08, 0x08, 0x08}, // '2'
|
||||
{0x18, 0x1C, 0x44, 0x44, 0x44, 0xFC, 0xB8, /*0x00,*/ 0x06, 0x0E, 0x08, 0x08, 0x08, 0x0F, 0x07}, // '3'
|
||||
{0x80, 0xC0, 0x60, 0x30, 0x18, 0xFC, 0xFC, /*0x00,*/ 0x01, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x0F}, // '4'
|
||||
{0x7C, 0x7C, 0x44, 0x44, 0x44, 0xC4, 0x84, /*0x00,*/ 0x04, 0x0C, 0x08, 0x08, 0x08, 0x0F, 0x07}, // '5'
|
||||
{0xF0, 0xF8, 0x4C, 0x44, 0x44, 0xC4, 0x80, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07}, // '6'
|
||||
{0x04, 0x04, 0x04, 0x84, 0xE4, 0x7C, 0x1C, /*0x00,*/ 0x00, 0x00, 0x0E, 0x0F, 0x01, 0x00, 0x00}, // '7'
|
||||
{0xB8, 0xFC, 0x44, 0x44, 0x44, 0xFC, 0xB8, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07}, // '8'
|
||||
{0x78, 0xFC, 0x84, 0x84, 0x84, 0xFC, 0xF8, /*0x00,*/ 0x00, 0x08, 0x08, 0x08, 0x0C, 0x07, 0x03}, // '9'
|
||||
{0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00}, // ':'
|
||||
{0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x08, 0x0E, 0x06, 0x00, 0x00}, // ';'
|
||||
{0x00, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x08, /*0x00,*/ 0x00, 0x00, 0x01, 0x03, 0x06, 0x0C, 0x08}, // '<'
|
||||
{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /*0x00,*/ 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02}, // '='
|
||||
{0x00, 0x08, 0x18, 0x30, 0x60, 0xC0, 0x80, /*0x00,*/ 0x00, 0x08, 0x0C, 0x06, 0x03, 0x01, 0x00}, // '>'
|
||||
{0x38, 0x3C, 0x04, 0x84, 0xC4, 0x7C, 0x38, /*0x00,*/ 0x00, 0x00, 0x00, 0x0D, 0x0D, 0x00, 0x00}, // '?'
|
||||
{0xF0, 0xF8, 0x08, 0xC8, 0xC8, 0xF8, 0xF0, /*0x00,*/ 0x07, 0x0F, 0x08, 0x0B, 0x0B, 0x0B, 0x01}, // '@'
|
||||
{0xF8, 0xFC, 0x84, 0x84, 0x84, 0xFC, 0xF8, /*0x00,*/ 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F}, // 'A'
|
||||
{0xFC, 0xFC, 0x44, 0x44, 0x44, 0xFC, 0xB8, /*0x00,*/ 0x0F, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07}, // 'B'
|
||||
{0xF8, 0xFC, 0x04, 0x04, 0x04, 0x1C, 0x18, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0E, 0x06}, // 'C'
|
||||
{0xFC, 0xFC, 0x04, 0x04, 0x0C, 0xF8, 0xF0, /*0x00,*/ 0x0F, 0x0F, 0x08, 0x08, 0x0C, 0x07, 0x03}, // 'D'
|
||||
{0xFC, 0xFC, 0x44, 0x44, 0x44, 0x04, 0x04, /*0x00,*/ 0x0F, 0x0F, 0x08, 0x08, 0x08, 0x08, 0x08}, // 'E'
|
||||
{0xFC, 0xFC, 0x44, 0x44, 0x44, 0x04, 0x04, /*0x00,*/ 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00}, // 'F'
|
||||
{0xF8, 0xFC, 0x04, 0x84, 0x84, 0x9C, 0x98, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07}, // 'G'
|
||||
{0xFC, 0xFC, 0x40, 0x40, 0x40, 0xFC, 0xFC, /*0x00,*/ 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F}, // 'H'
|
||||
{0x00, 0x00, 0x04, 0xFC, 0xFC, 0x04, 0x00, /*0x00,*/ 0x00, 0x00, 0x08, 0x0F, 0x0F, 0x08, 0x00}, // 'I'
|
||||
{0x00, 0x00, 0x00, 0x04, 0xFC, 0xFC, 0x04, /*0x00,*/ 0x06, 0x0E, 0x08, 0x08, 0x0F, 0x07, 0x00}, // 'J'
|
||||
{0xFC, 0xFC, 0xE0, 0x30, 0x18, 0x0C, 0x04, /*0x00,*/ 0x0F, 0x0F, 0x01, 0x03, 0x06, 0x0C, 0x08}, // 'K'
|
||||
{0xFC, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, /*0x00,*/ 0x0F, 0x0F, 0x08, 0x08, 0x08, 0x08, 0x08}, // 'L'
|
||||
{0xFC, 0xFC, 0x18, 0x70, 0x18, 0xFC, 0xFC, /*0x00,*/ 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F}, // 'M'
|
||||
{0xFC, 0xFC, 0x60, 0xC0, 0x80, 0xFC, 0xFC, /*0x00,*/ 0x0F, 0x0F, 0x00, 0x00, 0x01, 0x0F, 0x0F}, // 'N'
|
||||
{0xF8, 0xFC, 0x04, 0x04, 0x04, 0xFC, 0xF8, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07}, // 'O'
|
||||
{0xFC, 0xFC, 0x84, 0x84, 0x84, 0xFC, 0x78, /*0x00,*/ 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00}, // 'P'
|
||||
{0xF8, 0xFC, 0x04, 0x04, 0x04, 0xFC, 0xF8, /*0x00,*/ 0x07, 0x0F, 0x08, 0x0C, 0x0C, 0x1F, 0x17}, // 'Q'
|
||||
{0xFC, 0xFC, 0x84, 0x84, 0x84, 0xFC, 0x78, /*0x00,*/ 0x0F, 0x0F, 0x01, 0x03, 0x06, 0x0C, 0x08}, // 'R'
|
||||
{0x38, 0x7C, 0x44, 0x44, 0x44, 0xCC, 0x88, /*0x00,*/ 0x06, 0x0E, 0x08, 0x08, 0x08, 0x0F, 0x07}, // 'S'
|
||||
{0x00, 0x04, 0x04, 0xFC, 0xFC, 0x04, 0x04, /*0x00,*/ 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00}, // 'T'
|
||||
{0xFC, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0xFC, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07}, // 'U'
|
||||
{0x7C, 0xFC, 0x80, 0x00, 0x80, 0xFC, 0x7C, /*0x00,*/ 0x00, 0x03, 0x0F, 0x0C, 0x0F, 0x03, 0x00}, // 'V'
|
||||
{0xFC, 0xFC, 0x00, 0x80, 0x00, 0xFC, 0xFC, /*0x00,*/ 0x0F, 0x0F, 0x06, 0x03, 0x06, 0x0F, 0x0F}, // 'W'
|
||||
{0x0C, 0x3C, 0xF0, 0xC0, 0xF0, 0x3C, 0x0C, /*0x00,*/ 0x0C, 0x0F, 0x03, 0x00, 0x03, 0x0F, 0x0C}, // 'X'
|
||||
{0x00, 0x3C, 0x7C, 0xC0, 0xC0, 0x7C, 0x3C, /*0x00,*/ 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00}, // 'Y'
|
||||
{0x04, 0x04, 0x84, 0xC4, 0x64, 0x3C, 0x1C, /*0x00,*/ 0x0E, 0x0F, 0x09, 0x08, 0x08, 0x08, 0x08}, // 'Z'
|
||||
{0x00, 0x00, 0xFC, 0xFC, 0x04, 0x04, 0x00, /*0x00,*/ 0x00, 0x00, 0x0F, 0x0F, 0x08, 0x08, 0x00}, // '['
|
||||
{0x38, 0x70, 0xE0, 0xC0, 0x80, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0E}, // '"\'
|
||||
{0x00, 0x00, 0x04, 0x04, 0xFC, 0xFC, 0x00, /*0x00,*/ 0x00, 0x00, 0x08, 0x08, 0x0F, 0x0F, 0x00}, // ']'
|
||||
{0x08, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x08, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // '^'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*0x00,*/ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20}, // '_'
|
||||
{0x00, 0x00, 0x03, 0x07, 0x04, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // '`'
|
||||
{0x00, 0xA0, 0xA0, 0xA0, 0xA0, 0xE0, 0xC0, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x0F}, // 'a'
|
||||
{0xFC, 0xFC, 0x20, 0x20, 0x20, 0xE0, 0xC0, /*0x00,*/ 0x0F, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07}, // 'b'
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0x60, 0x40, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0C, 0x04}, // 'c'
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0xFC, 0xFC, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x0F}, // 'd'
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0xE0, 0xC0, /*0x00,*/ 0x07, 0x0F, 0x09, 0x09, 0x09, 0x09, 0x01}, // 'e'
|
||||
{0x20, 0x20, 0xF8, 0xFC, 0x24, 0x24, 0x04, /*0x00,*/ 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00}, // 'f'
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0xE0, 0xE0, /*0x00,*/ 0x07, 0x4F, 0x48, 0x48, 0x48, 0x7F, 0x3F}, // 'g'
|
||||
{0xFC, 0xFC, 0x20, 0x20, 0x20, 0xE0, 0xC0, /*0x00,*/ 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F}, // 'h'
|
||||
{0x00, 0x00, 0x20, 0xEC, 0xEC, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x08, 0x0F, 0x0F, 0x08, 0x00}, // 'i'
|
||||
{0x00, 0x00, 0x00, 0x00, 0x20, 0xEC, 0xEC, /*0x00,*/ 0x00, 0x30, 0x70, 0x40, 0x40, 0x7F, 0x3F}, // 'j'
|
||||
{0xFC, 0xFC, 0x00, 0x80, 0xC0, 0x60, 0x20, /*0x00,*/ 0x0F, 0x0F, 0x01, 0x03, 0x06, 0x0C, 0x08}, // 'k'
|
||||
{0x00, 0x00, 0x04, 0xFC, 0xFC, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x08, 0x0F, 0x0F, 0x08, 0x00}, // 'l'
|
||||
{0xE0, 0xE0, 0x20, 0xE0, 0x20, 0xE0, 0xC0, /*0x00,*/ 0x0F, 0x0F, 0x00, 0x0F, 0x00, 0x0F, 0x0F}, // 'm'
|
||||
{0xE0, 0xE0, 0x20, 0x20, 0x20, 0xE0, 0xC0, /*0x00,*/ 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F}, // 'n'
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0xE0, 0xC0, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x07}, // 'o'
|
||||
{0xE0, 0xE0, 0x20, 0x20, 0x20, 0xE0, 0xC0, /*0x00,*/ 0x7F, 0x7F, 0x08, 0x08, 0x08, 0x0F, 0x07}, // 'p'
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0xE0, 0xE0, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x08, 0x7F, 0x7F}, // 'q'
|
||||
{0xE0, 0xE0, 0x60, 0x20, 0x20, 0x20, 0x20, /*0x00,*/ 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00}, // 'r'
|
||||
{0xC0, 0xE0, 0x20, 0x20, 0x20, 0x20, 0x20, /*0x00,*/ 0x08, 0x09, 0x09, 0x09, 0x09, 0x0F, 0x06}, // 's'
|
||||
{0x20, 0x20, 0xFC, 0xFC, 0x20, 0x20, 0x00, /*0x00,*/ 0x00, 0x00, 0x07, 0x0F, 0x08, 0x08, 0x08}, // 't'
|
||||
{0xE0, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0xE0, /*0x00,*/ 0x07, 0x0F, 0x08, 0x08, 0x08, 0x0F, 0x0F}, // 'u'
|
||||
{0xE0, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0xE0, /*0x00,*/ 0x00, 0x03, 0x0F, 0x0C, 0x0F, 0x03, 0x00}, // 'v'
|
||||
{0xE0, 0xE0, 0x00, 0x80, 0x00, 0xE0, 0xE0, /*0x00,*/ 0x07, 0x0F, 0x08, 0x0F, 0x08, 0x0F, 0x07}, // 'w'
|
||||
{0x60, 0xE0, 0x80, 0x00, 0x80, 0xE0, 0x60, /*0x00,*/ 0x0C, 0x0E, 0x03, 0x01, 0x03, 0x0E, 0x0C}, // 'x'
|
||||
{0xE0, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0xE0, /*0x00,*/ 0x07, 0x4F, 0x48, 0x48, 0x48, 0x7F, 0x3F}, // 'y'
|
||||
{0x20, 0x20, 0x20, 0xA0, 0xE0, 0x60, 0x20, /*0x00,*/ 0x0C, 0x0E, 0x0B, 0x09, 0x08, 0x08, 0x08}, // 'z'
|
||||
{0x00, 0x00, 0x40, 0xF8, 0xBC, 0x04, 0x04, /*0x00,*/ 0x00, 0x00, 0x00, 0x07, 0x0F, 0x08, 0x08}, // '{'
|
||||
{0x00, 0x00, 0x00, 0xBC, 0xBC, 0x00, 0x00, /*0x00,*/ 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00}, // '|'
|
||||
{0x00, 0x04, 0x04, 0xBC, 0xF8, 0x40, 0x00, /*0x00,*/ 0x00, 0x08, 0x08, 0x0F, 0x07, 0x00, 0x00}, // '}'
|
||||
{0x08, 0x0C, 0x04, 0x0C, 0x08, 0x0C, 0x04, /*0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} // '->'
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -230,37 +231,40 @@ const uint8_t gFontBig[95][15] =
|
||||
{0x00, 0xF0, 0xF8, 0xB8, 0x1C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1C, 0xB8, 0xF0, 0xE0, 0x00, 0x11, 0x33, 0x77, 0x67, 0x66, 0x66, 0x66, 0x76, 0x33, 0x3F, 0x1F, 0x07},
|
||||
{0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00}
|
||||
};
|
||||
|
||||
// 6 Empty columns removed
|
||||
#elif 0
|
||||
// VCR font
|
||||
const uint8_t gFontBigDigits[11][26] =
|
||||
const uint8_t gFontBigDigits[11][26 - 6] =
|
||||
{
|
||||
{0x00, 0x00, 0xF8, 0xFC, 0x06, 0x86, 0xC6, 0xE6, 0xF6, 0x76, 0xFC, 0xF8, 0x00, 0x00, 0x00, 0x1F, 0x3F, 0x77, 0x67, 0x63, 0x61, 0x60, 0x70, 0x3F, 0x1F, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x18, 0x1C, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x7F, 0x7F, 0x60, 0x60, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x18, 0x1C, 0x86, 0x86, 0x86, 0x86, 0x86, 0xC6, 0xFC, 0x78, 0x00, 0x00, 0x00, 0x7E, 0x7F, 0x63, 0x61, 0x61, 0x61, 0x61, 0x61, 0x60, 0x60, 0x00},
|
||||
{0x00, 0x00, 0x18, 0x1C, 0x06, 0x06, 0x86, 0x86, 0x86, 0xC6, 0xFC, 0x78, 0x00, 0x00, 0x00, 0x18, 0x38, 0x70, 0x60, 0x61, 0x61, 0x61, 0x73, 0x3F, 0x1E, 0x00},
|
||||
{0x00, 0x00, 0x80, 0xC0, 0xE0, 0x70, 0x38, 0x1C, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x06, 0x06, 0x06, 0x06, 0x7F, 0x7F, 0x06, 0x06, 0x00},
|
||||
{0x00, 0x00, 0x7E, 0x7E, 0x66, 0x66, 0x66, 0x66, 0x66, 0xE6, 0xC6, 0x86, 0x00, 0x00, 0x00, 0x18, 0x38, 0x70, 0x60, 0x60, 0x60, 0x60, 0x70, 0x3F, 0x1F, 0x00},
|
||||
{0x00, 0x00, 0xF8, 0xFC, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x1C, 0x18, 0x00, 0x00, 0x00, 0x1F, 0x3F, 0x71, 0x61, 0x61, 0x61, 0x61, 0x73, 0x3F, 0x1E, 0x00},
|
||||
{0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x86, 0xC6, 0xE6, 0x7E, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x01, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x78, 0xFC, 0xC6, 0x86, 0x86, 0x86, 0x86, 0xC6, 0xFC, 0x78, 0x00, 0x00, 0x00, 0x1E, 0x3F, 0x73, 0x61, 0x61, 0x61, 0x61, 0x73, 0x3F, 0x1E, 0x00},
|
||||
{0x00, 0x00, 0x78, 0xFC, 0xC6, 0x86, 0x86, 0x86, 0x86, 0x86, 0xFC, 0xF8, 0x00, 0x00, 0x00, 0x18, 0x38, 0x71, 0x61, 0x61, 0x61, 0x61, 0x71, 0x3F, 0x1F, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00}
|
||||
{/*0x00, 0x00,*/ 0xF8, 0xFC, 0x06, 0x86, 0xC6, 0xE6, 0xF6, 0x76, 0xFC, 0xF8, /*0x00,*/ /*0x00, 0x00,*/ 0x1F, 0x3F, 0x77, 0x67, 0x63, 0x61, 0x60, 0x70, 0x3F, 0x1F, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x00, 0x00, 0x18, 0x1C, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, /*0x00,*/ /*0x00, 0x00,*/ 0x00, 0x00, 0x60, 0x60, 0x7F, 0x7F, 0x60, 0x60, 0x00, 0x00, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x18, 0x1C, 0x86, 0x86, 0x86, 0x86, 0x86, 0xC6, 0xFC, 0x78, /*0x00,*/ /*0x00, 0x00,*/ 0x7E, 0x7F, 0x63, 0x61, 0x61, 0x61, 0x61, 0x61, 0x60, 0x60, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x18, 0x1C, 0x06, 0x06, 0x86, 0x86, 0x86, 0xC6, 0xFC, 0x78, /*0x00,*/ /*0x00, 0x00,*/ 0x18, 0x38, 0x70, 0x60, 0x61, 0x61, 0x61, 0x73, 0x3F, 0x1E, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x80, 0xC0, 0xE0, 0x70, 0x38, 0x1C, 0xFE, 0xFE, 0x00, 0x00, /*0x00,*/ /*0x00, 0x00,*/ 0x07, 0x07, 0x06, 0x06, 0x06, 0x06, 0x7F, 0x7F, 0x06, 0x06, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x7E, 0x7E, 0x66, 0x66, 0x66, 0x66, 0x66, 0xE6, 0xC6, 0x86, /*0x00,*/ /*0x00, 0x00,*/ 0x18, 0x38, 0x70, 0x60, 0x60, 0x60, 0x60, 0x70, 0x3F, 0x1F, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0xF8, 0xFC, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x1C, 0x18, /*0x00,*/ /*0x00, 0x00,*/ 0x1F, 0x3F, 0x71, 0x61, 0x61, 0x61, 0x61, 0x73, 0x3F, 0x1E, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x06, 0x06, 0x06, 0x06, 0x06, 0x86, 0xC6, 0xE6, 0x7E, 0x3E, /*0x00,*/ /*0x00, 0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x01, 0x00, 0x00, 0x00, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x78, 0xFC, 0xC6, 0x86, 0x86, 0x86, 0x86, 0xC6, 0xFC, 0x78, /*0x00,*/ /*0x00, 0x00,*/ 0x1E, 0x3F, 0x73, 0x61, 0x61, 0x61, 0x61, 0x73, 0x3F, 0x1E, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x78, 0xFC, 0xC6, 0x86, 0x86, 0x86, 0x86, 0x86, 0xFC, 0xF8, /*0x00,*/ /*0x00, 0x00,*/ 0x18, 0x38, 0x71, 0x61, 0x61, 0x61, 0x61, 0x71, 0x3F, 0x1F, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, /*0x00,*/ /*0x00, 0x00,*/ 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, /*0x00*/}
|
||||
};
|
||||
#else
|
||||
// Terminus font
|
||||
const uint8_t gFontBigDigits[11][26] =
|
||||
|
||||
const uint8_t gFontBigDigits[11][26 - 6] =
|
||||
{
|
||||
{0x00, 0x00, 0xFC, 0xFE, 0xFE, 0x06, 0x86, 0xC6, 0xE6, 0xFE, 0xFE, 0xFC, 0x00, 0x00, 0x00, 0x3F, 0x7F, 0x7F, 0x67, 0x63, 0x61, 0x60, 0x7F, 0x7F, 0x3F, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x18, 0x1C, 0xFE, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x7F, 0x7F, 0x7F, 0x60, 0x60, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x1C, 0x1E, 0x1E, 0x06, 0x06, 0x06, 0x86, 0xFE, 0xFE, 0x7C, 0x00, 0x00, 0x00, 0x60, 0x70, 0x78, 0x7C, 0x6E, 0x67, 0x63, 0x61, 0x60, 0x60, 0x00},
|
||||
{0x00, 0x00, 0x0C, 0x0E, 0x0E, 0x86, 0x86, 0x86, 0x86, 0xFE, 0xFE, 0x7C, 0x00, 0x00, 0x00, 0x30, 0x70, 0x70, 0x61, 0x61, 0x61, 0x61, 0x7F, 0x7F, 0x3E, 0x00},
|
||||
{0x00, 0x00, 0x80, 0xC0, 0xE0, 0x70, 0x38, 0x1C, 0x0E, 0xFE, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x0C, 0x0C, 0x0C, 0x0C, 0x7F, 0x7F, 0x7F, 0x00},
|
||||
{0x00, 0x00, 0xFE, 0xFE, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x86, 0x00, 0x00, 0x00, 0x30, 0x70, 0x70, 0x60, 0x60, 0x60, 0x60, 0x7F, 0x7F, 0x3F, 0x00},
|
||||
{0x00, 0x00, 0xF8, 0xFC, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x80, 0x00, 0x00, 0x00, 0x3F, 0x7F, 0x7F, 0x60, 0x60, 0x60, 0x60, 0x7F, 0x7F, 0x3F, 0x00},
|
||||
{0x00, 0x00, 0x0E, 0x0E, 0x0E, 0x06, 0x06, 0x86, 0xE6, 0xFE, 0x7E, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7F, 0x7F, 0x03, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x7C, 0xFE, 0xFE, 0x86, 0x86, 0x86, 0x86, 0xFE, 0xFE, 0x7C, 0x00, 0x00, 0x00, 0x3F, 0x7F, 0x7F, 0x61, 0x61, 0x61, 0x61, 0x7F, 0x7F, 0x3F, 0x00},
|
||||
{0x00, 0x00, 0xFC, 0xFE, 0xFE, 0x06, 0x06, 0x06, 0x06, 0xFE, 0xFE, 0xFC, 0x00, 0x00, 0x00, 0x01, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x7F, 0x3F, 0x1F, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00}
|
||||
{/*0x00, 0x00,*/ 0xFC, 0xFE, 0xFE, 0x06, 0x86, 0xC6, 0xE6, 0xFE, 0xFE, 0xFC, /*0x00,*/ /*0x00, 0x00,*/ 0x3F, 0x7F, 0x7F, 0x67, 0x63, 0x61, 0x60, 0x7F, 0x7F, 0x3F, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x00, 0x00, 0x18, 0x1C, 0xFE, 0xFE, 0xFE, 0x00, 0x00, 0x00, /*0x00,*/ /*0x00, 0x00,*/ 0x00, 0x00, 0x60, 0x60, 0x7F, 0x7F, 0x7F, 0x60, 0x60, 0x00, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x1C, 0x1E, 0x1E, 0x06, 0x06, 0x06, 0x86, 0xFE, 0xFE, 0x7C, /*0x00,*/ /*0x00, 0x00,*/ 0x60, 0x70, 0x78, 0x7C, 0x6E, 0x67, 0x63, 0x61, 0x60, 0x60, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x0C, 0x0E, 0x0E, 0x86, 0x86, 0x86, 0x86, 0xFE, 0xFE, 0x7C, /*0x00,*/ /*0x00, 0x00,*/ 0x30, 0x70, 0x70, 0x61, 0x61, 0x61, 0x61, 0x7F, 0x7F, 0x3E, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x80, 0xC0, 0xE0, 0x70, 0x38, 0x1C, 0x0E, 0xFE, 0xFE, 0xFE, /*0x00,*/ /*0x00, 0x00,*/ 0x0F, 0x0F, 0x0F, 0x0C, 0x0C, 0x0C, 0x0C, 0x7F, 0x7F, 0x7F, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0xFE, 0xFE, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x86, /*0x00,*/ /*0x00, 0x00,*/ 0x30, 0x70, 0x70, 0x60, 0x60, 0x60, 0x60, 0x7F, 0x7F, 0x3F, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0xF8, 0xFC, 0xFE, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0xC6, 0x80, /*0x00,*/ /*0x00, 0x00,*/ 0x3F, 0x7F, 0x7F, 0x60, 0x60, 0x60, 0x60, 0x7F, 0x7F, 0x3F, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x0E, 0x0E, 0x0E, 0x06, 0x06, 0x86, 0xE6, 0xFE, 0x7E, 0x1E, /*0x00,*/ /*0x00, 0x00,*/ 0x00, 0x00, 0x00, 0x00, 0x7C, 0x7F, 0x7F, 0x03, 0x00, 0x00, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x7C, 0xFE, 0xFE, 0x86, 0x86, 0x86, 0x86, 0xFE, 0xFE, 0x7C, /*0x00,*/ /*0x00, 0x00,*/ 0x3F, 0x7F, 0x7F, 0x61, 0x61, 0x61, 0x61, 0x7F, 0x7F, 0x3F, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0xFC, 0xFE, 0xFE, 0x06, 0x06, 0x06, 0x06, 0xFE, 0xFE, 0xFC, /*0x00,*/ /*0x00, 0x00,*/ 0x01, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x7F, 0x3F, 0x1F, /*0x00*/},
|
||||
{/*0x00, 0x00,*/ 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, /*0x00,*/ /*0x00, 0x00,*/ 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, /*0x00*/}
|
||||
};
|
||||
#endif
|
||||
/*
|
||||
@@ -279,9 +283,9 @@ const uint8_t gFontSmallDigits[11][7] =
|
||||
{0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00} // '-'
|
||||
};
|
||||
*/
|
||||
const uint8_t gFontSmall[95][6] =
|
||||
const uint8_t gFontSmall[95-1][6] =
|
||||
{
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ' '
|
||||
// {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // ' '
|
||||
{0x00, 0x00, 0x5E, 0x00, 0x00, 0x00}, // '!'
|
||||
{0x00, 0x06, 0x00, 0x06, 0x00, 0x00}, // '"'
|
||||
{0x14, 0x3E, 0x14, 0x3E, 0x14, 0x00}, // '#'
|
||||
@@ -379,9 +383,9 @@ const uint8_t gFontSmall[95][6] =
|
||||
};
|
||||
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
const uint8_t gFontSmallBold[95][6] =
|
||||
const uint8_t gFontSmallBold[95 - 1][6] =
|
||||
{
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
// {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x5E, 0x5E, 0x00, 0x00},
|
||||
{0x06, 0x06, 0x00, 0x06, 0x06, 0x00},
|
||||
{0x14, 0x3E, 0x14, 0x3E, 0x14, 0x00},
|
||||
@@ -480,7 +484,7 @@ const uint8_t gFontSmall[95][6] =
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SPECTRUM
|
||||
const uint8_t gFont3x5[160][3] =
|
||||
const uint8_t gFont3x5[][3] =
|
||||
{
|
||||
{0x00, 0x00, 0x00}, // 32 - space
|
||||
{0x00, 0x17, 0x00}, // 33 - exclam
|
||||
@@ -577,70 +581,74 @@ const uint8_t gFontSmall[95][6] =
|
||||
{0x00, 0x1b, 0x00}, // 124 - bar
|
||||
{0x11, 0x1b, 0x04}, // 125 - braceright
|
||||
{0x02, 0x03, 0x01}, // 126 - asciitilde
|
||||
{0x00, 0x00, 0x00}, // 127 - empty
|
||||
{0x00, 0x00, 0x00}, // 128 - empty
|
||||
{0x00, 0x00, 0x00}, // 129 - empty
|
||||
{0x00, 0x00, 0x00}, // 130 - empty
|
||||
{0x00, 0x00, 0x00}, // 131 - empty
|
||||
{0x00, 0x00, 0x00}, // 132 - empty
|
||||
{0x00, 0x00, 0x00}, // 133 - empty
|
||||
{0x00, 0x00, 0x00}, // 134 - empty
|
||||
{0x00, 0x00, 0x00}, // 135 - empty
|
||||
{0x00, 0x00, 0x00}, // 136 - empty
|
||||
{0x00, 0x00, 0x00}, // 137 - empty
|
||||
{0x00, 0x00, 0x00}, // 138 - empty
|
||||
{0x00, 0x00, 0x00}, // 139 - empty
|
||||
{0x00, 0x00, 0x00}, // 140 - empty
|
||||
{0x00, 0x00, 0x00}, // 141 - empty
|
||||
{0x00, 0x00, 0x00}, // 142 - empty
|
||||
{0x00, 0x00, 0x00}, // 143 - empty
|
||||
{0x00, 0x00, 0x00}, // 144 - empty
|
||||
{0x00, 0x00, 0x00}, // 145 - empty
|
||||
{0x00, 0x00, 0x00}, // 146 - empty
|
||||
{0x00, 0x00, 0x00}, // 147 - empty
|
||||
{0x00, 0x00, 0x00}, // 148 - empty
|
||||
{0x00, 0x00, 0x00}, // 149 - empty
|
||||
{0x00, 0x00, 0x00}, // 150 - empty
|
||||
{0x00, 0x00, 0x00}, // 151 - empty
|
||||
{0x00, 0x00, 0x00}, // 152 - empty
|
||||
{0x00, 0x00, 0x00}, // 153 - empty
|
||||
{0x00, 0x00, 0x00}, // 154 - empty
|
||||
{0x00, 0x00, 0x00}, // 155 - empty
|
||||
{0x00, 0x00, 0x00}, // 156 - empty
|
||||
{0x00, 0x00, 0x00}, // 157 - empty
|
||||
{0x00, 0x00, 0x00}, // 158 - empty
|
||||
{0x00, 0x00, 0x00}, // 159 - empty
|
||||
{0x00, 0x00, 0x00}, // 160 - empty
|
||||
{0x00, 0x1d, 0x00}, // 161 - exclamdown
|
||||
{0x0e, 0x1b, 0x0a}, // 162 - cent
|
||||
{0x14, 0x1f, 0x15}, // 163 - sterling
|
||||
{0x15, 0x0e, 0x15}, // 164 - currency
|
||||
{0x0b, 0x1c, 0x0b}, // 165 - yen
|
||||
{0x00, 0x1b, 0x00}, // 166 - brokenbar
|
||||
{0x14, 0x1b, 0x05}, // 167 - section
|
||||
{0x01, 0x00, 0x01}, // 168 - dieresis
|
||||
{0x02, 0x05, 0x05}, // 169 - copyright
|
||||
{0x16, 0x15, 0x17}, // 170 - ordfeminine
|
||||
{0x02, 0x05, 0x00}, // 171 - guillemotleft
|
||||
{0x02, 0x02, 0x06}, // 172 - logicalnot
|
||||
{0x04, 0x04, 0x00}, // 173 - softhyphen
|
||||
{0x07, 0x03, 0x04}, // 174 - registered
|
||||
{0x01, 0x01, 0x01}, // 175 - macron
|
||||
{0x02, 0x05, 0x02}, // 176 - degree
|
||||
{0x12, 0x17, 0x12}, // 177 - plusminus
|
||||
{0x01, 0x07, 0x04}, // 178 - twosuperior
|
||||
{0x05, 0x07, 0x07}, // 179 - threesuperior
|
||||
{0x00, 0x02, 0x01}, // 180 - acute
|
||||
{0x1f, 0x08, 0x07}, // 181 - mu
|
||||
{0x02, 0x1d, 0x1f}, // 182 - paragraph
|
||||
{0x0e, 0x0e, 0x0e}, // 183 - periodcentered
|
||||
{0x10, 0x14, 0x08}, // 184 - cedilla
|
||||
{0x00, 0x07, 0x00}, // 185 - onesuperior
|
||||
{0x12, 0x15, 0x12}, // 186 - ordmasculine
|
||||
{0x00, 0x05, 0x02}, // 187 - guillemotright
|
||||
{0x03, 0x08, 0x18}, // 188 - onequarter
|
||||
{0x0b, 0x18, 0x10}, // 189 - onehalf
|
||||
{0x03, 0x0b, 0x18}, // 190 - threequarters
|
||||
{0x18, 0x15, 0x10}, // 191 - questiondown
|
||||
|
||||
{0x12, 0x17, 0x12}, // 127 - plusminus
|
||||
|
||||
|
||||
// {0x00, 0x00, 0x00}, // 127 - empty
|
||||
// {0x00, 0x00, 0x00}, // 128 - empty
|
||||
// {0x00, 0x00, 0x00}, // 129 - empty
|
||||
// {0x00, 0x00, 0x00}, // 130 - empty
|
||||
// {0x00, 0x00, 0x00}, // 131 - empty
|
||||
// {0x00, 0x00, 0x00}, // 132 - empty
|
||||
// {0x00, 0x00, 0x00}, // 133 - empty
|
||||
// {0x00, 0x00, 0x00}, // 134 - empty
|
||||
// {0x00, 0x00, 0x00}, // 135 - empty
|
||||
// {0x00, 0x00, 0x00}, // 136 - empty
|
||||
// {0x00, 0x00, 0x00}, // 137 - empty
|
||||
// {0x00, 0x00, 0x00}, // 138 - empty
|
||||
// {0x00, 0x00, 0x00}, // 139 - empty
|
||||
// {0x00, 0x00, 0x00}, // 140 - empty
|
||||
// {0x00, 0x00, 0x00}, // 141 - empty
|
||||
// {0x00, 0x00, 0x00}, // 142 - empty
|
||||
// {0x00, 0x00, 0x00}, // 143 - empty
|
||||
// {0x00, 0x00, 0x00}, // 144 - empty
|
||||
// {0x00, 0x00, 0x00}, // 145 - empty
|
||||
// {0x00, 0x00, 0x00}, // 146 - empty
|
||||
// {0x00, 0x00, 0x00}, // 147 - empty
|
||||
// {0x00, 0x00, 0x00}, // 148 - empty
|
||||
// {0x00, 0x00, 0x00}, // 149 - empty
|
||||
// {0x00, 0x00, 0x00}, // 150 - empty
|
||||
// {0x00, 0x00, 0x00}, // 151 - empty
|
||||
// {0x00, 0x00, 0x00}, // 152 - empty
|
||||
// {0x00, 0x00, 0x00}, // 153 - empty
|
||||
// {0x00, 0x00, 0x00}, // 154 - empty
|
||||
// {0x00, 0x00, 0x00}, // 155 - empty
|
||||
// {0x00, 0x00, 0x00}, // 156 - empty
|
||||
// {0x00, 0x00, 0x00}, // 157 - empty
|
||||
// {0x00, 0x00, 0x00}, // 158 - empty
|
||||
// {0x00, 0x00, 0x00}, // 159 - empty
|
||||
// {0x00, 0x00, 0x00}, // 160 - empty
|
||||
// {0x00, 0x1d, 0x00}, // 161 - exclamdown
|
||||
// {0x0e, 0x1b, 0x0a}, // 162 - cent
|
||||
// {0x14, 0x1f, 0x15}, // 163 - sterling
|
||||
// {0x15, 0x0e, 0x15}, // 164 - currency
|
||||
// {0x0b, 0x1c, 0x0b}, // 165 - yen
|
||||
// {0x00, 0x1b, 0x00}, // 166 - brokenbar
|
||||
// {0x14, 0x1b, 0x05}, // 167 - section
|
||||
// {0x01, 0x00, 0x01}, // 168 - dieresis
|
||||
// {0x02, 0x05, 0x05}, // 169 - copyright
|
||||
// {0x16, 0x15, 0x17}, // 170 - ordfeminine
|
||||
// {0x02, 0x05, 0x00}, // 171 - guillemotleft
|
||||
// {0x02, 0x02, 0x06}, // 172 - logicalnot
|
||||
// {0x04, 0x04, 0x00}, // 173 - softhyphen
|
||||
// {0x07, 0x03, 0x04}, // 174 - registered
|
||||
// {0x01, 0x01, 0x01}, // 175 - macron
|
||||
// {0x02, 0x05, 0x02}, // 176 - degree
|
||||
// {0x12, 0x17, 0x12}, // 177 - plusminus
|
||||
// {0x01, 0x07, 0x04}, // 178 - twosuperior
|
||||
// {0x05, 0x07, 0x07}, // 179 - threesuperior
|
||||
// {0x00, 0x02, 0x01}, // 180 - acute
|
||||
// {0x1f, 0x08, 0x07}, // 181 - mu
|
||||
// {0x02, 0x1d, 0x1f}, // 182 - paragraph
|
||||
// {0x0e, 0x0e, 0x0e}, // 183 - periodcentered
|
||||
// {0x10, 0x14, 0x08}, // 184 - cedilla
|
||||
// {0x00, 0x07, 0x00}, // 185 - onesuperior
|
||||
// {0x12, 0x15, 0x12}, // 186 - ordmasculine
|
||||
// {0x00, 0x05, 0x02}, // 187 - guillemotright
|
||||
// {0x03, 0x08, 0x18}, // 188 - onequarter
|
||||
// {0x0b, 0x18, 0x10}, // 189 - onehalf
|
||||
// {0x03, 0x0b, 0x18}, // 190 - threequarters
|
||||
// {0x18, 0x15, 0x10}, // 191 - questiondown
|
||||
};
|
||||
#endif
|
||||
|
||||
13
font.h
13
font.h
@@ -19,14 +19,13 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
//extern const uint8_t gFontBig[95][16];
|
||||
extern const uint8_t gFontBig[95][15];
|
||||
extern const uint8_t gFontBigDigits[11][26];
|
||||
//extern const uint8_t gFontSmallDigits[11][7];
|
||||
extern const uint8_t gFont3x5[160][3];
|
||||
extern const uint8_t gFontSmall[95][6];
|
||||
|
||||
extern const uint8_t gFontBig[95 - 1][16 - 2];
|
||||
extern const uint8_t gFontBigDigits[11][26 - 6];
|
||||
extern const uint8_t gFont3x5[96][3];
|
||||
extern const uint8_t gFontSmall[95 - 1][6];
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
extern const uint8_t gFontSmallBold[95][6];
|
||||
extern const uint8_t gFontSmallBold[95 - 1][6];
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -145,7 +145,7 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
|
||||
BK4819_DisableVox();
|
||||
BK4819_Sleep();
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28, false);
|
||||
|
||||
gUpdateStatus = true;
|
||||
|
||||
@@ -204,7 +204,7 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
|
||||
RADIO_SetTxParameters();
|
||||
|
||||
// turn the RED LED on
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_RED, true);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, true);
|
||||
|
||||
DTMF_Reply();
|
||||
|
||||
@@ -237,7 +237,8 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
|
||||
else
|
||||
BK4819_DisableScramble();
|
||||
|
||||
if (gSetting_backlight_on_tx_rx == 1 || gSetting_backlight_on_tx_rx == 3)
|
||||
if (gSetting_backlight_on_tx_rx == BACKLIGHT_ON_TR_TX ||
|
||||
gSetting_backlight_on_tx_rx == BACKLIGHT_ON_TR_TXRX)
|
||||
BACKLIGHT_TurnOn();
|
||||
|
||||
break;
|
||||
|
||||
@@ -86,27 +86,16 @@ void BATTERY_GetReadings(const bool bDisplayBatteryLevel)
|
||||
|
||||
gBatteryDisplayLevel = 0;
|
||||
|
||||
if (gBatteryCalibration[5] < Voltage)
|
||||
gBatteryDisplayLevel = 6;
|
||||
else
|
||||
if (gBatteryCalibration[4] < Voltage)
|
||||
gBatteryDisplayLevel = 5;
|
||||
else
|
||||
if (gBatteryCalibration[3] < Voltage)
|
||||
gBatteryDisplayLevel = 4;
|
||||
else
|
||||
if (gBatteryCalibration[2] < Voltage)
|
||||
gBatteryDisplayLevel = 3;
|
||||
else
|
||||
if (gBatteryCalibration[1] < Voltage)
|
||||
gBatteryDisplayLevel = 2;
|
||||
else
|
||||
if (gBatteryCalibration[0] < Voltage)
|
||||
gBatteryDisplayLevel = 1;
|
||||
for(uint8_t i = 6; i > 0; i--){
|
||||
if (Voltage > gBatteryCalibration[i-1]) {
|
||||
gBatteryDisplayLevel = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
gBatteryVoltageAverage = (Voltage * 760) / gBatteryCalibration[3];
|
||||
|
||||
if ((gScreenToDisplay == DISPLAY_MENU) && gMenuCursor == MENU_VOL)
|
||||
if ((gScreenToDisplay == DISPLAY_MENU) && GetCurrentMenuId() == MENU_VOL)
|
||||
gUpdateDisplay = true;
|
||||
|
||||
if (gBatteryCurrent < 501)
|
||||
|
||||
@@ -84,6 +84,7 @@ void BOOT_ProcessMode(BOOT_Mode_t Mode)
|
||||
gEeprom.KEY_1_LONG_PRESS_ACTION = ACTION_OPT_NONE;
|
||||
gEeprom.KEY_2_SHORT_PRESS_ACTION = ACTION_OPT_NONE;
|
||||
gEeprom.KEY_2_LONG_PRESS_ACTION = ACTION_OPT_NONE;
|
||||
gEeprom.KEY_M_LONG_PRESS_ACTION = ACTION_OPT_NONE;
|
||||
|
||||
RADIO_InitInfo(gRxVfo, FREQ_CHANNEL_LAST - 1, 41002500);
|
||||
|
||||
|
||||
58
main.c
58
main.c
@@ -84,7 +84,7 @@ void Main(void)
|
||||
|
||||
BOARD_EEPROM_Init();
|
||||
|
||||
BOARD_EEPROM_LoadMoreSettings();
|
||||
BOARD_EEPROM_LoadCalibration();
|
||||
|
||||
RADIO_ConfigureChannel(0, VFO_CONFIGURE_RELOAD);
|
||||
RADIO_ConfigureChannel(1, VFO_CONFIGURE_RELOAD);
|
||||
@@ -103,26 +103,21 @@ void Main(void)
|
||||
#endif
|
||||
|
||||
BootMode = BOOT_GetMode();
|
||||
|
||||
// count the number of menu items
|
||||
gMenuListCount = 0;
|
||||
while (MenuList[gMenuListCount].name[0] != '\0')
|
||||
gMenuListCount++;
|
||||
|
||||
if (BootMode == BOOT_MODE_F_LOCK)
|
||||
{
|
||||
gF_LOCK = true; // flag to say include the hidden menu items
|
||||
}
|
||||
else
|
||||
{ // hide the hidden menu items
|
||||
|
||||
gMenuListCount -= 9;
|
||||
// count the number of menu items
|
||||
gMenuListCount = 0;
|
||||
while (MenuList[gMenuListCount].name[0] != '\0') {
|
||||
if(!gF_LOCK && MenuList[gMenuListCount].menu_id == FIRST_HIDDEN_MENU_ITEM)
|
||||
break;
|
||||
|
||||
#ifndef ENABLE_F_CAL_MENU
|
||||
gMenuListCount++;
|
||||
#endif
|
||||
gMenuListCount++;
|
||||
}
|
||||
|
||||
|
||||
// wait for user to release all butts before moving on
|
||||
if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) ||
|
||||
KEYBOARD_Poll() != KEY_INVALID ||
|
||||
@@ -167,21 +162,21 @@ void Main(void)
|
||||
boot_counter_10ms = 0;
|
||||
break;
|
||||
}
|
||||
#ifdef ENABLE_BOOT_BEEPS
|
||||
if ((boot_counter_10ms % 25) == 0)
|
||||
AUDIO_PlayBeep(BEEP_880HZ_40MS_OPTIONAL);
|
||||
#endif
|
||||
#ifdef ENABLE_BOOT_BEEPS
|
||||
if ((boot_counter_10ms % 25) == 0)
|
||||
AUDIO_PlayBeep(BEEP_880HZ_40MS_OPTIONAL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_PWRON_PASSWORD
|
||||
if (gEeprom.POWER_ON_PASSWORD < 1000000)
|
||||
{
|
||||
bIsInLockScreen = true;
|
||||
UI_DisplayLock();
|
||||
bIsInLockScreen = false;
|
||||
}
|
||||
#endif
|
||||
#ifdef ENABLE_PWRON_PASSWORD
|
||||
if (gEeprom.POWER_ON_PASSWORD < 1000000)
|
||||
{
|
||||
bIsInLockScreen = true;
|
||||
UI_DisplayLock();
|
||||
bIsInLockScreen = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOT_ProcessMode(BootMode);
|
||||
|
||||
@@ -189,7 +184,7 @@ void Main(void)
|
||||
|
||||
gUpdateStatus = true;
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
#ifdef ENABLE_VOICE
|
||||
{
|
||||
uint8_t Channel;
|
||||
|
||||
@@ -201,17 +196,16 @@ void Main(void)
|
||||
AUDIO_SetVoiceID(1, VOICE_ID_CHANNEL_MODE);
|
||||
AUDIO_SetDigitVoice(2, Channel + 1);
|
||||
}
|
||||
else
|
||||
if (IS_FREQ_CHANNEL(Channel))
|
||||
else if (IS_FREQ_CHANNEL(Channel))
|
||||
AUDIO_SetVoiceID(1, VOICE_ID_FREQUENCY_MODE);
|
||||
|
||||
AUDIO_PlaySingleVoice(0);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
RADIO_ConfigureNOAA();
|
||||
#endif
|
||||
#ifdef ENABLE_NOAA
|
||||
RADIO_ConfigureNOAA();
|
||||
#endif
|
||||
|
||||
// ******************
|
||||
}
|
||||
|
||||
88
misc.c
88
misc.c
@@ -19,12 +19,13 @@
|
||||
#include "misc.h"
|
||||
#include "settings.h"
|
||||
|
||||
const uint8_t fm_resume_countdown_500ms = 2500 / 500; // 2.5 seconds
|
||||
const uint8_t fm_radio_countdown_500ms = 2000 / 500; // 2 seconds
|
||||
const uint16_t fm_play_countdown_scan_10ms = 100 / 10; // 100ms
|
||||
const uint16_t fm_play_countdown_noscan_10ms = 1200 / 10; // 1.2 seconds
|
||||
const uint16_t fm_restore_countdown_10ms = 5000 / 10; // 5 seconds
|
||||
|
||||
const uint8_t vfo_state_resume_countdown_500ms = 2500 / 500; // 2.5 seconds
|
||||
|
||||
const uint8_t menu_timeout_500ms = 20000 / 500; // 20 seconds
|
||||
const uint16_t menu_timeout_long_500ms = 120000 / 500; // 2 minutes
|
||||
|
||||
@@ -72,9 +73,6 @@ const uint16_t NOAA_countdown_10ms = 5000 / 10; // 5 seconds
|
||||
const uint16_t NOAA_countdown_2_10ms = 500 / 10; // 500ms
|
||||
const uint16_t NOAA_countdown_3_10ms = 200 / 10; // 200ms
|
||||
|
||||
//const uint16_t gMax_bat_v = 840; // 8.4V
|
||||
//const uint16_t gMin_bat_v = 660; // 6.6V
|
||||
|
||||
const uint32_t gDefaultAesKey[4] = {0x4AA5CC60, 0x0312CC5F, 0xFFD2DABB, 0x6BBA7F92};
|
||||
|
||||
const uint8_t gMicGain_dB2[5] = {3, 8, 16, 24, 31};
|
||||
@@ -109,12 +107,7 @@ bool bHasCustomAesKey;
|
||||
uint32_t gChallenge[4];
|
||||
uint8_t gTryCount;
|
||||
|
||||
uint8_t gEEPROM_1EC0_0[8];
|
||||
uint8_t gEEPROM_1EC0_1[8];
|
||||
uint8_t gEEPROM_1EC0_2[8];
|
||||
uint8_t gEEPROM_1EC0_3[8];
|
||||
|
||||
uint16_t gEEPROM_RSSI_CALIB[2][4];
|
||||
uint16_t gEEPROM_RSSI_CALIB[7][4];
|
||||
|
||||
uint16_t gEEPROM_1F8A;
|
||||
uint16_t gEEPROM_1F8C;
|
||||
@@ -129,7 +122,6 @@ volatile bool gSchedulePowerSave;
|
||||
volatile bool gScheduleDualWatch = true;
|
||||
|
||||
volatile uint16_t gDualWatchCountdown_10ms;
|
||||
volatile bool gDualWatchCountdownExpired = true;
|
||||
bool gDualWatchActive = false;
|
||||
|
||||
volatile uint8_t gSerialConfigCountDown_500ms;
|
||||
@@ -141,6 +133,8 @@ volatile bool gTxTimeoutReached;
|
||||
|
||||
volatile uint16_t gTailNoteEliminationCountdown_10ms;
|
||||
|
||||
volatile uint8_t gVFOStateResumeCountdown_500ms;
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
volatile uint16_t gNOAA_Countdown_10ms;
|
||||
#endif
|
||||
@@ -207,7 +201,6 @@ uint16_t gLowBatteryCountdown;
|
||||
uint8_t gNextMrChannel;
|
||||
ReceptionMode_t gRxReceptionMode;
|
||||
|
||||
uint8_t gRestoreMrChannel;
|
||||
enum scan_next_chan_t gCurrentScanList;
|
||||
uint32_t gRestoreFrequency;
|
||||
|
||||
@@ -260,66 +253,7 @@ int16_t gCurrentRSSI[2] = {0, 0}; // now one per VFO
|
||||
|
||||
uint8_t gIsLocked = 0xFF;
|
||||
|
||||
unsigned int get_rx_VFO(void)
|
||||
{
|
||||
unsigned int rx_vfo = gEeprom.TX_VFO;
|
||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_B)
|
||||
rx_vfo = 0;
|
||||
else
|
||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_A)
|
||||
rx_vfo = 1;
|
||||
else
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_B)
|
||||
rx_vfo = 1;
|
||||
else
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_A)
|
||||
rx_vfo = 0;
|
||||
return rx_vfo;
|
||||
}
|
||||
|
||||
unsigned int get_tx_VFO(void)
|
||||
{
|
||||
unsigned int tx_vfo = gEeprom.TX_VFO;
|
||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_B)
|
||||
tx_vfo = 1;
|
||||
else
|
||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_CHAN_A)
|
||||
tx_vfo = 0;
|
||||
else
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_B)
|
||||
tx_vfo = 1;
|
||||
else
|
||||
if (gEeprom.DUAL_WATCH == DUAL_WATCH_CHAN_A)
|
||||
tx_vfo = 0;
|
||||
return tx_vfo;
|
||||
}
|
||||
|
||||
void NUMBER_Get(char *pDigits, uint32_t *pInteger)
|
||||
{
|
||||
unsigned int i;
|
||||
uint32_t Multiplier = 10000000;
|
||||
uint32_t Value = 0;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
if (pDigits[i] > 9)
|
||||
break;
|
||||
Value += pDigits[i] * Multiplier;
|
||||
Multiplier /= 10U;
|
||||
}
|
||||
*pInteger = Value;
|
||||
}
|
||||
|
||||
void NUMBER_ToDigits(uint32_t Value, char *pDigits)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
const uint32_t Result = Value / 10U;
|
||||
pDigits[7 - i] = Value - (Result * 10U);
|
||||
Value = Result;
|
||||
}
|
||||
pDigits[8] = 0;
|
||||
}
|
||||
|
||||
int32_t NUMBER_AddWithWraparound(int32_t Base, int32_t Add, int32_t LowerLimit, int32_t UpperLimit)
|
||||
{
|
||||
@@ -333,3 +267,15 @@ int32_t NUMBER_AddWithWraparound(int32_t Base, int32_t Add, int32_t LowerLimit,
|
||||
|
||||
return Base;
|
||||
}
|
||||
|
||||
unsigned long StrToUL(const char * str)
|
||||
{
|
||||
unsigned long ul = 0;
|
||||
for(uint8_t i = 0; i < strlen(str); i++){
|
||||
char c = str[i];
|
||||
if(c < '0' || c > '9')
|
||||
break;
|
||||
ul = ul * 10 + (uint8_t)(c-'0');
|
||||
}
|
||||
return ul;
|
||||
}
|
||||
34
misc.h
34
misc.h
@@ -32,12 +32,12 @@
|
||||
#define MIN(a, b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
|
||||
#endif
|
||||
|
||||
#define IS_MR_CHANNEL(x) ((x) >= MR_CHANNEL_FIRST && (x) <= MR_CHANNEL_LAST)
|
||||
#define IS_MR_CHANNEL(x) ((x) <= MR_CHANNEL_LAST)
|
||||
#define IS_FREQ_CHANNEL(x) ((x) >= FREQ_CHANNEL_FIRST && (x) <= FREQ_CHANNEL_LAST)
|
||||
#define IS_VALID_CHANNEL(x) ((x) < LAST_CHANNEL)
|
||||
|
||||
#define IS_NOAA_CHANNEL(x) ((x) >= NOAA_CHANNEL_FIRST && (x) <= NOAA_CHANNEL_LAST)
|
||||
#define IS_NOT_NOAA_CHANNEL(x) ((x) >= MR_CHANNEL_FIRST && (x) <= FREQ_CHANNEL_LAST)
|
||||
#define IS_NOT_NOAA_CHANNEL(x) ((x) <= FREQ_CHANNEL_LAST)
|
||||
|
||||
enum {
|
||||
MR_CHANNEL_FIRST = 0,
|
||||
@@ -52,7 +52,8 @@ enum {
|
||||
enum {
|
||||
FLASHLIGHT_OFF = 0,
|
||||
FLASHLIGHT_ON,
|
||||
FLASHLIGHT_BLINK
|
||||
FLASHLIGHT_BLINK,
|
||||
FLASHLIGHT_SOS
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -93,12 +94,20 @@ enum scan_next_chan_t {
|
||||
};
|
||||
typedef enum scan_next_chan_t scan_next_chan_t;
|
||||
|
||||
extern const uint8_t fm_resume_countdown_500ms;
|
||||
enum BacklightOnRxTx_t {
|
||||
BACKLIGHT_ON_TR_OFF,
|
||||
BACKLIGHT_ON_TR_TX,
|
||||
BACKLIGHT_ON_TR_RX,
|
||||
BACKLIGHT_ON_TR_TXRX
|
||||
};
|
||||
|
||||
extern const uint8_t fm_radio_countdown_500ms;
|
||||
extern const uint16_t fm_play_countdown_scan_10ms;
|
||||
extern const uint16_t fm_play_countdown_noscan_10ms;
|
||||
extern const uint16_t fm_restore_countdown_10ms;
|
||||
|
||||
extern const uint8_t vfo_state_resume_countdown_500ms;
|
||||
|
||||
extern const uint8_t menu_timeout_500ms;
|
||||
extern const uint16_t menu_timeout_long_500ms;
|
||||
|
||||
@@ -182,12 +191,7 @@ extern bool bHasCustomAesKey;
|
||||
extern uint32_t gChallenge[4];
|
||||
extern uint8_t gTryCount;
|
||||
|
||||
extern uint8_t gEEPROM_1EC0_0[8];
|
||||
extern uint8_t gEEPROM_1EC0_1[8];
|
||||
extern uint8_t gEEPROM_1EC0_2[8];
|
||||
extern uint8_t gEEPROM_1EC0_3[8];
|
||||
|
||||
extern uint16_t gEEPROM_RSSI_CALIB[2][4];
|
||||
extern uint16_t gEEPROM_RSSI_CALIB[7][4];
|
||||
|
||||
extern uint16_t gEEPROM_1F8A;
|
||||
extern uint16_t gEEPROM_1F8C;
|
||||
@@ -202,7 +206,6 @@ extern volatile bool gSchedulePowerSave;
|
||||
extern volatile bool gScheduleDualWatch;
|
||||
|
||||
extern volatile uint16_t gDualWatchCountdown_10ms;
|
||||
extern volatile bool gDualWatchCountdownExpired;
|
||||
extern bool gDualWatchActive;
|
||||
|
||||
extern volatile uint8_t gSerialConfigCountDown_500ms;
|
||||
@@ -280,10 +283,10 @@ extern uint16_t gLowBatteryCountdown;
|
||||
extern uint8_t gNextMrChannel;
|
||||
extern ReceptionMode_t gRxReceptionMode;
|
||||
|
||||
extern uint8_t gRestoreMrChannel;
|
||||
extern scan_next_chan_t gCurrentScanList;
|
||||
extern uint32_t gRestoreFrequency;
|
||||
|
||||
//TRUE when dual watch is momentarly suspended and RX_VFO is locked to either last TX or RX
|
||||
extern bool gRxVfoIsActive;
|
||||
extern uint8_t gAlarmToneCounter;
|
||||
extern uint16_t gAlarmRunningCounter;
|
||||
@@ -319,6 +322,7 @@ extern volatile bool gNextTimeslice40ms;
|
||||
extern volatile bool gScheduleNOAA;
|
||||
#endif
|
||||
extern volatile bool gFlagTailNoteEliminationComplete;
|
||||
extern volatile uint8_t gVFOStateResumeCountdown_500ms;
|
||||
#ifdef ENABLE_FMRADIO
|
||||
extern volatile bool gScheduleFM;
|
||||
#endif
|
||||
@@ -326,12 +330,8 @@ extern int16_t gCurrentRSSI[2]; // now one per VFO
|
||||
extern uint8_t gIsLocked;
|
||||
extern volatile uint8_t boot_counter_10ms;
|
||||
|
||||
unsigned int get_tx_VFO(void);
|
||||
unsigned int get_rx_VFO(void);
|
||||
|
||||
void NUMBER_Get(char *pDigits, uint32_t *pInteger);
|
||||
void NUMBER_ToDigits(uint32_t Value, char *pDigits);
|
||||
int32_t NUMBER_AddWithWraparound(int32_t Base, int32_t Add, int32_t LowerLimit, int32_t UpperLimit);
|
||||
unsigned long StrToUL(const char * str);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
70
radio.c
70
radio.c
@@ -161,20 +161,20 @@ void RADIO_ConfigureChannel(const unsigned int VFO, const unsigned int configure
|
||||
|
||||
if (IS_VALID_CHANNEL(Channel))
|
||||
{
|
||||
#ifdef ENABLE_NOAA
|
||||
if (Channel >= NOAA_CHANNEL_FIRST)
|
||||
{
|
||||
RADIO_InitInfo(pRadio, gEeprom.ScreenChannel[VFO], NoaaFrequencyTable[Channel - NOAA_CHANNEL_FIRST]);
|
||||
#ifdef ENABLE_NOAA
|
||||
if (Channel >= NOAA_CHANNEL_FIRST)
|
||||
{
|
||||
RADIO_InitInfo(pRadio, gEeprom.ScreenChannel[VFO], NoaaFrequencyTable[Channel - NOAA_CHANNEL_FIRST]);
|
||||
|
||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF)
|
||||
return;
|
||||
|
||||
gEeprom.CROSS_BAND_RX_TX = CROSS_BAND_OFF;
|
||||
|
||||
gUpdateStatus = true;
|
||||
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
gEeprom.CROSS_BAND_RX_TX = CROSS_BAND_OFF;
|
||||
|
||||
gUpdateStatus = true;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Channel <= MR_CHANNEL_LAST)
|
||||
{
|
||||
@@ -555,13 +555,17 @@ void RADIO_ApplyOffset(VFO_Info_t *pInfo)
|
||||
|
||||
static void RADIO_SelectCurrentVfo(void)
|
||||
{
|
||||
gCurrentVfo = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gRxVfo : &gEeprom.VfoInfo[gEeprom.TX_VFO];
|
||||
// if crossband is active the gCurrentVfo is gTxVfo (gTxVfo/TX_VFO is only ever changed by the user)
|
||||
// otherwise it is set to gRxVfo
|
||||
// so in the end gCurrentVfo is equal to gTxVfo unless dual watch changes it on incomming transmition (again, this can only happen when XB off)
|
||||
// note: it is called only in certain situations so could not by up-to-date
|
||||
gCurrentVfo = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gRxVfo : gTxVfo;
|
||||
}
|
||||
|
||||
void RADIO_SelectVfos(void)
|
||||
{
|
||||
gEeprom.TX_VFO = get_tx_VFO();
|
||||
gEeprom.RX_VFO = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.TX_VFO : (gEeprom.TX_VFO + 1) & 1u;
|
||||
// if crossband is used then RX_VFO is the opposite to the TX_VFO
|
||||
gEeprom.RX_VFO = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.TX_VFO : !gEeprom.TX_VFO;
|
||||
|
||||
gTxVfo = &gEeprom.VfoInfo[gEeprom.TX_VFO];
|
||||
gRxVfo = &gEeprom.VfoInfo[gEeprom.RX_VFO];
|
||||
@@ -579,15 +583,13 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
||||
|
||||
gEnableSpeaker = false;
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28_GREEN, false);
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, false);
|
||||
|
||||
switch (Bandwidth)
|
||||
{
|
||||
default:
|
||||
Bandwidth = BK4819_FILTER_BW_WIDE;
|
||||
[[fallthrough]];
|
||||
case BK4819_FILTER_BW_WIDE:
|
||||
case BK4819_FILTER_BW_NARROW:
|
||||
#ifdef ENABLE_AM_FIX
|
||||
@@ -599,13 +601,11 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29_RED, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, false);
|
||||
|
||||
BK4819_SetupPowerAmplifier(0, 0);
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1, false);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29, false);
|
||||
|
||||
while (1)
|
||||
{
|
||||
@@ -639,7 +639,7 @@ void RADIO_SetupRegisters(bool bSwitchToFunction0)
|
||||
BK4819_PickRXFilterPathBasedOnFrequency(Frequency);
|
||||
|
||||
// what does this in do ?
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2, true);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28, true);
|
||||
|
||||
// AF RX Gain and DAC
|
||||
BK4819_WriteRegister(BK4819_REG_48, 0xB3A8); // 1011 00 111010 1000
|
||||
@@ -833,15 +833,13 @@ void RADIO_SetTxParameters(void)
|
||||
|
||||
gEnableSpeaker = false;
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2, false);
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO0_PIN28, false);
|
||||
|
||||
switch (Bandwidth)
|
||||
{
|
||||
default:
|
||||
Bandwidth = BK4819_FILTER_BW_WIDE;
|
||||
[[fallthrough]];
|
||||
case BK4819_FILTER_BW_WIDE:
|
||||
case BK4819_FILTER_BW_NARROW:
|
||||
#ifdef ENABLE_AM_FIX
|
||||
@@ -853,8 +851,6 @@ void RADIO_SetTxParameters(void)
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
BK4819_SetFrequency(gCurrentVfo->pTX->Frequency);
|
||||
|
||||
// TX compressor
|
||||
@@ -866,7 +862,7 @@ void RADIO_SetTxParameters(void)
|
||||
|
||||
BK4819_PickRXFilterPathBasedOnFrequency(gCurrentVfo->pTX->Frequency);
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1, true);
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO1_PIN29, true);
|
||||
|
||||
SYSTEM_DelayMs(5);
|
||||
|
||||
@@ -898,10 +894,7 @@ void RADIO_SetVfoState(VfoState_t State)
|
||||
{
|
||||
VfoState[0] = VFO_STATE_NORMAL;
|
||||
VfoState[1] = VFO_STATE_NORMAL;
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
gFM_ResumeCountdown_500ms = 0;
|
||||
#endif
|
||||
gVFOStateResumeCountdown_500ms = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -916,9 +909,7 @@ void RADIO_SetVfoState(VfoState_t State)
|
||||
VfoState[vfo] = State;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
gFM_ResumeCountdown_500ms = fm_resume_countdown_500ms;
|
||||
#endif
|
||||
gVFOStateResumeCountdown_500ms = vfo_state_resume_countdown_500ms;
|
||||
}
|
||||
|
||||
gUpdateDisplay = true;
|
||||
@@ -937,10 +928,9 @@ void RADIO_PrepareTX(void)
|
||||
if (!gRxVfoIsActive)
|
||||
{ // use the current RX vfo
|
||||
gEeprom.RX_VFO = gEeprom.TX_VFO;
|
||||
gRxVfo = &gEeprom.VfoInfo[gEeprom.TX_VFO];
|
||||
gRxVfo = gTxVfo;
|
||||
gRxVfoIsActive = true;
|
||||
}
|
||||
gCurrentVfo = gRxVfo;
|
||||
|
||||
// let the user see that DW is not active
|
||||
gDualWatchActive = false;
|
||||
|
||||
8
radio.h
8
radio.h
@@ -115,8 +115,16 @@ typedef struct VFO_Info_t
|
||||
char Name[16];
|
||||
} VFO_Info_t;
|
||||
|
||||
// Settings of the main VFO that is selected by the user
|
||||
// The pointer follows gEeprom.RX_VFO index
|
||||
extern VFO_Info_t *gTxVfo;
|
||||
|
||||
// Settings of the actual VFO that is now used for RX,
|
||||
// It is being alternated by dual watch, and flipped by crossband
|
||||
// The pointer follows gEeprom.RX_VFO
|
||||
extern VFO_Info_t *gRxVfo;
|
||||
|
||||
// Equal to gTxVfo unless dual watch changes it on incomming transmition (this can only happen when XB off and DW on)
|
||||
extern VFO_Info_t *gCurrentVfo;
|
||||
|
||||
extern DCS_CodeType_t gSelectedCodeType;
|
||||
|
||||
11
settings.c
11
settings.c
@@ -107,6 +107,7 @@ void SETTINGS_SaveSettings(void)
|
||||
EEPROM_WriteBuffer(0x0E78, State);
|
||||
|
||||
State[0] = gEeprom.BEEP_CONTROL;
|
||||
State[0] |= gEeprom.KEY_M_LONG_PRESS_ACTION << 1;
|
||||
State[1] = gEeprom.KEY_1_SHORT_PRESS_ACTION;
|
||||
State[2] = gEeprom.KEY_1_LONG_PRESS_ACTION;
|
||||
State[3] = gEeprom.KEY_2_SHORT_PRESS_ACTION;
|
||||
@@ -251,6 +252,16 @@ void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO,
|
||||
}
|
||||
}
|
||||
|
||||
void SETTINGS_SaveBatteryCalibration(const uint16_t * batteryCalibration)
|
||||
{
|
||||
uint16_t buf[4];
|
||||
EEPROM_WriteBuffer(0x1F40, batteryCalibration);
|
||||
EEPROM_ReadBuffer( 0x1F48, buf, sizeof(buf));
|
||||
buf[0] = batteryCalibration[4];
|
||||
buf[1] = batteryCalibration[5];
|
||||
EEPROM_WriteBuffer(0x1F48, buf);
|
||||
}
|
||||
|
||||
void SETTINGS_UpdateChannel(uint8_t Channel, const VFO_Info_t *pVFO, bool keep)
|
||||
{
|
||||
#ifdef ENABLE_NOAA
|
||||
|
||||
12
settings.h
12
settings.h
@@ -80,6 +80,8 @@ enum {
|
||||
ACTION_OPT_ALARM,
|
||||
ACTION_OPT_FM,
|
||||
ACTION_OPT_1750,
|
||||
ACTION_OPT_KEYLOCK,
|
||||
ACTION_OPT_A_B,
|
||||
ACTION_OPT_LEN
|
||||
};
|
||||
|
||||
@@ -121,7 +123,13 @@ typedef struct {
|
||||
#ifdef ENABLE_NOAA
|
||||
uint8_t NoaaChannel[2];
|
||||
#endif
|
||||
|
||||
// The actual VFO index (0-upper/1-lower) that is now used for RX,
|
||||
// It is being alternated by dual watch, and flipped by crossband
|
||||
uint8_t RX_VFO;
|
||||
|
||||
// The main VFO index (0-upper/1-lower) selected by the user
|
||||
//
|
||||
uint8_t TX_VFO;
|
||||
|
||||
uint8_t field7_0xa;
|
||||
@@ -218,8 +226,9 @@ typedef struct {
|
||||
uint8_t field78_0x96;
|
||||
uint8_t field79_0x97;
|
||||
|
||||
uint8_t _pad[1];
|
||||
uint8_t KEY_M_LONG_PRESS_ACTION;
|
||||
} EEPROM_Config_t;
|
||||
|
||||
extern EEPROM_Config_t gEeprom;
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
@@ -228,6 +237,7 @@ extern EEPROM_Config_t gEeprom;
|
||||
void SETTINGS_SaveVfoIndices(void);
|
||||
void SETTINGS_SaveSettings(void);
|
||||
void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO, uint8_t Mode);
|
||||
void SETTINGS_SaveBatteryCalibration(const uint16_t * batteryCalibration);
|
||||
void SETTINGS_UpdateChannel(uint8_t Channel, const VFO_Info_t *pVFO, bool keep);
|
||||
|
||||
#endif
|
||||
|
||||
17
ui/aircopy.c
17
ui/aircopy.c
@@ -44,12 +44,19 @@ void UI_DisplayAircopy(void)
|
||||
|
||||
if (gInputBoxIndex == 0)
|
||||
{
|
||||
NUMBER_ToDigits(gRxVfo->freq_config_RX.Frequency, String);
|
||||
UI_DisplayFrequency(String, 16, 2, 0, 0);
|
||||
UI_DisplaySmallDigits(2, String + 6, 97, 3, true);
|
||||
uint32_t frequency = gRxVfo->freq_config_RX.Frequency;
|
||||
sprintf(String, "%3u.%05u", frequency / 100000, frequency % 100000);
|
||||
// show the remaining 2 small frequency digits
|
||||
UI_PrintStringSmall(String + 7, 97, 0, 3);
|
||||
String[7] = 0;
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(String, 16, 2, false);
|
||||
}
|
||||
else {
|
||||
const char * ascii = INPUTBOX_GetAscii();
|
||||
sprintf(String, "%.3s.%.3s",ascii, ascii + 3);
|
||||
UI_DisplayFrequency(String, 16, 2, false);
|
||||
}
|
||||
else
|
||||
UI_DisplayFrequency(gInputBox, 16, 2, 1, 0);
|
||||
|
||||
memset(String, 0, sizeof(String));
|
||||
if (gAirCopyIsSendMode == 0)
|
||||
|
||||
43
ui/battery.c
43
ui/battery.c
@@ -24,34 +24,33 @@
|
||||
|
||||
void UI_DrawBattery(uint8_t* bitmap, uint8_t level, uint8_t blink)
|
||||
{
|
||||
memmove(bitmap, BITMAP_BatteryLevel1, sizeof(BITMAP_BatteryLevel1));
|
||||
|
||||
if (level >= 1)
|
||||
if (level < 2 && blink == 1) {
|
||||
memset(bitmap, 0, sizeof(BITMAP_BatteryLevel1));
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned int i;
|
||||
uint8_t bars = level > 0 ? level - 1 : 0;
|
||||
if(bars>4) bars = 4;
|
||||
for (i = 0; i < bars; i++)
|
||||
memmove(bitmap, BITMAP_BatteryLevel1, sizeof(BITMAP_BatteryLevel1));
|
||||
if (level > 1)
|
||||
{
|
||||
#ifndef ENABLE_REVERSE_BAT_SYMBOL
|
||||
memcpy(bitmap + sizeof(bitmap) - 4 - (i * 3), BITMAP_BatteryLevel, 2);
|
||||
#else
|
||||
memcpy(bitmap + 3 + (i * 3) + 0, BITMAP_BatteryLevel, 2);
|
||||
#endif
|
||||
unsigned int i;
|
||||
uint8_t bars = level - 1;
|
||||
if (bars > 4)
|
||||
bars = 4;
|
||||
for (i = 0; i < bars; i++)
|
||||
{
|
||||
#ifndef ENABLE_REVERSE_BAT_SYMBOL
|
||||
memcpy(bitmap + sizeof(BITMAP_BatteryLevel1) - 4 - (i * 3), BITMAP_BatteryLevel, 2);
|
||||
#else
|
||||
memcpy(bitmap + 3 + (i * 3) + 0, BITMAP_BatteryLevel, 2);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if (blink == 0)
|
||||
memset(bitmap, 0, sizeof(bitmap));
|
||||
}
|
||||
|
||||
void UI_DisplayBattery(uint8_t level, uint8_t blink)
|
||||
{
|
||||
if (gCurrentFunction != FUNCTION_TRANSMIT) {
|
||||
uint8_t bitmap[sizeof(BITMAP_BatteryLevel1)];
|
||||
|
||||
UI_DrawBattery(bitmap, level, blink);
|
||||
memmove(bitmap, BITMAP_BatteryLevel1, sizeof(BITMAP_BatteryLevel1));
|
||||
ST7565_DrawLine(LCD_WIDTH - sizeof(bitmap), 0, sizeof(bitmap), bitmap);
|
||||
}
|
||||
uint8_t bitmap[sizeof(BITMAP_BatteryLevel1)];
|
||||
UI_DrawBattery(bitmap, level, blink);
|
||||
ST7565_DrawLine(LCD_WIDTH - sizeof(bitmap), 0, sizeof(bitmap), bitmap);
|
||||
}
|
||||
|
||||
11
ui/fmradio.c
11
ui/fmradio.c
@@ -90,11 +90,14 @@ void UI_DisplayFM(void)
|
||||
{
|
||||
if (gInputBoxIndex == 0)
|
||||
{
|
||||
NUMBER_ToDigits(gEeprom.FM_FrequencyPlaying * 10000, String);
|
||||
UI_DisplayFrequency(String, 23, 4, false, true);
|
||||
sprintf(String, "%3d.%d", gEeprom.FM_FrequencyPlaying / 10, gEeprom.FM_FrequencyPlaying % 10);
|
||||
UI_DisplayFrequency(String, 32, 4, true);
|
||||
}
|
||||
else {
|
||||
const char * ascii = INPUTBOX_GetAscii();
|
||||
sprintf(String, "%.3s.%.1s",ascii, ascii + 3);
|
||||
UI_DisplayFrequency(String, 32, 4, false);
|
||||
}
|
||||
else
|
||||
UI_DisplayFrequency(gInputBox, 23, 4, true, false);
|
||||
|
||||
ST7565_BlitFullScreen();
|
||||
return;
|
||||
|
||||
140
ui/helper.c
140
ui/helper.c
@@ -72,12 +72,12 @@ void UI_PrintString(const char *pString, uint8_t Start, uint8_t End, uint8_t Lin
|
||||
|
||||
for (i = 0; i < Length; i++)
|
||||
{
|
||||
if (pString[i] >= ' ' && pString[i] < 127)
|
||||
const unsigned int ofs = (unsigned int)Start + (i * Width);
|
||||
if (pString[i] > ' ' && pString[i] < 127)
|
||||
{
|
||||
const unsigned int index = pString[i] - ' ';
|
||||
const unsigned int ofs = (unsigned int)Start + (i * Width);
|
||||
memmove(gFrameBuffer[Line + 0] + ofs, &gFontBig[index][0], 8);
|
||||
memmove(gFrameBuffer[Line + 1] + ofs, &gFontBig[index][8], 7);
|
||||
const unsigned int index = pString[i] - ' ' - 1;
|
||||
memmove(gFrameBuffer[Line + 0] + ofs, &gFontBig[index][0], 7);
|
||||
memmove(gFrameBuffer[Line + 1] + ofs, &gFontBig[index][7], 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,9 +95,9 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_
|
||||
uint8_t *pFb = gFrameBuffer[Line] + Start;
|
||||
for (i = 0; i < Length; i++)
|
||||
{
|
||||
if (pString[i] >= 32)
|
||||
if (pString[i] > ' ')
|
||||
{
|
||||
const unsigned int index = (unsigned int)pString[i] - 32;
|
||||
const unsigned int index = (unsigned int)pString[i] - ' ' - 1;
|
||||
if (index < ARRAY_SIZE(gFontSmall))
|
||||
memmove(pFb + (i * char_spacing) + 1, &gFontSmall[index], char_width);
|
||||
}
|
||||
@@ -118,9 +118,9 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_
|
||||
uint8_t *pFb = gFrameBuffer[Line] + Start;
|
||||
for (i = 0; i < Length; i++)
|
||||
{
|
||||
if (pString[i] >= 32)
|
||||
if (pString[i] > ' ')
|
||||
{
|
||||
const unsigned int index = (unsigned int)pString[i] - 32;
|
||||
const unsigned int index = (unsigned int)pString[i] - ' ' - 1;
|
||||
if (index < ARRAY_SIZE(gFontSmallBold))
|
||||
memmove(pFb + (i * char_spacing) + 1, &gFontSmallBold[index], char_width);
|
||||
}
|
||||
@@ -135,126 +135,46 @@ void UI_PrintStringSmallBuffer(const char *pString, uint8_t *buffer)
|
||||
const unsigned int char_spacing = char_width + 1;
|
||||
for (i = 0; i < strlen(pString); i++)
|
||||
{
|
||||
if (pString[i] >= 32)
|
||||
if (pString[i] > ' ')
|
||||
{
|
||||
const unsigned int index = (unsigned int)pString[i] - 32;
|
||||
const unsigned int index = (unsigned int)pString[i] - ' ' - 1;
|
||||
if (index < ARRAY_SIZE(gFontSmall))
|
||||
memmove(buffer + (i * char_spacing) + 1, &gFontSmall[index], char_width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UI_DisplayFrequency(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero, bool bFlag)
|
||||
void UI_DisplayFrequency(const char *string, uint8_t X, uint8_t Y, bool center)
|
||||
{
|
||||
const unsigned int char_width = 13;
|
||||
uint8_t *pFb0 = gFrameBuffer[Y] + X;
|
||||
uint8_t *pFb1 = pFb0 + 128;
|
||||
bool bCanDisplay = false;
|
||||
unsigned int i = 0;
|
||||
|
||||
// MHz
|
||||
while (i < 3)
|
||||
{
|
||||
const unsigned int Digit = pDigits[i++];
|
||||
if (bDisplayLeadingZero || bCanDisplay || Digit > 0)
|
||||
|
||||
uint8_t len = strlen(string);
|
||||
for(int i = 0; i < len; i++) {
|
||||
char c = string[i];
|
||||
if(c=='-') c = '9' + 1;
|
||||
if (bCanDisplay || c != ' ')
|
||||
{
|
||||
bCanDisplay = true;
|
||||
memmove(pFb0, gFontBigDigits[Digit], char_width);
|
||||
memmove(pFb1, gFontBigDigits[Digit] + char_width, char_width);
|
||||
if(c>='0' && c<='9' + 1) {
|
||||
memcpy(pFb0 + 2, gFontBigDigits[c-'0'], char_width - 3);
|
||||
memcpy(pFb1 + 2, gFontBigDigits[c-'0'] + char_width - 3, char_width - 3);
|
||||
}
|
||||
else if(c=='.') {
|
||||
*pFb1 = 0x60; pFb0++; pFb1++;
|
||||
*pFb1 = 0x60; pFb0++; pFb1++;
|
||||
*pFb1 = 0x60; pFb0++; pFb1++;
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
if (bFlag)
|
||||
{
|
||||
else if (center) {
|
||||
pFb0 -= 6;
|
||||
pFb1 -= 6;
|
||||
}
|
||||
pFb0 += char_width;
|
||||
pFb1 += char_width;
|
||||
}
|
||||
|
||||
// decimal point
|
||||
*pFb1 = 0x60; pFb0++; pFb1++;
|
||||
*pFb1 = 0x60; pFb0++; pFb1++;
|
||||
*pFb1 = 0x60; pFb0++; pFb1++;
|
||||
|
||||
// kHz
|
||||
while (i < 6)
|
||||
{
|
||||
const unsigned int Digit = pDigits[i++];
|
||||
memmove(pFb0, gFontBigDigits[Digit], char_width);
|
||||
memmove(pFb1, gFontBigDigits[Digit] + char_width, char_width);
|
||||
pFb0 += char_width;
|
||||
pFb1 += char_width;
|
||||
}
|
||||
}
|
||||
|
||||
void UI_DisplayFrequencySmall(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero)
|
||||
{
|
||||
const unsigned int char_width = ARRAY_SIZE(gFontSmall[0]);
|
||||
const unsigned int spacing = 1 + char_width;
|
||||
uint8_t *pFb = gFrameBuffer[Y] + X;
|
||||
bool bCanDisplay = false;
|
||||
unsigned int i = 0;
|
||||
|
||||
// MHz
|
||||
while (i < 3)
|
||||
{
|
||||
const unsigned int c = pDigits[i++];
|
||||
if (bDisplayLeadingZero || bCanDisplay || c > 0)
|
||||
{
|
||||
#if 0
|
||||
memmove(pFb + 1, gFontSmallDigits[c], char_width);
|
||||
#else
|
||||
const unsigned int index = (c < 10) ? '0' - 32 + c : '-' - 32;
|
||||
memmove(pFb + 1, gFontSmall[index], char_width);
|
||||
#endif
|
||||
pFb += spacing;
|
||||
bCanDisplay = true;
|
||||
}
|
||||
}
|
||||
|
||||
// decimal point
|
||||
pFb++;
|
||||
pFb++;
|
||||
*pFb++ = 0x60;
|
||||
*pFb++ = 0x60;
|
||||
pFb++;
|
||||
|
||||
// kHz
|
||||
while (i < 8)
|
||||
{
|
||||
const unsigned int c = pDigits[i++];
|
||||
#if 0
|
||||
memmove(pFb + 1, gFontSmallDigits[c], char_width);
|
||||
#else
|
||||
const unsigned int index = (c < 10) ? '0' - 32 + c : '-' - 32;
|
||||
memmove(pFb + 1, gFontSmall[index], char_width);
|
||||
#endif
|
||||
pFb += spacing;
|
||||
}
|
||||
}
|
||||
|
||||
void UI_DisplaySmallDigits(const uint8_t size, const char *str, const uint8_t x, const uint8_t y, const bool display_leading_zeros)
|
||||
{
|
||||
const unsigned int char_width = ARRAY_SIZE(gFontSmall[0]);
|
||||
const unsigned int spacing = 1 + char_width;
|
||||
bool display = display_leading_zeros;
|
||||
unsigned int xx;
|
||||
unsigned int i;
|
||||
for (i = 0, xx = x; i < size; i++)
|
||||
{
|
||||
const unsigned int c = (unsigned int)str[i];
|
||||
if (c > 0)
|
||||
display = true; // non '0'
|
||||
if (display && c < 11)
|
||||
{
|
||||
#if 0
|
||||
memmove(gFrameBuffer[y] + xx, gFontSmallDigits[c], char_width);
|
||||
#else
|
||||
const unsigned int index = (c < 10) ? '0' - 32 + c : '-' - 32;
|
||||
memmove(gFrameBuffer[y] + xx + 1, gFontSmall[index], char_width);
|
||||
#endif
|
||||
xx += spacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,9 +28,7 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_
|
||||
void UI_PrintStringSmallBold(const char *pString, uint8_t Start, uint8_t End, uint8_t Line);
|
||||
#endif
|
||||
void UI_PrintStringSmallBuffer(const char *pString, uint8_t *buffer);
|
||||
void UI_DisplayFrequency(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero, bool bFlag);
|
||||
void UI_DisplayFrequencySmall(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero);
|
||||
void UI_DisplaySmallDigits(const uint8_t size, const char *str, const uint8_t x, const uint8_t y, const bool display_leading_zeros);
|
||||
void UI_DisplayFrequency(const char *string, uint8_t X, uint8_t Y, bool center);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "ui/inputbox.h"
|
||||
|
||||
char gInputBox[8];
|
||||
char inputBoxAscii[9];
|
||||
uint8_t gInputBoxIndex;
|
||||
|
||||
void INPUTBOX_Append(const KEY_Code_t Digit)
|
||||
@@ -29,7 +30,15 @@ void INPUTBOX_Append(const KEY_Code_t Digit)
|
||||
if (gInputBoxIndex == 0)
|
||||
memset(gInputBox, 10, sizeof(gInputBox));
|
||||
|
||||
if (Digit >= KEY_0 && Digit != KEY_INVALID)
|
||||
if (Digit != KEY_INVALID)
|
||||
gInputBox[gInputBoxIndex++] = (char)(Digit - KEY_0);
|
||||
}
|
||||
|
||||
const char* INPUTBOX_GetAscii()
|
||||
{
|
||||
for(int i = 0; i < 8; i++) {
|
||||
char c = gInputBox[i];
|
||||
inputBoxAscii[i] = (c==10)? '-' : '0' + c;
|
||||
}
|
||||
return inputBoxAscii;
|
||||
}
|
||||
@@ -25,6 +25,7 @@ extern char gInputBox[8];
|
||||
extern uint8_t gInputBoxIndex;
|
||||
|
||||
void INPUTBOX_Append(const KEY_Code_t Digit);
|
||||
const char* INPUTBOX_GetAscii();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -102,10 +102,9 @@ void UI_DisplayLock(void)
|
||||
uint32_t Password;
|
||||
|
||||
gInputBoxIndex = 0;
|
||||
Password = StrToUL(INPUTBOX_GetAscii());
|
||||
|
||||
NUMBER_Get(gInputBox, &Password);
|
||||
|
||||
if ((gEeprom.POWER_ON_PASSWORD * 100) == Password)
|
||||
if ((gEeprom.POWER_ON_PASSWORD) == Password)
|
||||
{
|
||||
AUDIO_PlayBeep(BEEP_1KHZ_60MS_OPTIONAL);
|
||||
return;
|
||||
|
||||
683
ui/main.c
683
ui/main.c
@@ -14,10 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h> // abs()
|
||||
|
||||
@@ -46,244 +42,227 @@ center_line_t center_line = CENTER_LINE_NONE;
|
||||
|
||||
void UI_drawBars(uint8_t *p, const unsigned int level)
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
switch (level)
|
||||
{
|
||||
default:
|
||||
case 7: memmove(p + 20, BITMAP_AntennaLevel6, sizeof(BITMAP_AntennaLevel6));
|
||||
case 6: memmove(p + 17, BITMAP_AntennaLevel5, sizeof(BITMAP_AntennaLevel5));
|
||||
case 5: memmove(p + 14, BITMAP_AntennaLevel4, sizeof(BITMAP_AntennaLevel4));
|
||||
case 4: memmove(p + 11, BITMAP_AntennaLevel3, sizeof(BITMAP_AntennaLevel3));
|
||||
case 3: memmove(p + 8, BITMAP_AntennaLevel2, sizeof(BITMAP_AntennaLevel2));
|
||||
case 2: memmove(p + 5, BITMAP_AntennaLevel1, sizeof(BITMAP_AntennaLevel1));
|
||||
case 1: memmove(p + 0, BITMAP_Antenna, sizeof(BITMAP_Antenna));
|
||||
case 0: break;
|
||||
case 7: memmove(p + 20, BITMAP_AntennaLevel6, sizeof(BITMAP_AntennaLevel6)); [[fallthrough]];
|
||||
case 6: memmove(p + 17, BITMAP_AntennaLevel5, sizeof(BITMAP_AntennaLevel5)); [[fallthrough]];
|
||||
case 5: memmove(p + 14, BITMAP_AntennaLevel4, sizeof(BITMAP_AntennaLevel4)); [[fallthrough]];
|
||||
case 4: memmove(p + 11, BITMAP_AntennaLevel3, sizeof(BITMAP_AntennaLevel3)); [[fallthrough]];
|
||||
case 3: memmove(p + 8, BITMAP_AntennaLevel2, sizeof(BITMAP_AntennaLevel2)); [[fallthrough]];
|
||||
case 2: memmove(p + 5, BITMAP_AntennaLevel1, sizeof(BITMAP_AntennaLevel1)); [[fallthrough]];
|
||||
case 1: memmove(p + 0, BITMAP_Antenna, sizeof(BITMAP_Antenna)); break;
|
||||
case 0: memset( p + 0, 0, sizeof(BITMAP_Antenna)); break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
#ifdef ENABLE_AUDIO_BAR
|
||||
|
||||
unsigned int sqrt16(unsigned int value)
|
||||
{ // return square root of 'value'
|
||||
unsigned int shift = 16; // number of bits supplied in 'value' .. 2 ~ 32
|
||||
unsigned int bit = 1u << --shift;
|
||||
unsigned int sqrti = 0;
|
||||
while (bit)
|
||||
{
|
||||
const unsigned int temp = ((sqrti << 1) | bit) << shift--;
|
||||
if (value >= temp)
|
||||
{
|
||||
value -= temp;
|
||||
sqrti |= bit;
|
||||
}
|
||||
bit >>= 1;
|
||||
}
|
||||
return sqrti;
|
||||
}
|
||||
|
||||
void UI_DisplayAudioBar(void)
|
||||
unsigned int sqrt16(unsigned int value)
|
||||
{ // return square root of 'value'
|
||||
unsigned int shift = 16; // number of bits supplied in 'value' .. 2 ~ 32
|
||||
unsigned int bit = 1u << --shift;
|
||||
unsigned int sqrti = 0;
|
||||
while (bit)
|
||||
{
|
||||
if (gSetting_mic_bar)
|
||||
{
|
||||
const unsigned int line = 3;
|
||||
const unsigned int bar_x = 2;
|
||||
const unsigned int bar_width = LCD_WIDTH - 2 - bar_x;
|
||||
unsigned int i;
|
||||
const unsigned int temp = ((sqrti << 1) | bit) << shift--;
|
||||
if (value >= temp) {
|
||||
value -= temp;
|
||||
sqrti |= bit;
|
||||
}
|
||||
bit >>= 1;
|
||||
}
|
||||
return sqrti;
|
||||
}
|
||||
|
||||
if (gCurrentFunction != FUNCTION_TRANSMIT ||
|
||||
gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
{
|
||||
return; // screen is in use
|
||||
}
|
||||
void UI_DisplayAudioBar(void)
|
||||
{
|
||||
if (gSetting_mic_bar)
|
||||
{
|
||||
const unsigned int line = 3;
|
||||
const unsigned int bar_x = 2;
|
||||
const unsigned int bar_width = LCD_WIDTH - 2 - bar_x;
|
||||
unsigned int i;
|
||||
|
||||
if (gCurrentFunction != FUNCTION_TRANSMIT ||
|
||||
gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
{
|
||||
return; // screen is in use
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
if (gAlarmState != ALARM_STATE_OFF)
|
||||
return;
|
||||
if (gAlarmState != ALARM_STATE_OFF)
|
||||
return;
|
||||
#endif
|
||||
const unsigned int voice_amp = BK4819_GetVoiceAmplitudeOut(); // 15:0
|
||||
|
||||
// make non-linear to make more sensitive at low values
|
||||
const unsigned int level = voice_amp * 8;
|
||||
const unsigned int sqrt_level = sqrt16((level < 65535) ? level : 65535);
|
||||
const unsigned int len = (sqrt_level <= bar_width) ? sqrt_level : bar_width;
|
||||
const unsigned int voice_amp = BK4819_GetVoiceAmplitudeOut(); // 15:0
|
||||
|
||||
uint8_t *p_line = gFrameBuffer[line];
|
||||
|
||||
memset(p_line, 0, LCD_WIDTH);
|
||||
|
||||
for (i = 0; i < bar_width; i++)
|
||||
p_line[bar_x + i] = (i > len) ? ((i & 1) == 0) ? 0x41 : 0x00 : ((i & 1) == 0) ? 0x7f : 0x3e;
|
||||
// make non-linear to make more sensitive at low values
|
||||
const unsigned int level = voice_amp * 8;
|
||||
const unsigned int sqrt_level = sqrt16((level < 65535) ? level : 65535);
|
||||
const unsigned int len = (sqrt_level <= bar_width) ? sqrt_level : bar_width;
|
||||
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
ST7565_BlitFullScreen();
|
||||
}
|
||||
uint8_t *p_line = gFrameBuffer[line];
|
||||
|
||||
memset(p_line, 0, LCD_WIDTH);
|
||||
|
||||
for (i = 0; i < bar_width; i++)
|
||||
p_line[bar_x + i] = (i > len) ? ((i & 1) == 0) ? 0x41 : 0x00 : ((i & 1) == 0) ? 0x7f : 0x3e;
|
||||
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
ST7565_BlitFullScreen();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_RSSI_BAR)
|
||||
void UI_DisplayRSSIBar(const int16_t rssi, const bool now)
|
||||
{
|
||||
void UI_DisplayRSSIBar(const int16_t rssi, const bool now)
|
||||
{
|
||||
// const int16_t s0_dBm = -127; // S0 .. base level
|
||||
const int16_t s0_dBm = -147; // S0 .. base level
|
||||
const int16_t s0_dBm = -147; // S0 .. base level
|
||||
|
||||
const int16_t s9_dBm = s0_dBm + (6 * 9); // S9 .. 6dB/S-Point
|
||||
const int16_t bar_max_dBm = s9_dBm + 30; // S9+30dB
|
||||
const int16_t s9_dBm = s0_dBm + (6 * 9); // S9 .. 6dB/S-Point
|
||||
const int16_t bar_max_dBm = s9_dBm + 30; // S9+30dB
|
||||
// const int16_t bar_min_dBm = s0_dBm + (6 * 0); // S0
|
||||
const int16_t bar_min_dBm = s0_dBm + (6 * 4); // S4
|
||||
const int16_t bar_min_dBm = s0_dBm + (6 * 4); // S4
|
||||
|
||||
// ************
|
||||
// ************
|
||||
|
||||
const unsigned int txt_width = 7 * 8; // 8 text chars
|
||||
const unsigned int bar_x = 2 + txt_width + 4; // X coord of bar graph
|
||||
const unsigned int bar_width = LCD_WIDTH - 1 - bar_x;
|
||||
const unsigned int txt_width = 7 * 8; // 8 text chars
|
||||
const unsigned int bar_x = 2 + txt_width + 4; // X coord of bar graph
|
||||
const unsigned int bar_width = LCD_WIDTH - 1 - bar_x;
|
||||
|
||||
const int16_t rssi_dBm = (rssi / 2) - 160;
|
||||
const int16_t clamped_dBm = (rssi_dBm <= bar_min_dBm) ? bar_min_dBm : (rssi_dBm >= bar_max_dBm) ? bar_max_dBm : rssi_dBm;
|
||||
const unsigned int bar_range_dB = bar_max_dBm - bar_min_dBm;
|
||||
const unsigned int len = ((clamped_dBm - bar_min_dBm) * bar_width) / bar_range_dB;
|
||||
const int16_t rssi_dBm = (rssi / 2) - 160;
|
||||
const int16_t clamped_dBm = (rssi_dBm <= bar_min_dBm) ? bar_min_dBm : (rssi_dBm >= bar_max_dBm) ? bar_max_dBm : rssi_dBm;
|
||||
const unsigned int bar_range_dB = bar_max_dBm - bar_min_dBm;
|
||||
const unsigned int len = ((clamped_dBm - bar_min_dBm) * bar_width) / bar_range_dB;
|
||||
|
||||
const unsigned int line = 3;
|
||||
uint8_t *p_line = gFrameBuffer[line];
|
||||
const unsigned int line = 3;
|
||||
uint8_t *p_line = gFrameBuffer[line];
|
||||
|
||||
char s[16];
|
||||
unsigned int i;
|
||||
char s[16];
|
||||
unsigned int i;
|
||||
|
||||
if (gEeprom.KEY_LOCK && gKeypadLocked > 0)
|
||||
return; // display is in use
|
||||
if (gEeprom.KEY_LOCK && gKeypadLocked > 0)
|
||||
return; // display is in use
|
||||
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT ||
|
||||
gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
return; // display is in use
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT ||
|
||||
gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
return; // display is in use
|
||||
|
||||
if (now)
|
||||
memset(p_line, 0, LCD_WIDTH);
|
||||
if (now)
|
||||
memset(p_line, 0, LCD_WIDTH);
|
||||
|
||||
if (rssi_dBm >= (s9_dBm + 6))
|
||||
{ // S9+XXdB, 1dB increment
|
||||
const char *fmt[] = {"%3d 9+%u ", "%3d 9+%2u "};
|
||||
const unsigned int s9_dB = ((rssi_dBm - s9_dBm) <= 99) ? rssi_dBm - s9_dBm : 99;
|
||||
sprintf(s, (s9_dB < 10) ? fmt[0] : fmt[1], rssi_dBm, s9_dB);
|
||||
}
|
||||
else
|
||||
{ // S0 ~ S9, 6dB per S-point
|
||||
const unsigned int s_level = (rssi_dBm >= s0_dBm) ? (rssi_dBm - s0_dBm) / 6 : 0;
|
||||
sprintf(s, "%4d S%u ", rssi_dBm, s_level);
|
||||
}
|
||||
UI_PrintStringSmall(s, 2, 0, line);
|
||||
|
||||
#if 1
|
||||
// solid bar
|
||||
for (i = 0; i < bar_width; i++)
|
||||
p_line[bar_x + i] = (i > len) ? ((i & 1) == 0) ? 0x41 : 0x00 : ((i & 1) == 0) ? 0x7f : 0x3e;
|
||||
#else
|
||||
// knuled bar
|
||||
for (i = 0; i < bar_width; i += 2)
|
||||
p_line[bar_x + i] = (i <= len) ? 0x7f : 0x41;
|
||||
#endif
|
||||
|
||||
if (now)
|
||||
ST7565_BlitFullScreen();
|
||||
if (rssi_dBm >= (s9_dBm + 6))
|
||||
{ // S9+XXdB, 1dB increment
|
||||
const char *fmt[] = {"%3d 9+%u ", "%3d 9+%2u "};
|
||||
const unsigned int s9_dB = ((rssi_dBm - s9_dBm) <= 99) ? rssi_dBm - s9_dBm : 99;
|
||||
sprintf(s, (s9_dB < 10) ? fmt[0] : fmt[1], rssi_dBm, s9_dB);
|
||||
}
|
||||
else
|
||||
{ // S0 ~ S9, 6dB per S-point
|
||||
const unsigned int s_level = (rssi_dBm >= s0_dBm) ? (rssi_dBm - s0_dBm) / 6 : 0;
|
||||
sprintf(s, "%4d S%u ", rssi_dBm, s_level);
|
||||
}
|
||||
UI_PrintStringSmall(s, 2, 0, line);
|
||||
|
||||
#if 1
|
||||
// solid bar
|
||||
for (i = 0; i < bar_width; i++)
|
||||
p_line[bar_x + i] = (i > len) ? ((i & 1) == 0) ? 0x41 : 0x00 : ((i & 1) == 0) ? 0x7f : 0x3e;
|
||||
#else
|
||||
// knuled bar
|
||||
for (i = 0; i < bar_width; i += 2)
|
||||
p_line[bar_x + i] = (i <= len) ? 0x7f : 0x41;
|
||||
#endif
|
||||
|
||||
if (now)
|
||||
ST7565_BlitFullScreen();
|
||||
}
|
||||
#endif
|
||||
|
||||
void UI_UpdateRSSI(const int16_t rssi, const int vfo)
|
||||
{
|
||||
#ifdef ENABLE_RSSI_BAR
|
||||
#ifdef ENABLE_RSSI_BAR
|
||||
|
||||
(void)vfo; // unused
|
||||
|
||||
// optional larger RSSI dBm, S-point and bar level
|
||||
(void)vfo; // unused
|
||||
|
||||
// optional larger RSSI dBm, S-point and bar level
|
||||
|
||||
if (center_line != CENTER_LINE_RSSI)
|
||||
return;
|
||||
if (center_line != CENTER_LINE_RSSI)
|
||||
return;
|
||||
|
||||
if (gCurrentFunction == FUNCTION_RECEIVE ||
|
||||
gCurrentFunction == FUNCTION_MONITOR ||
|
||||
gCurrentFunction == FUNCTION_INCOMING)
|
||||
{
|
||||
UI_DisplayRSSIBar(rssi, true);
|
||||
}
|
||||
if (gCurrentFunction == FUNCTION_RECEIVE ||
|
||||
gCurrentFunction == FUNCTION_MONITOR ||
|
||||
gCurrentFunction == FUNCTION_INCOMING)
|
||||
{
|
||||
UI_DisplayRSSIBar(rssi, true);
|
||||
}
|
||||
|
||||
#else
|
||||
#else
|
||||
|
||||
// original little RS bars
|
||||
// original little RS bars
|
||||
|
||||
// const int16_t dBm = (rssi / 2) - 160;
|
||||
const uint8_t Line = (vfo == 0) ? 3 : 7;
|
||||
uint8_t *p_line = gFrameBuffer[Line - 1];
|
||||
const uint8_t Line = (vfo == 0) ? 3 : 7;
|
||||
uint8_t *p_line = gFrameBuffer[Line - 1];
|
||||
|
||||
// TODO: sort out all 8 values from the eeprom
|
||||
|
||||
#if 0
|
||||
// dBm -105 -100 -95 -90 -70 -65 -60 -55
|
||||
// RSSI 110 120 130 140 180 190 200 210
|
||||
// 0000C0 6E 00 78 00 82 00 8C 00 B4 00 BE 00 C8 00 D2 00
|
||||
//
|
||||
const unsigned int band = 1;
|
||||
const int16_t level0 = gEEPROM_RSSI_CALIB[band][0];
|
||||
const int16_t level1 = gEEPROM_RSSI_CALIB[band][1];
|
||||
const int16_t level2 = gEEPROM_RSSI_CALIB[band][2];
|
||||
const int16_t level3 = gEEPROM_RSSI_CALIB[band][3];
|
||||
#else
|
||||
const int16_t level0 = (-115 + 160) * 2; // dB
|
||||
const int16_t level1 = ( -89 + 160) * 2; // dB
|
||||
const int16_t level2 = ( -64 + 160) * 2; // dB
|
||||
const int16_t level3 = ( -39 + 160) * 2; // dB
|
||||
#endif
|
||||
const int16_t level01 = (level0 + level1) / 2;
|
||||
const int16_t level12 = (level1 + level2) / 2;
|
||||
const int16_t level23 = (level2 + level3) / 2;
|
||||
const unsigned int band = gRxVfo->Band;
|
||||
const int16_t level0 = gEEPROM_RSSI_CALIB[band][0];
|
||||
const int16_t level1 = gEEPROM_RSSI_CALIB[band][1];
|
||||
const int16_t level2 = gEEPROM_RSSI_CALIB[band][2];
|
||||
const int16_t level3 = gEEPROM_RSSI_CALIB[band][3];
|
||||
|
||||
gVFO_RSSI[vfo] = rssi;
|
||||
const int16_t level01 = (level0 + level1) / 2;
|
||||
const int16_t level12 = (level1 + level2) / 2;
|
||||
const int16_t level23 = (level2 + level3) / 2;
|
||||
|
||||
uint8_t rssi_level = 0;
|
||||
gVFO_RSSI[vfo] = rssi;
|
||||
|
||||
if (rssi >= level3) rssi_level = 7;
|
||||
else
|
||||
if (rssi >= level23) rssi_level = 6;
|
||||
else
|
||||
if (rssi >= level2) rssi_level = 5;
|
||||
else
|
||||
if (rssi >= level12) rssi_level = 4;
|
||||
else
|
||||
if (rssi >= level1) rssi_level = 3;
|
||||
else
|
||||
if (rssi >= level01) rssi_level = 2;
|
||||
else
|
||||
if (rssi >= level0) rssi_level = 1;
|
||||
uint8_t rssi_level = 0;
|
||||
|
||||
if (gVFO_RSSI_bar_level[vfo] == rssi_level)
|
||||
return;
|
||||
if (rssi >= level3) rssi_level = 7;
|
||||
else
|
||||
if (rssi >= level23) rssi_level = 6;
|
||||
else
|
||||
if (rssi >= level2) rssi_level = 5;
|
||||
else
|
||||
if (rssi >= level12) rssi_level = 4;
|
||||
else
|
||||
if (rssi >= level1) rssi_level = 3;
|
||||
else
|
||||
if (rssi >= level01) rssi_level = 2;
|
||||
else
|
||||
if (rssi >= level0) rssi_level = 1;
|
||||
|
||||
gVFO_RSSI_bar_level[vfo] = rssi_level;
|
||||
if (gVFO_RSSI_bar_level[vfo] == rssi_level)
|
||||
return;
|
||||
|
||||
// **********************************************************
|
||||
gVFO_RSSI_bar_level[vfo] = rssi_level;
|
||||
|
||||
if (gEeprom.KEY_LOCK && gKeypadLocked > 0)
|
||||
return; // display is in use
|
||||
// **********************************************************
|
||||
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT || gScreenToDisplay != DISPLAY_MAIN)
|
||||
return; // display is in use
|
||||
if (gEeprom.KEY_LOCK && gKeypadLocked > 0)
|
||||
return; // display is in use
|
||||
|
||||
p_line = gFrameBuffer[Line - 1];
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT || gScreenToDisplay != DISPLAY_MAIN)
|
||||
return; // display is in use
|
||||
|
||||
memset(p_line, 0, 23);
|
||||
p_line = gFrameBuffer[Line - 1];
|
||||
|
||||
// untested !!!
|
||||
memset(p_line, 0, 23);
|
||||
|
||||
if (rssi_level == 0)
|
||||
p_line = NULL;
|
||||
else
|
||||
UI_drawBars(p_line, rssi_level);
|
||||
// untested !!!
|
||||
|
||||
ST7565_DrawLine(0, Line, 23, p_line);
|
||||
#endif
|
||||
if (rssi_level == 0)
|
||||
p_line = NULL;
|
||||
else
|
||||
UI_drawBars(p_line, rssi_level);
|
||||
|
||||
ST7565_DrawLine(0, Line, 23, p_line);
|
||||
#endif
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
@@ -297,12 +276,6 @@ void UI_DisplayMain(void)
|
||||
|
||||
center_line = CENTER_LINE_NONE;
|
||||
|
||||
// #ifdef SINGLE_VFO_CHAN
|
||||
// const bool single_vfo = (gEeprom.DUAL_WATCH == DUAL_WATCH_OFF && gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? true : false;
|
||||
// #else
|
||||
const bool single_vfo = false;
|
||||
// #endif
|
||||
|
||||
// clear the screen
|
||||
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
|
||||
|
||||
@@ -313,31 +286,18 @@ void UI_DisplayMain(void)
|
||||
ST7565_BlitFullScreen();
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned int activeTxVFO = gRxVfoIsActive ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||
|
||||
for (vfo_num = 0; vfo_num < 2; vfo_num++)
|
||||
{
|
||||
const unsigned int line = (vfo_num == 0) ? line0 : line1;
|
||||
unsigned int channel = gEeprom.TX_VFO;
|
||||
// unsigned int tx_channel = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||
const bool same_vfo = (channel == vfo_num) ? true : false;
|
||||
const bool isMainVFO = (vfo_num == gEeprom.TX_VFO);
|
||||
uint8_t *p_line0 = gFrameBuffer[line + 0];
|
||||
uint8_t *p_line1 = gFrameBuffer[line + 1];
|
||||
unsigned int mode = 0;
|
||||
unsigned int state;
|
||||
|
||||
if (single_vfo)
|
||||
{ // we're in single VFO mode - screen is dedicated to just one VFO
|
||||
|
||||
if (!same_vfo)
|
||||
continue; // skip the unused vfo
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF && gRxVfoIsActive)
|
||||
channel = gEeprom.RX_VFO; // we're currently monitoring the other VFO
|
||||
|
||||
if (channel != vfo_num)
|
||||
if (activeTxVFO != vfo_num) // this is not active TX VFO
|
||||
{
|
||||
if (gDTMF_CallState != DTMF_CALL_STATE_NONE || gDTMF_IsTx || gDTMF_InputMode)
|
||||
{ // show DTMF stuff
|
||||
@@ -382,40 +342,34 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
|
||||
// highlight the selected/used VFO with a marker
|
||||
if (!single_vfo && same_vfo)
|
||||
if (isMainVFO)
|
||||
memmove(p_line0 + 0, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
||||
else
|
||||
if (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF)
|
||||
memmove(p_line0 + 0, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault));
|
||||
}
|
||||
else
|
||||
if (!single_vfo)
|
||||
else // active TX VFO
|
||||
{ // highlight the selected/used VFO with a marker
|
||||
if (same_vfo)
|
||||
if (isMainVFO)
|
||||
memmove(p_line0 + 0, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
||||
else
|
||||
//if (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF)
|
||||
memmove(p_line0 + 0, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault));
|
||||
}
|
||||
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
{ // transmitting
|
||||
|
||||
#ifdef ENABLE_ALARM
|
||||
if (gAlarmState == ALARM_STATE_ALARM)
|
||||
mode = 2;
|
||||
else
|
||||
#endif
|
||||
#ifdef ENABLE_ALARM
|
||||
if (gAlarmState == ALARM_STATE_ALARM)
|
||||
mode = 2;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
channel = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||
if (channel == vfo_num)
|
||||
if (activeTxVFO == vfo_num)
|
||||
{ // show the TX symbol
|
||||
mode = 1;
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold("TX", 14, 0, line);
|
||||
#else
|
||||
UI_PrintStringSmall("TX", 14, 0, line);
|
||||
#endif
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold("TX", 14, 0, line);
|
||||
#else
|
||||
UI_PrintStringSmall("TX", 14, 0, line);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -427,11 +381,11 @@ void UI_DisplayMain(void)
|
||||
gCurrentFunction == FUNCTION_INCOMING) &&
|
||||
gEeprom.RX_VFO == vfo_num)
|
||||
{
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold("RX", 14, 0, line);
|
||||
#else
|
||||
UI_PrintStringSmall("RX", 14, 0, line);
|
||||
#endif
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold("RX", 14, 0, line);
|
||||
#else
|
||||
UI_PrintStringSmall("RX", 14, 0, line);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,48 +394,46 @@ void UI_DisplayMain(void)
|
||||
const unsigned int x = 2;
|
||||
const bool inputting = (gInputBoxIndex == 0 || gEeprom.TX_VFO != vfo_num) ? false : true;
|
||||
if (!inputting)
|
||||
NUMBER_ToDigits(gEeprom.ScreenChannel[vfo_num] + 1, String); // show the memory channel number
|
||||
sprintf(String, "M%u", gEeprom.ScreenChannel[vfo_num] + 1);
|
||||
else
|
||||
memmove(String + 5, gInputBox, 3); // show the input text
|
||||
UI_PrintStringSmall("M", x, 0, line + 1);
|
||||
UI_DisplaySmallDigits(3, String + 5, x + 7, line + 1, inputting);
|
||||
}
|
||||
else
|
||||
if (IS_FREQ_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
|
||||
{ // frequency mode
|
||||
// show the frequency band number
|
||||
const unsigned int x = 2; // was 14
|
||||
// sprintf(String, "FB%u", 1 + gEeprom.ScreenChannel[vfo_num] - FREQ_CHANNEL_FIRST);
|
||||
sprintf(String, "VFO%u", 1 + gEeprom.ScreenChannel[vfo_num] - FREQ_CHANNEL_FIRST);
|
||||
sprintf(String, "M%.3s", INPUTBOX_GetAscii()); // show the input text
|
||||
UI_PrintStringSmall(String, x, 0, line + 1);
|
||||
}
|
||||
#ifdef ENABLE_NOAA
|
||||
else
|
||||
{
|
||||
if (gInputBoxIndex == 0 || gEeprom.TX_VFO != vfo_num)
|
||||
{ // channel number
|
||||
sprintf(String, "N%u", 1 + gEeprom.ScreenChannel[vfo_num] - NOAA_CHANNEL_FIRST);
|
||||
}
|
||||
else
|
||||
{ // user entering channel number
|
||||
sprintf(String, "N%u%u", '0' + gInputBox[0], '0' + gInputBox[1]);
|
||||
}
|
||||
UI_PrintStringSmall(String, 7, 0, line + 1);
|
||||
else if (IS_FREQ_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
|
||||
{ // frequency mode
|
||||
// show the frequency band number
|
||||
const unsigned int x = 2;
|
||||
char * buf = gEeprom.VfoInfo[vfo_num].pRX->Frequency < 100000000 ? "" : "+";
|
||||
sprintf(String, "F%u%s", 1 + gEeprom.ScreenChannel[vfo_num] - FREQ_CHANNEL_FIRST, buf);
|
||||
UI_PrintStringSmall(String, x, 0, line + 1);
|
||||
}
|
||||
#ifdef ENABLE_NOAA
|
||||
else
|
||||
{
|
||||
if (gInputBoxIndex == 0 || gEeprom.TX_VFO != vfo_num)
|
||||
{ // channel number
|
||||
sprintf(String, "N%u", 1 + gEeprom.ScreenChannel[vfo_num] - NOAA_CHANNEL_FIRST);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{ // user entering channel number
|
||||
sprintf(String, "N%u%u", '0' + gInputBox[0], '0' + gInputBox[1]);
|
||||
}
|
||||
UI_PrintStringSmall(String, 7, 0, line + 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
// ************
|
||||
|
||||
state = VfoState[vfo_num];
|
||||
unsigned int state = VfoState[vfo_num];
|
||||
|
||||
#ifdef ENABLE_ALARM
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT && gAlarmState == ALARM_STATE_ALARM)
|
||||
{
|
||||
channel = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||
if (channel == vfo_num)
|
||||
state = VFO_STATE_ALARM;
|
||||
}
|
||||
#endif
|
||||
#ifdef ENABLE_ALARM
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT && gAlarmState == ALARM_STATE_ALARM) {
|
||||
if (activeTxVFO == vfo_num)
|
||||
state = VFO_STATE_ALARM;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t frequency = gEeprom.VfoInfo[vfo_num].pRX->Frequency;
|
||||
|
||||
if (state != VFO_STATE_NORMAL)
|
||||
{
|
||||
@@ -489,58 +441,73 @@ void UI_DisplayMain(void)
|
||||
if (state < ARRAY_SIZE(state_list))
|
||||
UI_PrintString(state_list[state], 31, 0, line, 8);
|
||||
}
|
||||
else
|
||||
if (gInputBoxIndex > 0 && IS_FREQ_CHANNEL(gEeprom.ScreenChannel[vfo_num]) && gEeprom.TX_VFO == vfo_num)
|
||||
else if (gInputBoxIndex > 0 && IS_FREQ_CHANNEL(gEeprom.ScreenChannel[vfo_num]) && gEeprom.TX_VFO == vfo_num)
|
||||
{ // user entering a frequency
|
||||
UI_DisplayFrequency(gInputBox, 32, line, true, false);
|
||||
const char * ascii = INPUTBOX_GetAscii();
|
||||
bool isGigaF = frequency>=100000000;
|
||||
sprintf(String, "%.*s.%.3s", 3 + isGigaF, ascii, ascii + 3 + isGigaF);
|
||||
#ifdef ENABLE_BIG_FREQ
|
||||
if(!isGigaF) {
|
||||
// show the remaining 2 small frequency digits
|
||||
UI_PrintStringSmall(String + 7, 113, 0, line + 1);
|
||||
String[7] = 0;
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(String, 32, line, false);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// show the frequency in the main font
|
||||
UI_PrintString(String, 32, 0, line, 8);
|
||||
}
|
||||
|
||||
// center_line = CENTER_LINE_IN_USE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32_t frequency = gEeprom.VfoInfo[vfo_num].pRX->Frequency;
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
{ // transmitting
|
||||
channel = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||
if (channel == vfo_num)
|
||||
if (activeTxVFO == vfo_num)
|
||||
frequency = gEeprom.VfoInfo[vfo_num].pTX->Frequency;
|
||||
}
|
||||
|
||||
if (gEeprom.ScreenChannel[vfo_num] <= MR_CHANNEL_LAST)
|
||||
{ // it's a channel
|
||||
|
||||
// show the channel symbols
|
||||
// show the scan list assigment symbols
|
||||
const uint8_t attributes = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]];
|
||||
if (attributes & MR_CH_SCANLIST1)
|
||||
memmove(p_line0 + 113, BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
|
||||
if (attributes & MR_CH_SCANLIST2)
|
||||
memmove(p_line0 + 120, BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
|
||||
#ifndef ENABLE_BIG_FREQ
|
||||
if ((attributes & MR_CH_COMPAND) > 0)
|
||||
memmove(p_line0 + 120 + LCD_WIDTH, BITMAP_compand, sizeof(BITMAP_compand));
|
||||
#else
|
||||
|
||||
// TODO: // find somewhere else to put the symbol
|
||||
|
||||
#endif
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
// compander symbol
|
||||
#ifndef ENABLE_BIG_FREQ
|
||||
if ((attributes & MR_CH_COMPAND) > 0)
|
||||
memmove(p_line0 + 120 + LCD_WIDTH, BITMAP_compand, sizeof(BITMAP_compand));
|
||||
#else
|
||||
// TODO: // find somewhere else to put the symbol
|
||||
#endif
|
||||
|
||||
switch (gEeprom.CHANNEL_DISPLAY_MODE)
|
||||
{
|
||||
case MDF_FREQUENCY: // show the channel frequency
|
||||
#ifdef ENABLE_BIG_FREQ
|
||||
NUMBER_ToDigits(frequency, String);
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(String, 32, line, false, false);
|
||||
sprintf(String, "%3u.%05u", frequency / 100000, frequency % 100000);
|
||||
#ifdef ENABLE_BIG_FREQ
|
||||
if(frequency < 100000000) {
|
||||
// show the remaining 2 small frequency digits
|
||||
UI_DisplaySmallDigits(2, String + 6, 113, line + 1, true);
|
||||
#else
|
||||
UI_PrintStringSmall(String + 7, 113, 0, line + 1);
|
||||
String[7] = 0;
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(String, 32, line, false);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// show the frequency in the main font
|
||||
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
||||
UI_PrintString(String, 32, 0, line, 8);
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case MDF_CHANNEL: // show the channel number
|
||||
@@ -557,18 +524,15 @@ void UI_DisplayMain(void)
|
||||
sprintf(String, "CH-%03u", gEeprom.ScreenChannel[vfo_num] + 1);
|
||||
}
|
||||
|
||||
if (gEeprom.CHANNEL_DISPLAY_MODE == MDF_NAME)
|
||||
{
|
||||
if (gEeprom.CHANNEL_DISPLAY_MODE == MDF_NAME) {
|
||||
UI_PrintString(String, 32, 0, line, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold(String, 32 + 4, 0, line);
|
||||
#else
|
||||
UI_PrintStringSmall(String, 32 + 4, 0, line);
|
||||
#endif
|
||||
|
||||
else {
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold(String, 32 + 4, 0, line);
|
||||
#else
|
||||
UI_PrintStringSmall(String, 32 + 4, 0, line);
|
||||
#endif
|
||||
// show the channel frequency below the channel number/name
|
||||
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
||||
UI_PrintStringSmall(String, 32 + 4, 0, line + 1);
|
||||
@@ -576,31 +540,34 @@ void UI_DisplayMain(void)
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
else
|
||||
{ // frequency mode
|
||||
#ifdef ENABLE_BIG_FREQ
|
||||
NUMBER_ToDigits(frequency, String); // 8 digits
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(String, 32, line, false, false);
|
||||
sprintf(String, "%3u.%05u", frequency / 100000, frequency % 100000);
|
||||
|
||||
#ifdef ENABLE_BIG_FREQ
|
||||
if(frequency < 100000000) {
|
||||
// show the remaining 2 small frequency digits
|
||||
UI_DisplaySmallDigits(2, String + 6, 113, line + 1, true);
|
||||
#else
|
||||
UI_PrintStringSmall(String + 7, 113, 0, line + 1);
|
||||
String[7] = 0;
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(String, 32, line, false);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// show the frequency in the main font
|
||||
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
||||
UI_PrintString(String, 32, 0, line, 8);
|
||||
#endif
|
||||
}
|
||||
|
||||
// show the channel symbols
|
||||
const uint8_t attributes = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]];
|
||||
if ((attributes & MR_CH_COMPAND) > 0)
|
||||
#ifdef ENABLE_BIG_FREQ
|
||||
memmove(p_line0 + 120, BITMAP_compand, sizeof(BITMAP_compand));
|
||||
#else
|
||||
memmove(p_line0 + 120 + LCD_WIDTH, BITMAP_compand, sizeof(BITMAP_compand));
|
||||
#endif
|
||||
#ifdef ENABLE_BIG_FREQ
|
||||
memmove(p_line0 + 120, BITMAP_compand, sizeof(BITMAP_compand));
|
||||
#else
|
||||
memmove(p_line0 + 120 + LCD_WIDTH, BITMAP_compand, sizeof(BITMAP_compand));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -696,38 +663,35 @@ void UI_DisplayMain(void)
|
||||
gCurrentFunction == FUNCTION_MONITOR ||
|
||||
gCurrentFunction == FUNCTION_INCOMING);
|
||||
|
||||
#ifdef ENABLE_AUDIO_BAR
|
||||
if (gSetting_mic_bar && gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
{
|
||||
center_line = CENTER_LINE_AUDIO_BAR;
|
||||
UI_DisplayAudioBar();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef ENABLE_AUDIO_BAR
|
||||
if (gSetting_mic_bar && gCurrentFunction == FUNCTION_TRANSMIT) {
|
||||
center_line = CENTER_LINE_AUDIO_BAR;
|
||||
UI_DisplayAudioBar();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_AM_FIX) && defined(ENABLE_AM_FIX_SHOW_DATA)
|
||||
if (rx && gEeprom.VfoInfo[gEeprom.RX_VFO].AM_mode && gSetting_AM_fix)
|
||||
{
|
||||
if (gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
return;
|
||||
#if defined(ENABLE_AM_FIX) && defined(ENABLE_AM_FIX_SHOW_DATA)
|
||||
if (rx && gEeprom.VfoInfo[gEeprom.RX_VFO].AM_mode && gSetting_AM_fix)
|
||||
{
|
||||
if (gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
return;
|
||||
|
||||
center_line = CENTER_LINE_AM_FIX_DATA;
|
||||
AM_fix_print_data(gEeprom.RX_VFO, String);
|
||||
UI_PrintStringSmall(String, 2, 0, 3);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_RSSI_BAR
|
||||
if (rx)
|
||||
{
|
||||
center_line = CENTER_LINE_RSSI;
|
||||
UI_DisplayRSSIBar(gCurrentRSSI[gEeprom.RX_VFO], false);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
center_line = CENTER_LINE_AM_FIX_DATA;
|
||||
AM_fix_print_data(gEeprom.RX_VFO, String);
|
||||
UI_PrintStringSmall(String, 2, 0, 3);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_RSSI_BAR
|
||||
if (rx) {
|
||||
center_line = CENTER_LINE_RSSI;
|
||||
UI_DisplayRSSIBar(gCurrentRSSI[gEeprom.RX_VFO], false);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (rx || gCurrentFunction == FUNCTION_FOREGROUND || gCurrentFunction == FUNCTION_POWER_SAVE)
|
||||
{
|
||||
#if 1
|
||||
@@ -764,22 +728,21 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SHOW_CHARGE_LEVEL
|
||||
else
|
||||
if (gChargingWithTypeC)
|
||||
{ // charging .. show the battery state
|
||||
if (gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
return;
|
||||
#ifdef ENABLE_SHOW_CHARGE_LEVEL
|
||||
else if (gChargingWithTypeC)
|
||||
{ // charging .. show the battery state
|
||||
if (gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
return;
|
||||
|
||||
center_line = CENTER_LINE_CHARGE_DATA;
|
||||
center_line = CENTER_LINE_CHARGE_DATA;
|
||||
|
||||
sprintf(String, "Charge %u.%02uV %u%%",
|
||||
gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100,
|
||||
BATTERY_VoltsToPercent(gBatteryVoltageAverage));
|
||||
UI_PrintStringSmall(String, 2, 0, 3);
|
||||
}
|
||||
#endif
|
||||
sprintf(String, "Charge %u.%02uV %u%%",
|
||||
gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100,
|
||||
BATTERY_VoltsToPercent(gBatteryVoltageAverage));
|
||||
UI_PrintStringSmall(String, 2, 0, 3);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
271
ui/menu.c
271
ui/menu.c
@@ -36,106 +36,109 @@
|
||||
#include "ui/menu.h"
|
||||
#include "ui/ui.h"
|
||||
|
||||
// NOTE. this menu list is half way through a change, what might seem
|
||||
// pointless at this time is for there for a reason.
|
||||
//
|
||||
const t_menu_item MenuList[] =
|
||||
{
|
||||
// text, voice ID, menu ID
|
||||
|
||||
{"SQL", VOICE_ID_SQUELCH, MENU_SQL },
|
||||
{"STEP", VOICE_ID_FREQUENCY_STEP, MENU_STEP },
|
||||
{"T PWR", VOICE_ID_POWER, MENU_TXP }, // was "TXP"
|
||||
{"R DCS", VOICE_ID_DCS, MENU_R_DCS }, // was "R_DCS"
|
||||
{"R CTCS", VOICE_ID_CTCSS, MENU_R_CTCS }, // was "R_CTCS"
|
||||
{"T DCS", VOICE_ID_DCS, MENU_T_DCS }, // was "T_DCS"
|
||||
{"T CTCS", VOICE_ID_CTCSS, MENU_T_CTCS }, // was "T_CTCS"
|
||||
{"T DIR", VOICE_ID_TX_OFFSET_FREQUENCY_DIRECTION, MENU_SFT_D }, // was "SFT_D"
|
||||
{"T OFFS", VOICE_ID_TX_OFFSET_FREQUENCY, MENU_OFFSET }, // was "OFFSET"
|
||||
{"T VFO", VOICE_ID_INVALID, MENU_XB }, // was "WX"
|
||||
{"T TOUT", VOICE_ID_TRANSMIT_OVER_TIME, MENU_TOT }, // was "TOT"
|
||||
{"Step", VOICE_ID_FREQUENCY_STEP, MENU_STEP },
|
||||
{"TxPwr", VOICE_ID_POWER, MENU_TXP }, // was "TXP"
|
||||
{"RxDCS", VOICE_ID_DCS, MENU_R_DCS }, // was "R_DCS"
|
||||
{"RxCTCS", VOICE_ID_CTCSS, MENU_R_CTCS }, // was "R_CTCS"
|
||||
{"TxDCS", VOICE_ID_DCS, MENU_T_DCS }, // was "T_DCS"
|
||||
{"TxCTCS", VOICE_ID_CTCSS, MENU_T_CTCS }, // was "T_CTCS"
|
||||
{"TxODir", VOICE_ID_TX_OFFSET_FREQUENCY_DIRECTION, MENU_SFT_D }, // was "SFT_D"
|
||||
{"TxOffs", VOICE_ID_TX_OFFSET_FREQUENCY, MENU_OFFSET }, // was "OFFSET"
|
||||
{"W/N", VOICE_ID_CHANNEL_BANDWIDTH, MENU_W_N },
|
||||
{"SCRAM", VOICE_ID_SCRAMBLER_ON, MENU_SCR }, // was "SCR"
|
||||
{"BUSYCL", VOICE_ID_BUSY_LOCKOUT, MENU_BCL }, // was "BCL"
|
||||
{"CH SAV", VOICE_ID_MEMORY_CHANNEL, MENU_MEM_CH }, // was "MEM-CH"
|
||||
{"CH DEL", VOICE_ID_DELETE_CHANNEL, MENU_DEL_CH }, // was "DEL-CH"
|
||||
{"CH NAM", VOICE_ID_INVALID, MENU_MEM_NAME },
|
||||
{"CH DIS", VOICE_ID_INVALID, MENU_MDF }, // was "MDF"
|
||||
{"BATSAV", VOICE_ID_SAVE_MODE, MENU_SAVE }, // was "SAVE"
|
||||
#ifdef ENABLE_VOX
|
||||
{"VOX", VOICE_ID_VOX, MENU_VOX },
|
||||
{"Scramb", VOICE_ID_SCRAMBLER_ON, MENU_SCR }, // was "SCR"
|
||||
{"BusyCL", VOICE_ID_BUSY_LOCKOUT, MENU_BCL }, // was "BCL"
|
||||
{"Compnd", VOICE_ID_INVALID, MENU_COMPAND },
|
||||
{"Demodu", VOICE_ID_INVALID, MENU_AM }, // was "AM"
|
||||
{"ScAdd1", VOICE_ID_INVALID, MENU_S_ADD1 },
|
||||
{"ScAdd2", VOICE_ID_INVALID, MENU_S_ADD2 },
|
||||
{"ChSave", VOICE_ID_MEMORY_CHANNEL, MENU_MEM_CH }, // was "MEM-CH"
|
||||
{"ChDele", VOICE_ID_DELETE_CHANNEL, MENU_DEL_CH }, // was "DEL-CH"
|
||||
{"ChName", VOICE_ID_INVALID, MENU_MEM_NAME },
|
||||
|
||||
{"SList", VOICE_ID_INVALID, MENU_S_LIST },
|
||||
{"SList1", VOICE_ID_INVALID, MENU_SLIST1 },
|
||||
{"SList2", VOICE_ID_INVALID, MENU_SLIST2 },
|
||||
{"ScnRev", VOICE_ID_INVALID, MENU_SC_REV },
|
||||
#ifdef ENABLE_NOAA
|
||||
{"NOAA-S", VOICE_ID_INVALID, MENU_NOAA_S },
|
||||
#endif
|
||||
{"BLT", VOICE_ID_INVALID, MENU_ABR }, // was "ABR"
|
||||
{"BLTTRX", VOICE_ID_INVALID, MENU_ABR_ON_TX_RX },
|
||||
{"DUALRX", VOICE_ID_DUAL_STANDBY, MENU_TDR }, // was "TDR"
|
||||
{"BEEP", VOICE_ID_BEEP_PROMPT, MENU_BEEP },
|
||||
|
||||
{"F1Shrt", VOICE_ID_INVALID, MENU_F1SHRT },
|
||||
{"F1Long", VOICE_ID_INVALID, MENU_F1LONG },
|
||||
{"F2Shrt", VOICE_ID_INVALID, MENU_F2SHRT },
|
||||
{"F2Long", VOICE_ID_INVALID, MENU_F2LONG },
|
||||
{"M Long", VOICE_ID_INVALID, MENU_MLONG },
|
||||
|
||||
{"KeyLck", VOICE_ID_INVALID, MENU_AUTOLK }, // was "AUTOLk"
|
||||
{"TxTOut", VOICE_ID_TRANSMIT_OVER_TIME, MENU_TOT }, // was "TOT"
|
||||
{"BatSav", VOICE_ID_SAVE_MODE, MENU_SAVE }, // was "SAVE"
|
||||
{"Mic", VOICE_ID_INVALID, MENU_MIC },
|
||||
#ifdef ENABLE_AUDIO_BAR
|
||||
{"MicBar", VOICE_ID_INVALID, MENU_MIC_BAR },
|
||||
#endif
|
||||
{"ChDisp", VOICE_ID_INVALID, MENU_MDF }, // was "MDF"
|
||||
{"POnMsg", VOICE_ID_INVALID, MENU_PONMSG },
|
||||
{"BatTxt", VOICE_ID_INVALID, MENU_BAT_TXT },
|
||||
{"BackLt", VOICE_ID_INVALID, MENU_ABR }, // was "ABR"
|
||||
{"BltTRX", VOICE_ID_INVALID, MENU_ABR_ON_TX_RX },
|
||||
{"Beep", VOICE_ID_BEEP_PROMPT, MENU_BEEP },
|
||||
#ifdef ENABLE_VOICE
|
||||
{"VOICE", VOICE_ID_VOICE_PROMPT, MENU_VOICE },
|
||||
{"Voice", VOICE_ID_VOICE_PROMPT, MENU_VOICE },
|
||||
#endif
|
||||
{"SC REV", VOICE_ID_INVALID, MENU_SC_REV },
|
||||
{"KEYLOC", VOICE_ID_INVALID, MENU_AUTOLK }, // was "AUTOLk"
|
||||
{"S ADD1", VOICE_ID_INVALID, MENU_S_ADD1 },
|
||||
{"S ADD2", VOICE_ID_INVALID, MENU_S_ADD2 },
|
||||
{"Roger", VOICE_ID_INVALID, MENU_ROGER },
|
||||
{"STE", VOICE_ID_INVALID, MENU_STE },
|
||||
{"RP STE", VOICE_ID_INVALID, MENU_RP_STE },
|
||||
{"MIC", VOICE_ID_INVALID, MENU_MIC },
|
||||
#ifdef ENABLE_AUDIO_BAR
|
||||
{"MICBAR", VOICE_ID_INVALID, MENU_MIC_BAR },
|
||||
#endif
|
||||
{"COMPND", VOICE_ID_INVALID, MENU_COMPAND },
|
||||
{"1 CALL", VOICE_ID_INVALID, MENU_1_CALL },
|
||||
{"SLIST", VOICE_ID_INVALID, MENU_S_LIST },
|
||||
{"SLIST1", VOICE_ID_INVALID, MENU_SLIST1 },
|
||||
{"SLIST2", VOICE_ID_INVALID, MENU_SLIST2 },
|
||||
{"1 Call", VOICE_ID_INVALID, MENU_1_CALL },
|
||||
#ifdef ENABLE_ALARM
|
||||
{"AL-MOD", VOICE_ID_INVALID, MENU_AL_MOD },
|
||||
{"AlarmT", VOICE_ID_INVALID, MENU_AL_MOD },
|
||||
#endif
|
||||
{"ANI ID", VOICE_ID_ANI_CODE, MENU_ANI_ID },
|
||||
{"UPCODE", VOICE_ID_INVALID, MENU_UPCODE },
|
||||
{"DWCODE", VOICE_ID_INVALID, MENU_DWCODE },
|
||||
{"UPCode", VOICE_ID_INVALID, MENU_UPCODE },
|
||||
{"DWCode", VOICE_ID_INVALID, MENU_DWCODE },
|
||||
{"PTT ID", VOICE_ID_INVALID, MENU_PTT_ID },
|
||||
{"D ST", VOICE_ID_INVALID, MENU_D_ST },
|
||||
{"D RSP", VOICE_ID_INVALID, MENU_D_RSP },
|
||||
{"D HOLD", VOICE_ID_INVALID, MENU_D_HOLD },
|
||||
{"D PRE", VOICE_ID_INVALID, MENU_D_PRE },
|
||||
{"D DCD", VOICE_ID_INVALID, MENU_D_DCD },
|
||||
{"D LIST", VOICE_ID_INVALID, MENU_D_LIST },
|
||||
{"D LIVE", VOICE_ID_INVALID, MENU_D_LIVE_DEC }, // live DTMF decoder
|
||||
{"PONMSG", VOICE_ID_INVALID, MENU_PONMSG },
|
||||
{"ROGER", VOICE_ID_INVALID, MENU_ROGER },
|
||||
{"BATVOL", VOICE_ID_INVALID, MENU_VOL }, // was "VOL"
|
||||
{"BATTXT", VOICE_ID_INVALID, MENU_BAT_TXT },
|
||||
{"MODE", VOICE_ID_INVALID, MENU_AM }, // was "AM"
|
||||
{"D Resp", VOICE_ID_INVALID, MENU_D_RSP },
|
||||
{"D Hold", VOICE_ID_INVALID, MENU_D_HOLD },
|
||||
{"D Prel", VOICE_ID_INVALID, MENU_D_PRE },
|
||||
{"D Decd", VOICE_ID_INVALID, MENU_D_DCD },
|
||||
{"D List", VOICE_ID_INVALID, MENU_D_LIST },
|
||||
{"D Live", VOICE_ID_INVALID, MENU_D_LIVE_DEC }, // live DTMF decoder
|
||||
#ifdef ENABLE_AM_FIX
|
||||
{"AM FIX", VOICE_ID_INVALID, MENU_AM_FIX },
|
||||
{"AM Fix", VOICE_ID_INVALID, MENU_AM_FIX },
|
||||
#endif
|
||||
#ifdef ENABLE_AM_FIX_TEST1
|
||||
{"AM FT1", VOICE_ID_INVALID, MENU_AM_FIX_TEST1 },
|
||||
#endif
|
||||
#ifdef ENABLE_NOAA
|
||||
{"NOAA-S", VOICE_ID_INVALID, MENU_NOAA_S },
|
||||
#ifdef ENABLE_VOX
|
||||
{"VOX", VOICE_ID_VOX, MENU_VOX },
|
||||
#endif
|
||||
{"RESET", VOICE_ID_INITIALISATION, MENU_RESET }, // might be better to move this to the hidden menu items ?
|
||||
{"BatVol", VOICE_ID_INVALID, MENU_VOL }, // was "VOL"
|
||||
{"RxMode", VOICE_ID_DUAL_STANDBY, MENU_TDR },
|
||||
{"Sql", VOICE_ID_SQUELCH, MENU_SQL },
|
||||
|
||||
// hidden menu items from here on
|
||||
// enabled if pressing both the PTT and upper side button at power-on
|
||||
|
||||
{"F LOCK", VOICE_ID_INVALID, MENU_F_LOCK },
|
||||
{"TX 200", VOICE_ID_INVALID, MENU_200TX }, // was "200TX"
|
||||
{"TX 350", VOICE_ID_INVALID, MENU_350TX }, // was "350TX"
|
||||
{"TX 500", VOICE_ID_INVALID, MENU_500TX }, // was "500TX"
|
||||
{"350 EN", VOICE_ID_INVALID, MENU_350EN }, // was "350EN"
|
||||
{"SCR EN", VOICE_ID_INVALID, MENU_SCREN }, // was "SCREN"
|
||||
|
||||
{"TX EN", VOICE_ID_INVALID, MENU_TX_EN }, // enable TX
|
||||
{"F Lock", VOICE_ID_INVALID, MENU_F_LOCK },
|
||||
{"Tx 200", VOICE_ID_INVALID, MENU_200TX }, // was "200TX"
|
||||
{"Tx 350", VOICE_ID_INVALID, MENU_350TX }, // was "350TX"
|
||||
{"Tx 500", VOICE_ID_INVALID, MENU_500TX }, // was "500TX"
|
||||
{"350 En", VOICE_ID_INVALID, MENU_350EN }, // was "350EN"
|
||||
{"ScraEn", VOICE_ID_INVALID, MENU_SCREN }, // was "SCREN"
|
||||
{"TxEnab", VOICE_ID_INVALID, MENU_TX_EN }, // enable TX
|
||||
#ifdef ENABLE_F_CAL_MENU
|
||||
{"F CALI", VOICE_ID_INVALID, MENU_F_CALI }, // reference xtal calibration
|
||||
{"FrCali", VOICE_ID_INVALID, MENU_F_CALI }, // reference xtal calibration
|
||||
#endif
|
||||
{"BATCAL", VOICE_ID_INVALID, MENU_BATCAL }, // battery voltage calibration
|
||||
{"BatCal", VOICE_ID_INVALID, MENU_BATCAL }, // battery voltage calibration
|
||||
{"Reset", VOICE_ID_INITIALISATION, MENU_RESET }, // might be better to move this to the hidden menu items ?
|
||||
|
||||
{"", VOICE_ID_INVALID, 0xff } // end of list - DO NOT delete or move this this
|
||||
};
|
||||
|
||||
const uint8_t FIRST_HIDDEN_MENU_ITEM = MENU_F_LOCK;
|
||||
|
||||
const char gSubMenu_TXP[3][5] =
|
||||
{
|
||||
"LOW",
|
||||
@@ -186,18 +189,12 @@ const char gSubMenu_TOT[11][7] =
|
||||
"15 min"
|
||||
};
|
||||
|
||||
const char gSubMenu_CHAN[3][10] =
|
||||
const char* gSubMenu_RXMode[4] =
|
||||
{
|
||||
"OFF",
|
||||
"UPPER\nVFO",
|
||||
"LOWER\nVFO"
|
||||
};
|
||||
|
||||
const char gSubMenu_XB[3][10] =
|
||||
{
|
||||
"RX\nVFO",
|
||||
"UPPER\nVFO",
|
||||
"LOWER\nVFO"
|
||||
"MAIN\nONLY", // TX and RX on main only
|
||||
"DUAL RX\nRESPOND", // Watch both and respond
|
||||
"CROSS\nBAND", // TX on main, RX on secondary
|
||||
"MAIN TX\nDUAL RX" // always TX on main, but RX on both
|
||||
};
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
@@ -209,14 +206,14 @@ const char gSubMenu_XB[3][10] =
|
||||
};
|
||||
#endif
|
||||
|
||||
const char gSubMenu_SC_REV[3][13] =
|
||||
const char gSubMenu_SC_REV[3][8] =
|
||||
{
|
||||
"TIME",
|
||||
"TIMEOUT",
|
||||
"CARRIER",
|
||||
"SEARCH"
|
||||
"STOP"
|
||||
};
|
||||
|
||||
const char gSubMenu_MDF[4][15] =
|
||||
const char* gSubMenu_MDF[4] =
|
||||
{
|
||||
"FREQ",
|
||||
"CHANNEL\nNUMBER",
|
||||
@@ -240,7 +237,7 @@ const char gSubMenu_D_RSP[4][11] =
|
||||
"BOTH"
|
||||
};
|
||||
|
||||
const char gSubMenu_PTT_ID[5][15] =
|
||||
const char* gSubMenu_PTT_ID[5] =
|
||||
{
|
||||
"OFF",
|
||||
"KEY\nUP",
|
||||
@@ -257,7 +254,7 @@ const char gSubMenu_PONMSG[4][8] =
|
||||
"NONE"
|
||||
};
|
||||
|
||||
const char gSubMenu_ROGER[3][9] =
|
||||
const char* gSubMenu_ROGER[3] =
|
||||
{
|
||||
"OFF",
|
||||
"ROGER",
|
||||
@@ -332,8 +329,40 @@ const char gSubMenu_SCRAMBLER[11][7] =
|
||||
"3500Hz"
|
||||
};
|
||||
|
||||
|
||||
const t_sidefunction SIDEFUNCTIONS[] =
|
||||
{
|
||||
{"NONE", ACTION_OPT_NONE},
|
||||
{"FLASH\nLIGHT", ACTION_OPT_FLASHLIGHT},
|
||||
{"POWER", ACTION_OPT_POWER},
|
||||
{"MONITOR", ACTION_OPT_MONITOR},
|
||||
{"SCAN", ACTION_OPT_SCAN},
|
||||
#ifdef ENABLE_VOX
|
||||
{"VOX", ACTION_OPT_VOX},
|
||||
#endif
|
||||
#ifdef ENABLE_ALARM
|
||||
{"ALARM", ACTION_OPT_ALARM},
|
||||
#endif
|
||||
#ifdef ENABLE_FMRADIO
|
||||
{"FM RADIO", ACTION_OPT_FM},
|
||||
#endif
|
||||
#ifdef ENABLE_TX1750
|
||||
{"1750HZ", ACTION_OPT_1750},
|
||||
#endif
|
||||
{"LOCK\nKEYPAD", ACTION_OPT_KEYLOCK},
|
||||
{"SWITCH\nVFO", ACTION_OPT_A_B},
|
||||
};
|
||||
const t_sidefunction* gSubMenu_SIDEFUNCTIONS = SIDEFUNCTIONS;
|
||||
const uint8_t gSubMenu_SIDEFUNCTIONS_size = ARRAY_SIZE(SIDEFUNCTIONS);
|
||||
|
||||
bool gIsInSubMenu;
|
||||
uint8_t gMenuCursor;
|
||||
int GetCurrentMenuId() {
|
||||
if(gMenuCursor < ARRAY_SIZE(MenuList))
|
||||
return MenuList[gMenuCursor].menu_id;
|
||||
else
|
||||
return MenuList[ARRAY_SIZE(MenuList)-1].menu_id;
|
||||
}
|
||||
int8_t gMenuScrollDirection;
|
||||
int32_t gSubMenuSelection;
|
||||
|
||||
@@ -437,10 +466,7 @@ void UI_DisplayMenu(void)
|
||||
|
||||
bool already_printed = false;
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough="
|
||||
|
||||
switch (gMenuCursor)
|
||||
switch (GetCurrentMenuId())
|
||||
{
|
||||
case MENU_SQL:
|
||||
sprintf(String, "%d", gSubMenuSelection);
|
||||
@@ -483,7 +509,7 @@ void UI_DisplayMenu(void)
|
||||
{
|
||||
#if 1
|
||||
unsigned int Code;
|
||||
FREQ_Config_t *pConfig = (gMenuCursor == MENU_R_CTCS) ? &gTxVfo->freq_config_RX : &gTxVfo->freq_config_TX;
|
||||
FREQ_Config_t *pConfig = (GetCurrentMenuId() == MENU_R_CTCS) ? &gTxVfo->freq_config_RX : &gTxVfo->freq_config_TX;
|
||||
if (gSubMenuSelection == 0)
|
||||
{
|
||||
strcpy(String, "OFF");
|
||||
@@ -680,11 +706,7 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
|
||||
case MENU_TDR:
|
||||
strcpy(String, gSubMenu_CHAN[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
case MENU_XB:
|
||||
strcpy(String, gSubMenu_XB[gSubMenuSelection]);
|
||||
strcpy(String, gSubMenu_RXMode[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
case MENU_TOT:
|
||||
@@ -808,9 +830,16 @@ void UI_DisplayMenu(void)
|
||||
sprintf(String, "%u.%02uV\n%u", vol / 100, vol % 100, gSubMenuSelection);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
case MENU_F1SHRT:
|
||||
case MENU_F1LONG:
|
||||
case MENU_F2SHRT:
|
||||
case MENU_F2LONG:
|
||||
case MENU_MLONG:
|
||||
strcpy(String, gSubMenu_SIDEFUNCTIONS[gSubMenuSelection].name);
|
||||
break;
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
if (!already_printed)
|
||||
{ // we now do multi-line text in a single string
|
||||
@@ -866,9 +895,9 @@ void UI_DisplayMenu(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (gMenuCursor == MENU_SLIST1 || gMenuCursor == MENU_SLIST2)
|
||||
if (GetCurrentMenuId() == MENU_SLIST1 || GetCurrentMenuId() == MENU_SLIST2)
|
||||
{
|
||||
i = (gMenuCursor == MENU_SLIST1) ? 0 : 1;
|
||||
i = (GetCurrentMenuId() == MENU_SLIST1) ? 0 : 1;
|
||||
|
||||
// if (gSubMenuSelection == 0xFF)
|
||||
if (gSubMenuSelection < 0)
|
||||
@@ -913,9 +942,9 @@ void UI_DisplayMenu(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (gMenuCursor == MENU_MEM_CH ||
|
||||
gMenuCursor == MENU_DEL_CH ||
|
||||
gMenuCursor == MENU_1_CALL)
|
||||
if (GetCurrentMenuId() == MENU_MEM_CH ||
|
||||
GetCurrentMenuId() == MENU_DEL_CH ||
|
||||
GetCurrentMenuId() == MENU_1_CALL)
|
||||
{ // display the channel name
|
||||
char s[11];
|
||||
BOARD_fetchChannelName(s, gSubMenuSelection);
|
||||
@@ -924,18 +953,18 @@ void UI_DisplayMenu(void)
|
||||
UI_PrintString(s, menu_item_x1, menu_item_x2, 2, 8);
|
||||
}
|
||||
|
||||
if ((gMenuCursor == MENU_R_CTCS || gMenuCursor == MENU_R_DCS) && gCssScanMode != CSS_SCAN_MODE_OFF)
|
||||
if ((GetCurrentMenuId() == MENU_R_CTCS || GetCurrentMenuId() == MENU_R_DCS) && gCssScanMode != CSS_SCAN_MODE_OFF)
|
||||
UI_PrintString("SCAN", menu_item_x1, menu_item_x2, 4, 8);
|
||||
|
||||
if (gMenuCursor == MENU_UPCODE)
|
||||
if (GetCurrentMenuId() == MENU_UPCODE)
|
||||
if (strlen(gEeprom.DTMF_UP_CODE) > 8)
|
||||
UI_PrintString(gEeprom.DTMF_UP_CODE + 8, menu_item_x1, menu_item_x2, 4, 8);
|
||||
|
||||
if (gMenuCursor == MENU_DWCODE)
|
||||
if (GetCurrentMenuId() == MENU_DWCODE)
|
||||
if (strlen(gEeprom.DTMF_DOWN_CODE) > 8)
|
||||
UI_PrintString(gEeprom.DTMF_DOWN_CODE + 8, menu_item_x1, menu_item_x2, 4, 8);
|
||||
|
||||
if (gMenuCursor == MENU_D_LIST && gIsDtmfContactValid)
|
||||
if (GetCurrentMenuId() == MENU_D_LIST && gIsDtmfContactValid)
|
||||
{
|
||||
Contact[11] = 0;
|
||||
memmove(&gDTMF_ID, Contact + 8, 4);
|
||||
@@ -943,22 +972,20 @@ void UI_DisplayMenu(void)
|
||||
UI_PrintString(String, menu_item_x1, menu_item_x2, 4, 8);
|
||||
}
|
||||
|
||||
if (gMenuCursor == MENU_R_CTCS ||
|
||||
gMenuCursor == MENU_T_CTCS ||
|
||||
gMenuCursor == MENU_R_DCS ||
|
||||
gMenuCursor == MENU_T_DCS ||
|
||||
gMenuCursor == MENU_D_LIST)
|
||||
if (GetCurrentMenuId() == MENU_R_CTCS ||
|
||||
GetCurrentMenuId() == MENU_T_CTCS ||
|
||||
GetCurrentMenuId() == MENU_R_DCS ||
|
||||
GetCurrentMenuId() == MENU_T_DCS ||
|
||||
GetCurrentMenuId() == MENU_D_LIST)
|
||||
{
|
||||
unsigned int Offset;
|
||||
NUMBER_ToDigits(gSubMenuSelection, String);
|
||||
Offset = (gMenuCursor == MENU_D_LIST) ? 2 : 3;
|
||||
UI_DisplaySmallDigits(Offset, String + (8 - Offset), 105, 0, false);
|
||||
sprintf(String, "%2d", gSubMenuSelection);
|
||||
UI_PrintStringSmall(String, 105, 0, 0);
|
||||
}
|
||||
|
||||
if ((gMenuCursor == MENU_RESET ||
|
||||
gMenuCursor == MENU_MEM_CH ||
|
||||
gMenuCursor == MENU_MEM_NAME ||
|
||||
gMenuCursor == MENU_DEL_CH) && gAskForConfirmation)
|
||||
if ((GetCurrentMenuId() == MENU_RESET ||
|
||||
GetCurrentMenuId() == MENU_MEM_CH ||
|
||||
GetCurrentMenuId() == MENU_MEM_NAME ||
|
||||
GetCurrentMenuId() == MENU_DEL_CH) && gAskForConfirmation)
|
||||
{ // display confirmation
|
||||
strcpy(String, (gAskForConfirmation == 1) ? "SURE?" : "WAIT!");
|
||||
UI_PrintString(String, menu_item_x1, menu_item_x2, 5, 8);
|
||||
|
||||
29
ui/menu.h
29
ui/menu.h
@@ -39,7 +39,6 @@ enum
|
||||
MENU_T_CTCS,
|
||||
MENU_SFT_D,
|
||||
MENU_OFFSET,
|
||||
MENU_XB,
|
||||
MENU_TOT,
|
||||
MENU_W_N,
|
||||
MENU_SCR,
|
||||
@@ -103,9 +102,6 @@ enum
|
||||
MENU_NOAA_S,
|
||||
#endif
|
||||
MENU_RESET,
|
||||
|
||||
// items after here are normally hidden
|
||||
|
||||
MENU_F_LOCK,
|
||||
MENU_200TX,
|
||||
MENU_350TX,
|
||||
@@ -117,9 +113,15 @@ enum
|
||||
#ifdef ENABLE_F_CAL_MENU
|
||||
MENU_F_CALI, // reference xtal calibration
|
||||
#endif
|
||||
MENU_BATCAL // battery voltage calibration
|
||||
MENU_BATCAL, // battery voltage calibration
|
||||
MENU_F1SHRT,
|
||||
MENU_F1LONG,
|
||||
MENU_F2SHRT,
|
||||
MENU_F2LONG,
|
||||
MENU_MLONG
|
||||
};
|
||||
|
||||
extern const uint8_t FIRST_HIDDEN_MENU_ITEM;
|
||||
extern const t_menu_item MenuList[];
|
||||
|
||||
extern const char gSubMenu_TXP[3][5];
|
||||
@@ -128,20 +130,20 @@ extern const char gSubMenu_W_N[2][7];
|
||||
extern const char gSubMenu_OFF_ON[2][4];
|
||||
extern const char gSubMenu_SAVE[5][4];
|
||||
extern const char gSubMenu_TOT[11][7];
|
||||
extern const char gSubMenu_CHAN[3][10];
|
||||
extern const char gSubMenu_XB[3][10];
|
||||
extern const char* gSubMenu_RXMode[4];
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
extern const char gSubMenu_VOICE[3][4];
|
||||
#endif
|
||||
extern const char gSubMenu_SC_REV[3][13];
|
||||
extern const char gSubMenu_MDF[4][15];
|
||||
extern const char gSubMenu_SC_REV[3][8];
|
||||
extern const char* gSubMenu_MDF[4];
|
||||
#ifdef ENABLE_ALARM
|
||||
extern const char gSubMenu_AL_MOD[2][5];
|
||||
#endif
|
||||
extern const char gSubMenu_D_RSP[4][11];
|
||||
extern const char gSubMenu_PTT_ID[5][15];
|
||||
extern const char* gSubMenu_PTT_ID[5];
|
||||
extern const char gSubMenu_PONMSG[4][8];
|
||||
extern const char gSubMenu_ROGER[3][9];
|
||||
extern const char* gSubMenu_ROGER[3];
|
||||
extern const char gSubMenu_RESET[2][4];
|
||||
extern const char gSubMenu_F_LOCK[6][4];
|
||||
extern const char gSubMenu_BACKLIGHT[8][7];
|
||||
@@ -152,10 +154,15 @@ extern const char gSubMenu_RX_TX[4][6];
|
||||
extern const char gSubMenu_BAT_TXT[3][8];
|
||||
|
||||
extern const char gSubMenu_SCRAMBLER[11][7];
|
||||
|
||||
typedef struct {char* name; uint8_t id;} t_sidefunction;
|
||||
extern const uint8_t gSubMenu_SIDEFUNCTIONS_size;
|
||||
extern const t_sidefunction* gSubMenu_SIDEFUNCTIONS;
|
||||
|
||||
extern bool gIsInSubMenu;
|
||||
|
||||
extern uint8_t gMenuCursor;
|
||||
int GetCurrentMenuId();
|
||||
extern int8_t gMenuScrollDirection;
|
||||
extern int32_t gSubMenuSelection;
|
||||
|
||||
|
||||
49
ui/status.c
49
ui/status.c
@@ -85,19 +85,10 @@ void UI_DisplayStatus(const bool test_display)
|
||||
x1 = x + 10;
|
||||
}
|
||||
else
|
||||
#ifdef ENABLE_FMRADIO
|
||||
// FM indicator
|
||||
if (gFmRadioMode || test_display)
|
||||
{
|
||||
memmove(line + x, BITMAP_FM, sizeof(BITMAP_FM));
|
||||
x1 = x + sizeof(BITMAP_FM);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
// SCAN indicator
|
||||
if (gScanStateDir != SCAN_OFF || gScreenToDisplay == DISPLAY_SCANNER || test_display)
|
||||
{
|
||||
if (gNextMrChannel <= MR_CHANNEL_LAST)
|
||||
if (gNextMrChannel <= MR_CHANNEL_LAST && gScreenToDisplay != DISPLAY_SCANNER)
|
||||
{ // channel mode
|
||||
if (gEeprom.SCAN_LIST_DEFAULT == 0)
|
||||
UI_PrintStringSmallBuffer("1", line + x);
|
||||
@@ -123,28 +114,25 @@ void UI_DisplayStatus(const bool test_display)
|
||||
memmove(line + x, BITMAP_VoicePrompt, sizeof(BITMAP_VoicePrompt));
|
||||
x1 = x + sizeof(BITMAP_VoicePrompt);
|
||||
}
|
||||
x += sizeof(BITMAP_VoicePrompt);
|
||||
x += sizeof(BITMAP_VoicePrompt) + 1;
|
||||
#else
|
||||
// hmmm, what to put in it's place
|
||||
#endif
|
||||
|
||||
// DUAL-WATCH indicator
|
||||
if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF || test_display)
|
||||
{
|
||||
if (gDualWatchActive || test_display)
|
||||
memmove(line + x, BITMAP_TDR1, sizeof(BITMAP_TDR1));
|
||||
else
|
||||
memmove(line + x, BITMAP_TDR2, sizeof(BITMAP_TDR2));
|
||||
x++;
|
||||
if(gScreenToDisplay != DISPLAY_SCANNER) {
|
||||
uint8_t dw = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2;
|
||||
if(dw == 1 || dw == 3 || test_display) { // DWR - dual watch + respond
|
||||
if(gDualWatchActive || test_display)
|
||||
memmove(line + x, BITMAP_TDR1, sizeof(BITMAP_TDR1) - (dw==1?0:5));
|
||||
else
|
||||
memmove(line + x + 3, BITMAP_TDR2, sizeof(BITMAP_TDR2));
|
||||
}
|
||||
else if(dw == 2) { // XB - crossband
|
||||
memmove(line + x, BITMAP_XB, sizeof(BITMAP_XB));
|
||||
}
|
||||
}
|
||||
x += sizeof(BITMAP_TDR1);
|
||||
|
||||
// CROSS-VFO indicator
|
||||
if (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF || test_display)
|
||||
{
|
||||
memmove(line + x, BITMAP_XB, sizeof(BITMAP_XB));
|
||||
x1 = x + sizeof(BITMAP_XB);
|
||||
}
|
||||
x += sizeof(BITMAP_XB);
|
||||
x += sizeof(BITMAP_TDR1) + 2;
|
||||
|
||||
#ifdef ENABLE_VOX
|
||||
// VOX indicator
|
||||
@@ -153,9 +141,12 @@ void UI_DisplayStatus(const bool test_display)
|
||||
memmove(line + x, BITMAP_VOX, sizeof(BITMAP_VOX));
|
||||
x1 = x + sizeof(BITMAP_VOX);
|
||||
}
|
||||
x += sizeof(BITMAP_VOX);
|
||||
x += sizeof(BITMAP_VOX) + 2;
|
||||
#endif
|
||||
|
||||
x = MAX(x, 61u);
|
||||
x1 = x;
|
||||
|
||||
// KEY-LOCK indicator
|
||||
if (gEeprom.KEY_LOCK || test_display)
|
||||
{
|
||||
@@ -218,7 +209,7 @@ void UI_DisplayStatus(const bool test_display)
|
||||
x += sizeof(BITMAP_USB_C);
|
||||
|
||||
// BATTERY LEVEL indicator
|
||||
UI_DrawBattery(line + x, gBatteryDisplayLevel, gLowBattery);
|
||||
UI_DrawBattery(line + x, gBatteryDisplayLevel, gLowBatteryBlink);
|
||||
|
||||
// **************
|
||||
|
||||
|
||||
Reference in New Issue
Block a user