feat(ota): implement build number suffix for firmware versioning

Enhanced the firmware versioning system by appending a build number
suffix when available, allowing for better tracking of published builds.
This change improves the OTA update process by providing clearer
versioning information in the embedded firmware string.
This commit is contained in:
agessaman committed 2026-06-23 12:55:07 -07:00
1 parent addb637b63
commit 730eb37dbd
19 files changed
+203 -123

No files matched your search

+5 -8
View File
@@ -799,18 +799,15 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, char* command, char* re
// triggered by someone expecting to hand-upload a binary.
// ota check -> report available build, do not flash
// ota update -> download and flash, then reboot
#if defined(WITH_MQTT_BRIDGE) && defined(OTA_MANIFEST_URL)
#if defined(WITH_MQTT_BRIDGE) && defined(OTA_MANIFEST_BASE)
if (WiFi.status() != WL_CONNECTED) {
strcpy(reply, "ERR: WiFi not connected");
} else if (memcmp(command, "ota check", 9) == 0) {
// Check is synchronous so its result lands in this reply. Free the MQTT
// bridge first: on a no-PSRAM board only ~70 KB heap is free with the
// bridge up, and a third TLS connection (the manifest fetch) alongside the
// two live MQTT sessions drives free heap to a few hundred bytes, which
// truncates the read. The WiFi STA link survives end(); restore after.
_callbacks->setBridgeState(false);
// Check is synchronous so its result lands in this reply, and runs with the
// MQTT bridge UP: the slim per-variant manifest is tiny, so the fetch only
// costs a single TLS handshake (no large JSON doc) — which fits alongside
// the live MQTT sessions even on no-PSRAM boards. No bridge bounce needed.
_board->otaFromManifest(_callbacks->getFirmwareVer(), true, reply);
_callbacks->setBridgeState(true);
} else {
// Update is DEFERRED: the flash blocks the loop and then reboots, so it
// must run only AFTER this reply has gone out over the mesh — otherwise