mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
feat(ui): show MeshCore version large and plus version in splash bar
Add MESHCORE_VERSION build flag ("1.15") to companion base configs.
Splash screen now shows MESHCORE_VERSION in the large text and the
plus firmware version (stripped of commit hash) in the Plus bar,
e.g. "1.15" large + "Plus v1.11 for Wio" below.
Change CI tag pattern to v* and simplify version extraction so tag
v1.11 maps directly to FIRMWARE_VERSION=v1.11.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- 'plus_*'
|
||||
- 'v*'
|
||||
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Extract Version from Git Tag
|
||||
run: echo "GIT_TAG_VERSION=v${GITHUB_REF_NAME#plus_}" >> $GITHUB_ENV
|
||||
run: echo "GIT_TAG_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup Build Environment
|
||||
uses: ./.github/actions/setup-build-environment
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Extract Version from Git Tag
|
||||
run: echo "GIT_TAG_VERSION=v${GITHUB_REF_NAME#plus_}" >> $GITHUB_ENV
|
||||
run: echo "GIT_TAG_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup Build Environment
|
||||
uses: ./.github/actions/setup-build-environment
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: Extract Version from Git Tag
|
||||
run: echo "GIT_TAG_VERSION=v${GITHUB_REF_NAME#plus_}" >> $GITHUB_ENV
|
||||
run: echo "GIT_TAG_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
|
||||
|
||||
- name: Download OLED Firmware
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
@@ -40,26 +40,17 @@ class SplashScreen : public UIScreen {
|
||||
|
||||
public:
|
||||
SplashScreen(UITask* task) : _task(task) {
|
||||
// strip off dash and commit hash: v1.2.3-abcdef -> v1.2.3
|
||||
// MeshCore upstream version shown large (e.g. "1.15")
|
||||
strncpy(_version_info, MESHCORE_VERSION, sizeof(_version_info) - 1);
|
||||
_version_info[sizeof(_version_info) - 1] = '\0';
|
||||
|
||||
// Plus firmware version: strip commit hash suffix (v1.11-abcdef -> v1.11)
|
||||
const char *ver = FIRMWARE_VERSION;
|
||||
const char *dash = strchr(ver, '-');
|
||||
|
||||
int len = dash ? dash - ver : strlen(ver);
|
||||
if (len >= sizeof(_version_info)) len = sizeof(_version_info) - 1;
|
||||
memcpy(_version_info, ver, len);
|
||||
_version_info[len] = 0;
|
||||
|
||||
// extract plus version: v1.15-plus.1.4-SHA -> "1.4"
|
||||
_plus_ver[0] = '\0';
|
||||
const char *plus = strstr(ver, "plus.");
|
||||
if (plus) {
|
||||
plus += 5; // skip "plus."
|
||||
const char *end = strchr(plus, '-');
|
||||
int plen = end ? end - plus : strlen(plus);
|
||||
int plen = dash ? (int)(dash - ver) : (int)strlen(ver);
|
||||
if (plen >= (int)sizeof(_plus_ver)) plen = sizeof(_plus_ver) - 1;
|
||||
memcpy(_plus_ver, plus, plen);
|
||||
memcpy(_plus_ver, ver, plen);
|
||||
_plus_ver[plen] = '\0';
|
||||
}
|
||||
|
||||
dismiss_after = millis() + BOOT_SCREEN_MILLIS;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ build_flags = ${nrf52_base.build_flags}
|
||||
-D PIN_BUZZER=12
|
||||
-D QSPIFLASH=1
|
||||
-D FIRMWARE_PLUS_BUILD=1
|
||||
-D MESHCORE_VERSION='"1.15"'
|
||||
-D UI_SENSORS_PAGE=1
|
||||
-D BLE_PIN_CODE=123456
|
||||
build_src_filter = ${nrf52_base.build_src_filter}
|
||||
|
||||
@@ -70,6 +70,7 @@ build_flags = ${WioTrackerL1.build_flags}
|
||||
-D PIN_BUZZER=12
|
||||
-D QSPIFLASH=1
|
||||
-D FIRMWARE_PLUS_BUILD=1
|
||||
-D MESHCORE_VERSION='"1.15"'
|
||||
-D UI_SENSORS_PAGE=1
|
||||
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
|
||||
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
||||
@@ -111,6 +112,7 @@ build_flags = ${WioTrackerL1.build_flags}
|
||||
-D QSPIFLASH=1
|
||||
-D ADVERT_NAME='"@@MAC"'
|
||||
-D FIRMWARE_PLUS_BUILD=1
|
||||
-D MESHCORE_VERSION='"1.15"'
|
||||
-D UI_SENSORS_PAGE=1
|
||||
-D ENV_PIN_SDA=PIN_WIRE1_SDA
|
||||
-D ENV_PIN_SCL=PIN_WIRE1_SCL
|
||||
|
||||
Reference in New Issue
Block a user