Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
f4ff2e6048
|
|||
|
|
ba5257f2f6 | ||
|
|
aee4406cff | ||
|
|
448a201308 | ||
|
|
9a312c3526 | ||
|
|
7f146a5857 | ||
|
|
710ff8fac1 | ||
|
|
08af06564c | ||
|
|
03f761348b | ||
|
|
96acae8014 |
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
+8
-16
@@ -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) {
|
||||
@@ -94,8 +91,7 @@ bool AIRCOPY_SendMessage(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void AIRCOPY_StorePacket(void)
|
||||
{
|
||||
void AIRCOPY_StorePacket(void) {
|
||||
if (gFSKWriteIndex < 36) {
|
||||
return;
|
||||
}
|
||||
@@ -146,8 +142,7 @@ void AIRCOPY_StorePacket(void)
|
||||
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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+47
-47
@@ -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;
|
||||
}
|
||||
|
||||
+183
-82
@@ -20,15 +20,21 @@
|
||||
#include "app/app.h"
|
||||
#include "app/chFrScanner.h"
|
||||
#include "app/common.h"
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
|
||||
#include "app/fm.h"
|
||||
|
||||
#endif
|
||||
|
||||
#include "app/generic.h"
|
||||
#include "app/main.h"
|
||||
#include "app/scanner.h"
|
||||
|
||||
#ifdef ENABLE_SPECTRUM
|
||||
|
||||
#include "app/spectrum.h"
|
||||
|
||||
#endif
|
||||
|
||||
#include "audio.h"
|
||||
@@ -43,8 +49,22 @@
|
||||
#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;
|
||||
@@ -60,13 +80,13 @@ static void toggle_chan_scanlist(void)
|
||||
}
|
||||
|
||||
// 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;
|
||||
|
||||
@@ -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
|
||||
@@ -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];
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -290,12 +306,10 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
|
||||
|
||||
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)) {
|
||||
@@ -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,8 +429,7 @@ 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
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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,8 +650,7 @@ 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;
|
||||
|
||||
@@ -658,10 +659,8 @@ static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
#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;
|
||||
@@ -717,15 +716,13 @@ static void MAIN_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
} 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) {
|
||||
@@ -780,8 +777,7 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
||||
#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)
|
||||
{
|
||||
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);
|
||||
|
||||
+122
-232
@@ -17,8 +17,11 @@
|
||||
#include <string.h>
|
||||
|
||||
#if !defined(ENABLE_OVERLAY)
|
||||
|
||||
#include "ARMCM0.h"
|
||||
|
||||
#endif
|
||||
|
||||
#include "app/dtmf.h"
|
||||
#include "app/generic.h"
|
||||
#include "app/menu.h"
|
||||
@@ -35,9 +38,11 @@
|
||||
#include "helper/battery.h"
|
||||
#include "misc.h"
|
||||
#include "settings.h"
|
||||
|
||||
#if defined(ENABLE_OVERLAY)
|
||||
#include "sram-overlay.h"
|
||||
#endif
|
||||
|
||||
#include "ui/inputbox.h"
|
||||
#include "ui/menu.h"
|
||||
#include "ui/ui.h"
|
||||
@@ -76,8 +81,7 @@ uint8_t gUnlockAllTxConfCnt;
|
||||
}
|
||||
#endif
|
||||
|
||||
void MENU_StartCssScan(void)
|
||||
{
|
||||
void MENU_StartCssScan(void) {
|
||||
SCANNER_Start(true);
|
||||
gUpdateStatus = true;
|
||||
gCssBackgroundScan = true;
|
||||
@@ -85,12 +89,10 @@ void MENU_StartCssScan(void)
|
||||
gRequestDisplayScreen = DISPLAY_MENU;
|
||||
}
|
||||
|
||||
void MENU_CssScanFound(void)
|
||||
{
|
||||
void MENU_CssScanFound(void) {
|
||||
if (gScanCssResultType == CODE_TYPE_DIGITAL || gScanCssResultType == CODE_TYPE_REVERSE_DIGITAL) {
|
||||
gMenuCursor = UI_MENU_GetMenuIdx(MENU_R_DCS);
|
||||
}
|
||||
else if(gScanCssResultType == CODE_TYPE_CONTINUOUS_TONE) {
|
||||
} else if (gScanCssResultType == CODE_TYPE_CONTINUOUS_TONE) {
|
||||
gMenuCursor = UI_MENU_GetMenuIdx(MENU_R_CTCS);
|
||||
}
|
||||
|
||||
@@ -100,8 +102,7 @@ void MENU_CssScanFound(void)
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
|
||||
void MENU_StopCssScan(void)
|
||||
{
|
||||
void MENU_StopCssScan(void) {
|
||||
gCssBackgroundScan = false;
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
@@ -111,12 +112,10 @@ void MENU_StopCssScan(void)
|
||||
gUpdateStatus = true;
|
||||
}
|
||||
|
||||
int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
||||
{
|
||||
int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax) {
|
||||
*pMin = 0;
|
||||
|
||||
switch (menu_id)
|
||||
{
|
||||
switch (menu_id) {
|
||||
case MENU_SQL:
|
||||
//*pMin = 0;
|
||||
*pMax = 9;
|
||||
@@ -184,9 +183,9 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
||||
*pMax = ARRAY_SIZE(gSubMenu_ROGER) - 1;
|
||||
break;
|
||||
|
||||
case MENU_PONMSG:
|
||||
case MENU_FSKMOD:
|
||||
//*pMin = 0;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_PONMSG) - 1;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_FSKMod) - 1;
|
||||
break;
|
||||
|
||||
case MENU_R_DCS:
|
||||
@@ -253,9 +252,6 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
||||
case MENU_500TX:
|
||||
#endif
|
||||
case MENU_350EN:
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
case MENU_SCREN:
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
case MENU_SET_TMR:
|
||||
#endif
|
||||
@@ -267,17 +263,20 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
||||
*pMax = ARRAY_SIZE(gModulationStr) - 1;
|
||||
break;
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
case MENU_SCR:
|
||||
//*pMin = 0;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_SCRAMBLER) - 1;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MENU_AUTOLK:
|
||||
*pMax = 40;
|
||||
break;
|
||||
|
||||
case MENU_FSKSRC:
|
||||
*pMax = INT32_MAX;
|
||||
*pMin = 0;
|
||||
break;
|
||||
|
||||
case MENU_TOT:
|
||||
//*pMin = 0;
|
||||
*pMin = 5;
|
||||
@@ -449,21 +448,17 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MENU_AcceptSetting(void)
|
||||
{
|
||||
void MENU_AcceptSetting(void) {
|
||||
int32_t Min;
|
||||
int32_t Max;
|
||||
FREQ_Config_t *pConfig = &gTxVfo->freq_config_RX;
|
||||
|
||||
if (!MENU_GetLimits(UI_MENU_GetCurrentMenuId(), &Min, &Max))
|
||||
{
|
||||
if (!MENU_GetLimits(UI_MENU_GetCurrentMenuId(), &Min, &Max)) {
|
||||
if (gSubMenuSelection < Min) gSubMenuSelection = Min;
|
||||
else
|
||||
if (gSubMenuSelection > Max) gSubMenuSelection = Max;
|
||||
else if (gSubMenuSelection > Max) gSubMenuSelection = Max;
|
||||
}
|
||||
|
||||
switch (UI_MENU_GetCurrentMenuId())
|
||||
{
|
||||
switch (UI_MENU_GetCurrentMenuId()) {
|
||||
default:
|
||||
return;
|
||||
|
||||
@@ -474,8 +469,7 @@ void MENU_AcceptSetting(void)
|
||||
|
||||
case MENU_STEP:
|
||||
gTxVfo->STEP_SETTING = FREQUENCY_GetStepIdxFromSortedIdx(gSubMenuSelection);
|
||||
if (IS_FREQ_CHANNEL(gTxVfo->CHANNEL_SAVE))
|
||||
{
|
||||
if (IS_FREQ_CHANNEL(gTxVfo->CHANNEL_SAVE)) {
|
||||
gRequestSaveChannel = 1;
|
||||
}
|
||||
return;
|
||||
@@ -497,12 +491,10 @@ void MENU_AcceptSetting(void)
|
||||
}
|
||||
pConfig->Code = 0;
|
||||
pConfig->CodeType = CODE_TYPE_OFF;
|
||||
}
|
||||
else if (gSubMenuSelection < 105) {
|
||||
} else if (gSubMenuSelection < 105) {
|
||||
pConfig->CodeType = CODE_TYPE_DIGITAL;
|
||||
pConfig->Code = gSubMenuSelection - 1;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
pConfig->CodeType = CODE_TYPE_REVERSE_DIGITAL;
|
||||
pConfig->Code = gSubMenuSelection - 105;
|
||||
}
|
||||
@@ -520,8 +512,7 @@ void MENU_AcceptSetting(void)
|
||||
}
|
||||
pConfig->Code = 0;
|
||||
pConfig->CodeType = CODE_TYPE_OFF;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
pConfig->Code = gSubMenuSelection - 1;
|
||||
pConfig->CodeType = CODE_TYPE_CONTINUOUS_TONE;
|
||||
}
|
||||
@@ -544,18 +535,14 @@ void MENU_AcceptSetting(void)
|
||||
gRequestSaveChannel = 1;
|
||||
return;
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
case MENU_SCR:
|
||||
gTxVfo->SCRAMBLING_TYPE = gSubMenuSelection;
|
||||
#if 0
|
||||
if (gSubMenuSelection > 0 && gSetting_ScrambleEnable)
|
||||
if (gSubMenuSelection > 0)
|
||||
BK4819_EnableScramble(gSubMenuSelection - 1);
|
||||
else
|
||||
BK4819_DisableScramble();
|
||||
#endif
|
||||
gRequestSaveChannel = 1;
|
||||
return;
|
||||
#endif
|
||||
|
||||
case MENU_BCL:
|
||||
gTxVfo->BUSY_CHANNEL_LOCK = gSubMenuSelection;
|
||||
@@ -772,8 +759,7 @@ void MENU_AcceptSetting(void)
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
case MENU_D_LIST:
|
||||
gDTMF_chosen_contact = gSubMenuSelection - 1;
|
||||
if (gIsDtmfContactValid)
|
||||
{
|
||||
if (gIsDtmfContactValid) {
|
||||
GUI_SelectNextDisplay(DISPLAY_MAIN);
|
||||
gDTMF_InputMode = true;
|
||||
gDTMF_InputBox_Index = 3;
|
||||
@@ -782,8 +768,12 @@ void MENU_AcceptSetting(void)
|
||||
}
|
||||
return;
|
||||
#endif
|
||||
case MENU_PONMSG:
|
||||
gEeprom.POWER_ON_DISPLAY_MODE = gSubMenuSelection;
|
||||
case MENU_FSKMOD:
|
||||
gEeprom.FSKMode = gSubMenuSelection;
|
||||
break;
|
||||
|
||||
case MENU_FSKSRC:
|
||||
gEeprom.FSKSRCAddress = gSubMenuSelection;
|
||||
break;
|
||||
|
||||
case MENU_ROGER:
|
||||
@@ -829,18 +819,6 @@ void MENU_AcceptSetting(void)
|
||||
#endif
|
||||
|
||||
case MENU_F_LOCK: {
|
||||
if(gSubMenuSelection == F_LOCK_NONE) { // select 10 times to enable
|
||||
gUnlockAllTxConfCnt++;
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if(gUnlockAllTxConfCnt < 3)
|
||||
#else
|
||||
if(gUnlockAllTxConfCnt < 10)
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
else
|
||||
gUnlockAllTxConfCnt = 0;
|
||||
|
||||
gSetting_F_LOCK = gSubMenuSelection;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
@@ -864,12 +842,10 @@ void MENU_AcceptSetting(void)
|
||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||
gFlagResetVfos = true;
|
||||
break;
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
case MENU_SCREN:
|
||||
gSetting_ScrambleEnable = gSubMenuSelection;
|
||||
gFlagReconfigureVfos = true;
|
||||
break;
|
||||
#endif
|
||||
// case MENU_SCREN:
|
||||
// gSetting_ScrambleEnable = gSubMenuSelection;
|
||||
// gFlagReconfigureVfos = true;
|
||||
// break;
|
||||
|
||||
#ifdef ENABLE_F_CAL_MENU
|
||||
case MENU_F_CALI:
|
||||
@@ -877,8 +853,7 @@ void MENU_AcceptSetting(void)
|
||||
return;
|
||||
#endif
|
||||
|
||||
case MENU_BATCAL:
|
||||
{ // voltages are averages between discharge curves of 1600 and 2200 mAh
|
||||
case MENU_BATCAL: { // voltages are averages between discharge curves of 1600 and 2200 mAh
|
||||
// gBatteryCalibration[0] = (520ul * gSubMenuSelection) / 760; // 5.20V empty, blinking above this value, reduced functionality below
|
||||
// gBatteryCalibration[1] = (689ul * gSubMenuSelection) / 760; // 6.89V, ~5%, 1 bars above this value
|
||||
// gBatteryCalibration[2] = (724ul * gSubMenuSelection) / 760; // 7.24V, ~17%, 2 bars above this value
|
||||
@@ -897,8 +872,7 @@ void MENU_AcceptSetting(void)
|
||||
case MENU_F1LONG:
|
||||
case MENU_F2SHRT:
|
||||
case MENU_F2LONG:
|
||||
case MENU_MLONG:
|
||||
{
|
||||
case MENU_MLONG: {
|
||||
uint8_t *fun[] = {
|
||||
&gEeprom.KEY_1_SHORT_PRESS_ACTION,
|
||||
&gEeprom.KEY_1_LONG_PRESS_ACTION,
|
||||
@@ -977,25 +951,20 @@ void MENU_AcceptSetting(void)
|
||||
gRequestSaveSettings = true;
|
||||
}
|
||||
|
||||
static void MENU_ClampSelection(int8_t Direction)
|
||||
{
|
||||
static void MENU_ClampSelection(int8_t Direction) {
|
||||
int32_t Min;
|
||||
int32_t Max;
|
||||
|
||||
if (!MENU_GetLimits(UI_MENU_GetCurrentMenuId(), &Min, &Max))
|
||||
{
|
||||
if (!MENU_GetLimits(UI_MENU_GetCurrentMenuId(), &Min, &Max)) {
|
||||
int32_t Selection = gSubMenuSelection;
|
||||
if (Selection < Min) Selection = Min;
|
||||
else
|
||||
if (Selection > Max) Selection = Max;
|
||||
else if (Selection > Max) Selection = Max;
|
||||
gSubMenuSelection = NUMBER_AddWithWraparound(Selection, Direction, Min, Max);
|
||||
}
|
||||
}
|
||||
|
||||
void MENU_ShowCurrentSetting(void)
|
||||
{
|
||||
switch (UI_MENU_GetCurrentMenuId())
|
||||
{
|
||||
void MENU_ShowCurrentSetting(void) {
|
||||
switch (UI_MENU_GetCurrentMenuId()) {
|
||||
case MENU_SQL:
|
||||
gSubMenuSelection = gEeprom.SQUELCH_LEVEL;
|
||||
break;
|
||||
@@ -1013,8 +982,7 @@ void MENU_ShowCurrentSetting(void)
|
||||
break;
|
||||
|
||||
case MENU_R_DCS:
|
||||
case MENU_R_CTCS:
|
||||
{
|
||||
case MENU_R_CTCS: {
|
||||
DCS_CodeType_t type = gTxVfo->freq_config_RX.CodeType;
|
||||
uint8_t code = gTxVfo->freq_config_RX.Code;
|
||||
int menuid = UI_MENU_GetCurrentMenuId();
|
||||
@@ -1045,8 +1013,7 @@ void MENU_ShowCurrentSetting(void)
|
||||
}
|
||||
|
||||
case MENU_T_DCS:
|
||||
switch (gTxVfo->freq_config_TX.CodeType)
|
||||
{
|
||||
switch (gTxVfo->freq_config_TX.CodeType) {
|
||||
case CODE_TYPE_DIGITAL:
|
||||
gSubMenuSelection = gTxVfo->freq_config_TX.Code + 1;
|
||||
break;
|
||||
@@ -1060,7 +1027,8 @@ void MENU_ShowCurrentSetting(void)
|
||||
break;
|
||||
|
||||
case MENU_T_CTCS:
|
||||
gSubMenuSelection = (gTxVfo->freq_config_TX.CodeType == CODE_TYPE_CONTINUOUS_TONE) ? gTxVfo->freq_config_TX.Code + 1 : 0;
|
||||
gSubMenuSelection = (gTxVfo->freq_config_TX.CodeType == CODE_TYPE_CONTINUOUS_TONE) ?
|
||||
gTxVfo->freq_config_TX.Code + 1 : 0;
|
||||
break;
|
||||
|
||||
case MENU_SFT_D:
|
||||
@@ -1075,11 +1043,9 @@ void MENU_ShowCurrentSetting(void)
|
||||
gSubMenuSelection = gTxVfo->CHANNEL_BANDWIDTH;
|
||||
break;
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
case MENU_SCR:
|
||||
gSubMenuSelection = gTxVfo->SCRAMBLING_TYPE;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MENU_BCL:
|
||||
gSubMenuSelection = gTxVfo->BUSY_CHANNEL_LOCK;
|
||||
@@ -1109,12 +1075,9 @@ void MENU_ShowCurrentSetting(void)
|
||||
|
||||
case MENU_ABR:
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if(gBackLight)
|
||||
{
|
||||
if (gBackLight) {
|
||||
gSubMenuSelection = gBacklightTimeOriginal;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
gSubMenuSelection = gEeprom.BACKLIGHT_TIME;
|
||||
}
|
||||
#else
|
||||
@@ -1135,7 +1098,8 @@ void MENU_ShowCurrentSetting(void)
|
||||
break;
|
||||
|
||||
case MENU_TDR:
|
||||
gSubMenuSelection = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2;
|
||||
gSubMenuSelection =
|
||||
(gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2;
|
||||
break;
|
||||
|
||||
case MENU_BEEP:
|
||||
@@ -1207,15 +1171,9 @@ void MENU_ShowCurrentSetting(void)
|
||||
break;
|
||||
|
||||
case MENU_SLIST1:
|
||||
gSubMenuSelection = RADIO_FindNextChannel(0, 1, true, 1);
|
||||
break;
|
||||
|
||||
case MENU_SLIST2:
|
||||
gSubMenuSelection = RADIO_FindNextChannel(0, 1, true, 2);
|
||||
break;
|
||||
|
||||
case MENU_SLIST3:
|
||||
gSubMenuSelection = RADIO_FindNextChannel(0, 1, true, 3);
|
||||
gSubMenuSelection = RADIO_FindNextChannel(0, 1, true, UI_MENU_GetCurrentMenuId() - MENU_SLIST1 + 1);
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_ALARM
|
||||
@@ -1262,8 +1220,12 @@ void MENU_ShowCurrentSetting(void)
|
||||
gSubMenuSelection = gSetting_live_DTMF_decoder;
|
||||
break;
|
||||
|
||||
case MENU_PONMSG:
|
||||
gSubMenuSelection = gEeprom.POWER_ON_DISPLAY_MODE;
|
||||
case MENU_FSKMOD:
|
||||
gSubMenuSelection = gEeprom.FSKMode;
|
||||
break;
|
||||
|
||||
case MENU_FSKSRC:
|
||||
gSubMenuSelection = (int32_t) gEeprom.FSKSRCAddress;
|
||||
break;
|
||||
|
||||
case MENU_ROGER:
|
||||
@@ -1315,15 +1277,6 @@ void MENU_ShowCurrentSetting(void)
|
||||
gSubMenuSelection = gSetting_500TX;
|
||||
break;
|
||||
|
||||
#endif
|
||||
case MENU_350EN:
|
||||
gSubMenuSelection = gSetting_350EN;
|
||||
break;
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
case MENU_SCREN:
|
||||
gSubMenuSelection = gSetting_ScrambleEnable;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_F_CAL_MENU
|
||||
@@ -1344,8 +1297,7 @@ void MENU_ShowCurrentSetting(void)
|
||||
case MENU_F1LONG:
|
||||
case MENU_F2SHRT:
|
||||
case MENU_F2LONG:
|
||||
case MENU_MLONG:
|
||||
{
|
||||
case MENU_MLONG: {
|
||||
uint8_t *fun[] = {
|
||||
&gEeprom.KEY_1_SHORT_PRESS_ACTION,
|
||||
&gEeprom.KEY_1_LONG_PRESS_ACTION,
|
||||
@@ -1428,8 +1380,7 @@ void MENU_ShowCurrentSetting(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
|
||||
uint8_t Offset;
|
||||
int32_t Min;
|
||||
int32_t Max;
|
||||
@@ -1440,17 +1391,13 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME && edit_index >= 0)
|
||||
{ // currently editing the channel name
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME && edit_index >= 0) { // currently editing the channel name
|
||||
|
||||
if (edit_index < 10)
|
||||
{
|
||||
if (Key <= KEY_9)
|
||||
{
|
||||
if (edit_index < 10) {
|
||||
if (Key <= KEY_9) {
|
||||
edit[edit_index] = '0' + Key - KEY_0;
|
||||
|
||||
if (++edit_index >= 10)
|
||||
{ // exit edit
|
||||
if (++edit_index >= 10) { // exit edit
|
||||
gFlagAcceptSetting = false;
|
||||
gAskForConfirmation = 1;
|
||||
}
|
||||
@@ -1466,17 +1413,14 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
gRequestDisplayScreen = DISPLAY_MENU;
|
||||
|
||||
if (!gIsInSubMenu)
|
||||
{
|
||||
switch (gInputBoxIndex)
|
||||
{
|
||||
if (!gIsInSubMenu) {
|
||||
switch (gInputBoxIndex) {
|
||||
case 2:
|
||||
gInputBoxIndex = 0;
|
||||
|
||||
Value = (gInputBox[0] * 10) + gInputBox[1];
|
||||
|
||||
if (Value > 0 && Value <= gMenuListCount)
|
||||
{
|
||||
if (Value > 0 && Value <= gMenuListCount) {
|
||||
gMenuCursor = Value - 1;
|
||||
gFlagRefreshSetting = true;
|
||||
return;
|
||||
@@ -1490,8 +1434,7 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
[[fallthrough]];
|
||||
case 1:
|
||||
Value = gInputBox[0];
|
||||
if (Value > 0 && Value <= gMenuListCount)
|
||||
{
|
||||
if (Value > 0 && Value <= gMenuListCount) {
|
||||
gMenuCursor = Value - 1;
|
||||
gFlagRefreshSetting = true;
|
||||
return;
|
||||
@@ -1505,12 +1448,10 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
return;
|
||||
}
|
||||
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_OFFSET)
|
||||
{
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_OFFSET) {
|
||||
uint32_t Frequency;
|
||||
|
||||
if (gInputBoxIndex < 6)
|
||||
{ // invalid frequency
|
||||
if (gInputBoxIndex < 6) { // invalid frequency
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||
#endif
|
||||
@@ -1531,11 +1472,9 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_CH ||
|
||||
UI_MENU_GetCurrentMenuId() == MENU_DEL_CH ||
|
||||
UI_MENU_GetCurrentMenuId() == MENU_1_CALL ||
|
||||
UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME)
|
||||
{ // enter 3-digit channel number
|
||||
UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME) { // enter 3-digit channel number
|
||||
|
||||
if (gInputBoxIndex < 3)
|
||||
{
|
||||
if (gInputBoxIndex < 3) {
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||
#endif
|
||||
@@ -1547,8 +1486,7 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
Value = ((gInputBox[0] * 100) + (gInputBox[1] * 10) + gInputBox[2]) - 1;
|
||||
|
||||
if (IS_MR_CHANNEL(Value))
|
||||
{
|
||||
if (IS_MR_CHANNEL(Value)) {
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||
#endif
|
||||
@@ -1560,8 +1498,7 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
return;
|
||||
}
|
||||
|
||||
if (MENU_GetLimits(UI_MENU_GetCurrentMenuId(), &Min, &Max))
|
||||
{
|
||||
if (MENU_GetLimits(UI_MENU_GetCurrentMenuId(), &Min, &Max)) {
|
||||
gInputBoxIndex = 0;
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
return;
|
||||
@@ -1591,8 +1528,7 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
if (Offset == gInputBoxIndex)
|
||||
gInputBoxIndex = 0;
|
||||
|
||||
if (Value <= Max)
|
||||
{
|
||||
if (Value <= Max) {
|
||||
gSubMenuSelection = Value;
|
||||
return;
|
||||
}
|
||||
@@ -1600,23 +1536,19 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
|
||||
static void MENU_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
static void MENU_Key_EXIT(bool bKeyPressed, bool bKeyHeld) {
|
||||
if (bKeyHeld || !bKeyPressed)
|
||||
return;
|
||||
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
if (!gCssBackgroundScan)
|
||||
{
|
||||
if (!gCssBackgroundScan) {
|
||||
/* Backlight related menus set full brightness. Set it back to the configured value,
|
||||
just in case we are exiting from one of them. */
|
||||
BACKLIGHT_TurnOn();
|
||||
|
||||
if (gIsInSubMenu)
|
||||
{
|
||||
if (gInputBoxIndex == 0 || UI_MENU_GetCurrentMenuId() != MENU_OFFSET)
|
||||
{
|
||||
if (gIsInSubMenu) {
|
||||
if (gInputBoxIndex == 0 || UI_MENU_GetCurrentMenuId() != MENU_OFFSET) {
|
||||
gAskForConfirmation = 0;
|
||||
gIsInSubMenu = false;
|
||||
gInputBoxIndex = 0;
|
||||
@@ -1625,8 +1557,7 @@ static void MENU_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = VOICE_ID_CANCEL;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
} else
|
||||
gInputBox[--gInputBoxIndex] = 10;
|
||||
|
||||
// ***********************
|
||||
@@ -1645,9 +1576,7 @@ static void MENU_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
BACKLIGHT_TurnOff(); // turn the backlight OFF
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
MENU_StopCssScan();
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
@@ -1660,16 +1589,14 @@ static void MENU_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
||||
gPttWasReleased = true;
|
||||
}
|
||||
|
||||
static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
{
|
||||
static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld) {
|
||||
if (bKeyHeld || !bKeyPressed)
|
||||
return;
|
||||
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
gRequestDisplayScreen = DISPLAY_MENU;
|
||||
|
||||
if (!gIsInSubMenu)
|
||||
{
|
||||
if (!gIsInSubMenu) {
|
||||
#ifdef ENABLE_VOICE
|
||||
if (UI_MENU_GetCurrentMenuId() != MENU_SCR)
|
||||
gAnotherVoiceID = MenuList[gMenuCursor].voice_id;
|
||||
@@ -1699,10 +1626,8 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
return;
|
||||
}
|
||||
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME)
|
||||
{
|
||||
if (edit_index < 0)
|
||||
{ // enter channel name edit mode
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME) {
|
||||
if (edit_index < 0) { // enter channel name edit mode
|
||||
if (!RADIO_CheckValidChannel(gSubMenuSelection, false, 0))
|
||||
return;
|
||||
|
||||
@@ -1719,10 +1644,7 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
memcpy(edit_original, edit, sizeof(edit_original));
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
if (edit_index >= 0 && edit_index < 10)
|
||||
{ // editing the channel name characters
|
||||
} else if (edit_index >= 0 && edit_index < 10) { // editing the channel name characters
|
||||
|
||||
if (++edit_index < 10)
|
||||
return; // next char
|
||||
@@ -1739,15 +1661,12 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
|
||||
// exiting the sub menu
|
||||
|
||||
if (gIsInSubMenu)
|
||||
{
|
||||
if (gIsInSubMenu) {
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_RESET ||
|
||||
UI_MENU_GetCurrentMenuId() == MENU_MEM_CH ||
|
||||
UI_MENU_GetCurrentMenuId() == MENU_DEL_CH ||
|
||||
UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME)
|
||||
{
|
||||
switch (gAskForConfirmation)
|
||||
{
|
||||
UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME) {
|
||||
switch (gAskForConfirmation) {
|
||||
case 0:
|
||||
gAskForConfirmation = 1;
|
||||
break;
|
||||
@@ -1757,8 +1676,7 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
|
||||
UI_DisplayMenu();
|
||||
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_RESET)
|
||||
{
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_RESET) {
|
||||
#ifdef ENABLE_VOICE
|
||||
AUDIO_SetVoiceID(0, VOICE_ID_CONFIRM);
|
||||
AUDIO_PlaySingleVoice(true);
|
||||
@@ -1777,9 +1695,7 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
gIsInSubMenu = false;
|
||||
gAskForConfirmation = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
gFlagAcceptSetting = true;
|
||||
gIsInSubMenu = false;
|
||||
}
|
||||
@@ -1797,22 +1713,18 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
gInputBoxIndex = 0;
|
||||
}
|
||||
|
||||
static void MENU_Key_STAR(const bool bKeyPressed, const bool bKeyHeld)
|
||||
{
|
||||
static void MENU_Key_STAR(const bool bKeyPressed, const bool bKeyHeld) {
|
||||
if (bKeyHeld || !bKeyPressed)
|
||||
return;
|
||||
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME && edit_index >= 0)
|
||||
{ // currently editing the channel name
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME && edit_index >= 0) { // currently editing the channel name
|
||||
|
||||
if (edit_index < 10)
|
||||
{
|
||||
if (edit_index < 10) {
|
||||
edit[edit_index] = '-';
|
||||
|
||||
if (++edit_index >= 10)
|
||||
{ // exit edit
|
||||
if (++edit_index >= 10) { // exit edit
|
||||
gFlagAcceptSetting = false;
|
||||
gAskForConfirmation = 1;
|
||||
}
|
||||
@@ -1831,8 +1743,8 @@ static void MENU_Key_STAR(const bool bKeyPressed, const bool bKeyHeld)
|
||||
if (gRxVfo->Modulation == MODULATION_FM)
|
||||
#endif
|
||||
{
|
||||
if ((UI_MENU_GetCurrentMenuId() == MENU_R_CTCS || UI_MENU_GetCurrentMenuId() == MENU_R_DCS) && gIsInSubMenu)
|
||||
{ // scan CTCSS or DCS to find the tone/code of the incoming signal
|
||||
if ((UI_MENU_GetCurrentMenuId() == MENU_R_CTCS || UI_MENU_GetCurrentMenuId() == MENU_R_DCS) &&
|
||||
gIsInSubMenu) { // scan CTCSS or DCS to find the tone/code of the incoming signal
|
||||
if (!SCANNER_IsScanning())
|
||||
MENU_StartCssScan();
|
||||
else
|
||||
@@ -1846,23 +1758,18 @@ static void MENU_Key_STAR(const bool bKeyPressed, const bool bKeyHeld)
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
|
||||
static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
{
|
||||
static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction) {
|
||||
uint8_t VFO;
|
||||
uint8_t Channel;
|
||||
bool bCheckScanList;
|
||||
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME && gIsInSubMenu && edit_index >= 0)
|
||||
{ // change the character
|
||||
if (bKeyPressed && edit_index < 10 && Direction != 0)
|
||||
{
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME && gIsInSubMenu && edit_index >= 0) { // change the character
|
||||
if (bKeyPressed && edit_index < 10 && Direction != 0) {
|
||||
const char unwanted[] = "$%&!\"':;?^`|{}";
|
||||
char c = edit[edit_index] + Direction;
|
||||
unsigned int i = 0;
|
||||
while (i < sizeof(unwanted) && c >= 32 && c <= 126)
|
||||
{
|
||||
if (c == unwanted[i++])
|
||||
{ // choose next character
|
||||
while (i < sizeof(unwanted) && c >= 32 && c <= 126) {
|
||||
if (c == unwanted[i++]) { // choose next character
|
||||
c += Direction;
|
||||
i = 0;
|
||||
}
|
||||
@@ -1874,25 +1781,21 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bKeyHeld)
|
||||
{
|
||||
if (!bKeyHeld) {
|
||||
if (!bKeyPressed)
|
||||
return;
|
||||
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
gInputBoxIndex = 0;
|
||||
}
|
||||
else
|
||||
if (!bKeyPressed)
|
||||
} else if (!bKeyPressed)
|
||||
return;
|
||||
|
||||
if (SCANNER_IsScanning()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gIsInSubMenu)
|
||||
{
|
||||
if (!gIsInSubMenu) {
|
||||
gMenuCursor = NUMBER_AddWithWraparound(gMenuCursor, -Direction, 0, gMenuListCount - 1);
|
||||
|
||||
gFlagRefreshSetting = true;
|
||||
@@ -1910,15 +1813,12 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
return;
|
||||
}
|
||||
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_OFFSET)
|
||||
{
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_OFFSET) {
|
||||
int32_t Offset = (Direction * gTxVfo->StepFrequency) + gSubMenuSelection;
|
||||
if (Offset < 99999990)
|
||||
{
|
||||
if (Offset < 99999990) {
|
||||
if (Offset < 0)
|
||||
Offset = 99999990;
|
||||
}
|
||||
else
|
||||
} else
|
||||
Offset = 0;
|
||||
|
||||
gSubMenuSelection = FREQUENCY_RoundToStep(Offset, gTxVfo->StepFrequency);
|
||||
@@ -1928,8 +1828,7 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
|
||||
VFO = 0;
|
||||
|
||||
switch (UI_MENU_GetCurrentMenuId())
|
||||
{
|
||||
switch (UI_MENU_GetCurrentMenuId()) {
|
||||
case MENU_DEL_CH:
|
||||
case MENU_1_CALL:
|
||||
case MENU_MEM_NAME:
|
||||
@@ -1962,10 +1861,8 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
gRequestDisplayScreen = DISPLAY_MENU;
|
||||
}
|
||||
|
||||
void MENU_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
switch (Key)
|
||||
{
|
||||
void MENU_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
|
||||
switch (Key) {
|
||||
case KEY_0:
|
||||
case KEY_1:
|
||||
case KEY_2:
|
||||
@@ -1994,16 +1891,13 @@ void MENU_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
MENU_Key_STAR(bKeyPressed, bKeyHeld);
|
||||
break;
|
||||
case KEY_F:
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME && edit_index >= 0)
|
||||
{ // currently editing the channel name
|
||||
if (!bKeyHeld && bKeyPressed)
|
||||
{
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME &&
|
||||
edit_index >= 0) { // currently editing the channel name
|
||||
if (!bKeyHeld && bKeyPressed) {
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
if (edit_index < 10)
|
||||
{
|
||||
if (edit_index < 10) {
|
||||
edit[edit_index] = ' ';
|
||||
if (++edit_index >= 10)
|
||||
{ // exit edit
|
||||
if (++edit_index >= 10) { // exit edit
|
||||
gFlagAcceptSetting = false;
|
||||
gAskForConfirmation = 1;
|
||||
}
|
||||
@@ -2024,18 +1918,14 @@ void MENU_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
break;
|
||||
}
|
||||
|
||||
if (gScreenToDisplay == DISPLAY_MENU)
|
||||
{
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_VOL ||
|
||||
if (gScreenToDisplay == DISPLAY_MENU) {
|
||||
if (
|
||||
#ifdef ENABLE_F_CAL_MENU
|
||||
UI_MENU_GetCurrentMenuId() == MENU_F_CALI ||
|
||||
#endif
|
||||
UI_MENU_GetCurrentMenuId() == MENU_BATCAL)
|
||||
{
|
||||
UI_MENU_GetCurrentMenuId() == MENU_BATCAL) {
|
||||
gMenuCountdown = menu_timeout_long_500ms;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
gMenuCountdown = menu_timeout_500ms;
|
||||
}
|
||||
}
|
||||
|
||||
+225
-443
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.
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
+2
-2
@@ -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"];
|
||||
|
||||
@@ -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] =
|
||||
|
||||
+34
-34
@@ -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:
|
||||
|
||||
+29
-27
@@ -17,16 +17,24 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "app/dtmf.h"
|
||||
|
||||
#if defined(ENABLE_FMRADIO)
|
||||
|
||||
#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"
|
||||
|
||||
#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
|
||||
@@ -119,12 +125,9 @@ void FUNCTION_Foreground(const FUNCTION_Type_t PreviousFunction)
|
||||
|
||||
void FUNCTION_PowerSave() {
|
||||
#ifdef ENABLE_FEAT_F4HWN_SLEEP
|
||||
if(gWakeUp)
|
||||
{
|
||||
if (gWakeUp) {
|
||||
gPowerSave_10ms = gEeprom.BATTERY_SAVE * 200; // deep sleep now indexed on BatSav
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
gPowerSave_10ms = gEeprom.BATTERY_SAVE * 10;
|
||||
}
|
||||
#else
|
||||
@@ -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();
|
||||
@@ -206,8 +210,10 @@ 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);
|
||||
if (gAlarmState == ALARM_STATE_TX1750) {
|
||||
BK4819_TransmitTone(false, 1750);
|
||||
gAlarmState = ALARM_STATE_OFF;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_ALARM
|
||||
@@ -220,20 +226,18 @@ void FUNCTION_Transmit()
|
||||
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;
|
||||
|
||||
|
||||
+4
-3
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
+5
-2
@@ -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);
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
#include <stdio.h> // NULL
|
||||
|
||||
#ifdef ENABLE_AM_FIX
|
||||
|
||||
#include "am_fix.h"
|
||||
|
||||
#endif
|
||||
|
||||
#include "audio.h"
|
||||
@@ -31,13 +33,19 @@
|
||||
|
||||
#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"
|
||||
|
||||
#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"
|
||||
|
||||
#endif
|
||||
|
||||
#include "helper/battery.h"
|
||||
@@ -61,8 +72,8 @@
|
||||
#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);
|
||||
@@ -70,8 +81,7 @@ void _putchar(__attribute__((unused)) char c)
|
||||
|
||||
}
|
||||
|
||||
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
|
||||
@@ -157,8 +167,7 @@ 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
|
||||
@@ -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)
|
||||
@@ -362,7 +350,6 @@ void Main(void)
|
||||
APP_RunSpectrum();
|
||||
}
|
||||
#endif
|
||||
// Pas besoin de `default`, aucun effet si l'état n'est pas traité.
|
||||
#endif
|
||||
|
||||
while (true) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
+63
-89
@@ -17,9 +17,11 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "app/dtmf.h"
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
#include "app/fm.h"
|
||||
#endif
|
||||
|
||||
#include "driver/bk1080.h"
|
||||
#include "driver/bk4819.h"
|
||||
#include "driver/eeprom.h"
|
||||
@@ -40,8 +42,7 @@ static const uint32_t gDefaultFrequencyTable[] =
|
||||
|
||||
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);
|
||||
@@ -141,12 +142,7 @@ 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
|
||||
EEPROM_ReadBuffer(0x0E98, Data, 8);
|
||||
@@ -162,8 +158,7 @@ void SETTINGS_InitEEPROM(void)
|
||||
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;
|
||||
}
|
||||
@@ -264,38 +259,38 @@ 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;
|
||||
@@ -309,8 +304,7 @@ void SETTINGS_InitEEPROM(void)
|
||||
#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];
|
||||
}
|
||||
@@ -394,8 +388,7 @@ void SETTINGS_InitEEPROM(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void SETTINGS_LoadCalibration(void)
|
||||
{
|
||||
void SETTINGS_LoadCalibration(void) {
|
||||
// uint8_t Mic;
|
||||
|
||||
EEPROM_ReadBuffer(0x1EC0, gEEPROM_RSSI_CALIB[3], 8);
|
||||
@@ -408,8 +401,7 @@ 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;
|
||||
}
|
||||
@@ -425,8 +417,7 @@ void SETTINGS_LoadCalibration(void)
|
||||
gEeprom.MIC_SENSITIVITY_TUNING = gMicGain_dB2[gEeprom.MIC_SENSITIVITY];
|
||||
|
||||
{
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
int16_t BK4819_XtalFreqLow;
|
||||
uint16_t EEPROM_1F8A;
|
||||
uint16_t EEPROM_1F8C;
|
||||
@@ -438,7 +429,8 @@ 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;
|
||||
@@ -453,10 +445,8 @@ void SETTINGS_LoadCalibration(void)
|
||||
}
|
||||
}
|
||||
|
||||
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,14 +503,12 @@ 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
|
||||
@@ -571,8 +556,7 @@ void SETTINGS_SaveFM(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
void SETTINGS_SaveVfoIndices(void)
|
||||
{
|
||||
void SETTINGS_SaveVfoIndices(void) {
|
||||
uint8_t State[8];
|
||||
|
||||
#ifndef ENABLE_NOAA
|
||||
@@ -593,8 +577,7 @@ void SETTINGS_SaveVfoIndices(void)
|
||||
EEPROM_WriteBuffer(0x0E80, State);
|
||||
}
|
||||
|
||||
void SETTINGS_SaveSettings(void)
|
||||
{
|
||||
void SETTINGS_SaveSettings(void) {
|
||||
uint8_t State[8];
|
||||
uint8_t tmp = 0;
|
||||
|
||||
@@ -634,17 +617,13 @@ void SETTINGS_SaveSettings(void)
|
||||
State[4] = gEeprom.DUAL_WATCH;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if(!gSaveRxMode)
|
||||
{
|
||||
if (!gSaveRxMode) {
|
||||
State[2] = gCB;
|
||||
State[4] = gDW;
|
||||
}
|
||||
if(gBackLight)
|
||||
{
|
||||
if (gBackLight) {
|
||||
State[5] = gBacklightTimeOriginal;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
State[5] = gEeprom.BACKLIGHT_TIME;
|
||||
}
|
||||
#else
|
||||
@@ -658,7 +637,8 @@ void SETTINGS_SaveSettings(void)
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESUME_STATE
|
||||
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);
|
||||
#else
|
||||
State[7] = gEeprom.VFO_OPEN;
|
||||
#endif
|
||||
@@ -672,7 +652,7 @@ 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
|
||||
@@ -743,24 +723,24 @@ 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);
|
||||
@@ -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,8 +866,7 @@ 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));
|
||||
@@ -900,8 +875,7 @@ void SETTINGS_SaveBatteryCalibration(const uint16_t * batteryCalibration)
|
||||
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,8 +931,7 @@ 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
|
||||
@@ -1021,36 +992,39 @@ State[1] = 0
|
||||
}
|
||||
|
||||
#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
|
||||
|
||||
+36
-2
@@ -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
|
||||
@@ -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);
|
||||
#endif
|
||||
|
||||
void SETTINGS_SaveVfoIndices(void);
|
||||
|
||||
void SETTINGS_SaveSettings(void);
|
||||
|
||||
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_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);
|
||||
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_VOL
|
||||
|
||||
void SETTINGS_WriteCurrentVol(void);
|
||||
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
|
||||
void SETTINGS_ResetTxLock(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+4
-2
@@ -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));
|
||||
|
||||
+7
-7
@@ -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,26 +61,26 @@ 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);
|
||||
@@ -89,7 +89,7 @@ void UI_DisplayFM(void)
|
||||
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;
|
||||
}
|
||||
|
||||
+111
-102
@@ -27,12 +27,10 @@
|
||||
#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,17 +101,53 @@ 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]);
|
||||
@@ -125,61 +155,45 @@ void UI_PrintStringSmallBold(const char *pString, uint8_t Start, uint8_t End, ui
|
||||
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,8 +235,7 @@ 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;
|
||||
@@ -230,8 +243,7 @@ void UI_DrawPixelBuffer(uint8_t (*buffer)[128], uint8_t x, uint8_t y, bool black
|
||||
buffer[y / 8][x] &= ~pattern;
|
||||
}
|
||||
|
||||
static void sort(int16_t *a, int16_t *b)
|
||||
{
|
||||
static void sort(int16_t *a, int16_t *b) {
|
||||
if (*a > *b) {
|
||||
int16_t t = *a;
|
||||
*a = *b;
|
||||
@@ -240,6 +252,7 @@ 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)
|
||||
{
|
||||
@@ -293,10 +306,10 @@ 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)
|
||||
{
|
||||
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++) {
|
||||
@@ -308,15 +321,13 @@ void UI_DrawLineBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x
|
||||
int b = y1 - a * x1 / multipl;
|
||||
|
||||
sort(&x1, &x2);
|
||||
for(int i = x1; i<= x2; i++)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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);
|
||||
@@ -324,8 +335,7 @@ void UI_DrawRectangleBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int1
|
||||
}
|
||||
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
|
||||
@@ -19,9 +19,13 @@
|
||||
|
||||
#include "app/chFrScanner.h"
|
||||
#include "app/dtmf.h"
|
||||
|
||||
#ifdef ENABLE_AM_FIX
|
||||
|
||||
#include "am_fix.h"
|
||||
|
||||
#endif
|
||||
|
||||
#include "bitmaps.h"
|
||||
#include "board.h"
|
||||
#include "driver/bk4819.h"
|
||||
@@ -39,7 +43,9 @@
|
||||
#include "audio.h"
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
|
||||
#include "driver/system.h"
|
||||
|
||||
#endif
|
||||
|
||||
center_line_t center_line = CENTER_LINE_NONE;
|
||||
@@ -53,10 +59,10 @@ center_line_t center_line = CENTER_LINE_NONE;
|
||||
|
||||
bool isMainOnlyInputDTMF = false;
|
||||
|
||||
static bool isMainOnly()
|
||||
{
|
||||
static bool isMainOnly() {
|
||||
return (gEeprom.DUAL_WATCH == DUAL_WATCH_OFF) && (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
const int8_t dBmCorrTable[7] = {
|
||||
@@ -81,8 +87,7 @@ const char *VfoStateStr[] = {
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
static void DrawSmallAntennaAndBars(uint8_t *p, unsigned int level)
|
||||
{
|
||||
static void DrawSmallAntennaAndBars(uint8_t *p, unsigned int level) {
|
||||
if (level > 6)
|
||||
level = 6;
|
||||
|
||||
@@ -93,10 +98,10 @@ static void DrawSmallAntennaAndBars(uint8_t *p, unsigned int level)
|
||||
memset(p + 2 + i * 3, bar, 2);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined ENABLE_AUDIO_BAR || defined ENABLE_RSSI_BAR
|
||||
|
||||
static void DrawLevelBar(uint8_t xpos, uint8_t line, uint8_t level, uint8_t bars)
|
||||
{
|
||||
static void DrawLevelBar(uint8_t xpos, uint8_t line, uint8_t level, uint8_t bars) {
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
const char hollowBar[] = {
|
||||
0b01111111,
|
||||
@@ -111,8 +116,7 @@ static void DrawLevelBar(uint8_t xpos, uint8_t line, uint8_t level, uint8_t bars
|
||||
|
||||
for (uint8_t i = 0; i < level; i++) {
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if(gSetting_set_met)
|
||||
{
|
||||
if (gSetting_set_met) {
|
||||
const char hollowBar[] = {
|
||||
0b01111111,
|
||||
0b01000001,
|
||||
@@ -123,13 +127,10 @@ static void DrawLevelBar(uint8_t xpos, uint8_t line, uint8_t level, uint8_t bars
|
||||
if (i < bars - 4) {
|
||||
for (uint8_t j = 0; j < 4; j++)
|
||||
p_line[xpos + i * 5 + j] = (~(0x7F >> (i + 1))) & 0x7F;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
memcpy(p_line + (xpos + i * 5), &hollowBar, ARRAY_SIZE(hollowBar));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
const char hollowBar[] = {
|
||||
0b00111110,
|
||||
0b00100010,
|
||||
@@ -146,8 +147,7 @@ static void DrawLevelBar(uint8_t xpos, uint8_t line, uint8_t level, uint8_t bars
|
||||
|
||||
if (i < bars - 4) {
|
||||
memcpy(p_line + (xpos + i * 5), &simpleBar, ARRAY_SIZE(simpleBar));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
memcpy(p_line + (xpos + i * 5), &hollowBar, ARRAY_SIZE(hollowBar));
|
||||
}
|
||||
}
|
||||
@@ -162,6 +162,7 @@ static void DrawLevelBar(uint8_t xpos, uint8_t line, uint8_t level, uint8_t bars
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_AUDIO_BAR
|
||||
@@ -175,10 +176,8 @@ uint8_t log2_approx(unsigned int value) {
|
||||
return log;
|
||||
}
|
||||
|
||||
void UI_DisplayAudioBar(void)
|
||||
{
|
||||
if (gSetting_mic_bar)
|
||||
{
|
||||
void UI_DisplayAudioBar(void) {
|
||||
if (gSetting_mic_bar) {
|
||||
if (gLowBattery && !gLowBatteryConfirmed)
|
||||
return;
|
||||
|
||||
@@ -187,12 +186,9 @@ void UI_DisplayAudioBar(void)
|
||||
RxBlinkLedCounter = 0;
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, false);
|
||||
unsigned int line;
|
||||
if (isMainOnly())
|
||||
{
|
||||
if (isMainOnly()) {
|
||||
line = 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
line = 3;
|
||||
}
|
||||
#else
|
||||
@@ -204,8 +200,7 @@ void UI_DisplayAudioBar(void)
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
)
|
||||
{
|
||||
) {
|
||||
return; // screen is in use
|
||||
}
|
||||
|
||||
@@ -236,10 +231,10 @@ void UI_DisplayAudioBar(void)
|
||||
ST7565_BlitFullScreen();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void DisplayRSSIBar(const bool now)
|
||||
{
|
||||
void DisplayRSSIBar(const bool now) {
|
||||
#if defined(ENABLE_RSSI_BAR)
|
||||
|
||||
const unsigned int txt_width = 7 * 8; // 8 text chars
|
||||
@@ -259,12 +254,9 @@ void DisplayRSSIBar(const bool now)
|
||||
*/
|
||||
|
||||
unsigned int line;
|
||||
if (isMainOnly())
|
||||
{
|
||||
if (isMainOnly()) {
|
||||
line = 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
line = 3;
|
||||
}
|
||||
|
||||
@@ -272,14 +264,12 @@ void DisplayRSSIBar(const bool now)
|
||||
//sprintf(String, "%d", RxBlink);
|
||||
//UI_PrintStringSmallBold(String, 80, 0, RxLine);
|
||||
|
||||
if(RxLine >= 0 && center_line != CENTER_LINE_IN_USE)
|
||||
{
|
||||
if (RxLine >= 0 && center_line != CENTER_LINE_IN_USE) {
|
||||
if (RxBlink == 0 || RxBlink == 1) {
|
||||
UI_PrintStringSmallBold("RX", 8, 0, RxLine);
|
||||
if (RxBlink == 1) RxBlink = 2;
|
||||
} else {
|
||||
for (uint8_t i = 8; i < 24; i++)
|
||||
{
|
||||
for (uint8_t i = 8; i < 24; i++) {
|
||||
gFrameBuffer[RxLine][i] = 0x00;
|
||||
}
|
||||
RxBlink = 1;
|
||||
@@ -337,8 +327,7 @@ void DisplayRSSIBar(const bool now)
|
||||
|
||||
if (rssi_dBm >= 93) {
|
||||
s_level = map(rssi_dBm, 141, 93, 1, 9);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
s_level = 9;
|
||||
overS9dBm = map(rssi_dBm, 93, 53, 0, 40);
|
||||
overS9Bars = map(overS9dBm, 0, 40, 0, 4);
|
||||
@@ -359,13 +348,10 @@ void DisplayRSSIBar(const bool now)
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if (gSetting_set_gui)
|
||||
{
|
||||
if (gSetting_set_gui) {
|
||||
sprintf(str, "%3d", -rssi_dBm);
|
||||
UI_PrintStringSmallNormal(str, LCD_WIDTH + 8, 0, line - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
sprintf(str, "% 4d %s", -rssi_dBm, "dBm");
|
||||
if (isMainOnly())
|
||||
GUI_DisplaySmallest(str, 2, 41, false, true);
|
||||
@@ -375,8 +361,7 @@ void DisplayRSSIBar(const bool now)
|
||||
|
||||
if (overS9Bars == 0) {
|
||||
sprintf(str, "S%d", s_level);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
sprintf(str, "+%02d", overS9dBm);
|
||||
}
|
||||
|
||||
@@ -460,8 +445,7 @@ void UI_MAIN_PrintAGC(bool now)
|
||||
}
|
||||
#endif
|
||||
|
||||
void UI_MAIN_TimeSlice500ms(void)
|
||||
{
|
||||
void UI_MAIN_TimeSlice500ms(void) {
|
||||
if (gScreenToDisplay == DISPLAY_MAIN) {
|
||||
#ifdef ENABLE_AGC_SHOW_DATA
|
||||
UI_MAIN_PrintAGC(true);
|
||||
@@ -472,28 +456,19 @@ void UI_MAIN_TimeSlice500ms(void)
|
||||
DisplayRSSIBar(true);
|
||||
}
|
||||
#ifdef ENABLE_FEAT_F4HWN // Blink Green Led for white...
|
||||
else if(gSetting_set_eot > 0 && RxBlinkLed == 2)
|
||||
{
|
||||
if(RxBlinkLedCounter <= 8)
|
||||
{
|
||||
if(RxBlinkLedCounter % 2 == 0)
|
||||
{
|
||||
if(gSetting_set_eot > 1 )
|
||||
{
|
||||
else if (gSetting_set_eot > 0 && RxBlinkLed == 2) {
|
||||
if (RxBlinkLedCounter <= 8) {
|
||||
if (RxBlinkLedCounter % 2 == 0) {
|
||||
if (gSetting_set_eot > 1) {
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(gSetting_set_eot > 1 )
|
||||
{
|
||||
} else {
|
||||
if (gSetting_set_eot > 1) {
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, true);
|
||||
}
|
||||
|
||||
if(gSetting_set_eot == 1 || gSetting_set_eot == 3)
|
||||
{
|
||||
switch(RxBlinkLedCounter)
|
||||
{
|
||||
if (gSetting_set_eot == 1 || gSetting_set_eot == 3) {
|
||||
switch (RxBlinkLedCounter) {
|
||||
case 1:
|
||||
AUDIO_PlayBeep(BEEP_400HZ_30MS);
|
||||
break;
|
||||
@@ -513,9 +488,7 @@ void UI_MAIN_TimeSlice500ms(void)
|
||||
}
|
||||
}
|
||||
RxBlinkLedCounter += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
RxBlinkLed = 0;
|
||||
}
|
||||
}
|
||||
@@ -525,8 +498,7 @@ void UI_MAIN_TimeSlice500ms(void)
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
void UI_DisplayMain(void)
|
||||
{
|
||||
void UI_DisplayMain(void) {
|
||||
char String[22];
|
||||
|
||||
center_line = CENTER_LINE_NONE;
|
||||
@@ -549,8 +521,7 @@ void UI_DisplayMain(void)
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if (gEeprom.KEY_LOCK && gKeypadLocked > 0)
|
||||
{ // tell user how to unlock the keyboard
|
||||
if (gEeprom.KEY_LOCK && gKeypadLocked > 0) { // tell user how to unlock the keyboard
|
||||
uint8_t shift = 3;
|
||||
|
||||
/*
|
||||
@@ -560,8 +531,7 @@ void UI_DisplayMain(void)
|
||||
SYSTEM_DelayMs(50);
|
||||
*/
|
||||
|
||||
if(isMainOnly())
|
||||
{
|
||||
if (isMainOnly()) {
|
||||
shift = 5;
|
||||
}
|
||||
//memcpy(gFrameBuffer[shift] + 2, gFontKeyLock, sizeof(gFontKeyLock));
|
||||
@@ -579,18 +549,14 @@ void UI_DisplayMain(void)
|
||||
|
||||
unsigned int activeTxVFO = gRxVfoIsActive ? gEeprom.RX_VFO : gEeprom.TX_VFO;
|
||||
|
||||
for (unsigned int vfo_num = 0; vfo_num < 2; vfo_num++)
|
||||
{
|
||||
for (unsigned int vfo_num = 0; vfo_num < 2; vfo_num++) {
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
const unsigned int line0 = 0; // text screen line
|
||||
const unsigned int line1 = 4;
|
||||
unsigned int line;
|
||||
if (isMainOnly())
|
||||
{
|
||||
if (isMainOnly()) {
|
||||
line = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
line = (vfo_num == 0) ? line0 : line1;
|
||||
}
|
||||
const bool isMainVFO = (vfo_num == gEeprom.TX_VFO);
|
||||
@@ -608,10 +574,8 @@ void UI_DisplayMain(void)
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if (isMainOnly())
|
||||
{
|
||||
if (activeTxVFO != vfo_num)
|
||||
{
|
||||
if (isMainOnly()) {
|
||||
if (activeTxVFO != vfo_num) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -632,8 +596,7 @@ void UI_DisplayMain(void)
|
||||
|
||||
uint8_t shift = 0;
|
||||
|
||||
if (isMainOnly())
|
||||
{
|
||||
if (isMainOnly()) {
|
||||
shift = 3;
|
||||
}
|
||||
|
||||
@@ -645,9 +608,7 @@ void UI_DisplayMain(void)
|
||||
|
||||
if (!isMainOnly())
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
gScanRangeStart = 0;
|
||||
}
|
||||
#else
|
||||
@@ -662,6 +623,20 @@ void UI_DisplayMain(void)
|
||||
#endif
|
||||
|
||||
|
||||
if (gEnteringSMS == SMS_ENTERING_DEST) {
|
||||
UI_PrintString("SMS Dst", 0, 0, line - 1, 8);
|
||||
sprintf(String, "%d", dataPacket.dest);
|
||||
UI_PrintStringSmallNormal(String, 0, 0, line);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (gEnteringSMS == SMS_ENTERING_MESSAGE) {
|
||||
UI_PrintString("SMS Dat", 0, 0, line - 1, 8);
|
||||
sprintf(String, "%s", dataPacket.data);
|
||||
UI_PrintStringSmallNormal(String, 0, 0, line);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (gDTMF_InputMode
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE || gDTMF_IsTx
|
||||
@@ -674,7 +649,8 @@ void UI_DisplayMain(void)
|
||||
if (!gDTMF_InputMode) {
|
||||
if (gDTMF_CallState == DTMF_CALL_STATE_CALL_OUT) {
|
||||
pPrintStr = DTMF_FindContact(gDTMF_String, Contact) ? Contact : gDTMF_String;
|
||||
} else if (gDTMF_CallState == DTMF_CALL_STATE_RECEIVED || gDTMF_CallState == DTMF_CALL_STATE_RECEIVED_STAY){
|
||||
} else if (gDTMF_CallState == DTMF_CALL_STATE_RECEIVED ||
|
||||
gDTMF_CallState == DTMF_CALL_STATE_RECEIVED_STAY) {
|
||||
pPrintStr = DTMF_FindContact(gDTMF_Callee, Contact) ? Contact : gDTMF_Callee;
|
||||
} else if (gDTMF_IsTx) {
|
||||
pPrintStr = gDTMF_String;
|
||||
@@ -687,14 +663,15 @@ void UI_DisplayMain(void)
|
||||
if (!gDTMF_InputMode) {
|
||||
if (gDTMF_CallState == DTMF_CALL_STATE_CALL_OUT) {
|
||||
pPrintStr = (gDTMF_State == DTMF_STATE_CALL_OUT_RSP) ? "CALL OUT(RSP)" : "CALL OUT";
|
||||
} else if (gDTMF_CallState == DTMF_CALL_STATE_RECEIVED || gDTMF_CallState == DTMF_CALL_STATE_RECEIVED_STAY) {
|
||||
sprintf(String, "CALL FRM:%s", (DTMF_FindContact(gDTMF_Caller, Contact)) ? Contact : gDTMF_Caller);
|
||||
} else if (gDTMF_CallState == DTMF_CALL_STATE_RECEIVED ||
|
||||
gDTMF_CallState == DTMF_CALL_STATE_RECEIVED_STAY) {
|
||||
sprintf(String, "CALL FRM:%s",
|
||||
(DTMF_FindContact(gDTMF_Caller, Contact)) ? Contact : gDTMF_Caller);
|
||||
pPrintStr = String;
|
||||
} else if (gDTMF_IsTx) {
|
||||
pPrintStr = (gDTMF_State == DTMF_STATE_TX_SUCC) ? "DTMF TX(SUCC)" : "DTMF TX";
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
sprintf(String, ">%s", gDTMF_InputBox);
|
||||
@@ -702,14 +679,11 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if (isMainOnly())
|
||||
{
|
||||
if (isMainOnly()) {
|
||||
UI_PrintString(pPrintStr, 2, 0, 5, 8);
|
||||
isMainOnlyInputDTMF = true;
|
||||
center_line = CENTER_LINE_IN_USE;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
UI_PrintString(pPrintStr, 2, 0, 0 + (vfo_num * 3), 8);
|
||||
isMainOnlyInputDTMF = false;
|
||||
center_line = CENTER_LINE_IN_USE;
|
||||
@@ -725,8 +699,7 @@ void UI_DisplayMain(void)
|
||||
// highlight the selected/used VFO with a marker
|
||||
if (isMainVFO)
|
||||
memcpy(p_line0 + 0, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
||||
}
|
||||
else // active TX VFO
|
||||
} else // active TX VFO
|
||||
{ // highlight the selected/used VFO with a marker
|
||||
if (isMainVFO)
|
||||
memcpy(p_line0 + 0, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
||||
@@ -736,16 +709,14 @@ void UI_DisplayMain(void)
|
||||
|
||||
uint32_t frequency = gEeprom.VfoInfo[vfo_num].pRX->Frequency;
|
||||
|
||||
if(TX_freq_check(frequency) != 0 && gEeprom.VfoInfo[vfo_num].TX_LOCK == true)
|
||||
{
|
||||
if (TX_freq_check(frequency) != 0 && gEeprom.VfoInfo[vfo_num].TX_LOCK == true) {
|
||||
if (isMainOnly())
|
||||
memcpy(p_line0 + 14, BITMAP_VFO_Lock, sizeof(BITMAP_VFO_Lock));
|
||||
else
|
||||
memcpy(p_line0 + 24, BITMAP_VFO_Lock, sizeof(BITMAP_VFO_Lock));
|
||||
}
|
||||
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
{ // transmitting
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT) { // transmitting
|
||||
|
||||
#ifdef ENABLE_ALARM
|
||||
if (gAlarmState == ALARM_STATE_SITE_ALARM)
|
||||
@@ -753,15 +724,12 @@ void UI_DisplayMain(void)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (activeTxVFO == vfo_num)
|
||||
{ // show the TX symbol
|
||||
if (activeTxVFO == vfo_num) { // show the TX symbol
|
||||
mode = VFO_MODE_TX;
|
||||
UI_PrintStringSmallBold("TX", 8, 0, line);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // receiving .. show the RX symbol
|
||||
} else { // receiving .. show the RX symbol
|
||||
mode = VFO_MODE_RX;
|
||||
//if (FUNCTION_IsRx() && gEeprom.RX_VFO == vfo_num) {
|
||||
if (FUNCTION_IsRx() && gEeprom.RX_VFO == vfo_num && VfoState[vfo_num] == VFO_STATE_NORMAL) {
|
||||
@@ -770,12 +738,9 @@ void UI_DisplayMain(void)
|
||||
RxBlinkLedCounter = 0;
|
||||
RxLine = line;
|
||||
RxOnVfofrequency = frequency;
|
||||
if(!isMainVFO)
|
||||
{
|
||||
if (!isMainVFO) {
|
||||
RxBlink = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
RxBlink = 0;
|
||||
}
|
||||
#else
|
||||
@@ -783,10 +748,8 @@ void UI_DisplayMain(void)
|
||||
#endif
|
||||
}
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
else
|
||||
{
|
||||
if(RxOnVfofrequency == frequency && !isMainOnly())
|
||||
{
|
||||
else {
|
||||
if (RxOnVfofrequency == frequency && !isMainOnly()) {
|
||||
UI_PrintStringSmallNormal(">>", 8, 0, line);
|
||||
//memcpy(p_line0 + 14, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
||||
}
|
||||
@@ -797,8 +760,7 @@ void UI_DisplayMain(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
|
||||
{ // channel mode
|
||||
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo_num])) { // channel mode
|
||||
const unsigned int x = 2;
|
||||
const bool inputting = gInputBoxIndex != 0 && gEeprom.TX_VFO == vfo_num;
|
||||
if (!inputting)
|
||||
@@ -806,9 +768,7 @@ void UI_DisplayMain(void)
|
||||
else
|
||||
sprintf(String, "M%.3s", INPUTBOX_GetAscii()); // show the input text
|
||||
UI_PrintStringSmallNormal(String, x, 0, line + 1);
|
||||
}
|
||||
else if (IS_FREQ_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
|
||||
{ // frequency mode
|
||||
} else if (IS_FREQ_CHANNEL(gEeprom.ScreenChannel[vfo_num])) { // frequency mode
|
||||
// show the frequency band number
|
||||
const unsigned int x = 2;
|
||||
char *buf = gEeprom.VfoInfo[vfo_num].pRX->Frequency < _1GHz_in_KHz ? "" : "+";
|
||||
@@ -840,13 +800,11 @@ void UI_DisplayMain(void)
|
||||
state = VFO_STATE_ALARM;
|
||||
}
|
||||
#endif
|
||||
if (state != VFO_STATE_NORMAL)
|
||||
{
|
||||
if (state != VFO_STATE_NORMAL) {
|
||||
if (state < ARRAY_SIZE(VfoStateStr))
|
||||
UI_PrintString(VfoStateStr[state], 31, 0, line, 8);
|
||||
}
|
||||
else if (gInputBoxIndex > 0 && IS_FREQ_CHANNEL(gEeprom.ScreenChannel[vfo_num]) && gEeprom.TX_VFO == vfo_num)
|
||||
{ // user entering a frequency
|
||||
} else if (gInputBoxIndex > 0 && IS_FREQ_CHANNEL(gEeprom.ScreenChannel[vfo_num]) &&
|
||||
gEeprom.TX_VFO == vfo_num) { // user entering a frequency
|
||||
const char *ascii = INPUTBOX_GetAscii();
|
||||
bool isGigaF = frequency >= _1GHz_in_KHz;
|
||||
sprintf(String, "%.*s.%.3s", 3 + isGigaF, ascii, ascii + 3 + isGigaF);
|
||||
@@ -857,8 +815,7 @@ void UI_DisplayMain(void)
|
||||
String[7] = 0;
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(String, 32, line, false);
|
||||
}
|
||||
else
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
// show the frequency in the main font
|
||||
@@ -866,17 +823,13 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
{ // transmitting
|
||||
} else {
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT) { // transmitting
|
||||
if (activeTxVFO == vfo_num)
|
||||
frequency = gEeprom.VfoInfo[vfo_num].pTX->Frequency;
|
||||
}
|
||||
|
||||
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
|
||||
{ // it's a channel
|
||||
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo_num])) { // it's a channel
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
|
||||
if(gEeprom.MENU_LOCK == false) {
|
||||
@@ -884,39 +837,30 @@ void UI_DisplayMain(void)
|
||||
uint8_t countList = 0;
|
||||
uint8_t shiftList = 0;
|
||||
|
||||
if(gMR_ChannelExclude[gEeprom.ScreenChannel[vfo_num]] == false)
|
||||
{
|
||||
if (gMR_ChannelExclude[gEeprom.ScreenChannel[vfo_num]] == false) {
|
||||
// show the scan list assigment symbols
|
||||
const ChannelAttributes_t att = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]];
|
||||
|
||||
countList = att.scanlist1 + att.scanlist2 + att.scanlist3;
|
||||
|
||||
if(countList == 0)
|
||||
{
|
||||
if (countList == 0) {
|
||||
memcpy(p_line0 + 127 - (1 * 6), BITMAP_ScanList0, sizeof(BITMAP_ScanList0));
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
shiftList = countList;
|
||||
|
||||
if (att.scanlist1)
|
||||
{
|
||||
if (att.scanlist1) {
|
||||
memcpy(p_line0 + 127 - (shiftList * 6), BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
|
||||
shiftList--;
|
||||
}
|
||||
if (att.scanlist2)
|
||||
{
|
||||
if (att.scanlist2) {
|
||||
memcpy(p_line0 + 127 - (shiftList * 6), BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
|
||||
shiftList--;
|
||||
}
|
||||
if (att.scanlist3)
|
||||
{
|
||||
if (att.scanlist3) {
|
||||
memcpy(p_line0 + 127 - (shiftList * 6), BITMAP_ScanList3, sizeof(BITMAP_ScanList3));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
memcpy(p_line0 + 127 - (1 * 6), BITMAP_ScanListE, sizeof(BITMAP_ScanListE));
|
||||
}
|
||||
|
||||
@@ -928,14 +872,14 @@ void UI_DisplayMain(void)
|
||||
|
||||
// compander symbol
|
||||
#ifndef ENABLE_BIG_FREQ
|
||||
const ChannelAttributes_t att = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]];
|
||||
if (att.compander)
|
||||
memcpy(p_line0 + 120 + LCD_WIDTH, BITMAP_compand, sizeof(BITMAP_compand));
|
||||
#else
|
||||
// TODO: // find somewhere else to put the symbol
|
||||
#endif
|
||||
|
||||
switch (gEeprom.CHANNEL_DISPLAY_MODE)
|
||||
{
|
||||
switch (gEeprom.CHANNEL_DISPLAY_MODE) {
|
||||
case MDF_FREQUENCY: // show the channel frequency
|
||||
sprintf(String, "%3u.%05u", frequency / 100000, frequency % 100000);
|
||||
#ifdef ENABLE_BIG_FREQ
|
||||
@@ -945,8 +889,7 @@ void UI_DisplayMain(void)
|
||||
String[7] = 0;
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(String, 32, line, false);
|
||||
}
|
||||
else
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
// show the frequency in the main font
|
||||
@@ -964,27 +907,20 @@ void UI_DisplayMain(void)
|
||||
case MDF_NAME_FREQ: // show the channel name and frequency
|
||||
|
||||
SETTINGS_FetchChannelName(String, gEeprom.ScreenChannel[vfo_num]);
|
||||
if (String[0] == 0)
|
||||
{ // no channel name, show the channel number instead
|
||||
if (String[0] == 0) { // no channel name, show the channel number instead
|
||||
sprintf(String, "CH-%03u", gEeprom.ScreenChannel[vfo_num] + 1);
|
||||
}
|
||||
|
||||
if (gEeprom.CHANNEL_DISPLAY_MODE == MDF_NAME) {
|
||||
UI_PrintString(String, 32, 0, line, 8);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if (isMainOnly())
|
||||
{
|
||||
if (isMainOnly()) {
|
||||
UI_PrintString(String, 32, 0, line, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if (activeTxVFO == vfo_num) {
|
||||
UI_PrintStringSmallBold(String, 32 + 4, 0, line);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
UI_PrintStringSmallNormal(String, 32 + 4, 0, line);
|
||||
}
|
||||
}
|
||||
@@ -993,24 +929,20 @@ void UI_DisplayMain(void)
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if (isMainOnly())
|
||||
{
|
||||
if (isMainOnly()) {
|
||||
sprintf(String, "%3u.%05u", frequency / 100000, frequency % 100000);
|
||||
if (frequency < _1GHz_in_KHz) {
|
||||
// show the remaining 2 small frequency digits
|
||||
UI_PrintStringSmallNormal(String + 7, 113, 0, line + 4);
|
||||
String[7] = 0;
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(String, 32, line + 3, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
//UI_DisplayFrequency(String, 32, line + 3, false);
|
||||
UI_PrintStringSmallNormal(String, 0, 20, line + 3);
|
||||
} else {
|
||||
// show the frequency in the main font
|
||||
UI_PrintString(String, 32, 0, line + 3, 8);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
||||
UI_PrintStringSmallNormal(String, 32 + 4, 0, line + 1);
|
||||
}
|
||||
@@ -1022,9 +954,7 @@ void UI_DisplayMain(void)
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // frequency mode
|
||||
} else { // frequency mode
|
||||
sprintf(String, "%3u.%05u", frequency / 100000, frequency % 100000);
|
||||
|
||||
#ifdef ENABLE_BIG_FREQ
|
||||
@@ -1034,8 +964,7 @@ void UI_DisplayMain(void)
|
||||
String[7] = 0;
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(String, 32, line, false);
|
||||
}
|
||||
else
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
// show the frequency in the main font
|
||||
@@ -1058,8 +987,7 @@ void UI_DisplayMain(void)
|
||||
{ // show the TX/RX level
|
||||
int8_t Level = -1;
|
||||
|
||||
if (mode == VFO_MODE_TX)
|
||||
{ // TX power level
|
||||
if (mode == VFO_MODE_TX) { // TX power level
|
||||
/*
|
||||
switch (gRxVfo->OUTPUT_POWER)
|
||||
{
|
||||
@@ -1081,10 +1009,7 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
*/
|
||||
Level = gRxVfo->OUTPUT_POWER - 1;
|
||||
}
|
||||
else
|
||||
if (mode == VFO_MODE_RX)
|
||||
{ // RX signal level
|
||||
} else if (mode == VFO_MODE_RX) { // RX signal level
|
||||
#ifndef ENABLE_RSSI_BAR
|
||||
// bar graph
|
||||
if (gVFO_RSSI_bar_level[vfo_num] > 0)
|
||||
@@ -1132,8 +1057,7 @@ void UI_DisplayMain(void)
|
||||
const FREQ_Config_t *pConfig = (mode == VFO_MODE_TX) ? vfoInfo->pTX : vfoInfo->pRX;
|
||||
int8_t shift = 0;
|
||||
|
||||
switch((int)pConfig->CodeType)
|
||||
{
|
||||
switch ((int) pConfig->CodeType) {
|
||||
case 1:
|
||||
sprintf(String, "%u.%u", CTCSS_Options[pConfig->Code] / 10, CTCSS_Options[pConfig->Code] % 10);
|
||||
break;
|
||||
@@ -1151,31 +1075,23 @@ void UI_DisplayMain(void)
|
||||
shift = -10;
|
||||
}
|
||||
|
||||
if (gSetting_set_gui)
|
||||
{
|
||||
if (gSetting_set_gui) {
|
||||
UI_PrintStringSmallNormal(s, LCD_WIDTH + 22, 0, line + 1);
|
||||
UI_PrintStringSmallNormal(t, LCD_WIDTH + 2, 0, line + 1);
|
||||
|
||||
if (isMainOnly() && !gDTMF_InputMode)
|
||||
{
|
||||
if(shift == 0)
|
||||
{
|
||||
if (isMainOnly() && !gDTMF_InputMode) {
|
||||
if (shift == 0) {
|
||||
UI_PrintStringSmallNormal(String, 2, 0, 6);
|
||||
}
|
||||
|
||||
if((vfoInfo->StepFrequency / 100) < 100)
|
||||
{
|
||||
if ((vfoInfo->StepFrequency / 100) < 100) {
|
||||
sprintf(String, "%d.%02uK", vfoInfo->StepFrequency / 100, vfoInfo->StepFrequency % 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
sprintf(String, "%dK", vfoInfo->StepFrequency / 100);
|
||||
}
|
||||
UI_PrintStringSmallNormal(String, 46, 0, 6);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if ((s != NULL) && (s[0] != '\0')) {
|
||||
GUI_DisplaySmallest(s, 58, line == 0 ? 17 : 49, false, true);
|
||||
}
|
||||
@@ -1193,48 +1109,39 @@ void UI_DisplayMain(void)
|
||||
UI_PrintStringSmallNormal(s, LCD_WIDTH + 24, 0, line + 1);
|
||||
#endif
|
||||
|
||||
if (state == VFO_STATE_NORMAL || state == VFO_STATE_ALARM)
|
||||
{ // show the TX power
|
||||
if (state == VFO_STATE_NORMAL || state == VFO_STATE_ALARM) { // show the TX power
|
||||
uint8_t currentPower = vfoInfo->OUTPUT_POWER % 8;
|
||||
uint8_t arrowPos = 19;
|
||||
bool userPower = false;
|
||||
|
||||
if(currentPower == OUTPUT_POWER_USER)
|
||||
{
|
||||
if (currentPower == OUTPUT_POWER_USER) {
|
||||
currentPower = gSetting_set_pwr;
|
||||
userPower = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
currentPower--;
|
||||
userPower = false;
|
||||
}
|
||||
|
||||
if (gSetting_set_gui)
|
||||
{
|
||||
if (gSetting_set_gui) {
|
||||
const char pwr_short[][3] = {"L1", "L2", "L3", "L4", "L5", "M", "H"};
|
||||
//sprintf(String, "%s", pwr_short[currentPower]);
|
||||
//UI_PrintStringSmallNormal(String, LCD_WIDTH + 42, 0, line + 1);
|
||||
UI_PrintStringSmallNormal(pwr_short[currentPower], LCD_WIDTH + 42, 0, line + 1);
|
||||
|
||||
arrowPos = 38;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
const char pwr_long[][5] = {"LOW1", "LOW2", "LOW3", "LOW4", "LOW5", "MID", "HIGH"};
|
||||
//sprintf(String, "%s", pwr_long[currentPower]);
|
||||
//GUI_DisplaySmallest(String, 24, line == 0 ? 17 : 49, false, true);
|
||||
GUI_DisplaySmallest(pwr_long[currentPower], 24, line == 0 ? 17 : 49, false, true);
|
||||
}
|
||||
|
||||
if(userPower == true)
|
||||
{
|
||||
if (userPower == true) {
|
||||
memcpy(p_line0 + 256 + arrowPos, BITMAP_PowerUser, sizeof(BITMAP_PowerUser));
|
||||
}
|
||||
}
|
||||
|
||||
if (vfoInfo->freq_config_RX.Frequency != vfoInfo->freq_config_TX.Frequency)
|
||||
{ // show the TX offset symbol
|
||||
if (vfoInfo->freq_config_RX.Frequency != vfoInfo->freq_config_TX.Frequency) { // show the TX offset symbol
|
||||
int i = vfoInfo->TX_OFFSET_FREQUENCY_DIRECTION % 3;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
|
||||
@@ -1249,12 +1156,9 @@ void UI_DisplayMain(void)
|
||||
#endif
|
||||
|
||||
#if ENABLE_FEAT_F4HWN
|
||||
if (gSetting_set_gui)
|
||||
{
|
||||
if (gSetting_set_gui) {
|
||||
UI_PrintStringSmallNormal(dir_list[i], LCD_WIDTH + 60, 0, line + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
|
||||
if(i == 3)
|
||||
{
|
||||
@@ -1277,12 +1181,9 @@ void UI_DisplayMain(void)
|
||||
if (vfoInfo->FrequencyReverse)
|
||||
#if ENABLE_FEAT_F4HWN
|
||||
{
|
||||
if (gSetting_set_gui)
|
||||
{
|
||||
if (gSetting_set_gui) {
|
||||
UI_PrintStringSmallNormal("R", LCD_WIDTH + 68, 0, line + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
GUI_DisplaySmallest("R", 51, line == 0 ? 17 : 49, false, true);
|
||||
}
|
||||
}
|
||||
@@ -1294,20 +1195,18 @@ void UI_DisplayMain(void)
|
||||
#ifdef ENABLE_FEAT_F4HWN_NARROWER
|
||||
bool narrower = 0;
|
||||
|
||||
if(vfoInfo->CHANNEL_BANDWIDTH == BANDWIDTH_NARROW && gSetting_set_nfm == 1)
|
||||
{
|
||||
if (vfoInfo->CHANNEL_BANDWIDTH == BANDWIDTH_NARROW && gSetting_set_nfm == 1) {
|
||||
narrower = 1;
|
||||
}
|
||||
|
||||
if (gSetting_set_gui)
|
||||
{
|
||||
if (gSetting_set_gui) {
|
||||
const char *bandWidthNames[] = {"W", "N", "N+"};
|
||||
UI_PrintStringSmallNormal(bandWidthNames[vfoInfo->CHANNEL_BANDWIDTH + narrower], LCD_WIDTH + 80, 0, line + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
UI_PrintStringSmallNormal(bandWidthNames[vfoInfo->CHANNEL_BANDWIDTH + narrower], LCD_WIDTH + 80, 0,
|
||||
line + 1);
|
||||
} else {
|
||||
const char *bandWidthNames[] = {"WIDE", "NAR", "NAR+"};
|
||||
GUI_DisplaySmallest(bandWidthNames[vfoInfo->CHANNEL_BANDWIDTH + narrower], 91, line == 0 ? 17 : 49, false, true);
|
||||
GUI_DisplaySmallest(bandWidthNames[vfoInfo->CHANNEL_BANDWIDTH + narrower], 91, line == 0 ? 17 : 49, false,
|
||||
true);
|
||||
}
|
||||
#else
|
||||
if (gSetting_set_gui)
|
||||
@@ -1328,15 +1227,13 @@ void UI_DisplayMain(void)
|
||||
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
// show the DTMF decoding symbol
|
||||
if (vfoInfo->DTMF_DECODING_ENABLE || gSetting_KILLED)
|
||||
if (vfoInfo->DTMF_DECODING_ENABLE)
|
||||
UI_PrintStringSmallNormal("DTMF", LCD_WIDTH + 78, 0, line + 1);
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
// show the audio scramble symbol
|
||||
if (vfoInfo->SCRAMBLING_TYPE > 0 && gSetting_ScrambleEnable)
|
||||
UI_PrintStringSmallNormal("SCR", LCD_WIDTH + 106, 0, line + 1);
|
||||
#endif
|
||||
if (vfoInfo->SCRAMBLING_TYPE > 0)
|
||||
UI_PrintStringSmallNormal("S", LCD_WIDTH + 106, 0, line);
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
/*
|
||||
@@ -1386,8 +1283,7 @@ void UI_DisplayMain(void)
|
||||
UI_MAIN_PrintAGC(false);
|
||||
#endif
|
||||
|
||||
if (center_line == CENTER_LINE_NONE)
|
||||
{ // we're free to use the middle line
|
||||
if (center_line == CENTER_LINE_NONE) { // we're free to use the middle line
|
||||
|
||||
const bool rx = FUNCTION_IsRx();
|
||||
|
||||
@@ -1395,8 +1291,7 @@ void UI_DisplayMain(void)
|
||||
if (gSetting_mic_bar && gCurrentFunction == FUNCTION_TRANSMIT) {
|
||||
center_line = CENTER_LINE_AUDIO_BAR;
|
||||
UI_DisplayAudioBar();
|
||||
}
|
||||
else
|
||||
} else
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_AM_FIX) && defined(ENABLE_AM_FIX_SHOW_DATA)
|
||||
@@ -1420,14 +1315,11 @@ void UI_DisplayMain(void)
|
||||
if (rx) {
|
||||
center_line = CENTER_LINE_RSSI;
|
||||
DisplayRSSIBar(false);
|
||||
}
|
||||
else
|
||||
} else
|
||||
#endif
|
||||
if (rx || gCurrentFunction == FUNCTION_FOREGROUND || gCurrentFunction == FUNCTION_POWER_SAVE)
|
||||
{
|
||||
if (rx || gCurrentFunction == FUNCTION_FOREGROUND || gCurrentFunction == FUNCTION_POWER_SAVE) {
|
||||
#if 1
|
||||
if (gSetting_live_DTMF_decoder && gDTMF_RX_live[0] != 0)
|
||||
{ // show live DTMF decode
|
||||
if (gSetting_live_DTMF_decoder && gDTMF_RX_live[0] != 0) { // show live DTMF decode
|
||||
const unsigned int len = strlen(gDTMF_RX_live);
|
||||
const unsigned int idx = (len > (17 - 5)) ? len - (17 - 5) : 0; // limit to last 'n' chars
|
||||
|
||||
@@ -1442,12 +1334,9 @@ void UI_DisplayMain(void)
|
||||
|
||||
sprintf(String, "DTMF %s", gDTMF_RX_live + idx);
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if (isMainOnly())
|
||||
{
|
||||
if (isMainOnly()) {
|
||||
UI_PrintStringSmallNormal(String, 2, 0, 5);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
UI_PrintStringSmallNormal(String, 2, 0, 3);
|
||||
}
|
||||
#else
|
||||
@@ -1498,12 +1387,10 @@ void UI_DisplayMain(void)
|
||||
//if(gEeprom.MENU_LOCK == false)
|
||||
//{
|
||||
//#endif
|
||||
if (isMainOnly() && !gDTMF_InputMode)
|
||||
{
|
||||
if (isMainOnly() && !gDTMF_InputMode) {
|
||||
sprintf(String, "VFO %s", activeTxVFO ? "B" : "A");
|
||||
UI_PrintStringSmallBold(String, 92, 0, 6);
|
||||
for (uint8_t i = 92; i < 128; i++)
|
||||
{
|
||||
for (uint8_t i = 92; i < 128; i++) {
|
||||
gFrameBuffer[6][i] ^= 0x7F;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,23 +40,21 @@
|
||||
const t_menu_item MenuList[] =
|
||||
{
|
||||
// text, menu ID
|
||||
{"Step", MENU_STEP },
|
||||
{"Power", MENU_TXP }, // was "TXP"
|
||||
{"RxDCS", MENU_R_DCS }, // was "R_DCS"
|
||||
{"RxCTCS", MENU_R_CTCS }, // was "R_CTCS"
|
||||
{"TxDCS", MENU_T_DCS }, // was "T_DCS"
|
||||
{"TxCTCS", MENU_T_CTCS }, // was "T_CTCS"
|
||||
{"STP", MENU_STEP},
|
||||
{"PWR", MENU_TXP}, // was "TXP"
|
||||
{"RDCS", MENU_R_DCS}, // was "R_DCS"
|
||||
{"RCTCS", MENU_R_CTCS}, // was "R_CTCS"
|
||||
{"TDCS", MENU_T_DCS}, // was "T_DCS"
|
||||
{"TCTCS", MENU_T_CTCS}, // was "T_CTCS"
|
||||
{"TxODir", MENU_SFT_D}, // was "SFT_D"
|
||||
{"TxOffs", MENU_OFFSET}, // was "OFFSET"
|
||||
{"W/N", MENU_W_N},
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
{"Scramb", MENU_SCR }, // was "SCR"
|
||||
#endif
|
||||
{"BusyCL", MENU_BCL }, // was "BCL"
|
||||
{"Compnd", MENU_COMPAND },
|
||||
{"Mode", MENU_AM }, // was "AM"
|
||||
{"SCR", MENU_SCR}, // was "SCR"
|
||||
{"BusyL", MENU_BCL}, // was "BCL"
|
||||
{"COMP", MENU_COMPAND},
|
||||
{"Mod", MENU_AM}, // was "AM"
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
{"TXLock", MENU_TX_LOCK },
|
||||
{"TXLck", MENU_TX_LOCK},
|
||||
#endif
|
||||
{"ScAdd1", MENU_S_ADD1},
|
||||
{"ScAdd2", MENU_S_ADD2},
|
||||
@@ -75,11 +73,11 @@ const t_menu_item MenuList[] =
|
||||
{"NOAA-S", MENU_NOAA_S },
|
||||
#endif
|
||||
#endif
|
||||
{"F1Shrt", MENU_F1SHRT },
|
||||
{"F1Long", MENU_F1LONG },
|
||||
{"F2Shrt", MENU_F2SHRT },
|
||||
{"F2Long", MENU_F2LONG },
|
||||
{"M Long", MENU_MLONG },
|
||||
{"F1S", MENU_F1SHRT},
|
||||
{"F1L", MENU_F1LONG},
|
||||
{"F2S", MENU_F2SHRT},
|
||||
{"F2L", MENU_F2LONG},
|
||||
{"ML", MENU_MLONG},
|
||||
|
||||
{"KeyLck", MENU_AUTOLK}, // was "AUTOLk"
|
||||
{"TxTOut", MENU_TOT}, // was "TOT"
|
||||
@@ -88,7 +86,8 @@ const t_menu_item MenuList[] =
|
||||
{"Mic", MENU_MIC},
|
||||
{"MicBar", MENU_MIC_BAR},
|
||||
{"ChDisp", MENU_MDF}, // was "MDF"
|
||||
{"POnMsg", MENU_PONMSG },
|
||||
{"FSKMod", MENU_FSKMOD},
|
||||
{"FSKSRC", MENU_FSKSRC}, // was "AUTOLk"
|
||||
{"BLTime", MENU_ABR}, // was "ABR"
|
||||
{"BLMin", MENU_ABR_MIN},
|
||||
{"BLMax", MENU_ABR_MAX},
|
||||
@@ -108,9 +107,9 @@ const t_menu_item MenuList[] =
|
||||
{"ANI ID", MENU_ANI_ID },
|
||||
#endif
|
||||
{"UPCode", MENU_UPCODE},
|
||||
{"DWCode", MENU_DWCODE },
|
||||
{"DNCode", MENU_DWCODE},
|
||||
{"PTT ID", MENU_PTT_ID},
|
||||
{"D ST", MENU_D_ST },
|
||||
{"L DTMF", MENU_D_ST},
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
{"D Resp", MENU_D_RSP },
|
||||
{"D Hold", MENU_D_HOLD },
|
||||
@@ -126,39 +125,36 @@ const t_menu_item MenuList[] =
|
||||
{"AM Fix", MENU_AM_FIX },
|
||||
#endif
|
||||
#endif
|
||||
#ifdef ENABLE_VOX
|
||||
{"VOX", MENU_VOX},
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
{"SysInf", MENU_VOL }, // was "VOL"
|
||||
#else
|
||||
{"BatVol", MENU_VOL }, // was "VOL"
|
||||
#endif
|
||||
{"RxMode", MENU_TDR},
|
||||
{"Sql", MENU_SQL},
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
{"SetPwr", MENU_SET_PWR },
|
||||
{"SetPTT", MENU_SET_PTT },
|
||||
{"SetTOT", MENU_SET_TOT },
|
||||
{"SetEOT", MENU_SET_EOT },
|
||||
{"SetCtr", MENU_SET_CTR },
|
||||
{"SetInv", MENU_SET_INV },
|
||||
{"SetLck", MENU_SET_LCK },
|
||||
{"SetMet", MENU_SET_MET },
|
||||
{"SetGUI", MENU_SET_GUI },
|
||||
{"SetTmr", MENU_SET_TMR },
|
||||
{"SPwr", MENU_SET_PWR},
|
||||
{"SPTT", MENU_SET_PTT},
|
||||
{"STOT", MENU_SET_TOT},
|
||||
{"SEOT", MENU_SET_EOT},
|
||||
{"SCtr", MENU_SET_CTR},
|
||||
{"SInv", MENU_SET_INV},
|
||||
{"SLck", MENU_SET_LCK},
|
||||
//{"SMet", MENU_SET_MET},
|
||||
//{"SGUI", MENU_SET_GUI},
|
||||
{"STmr", MENU_SET_TMR},
|
||||
#ifdef ENABLE_FEAT_F4HWN_SLEEP
|
||||
{"SetOff", MENU_SET_OFF },
|
||||
{"SOff", MENU_SET_OFF},
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_NARROWER
|
||||
{"SetNFM", MENU_SET_NFM },
|
||||
{"SNFM", MENU_SET_NFM},
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_VOL
|
||||
{"SetVol", MENU_SET_VOL },
|
||||
{"SVol", MENU_SET_VOL},
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
|
||||
{"SetKey", MENU_SET_KEY },
|
||||
{"SKey", MENU_SET_KEY },
|
||||
#endif
|
||||
#ifdef ENABLE_NOAA
|
||||
{"SetNWR", MENU_NOAA_S },
|
||||
{"SNWR", MENU_NOAA_S },
|
||||
#endif
|
||||
#endif
|
||||
// hidden menu items from here on
|
||||
@@ -168,11 +164,9 @@ const t_menu_item MenuList[] =
|
||||
{"Tx 200", MENU_200TX }, // was "200TX"
|
||||
{"Tx 350", MENU_350TX }, // was "350TX"
|
||||
{"Tx 500", MENU_500TX }, // was "500TX"
|
||||
#endif
|
||||
{"350 En", MENU_350EN }, // was "350EN"
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
{"ScraEn", MENU_SCREN }, // was "SCREN"
|
||||
#endif
|
||||
//{"ScraEn", MENU_SCREN }, // was "SCREN"
|
||||
#ifdef ENABLE_F_CAL_MENU
|
||||
{"FrCali", MENU_F_CALI}, // reference xtal calibration
|
||||
#endif
|
||||
@@ -187,14 +181,14 @@ const uint8_t FIRST_HIDDEN_MENU_ITEM = MENU_F_LOCK;
|
||||
|
||||
const char gSubMenu_TXP[][6] =
|
||||
{
|
||||
"USER",
|
||||
"LOW 1",
|
||||
"LOW 2",
|
||||
"LOW 3",
|
||||
"LOW 4",
|
||||
"LOW 5",
|
||||
"MID",
|
||||
"HIGH"
|
||||
"USR",
|
||||
"L1",
|
||||
"L2",
|
||||
"L3",
|
||||
"L4",
|
||||
"L5",
|
||||
"M",
|
||||
"H"
|
||||
};
|
||||
|
||||
const char gSubMenu_SFT_D[][4] =
|
||||
@@ -207,7 +201,7 @@ const char gSubMenu_SFT_D[][4] =
|
||||
const char gSubMenu_W_N[][7] =
|
||||
{
|
||||
"WIDE",
|
||||
"NARROW"
|
||||
"NARR"
|
||||
};
|
||||
|
||||
const char gSubMenu_OFF_ON[][4] =
|
||||
@@ -223,10 +217,10 @@ const char gSubMenu_NA[4] =
|
||||
|
||||
const char *const gSubMenu_RXMode[] =
|
||||
{
|
||||
"MAIN\nONLY", // TX and RX on main only
|
||||
"DUAL RX\nRESPOND", // Watch both and respond
|
||||
"CROSS\nBAND", // TX on main, RX on secondary
|
||||
"MAIN TX\nDUAL RX" // always TX on main, but RX on both
|
||||
"MAIN", // TX and RX on main only
|
||||
"RESP", // Watch both and respond
|
||||
"XBAND ONLY", // TX on main, RX on secondary
|
||||
"DUALMON" // always TX on main, but RX on both
|
||||
};
|
||||
|
||||
#ifdef ENABLE_VOICE
|
||||
@@ -241,7 +235,7 @@ const char* const gSubMenu_RXMode[] =
|
||||
const char *const gSubMenu_MDF[] =
|
||||
{
|
||||
"FREQ",
|
||||
"CHANNEL\nNUMBER",
|
||||
"CHNUMB",
|
||||
"NAME",
|
||||
"NAME\n+\nFREQ"
|
||||
};
|
||||
@@ -268,28 +262,25 @@ const char* const gSubMenu_PTT_ID[] =
|
||||
{
|
||||
"OFF",
|
||||
"UP CODE",
|
||||
"DOWN CODE",
|
||||
"UP+DOWN\nCODE",
|
||||
"APOLLO\nQUINDAR"
|
||||
"DN CODE",
|
||||
"UP+DN\nCODE",
|
||||
"APOLLO"
|
||||
};
|
||||
|
||||
const char gSubMenu_PONMSG[][8] =
|
||||
const char gSubMenu_FSKMod[][8] =
|
||||
{
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
"ALL",
|
||||
"SOUND",
|
||||
#else
|
||||
"FULL",
|
||||
#endif
|
||||
"MESSAGE",
|
||||
"VOLTAGE",
|
||||
"NONE"
|
||||
"450",
|
||||
"700",
|
||||
"A1200",
|
||||
"A2400",
|
||||
"2400",
|
||||
"NOAA"
|
||||
};
|
||||
|
||||
const char gSubMenu_ROGER[][6] =
|
||||
{
|
||||
"OFF",
|
||||
"ROGER",
|
||||
"RGR",
|
||||
"MDC"
|
||||
};
|
||||
|
||||
@@ -301,23 +292,23 @@ const char gSubMenu_RESET[][4] =
|
||||
|
||||
const char *const gSubMenu_F_LOCK[] =
|
||||
{
|
||||
"DEFAULT+\n137-174\n400-470",
|
||||
"FCC HAM\n144-148\n420-450",
|
||||
"137-174\n400-470",
|
||||
#ifdef ENABLE_FEAT_F4HWN_CA
|
||||
"FCC HAM\n144-148\n420-450",
|
||||
"CA HAM\n144-148\n430-450",
|
||||
#endif
|
||||
"CE HAM\n144-146\n430-440",
|
||||
"GB HAM\n144-148\n430-440",
|
||||
"137-174\n400-430",
|
||||
"137-174\n400-438",
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_PMR
|
||||
"PMR 446",
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN_GMRS_FRS_MURS
|
||||
"GMRS\nFRS\nMURS",
|
||||
#endif
|
||||
"DISABLE\nALL",
|
||||
"UNLOCK\nALL",
|
||||
"DIS\nALL",
|
||||
"UNL\nALL",
|
||||
};
|
||||
|
||||
const char gSubMenu_RX_TX[][6] =
|
||||
@@ -331,41 +322,39 @@ const char gSubMenu_RX_TX[][6] =
|
||||
const char gSubMenu_BAT_TXT[][8] =
|
||||
{
|
||||
"NONE",
|
||||
"VOLTAGE",
|
||||
"PERCENT"
|
||||
"VLT",
|
||||
"PRC"
|
||||
};
|
||||
|
||||
const char gSubMenu_BATTYP[][9] =
|
||||
{
|
||||
"1600mAh",
|
||||
"2200mAh",
|
||||
"3500mAh"
|
||||
"16",
|
||||
"22",
|
||||
"35"
|
||||
};
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
const char gSubMenu_SCRAMBLER[][7] =
|
||||
{
|
||||
"OFF",
|
||||
"2600Hz",
|
||||
"2700Hz",
|
||||
"2800Hz",
|
||||
"2900Hz",
|
||||
"3000Hz",
|
||||
"3100Hz",
|
||||
"3200Hz",
|
||||
"3300Hz",
|
||||
"3400Hz",
|
||||
"3500Hz"
|
||||
"26K",
|
||||
"27K",
|
||||
"28K",
|
||||
"29K",
|
||||
"30K",
|
||||
"31K",
|
||||
"32K",
|
||||
"33K",
|
||||
"34K",
|
||||
"35K"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
const char gSubMenu_SET_PWR[][6] =
|
||||
{
|
||||
"< 20m",
|
||||
"125m",
|
||||
"250m",
|
||||
"500m",
|
||||
"<.02",
|
||||
".125",
|
||||
".25",
|
||||
".5",
|
||||
"1",
|
||||
"2",
|
||||
"5"
|
||||
@@ -373,35 +362,29 @@ const char gSubMenu_SCRAMBLER[][7] =
|
||||
|
||||
const char gSubMenu_SET_PTT[][8] =
|
||||
{
|
||||
"CLASSIC",
|
||||
"ONEPUSH"
|
||||
"HOLD",
|
||||
"TAP"
|
||||
};
|
||||
|
||||
const char gSubMenu_SET_TOT[][7] = // Use by SET_EOT too
|
||||
{
|
||||
"OFF",
|
||||
"SOUND",
|
||||
"VISUAL",
|
||||
"SND",
|
||||
"VIS",
|
||||
"ALL"
|
||||
};
|
||||
|
||||
const char gSubMenu_SET_LCK[][9] =
|
||||
{
|
||||
"KEYS",
|
||||
"KEYS+PTT"
|
||||
};
|
||||
|
||||
const char gSubMenu_SET_MET[][8] =
|
||||
{
|
||||
"TINY",
|
||||
"CLASSIC"
|
||||
"KEY",
|
||||
"KEY+PTT"
|
||||
};
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_NARROWER
|
||||
const char gSubMenu_SET_NFM[][9] =
|
||||
{
|
||||
"NARROW",
|
||||
"NARROWER"
|
||||
"NRW",
|
||||
"NRWER"
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -421,10 +404,10 @@ const t_sidefunction gSubMenu_SIDEFUNCTIONS[] =
|
||||
{
|
||||
{"NONE", ACTION_OPT_NONE},
|
||||
#ifdef ENABLE_FLASHLIGHT
|
||||
{"FLASH\nLIGHT", ACTION_OPT_FLASHLIGHT},
|
||||
{"FLASH", ACTION_OPT_FLASHLIGHT},
|
||||
#endif
|
||||
{"POWER", ACTION_OPT_POWER},
|
||||
{"MONITOR", ACTION_OPT_MONITOR},
|
||||
{"PWR", ACTION_OPT_POWER},
|
||||
{"MON", ACTION_OPT_MONITOR},
|
||||
{"SCAN", ACTION_OPT_SCAN},
|
||||
#ifdef ENABLE_VOX
|
||||
{"VOX", ACTION_OPT_VOX},
|
||||
@@ -433,16 +416,16 @@ const t_sidefunction gSubMenu_SIDEFUNCTIONS[] =
|
||||
{"ALARM", ACTION_OPT_ALARM},
|
||||
#endif
|
||||
#ifdef ENABLE_FMRADIO
|
||||
{"FM RADIO", ACTION_OPT_FM},
|
||||
{"WFM", ACTION_OPT_FM},
|
||||
#endif
|
||||
#ifdef ENABLE_TX1750
|
||||
{"1750Hz", ACTION_OPT_1750},
|
||||
{"1750", ACTION_OPT_1750},
|
||||
#endif
|
||||
#ifdef ENABLE_REGA
|
||||
{"REGA\nALARM", ACTION_OPT_REGA_ALARM},
|
||||
{"REGA\nTEST", ACTION_OPT_REGA_TEST},
|
||||
#endif
|
||||
{"LOCK\nKEYPAD", ACTION_OPT_KEYLOCK},
|
||||
{"LOCK\nKEY", ACTION_OPT_KEYLOCK},
|
||||
{"VFO A\nVFO B", ACTION_OPT_A_B},
|
||||
{"VFO\nMEM", ACTION_OPT_VFO_MR},
|
||||
{"MODE", ACTION_OPT_SWITCH_DEMODUL},
|
||||
@@ -450,10 +433,10 @@ const t_sidefunction gSubMenu_SIDEFUNCTIONS[] =
|
||||
{"BLMIN\nTMP OFF", ACTION_OPT_BLMIN_TMP_OFF}, //BackLight Minimum Temporay OFF
|
||||
#endif
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
{"RX MODE", ACTION_OPT_RXMODE},
|
||||
{"RX MOD", ACTION_OPT_RXMODE},
|
||||
{"MAIN ONLY", ACTION_OPT_MAINONLY},
|
||||
{"PTT", ACTION_OPT_PTT},
|
||||
{"WIDE\nNARROW", ACTION_OPT_WN},
|
||||
{"WIDE\nNAR", ACTION_OPT_WN},
|
||||
#if !defined(ENABLE_SPECTRUM) || !defined(ENABLE_FMRADIO)
|
||||
{"MUTE", ACTION_OPT_MUTE},
|
||||
#endif
|
||||
@@ -468,6 +451,7 @@ const uint8_t gSubMenu_SIDEFUNCTIONS_size = ARRAY_SIZE(gSubMenu_SIDEFUNCTIONS);
|
||||
|
||||
bool gIsInSubMenu;
|
||||
uint8_t gMenuCursor;
|
||||
|
||||
int UI_MENU_GetCurrentMenuId() {
|
||||
if (gMenuCursor < ARRAY_SIZE(MenuList))
|
||||
return MenuList[gMenuCursor].menu_id;
|
||||
@@ -475,8 +459,7 @@ int UI_MENU_GetCurrentMenuId() {
|
||||
return MenuList[ARRAY_SIZE(MenuList) - 1].menu_id;
|
||||
}
|
||||
|
||||
uint8_t UI_MENU_GetMenuIdx(uint8_t id)
|
||||
{
|
||||
uint8_t UI_MENU_GetMenuIdx(uint8_t id) {
|
||||
for (uint8_t i = 0; i < ARRAY_SIZE(MenuList); i++)
|
||||
if (MenuList[i].menu_id == id)
|
||||
return i;
|
||||
@@ -490,8 +473,7 @@ char edit_original[17]; // a copy of the text before editing so that we can e
|
||||
char edit[17];
|
||||
int edit_index;
|
||||
|
||||
void UI_DisplayMenu(void)
|
||||
{
|
||||
void UI_DisplayMenu(void) {
|
||||
const unsigned int menu_list_width = 6; // max no. of characters on the menu list (left side)
|
||||
const unsigned int menu_item_x1 = (8 * menu_list_width) + 2;
|
||||
const unsigned int menu_item_x2 = LCD_WIDTH - 1;
|
||||
@@ -508,8 +490,7 @@ void UI_DisplayMenu(void)
|
||||
UI_DrawLineBuffer(gFrameBuffer, 48, 0, 48, 55, 1); // Be ware, status zone = 8 lines, the rest = 56 ->total 64
|
||||
//UI_DrawLineDottedBuffer(gFrameBuffer, 0, 46, 50, 46, 1);
|
||||
|
||||
for (uint8_t i = 0; i < 48; i += 2)
|
||||
{
|
||||
for (uint8_t i = 0; i < 48; i += 2) {
|
||||
gFrameBuffer[5][i] = 0x40;
|
||||
}
|
||||
#endif
|
||||
@@ -547,8 +528,7 @@ void UI_DisplayMenu(void)
|
||||
i = 1;
|
||||
|
||||
if (!gIsInSubMenu) {
|
||||
while (i < 2)
|
||||
{ // leading menu items - small text
|
||||
while (i < 2) { // leading menu items - small text
|
||||
const int k = menu_index + i - 2;
|
||||
if (k < 0)
|
||||
UI_PrintStringSmallNormal(MenuList[gMenuListCount + k].name, 0, 0, i); // wrap-a-round
|
||||
@@ -558,17 +538,18 @@ void UI_DisplayMenu(void)
|
||||
}
|
||||
|
||||
// current menu item - keep big n fat
|
||||
if (menu_index >= 0 && menu_index < (int)gMenuListCount)
|
||||
UI_PrintString(MenuList[menu_index].name, 0, 0, 2, 8);
|
||||
if (menu_index >= 0 && menu_index < (int) gMenuListCount) {
|
||||
//UI_DrawRectangleBuffer(gFrameBuffer, 0, 37, 16, 45, true);
|
||||
UI_PrintStringSmallBold(MenuList[menu_index].name, 0, 0, 2);
|
||||
}
|
||||
i++;
|
||||
|
||||
while (i < 4)
|
||||
{ // trailing menu item - small text
|
||||
while (i < 5) { // trailing menu item - small text
|
||||
const int k = menu_index + i - 2;
|
||||
if (k >= 0 && k < (int) gMenuListCount)
|
||||
UI_PrintStringSmallNormal(MenuList[k].name, 0, 0, 1 + i);
|
||||
UI_PrintStringSmallNormal(MenuList[k].name, 0, 0, i);
|
||||
else if (k >= (int) gMenuListCount)
|
||||
UI_PrintStringSmallNormal(MenuList[gMenuListCount - k].name, 0, 0, 1 + i); // wrap-a-round
|
||||
UI_PrintStringSmallNormal(MenuList[gMenuListCount - k].name, 0, 0, i); // wrap-a-round
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -577,9 +558,7 @@ void UI_DisplayMenu(void)
|
||||
sprintf(String, "%2u.%u", 1 + gMenuCursor, gMenuListCount);
|
||||
UI_PrintStringSmallNormal(String, 2, 0, 6);
|
||||
#endif
|
||||
}
|
||||
else if (menu_index >= 0 && menu_index < (int)gMenuListCount)
|
||||
{ // current menu item
|
||||
} else if (menu_index >= 0 && menu_index < (int) gMenuListCount) { // current menu item
|
||||
// strcat(String, ":");
|
||||
UI_PrintString(MenuList[menu_index].name, 0, 0, 0, 8);
|
||||
// UI_PrintStringSmallNormal(String, 0, 0, 0);
|
||||
@@ -604,18 +583,18 @@ void UI_DisplayMenu(void)
|
||||
|
||||
BACKLIGHT_TurnOn();
|
||||
|
||||
#if !defined(ENABLE_SPECTRUM) || !defined(ENABLE_FMRADIO)
|
||||
uint8_t gaugeLine = 0;
|
||||
uint8_t gaugeMin = 0;
|
||||
uint8_t gaugeMax = 0;
|
||||
#endif
|
||||
|
||||
switch (UI_MENU_GetCurrentMenuId())
|
||||
{
|
||||
switch (UI_MENU_GetCurrentMenuId()) {
|
||||
case MENU_SQL:
|
||||
sprintf(String, "%d", gSubMenuSelection);
|
||||
break;
|
||||
|
||||
case MENU_MIC:
|
||||
{ // display the mic gain in actual dB rather than just an index number
|
||||
case MENU_MIC: { // display the mic gain in actual dB rather than just an index number
|
||||
const uint8_t mic = gMicGain_dB2[gSubMenuSelection];
|
||||
sprintf(String, "+%u.%01udB", mic / 2, mic % 2);
|
||||
}
|
||||
@@ -636,12 +615,9 @@ void UI_DisplayMenu(void)
|
||||
}
|
||||
|
||||
case MENU_TXP:
|
||||
if(gSubMenuSelection == 0)
|
||||
{
|
||||
if (gSubMenuSelection == 0) {
|
||||
strcpy(String, gSubMenu_TXP[gSubMenuSelection]);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
sprintf(String, "%s\n%sW", gSubMenu_TXP[gSubMenuSelection], gSubMenu_SET_PWR[gSubMenuSelection - 1]);
|
||||
}
|
||||
break;
|
||||
@@ -657,12 +633,12 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
|
||||
case MENU_R_CTCS:
|
||||
case MENU_T_CTCS:
|
||||
{
|
||||
case MENU_T_CTCS: {
|
||||
if (gSubMenuSelection == 0)
|
||||
strcpy(String, gSubMenu_OFF_ON[0]);
|
||||
else
|
||||
sprintf(String, "%u.%uHz", CTCSS_Options[gSubMenuSelection - 1] / 10, CTCSS_Options[gSubMenuSelection - 1] % 10);
|
||||
sprintf(String, "%u.%uHz", CTCSS_Options[gSubMenuSelection - 1] / 10,
|
||||
CTCSS_Options[gSubMenuSelection - 1] % 10);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -671,13 +647,10 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
|
||||
case MENU_OFFSET:
|
||||
if (!gIsInSubMenu || gInputBoxIndex == 0)
|
||||
{
|
||||
if (!gIsInSubMenu || gInputBoxIndex == 0) {
|
||||
sprintf(String, "%3d.%05u", gSubMenuSelection / 100000, abs(gSubMenuSelection) % 100000);
|
||||
UI_PrintString(String, menu_item_x1, menu_item_x2, 1, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
const char *ascii = INPUTBOX_GetAscii();
|
||||
sprintf(String, "%.3s.%.3s ", ascii, ascii + 3);
|
||||
UI_PrintString(String, menu_item_x1, menu_item_x2, 1, 8);
|
||||
@@ -692,17 +665,13 @@ void UI_DisplayMenu(void)
|
||||
strcpy(String, gSubMenu_W_N[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
case MENU_SCR:
|
||||
strcpy(String, gSubMenu_SCRAMBLER[gSubMenuSelection]);
|
||||
#if 1
|
||||
if (gSubMenuSelection > 0 && gSetting_ScrambleEnable)
|
||||
if (gSubMenuSelection > 0)
|
||||
BK4819_EnableScramble(gSubMenuSelection - 1);
|
||||
else
|
||||
BK4819_DisableScramble();
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MENU_VOX:
|
||||
#ifdef ENABLE_VOX
|
||||
@@ -713,12 +682,9 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
|
||||
case MENU_ABR:
|
||||
if(gSubMenuSelection == 0)
|
||||
{
|
||||
if (gSubMenuSelection == 0) {
|
||||
strcpy(String, gSubMenu_OFF_ON[0]);
|
||||
}
|
||||
else if(gSubMenuSelection < 61)
|
||||
{
|
||||
} else if (gSubMenuSelection < 61) {
|
||||
sprintf(String, "%02dm:%02ds", (((gSubMenuSelection) * 5) / 60), (((gSubMenuSelection) * 5) % 60));
|
||||
#if !defined(ENABLE_SPECTRUM) || !defined(ENABLE_FMRADIO)
|
||||
//ST7565_Gauge(4, 1, 60, gSubMenuSelection);
|
||||
@@ -726,9 +692,7 @@ void UI_DisplayMenu(void)
|
||||
gaugeMin = 1;
|
||||
gaugeMax = 60;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
strcpy(String, "ON");
|
||||
}
|
||||
|
||||
@@ -754,8 +718,7 @@ void UI_DisplayMenu(void)
|
||||
case MENU_AUTOLK:
|
||||
if (gSubMenuSelection == 0)
|
||||
strcpy(String, gSubMenu_OFF_ON[0]);
|
||||
else
|
||||
{
|
||||
else {
|
||||
sprintf(String, "%02dm:%02ds", ((gSubMenuSelection * 15) / 60), ((gSubMenuSelection * 15) % 60));
|
||||
#if !defined(ENABLE_SPECTRUM) || !defined(ENABLE_FMRADIO)
|
||||
//ST7565_Gauge(4, 1, 40, gSubMenuSelection);
|
||||
@@ -766,6 +729,10 @@ void UI_DisplayMenu(void)
|
||||
}
|
||||
break;
|
||||
|
||||
case MENU_FSKSRC:
|
||||
sprintf(String, "%d", gSubMenuSelection);
|
||||
break;
|
||||
|
||||
case MENU_COMPAND:
|
||||
case MENU_ABR_ON_TX_RX:
|
||||
strcpy(String, gSubMenu_RX_TX[gSubMenuSelection]);
|
||||
@@ -796,9 +763,7 @@ void UI_DisplayMenu(void)
|
||||
case MENU_500TX:
|
||||
#endif
|
||||
case MENU_350EN:
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
case MENU_SCREN:
|
||||
#endif
|
||||
//case MENU_SCREN:
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
case MENU_SET_TMR:
|
||||
#endif
|
||||
@@ -807,15 +772,13 @@ void UI_DisplayMenu(void)
|
||||
|
||||
case MENU_MEM_CH:
|
||||
case MENU_1_CALL:
|
||||
case MENU_DEL_CH:
|
||||
{
|
||||
case MENU_DEL_CH: {
|
||||
const bool valid = RADIO_CheckValidChannel(gSubMenuSelection, false, 0);
|
||||
|
||||
UI_GenerateChannelStringEx(String, valid, gSubMenuSelection);
|
||||
UI_PrintString(String, menu_item_x1, menu_item_x2, 0, 8);
|
||||
|
||||
if (valid && !gAskForConfirmation)
|
||||
{ // show the frequency so that the user knows the channels frequency
|
||||
if (valid && !gAskForConfirmation) { // show the frequency so that the user knows the channels frequency
|
||||
const uint32_t frequency = SETTINGS_FetchChannelFrequency(gSubMenuSelection);
|
||||
sprintf(String, "%u.%05u", frequency / 100000, frequency % 100000);
|
||||
UI_PrintString(String, menu_item_x1, menu_item_x2, 4, 8);
|
||||
@@ -827,28 +790,23 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
}
|
||||
|
||||
case MENU_MEM_NAME:
|
||||
{
|
||||
case MENU_MEM_NAME: {
|
||||
const bool valid = RADIO_CheckValidChannel(gSubMenuSelection, false, 0);
|
||||
|
||||
UI_GenerateChannelStringEx(String, valid, gSubMenuSelection);
|
||||
UI_PrintString(String, menu_item_x1, menu_item_x2, 0, 8);
|
||||
|
||||
if (valid)
|
||||
{
|
||||
if (valid) {
|
||||
const uint32_t frequency = SETTINGS_FetchChannelFrequency(gSubMenuSelection);
|
||||
|
||||
//if (!gIsInSubMenu || edit_index < 0)
|
||||
if (!gIsInSubMenu)
|
||||
edit_index = -1;
|
||||
if (edit_index < 0)
|
||||
{ // show the channel name
|
||||
if (edit_index < 0) { // show the channel name
|
||||
SETTINGS_FetchChannelName(String, gSubMenuSelection);
|
||||
char *pPrintStr = String[0] ? String : "--";
|
||||
UI_PrintString(pPrintStr, menu_item_x1, menu_item_x2, 2, 8);
|
||||
}
|
||||
else
|
||||
{ // show the channel name being edited
|
||||
} else { // show the channel name being edited
|
||||
//UI_PrintString(edit, menu_item_x1, 0, 2, 8);
|
||||
UI_PrintString(edit, menu_item_x1, menu_item_x2, 2, 8);
|
||||
if (edit_index < 10)
|
||||
@@ -856,8 +814,7 @@ void UI_DisplayMenu(void)
|
||||
UI_PrintString("^", menu_item_x1 - 1 + (8 * edit_index), 0, 4, 8); // show the cursor
|
||||
}
|
||||
|
||||
if (!gAskForConfirmation)
|
||||
{ // show the frequency so that the user knows the channels frequency
|
||||
if (!gAskForConfirmation) { // show the frequency so that the user knows the channels frequency
|
||||
sprintf(String, "%u.%05u", frequency / 100000, frequency % 100000);
|
||||
UI_PrintString(String, menu_item_x1, menu_item_x2, 4 + (gIsInSubMenu && edit_index >= 0), 8);
|
||||
}
|
||||
@@ -892,23 +849,20 @@ void UI_DisplayMenu(void)
|
||||
#endif
|
||||
|
||||
case MENU_SC_REV:
|
||||
if(gSubMenuSelection == 0)
|
||||
{
|
||||
if (gSubMenuSelection == 0) {
|
||||
strcpy(String, "STOP");
|
||||
}
|
||||
else if(gSubMenuSelection < 81)
|
||||
{
|
||||
sprintf(String, "CARRIER\n%02ds:%03dms", ((gSubMenuSelection * 250) / 1000), ((gSubMenuSelection * 250) % 1000));
|
||||
} else if (gSubMenuSelection < 81) {
|
||||
sprintf(String, "CARRIER\n%02ds:%03dms", ((gSubMenuSelection * 250) / 1000),
|
||||
((gSubMenuSelection * 250) % 1000));
|
||||
#if !defined(ENABLE_SPECTRUM) || !defined(ENABLE_FMRADIO)
|
||||
//ST7565_Gauge(5, 1, 80, gSubMenuSelection);
|
||||
gaugeLine = 5;
|
||||
gaugeMin = 1;
|
||||
gaugeMax = 80;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(String, "TIMEOUT\n%02dm:%02ds", (((gSubMenuSelection - 80) * 5) / 60), (((gSubMenuSelection - 80) * 5) % 60));
|
||||
} else {
|
||||
sprintf(String, "TIMEOUT\n%02dm:%02ds", (((gSubMenuSelection - 80) * 5) / 60),
|
||||
(((gSubMenuSelection - 80) * 5) % 60));
|
||||
#if !defined(ENABLE_SPECTRUM) || !defined(ENABLE_FMRADIO)
|
||||
//ST7565_Gauge(5, 80, 104, gSubMenuSelection);
|
||||
gaugeLine = 5;
|
||||
@@ -987,45 +941,24 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MENU_PONMSG:
|
||||
strcpy(String, gSubMenu_PONMSG[gSubMenuSelection]);
|
||||
case MENU_FSKMOD:
|
||||
strcpy(String, gSubMenu_FSKMod[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
case MENU_ROGER:
|
||||
strcpy(String, gSubMenu_ROGER[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
case MENU_VOL:
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
sprintf(String, "%s\n%s",
|
||||
AUTHOR_STRING_2,
|
||||
VERSION_STRING_2
|
||||
);
|
||||
#else
|
||||
sprintf(String, "%u.%02uV\n%u%%",
|
||||
gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100,
|
||||
BATTERY_VoltsToPercent(gBatteryVoltageAverage));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case MENU_RESET:
|
||||
strcpy(String, gSubMenu_RESET[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
case MENU_F_LOCK:
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if(!gIsInSubMenu && gUnlockAllTxConfCnt>0 && gUnlockAllTxConfCnt<3)
|
||||
#else
|
||||
if(!gIsInSubMenu && gUnlockAllTxConfCnt>0 && gUnlockAllTxConfCnt<10)
|
||||
#endif
|
||||
strcpy(String, "READ\nMANUAL");
|
||||
else
|
||||
strcpy(String, gSubMenu_F_LOCK[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_F_CAL_MENU
|
||||
case MENU_F_CALI:
|
||||
{
|
||||
case MENU_F_CALI: {
|
||||
const uint32_t value = 22656 + gSubMenuSelection;
|
||||
const uint32_t xtal_Hz = (0x4f0000u + value) * 5;
|
||||
|
||||
@@ -1038,8 +971,7 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MENU_BATCAL:
|
||||
{
|
||||
case MENU_BATCAL: {
|
||||
const uint16_t vol = (uint32_t) gBatteryVoltageAverage * gBatteryCalibration[3] / gSubMenuSelection;
|
||||
sprintf(String, "%u.%02uV\n%u", vol / 100, vol % 100, gSubMenuSelection);
|
||||
break;
|
||||
@@ -1059,12 +991,9 @@ void UI_DisplayMenu(void)
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_SLEEP
|
||||
case MENU_SET_OFF:
|
||||
if(gSubMenuSelection == 0)
|
||||
{
|
||||
if (gSubMenuSelection == 0) {
|
||||
strcpy(String, gSubMenu_OFF_ON[0]);
|
||||
}
|
||||
else if(gSubMenuSelection < 121)
|
||||
{
|
||||
} else if (gSubMenuSelection < 121) {
|
||||
sprintf(String, "%dh:%02dm", (gSubMenuSelection / 60), (gSubMenuSelection % 60));
|
||||
#if !defined(ENABLE_SPECTRUM) || !defined(ENABLE_FMRADIO)
|
||||
//ST7565_Gauge(4, 1, 120, gSubMenuSelection);
|
||||
@@ -1110,12 +1039,9 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
|
||||
case MENU_TX_LOCK:
|
||||
if(TX_freq_check(gEeprom.VfoInfo[gEeprom.TX_VFO].pRX->Frequency) == 0)
|
||||
{
|
||||
if (TX_freq_check(gEeprom.VfoInfo[gEeprom.TX_VFO].pRX->Frequency) == 0) {
|
||||
strcpy(String, "Inside\nF Lock\nPlan");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
|
||||
}
|
||||
break;
|
||||
@@ -1124,8 +1050,8 @@ void UI_DisplayMenu(void)
|
||||
strcpy(String, gSubMenu_SET_LCK[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
case MENU_SET_MET:
|
||||
case MENU_SET_GUI:
|
||||
//case MENU_SET_MET:
|
||||
//case MENU_SET_GUI:
|
||||
strcpy(String, gSubMenu_SET_MET[gSubMenuSelection]); // Same as SET_MET
|
||||
break;
|
||||
|
||||
@@ -1137,12 +1063,9 @@ void UI_DisplayMenu(void)
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_VOL
|
||||
case MENU_SET_VOL:
|
||||
if(gSubMenuSelection == 0)
|
||||
{
|
||||
if (gSubMenuSelection == 0) {
|
||||
strcpy(String, gSubMenu_OFF_ON[0]);
|
||||
}
|
||||
else if(gSubMenuSelection < 64)
|
||||
{
|
||||
} else if (gSubMenuSelection < 64) {
|
||||
sprintf(String, "%02u", gSubMenuSelection);
|
||||
#if !defined(ENABLE_SPECTRUM) || !defined(ENABLE_FMRADIO)
|
||||
//ST7565_Gauge(4, 1, 63, gSubMenuSelection);
|
||||
@@ -1170,34 +1093,28 @@ void UI_DisplayMenu(void)
|
||||
}
|
||||
|
||||
#if !defined(ENABLE_SPECTRUM) || !defined(ENABLE_FMRADIO)
|
||||
if(gaugeLine != 0)
|
||||
{
|
||||
if (gaugeLine != 0) {
|
||||
ST7565_Gauge(gaugeLine, gaugeMin, gaugeMax, gSubMenuSelection);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!already_printed)
|
||||
{ // we now do multi-line text in a single string
|
||||
if (!already_printed) { // we now do multi-line text in a single string
|
||||
|
||||
unsigned int y;
|
||||
unsigned int lines = 1;
|
||||
unsigned int len = strlen(String);
|
||||
bool small = false;
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
if (len > 0) {
|
||||
// count number of lines
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
if (String[i] == '\n' && i < (len - 1))
|
||||
{ // found new line char
|
||||
for (i = 0; i < len; i++) {
|
||||
if (String[i] == '\n' && i < (len - 1)) { // found new line char
|
||||
lines++;
|
||||
String[i] = 0; // null terminate the line
|
||||
}
|
||||
}
|
||||
|
||||
if (lines > 3)
|
||||
{ // use small text
|
||||
if (lines > 3) { // use small text
|
||||
small = true;
|
||||
if (lines > 7)
|
||||
lines = 7;
|
||||
@@ -1213,32 +1130,8 @@ void UI_DisplayMenu(void)
|
||||
|
||||
y = (small ? 3 : 2) - (lines / 2);
|
||||
|
||||
// only for SysInf
|
||||
if(UI_MENU_GetCurrentMenuId() == MENU_VOL)
|
||||
{
|
||||
sprintf(edit, "%u.%02uV %u%%",
|
||||
gBatteryVoltageAverage / 100, gBatteryVoltageAverage % 100,
|
||||
BATTERY_VoltsToPercent(gBatteryVoltageAverage)
|
||||
);
|
||||
|
||||
UI_PrintStringSmallNormal(edit, 54, 127, 1);
|
||||
|
||||
#if defined(ENABLE_SPECTRUM) && defined(ENABLE_FMRADIO)
|
||||
UI_PrintStringSmallNormal("Voxless", 54, 127, 6);
|
||||
#elif defined(ENABLE_SPECTRUM)
|
||||
UI_PrintStringSmallNormal("Bandscope", 54, 127, 6);
|
||||
#elif defined(ENABLE_FMRADIO)
|
||||
UI_PrintStringSmallNormal("Broadcast", 54, 127, 6);
|
||||
#elif defined(ENABLE_FEAT_F4HWN_RESCUE_OPS)
|
||||
UI_PrintStringSmallNormal("RescueOps", 54, 127, 6);
|
||||
#endif
|
||||
|
||||
y = 2;
|
||||
}
|
||||
|
||||
// draw the text lines
|
||||
for (i = 0; i < len && lines > 0; lines--)
|
||||
{
|
||||
for (i = 0; i < len && lines > 0; lines--) {
|
||||
if (small)
|
||||
UI_PrintStringSmallNormal(String + i, menu_item_x1, menu_item_x2, y);
|
||||
else
|
||||
@@ -1257,8 +1150,8 @@ void UI_DisplayMenu(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_SLIST1 || UI_MENU_GetCurrentMenuId() == MENU_SLIST2 || UI_MENU_GetCurrentMenuId() == MENU_SLIST3)
|
||||
{
|
||||
if (UI_MENU_GetCurrentMenuId() == MENU_SLIST1 || UI_MENU_GetCurrentMenuId() == MENU_SLIST2 ||
|
||||
UI_MENU_GetCurrentMenuId() == MENU_SLIST3) {
|
||||
i = UI_MENU_GetCurrentMenuId() - MENU_SLIST1;
|
||||
|
||||
char *pPrintStr = String;
|
||||
@@ -1335,8 +1228,7 @@ void UI_DisplayMenu(void)
|
||||
if ((UI_MENU_GetCurrentMenuId() == MENU_RESET ||
|
||||
UI_MENU_GetCurrentMenuId() == MENU_MEM_CH ||
|
||||
UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME ||
|
||||
UI_MENU_GetCurrentMenuId() == MENU_DEL_CH) && gAskForConfirmation)
|
||||
{ // display confirmation
|
||||
UI_MENU_GetCurrentMenuId() == MENU_DEL_CH) && gAskForConfirmation) { // display confirmation
|
||||
char *pPrintStr = (gAskForConfirmation == 1) ? "SURE?" : "WAIT!";
|
||||
UI_PrintString(pPrintStr, menu_item_x1, menu_item_x2, 5, 8);
|
||||
}
|
||||
|
||||
@@ -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,9 +95,9 @@ 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
|
||||
@@ -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
|
||||
@@ -198,11 +193,7 @@ extern const char gSubMenu_D_RSP[4][11];
|
||||
#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 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];
|
||||
@@ -210,11 +201,12 @@ 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
|
||||
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
+3
-140
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user