Commit Graph

491 Commits

Author SHA1 Message Date
Peter Barker 496267115c AP_RangeFinder: MAVLink: use larger of min ranges / smaller of max ranges 2021-01-06 15:33:41 +11:00
Peter Barker cba5f142a7 AP_RangeFinder: correct MAVLink backend's out-of-range checks 2021-01-06 15:33:41 +11:00
Peter Barker 223e775a3c AP_RangeFinder_MAVLink: only set sensor type if we accept a reading 2021-01-06 15:33:41 +11:00
Peter Barker 40eb9a8b99 AP_RangeFinder: do not start the mavlink rangefinder as healthy
Also takes the opportunity to clean things up a little
2021-01-06 15:33:41 +11:00
Andrew Tridgell 66c05bef76 AP_RangeFinder: added USD1 CAN driver
also known as uLanding CAN
2021-01-01 17:29:54 +11:00
murata 282590668d AP_RangeFinder: Make measurement time and call back time static constant
Co-authored-by: Pierre Kancir <pierre.kancir.emn@gmail.com>
2020-12-30 18:29:35 +11:00
Tatsuya Yamaguchi 4dc5162d0a AP_RangeFinder: change i2c reading frequency to 50Hz 2020-12-19 08:14:54 -03:00
ashvath 54708d916b AP_RangeFinder: TFminiPlus driver outputs init failure to ground station 2020-12-19 08:14:54 -03:00
Tatsuya Yamaguchi b0ee6393ae AP_RangeFinder: TFminiPlus: set frame rate to 250hz 2020-12-19 08:14:54 -03:00
Peter Barker 1c57eed66c AP_RangeFinder: remove unused voltage_mv_orient method
This is really backend-specific data and shouldn't be exposed
2020-12-06 16:49:43 +11:00
Andrew Tridgell 0c05e9a2e7 AP_RangeFinder: fixed handling of instance numbers
if a backend allocation failed then we could end up with the backend
being assigned to the wrong instance number. Switch to using
_add_backend() everywhere, and pass the instance number to
_add_backend() to ensure that it always uses the correct slot.

