Commit Graph

35 Commits

Author SHA1 Message Date
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
Andrew Tridgell 7dcb5c60b0 AP_RangeFinder: use take_blocking instead of HAL_SEMAPHORE_BLOCK_FOREVER
this makes for cleaner and smaller code as the failure case is not
needed
2020-01-19 20:19:30 +11:00
Peter Barker 82db4383d4 AP_RangeFinder: use enum-class for Status 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
Randy Mackay a72477590f AP_RangeFinder: format fixes 2019-02-04 11:32:13 +09:00
Dmitri Ranfft 5eff01a86f RangeFinder: allow up to 10 range finders to be used at once 2019-02-04 11:08:47 +09:00
murata c8f93a3ddc RangeFinder: Added statement FALLTHROUGH 2018-10-30 09:13:29 +09:00
Nghia Nguyen 513eb1f5db AP_Rangefinder: Add support for Garmin LidarLite-V3HP 2018-10-27 11:22:57 +01:00
Randy Mackay 1b0f0a7559 AP_RangeFinder: support last_reading_ms
Benewake, LeddarOne, LightWareSerial, MAVLink, MaxsonarI2CXL, MaxsonarSerialLV, NMEA, PX4_PWM, uLanding and Wasp already stored the last read time so for these drivers, this change just moves that storage to the state structure
analog, BBB_PRU, Bebop, LightWareI2C, PulsedLightLRF, TeraRangerI2C, VL53L0X did not store the last read time so this was added
2018-08-28 09:23:38 +09:00
Peter Barker 30c4ea8123 AP_RangeFinder: stop storing sensor type as a variable
And change method name
2017-08-15 18:58:16 +01:00
Peter Barker c0aa10d84b AP_RangeFinder: move rangefinder backend data accessors to backend 2017-08-15 18:30:45 +01:00
Peter Barker 0b1c67d170 AP_RangeFinder: remove unused parameters from detect and constructors 2017-08-09 13:58:53 +01:00
Pierre Kancir 8b38bd2e33 AP_RangeFinder: add sensor type to backend 2017-06-08 01:22:07 +01:00
Andrew Tridgell 05cbc19ad6 AP_RangeFinder: added type 15 for LidareLiteV3 2017-03-01 22:44:37 +11:00
Andrew Tridgell df1da3c14e AP_RangeFinder: setup for split I2C transfers
this fixes PulsedLight Lidar on Linux
2017-02-23 22:38:15 -08:00
murata d9dbf6e1eb AP_OpticalFlow: Change from magic number 0 to definition name. 2017-02-18 14:12:36 +00:00
Lucas De Marchi 5472bc4de1 Global: change Device::PeriodicCb signature
Remove bool return as it's never being used and not supported on PX4.
2017-01-14 10:03:54 +11:00
Andrew Tridgell 6c09758447 AP_RangeFinder: removed momentary spikes in PulsedLight I2C Lidar 2016-11-21 10:30:04 +11:00
Andrew Tridgell 5f3c14ea01 AP_RangeFinder: fixed tabs -> spaces 2016-11-12 14:18:15 +11:00
Andrew Tridgell 0c7dd99d7e AP_RangeFinder: support LidarLite V2 using in-tree driver
needs to run in continuous mode
2016-11-12 14:18:14 +11:00
Andrew Tridgell a69ff34c80 AP_RangeFinder: try bus 0 and 1 for PulsedLightI2C rangefinder 2016-11-11 15:49:53 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Lucas De Marchi a372f33cc0 AP_RangeFinder: fix PulsedLightLRF detection
- Most of the boards use bus 1 for first I2C
    - If the bus doesn't exist, let the detect() method fail when it
      call start_reading(), because _dev would be invalid
2016-07-22 13:18:36 -03:00
Lucas De Marchi d653139c5d AP_RangeFinder: PulsedLightLRF: use be16toh 2016-07-22 13:10:51 -03:00
Lucas De Marchi c8094e2593 AP_RangeFinder: PulsedLightLRF: fix coding style
- sort headers
    - fix constructor
2016-07-22 13:10:51 -03:00
Murilo Belluzzo 0dc33410ff AP_RangeFinder_PulsedLightLRF: Fix driver after I2CDevice conversion
* Fix wrong semaphore->take check in ::get_reading
* Simplify semaphore releasing
* Fix typos and trailing whitespace
2016-07-22 13:10:51 -03:00
Luiz Ywata e1342eb533 AP_RangeFinder: PulsedLightLRF: use I2CDevice interface 2016-07-22 13:10:51 -03:00
Gustavo Jose de Sousa 5d39587469 AP_RangeFinder: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:23 +10:00
Randy Mackay e212ebb0d0 RangeFinder_PulsedLight: set status 2015-04-24 10:57:19 +09:00
akdslr a1861125e6 AP_RangeFinder_PulsedLightLRF: Modified to do a 2 byte transfer for the distance read 2014-07-24 14:41:54 +10:00
Andrew Tridgell 0063d83dbc AP_RangeFinder: convert the PulsedLight driver to new API
not tested yet
2014-07-08 15:07:50 +10:00
Andrew Tridgell 429431157b AP_RangeFinder: disable old rangefinder drivers
these will be re-enabled when they are converted to the new class API
2014-07-08 15:07:50 +10:00
akdslr a2df275bd9 AP_RangeFinder_PulsedLightLRF: Updated the register definitions for the new hardware 2014-07-08 15:07:49 +10:00
Randy Mackay 32820b4260 PulsedLightRFinder: read method returns int16_t 2014-02-10 14:58:27 +09:00
Randy Mackay e88251f7e1 RangeFinder: add PulsedLight LRF 2013-12-02 20:06:43 +09:00