From 78561036d0910e98931af575f338c04f5fc288eb Mon Sep 17 00:00:00 2001 From: liquidraver <504870+liquidraver@users.noreply.github.com> Date: Sun, 19 Apr 2026 10:16:59 +0200 Subject: [PATCH] bump version to match vanilla --- zephcore/app/CompanionMesh.cpp | 2 +- zephcore/app/ObserverMesh.h | 186 ++++++++++++++++----------------- zephcore/app/RepeaterMesh.h | 2 +- 3 files changed, 95 insertions(+), 95 deletions(-) diff --git a/zephcore/app/CompanionMesh.cpp b/zephcore/app/CompanionMesh.cpp index 1aa375b..5388f3d 100644 --- a/zephcore/app/CompanionMesh.cpp +++ b/zephcore/app/CompanionMesh.cpp @@ -1962,7 +1962,7 @@ bool CompanionMesh::handleProtocolFrame(const uint8_t *data, size_t len) #endif static const uint8_t fw_build[12] = FIRMWARE_BUILD_DATE; static const uint8_t model[40] = CONFIG_ZEPHCORE_BOARD_NAME; - static const uint8_t version[20] = "v1.14.1-zephyr"; + static const uint8_t version[20] = "v1.15.0-zephyr"; uint8_t rsp[82]; rsp[0] = PACKET_DEVICE_INFO; rsp[1] = 11; // FIRMWARE_VER_CODE - v11 = CMD_SET/GET_DEFAULT_FLOOD_SCOPE diff --git a/zephcore/app/ObserverMesh.h b/zephcore/app/ObserverMesh.h index addf458..4b54370 100644 --- a/zephcore/app/ObserverMesh.h +++ b/zephcore/app/ObserverMesh.h @@ -1,93 +1,93 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * ObserverMesh — listen-only LoRa mesh node. - * - * Extends mesh::Dispatcher directly (no routing, no flooding, no ACL). - * Every received packet is forwarded to the MQTT publisher queue. - * CLI handles WiFi/MQTT/radio configuration. - */ - -#pragma once - -#include -#include -#include -#include -#include -#include -#include "RepeaterDataStore.h" -#include "observer_creds.h" - -#ifndef FIRMWARE_VERSION - #define FIRMWARE_VERSION "v1.14.1-zephyr" -#endif - -#ifndef FIRMWARE_BUILD_DATE - #define FIRMWARE_BUILD_DATE __DATE__ -#endif - -namespace mesh { - -class ObserverMesh : public Dispatcher { - StaticPoolPacketManager _pkt_mgr; - - /* Cached values set by logRxRaw / logRx before onRecvPacket */ - float _last_rssi; - float _last_score; - uint8_t _last_raw[MAX_TRANS_UNIT + 1]; - int _last_raw_len; - - /* Identity and config */ - LocalIdentity _self_id; - NodePrefs _prefs; - RepeaterDataStore *_store; - struct ObserverCreds *_creds; - RNG *_rng; - RTCClock *_rtc; - - /* Pre-built MQTT topic strings (set in begin()) */ - char _pubkey_hex[PUB_KEY_SIZE * 2 + 1]; /* 64 hex chars + NUL */ - char _packets_topic[160]; - char _status_topic[160]; - - /* Private helpers */ - void buildTopics(); - void enqueuePacket(Packet *pkt); - void buildStatusJson(const char *status, char *out, size_t out_size); - uint32_t _start_uptime_secs; - -protected: - /* Capture RSSI + raw bytes before packet is parsed */ - void logRxRaw(float snr, float rssi, const uint8_t raw[], int len) override; - /* Capture score (called between logRxRaw and onRecvPacket) */ - void logRx(Packet *packet, int len, float score) override; - /* Build JSON and enqueue to MQTT publisher */ - DispatcherAction onRecvPacket(Packet *pkt) override; - -public: - ObserverMesh(Radio &radio, MillisecondClock &ms, RNG &rng, RTCClock &rtc); - - /* Initialize: load/generate identity, load/init prefs, start radio RX. */ - void begin(RepeaterDataStore *store, struct ObserverCreds *creds); - - /* Handle a single serial CLI command. - * reply is filled with the response string (CLI_REPLY_SIZE bytes). - * Returns true if the command was 'help' and the caller should print - * the full banner (too long for the reply buffer). */ - bool handleCLI(const char *command, char *reply, int reply_size); - - /* Publish a synthetic zero-hop advert for this observer to the packets - * topic so that CoreScope can place it on the map. No-op if lat/lon - * are not configured in the creds struct. */ - void publishSelfAdvert(); - void publishStatus(const char *status); - - /* Accessors used by main_observer.cpp */ - NodePrefs *getNodePrefs() { return &_prefs; } - const LocalIdentity &getSelfId() const { return _self_id; } - const char *getPacketsTopic() const { return _packets_topic; } - const char *getStatusTopic() const { return _status_topic; } - const char *getPubkeyHex() const { return _pubkey_hex; } -}; - -} /* namespace mesh */ +/* + * SPDX-License-Identifier: Apache-2.0 + * ObserverMesh — listen-only LoRa mesh node. + * + * Extends mesh::Dispatcher directly (no routing, no flooding, no ACL). + * Every received packet is forwarded to the MQTT publisher queue. + * CLI handles WiFi/MQTT/radio configuration. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include "RepeaterDataStore.h" +#include "observer_creds.h" + +#ifndef FIRMWARE_VERSION + #define FIRMWARE_VERSION "v1.15.0-zephyr" +#endif + +#ifndef FIRMWARE_BUILD_DATE + #define FIRMWARE_BUILD_DATE __DATE__ +#endif + +namespace mesh { + +class ObserverMesh : public Dispatcher { + StaticPoolPacketManager _pkt_mgr; + + /* Cached values set by logRxRaw / logRx before onRecvPacket */ + float _last_rssi; + float _last_score; + uint8_t _last_raw[MAX_TRANS_UNIT + 1]; + int _last_raw_len; + + /* Identity and config */ + LocalIdentity _self_id; + NodePrefs _prefs; + RepeaterDataStore *_store; + struct ObserverCreds *_creds; + RNG *_rng; + RTCClock *_rtc; + + /* Pre-built MQTT topic strings (set in begin()) */ + char _pubkey_hex[PUB_KEY_SIZE * 2 + 1]; /* 64 hex chars + NUL */ + char _packets_topic[160]; + char _status_topic[160]; + + /* Private helpers */ + void buildTopics(); + void enqueuePacket(Packet *pkt); + void buildStatusJson(const char *status, char *out, size_t out_size); + uint32_t _start_uptime_secs; + +protected: + /* Capture RSSI + raw bytes before packet is parsed */ + void logRxRaw(float snr, float rssi, const uint8_t raw[], int len) override; + /* Capture score (called between logRxRaw and onRecvPacket) */ + void logRx(Packet *packet, int len, float score) override; + /* Build JSON and enqueue to MQTT publisher */ + DispatcherAction onRecvPacket(Packet *pkt) override; + +public: + ObserverMesh(Radio &radio, MillisecondClock &ms, RNG &rng, RTCClock &rtc); + + /* Initialize: load/generate identity, load/init prefs, start radio RX. */ + void begin(RepeaterDataStore *store, struct ObserverCreds *creds); + + /* Handle a single serial CLI command. + * reply is filled with the response string (CLI_REPLY_SIZE bytes). + * Returns true if the command was 'help' and the caller should print + * the full banner (too long for the reply buffer). */ + bool handleCLI(const char *command, char *reply, int reply_size); + + /* Publish a synthetic zero-hop advert for this observer to the packets + * topic so that CoreScope can place it on the map. No-op if lat/lon + * are not configured in the creds struct. */ + void publishSelfAdvert(); + void publishStatus(const char *status); + + /* Accessors used by main_observer.cpp */ + NodePrefs *getNodePrefs() { return &_prefs; } + const LocalIdentity &getSelfId() const { return _self_id; } + const char *getPacketsTopic() const { return _packets_topic; } + const char *getStatusTopic() const { return _status_topic; } + const char *getPubkeyHex() const { return _pubkey_hex; } +}; + +} /* namespace mesh */ diff --git a/zephcore/app/RepeaterMesh.h b/zephcore/app/RepeaterMesh.h index 6b22fe5..a585ae3 100644 --- a/zephcore/app/RepeaterMesh.h +++ b/zephcore/app/RepeaterMesh.h @@ -28,7 +28,7 @@ #endif #ifndef FIRMWARE_VERSION - #define FIRMWARE_VERSION "v1.14.1-zephyr" + #define FIRMWARE_VERSION "v1.15.0-zephyr" #endif #ifndef FIRMWARE_BUILD_DATE