jcheger / arduino-frskysp

FrSky SmartPort protocol library for Arduino
48 stars 19 forks source link

sniffer - buffer overflow #5

Open pan-sattan opened 3 years ago

pan-sattan commented 3 years ago

Hi, I am using R9m (smartport + GND) connected to arduino pin10 + GND

image

jendib commented 3 years ago

I have the same issue, did you manage to solve it?

TannerGilbert commented 3 years ago

I sometimes also have this issue. For me, simply unplugging and replugging the device does the job, even though this is not a satisfying solution. I'll probably look deeper into it in the upcoming weeks and will let you know if I find anything.

TannerGilbert commented 3 years ago

I looked into the issue and found out that once the buffer overflow error occurs, it gets stuck because the buffer never gets cleared, and therefore you're stuck in the else if. I fixed the issue by throwing away all the wrong bits if the error occurred #7.