Merge pull request #274 from armel/feature_update_v3

Feature update v3
This commit is contained in:
Armel FAUVEAU
2024-10-12 20:44:09 +02:00
committed by GitHub
19 changed files with 119 additions and 49 deletions

View File

@@ -7,6 +7,4 @@ RUN pacman -Syyu python-pip --noconfirm
RUN pacman -Syyu python-crcmod --noconfirm
WORKDIR /app
COPY . .
RUN git submodule update --init --recursive
#RUN make && cp firmware* compiled-firmware/
RUN git submodule update --init --recursive

View File

@@ -218,7 +218,7 @@ ifeq ($(ENABLE_FEAT_F4HWN),1)
VERSION_STRING_1 ?= v0.22
AUTHOR_STRING_2 ?= F4HWN
VERSION_STRING_2 ?= v3.4
VERSION_STRING_2 ?= v3.5
AUTHOR_STRING ?= $(AUTHOR_STRING_1)+$(AUTHOR_STRING_2)
VERSION_STRING ?= $(VERSION_STRING_2)

View File

@@ -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, Paolo Bussola, Dirk DL8DF, Szőke Levente, Bernard-Michel Herrera, Jérôme Saintespes and Paul Davies 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, Tom McGovern, Joseph Roth, Pierre-Yves Colin, Frank DJ7FG, Marcel Testaz, Brian Frobisher, Yannick F4JFO, Paolo Bussola, Dirk DL8DF, Levente Szőke (2 times), Bernard-Michel Herrera, Jérôme Saintespes, Paul Davies, RS and Johan F4WAT for their [donations](https://www.paypal.com/paypalme/F4HWN). Thats so kind of them. Thanks so much 🙏🏻
## Table of Contents

View File

@@ -401,6 +401,20 @@ Skip:
}
*/
if(gEeprom.SCAN_RESUME_MODE < 81)
{
if(gEeprom.SCAN_RESUME_MODE == 0)
{
CHFRSCANNER_Stop();
}
else
{
gScanPauseDelayIn_10ms = gEeprom.SCAN_RESUME_MODE * (250 / 10); // 250ms
gScheduleScanListen = false;
}
}
/*
if(gEeprom.SCAN_RESUME_MODE < 2)
{
gScanPauseDelayIn_10ms = scan_pause_delay_in_6_10ms + (scan_pause_delay_in_6_10ms * 24 * gEeprom.SCAN_RESUME_MODE);
@@ -411,6 +425,7 @@ Skip:
{
CHFRSCANNER_Stop();
}
*/
/*
switch (gEeprom.SCAN_RESUME_MODE)
@@ -1583,13 +1598,18 @@ void APP_TimeSlice500ms(void)
#ifdef ENABLE_FEAT_F4HWN_SLEEP
if (gSleepModeCountdown_500ms == gSetting_set_off * 120 && gWakeUp) {
ST7565_Init();
//ST7565_Init();
ST7565_FixInterfGlitch();
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, false);
gPowerSave_10ms = gEeprom.BATTERY_SAVE * 10;
gWakeUp = false;
}
#ifdef ENABLE_AIRCOPY
if(gCurrentFunction != FUNCTION_TRANSMIT && !FUNCTION_IsRx() && gScreenToDisplay != DISPLAY_AIRCOPY)
#else
if(gCurrentFunction != FUNCTION_TRANSMIT && !FUNCTION_IsRx())
#endif
{
if (gSleepModeCountdown_500ms > 0 && --gSleepModeCountdown_500ms == 0) {
gBacklightCountdown_500ms = 0;
@@ -1598,15 +1618,15 @@ void APP_TimeSlice500ms(void)
PWM_PLUS0_CH0_COMP = 0;
ST7565_ShutDown();
}
else if(gSleepModeCountdown_500ms < 60 && gSetting_set_off != 0)
else if(gSleepModeCountdown_500ms != 0 && gSleepModeCountdown_500ms < 61 && gSetting_set_off != 0)
{
if(gSleepModeCountdown_500ms % 2 == 0)
if(gSleepModeCountdown_500ms % 4 == 0)
{
PWM_PLUS0_CH0_COMP = 0;
PWM_PLUS0_CH0_COMP = value[gEeprom.BACKLIGHT_MAX] * 4; // Max brightness
}
else
{
PWM_PLUS0_CH0_COMP = value[gEeprom.BACKLIGHT_MAX] * 4; // Max brightness
PWM_PLUS0_CH0_COMP = 0;
}
}
}
@@ -1616,9 +1636,9 @@ void APP_TimeSlice500ms(void)
}
if (gWakeUp) {
static bool swap = true;
swap = !swap; // Alterne l'état à chaque exécution
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, swap);
static uint8_t counter = 0;
counter = (counter + 1) % 4;
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, (counter == 0));
}
#endif
@@ -1818,7 +1838,7 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
gBatterySaveCountdown_10ms = battery_save_count_10ms;
if (gEeprom.AUTO_KEYPAD_LOCK)
gKeyLockCountdown = 30; // 15 seconds
gKeyLockCountdown = gEeprom.AUTO_KEYPAD_LOCK * 30; // 15 seconds step
if (!bKeyPressed) { // key released
if (flagSaveVfo) {

View File

@@ -102,9 +102,9 @@ void CHFRSCANNER_ContinueScanning(void)
void CHFRSCANNER_Found(void)
{
if (gEeprom.SCAN_RESUME_MODE > 2) {
if (gEeprom.SCAN_RESUME_MODE > 80) {
if (!gScanPauseMode) {
gScanPauseDelayIn_10ms = scan_pause_delay_in_5_10ms * (gEeprom.SCAN_RESUME_MODE - 2) * 5;
gScanPauseDelayIn_10ms = scan_pause_delay_in_5_10ms * (gEeprom.SCAN_RESUME_MODE - 80) * 5;
gScanPauseMode = true;
}
} else {

View File

@@ -210,9 +210,9 @@ static void processFKeyFunction(const KEY_Code_t Key, const bool beep)
gEeprom.ScreenChannel[Vfo] = gEeprom.NoaaChannel[gEeprom.TX_VFO];
}
else {
gEeprom.ScreenChannel[Vfo] = gEeprom.FreqChannel[gEeprom.TX_VFO];
gEeprom.ScreenChannel[Vfo] = gEeprom.MrChannel[gEeprom.TX_VFO];
#ifdef ENABLE_VOICE
gAnotherVoiceID = VOICE_ID_FREQUENCY_MODE;
gAnotherVoiceID = VOICE_ID_CHANNEL_MODE;
#endif
}
gRequestSaveVFO = true;

View File

@@ -176,7 +176,7 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
case MENU_SC_REV:
//*pMin = 0;
*pMax = 26;
*pMax = 104;
break;
case MENU_ROGER:
@@ -235,7 +235,6 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
#endif
case MENU_BCL:
case MENU_BEEP:
case MENU_AUTOLK:
case MENU_S_ADD1:
case MENU_S_ADD2:
case MENU_S_ADD3:
@@ -275,6 +274,10 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
break;
#endif
case MENU_AUTOLK:
*pMax = 40;
break;
case MENU_TOT:
//*pMin = 0;
*pMin = 5;
@@ -634,7 +637,7 @@ void MENU_AcceptSetting(void)
case MENU_AUTOLK:
gEeprom.AUTO_KEYPAD_LOCK = gSubMenuSelection;
gKeyLockCountdown = 30;
gKeyLockCountdown = gEeprom.AUTO_KEYPAD_LOCK * 30; // 15 seconds step
break;
case MENU_S_ADD1:

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -298,6 +298,23 @@ const uint8_t BITMAP_PowerUser[3] =
0b00001000,
};
#ifdef ENABLE_NOAA
const uint8_t BITMAP_NOAA[12] =
{ // "WX"
0b00000000,
0b01111111,
0b00100000,
0b00011000,
0b00100000,
0b01111111,
0b00000000,
0b01100011,
0b00010100,
0b00001000,
0b00010100,
0b01100011
};
#endif
#ifndef ENABLE_CUSTOM_MENU_LAYOUT
const uint8_t BITMAP_CurrentIndicator[8] = {

View File

@@ -41,6 +41,8 @@ extern const uint8_t BITMAP_ScanListE[7];
extern const uint8_t BITMAP_PowerUser[3];
extern const uint8_t BITMAP_compand[6];
extern const uint8_t BITMAP_NOAA[12];
#ifndef ENABLE_CUSTOM_MENU_LAYOUT
extern const uint8_t BITMAP_CurrentIndicator[8];
#endif

30
compile-with-docker-all.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
#export DOCKER_DEFAULT_PLATFORM=linux/amd64
IMAGE_NAME="uvk5"
rm "${PWD}/compiled-firmware/*"
docker build -t $IMAGE_NAME .
docker run --rm -v "${PWD}/compiled-firmware/:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "rm ./compiled-firmware/*; cd /app && make -s \
ENABLE_SPECTRUM=1 \
ENABLE_FMRADIO=0 \
ENABLE_AIRCOPY=1 \
ENABLE_NOAA=0 \
TARGET=f4hwn.bandscope \
&& cp f4hwn.bandscope* compiled-firmware/"
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make -s \
ENABLE_SPECTRUM=0 \
ENABLE_FMRADIO=1 \
ENABLE_AIRCOPY=1 \
ENABLE_NOAA=0 \
TARGET=f4hwn.broadcast \
&& cp f4hwn.broadcast* compiled-firmware/"
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 \
ENABLE_VOX=0 \
ENABLE_AIRCOPY=0 \
ENABLE_AUDIO_BAR=0 \
ENABLE_FEAT_F4HWN_SPECTRUM=0 \
ENABLE_FEAT_F4HWN_SLEEP=0 \
ENABLE_NOAA=0 \
TARGET=f4hwn.voxless \
&& cp f4hwn.voxless* compiled-firmware/"

View File

@@ -1,6 +1,5 @@
#!/bin/sh
#export DOCKER_DEFAULT_PLATFORM=linux/amd64
IMAGE_NAME="uvk5"
docker build -t $IMAGE_NAME .
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make && cp f4hwn* compiled-firmware/"
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "rm ./compiled-firmware/*; cd /app && make && cp f4hwn* compiled-firmware/"

View File

@@ -79,7 +79,7 @@ void FUNCTION_Init(void)
gNOAACountdown_10ms = 0;
if (IS_NOAA_CHANNEL(gRxVfo->CHANNEL_SAVE)) {
gCurrentCodeType = CODE_TYPE_CONTINUOUS_TONE;
gCurrentCodeType = CODE_TYPE_OFF;
}
#endif

View File

@@ -119,8 +119,8 @@ void SETTINGS_InitEEPROM(void)
gEeprom.KEY_1_LONG_PRESS_ACTION = (Data[2] < ACTION_OPT_LEN) ? Data[2] : ACTION_OPT_NONE;
gEeprom.KEY_2_SHORT_PRESS_ACTION = (Data[3] < ACTION_OPT_LEN) ? Data[3] : ACTION_OPT_SCAN;
gEeprom.KEY_2_LONG_PRESS_ACTION = (Data[4] < ACTION_OPT_LEN) ? Data[4] : ACTION_OPT_NONE;
gEeprom.SCAN_RESUME_MODE = (Data[5] < 27) ? Data[5] : 1;
gEeprom.AUTO_KEYPAD_LOCK = (Data[6] < 2) ? Data[6] : false;
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
@@ -350,8 +350,8 @@ void SETTINGS_InitEEPROM(void)
gSetting_set_ctr = (ctr_value > 0 && ctr_value < 16) ? ctr_value : 10;
gSetting_set_tmr = Data[4] & 0x01;
#ifdef ENABLE_FEAT_F4HWN_SLEEP
gSetting_set_off = Data[4] >> 1;
#ifdef ENABLE_FEAT_F4HWN_SLEEP
gSetting_set_off = (Data[4] >> 1) > 120 ? 60 : (Data[4] >> 1);
#endif
// Warning
@@ -727,7 +727,9 @@ void SETTINGS_SaveSettings(void)
EEPROM_WriteBuffer(0x0F40, State);
#ifdef ENABLE_FEAT_F4HWN
memset(State, 0xFF, sizeof(State));
EEPROM_ReadBuffer(0x1FF0, State, sizeof(State));
//memset(State, 0xFF, sizeof(State));
/*
tmp = 0;
@@ -904,13 +906,13 @@ void SETTINGS_UpdateChannel(uint8_t channel, const VFO_Info_t *pVFO, bool keep,
void SETTINGS_WriteBuildOptions(void)
{
uint8_t buf[8] = {0};
uint8_t State[8];
#ifdef ENABLE_FEAT_F4HWN
EEPROM_ReadBuffer(0x1FF0, buf, 8);
EEPROM_ReadBuffer(0x1FF0, State, sizeof(State));
#endif
buf[0] = 0
State[0] = 0
#ifdef ENABLE_FMRADIO
| (1 << 0)
#endif
@@ -937,7 +939,7 @@ buf[0] = 0
#endif
;
buf[1] = 0
State[1] = 0
#ifdef ENABLE_FLASHLIGHT
| (1 << 0)
#endif
@@ -957,5 +959,5 @@ buf[1] = 0
| (1 << 5)
#endif
;
EEPROM_WriteBuffer(0x1FF0, buf);
EEPROM_WriteBuffer(0x1FF0, State);
}

View File

@@ -211,7 +211,7 @@ typedef struct {
uint8_t field37_0x32;
uint8_t field38_0x33;
bool AUTO_KEYPAD_LOCK;
uint8_t AUTO_KEYPAD_LOCK;
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
ALARM_Mode_t ALARM_MODE;
#endif

View File

@@ -232,13 +232,6 @@ const char* const gSubMenu_RXMode[] =
};
#endif
const char gSubMenu_SC_REV[][13] =
{
"CARRIER\nFAST",
"CARRIER\nSLOW",
"STOP"
};
const char* const gSubMenu_MDF[] =
{
"FREQ",
@@ -712,7 +705,10 @@ void UI_DisplayMenu(void)
break;
case MENU_AUTOLK:
strcpy(String, (gSubMenuSelection == 0) ? "OFF" : "AUTO");
if (gSubMenuSelection == 0)
strcpy(String, "OFF");
else
sprintf(String, "%02dm:%02ds", ((gSubMenuSelection * 15) / 60), ((gSubMenuSelection * 15) % 60));
break;
case MENU_COMPAND:
@@ -835,13 +831,17 @@ void UI_DisplayMenu(void)
#endif
case MENU_SC_REV:
if(gSubMenuSelection < 3)
if(gSubMenuSelection == 0)
{
strcpy(String, gSubMenu_SC_REV[gSubMenuSelection]);
strcpy(String, "STOP");
}
else if(gSubMenuSelection < 81)
{
sprintf(String, "CARRIER\n%02ds:%03dms", ((gSubMenuSelection * 250) / 1000), ((gSubMenuSelection * 250) % 1000));
}
else
{
sprintf(String, "TIMEOUT\n%02dm:%02ds", (((gSubMenuSelection - 2) * 5) / 60), (((gSubMenuSelection - 2) * 5) % 60));
sprintf(String, "TIMEOUT\n%02dm:%02ds", (((gSubMenuSelection - 80) * 5) / 60), (((gSubMenuSelection - 80) * 5) % 60));
}
break;
@@ -995,7 +995,7 @@ void UI_DisplayMenu(void)
}
else if(gSubMenuSelection < 121)
{
sprintf(String, "%02dh:%02dm", (gSubMenuSelection / 60), (gSubMenuSelection % 60));
sprintf(String, "%dh:%02dm", (gSubMenuSelection / 60), (gSubMenuSelection % 60));
}
break;
#endif

View File

@@ -165,7 +165,6 @@ extern const char* const gSubMenu_RXMode[4];
#ifdef ENABLE_VOICE
extern const char gSubMenu_VOICE[3][4];
#endif
extern const char gSubMenu_SC_REV[3][13];
extern const char* const gSubMenu_MDF[4];
#ifdef ENABLE_ALARM
extern const char gSubMenu_AL_MOD[2][5];