Commit Graph

16050 Commits

Author SHA1 Message Date
Andrew Tridgell
3cd5386a7e AP_OpticalFlow: support ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
3b5f66fd9f AP_FlashStorage: fixed size of flash storage 2018-01-15 11:46:02 +11:00
Andrew Tridgell
0bfbc4bf72 AP_FlashStorage: added re_initialise() API 2018-01-15 11:46:02 +11:00
Andrew Tridgell
d1fd843539 AP_IOMCU: support IMU heater 2018-01-15 11:46:02 +11:00
Andrew Tridgell
1568f578d7 AP_IOMCU: added retries on event failure 2018-01-15 11:46:02 +11:00
Andrew Tridgell
9b9b4a169e AP_IOMCU: fixed build on systems without IO MCU 2018-01-15 11:46:02 +11:00
Andrew Tridgell
71a47303b4 AP_IOMCU: support servo voltage and rssi 2018-01-15 11:46:02 +11:00
Andrew Tridgell
bb3ed9d6a3 AP_IOMCU: added APIs for RC input 2018-01-15 11:46:02 +11:00
Andrew Tridgell
ceeade5822 AP_IOMCU: added periodic reading of RC input 2018-01-15 11:46:02 +11:00
Andrew Tridgell
06322da4e2 AP_IOMCU: added setting of output rates 2018-01-15 11:46:02 +11:00
Andrew Tridgell
39f60adcd7 AP_IOMCU: initial implementation of PWM and safety 2018-01-15 11:46:02 +11:00
Andrew Tridgell
0c01ae1223 AP_IOMCU: started on MCU IO library 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f37d1e3363 AP_RAMTRON: added RAMTRON fram device driver
for parameter storage on most stm32 boards
2018-01-15 11:46:02 +11:00
Andrew Tridgell
39362a81ae AP_InertialSensor: support ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
391affc02d AP_HAL: support ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
5d9fa7f85b AP_Compass: support ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
c8c563f90d AP_Baro: support ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f8bea3af14 AP_BattMonitor: support ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
accac344f2 AP_BoardConfig: support ChibiOS as well as NuttX
allow for board detection with ChibiOS
2018-01-15 11:46:02 +11:00
Andrew Tridgell
8b6bab7b17 HAL_Chibios: added ChibiOS HAL
this is based on initial work by Sid, reset here for easier merging
2018-01-15 11:46:02 +11:00
Michael du Breuil
8ef7e61066 AP_HAL_SITL: Spam u-blox NAV-SVINFO at 0.1Hz
This resolves EKF3 being hung on launch
2018-01-13 10:13:00 +09:00
Leonard Hall
eb6ab53f6c AP_Motors: fix optimum thrust calcs 2018-01-13 10:06:11 +09:00
Randy Mackay
4d0c24f4eb AC_WPNav: RFND_USE param desription update 2018-01-12 16:50:00 +09:00
Leonard Hall
cddd815a75 AC_AttitudeControl: comment thrust_heading_rotation_angles
non-functional change
2018-01-12 15:20:47 +09:00
Randy Mackay
86cbc445bd AP_Compass: ICM20948 default rotation to Pitch180Yaw90 2018-01-12 08:16:41 +09:00
Randy Mackay
5e90cdbf59 AR_AttitudeControl: parameter desc range increase
new steering controller can use higher FF and zero P
2018-01-12 08:15:34 +09:00
Leonard Hall
3e0c24adf9 AC_PosControl: remove out-of-date comments 2018-01-11 21:18:34 +09:00
Peter Barker
18d7d3f038 DataFlash: add missing FALLTHROUGH declarations 2018-01-11 13:23:06 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
596119bca3 GCS_MAVLink: do not use hardcoded array sizes 2018-01-11 09:52:13 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
24ad9e9dff GCS_MAVLink: Adapt to upstream mavlink changes in autopilot_version message 2018-01-11 09:52:13 +11:00
Tom Pittenger
36f06d3576 AP_InertialSensor: remove AP_InertialSensor_UserInteract
leftover dead code from when CLI was removed
2018-01-11 08:11:07 +11:00
Peter Barker
8d7c710e9b GCS_MAVLink: panic in SITL if unknown message sent 2018-01-10 19:11:15 +00:00
Michael du Breuil
5fedc65efb AP_Airspeed: Allow specifying the MS5525 address 2018-01-10 17:49:35 +00:00
Andrew Tridgell
e5813effff RC_Channel: improved efficiency of min_max_configured
this is quite a costly function due to scan in AP_Param. It takes
about 4 to 5 milliseconds when done as part of AP_Arming
2018-01-10 16:42:51 +09:00
Peter Barker
404e395880 DataFlash: avoid declarations of SITL-only functions 2018-01-09 23:21:58 +00:00
Peter Barker
fd0aa3c659 DataFlash: add validation for Log_Write parameters 2018-01-09 23:21:58 +00:00
Peter Barker
5070628230 DataFlash: factor out validate_structure 2018-01-09 23:21:58 +00:00
mirkix
8d7000db2c AP_HAL_Linux: fix typo 2018-01-09 12:54:03 -08:00
Michael du Breuil
9e37e9ee82 AP_GPS: Remove unused blending function.
Thanks to ender-chen for noticing, closes #7510
2018-01-09 12:52:32 -08:00
Peter Barker
c8e0ae6890 AC_Fence: adjust fence sys_status failed based on position and parameters 2018-01-09 17:15:19 +00:00
Peter Barker
e30a6bbce3 AC_Fence: rename sys_status methods from geofence_ to sys_status_ 2018-01-09 17:15:19 +00:00
Peter Barker
a5aafab7ff AC_Fence: use pre-arm checks for sanity checks
Magically resetting people's parameters not a great look.
2018-01-09 17:15:19 +00:00
Peter Barker
155407956c AC_Fence: add a pre-arm check for polygon fence validity
Also change SYS_STATUS bit to be unhealthy if boundary invalid
2018-01-09 17:15:19 +00:00
Peter Barker
aba525e4c5 GCS_Console: remove GCS_Console 2018-01-09 13:46:22 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
f6ab044161 GCS_MAVLink: add microseconds since boot to the home and origin Mavlink messages 2018-01-09 13:01:05 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
479d4be3fd AP_GPS: Add horizontal, vertical and speed accuracy to the GPS_RAW_INT message 2018-01-09 13:01:05 +11:00
Hiroshi Takey (hiro2233)
aa6f66f29b AP_Motors: Updated Motor example. 2018-01-09 08:12:01 +09:00
Randy Mackay
1bb18bc941 AR_AttitudeControl: get_throttle_out_speed uses timeout definition 2018-01-05 13:33:21 +09:00
Randy Mackay
4ac5ef3a13 AR_AttitudeControl: allow filter to be zero
Also increase default filter to 50hz
2018-01-05 13:33:21 +09:00
Randy Mackay
16d3e5c00d AR_AttitudeControl: add feed foward for speed and steering rate control 2018-01-05 13:33:21 +09:00
Randy Mackay
40bb2b0ad9 AR_AttitudeControl: set throttle speed pid dt 2018-01-05 13:33:21 +09:00
Randy Mackay
9930550cfc AR_AttitudeControl: lengthen timeout to 200ms
This is required because occasionally the turn rate controller can be disabled for just over 100ms as new navigation commands are loaded
2018-01-05 13:33:21 +09:00
Randy Mackay
a2b1807ca0 AR_AttitudeControl: fix turn-rate controller timeout 2018-01-05 13:33:21 +09:00
Randy Mackay
4e8155f4e5 AC_PID: allow non-zero ff gain default 2018-01-05 13:33:21 +09:00
Randy Mackay
1531801c83 AP_WheelEncoder: minor comment fix 2018-01-04 14:08:17 +09:00
Matt
b5bdaa18ac AP_AVOIDANCE: Minimum altitude for avoidance action 2017-12-30 13:50:42 -08:00
dheideman
521bece9e7 AP_JSButton: Add servo toggle button function 2017-12-28 14:14:47 -05:00
dheideman
307638e8af AP_JSButton: Add momentary servo button function 2017-12-28 14:14:47 -05:00
dheideman
dd239183c1 AP_JSButton: Add momentary relay button function 2017-12-28 14:14:47 -05:00
Peter Barker
588b0c17c8 AC_Fence: remove AC_FENCE_TYPE_NONE define
0 is the appropriate value for a bitmask which is empty
2017-12-28 15:38:37 +00:00
Peter Barker
aa482bae40 AC_Fence: remove argument to check()
Also, rename check_fence() to check()
2017-12-28 15:38:37 +00:00
Andrew Tridgell
55f73f4163 AP_Airspeed: fixed timing errors in MS5525 driver
this fixes issue #7188, where we could read from the MS5525 sensor too
soon after requesting data and the result coming back would be garbage
2017-12-27 11:05:54 -08:00
mirkix
4b1ec08eaf AP_BattMonitor: add new board PocketPilot 2017-12-27 16:01:55 +00:00
mirkix
0926802013 AP_Notify: add new board PocketPilot 2017-12-27 16:01:55 +00:00
mirkix
9b6a826b49 AP_HAL_linux: add new board PocketPilot 2017-12-27 16:01:55 +00:00
mirkix
0e7ade6f0c AP_HAL: add new board PocketPilot 2017-12-27 16:01:55 +00:00
Pierre Kancir
8c8767e964 AP_InertialSensor: reduce QURT include scope 2017-12-27 15:13:30 +00:00
Pierre Kancir
14b5c8a6c4 AP_Baro: don't include vehicle specific baro by default 2017-12-27 15:13:30 +00:00
Peter Barker
a35e86c2fd AP_SmartRTL: AP_AHRS no longer requires GPS in constructor 2017-12-27 00:58:02 +00:00
Peter Barker
7646e09349 AP_OpticalFlow: AP_AHRS no longer requires GPS in constructor 2017-12-27 00:58:02 +00:00
Peter Barker
e584a90c81 AP_Module: AP_AHRS no longer requires GPS in constructor 2017-12-27 00:58:02 +00:00
Peter Barker
89d3289400 AP_Mission: AP_AHRS no longer requires GPS in constructor 2017-12-27 00:58:02 +00:00
Peter Barker
5dc714bf5f AP_NavEKF3: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
9c8466dc03 AP_NavEKF2: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
aea460df2c AP_FrSky: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
e15442355a AP_AHRS: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
ca4f25a78e AP_Terrain: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
fb3cba3867 AP_Mount: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
a4584431a2 AP_Landing: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
d1d5a484ce AP_ADSB: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
e0c586876b APM_Control: use GPS singleton 2017-12-27 00:58:02 +00:00
Hiroshi Takey (hiro2233)
fb5b6f2169 AP_Airspeed: Updated Airspeed example. 2017-12-26 14:57:58 +00:00
Peter Barker
dea15892dc AP_Volz_Protocol: use AP::serialmanager() 2017-12-21 04:35:11 +00:00
Peter Barker
b3f5e807a6 AP_SerialManager: add AP::serialmanager() 2017-12-21 04:35:11 +00:00
Pierre Kancir
6728598099 AP_Rangefinder: don't include Bebop rangefinder by default 2017-12-21 04:13:09 +00:00
Pierre Kancir
be96a27fa8 AP_NavEKF3: only report terrain estimator innovations with valid rng value 2017-12-18 22:51:46 +00:00
Pierre Kancir
171e80d8dc AP_NavEKF2: only report terrain estimator innovations with valid rng value 2017-12-18 22:51:46 +00:00
khancyr
2732226664 AP_AHRS: use direct assignation and correct some style 2017-12-18 22:43:59 +00:00
khancyr
dae636b39e AP_AHRS: correct some constcorrectness 2017-12-18 22:43:59 +00:00
khancyr
d89d496c8f AP_AHRS: make getter const 2017-12-18 22:43:59 +00:00
mirkix
eecd8fcfa6 AP_HAL_Linux: Add VOLTAGE_SCALING for BeagleBone Blue 2017-12-19 09:17:06 +11:00
Andrew Tridgell
4ac49483c8 AP_Param: added support for embedded parameters
use a block of flash to hold embedded parameters that can be changed
using apj_tool.py
2017-12-18 11:14:59 +11:00
Peter Barker
738377c089 AP_Arming: remove airspeed arming check bits from non-plane vehicles 2017-12-16 11:08:35 +11:00
Peter Barker
0f94fde434 AC_Fence: get home distance directly from ahrs 2017-12-15 01:42:49 +00:00
Peter Barker
20e295c23a AC_Fence: check supplied location within fence rather than current loc 2017-12-15 01:24:13 +00:00
Peter Barker
dff27ec506 AC_WPNav: correct call for getting location vector
Function has been renamed and only takes a Vector2f
2017-12-15 01:24:13 +00:00
Peter Barker
302e5c6871 AP_Common: have get_vector_xy_from_origin_NE take a Vector2f rather than 3f
Also, rename it from get_vector_xy_from_origin_NED
2017-12-15 01:24:13 +00:00
mirkix
26f3a62db7 AP_HAL_Linux: remove BBBmini from RCInput_PRU.cpp 2017-12-14 12:40:37 -08:00
Mark Whitehorn
f57eab3482 AP_SerialManager: add Volz and Sbus protocols to param metadata 2017-12-14 19:27:02 +00:00
ChristopherOlson
569f55f5c6 AC_AttitudeControl:TradHeli - fix for alt_hold angle limiter active at hover collective in Traditional Helicopters
add definition for max collective/throttle for helicopters that compensates for negative collective pitch range
and sets proper collective overhead before alt_hold angle limiter becomes effective
2017-12-14 20:46:13 +09:00
Andrew Tridgell
1c503ee459 SRV_Channel: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
fd14dedcff DataFlash: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
15026c6898 AP_Volz_Protocol: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
d175fb2f18 AP_Terrain: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
b6ecce8329 AP_TECS: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
003851a5c1 AP_SmartRTL: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
1cdbb09466 AP_ServoRelayEvents: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
dd489a0797 AP_SerialManager: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
580af4a69a AP_Scheduler: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
dec3a27d91 AP_SBusOut: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
076f7bc0cf AP_RSSI: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
9b4fef4d50 AP_RPM: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
16cd31b63a AP_Relay: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
e9b847b5ee AP_RCMapper: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
ffced7d591 AP_RangeFinder: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
7122cae589 AP_Rally: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
e798b38271 AP_Parachute: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
0d4dca0394 AP_OpticalFlow: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
cd51c71857 AP_Notify: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
c13eaf0c7f AP_NavEKF3: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
4d4e66d825 AP_NavEKF2: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
3d2c81ff05 AP_Mount: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
c72c1de99e AP_Module: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
a3e07f66a1 AP_Mission: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
1dac512567 APM_Control: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
5f4680bf2c AP_LeakDetector: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
645508224f AP_Landing: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
ad99b04de7 AP_LandingGear: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
31092da426 AP_L1_Control: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
99499dece2 AP_InertialSensor: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
d2c9e2719e AP_GPS: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
c618a27ee0 AP_Frsky_Telem: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
f326377a5c AP_Compass: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
573a5bf3d0 AP_Camera: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
a4d2d79ce7 AP_BoardConfig: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
ca91edbbeb AP_Beacon: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
a4c56fcb82 AP_BattMonitor: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
68f8817e97 AP_Baro: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
8c1cf9affe AP_Airspeed: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
0ccaa5bcba AP_AHRS: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
6487a22acd AP_ADSB: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
85f9fecd24 AC_Sprayer: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
9ba8097502 AC_PrecLand: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
25c409d4a2 AC_InputManager: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
25b9a7e711 AC_Fence: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
d5c55e0dfe AC_Avoidance: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
7a6ab4ac44 AP_AHRS: fixed a bug with startup ordering of SITL
this fixes a crash that can happen with SITL
2017-12-13 14:09:39 +11:00
Peter Barker
86fe1671c1 AC_Fence: fix comment 2017-12-13 10:04:50 +09:00
Peter Barker
e8151a7ec1 AC_Fence: require home as well as origin for prearm checks 2017-12-13 10:04:50 +09:00
Peter Barker
1ecfdffa76 AC_Fence: methods to help populate SYS_STATUS 2017-12-13 10:04:50 +09:00
Peter Barker
ac3f030a34 AC_Fence: factor out check_fence_alt_max
NFC
2017-12-13 10:04:50 +09:00
Peter Barker
d04a4dd0f8 AC_Fence: factor out check_fence_circle
NFC
2017-12-13 10:04:50 +09:00
Peter Barker
d379c7bbd9 AC_Fence: factor out check_fence_polygon
NFC
2017-12-13 10:04:50 +09:00
Peter Barker
5eeed442c8 AP_AHRS: correct comment 2017-12-13 10:04:50 +09:00
Peter Barker
518399c13a AC_Fence: stop looking at EKF filter status
Fence has no business looking at what the filter status is.

Fence should only care whether it can currently get a position.
2017-12-13 10:04:50 +09:00
khancyr
65373b85f0 AC_Fence: replace AP_InertialNav by AHRS 2017-12-13 10:04:50 +09:00
priseborough
3b32d583a9 AP_NavEKF2: Fix delta time use error 2017-12-12 11:39:38 +11:00
priseborough
440d361aff AP_NavEKF2: Limit range of delta times 2017-12-12 11:39:38 +11:00
Andrew Tridgell
6b30c9213a AP_NavEKF3: delay startup until IMU buffer is filled
this prevents a vulnerability where the initial IMU data is processed
26 times (where 26 is the IMU buffer length)
2017-12-12 11:39:38 +11:00
Andrew Tridgell
1f9a3dd1bd AP_AHRS: improved init attitdue in DCM
this tries harder to get a good IMU sample for the initial attitude
estimate. I have seen cases of bad IMU data on startup and this makes it
much less likely
2017-12-12 11:39:38 +11:00
Andrew Tridgell
97729a12f0 AP_NavEKF2: don't run IMU updates until buffer fills
this prevents us using bad initial data multiple times. It fixes a bug
where the IMU may pause during EK2 initialisation
2017-12-12 11:39:38 +11:00
Andrew Tridgell
39c206ca03 AP_InertialSensor: limit delta-time from INS
limit delta-time to 2x average time

DEBUG CODE - DO NOT MERGE
2017-12-12 11:39:38 +11:00
Andrew Tridgell
a0af4af5b5 AP_InertialSensor: debugging code for EK2 bug 2017-12-12 11:39:38 +11:00
Randy Mackay
38145f9541 AP_InertialSensor: fix param docs for notch and log settings 2017-12-12 07:59:41 +09:00
Randy Mackay
cabced82f1 AR_AttitudeControl: fix parameter descriptions 2017-12-11 17:01:18 +09:00
Michael Oborne
78f732c380 AR_AttitudeControl: fix parameter docs 2017-12-11 08:35:33 +09:00
Randy Mackay
744f4baf22 AR_AttitudeControl: add parameter description increment 2017-12-09 16:23:25 +09:00
Randy Mackay
f00f4ce79b AR_AttitudeControl: fix get_desired_speed timeout 2017-12-09 16:23:22 +09:00
Randy Mackay
9b81c133f6 AP_HAL_PX4: fix compiler warning in UARTDriver 2017-12-09 12:18:49 +09:00
Randy Mackay
36c5f057ae AR_AttitudeControl: add get_desired_turn_rate lat_accel and speed
for reporting use only
2017-12-09 12:18:49 +09:00
Andrew Tridgell
30944f60e6 AP_SBusOut: fixed param doc name 2017-12-09 08:31:24 +11:00
Andrew Tridgell
051f30990c SRV_channel: fixed doc names of VOLZ and SBUS
thanks to Mark for noticing
2017-12-09 08:08:00 +11:00
Peter Barker
c4734484e7 AC_Avoid: take an AP_AHRS in place of an AP_AHRS_NavEKF 2017-12-08 11:27:37 +09:00
Peter Barker
8a4ab685c7 AP_AHRS: implement get_hgt_ctrl_limit on base class
If no limits are required false can be returned, so an trivial
implementation is possible
2017-12-08 11:27:37 +09:00
Peter Barker
89e12163cd AP_AHRS: correct comment 2017-12-08 11:27:37 +09:00
Peter Barker
c3eff57f60 AP_InertialNav: remove unused get_hgt_ctrl_limit 2017-12-08 11:27:37 +09:00
Peter Barker
a1c982be4a AC_Avoid: work in metres to avoid extra work 2017-12-08 11:27:37 +09:00
Peter Barker
0fe45ef6b6 AC_Avoid: eliminate get_position and get_alt_above_home 2017-12-08 11:27:37 +09:00
Peter Barker
54010451bf AC_Avoid: check result of AHRS calls
Work in metres to avoid computation
2017-12-08 11:27:37 +09:00
khancyr
b44ba29a05 AC_Avoidance: replace AP_InertialNav by AHRS 2017-12-08 11:27:37 +09:00
Andrew Tridgell
4289190654 HAL_PX4: added LIS3MDL on FMUv4 2017-12-08 09:49:25 +11:00
Mark Whitehorn
b0e2f06a7a AP_Compass: add LIS3MDL probe for Pixracer 2017-12-08 09:49:25 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
9b2e48ce10 AP_GPS: Improve comments (NFC) 2017-12-05 10:44:58 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
fa4427fbce AC_AttitudeControl: Add AC_PosControl::get_bearing_to_target() method 2017-12-05 09:17:15 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
1a512609ac AC_WPNav: Use the get_bearing_cd() overloaded function provided by AP_Math instead 2017-12-05 08:54:49 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
e13281ab2d AP_Math: add overloaded functions get_horizontal_distance_cm() and get_bearing_cd() (NFC) 2017-12-05 08:54:49 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
07c8d208bc AC_WPNav: Use DEGX100 define instead of hardcoded value (NFC) 2017-12-05 08:54:49 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
ec1790dad9 AP_Math: Use DEGX100 define instead of hardcoded value (NFC) 2017-12-05 08:54:49 +09:00
Guglie
4eaa1f17df SITL: fix pthread_setname_np to build on mac 2017-12-04 21:14:29 +11:00
Tom Pittenger
da11241aa8 AP_HAL_SITL: add const 2017-12-02 09:17:27 +09:00
Patrick José Pereira
bd1110f444 AP_JSButton: simplifies logic
Less code make people happy

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-12-01 14:50:15 -08:00
Peter Barker
e39e8359b6 GCS_MAVLink: tighten result of handle_preflight_reboot 2017-12-01 17:01:10 +00:00
Peter Barker
161e2145cb AP_InertialSensor: tighten type of simple_accel_cal result 2017-12-01 17:01:10 +00:00
Randy Mackay
82cd320bd0 AP_AHRS: add get_origin method to parent 2017-12-01 09:28:56 +09:00
Andrew Tridgell
da4d3ebe2b HAL_SITL: fixed UART utils for cygwin and Linux 2017-12-01 08:02:48 +11:00
Tom Pittenger
6bdbe53024 AP_HAL_SITL: fix compile error for Windows/Cygwin builds
termios2 not available on cygwin. This needs a re-think for cygwin. For now let's just hide it by letting it be declared empty by the virtual and totally bypass it in the cygwin build.
2017-11-30 12:17:49 -08:00
Tom Pittenger
013035a4da AP_HAL_SITL: fix compile error for Windows/Cygwin builds
Can not find "asm/termios.h"
2017-11-30 12:05:56 -08:00
Tom Pittenger
760c6185e5 AP_HAL_SITL: remove SBUS debug code 2017-11-30 12:03:17 -08:00
Pierre Kancir
c30642a348 AP_HAL_SITL: correct _unbuffered_writes usage 2017-11-30 10:36:54 -08:00
Mark Whitehorn
b1b1c0218f AP_HAL_PX4: clean whitespace 2017-11-30 10:20:04 +11:00
Mark Whitehorn
d9ce90ceb0 AP_SBusOut: fix typo in comment 2017-11-30 10:20:04 +11:00
Mark Whitehorn
8d70255b8b AP_SBusOut: turn off SBUS_DEBUG 2017-11-30 10:20:04 +11:00
Mark Whitehorn
5a417e3152 AP_HAL_SITL: support SBusOut
add uart config methods
2017-11-30 10:20:04 +11:00
Mark Whitehorn
644f5b75e6 AP_HAL_VRBRAIN: rename enable_sbus_out to enable_px4io_sbus_out 2017-11-30 10:20:04 +11:00
Mark Whitehorn
12ea8efa84 AP_HAL_PX4: support SBusOut
add unbuffered writes and uart config
2017-11-30 10:20:04 +11:00
Mark Whitehorn
66c4b7d986 AP_HAL: support SBusOut
rename enable_sbus_out to enable_px4io_sbus_out
2017-11-30 10:20:04 +11:00
Mark Whitehorn
3587d7f253 AP_SerialManager: add SBUS1 serial output support 2017-11-30 10:20:04 +11:00
Mark Whitehorn
cca251c135 SRV_Channel: support SBusOut 2017-11-30 10:20:04 +11:00
Mark Whitehorn
94d4f068a8 AP_SBusOut: create library 2017-11-30 10:20:04 +11:00
Mark Whitehorn
560402bad4 AP_BoardConfig: clarify PX4IO SBUS enable message 2017-11-30 10:20:04 +11:00
Peter Barker
47f8ed7fab AP_GPS: set GPS_SAVE_CFG default to save GPS config as required 2017-11-29 00:58:43 -07:00
Andrew Tridgell
9677d570e9 AP_GPS: faster GPS lock
use 9600 and 115200 first
2017-11-29 00:58:43 -07:00
Andrew Tridgell
2c6593e35e AP_NavEKF3: fixed inverted function setInhibitGpsVertVelUse() 2017-11-29 09:47:14 +09:00
Andrew Tridgell
4019a167a9 AP_NavEKF2: fixed inverted function setInhibitGpsVertVelUse() 2017-11-29 09:47:14 +09:00
Grant Morphett
f7db538220 APM_Control: Fixed the subparam indexs to start at 1
AFAIK there is still a bug in ArduPilot where subparams should not start at index 0.  This is due to the way the index math and bit shifing works as it incorrectly offsets all 0 index params to 0. We allow 2 levels of sub params - 3 levels in total.  So params, sub params and sub sub params.  The 0 parameter in all those is unfortunately always references param[0].  So param[0] and subparam[0] and subsubparam[0] will reference the same parameter value.  Its why we always say start the index from 1 as the math and bitshifting then works correctly.

