Add multi-meter energy sender schema with UART0/1/2 mode split

This commit is contained in:
2026-02-04 15:22:24 +01:00
parent 290ca55b8b
commit 938f490a32
10 changed files with 307 additions and 292 deletions

View File

@@ -32,7 +32,9 @@ constexpr uint8_t PIN_BAT_ADC = 35;
constexpr uint8_t PIN_ROLE = 14;
constexpr uint8_t PIN_OLED_CTRL = 13;
constexpr uint8_t PIN_METER_RX = 34;
constexpr uint8_t PIN_METER1_RX = 34; // UART2 RX
constexpr uint8_t PIN_METER2_RX = 25; // UART1 RX
constexpr uint8_t PIN_METER3_RX = 3; // UART0 RX (prod only, when serial debug is off)
// LoRa settings
#ifndef LORA_FREQUENCY_HZ
@@ -68,6 +70,9 @@ constexpr bool ENABLE_HA_DISCOVERY = true;
#define SERIAL_DEBUG_MODE_FLAG 0
#endif
constexpr bool SERIAL_DEBUG_MODE = SERIAL_DEBUG_MODE_FLAG != 0;
constexpr uint8_t METER_COUNT_DEBUG = 2;
constexpr uint8_t METER_COUNT_PROD = 3;
constexpr uint8_t METER_COUNT = SERIAL_DEBUG_MODE ? METER_COUNT_DEBUG : METER_COUNT_PROD;
constexpr bool SERIAL_DEBUG_DUMP_JSON = false;
constexpr bool LORA_SEND_BYPASS = false;
constexpr bool ENABLE_SD_LOGGING = true;