File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -76,13 +76,14 @@ const int DEREPin = -1; // The pin controlling Receive Enable and Driver
7676// Hardware serial ports are preferred when available.
7777// AltSoftSerial is the most stable alternative for modbus.
7878// Select over alternatives with the define below.
79- #define BUILD_ALTSOFTSERIAL // Comment-out if you prefer alternatives
79+ // #define BUILD_ALTSOFTSERIAL // Comment-out if you prefer alternatives
8080
8181#if defined(BUILD_ALTSOFTSERIAL)
8282#include < AltSoftSerial.h>
8383AltSoftSerial modbusSerial;
8484
85- #elif defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_FEATHER328P)
85+ #elif defined(BUILD_SOFTWARE_SERIAL) && \
86+ (defined (ARDUINO_AVR_UNO) || defined (ARDUINO_AVR_FEATHER328P))
8687// The Uno only has 1 hardware serial port, which is dedicated to communication with the
8788// computer. If using an Uno, you will be restricted to using AltSofSerial or
8889// SoftwareSerial
Original file line number Diff line number Diff line change @@ -57,13 +57,14 @@ const int DEREPin = -1; // The pin controlling Receive Enable and Driver
5757// Hardware serial ports are preferred when available.
5858// AltSoftSerial is the most stable alternative for modbus.
5959// Select over alternatives with the define below.
60- #define BUILD_ALTSOFTSERIAL // Comment-out if you prefer alternatives
60+ // #define BUILD_ALTSOFTSERIAL // Comment-out if you prefer alternatives
6161
6262#if defined(BUILD_ALTSOFTSERIAL)
6363#include < AltSoftSerial.h>
6464AltSoftSerial modbusSerial;
6565
66- #elif defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_FEATHER328P)
66+ #elif defined(BUILD_SOFTWARE_SERIAL) && \
67+ (defined (ARDUINO_AVR_UNO) || defined (ARDUINO_AVR_FEATHER328P))
6768// The Uno only has 1 hardware serial port, which is dedicated to communication with the
6869// computer. If using an Uno, you will be restricted to using AltSofSerial or
6970// SoftwareSerial
You can’t perform that action at this time.
0 commit comments