Skip to content

Implement a non-blocking read in USBInteface.cpp #23

@JimsterCoder

Description

@JimsterCoder

It would be better, it seems, to not block when reading the data from the Teensy.
This was as issue when I slowed the LBC CAN messages down to about 5/sec from each battery, (instead of 200/sec), but had the buffer size set to 1024. (each message is 25 bytes). BC would hang for several seconds waiting for USB data. This has been remedied by changing the buffer size to 64.
I'm led to believe that the OS (driver) is buffering anyway, so there's little chance of actually losing data but it would be more proper to not block when reading. A quick look for a solution reveals that it is not a trivial change so should be done soon-ish.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions