Commit Graph

424 Commits

Author SHA1 Message Date
Michael du Breuil
8bd4f2b097 AP_RangeFinder: Allow the VL53L1X to be put into short range mode 2019-12-24 11:40:47 +11:00
Michael du Breuil
224ea744e3 AP_Rangefinder: Reset the VL53L1X before setup
A number of the config steps make the assumption they are running from
the sensors default power on state. If you do a soft reset of the
vehicle without killing power to the sensor this means the second time
you configure the sensor you will start from a state which didn't match
the base assumptions and can lead to the sensor preforming signficantly
differently then it was intended to. This issues a soft reset, and waits
for it to reboot before proceeding with configuration. If it's a
watchdog reset we don't want to spend long enough to have ensured the
sensor reset, so we say the sensor setup completely failed and don't use
it, as not using it will be less erroneous then using a misconfigured
sensor.
2019-12-24 11:40:47 +11:00
Randy Mackay
e12e0d95ae AP_RangeFinder: remove param conversion for 3rd and 4th
3rd and 4th instances were not available to users unless they used their own builds which is rare
this reduces the firmware's flash size a small amount
2019-12-03 13:06:10 +08:00
Randy Mackay
1b84c8132e AP_RangeFinder: param conversion fix
This resolves an issue with the parameter conversion when moving from Copter-3.6.x to 4.0 (and similar moves for other vehicle types)
2019-12-03 13:06:10 +08:00
Randy Mackay
0844077df8 AP_RangeFinder: TYPE param desc clarification for Benewake lidar
This renames some of the TYPE parameter's driver options:

19 :BenewakeTF02 is unchanged
20: BenewakeTFMini becomes BenewakeTFMini/Plus-Serial
25: BenewakeTFMiniPlus becomes BenewakeTFMini/Plus-I2C
27: BenewakeTF03 is unchanged
2019-11-13 10:28:17 +08:00
Randy Mackay
ae8f9a70d0 AP_RangeFinder: update Type and Pin parameter values
The _TYPE change is to remove the "v2" from the LidarLite description because both v2 and v3 are supported
The _PIN change is to make it more clear that any of the auxiliary pwm pins can be used for PWM input
2019-11-12 07:30:55 +08:00
Peter Barker
35e987c663 AP_RangeFinder: adjust for renaming of RangeFinder files 2019-11-12 07:14:37 +08:00
Peter Barker
7c9ab0203d AP_RangeFinder: rename source files to include AP_ prefix
This makes them look like most of our libraries
2019-11-12 07:14:37 +08:00
Peter Barker
b1f8982292 AP_RangeFinder: remove old AP_RangeFinder.h
Making way to move the actual header into place
2019-11-12 07:14:37 +08:00
Peter Barker
d0e62b0e0b AP_RangeFinder: serial subclasses rely on base class for update() 2019-11-09 08:01:53 +11:00
Peter Barker
60cbefc1ae AP_RangeFinder: move update function to serial base class 2019-11-09 08:01:53 +11:00
Peter Barker
b18f1a8e22 AP_RangeFinder: move uLanding to using common serial backend 2019-11-09 08:01:53 +11:00
Peter Barker
9829a1d08b AP_RangeFinder: move wasp to using common serial backend 2019-11-09 08:01:53 +11:00
Peter Barker
62f2f3e19e AP_RangeFinder: factor constructor, use to move Lanbao to serial baseclass 2019-11-09 08:01:53 +11:00
Peter Barker
acc1f955ef AP_RangeFinder: make Benewake backend use new intermediate class 2019-11-09 08:01:53 +11:00
Peter Barker
0246dd990e AP_RangeFinder: make MaxsonarSerialLV backend use new intermediate class 2019-11-09 08:01:53 +11:00
Peter Barker
ff7c5af437 AP_RangeFinder: make LeddarOne backend use new intermediate class 2019-11-09 08:01:53 +11:00
Peter Barker
15d3a59d67 AP_RangeFinder: make NMEA backend use new intermediate class 2019-11-09 08:01:53 +11:00
Peter Barker
82268ab12c AP_RangeFinder: make BLPing backend use new intermediate class 2019-11-09 08:01:53 +11:00
Peter Barker
692c89a972 AP_RangeFinder: make LightWareSerial backend use new intermediate class 2019-11-09 08:01:53 +11:00
Peter Barker
3538fe360b AP_RangeFinder: add intermediate serial backend class to share common code 2019-11-09 08:01:53 +11:00
Peter Barker
82db4383d4 AP_RangeFinder: use enum-class for Status 2019-11-09 08:01:53 +11:00
Peter Barker
1989decbc1 AP_RangeFinder: use enum-class for RangeFinder function 2019-11-09 08:01:53 +11:00
Peter Barker
db36ef3433 Sub: use enum-class for RangeFinder type 2019-11-09 08:01:53 +11:00
Peter Barker
ea26e94f66 AP_RangeFinder: use enum-class for RangeFinder type 2019-11-09 08:01:53 +11:00
Andrew Tridgell
76dd2f0838 AP_RangeFinder: fixed failover between rangefinders
this fixes the case where we have one rangefinder that can handle
short range and another that is good for long range but no good for
short range (quite common, eg radar and lidar)

