bristlemouth / bm_protocol

Primary Bristlemouth firmware repository
https://www.bristlemouth.org/
Apache License 2.0
10 stars 7 forks source link

fix: Handle RBR reading simultaneous with probeType #129

Closed towynlin closed 3 months ago

towynlin commented 3 months ago

We noticed in some logs that we would sometimes drop an RBR sensor reading when it lined up with our periodic checking of the RBR type. In order to ensure we keep all valid sensor readings, this change reads from the RBR sensor in exactly one place in the code (rather than two different places previously). It correctly handles either a sensor reading or a command response no matter when they arrive.

The bulk of the changes are in rbr_sensor.cpp: