Add LOGO option to POnMsg menu

This commit is contained in:
Armel FAUVEAU committed 2026-05-07 15:32:07 +02:00
1 parent 7d69b74b08
commit 1ed550fb92
8 files changed
+49 -3

No files matched your search

+1
View File
@@ -214,6 +214,7 @@ if(ENABLE_FEAT_F4HWN_BEAM AND NOT ENABLE_AIRCOPY)
message(FATAL_ERROR "ENABLE_FEAT_F4HWN_BEAM requires ENABLE_AIRCOPY (it reuses g_FSK_Buffer, AIRCOPY_Obfuscate and the FSK packet plumbing).")
endif()
enable_feature(ENABLE_FEAT_F4HWN_QRCODE)
enable_feature(ENABLE_FEAT_F4HWN_LOGO)
# ---- DEBUGGING ----
+5
View File
@@ -67,6 +67,11 @@ static const AddrMapping_t ADDR_MAPPINGS[] = {
// Settings Version * 16 Bytes 0x00A160 -> 0x00A170
_MK_MAPPING(0x010000, 0x00B000, 0x00B200), // Calibration 512 Bytes!!!
_MK_MAPPING(0x011000, 0x00C000, 0x00D000), // Boot Logo sector (4 KB):
// [0x00..0x07] 8-byte header (reserved)
// [0x08..0x407] 128x64 monochrome bitmap, 1024 Bytes
// ST7565-native: 8 pages * 128 columns, column-major LSB-top
};
static void AddrTranslate(uint16_t EEPROM_Addr, uint16_t Size, uint32_t *PY25Q16_Addr_out, uint16_t *Size_out, bool *End_out);
+4 -1
View File
@@ -34,7 +34,10 @@ enum POWER_OnDisplayMode_t {
#endif
POWER_ON_DISPLAY_MODE_MESSAGE,
POWER_ON_DISPLAY_MODE_VOLTAGE,
POWER_ON_DISPLAY_MODE_NONE
#ifdef ENABLE_FEAT_F4HWN_LOGO
POWER_ON_DISPLAY_MODE_LOGO,
#endif
POWER_ON_DISPLAY_MODE_NONE,
};
typedef enum POWER_OnDisplayMode_t POWER_OnDisplayMode_t;
+3
View File
@@ -295,6 +295,9 @@ const char gSubMenu_PONMSG[][8] =
#endif
"MESSAGE",
"VOLTAGE",
#ifdef ENABLE_FEAT_F4HWN_LOGO
"LOGO",
#endif
"NONE"
};
+5 -1
View File
@@ -211,7 +211,11 @@ extern const char gSubMenu_D_RSP[4][11];
extern const char* const gSubMenu_PTT_ID[5];
#ifdef ENABLE_FEAT_F4HWN
extern const char gSubMenu_PONMSG[5][8];
#ifdef ENABLE_FEAT_F4HWN_LOGO
extern const char gSubMenu_PONMSG[6][8];
#else
extern const char gSubMenu_PONMSG[5][8];
#endif
#else
extern const char gSubMenu_PONMSG[4][8];
#endif
+29 -1
View File
@@ -33,6 +33,19 @@
#include "screenshot.h"
#endif
#ifdef ENABLE_FEAT_F4HWN_LOGO
// Boot logo storage in PY25Q16 external flash, aligned on a 4 KB sector,
// placed past the calibration zone (0x010000-0x010200).
//
// Layout inside the sector starting at LOGO_FLASH_ADDR:
// [0x00..0x07] : 8-byte header (reserved for future magic/version/flags)
// [0x08..0x407]: 128x64 monochrome bitmap (1024 B)
// ST7565-native: 8 pages * 128 columns, column-major LSB-top
#define LOGO_FLASH_ADDR 0x011000
#define LOGO_HEADER_SIZE 8
#define LOGO_BITMAP_ADDR (LOGO_FLASH_ADDR + LOGO_HEADER_SIZE)
#endif
#ifdef ENABLE_FEAT_F4HWN_QRCODE
// QR code (version 4, 33x33 modules, EC level L) encoding:
// https://github.com/armel/uv-k1-k5v3-firmware-custom
@@ -216,10 +229,25 @@ void UI_DisplayWelcome(void)
#endif
UI_DisplayClear();
#ifdef ENABLE_FEAT_F4HWN_LOGO
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_LOGO) {
// Skip 8-byte header, then read 128x64 bitmap (1024 B):
// page 0 -> gStatusLine, pages 1..7 -> gFrameBuffer.
PY25Q16_ReadBuffer(LOGO_BITMAP_ADDR, gStatusLine, sizeof(gStatusLine));
PY25Q16_ReadBuffer(LOGO_BITMAP_ADDR + sizeof(gStatusLine), gFrameBuffer, sizeof(gFrameBuffer));
ST7565_BlitStatusLine();
ST7565_BlitFullScreen();
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
SCREENSHOT_Update(true);
#endif
return;
}
#endif
#ifdef ENABLE_FEAT_F4HWN
ST7565_BlitStatusLine();
ST7565_BlitFullScreen();
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_NONE || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND) {
ST7565_FillScreen(0x00);
}
+2
View File
@@ -71,6 +71,7 @@
"ENABLE_FEAT_F4HWN_SCAN_PROGRESS": false,
"ENABLE_FEAT_F4HWN_SCAN_FASTER": false,
"ENABLE_FEAT_F4HWN_BEAM": false,
"ENABLE_FEAT_F4HWN_LOGO": false,
"ENABLE_AGC_SHOW_DATA": false,
"ENABLE_UART_RW_BK_REGS": false,
"ENABLE_SWD": false,
@@ -200,6 +201,7 @@
"ENABLE_FEAT_F4HWN_BEAM": true,
"ENABLE_FEAT_F4HWN_QRCODE": true,
"ENABLE_FEAT_F4HWN_MEM": true,
"ENABLE_FEAT_F4HWN_LOGO": true,
"ENABLE_SWD": true,
"EDITION_STRING": "Fusion",
"TARGET": "f4hwn.fusion"
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB