fix: embed firmware version from version.txt, log at boot (#354)
- Add version.txt (0.6.0) read by CMakeLists.txt so esp_app_get_description()->version matches the release tag - Log firmware version on boot: "v0.6.0 — Node ID: X" - Remove stale Kconfig help text (said default 2.0, actual is 15.0) Fixes the version mismatch reported in #354 where flashing v0.5.3 binaries showed v0.4.3 because PROJECT_VER was never set. Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
parent
854342297a
commit
b5e924cd72
|
|
@ -4,5 +4,10 @@ cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
set(EXTRA_COMPONENT_DIRS "")
|
set(EXTRA_COMPONENT_DIRS "")
|
||||||
|
|
||||||
|
# Read firmware version from version.txt so esp_app_get_description()->version
|
||||||
|
# matches the release tag. Fixes issue #354 (version mismatch after flashing).
|
||||||
|
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/version.txt" PROJECT_VER LIMIT_COUNT 1)
|
||||||
|
string(STRIP "${PROJECT_VER}" PROJECT_VER)
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
project(esp32-csi-node)
|
project(esp32-csi-node VERSION ${PROJECT_VER})
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,6 @@ menu "Edge Intelligence (ADR-039)"
|
||||||
Raise to reduce false positives in high-traffic environments.
|
Raise to reduce false positives in high-traffic environments.
|
||||||
Normal walking produces accelerations of 2-5 rad/s².
|
Normal walking produces accelerations of 2-5 rad/s².
|
||||||
Stored as integer; divided by 1000 at runtime.
|
Stored as integer; divided by 1000 at runtime.
|
||||||
Default 2000 = 2.0 rad/s^2.
|
|
||||||
|
|
||||||
config EDGE_POWER_DUTY
|
config EDGE_POWER_DUTY
|
||||||
int "Power duty cycle percentage"
|
int "Power duty cycle percentage"
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
|
#include "esp_app_desc.h"
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
#include "csi_collector.h"
|
#include "csi_collector.h"
|
||||||
|
|
@ -137,7 +138,9 @@ void app_main(void)
|
||||||
/* Load runtime config (NVS overrides Kconfig defaults) */
|
/* Load runtime config (NVS overrides Kconfig defaults) */
|
||||||
nvs_config_load(&g_nvs_config);
|
nvs_config_load(&g_nvs_config);
|
||||||
|
|
||||||
ESP_LOGI(TAG, "ESP32-S3 CSI Node (ADR-018) — Node ID: %d", g_nvs_config.node_id);
|
const esp_app_desc_t *app_desc = esp_app_get_description();
|
||||||
|
ESP_LOGI(TAG, "ESP32-S3 CSI Node (ADR-018) — v%s — Node ID: %d",
|
||||||
|
app_desc->version, g_nvs_config.node_id);
|
||||||
|
|
||||||
/* Initialize WiFi STA (skip entirely under QEMU mock — no RF hardware) */
|
/* Initialize WiFi STA (skip entirely under QEMU mock — no RF hardware) */
|
||||||
#ifndef CONFIG_CSI_MOCK_SKIP_WIFI_CONNECT
|
#ifndef CONFIG_CSI_MOCK_SKIP_WIFI_CONNECT
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
0.6.0
|
||||||
Loading…
Reference in New Issue