Skip to content

CRSF frame parsing timeout repeatedly expires thus dropping all framesΒ #108

@britannio

Description

@britannio

Is there an existing issue for this bug?

  • I have searched the issues and there is no existing issue for this bug.

What development environment are you using?

PlatformIO

What board are you using?

Raspberry Pi Pico RP2040

What part of CRSF for Arduino is this bug related to?

RC Channels

Current behaviour

When I set up the library to get rc channel data, the callback will run but the channel data never changes.
I only encounter this issue when my Pi Pico is connected to the Adafruit PiCowbell CAN Bus.

Expected behaviour

The rc data should update as normal.

Steps to reproduce

I'm unsure how to reproduce this issue without the mentioned hardware.

Additional information

Removing the following lines fixes the issue.

/* Reset the frame position if the frame time has expired. */
if (currentTime - frameStartTime > timePerFrame)
{
framePosition = 0;
if (currentTime < frameStartTime)
{
frameStartTime = currentTime;
}
}
So the frame expires before it is fully parsed, causing framePosition to be reset to 0 mid-way through parsing a frame and thus the CRC check will fail.

Metadata

Metadata

Assignees

Labels

Triaged βœ…This has been assessed and is ready to be added to the pipeline.🐞 Bug 🐞OH DEAR!!! You seem to have spotted a bug!

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions