Skip to content

Commit

Permalink
Introducing defines for RX2/TX2
Browse files Browse the repository at this point in the history
  • Loading branch information
MalteSchm authored and schlimmchen committed Apr 25, 2024
1 parent f0df583 commit 64738a6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/PinMapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 64738a6

Please sign in to comment.