Open fourstix opened 4 years ago
This library is a bad joke:
// for drop-in compatibility with NewSoftSerial, rxPin & txPin ignored
AltSoftSerial(uint8_t rxPin, uint8_t txPin, bool inverse = false) { }
pretending to be compatible when in fact it is not
That constructor behavior is in the original library I only addressed the inverse flag in this Pull Request, which I needed for my own use. One can set rxPin and txPin in this constructor but they are ignored.
Frankly, I don't like the dummy constructor either, but this PR leaves it up to the maintainer. At this point, though, it doesn't look like the library is being maintained anymore. So this is probably a moot issue.
I plan to just comment out this constructor from my own fork of this code and maintain the code there.
As a user I need to reverse the sense of the RX and TX lines to communicate with a particular piece of hardware as in SoftwareSerial, but I also need the full-duplex communication support of AltSoftSerial.
Description
Please see Pull Request #59
New feature. Add the Inverse flag to AltSoftSerial Library with appropriate constructors. In the Transmission and Reception code, invert the outputs with the flag is true. When the flag is the default value of false, the code functions exactly as before. The original constructors are unchanged.
Steps To Reproduce Problem
New Feature.
Hardware & Software
Tested with an Sparkfun RedBoard Arduino Arduino IDE version 1.18.10 Teensyduino version (if using Teensy) 1802 Membership Card running MCSMP20J ROM (with inverse logic on the RX and TX lines) and for regression testing 1802 Membership Card running MCPSMP20A ROM (with positive logic on RX and TX lines)
Arduino Sketch
I have submitted pull request #59 to add the support for the inverse argument to the AltSoftSerial library. Merging Pull Request #59 will close this issue.