From a118418649b5b982278a8f3cc084a6f3c14acc1a Mon Sep 17 00:00:00 2001 From: Armel FAUVEAU Date: Fri, 14 Feb 2025 16:14:53 +0100 Subject: [PATCH] Fix ctr and compilation options --- compile-with-docker.sh | 18 +++++++++--------- misc.c | 2 +- settings.c | 4 ++++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/compile-with-docker.sh b/compile-with-docker.sh index 865a8f7..2e45070 100755 --- a/compile-with-docker.sh +++ b/compile-with-docker.sh @@ -35,9 +35,9 @@ bandscope() { 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=0 \ - ENABLE_FEAT_F4HWN_PMR=0 \ - ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=0 \ + ENABLE_AIRCOPY=1 \ + ENABLE_FEAT_F4HWN_PMR=1 \ + ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=1 \ ENABLE_NOAA=0 \ ENABLE_FEAT_F4HWN_RESCUE_OPS=0 \ EDITION_STRING=Bandscope \ @@ -51,8 +51,8 @@ broadcast() { ENABLE_SPECTRUM=0 \ ENABLE_FMRADIO=1 \ ENABLE_AIRCOPY=1 \ - ENABLE_FEAT_F4HWN_PMR=0 \ - ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=0 \ + ENABLE_FEAT_F4HWN_PMR=1 \ + ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=1 \ ENABLE_NOAA=0 \ EDITION_STRING=Broadcast \ ENABLE_FEAT_F4HWN_RESCUE_OPS=0 \ @@ -69,8 +69,8 @@ voxless() { ENABLE_AIRCOPY=0 \ ENABLE_AUDIO_BAR=0 \ ENABLE_FEAT_F4HWN_SPECTRUM=0 \ - ENABLE_FEAT_F4HWN_PMR=0 \ - ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=0 \ + ENABLE_FEAT_F4HWN_PMR=1 \ + ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=1 \ ENABLE_NOAA=0 \ ENABLE_FEAT_F4HWN_RESTORE_SCAN=0 \ ENABLE_FEAT_F4HWN_CHARGING_C=0 \ @@ -87,8 +87,8 @@ rescueops() { ENABLE_SPECTRUM=0 \ ENABLE_FMRADIO=0 \ ENABLE_AIRCOPY=1 \ - ENABLE_FEAT_F4HWN_PMR=0 \ - ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=0 \ + ENABLE_FEAT_F4HWN_PMR=1 \ + ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=1 \ ENABLE_NOAA=1 \ ENABLE_FEAT_F4HWN_RESCUE_OPS=1 \ EDITION_STRING=RescueOps \ diff --git a/misc.c b/misc.c index 46cd47d..82243f5 100644 --- a/misc.c +++ b/misc.c @@ -119,7 +119,7 @@ enum BacklightOnRxTx_t gSetting_backlight_on_tx_rx; uint8_t gSetting_set_pwr = 1; bool gSetting_set_ptt = 0; uint8_t gSetting_set_tot = 0; - uint8_t gSetting_set_ctr = 11; + uint8_t gSetting_set_ctr = 10; bool gSetting_set_inv = false; uint8_t gSetting_set_eot = 0; bool gSetting_set_lck = false; diff --git a/settings.c b/settings.c index beb582e..4ea995d 100644 --- a/settings.c +++ b/settings.c @@ -368,8 +368,12 @@ void SETTINGS_InitEEPROM(void) gSetting_set_met = (tmp >> 2) & 0x01; gSetting_set_gui = (tmp >> 3) & 0x01; +#ifdef ENABLE_FEAT_F4HWN_CONTRAST int ctr_value = Data[5] & 0x0F; gSetting_set_ctr = (ctr_value > 0 && ctr_value < 16) ? ctr_value : 10; +#else + gSetting_set_ctr = 10; +#endif gSetting_set_tmr = Data[4] & 0x01; #ifdef ENABLE_FEAT_F4HWN_SLEEP