Merge pull request #18 from armel/feature_update

Feature update
This commit is contained in:
Armel FAUVEAU
2024-05-05 20:21:00 +02:00
committed by GitHub
10 changed files with 82 additions and 24 deletions

View File

@@ -211,7 +211,7 @@ ifeq ($(ENABLE_FEAT_F4HWN),1)
VERSION_STRING_1 ?= v0.22 VERSION_STRING_1 ?= v0.22
AUTHOR_STRING_2 ?= F4HWN AUTHOR_STRING_2 ?= F4HWN
VERSION_STRING_2 ?= v2.6 VERSION_STRING_2 ?= v2.7
AUTHOR_STRING ?= $(AUTHOR_STRING_1)+$(AUTHOR_STRING_2) AUTHOR_STRING ?= $(AUTHOR_STRING_1)+$(AUTHOR_STRING_2)
VERSION_STRING ?= $(VERSION_STRING_2) VERSION_STRING ?= $(VERSION_STRING_2)

View File

@@ -22,7 +22,7 @@ Anyway, have fun.
# Donations # 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 and Thierry F4GVO for their [donations](https://www.paypal.com/paypalme/F4HWN). Thats 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 and Tom McGovern for their [donations](https://www.paypal.com/paypalme/F4HWN). Thats so kind of them. Thanks so much 🙏🏻
## Table of Contents ## Table of Contents

View File

@@ -844,11 +844,13 @@ void APP_Update(void)
{ {
if (gBlinkCounter == 0) if (gBlinkCounter == 0)
{ {
BACKLIGHT_TurnOn(); //BACKLIGHT_TurnOn();
BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MAX);
} }
else if(gBlinkCounter == 15000) else if(gBlinkCounter == 15000)
{ {
BACKLIGHT_TurnOff(); //BACKLIGHT_TurnOff();
BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MIN);
} }
} }
} }
@@ -878,9 +880,33 @@ void APP_Update(void)
gTxTimeoutReached = false; gTxTimeoutReached = false;
#ifdef ENABLE_FEAT_F4HWN #ifdef ENABLE_FEAT_F4HWN
if(gBacklightCountdown_500ms > 0 || gEeprom.BACKLIGHT_TIME == 61)
{
//BACKLIGHT_TurnOn();
BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MAX);
}
gTxTimeoutReachedAlert = false; gTxTimeoutReachedAlert = false;
gTxTimeoutToneAlert = 800; gTxTimeoutToneAlert = 800;
if (gSetting_set_ptt_session) // Improve OnePush if TOT
{
if(gPttOnePushCounter == 1)
{
gPttOnePushCounter = 3;
}
else if(gPttOnePushCounter == 2)
{
ProcessKey(KEY_PTT, false, false);
gPttIsPressed = false;
gPttOnePushCounter = 0;
gPttWasReleased = true;
//if (gKeyReading1 != KEY_INVALID)
// gPttWasReleased = true;
}
ST7565_ContrastAndInv();
}
/*
if (gSetting_set_ptt_session) // Improve OnePush if TOT if (gSetting_set_ptt_session) // Improve OnePush if TOT
{ {
ProcessKey(KEY_PTT, false, false); ProcessKey(KEY_PTT, false, false);
@@ -890,6 +916,7 @@ void APP_Update(void)
gPttWasReleased = true; gPttWasReleased = true;
ST7565_ContrastAndInv(); ST7565_ContrastAndInv();
} }
*/
#endif #endif
APP_EndTransmission(); APP_EndTransmission();
@@ -1101,23 +1128,25 @@ static void CheckKeys(void)
{ // PTT pressed again { // PTT pressed again
if (++gPttDebounceCounter >= 3 || SerialConfigInProgress()) // 30ms if (++gPttDebounceCounter >= 3 || SerialConfigInProgress()) // 30ms
{ // stop transmitting { // stop transmitting
ProcessKey(KEY_PTT, false, false);
gPttIsPressed = false;
gPttOnePushCounter = 3; gPttOnePushCounter = 3;
if (gKeyReading1 != KEY_INVALID)
gPttWasReleased = true;
ST7565_ContrastAndInv();
} }
} }
else if ((GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) || SerialConfigInProgress()) && gPttOnePushCounter == 3) else if ((GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) || SerialConfigInProgress()) && gPttOnePushCounter == 3)
{ // PTT released or serial comms config in progress { // PTT released or serial comms config in progress
if (++gPttDebounceCounter >= 3 || SerialConfigInProgress()) // 30ms if (++gPttDebounceCounter >= 3 || SerialConfigInProgress()) // 30ms
{ // stop transmitting { // stop transmitting
ProcessKey(KEY_PTT, false, false);
gPttIsPressed = false;
if (gKeyReading1 != KEY_INVALID)
gPttWasReleased = true;
gPttOnePushCounter = 0; gPttOnePushCounter = 0;
ST7565_ContrastAndInv();
} }
} }
else else
gPttDebounceCounter = 0; gPttDebounceCounter = 0;
//gDebug = gPttOnePushCounter;
} }
else else
{ {

View File

@@ -126,7 +126,7 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
//SETTINGS_SaveChannel(channel, gEeprom.RX_VFO, gRxVfo, 1); //SETTINGS_SaveChannel(channel, gEeprom.RX_VFO, gRxVfo, 1);
gRequestSaveChannel = 1; gRequestSaveChannel = 1;
gRequestSaveVFO = true;
gUpdateDisplay = true; gUpdateDisplay = true;
} }
#endif #endif

View File

@@ -29,6 +29,16 @@ const uint8_t gFontFM[2][6] =
{0x00, 0x7f, 0x2, 0x1c, 0x2, 0x7f}, {0x00, 0x7f, 0x2, 0x1c, 0x2, 0x7f},
}; };
const uint8_t gFontF[1][8] =
{
{0x7f, 0x00, 0x76, 0x76, 0x76, 0x76, 0x7e, 0x7f}, // 'F'
};
const uint8_t gFontS[1][6] =
{
{0x26, 0x49, 0x49, 0x49, 0x49, 0x32}, // 'S'
};
const uint8_t gFontKeyLock[1][9] = const uint8_t gFontKeyLock[1][9] =
{ {
{0x7c, 0x46, 0x45, 0x45, 0x45, 0x45, 0x45, 0x46, 0x7c} {0x7c, 0x46, 0x45, 0x45, 0x45, 0x45, 0x45, 0x46, 0x7c}
@@ -168,24 +178,26 @@ const uint8_t BITMAP_VFO_NotDefault[8] =
0b00001000 0b00001000
}; };
const uint8_t BITMAP_ScanList1[6] = const uint8_t BITMAP_ScanList1[7] =
{ // 'I' symbol { // 'I' symbol
0b00000000, 0b01111111,
0b00000000, 0b01111111,
0b01111011,
0b01000001, 0b01000001,
0b01111111, 0b01111111,
0b01000001, 0b01111111,
0b00000000 0b01111111,
}; };
const uint8_t BITMAP_ScanList2[6] = const uint8_t BITMAP_ScanList2[7] =
{ // 'II' symbol { // 'II' symbol
0b00000000,
0b01000001,
0b01111111, 0b01111111,
0b01000001,
0b01111111, 0b01111111,
0b01000001 0b01001101,
0b01010101,
0b01011011,
0b01111111,
0b01111111,
}; };
const uint8_t BITMAP_compand[6] = const uint8_t BITMAP_compand[6] =

View File

@@ -8,6 +8,9 @@ extern const uint8_t gFontPowerSave[2][6];
extern const uint8_t gFontPttOnePush[2][6]; extern const uint8_t gFontPttOnePush[2][6];
extern const uint8_t gFontPttClassic[2][6]; extern const uint8_t gFontPttClassic[2][6];
extern const uint8_t gFontFM[2][6]; extern const uint8_t gFontFM[2][6];
extern const uint8_t gFontF[1][8];
extern const uint8_t gFontS[1][6];
extern const uint8_t gFontKeyLock[1][9]; extern const uint8_t gFontKeyLock[1][9];
extern const uint8_t gFontScanAll[9]; extern const uint8_t gFontScanAll[9];
extern const uint8_t gFontLight[9]; extern const uint8_t gFontLight[9];
@@ -28,8 +31,8 @@ extern const uint8_t BITMAP_USB_C[9];
extern const uint8_t BITMAP_Antenna[5]; extern const uint8_t BITMAP_Antenna[5];
extern const uint8_t BITMAP_VFO_Default[8]; extern const uint8_t BITMAP_VFO_Default[8];
extern const uint8_t BITMAP_VFO_NotDefault[8]; extern const uint8_t BITMAP_VFO_NotDefault[8];
extern const uint8_t BITMAP_ScanList1[6]; extern const uint8_t BITMAP_ScanList1[7];
extern const uint8_t BITMAP_ScanList2[6]; extern const uint8_t BITMAP_ScanList2[7];
extern const uint8_t BITMAP_compand[6]; extern const uint8_t BITMAP_compand[6];
#ifndef ENABLE_CUSTOM_MENU_LAYOUT #ifndef ENABLE_CUSTOM_MENU_LAYOUT

