Closed arbrog closed 3 years ago
so further debugging, in parse() I never get into while (_bus->available() > 0) {
on line 299 so there are never bytes available to read?
if ((_curByte == _sbusHeader) && ((_prevByte == _sbusFooter) || ((_prevByte & _sbus2Mask) == _sbus2Footer))) {
this if on line 305 never is true so the _parserState never increments
Did you ever resolve this issue? I'm experiencing the same problem and it's incredibly frustrating!
I did not, but I also haven't worked on the project this was for since due to COVID
I tried printing all values received from UART Buffer and they were wrong (in comparision to another app I used such as Logic Analyzer or Hterm). I guessed there might be something wrong with the the baudrate or format during the serial initialization so I modified the "begin()" of SBUS by just using "_bus->begin(_sbusBaud);" and it worked.
Any update from anyone? Trying to get an R8 PRO receiver working, running into the same issue and @khanhln2907's suggestion didn't change anything for me.
If anyone is able to get to the bottom of this, please re-open the issue with the specific steps taken, the microcontroller tested, and the necessary code changes relative to the most recent code. Thanks!
Using an Arduino Mega 2560 with a FrySky R-XSR. I am using the SBUS_example.ino (as a base) on Serial2 (Pin 17 RX) and verified the program starts and the main loop runs but I never get inside the if
I put some return statements to shortcircuit SBUS read and it looks like the
if (parse()) {
on line 66 of SBUS.cpp is returning false. I used an oscilloscope to verify that my inverting circuit is working so I'm not sure why the packet isn't coming through correctly.