File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ void Sensor::update() {
1818float Sensor::getVelocity () {
1919 // calculate sample time
2020 float Ts = (angle_prev_ts - vel_angle_prev_ts)*1e-6 ;
21- if (Ts<minDeltaT ) return velocity; // don't update velocity if deltaT is too small
21+ if (Ts < min_elapsed_time ) return velocity; // don't update velocity if Ts is too small
2222
2323 velocity = ( (float )(full_rotations - vel_full_rotations)*_2PI + (angle_prev - vel_angle_prev) ) / Ts;
2424 vel_angle_prev = angle_prev;
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ class Sensor{
105105 /* *
106106 * Minimum time between updates to velocity. If time elapsed is lower than this, the velocity is not updated.
107107 */
108- float minDeltaT = 0.000100 ; // default is 100 microseconds, or 10kHz
108+ float min_elapsed_time = 0.000100 ; // default is 100 microseconds, or 10kHz
109109
110110 protected:
111111 /* *
You can’t perform that action at this time.
0 commit comments