Compare commits

...

10 Commits

Author SHA1 Message Date
f4ff2e6048 Apply my changes v1
Some checks failed
Build Firmware / build (push) Failing after 3m21s
2025-02-27 16:49:04 +01:00
Armel FAUVEAU
ba5257f2f6 Merge pull request #367 from armel/feature_update_v4
Feature update v4
2025-02-22 02:48:10 +01:00
Armel FAUVEAU
aee4406cff Prepare new v4.0 2025-02-22 02:46:47 +01:00
Armel FAUVEAU
448a201308 Update README 2025-02-20 03:59:31 +01:00
Armel FAUVEAU
9a312c3526 Rename Voxless to Basic 2025-02-20 03:56:05 +01:00
Armel FAUVEAU
7f146a5857 Fix bug if BOOT_MODE_F_LOCK 2025-02-19 02:11:39 +01:00
Armel FAUVEAU
710ff8fac1 Fix directive 2025-02-19 01:44:30 +01:00
Armel FAUVEAU
08af06564c Refactoring 2025-02-19 00:43:00 +01:00
Armel FAUVEAU
03f761348b Fix condition 2025-02-18 23:26:58 +01:00
Armel FAUVEAU
96acae8014 Remove comment 2025-02-18 22:14:51 +01:00
48 changed files with 3906 additions and 4622 deletions

View File

@@ -4,12 +4,12 @@
# 1 = enable
# ---- STOCK QUANSHENG FEATURES ----
ENABLE_FMRADIO ?= 0
ENABLE_FMRADIO ?= 1
ENABLE_UART ?= 1
ENABLE_AIRCOPY ?= 0
ENABLE_NOAA ?= 0
ENABLE_VOICE ?= 0
ENABLE_VOX ?= 1
ENABLE_VOX ?= 0
ENABLE_ALARM ?= 0
ENABLE_TX1750 ?= 1
ENABLE_PWRON_PASSWORD ?= 0
@@ -17,15 +17,15 @@ ENABLE_DTMF_CALLING ?= 0
ENABLE_FLASHLIGHT ?= 1
# ---- CUSTOM MODS ----
ENABLE_SPECTRUM ?= 0
ENABLE_BIG_FREQ ?= 1
ENABLE_SMALL_BOLD ?= 1
ENABLE_SPECTRUM ?= 1
ENABLE_BIG_FREQ ?= 0
ENABLE_SMALL_BOLD ?= 0
ENABLE_CUSTOM_MENU_LAYOUT ?= 1
ENABLE_KEEP_MEM_NAME ?= 1
ENABLE_WIDE_RX ?= 1
ENABLE_TX_WHEN_AM ?= 0
ENABLE_F_CAL_MENU ?= 0
ENABLE_CTCSS_TAIL_PHASE_SHIFT ?= 0
ENABLE_F_CAL_MENU ?= 1
ENABLE_CTCSS_TAIL_PHASE_SHIFT ?= 1
ENABLE_BOOT_BEEPS ?= 0
ENABLE_SHOW_CHARGE_LEVEL ?= 0
ENABLE_REVERSE_BAT_SYMBOL ?= 0
@@ -36,26 +36,26 @@ ENABLE_FASTER_CHANNEL_SCAN ?= 1
ENABLE_RSSI_BAR ?= 1
ENABLE_AUDIO_BAR ?= 1
ENABLE_COPY_CHAN_TO_VFO ?= 1
ENABLE_REDUCE_LOW_MID_TX_POWER ?= 0
ENABLE_BYP_RAW_DEMODULATORS ?= 0
ENABLE_BLMIN_TMP_OFF ?= 0
ENABLE_REDUCE_LOW_MID_TX_POWER ?= 1
ENABLE_BYP_RAW_DEMODULATORS ?= 1
ENABLE_BLMIN_TMP_OFF ?= 1
ENABLE_SCAN_RANGES ?= 1
ENABLE_FEAT_F4HWN ?= 1
ENABLE_FEAT_F4HWN_SCREENSHOT ?= 0
ENABLE_FEAT_F4HWN_SPECTRUM ?= 1
ENABLE_FEAT_F4HWN_RX_TX_TIMER ?= 1
ENABLE_FEAT_F4HWN_RX_TX_TIMER ?= 0
ENABLE_FEAT_F4HWN_CHARGING_C ?= 0
ENABLE_FEAT_F4HWN_SLEEP ?= 1
ENABLE_FEAT_F4HWN_RESUME_STATE ?= 1
ENABLE_FEAT_F4HWN_NARROWER ?= 1
ENABLE_FEAT_F4HWN_INV ?= 1
ENABLE_FEAT_F4HWN_INV ?= 0
ENABLE_FEAT_F4HWN_CTR ?= 1
ENABLE_FEAT_F4HWN_RESCUE_OPS ?= 0
ENABLE_FEAT_F4HWN_VOL ?= 0
ENABLE_FEAT_F4HWN_VOL ?= 1
ENABLE_FEAT_F4HWN_RESET_CHANNEL ?= 0
ENABLE_FEAT_F4HWN_PMR ?= 0
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS ?= 0
ENABLE_FEAT_F4HWN_CA ?= 1
ENABLE_FEAT_F4HWN_CA ?= 0
ENABLE_FEAT_F4HWN_DEBUG ?= 0
ENABLE_REGA ?= 0
@@ -138,6 +138,7 @@ OBJS += app/app.o
OBJS += app/chFrScanner.o
OBJS += app/common.o
OBJS += app/dtmf.o
OBJS += app/fskmodem.o
ifeq ($(ENABLE_REGA),1)
OBJS += app/rega.o
endif

View File

@@ -97,6 +97,8 @@ Special thanks to Jean-Cyrille F6IWW (2 times), Fabrice 14RC123, David F4BPP, Ol
* improve ScnRev menu (CARRIER from 250ms to 20s, STOP, TIMEOUT from 5s to 2m)
* improve KeyLck menu (OFF, delay from 15s to 10m)
* add HAM CA F Lock band (for Canadian zone),
* add PMR 446 F Lock band,
* add FRS/GMRS/MURS F Lock band,
* remove blink and SOS functionality,
* remove AM Fix menu (AM Fix is ENABLED by default),
* add support of 3500mAh battery,
@@ -116,13 +118,14 @@ Special thanks to Jean-Cyrille F6IWW (2 times), Fabrice 14RC123, David F4BPP, Ol
* scan lists [1, 2, 3],
* scan all (all channels with ou without list),
* add scan list shortcuts,
* add scan resume mode on startup,
* add resume mode on startup (scan, bandscope and broadcast FM),
* new actions:
* RX MODE,
* MAIN ONLY,
* PTT,
* WIDE NARROW,
* 1750Hz,
* MUTE,
* POWER HIGH (RescueOps),
* REMOVE OFFSET (RescueOps),
* new key combinations:

View File