Yeah this is worded badly - hard to explain.
2017-11-29 09:43:10 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
5a0ffe94d2 AP_Common: NFC spell in comments 2017-11-27 23:13:34 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
0ecb14361d AP_AHRS: NFC spell in comments 2017-11-27 23:13:34 +09:00
Randy Mackay
b9a1621d38 AR_AttitudeControl: minor comment fix
non-functional change
2017-11-27 10:35:26 +09:00
Peter Barker
30355fa6d8 AP_Mission: provide short description for mission item types 2017-11-27 10:28:24 +09:00
Andrew Tridgell
9660973975 AP_Math: make crc_crc8 const 2017-11-27 10:15:07 +09:00
Leonard Hall
bd284d9fd7 AC_PosControl: correct lean-angle-to-accel formula
Thanks to @luweikxy for finding this issue!
2017-11-24 09:12:00 +09:00
Leonard Hall
e49d29f8cd AC_WPNav: protect against divide by zero
This could occur if the spline origin and destination were the same location
In these cases we mark the vehicle as having reached the destination avoid all calculations
2017-11-23 21:24:28 +09:00
Andrew Tridgell
917d9842c4 SITL: support AHRS_ORIENTATION in SITL
this allows for tailsitters in RealFlight
2017-11-23 14:26:11 +11:00
Andrew Tridgell
ebcffcb0ac HAL_SITL: fixed console printf in SITL examples 2017-11-23 14:26:11 +11:00
Andrew Tridgell
3f226cd2b9 AP_Math: added from_rotation() method to Matrix3
this is used to get a rotation matrix from a rotation enum
2017-11-23 14:26:11 +11:00
Peter Barker
22f1b5ed6f TECS: support for units on fields 2017-11-23 10:40:30 +11:00
Peter Barker
d68ba874d0 DataFlash: correct examples with units 2017-11-23 10:40:30 +11:00
Peter Barker
b19f981c07 DataFlash: validate units and multipliers 2017-11-23 10:40:30 +11:00
Peter Barker
9896e23c36 DataFlash: Log_Write() fills unknown units with '?' 2017-11-23 10:40:30 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
2e94673e4f DataFlash: keep the unit names consistent with Tools/autotest/param_metadata/param.py:33 2017-11-23 10:40:30 +11:00
Peter Barker
a5442fb293 DataFlash: support for units on fields 2017-11-23 10:40:30 +11:00
Peter Barker
1e512338f9 AP_AirSpeed: clarify comment 2017-11-23 10:40:30 +11:00
Jacob Walser
46ac0e45aa AP_HAL_SITL: initialize rc inputs appropriately for ArduSub 2017-11-22 15:43:46 -05:00
Patrick José Pereira
28ff272017 SIM_Submarine: Solve problem when frame is above water level
Fix bluerobotics/ardusub/issues/128

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Co-Authored-By: jaxxzer <jwalser90@gmail.com>
2017-11-22 12:38:14 -08:00
HeBin
c056076e85 AP_InertialSensor: fix code style problem, delete useless codes 2017-11-22 10:20:00 -08:00
HeBin
1918b07705 AP_Notify: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
HeBin
efbb030494 AP_InertialSensor: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
HeBin
0e1ce2a7fd AP_HAL_Linux: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
HeBin
895b5f34b8 AP_HAL: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
HeBin
26de6de848 AP_Compass: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
Chinese66
700aaf2e8f AP_HAL: add delay to UART_test example
For AC3.5 and higher version, serial uartA-USBconsole cannot work. Maybe the code before "setup" has been changed. Ensure that the uartA can be initialized
2017-11-22 09:05:17 +09:00
Michael du Breuil
983a330cd5 AC_Fence: Remove unused duplicate methods
The Vector2l methods completely duplicate the code of the Vector2f
methods, but aren't used anywhere. They are therefore subject to bitrot
and aren't adding any value. (Also shrinks the build by 8 bytes for some
reason, given that it's unused code I expected to see no difference in
binary size).
2017-11-21 17:04:11 +09:00
Andrew Tridgell
e0d383c986 AP_Volz_Protocol: add a 30% safety margin over baudrate
we don't want to fill the buffer if we don't get full uart utilisation
2017-11-21 14:10:54 +11:00
Guy Tzoler
7f68be9bdf SRV_Channel: adding Volz Support 2017-11-21 14:10:54 +11:00
Guy Tzoler
2442f3fb06 AP_SerialManager: adding Volz Support
and make AP_SerialManager a singleton
2017-11-21 14:10:54 +11:00
Guy Tzoler
65032919e2 AP_Volz_Protocol: added Volz protocol library 2017-11-21 14:10:54 +11:00
Samuel Tabor
05492be269 AP_AHRS: clarify scope of AHRS_GPS_USE parameter 2017-11-20 13:53:36 +09:00
Samuel Tabor
1b4705242c AP_NavEKF2: print reason for EKF2 arming failure when no GPS is available 2017-11-20 13:53:31 +09:00
Michael du Breuil
012ddbefac AP_Landing: Support absolute altitude deepstalls 2017-11-19 16:48:17 +01:00
Andrew Tridgell
964d64a623 SITL: adjust FlightAxis defaults
and map 0,0 to CMAC location, to improve how SITL works in
MissionPlanner
2017-11-19 18:24:08 +11:00
Andrew Tridgell
cdd350f93e SITL: fixed build under cygwin 2017-11-18 21:23:15 +11:00
Georgii Staroselskii
a18cf45798 AP_Notify: enable AP_BoardLED for Navio 2017-11-17 09:20:55 -08:00
Georgii Staroselskii
6326e23682 AP_HAL: Navio: add defs for BoardLED 2017-11-17 09:20:55 -08:00
Georgii Staroselskii
56534b34c5 AP_HAL_Linux: use GPIO_Sysfs for Navio
/boot/config.txt: dtoverlay=navio-rgb should be disabled for this thing
to work, though.
2017-11-17 09:20:55 -08:00
Georgii Staroselskii
4e02637f23 AP_Notify: add Led_Sysfs and use in Navio2
Navio2 exports its leds via /sys/class/leds interface. We reuse it in
order not to conflict with GPIO_Sysfs. Otherwise we'd get a Device Busy
error in GPIO_Sysfs::_export_pin().
2017-11-17 09:20:53 -08:00
Georgii Staroselskii
5254ee03c2 AP_HAL_Linux: use GPIO_Sysfs for Edge 2017-11-17 09:18:36 -08:00
Georgii Staroselskii
8fcd30c611 AP_HAL_Linux: use GPIO_Sysfs for Navio 2 2017-11-17 09:18:35 -08:00
Peter Barker
fd543fce6d AP_Scheduler: create AP::PerfInfo class 2017-11-16 15:31:53 +00:00
Peter Barker
5c2f68e8f5 Copter+AP_Scheduler: move perf_info.cpp into Scheduler 2017-11-16 15:31:53 +00:00
Peter Barker
b97ee33438 DataFlash: AP_Camera functions use GPS singleton 2017-11-16 15:28:37 +00:00
Peter Barker
7258fa81d9 AP_Camera: use GPS singleton 2017-11-16 15:28:37 +00:00
Leonard Hall
ebd864d2d2 AC_PosControl: minor update to comments 2017-11-16 09:46:28 +09:00
Peter Barker
269294754f GCS_MAVLink: use gps singleton 2017-11-15 13:43:03 +00:00
Peter Barker
a8aa6a7822 AP_Arming: use gps singleton 2017-11-15 13:43:03 +00:00
Peter Barker
693823ae0d AP_GPS: add gps() to AP:: namespace 2017-11-15 13:43:03 +00:00
Randy Mackay
6315e6eb45 AC_AttitudeControl: remove unused get_tilt_limit_rad 2017-11-15 20:22:02 +09:00
DOMINATOR\Eugene
4c6f954cdf AP_BoardConfig: separation of parameter groups 2017-11-15 09:52:43 +11:00
André Kjellstrup
1a63fd85d8 AP_Camera: Option to trig by distance only when in AUTO mode 2017-11-14 00:10:22 +00:00
khancyr
4413ebab7b AP_HAL_SITL: suppress output until initialization is finished 2017-11-13 10:52:38 +11:00
Jacob Walser
07fa65a88c AP_HAL_SITL: Add current and voltage monitoring implementation for Sub 2017-11-13 10:50:27 +11:00
khancyr
2a25011b14 AR_AttitudeControl: const local variables 2017-11-09 09:53:12 +09:00
Peter Barker
23882aaab0 AP_Notify: only play not-ready-or-not-finished tone if we've been ready 2017-11-08 19:08:23 +09:00
Peter Barker
25a0e6378e AP_Arming: manual transmitter checks call rc calibration checks 2017-11-08 19:07:57 +09:00
Peter Barker
49dd5f4f80 Copter: prearm board voltage checks are called in parent class 2017-11-08 19:07:53 +09:00
Peter Barker
30c1a040d7 Copter: prearm baro checks are called in parent class 2017-11-08 19:07:44 +09:00
Peter Barker
901fe55d04 AP_Notify: play sad tone if prearm checks start to fail 2017-11-08 19:02:44 +09:00
khancyr
76a6649a2d AP_Autotune: remove unimplemented function 2017-11-08 17:21:56 +09:00
khancyr
e9e1dac188 AR_AttitudeControl: remove unused skid_steering arg from get_throttle_out 2017-11-08 15:45:35 +09:00
khancyr
aa09541847 AR_AttitudeControl: const ahrs reference 2017-11-08 15:34:41 +09:00
khancyr
d226ffeeb2 AP_AttitudeControl: remove tabs
non-functional change
2017-11-08 15:06:25 +09:00
Daniel Widmann
49887235df AR_AttitudeControl: get_steering_out methods accept reverse argument 2017-11-08 14:36:23 +09:00
bnsgeyer
63bafa2c7f AP_Motors: Tradheli- fixes servo_test function for Dual Heli frame 2017-11-08 11:07:08 +09:00
proficnc
6a94d285de AP_BoardConfig: fixed description to warn against
setting the wrong heater value in params
2017-11-07 12:00:32 +11:00
Michael du Breuil
ef0b52e017 AP_Arming: Run extra GPS checks when arming 2017-11-06 01:33:57 +00:00
Michael du Breuil
236e74c529 AP_GPS: Singleton 2017-11-06 01:33:57 +00:00
Michael du Breuil
c856cc6f33 AP_GPS: Allow GPS's to run functions on arming (used by SBF)
Supports starting/stopping GPS logging
2017-11-06 01:33:57 +00:00
Andrew Tridgell
c9652fec3c AP_BattMonitor: fixed SITL segfault 2017-11-04 19:41:41 +11:00
Andrew Tridgell
274e441292 DataFlash: fixed build for aerofc-v1 2017-11-04 16:53:29 +11:00
Andrew Tridgell
6358081b18 AP_Motors: apply tailsitter min spin to both motors 2017-11-04 11:41:40 +11:00
Michael du Breuil
338d745de1 AP_Landing: Implement is_on_approach for deepstall
(Fixes a disarm in flight)
2017-11-04 10:07:16 +11:00
Andrew Tridgell
878d2e2563 AP_Motors: fixed tailsitter use of SPIN_MIN 2017-11-04 09:29:08 +11:00
alexshirley
8058fdf093 AP_HAL_Linux: combine ppm and sbus on ocpoc_zynq
Removes compile-time selection of RCInput driver for ocpoc_zynq.
PPM and SBUS input are now colocated on the ocpoc board, and it
only needs to run RCInput_ZYNQ. Pulse input is also inverted
to accommodate SBUS input, which has no effect on PPM input.
2017-11-01 10:28:40 -07:00
alexshirley
065b00eb81 AP_HAL: Remove SBUS macro from ocpoc target 2017-11-01 10:28:40 -07:00
Randy Mackay
002d3f08f6 AP_L1_Control: update_waypoint zeros xtrack i term on init 2017-11-01 16:46:40 +09:00
Andrew Tridgell
eab1d3af4f AP_InertialSensor: don't apply offsets in SITL backend
the offsets are applied in the rotate and correct methods
2017-11-01 17:09:21 +11:00
bnsgeyer
37ea64513d AP_Motors: TradHeli - fixed servo test function 2017-11-01 14:01:48 +09:00
Paulo Neves
4108f22304 AP_Beacon: Corrected possible use of nullptr memory.
The check for UART port pointer is not sufficient
to know if the update() was possible or not. When
MarvelmindHedge construction failed, the hedge pointer
might be a nullptr and there are no checks to avoid
nullptr dereference.

The MarvelmindHedge structure had complex initialization
but was done in a C style, with intermixed initialization functions.
malloc() was changed to cleaner new operator. Given that the
file already contained new operator calls it didn't make
sense to have a mix. The files are cpp so C++ operators
are used.
2017-11-01 10:49:10 +09:00
Patrick José Pereira
73a76455d2 AP_BattMonitor: Solve typo in BATT2 description
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-10-31 09:32:03 +09:00
Lucas De Marchi
cbb9dcc2a1 AP_HAL_Linux: Storage: use define from HAL for directory 2017-10-30 16:57:37 -07:00
Lucas De Marchi
7fd10921c3 AP_HAL: Linux: add define for storage dir
This mantains compatibility with what the boards were already using,
except for Aero and Minlure in which I'm changing it already as this is
desired.
2017-10-30 16:57:37 -07:00
Lucas De Marchi
3272ae2c04 DataFlash: make log directory macro mandatory
Everybody defines the macro (or should be defining). Let smaller users
that don't have a filesystem to rather protect it with HAL_OS_POSIX_IO,
which also allow them to save more flash space.
2017-10-30 16:57:37 -07:00
Lucas De Marchi
591b846e2d AP_HAL: switch aero and minlure to new log/terrain directory
Additionally make Edge use the default.
2017-10-30 16:57:37 -07:00
Lucas De Marchi
d2ba8409d0 AP_HAL: provide default directory for Linux boards
/var/lib/<project> is more in line to where projects save their data.
Also, remove APM from dir name as it should had been done some time
ago.

This is only the default (and recommended for any new board). Existing
boards that want to adopt the default can remove their defines.
2017-10-30 16:57:37 -07:00
priseborough
c96bc54254 AP_NavEKF3: correctly use wheel odometry speed for pitched rovers 2017-10-31 08:11:05 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
68828511cd AP_GPS: Only send GPS*_RTK mavlink messages if the backend supports them 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
e0c2a45eec AP_GPS: support GPS_RTK and GPS2_RTK messages in Emlid reach modules. Requires Reach FW >= 2.7.4 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
c0dd7984ad AP_GPS: Publish information on the GPS*_RTK mavlink messages 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
bf6778277e AP_GPS: implement GPS*_RTK mavlink messages 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
91b6404b13 GCS_MAVLink: Replace hardcoded duplicated end_mavlink_gps*_rtk() function with a flexible one 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
430b863f42 AP_GPS: Replace hardcoded duplicated end_mavlink_gps*_rtk() function with a flexible one 2017-10-30 18:28:20 +00:00
John deVere
951c947bec AP_Arming: update param description for VOLT_MIN 2017-10-30 09:46:51 +09:00
Andrew Tridgell
fd86b2bbb9 DataFlash: log critical messages while disarmed
this logs critical messages while disarmed if we have logged any
messages while armed. This fixes issue #7010 where log files show the
incorrect mode if the log includes any portions where the user
disarmed. It makes analysing users logs very difficult. It also
affects parameters, so we don't always know the true parameter values
in logs from users.
2017-10-29 19:20:57 +11:00
Michael du Breuil
9b7c3ce9a7 GCS_Mavlink: Fix out of bounds access, CID 144337 2017-10-28 03:30:46 +01:00
priseborough
ee6b43aabf AP_NavEKF3: Fix bugs in use of wheel encoder data
Found by pavloblindnology
2017-10-28 10:58:01 +09:00
bnsgeyer
e8173f27df AC_AttitudeControl: reset target attitude
added method to reset current vehicle attitude to support swash
behaviors in Trad Heli
2017-10-28 12:31:06 +11:00
dheideman
2fab8e9fe1 AP_JSButton: Add joystick button functions for relays 3 & 4 2017-10-27 12:14:41 -04:00
Florent Martel
fee79afb8e AP_Frsky_Telem: add second battery info 2017-10-27 02:00:29 -07:00
Florent Martel
5d9299d72f AP_Frsky_Telem: add second battery capacity parameter 2017-10-27 02:00:29 -07:00
Peter Barker
191e457230 DataFlash: include sample count in ISBH 2017-10-27 16:33:45 +11:00
Peter Barker
b997f445ff AP_InertialSensor: include sample count in ISBH 2017-10-27 16:33:45 +11:00
Peter Barker
9566abb3a8 AP_InertialSensor: add IMU batch sampling 2017-10-27 16:33:45 +11:00
Peter Barker
5096e2fca9 AP_InertialSensor: use df singleton, factor out log_{gyro,accel}_raw 2017-10-27 16:33:45 +11:00
Peter Barker
1ca76173a5 AP_Math: set radians(...) and degrees(...) as constexpr 2017-10-27 16:33:45 +11:00
Peter Barker
d950e78079 DataFlash: Log_ISBH and Log_ISBD, to log batches of IMU data 2017-10-27 16:33:45 +11:00
Peter Barker
2f9a8ded55 DataFlash: add new int16_t[32] type, designator 'a' 2017-10-27 16:33:45 +11:00
Randy Mackay
2614d2112a AP_Winch: remove redundant member
Also use get_rate_max method instead of config.rate_max member
2017-10-27 09:20:38 +09:00
Randy Mackay
2dfb6a94f2 AP_Winch: library to control winch
fixes after peer review:
renamed disable to relaxed
make parameters private
default type to 1
enabled method checks backend created
servo range initialised in init method
contrain rate-desired during position control
use set-output-limit instead of set-safety-limit
release_length accepts rate
2017-10-27 09:20:38 +09:00
Randy Mackay
8b4345f29d AP_Mission: add winch support 2017-10-27 09:20:38 +09:00
Randy Mackay
07e2853b8e SRV_Channel: function definition for winch 2017-10-27 09:20:38 +09:00
Randy Mackay
ce73d724c8 AR_AttitudeControl: rate-control for skid-steering uses I term even at low speeds 2017-10-26 19:45:04 +09:00
Randy Mackay
ee3daaa7c9 AR_AttitudeControl: reset input filter for steering and throttle controllers
Also only set dt to non-zero value
2017-10-26 19:44:54 +09:00
Randy Mackay
91d489d91e AC_PID: implement reset_filter 2017-10-26 19:44:47 +09:00
Randy Mackay
2986d3eb7d AR_AttitudeControl: fix braking
this fix ensures the output throttle is never in the opposite direction from the desired-speed
there is a possibility that this could lead to rougher throttle response when the vehicle is transitioning from forward to backwards motion because the throttle response will immediately go to zero when the desired speed cross over zero
2017-10-26 19:44:38 +09:00
Randy Mackay
49cbbf4d76 AR_AttitudeControl: minor comment fix 2017-10-26 19:44:32 +09:00
Randy Mackay
8daa8cba1f AR_AttitudeControl: record desired turn rate and speed for logging 2017-10-26 19:44:26 +09:00
Michael du Breuil
0cee2f2896 AP_BattMonitor: Require all backends to provide init 2017-10-26 20:10:08 +11:00
Andrew Tridgell
3402d07651 HAL_PX4: fixed a race condition on i2c init
we could call init on two devices with the same name, which caused
init_ok to be false. This could cause the SMBus battery to fail to
initialise

