Commit Graph

39796 Commits

Author SHA1 Message Date
Andrew Tridgell
b9291d95f0 HAL_SITL: pre-fill stack on each loop with NaN
this allows us to catch use of uninitialised stack variables in SITL
without having valgrind running
2019-10-01 17:35:26 +10:00
Andrew Tridgell
66b4e92444 AP_Math: make fill_nanf() use a signalling NaN
we want use of these values to trigger a FPE
2019-10-01 17:35:26 +10:00
Andrew Tridgell
f79907bd1e AP_NavEKF: fixed build with vector index checking 2019-10-01 15:39:03 +10:00
Andrew Tridgell
3995db49a4 AP_NavEKF3: use parent class for intermediate static variables
this makes the code faster as well as using less memory when both EK2
and EK3 are enabled
2019-10-01 15:39:03 +10:00
Andrew Tridgell
f7e138bddd AP_NavEKF2: use parent class for intermediate static variables
this makes the code faster as well as using less memory when both EK2
and EK3 are enabled
2019-10-01 15:39:03 +10:00
Andrew Tridgell
688b01c6c6 AP_NavEKF: added a common parent class for EKF2 and EKF3 core classes
this provides a common location for static intermediate variables in
EK2 and EK3. This has a few benefits:

 - the compiler can determine the address of the frequently accessed
   variables at compile time, making them faster

 - by sharing between EK2 and EK3 we save a lot of memory if both EK2
   and EK3 are enabled

 - we can fill all these with NaN in SITL on every loop, which allows
   us to catch cases where the variables are ever re-used between
   loops, which guarantees we aren't mixing data between EKF lanes or
   between EK2 and EK3
2019-10-01 15:39:03 +10:00
IamPete1
3b9a35da27 AP_Motors: add reversed tricopter option 2019-10-01 09:39:08 +10:00
vierfuffzig
2af0be3947 AP_AHRS: fix custom orientation ToRad conversion 2019-10-01 09:35:09 +10:00
Andrew Tridgell
0deef76875 GCS_MAVLink: use HAL_MEM_CLASS for status sizes 2019-10-01 09:29:55 +10:00
Andrew Tridgell
889b18022b AP_Logger: use HAL_MEM_CLASS for logging buffer size 2019-10-01 09:29:55 +10:00
Andrew Tridgell
3bf3ebb703 AP_Logger: try harder to use close to user buffer size
this stops us drastically reducing buffer size when low on memory
2019-10-01 09:29:55 +10:00
Andrew Tridgell
2d00298070 AP_HAL: added HAL_MEM_CLASS for amount of memory 2019-10-01 09:29:55 +10:00
Andrew Tridgell
47f2f1764d HAL_ChibiOS: generate HAL_MEMORY_TOTAL_KB for each board 2019-10-01 09:29:55 +10:00
Peter Barker
13352a4ca7 AP_ADSB: move is_valid_octal to is_valid_callsign and add tests for it 2019-10-01 09:18:15 +10:00
Peter Barker
6fe09b6120 AP_Math: move is_valid_octal into adsb
This doesn't ensure the value is octal digits - there's more magic in
it.
2019-10-01 09:18:15 +10:00
Andrew Tridgell
1a34fccc71 AP_Proximity: fixed incorrect use of fabs() 2019-10-01 08:12:07 +09:00
Andrew Tridgell
c19d31d0c3 Tools: autobuild Pixhawk1-1M 2019-10-01 09:08:25 +10:00
Andrew Tridgell
670a9e33df Tools: added bootloaders for Pixhawk1-1M 2019-10-01 09:08:25 +10:00
Andrew Tridgell
e3a965272c HAL_ChibiOS: added Pixhawk1-1M
this is for 1M versions of the Pixhawk1. It is smaller than fmuv2 as
it only links the specific sensors needed for Pixhawk1
2019-10-01 09:08:25 +10:00
Andrew Tridgell
b5217412f9 AP_GPS: fixed a bug in handling corrupt u-blox packets
when we have corrupt input due to loss of bytes on a UART we can end
up with a u-blox packet with zero payload bytes. When that happens we
need to bypass payload reading as otherwise we will end up keeping
reading bytes until the driver resets at 4 seconds, causing a GPS
outage.

