Commit Graph

21162 Commits

Author SHA1 Message Date
liang
8de44ec319 AP_Airspeed: protect sample timestamp while get data 2019-10-12 18:15:06 +11:00
Michael du Breuil
05d104675e AP_Logger: Fix logging of current on non primary instances 2019-10-11 08:39:28 +11:00
Andy Piper
ef7f8531fb Filter: set the harmonic notch filter ref default to zero (disabled)
Modify parameter descriptions for tradheli
2019-10-10 20:26:02 +09:00
Leonard Hall
4a1a5e81ea AP_Motors: Add variable to record the final thrust value
Add Throttle_Out for other frames
2019-10-10 20:26:02 +09:00
Andrew Tridgell
d6e17b0c2b AP_InertialSensor: publish an IMU temperature
makes testing of mavlink extension easier
2019-10-10 13:23:03 +11:00
Andrew Tridgell
29e65a7294 GCS_MAVLink: supply IMU temperature in mavlink extensions 2019-10-10 13:23:03 +11:00
Do Carmo Lucas
dc4ad26e96 GCS_MAVLink: updates to support the latest stable mavlink changes (IMU temperature extension) 2019-10-10 13:23:03 +11:00
Andrew Tridgell
77bf67e15f HAL_ChibiOS: fixed padding of neopixel bits
lack of padding at start caused occasional glitches in colors
displayed
2019-10-10 10:41:19 +11:00
Peter Barker
25fd04d402 AP_Proximity: declare RangeFinder as a class to avoid circular include issue 2019-10-08 11:26:04 +11:00
Peter Barker
9aaa6c49fa AP_BoardConfig: correct include of AP_Vehicle_Type 2019-10-08 11:26:04 +11:00
Peter Barker
083d4ac3ea DataFlash: adjust for new vehicle base class 2019-10-08 11:26:04 +11:00
Peter Barker
405bf0ce7f AP_Mission: adjust for new vehicle base class 2019-10-08 11:26:04 +11:00
Peter Barker
8e412d0885 AP_Compass: adjust for new vehicle base class 2019-10-08 11:26:04 +11:00
Peter Barker
cf201afdf6 AP_AccelCal: adjust for new vehicle base class 2019-10-08 11:26:04 +11:00
Peter Barker
8bb51f4b7d AC_AttitudeControl: adjust for new vehicle base class 2019-10-08 11:26:04 +11:00
Peter Barker
1ea365d52a AP_Vehicle: move many members up to base class 2019-10-08 11:26:04 +11:00
Peter Barker
a6b6bb99f3 AP_NMEA_Output: skip sending sentences if no space on UART
AP_NMEA_Output: clean scope by removing unneeded temps

AP_NMEA_Output: redo last_sent to last_run

AP_NMA_Output: early-exit if no data
2019-10-08 11:07:19 +11:00
Peter Barker
5428d13502 AP_Arming: remove bogus ARMING_CHECK_NONE 'bitmask value'
This looks like a bitmask value, but if you treat it like one (and
people have in the past!) by using logical operations then you get the
incorrect result.

Places which were checking for equivalence to ARMING_CHECK_NONE now
simply check the bitmask to see if it is all-empty.
2019-10-08 10:31:07 +11:00
murata
371f11b7f4 AP_Motors: Change to description(NFC) 2019-10-08 08:26:17 +09:00
Andrew Tridgell
4866fd68b5 AP_BoardConfig: fixed CAN init without SLCAN 2019-10-08 10:02:14 +11:00
Andrew Tridgell
15d98220e0 AP_HAL: enabled SLCAN on fmuv2 and Pixhawk1-1M
this fits for now, and is needed for CAN GPS for now
2019-10-08 10:02:14 +11:00
Andrew Tridgell
08b3bc4506 AP_UAVCAN: cleanup ifdefs for SLCAN enable 2019-10-08 10:02:14 +11:00
Andrew Tridgell
53fab5767f AP_HAL: cleanup ifdefs for SLCAN enable 2019-10-08 10:02:14 +11:00
Andrew Tridgell
15e4641e51 AP_HAL_ChibiOS: cleanup ifdefs for SLCAN enable 2019-10-08 10:02:14 +11:00
Andrew Tridgell
6b3c10f0e7 AP_BoardConfig: cleanup ifdefs for SLCAN enable 2019-10-08 10:02:14 +11:00
Henry Wurzburg
4a42a3a23a Rover: implement steering trim save in armed/manual mode only 2019-10-08 07:41:57 +09:00
vierfuffzig
cb054e714b AP_RTC: add local time support 2019-10-07 19:55:42 +11:00
vierfuffzig
1f9b2f712e AP_OSD: add clock panel 2019-10-07 19:55:42 +11:00
Randy Mackay
e4336551cd AP_Follow: add clear_offsets_if_required method
this restores the offsets to zero if they were initialised from zero when the lead vehicle was first spotted
2019-10-07 08:30:45 +09:00
Ebin
f6c7ac88d0 SITL: Yaw rate calculation uses wheel offset 2019-10-07 07:31:53 +11:00
Peter Barker
e32d8ecda1 AP_WheelEncoder: add SITL backend
AP_WheelEncoder: added update function for SITL quadrature encoder
2019-10-07 07:31:51 +11:00
Peter Barker
4d17a7cf89 AP_Logger: tidy MessageWriter stages using enum class 2019-10-05 16:37:43 +10:00
Henry Wurzburg
880285dad4 AP_BLHeli: Change descriptions in SERVO_BLH_PORT param to actual AP port 2019-10-05 16:35:59 +10:00
Michel Pastor
dec5b97275 AP_Logger: fix logging on 256Mbit flash chips 2019-10-05 16:25:22 +10:00
Andrew Tridgell
39182e70e4 AP_Motors: enable docs for hover thr learning in plane 2019-10-04 14:01:08 +10:00
Michel Pastor
49bf0a3057 AP_Logger: fix AP_Logger_Block::get_num_logs() 2019-10-04 12:49:16 +10:00
Randy Mackay
db7836ad48 AP_SmartRTL: fixup compile error
fix typo introduced by me attempting a minor fixup before merging
2019-10-04 10:01:49 +09:00
Peter Barker
fd0a8b72b4 AP_Logger: correct uninitialised value when logging all rally points 2019-10-04 10:39:01 +10:00
Henry Wurzburg
13e66e9f7c AP_SmartRTL: give warning buffer is about to fill-up 2019-10-04 08:57:30 +09:00
Andrew Tridgell
555f56a8af HAL_ChibiOS: removed wait on CAN peripheral in H7
these wait busy loops can take a very long time, and end up causing
interrupts to be lost elsewhere in the system, causing lost bytes on
UARTs

We should not have while loops waiting on peripharals like this. If we
do need to wait for a flag to clear then it needs to be done in a low
priority thread, or we need to check for completion in a timer

CAN still seems to work with this change, but needs flight testing
2019-10-03 15:26:47 +10:00
Henry Wurzburg
9717548cb5 AP_Follow: hide params not used by Rover 2019-10-03 07:18:47 +09:00
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