Skip to content

Commit

Permalink
Merge pull request armel#18 from armel/feature_update
Browse files Browse the repository at this point in the history
Feature update
  • Loading branch information
armel authored May 5, 2024
2 parents 9cf3e5c + 1d78b9b commit 7dddcf7
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ ifeq ($(ENABLE_FEAT_F4HWN),1)
VERSION_STRING_1 ?= v0.22

AUTHOR_STRING_2 ?= F4HWN
VERSION_STRING_2 ?= v2.6
VERSION_STRING_2 ?= v2.7

AUTHOR_STRING ?= $(AUTHOR_STRING_1)+$(AUTHOR_STRING_2)
VERSION_STRING ?= $(VERSION_STRING_2)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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 and Thierry F4GVO 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 and Tom McGovern for their [donations](https://www.paypal.com/paypalme/F4HWN). That’s so kind of them. Thanks so much 🙏🏻

## Table of Contents

Expand Down
43 changes: 36 additions & 7 deletions app/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,11 +844,13 @@ void APP_Update(void)
{
if (gBlinkCounter == 0)
{
BACKLIGHT_TurnOn();
//BACKLIGHT_TurnOn();
BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MAX);
}
else if(gBlinkCounter == 15000)
{
BACKLIGHT_TurnOff();
//BACKLIGHT_TurnOff();
BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MIN);
}
}
}
Expand Down Expand Up @@ -878,9 +880,33 @@ void APP_Update(void)
gTxTimeoutReached = false;

#ifdef ENABLE_FEAT_F4HWN
if(gBacklightCountdown_500ms > 0 || gEeprom.BACKLIGHT_TIME == 61)
{
//BACKLIGHT_TurnOn();
BACKLIGHT_SetBrightness(gEeprom.BACKLIGHT_MAX);
}

gTxTimeoutReachedAlert = false;
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
{
ProcessKey(KEY_PTT, false, false);
Expand All @@ -890,6 +916,7 @@ void APP_Update(void)
gPttWasReleased = true;
ST7565_ContrastAndInv();
}
*/
#endif

APP_EndTransmission();
Expand Down Expand Up @@ -1101,23 +1128,25 @@ static void CheckKeys(void)
{ // PTT pressed again
if (++gPttDebounceCounter >= 3 || SerialConfigInProgress()) // 30ms
{ // stop transmitting
ProcessKey(KEY_PTT, false, false);
gPttIsPressed = false;
gPttOnePushCounter = 3;
if (gKeyReading1 != KEY_INVALID)
gPttWasReleased = true;
ST7565_ContrastAndInv();
}
}
else if ((GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT) || SerialConfigInProgress()) && gPttOnePushCounter == 3)
{ // PTT released or serial comms config in progress
if (++gPttDebounceCounter >= 3 || SerialConfigInProgress()) // 30ms
{ // stop transmitting
ProcessKey(KEY_PTT, false, false);
gPttIsPressed = false;
if (gKeyReading1 != KEY_INVALID)
gPttWasReleased = true;
gPttOnePushCounter = 0;
ST7565_ContrastAndInv();
}
}
else
gPttDebounceCounter = 0;

//gDebug = gPttOnePushCounter;
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion app/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
//SETTINGS_SaveChannel(channel, gEeprom.RX_VFO, gRxVfo, 1);

gRequestSaveChannel = 1;

gRequestSaveVFO = true;
gUpdateDisplay = true;
}
#endif
Expand Down
32 changes: 22 additions & 10 deletions bitmaps.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ const uint8_t gFontFM[2][6] =
{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] =
{
{0x7c, 0x46, 0x45, 0x45, 0x45, 0x45, 0x45, 0x46, 0x7c}
Expand Down Expand Up @@ -168,24 +178,26 @@ const uint8_t BITMAP_VFO_NotDefault[8] =
0b00001000
};

const uint8_t BITMAP_ScanList1[6] =
const uint8_t BITMAP_ScanList1[7] =
{ // 'I' symbol
0b00000000,
0b00000000,
0b01000001,
0b01111111,
0b01111111,
0b01111011,
0b01000001,
0b00000000
0b01111111,
0b01111111,
0b01111111,
};

const uint8_t BITMAP_ScanList2[6] =
const uint8_t BITMAP_ScanList2[7] =
{ // 'II' symbol
0b00000000,
0b01000001,
0b01111111,
0b01000001,
0b01111111,
0b01000001
0b01001101,
0b01010101,
0b01011011,
0b01111111,
0b01111111,
};

const uint8_t BITMAP_compand[6] =
Expand Down
7 changes: 5 additions & 2 deletions bitmaps.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ extern const uint8_t gFontPowerSave[2][6];
extern const uint8_t gFontPttOnePush[2][6];
extern const uint8_t gFontPttClassic[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 gFontScanAll[9];
extern const uint8_t gFontLight[9];
Expand All @@ -28,8 +31,8 @@ extern const uint8_t BITMAP_USB_C[9];
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_ScanList1[6];
extern const uint8_t BITMAP_ScanList2[6];
extern const uint8_t BITMAP_ScanList1[7];
extern const uint8_t BITMAP_ScanList2[7];
extern const uint8_t BITMAP_compand[6];

#ifndef ENABLE_CUSTOM_MENU_LAYOUT
Expand Down
6 changes: 6 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "driver/gpio.h"
#include "driver/system.h"
#include "driver/systick.h"
#include "driver/eeprom.h"
#ifdef ENABLE_UART
#include "driver/uart.h"
#endif
Expand Down Expand Up @@ -117,6 +118,11 @@ void Main(void)
if (BootMode == BOOT_MODE_F_LOCK)
{
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
Expand Down
1 change: 1 addition & 0 deletions radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@ void RADIO_PrepareTX(void)
){
// TX frequency not allowed
State = VFO_STATE_TX_DISABLE;
gVfoConfigureMode = VFO_CONFIGURE;
} else if (SerialConfigInProgress()) {
// TX is disabled or config upload/download in progress
State = VFO_STATE_TX_DISABLE;
Expand Down
3 changes: 2 additions & 1 deletion ui/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,8 @@ void UI_DisplayMain(void)
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) {
if (FUNCTION_IsRx() && gEeprom.RX_VFO == vfo_num && VfoState[vfo_num] == VFO_STATE_NORMAL) {
#ifdef ENABLE_FEAT_F4HWN
RxBlinkLed = 1;
RxBlinkLedCounter = 0;
Expand Down
8 changes: 7 additions & 1 deletion ui/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ static void convertTime(uint8_t *line, uint8_t type)
m = t / 60;
s = t - (m * 60);

gStatusLine[14] = 0x00; // Quick fix on display (on scanning I, II, etc.)

sprintf(str, "%02d:%02d", m, s);
UI_PrintStringSmallBufferNormal(str, line + 0);

Expand Down Expand Up @@ -113,7 +115,8 @@ void UI_DisplayStatus()
}
}
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;
}
Expand Down Expand Up @@ -203,12 +206,15 @@ void UI_DisplayStatus()
memcpy(line + x + 1, gFontKeyLock, sizeof(gFontKeyLock));
}
else if (gWasFKeyPressed) {
memcpy(line + x + 1, gFontF, sizeof(gFontF));
/*
UI_PrintStringSmallBufferNormal("F", line + x + 1);
for (uint8_t i = 71; i < 79; i++)
{
gStatusLine[i] ^= 0x7F;
}
*/
}
else if (gBackLight)
{
Expand Down

0 comments on commit 7dddcf7

Please sign in to comment.