aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/trone/trone.cpp
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-12-13 18:28:18 +0100
committerLorenz Meier <lm@inf.ethz.ch>2014-12-14 12:10:29 +0100
commitcc2dae23f9a7c1bfe1a8f35cbbecff4f7466952a (patch)
tree66096351da3e6f43a4420f4144f5a744c1c6e0da /src/drivers/trone/trone.cpp
parent834ff859307b178faf25faecef1b2d29b7e17d6f (diff)
downloadpx4-firmware-cc2dae23f9a7c1bfe1a8f35cbbecff4f7466952a.tar.gz
px4-firmware-cc2dae23f9a7c1bfe1a8f35cbbecff4f7466952a.tar.bz2
px4-firmware-cc2dae23f9a7c1bfe1a8f35cbbecff4f7466952a.zip
trone: write min and max to report
Diffstat (limited to 'src/drivers/trone/trone.cpp')
-rw-r--r--src/drivers/trone/trone.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/trone/trone.cpp b/src/drivers/trone/trone.cpp
index dff86cf71..83b5c987e 100644
--- a/src/drivers/trone/trone.cpp
+++ b/src/drivers/trone/trone.cpp
@@ -558,6 +558,8 @@ TRONE::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 = crc8(val, 2) == val[2] && si_units > get_minimum_distance() && si_units < get_maximum_distance() ? 1 : 0;