Commit Graph

16188 Commits

Author SHA1 Message Date
Peter Barker
aca87ab638 AP_InertialSensor: remove pointless initialisations
AP_InertialSensor: avoid pointless zeroing in constructor

AP_InertialSensor is either in bss or is created via new (which zeroes
memory)
2018-04-04 12:14:02 +01:00
Peter Barker
355752ebb8 AP_AHRS: remove pointless initialisations
These are either in bss or new'd.

Saves ~130 bytes
2018-04-04 10:14:40 +01: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
Peter Barker
b7f1040dca DataFlash: do not log beacon if it is disabled 2018-04-04 16:20:33 +09:00
Randy Mackay
f6cf52a748 AC_Loiter: move defines to cpp 2018-04-04 10:45:10 +09:00
Randy Mackay
757a35f3ba AC_Loiter: consolidate sanity checks 2018-04-04 10:45:10 +09:00
Randy Mackay
9de73a994f AC_Circle: add get distance and bearing to target 2018-04-04 10:45:10 +09:00
Randy Mackay
9426ee6df6 AC_WPNav: remove loiter
Loiter is in separate AC_Loiter class
2018-04-04 10:45:10 +09:00
Randy Mackay
0ba22a1feb AC_WPNav: remove brake dependency on loiter 2018-04-04 10:45:10 +09:00
Randy Mackay
cc5ad7c004 AC_Loiter: loiter extracted from AC_WPNav 2018-04-04 10:45:10 +09:00
Alexey Bulatov
4d08ec8c85 AP_HAL: Edge: set storage directory to /edge/ardupilot 2018-04-04 09:29:16 +09:00
Francisco Ferreira
ac73fa9681
GCS_MAVLink: fix method shadowing 2018-04-03 16:29:33 +01:00
Peter Barker
4db9a5e6fe AP_HAL_SITL: remove cast to signed type
... we're currently taking an unsigned type, casting it to a signed type
and then comparing the result of that to an unsigned type.  That's
unhealthy.
2018-04-03 13:08:56 +01:00
Peter Barker
4fd2ec1cef GCS_MAVLink: factor vehicle's mavlink send_heartbeat 2018-04-03 13:05:19 +01:00
Michael du Breuil
a21eb12f9e AP_GPS: Correct HIL_GPS altitude conversion 2018-04-02 20:21:20 -07:00
Pierre Kancir
2b2c1e2d78 AP_NavEKF3: only use bcn EKF is the alignement as been completed 2018-04-03 09:55:13 +09:00
Pierre Kancir
44a21bc8ac EKF3: correct acos to acosf 2018-04-03 09:54:45 +09:00
Pierre Kancir
48c5a9b9c5 AP_NavEKF3: style change in BCN mesurements 2018-04-03 09:54:43 +09:00
Pierre Kancir
4d2f2a2aad AP_NavEKF3: correct flag in case of GPS disable 2018-04-03 09:54:41 +09:00
Peter Barker
1f862e8192 GCS_MAVLink: serial control: avoid nullptr dererences 2018-04-02 23:29:33 +01:00
Tom Pittenger
b864cd6ae6 AP_HAL_ChibiOS: include correct wrappers 2018-04-03 08:27:44 +10:00
Peter Barker
30f944b921 AP_AirSpeed: notify of calibration start 2018-04-02 23:25:05 +01:00
Peter Barker
d2ab76b2c6 GCS_MAVLink: calibrate airspeed sensor if it is present 2018-04-02 23:25:05 +01:00
Peter Barker
c6d7f5151a GCS_MAVLink: tidy handling of barometer calibrations 2018-04-02 23:25:05 +01:00
Peter Barker
1de68b78dc AP_Barometer: tidy handling of barometer calibrations 2018-04-02 23:25:05 +01:00
Peter Barker
d878690d00 GCS_MAVLink: move common calibration functions up 2018-04-02 23:25:05 +01:00
Peter Barker
2396a248ed AP_InertialSensor: use ahrs singleton for simple accelcal 2018-04-02 23:25:05 +01:00
Peter Barker
f6b7ca75e9 GCS_MAVLink: allow Plane to override method so it can set calib. flag 2018-04-02 23:25:05 +01:00
Peter Barker
09d4e36970 GCS_MAVLink: handle preflight calibrations 2018-04-02 23:25:05 +01:00
Peter Barker
c3e70e477d GCS_MAVLink: avoid using global chan to uart mapping
This is an instance method, so it has a pointer to its own
uart
2018-04-02 23:04:24 +01:00
Peter Barker
3781d2f2eb AP_SmartRTL: use ahrs singleton 2018-04-02 17:16:02 +01:00
Peter Barker
e33ce5eb48 AP_Follow: use ahrs singleton 2018-04-02 17:16:02 +01:00
Peter Barker
ac99d37bc1 DataFlash: correct logging interval of XKFD message 2018-04-02 14:12:09 +09:00
Peter Barker
32795f0a8f AP_Param: correct possible use of nullptr during param count
::first can return nullptr
2018-04-02 14:12:09 +09:00
Peter Barker
ac283fb032 DataFlash: narrow enumeration to uint8_t to avoid narrowing-warnings
/home/pbarker/rc/ardupilot/libraries/DataFlash/LogFile.cpp:1571:32:
error: non-constant-expression cannot be narrowed from type 'enum
LogMessages' to 'uint8_t' (aka 'unsigned char') in initializer list
[-Wc++11-narrowing]
        LOG_PACKET_HEADER_INIT(type),
