From 64738a62465ea0953feb7dc853ea59b21e351b8c Mon Sep 17 00:00:00 2001 From: MalteSchm Date: Thu, 25 Apr 2024 09:18:55 +0200 Subject: [PATCH] Introducing defines for RX2/TX2 --- src/PinMapping.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/PinMapping.cpp b/src/PinMapping.cpp index 7c8bec186..516e6de1d 100644 --- a/src/PinMapping.cpp +++ b/src/PinMapping.cpp @@ -94,6 +94,14 @@ #define VICTRON_PIN_RX -1 #endif +#ifndef VICTRON_PIN_TX2 +#define VICTRON_PIN_TX2 -1 +#endif + +#ifndef VICTRON_PIN_RX2 +#define VICTRON_PIN_RX2 -1 +#endif + #ifndef BATTERY_PIN_RX #define BATTERY_PIN_RX -1 #endif @@ -284,8 +292,8 @@ bool PinMappingClass::init(const String& deviceMapping) // OpenDTU-OnBattery-specific pins below _pinMapping.victron_rx = doc[i]["victron"]["rx"] | VICTRON_PIN_RX; _pinMapping.victron_tx = doc[i]["victron"]["tx"] | VICTRON_PIN_TX; - _pinMapping.victron_rx2 = doc[i]["victron"]["rx2"] | VICTRON_PIN_RX; - _pinMapping.victron_tx2 = doc[i]["victron"]["tx2"] | VICTRON_PIN_TX; + _pinMapping.victron_rx2 = doc[i]["victron"]["rx2"] | VICTRON_PIN_RX2; + _pinMapping.victron_tx2 = doc[i]["victron"]["tx2"] | VICTRON_PIN_TX2; _pinMapping.battery_rx = doc[i]["battery"]["rx"] | BATTERY_PIN_RX; _pinMapping.battery_rxen = doc[i]["battery"]["rxen"] | BATTERY_PIN_RXEN;