We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b336cf commit 9fd6621Copy full SHA for 9fd6621
src/common/base_classes/Sensor.cpp
@@ -6,6 +6,8 @@
6
7
void Sensor::update() {
8
float val = getSensorAngle();
9
+ if (val<0) // sensor angles are strictly non-negative. Negative values are used to signal errors.
10
+ return; // TODO signal error, e.g. via a flag and counter
11
angle_prev_ts = _micros();
12
float d_angle = val - angle_prev;
13
// if overflow happened track it as full rotation
0 commit comments