From e1fabadd3c167663a6971122ddf1e055e1f23892 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Mon, 10 Feb 2014 14:59:46 +0900 Subject: [PATCH] MaxsonarI2C: read method returns int16_t --- libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarI2CXL.cpp | 2 +- libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarI2CXL.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;