2018-04-02 14:12:09 +09:00
Peter Barker
febcdd766b AP_Math: narrow enumeration to uint8_t to avoid narrowing-warnings
/home/pbarker/rc/ardupilot/libraries/DataFlash/LogFile.cpp:361:25:
error: non-constant-expression cannot be narrowed from type 'enum
Rotation' to 'uint8_t' (aka 'unsigned char') in initializer list
[-Wc++11-narrowing]
        orient1       : s0 ? s0->orientation() : ROTATION_NONE,
2018-04-02 14:12:09 +09:00
Peter Barker
2a274675f6 AP_AHRS: narrow enumeration to uint8_t to avoid narrowing-warnings 2018-04-02 14:12:09 +09:00
Peter Barker
871661c65f SITL: SIM_Vicon: use existing channel for packing messages
Also correct sending of Vicon message; too many bytes were sent
2018-04-02 09:23:27 +09:00
Peter Barker
42547d2d6d GCS_MAVLink: allow extra mavlink port for packing vicon messages 2018-04-02 09:23:27 +09:00
Peter Barker
7d271e0f3c AP_HAL_SITL: check return value of setsockopt 2018-04-02 09:23:27 +09:00
Michael du Breuil
5bd4091976 AP_HAL_SITL: Protect against nullpointer dereference 2018-03-31 16:15:48 +09:00
Peter Barker
c627ed6ae3 RangeFinder: remove divide-by-zero possibility 2018-03-31 16:14:09 +09:00
Randy Mackay
57f2eb6853 AR_AttitudeControl: minor comment fix 2018-03-31 14:47:30 +09:00
Randy Mackay
032b4373f6 AC_WPNav: removed brake's unused dt calc 2018-03-31 13:42:59 +09:00
Michael du Breuil
334ff0fb66 AC_AttitudeControl: Prevent DCM fallback from triggering a flyaway 2018-03-31 13:40:52 +09:00
Randy Mackay
428682c8e9 GCS_MAVLink: fix handling of global_vision_position_estimate 2018-03-30 18:21:48 +09:00
Dr.-Ing. Amilcar do Carmo Lucas
2f59572d42 AP_Beacon: Use multiplications instead of divisions in Marvelmind 2018-03-29 11:46:20 -07:00
Peter Barker
994e3e7092 SITL: SIM_Vicon: fix compiler warning 2018-03-29 16:45:34 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
24c1b0890d AP_BattMonitor: NFC improve coments 2018-03-28 17:01:33 +09:00
Randy Mackay
bb9b866c7f AP_BattMonitor: resolve compiler warning re init order 2018-03-28 15:08:54 +09:00