Skip to content

IMU uses wrong error value for checking errors #12

@drdeaton

Description

@drdeaton

Describe the bug
When using the okapi::IMU, sometimes pros::c::imu_get_euler gives an error value, setting errno. This results in the euler containing PROS_ERR_F values, but okapi::IMU::get() instead checks for PROS_ERR values, leading to the error not being handled properly.

Steps To Reproduce
Reset an IMU and try to use it before it finishes resetting.

Expected behavior
IMU::get() should return PROS_ERR_F

Versions
The bug was discovered while running OkapiLib 4.8.0 and PROS kernel 3.7.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions