mirror of
https://github.com/armel/uv-k1-k5v3-firmware-custom.git
synced 2026-10-04 12:07:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4eea0c7910 | ||
|
|
cd7fcdbf54 | ||
|
|
3df48febf0 | ||
|
|
7f6594ffb2 | ||
|
|
3f3dab7833 | ||
|
|
7dbabfe60f | ||
|
|
c10ed40a4a | ||
|
|
0f7b600516 | ||
|
|
7189d09d73 | ||
|
|
164a72738a | ||
|
|
9ab8040e4b | ||
|
|
d3b985c5ad | ||
|
|
6ba761db1a | ||
|
|
f4826ed46c | ||
|
|
4c41ff7929 | ||
|
|
91e2f61099 | ||
|
|
011009b294 | ||
|
|
1865651a5a | ||
|
|
889de45b18 |
No files matched your search
+1
-1
@@ -208,7 +208,7 @@ static void HandleIncoming(void)
|
||||
gFoundCTCSS = false;
|
||||
}
|
||||
|
||||
if (g_CDCSS_Lost && gCDCSSCodeType == CDCSS_NEGATIVE_CODE
|
||||
if (g_CDCSS_Lost && gCDCSSCodeType == CDCSS_POSITIVE_CODE
|
||||
&& (gCurrentCodeType == CODE_TYPE_DIGITAL || gCurrentCodeType == CODE_TYPE_REVERSE_DIGITAL))
|
||||
{
|
||||
gFoundCDCSS = false;
|
||||
|
||||
@@ -32,10 +32,6 @@
|
||||
#include "ui/inputbox.h"
|
||||
#include "ui/ui.h"
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
|
||||
#endif
|
||||
|
||||
uint16_t gFM_Channels[FM_CHANNELS_MAX];
|
||||
bool gFmRadioMode;
|
||||
uint8_t gFmRadioCountdown_500ms;
|
||||
|
||||
@@ -404,6 +404,7 @@ void channelMoveSwitch(void) {
|
||||
}
|
||||
|
||||
channelMove(Channel - 1);
|
||||
SETTINGS_SaveVfoIndices();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,9 +42,6 @@
|
||||
#include "ui/menu.h"
|
||||
#include "ui/ui.h"
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
|
||||
#endif
|
||||
|
||||
uint8_t gUnlockAllTxConfCnt;
|
||||
|
||||
|
||||
@@ -15,10 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "dcs.h"
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
|
||||
#endif
|
||||
#include "misc.h"
|
||||
|
||||
// CTCSS Hz * 10
|
||||
const uint16_t CTCSS_Options[50] = {
|
||||
|
||||
@@ -20,10 +20,6 @@
|
||||
#include "driver/system.h"
|
||||
#include "misc.h"
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
||||
#endif
|
||||
|
||||
static const uint16_t BK1080_RegisterTable[] =
|
||||
{
|
||||
0x0008, 0x1080, 0x0201, 0x0000, 0x40C0, 0x0A1F, 0x002E, 0x02FF,
|
||||
|
||||
@@ -163,7 +163,7 @@ typedef enum BK4819_GPIO_PIN_t BK4819_GPIO_PIN_t;
|
||||
#define BK4819_REG_02_SHIFT_SQUELCH_LOST 2
|
||||
#define BK4819_REG_02_SHIFT_FSK_RX_SYNC 1
|
||||
|
||||
#define BK4819_REG_02_MASK_FSK_TX_FINISHED (1U << BK4819_REG_02_SHIFT_FSK_TX)
|
||||
#define BK4819_REG_02_MASK_FSK_TX_FINISHED (1U << BK4819_REG_02_SHIFT_FSK_TX_FINISHED)
|
||||
#define BK4819_REG_02_MASK_FSK_FIFO_ALMOST_EMPTY (1U << BK4819_REG_02_SHIFT_FSK_FIFO_ALMOST_EMPTY)
|
||||
#define BK4819_REG_02_MASK_FSK_RX_FINISHED (1U << BK4819_REG_02_SHIFT_FSK_RX_FINISHED)
|
||||
#define BK4819_REG_02_MASK_FSK_FIFO_ALMOST_FULL (1U << BK4819_REG_02_SHIFT_FSK_FIFO_ALMOST_FULL)
|
||||
|
||||
+1
-4
@@ -19,6 +19,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "settings.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include "audio.h"
|
||||
|
||||
@@ -28,10 +29,6 @@
|
||||
#include "driver/systick.h"
|
||||
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
|
||||
#endif
|
||||
|
||||
#define PIN_CSN GPIO_MAKE_PIN(GPIOF, LL_GPIO_PIN_9)
|
||||
#define PIN_SCL GPIO_MAKE_PIN(GPIOB, LL_GPIO_PIN_8)
|
||||
#define PIN_SDA GPIO_MAKE_PIN(GPIOB, LL_GPIO_PIN_9)
|
||||
|
||||
+1
-5
@@ -19,6 +19,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "settings.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include "audio.h"
|
||||
|
||||
@@ -27,11 +28,6 @@
|
||||
#include "driver/system.h"
|
||||
#include "driver/systick.h"
|
||||
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
|
||||
#endif
|
||||
|
||||
#define PIN_CSN GPIO_MAKE_PIN(GPIOF, LL_GPIO_PIN_9)
|
||||
#define PIN_SCL GPIO_MAKE_PIN(GPIOB, LL_GPIO_PIN_8)
|
||||
#define PIN_SDA GPIO_MAKE_PIN(GPIOB, LL_GPIO_PIN_9)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
static uint32_t SectorCacheAddr = 0x1000000;
|
||||
static uint8_t SectorCache[SECTOR_SIZE];
|
||||
static uint8_t BlackHole[1];
|
||||
static uint8_t BlackHole[4] __attribute__((aligned(4)));
|
||||
static volatile bool TC_Flag;
|
||||
|
||||
static inline void CS_Assert()
|
||||
|
||||
+1
-1
@@ -138,7 +138,7 @@ bool RADIO_CheckValidChannel(uint16_t channel, bool checkScanList, uint8_t scanL
|
||||
return false;
|
||||
if (att->band > BAND7_470MHz)
|
||||
return false;
|
||||
if (!checkScanList || (scanList > MR_CHANNELS_LIST && att->scanlist != 0))
|
||||
if (!checkScanList || (scanList > MR_CHANNELS_LIST && att->scanlist != 0) || (scanList > 0 && att->scanlist == MR_CHANNELS_LIST + 1))
|
||||
return true;
|
||||
if ((scanList == 0) || (scanList != att->scanlist)) {
|
||||
return false;
|
||||
|
||||
+11
-1
@@ -558,6 +558,13 @@ void SETTINGS_FactoryReset(bool bIsAll)
|
||||
|
||||
Data8[4] &= (uint8_t)~0x01;
|
||||
Data8[4] &= (uint8_t)~0x02;
|
||||
|
||||
// SET_KEY to 0
|
||||
Data8[4] &= (uint8_t)~0x3C; // Clear bits 2-5 (SET_KEY)
|
||||
|
||||
// SET_NAV to false
|
||||
Data8[4] &= (uint8_t)~0x40; // Clear bit 6 (SET_NAV) for UV-K1 by default
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESET_VFO
|
||||
Data8[7] = (1 & 0x01);
|
||||
#endif
|
||||
@@ -580,9 +587,12 @@ void SETTINGS_FactoryReset(bool bIsAll)
|
||||
gEeprom.FreqChannel[0] = FREQ_CHANNEL_FIRST + BAND3_137MHz;
|
||||
gEeprom.FreqChannel[1] = FREQ_CHANNEL_FIRST + BAND6_400MHz;
|
||||
|
||||
SETTINGS_SaveVfoIndices();
|
||||
SETTINGS_SaveChannel(FREQ_CHANNEL_FIRST + BAND3_137MHz, 0, &gEeprom.VfoInfo[0], 2);
|
||||
SETTINGS_SaveChannel(FREQ_CHANNEL_FIRST + BAND6_400MHz, 1, &gEeprom.VfoInfo[1], 2);
|
||||
|
||||
gVfoStateChanged = true;
|
||||
gScheduleVfoSave = true;
|
||||
SETTINGS_SaveVfoIndicesFlush();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -118,9 +118,7 @@ enum ACTION_OPT_t {
|
||||
ACTION_OPT_WN,
|
||||
ACTION_OPT_BACKLIGHT,
|
||||
ACTION_OPT_MUTE,
|
||||
#ifdef ENABLE_FEAT_F4HWN_AUDIO
|
||||
ACTION_OPT_RXA,
|
||||
#endif
|
||||
ACTION_OPT_RXA,
|
||||
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
|
||||
ACTION_OPT_POWER_HIGH,
|
||||
ACTION_OPT_REMOVE_OFFSET,
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
#include "ui/inputbox.h"
|
||||
#include "misc.h"
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof((arr)[0]))
|
||||
#endif
|
||||
|
||||
void UI_GenerateChannelString(char *pString, const uint16_t Channel)
|
||||
{
|
||||
|
||||
+5
-1
@@ -790,7 +790,11 @@ void UI_DisplayMain(void)
|
||||
if(gRxVfo->Modulation == MODULATION_AM)
|
||||
GUI_DisplaySmallest("AIR", 10, RxLine == 0 ? 1 : 33, false, true);
|
||||
else {
|
||||
strcpy(String, gSubMenu_SET_AUD[gSetting_set_audio]);
|
||||
#ifdef ENABLE_FEAT_F4HWN_AUDIO
|
||||
strcpy(String, gSubMenu_SET_AUD[gSetting_set_audio]);
|
||||
#else
|
||||
strcpy(String, "RX");
|
||||
#endif
|
||||
GUI_DisplaySmallest(String, 10, RxLine == 0 ? 1 : 33, false, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,10 @@ target_link_libraries(${EXE_NAME} Core App)
|
||||
target_compile_definitions(${EXE_NAME} PRIVATE $<$<CONFIG:Debug>:DEBUG>)
|
||||
target_link_libraries(${EXE_NAME} ${TOOLCHAIN_LINK_LIBRARIES})
|
||||
|
||||
if(ENABLE_LTO)
|
||||
target_compile_options(${EXE_NAME} PRIVATE -flto=auto)
|
||||
endif()
|
||||
|
||||
# Generate map file
|
||||
target_link_options(${EXE_NAME} PRIVATE "-Wl,-Map=${EXE_NAME}.map")
|
||||
|
||||
|
||||
+2
-1
@@ -9,6 +9,7 @@
|
||||
"toolchainFile": "${sourceDir}/cmake/gcc-arm-none-eabi.cmake",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"ENABLE_LTO": false,
|
||||
"ENABLE_FMRADIO": false,
|
||||
"ENABLE_UART": true,
|
||||
"ENABLE_USB": true,
|
||||
@@ -68,7 +69,7 @@
|
||||
"ENABLE_UART_RW_BK_REGS": false,
|
||||
"ENABLE_SWD": false,
|
||||
"VERSION_STRING_1": "v0.22",
|
||||
"VERSION_STRING_2": "v5.0.1"
|
||||
"VERSION_STRING_2": "v5.0.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
+2
-1
@@ -3,7 +3,8 @@ FROM mcr.microsoft.com/devcontainers/python:3.10-bookworm
|
||||
# ---------------------------------------------
|
||||
# Base build tools
|
||||
# ---------------------------------------------
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
RUN rm -f /etc/apt/sources.list.d/yarn.list && \
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential cmake ninja-build python3 curl xz-utils ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
+2
-1
@@ -3,7 +3,8 @@ FROM mcr.microsoft.com/devcontainers/python:3.10-bookworm
|
||||
# ---------------------------------------------
|
||||
# Base build tools
|
||||
# ---------------------------------------------
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
RUN rm -f /etc/apt/sources.list.d/yarn.list && \
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential cmake ninja-build python3 curl xz-utils ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Anyway, have fun.
|
||||
|
||||
# Donations
|
||||
|
||||
Special thanks to Jean-Cyrille F6IWW (3 times), Fabrice 14RC123, David F4BPP, Olivier 14RC206, Frédéric F4ESO, Stéphane F5LGW (2 times), Jorge Ornelas (4 times), Laurent F4AXK, Christophe Morel, Clayton W0LED, Pierre Antoine F6FWB, Jean-Claude 14FRS3306, Thierry F4GVO, Eric F1NOU, PricelessToolkit, Ady M6NYJ, Tom McGovern (4 times), 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 (3 times), Johan F4WAT, Robert Wörle, Rafael Sundorf, Paul Harker, Peter Fintl, Pascal F4ICR (2 times), Mike DL2MF (3 times), Eric KI1C (2 times), Phil G0ELM, Jérôme Lambert, Eliot Vedel, Alfonso EA7KDF, Jean-François F1EVM, Robert DC1RDB (2 times), Ian KE2CHJ, Daryl VK3AWA, Roberto Brunelli, Robert Boardman, Stephen Oliver, Nicolas F4INE, William Bruno, Daniel OK2VLK, Tayler Chew, Peter DL7RFP, Philippe Kopp, Rune LA6YMA, Jeremy Luna and Steef Wagenaar for their [donations](https://www.paypal.com/paypalme/F4HWN). That’s so kind of them. Thanks so much 🙏🏻
|
||||
Special thanks to Jean-Cyrille F6IWW (3 times), Fabrice 14RC123, David F4BPP, Olivier 14RC206, Frédéric F4ESO, Stéphane F5LGW (2 times), Jorge Ornelas (4 times), Laurent F4AXK, Christophe Morel, Clayton W0LED, Pierre Antoine F6FWB, Jean-Claude 14FRS3306, Thierry F4GVO, Eric F1NOU, PricelessToolkit, Ady M6NYJ, Tom McGovern (4 times), 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 (3 times), Johan F4WAT, Robert Wörle, Rafael Sundorf, Paul Harker, Peter Fintl, Pascal F4ICR (2 times), Mike DL2MF (3 times), Eric KI1C (2 times), Phil G0ELM, Jérôme Lambert, Eliot Vedel, Alfonso EA7KDF, Jean-François F1EVM, Robert DC1RDB (2 times), Ian KE2CHJ, Daryl VK3AWA, Roberto Brunelli, Robert Boardman, Stephen Oliver, Nicolas F4INE, William Bruno, Daniel OK2VLK, Tayler Chew, Peter DL7RFP, Philippe Kopp, Rune LA6YMA, Jeremy Luna, Steef Wagenaar and Zhuo BG7SGA for their [donations](https://www.paypal.com/paypalme/F4HWN). That’s so kind of them. Thanks so much 🙏🏻
|
||||
|
||||
## Table of Contents
|
||||
|
||||
|
||||
Executable
BIN
Binary file not shown.
@@ -31,13 +31,16 @@ fi
|
||||
# ---------------------------------------------
|
||||
# Build the Docker image (only needed once)
|
||||
# ---------------------------------------------
|
||||
docker build -t "$IMAGE" .
|
||||
if [[ "$(docker images -q $IMAGE)" == "" ]]; then
|
||||
echo "Building Docker image..."
|
||||
docker build -t "$IMAGE" .
|
||||
fi
|
||||
|
||||
# ---------------------------------------------
|
||||
# Clean existing CMake cache to ensure toolchain reload
|
||||
# ---------------------------------------------
|
||||
rm -rf build
|
||||
|
||||
export MSYS_NO_PATHCONV=1
|
||||
# ---------------------------------------------
|
||||
# Function to build one preset
|
||||
# ---------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user