diff --git a/include/pros/imu.h b/include/pros/imu.h index f5a1cdc3d..9b8aedf65 100644 --- a/include/pros/imu.h +++ b/include/pros/imu.h @@ -29,7 +29,8 @@ namespace c { #endif typedef enum imu_status_e { - E_IMU_STATUS_CALIBRATING = 0x01, + E_IMU_STATUS_READY = 0, // IMU is connected but not currently calibrating + E_IMU_STATUS_CALIBRATING = 19, // IMU is calibrating E_IMU_STATUS_ERROR = 0xFF, // NOTE: used for returning an error from the get_status function, not that the IMU is // necessarily in an error state } imu_status_e_t; diff --git a/src/devices/vdml_imu.cpp b/src/devices/vdml_imu.cpp index 948c1294f..f4eddf3f3 100644 --- a/src/devices/vdml_imu.cpp +++ b/src/devices/vdml_imu.cpp @@ -62,7 +62,7 @@ pros::c::imu_status_e_t Imu::get_status() const { } bool Imu::is_calibrating() const { - return get_status() & pros::c::E_IMU_STATUS_CALIBRATING; + return get_status() == pros::c::E_IMU_STATUS_CALIBRATING; } std::int32_t Imu::tare_heading() const {