Commit Graph

21121 Commits

Author SHA1 Message Date
Andrew Tridgell 3ebc69320c AP_Logger: fixed LOG_FILE_DSRMROT with delayed log stop
now that we persist logging for 15s after disarm we need to also delay
the log rotation if LOG_FILE_DSRMROT=1. Otherwise we will put the log
data into the next log, which defeats the purpose of the 15s
persistance
2019-10-03 07:17:16 +10:00
vierfuffzig b89c60d5b0 AP_BLHeli: fix watchdog resets with telemetry active from non-multirotor motors 2019-10-02 21:06:22 +10:00
Randy Mackay 8686197c59 GCS_MAVLink: add comment above set-message-interval 2019-10-02 16:17:09 +09:00
Randy Mackay 3a113a31bb GCS_MAVLink: minor fix to set_message_interval 2019-10-02 16:09:44 +09:00
Tatsuya Yamaguchi 5039bdc8ea AP_Scripting: add set_message_interval binding 2019-10-02 16:09:44 +09:00
Tatsuya Yamaguchi 9a99d9bff5 GCS_MAVLink: add set_message_interval functions 2019-10-02 16:09:44 +09:00
Andrew Tridgell ddde512b74 AP_Scheduler: use fill_nanf() on each scheduler function 2019-10-01 17:35:26 +10:00
Andrew Tridgell cbe34320b5 AP_NavEKF2: fixed build
broken by recent common variable change
2019-10-01 17:35:26 +10:00
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 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 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 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 0d032ecd86 AC_Avoidance: add enabled and margin accessors 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 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
Peter Barker 6d0c5da84a GCS_MAVLink: allow upload of fence using mission item protocol
GCS_MAVLink: add support for fence inclusion circles

GCS_MAVLink: factor out a transfer_is_complete; start commenting properly
2019-09-28 07:58:48 +09:00
Peter Barker f3b0148719 AP_OADijkstra: cope with polyfence holding boundary points 2019-09-28 07:58:48 +09:00
Peter Barker dfca32a2af AP_OABendyRuler: cope with polyfence holding boundary points 2019-09-28 07:58:48 +09:00
Peter Barker 3a7f1b882e AC_Avoidance: cope with polyfence holding boundary points 2019-09-28 07:58:48 +09:00
Peter Barker 74aed5aef8 GCS_MAVLink: cope with polyfence holding boundary points 2019-09-28 07:58:48 +09:00
Peter Barker 5fe16d5250 AP_Proximity: cope with polyfence holding boundary points 2019-09-28 07:58:48 +09:00
Peter Barker ff37590776 AC_Fence: move polygon points into AC_Fence_Polygon 2019-09-28 07:58:48 +09:00
Peter Barker 189ef5f1e7 AP_Math: define != for Vector2<int> 2019-09-28 07:58:48 +09:00
Peter Barker f1e5c72ee9 StorageManager: add write_uint8 alias for write_byte 2019-09-28 07:58:48 +09:00
Peter Barker f090f35afa AP_InternalError: add a general should-not-be-here bit 2019-09-28 07:58:48 +09:00
Peter Barker bc8e56966f GCS_MAVLink: squelched rally-points-received message 2019-09-28 07:58:48 +09:00
Andrew Tridgell 8dd2119b14 AP_NavEKF2: make it easy to do EK2 timing tests
for future benchmarking
2019-09-28 08:57:26 +10:00
Andrew Tridgell e820219202 HAL_ChibiOS: changed optimisation of higher end boards to -O2
-O3 does not seem to be a win, and takes up a lot more flash
2019-09-28 08:57:26 +10:00
Andrew Tridgell 0e3a27f74f AP_NavEKF3: change optimisation from -O3 to -O2 2019-09-28 08:57:26 +10:00
Andrew Tridgell 163efd0df5 AP_NavEKF2: change optimisation from -O3 to -O2 2019-09-28 08:57:26 +10:00
Andrew Tridgell 5f90afa71e AP_Mount: change optimisation from -O3 to -O2 2019-09-28 08:57:26 +10:00
Andrew Tridgell 13a2367278 AP_Math: change optimisation from -O3 to -O2 2019-09-28 08:57:26 +10:00
Andrew Tridgell 7c3df18ea3 AP_IOMCU: change optimisation from -O3 to -O2 2019-09-28 08:57:26 +10:00
Willian Galvani 0c5753112a AP_TemperatureSensor: Update TSYS01 for Pixhawk2 2019-09-27 13:08:26 -07:00
Peter Barker 06df44c184 AP_Relay: change parameter name from relay to instance 2019-09-27 12:02:38 +10:00
Peter Barker 1c3b2f9699 AP_Relay: tidy, reduce flash usage 2019-09-27 12:02:38 +10:00
Peter Hall b6efcbcf3b AR_WPNav: make get_stopping_location public 2019-09-27 09:09:47 +09:00
Henry Wurzburg 11c633be32 AP_OSD: distance total fix for slow vehicles 2019-09-27 07:19:55 +10:00
Willian Galvani dd97eedde3 APMotors_6DOF: Implement motor_is_enabled(), get_motor_angular_factors() and set_reversed(); 2019-09-26 09:39:50 -07:00
Peter Hall 4c62fe6c72 AP_Windvane: caculate vehicles current tack 2019-09-26 18:23:03 +09:00
Willian Galvani d56c490b18 AP_Motors_6DOF: Add missing 'break' 2019-09-25 20:17:41 -07:00
Henry Wurzburg 59ce3f1007 AP_OSD: scale xtrack, add precision for distances <10 units 2019-09-26 12:56:12 +10:00
Patrick José Pereira 29fadc2417 AP_HAL_Linux: PCA9685: Check for device before accessing it
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2019-09-26 12:42:12 +10:00
mhefny 8310058c8c SITL: adding Tricopter model in Webots 2019-09-25 13:34:47 +01:00
Randy Mackay 5e3c6b4d3a GCS_MAVLink: allow proximity to send only upward facing distances
this removes the requirement that a horizontal proximity sensor be enabled
2019-09-25 15:22:13 +09:00
Henry Wurzburg f592806184 AP_OSD: formatting fixes 2019-09-25 15:01:59 +09:00
bnsgeyer d4fec221c3 AP_Motor: tradheli align swash params btwn frames and fix metadata 2019-09-25 14:59:02 +09:00
Peter Barker 975804fa35 AP_Math: remove unit_mod concept from wrap functions
devcall decided it would be clearer to have non-shared implementation
for the _cd variants
2019-09-25 13:19:44 +10:00
Peter Barker 952d4d2cbc AP_NavEKF2: initialise Kfusion stack variable to fix compilation
This fixes the compilation, as previous patches have done.
2019-09-25 12:54:55 +10:00
Peter Barker 9fb715692e AP_HAL_ChibiOS: correct include of mavlink header for analog debug 2019-09-25 12:22:27 +10:00
liang d890203f73 AP_Baro: LPS22H: correct formatting 2019-09-24 09:50:56 -07:00
Andrew Tridgell d40d812ea4 AP_NavEKF2: fixed build with g++ 9.1
this is a false positive, but the cost of clearing this array is low,
and it saves a much more complex fix
2019-09-24 14:59:17 +10:00
murata 6d7c2301f2 AP_Radio: Change direct value to define name 2019-09-24 13:23:24 +10:00
murata ec0c49315f AP_Compass: Change direct value to define name 2019-09-24 13:23:24 +10:00
Andrew Tridgell 9226899c6f AP_NavEKF2: added comment (review request) 2019-09-24 12:51:54 +10:00
Andrew Tridgell 255981c60c AP_NavEKF2: moved some of the intermediate vars to the stack
this keeps stack frames below 1k, while giving faster access to the
variables and saving more memory
2019-09-24 12:51:54 +10:00
Andrew Tridgell 96c6544997 AP_NavEKF3: moved intermediate variables to common memory
this moves intermediate variables from being per-core to being common
between cores. This saves memory on systems with more than one core by
avoiding allocating this memory on every core.