@@ -36,7 +36,7 @@
#include "screenshot.h"
#endif
static const uint16_t Obfuscation[8] = { 0x6C16, 0xE614, 0x912E, 0x400D, 0x3521, 0x40D5, 0x0313, 0x80E9 };
static const uint16_t Obfuscation[8] = {0x6C16, 0xE614, 0x912E, 0x400D, 0x3521, 0x40D5, 0x0313, 0x80E9};
AIRCOPY_State_t gAircopyState;
uint16_t gAirCopyBlockNumber;
@@ -45,16 +45,13 @@ uint8_t gAirCopyIsSendMode;
uint16_t g_FSK_Buffer[36];
static void AIRCOPY_clear()
{
for (uint8_t i = 0; i < 15; i++)
{
static void AIRCOPY_clear() {
for (uint8_t i = 0; i < 15; i++) {
crc[i] = 0;
}
}
bool AIRCOPY_SendMessage(void)
{
bool AIRCOPY_SendMessage(void) {
static uint8_t gAircopySendCountdown = 1;
if (gAircopyState != AIRCOPY_TRANSFER) {
@@ -77,9 +74,9 @@ bool AIRCOPY_SendMessage(void)
if (++gAirCopyBlockNumber >= 0x78) {
gAircopyState = AIRCOPY_COMPLETE;
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
getScreenShot();
#endif
#endif
//NVIC_SystemReset();
}
@@ -94,8 +91,7 @@ bool AIRCOPY_SendMessage(void)
return 0;
}
void AIRCOPY_StorePacket(void)
{
void AIRCOPY_StorePacket(void) {
if (gFSKWriteIndex < 36) {
return;
}
@@ -138,16 +134,15 @@ void AIRCOPY_StorePacket(void)
if (Offset == 0x1E00) {
gAircopyState = AIRCOPY_COMPLETE;
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
getScreenShot();
#endif
#endif
}
gAirCopyBlockNumber++;
}
static void AIRCOPY_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{
static void AIRCOPY_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
if (bKeyHeld || !bKeyPressed) {
return;
}
@@ -194,8 +189,7 @@ static void AIRCOPY_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
gRequestDisplayScreen = DISPLAY_AIRCOPY;
}
static void AIRCOPY_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
{
static void AIRCOPY_Key_EXIT(bool bKeyPressed, bool bKeyHeld) {
if (bKeyHeld || !bKeyPressed) {
return;
}
@@ -220,8 +214,7 @@ static void AIRCOPY_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
gRequestDisplayScreen = DISPLAY_AIRCOPY;
}
static void AIRCOPY_Key_MENU(bool bKeyPressed, bool bKeyHeld)
{
static void AIRCOPY_Key_MENU(bool bKeyPressed, bool bKeyHeld) {
if (bKeyHeld || !bKeyPressed) {
return;
}
@@ -242,8 +235,7 @@ static void AIRCOPY_Key_MENU(bool bKeyPressed, bool bKeyHeld)
gAircopyState = AIRCOPY_TRANSFER;
}
void AIRCOPY_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{
void AIRCOPY_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
switch (Key) {
case KEY_0:
case KEY_1:

640
app/app.c

File diff suppressed because it is too large Load Diff

View File

@@ -24,12 +24,20 @@
#include "radio.h"
void APP_EndTransmission(void);
void APP_StartListening(FUNCTION_Type_t function);
uint32_t APP_SetFreqByStepAndLimits(VFO_Info_t *pInfo, int8_t direction, uint32_t lower, uint32_t upper);
uint32_t APP_SetFrequencyByStep(VFO_Info_t *pInfo, int8_t direction);
void APP_Update(void);
void APP_TimeSlice10ms(void);
void APP_TimeSlice500ms(void);
void APP_EndTransmission(void);
#endif

View File

@@ -248,7 +248,7 @@ void DTMF_HandleRequest(void)
return;
}
if (!gRxVfo->DTMF_DECODING_ENABLE && !gSetting_KILLED)
if (!gRxVfo->DTMF_DECODING_ENABLE)
{ // D-DCD is disabled or we're alive
DTMF_clear_RX();
return;
@@ -266,28 +266,28 @@ void DTMF_HandleRequest(void)
if (CompareMessage(gDTMF_RX + Offset, String, strlen(String), true))
{ // bugger
if (gEeprom.PERMIT_REMOTE_KILL)
{
gSetting_KILLED = true; // oooerr !
DTMF_clear_RX();
SETTINGS_SaveSettings();
gDTMF_ReplyState = DTMF_REPLY_AB;
#ifdef ENABLE_FMRADIO
if (gFmRadioMode)
{
FM_TurnOff();
GUI_SelectNextDisplay(DISPLAY_MAIN);
}
#endif
}
else
{
// if (gEeprom.PERMIT_REMOTE_KILL)
// {
// gSetting_KILLED = true; // oooerr !
//
// DTMF_clear_RX();
//
// SETTINGS_SaveSettings();
//
// gDTMF_ReplyState = DTMF_REPLY_AB;
//
// #ifdef ENABLE_FMRADIO
// if (gFmRadioMode)
// {
// FM_TurnOff();
// GUI_SelectNextDisplay(DISPLAY_MAIN);
// }
// #endif
// }
// else
// {
gDTMF_ReplyState = DTMF_REPLY_NONE;
}
// }
gDTMF_CallState = DTMF_CALL_STATE_NONE;
@@ -297,30 +297,30 @@ void DTMF_HandleRequest(void)
}
}
if (gDTMF_RX_index >= 9)
{ // look for the REVIVE code
sprintf(String, "%s%c%s", gEeprom.ANI_DTMF_ID, gEeprom.DTMF_SEPARATE_CODE, gEeprom.REVIVE_CODE);
Offset = gDTMF_RX_index - strlen(String);
if (CompareMessage(gDTMF_RX + Offset, String, strlen(String), true))
{ // shit, we're back !
gSetting_KILLED = false;
DTMF_clear_RX();
SETTINGS_SaveSettings();
gDTMF_ReplyState = DTMF_REPLY_AB;
gDTMF_CallState = DTMF_CALL_STATE_NONE;
gUpdateDisplay = true;
gUpdateStatus = true;
return;
}
}
// if (gDTMF_RX_index >= 9)
// { // look for the REVIVE code
//
// sprintf(String, "%s%c%s", gEeprom.ANI_DTMF_ID, gEeprom.DTMF_SEPARATE_CODE, gEeprom.REVIVE_CODE);
//
// Offset = gDTMF_RX_index - strlen(String);
//
// if (CompareMessage(gDTMF_RX + Offset, String, strlen(String), true))
// { // shit, we're back !
//
// gSetting_KILLED = false;
//
// DTMF_clear_RX();
//
// SETTINGS_SaveSettings();
//
// gDTMF_ReplyState = DTMF_REPLY_AB;
// gDTMF_CallState = DTMF_CALL_STATE_NONE;
//
// gUpdateDisplay = true;
// gUpdateStatus = true;
// return;
// }
// }
if (gDTMF_RX_index >= 2)
{ // look for ACK reply
@@ -360,7 +360,7 @@ void DTMF_HandleRequest(void)
}
}
if (gSetting_KILLED || gDTMF_CallState != DTMF_CALL_STATE_NONE)
if (gDTMF_CallState != DTMF_CALL_STATE_NONE)
{ // we've been killed or expecting a reply
return;
}

View File

@@ -20,15 +20,21 @@
#include "app/app.h"
#include "app/chFrScanner.h"
#include "app/common.h"
#ifdef ENABLE_FMRADIO
#include "app/fm.h"
#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"
@@ -43,32 +49,46 @@
#include "ui/ui.h"
#include <stdlib.h>
static void toggle_chan_scanlist(void)
{ // toggle the selected channels scanlist setting
#define T9Count 9
const char T9Table[10][T9Count] = {
{'#', '(', ')', ';', ':', '<', '>', '/', '0'},
{',', '.', '?', '&', '!', ' ', '-', '_', '1'},
{'a', 'b', 'c', 'A', 'B', 'C', '[', ']', '2'},
{'d', 'e', 'f', 'D', 'E', 'F', '@', '%', '3'},
{'g', 'h', 'i', 'G', 'H', 'I', '~', '$', '4'},
{'j', 'k', 'l', 'J', 'K', 'L', '|', '*', '5'},
{'m', 'n', 'o', 'M', 'N', 'O', '{', '}', '6'},
{'p', 'q', 'r', 's', 'P', 'Q', 'R', 'S', '7'},
{'t', 'u', 'v', 'T', 'U', 'V', '"', '\'', '8'},
{'w', 'x', 'y', 'z', 'W', 'X', 'Y', 'Z', '9'}
};
static void toggle_chan_scanlist(void) { // toggle the selected channels scanlist setting
if (SCANNER_IsScanning())
return;
if(!IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE)) {
if (!IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE)) {
#ifdef ENABLE_SCAN_RANGES
gScanRangeStart = gScanRangeStart ? 0 : gTxVfo->pRX->Frequency;
gScanRangeStop = gEeprom.VfoInfo[!gEeprom.TX_VFO].freq_config_RX.Frequency;
if(gScanRangeStart > gScanRangeStop)
if (gScanRangeStart > gScanRangeStop)
SWAP(gScanRangeStart, gScanRangeStop);
#endif
return;
}
// Remove exclude
if(gMR_ChannelExclude[gTxVfo->CHANNEL_SAVE] == true)
{
if (gMR_ChannelExclude[gTxVfo->CHANNEL_SAVE] == true) {
gMR_ChannelExclude[gTxVfo->CHANNEL_SAVE] = false;
return;
}
uint8_t scanTmp = gTxVfo->SCANLIST1_PARTICIPATION | (gTxVfo->SCANLIST2_PARTICIPATION << 1) | (gTxVfo->SCANLIST3_PARTICIPATION << 2);
uint8_t scanTmp = gTxVfo->SCANLIST1_PARTICIPATION | (gTxVfo->SCANLIST2_PARTICIPATION << 1) |
(gTxVfo->SCANLIST3_PARTICIPATION << 2);
scanTmp = (scanTmp++ < 7) ? scanTmp: 0;
scanTmp = (scanTmp++ < 7) ? scanTmp : 0;
gTxVfo->SCANLIST1_PARTICIPATION = (scanTmp >> 0) & 0x01;
gTxVfo->SCANLIST2_PARTICIPATION = (scanTmp >> 1) & 0x01;
@@ -80,8 +100,7 @@ static void toggle_chan_scanlist(void)
gFlagResetVfos = true;
}
static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
{
static void processFKeyFunction(const KEY_Code_t Key, const bool beep) {
uint8_t Vfo = gEeprom.TX_VFO;
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
@@ -106,9 +125,9 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
switch (Key) {
case KEY_0:
#ifdef ENABLE_FMRADIO
#ifdef ENABLE_FMRADIO
ACTION_FM();
#endif
#endif
break;
case KEY_1:
@@ -126,16 +145,14 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
if (gScanStateDir != SCAN_OFF) {
if (gCurrentFunction != FUNCTION_INCOMING ||
gRxReceptionMode == RX_MODE_NONE ||
gScanPauseDelayIn_10ms == 0)
{ // scan is running (not paused)
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
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo])) { // copy channel to VFO, then swap to the VFO
gEeprom.ScreenChannel[vfo] = FREQ_CHANNEL_FIRST + gEeprom.VfoInfo[vfo].Band;
gEeprom.VfoInfo[vfo].CHANNEL_SAVE = gEeprom.ScreenChannel[vfo];
@@ -156,7 +173,7 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
}
#ifdef ENABLE_WIDE_RX
if(gTxVfo->Band == BAND7_470MHz && gTxVfo->pRX->Frequency < _1GHz_in_KHz) {
if (gTxVfo->Band == BAND7_470MHz && gTxVfo->pRX->Frequency < _1GHz_in_KHz) {
gTxVfo->pRX->Frequency = _1GHz_in_KHz;
return;
}
@@ -166,7 +183,7 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
if (gTxVfo->Band == BAND5_350MHz && !gSetting_350EN) {
// skip if not enabled
gTxVfo->Band += 1;
} else if (gTxVfo->Band >= BAND_N_ELEM){
} else if (gTxVfo->Band >= BAND_N_ELEM) {
// go arround if overflowed
gTxVfo->Band = BAND1_50MHz;
}
@@ -185,18 +202,18 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
break;
case KEY_2:
#ifdef ENABLE_FEAT_F4HWN
#ifdef ENABLE_FEAT_F4HWN
gVfoConfigureMode = VFO_CONFIGURE;
#endif
#endif
COMMON_SwitchVFOs();
if (beep)
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
break;
case KEY_3:
#ifdef ENABLE_FEAT_F4HWN
#ifdef ENABLE_FEAT_F4HWN
gVfoConfigureMode = VFO_CONFIGURE;
#endif
#endif
COMMON_SwitchVFOMode();
if (beep)
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
@@ -217,7 +234,7 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
break;
case KEY_5:
if(beep) {
if (beep) {
#ifdef ENABLE_NOAA
if (!IS_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE)) {
gEeprom.ScreenChannel[Vfo] = gEeprom.NoaaChannel[gEeprom.TX_VFO];
@@ -234,8 +251,7 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
APP_RunSpectrum();
gRequestDisplayScreen = DISPLAY_MAIN;
#endif
}
else {
} else {
toggle_chan_scanlist();
}
@@ -278,24 +294,22 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
#ifdef ENABLE_FEAT_F4HWN // Set Squelch F + UP or Down and Step F + SIDE1 or F + SIDE2
case KEY_UP:
gEeprom.SQUELCH_LEVEL = (gEeprom.SQUELCH_LEVEL < 9) ? gEeprom.SQUELCH_LEVEL + 1: 9;
gEeprom.SQUELCH_LEVEL = (gEeprom.SQUELCH_LEVEL < 9) ? gEeprom.SQUELCH_LEVEL + 1 : 9;
gVfoConfigureMode = VFO_CONFIGURE;
gWasFKeyPressed = false;
break;
case KEY_DOWN:
gEeprom.SQUELCH_LEVEL = (gEeprom.SQUELCH_LEVEL > 0) ? gEeprom.SQUELCH_LEVEL - 1: 0;
gEeprom.SQUELCH_LEVEL = (gEeprom.SQUELCH_LEVEL > 0) ? gEeprom.SQUELCH_LEVEL - 1 : 0;
gVfoConfigureMode = VFO_CONFIGURE;
gWasFKeyPressed = false;
break;
case KEY_SIDE1:
uint8_t a = FREQUENCY_GetSortedIdxFromStepIdx(gTxVfo->STEP_SETTING);
if (a < STEP_N_ELEM - 1)
{
if (a < STEP_N_ELEM - 1) {
gTxVfo->STEP_SETTING = FREQUENCY_GetStepIdxFromSortedIdx(a + 1);
}
if (IS_FREQ_CHANNEL(gTxVfo->CHANNEL_SAVE))
{
if (IS_FREQ_CHANNEL(gTxVfo->CHANNEL_SAVE)) {
gRequestSaveChannel = 1;
}
gVfoConfigureMode = VFO_CONFIGURE;
@@ -303,12 +317,10 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
break;
case KEY_SIDE2:
uint8_t b = FREQUENCY_GetSortedIdxFromStepIdx(gTxVfo->STEP_SETTING);
if (b > 0)
{
if (b > 0) {
gTxVfo->STEP_SETTING = FREQUENCY_GetStepIdxFromSortedIdx(b - 1);
}
if (IS_FREQ_CHANNEL(gTxVfo->CHANNEL_SAVE))
{
if (IS_FREQ_CHANNEL(gTxVfo->CHANNEL_SAVE)) {
gRequestSaveChannel = 1;
}
gVfoConfigureMode = VFO_CONFIGURE;
@@ -326,8 +338,7 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
}
}
void channelMove(uint16_t Channel)
{
void channelMove(uint16_t Channel) {
const uint8_t Vfo = gEeprom.TX_VFO;
if (!RADIO_CheckValidChannel(Channel, false, 0)) {
@@ -340,12 +351,12 @@ void channelMove(uint16_t Channel)
gBeepToPlay = BEEP_NONE;
#ifdef ENABLE_VOICE
#ifdef ENABLE_VOICE
gAnotherVoiceID = (VOICE_ID_t)Key;
#endif
#endif
gEeprom.MrChannel[Vfo] = (uint8_t)Channel;
gEeprom.ScreenChannel[Vfo] = (uint8_t)Channel;
gEeprom.MrChannel[Vfo] = (uint8_t) Channel;
gEeprom.ScreenChannel[Vfo] = (uint8_t) Channel;
//gRequestSaveVFO = true;
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
@@ -400,8 +411,7 @@ void channelMoveSwitch(void) {
}
}
static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{
static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
if (bKeyHeld) { // key held down
if (bKeyPressed) {
if (gScreenToDisplay == DISPLAY_MAIN) {
@@ -419,21 +429,20 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
return;
}
if (bKeyPressed)
{ // key is pressed
if (bKeyPressed) { // key is pressed
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL; // beep when key is pressed
return; // don't use the key till it's released
}
if (!gWasFKeyPressed) { // F-key wasn't pressed
if (gScanStateDir != SCAN_OFF){
switch(Key) {
if (gScanStateDir != SCAN_OFF) {
switch (Key) {
case KEY_0...KEY_5:
gEeprom.SCAN_LIST_DEFAULT = Key;
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
SETTINGS_WriteCurrentState();
#endif
#endif
break;
default:
break;
@@ -453,9 +462,9 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
gKeyInputCountdown = (key_input_timeout_500ms / 4); // short time...
#ifdef ENABLE_VOICE
#ifdef ENABLE_VOICE
gAnotherVoiceID = (VOICE_ID_t)Key;
#endif
#endif
return;
}
@@ -463,8 +472,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
// #ifdef ENABLE_NOAA
// if (!IS_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE))
// #endif
if (IS_FREQ_CHANNEL(gTxVfo->CHANNEL_SAVE))
{ // user is entering a frequency
if (IS_FREQ_CHANNEL(gTxVfo->CHANNEL_SAVE)) { // user is entering a frequency
#ifdef ENABLE_VOICE
gAnotherVoiceID = (VOICE_ID_t)Key;
@@ -479,7 +487,8 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
return;
}
gKeyInputCountdown = (gInputBoxIndex == totalDigits) ? (key_input_timeout_500ms / 16) : (key_input_timeout_500ms / 3);
gKeyInputCountdown = (gInputBoxIndex == totalDigits) ? (key_input_timeout_500ms / 16) : (
key_input_timeout_500ms / 3);
const char *inputStr = INPUTBOX_GetAscii();
uint8_t inputLength = gInputBoxIndex;
@@ -500,12 +509,10 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
// clamp the frequency entered to some valid value
if (Frequency < frequencyBandTable[0].lower) {
Frequency = frequencyBandTable[0].lower;
}
else if (Frequency >= BX4819_band1.upper && Frequency < BX4819_band2.lower) {
} else if (Frequency >= BX4819_band1.upper && Frequency < BX4819_band2.lower) {
const uint32_t center = (BX4819_band1.upper + BX4819_band2.lower) / 2;
Frequency = (Frequency < center) ? BX4819_band1.upper : BX4819_band2.lower;
}
else if (Frequency > frequencyBandTable[BAND_N_ELEM - 1].upper) {
} else if (Frequency > frequencyBandTable[BAND_N_ELEM - 1].upper) {
Frequency = frequencyBandTable[BAND_N_ELEM - 1].upper;
}
@@ -523,8 +530,8 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
Frequency = FREQUENCY_RoundToStep(Frequency, gTxVfo->StepFrequency);
if (Frequency >= BX4819_band1.upper && Frequency < BX4819_band2.lower)
{ // clamp the frequency to the limit
if (Frequency >= BX4819_band1.upper &&
Frequency < BX4819_band2.lower) { // clamp the frequency to the limit
const uint32_t center = (BX4819_band1.upper + BX4819_band2.lower) / 2;
Frequency = (Frequency < center) ? BX4819_band1.upper - gTxVfo->StepFrequency : BX4819_band2.lower;
}
@@ -535,14 +542,14 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
return;
}
#ifdef ENABLE_NOAA
#ifdef ENABLE_NOAA
else
if (IS_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE))
{ // user is entering NOAA channel
if (gInputBoxIndex != 2) {
#ifdef ENABLE_VOICE
#ifdef ENABLE_VOICE
gAnotherVoiceID = (VOICE_ID_t)Key;
#endif
#endif
gRequestDisplayScreen = DISPLAY_MAIN;
return;
}
@@ -552,9 +559,9 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
uint8_t Channel = (gInputBox[0] * 10) + gInputBox[1];
if (Channel >= 1 && Channel <= ARRAY_SIZE(NoaaFrequencyTable)) {
Channel += NOAA_CHANNEL_FIRST;
#ifdef ENABLE_VOICE
#ifdef ENABLE_VOICE
gAnotherVoiceID = (VOICE_ID_t)Key;
#endif
#endif
gEeprom.NoaaChannel[Vfo] = Channel;
gEeprom.ScreenChannel[Vfo] = Channel;
gRequestSaveVFO = true;
@@ -562,7 +569,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
return;
}
}
#endif
#endif
gRequestDisplayScreen = DISPLAY_MAIN;
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
@@ -572,13 +579,10 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
gWasFKeyPressed = false;
gUpdateStatus = true;
if(Key == 8)
{
if (Key == 8) {
ACTION_BackLightOnDemand();
return;
}
else if(Key == 9)
{
} else if (Key == 9) {
ACTION_BackLight();
return;
}
@@ -586,8 +590,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
processFKeyFunction(Key, true);
}
static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
{
static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld) {
if (!bKeyHeld && bKeyPressed) { // exit key pressed
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
@@ -615,8 +618,7 @@ static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
if (gInputBoxIndex == 0)
gAnotherVoiceID = VOICE_ID_CANCEL;
#endif
}
else {
} else {
gScanKeepResult = false;
CHFRSCANNER_Stop();
@@ -636,8 +638,8 @@ static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
}
if (bKeyHeld && bKeyPressed) { // exit key held down
if (gInputBoxIndex > 0 || gDTMF_InputBox_Index > 0 || gDTMF_InputMode)
{ // cancel key input mode (channel/frequency entry)
if (gInputBoxIndex > 0 || gDTMF_InputBox_Index > 0 ||
gDTMF_InputMode) { // cancel key input mode (channel/frequency entry)
gDTMF_InputMode = false;
gDTMF_InputBox_Index = 0;
memset(gDTMF_String, 0, sizeof(gDTMF_String));
@@ -648,20 +650,17 @@ static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
}
}
static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
{
static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld) {
if (bKeyPressed && !bKeyHeld) // menu key pressed
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
if (bKeyHeld) { // menu key held down (long press)
if (bKeyPressed) { // long press MENU key
#ifdef ENABLE_FEAT_F4HWN
#ifdef ENABLE_FEAT_F4HWN
// Exclude work with list 1, 2, 3 or all list
if(gScanStateDir != SCAN_OFF)
{
if(FUNCTION_IsRx())
{
if (gScanStateDir != SCAN_OFF) {
if (FUNCTION_IsRx()) {
gMR_ChannelExclude[gTxVfo->CHANNEL_SAVE] = true;
gVfoConfigureMode = VFO_CONFIGURE;
@@ -674,7 +673,7 @@ static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
return;
}
#endif
#endif
gWasFKeyPressed = false;
@@ -704,28 +703,26 @@ static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
return;
}
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
if(gEeprom.MENU_LOCK == false) {
#endif
#endif
gFlagRefreshSetting = true;
gRequestDisplayScreen = DISPLAY_MENU;
#ifdef ENABLE_VOICE
#ifdef ENABLE_VOICE
gAnotherVoiceID = VOICE_ID_MENU;
#endif
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
}
#endif
}
else {
#endif
} else {
gRequestDisplayScreen = DISPLAY_MAIN;
}
}
}
static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
{
static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld) {
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
if(gEeprom.MENU_LOCK == true) {
@@ -742,7 +739,7 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
return;
}
if (bKeyHeld && !gWasFKeyPressed){ // long press
if (bKeyHeld && !gWasFKeyPressed) { // long press
if (!bKeyPressed) // released
return;
@@ -774,14 +771,13 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
if (!gWasFKeyPressed) // pressed without the F-key
{
if (gScanStateDir == SCAN_OFF
#ifdef ENABLE_NOAA
#ifdef ENABLE_NOAA
&& !IS_NOAA_CHANNEL(gTxVfo->CHANNEL_SAVE)
#endif
#ifdef ENABLE_SCAN_RANGES
#endif
#ifdef ENABLE_SCAN_RANGES
&& gScanRangeStart == 0
#endif
)
{ // start entering a DTMF string
) { // start entering a DTMF string
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
memcpy(gDTMF_InputBox, gDTMF_String, MIN(sizeof(gDTMF_InputBox), sizeof(gDTMF_String) - 1));
gDTMF_InputBox_Index = 0;
@@ -790,12 +786,9 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
gKeyInputCountdown = key_input_timeout_500ms;
gRequestDisplayScreen = DISPLAY_MAIN;
}
else
} else
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
}
else
{ // with the F-key
} else { // with the F-key
gWasFKeyPressed = false;
#ifdef ENABLE_NOAA
@@ -816,13 +809,11 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
gUpdateStatus = true;
}
static void MAIN_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
{
static void MAIN_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction) {
#ifdef ENABLE_FEAT_F4HWN // Set Squelch F + UP or Down
if(gWasFKeyPressed) {
switch(Direction)
{
if (gWasFKeyPressed) {
switch (Direction) {
case 1:
processFKeyFunction(KEY_UP, false);
break;
@@ -855,8 +846,7 @@ static void MAIN_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
#endif
return;
}
}
else { // short pressed
} else { // short pressed
if (gInputBoxIndex > 0) {
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
return;
@@ -920,8 +910,13 @@ static void MAIN_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
gPttWasReleased = true;
}
void MAIN_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{
void updatePrevChar(KEY_Code_t Key) {
if (Key != prevKey) {
prevKey = Key;
}
}
void MAIN_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
#ifdef ENABLE_FMRADIO
if (gFmRadioMode && Key != KEY_PTT && Key != KEY_EXIT) {
if (!bKeyHeld && bKeyPressed)
@@ -932,8 +927,7 @@ void MAIN_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
if (gDTMF_InputMode && bKeyPressed && !bKeyHeld) {
const char Character = DTMF_GetCharacter(Key);
if (Character != 0xFF)
{ // add key to DTMF string
if (Character != 0xFF) { // add key to DTMF string
DTMF_Append(Character);
gKeyInputCountdown = key_input_timeout_500ms;
gRequestDisplayScreen = DISPLAY_MAIN;
@@ -949,31 +943,138 @@ void MAIN_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
// Key = KEY_SIDE2; // what's this doing ???
// }
if (Key == KEY_9 && bKeyHeld) {
if (bKeyPressed) {
if (gEnteringSMS == SMS_NOT_ENTERING) {
gEnteringSMS = SMS_ENTERING_DEST;
updatePrevChar(Key);
return;
}
}
}
if (Key == KEY_MENU) {
if (gEnteringSMS == SMS_ENTERING_DEST) {
if (bKeyPressed) {
memset(dataPacket.data, 0, DataPacketDataSize);
prepareDataPacket();
dataPacket.flags = 126;
gEnteringSMS = SMS_ENTERING_MESSAGE;
}
return;
}
if (gEnteringSMS == SMS_ENTERING_MESSAGE) {
if (bKeyPressed) {
if (strlen((char *) dataPacket.data)) {
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, true);
AUDIO_AudioPathOff();
gEnableSpeaker = false;
RADIO_PrepareTX();
if (gCurrentVfo->SCRAMBLING_TYPE > 0)
BK4819_EnableScramble(gCurrentVfo->SCRAMBLING_TYPE - 1);
else
BK4819_DisableScramble();
MSG_FSKSendData();
AUDIO_AudioPathOn();
gEnableSpeaker = true;
BK4819_ExitTxMute();
MSG_EnableRX(true);
gVfoConfigureMode = VFO_CONFIGURE;
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, false);
dataPTR = dataPacket.data;
memset(dataPacket.data, 0, DataPacketDataSize);
gEnteringSMS = SMS_NOT_ENTERING;
}
}
return;
}
}
if (Key == KEY_EXIT && gEnteringSMS != SMS_NOT_ENTERING) {
if (bKeyHeld) {
if (bKeyPressed) {
gEnteringSMS = SMS_NOT_ENTERING;
dataPTR = dataPacket.data;
memset(dataPacket.data, 0, DataPacketDataSize);
}
} else {
if (bKeyPressed) {
if (gEnteringSMS == SMS_ENTERING_MESSAGE) {
if (dataPacket.data <= dataPTR) {
*dataPTR = '\0';
if (dataPacket.data < dataPTR) {
dataPTR--;
}
*dataPTR = '\0';
}
} else if (gEnteringSMS == SMS_ENTERING_DEST) {
dataPacket.dest /= 10;
}
}
}
updatePrevChar(Key);
return;
}
if (gEnteringSMS != SMS_NOT_ENTERING && !bKeyHeld) {
if (!dataPTR) {
dataPTR = dataPacket.data;
}
if (gEnteringSMS == SMS_ENTERING_MESSAGE) {
if (bKeyPressed) {
if (prevKey != Key) {
dataPTR++;
if (dataPTR - dataPacket.data >= DataPacketDataSize) {
dataPTR = dataPacket.data;
}
prevLetter = 0;
}
*(dataPTR - 1) = T9Table[Key][(prevLetter++) % T9Count];
updatePrevChar(Key);
}
return;
} else if (gEnteringSMS == SMS_ENTERING_DEST) {
if (bKeyPressed) {
dataPacket.dest *= 10;
dataPacket.dest += Key;
prevLetter = 0;
}
return;
}
}
switch (Key) {
#ifdef ENABLE_FEAT_F4HWN
case KEY_SIDE1:
case KEY_SIDE2:
#endif
case KEY_0...KEY_9:
MAIN_Key_DIGITS(Key, bKeyPressed, bKeyHeld);
case
KEY_0...KEY_9
:
MAIN_Key_DIGITS(Key, bKeyPressed, bKeyHeld
);
break;
case KEY_MENU:
MAIN_Key_MENU(bKeyPressed, bKeyHeld);
MAIN_Key_MENU(bKeyPressed, bKeyHeld
);
break;
case KEY_UP:
MAIN_Key_UP_DOWN(bKeyPressed, bKeyHeld, 1);
MAIN_Key_UP_DOWN(bKeyPressed, bKeyHeld,
1);
break;
case KEY_DOWN:
MAIN_Key_UP_DOWN(bKeyPressed, bKeyHeld, -1);
MAIN_Key_UP_DOWN(bKeyPressed, bKeyHeld,
-1);
break;
case KEY_EXIT:
MAIN_Key_EXIT(bKeyPressed, bKeyHeld);
MAIN_Key_EXIT(bKeyPressed, bKeyHeld
);
break;
case KEY_STAR:
MAIN_Key_STAR(bKeyPressed, bKeyHeld);
MAIN_Key_STAR(bKeyPressed, bKeyHeld
);
break;
case KEY_F:
GENERIC_Key_F(bKeyPressed, bKeyHeld);
GENERIC_Key_F(bKeyPressed, bKeyHeld
);
break;
case KEY_PTT:
GENERIC_Key_PTT(bKeyPressed);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -60,8 +60,8 @@ broadcast() {
&& cp f4hwn.broadcast* compiled-firmware/"
}
voxless() {
echo "Voxless compilation..."
basic() {
echo "Basic compilation..."
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make -s \
ENABLE_SPECTRUM=1 \
ENABLE_FMRADIO=1 \
@@ -78,9 +78,9 @@ voxless() {
ENABLE_FEAT_F4HWN_CTR=0 \
ENABLE_FEAT_F4HWN_NARROWER=0 \
ENABLE_FEAT_F4HWN_RESCUE_OPS=0 \
EDITION_STRING=Voxless \
TARGET=f4hwn.voxless \
&& cp f4hwn.voxless* compiled-firmware/"
EDITION_STRING=Basic \
TARGET=f4hwn.basic \
&& cp f4hwn.basic* compiled-firmware/"
}
rescueops() {
@@ -111,8 +111,8 @@ case "$1" in
broadcast)
broadcast
;;
voxless)
voxless
basic)
basic
;;
rescueops)
rescueops
@@ -121,10 +121,10 @@ case "$1" in
bandscope
broadcast
rescueops
voxless
basic
;;
*)
echo "Usage: $0 {custom|bandscope|broadcast|voxless|standard|all}"
echo "Usage: $0 {custom|bandscope|broadcast|basic|standard|all}"
exit 1
;;
esac

View File

@@ -68,12 +68,6 @@ void BACKLIGHT_InitHardware()
static void BACKLIGHT_Sound(void)
{
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_ALL)
{
AUDIO_PlayBeep(BEEP_880HZ_60MS_DOUBLE_BEEP);
AUDIO_PlayBeep(BEEP_880HZ_60MS_DOUBLE_BEEP);
}
gK5startup = false;
}

View File

@@ -74,6 +74,7 @@ enum BK4819_REGISTER_t {
BK4819_REG_3D = 0x3DU,
BK4819_REG_3E = 0x3EU,
BK4819_REG_3F = 0x3FU,
BK4819_REG_40 = 0x40U,
BK4819_REG_43 = 0x43U,
BK4819_REG_46 = 0x46U,
BK4819_REG_47 = 0x47U,
@@ -96,6 +97,7 @@ enum BK4819_REGISTER_t {
BK4819_REG_5A = 0x5AU,
BK4819_REG_5B = 0x5BU,
BK4819_REG_5C = 0x5CU,
BK4819_REG_5E = 0x5EU,
BK4819_REG_5D = 0x5DU,
BK4819_REG_5F = 0x5FU,
BK4819_REG_63 = 0x63U,

View File

@@ -48,6 +48,21 @@ __inline uint16_t scale_freq(const uint16_t freq)
return (((uint32_t)freq * 1353245u) + (1u << 16)) >> 17; // with rounding
}
void BK4819_FskEnableTx(void){
const uint16_t fsk_reg59 = BK4819_ReadRegister(BK4819_REG_59);
BK4819_WriteRegister(BK4819_REG_59, (1u << 11) | fsk_reg59);
}
void BK4819_FskClearFifo(void){
const uint16_t fsk_reg59 = BK4819_ReadRegister(BK4819_REG_59);
BK4819_WriteRegister(BK4819_REG_59, (1u << 15) | (1u << 14) | fsk_reg59);
}
void BK4819_FskEnableRx(void){
const uint16_t fsk_reg59 = BK4819_ReadRegister(BK4819_REG_59);
BK4819_WriteRegister(BK4819_REG_59, (1u << 12) | fsk_reg59);
}
void BK4819_Init(void)
{
GPIO_SetBit(&GPIOC->DATA, GPIOC_PIN_BK4819_SCN);

View File

@@ -77,6 +77,11 @@ void BK4819_InitAGC(bool amModulation);
void BK4819_ToggleGpioOut(BK4819_GPIO_PIN_t Pin, bool bSet);
void BK4819_ResetFSK(void);
void BK4819_FskClearFifo(void);
void BK4819_FskEnableRx(void);
void BK4819_FskEnableTx(void);
void BK4819_SetCDCSSCodeWord(uint32_t CodeWord);
void BK4819_SetCTCSSFrequency(uint32_t BaudRate);
void BK4819_SetTailDetection(const uint32_t freq_10Hz);

View File

@@ -26,6 +26,8 @@ KEY_Code_t gKeyReading0 = KEY_INVALID;
KEY_Code_t gKeyReading1 = KEY_INVALID;
uint16_t gDebounceCounter = 0;
bool gWasFKeyPressed = false;
uint8_t prevLetter = 0;
KEY_Code_t prevKey = KEY_INVALID;
static const struct {

View File

@@ -49,6 +49,8 @@ extern KEY_Code_t gKeyReading0;
extern KEY_Code_t gKeyReading1;
extern uint16_t gDebounceCounter;
extern bool gWasFKeyPressed;
extern uint8_t prevLetter;
extern KEY_Code_t prevKey;
KEY_Code_t KEYBOARD_Poll(void);

View File

@@ -4084,9 +4084,9 @@ called in the following order:
a=>b [label="GetVersion ()", textcolor="gray", linecolor="gray"];
--- [label="Obtain driver features"];
a=>b [label="GetCapabilities (...)", textcolor="gray", linecolor="gray"];
--- [label="Setup software resources"];
--- [label="Sup software resources"];
a=>b [label="Initialize (...)", textcolor="red", linecolor="red"];
--- [label="Setup the peripheral"];
--- [label="Sup the peripheral"];
a=>b [label="PowerControl (ARM_POWER_FULL)", textcolor="red", linecolor="red"];
--- [label="Operate with the peripheral"];
a=>b [label="Data Transfer Functions"];

420
font.c
View File

@@ -18,202 +18,202 @@
// 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} // '->'
#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, 0x04, 0x04, 0x04, 0xFC, 0xF8, /*0x00,*/ 0x07, 0x0F, 0x08, 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
};
//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} // '->'
//#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, 0x04, 0x04, 0x04, 0xFC, 0xF8, /*0x00,*/ 0x07, 0x0F, 0x08, 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
//};
#if 0
// original font
@@ -252,20 +252,20 @@ const uint8_t gFontBig[95 - 1][16 - 2] =
#else
// Terminus font
const uint8_t gFontBigDigits[11][26 - 6] =
{
{/*0x00, 0x00,*/ 0xFC, 0xFE, 0xFE, 0x06, 0x06, 0x06, 0x06, 0xFE, 0xFE, 0xFC, /*0x00,*/ /*0x00, 0x00,*/ 0x3F, 0x7F, 0x7F, 0x60, 0x60, 0x60, 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*/}
};
// const uint8_t gFontBigDigits[11][26 - 6] =
// {
// {/*0x00, 0x00,*/ 0xFC, 0xFE, 0xFE, 0x06, 0x06, 0x06, 0x06, 0xFE, 0xFE, 0xFC, /*0x00,*/ /*0x00, 0x00,*/ 0x3F, 0x7F, 0x7F, 0x60, 0x60, 0x60, 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
/*
const uint8_t gFontSmallDigits[11][7] =

View File

@@ -195,40 +195,40 @@ int32_t TX_freq_check(const uint32_t Frequency)
return 0;
break;
case F_LOCK_FCC:
if (Frequency >= 14400000 && Frequency < 14800000)
return 0;
if (Frequency >= 42000000 && Frequency < 45000000)
return 0;
break;
case F_LOCK_CE:
if (Frequency >= 14400000 && Frequency < 14600000)
return 0;
if (Frequency >= 43000000 && Frequency < 44000000)
return 0;
break;
case F_LOCK_GB:
if (Frequency >= 14400000 && Frequency < 14800000)
return 0;
if (Frequency >= 43000000 && Frequency < 44000000)
return 0;
break;
case F_LOCK_430:
if (Frequency >= frequencyBandTable[BAND3_137MHz].lower && Frequency < 17400000)
return 0;
if (Frequency >= 40000000 && Frequency < 43000000)
return 0;
break;
case F_LOCK_438:
if (Frequency >= frequencyBandTable[BAND3_137MHz].lower && Frequency < 17400000)
return 0;
if (Frequency >= 40000000 && Frequency < 43800000)
return 0;
break;
// case F_LOCK_FCC:
// if (Frequency >= 14400000 && Frequency < 14800000)
// return 0;
// if (Frequency >= 42000000 && Frequency < 45000000)
// return 0;
// break;
//
// case F_LOCK_CE:
// if (Frequency >= 14400000 && Frequency < 14600000)
// return 0;
// if (Frequency >= 43000000 && Frequency < 44000000)
// return 0;
// break;
//
// case F_LOCK_GB:
// if (Frequency >= 14400000 && Frequency < 14800000)
// return 0;
// if (Frequency >= 43000000 && Frequency < 44000000)
// return 0;
// break;
//
// case F_LOCK_430:
// if (Frequency >= frequencyBandTable[BAND3_137MHz].lower && Frequency < 17400000)
// return 0;
// if (Frequency >= 40000000 && Frequency < 43000000)
// return 0;
// break;
//
// case F_LOCK_438:
// if (Frequency >= frequencyBandTable[BAND3_137MHz].lower && Frequency < 17400000)
// return 0;
// if (Frequency >= 40000000 && Frequency < 43800000)
// return 0;
// break;
#ifdef ENABLE_FEAT_F4HWN_PMR
case F_LOCK_PMR:

View File

@@ -17,16 +17,24 @@
#include <string.h>
#include "app/dtmf.h"
#if defined(ENABLE_FMRADIO)
#include "app/fm.h"
#include "app/fm.h"
#endif
#include "audio.h"
#include "bsp/dp32g030/gpio.h"
#include "dcs.h"
#include "driver/backlight.h"
#if defined(ENABLE_FMRADIO)
#include "driver/bk1080.h"
#include "driver/bk1080.h"
#endif
#include "driver/bk4819.h"
#include "driver/gpio.h"
#include "driver/system.h"
@@ -39,18 +47,18 @@
#include "settings.h"
#include "ui/status.h"
#include "ui/ui.h"
#include "app/app.h"
FUNCTION_Type_t gCurrentFunction;
bool FUNCTION_IsRx()
{
bool FUNCTION_IsRx() {
return gCurrentFunction == FUNCTION_MONITOR ||
gCurrentFunction == FUNCTION_INCOMING ||
gCurrentFunction == FUNCTION_RECEIVE;
}
void FUNCTION_Init(void)
{
void FUNCTION_Init(void) {
g_CxCSS_TAIL_Found = false;
g_CDCSS_Lost = false;
g_CTCSS_Lost = false;
@@ -86,8 +94,7 @@ void FUNCTION_Init(void)
gUpdateStatus = true;
}
void FUNCTION_Foreground(const FUNCTION_Type_t PreviousFunction)
{
void FUNCTION_Foreground(const FUNCTION_Type_t PreviousFunction) {
#ifdef ENABLE_DTMF_CALLING
if (gDTMF_ReplyState != DTMF_REPLY_NONE)
RADIO_PrepareCssTX();
@@ -109,8 +116,7 @@ void FUNCTION_Foreground(const FUNCTION_Type_t PreviousFunction)
#ifdef ENABLE_DTMF_CALLING
if (gDTMF_CallState == DTMF_CALL_STATE_CALL_OUT ||
gDTMF_CallState == DTMF_CALL_STATE_RECEIVED ||
gDTMF_CallState == DTMF_CALL_STATE_RECEIVED_STAY)
{
gDTMF_CallState == DTMF_CALL_STATE_RECEIVED_STAY) {
gDTMF_auto_reset_time_500ms = gEeprom.DTMF_auto_reset_time * 2;
}
#endif
@@ -118,18 +124,15 @@ void FUNCTION_Foreground(const FUNCTION_Type_t PreviousFunction)
}
void FUNCTION_PowerSave() {
#ifdef ENABLE_FEAT_F4HWN_SLEEP
if(gWakeUp)
{
#ifdef ENABLE_FEAT_F4HWN_SLEEP
if (gWakeUp) {
gPowerSave_10ms = gEeprom.BATTERY_SAVE * 200; // deep sleep now indexed on BatSav
}
else
{
} else {
gPowerSave_10ms = gEeprom.BATTERY_SAVE * 10;
}
#else
#else
gPowerSave_10ms = gEeprom.BATTERY_SAVE * 10;
#endif
#endif
gPowerSaveCountdownExpired = false;
gRxIdleMode = true;
@@ -147,9 +150,11 @@ void FUNCTION_PowerSave() {
GUI_SelectNextDisplay(DISPLAY_MAIN);
}
void FUNCTION_Transmit()
{
void FUNCTION_Transmit() {
// if DTMF is enabled when TX'ing, it changes the TX audio filtering !! .. 1of11
MSG_EnableRX(false);
BK4819_DisableDTMF();
#ifdef ENABLE_DTMF_CALLING
@@ -167,8 +172,7 @@ void FUNCTION_Transmit()
#endif
#ifdef ENABLE_ALARM
if (gAlarmState == ALARM_STATE_SITE_ALARM)
{
if (gAlarmState == ALARM_STATE_SITE_ALARM) {
GUI_DisplayScreen();
AUDIO_AudioPathOff();
@@ -205,35 +209,35 @@ void FUNCTION_Transmit()
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
if (gAlarmState != ALARM_STATE_OFF) {
#ifdef ENABLE_TX1750
if (gAlarmState == ALARM_STATE_TX1750)
BK4819_TransmitTone(true, 1750);
#endif
#ifdef ENABLE_TX1750
if (gAlarmState == ALARM_STATE_TX1750) {
BK4819_TransmitTone(false, 1750);
gAlarmState = ALARM_STATE_OFF;
}
#endif
#ifdef ENABLE_ALARM
#ifdef ENABLE_ALARM
if (gAlarmState == ALARM_STATE_TXALARM)
BK4819_TransmitTone(true, 500);
gAlarmToneCounter = 0;
#endif
#endif
SYSTEM_DelayMs(2);
AUDIO_AudioPathOn();
gEnableSpeaker = true;
BK4819_ExitTxMute();
gVfoConfigureMode = VFO_CONFIGURE;
return;
}
#endif
#ifdef ENABLE_FEAT_F4HWN
BK4819_DisableScramble();
#else
if (gCurrentVfo->SCRAMBLING_TYPE > 0 && gSetting_ScrambleEnable)
if (gCurrentVfo->SCRAMBLING_TYPE > 0)
BK4819_EnableScramble(gCurrentVfo->SCRAMBLING_TYPE - 1);
else
BK4819_DisableScramble();
#endif
if (gSetting_backlight_on_tx_rx & BACKLIGHT_ON_TR_TX) {
BACKLIGHT_TurnOn();
@@ -241,9 +245,7 @@ void FUNCTION_Transmit()
}
void FUNCTION_Select(FUNCTION_Type_t Function)
{
void FUNCTION_Select(FUNCTION_Type_t Function) {
const FUNCTION_Type_t PreviousFunction = gCurrentFunction;
const bool bWasPowerSave = PreviousFunction == FUNCTION_POWER_SAVE;
@@ -301,7 +303,7 @@ void FUNCTION_Select(FUNCTION_Type_t Function)
gSchedulePowerSave = false;
#if defined(ENABLE_FMRADIO)
if(Function != FUNCTION_INCOMING)
if (Function != FUNCTION_INCOMING)
gFM_RestoreCountdown_10ms = 0;
#endif
}

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
#include <stdint.h>
enum FUNCTION_Type_t
{
enum FUNCTION_Type_t {
FUNCTION_FOREGROUND = 0, // ???
FUNCTION_TRANSMIT, // transmitting
FUNCTION_MONITOR, // receiving with squelch forced open
@@ -32,11 +32,12 @@ enum FUNCTION_Type_t
};
typedef enum FUNCTION_Type_t FUNCTION_Type_t;
extern FUNCTION_Type_t gCurrentFunction;
void FUNCTION_Init(void);
void FUNCTION_Select(FUNCTION_Type_t Function);
bool FUNCTION_IsRx();
#endif

View File

@@ -137,10 +137,6 @@ void BATTERY_GetReadings(const bool bDisplayBatteryLevel)
}
}
if ((gScreenToDisplay == DISPLAY_MENU) && UI_MENU_GetCurrentMenuId() == MENU_VOL)
gUpdateDisplay = true;
if (gBatteryCurrent < 501)
{
if (gChargingWithTypeC)

View File

@@ -74,6 +74,9 @@ void BOOT_ProcessMode(BOOT_Mode_t Mode)
{
if (Mode == BOOT_MODE_F_LOCK)
{
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
gEeprom.CURRENT_STATE = 0; // Don't resume is active...
#endif
GUI_SelectNextDisplay(DISPLAY_MENU);
}
#ifdef ENABLE_AIRCOPY
@@ -111,8 +114,8 @@ void BOOT_ProcessMode(BOOT_Mode_t Mode)
gEeprom.BACKLIGHT_TIME = 61;
gEeprom.KEY_LOCK = 0;
#ifdef ENABLE_FEAT_F4HWN
gEeprom.CURRENT_STATE = 0; // Don't scan if scan resume is active...
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
gEeprom.CURRENT_STATE = 0; // Don't resume is active...
#endif
GUI_SelectNextDisplay(DISPLAY_AIRCOPY);

109
main.c
View File

@@ -19,7 +19,9 @@
#include <stdio.h> // NULL
#ifdef ENABLE_AM_FIX
#include "am_fix.h"
#include "am_fix.h"
#endif
#include "audio.h"
@@ -30,14 +32,20 @@
#include "version.h"
#ifdef ENABLE_FEAT_F4HWN
#ifdef ENABLE_FMRADIO
#include "app/action.h"
#include "ui/ui.h"
#endif
#ifdef ENABLE_SPECTRUM
#include "app/spectrum.h"
#endif
#include "app/chFrScanner.h"
#ifdef ENABLE_FMRADIO
#include "app/action.h"
#include "ui/ui.h"
#endif
#ifdef ENABLE_SPECTRUM
#include "app/spectrum.h"
#endif
#include "app/chFrScanner.h"
#endif
#include "app/app.h"
@@ -51,8 +59,11 @@
#include "driver/system.h"
#include "driver/systick.h"
#include "driver/eeprom.h"
#ifdef ENABLE_UART
#include "driver/uart.h"
#include "driver/uart.h"
#endif
#include "helper/battery.h"
@@ -61,17 +72,16 @@
#include "ui/lock.h"
#include "ui/welcome.h"
#include "ui/menu.h"
void _putchar(__attribute__((unused)) char c)
{
void _putchar(__attribute__((unused)) char c) {
#ifdef ENABLE_UART
UART_Send((uint8_t *)&c, 1);
UART_Send((uint8_t *) &c, 1);
#endif
}
void Main(void)
{
void Main(void) {
// Enable clock gating of blocks we need
SYSCON_DEV_CLK_GATE = 0
| SYSCON_DEV_CLK_GATE_GPIOA_BITS_ENABLE
@@ -106,10 +116,10 @@ void Main(void)
SETTINGS_InitEEPROM();
#ifdef ENABLE_FEAT_F4HWN
#ifdef ENABLE_FEAT_F4HWN
gDW = gEeprom.DUAL_WATCH;
gCB = gEeprom.CROSS_BAND_RX_TX;
#endif
#endif
SETTINGS_WriteBuildOptions();
SETTINGS_LoadCalibration();
@@ -157,33 +167,32 @@ void Main(void)
}
#endif
if (BootMode == BOOT_MODE_F_LOCK)
{
if (BootMode == BOOT_MODE_F_LOCK) {
gF_LOCK = true; // flag to say include the hidden menu items
#ifdef ENABLE_FEAT_F4HWN
#ifdef ENABLE_FEAT_F4HWN
gEeprom.KEY_LOCK = 0;
SETTINGS_SaveSettings();
#ifndef ENABLE_VOX
#ifndef ENABLE_VOX
gMenuCursor = 67; // move to hidden section, fix me if change... !!! Remove VOX and Mic Bar
#else
#else
gMenuCursor = 68; // move to hidden section, fix me if change... !!!
#endif
#endif
#ifdef ENABLE_NOAA
#ifdef ENABLE_NOAA
gMenuCursor += 1; // move to hidden section, fix me if change... !!!
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
gMenuCursor += 1; // move to hidden section, fix me if change... !!!
#endif
#endif
gSubMenuSelection = gSetting_F_LOCK;
#endif
#endif
}
// 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)
if (!gF_LOCK && MenuList[gMenuListCount].menu_id == FIRST_HIDDEN_MENU_ITEM)
break;
gMenuListCount++;
@@ -192,14 +201,12 @@ void Main(void)
// wait for user to release all butts before moving on
if (!GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) ||
KEYBOARD_Poll() != KEY_INVALID ||
BootMode != BOOT_MODE_NORMAL)
{ // keys are pressed
BootMode != BOOT_MODE_NORMAL) { // keys are pressed
UI_DisplayReleaseKeys();
BACKLIGHT_TurnOn();
// 500ms
for (int i = 0; i < 50;)
{
for (int i = 0; i < 50;) {
i = (GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) && KEYBOARD_Poll() == KEY_INVALID) ? i + 1 : 0;
SYSTEM_DelayMs(10);
}
@@ -208,8 +215,7 @@ void Main(void)
gDebounceCounter = 0;
}
if (!gChargingWithTypeC && gBatteryDisplayLevel == 0)
{
if (!gChargingWithTypeC && gBatteryDisplayLevel == 0) {
FUNCTION_Select(FUNCTION_POWER_SAVE);
if (gEeprom.BACKLIGHT_TIME < 61) // backlight is not set to be always on
@@ -218,29 +224,11 @@ void Main(void)
BACKLIGHT_TurnOn(); // turn the backlight ON
gReducedService = true;
}
else
{
} else {
UI_DisplayWelcome();
BACKLIGHT_TurnOn();
#ifdef ENABLE_FEAT_F4HWN
if (gEeprom.POWER_ON_DISPLAY_MODE != POWER_ON_DISPLAY_MODE_NONE && gEeprom.POWER_ON_DISPLAY_MODE != POWER_ON_DISPLAY_MODE_SOUND)
#else
if (gEeprom.POWER_ON_DISPLAY_MODE != POWER_ON_DISPLAY_MODE_NONE)
#endif
{ // 2.55 second boot-up screen
while (boot_counter_10ms > 0)
{
if (KEYBOARD_Poll() != KEY_INVALID)
{ // halt boot beeps
boot_counter_10ms = 0;
break;
}
}
RADIO_SetupRegisters(true);
}
#ifdef ENABLE_PWRON_PASSWORD
if (gEeprom.POWER_ON_PASSWORD < 1000000)
@@ -335,7 +323,7 @@ void Main(void)
#endif
*/
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
if (gEeprom.CURRENT_STATE == 2 || gEeprom.CURRENT_STATE == 5) {
gScanRangeStart = gScanRangeStart ? 0 : gTxVfo->pRX->Frequency;
gScanRangeStop = gEeprom.VfoInfo[!gEeprom.TX_VFO].freq_config_RX.Frequency;
@@ -351,19 +339,18 @@ void Main(void)
if (gEeprom.CURRENT_STATE == 1 || gEeprom.CURRENT_STATE == 2) {
CHFRSCANNER_Start(true, SCAN_FWD);
}
#ifdef ENABLE_FMRADIO
#ifdef ENABLE_FMRADIO
else if (gEeprom.CURRENT_STATE == 3) {
ACTION_FM();
GUI_SelectNextDisplay(gRequestDisplayScreen);
}
#endif
#ifdef ENABLE_SPECTRUM
#endif
#ifdef ENABLE_SPECTRUM
else if (gEeprom.CURRENT_STATE == 4 || gEeprom.CURRENT_STATE == 5) {
APP_RunSpectrum();
}
#endif
// Pas besoin de `default`, aucun effet si l'état n'est pas traité.
#endif
#endif
#endif
while (true) {
APP_Update();

7
misc.c
View File

@@ -91,16 +91,11 @@ const uint8_t gMicGain_dB2[5] = {3, 8, 16, 24, 31};
#ifndef ENABLE_FEAT_F4HWN
bool gSetting_350TX;
#endif
#ifdef ENABLE_DTMF_CALLING
bool gSetting_KILLED;
#endif
#ifndef ENABLE_FEAT_F4HWN
bool gSetting_200TX;
bool gSetting_500TX;
#endif
bool gSetting_350EN;
bool gSetting_350EN = true;
uint8_t gSetting_F_LOCK;
bool gSetting_ScrambleEnable;

5
misc.h
View File

@@ -143,11 +143,6 @@ extern const uint8_t gMicGain_dB2[5];
#ifndef ENABLE_FEAT_F4HWN
extern bool gSetting_350TX;
#endif
#ifdef ENABLE_DTMF_CALLING
extern bool gSetting_KILLED;
#endif
#ifndef ENABLE_FEAT_F4HWN
extern bool gSetting_200TX;
extern bool gSetting_500TX;

11
radio.c
View File

@@ -272,13 +272,10 @@ void RADIO_ConfigureChannel(const unsigned int VFO, const unsigned int configure
pVfo->StepFrequency = gStepFrequencyTable[tmp];
tmp = data[7];
#ifndef ENABLE_FEAT_F4HWN
if (tmp > (ARRAY_SIZE(gSubMenu_SCRAMBLER) - 1))
tmp = 0;
pVfo->SCRAMBLING_TYPE = tmp;
#else
pVfo->SCRAMBLING_TYPE = 0;
#endif
//pVfo->SCRAMBLING_TYPE = 0;
pVfo->freq_config_RX.CodeType = (data[2] >> 0) & 0x0F;
pVfo->freq_config_TX.CodeType = (data[2] >> 4) & 0x0F;
@@ -817,14 +814,10 @@ void RADIO_SetupRegisters(bool switchToForeground)
break;
}
#ifndef ENABLE_FEAT_F4HWN
if (gRxVfo->SCRAMBLING_TYPE > 0 && gSetting_ScrambleEnable)
if (gRxVfo->SCRAMBLING_TYPE > 0)
BK4819_EnableScramble(gRxVfo->SCRAMBLING_TYPE - 1);
else
BK4819_DisableScramble();
#else
BK4819_DisableScramble();
#endif
}
}
#ifdef ENABLE_NOAA

View File

@@ -17,9 +17,11 @@
#include <string.h>
#include "app/dtmf.h"
#ifdef ENABLE_FMRADIO
#include "app/fm.h"
#include "app/fm.h"
#endif
#include "driver/bk1080.h"
#include "driver/bk4819.h"
#include "driver/eeprom.h"
@@ -38,30 +40,29 @@ static const uint32_t gDefaultFrequencyTable[] =
};
#endif
EEPROM_Config_t gEeprom = { 0 };
EEPROM_Config_t gEeprom = {0};
void SETTINGS_InitEEPROM(void)
{
void SETTINGS_InitEEPROM(void) {
uint8_t Data[16] = {0};
// 0E70..0E77
EEPROM_ReadBuffer(0x0E70, Data, 8);
gEeprom.CHAN_1_CALL = IS_MR_CHANNEL(Data[0]) ? Data[0] : MR_CHANNEL_FIRST;
gEeprom.SQUELCH_LEVEL = (Data[1] < 10) ? Data[1] : 1;
gEeprom.TX_TIMEOUT_TIMER = (Data[2] > 4 && Data[2] < 180) ? Data[2] : 11;
#ifdef ENABLE_NOAA
#ifdef ENABLE_NOAA
gEeprom.NOAA_AUTO_SCAN = (Data[3] < 2) ? Data[3] : false;
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
gEeprom.KEY_LOCK = (Data[4] & 0x01) != 0;
gEeprom.MENU_LOCK = (Data[4] & 0x02) != 0;
gEeprom.SET_KEY = ((Data[4] >> 2) & 0x0F) > 4 ? 0 : (Data[4] >> 2) & 0x0F;
#else
#else
gEeprom.KEY_LOCK = (Data[4] < 2) ? Data[4] : false;
#endif
#ifdef ENABLE_VOX
#endif
#ifdef ENABLE_VOX
gEeprom.VOX_SWITCH = (Data[5] < 2) ? Data[5] : false;
gEeprom.VOX_LEVEL = (Data[6] < 10) ? Data[6] : 1;
#endif
#endif
gEeprom.MIC_SENSITIVITY = (Data[7] < 5) ? Data[7] : 4;
// 0E78..0E7F
@@ -76,20 +77,20 @@ void SETTINGS_InitEEPROM(void)
gEeprom.BATTERY_SAVE = (Data[3] < 6) ? Data[3] : 4;
gEeprom.DUAL_WATCH = (Data[4] < 3) ? Data[4] : DUAL_WATCH_CHAN_A;
gEeprom.BACKLIGHT_TIME = (Data[5] < 62) ? Data[5] : 12;
#ifdef ENABLE_FEAT_F4HWN_NARROWER
#ifdef ENABLE_FEAT_F4HWN_NARROWER
gEeprom.TAIL_TONE_ELIMINATION = Data[6] & 0x01;
gSetting_set_nfm = (Data[6] >> 1) & 0x01;
#else
#else
gEeprom.TAIL_TONE_ELIMINATION = (Data[6] < 2) ? Data[6] : false;
#endif
#endif
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
gEeprom.VFO_OPEN = Data[7] & 0x01;
gEeprom.CURRENT_STATE = (Data[7] >> 1) & 0x07;
gEeprom.CURRENT_LIST = (Data[7] >> 4) & 0x07;
#else
#else
gEeprom.VFO_OPEN = (Data[7] < 2) ? Data[7] : true;
#endif
#endif
// 0E80..0E87
EEPROM_ReadBuffer(0x0E80, Data, 8);
@@ -141,39 +142,33 @@ void SETTINGS_InitEEPROM(void)
gEeprom.KEY_2_LONG_PRESS_ACTION = (Data[4] < ACTION_OPT_LEN) ? Data[4] : ACTION_OPT_NONE;
gEeprom.SCAN_RESUME_MODE = (Data[5] < 105) ? Data[5] : 14;
gEeprom.AUTO_KEYPAD_LOCK = (Data[6] < 41) ? Data[6] : 0;
#ifdef ENABLE_FEAT_F4HWN
gEeprom.POWER_ON_DISPLAY_MODE = (Data[7] < 6) ? Data[7] : POWER_ON_DISPLAY_MODE_VOLTAGE;
#else
gEeprom.POWER_ON_DISPLAY_MODE = (Data[7] < 4) ? Data[7] : POWER_ON_DISPLAY_MODE_VOLTAGE;
#endif
gEeprom.FSKMode = Data[7];
// 0E98..0E9F
#ifdef ENABLE_PWRON_PASSWORD
#ifdef ENABLE_PWRON_PASSWORD
EEPROM_ReadBuffer(0x0E98, Data, 8);
memcpy(&gEeprom.POWER_ON_PASSWORD, Data, 4);
#endif
#endif
// 0EA0..0EA7
EEPROM_ReadBuffer(0x0EA0, Data, 8);
#ifdef ENABLE_VOICE
#ifdef ENABLE_VOICE
gEeprom.VOICE_PROMPT = (Data[0] < 3) ? Data[0] : VOICE_PROMPT_ENGLISH;
#endif
#ifdef ENABLE_RSSI_BAR
if((Data[1] < 200 && Data[1] > 90) && (Data[2] < Data[1]-9 && Data[1] < 160 && Data[2] > 50)) {
#endif
#ifdef ENABLE_RSSI_BAR
if ((Data[1] < 200 && Data[1] > 90) && (Data[2] < Data[1] - 9 && Data[1] < 160 && Data[2] > 50)) {
gEeprom.S0_LEVEL = Data[1];
gEeprom.S9_LEVEL = Data[2];
}
else {
} else {
gEeprom.S0_LEVEL = 130;
gEeprom.S9_LEVEL = 76;
}
#endif
#endif
// 0EA8..0EAF
EEPROM_ReadBuffer(0x0EA8, Data, 8);
#ifdef ENABLE_ALARM
#ifdef ENABLE_ALARM
gEeprom.ALARM_MODE = (Data[0] < 2) ? Data[0] : true;
#endif
#endif
gEeprom.ROGER = (Data[1] < 3) ? Data[1] : ROGER_MODE_OFF;
gEeprom.REPEATER_TAIL_TONE_ELIMINATION = (Data[2] < 11) ? Data[2] : 0;
gEeprom.TX_VFO = (Data[3] < 2) ? Data[3] : 0;
@@ -229,7 +224,7 @@ void SETTINGS_InitEEPROM(void)
// 0EF8..0F07
EEPROM_ReadBuffer(0x0EF8, Data, sizeof(gEeprom.DTMF_UP_CODE));
if (DTMF_ValidateCodes((char *)Data, sizeof(gEeprom.DTMF_UP_CODE))) {
if (DTMF_ValidateCodes((char *) Data, sizeof(gEeprom.DTMF_UP_CODE))) {
memcpy(gEeprom.DTMF_UP_CODE, Data, sizeof(gEeprom.DTMF_UP_CODE));
} else {
strcpy(gEeprom.DTMF_UP_CODE, "12345");
@@ -237,7 +232,7 @@ void SETTINGS_InitEEPROM(void)
// 0F08..0F17
EEPROM_ReadBuffer(0x0F08, Data, sizeof(gEeprom.DTMF_DOWN_CODE));
if (DTMF_ValidateCodes((char *)Data, sizeof(gEeprom.DTMF_DOWN_CODE))) {
if (DTMF_ValidateCodes((char *) Data, sizeof(gEeprom.DTMF_DOWN_CODE))) {
memcpy(gEeprom.DTMF_DOWN_CODE, Data, sizeof(gEeprom.DTMF_DOWN_CODE));
} else {
strcpy(gEeprom.DTMF_DOWN_CODE, "54321");
@@ -264,62 +259,61 @@ void SETTINGS_InitEEPROM(void)
*/
// Fix me probably after Chirp update...
for (unsigned int i = 0; i < 3; i++)
{
for (unsigned int i = 0; i < 3; i++) {
gEeprom.SCAN_LIST_ENABLED[i] = (Data[1] >> i) & 1;
}
for (unsigned int i = 0; i < 3; i++)
{
for (unsigned int i = 0; i < 3; i++) {
const unsigned int j = 1 + (i * 2);
gEeprom.SCANLIST_PRIORITY_CH1[i] = Data[j + 1];
gEeprom.SCANLIST_PRIORITY_CH2[i] = Data[j + 2];
}
EEPROM_ReadBuffer(0x0F20, Data, 8);
gEeprom.FSKSRCAddress = Data[0];
gEeprom.FSKSRCAddress |= Data[1] << 8;
gEeprom.FSKSRCAddress |= Data[2] << 16;
gEeprom.FSKSRCAddress |= Data[3] << 24;
// 0F40..0F47
EEPROM_ReadBuffer(0x0F40, Data, 8);
gSetting_F_LOCK = (Data[0] < F_LOCK_LEN) ? Data[0] : F_LOCK_DEF;
#ifndef ENABLE_FEAT_F4HWN
gSetting_350TX = (Data[1] < 2) ? Data[1] : false; // was true
#endif
#ifdef ENABLE_DTMF_CALLING
gSetting_KILLED = (Data[2] < 2) ? Data[2] : false;
#endif
#ifndef ENABLE_FEAT_F4HWN
gSetting_200TX = (Data[3] < 2) ? Data[3] : false;
gSetting_500TX = (Data[4] < 2) ? Data[4] : false;
#endif
gSetting_350EN = (Data[5] < 2) ? Data[5] : true;
#ifdef ENABLE_FEAT_F4HWN
gSetting_ScrambleEnable = false;
#else
gSetting_ScrambleEnable = (Data[6] < 2) ? Data[6] : true;
gSetting_350EN = true;
#endif
gSetting_ScrambleEnable = true;
//gSetting_TX_EN = (Data[7] & (1u << 0)) ? true : false;
gSetting_live_DTMF_decoder = !!(Data[7] & (1u << 1));
gSetting_battery_text = (((Data[7] >> 2) & 3u) <= 2) ? (Data[7] >> 2) & 3 : 2;
#ifdef ENABLE_AUDIO_BAR
#ifdef ENABLE_AUDIO_BAR
gSetting_mic_bar = !!(Data[7] & (1u << 4));
#endif
#ifndef ENABLE_FEAT_F4HWN
#ifdef ENABLE_AM_FIX
#endif
#ifndef ENABLE_FEAT_F4HWN
#ifdef ENABLE_AM_FIX
gSetting_AM_fix = !!(Data[7] & (1u << 5));
#endif
#endif
#endif
#endif
gSetting_backlight_on_tx_rx = (Data[7] >> 6) & 3u;
if (!gEeprom.VFO_OPEN)
{
if (!gEeprom.VFO_OPEN) {
gEeprom.ScreenChannel[0] = gEeprom.MrChannel[0];
gEeprom.ScreenChannel[1] = gEeprom.MrChannel[1];
}
// 0D60..0E27
EEPROM_ReadBuffer(0x0D60, gMR_ChannelAttributes, sizeof(gMR_ChannelAttributes));
for(uint16_t i = 0; i < sizeof(gMR_ChannelAttributes); i++) {
for (uint16_t i = 0; i < sizeof(gMR_ChannelAttributes); i++) {
ChannelAttributes_t *att = &gMR_ChannelAttributes[i];
if(att->__val == 0xff){
if (att->__val == 0xff) {
att->__val = 0;
att->band = 0x7;
}
@@ -329,7 +323,7 @@ void SETTINGS_InitEEPROM(void)
// 0F30..0F3F
EEPROM_ReadBuffer(0x0F30, gCustomAesKey, sizeof(gCustomAesKey));
bHasCustomAesKey = false;
#ifndef ENABLE_FEAT_F4HWN
#ifndef ENABLE_FEAT_F4HWN
for (unsigned int i = 0; i < ARRAY_SIZE(gCustomAesKey); i++)
{
if (gCustomAesKey[i] != 0xFFFFFFFFu)
@@ -338,9 +332,9 @@ void SETTINGS_InitEEPROM(void)
return;
}
}
#endif
#endif
#ifdef ENABLE_FEAT_F4HWN
#ifdef ENABLE_FEAT_F4HWN
// 1FF0..0x1FF7
EEPROM_ReadBuffer(0x1FF0, Data, 8);
gSetting_set_pwr = (((Data[7] & 0xF0) >> 4) < 7) ? ((Data[7] & 0xF0) >> 4) : 0;
@@ -391,11 +385,10 @@ void SETTINGS_InitEEPROM(void)
// And set special session settings for actions
gSetting_set_ptt_session = gSetting_set_ptt;
gEeprom.KEY_LOCK_PTT = gSetting_set_lck;
#endif
#endif
}
void SETTINGS_LoadCalibration(void)
{
void SETTINGS_LoadCalibration(void) {
// uint8_t Mic;
EEPROM_ReadBuffer(0x1EC0, gEEPROM_RSSI_CALIB[3], 8);
@@ -408,25 +401,23 @@ void SETTINGS_LoadCalibration(void)
memcpy(gEEPROM_RSSI_CALIB[2], gEEPROM_RSSI_CALIB[0], 8);
EEPROM_ReadBuffer(0x1F40, gBatteryCalibration, 12);
if (gBatteryCalibration[0] >= 5000)
{
if (gBatteryCalibration[0] >= 5000) {
gBatteryCalibration[0] = 1900;
gBatteryCalibration[1] = 2000;
}
gBatteryCalibration[5] = 2300;
#ifdef ENABLE_VOX
#ifdef ENABLE_VOX
EEPROM_ReadBuffer(0x1F50 + (gEeprom.VOX_LEVEL * 2), &gEeprom.VOX1_THRESHOLD, 2);
EEPROM_ReadBuffer(0x1F68 + (gEeprom.VOX_LEVEL * 2), &gEeprom.VOX0_THRESHOLD, 2);
#endif
#endif
//EEPROM_ReadBuffer(0x1F80 + gEeprom.MIC_SENSITIVITY, &Mic, 1);
//gEeprom.MIC_SENSITIVITY_TUNING = (Mic < 32) ? Mic : 15;
gEeprom.MIC_SENSITIVITY_TUNING = gMicGain_dB2[gEeprom.MIC_SENSITIVITY];
{
struct
{
struct {
int16_t BK4819_XtalFreqLow;
uint16_t EEPROM_1F8A;
uint16_t EEPROM_1F8C;
@@ -438,25 +429,24 @@ void SETTINGS_LoadCalibration(void)
// radio 2 .. 05 00 46 00 50 00 2C 0E
EEPROM_ReadBuffer(0x1F88, &Misc, 8);
gEeprom.BK4819_XTAL_FREQ_LOW = (Misc.BK4819_XtalFreqLow >= -1000 && Misc.BK4819_XtalFreqLow <= 1000) ? Misc.BK4819_XtalFreqLow : 0;
gEeprom.BK4819_XTAL_FREQ_LOW = (Misc.BK4819_XtalFreqLow >= -1000 && Misc.BK4819_XtalFreqLow <= 1000)
? Misc.BK4819_XtalFreqLow : 0;
gEEPROM_1F8A = Misc.EEPROM_1F8A & 0x01FF;
gEEPROM_1F8C = Misc.EEPROM_1F8C & 0x01FF;
gEeprom.VOLUME_GAIN = (Misc.VOLUME_GAIN < 64) ? Misc.VOLUME_GAIN : 58;
gEeprom.DAC_GAIN = (Misc.DAC_GAIN < 16) ? Misc.DAC_GAIN : 8;
#ifdef ENABLE_FEAT_F4HWN
#ifdef ENABLE_FEAT_F4HWN
gEeprom.VOLUME_GAIN_BACKUP = gEeprom.VOLUME_GAIN;
#endif
#endif
BK4819_WriteRegister(BK4819_REG_3B, 22656 + gEeprom.BK4819_XTAL_FREQ_LOW);
// BK4819_WriteRegister(BK4819_REG_3C, gEeprom.BK4819_XTAL_FREQ_HIGH);
}
}
uint32_t SETTINGS_FetchChannelFrequency(const int channel)
{
struct
{
uint32_t SETTINGS_FetchChannelFrequency(const int channel) {
struct {
uint32_t frequency;
uint32_t offset;
} __attribute__((packed)) info;
@@ -466,8 +456,7 @@ uint32_t SETTINGS_FetchChannelFrequency(const int channel)
return info.frequency;
}
void SETTINGS_FetchChannelName(char *s, const int channel)
{
void SETTINGS_FetchChannelName(char *s, const int channel) {
if (s == NULL)
return;
@@ -492,16 +481,14 @@ void SETTINGS_FetchChannelName(char *s, const int channel)
s[i--] = 0; // null term
}
void SETTINGS_FactoryReset(bool bIsAll)
{
void SETTINGS_FactoryReset(bool bIsAll) {
uint16_t i;
uint8_t Template[8];
memset(Template, 0xFF, sizeof(Template));
//for (i = 0x0C80; i < 0x1E00; i += 8)
for (i = 0x0000; i < 0x1E00; i += 8)
{
for (i = 0x0000; i < 0x1E00; i += 8) {
if (
!(i >= 0x0EE0 && i < 0x0F18) && // ANI ID + DTMF codes
!(i >= 0x0F30 && i < 0x0F50) && // AES KEY + F LOCK + Scramble Enable
@@ -516,17 +503,15 @@ void SETTINGS_FactoryReset(bool bIsAll)
!(i >= 0x0E40 && i < 0x0E70) && // FM Channels
!(i >= 0x0E88 && i < 0x0E90) // FM settings
))
)
{
) {
EEPROM_WriteBuffer(i, Template);
}
}
if (bIsAll)
{
if (bIsAll) {
RADIO_InitInfo(gRxVfo, FREQ_CHANNEL_FIRST + BAND6_400MHz, 43350000);
#ifdef ENABLE_FEAT_F4HWN_RESET_CHANNEL
#ifdef ENABLE_FEAT_F4HWN_RESET_CHANNEL
// set the first few memory channels
for (i = 0; i < ARRAY_SIZE(gDefaultFrequencyTable); i++)
{
@@ -536,11 +521,11 @@ void SETTINGS_FactoryReset(bool bIsAll)
gRxVfo->Band = FREQUENCY_GetBand(Frequency);
SETTINGS_SaveChannel(MR_CHANNEL_FIRST + i, 0, gRxVfo, 2);
}
#endif
#endif
#ifdef ENABLE_FEAT_F4HWN
#ifdef ENABLE_FEAT_F4HWN
EEPROM_WriteBuffer(0x1FF0, Template);
#endif
#endif
}
}
@@ -571,13 +556,12 @@ void SETTINGS_SaveFM(void)
}
#endif
void SETTINGS_SaveVfoIndices(void)
{
void SETTINGS_SaveVfoIndices(void) {
uint8_t State[8];
#ifndef ENABLE_NOAA
#ifndef ENABLE_NOAA
EEPROM_ReadBuffer(0x0E80, State, sizeof(State));
#endif
#endif
State[0] = gEeprom.ScreenChannel[0];
State[1] = gEeprom.MrChannel[0];
@@ -585,45 +569,44 @@ void SETTINGS_SaveVfoIndices(void)
State[3] = gEeprom.ScreenChannel[1];
State[4] = gEeprom.MrChannel[1];
State[5] = gEeprom.FreqChannel[1];
#ifdef ENABLE_NOAA
#ifdef ENABLE_NOAA
State[6] = gEeprom.NoaaChannel[0];
State[7] = gEeprom.NoaaChannel[1];
#endif
#endif
EEPROM_WriteBuffer(0x0E80, State);
}
void SETTINGS_SaveSettings(void)
{
void SETTINGS_SaveSettings(void) {
uint8_t State[8];
uint8_t tmp = 0;
#ifdef ENABLE_PWRON_PASSWORD
#ifdef ENABLE_PWRON_PASSWORD
uint32_t Password[2];
#endif
#endif
State[0] = gEeprom.CHAN_1_CALL;
State[1] = gEeprom.SQUELCH_LEVEL;
State[2] = gEeprom.TX_TIMEOUT_TIMER;
#ifdef ENABLE_NOAA
#ifdef ENABLE_NOAA
State[3] = gEeprom.NOAA_AUTO_SCAN;
#else
#else
State[3] = false;
#endif
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
State[4] = (gEeprom.KEY_LOCK ? 0x01 : 0) | (gEeprom.MENU_LOCK ? 0x02 :0) | ((gEeprom.SET_KEY & 0x0F) << 2);
#else
#else
State[4] = gEeprom.KEY_LOCK;
#endif
#endif
#ifdef ENABLE_VOX
#ifdef ENABLE_VOX
State[5] = gEeprom.VOX_SWITCH;
State[6] = gEeprom.VOX_LEVEL;
#else
#else
State[5] = false;
State[6] = 0;
#endif
#endif
State[7] = gEeprom.MIC_SENSITIVITY;
EEPROM_WriteBuffer(0x0E70, State);
@@ -633,35 +616,32 @@ void SETTINGS_SaveSettings(void)
State[3] = gEeprom.BATTERY_SAVE;
State[4] = gEeprom.DUAL_WATCH;
#ifdef ENABLE_FEAT_F4HWN
if(!gSaveRxMode)
{
#ifdef ENABLE_FEAT_F4HWN
if (!gSaveRxMode) {
State[2] = gCB;
State[4] = gDW;
}
if(gBackLight)
{
if (gBackLight) {
State[5] = gBacklightTimeOriginal;
}
else
{
} else {
State[5] = gEeprom.BACKLIGHT_TIME;
}
#else
#else
State[5] = gEeprom.BACKLIGHT_TIME;
#endif
#endif
#ifdef ENABLE_FEAT_F4HWN_NARROWER
#ifdef ENABLE_FEAT_F4HWN_NARROWER
State[6] = (gEeprom.TAIL_TONE_ELIMINATION & 0x01) | ((gSetting_set_nfm & 0x03) << 1);
#else
#else
State[6] = gEeprom.TAIL_TONE_ELIMINATION;
#endif
#endif
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
State[7] = (gEeprom.VFO_OPEN & 0x01) | ((gEeprom.CURRENT_STATE & 0x07) << 1) | ((gEeprom.SCAN_LIST_DEFAULT & 0x07) << 4);
#else
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
State[7] = (gEeprom.VFO_OPEN & 0x01) | ((gEeprom.CURRENT_STATE & 0x07) << 1) |
((gEeprom.SCAN_LIST_DEFAULT & 0x07) << 4);
#else
State[7] = gEeprom.VFO_OPEN;
#endif
#endif
EEPROM_WriteBuffer(0x0E78, State);
State[0] = gEeprom.BEEP_CONTROL;
@@ -672,14 +652,14 @@ void SETTINGS_SaveSettings(void)
State[4] = gEeprom.KEY_2_LONG_PRESS_ACTION;
State[5] = gEeprom.SCAN_RESUME_MODE;
State[6] = gEeprom.AUTO_KEYPAD_LOCK;
State[7] = gEeprom.POWER_ON_DISPLAY_MODE;
State[7] = gEeprom.FSKMode;
EEPROM_WriteBuffer(0x0E90, State);
#ifdef ENABLE_PWRON_PASSWORD
#ifdef ENABLE_PWRON_PASSWORD
memset(Password, 0xFF, sizeof(Password));
Password[0] = gEeprom.POWER_ON_PASSWORD;
EEPROM_WriteBuffer(0x0E98, Password);
#endif
#endif
memset(State, 0xFF, sizeof(State));
#ifdef ENABLE_VOICE
@@ -692,11 +672,11 @@ void SETTINGS_SaveSettings(void)
EEPROM_WriteBuffer(0x0EA0, State);
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
State[0] = gEeprom.ALARM_MODE;
#else
#else
State[0] = false;
#endif
#endif
State[1] = gEeprom.ROGER;
State[2] = gEeprom.REPEATER_TAIL_TONE_ELIMINATION;
State[3] = gEeprom.TX_VFO;
@@ -743,36 +723,36 @@ void SETTINGS_SaveSettings(void)
State[7] = gEeprom.SCANLIST_PRIORITY_CH2[2];
EEPROM_WriteBuffer(0x0F18, State);
State[0] = gEeprom.FSKSRCAddress & 0xFF;
State[1] = (gEeprom.FSKSRCAddress >> 8) & 0xFF;
State[2] = (gEeprom.FSKSRCAddress >> 16) & 0xFF;
State[3] = (gEeprom.FSKSRCAddress >> 24) & 0xFF;
EEPROM_WriteBuffer(0x0F20, State);
memset(State, 0xFF, sizeof(State));
State[0] = gSetting_F_LOCK;
#ifndef ENABLE_FEAT_F4HWN
State[1] = gSetting_350TX;
#endif
#ifdef ENABLE_DTMF_CALLING
State[2] = gSetting_KILLED;
#endif
#ifndef ENABLE_FEAT_F4HWN
State[3] = gSetting_200TX;
State[4] = gSetting_500TX;
#endif
State[5] = gSetting_350EN;
#ifdef ENABLE_FEAT_F4HWN
State[6] = false;
#else
State[6] = gSetting_ScrambleEnable;
#endif
//if (!gSetting_TX_EN) State[7] &= ~(1u << 0);
if (!gSetting_live_DTMF_decoder) State[7] &= ~(1u << 1);
State[7] = (State[7] & ~(3u << 2)) | ((gSetting_battery_text & 3u) << 2);
#ifdef ENABLE_AUDIO_BAR
#ifdef ENABLE_AUDIO_BAR
if (!gSetting_mic_bar) State[7] &= ~(1u << 4);
#endif
#ifndef ENABLE_FEAT_F4HWN
#ifdef ENABLE_AM_FIX
#endif
#ifndef ENABLE_FEAT_F4HWN
#ifdef ENABLE_AM_FIX
if (!gSetting_AM_fix) State[7] &= ~(1u << 5);
#endif
#endif
#endif
#endif
State[7] = (State[7] & ~(3u << 6)) | ((gSetting_backlight_on_tx_rx & 3u) << 6);
EEPROM_WriteBuffer(0x0F40, State);
@@ -827,8 +807,7 @@ void SETTINGS_SaveSettings(void)
#endif
}
void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO, uint8_t Mode)
{
void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO, uint8_t Mode) {
#ifdef ENABLE_NOAA
if (IS_NOAA_CHANNEL(Channel))
return;
@@ -867,11 +846,8 @@ void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO,
#endif
;
State._8[6] = pVFO->STEP_SETTING;
#ifdef ENABLE_FEAT_F4HWN
State._8[7] = 0;
#else
State._8[7] = pVFO->SCRAMBLING_TYPE;
#endif
EEPROM_WriteBuffer(OffsetVFO + 8, State._8);
SETTINGS_UpdateChannel(Channel, pVFO, true, true, true);
@@ -890,18 +866,16 @@ void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO,
}
void SETTINGS_SaveBatteryCalibration(const uint16_t * batteryCalibration)
{
void SETTINGS_SaveBatteryCalibration(const uint16_t *batteryCalibration) {
uint16_t buf[4];
EEPROM_WriteBuffer(0x1F40, batteryCalibration);
EEPROM_ReadBuffer( 0x1F48, buf, sizeof(buf));
EEPROM_ReadBuffer(0x1F48, buf, sizeof(buf));
buf[0] = batteryCalibration[4];
buf[1] = batteryCalibration[5];
EEPROM_WriteBuffer(0x1F48, buf);
}
void SETTINGS_SaveChannelName(uint8_t channel, const char * name)
{
void SETTINGS_SaveChannelName(uint8_t channel, const char *name) {
uint16_t offset = channel * 16;
uint8_t buf[16] = {0};
memcpy(buf, name, MIN(strlen(name), 10u));
@@ -909,8 +883,7 @@ void SETTINGS_SaveChannelName(uint8_t channel, const char * name)
EEPROM_WriteBuffer(0x0F58 + offset, buf + 8);
}
void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep, bool check, bool save)
{
void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep, bool check, bool save) {
#ifdef ENABLE_NOAA
if (!IS_NOAA_CHANNEL(channel))
#endif
@@ -940,8 +913,7 @@ void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep,
state[channel & 7u] = att.__val;
#ifdef ENABLE_FEAT_F4HWN
if(save)
{
if (save) {
EEPROM_WriteBuffer(offset, state);
}
#else
@@ -959,31 +931,30 @@ void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep,
}
}
void SETTINGS_WriteBuildOptions(void)
{
void SETTINGS_WriteBuildOptions(void) {
uint8_t State[8];
#ifdef ENABLE_FEAT_F4HWN
EEPROM_ReadBuffer(0x1FF0, State, sizeof(State));
#endif
State[0] = 0
#ifdef ENABLE_FMRADIO
State[0] = 0
#ifdef ENABLE_FMRADIO
| (1 << 0)
#endif
#ifdef ENABLE_NOAA
#endif
#ifdef ENABLE_NOAA
| (1 << 1)
#endif
#ifdef ENABLE_VOICE
#endif
#ifdef ENABLE_VOICE
| (1 << 2)
#endif
#ifdef ENABLE_VOX
#endif
#ifdef ENABLE_VOX
| (1 << 3)
#endif
#ifdef ENABLE_ALARM
#endif
#ifdef ENABLE_ALARM
| (1 << 4)
#endif
#ifdef ENABLE_TX1750
#endif
#ifdef ENABLE_TX1750
| (1 << 5)
#endif
#ifdef ENABLE_PWRON_PASSWORD
@@ -992,65 +963,68 @@ State[0] = 0
#ifdef ENABLE_DTMF_CALLING
| (1 << 7)
#endif
;
;
State[1] = 0
#ifdef ENABLE_FLASHLIGHT
State[1] = 0
#ifdef ENABLE_FLASHLIGHT
| (1 << 0)
#endif
#ifdef ENABLE_WIDE_RX
#endif
#ifdef ENABLE_WIDE_RX
| (1 << 1)
#endif
#ifdef ENABLE_BYP_RAW_DEMODULATORS
#endif
#ifdef ENABLE_BYP_RAW_DEMODULATORS
| (1 << 2)
#endif
#ifdef ENABLE_BLMIN_TMP_OFF
#endif
#ifdef ENABLE_BLMIN_TMP_OFF
| (1 << 3)
#endif
#ifdef ENABLE_AM_FIX
#endif
#ifdef ENABLE_AM_FIX
| (1 << 4)
#endif
#ifdef ENABLE_SPECTRUM
#endif
#ifdef ENABLE_SPECTRUM
| (1 << 5)
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
| (1 << 6)
#endif
;
;
EEPROM_WriteBuffer(0x1FF0, State);
}
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
void SETTINGS_WriteCurrentState(void)
{
void SETTINGS_WriteCurrentState(void) {
uint8_t State[8];
EEPROM_ReadBuffer(0x0E78, State, sizeof(State));
//State[3] = (gEeprom.CURRENT_STATE << 4) | (gEeprom.BATTERY_SAVE & 0x0F);
State[7] = (gEeprom.VFO_OPEN & 0x01) | ((gEeprom.CURRENT_STATE & 0x07) << 1) | ((gEeprom.SCAN_LIST_DEFAULT & 0x07) << 4);
State[7] = (gEeprom.VFO_OPEN & 0x01) | ((gEeprom.CURRENT_STATE & 0x07) << 1) |
((gEeprom.SCAN_LIST_DEFAULT & 0x07) << 4);
EEPROM_WriteBuffer(0x0E78, State);
}
}
#endif
#ifdef ENABLE_FEAT_F4HWN_VOL
void SETTINGS_WriteCurrentVol(void)
{
void SETTINGS_WriteCurrentVol(void) {
uint8_t State[8];
EEPROM_ReadBuffer(0x1F88, State, sizeof(State));
State[6] = gEeprom.VOLUME_GAIN;
EEPROM_WriteBuffer(0x1F88, State);
}
}
#endif
#ifdef ENABLE_FEAT_F4HWN
void SETTINGS_ResetTxLock(void)
{
void SETTINGS_ResetTxLock(void) {
uint8_t State[8];
for(uint8_t channel = 0; channel < 200; channel++)
{
for (uint8_t channel = 0; channel < 200; channel++) {
uint16_t OffsetVFO = channel * 16;
EEPROM_ReadBuffer(OffsetVFO + 8, State, sizeof(State));
State[4] |= (1 << 6);
EEPROM_WriteBuffer(OffsetVFO + 8, State);
}
}
#endif

View File

@@ -23,8 +23,20 @@
#include "frequencies.h"
#include <helper/battery.h>
#include "radio.h"
#include "functions.h"
#include "app/fskmodem.h"
#include <driver/backlight.h>
// Modem Modulation
typedef enum ModemModulation {
MOD_FSK_450, // for bad conditions
MOD_FSK_700, // for medium conditions
MOD_AFSK_1200, // for good conditions
MOD_AFSK_2400,
MOD_FSK_1200_2400,
MOD_NOAA_SAME
} ModemModulation;
enum POWER_OnDisplayMode_t {
#ifdef ENABLE_FEAT_F4HWN
POWER_ON_DISPLAY_MODE_ALL,
@@ -40,14 +52,14 @@ typedef enum POWER_OnDisplayMode_t POWER_OnDisplayMode_t;
enum TxLockModes_t {
F_LOCK_DEF, //all default frequencies + configurable
F_LOCK_FCC,
#ifdef ENABLE_FEAT_F4HWN_CA
F_LOCK_FCC,
F_LOCK_CA,
#endif
F_LOCK_CE,
F_LOCK_GB,
F_LOCK_430,
F_LOCK_438,
#endif
#ifdef ENABLE_FEAT_F4HWN_PMR
F_LOCK_PMR,
#endif
@@ -118,10 +130,10 @@ enum ACTION_OPT_t {
ACTION_OPT_WN,
ACTION_OPT_BACKLIGHT,
ACTION_OPT_MUTE,
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
ACTION_OPT_POWER_HIGH,
ACTION_OPT_REMOVE_OFFSET,
#endif
#endif
#endif
#ifdef ENABLE_REGA
ACTION_OPT_REGA_ALARM,
@@ -131,13 +143,13 @@ enum ACTION_OPT_t {
};
#ifdef ENABLE_VOICE
enum VOICE_Prompt_t
{
enum VOICE_Prompt_t
{
VOICE_PROMPT_OFF = 0,
VOICE_PROMPT_CHINESE,
VOICE_PROMPT_ENGLISH
};
typedef enum VOICE_Prompt_t VOICE_Prompt_t;
};
typedef enum VOICE_Prompt_t VOICE_Prompt_t;
#endif
enum ALARM_Mode_t {
@@ -277,9 +289,9 @@ typedef struct {
bool NOAA_AUTO_SCAN;
#endif
uint8_t VOLUME_GAIN;
#ifdef ENABLE_FEAT_F4HWN
#ifdef ENABLE_FEAT_F4HWN
uint8_t VOLUME_GAIN_BACKUP;
#endif
#endif
uint8_t DAC_GAIN;
VFO_Info_t VfoInfo[2];
@@ -302,32 +314,54 @@ typedef struct {
uint8_t S0_LEVEL;
uint8_t S9_LEVEL;
#endif
ModemModulation FSKMode;
uint32_t FSKSRCAddress;
} EEPROM_Config_t;
extern EEPROM_Config_t gEeprom;
void SETTINGS_InitEEPROM(void);
void SETTINGS_LoadCalibration(void);
uint32_t SETTINGS_FetchChannelFrequency(const int channel);
void SETTINGS_FetchChannelName(char *s, const int channel);
void SETTINGS_FactoryReset(bool bIsAll);
#ifdef ENABLE_FMRADIO
void SETTINGS_SaveFM(void);
void SETTINGS_SaveFM(void);
#endif
void SETTINGS_SaveVfoIndices(void);
void SETTINGS_SaveSettings(void);
void SETTINGS_SaveChannelName(uint8_t channel, const char * name);
void SETTINGS_SaveChannelName(uint8_t channel, const char *name);
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_SaveBatteryCalibration(const uint16_t *batteryCalibration);
void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep, bool check, bool save);
void SETTINGS_WriteBuildOptions(void);
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
void SETTINGS_WriteCurrentState(void);
void SETTINGS_WriteCurrentState(void);
#endif
#ifdef ENABLE_FEAT_F4HWN_VOL
void SETTINGS_WriteCurrentVol(void);
void SETTINGS_WriteCurrentVol(void);
#endif
#ifdef ENABLE_FEAT_F4HWN
void SETTINGS_ResetTxLock(void);
void SETTINGS_ResetTxLock(void);
#endif
#endif

View File

@@ -61,11 +61,13 @@ void UI_DisplayAircopy(void)
UI_PrintStringSmallNormal(String + 7, 97, 0, 3);
String[7] = 0;
// show the main large frequency digits
UI_DisplayFrequency(String, 16, 2, false);
//UI_DisplayFrequency(String, 16, 2, false);
UI_PrintStringSmallNormal(String, 0, 20, 2);
} else {
const char *ascii = INPUTBOX_GetAscii();
sprintf(String, "%.3s.%.3s", ascii, ascii + 3);
UI_DisplayFrequency(String, 16, 2, false);
//UI_DisplayFrequency(String, 16, 2, false);
UI_PrintStringSmallNormal(String, 0, 20, 2);
}
memset(String, 0, sizeof(String));

View File

@@ -50,7 +50,7 @@ void UI_DisplayFM(void)
//UI_PrintStringSmallNormal(String, 127 - 4*7, 0, 6);
if (gAskToSave) {
pPrintStr = "SAVE?";
pPrintStr = "SAV?";
} else if (gAskToDelete) {
pPrintStr = "DEL?";
} else if (gFM_ScanState == FM_SCAN_OFF) {
@@ -61,35 +61,35 @@ void UI_DisplayFM(void)
pPrintStr = "VFO";
for (unsigned int i = 0; i < 20; i++) {
if (gEeprom.FM_FrequencyPlaying == gFM_Channels[i]) {
sprintf(String, "VFO(CH%02u)", i + 1);
sprintf(String, "VF(C%02u)", i + 1);
pPrintStr = String;
break;
}
}
}
} else if (gFM_AutoScan) {
sprintf(String, "A-SCAN(%u)", gFM_ChannelPosition + 1);
sprintf(String, "A-SCN(%u)", gFM_ChannelPosition + 1);
pPrintStr = String;
} else {
pPrintStr = "M-SCAN";
pPrintStr = "M-SCN";
}
UI_PrintString(pPrintStr, 0, 127, 3, 10); // memory, vfo, scan
UI_PrintString(pPrintStr, 0, 127, 3, 12); // memory, vfo, scan
memset(String, 0, sizeof(String));
if (gAskToSave || (gEeprom.FM_IsMrMode && gInputBoxIndex > 0)) {
UI_GenerateChannelString(String, gFM_ChannelPosition);
} else if (gAskToDelete) {
sprintf(String, "CH-%02u", gEeprom.FM_SelectedChannel + 1);
sprintf(String, "C-%02u", gEeprom.FM_SelectedChannel + 1);
} else {
if (gInputBoxIndex == 0) {
sprintf(String, "%3d.%d", gEeprom.FM_FrequencyPlaying / 10, gEeprom.FM_FrequencyPlaying % 10);
sprintf(String, " %3d.%d", gEeprom.FM_FrequencyPlaying / 10, gEeprom.FM_FrequencyPlaying % 10);
} else {
const char * ascii = INPUTBOX_GetAscii();
sprintf(String, "%.3s.%.1s",ascii, ascii + 3);
}
UI_DisplayFrequency(String, 36, 1, gInputBoxIndex == 0); // frequency
UI_PrintString(String, 0, 20, 1, 10); // frequency
ST7565_BlitFullScreen();
return;
}

View File

@@ -24,15 +24,13 @@
#include "misc.h"
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof((arr)[0]))
#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof((arr)[0]))
#endif
void UI_GenerateChannelString(char *pString, const uint8_t Channel)
{
void UI_GenerateChannelString(char *pString, const uint8_t Channel) {
unsigned int i;
if (gInputBoxIndex == 0)
{
if (gInputBoxIndex == 0) {
sprintf(pString, "CH-%02u", Channel + 1);
return;
}
@@ -44,8 +42,7 @@ void UI_GenerateChannelString(char *pString, const uint8_t Channel)
pString[i + 3] = (gInputBox[i] == 10) ? '-' : gInputBox[i] + '0';
}
void UI_GenerateChannelStringEx(char *pString, const bool bShowPrefix, const uint8_t ChannelNumber)
{
void UI_GenerateChannelStringEx(char *pString, const bool bShowPrefix, const uint8_t ChannelNumber) {
if (gInputBoxIndex > 0) {
for (unsigned int i = 0; i < 3; i++) {
pString[i] = (gInputBox[i] == 10) ? '-' : gInputBox[i] + '0';
@@ -65,41 +62,38 @@ void UI_GenerateChannelStringEx(char *pString, const bool bShowPrefix, const uin
}
}
void UI_PrintStringBuffer(const char *pString, uint8_t * buffer, uint32_t char_width, const uint8_t *font)
{
void *memcpy_inv(void *dst, const void *src, size_t n) {
if (!dst || !src) return dst;
uint8_t *d = (uint8_t *) dst;
const uint8_t *s = (const uint8_t *) src;
while (n--) {
*d++ = ~(*s++);
}
return dst;
}
void UI_PrintStringBuffer(const char *pString, uint8_t *buffer, uint32_t char_width, const uint8_t *font, bool inv) {
const size_t Length = strlen(pString);
const unsigned int char_spacing = char_width + 1;
for (size_t i = 0; i < Length; i++) {
const unsigned int index = pString[i] - ' ' - 1;
if (pString[i] > ' ' && pString[i] < 127) {
const uint32_t offset = i * char_spacing + 1;
if (inv) {
memcpy_inv(buffer + offset, font + index * char_width, char_width);
} else {
memcpy(buffer + offset, font + index * char_width, char_width);
}
}
}
void UI_PrintString(const char *pString, uint8_t Start, uint8_t End, uint8_t Line, uint8_t Width)
{
size_t i;
size_t Length = strlen(pString);
if (End > Start)
Start += (((End - Start) - (Length * Width)) + 1) / 2;
for (i = 0; i < Length; i++)
{
const unsigned int ofs = (unsigned int)Start + (i * Width);
if (pString[i] > ' ' && pString[i] < 127)
{
const unsigned int index = pString[i] - ' ' - 1;
memcpy(gFrameBuffer[Line + 0] + ofs, &gFontBig[index][0], 7);
memcpy(gFrameBuffer[Line + 1] + ofs, &gFontBig[index][7], 7);
}
}
}
void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_t Line, uint8_t char_width, const uint8_t *font)
{
void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_t Line, uint8_t char_width,
const uint8_t *font, bool inv) {
const size_t Length = strlen(pString);
const unsigned int char_spacing = char_width + 1;
@@ -107,79 +101,99 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_
Start += (((End - Start) - Length * char_spacing) + 1) / 2;
}
UI_PrintStringBuffer(pString, gFrameBuffer[Line] + Start, char_width, font);
UI_PrintStringBuffer(pString, gFrameBuffer[Line] + Start, char_width, font, inv);
}
void UI_PrintStringSmallNormal(const char *pString, uint8_t Start, uint8_t End, uint8_t Line)
{
UI_PrintStringSmall(pString, Start, End, Line, ARRAY_SIZE(gFontSmall[0]), (const uint8_t *)gFontSmall);
void UI_PrintStringSmallNormal(const char *pString, uint8_t Start, uint8_t End, uint8_t Line) {
UI_PrintStringSmall(pString, Start, End, Line, ARRAY_SIZE(gFontSmall[0]), (const uint8_t *) gFontSmall, false);
}
void UI_PrintStringSmallBold(const char *pString, uint8_t Start, uint8_t End, uint8_t Line)
{
void UI_PrintString(const char *pString, uint8_t Start, uint8_t End, uint8_t Line, uint8_t Width) {
Width = Width;
UI_PrintStringSmallNormal(pString, Start, End, Line);
// size_t i;
// size_t Length = strlen(pString);
//
// if (End > Start)
// Start += (((End - Start) - (Length * Width)) + 1) / 2;
//
// for (i = 0; i < Length; i++)
// {
// const unsigned int ofs = (unsigned int)Start + (i * Width);
// if (pString[i] > ' ' && pString[i] < 127)
// {
// const unsigned int index = pString[i] - ' ' - 1;
// memcpy(gFrameBuffer[Line + 0] + ofs, &gFontSmall[index + '0'][0], 7);
// memcpy(gFrameBuffer[Line + 1] + ofs, &gFontSmall[index + '0'][7], 7);
// }
// }
}
void UI_PrintStringSmallBold(const char *pString, uint8_t Start, uint8_t End, uint8_t Line) {
//#ifdef ENABLE_SMALL_BOLD
// const uint8_t *font = (uint8_t *)gFontSmallBold;
// const uint8_t char_width = ARRAY_SIZE(gFontSmallBold[0]);
//#else
// const uint8_t *font = (uint8_t *) gFontSmall;
// const uint8_t char_width = ARRAY_SIZE(gFontSmall[0]);
//#endif
//
// UI_PrintStringSmall(pString, Start, End, Line, char_width, font);
UI_PrintStringSmall(pString, Start, End, Line, ARRAY_SIZE(gFontSmall[0]), (const uint8_t *) gFontSmall, true);
}
void UI_PrintStringSmallBufferNormal(const char *pString, uint8_t *buffer) {
UI_PrintStringBuffer(pString, buffer, ARRAY_SIZE(gFontSmall[0]), (uint8_t *) gFontSmall, false);
}
void UI_PrintStringSmallBufferBold(const char *pString, uint8_t *buffer) {
#ifdef ENABLE_SMALL_BOLD
const uint8_t *font = (uint8_t *)gFontSmallBold;
const uint8_t char_width = ARRAY_SIZE(gFontSmallBold[0]);
#else
const uint8_t *font = (uint8_t *)gFontSmall;
const uint8_t *font = (uint8_t *) gFontSmall;
const uint8_t char_width = ARRAY_SIZE(gFontSmall[0]);
#endif
UI_PrintStringSmall(pString, Start, End, Line, char_width, font);
UI_PrintStringBuffer(pString, buffer, char_width, font, false);
}
void UI_PrintStringSmallBufferNormal(const char *pString, uint8_t * buffer)
{
UI_PrintStringBuffer(pString, buffer, ARRAY_SIZE(gFontSmall[0]), (uint8_t *)gFontSmall);
}
void UI_PrintStringSmallBufferBold(const char *pString, uint8_t * buffer)
{
#ifdef ENABLE_SMALL_BOLD
const uint8_t *font = (uint8_t *)gFontSmallBold;
const uint8_t char_width = ARRAY_SIZE(gFontSmallBold[0]);
#else
const uint8_t *font = (uint8_t *)gFontSmall;
const uint8_t char_width = ARRAY_SIZE(gFontSmall[0]);
#endif
UI_PrintStringBuffer(pString, buffer, char_width, font);
}
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;
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;
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 (center) {
pFb0 -= 6;
pFb1 -= 6;
}
pFb0 += char_width;
pFb1 += char_width;
}
}
//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;
//
// 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;
// if (c >= '0' && c <= '9' + 1) {
// memcpy(pFb0 + 2, gFontSmall[(unsigned char) c], char_width - 3);
// memcpy(pFb1 + 2, gFontSmall[(unsigned char) c] + char_width - 3, char_width - 3);
// } else if (c == '.') {
// *pFb1 = 0x60;
// pFb0++;
// pFb1++;
// *pFb1 = 0x60;
// pFb0++;
// pFb1++;
// *pFb1 = 0x60;
// pFb0++;
// pFb1++;
// continue;
// }
//
// } else if (center) {
// pFb0 -= 6;
// pFb1 -= 6;
// }
// pFb0 += char_width;
// pFb1 += char_width;
// }
//}
/*
void UI_DisplayFrequency(const char *string, uint8_t X, uint8_t Y, bool center)
@@ -221,18 +235,16 @@ void UI_DisplayFrequency(const char *string, uint8_t X, uint8_t Y, bool center)
}
*/
void UI_DrawPixelBuffer(uint8_t (*buffer)[128], uint8_t x, uint8_t y, bool black)
{
void UI_DrawPixelBuffer(uint8_t (*buffer)[128], uint8_t x, uint8_t y, bool black) {
const uint8_t pattern = 1 << (y % 8);
if(black)
buffer[y/8][x] |= pattern;
if (black)
buffer[y / 8][x] |= pattern;
else
buffer[y/8][x] &= ~pattern;
buffer[y / 8][x] &= ~pattern;
}
static void sort(int16_t *a, int16_t *b)
{
if(*a > *b) {
static void sort(int16_t *a, int16_t *b) {
if (*a > *b) {
int16_t t = *a;
*a = *b;
*b = t;
@@ -240,9 +252,10 @@ static void sort(int16_t *a, int16_t *b)
}
#ifdef ENABLE_FEAT_F4HWN
/*
void UI_DrawLineDottedBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black)
{
/*
void UI_DrawLineDottedBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black)
{
if(x2==x1) {
sort(&y1, &y2);
for(int16_t i = y1; i <= y2; i+=2) {
@@ -259,22 +272,22 @@ static void sort(int16_t *a, int16_t *b)
UI_DrawPixelBuffer(buffer, i, i*a/multipl +b, black);
}
}
}
*/
}
*/
void PutPixel(uint8_t x, uint8_t y, bool fill) {
void PutPixel(uint8_t x, uint8_t y, bool fill) {
UI_DrawPixelBuffer(gFrameBuffer, x, y, fill);
}
}
void PutPixelStatus(uint8_t x, uint8_t y, bool fill) {
void PutPixelStatus(uint8_t x, uint8_t y, bool fill) {
UI_DrawPixelBuffer(&gStatusLine, x, y, fill);
}
}
void GUI_DisplaySmallest(const char *pString, uint8_t x, uint8_t y,
void GUI_DisplaySmallest(const char *pString, uint8_t x, uint8_t y,
bool statusbar, bool fill) {
uint8_t c;
uint8_t pixels;
const uint8_t *p = (const uint8_t *)pString;
const uint8_t *p = (const uint8_t *) pString;
while ((c = *p++) && c != '\0') {
c -= 0x20;
@@ -292,40 +305,37 @@ static void sort(int16_t *a, int16_t *b)
}
x += 4;
}
}
}
#endif
void UI_DrawLineBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black)
{
if(x2==x1) {
void UI_DrawLineBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black) {
if (x2 == x1) {
sort(&y1, &y2);
for(int16_t i = y1; i <= y2; i++) {
for (int16_t i = y1; i <= y2; i++) {
UI_DrawPixelBuffer(buffer, x1, i, black);
}
} else {
const int multipl = 1000;
int a = (y2-y1)*multipl / (x2-x1);
int a = (y2 - y1) * multipl / (x2 - x1);
int b = y1 - a * x1 / multipl;
sort(&x1, &x2);
for(int i = x1; i<= x2; i++)
{
UI_DrawPixelBuffer(buffer, i, i*a/multipl +b, black);
for (int i = x1; i <= x2; i++) {
UI_DrawPixelBuffer(buffer, i, i * a / multipl + b, black);
}
}
}
void UI_DrawRectangleBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black)
{
UI_DrawLineBuffer(buffer, x1,y1, x1,y2, black);
UI_DrawLineBuffer(buffer, x1,y1, x2,y1, black);
UI_DrawLineBuffer(buffer, x2,y1, x2,y2, black);
UI_DrawLineBuffer(buffer, x1,y2, x2,y2, black);
void UI_DrawRectangleBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black) {
UI_DrawLineBuffer(buffer, x1, y1, x1, y2, black);
UI_DrawLineBuffer(buffer, x1, y1, x2, y1, black);
UI_DrawLineBuffer(buffer, x2, y1, x2, y2, black);
UI_DrawLineBuffer(buffer, x1, y2, x2, y2, black);
}
void UI_DisplayPopup(const char *string)
{
void UI_DisplayPopup(const char *string) {
UI_DisplayClear();
// for(uint8_t i = 1; i < 5; i++) {
@@ -346,7 +356,6 @@ void UI_DisplayPopup(const char *string)
UI_PrintStringSmallNormal("Press EXIT", 9, 118, 6);
}
void UI_DisplayClear()
{
void UI_DisplayClear() {
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
}

View File

@@ -27,7 +27,7 @@ void UI_PrintStringSmallNormal(const char *pString, uint8_t Start, uint8_t End,
void UI_PrintStringSmallBold(const char *pString, uint8_t Start, uint8_t End, uint8_t Line);
void UI_PrintStringSmallBufferNormal(const char *pString, uint8_t *buffer);
void UI_PrintStringSmallBufferBold(const char *pString, uint8_t * buffer);
void UI_DisplayFrequency(const char *string, uint8_t X, uint8_t Y, bool center);
//void UI_DisplayFrequency(const char *string, uint8_t X, uint8_t Y, bool center);
void UI_DisplayPopup(const char *string);

559
ui/main.c

File diff suppressed because it is too large Load Diff

810
ui/menu.c

File diff suppressed because it is too large Load Diff

View File

@@ -28,8 +28,7 @@ typedef struct {
uint8_t menu_id;
} t_menu_item;
enum
{
enum {
MENU_SQL = 0,
MENU_STEP,
MENU_TXP,
@@ -41,9 +40,7 @@ enum
MENU_OFFSET,
MENU_TOT,
MENU_W_N,
#ifndef ENABLE_FEAT_F4HWN
MENU_SCR,
#endif
MENU_BCL,
#ifdef ENABLE_FEAT_F4HWN
MENU_TX_LOCK,
@@ -98,18 +95,18 @@ enum
MENU_D_LIST,
#endif
MENU_D_LIVE_DEC,
MENU_PONMSG,
MENU_FSKSRC,
MENU_FSKMOD,
MENU_ROGER,
MENU_VOL,
MENU_BAT_TXT,
MENU_AM,
#ifdef ENABLE_AM_FIX
MENU_AM_FIX,
#endif
#ifndef ENABLE_FEAT_F4HWN
#ifdef ENABLE_NOAA
#ifdef ENABLE_NOAA
MENU_NOAA_S,
#endif
#endif
#endif
MENU_RESET,
MENU_F_LOCK,
@@ -117,11 +114,9 @@ enum
MENU_200TX,
MENU_350TX,
MENU_500TX,
#endif
MENU_350EN,
#ifndef ENABLE_FEAT_F4HWN
MENU_SCREN,
#endif
MENU_350EN,
#ifdef ENABLE_F_CAL_MENU
MENU_F_CALI, // reference xtal calibration
#endif
@@ -139,18 +134,18 @@ enum
MENU_SET_MET,
MENU_SET_GUI,
MENU_SET_TMR,
#ifdef ENABLE_FEAT_F4HWN_NARROWER
#ifdef ENABLE_FEAT_F4HWN_NARROWER
MENU_SET_NFM,
#endif
#ifdef ENABLE_FEAT_F4HWN_VOL
#endif
#ifdef ENABLE_FEAT_F4HWN_VOL
MENU_SET_VOL,
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
MENU_SET_KEY,
#endif
#ifdef ENABLE_NOAA
#endif
#ifdef ENABLE_NOAA
MENU_NOAA_S,
#endif
#endif
#endif
MENU_BATCAL, // battery voltage calibration
MENU_F1SHRT,
@@ -170,51 +165,48 @@ extern const char gSubMenu_W_N[2][7];
extern const char gSubMenu_OFF_ON[2][4];
extern const char gSubMenu_NA[4];
extern const char gSubMenu_TOT[11][7];
extern const char* const gSubMenu_RXMode[4];
extern const char *const gSubMenu_RXMode[4];
#ifdef ENABLE_VOICE
extern const char gSubMenu_VOICE[3][4];
extern const char gSubMenu_VOICE[3][4];
#endif
extern const char* const gSubMenu_MDF[4];
extern const char *const gSubMenu_MDF[4];
#ifdef ENABLE_ALARM
extern const char gSubMenu_AL_MOD[2][5];
extern const char gSubMenu_AL_MOD[2][5];
#endif
#ifdef ENABLE_DTMF_CALLING
extern const char gSubMenu_D_RSP[4][11];
#endif
#ifdef ENABLE_FEAT_F4HWN
extern const char gSubMenu_SET_PWR[7][6];
extern const char gSubMenu_SET_PTT[2][8];
extern const char gSubMenu_SET_TOT[4][7];
extern const char gSubMenu_SET_LCK[2][9];
extern const char gSubMenu_SET_MET[2][8];
#ifdef ENABLE_FEAT_F4HWN_NARROWER
extern const char gSubMenu_SET_NFM[2][9];
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
extern const char gSubMenu_SET_KEY[][9];
#endif
extern const char gSubMenu_SET_PWR[7][6];
extern const char gSubMenu_SET_PTT[2][8];
extern const char gSubMenu_SET_TOT[4][7];
extern const char gSubMenu_SET_LCK[2][9];
extern const char gSubMenu_SET_MET[2][8];
#ifdef ENABLE_FEAT_F4HWN_NARROWER
extern const char gSubMenu_SET_NFM[2][9];
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
extern const char gSubMenu_SET_KEY[][9];
#endif
#endif
extern const char* const gSubMenu_PTT_ID[5];
#ifdef ENABLE_FEAT_F4HWN
extern const char gSubMenu_PONMSG[5][8];
#else
extern const char gSubMenu_PONMSG[4][8];
#endif
extern const char *const gSubMenu_PTT_ID[5];
extern const char gSubMenu_FSKMod[6][8];
extern const char gSubMenu_ROGER[3][6];
extern const char gSubMenu_RESET[2][4];
extern const char* const gSubMenu_F_LOCK[F_LOCK_LEN];
extern const char *const gSubMenu_F_LOCK[F_LOCK_LEN];
extern const char gSubMenu_RX_TX[4][6];
extern const char gSubMenu_BAT_TXT[3][8];
extern const char gSubMenu_BATTYP[3][9];
#ifndef ENABLE_FEAT_F4HWN
extern const char gSubMenu_SCRAMBLER[11][7];
#endif
extern const char gSubMenu_SCRAMBLER[11][7];
typedef struct {char* name; uint8_t id;} t_sidefunction;
typedef struct {
char *name;
uint8_t id;
} t_sidefunction;
extern const uint8_t gSubMenu_SIDEFUNCTIONS_size;
extern const t_sidefunction gSubMenu_SIDEFUNCTIONS[];
@@ -229,7 +221,9 @@ extern char edit[17];
extern int edit_index;
void UI_DisplayMenu(void);
int UI_MENU_GetCurrentMenuId();
uint8_t UI_MENU_GetMenuIdx(uint8_t id);
#endif

View File

@@ -84,13 +84,6 @@ void UI_DisplayStatus()
unsigned int x1 = x;
#ifdef ENABLE_DTMF_CALLING
if (gSetting_KILLED) {
memset(line + x, 0xFF, 10);
x1 = x + 10;
}
else
#endif
{ // SCAN indicator
if (gScanStateDir != SCAN_OFF || SCANNER_IsScanning()) {
if (IS_MR_CHANNEL(gNextMrChannel) && !SCANNER_IsScanning()) { // channel mode

View File

@@ -28,8 +28,7 @@
#include "version.h"
#include "bitmaps.h"
void UI_DisplayReleaseKeys(void)
{
void UI_DisplayReleaseKeys(void) {
memset(gStatusLine, 0, sizeof(gStatusLine));
#if defined(ENABLE_FEAT_F4HWN_CTR) || defined(ENABLE_FEAT_F4HWN_INV)
ST7565_ContrastAndInv();
@@ -43,12 +42,7 @@ void UI_DisplayReleaseKeys(void)
ST7565_BlitFullScreen();
}
void UI_DisplayWelcome(void)
{
char WelcomeString0[16];
char WelcomeString1[16];
char WelcomeString2[16];
char WelcomeString3[20];
void UI_DisplayWelcome(void) {
memset(gStatusLine, 0, sizeof(gStatusLine));
@@ -56,147 +50,16 @@ void UI_DisplayWelcome(void)
ST7565_ContrastAndInv();
#endif
UI_DisplayClear();
#ifdef ENABLE_FEAT_F4HWN
ST7565_BlitStatusLine();
ST7565_BlitFullScreen();
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_NONE || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND) {
ST7565_FillScreen(0x00);
#else
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_NONE || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_FULL_SCREEN) {
ST7565_FillScreen(0xFF);
#endif
} else {
memset(WelcomeString0, 0, sizeof(WelcomeString0));
memset(WelcomeString1, 0, sizeof(WelcomeString1));
EEPROM_ReadBuffer(0x0EB0, WelcomeString0, 16);
EEPROM_ReadBuffer(0x0EC0, WelcomeString1, 16);
sprintf(WelcomeString2, "%u.%02uV %u%%",
gBatteryVoltageAverage / 100,
gBatteryVoltageAverage % 100,
BATTERY_VoltsToPercent(gBatteryVoltageAverage));
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_VOLTAGE)
{
strcpy(WelcomeString0, "VOLTAGE");
strcpy(WelcomeString1, WelcomeString2);
}
else if(gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_ALL)
{
if(strlen(WelcomeString0) == 0 && strlen(WelcomeString1) == 0)
{
strcpy(WelcomeString0, "WELCOME");
strcpy(WelcomeString1, WelcomeString2);
}
else if(strlen(WelcomeString0) == 0 || strlen(WelcomeString1) == 0)
{
if(strlen(WelcomeString0) == 0)
{
strcpy(WelcomeString0, WelcomeString1);
}
strcpy(WelcomeString1, WelcomeString2);
}
}
else if(gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_MESSAGE)
{
if(strlen(WelcomeString0) == 0)
{
strcpy(WelcomeString0, "WELCOME");
}
if(strlen(WelcomeString1) == 0)
{
strcpy(WelcomeString1, "BIENVENUE");
}
}
UI_PrintString(WelcomeString0, 0, 127, 0, 10);
UI_PrintString(WelcomeString1, 0, 127, 2, 10);
#ifdef ENABLE_FEAT_F4HWN
UI_PrintStringSmallNormal(Version, 0, 128, 4);
UI_DrawLineBuffer(gFrameBuffer, 0, 31, 127, 31, 1); // Be ware, status zone = 8 lines, the rest = 56 ->total 64
for (uint8_t i = 18; i < 110; i++)
{
for (uint8_t i = 18; i < 110; i++) {
gFrameBuffer[4][i] ^= 0xFF;
}
sprintf(WelcomeString3, "%s Edition", Edition);
UI_PrintStringSmallNormal(WelcomeString3, 0, 127, 6);
/*
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
#if ENABLE_FEAT_F4HWN_RESCUE_OPS > 1
UI_PrintStringSmallNormal(Edition, 18, 0, 6);
if(gEeprom.MENU_LOCK == true) {
memcpy(gFrameBuffer[6] + 103, BITMAP_Ready, sizeof(BITMAP_Ready));
}
else
{
memcpy(gFrameBuffer[6] + 103, BITMAP_NotReady, sizeof(BITMAP_NotReady));
}
#else
UI_PrintStringSmallNormal(Edition, 18, 0, 5);
memcpy(gFrameBuffer[5] + 103, BITMAP_Ready, sizeof(BITMAP_Ready));
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
UI_PrintStringSmallNormal("RescueOps", 18, 0, 6);
if(gEeprom.MENU_LOCK == true) {
memcpy(gFrameBuffer[6] + 103, BITMAP_Ready, sizeof(BITMAP_Ready));
}
else
{
memcpy(gFrameBuffer[6] + 103, BITMAP_NotReady, sizeof(BITMAP_NotReady));
}
#endif
#endif
#else
UI_PrintStringSmallNormal(Edition, 18, 0, 6);
memcpy(gFrameBuffer[6] + 103, BITMAP_Ready, sizeof(BITMAP_Ready));
#endif
*/
/*
#ifdef ENABLE_SPECTRUM
#ifdef ENABLE_FMRADIO
UI_PrintStringSmallNormal(Based, 0, 127, 5);
UI_PrintStringSmallNormal(Credits, 0, 127, 6);
#else
UI_PrintStringSmallNormal("Bandscope ", 0, 127, 5);
memcpy(gFrameBuffer[5] + 95, BITMAP_Ready, sizeof(BITMAP_Ready));
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
UI_PrintStringSmallNormal("RescueOps ", 0, 127, 6);
if(gEeprom.MENU_LOCK == true) {
memcpy(gFrameBuffer[6] + 95, BITMAP_Ready, sizeof(BITMAP_Ready));
}
#else
UI_PrintStringSmallNormal("Broadcast ", 0, 127, 6);
#endif
#endif
#else
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
UI_PrintStringSmallNormal("RescueOps ", 0, 127, 5);
if(gEeprom.MENU_LOCK == true) {
memcpy(gFrameBuffer[5] + 95, BITMAP_Ready, sizeof(BITMAP_Ready));
}
#else
UI_PrintStringSmallNormal("Bandscope ", 0, 127, 5);
#endif
UI_PrintStringSmallNormal("Broadcast ", 0, 127, 6);
memcpy(gFrameBuffer[6] + 95, BITMAP_Ready, sizeof(BITMAP_Ready));
#endif
*/
#else
UI_PrintStringSmallNormal(Version, 0, 127, 6);
#endif
//ST7565_BlitStatusLine(); // blank status line : I think it's useless
ST7565_BlitFullScreen();
}
}

View File

@@ -7,7 +7,6 @@
#ifdef ENABLE_FEAT_F4HWN
const char Version[] = AUTHOR_STRING_2 " " VERSION_STRING_2;
const char Edition[] = EDITION_STRING;
#else
const char Version[] = AUTHOR_STRING VER;
#endif

View File

@@ -21,7 +21,3 @@ extern const char Version[];
extern const char UART_Version[];
#endif
#ifdef ENABLE_FEAT_F4HWN
extern const char Edition[];
#endif