Thanks to Michael duBreuil for finding this!
2017-10-26 18:21:56 +11:00
Peter Barker
62f7acff52 SITL: reduce max accel of simulated rover 2017-10-26 14:45:19 +11:00
Andrew Tridgell
e340fac2e0 AP_Motors: avoid float exception for small expo
very small values of the thrust expo cause a floating point
exception. As zero is a documented value meaning linear we need to
handle this.
2017-10-25 21:15:58 +11:00
Jacob Walser
d5896287b7 AP_Param: Add set_by_name and set_and_save_by_name helpers 2017-10-25 21:07:09 +11:00
hiro2233
7d304073ed SITL: fixed include case sensitive
On case sensitive cygwin feature enabled, this build ok.
2017-10-25 20:59:55 +11:00
Andrew Tridgell
381e2fd69a SRV_Channel: added get_motor_function()
for correct handling of motors 8 and above
2017-10-25 11:39:11 +11:00
Andrew Tridgell
45d6f3bf75 AP_Motors: fixed motor channel handling 2017-10-25 11:39:11 +11:00
Patrick José Pereira
9693da751e AP_common: Add stdio.h when using SITL_printf
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-10-24 22:55:56 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
c7c2c4ff2c AC_AttitudeControl: use floating-point multiplication instead of a more expensive floating-point division 2017-10-23 09:20:17 -07:00
Andrew Tridgell
fc237ee9a0 AP_Motors: merge fixed from rebase 2017-10-22 15:52:50 +11:00
Andrew Tridgell
efea83e424 AP_Motors: fixed MotorsMatrix set_update_rate() 2017-10-22 15:52:50 +11:00
Andrew Tridgell
0682d30ebd SRV_Channel: ensure channel_mask is setup 2017-10-22 15:52:50 +11:00
Andrew Tridgell
1e62b5d5c7 AP_Motors: many to one mapping of motors
this allows multiple outputs for one motor number
2017-10-22 15:52:50 +11:00
Andrew Tridgell
39fd25bb36 SRV_Channel: added get_output_channel_mask()
will be used by AP_Motors
2017-10-22 15:52:50 +11:00
Andrew Tridgell
03e1f6967f AP_Motors: removed enable() API
all output channels are already enabled by SRC_Channels::enable_aux_servos()
2017-10-22 15:52:50 +11:00
Andrew Tridgell
ed272833c3 SRV_Channel: don't treat k_motorN specially 2017-10-22 15:52:50 +11:00
Michael du Breuil
b0e18de576 AP_GPS: Remove detect helpers for MTK/SIRF when minimizing the build
Removes 16 bytes
2017-10-22 03:03:29 +01:00
Andrew Tridgell
5bd92b4b7e AP_TECS: improved support for VTOL transitions 2017-10-21 18:50:01 +11:00
Andrew Tridgell
c5cd1b873c SITL: use thread for FlightAxis comms
this allows us to run SITL at a much higher framerate than RF can
provide, and results in the EKF being much happier
2017-10-21 11:57:59 +11:00
Andrew Tridgell
7def86ae96 HAL_SITL: don't run IO at more than 100Hz
save some CPU for faster frame rates
2017-10-21 11:57:05 +11:00
Georgii Staroselskii
8a28556ae1 AP_Notify: use RCOutputRGBLedInverted for Edge 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
03ac8621bf AP_BattMonitor: add Edge PM preset 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
4e2028c32f AP_HAL: Edge: enable Heat PWM 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
79c14a92a9 AP_HAL_Linux: adapt Heat_Pwm for Edge 2017-10-20 13:03:08 -07:00
Alexey Bulatov
069c98b8a9 AP_InertialSensor: Edge: add sensor's rotation YAW_90 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
710594eee3 AP_Compass: enable compass on Edge 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
db9f427617 AP_HAL: Edge: add compass settings
Use HMC5883L as default before UAVCAN Linux support is in place
2017-10-20 13:03:08 -07:00
Georgii Staroselskii
ac6f7511bd AP_InertialSensor: examples: print temperature 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
4f2d8f8df4 AP_InertialSensor: use ICM backend for Edge 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
4e6fab228c AP_HAL_Linux: add SPI devices for Edge 2017-10-20 13:03:08 -07:00
Staroselskii Georgii
3ade179700 AP_HAL_Linux: make use of RCInput_Navio2 in Edge 2017-10-20 13:03:08 -07:00
Staroselskii Georgii
2a99bb0c95 AP_HAL: use Raspberry Pi GPIO and Util classes for Edge
As it's a yet another Raspberry Pi based board, we may reuse the code.
2017-10-20 13:03:08 -07:00
Staroselskii Georgii
2a7e8d66ee AP_HAL_Linux: add Edge support
Just some usual boilerplate code.
2017-10-20 13:03:08 -07:00
Georgii Staroselskii
2dd68243a2 AP_HAL: add Edge support 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
ef3cad7833 AP_Notify: add RCOutputRGBLedInverted
Some RGB leds controlled with an inverted logic. This class addresses
this.
2017-10-19 15:09:49 -07:00
Peter Barker
bb2573f945 GCS_MAVLink: send mission item requests to correct destination
The correct destination is the GCS which last set the mission count,
not the last GCS that requested it!
2017-10-19 20:52:24 +11:00
Michael du Breuil
2b4cf54797 AP_Landing: Deepstall: Small style fixes 2017-10-17 14:37:11 -07:00
Michael du Breuil
d166832de4 AP_Landing: Deepstall implement log(), reset all integrators 2017-10-17 14:37:11 -07:00
Michael du Breuil
2909f77235 DataFlash: Remove PIDL and a DSTL for a deepstall specific message 2017-10-17 14:37:11 -07:00
Michael du Breuil
f8ac4efb1d PID: Add a full reset method 2017-10-17 14:37:11 -07:00
Michael du Breuil
df8049778e AP_Landing: Support CCW deepstall 2017-10-17 14:37:11 -07:00
Michael du Breuil
a0a16b8369 AP_Mission: Load yaw heading for landing commands 2017-10-17 14:37:11 -07:00
Michael du Breuil
0007e5eb80 AP_Landing: Support scaling aileron controls 2017-10-17 14:37:11 -07:00
Georgii Staroselskii
d214a36e0a AP_HAL_Linux: reset duty cycle before setting period
On kernels 4.7+ duty_cycle should always be less than period.
Otherways, we'll get a EINVAL.

It makes sense to set duty_cycle to 0, as
duty_cycle doesn't really make sense without a proper period.

A proper way to handle these errors might be to call pwm_adjust_config
in every pwmchip backend but it's unrealistic to hope that all vendors
will do it quickly.
2017-10-17 13:28:34 -07:00
Michael du Breuil
dbf67aa38a AP_Mission: Remove duplicated code associated with copy the waypoint location 2017-10-16 10:02:33 -07:00
Peter Barker
6536bf39b3 DataFlash: add DataFlash_AllTypes sample output 2017-10-10 16:51:19 +11:00
Peter Barker
466d6e619e DataFlash: correct nanf log output 2017-10-10 16:51:19 +11:00
Andrew Tridgell
c8b6be6736 AP_Motors: fixed scaling of servo outputs
thanks to bnsgeyer for noicing this in issue #6977

this will break existing dual-heli setups, but there are so few people
flying them so far that I think it is a worthwhile change
2017-10-10 11:02:34 +11:00
Tom Pittenger
39dc608bea AP_L1: update constraint Nu comment to match sourcecode
fixes https://github.com/ArduPilot/ardupilot/issues/7054
2017-10-09 17:01:37 -07:00
Andrew Tridgell
74265f523a SITL: support -roll180 option to frames 2017-10-10 10:57:38 +11:00
Andrew Tridgell
6a6f9681ab AP_InertialSensor: allow for 1,1,1 accel scaling
this supports simple accel calibration
2017-10-10 10:57:38 +11:00
Andrew Tridgell
f513c1c8dd AP_InertialSensor: support rotated IMUs in SITL 2017-10-10 10:57:38 +11:00
Andrew Tridgell
d5cab1140a AP_InertialSensor: added simple_accel_cal()
this is useful for mass market vehicles where a full 3D accel cal is
too complex.
2017-10-10 10:57:38 +11:00
Francisco Ferreira
02586b0a2e
AP_Rangefinder: search buses 0 and 1 for Maxbotix I2C driver 2017-10-09 11:57:02 +01:00
Francisco Ferreira
be1f0801a3
AP_HAL: stop defining a default Lightware I2C bus
When a specific bus isn't defined we now search I2C buses 0 and 1
2017-10-09 11:57:02 +01:00
Francisco Ferreira
bb46eaedaa
AP_Rangefinder: look in buses 0/1 when Lightware I2C bus isn't defined 2017-10-09 11:57:02 +01:00
Randy Mackay
7e5f98b535 APM_Control: fix throttle and steering integrator calc 2017-10-07 14:55:16 +09:00
Andrew Tridgell
f00f650f4f AP_Notify: fixed internal toshiba LED
we need to probe for both internal and external on all boards, not just
FMUv3
2017-10-07 12:34:47 +11:00
Michael du Breuil
0300f86913 AP_GPS: u-blox: Log unconfigured messages 2017-10-06 12:53:32 +01:00
Michael du Breuil
8719c2903a DataFlash: Log U-Blox config progress 2017-10-06 12:53:32 +01:00
Peter Barker
fa95edc260 DataFlash: factor out a Log_Write_IMUDT_instance 2017-10-06 01:42:01 +01:00
Peter Barker
06a2e05be5 DataFlash: log cell voltages with correct packet type 2017-10-06 01:42:01 +01:00
Peter Barker
79ba2b357f DataFlash: factor out a Log_Write_Current_instance 2017-10-06 01:42:01 +01:00
Peter Barker
8d3267a731 DataFlash: factor out a Log_Write_Compass_instance 2017-10-06 01:42:01 +01:00
Peter Barker
a7063393b4 DataFlash: factor out a Log_Write_IMU_instance 2017-10-06 01:42:01 +01:00
ChristopherOlson
7e086e8c4d AP_Motors: Fix DDFP so tail motor doesn't start without Channel 8 high 2017-10-05 13:41:34 +11:00
Leonard Hall
d28182435e AP_Motors: allow for negative thrust expo
This allows for motors with a thrust curve that decreases with demand.
2017-10-05 13:40:36 +11:00
Andrew Tridgell
5646afac1c AP_Compass: avoid double detection of the AK09916
with an ICM20948 we can double detect the compass due to the i2c pass-thru
2017-10-04 11:49:06 +11:00
priseborough
efdc651d1a AP_NavEKF2: Require reboot after changing ALT_SOURCE parameter
Toggling between alt sources in flight using the parameter can have unpredictable effects due to the various height offsets and the possibility that the data source may be unavailable.
2017-10-04 00:24:15 +01:00
Andrew Tridgell
e1f8e7bc58 AP_Motors: cope with H vs X frame in HeliQuad 2017-10-03 10:16:41 +11:00
Andrew Tridgell
09c3eeaf0c AP_Motors: improved heli-quad yaw control 2017-10-03 10:16:41 +11:00
Andrew Tridgell
a7713da703 AP_Motors: reserve collective range for attitude control 2017-10-03 10:16:41 +11:00
Andrew Tridgell
f07aac396c AP_Motors: support inverted flight for helicopters 2017-10-03 10:16:41 +11:00
Andrew Tridgell
f2efea4e1d AC_AttitudeControl: added inverted flight support
for helis
2017-10-03 10:16:41 +11:00
Andrew Tridgell
55d5fe843e AP_Motors: added Heli_Quad backend
supporting collective pitch quadcopters
2017-10-03 10:16:41 +11:00
Lucas De Marchi
4d5aed1d69 AP_HAL_Linux: UARTDevice: never be the controlling terminal
If we are the controlling terminal for a tty device we will receive a
SIGHUP when the device disappears. Currently what happens is that we
simply stop the whole process. We don't want to fall off the sky due
to a bad device. This can happen for any reason, but it's more likely
if the UART is behind a USB connection.
2017-10-02 11:05:09 -07:00
Peter Barker
d7638389ce DataFlash: factor out a Log_Write_Baro_instance 2017-09-29 11:16:44 +01:00
Lucas De Marchi
5ebc8c2cb3 AP_HAL_Linux: ToneAlarm: ifdef out bogus message
These messages are only valid in a small subset of Linux boards (those
based on BBB and variants).  The ToneAlarm class should actually be
split allowing different implementations, but for now let's just disable
the message.
2017-09-28 09:00:26 -07:00
Lucas De Marchi
7edde571e1 AP_HAL: RCOutput_Tap: make LEDs blink on non-Aero ESCs
The protocol defines bits for controlling possible LEDs. On Aero the ESC
firmware simply ignores these bits and blink with a fixed frequency.
Add logic to be able to blink the ESC if not flashed with the Aero
version of the firmware.
2017-09-28 08:59:52 -07:00
Lucas De Marchi
2c3054cbae AP_HAL: RCOutput_Tap: remove feedback from ESCs
This is not currently working on Aero, the only user of it right now,
and it has been commented out. Remove dead code.
2017-09-28 08:59:52 -07:00
Lucas De Marchi
d3a1ed9792 AP_HAL: RCOutput_Tap: fix comment with protocol bits 2017-09-28 08:59:52 -07:00
Michael du Breuil
3023fac4d0 AP_GPS: SBF enable comment block logging
This is intended to help with GCS's injecting custom data to the GPS
2017-09-27 19:29:32 +01:00
Michael du Breuil
561acb372e AP_GPS: SBF send port enable string on start
Also prohibts SBF, GSOF, NOVA drivers from getting config strings not
meant for them
2017-09-27 19:29:32 +01:00
Michael du Breuil
bfbec02736 AP_GPS: SBF track the GPS error bits 2017-09-27 19:29:32 +01:00
Michael du Breuil
0d522663b2 AP_GPS: SBF: fix the PVTMode to support PPK (and baseline) units 2017-09-27 19:29:32 +01:00
Michael du Breuil
80b71b9ced AP_GPS: SBF: Validate that configuration was accepted
Note: The config string of "spm, Rover, StandAlone+SBAS+DGPS+RTK\n" is
incompatible with AsteRx-M FW 3.6.3 and will result in refusing to
arm/pass configuration checks
2017-09-27 19:29:32 +01:00
Michael du Breuil
20988b9f05 AP_GPS: SBF respect GPS_AUTO_CONFIG 2017-09-27 19:29:32 +01:00
Lucas De Marchi
2fc6e52431 AP_Compass: use IST8310 and HMC5883 as external mags 2017-09-27 09:25:34 -07:00
Lucas De Marchi
58ae139b8f AP_HAL: add possible external compasses for aero 2017-09-27 09:25:34 -07:00
Francisco Ferreira
6e286a2e66
AP_Compass: re-enable QMC5883 compass driver by default
This reverts commit a657daf635
2017-09-27 12:24:36 +01:00
Andrew Tridgell
08344557d9 AP_HAL: fixed missing LPS25H define 2017-09-27 16:42:31 +10:00
Dr.-Ing. Amilcar Do Carmo Lucas
09baac8f25 AP_GPS: Preserve the instance number, otherwise it will get set to zero
Signed-off-by: Dr.-Ing. Amilcar Do Carmo Lucas <amilcar.lucas@iav.de>
2017-09-26 23:15:10 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas
8b9fb19061 AP_GPS: Added const just to be explicit (NFC)
Signed-off-by: Dr.-Ing. Amilcar Do Carmo Lucas <amilcar.lucas@iav.de>
2017-09-26 23:15:10 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas
175b7c5389 AP_GPS: spellcheck in coment (NFC) 2017-09-26 23:15:10 -07:00
Aaron Wang Shi
6a82e3aecd AP_HAL_Linux: Add debug message in RCInput_RPI _timer_tick() 2017-09-25 21:11:56 -07:00
Aaron Wang Shi
ccde7cfdd4 AP_HAL_Linux: Restart RCInput_RPI DMA sampling if it stops 2017-09-25 21:10:54 -07:00
Lucas De Marchi
903ef4d065 AP_SmartRTL: update example to new API and fix object copy
ahrs should be a reference to DummyVehicle::ahrs, otherwise it will
act on a different object.

