diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarI2CXL.cpp b/libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarI2CXL.cpp index f1582ba794..19e5accf3d 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarI2CXL.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarI2CXL.cpp @@ -66,7 +66,7 @@ bool AP_RangeFinder_MaxsonarI2CXL::take_reading() } // read - return last value measured by sensor -int AP_RangeFinder_MaxsonarI2CXL::read() +int16_t AP_RangeFinder_MaxsonarI2CXL::read() { uint8_t buff[2]; int16_t ret_value = 0; diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarI2CXL.h b/libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarI2CXL.h index c1024f7f5a..e6e7d22182 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarI2CXL.h +++ b/libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarI2CXL.h @@ -29,7 +29,7 @@ public: bool take_reading(); // read value from sensor and return distance in cm - int read(); + int16_t read(); // heath bool healthy;