From f31e8c319e3997038351d6f1c23d261ea94ccf18 Mon Sep 17 00:00:00 2001 From: Armel FAUVEAU Date: Sat, 9 Mar 2024 02:21:50 +0100 Subject: [PATCH] Fix display bug on ScanRange --- Makefile | 8 ++++++-- compile-with-docker.sh | 2 +- ui/main.c | 34 +++++++++++++++++++++------------- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 7e81b13..33b5515 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,11 @@ ENABLE_LTO ?= 1 ############################################################# -TARGET = firmware +ifeq ($(ENABLE_FEAT_F4HWN),1) + TARGET = f4hwn +else + TARGET = firmware +endif ifeq ($(ENABLE_CLANG),1) # GCC's linker, ld, doesn't understand LLVM's generated bytecode @@ -206,7 +210,7 @@ ifeq ($(ENABLE_FEAT_F4HWN),1) VERSION_STRING_1 ?= v0.22 AUTHOR_STRING_2 ?= F4HWN - VERSION_STRING_2 ?= v2.2 + VERSION_STRING_2 ?= v2.3 AUTHOR_STRING ?= $(AUTHOR_STRING_1)+$(AUTHOR_STRING_2) VERSION_STRING ?= $(VERSION_STRING_2) diff --git a/compile-with-docker.sh b/compile-with-docker.sh index a51ddf8..f78f5ff 100755 --- a/compile-with-docker.sh +++ b/compile-with-docker.sh @@ -3,4 +3,4 @@ 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 firmware* compiled-firmware/" \ No newline at end of file +docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make && cp f4hwn* compiled-firmware/" \ No newline at end of file diff --git a/ui/main.c b/ui/main.c index 84124df..38393d5 100644 --- a/ui/main.c +++ b/ui/main.c @@ -646,21 +646,29 @@ void UI_DisplayMain(void) if(gScanRangeStart) { #ifdef ENABLE_FEAT_F4HWN - uint8_t shift = 0; + //if(IS_FREQ_CHANNEL(gEeprom.ScreenChannel[0]) && IS_FREQ_CHANNEL(gEeprom.ScreenChannel[1])) { + if(IS_FREQ_CHANNEL(gEeprom.ScreenChannel[activeTxVFO])) { - if (isMainOnly(false)) - { - shift = 3; + uint8_t shift = 0; + + if (isMainOnly(false)) + { + shift = 3; + } + + UI_PrintString("ScnRng", 5, 0, line + shift, 8); + sprintf(String, "%3u.%05u", gScanRangeStart / 100000, gScanRangeStart % 100000); + UI_PrintStringSmallNormal(String, 56, 0, line + shift); + sprintf(String, "%3u.%05u", gScanRangeStop / 100000, gScanRangeStop % 100000); + UI_PrintStringSmallNormal(String, 56, 0, line + shift + 1); + + if (!isMainOnly(false)) + continue; + } + else + { + gScanRangeStart = 0; } - - UI_PrintString("ScnRng", 5, 0, line + shift, 8); - sprintf(String, "%3u.%05u", gScanRangeStart / 100000, gScanRangeStart % 100000); - UI_PrintStringSmallNormal(String, 56, 0, line + shift); - sprintf(String, "%3u.%05u", gScanRangeStop / 100000, gScanRangeStop % 100000); - UI_PrintStringSmallNormal(String, 56, 0, line + shift + 1); - - if (!isMainOnly(false)) - continue; #else UI_PrintString("ScnRng", 5, 0, line, 8); sprintf(String, "%3u.%05u", gScanRangeStart / 100000, gScanRangeStart % 100000);