This also corrects the member initialization order: only pass a copy
or reference of an object to a constructor if it has already been
initialized.
2017-09-26 03:01:21 +01:00
Lucas De Marchi
c745908b14 AP_Landing: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
67e02e3c55 AP_L1_Control: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
15527d762f APM_Control: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
61a629d766 AP_TECS: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
bfd13dfe87 global: use static method to construct AP_AHRS_DCM 2017-09-26 03:01:21 +01:00
Lucas De Marchi
cd1ff7b86f AP_AHRS: DCM: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
beabae6a98 global: use static method to construct AP_AHRS_NavEKF 2017-09-26 03:01:21 +01:00
Lucas De Marchi
e2a9d9c001 AP_AHRS: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
c9fbf7b722 global: use static method to construct AP_NavEKF3 2017-09-26 03:01:21 +01:00
Lucas De Marchi
bd6145af6d AP_NavEKF3: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
e2fe36357a global: use static method to construct AP_NavEKF2 2017-09-26 03:01:21 +01:00
Lucas De Marchi
3c04f4e4d1 AP_NavEKF2: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
46e8d9b6d1 AP_Avoidance: add static create method for AP_Avoidance_* 2017-09-26 03:01:21 +01:00
Lucas De Marchi
cce51ec1c3 AP_ADSB: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
1baccdaf85 AC_InputManager: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
b29a183a74 AC_PrecLand: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
122f3d110b AP_Terrain: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
beabccf9ef AP_LandingGear: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
31db77e47b global: use static method to construct AP_Parachute 2017-09-26 03:01:21 +01:00
Lucas De Marchi
88dea049b4 AP_Parachute: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
e1733a5a99 AC_Sprayer: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
b09e0c3261 AP_RSSI: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
e68c5a4668 AC_Avoidance: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
b05610870c global: use static method to construct AP_Rally 2017-09-26 03:01:21 +01:00
Lucas De Marchi
2f2abc2924 AP_Rally: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
52686ec838 AC_Fence: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
563f9bfe89 AP_Mount: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
ddde53f84c AP_Camera: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
df29015533 AP_ServoRelayEvents: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
13d7f58036 global: use static method to construct AP_Relay 2017-09-26 03:01:21 +01:00
Lucas De Marchi
87d2bf22f2 AP_Relay: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
8b5d799885 AP_Frsky_Telem: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
b022c02029 global: use static method to construct AP_BattMonitor 2017-09-26 03:01:21 +01:00
Lucas De Marchi
bd8f0a9e93 AP_BattMonitor: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
69b6d95cb2 global: use static method to construct AP_Board_Config{,_CAN} 2017-09-26 03:01:21 +01:00
Lucas De Marchi
ef3edc531c AP_BoardConfig: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
c10a91964f AP_RCMapper: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
72fd2d6f05 global: use static method to construct AP_SerialManager 2017-09-26 03:01:21 +01:00
Lucas De Marchi
04866e9f76 AP_SerialManager: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
fbe0d9761c global: use static method to construct AP_OpticalFlow 2017-09-26 03:01:21 +01:00
Lucas De Marchi
04c3dca3ce AP_OpticalFlow: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
39aee74b29 AP_Arming: make constructor protected 2017-09-26 03:01:21 +01:00
Lucas De Marchi
b36a5919f5 global: use static method to construct AP_Mission
This also move the initialization to be in the header for those that
weren't already to maintain consistency.
2017-09-26 03:01:21 +01:00
Lucas De Marchi
ef50783268 AP_Mission: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
de5e044b02 global: use static method to construct AP_RPM 2017-09-26 03:01:21 +01:00
Lucas De Marchi
aefae9381e AP_RPM: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
40fd1b346c global: remove rangefinder from AP_AHRS_NavEKF
AP_AHRS_NavEKF doesn't use the rangefinder, it just delegates the
calls to the right estimator.

For libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.cpp the initialization
order has also been modified to match the order on vehicles. It's more
correct since it passes a reference when EKF2/EKF3 are already
constructed, while thos constructors use a pointer.  Ideally these
should be moved to an init() method though, or use a get_instance().
2017-09-26 03:01:21 +01:00
Lucas De Marchi
9027a55696 global: use static method to construct RangeFinder 2017-09-26 03:01:21 +01:00
Lucas De Marchi
2e80b2e1d0 AP_RangeFinder: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
b3d8c0fc08 AP_Mount: use DataFlash_Class::instance()
Instead of requiring DataFlash_Class reference to be passed
on the init() function, get it from the singleton directly.
2017-09-26 03:01:21 +01:00
Lucas De Marchi
53c82b4aaf global: use static method to construct DataFlash_Class 2017-09-26 03:01:21 +01:00
Lucas De Marchi
a25320d522 DataFlash: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
6aaa00d915 AP_LeakDetector: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
9463dbb408 AP_Notify: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
de680dac5b global: use static method to construct AP_Scheduler 2017-09-26 03:01:21 +01:00
Lucas De Marchi
d3e12eb899 AP_Scheduler: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
8094482f21 global: use static method to construct AP_GPS 2017-09-26 03:01:21 +01:00
Lucas De Marchi
2cb2727a31 AP_GPS: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
87b30b4552 global: use static method to construct AP_InertialSensor 2017-09-26 03:01:21 +01:00
Lucas De Marchi
d566567d87 AP_InertialSensor: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
c1a957fbf3 global: use static method to construct Compass 2017-09-26 03:01:21 +01:00
Lucas De Marchi
320260a151 AP_Compass: add static create method 2017-09-26 03:01:21 +01:00
Lucas De Marchi
91feec0e14 global: use static method to construct AP_Baro 2017-09-26 03:01:21 +01:00
Lucas De Marchi
c5c1d5abfe AP_Baro: add static create method 2017-09-26 03:01:21 +01:00
Michael du Breuil
c34104b369 APM_Control: Simpify yaw controller trig 2017-09-25 16:49:54 -07:00
Michael du Breuil
eb9dd8c5a2 AP_Landing: Fix an error when computing the course offset for deepstall 2017-09-25 15:34:25 -07:00
Lucas De Marchi
54a4a78795 AP_Common: do not include version.h/ap_version.h
The interface provided by each vehicle should be used to get the
version.
2017-09-23 21:37:45 -07:00
Lucas De Marchi
9e7bda83bf DataFlash: add temporary workaround for macro usage
Make DataFlash correctly save the git version. We should think about a
better solution, like it was done on GCSMavlink, but this is the minimal
change to make it possible to move includes of version.h to their
respective users.
2017-09-23 21:37:45 -07:00
Lucas De Marchi
ec935cf0fe GCS_MAVLink: refactor send_banner() to use AP_FWVersion 2017-09-23 21:37:45 -07:00
Lucas De Marchi
ed2b8d3476 GCS_MAVLink: refactor send_autopilot_verison() to use AP_FWVersion
Make the method use the getter directly to get a reference of
AP_FWVersion and work out everything that needs to be sent. This allows
us to remove ifdefs and replace with runtime if/else.

Note that there's also a bug fix: we were not setting flight_custom_version
to zero in case GIT_VERSION wasn't defined.
2017-09-23 21:37:45 -07:00
Lucas De Marchi
370e10281b AP_Common: AP_FWVersion: add pointers to git hash strings
Keeping the hash strings on this struct allow to handle them
the same way on common code and remove ifdefs.
2017-09-23 21:37:45 -07:00
Andrew Tridgell
678bd084b7 AP_Compass: added IST8310 on FMUv3 I2C 2017-09-23 08:07:18 +10:00
davidaroyer
cb270a9acf AP_RangeFinder: cleanup variable names in uLanding driver 2017-09-22 18:08:27 +01:00
davidaroyer
8284fb1093 AP_RangeFinder: update uLanding driver for new firmware data format 2017-09-22 18:08:27 +01:00
fnoop
149188de12 AP_HAL: Add size() method to RingBuffer ObjectArray 2017-09-22 09:56:00 -07:00
fnoop
3ddd9a6bca AP_HAL: RingBuffer: Prefix private members with underscore 2017-09-22 09:55:49 -07:00
Andrew Tridgell
2c68b5dac3 AP_Airspeed: fixed airspeed autocal
don't use negative pressures
2017-09-22 18:24:29 +10:00
Mark Whitehorn
dedb40ce0b SITL: add parameter to simulate reversed pitot tube order 2017-09-22 18:21:09 +10:00
Mark Whitehorn
f32f51f843 AP_Airspeed: eliminate airspeed positive bias 2017-09-22 18:21:09 +10:00
Lucas De Marchi
3847825fba AP_HAL_Linux: make Aero use Tap ESC
This allows controlling the motors from Linux on Intel Aero RTF given
the right FPGA firmware is in place.
2017-09-21 07:59:20 -07:00
Lucas De Marchi
68b3e5ccab AP_HAL: aero: define uart RCOutput_Tap 2017-09-21 07:59:20 -07:00
Lucas De Marchi
51665a2ea9 AP_HAL: RCOutput_Tap: split baudrate set for Linux and Nuttx
On Linux (and in most of posix-like systems) the baudrate set in struct
termios via cfset[io]speed is actually the index of the standard
baudrates, it's not the baudrate per se (hence the use of B* macros).

On Linux it's possible to set the baudrate by passing the baudrate
itself to TCSETS2 ioctl.  Unfortunately it's not possible to include
asm/termbits.h and termios.h in the same compilation unit, so we need to
split it. Here we split into a Linux and a NuttX implementation.
2017-09-21 07:59:20 -07:00
Lucas De Marchi
58a76adc13 AP_HAL: RCOutput_Tap: allow different device to be used 2017-09-21 07:59:20 -07:00
Lucas De Marchi
f6b1099896 AP_HAL: move in tap esc implementation
This can be shared with Linux.
2017-09-21 07:59:20 -07:00
Peter Barker
3af5be76aa DataFlash: protect write fd with semaphore
If the sensor threads are using WriteBlock they may pass the _write_fd
== -1 check but then have that set to -1 by the main thread
2017-09-20 11:33:07 +01:00
Randy Mackay
953adc506d GCS_MAVLink: add break in default case
non-functional change but removes some warnings in eclipse editors
2017-09-20 12:14:38 +09:00
Peter Barker
d0c2898ebc GCS_MAVLink: move handling of SET_GPS_GLOBAL_ORIGIN up 2017-09-19 15:44:23 +09:00
Randy Mackay
f029303d96 AP_Arming: check ahrs and gps differ by less than 10m 2017-09-19 10:30:15 +09:00
Randy Mackay
07c195a865 GCS_MAVLink: add send_ekf_origin 2017-09-19 10:30:15 +09:00
Peter Barker
6bd7089718 GCS_MAVLink: implement handling of MAV_CMD_DO_SET_MODE 2017-09-19 01:24:11 +01:00
Peter Barker
8507763a1c GCS_MAVLink: create _handle_set_mode for common msg and cmd-long code 2017-09-19 01:24:11 +01:00
Peter Barker
d1b47e863d DataFlash: resolve race conditions with IMU logging thread 2017-09-19 09:40:11 +10:00
Peter Barker
0f54cc9b22 AP_HAL_SITL: implement in_main_thread 2017-09-19 09:40:11 +10:00
Peter Barker
b7bfef3cdf AP_HAL_QURT: make in_main_thread const and override 2017-09-19 09:40:11 +10:00
Peter Barker
9cb23f6108 AP_HAL_VRBRAIN: make in_main_thread const and override 2017-09-19 09:40:11 +10:00
Peter Barker
8d208ea514 AP_HAL_PX4: make in_main_thread const and override 2017-09-19 09:40:11 +10:00
Peter Barker
044cac42e8 AP_HAL_Linux: make in_main_thread const and override 2017-09-19 09:40:11 +10:00
Peter Barker
68652867e1 AP_HAL: make in_main_thread public, pure and virtual 2017-09-19 09:40:11 +10:00
mirkix
93b3970141 SITL: Add tilthvec frame 2017-09-18 21:20:39 +10:00
Rufus Wong
9491f7da55 AP_Compass: Add break to prevent fallthrough of PIXRACER to PIXHAWK_PRO 2017-09-18 19:57:22 +10:00
Andrew Tridgell
7ade37bd4e SITL: added SIM_GPS_ALT_OFS
this is used to give a bad GPS height in SITL, which is very useful for
testing origin vs home issues
2017-09-18 10:24:45 +10:00
Andrew Tridgell
25c7ee4d42 AP_HAL_SITL: added SIM_GPS_ALT_OFS
this is used to give a bad GPS height in SITL, which is very useful for
testing origin vs home issues
2017-09-18 10:24:45 +10:00
Steven Josefs
6e0ff8b169 AP_Proximity: add support for RP Lidar A2
This is a 360degree lidar with up to 16m range
2017-09-18 08:28:11 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
882c4f4052 AP_SerialMananger: add RP-Lidar A2 2017-09-18 08:28:09 +09:00
liorosh
f2b7dc74d7 AP_Baro: Adding a new LPS25H Barometer driver
The following is a Barometer sensor driver for the LPS25H Barometer that
is integrated in the 96Boards STM32 Sensor mezzanine board.
the update includes the .cpp and .h files of the driver as well as the
updates required in AP_Baro.cpp.
2017-09-16 21:08:06 +10:00
chobitsfan
02cfe9128d AP_GPS: parse RTK status in NMEA GGA message 2017-09-15 22:33:47 +01:00
Michael du Breuil
2f8f2ffd2d AP_GPS: Remove NMEA init blobs for binary drivers
All of the init strings that were sent in the NMEA driver are for GPS protocols
which have binary drivers, which provide far more features and are more robust.
It also appears that due to driver changes the config strings for SIRF/UBLOX
were no longer correct anyways).
2017-09-15 14:30:48 -07:00
Randy Mackay
6d15a72f3a AP_SmartRTL: complete rename to SmartRTL 2017-09-15 08:58:14 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
d3a18e803e AP_GPS: Fix MAVLink message field SYSTEM_TIME.time_unix_usec when GPS_AUTO_SWITCH = blend
The mavlink message field SYSTEM_TIME.time_unix_usec works fine with GPS_AUTO_SWITCH == 0 (no switch) or ==1 (usebest)
But when GPS_AUTO_SWITCH == 2 (blend) then state[GPS_BLENDED_INSTANCE].last_gps_time_ms gets initialized with 0 and never rewritten.