This was causing GPS outages every few hours in copters running 3.6.7,
and was also reproduced in SITL using SIM_GPS_BYTELOSS.
2019-09-30 15:20:30 -06:00
Mark Whitehorn
356e9f116d IO_Firmware: update binaries (gcc version 6.3.1 20170620... 6-2017-q2-update) 2019-10-01 07:13:33 +10:00
Mark Whitehorn
0a6ae60c89 AP_IOMCU: fix IO fast channel mask 2019-10-01 07:13:33 +10:00
Mark Whitehorn
d8a07b6c44 HAL_ChibiOS: fix FMU fast_channel_mask
fix IO fast channel mask
use IOMCU chmask to only set right channels
remove unused variable
2019-10-01 07:13:33 +10:00
Andrew Tridgell
748cf39116 HAL_ChibiOS: disable DMA for RCIN on Pixracer
this frees up DMA for USART1_RX, which gives DMA for input over the
SERIAL5 WiFi port, which is important for applications where a
pixracer is being fed vision data over WiFi
2019-09-30 07:58:40 +10:00
mhefny
92d55fa126 SITL: removed unnecessary files of webots 2019-09-30 04:46:38 +10:00
Peter Barker
04ee459e8c AP_Baro: exclude Sub pressure transducers from non-sub builds 2019-09-28 16:41:06 +10:00
Andrew Tridgell
1635da1dd7 Tools: removed HAVE_OCLOEXEC check 2019-09-28 14:19:46 +10:00
Andrew Tridgell
c29867ecad AP_Common: removed fcntl overrides
not needed with AP_Filesystem, and fixes lots of warnings with newer
compilers
2019-09-28 14:19:46 +10:00
Andrew Tridgell
81711eb28e AP_HAL: fixed build on g++ 7.3 for stm32
the system maths headers don't like our maths defines, but are happy
if we include math.h first
2019-09-28 14:19:46 +10:00
Henry Wurzburg
cf3bd2487b AP_OSD: add current averaging filter to reduce jitter (~5 sample timeconstant) 2019-09-28 14:17:59 +10:00
Randy Mackay
9d5cbbe58f Copter: restore range finder updates to 20hz 2019-09-28 11:13:14 +09:00
Randy Mackay
a5d0f55bdc Copter: upward surface tracking never closer than avoidance margin 2019-09-28 11:13:14 +09:00
Randy Mackay
0d032ecd86 AC_Avoidance: add enabled and margin accessors 2019-09-28 11:13:14 +09:00
Randy Mackay
1c4f47f882 Copter: add upward facing surface tracking 2019-09-28 11:13:14 +09:00
Randy Mackay
6be4adbe02 RC_Channels: define surface tracking auxiliary function 2019-09-28 11:13:14 +09:00
Randy Mackay
5d24d0e4dd Copter: surface tracking always includes ekf alt error when setting target rangefinder alt 2019-09-28 11:13:14 +09:00
Randy Mackay
d5d7fbe761 Copter: rangefinder glitch detection moved to read_rangefinder 2019-09-28 11:13:14 +09:00
Randy Mackay
808efa4c79 Copter: surface tracking format fixes 2019-09-28 11:13:14 +09:00
Randy Mackay
d41e7dcbee Copter: move surface tracking implementation to surface_tracking.cpp 2019-09-28 11:13:14 +09:00
Randy Mackay
b54cf410ef Copter: increase read_rangefinder to 50hz 2019-09-28 11:13:14 +09:00
Peter Barker
3ef94a69ad Sub: call periodic fence update function 2019-09-28 07:58:48 +09:00
Peter Barker
4d6dc9b0a7 Copter: call periodic fence update function 2019-09-28 07:58:48 +09:00
Peter Barker
b6bc0c638c Rover: call periodic fence update function 2019-09-28 07:58:48 +09:00
Peter Barker
6891225438 Sub: initialise AC_Fence library 2019-09-28 07:58:48 +09:00
Peter Barker
e5fa8f622b Copter: initialise AC_Fence library 2019-09-28 07:58:48 +09:00
Peter Barker
1fd989491c Rover: initialise AC_Fence library 2019-09-28 07:58:48 +09:00
Randy Mackay
9aeac012d2 AC_Avoid: add support for complex fence types
AP_OABendyRuler: support exclusion polygons

AP_OADijkstra: support exclusion polygons

AC_Avoid: adjust_velocity supports exclusion polygons

AC_Avoidance: handle fence::get_boundary_points returning nullptr instead of setting num_points to zero

AC_Avoidance: Dijkstra's works with only exclusion polygons

AC_Avoidance: Dijkstra: check for fence counts instead of polyfence validity

We really only care whether fences can be returned - and they won't be
returned unless they are valid

AC_Avoidance: BendyRuler: just try to get inclusion fence rather than checking validity

AC_Avoidance: BendyRuler supports exclusion circles

AC_Avoid: Dijkstra support for exclusion circles

AC_Avoid: BendyRuler support for inclusion circles

AC_Avoid: stop an inclusion/exclusion circular fences

AC_Avoid: stop at inclusion/exclusion circular fences

AC_Avoid: fixes to Dijkstra's use of inclusion/exclusion circles and polygons

AP_Avoidance: take semaphores when interacting with AHRS and polyfence

AC_Avoid: Dijkstra's fix for some_fences_enabled inclusion circles
2019-09-28 07:58:48 +09:00
Randy Mackay
3431938bce AP_Logger: add error code to Write_OADijkstra 2019-09-28 07:58:48 +09:00
Peter Barker
a0c6ff95e4 AP_Proximity: polyfence valid() has been renamed 2019-09-28 07:58:48 +09:00
Peter Barker
714a3e2462 AC_Fence: support for multiple polygon fences
AC_Fence: add interface for retrieving exclusion polygons

AC_Fence: add interface to get exlusion polygons to polyfence loader

AC_Fence: add suport for inclusion circles

AC_Fence: add option for compiling-out FENCE_POINT protocol support

AC_Fence: get_exclusion_polygon and get_boundary_points set num_points to zero on failure

AC_Fence: use Debug(...) to hide debug messages

AC_PolyFence_loader: add methods to retrieve all inclusion zones

AC_PolyFence_loader: valid simply returns true if a polygon boundary can be returned

AC_Fence: add get_exclusion_circle

AC_Fence: add get_exclusion_circle_update_ms accessor

AC_Fence: PolyFence_loader gets inclusion circle accessors

AC_PolyFence_loader: add and use semaphore to protect loaded fence

AC_Fence: move fence breach check below fence type checks

This allows us to provide more information to the user about why they
are breached.

For example, if the radius is negative you are considered in breach of
it - but we'd tell you you were breached, not that your radius was
invalid

AC_Fence: clear the fence if we discover the user has set the fence count to zero
2019-09-28 07:58:48 +09:00