drivers: refactor trone driver to work with Evo

This commit changes old trone driver into a generic
TeraRanger driver that supports both TeraRanger One
and TeraRanger Evo.

As a part of the change a new parameter was created
SENS_EN_TRANGER that allows to specify the following
modes of operation:

0 - sensors disabled
1 - autodetect sensors
2 - use TeraRanger One rangefinder
3 - use TeraRanger Evo rangefinder

Signed-off-by: Mateusz Sadowski <msadowski90@gmail.com>
This commit is contained in:
Mateusz Sadowski
2017-09-14 14:19:42 +02:00
committed by Nuno Marques
parent d5f8a300df
commit e439070f25
14 changed files with 140 additions and 88 deletions

View File

@@ -322,9 +322,10 @@ then
fi
# teraranger one tof sensor
if param compare SENS_EN_TRONE 1
if param compare SENS_EN_TRANGER 0
then
trone start
else
teraranger start
fi
# Wait 20 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)