10
Makefile
10
Makefile
@@ -43,9 +43,10 @@ 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_CHARGING_C ?= 1
|
||||
ENABLE_FEAT_F4HWN_PMR ?= 1
|
||||
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS ?= 1
|
||||
ENABLE_FEAT_F4HWN_PMR ?= 0
|
||||
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS ?= 0
|
||||
ENABLE_FEAT_F4HWN_CA ?= 1
|
||||
|
||||
# ---- DEBUGGING ----
|
||||
@@ -216,7 +217,7 @@ ifeq ($(ENABLE_FEAT_F4HWN),1)
|
||||
VERSION_STRING_1 ?= v0.22
|
||||
|
||||
AUTHOR_STRING_2 ?= F4HWN
|
||||
VERSION_STRING_2 ?= v3.1
|
||||
VERSION_STRING_2 ?= v3.2
|
||||
|
||||
AUTHOR_STRING ?= $(AUTHOR_STRING_1)+$(AUTHOR_STRING_2)
|
||||
VERSION_STRING ?= $(VERSION_STRING_2)
|
||||
@@ -411,6 +412,9 @@ endif
|
||||
ifeq ($(ENABLE_FEAT_F4HWN_SPECTRUM),1)
|
||||
CFLAGS += -DENABLE_FEAT_F4HWN_SPECTRUM
|
||||
endif
|
||||
ifeq ($(ENABLE_FEAT_F4HWN_RX_TX_TIMER),1)
|
||||
CFLAGS += -DENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||
endif
|
||||
ifeq ($(ENABLE_FEAT_F4HWN_CHARGING_C),1)
|
||||
CFLAGS += -DENABLE_FEAT_F4HWN_CHARGING_C
|
||||
endif
|
||||
|
@@ -26,7 +26,7 @@ Anyway, have fun.
|
||||
|
||||
# Donations
|
||||
|
||||
Special thanks to Jean-Cyrille F6IWW, Fabrice 14RC123, David F4BPP, Olivier 14RC206, Frédéric F4ESO, Stéphane F5LGW, Jorge Ornelas, Laurent F4AXK, Christophe Morel, Clayton W0LED, Pierre Antoine F6FWB, Jean-Claude 14FRS3306, Thierry F4GVO, Eric F1NOU, PricelessToolkit, Ady M6NYJ, Tom McGovern, Joseph Roth, Pierre-Yves Colin, Frank DJ7FG, Marcel Testaz, Brian Frobisher, Yannick F4JFO and Paolo Bussola for their [donations](https://www.paypal.com/paypalme/F4HWN). That’s so kind of them. Thanks so much 🙏🏻
|
||||
Special thanks to Jean-Cyrille F6IWW, Fabrice 14RC123, David F4BPP, Olivier 14RC206, Frédéric F4ESO, Stéphane F5LGW, Jorge Ornelas, Laurent F4AXK, Christophe Morel, Clayton W0LED, Pierre Antoine F6FWB, Jean-Claude 14FRS3306, Thierry F4GVO, Eric F1NOU, PricelessToolkit, Ady M6NYJ, Tom McGovern, Joseph Roth, Pierre-Yves Colin, Frank DJ7FG, Marcel Testaz, Brian Frobisher, Yannick F4JFO, Paolo Bussola and Dirk DL8DF for their [donations](https://www.paypal.com/paypalme/F4HWN). That’s so kind of them. Thanks so much 🙏🏻
|
||||
|
||||
## Table of Contents
|
||||
|
||||
|
@@ -439,7 +439,7 @@ void APP_StartListening(FUNCTION_Type_t function)
|
||||
{
|
||||
const unsigned int vfo = gEeprom.RX_VFO;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||
gRxTimerCountdown_500ms = 7200;
|
||||
#endif
|
||||
|
||||
@@ -714,7 +714,7 @@ static void CheckRadioInterrupts(void)
|
||||
if (interrupts.sqlLost) {
|
||||
g_SquelchLost = true;
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO6_PIN2_GREEN, true);
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||
gRxTimerCountdown_500ms = 7200;
|
||||
#endif
|
||||
}
|
||||
|
@@ -278,8 +278,8 @@ static void NextMemChannel(void)
|
||||
}
|
||||
|
||||
if (!enabled || chan == 0xff)
|
||||
{
|
||||
chan = RADIO_FindNextChannel(gNextMrChannel + gScanStateDir, gScanStateDir, (gEeprom.SCAN_LIST_DEFAULT < 5) ? true : false, gEeprom.SCAN_LIST_DEFAULT);
|
||||
{
|
||||
chan = RADIO_FindNextChannel(gNextMrChannel + gScanStateDir, gScanStateDir, true, gEeprom.SCAN_LIST_DEFAULT);
|
||||
if (chan == 0xFF)
|
||||
{ // no valid channel found
|
||||
chan = MR_CHANNEL_FIRST;
|
||||
|
19
app/main.c
19
app/main.c
@@ -59,13 +59,12 @@ static void toggle_chan_scanlist(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
if (gTxVfo->SCANLIST1_PARTICIPATION ^ gTxVfo->SCANLIST2_PARTICIPATION){
|
||||
gTxVfo->SCANLIST2_PARTICIPATION = gTxVfo->SCANLIST1_PARTICIPATION;
|
||||
} else {
|
||||
gTxVfo->SCANLIST1_PARTICIPATION = !gTxVfo->SCANLIST1_PARTICIPATION;
|
||||
// Remove exclude
|
||||
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);
|
||||
|
||||
@@ -627,15 +626,11 @@ 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 && (gEeprom.SCAN_LIST_DEFAULT > 0 && gEeprom.SCAN_LIST_DEFAULT < 5))
|
||||
if(gScanStateDir != SCAN_OFF)
|
||||
{
|
||||
if(FUNCTION_IsRx())
|
||||
{
|
||||
gTxVfo->SCANLIST1_PARTICIPATION = 0;
|
||||
gTxVfo->SCANLIST2_PARTICIPATION = 0;
|
||||
gTxVfo->SCANLIST3_PARTICIPATION = 0;
|
||||
|
||||
SETTINGS_UpdateChannel(gTxVfo->CHANNEL_SAVE, gTxVfo, true, true, false);
|
||||
gMR_ChannelExclude[gTxVfo->CHANNEL_SAVE] = true;
|
||||
|
||||
gVfoConfigureMode = VFO_CONFIGURE;
|
||||
gFlagResetVfos = true;
|
||||
|
@@ -390,6 +390,7 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
||||
*pMin = 1;
|
||||
*pMax = 15;
|
||||
break;
|
||||
case MENU_TX_LOCK:
|
||||
case MENU_SET_INV:
|
||||
//*pMin = 0;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_OFF_ON) - 1;
|
||||
@@ -894,6 +895,10 @@ void MENU_AcceptSetting(void)
|
||||
case MENU_SET_GUI:
|
||||
gSetting_set_gui = gSubMenuSelection;
|
||||
break;
|
||||
case MENU_TX_LOCK:
|
||||
gTxVfo->TX_LOCK = gSubMenuSelection;
|
||||
gRequestSaveChannel = 1;
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1311,6 +1316,9 @@ void MENU_ShowCurrentSetting(void)
|
||||
case MENU_SET_GUI:
|
||||
gSubMenuSelection = gSetting_set_gui;
|
||||
break;
|
||||
case MENU_TX_LOCK:
|
||||
gSubMenuSelection = gTxVfo->TX_LOCK;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
|
@@ -786,7 +786,7 @@ static void DrawStatus() {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef ENABLE_FMRADIO
|
||||
#ifdef ENABLE_FEAT_F4HWN_SPECTRUM
|
||||
static void ShowChannelName(uint32_t f) {
|
||||
unsigned int i;
|
||||
char s[12];
|
||||
@@ -827,7 +827,7 @@ static void DrawF(uint32_t f) {
|
||||
sprintf(String, "%4sk", bwOptions[settings.listenBw]);
|
||||
GUI_DisplaySmallest(String, 108, 7, false, true);
|
||||
|
||||
#ifndef ENABLE_FMRADIO
|
||||
#ifdef ENABLE_FEAT_F4HWN_SPECTRUM
|
||||
ShowChannelName(f);
|
||||
#endif
|
||||
}
|
||||
|
BIN
archive/f4hwn.bandscope.packed.v3.2.bin
Normal file
BIN
archive/f4hwn.bandscope.packed.v3.2.bin
Normal file
Binary file not shown.
BIN
archive/f4hwn.broadcast.packed.v3.2.bin
Normal file
BIN
archive/f4hwn.broadcast.packed.v3.2.bin
Normal file
Binary file not shown.
BIN
archive/f4hwn.voxless.packed.v3.2.bin
Normal file
BIN
archive/f4hwn.voxless.packed.v3.2.bin
Normal file
Binary file not shown.
2
audio.c
2
audio.c
@@ -40,7 +40,7 @@ void AUDIO_PlayBeep(BEEP_Type_t Beep)
|
||||
if (Beep != BEEP_880HZ_60MS_DOUBLE_BEEP &&
|
||||
Beep != BEEP_500HZ_60MS_DOUBLE_BEEP &&
|
||||
Beep != BEEP_440HZ_500MS &&
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
Beep != BEEP_880HZ_200MS &&
|
||||
Beep != BEEP_880HZ_500MS &&
|
||||
#endif
|
||||
|
2
audio.h
2
audio.h
@@ -29,7 +29,7 @@ enum BEEP_Type_t
|
||||
BEEP_1KHZ_60MS_OPTIONAL,
|
||||
BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL,
|
||||
BEEP_440HZ_500MS,
|
||||
#ifndef ENABLE_FEAT_F4HWN
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
BEEP_880HZ_200MS,
|
||||
BEEP_880HZ_500MS,
|
||||
#endif
|
||||
|
28
bitmaps.c
28
bitmaps.c
@@ -135,9 +135,19 @@ const uint8_t BITMAP_Antenna[5] =
|
||||
0b00000011
|
||||
};
|
||||
|
||||
const uint8_t BITMAP_VFO_Default[8] =
|
||||
const uint8_t BITMAP_VFO_Lock[7] =
|
||||
{
|
||||
0b01111100,
|
||||
0b01000110,
|
||||
0b01000101,
|
||||
0b01000101,
|
||||
0b01000101,
|
||||
0b01000110,
|
||||
0b01111100,
|
||||
};
|
||||
|
||||
const uint8_t BITMAP_VFO_Default[7] =
|
||||
{
|
||||
0b00000000,
|
||||
0b01111111,
|
||||
0b01111111,
|
||||
0b00111110,
|
||||
@@ -147,9 +157,8 @@ const uint8_t BITMAP_VFO_Default[8] =
|
||||
0b00001000
|
||||
};
|
||||
|
||||
const uint8_t BITMAP_VFO_NotDefault[8] =
|
||||
const uint8_t BITMAP_VFO_NotDefault[7] =
|
||||
{
|
||||
0b00000000,
|
||||
0b01000001,
|
||||
0b01000001,
|
||||
0b00100010,
|
||||
@@ -203,6 +212,17 @@ const uint8_t BITMAP_ScanList3[7] =
|
||||
0b01111111
|
||||
};
|
||||
|
||||
const uint8_t BITMAP_ScanListE[7] =
|
||||
{ // 'E' symbol
|
||||
0b01111111,
|
||||
0b01111111,
|
||||
0b01000001,
|
||||
0b01010101,
|
||||
0b01010101,
|
||||
0b01111111,
|
||||
0b01111111
|
||||
};
|
||||
|
||||
const uint8_t BITMAP_ScanList123[19] =
|
||||
{
|
||||
// 'All' symbol
|
||||
|
@@ -28,14 +28,16 @@ extern const uint8_t BITMAP_Ready[7];
|
||||
#endif
|
||||
|
||||
extern const uint8_t BITMAP_Antenna[5];
|
||||
extern const uint8_t BITMAP_VFO_Default[8];
|
||||
extern const uint8_t BITMAP_VFO_NotDefault[8];
|
||||
extern const uint8_t BITMAP_VFO_Default[7];
|
||||
extern const uint8_t BITMAP_VFO_NotDefault[7];
|
||||
extern const uint8_t BITMAP_VFO_Lock[7];
|
||||
extern const uint8_t BITMAP_ScanList0[7];
|
||||
extern const uint8_t BITMAP_ScanList1[7];
|
||||
extern const uint8_t BITMAP_ScanList2[7];
|
||||
extern const uint8_t BITMAP_ScanList3[7];
|
||||
extern const uint8_t BITMAP_ScanList123[19];
|
||||
extern const uint8_t BITMAP_ScanListAll[19];
|
||||
extern const uint8_t BITMAP_ScanListE[7];
|
||||
extern const uint8_t BITMAP_PowerUser[3];
|
||||
extern const uint8_t BITMAP_compand[6];
|
||||
|
||||
|
@@ -86,10 +86,10 @@ void BOOT_ProcessMode(BOOT_Mode_t Mode)
|
||||
gEeprom.KEY_2_LONG_PRESS_ACTION = ACTION_OPT_NONE;
|
||||
gEeprom.KEY_M_LONG_PRESS_ACTION = ACTION_OPT_NONE;
|
||||
|
||||
RADIO_InitInfo(gRxVfo, FREQ_CHANNEL_LAST - 1, 41002500);
|
||||
RADIO_InitInfo(gRxVfo, FREQ_CHANNEL_LAST - 1, 43400000); // LPD
|
||||
|
||||
gRxVfo->CHANNEL_BANDWIDTH = BANDWIDTH_WIDE;
|
||||
gRxVfo->OUTPUT_POWER = OUTPUT_POWER_LOW;
|
||||
gRxVfo->CHANNEL_BANDWIDTH = BANDWIDTH_NARROW;
|
||||
gRxVfo->OUTPUT_POWER = OUTPUT_POWER_LOW1;
|
||||
|
||||
RADIO_ConfigureSquelchAndOutputPower(gRxVfo);
|
||||
|
||||
|
4
main.c
4
main.c
@@ -129,9 +129,9 @@ void Main(void)
|
||||
gEeprom.KEY_LOCK = 0;
|
||||
SETTINGS_SaveSettings();
|
||||
#ifndef ENABLE_VOX
|
||||
gMenuCursor = 62; // move to hidden section, fix me if change... !!! Remove VOX and Mic Bar
|
||||
gMenuCursor = 63; // move to hidden section, fix me if change... !!! Remove VOX and Mic Bar
|
||||
#else
|
||||
gMenuCursor = 64; // move to hidden section, fix me if change... !!!
|
||||
gMenuCursor = 65; // move to hidden section, fix me if change... !!!
|
||||
#endif
|
||||
gSubMenuSelection = gSetting_F_LOCK;
|
||||
#endif
|
||||
|
5
misc.c
5
misc.c
@@ -140,6 +140,7 @@ uint16_t gEEPROM_1F8A;
|
||||
uint16_t gEEPROM_1F8C;
|
||||
|
||||
ChannelAttributes_t gMR_ChannelAttributes[FREQ_CHANNEL_LAST + 1];
|
||||
bool gMR_ChannelExclude[FREQ_CHANNEL_LAST + 1];
|
||||
|
||||
volatile uint16_t gBatterySaveCountdown_10ms = battery_save_count_10ms;
|
||||
|
||||
@@ -162,7 +163,9 @@ volatile bool gTxTimeoutReached;
|
||||
volatile uint16_t gTxTimerCountdownAlert_500ms;
|
||||
volatile bool gTxTimeoutReachedAlert;
|
||||
volatile uint16_t gTxTimeoutToneAlert = 800;
|
||||
volatile uint16_t gRxTimerCountdown_500ms;
|
||||
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||
volatile uint16_t gRxTimerCountdown_500ms;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
volatile uint16_t gTailNoteEliminationCountdown_10ms;
|
||||
|
5
misc.h
5
misc.h
@@ -205,6 +205,7 @@ typedef union {
|
||||
} ChannelAttributes_t;
|
||||
|
||||
extern ChannelAttributes_t gMR_ChannelAttributes[207];
|
||||
extern bool gMR_ChannelExclude[207];
|
||||
|
||||
extern volatile uint16_t gBatterySaveCountdown_10ms;
|
||||
|
||||
@@ -227,7 +228,9 @@ extern volatile bool gTxTimeoutReached;
|
||||
extern volatile uint16_t gTxTimerCountdownAlert_500ms;
|
||||
extern volatile bool gTxTimeoutReachedAlert;
|
||||
extern volatile uint16_t gTxTimeoutToneAlert;
|
||||
extern volatile uint16_t gRxTimerCountdown_500ms;
|
||||
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||
extern volatile uint16_t gRxTimerCountdown_500ms;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern volatile uint16_t gTailNoteEliminationCountdown_10ms;
|
||||
|
21
radio.c
21
radio.c
@@ -62,6 +62,9 @@ bool RADIO_CheckValidChannel(uint16_t channel, bool checkScanList, uint8_t scanL
|
||||
|
||||
const ChannelAttributes_t att = gMR_ChannelAttributes[channel];
|
||||
|
||||
if (checkScanList && gMR_ChannelExclude[channel] == true)
|
||||
return false;
|
||||
|
||||
if (att.band > BAND7_470MHz)
|
||||
return false;
|
||||
|
||||
@@ -138,6 +141,7 @@ void RADIO_InitInfo(VFO_Info_t *pInfo, const uint8_t ChannelSave, const uint32_t
|
||||
pInfo->StepFrequency = gStepFrequencyTable[pInfo->STEP_SETTING];
|
||||
pInfo->CHANNEL_SAVE = ChannelSave;
|
||||
pInfo->FrequencyReverse = false;
|
||||
pInfo->TX_LOCK = true;
|
||||
pInfo->OUTPUT_POWER = OUTPUT_POWER_LOW1;
|
||||
pInfo->freq_config_RX.Frequency = Frequency;
|
||||
pInfo->freq_config_TX.Frequency = Frequency;
|
||||
@@ -247,7 +251,7 @@ void RADIO_ConfigureChannel(const unsigned int VFO, const unsigned int configure
|
||||
{
|
||||
uint8_t tmp;
|
||||
uint8_t data[8];
|
||||
|
||||
|
||||
// ***************
|
||||
|
||||
EEPROM_ReadBuffer(base + 8, data, sizeof(data));
|
||||
@@ -329,6 +333,7 @@ void RADIO_ConfigureChannel(const unsigned int VFO, const unsigned int configure
|
||||
pVfo->CHANNEL_BANDWIDTH = BK4819_FILTER_BW_WIDE;
|
||||
pVfo->OUTPUT_POWER = OUTPUT_POWER_LOW1;
|
||||
pVfo->BUSY_CHANNEL_LOCK = false;
|
||||
pVfo->TX_LOCK = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -337,6 +342,7 @@ void RADIO_ConfigureChannel(const unsigned int VFO, const unsigned int configure
|
||||
pVfo->CHANNEL_BANDWIDTH = !!((d4 >> 1) & 1u);
|
||||
pVfo->OUTPUT_POWER = ((d4 >> 2) & 7u);
|
||||
pVfo->BUSY_CHANNEL_LOCK = !!((d4 >> 5) & 1u);
|
||||
pVfo->TX_LOCK = !!((d4 >> 6) & 1u);
|
||||
}
|
||||
|
||||
if (data[5] == 0xFF)
|
||||
@@ -1050,9 +1056,16 @@ void RADIO_PrepareTX(void)
|
||||
|
||||
RADIO_SelectCurrentVfo();
|
||||
|
||||
if(TX_freq_check(gCurrentVfo->pTX->Frequency) != 0
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
&& gAlarmState != ALARM_STATE_SITE_ALARM
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if(TX_freq_check(gCurrentVfo->pTX->Frequency) != 0 && gCurrentVfo->TX_LOCK == true
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
&& gAlarmState != ALARM_STATE_SITE_ALARM
|
||||
#endif
|
||||
#else
|
||||
if(TX_freq_check(gCurrentVfo->pTX->Frequency) != 0
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
&& gAlarmState != ALARM_STATE_SITE_ALARM
|
||||
#endif
|
||||
#endif
|
||||
){
|
||||
// TX frequency not allowed
|
||||
|
1
radio.h
1
radio.h
@@ -107,6 +107,7 @@ typedef struct VFO_Info_t
|
||||
uint8_t SquelchOpenGlitchThresh;
|
||||
|
||||
STEP_Setting_t STEP_SETTING;
|
||||
uint8_t TX_LOCK;
|
||||
uint8_t OUTPUT_POWER;
|
||||
uint8_t TXP_CalculatedSetting;
|
||||
bool FrequencyReverse;
|
||||
|
@@ -58,7 +58,9 @@ void SystickHandler(void)
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
DECREMENT_AND_TRIGGER(gTxTimerCountdownAlert_500ms - ALERT_TOT * 2, gTxTimeoutReachedAlert);
|
||||
DECREMENT(gRxTimerCountdown_500ms);
|
||||
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||
DECREMENT(gRxTimerCountdown_500ms);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
DECREMENT_AND_TRIGGER(gTxTimerCountdown_500ms, gTxTimeoutReached);
|
||||
|
11
settings.c
11
settings.c
@@ -225,7 +225,7 @@ void SETTINGS_InitEEPROM(void)
|
||||
|
||||
// 0F18..0F1F
|
||||
EEPROM_ReadBuffer(0x0F18, Data, 8);
|
||||
gEeprom.SCAN_LIST_DEFAULT = (Data[0] < 5) ? Data[0] : 0; // we now have 'all' channel scan option
|
||||
gEeprom.SCAN_LIST_DEFAULT = (Data[0] < 6) ? Data[0] : 0; // we now have 'all' channel scan option
|
||||
|
||||
// Fake data
|
||||
/*
|
||||
@@ -300,6 +300,7 @@ void SETTINGS_InitEEPROM(void)
|
||||
att->__val = 0;
|
||||
att->band = 0x7;
|
||||
}
|
||||
gMR_ChannelExclude[i] = false;
|
||||
}
|
||||
|
||||
// 0F30..0F3F
|
||||
@@ -438,7 +439,8 @@ void SETTINGS_FactoryReset(bool bIsAll)
|
||||
|
||||
memset(Template, 0xFF, sizeof(Template));
|
||||
|
||||
for (i = 0x0C80; i < 0x1E00; i += 8)
|
||||
//for (i = 0x0C80; i < 0x1E00; i += 8)
|
||||
for (i = 0x0000; i < 0x1E00; i += 8)
|
||||
{
|
||||
if (
|
||||
!(i >= 0x0EE0 && i < 0x0F18) && // ANI ID + DTMF codes
|
||||
@@ -473,6 +475,10 @@ void SETTINGS_FactoryReset(bool bIsAll)
|
||||
gRxVfo->Band = FREQUENCY_GetBand(Frequency);
|
||||
SETTINGS_SaveChannel(MR_CHANNEL_FIRST + i, 0, gRxVfo, 2);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
EEPROM_WriteBuffer(0x1FF0, Template);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -744,6 +750,7 @@ void SETTINGS_SaveChannel(uint8_t Channel, uint8_t VFO, const VFO_Info_t *pVFO,
|
||||
State._8[2] = (pVFO->freq_config_TX.CodeType << 4) | pVFO->freq_config_RX.CodeType;
|
||||
State._8[3] = (pVFO->Modulation << 4) | pVFO->TX_OFFSET_FREQUENCY_DIRECTION;
|
||||
State._8[4] = 0
|
||||
| (pVFO->TX_LOCK << 6)
|
||||
| (pVFO->BUSY_CHANNEL_LOCK << 5)
|
||||
| (pVFO->OUTPUT_POWER << 2)
|
||||
| (pVFO->CHANNEL_BANDWIDTH << 1)
|
||||
|
78
ui/main.c
78
ui/main.c
@@ -295,14 +295,14 @@ void DisplayRSSIBar(const bool now)
|
||||
switch(RxBlink)
|
||||
{
|
||||
case 0:
|
||||
UI_PrintStringSmallBold("RX", 14, 0, RxLine);
|
||||
UI_PrintStringSmallBold("RX", 8, 0, RxLine);
|
||||
break;
|
||||
case 1:
|
||||
UI_PrintStringSmallBold("RX", 14, 0, RxLine);
|
||||
UI_PrintStringSmallBold("RX", 8, 0, RxLine);
|
||||
RxBlink = 2;
|
||||
break;
|
||||
case 2:
|
||||
for (uint8_t i = 14; i < 30; i++)
|
||||
for (uint8_t i = 8; i < 24; i++)
|
||||
{
|
||||
gFrameBuffer[RxLine][i] = 0x00;
|
||||
}
|
||||
@@ -758,6 +758,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(isMainOnly(false))
|
||||
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
|
||||
|
||||
@@ -770,7 +778,7 @@ void UI_DisplayMain(void)
|
||||
if (activeTxVFO == vfo_num)
|
||||
{ // show the TX symbol
|
||||
mode = VFO_MODE_TX;
|
||||
UI_PrintStringSmallBold("TX", 14, 0, line);
|
||||
UI_PrintStringSmallBold("TX", 8, 0, line);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -793,7 +801,7 @@ void UI_DisplayMain(void)
|
||||
RxBlink = 0;
|
||||
}
|
||||
#else
|
||||
UI_PrintStringSmallBold("RX", 14, 0, line);
|
||||
UI_PrintStringSmallBold("RX", 8, 0, line);
|
||||
#endif
|
||||
}
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
@@ -801,7 +809,7 @@ void UI_DisplayMain(void)
|
||||
{
|
||||
if(RxOnVfofrequency == frequency && !isMainOnly(false))
|
||||
{
|
||||
UI_PrintStringSmallNormal(">>", 14, 0, line);
|
||||
UI_PrintStringSmallNormal(">>", 8, 0, line);
|
||||
//memcpy(p_line0 + 14, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
||||
}
|
||||
|
||||
@@ -895,36 +903,40 @@ void UI_DisplayMain(void)
|
||||
uint8_t countList = 0;
|
||||
uint8_t shiftList = 0;
|
||||
|
||||
// show the scan list assigment symbols
|
||||
const ChannelAttributes_t att = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]];
|
||||
|
||||
if (att.scanlist1)
|
||||
countList++;
|
||||
if (att.scanlist2)
|
||||
countList++;
|
||||
if (att.scanlist3)
|
||||
countList++;
|
||||
|
||||
shiftList = countList;
|
||||
|
||||
if (att.scanlist1)
|
||||
if(gMR_ChannelExclude[gEeprom.ScreenChannel[vfo_num]] == false)
|
||||
{
|
||||
memcpy(p_line0 + 127 - (shiftList * 6), BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
|
||||
shiftList--;
|
||||
// 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)
|
||||
{
|
||||
memcpy(p_line0 + 127 - (1 * 6), BITMAP_ScanList0, sizeof(BITMAP_ScanList0));
|
||||
}
|
||||
else
|
||||
{
|
||||
shiftList = countList;
|
||||
|
||||
if (att.scanlist1)
|
||||
{
|
||||
memcpy(p_line0 + 127 - (shiftList * 6), BITMAP_ScanList1, sizeof(BITMAP_ScanList1));
|
||||
shiftList--;
|
||||
}
|
||||
if (att.scanlist2)
|
||||
{
|
||||
memcpy(p_line0 + 127 - (shiftList * 6), BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
|
||||
shiftList--;
|
||||
}
|
||||
if (att.scanlist3)
|
||||
{
|
||||
memcpy(p_line0 + 127 - (shiftList * 6), BITMAP_ScanList3, sizeof(BITMAP_ScanList3));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (att.scanlist2)
|
||||
else
|
||||
{
|
||||
memcpy(p_line0 + 127 - (shiftList * 6), BITMAP_ScanList2, sizeof(BITMAP_ScanList2));
|
||||
shiftList--;
|
||||
}
|
||||
if (att.scanlist3)
|
||||
{
|
||||
memcpy(p_line0 + 127 - (shiftList * 6), BITMAP_ScanList3, sizeof(BITMAP_ScanList3));
|
||||
}
|
||||
|
||||
if(countList == 0)
|
||||
{
|
||||
memcpy(p_line0 + 127 - (1 * 6), BITMAP_ScanList0, sizeof(BITMAP_ScanList0));
|
||||
memcpy(p_line0 + 127 - (1 * 6), BITMAP_ScanListE, sizeof(BITMAP_ScanListE));
|
||||
}
|
||||
|
||||
/*
|
||||
|
21
ui/menu.c
21
ui/menu.c
@@ -55,6 +55,9 @@ const t_menu_item MenuList[] =
|
||||
{"BusyCL", MENU_BCL }, // was "BCL"
|
||||
{"Compnd", MENU_COMPAND },
|
||||
{"Mode", MENU_AM }, // was "AM"
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
{"TXLock", MENU_TX_LOCK },
|
||||
#endif
|
||||
{"ScAdd1", MENU_S_ADD1 },
|
||||
{"ScAdd2", MENU_S_ADD2 },
|
||||
{"ScAdd3", MENU_S_ADD3 },
|
||||
@@ -989,6 +992,17 @@ void UI_DisplayMenu(void)
|
||||
ST7565_ContrastAndInv();
|
||||
break;
|
||||
|
||||
case MENU_TX_LOCK:
|
||||
if(TX_freq_check(gEeprom.VfoInfo[gEeprom.TX_VFO].pRX->Frequency) == 0)
|
||||
{
|
||||
strcpy(String, "Inside\nF Lock\nPlan");
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);
|
||||
}
|
||||
break;
|
||||
|
||||
case MENU_SET_LCK:
|
||||
strcpy(String, gSubMenu_SET_LCK[gSubMenuSelection]);
|
||||
break;
|
||||
@@ -1079,12 +1093,7 @@ 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)
|
||||
i = 0;
|
||||
else if(UI_MENU_GetCurrentMenuId() == MENU_SLIST2)
|
||||
i = 1;
|
||||
else if(UI_MENU_GetCurrentMenuId() == MENU_SLIST3)
|
||||
i = 2;
|
||||
i = UI_MENU_GetCurrentMenuId() - MENU_SLIST1;
|
||||
|
||||
char *pPrintStr = String;
|
||||
|
||||
|
@@ -45,6 +45,9 @@ enum
|
||||
MENU_SCR,
|
||||
#endif
|
||||
MENU_BCL,
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
MENU_TX_LOCK,
|
||||
#endif
|
||||
MENU_MEM_CH,
|
||||
MENU_DEL_CH,
|
||||
MENU_MEM_NAME,
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include "ui/ui.h"
|
||||
#include "ui/status.h"
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||
static void convertTime(uint8_t *line, uint8_t type)
|
||||
{
|
||||
char str[8] = "";
|
||||
@@ -59,6 +60,7 @@ static void convertTime(uint8_t *line, uint8_t type)
|
||||
|
||||
gUpdateStatus = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
void UI_DisplayStatus()
|
||||
{
|
||||
@@ -150,6 +152,7 @@ void UI_DisplayStatus()
|
||||
#endif
|
||||
|
||||
if(!SCANNER_IsScanning()) {
|
||||
#ifdef ENABLE_FEAT_F4HWN_RX_TX_TIMER
|
||||
if(gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
{
|
||||
convertTime(line, 0);
|
||||
@@ -159,6 +162,7 @@ void UI_DisplayStatus()
|
||||
convertTime(line, 1);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
uint8_t dw = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2;
|
||||
if(dw == 1 || dw == 3) { // DWR - dual watch + respond
|
||||
|
Reference in New Issue
Block a user