Commit Graph

26 Commits

Author SHA1 Message Date
Randy Mackay cf020e1d84 AP_Proximity: minor spelling fix for SF40c assert 2020-10-06 20:52:29 +11:00
Randy Mackay 2ca0d400a6 AP_Proximity: remove incorrect comment from SF40c 2020-07-06 13:54:17 +09:00
Rishabh 9b5922786e AP_Proximity: Push 3D data into OA_DB 2020-06-19 09:45:34 +09:00
Peter Barker 788e466c90 AP_Proximity: LightWareSF40C used intermediate serial class 2020-02-19 11:12:37 +09:00
Randy Mackay dac84f4a9d AP_Proximity: integrate oadb ekf-offset change 2020-01-01 13:38:41 +09:00
Randy Mackay 10108819b1 AP_Proximity: sf40c combines seven readings for oadb 2020-01-01 13:38:41 +09:00
Randy Mackay 1d6519af72 AP_Proximity: always use 8 sectors and fix ignore areas 2020-01-01 13:38:41 +09:00
Randy Mackay f60ec91993 AP_Proximity: remove unnecessary const from database_push
also shorten current_vehicle_bearing argument to just current_heading
2020-01-01 13:38:41 +09:00
Randy Mackay 49069c7ad5 AP_Proximity: new lightware SF40C driver
New driver using latest streaming interface
Old driver left in place because older devices cannot be updated
2019-11-15 12:25:53 +08:00
Randy Mackay a747610fc1 AP_Proximity: backup lightware SF40C driver to v09 2019-11-15 12:25:53 +08:00
Peter Barker 8fe16f5627 AP_Proximity: use enum class for status 2019-10-31 11:58:15 +08:00
Peter Barker 4962b7a98e AP_Proximity: stop passing serial manager around, use singleton 2019-10-31 11:58:15 +08:00
Andrew Tridgell c7fce7568e AP_Proximity: use strtof instead of atof
we don't need double precision
2019-10-28 15:53:16 +11:00
Andrew Tridgell a4258639c8 AP_Proximity: use strtol instead of sscanf 2019-08-27 15:40:43 +10:00
Tom Pittenger b8dcdca909 AP_Proximity: add Object Avoidance Database, remove old Sector->Location converter 2019-08-02 09:50:13 -06:00
Peter Barker 51991fdd76 AP_Proximity: fix compilation warning in LightWare driver
../../libraries/AP_Proximity/AP_Proximity_LightWareSF40C.cpp: In member
function ‘void AP_Proximity_LightWareSF40C::request_new_data()’:
../../libraries/AP_Proximity/AP_Proximity_LightWareSF40C.cpp:235:6:
warning:
‘__builtin___snprintf_chk’ output may be truncated before the last
format
character [-Wformat-truncation=]
 void AP_Proximity_LightWareSF40C::request_new_data()
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:862:0,
                 from ../../libraries/AP_Common/AP_Common.h:179,
                 from ../../libraries/AP_HAL/UARTDriver.h:5,
                 from ../../libraries/AP_HAL/HAL.h:11,
                 from ../../libraries/AP_HAL/AP_HAL_Main.h:19,
                 from ../../libraries/AP_HAL/AP_HAL.h:8,
                 from
../../libraries/AP_Proximity/AP_Proximity_LightWareSF40C.cpp:16:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note:
‘__builtin___snprintf_chk’ output between 10 and 16 bytes into a
destination
of size 15
        __bos (__s), __fmt, __va_arg_pack ());
                                            ^
../../libraries/AP_Proximity/AP_Proximity_LightWareSF40C.cpp: In member
function ‘bool
AP_Proximity_LightWareSF40C::send_request_for_distance()’:
../../libraries/AP_Proximity/AP_Proximity_LightWareSF40C.cpp:275:6:
warning:
‘__builtin___snprintf_chk’ output may be truncated before the last
format
character [-Wformat-truncation=]
 bool AP_Proximity_LightWareSF40C::send_request_for_distance()
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:862:0,
                 from ../../libraries/AP_Common/AP_Common.h:179,
                 from ../../libraries/AP_HAL/UARTDriver.h:5,
                 from ../../libraries/AP_HAL/HAL.h:11,
                 from ../../libraries/AP_HAL/AP_HAL_Main.h:19,
                 from ../../libraries/AP_HAL/AP_HAL.h:8,
                 from
../../libraries/AP_Proximity/AP_Proximity_LightWareSF40C.cpp:16:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note:
2018-04-04 18:04:57 +09:00
Holger Steinhaus 5af02dde59 AP_Proximity: fix possible overflow/truncation issue 2018-03-16 22:37:16 +01:00
Randy Mackay d636e85eac AP_Proximity: SF40c driver treats zero distances as invalid 2017-07-08 14:09:17 +09:00
Randy Mackay 74f1899aeb AP_Proximity: boundary_points requires only one valid distance
Object avoidance is possible with just one valid distance
Boundary is initialised in new init_boundary function to be 100m from
vehicle
If sectors do not have valid distance measurements, we use the distance
from adjacent sectors.  This conveniently leads to a concave shaped
boundary that keeps the vehicle from travelling into the dataless sector.
2017-01-11 21:48:23 +09:00
murata c2521dd650 AP_Proximity: Change sprintf method to secure snprintf method. 2017-01-07 02:33:46 +00:00
Randy Mackay 57ae14ab4c AP_Proximity: add get distances, distance_max, distance_min
These are used to send distance-sensor messages to the ground station
2016-11-27 15:05:45 +09:00
Randy Mackay 6293fa1595 AP_Proximity: add boundary points for object avoidance
This returns a fence which can be used for object avoidance by AC_Avoidance
2016-11-27 15:05:35 +09:00
Randy Mackay 26332251f5 AP_Proximity: add ignore areas
Only SF40c uses these ignore areas for now at least.
It is safe to increase the eeprom locations for the 2nd proximity instance because we only define a single instance.
2016-11-27 15:05:27 +09:00
Randy Mackay f594a5a7d6 AP_Proximity: move sectors to backend
This prepares for sectors to be re-used by the SITL driver
2016-11-27 12:03:01 +09: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
Randy Mackay c3087edbe8 AP_Proximity: add library and SF40C driver 2016-10-13 20:21:07 +09:00