Commit Graph

41 Commits

Author SHA1 Message Date
Sebastian Quilter 0f7c3e3964 AP_RangeFinder: make rangefinder ranges m rather than cm 2021-10-21 21:28:53 +11: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
Randy Mackay e5c3a7f7b5 AP_RangeFinder: typo fix for LeddarOne 2020-01-23 16:24:33 +11:00
Peter Barker d0e62b0e0b AP_RangeFinder: serial subclasses rely on base class for update() 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 82db4383d4 AP_RangeFinder: use enum-class for Status 2019-11-09 08:01:53 +11:00
murata 851ee24c99 AP_RangeFinder: Clarify the purpose of input registers 2019-08-20 14:36:29 +01: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
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
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
Francisco Ferreira 146143ff2e AP_Rangefinder: adapt to new serial manager enum name
Lidar is now called Rangefinder
2018-02-28 08:04:16 +09:00
Francisco Ferreira 45531775cd AP_Rangefinder: support multiple serial rangefinders 2018-02-28 08:04:16 +09:00
Lucas De Marchi 7b0d6166e1 AP_RangeFinder: use FALLTHROUGH define
When falling through on a case switch, allow to add an empty statement
with the correct attribute to tell the compiler this behavior is
intended.
2017-08-22 23:59:13 -07: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 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
Randy Mackay 0dd7e78c2b RangeFinder: fix to suppressing comment for case fall through
no functional change
eclipse stops complaining if no-break is used in place of fall-through
2016-12-14 13:22:31 +09:00
ShingoMatsuura e9feb7bdda AP_RangeFilnder: moved the const buffer definition to the header and changed from '8' to 'sizeof(send_request_buffer)' 2016-11-23 10:28:38 -08:00
ShingoMatsuura f97ede9865 AP_RangeFilnder: change send_request_buffer member variable to const and other fixes 2016-11-23 10:28:38 -08:00
ShingoMatsuura e8ff156fa6 AP_RangeFilnder: add clear buffer at INIT state and change send_buffer to member variable to reduce CRC computation for sending request 2016-11-23 10:28:38 -08:00
ShingoMatsuura c1c643e56e AP_RangeFinder: remove clear buffer in send_request 2016-11-23 10:28:38 -08:00
Shingo Matsuura ceaa9474ed AP_RangeFinder: change enum name, add "state" word 2016-11-06 05:22:30 -08:00
Shingo Matsuura 4329cdbf2c AP_RangeFinder: change comment about fall through LEDDARONE_MODBUS_INIT case 2016-11-06 05:22:30 -08:00
Shingo Matsuura 3b8d36314c AP_RangeFinder: add comment about no break at LEDDARONE_MODBUS_INIT case 2016-11-06 05:22:30 -08:00
Shingo Matsuura 0eeca3ee0b AP_RangeFinder: remove case indent 2016-11-06 05:22:30 -08:00
Shingo Matsuura 4ca1eefd50 AP_RangeFinder: change magic numbers to define 2016-11-06 05:22:30 -08:00
Shingo Matsuura 6254787186 AP_RangeFinder: remove break in LEDDARONE_MODOBUS_INIT case and and use () around (read_len == 0) for clarity 2016-11-06 05:22:30 -08:00
Shingo Matsuura 5e5a806979 AP_RangeFinder: modified regarding to advices from @magicrub - san. 2016-11-06 05:22:30 -08:00
Shingo Matsuura 4b127edd5e AP_RangeFinder: fixed LeddarOne busy wait 2016-11-06 05:22:30 -08: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
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
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
ShingoMatsuura 3123bd6d7d AP_RangeFinder: add LeddarOne support 2016-09-19 13:25:35 +09:00