F Lock change

This commit is contained in:
wu58430 2023-12-01 16:03:09 +08:00
parent 07da68f946
commit f4e3140743
15 changed files with 1575 additions and 1574 deletions

View file

@ -20,51 +20,19 @@
</configurations>
</component>
<component name="ChangeListManager">
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="create">
<change afterPath="$PROJECT_DIR$/chinese.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
<list default="true" id="cea36e80-e289-4d69-9030-7186d540ac0e" name="更改" comment="rebuild chinese">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/CMakeLists.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Dockerfile" beforeDir="false" afterPath="$PROJECT_DIR$/Dockerfile" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Makefile" beforeDir="false" afterPath="$PROJECT_DIR$/Makefile" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/action.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/action.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/app.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/app.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/menu.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/menu.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/board.c" beforeDir="false" afterPath="$PROJECT_DIR$/board.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/cache-v2-e133ac29dbbc8b51f9f8.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-9ba3a415d1d17549d4f8.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-886bf84a88b6efd9f87a.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/index-2023-11-27T04-16-10-0515.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/target-uv_k5_firmware_custom_0_17-Debug-25dfbe50397c72844ddd.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeCache.txt" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeCache.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/Makefile.cmake" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/Makefile.cmake" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/clion-Debug-log.txt" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/clion-Debug-log.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/compiler_depend.internal" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/compiler_depend.make" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/uv_k5_firmware_custom_0_17.dir/compiler_depend.make" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/uv_k5_firmware_custom_0_17.cbp" beforeDir="false" afterPath="$PROJECT_DIR$/cmake-build-debug/uv_k5_firmware_custom_0_17.cbp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/driver/backlight.c" beforeDir="false" afterPath="$PROJECT_DIR$/driver/backlight.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/font.c" beforeDir="false" afterPath="$PROJECT_DIR$/font.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/font.h" beforeDir="false" afterPath="$PROJECT_DIR$/font.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/settings.c" beforeDir="false" afterPath="$PROJECT_DIR$/settings.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/settings.h" beforeDir="false" afterPath="$PROJECT_DIR$/settings.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ui/helper.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/helper.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ui/main.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/main.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ui/menu.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/menu.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ui/menu.h" beforeDir="false" afterPath="$PROJECT_DIR$/ui/menu.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ui/scanner.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/scanner.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ui/welcome.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/welcome.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/chinese_array.txt" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/chinese_array.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/cmake-build-debug/CMakeFiles/uv_k5font.dir/font.cpp.obj" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/cmake-build-debug/CMakeFiles/uv_k5font.dir/font.cpp.obj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/cmake-build-debug/CMakeFiles/uv_k5font.dir/main.cpp.obj" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/cmake-build-debug/CMakeFiles/uv_k5font.dir/main.cpp.obj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/cmake-build-debug/CMakeFiles/uv_k5font.dir/objects.a" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/cmake-build-debug/CMakeFiles/uv_k5font.dir/objects.a" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/cmake-build-debug/Testing/Temporary/LastTest.log" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/cmake-build-debug/Testing/Temporary/LastTest.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/cmake-build-debug/uv_k5font.exe" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/common.c" beforeDir="false" afterPath="$PROJECT_DIR$/app/common.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/debugging.h" beforeDir="false" afterPath="$PROJECT_DIR$/debugging.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/driver/bk4819.c" beforeDir="false" afterPath="$PROJECT_DIR$/driver/bk4819.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/driver/bk4819.h" beforeDir="false" afterPath="$PROJECT_DIR$/driver/bk4819.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/payment/sponsors.md" beforeDir="false" afterPath="$PROJECT_DIR$/payment/sponsors.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ui/status.c" beforeDir="false" afterPath="$PROJECT_DIR$/ui/status.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/ee" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/ee" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/font.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/font.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/font.h" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/font.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/main.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/main.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/name.txt" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/name.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/name_out.txt" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/name_out.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/name_tmp.txt" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/name_tmp.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/uv-k5font/font.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/uv-k5font/font.xlsx" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -79,11 +47,11 @@
<option name="PUSH_AUTO_UPDATE" value="true" />
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="GitHubPullRequestSearchHistory"><![CDATA[{
"lastFilter": {
"state": "OPEN"
<component name="GitHubPullRequestSearchHistory">{
&quot;lastFilter&quot;: {
&quot;state&quot;: &quot;OPEN&quot;
}
}]]></component>
}</component>
<component name="GithubPullRequestsUISettings">
<option name="selectedUrlAndAccountId">
<UrlAndAccount>
@ -108,35 +76,35 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ASKED_ADD_EXTERNAL_FILES": "true",
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.cidr.known.project.marker": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"WebServerToolWindowFactoryState": "false",
"cf.first.check.clang-format": "false",
"cidr.known.project.marker": "true",
"last_opened_file_path": "C:/Users/RUPC/Desktop/UV-K6/uv-k5-firmware-chinese",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"settings.editor.selected.configurable": "File.Encoding",
"vue.rearranger.settings.migration": "true"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;,
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;cf.first.check.clang-format&quot;: &quot;false&quot;,
&quot;cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/RUPC/Desktop/UV-K6/uv-k5-firmware-chinese&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;File.Encoding&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}]]></component>
}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\RUPC\Desktop\UV-K6\uv-k5-firmware-chinese" />
</key>
</component>
<component name="RunManager">
<configuration default="true" type="CLionExternalRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true">
<configuration default="true" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true">
<method v="2">
<option name="CLION.EXTERNAL.BUILD" enabled="true" />
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="未命名" type="ShConfigurationType" nameIsGenerated="true">
@ -170,7 +138,8 @@
<workItem from="1701228164424" duration="12580000" />
<workItem from="1701243774198" duration="3118000" />
<workItem from="1701269777451" duration="21031000" />
<workItem from="1701325367312" duration="14298000" />
<workItem from="1701325367312" duration="22657000" />
<workItem from="1701413653518" duration="3544000" />
</task>
<task id="LOCAL-00001" summary="bug fix">
<created>1701136012311</created>
@ -270,7 +239,14 @@
<option name="project" value="LOCAL" />
<updated>1701326945551</updated>
</task>
<option name="localTasksCounter" value="15" />
<task id="LOCAL-00015" summary="rebuild chinese">
<created>1701353957333</created>
<option name="number" value="00015" />
<option name="presentableId" value="LOCAL-00015" />
<option name="project" value="LOCAL" />
<updated>1701353957333</updated>
</task>
<option name="localTasksCounter" value="16" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -289,6 +265,7 @@
<MESSAGE value="lite create" />
<MESSAGE value="lite aim" />
<MESSAGE value="create" />
<option name="LAST_COMMIT_MESSAGE" value="create" />
<MESSAGE value="rebuild chinese" />
<option name="LAST_COMMIT_MESSAGE" value="rebuild chinese" />
</component>
</project>

