Skip to content

Commit

Permalink
AP_RangeFinder: Allow new Maxsonar I2C reading even if reading fails
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabsingh3003 committed Oct 22, 2023
1 parent 27dde51 commit 7739361
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libraries/AP_RangeFinder/AP_RangeFinder_MaxsonarI2CXL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ bool AP_RangeFinder_MaxsonarI2CXL::get_reading(uint16_t &reading_cm)
if (ret) {
// combine results into distance
reading_cm = be16toh(val);

// trigger a new reading
start_reading();
}

// trigger a new reading
start_reading();

return ret;
}

Expand Down

0 comments on commit 7739361

Please sign in to comment.