Skip to content

[BUG] Velocity doesnt go to 0 when stationary #533

Description

@Quenom

Describe the bug
when motor is stationary velocity doesnt go to 0

SC60228 sensor
pipico

Platformio

seems like this code is to blame

if (fabsf(delta_angle) > 1e-8f) {
    velocity = delta_angle / Ts;

    vel_angle_prev = angle_prev;
    vel_full_rotations = full_rotations;
    vel_angle_prev_ts = angle_prev_ts;
}

return velocity;

in Sensor.cpp:GetVelocity()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions