Works perfectly for 2 minutes then spins randomly

Here’s the answer… This worked!

Go to line 21 of the file src/common/base_classes/Sensor.cpp

At line 21, add these lines:

if (Ts < 0.0f) { // handle micros() overflow - we need to reset vel_angle_prev_ts
vel_angle_prev = angle_prev;
vel_full_rotations = full_rotations;
vel_angle_prev_ts = angle_prev_ts;
return velocity; }

1 Like