This is an alternative to #11717 which moves memory onto the stack. It
doesn't save as much memory as #11717, but avoids creating large stack
frames
2019-09-24 12:51:54 +10:00
Andrew Tridgell 0041874826 AP_NavEKF2: moved intermediate variables to common memory
this moves intermediate variables from being per-core to being common
between cores. This saves memory on systems with more than one core by
avoiding allocating this memory on every core.

This is an alternative to #11717 which moves memory onto the stack. It
doesn't save as much memory as #11717, but avoids creating large stack
frames
2019-09-24 12:51:54 +10:00
Andrew Tridgell 9b746b89db AP_Math: added fill_nanf()
used in SITL to invalidate memory
2019-09-24 12:51:54 +10:00
Peter Barker 08623c1712 AP_ADSB: use ObjectBuffer in place of AP_Buffer 2019-09-24 09:36:33 +10:00
Peter Barker c043f315de AP_Buffer: remove as it is replaced with ObjectBuffer 2019-09-24 09:36:33 +10:00
Willian Galvani 5a9e5e937a APMotors6DOF: add roll factor for motors 4 and 5 for SIMPLEROV_4 and SIMPLEROV_5 2019-09-23 10:41:57 -07:00
Willian Galvani 948a5bf9c3 APMotors6DOF: add case for SIMPLEROV_3 2019-09-23 10:41:57 -07:00
Peter Barker 045960fe57 AP_HAL_SITL: catch SIGTERM and exit with zero exit status 2019-09-23 19:36:38 +10:00
Andrew Tridgell 85332d49a2 HAL_SITL: added MotorBoat 2019-09-23 17:22:01 +10:00
Andrew Tridgell d2e75717b8 SITL: added a MotorBoat class
a sailboat with zero sail area
2019-09-23 17:22:01 +10:00
Lucas De Marchi 7520cdef2f AP_RangeFinder: update minimum fw version of TFMiniPlus
Version 2.0.3 has important fixes to avoid having the sensor to lock up.
Let's make sure we check for it and warn on console.
2019-09-23 12:56:13 +09:00
Peter Hall c71cbe2729 APM_Control: AR_AttitudeControl: add description for new PID params 2019-09-23 09:45:46 +09:00
Andrew Tridgell 05d62c62bb AP_NavEKF3: fixed use of uninitialised variable in EKF3 mag fusion
not all elements of H_MAG are initialised, but they are used, as found
by valgrind
2019-09-22 21:06:36 +10:00
Andrew Tridgell 386e7dc3e8 HAL_ChibiOS: fixed delay for OneShot125 channels
we were delaying output for OneShot125 by 8x as much as we need to,
which reduced our max loop rate
2019-09-22 19:43:35 +10:00
Andrew Tridgell 850892c3d9 HAL_ChibiOS: fixes from LGTM errors 2019-09-22 18:35:15 +10:00
Andrew Tridgell c6f43e9700 AP_NavEKF3: fixed use of old irqsave() API 2019-09-21 15:36:47 +10:00
Andrew Tridgell 1d47f9186e AP_NavEKF2: fixed use of old irqsave() API 2019-09-21 15:36:47 +10:00
Andrew Tridgell d7ee622edc AP_Logger: fixed use of old irqsave() API 2019-09-21 15:36:47 +10:00
Lucas De Marchi 5f65033511 AP_RangeFinder: add missing overrides 2019-09-21 08:01:08 +10:00