feat: boot-phase OTA, RS485 variant, async melody download, HAL guards

- bootOtaCheck() runs at top of setup() before any task/timer; streams
  firmware to flash on update, reboots, otherwise returns immediately
- New bespoke-rs485-v1 build env + Rs485OutputManager for Waveshare 16CH
  Modbus RTU relay; vesper.hpp renamed vesper-std.hpp, env renamed accordingly
- Player: permanent melodyDownloadTaskFn task; fast path (built-in/SD) before
  async download; uid accepted as alias for pid
- CommunicationRouter: HAS_UART guards throughout so UART transport compiles
  out when Serial2 is claimed by Modbus
- OTAManager: stack 8KB→16KB, pinned to Core 1, HTTPClient recreated per
  retry, download timeout 30s→60s
- FileManager: heap guard before SSL alloc; watchdog log cleanup
- ConfigManager: OTA fallback URLs http (no TLS for firmware servers)
- agnus.hpp: HAS_UART 1 added
- provisioning/nvs_agnus_lab_device.csv added
- Version bumped to v2.0.1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-18 20:48:26 +03:00
co-authored by Claude Sonnet 4.6
parent a4d071d5d5
commit ed1123283b
19 changed files with 871 additions and 72 deletions
+41
View File
@@ -0,0 +1,41 @@
// ═══════════════════════════════════════════════════════════════════════════════
// variants/vesper.hpp — Hardware capability definitions for Vesper v1
// ═══════════════════════════════════════════════════════════════════════════════
//
// This file is auto-included for all [env:vesper-*] builds via platformio.ini:
// build_flags = -include variants/vesper.hpp
//
// DO NOT include this file manually. It is injected at the compiler level so
// every translation unit sees the same definitions without explicit includes.
//
// Hardware: Kincony KC868-A6 — ESP32-D0WD-V3, 4MB flash
// ═══════════════════════════════════════════════════════════════════════════════
#pragma once
// ── Identity ─────────────────────────────────────────────────────────────────
// HW_FAMILY matches the value stored in NVS key "hw_family" by the backend.
// It is used in OTA URL building and telemetry.
// The specific slug (e.g. "vesper-standard" vs "vesper-plus") is set in NVS
// at provisioning time — HW_FAMILY here is the family prefix for this build.
#define HW_FAMILY "vesper" // Hardware family prefix (NVS hw_family will be e.g. "vesper-standard")
// ── Storage ──────────────────────────────────────────────────────────────────
#define HAS_SD_CARD 1 // SD card present — configs stored on SD
#define HAS_SPIFFS 0 // SPIFFS not used (min_spiffs partition is tiny)
// ── Connectivity ─────────────────────────────────────────────────────────────
#define HAS_ETHERNET 0 // Ethernet removed in fw v138
#define HAS_RF 1 // RF remote receiver present (GPIO RF_RX_PIN)
#define RF_RX_PIN 22 // GPIO pin for RF receiver DATA line
#define HAS_LCD 0 // No onboard LCD
// ── Output hardware ──────────────────────────────────────────────────────────
#define HAS_PCF8574 1 // PCF8574 I2C GPIO expanders for relay control
#define OUTPUT_COUNT_MAX 16 // Maximum physical outputs on this board
// ── UART command transport ────────────────────────────────────────────────────
#define HAS_UART 1 // UARTDriver on Serial2 (GPIO12 TX, GPIO13 RX)
// ── RTC ──────────────────────────────────────────────────────────────────────
#define HAS_RTC 1 // DS3231 RTC present