The consequence: SYSTEM_TIME.time_unix_usec gets stuck at zero.
The solution: Do not reset state[GPS_BLENDED_INSTANCE].last_gps_time_ms because it would overwrite the correct value already set on line 1149
2017-09-14 12:38:30 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
e03826890a AP_GPS: Fix typo in comment 2017-09-13 14:22:57 -07:00
Tom Pittenger
1c223b520c AP_ADSB - update description of ADSB_RF_SELECT to say Rx-only devices are always in Rx mode 2017-09-13 13:46:21 -07:00
Michael du Breuil
0bbbb3d08d AP_AdvancedFailsafe: Allow landing to be a termination action 2017-09-13 13:15:08 -07:00
Michael du Breuil
40f49733ea AP_Landing: Support usage for termination 2017-09-13 13:15:08 -07:00
Michael du Breuil
bde1b6e886 AP_Arming: Collapse GPS checks into the same branch 2017-09-13 13:36:40 +01:00
Michael du Breuil
3ab9b75df0 AP_Arming: Check GPS update rate as part of the GPS checks 2017-09-13 13:36:40 +01:00
Michael du Breuil
cf02204e6c Dataflash: Log GPS delta times
This is particularly useful for assessing if a GPS actually is dropping out in a users log, or if the log is just dropping messages
2017-09-13 13:36:40 +01:00
Michael du Breuil
04eb7f411e AP_GPS: Track the delta time between the last GPS positions 2017-09-13 13:36:40 +01:00
Lucas De Marchi
58dec08b29 GCS_MAVLink: fix non static perf counter
Commit b9877e0d38
(GCS_MAVLink: make per channel perf counter non-static) made the
perf counters to be available per instance but missed the fact that
the perf infra doesn't copy the string.

Fix this by maintaining a the string inside the object.
2017-09-12 17:24:31 -07:00
Lucas De Marchi
13f4ba7392 AP_HAL: remove raspilot 2017-09-12 15:06:19 -07:00
Lucas De Marchi
15bfa940a7 AP_Notify: remove raspilot 2017-09-12 15:06:19 -07:00
Lucas De Marchi
caa4e3ee89 AP_InertialSensor: remove raspilot 2017-09-12 15:06:19 -07:00
Lucas De Marchi
b1740e2d9c AP_Compass: remove raspilot 2017-09-12 15:06:19 -07:00
Lucas De Marchi
7ba82ff23a AP_HAL_Linux: remove raspilot
It's not being sold, there are just a few (different) engineering
samples built and there are no plans for this to go forward for people
that were pushing it.
2017-09-12 15:06:19 -07:00
Peter Barker
b4e536b424 GCS_MAVLink: move gcs_out_of_time into GCS object 2017-09-12 18:28:07 +01:00
Andrew Tridgell
697131e94a AP_Notify: support dual I2c toshiba LEDs
This restructures AP_Notify to allow for multiple backends of the same type.
2017-09-11 10:39:39 -07:00
Francisco Ferreira
4398be2275 AP_HAL_Linux: remove URUS 2017-09-11 10:04:11 -07:00
Francisco Ferreira
51a8aa3d1f AP_HAL: remove URUS 2017-09-11 10:04:11 -07:00
Lucas De Marchi
b9877e0d38 GCS_MAVLink: make per channel perf counter non-static
Otherwise the perf counter from one channel may affect the other if
during an update of one channel the update function of the other gets
called.
2017-09-11 10:01:57 -07:00
Lucas De Marchi
d5f57fdd93 AP_Compass: AK8963: remove fallback to timer thread
Now that the bus thread from the AuxiliaryBus is implemented we can
remove the fallback.
2017-09-11 09:52:41 -07:00
Lucas De Marchi
06fe5ce8ba AP_InertialSensor: implement periodic thread for AuxiliaryBus 2017-09-11 09:52:41 -07:00
Peter Barker
4263c1a90c DataFlash: file not being initialised means logging is failed 2017-09-11 17:42:38 +01:00
squilter
cb0f50a1c8 AP_SmartRTL: renamed from SafeRTL 2017-09-09 14:05:41 +09:00
Randy Mackay
4415a6b052 AP_SafeRTL: update example sketch
remove pruning test because this is always performed after simplification
modify expected results to match latest algorithm
2017-09-09 14:05:41 +09:00
Randy Mackay
939ca36c33 AP_SafeRTL: simplify and prune regularly
remove overlapping prunable loops (keeps longest loop)
replace use of Bitmask calls with flag
restart_pruning protection against overflow
remove argument to reset_simplification and reset_pruning
fix setting _simplify.path_points_completed
fix add_loop - compare length of new loop to sum of all existing loops that would be
replaced
add program error protection - an overflow of the path_points_count index is dangerous so although it should never happen, if it does, deactivate
reduce the simplify and prune path-points-completed numbers as points are popped off the path so that if the user aborts the SafeRTL simplification and pruning process any new points added aftwards
2017-09-09 14:05:41 +09:00
Randy Mackay
5d977cf799 AP_SafeRTL: check semaphore allocation
Remove redundant position_ok check from update
Reorder timeout checks in update

These are in fixes from WickedShell's review, thanks!
2017-09-09 14:05:41 +09:00
Randy Mackay
811e115a21 AP_SafeRTL: move simplify and prune state into structures 2017-09-09 14:05:41 +09:00
Randy Mackay
e0da7ed09c AP_SafeRTL: fixes from peer review
- ACCURACY parameter description
- SafeRTL comments reduced to fit 80 characters
- moved a Comment down a line
- renamed definition to SAFERTL_PRUNING_LOOP_TIME_US
- comment change of "algorithm" to "algorithms"
- removed destructor (same could be done for AP_Airspeed then)
- updated GCS message to, "failed to save initial point"
- "update" comment modified from "a couple" to "several"
- added "const" ahead of "now = AP_HAL::millis()"
- added new deactivate method
- const run_background_cleanup's path_points_count
- removed unnecessary "return } else {"
- const potential_amount_to_simplify
- s/as/has in comments
- zero_points_by_simplify_bitmask starts from path[1] so as to never remove the start point
- remove_empty_points gets for loop in place of while, inverted clauses
- clarified dist_point returns value FLT_MAX in distance field
- lots of "const" added to segment_segment_dist, removed unnecessary else
- reference in Log_action.  Can't do it because want default
- ::update() comments add "3hz"
2017-09-09 14:05:41 +09:00
squilter
f094cb57f7 AP_SafeRTL: library to return to home along safe path 2017-09-09 14:05:41 +09:00
Randy Mackay
2aa1f3f100 AP_Math: replace divide with multiply in distance_to_segment 2017-09-09 14:05:41 +09:00
Randy Mackay
e892bbbac0 AP_Math: add Vector3f::distance_to_segment 2017-09-09 14:05:41 +09:00
squilter
1a9bccaaa7 AP_Common: fix Bitmask out-of-range values 2017-09-09 14:05:41 +09:00
Randy Mackay
963c9c93fe AP_Common: constify bitmask 2017-09-09 14:05:41 +09:00
Randy Mackay
e6328c350d AP_Math: add Vector3f::distance_squared 2017-09-09 14:05:41 +09:00
Randy Mackay
f187df225a AP_Common: add setall, count and size methods to Bitmask 2017-09-09 14:05:41 +09:00
squilter
da7aa36f2d AC_WPNav: add set_wp_destination_NED to accept target in meters NED 2017-09-09 14:05:41 +09:00
squilter
f37d742160 DataFlash: support SafeRTL log messages 2017-09-09 14:05:41 +09:00
Andrew Tridgell
99aad41955 AC_AttitudeControl: added a update_vel_controller_xy() API
this allows for just XY control of velocity for quadplanes
2017-09-09 08:14:09 +10:00
Peter Barker
b8d3d180d1 AP_BoardConfig: clarify board type 2 also to be used on the Cube autopilot 2017-09-08 18:02:34 +01:00
davidaroyer
ad18e99bef AP_Compass: add support for Aerotenna OcPoC-Zynq hardware 2017-09-08 07:30:49 -07:00
davidaroyer
7d2e44862f AP_HAL_Linux: add support for Aerotenna OcPoC-Zynq hardware 2017-09-08 07:30:49 -07:00
davidaroyer
8862e76284 AP_HAL: add support for Aerotenna OcPoC-Zynq hardware 2017-09-08 07:30:49 -07:00
Georgii Staroselskii
e79fc893fa AP_HAL_Linux: HAL_Linux_Class: delay SPIUARTDriver static initialization
There's an implicit (apart from the name) dependency between SPI and
SPIUARTDriver which results in a crush on a restart or a shutdown.

By moving the initialization we're making sure that all objects are
deleted in the right order.
2017-09-08 07:26:54 -07:00
Georgii Staroselskii
226eeeb738 AP_HAL_Linux: RCOutput_Sysfs: fix deleting _pwm_channels array
delete [] should be called rather than delete.
2017-09-08 07:26:54 -07:00
Georgii Staroselskii
f6858821a6 AP_HAL_Linux: PWM_Sysfs: remove unneeded free() in ~PWM_Sysfs_Base
_export_path and _duty_path will have been already long time gone by the
time dtors kick in.

Probably better to use OwnPtr around those. But it's better to be done
in a separate PR.
2017-09-08 07:26:54 -07:00
VikingDai
9f0e8a64d5 Update HAL_PX4_Class.cpp
"ttys5" used both for console and common usart ,it should be initialized by AP_SerialManager ;
2017-09-08 10:33:40 +10:00
Michael du Breuil
fb77d0739e AP_Compass: Remove unused time calls, stash the time in the read loop 2017-09-07 19:53:14 +01:00
Peter Barker
85ebe923b6 SITL: avoid FPE when running fly.ArduPlane
Program received signal SIGFPE, Arithmetic exception.
__expf_finite () at ../sysdeps/x86_64/fpu/e_expf.S:132
132     ../sysdeps/x86_64/fpu/e_expf.S: No such file or directory.
(gdb) u
2017-09-06 20:22:52 +10:00
Peter Barker
97b6ca218b AP_AHRS: send ekf status reports even when EKF inactive 2017-09-06 10:50:49 +10:00
Michael du Breuil
be371e09f9 AP_GPS: SBF: Reject short packets early, allow 256 byte long messages to be decoded 2017-09-06 10:41:36 +10:00
Andrew Tridgell
048dfee68a AP_GPS: make SBF driver more robust
this fixes a crash bug in the SBF GPS driver where a badly formed packet
could cause crc16_ccitt to reference invalid memory
2017-09-06 10:41:33 +10:00
Lucas De Marchi
b62e8909c4 AP_GPS: add missing fallthrough 2017-09-01 13:45:22 -07:00
Lucas De Marchi
cb9c626577 AP_ADSB: fix getting a copy rather than a reference
These have been caught by making constructors private and enforcing
calling a create() method to create objects are supposed to be
statically allocated only.

The Vector3f reference was just nearby and was a change copied from
similar PR from Peter Barker (#6873).
2017-09-01 13:45:22 -07:00
Lucas De Marchi
2c72fc94ba AP_HAL: change aerofc baud to 921600 2017-09-01 07:55:47 -07:00
Peter Barker
698f18566b AP_Terrain: cast to int32_t to avoid warning about signedness
../../libraries/AP_Terrain/TerrainIO.cpp: In member function ‘void
AP_Terrain::open_file()’:
../../libraries/AP_Terrain/TerrainIO.cpp:176:46: warning: format ‘%u’
expects argument of type ‘unsigned int’, but argument 5 has type
‘__gnu_cxx::__enable_if<true, double>::__type {aka double}’ [-Wformat=]
              abs((uint32_t)block.lon_degrees));
                                              ^
../../libraries/AP_Terrain/TerrainIO.cpp:176:46: warning: format ‘%u’
expects argument of type ‘unsigned int’, but argument 7 has type
‘__gnu_cxx::__enable_if<true, double>::__type {aka double}’ [-Wformat=]
2017-09-01 13:30:56 +01:00
Peter Barker
6ad3541a24 DataFlash: clean up public interface 2017-09-01 10:58:07 +01:00
Peter Barker
ac806b650f GCS_MAVLink: move handling of do_send_banner up 2017-08-30 15:54:47 +01:00
Peter Barker
1544a92f8b GCS_MAVLink: factor out a send_banner 2017-08-30 15:54:47 +01:00
Peter Barker
2e078f7c5e GCS_MAVLink: send fw_string, px4 git hash and nuttx hash on param request 2017-08-30 15:54:47 +01:00
Peter Barker
8a7a1b77dd GCS_MAVLink: handle param_request_list in GCS_MAVLINK base class 2017-08-30 15:54:47 +01:00
Peter Barker
50242178b3 GCS_MAVLink: handle param_set in GCS_MAVLINK base class 2017-08-30 15:54:47 +01:00
Peter Barker
95ff94bfad GCS_MAVLink: factor out a handle_common_param_message 2017-08-30 15:54:47 +01:00
Peter Barker
add1743c12 GCS_MAVLink: move send_autopilot_request calls up to GCS base class 2017-08-30 15:54:46 +01:00
Peter Barker
e9204a66ee GCS_MAVLink: include version for AP_FWVersion 2017-08-30 15:54:46 +01:00
Peter Barker
f32651a38c DataFlash: include version for AP_FWVersion 2017-08-30 15:54:46 +01:00
Peter Barker
445777429b AP_FWVersion: add structure to hold firmware version 2017-08-30 15:54:46 +01:00
Randy Mackay
aaac6b3692 AP_Common: Bitmask formatting fix 2017-08-30 20:07:04 +09:00
ChrisBird
46c982d64f AP_Mission: add OPTIONS parameter
First option added now is to clear the mission on reboot
Fixes #5743
2017-08-29 21:28:19 +01:00
Michael du Breuil
a895d69b42 GCS_MAVLink: Correct a bug in the FOR_EACH_ACTIVE_CHANNEL macro 2017-08-29 13:27:27 -07:00
Jacob Walser
e492c733d8 AP_Baro: fixup Keller LD comments 2017-08-29 12:30:32 -04:00
Michael du Breuil
db6d8c9c43 AP_Mission: Use a static assert to check content size 2017-08-29 14:37:56 +01:00
Jacob Walser
f4dfbb9dad AP_JSButton: input_hold_toggle -> input_hold_set 2017-08-29 08:10:05 -04:00
Jacob Walser
07e00de549 AP_Baro: Tweak Keller LD driver for better performance after initial tests 2017-08-29 08:08:16 -04:00
Jacob Walser
2a71afd3ba AP_Baro: Remove superfluous casts 2017-08-29 08:08:16 -04:00
Jacob Walser
a08da4ecc4 AP_Baro: New AP_Baro_Keller device driver 2017-08-29 08:08:16 -04:00
Andrew Tridgell
7e1368f7a5 AP_InertialSensor: implement notch filter on gyro 2017-08-29 13:52:29 +10:00
Andrew Tridgell
50dcca39bd Filter: added a notch filter
maths from Leonard
2017-08-29 13:52:29 +10:00
Peter Barker
0f22f923e1 AC_InputManager: remove MAIN_LOOP_RATE in favour of parameter value 2017-08-29 08:41:07 +09:00
Andrew Tridgell
4aa068d63d SITL: added simple launch sim for plane
allow for bungee, catapult and hand launches
2017-08-29 07:35:04 +10:00
Peter Barker
9783c0c3ba DataFlash: log dataflash-file statistics periodically 2017-08-28 22:05:44 +01:00
Peter Barker
776d88bb6b DataFlash: remove duplicate variables 2017-08-28 22:05:44 +01:00
Andrew Tridgell
29fe432dd7 AP_SerialManager: enable debug console use for other protocols
this allows SERIAL5_PROTOCOL to be set on FMUv2 and FMUv3 for use by
other protocols
2017-08-28 17:57:28 +10:00
Andrew Tridgell
d09b549144 HAL_PX4: allow uart5 to be used for non-nsh on FMUv2/FMUv3 2017-08-28 17:57:28 +10:00
Andrew Tridgell
0155434057 RC_Channel: fixed bug in manual with TRIM == MIN
This fixes the bug described here:

https://discuss.ardupilot.org/t/arduplane-reverse-thrust-setup/18324/5

which otherwise would prevent output with TRIM == MIN or TRIM == MAX
2017-08-26 20:30:54 +10:00
Peter Barker
2f9fb581fe DataFlash: remove bad FALLTHROUGH causing compilation failure 2017-08-24 15:49:15 +09:00
Peter Barker
921985fe27 GCS_MAVLink: allow statustext logging from any source system
Turns out this is terribly useful for companion computers if
you allow them to log things when they're not your GCS.

The original check was bogus; if someone is talking to you via
mavlink they can do much worse than fill your logs!
2017-08-23 15:58:47 +01:00
Jacob Walser
e8f5967682 GCS_MAVLink: Add MSG_NAMED_FLOAT ap_message id 2017-08-23 13:40:52 +01:00
Lucas De Marchi
3414883f05 AP_GPS: remove tabs and fix coding style 2017-08-22 23:59:13 -07:00
Lucas De Marchi
927289aa64 DataFlash: 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
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
Lucas De Marchi
b37ca322f1 AP_Landing: 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
Lucas De Marchi
0e502d89a3 AP_HAL: 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
Lucas De Marchi
8389158d76 AP_GPS: 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
Lucas De Marchi
7c6f9a004e AP_Baro: 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
Lucas De Marchi
e2e836f676 AP_Airspeed: 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
Lucas De Marchi
3102247a85 AP_Common: add FALLTHROUGH define 2017-08-22 23:59:13 -07:00
Randy Mackay
e13f4d0d56 DataFlash: removed unused optFlowEnabled from Log_Write_EKF 2017-08-23 11:19:14 +09:00
Randy Mackay
59ffc3cd65 AP_OpticalFlow: minor order declaration change
non-functional change
2017-08-23 11:19:14 +09:00
Randy Mackay
cf24eef359 AP_OpticalFlow: init checks if enabled 2017-08-23 11:19:14 +09:00
Randy Mackay
bc38affcb1 AP_OpticalFlow: px4flow retries init 10 times at startup
This resolves an issue in which some px4flow sensors are slow to startup
2017-08-23 11:19:14 +09:00
Randy Mackay
fdb4c7b5ee AP_OpticalFlow: failure to init leaves enabled unchanged 2017-08-23 11:19:14 +09:00
Randy Mackay
a7afffe14a AP_OpticalFlow: rename BUS_ID parameter to ADDR
This makes the parameter more consistent with RangeFinder
2017-08-23 11:19:14 +09:00
chobits
d6845a911a AP_AHRS: fix get_relative_position_NE_home calcalation 2017-08-19 10:23:24 +09:00
Lucas De Marchi
66a1e420cb AP_HAL_Linux: RCInput_SoloLink: better name to first field
Checking the time on the tcpdump capture, it matches the first fields
from the data:

$ tshark -n -c 4 -r  ~/tmp/solo/rc.pcap
    1   0.000000     10.1.1.1 → 10.1.1.10    UDP 68 5005 → 5005 Len=26
    2   0.019976     10.1.1.1 → 10.1.1.10    UDP 68 5005 → 5005 Len=26
    3   0.040046     10.1.1.1 → 10.1.1.10    UDP 68 5005 → 5005 Len=26
    4   0.059961     10.1.1.1 → 10.1.1.10    UDP 68 5005 → 5005 Len=26

From the previous commit (first 2 packets):

     5fa8 f441 3414 0500 73d7  dc05 dc05 dc05 db05 e803 e803 e803 f401
     73f6 f441 3414 0500 74d7  dc05 dc05 dc05 db05 e803 e803 e803 f401

0x0005143441f45fa8 - 0x0005143441f4f673 = 0x4E14 = 19988 (usec)

