Multi-board variant support: - variants/vesper.hpp: enable HAS_RF=1, define RF_RX_PIN=22 - variants/agnus.hpp: enable HAS_RF=1, RF_RX_PIN=22, correct HAS_RTC=0 - main.cpp, Player, HealthMonitor, OTAManager, ConfigManager: wrap all RTC/SD/RF-dependent code in #if HAS_RTC / HAS_SD_CARD / HAS_RF guards so Agnus builds cleanly without those peripherals RFRemote subsystem (new): - src/RFRemote/: RF receiver driver (GPIO RF_RX_PIN) + command handler - Registered with HealthMonitor and CommunicationRouter when HAS_RF=1 Player improvements: - uid -> pid rename throughout (Player, BuiltInMelodies, api-reference) - loadMelodyInRAM() now returns bool - playerControlTaskFn task added — defers stop/pause/resume out of timer callback (Tmr Svc) to avoid stack overflows - setDependencies() accepts nullptr FileManager for SD-less boards OTAManager: - Consume download_url from server metadata response instead of constructing firmware path locally - HTTP redirect following enabled (setFollowRedirects) - HAS_RTC guards on TimeKeeper references platformio.ini: - Add rc-switch library for RF remote support - Remove BOARD_TYPE/BOARD_NAME/BOARD_VERSION flags (moved to variant headers) - MQTT_SECRET placeholders only — no secrets in source Docs: - docs/architecture/codebase-refactor-plan.md: new migration strategy doc - docs/reference/api-reference.md: updated for pid, note_assignments, download_url - Remove stale docs: ota-telemetry-api.md, platformio-commands.md, firmware-variants.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
41 lines
3.4 KiB
C++
41 lines
3.4 KiB
C++
// ═══════════════════════════════════════════════════════════════════════════════
|
|
// 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 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 // Physical outputs available on the board
|
|
// (Agnus Mini limit is enforced via app/NVS,
|
|
// not in firmware)
|
|
|
|
// ── RTC ──────────────────────────────────────────────────────────────────────
|
|
#define HAS_RTC 0 // No RTC on Agnus
|