feat: HAL variant system, OTA improvements, NVS migration scaffold
- Add variants/vesper.hpp and variants/agnus.hpp with HAS_SD_CARD, HAS_RTC, HAS_PCF8574, OUTPUT_COUNT_MAX, HW_FAMILY capability flags - Add agnus-v1 and agnus-mini-v1 PlatformIO environments with -include injection - Add src/NvsMigration/ scaffold for future NVS schema versioning - FirmwareHandler: OTA flow improvements and header updates - OTAManager: FastAPI integration, semver handling improvements - ConfigManager: refactoring groundwork for NVS-only variant support - CommunicationRouter: minor fix - provisioning/nvs_lab_device.csv: fix hw_type to VS, update device id fields - docs/dev/ota-telemetry-api.md: update API spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
// ═══════════════════════════════════════════════════════════════════════════════
|
||||
// variants/agnus.hpp — Hardware capability definitions for Agnus v1
|
||||
// ═══════════════════════════════════════════════════════════════════════════════
|
||||
//
|
||||
// This file is auto-included for all [env:agnus-*] builds via platformio.ini:
|
||||
// build_flags = -include variants/agnus.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: same ESP32 base as Vesper, no SD card.
|
||||
// Agnus Mini is the same binary — output limiting is handled in the app/NVS.
|
||||
// ═══════════════════════════════════════════════════════════════════════════════
|
||||
|
||||
#pragma once
|
||||
|
||||
// ── Identity ─────────────────────────────────────────────────────────────────
|
||||
// HW_FAMILY matches the value stored in NVS key "hw_family" by the backend.
|
||||
// The specific slug (e.g. "agnus" vs "agnus-mini") is set in NVS at provisioning
|
||||
// time — HW_FAMILY here is the family prefix for this build.
|
||||
#define HW_FAMILY "agnus" // Hardware family prefix (NVS hw_family will be e.g. "agnus" or "agnus-mini")
|
||||
|
||||
// ── Storage ──────────────────────────────────────────────────────────────────
|
||||
#define HAS_SD_CARD 0 // No SD card — settings stored in NVS only
|
||||
#define HAS_SPIFFS 0 // SPIFFS not used
|
||||
|
||||
// ── Connectivity ─────────────────────────────────────────────────────────────
|
||||
#define HAS_ETHERNET 0 // WiFi only
|
||||
#define HAS_RF 0 // No RF remote support
|
||||
#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 // Physical outputs available on the board
|
||||
// (Agnus Mini limit is enforced via app/NVS,
|
||||
// not in firmware)
|
||||
|
||||
// ── RTC ──────────────────────────────────────────────────────────────────────
|
||||
#define HAS_RTC 1 // DS3231 RTC present
|
||||
Reference in New Issue
Block a user