Commit Graph

210 Commits

Author SHA1 Message Date
ShingoMatsuura 8432c5fb4a AP_RangeFinder: remove number_detections member variable and add number_detections reference argument to parse_response 2016-10-11 07:56:37 -03:00
ShingoMatsuura 43f2482abd AP_RangeFinder: modify spelling and change C type cast to static_cast 2016-10-11 07:56:37 -03:00
ShingoMatsuura 6123fad124 AP_RangeFinder: change error and ok status defines to LeddarOne_Status enum 2016-10-11 07:56:37 -03:00
Lucas De Marchi ae53920e5b build: don't build examples with old build system
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file.  Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
murata d58c193c90 AP_RangeFinder: To define the OK status to LEDDARONE status. 2016-09-25 17:46:22 -07:00
murata 3a1cd20f11 AP_RangeFinder: To move to the place that use the variable definition for the first time. 2016-09-22 08:41:21 +09:00
Tom Pittenger 5512b6de02 AP_RangeFinder: Cleanup and added comments
- uart->available(); returns uint32 but was stored locally as int32 and treated as uint32. Now stored correctly as uint32
- some variables were set to zero at start of function, then reset to zero before being used. wasted work
2016-09-21 10:45:25 +09:00
Tom Pittenger e928e20b11 AP_RangeFinder: Ensure no divide by zeros in LeddarOne
Having a critical divide by value as a class member that could change external to the function using it is fragile. It was not very obvious that a divide by zero was not possible in the current design, now it's very obvious and safer in case the code changes later.
2016-09-21 10:45:23 +09:00
Randy Mackay f94f7e2aa0 AP_RangeFinder: add leddarone to TYPE parameter description
No functional change
2016-09-19 14:35:41 +09:00
ShingoMatsuura 3123bd6d7d AP_RangeFinder: add LeddarOne support 2016-09-19 13:25:35 +09:00
Peter Barker 2844190e5b AP_RangeFinder: correct DisplayName comments 2016-08-01 09:55:25 -03:00
Peter Barker 1bb73383ec AP_RangeFinder: group _ADDR with other first-rangefinder params 2016-08-01 09:55:24 -03:00
Peter Barker d5ffc8a863 AP_RangeFinder: define 3_ADDR when we have three rangefinders
Without this patch this field would only be defined when 4 rangefinders
were specified
2016-08-01 09:55:24 -03:00
Lucas De Marchi a159eedd8c AP_RangeFinder: fix bus for Lightware on some boards 2016-07-26 00:52:54 -03:00
Jonathan Challinger 4dfb277683 AP_RangeFinder: fix LightwareI2C conversion to I2CDevice 2016-07-26 00:52:54 -03:00
Lucas De Marchi 4ab1d7cf41 AP_RangeFinder: MaxsonarI2CXL: add some fixes
- coding style changes and some renames
   - fix bus number
   - use be16toh