Which seems to approximately match for the other packets as well. We are
not using the field since we rather get the time when we receive it, but
at least use a better name.
2017-08-17 12:04:27 -07:00
Lucas De Marchi
373d41fd6e AP_HAL_Linux: switch aero to RCInput_SoloLink 2017-08-17 12:04:27 -07:00
Lucas De Marchi
79b004cf6a AP_HAL_Linux: add prototype for handling SoloLink
This allows to use a Solo controller to control Linux-based flight
controllers. The protocol has been derived by analyzing a tcpdump
trace: some fields are ignored. Example trace of RC data (obtained
with `tshark -T fields -e data -n -c 5 -r  rc.pcap`

 unkonwn              seq   ch1  ch2  ch3  ...                ch8
 5fa8 f441 3414 0500 73d7  dc05 dc05 dc05 db05 e803 e803 e803 f401
 73f6 f441 3414 0500 74d7  dc05 dc05 dc05 db05 e803 e803 e803 f401
 dc44 f541 3414 0500 75d7  dc05 dc05 dc05 db05 e803 e803 e803 f401
 bc92 f541 3414 0500 76d7  dc05 dc05 dc05 db05 e803 e803 e803 f401
 dfe0 f541 3414 0500 77d7  dc05 dc05 dc05 db05 e803 e803 e803 f401
2017-08-17 12:04:27 -07:00
Peter Barker
154b212545 GCS_MAVLink: move serial_control case to base class 2017-08-17 12:42:31 +01:00
Peter Barker
b17c0482fb GCS_MAVLink: move play_tune and led_control handling to base class 2017-08-17 12:27:10 +01:00
Peter Barker
23d91c93c8 AP_HAL_Linux: correct compilation warning
../../../libraries/AP_HAL_Linux/RCInput_RPI.cpp:129:35: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
         ::read(file, &pageInfo, 8);
2017-08-17 11:28:36 +01:00
Randy Mackay
222dd0c9be AC_WPNav: correct comments
all position vectors are offsets from the ekf origin (not from the ahrs home)
2017-08-17 16:05:08 +09:00
Jacob Walser
b8e7d23cc4 AP_Arming: Add bool check_min_max parameter for Copter/Sub RC checks 2017-08-16 11:37:46 -04:00
Peter Barker
2a07a077d9 GCS_MAVLink: use GCS_MAVLINK subclasses to handle set_mode 2017-08-16 11:05:37 +10:00
Peter Barker
48c4e48225 AP_HAL_PX4: send statustext for RC input decoding type 2017-08-15 22:04:00 +01:00
Mateusz Sadowski
eb56a010b3 AP_RangeFinder: TeraRangerI2C: use address from parameter instead of hardcoded 2017-08-15 19:42:10 +01:00
Mateusz Sadowski
0993300506 AP_Rangefinder: rename trone to TeraRangerI2C 2017-08-15 19:27:49 +01:00
Peter Barker
b6076bcb77 GCS_MAVLink: adapt to new rangefinder method name 2017-08-15 19:00:29 +01: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
c79cbd71af GCS_MAVLink: use rangefinder backend accessors 2017-08-15 18:31:58 +01:00
Peter Barker
f1d350bbb1 DataFlash: use rangefinder backend accessors 2017-08-15 18:30:45 +01:00
Peter Barker
63440800fc AP_NavEKF3: use rangefinder backend accessors 2017-08-15 18:30:45 +01:00
Peter Barker
1e83ef3c44 AP_NavEKF2: use rangefinder backend accessors 2017-08-15 18:30:45 +01:00
Peter Barker
e0bea597c0 AP_Proximity: use rangefinder backend accessors 2017-08-15 18:30:45 +01:00
Peter Barker
c0aa10d84b AP_RangeFinder: move rangefinder backend data accessors to backend 2017-08-15 18:30:45 +01:00
Michael du Breuil
067335f68d GCS_MAVLink: Handle termination requests from the GCS 2017-08-15 15:14:56 +01:00
Michael du Breuil
97c1785bef AP_AdvancedFailsafe: Allow the GCS to request terminations 2017-08-15 15:14:56 +01:00
Miguel Arroyo
fc155eac7e AP_HAL_PX4: Adds UARTF as commandline option 2017-08-15 14:31:51 +01:00
JU Han
eebef857f1 AP_TECS: gain scaler K_STE2Thr multiplies by (THRmax - THRmin)
Makes both feed forward and feed-back consistent
2017-08-15 14:27:43 +01:00
Randy Mackay
9f876dc7a0 AR_AttitudeControl: throttle and steering control library
Throttle controller has these advantages over existing controller:
based on velocity in vehicle's forward-back axis rather than ground-speed
straight-forward PID controller using speed error as input
speed control acceleration limts
stop control slows vehicle smoothly
configurable filtering

Steer controller has these advantages over existing controller:
output scaled properly for skid-steering vehicles
layered P and PID controller for angular error and rate control
configurable filtering
2017-08-15 20:47:19 +09:00
Peter Barker
7173025b43 AP_Arming: warn about uncalibrated throttle but do not fail check
We can tighten this check up later, and will allow us to use
this common function for Plane and Rover in the future
2017-08-14 15:32:25 +09:00
Peter Barker
b2459c67d5 AP_Arming: move Copter RC checking code into library 2017-08-14 15:32:25 +09:00
Peter Barker
e3599ab4f9 AP_Param: remove CLI 2017-08-14 10:23:50 +09:00
Peter Barker
bff31e8b42 GCS_MAVLink: remove CLI 2017-08-14 10:23:50 +09:00
Andrew Tridgell
1a25087dd5 AC_AttitudeControl: fixed PIRO_COMP index
this is a new conflict due to stricter checking in AP_Param
2017-08-14 09:28:57 +09:00
Michael du Breuil
58e784024f AP_HAL_SITL: Add support for blocked pitot tube simulations 2017-08-10 20:15:35 +10:00
Michael du Breuil
4dbe282121 SITL: Add airspeed failure parameters 2017-08-10 20:15:35 +10:00
priseborough
2310cb6d19 AP_NavEKF3: Enable external control over use of GPS vertical velocity 2017-08-10 19:49:45 +10:00
priseborough
f2f3067326 AP_NavEKF2: Add interface to control GPS vertical velocity use 2017-08-10 19:49:45 +10:00
Mark Whitehorn
3642ecd9ef AP_COMPASS: fix errors in addition of alternate LIS3MDL I2C address
testing shows ROTATION_YAW_90 is correct for mRo Neo M8N GPS/compass
2017-08-10 19:46:26 +10:00
Mark Whitehorn
a6e9baa8f6 AP_Compass: probe for LIS3MDL in mRo Neo-M8N GPS module 2017-08-10 19:46:26 +10:00
Peter Barker
1fc82442a0 GCS_MAVLink: remove dummy functions; examples are linked with all libs 2017-08-09 16:18:22 +01:00
Peter Barker
7aaabea4ea GCS_MAVLink: send gps messages as separate queued messages 2017-08-09 16:18:22 +01:00
Peter Barker
ee5874ab32 GCS_MAVLink: move sending of gps_raw up 2017-08-09 16:18:22 +01:00
Peter Barker
4e3cc6fd27 GCS_MAVLink: move sending of system_time up 2017-08-09 16:18:22 +01:00
Peter Barker
d1a9128118 GCS_MAVLink: move sending of camera_feedback up 2017-08-09 16:18:22 +01:00
Peter Barker
d03c7389f7 GCS_MAVLink: move sending of meminfo up 2017-08-09 16:18:22 +01:00
Michael du Breuil
5fca7d02b3 AdvancedFailsafe: Rework status texts to be more uniform 2017-08-09 15:39:17 +01:00
Peter Barker
127edce39e AP_RangeFinder: move prearm checks into backend 2017-08-09 13:58:53 +01:00
Peter Barker
0b1c67d170 AP_RangeFinder: remove unused parameters from detect and constructors 2017-08-09 13:58:53 +01:00
Peter Barker
08cd3f4a77 AP_RangeFinder: move instance parameters into instance state 2017-08-09 13:58:53 +01:00
Randy Mackay
f995106c1e AC_PID: minor formatting change 2017-08-09 18:03:09 +09:00
Peter Barker
a841fddb3e GCS_MAVLink: rename MSG_RETRY_DEFERRED to MSG_LAST and clarify comments 2017-08-05 23:13:48 +01:00
Peter Barker
0c5f66dc59 GCS_MAVLink: refactor code into new retry_deferred method 2017-08-05 23:11:09 +01:00
Peter Barker
fdac13d3d3 GCS_MAVLink: tidy send_message function 2017-08-05 23:09:37 +01:00
Randy Mackay
164096225b AP_SteerController: fix get_steering_out_rate bug when reversing 2017-08-05 11:20:58 +09:00
Randy Mackay
638ba02d5f AP_Mission: add support for Set-Yaw-Speed command
This is initially only intended for use by Rover
2017-08-05 11:20:58 +09:00
Randy Mackay
42cab6b533 AP_LandingGear: add startup position selection parameter 2017-08-05 11:20:41 +09:00
Francisco Ferreira
e0f4d3dbe5
AP_HAL: remove unused HAL_AIRSPEED_MS4515DO_I2C_BUS macro 2017-08-05 03:15:53 +01:00
Francisco Ferreira
d3ed4420e6
AP_Airspeed: remove unused MS4525D0_I2C_BUS macro 2017-08-05 03:15:52 +01:00
Vinicius Juvinski
78deddabda AP_Airspeed: MS4525: Add support to I2C Bus 2
BBBMini use I2C Bus number 2 and MS4525 just use up to bus 1, so I
addedd this bus 2 to address struct.
2017-08-05 03:15:32 +01:00
José Roberto de Souza
9ee007f924 AP_HAL_PX4: Map PX4_I2C_BUS_EXPANSION1 2017-08-04 12:47:01 -07:00
José Roberto de Souza
e674d6ee20 AP_HAL_PX4: aeorfc: Move GPS to UART7
The UART3 also have the I2C bus 2 functions so moving GPS to UART7 to
have one additional I2C.
To keep GPS working is also necessary update the FPGA RTL to version
0xC1 or higher.
2017-08-04 12:47:01 -07:00
Francisco Ferreira
6cf8791eb5
AP_Compass: correct comment in LIS3MDL driver
Commit 17f2393c1b decreased timer frequency but didn't change comment to match
2017-08-04 19:56:26 +01:00
Lucas De Marchi
5ea1784838 global: remove AP_HAL::in_timerprocess()
This is not used and in the only places it would make sense would be
internally to the scheduler so remove it.
2017-08-03 20:25:14 -07:00
Lucas De Marchi
08637f1dcc AP_HAL_VRBRAIN: Scheduler: replace use of in_timerprocess()
This function actually checks if we are not in the main thread rather
than if we are in the timer thread.

Add a new function that does what it's supposed to do.
2017-08-03 20:25:11 -07:00
Lucas De Marchi
1aaba01622 AP_HAL_QURT: Scheduler: replace use of in_timerprocess()
This function actually checks if we are not in the main thread rather
than if we are in the timer thread.

Add a new function that does what it's supposed to do.
2017-08-03 20:25:07 -07:00
Lucas De Marchi
9e66938f68 AP_HAL_PX4: Scheduler: replace use of in_timerprocess()
This function actually checks if we are not in the main thread rather
than if we are in the timer thread.

Add a new function that does what it's supposed to do.
2017-08-03 20:25:01 -07:00
Lucas De Marchi
93a558ce5c AP_HAL_Linux: do not call delay callbacks on other threads
If a thread other than the main one calls Scheduler::delay() we could
end up triggering the call of delay callbacks. Those should only ever
happen on the main thread.
2017-08-03 20:24:57 -07:00
Peter Barker
ad2c3d27ec GCS_MAVLink: move try_send_message queued_param_send up 2017-08-03 14:34:33 +01:00
Peter Barker
679bb7f7a5 GCS_MAVLink: move try_send_message send_hwstatus up 2017-08-03 14:33:37 +01:00
Peter Barker
3b472ccc17 GCS_MAVLink: move try_send_message mission handling up 2017-08-03 14:24:47 +01:00
Peter Barker
b8cb758fac GCS_MAVLink: move try_send_message compass message handling up 2017-08-03 14:24:46 +01:00
Lucas De Marchi
e98fe2d7d5 AP_HAL: RingBuffer: add missing include 2017-08-02 21:10:55 -07:00
Lucas De Marchi
61aed0f0d7 RingBuffer: example: integrate with build system
It's only compatible with Linux so for now disable the other boards.
2017-08-02 16:08:55 -07:00
Murilo Belluzzo
641671a366 AP_HAL: Add simple stress test for RingBuffer class
It runs a Producer/Consumer thread pair endless reading and writing a
ByteBuffer. Producer writes a number sequence that is twice the
ByteBuffer size so a given position have a different data on each write
pass. Consumer makes sure that this pattern is not broken and aborts the
program if it is.

It is possible to spawn more pairs by informing a number as argument of
the program.
2017-08-02 15:30:35 -07:00
Lucas De Marchi
dbd074b250 AP_HAL: remove register_timer_process with extra arg 2017-08-02 08:00:53 -07:00
Lucas De Marchi
c170c2a847 AP_HAL_Linux: remove register_timer_process with extra arg
This is not used anymore.
2017-08-02 08:00:53 -07:00
Lucas De Marchi
6bab28397a AP_Compass: remove user of timesliced logic 2017-08-02 08:00:53 -07:00
Lucas De Marchi
0a158f6d3f AP_HAL_Linux: remove support for timesliced timer
This has long been replaced by the bus per thread scheme.
2017-08-02 08:00:53 -07:00
ljwang
5a7ec7d429 Delete write registers at start,using another way to repair 2017-08-02 16:15:14 +10:00
ljwang
648871a388 Fixed the QMC5883 identification,add check ID 2017-08-02 16:15:14 +10:00
Peter Barker
b445313bf1 AP_Scheduler: remove loop-period argument from load_average
This now comes from a parameter rather than being hard-set
in the vehicle code

Also adds a method returning the max loop period based on the
loop rate
2017-08-01 19:39:27 +01:00
Michael du Breuil
efe70c8d3a AP_NavEKF3: Fix possible compass nullptr dereference 2017-08-01 15:25:05 +01:00
Michael du Breuil
dffa3d3b40 AP_NavEKF2: Fix possible compass nullptr dereference 2017-08-01 15:25:05 +01:00
Andrew Tridgell
99f5229a34 SRV_Channel: added copy_radio_in_out_mask() 2017-08-01 08:25:32 +10:00
Andrew Tridgell
1f1b4241c3 SRV_Channel: added get/set for reversed and function
these are needed in plane for auto-conversion of old elevon code
2017-08-01 08:25:32 +10:00
Andrew Tridgell
75999dbb39 SRV_Channel: prevent negative slew rate
thanks to Michael for pointing this out
2017-08-01 08:25:32 +10:00
khancyr
15398f8b0e AP_Math: correct variable init and remove define in polygon 2017-07-31 17:35:08 +09:00
Randy Mackay
f5f6ec5238 AP_Arming: rename _MIN_VOLT to _VOLT_MIN
Also _MIN_VOLT2 to _VOLT2_MIN
2017-07-31 17:19:55 +09:00
Randy Mackay
2f3a57e0aa AP_Arming: minor variable type change
no functional change
2017-07-31 17:19:55 +09:00
Randy Mackay
330a6065ca AP_Arming: Copter gets MIN_VOLT parameters 2017-07-31 17:19:55 +09:00
Michael du Breuil
2894b7cbea L1_Control: Ensure that LIM_BANK passes a sea level sanity check
This fixes #6637 where the LIM_BANK can be set such that the vehicle demands a radius at sea level that is much higher then the loiter radius was configured to be. This effectively feels like a fly away and is due to bad parameters usually. If this happens just fall back to the simple EAS2TAS scaling of the radius.
2017-07-30 12:42:21 -07:00
Peter Barker
975d2fd0d1 DataFlash: add debug for io thread failure 2017-07-28 17:06:49 +01:00
Peter Barker
b4688bd3d4 GCS_MAVLink: move common mavlink camera handling up 2017-07-28 14:32:58 +01:00
Peter Barker
bb06b02df6 AP_Camera: add const to some parameters 2017-07-28 14:32:58 +01:00
Peter Barker
a94bf851eb AP_Camera: use multiplication in place of division 2017-07-28 14:27:53 +01:00
Peter Barker
9390539231 AP_Camera: tidy up usage of trigger_pic 2017-07-28 14:27:53 +01:00
Peter Barker
84ef63edc7 AP_Camera: camera is responsible for taking distance-based-images and logging 2017-07-28 14:27:53 +01:00
Peter Barker
7f59279670 AP_GPS: make time_epoch_usec const 2017-07-28 14:27:53 +01:00
priseborough
db7c8439c6 AP_NavEKF3: Fix bug in wheel odometry timestamp correction 2017-07-28 12:48:38 +09:00
Matt
5b605d6e1c AP_Notify: Fix for Oreo LED gyro init inidication
If parameter INS_GYRO_CAL is disabled, usually because operator is
arming on a moving vehicle such as a boat, the Oreo LEDs would wait
indefinitely for a gyro calibration that will never happen.  This
removes that dependency.  The LEDs will strobe blue only when gyros are
actually initializing. Not before.  Consequently, this greatly
simiplifies that portion of the code.
2017-07-27 20:43:58 +09:00
khancyr
f583121433 AC_Fence: reset fences breach on disable
Also rename enable function parameter
2017-07-27 20:41:40 +09:00
Peter Barker
e7ff5107fb AP_GPS: tidy mavlink message handling using switch statement 2017-07-27 12:03:25 +01:00
Peter Barker
2ad453fc89 AP_GPS: handle inject packets as part of handle_msg 2017-07-27 12:03:25 +01:00
Peter Barker
60ffe00164 GCS_MAVLink: move gps inject handling up
Also, make AP_GPS responsible for decoding inject packets
2017-07-27 12:03:25 +01:00
priseborough
c7f6d52065 AP_NavEKF3: Add wheel encoder odometry
Uses the existing body frame odometry observation model.
Handles each sensored wheel as a separate sensor.
2017-07-27 16:52:27 +09:00
priseborough
cbe8f97489 AP_NavEKF3: rename struct used for velocity odometry observations
Do this so we can add other odometry observation types.
2017-07-27 16:52:26 +09:00
priseborough
08a3f55c90 AP_NavEKF3: Fix error in scaling of observation error 2017-07-27 16:52:25 +09:00
priseborough
593437ca95 AP_NavEKF3: Add tuning of visual odometry observation error
Also adjust default values based on replay analysis.
2017-07-27 16:52:25 +09:00
Randy Mackay
eaf8aad5ad AP_WheelEncoder: last_reading is last update time instead of system time 2017-07-27 14:19:08 +09:00
Randy Mackay
2c7b9d9cf7 AP_WheelEncoder: add get_delta_angle
The total angular change measured by the wheel encoder in radians
2017-07-27 14:19:08 +09:00
Randy Mackay
a53e254bd0 AP_WheelEncoder: replace scaling with CPR and radius
CPR is the wheel encoder's counts per revolution of the wheel
radius is the radius of the wheel in meters
2017-07-27 14:19:08 +09:00
Randy Mackay
cd71984705 AP_WheelEncoder: 3d position offset 2017-07-27 14:19:08 +09:00
Randy Mackay
1ddf38869a AP_AHRS: set AP_Notify gps_glitching flag 2017-07-27 14:16:23 +09:00
Randy Mackay
0d5c98ad45 AP_Notify: add gps glitch notification 2017-07-27 14:16:23 +09:00
Randy Mackay
9123b6034e SRV_Channel: update_aux_servo_function first checks function is valid
This resolves a bug in which the board could become unresponsive if an invalid function is selected
2017-07-27 11:09:57 +09:00
Patrick José Pereira
1eeea82e31 AP_Parachute: Add function to return _release_in_progress status
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-07-26 17:51:34 +01:00
Randy Mackay
572df8b859 SRV_Channel: minor formatting fixes
no functional change
2017-07-26 13:28:07 +09:00
Randy Mackay
298eaaeb3e SRV_Channels: rename SERVO_DEF_RATE to SERVO_RATE 2017-07-26 13:28:07 +09:00
Randy Mackay
687ec98e5d AP_HAL_PX4: set default servo update rate only when changed
This removes the chance a small switch occurring whenever this function is called
2017-07-26 13:28:07 +09:00
Peter Barker
85a0da6178 GCS_MAVLink: handle common GPS messages in base GCS_MAVLINK class 2017-07-25 14:00:45 +01:00
Randy Mackay
a657daf635 Compass: disable QMC5883 compass driver by default
This driver causes occasional heading issues so disabling until these are resolved
2017-07-25 09:27:29 +09:00
khancyr
2d0bce18a8 AP_Baro: rename all local variable with prefix
fix last missing spaces
2017-07-24 10:15:15 -07:00
khancyr
35ac86ff8d AP_Baro: fix some style and const correctness 2017-07-24 10:15:15 -07:00
khancyr
0e895f5c74 AP_Baro: fix instance shadowing 2017-07-24 10:15:15 -07:00
khancyr
42516f7079 DataFlash: simplify Log_Write_Proximity 2017-07-24 13:44:43 +01:00
khancyr
8abcb7a0e3 GCS_MAVLink: simplify send_proximity 2017-07-24 13:44:43 +01:00
khancyr
603621f2c4 DataFlash: move proximity log from Copter (NFC) 2017-07-24 13:44:43 +01:00
khancyr
ec2ea1c903 GCS_MAVLink: move send_proximity to GCS common code (NFC)
Also clean two comments
2017-07-24 13:44:43 +01:00
Andrew Tridgell
4ca3546551 SRV_Channel: added SERVO_DEF_RATE parameter
this allows for the default rate of servo outputs to be set. This is
needed for some planes where 50Hz isn't enough (eg. tailsitters)
2017-07-24 14:07:28 +10:00
Andrew Tridgell
5b43698e25 HAL_PX4: added rcout set_detault_rate() 2017-07-24 14:07:28 +10:00
Andrew Tridgell
0188d6463d AP_HAL: added rcout set_detault_rate() 2017-07-24 14:07:28 +10:00
Kevin Lopez Alvarez
df406c4389 AP_Compass : increase max possible offset 2017-07-24 13:48:20 +10:00
Kevin Lopez Alvarez
17f2393c1b AP_Compass: Decrease LIS3MDL ODR and timer 2017-07-24 13:48:20 +10:00
Kevin Lopez Alvarez
16a96b0643 HAL_PX4: Adjust SPI params for ppro
Add SPI prescalers for 180 MHz and decrease LIS3MDL SPI speed
2017-07-24 13:48:20 +10:00
Kevin Lopez Alvarez
08b531e6a8 AP_Compass: LIS3MDL correct orientation 2017-07-24 13:48:20 +10:00
Kevin Lopez Alvarez
cf8c1c2665 AP_Compass: Remove comments and use correct board number 2017-07-24 13:47:44 +10:00
Kevin Lopez Alvarez
a5a5bd3a95 AP_BoardConfig: Remove comments and use correct board number 2017-07-24 13:47:06 +10:00
Kevin Lopez Alvarez
ca3627c140 AP_InertialSensor: add ppro support 2017-07-24 13:47:06 +10:00
Kevin Lopez Alvarez
88958b2dbf HAL_PX4: add ppro support 2017-07-24 13:47:06 +10:00
Kevin Lopez Alvarez
1467daee2a AP_Compass: add ppro support
disable lis3mdl for now
2017-07-24 13:47:06 +10:00
Kevin Lopez Alvarez
d6d1a3e08c AP_HAL_PX4: initial FMUv4pro support 2017-07-24 13:45:37 +10:00
Kevin Lopez Alvarez
fb6f368575 AP_HAL: initial FMUv4pro support 2017-07-24 13:45:37 +10:00
Kevin Lopez Alvarez
a51bf8c918 AP_BoardConfig: initial FMUv4pro support 2017-07-24 13:45:37 +10:00
Kevin Lopez Alvarez
d0ec5a6111 AP_BattMonitor: initial FMUv4pro support 2017-07-24 13:45:37 +10:00
Kevin Lopez Alvarez
18dab4829a AP_Baro: initial FMUv4pro support 2017-07-24 13:45:37 +10:00
Andrew Tridgell
401a6f5373 AP_BoardConfig: fixed FMUv1 IO update
when doing an IO firmware update uartC is used to talk to the IO
bootloader. We need to close uartC to prevent corruption of the
bootloader protocol. The uart is automatically re-opened when it is
needed
2017-07-22 16:25:17 +10:00
Michael du Breuil
126296b61d AP_Arming: Compass calibration running is a pre arm failure, rather then an arming failure 2017-07-21 13:38:50 +09:00
Peter Barker
1fd4eb4bfb DataFlash: do not send in-progress messages back to streaming GCSs 2017-07-20 14:57:54 +01:00
Peter Barker
90c2db119e DataFlash: send log data on requesting channel only 2017-07-20 14:57:54 +01:00
Peter Barker
954eda990a AP_Arming: prepare log for arming and check it is ready
Also add comment that this should be the last check to be made
2017-07-19 16:37:28 +01:00
Peter Barker
0769432e63 DataFlash: move log-write-started logic to be backend-specific 2017-07-19 16:37:28 +01:00
Peter Barker
1f0a14ab33 DataFlash: add PrepForArming method 2017-07-19 16:37:28 +01:00
Peter Barker
31083653b2 DataFlash: examples: move starting of new logs into DataFlash 2017-07-19 16:37:28 +01:00
Francisco Ferreira
a1115ba5d0
DataFlash: move some code from WritesOK into a new ShouldLog method 2017-07-19 16:37:21 +01:00
Peter Barker
b572c13ca9 DataFlash: move starting of new logs into DataFlash 2017-07-19 16:37:16 +01:00
Peter Barker
4234f4ef7a DataFlash: move _initialised into DataFlash_Backend 2017-07-19 16:37:16 +01:00
Peter Barker
999a5e6cda AP_Arming: correct bit used to indicate blended-gps-checking 2017-07-19 16:34:57 +01:00
Peter Barker
b8ddf8a289 AP_Arming: use HAL_HAVE_BOARD_VOLTAGE rather than magic-0 2017-07-19 16:34:57 +01:00