If possible we want to use the first rangefinder that is in range for
the right orientation. If none are in range then use the first for the
orientation
2019-10-28 21:13:18 +11:00
Andrew Tridgell
5898dc757c AP_RangeFinder: use single precision string to float 2019-10-28 15:53:16 +11:00
Andrew Tridgell
2818151a39 AP_RangeFinder: disable some incompatible drivers for AP_Periph 2019-10-25 09:35:27 +11:00
Andrew Tridgell
ca1bd8be3c AP_RangeFinder: disable logging for AP_Periph 2019-10-21 19:12:01 +11:00
Andrew Tridgell
282936eab2 AP_RangeFinder: allow for less rangefinder instances
for AP_Periph
2019-10-21 19:12:01 +11:00
murata
000aa4f515 AP_RangeFinder: Add TF03-180 2019-10-15 10:07:53 +09:00
Lucas De Marchi
7520cdef2f AP_RangeFinder: update minimum fw version of TFMiniPlus
Version 2.0.3 has important fixes to avoid having the sensor to lock up.
Let's make sure we check for it and warn on console.
2019-09-23 12:56:13 +09:00
Lucas De Marchi
5f65033511 AP_RangeFinder: add missing overrides 2019-09-21 08:01:08 +10:00
Lucas De Marchi
ce877ba40a AP_RangeFinder: fix build 2019-09-21 08:01:08 +10:00
Andrew Tridgell
54b9524c0b AP_RangeFinder: make LightWare I2C native work with more hw versions
this allows the native i2c lightware driver to work with a wide range
of lidars from LightWare, removing the specific version check, and the
version specific config commands
2019-09-12 07:40:32 +10:00
Michael du Breuil
c12652b325 AP_Rangefinder: Remove stop pin usage 2019-09-04 09:54:50 +10:00
Andrew Tridgell
9c900c7176 AP_RangeFinder: added driver for Lanbao CM8JL65 2019-09-03 09:10:48 +10:00
Andrew Tridgell
172c802ffa AP_RangeFinder: support native I2C protocol on LightWare Lidars
this supports both the native and the legacy I2C protocol for
LightWare Lidars. The native protocol is a string based protocol that
is enabled by default on new Lidars. By supporting both protocols we
avoid the need for users to re-configure their new lidar using a
serial cable before using it on I2C.

This driver was originally written by Mitch Koch and Jonathan
Challinger, and ported to master by me (it required only minor
changes)
2019-09-02 07:20:22 +10:00
murata
4754710e60 RangeFinder: Change to coding style (NFC)
RangeFinder: RangeFinder: Change to coding style (NFC)
2019-08-23 10:11:30 +09:00
murata
851ee24c99 AP_RangeFinder: Clarify the purpose of input registers 2019-08-20 14:36:29 +01:00
murata
0b1987ae36 AP_RangeFinder: Use common hexadecimal to character number conversion method 2019-08-06 10:14:12 +10:00
Randy Mackay
01a713a812 AP_RangeFinder: param desc rename from PX4-PWM to just PWM
the PWM driver is available for many boards
2019-08-04 21:15:49 +10:00
Andrew Tridgell
0f6b8375bb AP_RangeFinder: added a 1.5 delay to probe of LW20 I2C
the LW20 takes a long time to boot and be ready to probe
2019-07-30 13:32:36 +10:00
Michael du Breuil
3202a2e0a6 AP_Rangefinder: Add arming checks 2019-07-30 10:42:16 +10:00
Randy Mackay
84b502b0c4 AP_RangeFinder: resolve gcs::send_text compiler warning 2019-07-30 09:02:39 +09:00
Randy Mackay
480a3ebb03 AP_RangeFinder: LightwareSerial driver handles invalid distances
reports the longer of 100m or RNGFNDx_MAX_CM+1m
2019-07-30 08:05:35 +09:00
Pierre Kancir
c4ec373b20 AP_RangeFinder: pass mavlink_message_t by const reference 2019-07-16 20:51:42 +10:00
Peter Barker
ac96461c6c AP_RangeFinder: use AP_SerialManager singleton 2019-07-16 09:29:48 +10:00
murata
d7b2271197 AP_RangeFinder: Common modbus crc method 2019-07-12 15:33:21 +10:00
Pierre Kancir
209b0300a5 AP_Rangefinder: fix compilation for Bebop 2019-06-14 18:56:05 -07:00