2016-07-22 13:18:37 -03:00
Murilo Belluzzo f2d5eb9a97 AP_RangeFinder_MaxsonarI2CXL: Fix driver after I2CDevice conversion
* Simplify semaphore releasing logic
* Fix typo
2016-07-22 13:18:37 -03:00
Luiz Ywata c167364fa0 AP_RangeFinder: MaxsonarI2CXL: use I2CDevice interface 2016-07-22 13:18:37 -03:00
Lucas De Marchi ae259bc563 AP_RangeFinder: LightWareI2C: allow detect method to fail
If bus isn't found, allow the detect() method to fail.
2016-07-22 13:18:37 -03:00
Lucas De Marchi 0193517f30 AP_RangeFinder: LightWareI2C: use be16toh
While at it remove some trailing whitespaces and little reformats.
2016-07-22 13:18:36 -03:00
Murilo Belluzzo 66fdfbb850 AP_RangeFinder_LightWareI2C: Fix driver after I2CDevice conversion
* Fix semaphore not being released in ::get_reading
* Simplify semaphore releasing logic
* Fix typo
2016-07-22 13:18:36 -03:00
Luiz Ywata 49d1520850 AP_RangeFinder: LightWareI2C: use I2CDevice interface 2016-07-22 13:18:36 -03: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
Luiz Ywata a7fddc0594 AP_RangeFinder: add method _add_backend()
Wrapper method that saves a detected driver
2016-07-22 13:10:51 -03:00
Andrew Tridgell e0047d81a2 AP_RangeFinder: enable sonar on Disco 2016-07-20 13:38:18 +10:00
Andrew Tridgell 50958bc026 AP_RangeFinder: fixed typo 2016-07-01 15:35:39 +10:00
Ricardo de Almeida Gonzaga 2ee6a85e67 AP_RangeFinder: Fix typos 2016-05-13 19:20:05 -03:00
Randy Mackay 53785d1f72 AP_RangeFinder: add Bebop and MAVLink types
Thanks OXINARF!
2016-05-04 15:00:48 +09:00
Randy Mackay 96f665061e AP_RangeFinder: call handle_msg for all backends 2016-05-04 12:10:58 +09:00
Randy Mackay 9b940687c1 AP_RangeFinder: rename CompanionComputer files to MAVLink 2016-05-04 12:10:58 +09:00
Randy Mackay c541cb27f8 AP_RangeFinder: rename CompanionComputer to MAVLink 2016-05-04 12:10:58 +09:00
Allan Matthew d3831e4a5d RangeFinder: add MAVLink rangefinder 2016-05-04 12:10:58 +09:00
Julien Beraud 33a699f29c AP_RangeFinder: Add support for bebop Rangefinder
This rangefinder uses an spi device to send pulses and an iio driver
in buffer mode to get data
The data is then analyzed and the maximum pulse received is considered to
represent the echo of the pulses that have been sent. The distance in time
between the pulse that is sent and the pulse with the maximum amplitude
is used to calculate the altitude based on the speed of sound.

There is a dependency with libiio, and in order to build, there is a need
to provide a rootfs that includes libiio.a.
The other solution is to build dynamically after having updated the rootfs
to use on compiled with a more recent toolchain and include libiio
2016-05-03 16:43:39 -03:00
Ricardo de Almeida Gonzaga 5bd034a5a8 Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
Tom Pittenger 6718241dad cleanup comments 2016-03-29 05:32:28 -07:00
Lucas De Marchi f6712c8bc4 AP_RangeFinder: replace header guard with pragma once 2016-03-16 18:40:43 +11:00
Tom Pittenger b1ea82079e AP_Rangefinder: compiler warning float to double on atof()
- this is horribly inefficient so better to change the parsing
2016-02-29 10:26:31 -08:00
Tom Pittenger 786d14cd3c AP_RangeFinder: For LightWareSerial, write 'd' to support more devices 2016-02-14 16:05:50 -08:00
Gustavo Jose de Sousa c2e3f05dbf waf: ardupilotwaf: prefix build context methods with ap_
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa 3d22490397 waf: examples: use methods from bld instead of ardupilotwaf 2016-01-22 20:10:29 -02:00
mirkix 2d9b230be1 AP_RangeFinder: Load .data section for HC-SR04 PRU driver used by BBBMINI
This adds .data section loading to the HC-SR04 range finder driver used by
BBBMINI. The firmware is running inside a PRU. It is necessary to develop more
complex driver software inside the PRU.
2016-01-21 14:02:41 -02:00
Gustavo Jose de Sousa d281067bcc waf: make example binaries be placed in 'examples' dir
This commit makes examples' wscripts use ardupilotwaf.example() instead of
ardupilot.program().
2016-01-15 16:46:41 -02:00
Jonathan Challinger 780d0de4bb AP_RangeFinder: fix example build 2015-12-29 10:46:35 -08:00
Lucas De Marchi a096703b06 Global: don't link with AP_Progmem
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Lucas De Marchi fb24056ca9 AP_RangeFinder: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:44 +11:00
Caio Marcelo de Oliveira Filho 6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00