Browse Source

AP_RangeFinder: benewake tfmini always provide cm distances

a misunderstanding of the datasheet led to the mistaken idea that while in short-range-mode the distances were returned in millimeters
master
Randy Mackay 6 years ago
parent
commit
6816262e3d
  1. 4
      libraries/AP_RangeFinder/AP_RangeFinder_Benewake.cpp

4
libraries/AP_RangeFinder/AP_RangeFinder_Benewake.cpp

@ -121,10 +121,6 @@ bool AP_RangeFinder_Benewake::get_reading(uint16_t &reading_cm)
// this reading is out of range // this reading is out of range
count_out_of_range++; count_out_of_range++;
} else if (model_type == BENEWAKE_TFmini) { } else if (model_type == BENEWAKE_TFmini) {
// TFmini has short distance mode (mm)
if (linebuf[6] == 0x02) {
dist *= 0.1f;
}
// no signal byte from TFmini so add distance to sum // no signal byte from TFmini so add distance to sum
sum_cm += dist; sum_cm += dist;
count++; count++;

Loading…
Cancel
Save