6
main.c
View File

@@ -39,6 +39,7 @@
#include "driver/gpio.h" #include "driver/gpio.h"
#include "driver/system.h" #include "driver/system.h"
#include "driver/systick.h" #include "driver/systick.h"
#include "driver/eeprom.h"
#ifdef ENABLE_UART #ifdef ENABLE_UART
#include "driver/uart.h" #include "driver/uart.h"
#endif #endif
@@ -117,6 +118,11 @@ void Main(void)
if (BootMode == BOOT_MODE_F_LOCK) if (BootMode == BOOT_MODE_F_LOCK)
{ {
gF_LOCK = true; // flag to say include the hidden menu items gF_LOCK = true; // flag to say include the hidden menu items
#ifdef ENABLE_FEAT_F4HWN
gEeprom.KEY_LOCK = 0;
SETTINGS_SaveSettings();
gMenuCursor = 63; // move to hidden section, fix me if change... !!!
#endif
} }
// count the number of menu items // count the number of menu items

View File

@@ -1054,6 +1054,7 @@ void RADIO_PrepareTX(void)
){ ){
// TX frequency not allowed // TX frequency not allowed
State = VFO_STATE_TX_DISABLE; State = VFO_STATE_TX_DISABLE;
gVfoConfigureMode = VFO_CONFIGURE;
} else if (SerialConfigInProgress()) { } else if (SerialConfigInProgress()) {
// TX is disabled or config upload/download in progress // TX is disabled or config upload/download in progress
State = VFO_STATE_TX_DISABLE; State = VFO_STATE_TX_DISABLE;

View File

@@ -777,7 +777,8 @@ void UI_DisplayMain(void)
else else
{ // receiving .. show the RX symbol { // receiving .. show the RX symbol
mode = VFO_MODE_RX; mode = VFO_MODE_RX;
if (FUNCTION_IsRx() && gEeprom.RX_VFO == vfo_num) { //if (FUNCTION_IsRx() && gEeprom.RX_VFO == vfo_num) {
if (FUNCTION_IsRx() && gEeprom.RX_VFO == vfo_num && VfoState[vfo_num] == VFO_STATE_NORMAL) {
#ifdef ENABLE_FEAT_F4HWN #ifdef ENABLE_FEAT_F4HWN
RxBlinkLed = 1; RxBlinkLed = 1;
RxBlinkLedCounter = 0; RxBlinkLedCounter = 0;

View File

@@ -51,6 +51,8 @@ static void convertTime(uint8_t *line, uint8_t type)
m = t / 60; m = t / 60;
s = t - (m * 60); s = t - (m * 60);
gStatusLine[14] = 0x00; // Quick fix on display (on scanning I, II, etc.)
sprintf(str, "%02d:%02d", m, s); sprintf(str, "%02d:%02d", m, s);
UI_PrintStringSmallBufferNormal(str, line + 0); UI_PrintStringSmallBufferNormal(str, line + 0);
@@ -113,7 +115,8 @@ void UI_DisplayStatus()
} }
} }
else { // frequency mode else { // frequency mode
UI_PrintStringSmallBufferNormal("S", line + x + 1); memcpy(line + x + 1, gFontS, sizeof(gFontS));
//UI_PrintStringSmallBufferNormal("S", line + x + 1);
} }
x1 = x + 10; x1 = x + 10;
} }
@@ -203,12 +206,15 @@ void UI_DisplayStatus()
memcpy(line + x + 1, gFontKeyLock, sizeof(gFontKeyLock)); memcpy(line + x + 1, gFontKeyLock, sizeof(gFontKeyLock));
} }
else if (gWasFKeyPressed) { else if (gWasFKeyPressed) {
memcpy(line + x + 1, gFontF, sizeof(gFontF));
/*
UI_PrintStringSmallBufferNormal("F", line + x + 1); UI_PrintStringSmallBufferNormal("F", line + x + 1);
for (uint8_t i = 71; i < 79; i++) for (uint8_t i = 71; i < 79; i++)
{ {
gStatusLine[i] ^= 0x7F; gStatusLine[i] ^= 0x7F;
} }
*/
} }
else if (gBackLight) else if (gBackLight)
{ {