File tree Expand file tree Collapse file tree 5 files changed +12
-4
lines changed
Expand file tree Collapse file tree 5 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 11name =serialIO
2- version =0.2.3
2+ version =0.2.4
33category =Communication
44sentence =RC protocol
55paragraph =A common library that can decode multiple RC protocols
Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ void crsf::begin() {
1212#elif defined(ARDUINO_ARCH_RP2040)
1313 SerialUART *serialPort = (SerialUART *)_rxPort;
1414 serialPort->setPinout (_txPin, _rxPin);
15+ serialPort->setInvertRX (_inverted);
16+ serialPort->setInvertTX (_inverted);
1517 serialPort->begin (CRSF_BAUDRATE, SERIAL_8N1);
1618#else
17- #warning #warning "Unsupported hardware platform."
19+ #warning "Unsupported hardware platform."
1820#endif
1921}
2022
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ void fport::begin() {
1818#elif defined(ARDUINO_ARCH_RP2040)
1919 SerialUART *serialPort = (SerialUART *)_rxPort;
2020 serialPort->setPinout (_txPin, _rxPin);
21+ serialPort->setInvertRX (_inverted);
22+ serialPort->setInvertTX (_inverted);
2123 serialPort->begin (FPORT_BAUDRATE, SERIAL_8N1);
2224#else
2325#warning "Unsupported hardware platform."
Original file line number Diff line number Diff line change @@ -15,9 +15,11 @@ void ibus::begin() {
1515#elif defined(ARDUINO_ARCH_RP2040)
1616 SerialUART *serialPort = (SerialUART *)_rxPort;
1717 serialPort->setPinout (_txPin, _rxPin);
18+ serialPort->setInvertRX (_inverted);
19+ serialPort->setInvertTX (_inverted);
1820 serialPort->begin (IBUS_BAUDRATE, SERIAL_8N1);
1921#else
20- #warning #warning "Unsupported hardware platform."
22+ #warning "Unsupported hardware platform."
2123#endif
2224}
2325
@@ -26,7 +28,7 @@ void ibus::processIncoming() {
2628 _rxData[IBUS_MAX_PACKET_SIZE - 1 ] = _rxPort->read ();
2729 if (_rxData[0 ] == IBUS_HEADER1 && _rxData[1 ] == IBUS_HEADER2) {
2830 if (checkSum ()) {
29- _channelData.header = (_rxData[2 ] << 8 ) | _rxData[0 ];
31+ _channelData.header = (_rxData[1 ] << 8 ) | _rxData[0 ];
3032 _channelData.channel1 = (_rxData[3 ] << 8 ) | _rxData[2 ];
3133 _channelData.channel2 = (_rxData[5 ] << 8 ) | _rxData[4 ];
3234 _channelData.channel3 = (_rxData[7 ] << 8 ) | _rxData[6 ];
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ void sbus::begin() {
1717#elif defined(ARDUINO_ARCH_RP2040)
1818 SerialUART *serialPort = (SerialUART *)_rxPort;
1919 serialPort->setPinout (_txPin, _rxPin);
20+ serialPort->setInvertRX (_inverted);
21+ serialPort->setInvertTX (_inverted);
2022 serialPort->begin (SBUS_BAUDRATE, SERIAL_8E2);
2123#else
2224#warning "Unsupported hardware platform."
You can’t perform that action at this time.
0 commit comments