aboutsummaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-12-13 18:25:29 +0100
committerLorenz Meier <lm@inf.ethz.ch>2014-12-14 12:10:28 +0100
commit682f30afe60baf2b0d8e30c9bf9806f9f601444e (patch)
treec6576ff7b8c8eb4107284b670ec82e6ddb6dd91c /src/drivers
parent642b2088c3175cca24134233c181ad5331222f07 (diff)
downloadpx4-firmware-682f30afe60baf2b0d8e30c9bf9806f9f601444e.tar.gz
px4-firmware-682f30afe60baf2b0d8e30c9bf9806f9f601444e.tar.bz2
px4-firmware-682f30afe60baf2b0d8e30c9bf9806f9f601444e.zip
mb12xx: write min and max to report
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/mb12xx/mb12xx.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/mb12xx/mb12xx.cpp b/src/drivers/mb12xx/mb12xx.cpp
index beb6c8e35..9cf568658 100644
--- a/src/drivers/mb12xx/mb12xx.cpp
+++ b/src/drivers/mb12xx/mb12xx.cpp
@@ -520,6 +520,8 @@ MB12XX::collect()
report.timestamp = hrt_absolute_time();
report.error_count = perf_event_count(_comms_errors);
report.distance = si_units;
+ report.minimum_distance = get_minimum_distance();
+ report.maximum_distance = get_maximum_distance();
report.valid = si_units > get_minimum_distance() && si_units < get_maximum_distance() ? 1 : 0;
/* publish it, if we are the primary */