View file

@ -1,4 +1,4 @@
FROM archlinux:latest
FROM --platform=amd64 archlinux:latest
RUN pacman -Syyu base-devel --noconfirm
RUN pacman -Syyu arm-none-eabi-gcc --noconfirm
RUN pacman -Syyu arm-none-eabi-newlib --noconfirm

View file

@ -2,11 +2,14 @@
# compile options (see README.md for descriptions)
# 0 = disable
# 1 = enable
#
# ---- COMPILER/LINKER OPTIONS ----
ENABLE_CLANG := 0
ENABLE_SWD := 0
ENABLE_OVERLAY := 0
ENABLE_LTO := 1
# ---- STOCK QUANSHENG FERATURES ----
ENABLE_UART := 1
ENABLE_AIRCOPY := 0
ENABLE_FMRADIO := 1
@ -16,6 +19,9 @@ ENABLE_VOX := 1
ENABLE_ALARM := 0
ENABLE_TX1750 := 0
ENABLE_PWRON_PASSWORD := 0
ENABLE_DTMF_CALLING := 1
# ---- CUSTOM MODS ----
ENABLE_BIG_FREQ := 1
ENABLE_SMALL_BOLD := 1
ENABLE_KEEP_MEM_NAME := 1
@ -39,11 +45,11 @@ ENABLE_REDUCE_LOW_MID_TX_POWER:= 0
ENABLE_BYP_RAW_DEMODULATORS := 0
ENABLE_BLMIN_TMP_OFF := 0
ENABLE_SCAN_RANGES := 1
ENABLE_DTMF_CALLING := 1
#############################################################
TARGET = firmware
GIT_HASH := 111
$(info GIT_HASH = $(GIT_HASH))
ifeq ($(ENABLE_CLANG),1)
# GCC's linker, ld, doesn't understand LLVM's generated bytecode
ENABLE_LTO := 0
@ -60,7 +66,6 @@ BSP_HEADERS := $(patsubst %.def,%.h,$(BSP_HEADERS))
OBJS =
# Startup files
OBJS += start.o
OBJS += init.o
ifeq ($(ENABLE_OVERLAY),1)
@ -161,6 +166,20 @@ else
TOP := $(shell pwd)
endif
ifdef OS # windows
RM = del /Q
FixPath = $(subst /,\,$1)
WHERE = where
NULL_OUTPUT = nul
else # unix
ifeq ($(shell uname), Linux)
RM = rm -f
FixPath = $1
WHERE = which
NULL_OUTPUT = /dev/null
endif
endif
AS = arm-none-eabi-gcc
CC =
@ -180,9 +199,16 @@ endif
OBJCOPY = arm-none-eabi-objcopy
SIZE = arm-none-eabi-size
AUTHOR_STRING := LOSEHU
# the user might not have/want git installed
# can set own version string here (max 7 chars)
#GIT_HASH := cn_all
ifneq (, $(shell $(WHERE) git))
VERSION_STRING := $(shell git describe --tags --exact-match 2>$(NULL_OUTPUT))
ifeq (, $(VERSION_STRING))
VERSION_STRING := $(shell git rev-parse --short HEAD)
endif
endif
#VERSION_STRING := 230930b
ASFLAGS = -c -mcpu=cortex-m0
@ -192,8 +218,7 @@ endif
CFLAGS =
ifeq ($(ENABLE_CLANG),0)
CFLAGS += -Os -Wall -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c11 -MMD
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c11 -MMD
CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c11 -MMD
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=c99 -MMD
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=gnu99 -MMD
#CFLAGS += -Os -Wall -Werror -mcpu=cortex-m0 -fno-builtin -fshort-enums -fno-delete-null-pointer-checks -std=gnu11 -MMD
@ -217,7 +242,7 @@ CFLAGS += -Wextra
#CFLAGS += -Wpedantic
CFLAGS += -DPRINTF_INCLUDE_CONFIG_H
CFLAGS += -DGIT_HASH=\"$(GIT_HASH)\"
CFLAGS += -DAUTHOR_STRING=\"$(AUTHOR_STRING)\" -DVERSION_STRING=\"$(VERSION_STRING)\"
ifeq ($(ENABLE_SPECTRUM),1)
CFLAGS += -DENABLE_SPECTRUM
@ -294,9 +319,6 @@ endif
ifeq ($(ENABLE_AM_FIX_SHOW_DATA),1)
CFLAGS += -DENABLE_AM_FIX_SHOW_DATA
endif
ifeq ($(ENABLE_AM_FIX_TEST1),1)
CFLAGS += -DENABLE_AM_FIX_TEST1
endif
ifeq ($(ENABLE_SQUELCH_MORE_SENSITIVE),1)
CFLAGS += -DENABLE_SQUELCH_MORE_SENSITIVE
endif
@ -336,16 +358,17 @@ endif
ifeq ($(ENABLE_DTMF_CALLING),1)
CFLAGS += -DENABLE_DTMF_CALLING
endif
LDFLAGS =
ifeq ($(ENABLE_CLANG),0)
LDFLAGS += -mcpu=cortex-m0 -nostartfiles -Wl,-T,firmware.ld
LDFLAGS += -mcpu=cortex-m0 -nostartfiles -Wl,-T,firmware.ld
else
# Fix warning about implied executable stack
LDFLAGS += -z noexecstack -mcpu=cortex-m0 -nostartfiles -Wl,-T,firmware.ld
endif
# Use newlib-nano instead of newlib
LDFLAGS += --specs=nano.specs
LDFLAGS += --specs=nano.specs
ifeq ($(ENABLE_LTO),0)
# Throw away unneeded func/data sections like LTO does
@ -367,17 +390,7 @@ LIBS =
DEPS = $(OBJS:.o=.d)
ifdef OS
RM = del /Q
FixPath = $(subst /,\,$1)
WHERE = where
else
ifeq ($(shell uname), Linux)
RM = rm -f
FixPath = $1
WHERE = which
endif
endif
ifneq (, $(shell $(WHERE) python))
MY_PYTHON := python
@ -402,7 +415,7 @@ else ifneq (,$(HAS_CRCMOD))
$(info !!!!!!!! run: pip install crcmod)
$(info )
else
-$(MY_PYTHON) fw-pack.py $<.bin $(GIT_HASH) $<.packed.bin
-$(MY_PYTHON) fw-pack.py $<.bin $(AUTHOR_STRING) $(VERSION_STRING) $<.packed.bin
endif
$(SIZE) $<

