diff --git a/include/lemlib/devices/gyro/imu.hpp b/include/lemlib/devices/gyro/imu.hpp index 73a4a20a..d59be1d2 100644 --- a/include/lemlib/devices/gyro/imu.hpp +++ b/include/lemlib/devices/gyro/imu.hpp @@ -18,7 +18,7 @@ class Imu : public Gyro { * * @param imu reference to the pros imu to use */ - Imu(pros::Imu& imu); + Imu(const pros::Imu& imu); /** * @brief Calibrate the IMU * diff --git a/src/lemlib/devices/gyro/imu.cpp b/src/lemlib/devices/gyro/imu.cpp index 9f859b31..a5806200 100644 --- a/src/lemlib/devices/gyro/imu.cpp +++ b/src/lemlib/devices/gyro/imu.cpp @@ -18,7 +18,7 @@ Imu::Imu(uint8_t port) * Takes a reference to a pros Imu to be used. Pros imu is then constructed in an * initializer list */ -Imu::Imu(pros::Imu& imu) +Imu::Imu(const pros::Imu& imu) : imu(imu) {} /**