mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +01:00
Change ARDUINOCMRI definition in IO_CMRI.h/cpp
This commit is contained in:
parent
bbc4339b69
commit
e6764e5bc6
|
@ -40,7 +40,7 @@ CMRIbus::CMRIbus(uint8_t busNo, HardwareSerial &serial, unsigned long baud, uint
|
|||
// Each byte is one start bit, 8 data bits and 1 or 2 stop bits, assume 11 bits per byte.
|
||||
// Calculate timeout based on treble this time.
|
||||
_timeoutPeriod = 3 * 11 * 262 * 1000UL / (_baud / 1000UL);
|
||||
#if ARDUINOCMRI_COMPATIBLE
|
||||
#if defined(ARDUINOCMRI_COMPATIBLE)
|
||||
// NOTE: The ArduinoCMRI library, unless modified, contains a 'delay(50)' between
|
||||
// receiving the end of the prompt message and starting to send the response. This
|
||||
// is allowed for below.
|
||||
|
@ -240,7 +240,7 @@ void CMRIbus::enableTransmitter() {
|
|||
// it's preceded by an odd number of SYN characters.
|
||||
// So send a SYN followed by a NUL in that case.
|
||||
_serial->write(SYN);
|
||||
#if ARDUINOCMRI_COMPATIBLE
|
||||
#if defined(ARDUINOCMRI_COMPATIBLE)
|
||||
_serial->write(NUL); // Reset the ArduinoCMRI library's parser
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* Various work-arounds may be enabled within the driver by adding the following line to your config.h file,
|
||||
* to allow nodes running the ArduinoCMRI library to communicate:
|
||||
*
|
||||
* #define ARDUINOCMRI_COMPATIBLE TRUE
|
||||
* #define ARDUINOCMRI_COMPATIBLE
|
||||
*
|
||||
* CMRINode
|
||||
* ========
|
||||
|
@ -222,7 +222,7 @@ public:
|
|||
// Device-specific initialisation
|
||||
void _begin() override {
|
||||
// CMRInet spec states one stop bit, JMRI and ArduinoCMRI use two stop bits
|
||||
#if ARDUINOCMRI_COMPATIBLE
|
||||
#if defined(ARDUINOCMRI_COMPATIBLE)
|
||||
_serial->begin(_baud, SERIAL_8N2);
|
||||
#else
|
||||
_serial->begin(_baud, SERIAL_8N1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user