diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_Benewake.cpp b/libraries/AP_RangeFinder/AP_RangeFinder_Benewake.cpp index b1ebab01aa..e3e366495d 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_Benewake.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder_Benewake.cpp @@ -105,12 +105,12 @@ bool AP_RangeFinder_Benewake::get_reading(uint16_t &reading_cm) // if buffer now has 9 items try to decode it if (linebuf_len == BENEWAKE_FRAME_LENGTH) { // calculate checksum - uint16_t checksum = 0; + uint8_t checksum = 0; for (uint8_t i=0; i= BENEWAKE_DIST_MAX_CM) {