View file

@ -507,6 +507,9 @@ void APP_StartListening(FUNCTION_Type_t Function, const bool reset_am_fix)
const uint8_t orig_pga = 6; // -3dB
#ifdef ENABLE_AM_FIX
BK4819_SetAGC(gRxVfo->Modulation != MODULATION_AM || !gSetting_AM_fix);
if (gRxVfo->Modulation == MODULATION_AM && gSetting_AM_fix) { // AM RX mode
if (reset_am_fix)
AM_fix_reset(chan); // TODO: only reset it when moving channel/frequency
@ -1781,11 +1784,18 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
// KEY_MENU has a special treatment here, because we want to pass hold event to ACTION_Handle
// but we don't want it to complain when initial press happens
// we want to react on realese instead
else if (Key != KEY_SIDE1 && Key != KEY_SIDE2 && // pass side buttons
!(Key == KEY_MENU && bKeyHeld)) // pass KEY_MENU held
// KEY_MENU has a special treatment here, because we want to pass hold event to ACTION_Handle
// but we don't want it to complain when initial press happens
// we want to react on realese instead
else if ( // pass side buttons
!(Key == KEY_SIDE1 && !bKeyHeld)) // pass KEY_MENU held
{
if ((!bKeyPressed || bKeyHeld || (Key == KEY_MENU && bKeyPressed)) && // prevent released or held, prevent KEY_MENU pressed
!(Key == KEY_MENU && !bKeyPressed)) // pass KEY_MENU released
// if (!(Key == KEY_SIDE1&&bKeyHeld)&&(!bKeyPressed || (Key == KEY_SIDE1 && bKeyPressed)) && // prevent released or held, prevent KEY_MENU pressed
// !(Key == KEY_SIDE1 && !bKeyPressed)) // pass KEY_MENU released
// return;
if (!(Key == KEY_SIDE1) && !(bKeyPressed != 0))
// if (Key == KEY_SIDE1 == 0 && !bKeyPressed != 0) // pass KEY_MENU released
return;
// keypad is locked, tell the user
@ -1809,6 +1819,11 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
bool bFlag = false;
if (Key == KEY_PTT)
{
// if(gEeprom.KEY_LOCK)
// {
// gKeypadLocked = 4; // 2 seconds
// return;
// }
if (gPttWasPressed)
{
bFlag = bKeyHeld;
@ -1816,6 +1831,9 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{
bFlag = true;
gPttWasPressed = false;
}
}
}

View file

@ -17,6 +17,8 @@ void COMMON_KeypadLockToggle()
#endif
gEeprom.KEY_LOCK = !gEeprom.KEY_LOCK;
//按键锁定禁止发射 取消
// RADIO_SetVfoState(VFO_STATE_NORMAL);
gRequestSaveSettings = true;
}

View file

@ -1,4 +1,4 @@
@echo off
docker build -t uvk5 .
docker run -v %CD%\compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make clean && make && cp firmware* compiled-firmware/"
docker run --rm -v %CD%\compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make clean && make && cp firmware* compiled-firmware/"
pause

View file

@ -1,3 +1,3 @@
#!/bin/sh
docker build -t uvk5 .
docker run -v ${PWD}/compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make && cp firmware* compiled-firmware/"
docker run --rm -v ${PWD}/compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make && cp firmware* compiled-firmware/"

View file

@ -11,7 +11,14 @@ static inline void LogUart(char * str)
UART_Send(str, strlen(str));
}
static inline void LogPrint()
{
uint16_t rssi = BK4819_GetRSSI();
uint16_t reg7e = BK4819_ReadRegister(0x7E);
char buf[32];
sprintf(buf, "reg7E: %d %2d %6d %2d %d rssi: %d\n", (reg7e >> 15), (reg7e >> 12) & 0b111, (reg7e >> 5) & 0b1111111, (reg7e >> 2) & 0b111, (reg7e >> 0) & 0b11, rssi);
LogUart(buf);
}