Also added comment explaining how num_sensors() works when we have a
sparse set of rangefinders configured
2020-12-01 10:53:08 +11:00
Brent McLaughlin e241433c89 AP_Rangefinder: change lightware lost signal timer to 20
The LightWare lost signal timer is set to 20 by the manufacturer.
2020-12-01 10:34:54 +11:00
murata bbc673c668 AP_RangeFinder: Change rangefinder number 10 to A 2020-11-17 11:46:25 +11:00
Lucas De Marchi 4be9b4171b AP_RangeFinder: TFMiniPlus: respect max configured via param
Do like other drivers do and cap the maximum reported value with what is
configured in the parameter.
2020-11-11 19:23:41 +11:00
Lucas De Marchi 0e63a833e9 AP_RangeFinder: TFMiniPlus: fix out-of-range returned a no-data
Other drivers consider that they received data even if the value is
reported as "out of range" by sensor. On the I2C driver for TFMiniPlus
we considered this case, too. However when the signal strength is very
low (and thus the distance would likely be out of range), we would end up
ignoring the new sample. With enough samples without any value this
would lead the status to turn to "NoData".
2020-11-11 19:23:41 +11:00
Peter Barker 914316a529 AP_RangeFinder: remove unused variables 2020-10-01 21:13:20 +10:00
Peter Barker dd8361ba33 AP_RangeFinder: remove default case from Rangefinder init switch
Allows the compiler to help the programmer fill in required code
2020-09-10 20:52:06 +10:00
yaapu bc21e505e3 AP_RangeFinder: aligned msp message data struct name to gps,baro and mag 2020-09-09 06:35:50 +10:00
Peter Barker 72b49efc78 AP_RangeFinder: create and use new AP_HAL::PWMSource object 2020-09-08 16:10:50 +10:00
Rajat Singhal e9b3c54e6d AP_Rangefinder: Add SITL option in param description 2020-09-02 17:25:43 +10:00
Andrew Tridgell 34430e9d6c AP_RangeFinder: allow separate enable of MSP rangefinder 2020-09-02 05:56:46 +10:00
Andrew Tridgell 84f7589f2d AP_RangeFinder: allow separate enable of MSP rangefinder 2020-09-02 05:56:46 +10:00
Andrew Tridgell 17173871a4 AP_RangeFinder: fixed non-MSP build 2020-09-02 05:56:46 +10:00
yaapu 699ffcbcd2 AP_RangeFinder: added support for MSP based range finders 2020-09-02 05:56:46 +10:00
Siddharth Purohit 6ef85dd7eb AP_RangeFinder: use AP_CANManager library 2020-08-19 17:31:09 +10:00
Iampete1 e18c195df4 AP_RangeFinder: add SITL backend 2020-08-05 18:24:36 +10:00
Andrew Tridgell 8d5c51748f AP_RangeFinder: fixed legacy parsing of 65436 for lightware i2c
some lidars will probe as legacy protocol and return 65436 as range
2020-07-30 11:25:05 +10:00
Iampete1 2adbaf1a1d AP_RangeFinder_NMEA: decode each sentence once 2020-07-29 17:40:03 +10:00
Randy Mackay 9c7f382392 AP_RangeFinder: remove unused set_rfnd_bit 2020-07-08 11:42:10 +09:00
Randy Mackay 613d2c2e0a AP_RangeFinder: LightWareSerial gets small comment 2020-07-06 13:57:43 +09:00
murata 98feb06183 AP_RangeFinder: Add GYUS42v2 to the TYPE item 2020-07-05 08:52:03 +10:00
Peter Barker 6ec497229b AP_RangeFinder: add serial support for GY-US42v2 rangefinder 2020-07-04 13:40:10 +10:00
Randy Mackay 429e70fb94 AP_RangeFinder: LightwareSerial uses nullptr for strtof 2020-07-01 13:00:48 +09:00
Randy Mackay 85c4db6896 AP_RangeFinder: LightwareSerial driver loses unnecessary initialisation 2020-07-01 13:00:48 +09:00
Randy Mackay cdbc0c782b AP_RangeFinder: add sf30d binary protocol support
Co-authored-by: Tatsuya Yamaguchi <susumu-336@hotmail.co.jp>
2020-07-01 13:00:48 +09:00
Tatsuya Yamaguchi ed14518634 AP_RangeFinder: TYPE param becomes enable flag 2020-06-18 12:30:00 +10:00
Henry Wurzburg f9b02a6814 AP_RangeFinder: HC-SR04: Add glitch filter 2020-06-02 09:58:53 +10:00
Peter Barker fc1ea612b1 AP_RangeFinder: add support for HC-SR04 rangefinder 2020-06-02 09:58:53 +10:00
Andrew Tridgell 2dcf8a3b08 AP_RangeFinder: cope with beyond max range with LightwareI2C 2020-06-02 08:49:38 +09:00
Peter Barker af80c4a29f AP_RangeFinder: remove move-to-error-state for LeddarOne driver
Just because there's a lot in your input buffer doesn't necessarily mean
the rangefinder is faulty.
2020-05-26 09:20:32 +10:00
Peter Barker 95f9769041 AP_RangeFinder: use new UARTDriver discard_input method 2020-05-26 09:20:32 +10:00
Henry Wurzburg 23e7e2d193 AP_RangeFinder: rename Benewake types for easier identification 2020-05-21 08:45:30 +09:00
Andrew Tridgell d16f31711e AP_RangeFinder: fixed mixing UAVCAN and non-UAVCAN rangefinders
UAVCAN rangefinders add themselves to the frontend drivers as the
devices appear. If they turn up before RangeFinder::init() is run then
this prevented init() from scanning for the other rangefinders as
num_instances is non-zero

This also fixes a race condition in updating num_instances in the
UAVCAN backend
2020-05-12 09:45:15 +10:00
Andrew Tridgell 603e5c4b55 AP_RangeFinder: added get_address()
allows AP_Periph to supply sensor_id for multiple CAN rangefinders
2020-05-11 18:36:46 +10:00
Andrew Tridgell ffe9fa22a1 AP_RangeFinder: invalidate param count when changing param tree structure 2020-04-29 07:36:55 +10:00
Andrew Tridgell b102fd6b59 AP_RangeFinder: use GCS_SEND_TEXT() 2020-04-29 07:36:55 +10:00
Peter Barker b7a03ae5ad AP_RangeFinder: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker adcfb60850 AP_RangeFinder: comment out no-loner-used PX4 enum entry 2020-02-12 21:18:47 +11:00
Peter Barker 6febbcdc13 AP_RangeFinder: remove incorrect and misleading comment
Wrong on several counts.  detect calls this method.  The constructor
doesn't initialise the rangefinder.  detect doesn't return boolean.
2020-02-12 21:18:47 +11:00
Patrick José Pereira a183d00b7e AP_RangeFinder: BLPing: Rework class to work with new firmware version 3.28
- Uses the continuous message request

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-02-11 11:49:11 -05:00