File diff suppressed because it is too large Load diff

View file

@ -72,8 +72,8 @@ void BK4819_SetRegValue(RegisterSpec s, uint16_t v);
void BK4819_WriteU8(uint8_t Data);
void BK4819_WriteU16(uint16_t Data);
void BK4819_EnableAGC();
void BK4819_DisableAGC();
void BK4819_SetAGC(bool enable);
void BK4819_InitAGC();
void BK4819_ToggleGpioOut(BK4819_GPIO_PIN_t Pin, bool bSet);

View file

@ -20,10 +20,14 @@
|-----------|-------|-------:|------------|
| 忠 | 微信打赏 | ¥20.00 | 2023-11-19 |
| BG6SNG | 支付宝打赏 | ¥10.00 | 2023-11-20 |
| 江璐璐 | 支付宝打赏 | ¥10.00 | 2023-11-21
| 济南黄河业余无线电 | 微信打赏 | ¥25.00 | 2023-11-22
| DE.BG9JAQ | 微信打赏 | ¥9.99 | 2023-11-22
| 姜先生 | 微信打赏 | ¥66.6 | 2023-11-28
| 江璐璐 | 支付宝打赏 | ¥10.00 | 2023-11-21 |
| 济南黄河业余无线电 | 微信打赏 | ¥25.00 | 2023-11-22 |
| DE.BG9JAQ | 微信打赏 | ¥9.99 | 2023-11-22 |
| 姜先生 | 微信打赏 | ¥66.6 | 2023-11-28 |
| Hui-Shao | 支付宝打赏 | ¥10.0 | 2023-11-29|
| BI1OWT | 支付宝打赏 | ¥10.0 | 2023-12-01|
| 蛋 | 微信打赏 | ¥6.66 | 2023-12-01|

View file

@ -154,9 +154,13 @@ void UI_DisplayStatus()
// KEY-LOCK indicator
if (gEeprom.KEY_LOCK)
{
memmove(line + x, BITMAP_KeyLock, sizeof(BITMAP_KeyLock));
x += sizeof(BITMAP_KeyLock);
x1 = x;
//按键锁定禁止发射
// RADIO_SetVfoState(VFO_STATE_TX_DISABLE);
}
else
if (gWasFKeyPressed)

View file

@ -0,0 +1,2 @@
!(A&&B)&&(!C || (A && C)) && !(A && !C)

Binary file not shown.

View file

@ -4,7 +4,7 @@
#ifdef GIT_HASH
#define VER GIT_HASH
#else
#define VER "231004"
#define VER "102"
#endif
#ifndef ONE_OF_ELEVEN_VER