Commit Graph

20925 Commits

Author SHA1 Message Date
Andy Piper
bc5916ebc9 Filter: comment on reserved config. cope with notch allocation failure. 2019-09-11 18:41:05 +10:00
Andy Piper
a9a7fe3ea5 AP_InertialSensor: ensure harmonic notch gets appropriate defaults 2019-09-11 18:41:05 +10:00
Andy Piper
3261677e01 AP_InertialSensor: remove _ prefix from methods. use changed filter methods. 2019-09-11 18:41:05 +10:00
Andy Piper
334ebadd5a Filter: add comments and address review comments for harmonic notch 2019-09-11 18:41:05 +10:00
Andy Piper
50f7e50634 AP_InertialSensor: add harmonic notch filter to gyro filter chain
Allow dynamic updates to the calculated frequency. Convert bandwidth and frequency to floats.
backend variables do not need to be indexed per-backed
2019-09-11 18:41:05 +10:00
Andy Piper
366bc06089 Filter: New HarmonicNotchFilter
This delegates updates to a bank of NotchFilters located at an rpm frequency and harmonics. Center frequency can be updated dynamically. Notch parameters are configurable, including the number of harmonics to filter on. Updates to the filter parameters are optimized across the notch bank. Convert notch bandwidth and frequency to floats.

allow all filter harmonics to be controlled.

add destructor to harmonic notch.

don't allocate sub-filters for harmonic notch if no harmonics set.
2019-09-11 18:41:05 +10:00
Andrew Tridgell
fae2e44eac AP_NavEKF3: reset inhibitMagStates on in-flight yaw reset
this is needed to prevent the next ConstrainVariances() from zeroing
the variances, which leads to very slow learning of mag states
2019-09-11 14:22:18 +10:00
Andrew Tridgell
71ad90819e AP_Compass: don't reset SITL compass offsets if set by user
makes for easier EKF compass bias learning testing
2019-09-11 14:22:18 +10:00
Peter Barker
10675ab5c4 AP_HAL: correct include ordering in srxl.h
The header needs stdint.h which it was only getting because it was
included after stdint.h in the cpp file.

Stop including standard headers before other ArduPilot headers
2019-09-11 14:19:14 +10:00
Andrew Tridgell
4197fdeb2a AP_HAL: fixed bug in vsnprintf()
we need to return the number of bytes that would have been printed if
the buffer was big enough to support use cases such as vasprintf()
which needs to know how many bytes to allocate
2019-09-11 13:41:03 +10:00
Peter Hall
102a231c3f AP_WindVane: rename abs to true wind 2019-09-11 11:22:12 +09:00
Rajat Singhal
5147b607c0 SITL: Correct Airsim params 2019-09-11 08:28:28 +10:00
Randy Mackay
246bfcf4a1 AP_Common: expanding array checks memory before allocating 2019-09-11 06:56:35 +10:00
Peter Barker
15308af230 AP_HAL_SITL: avoid lockstep scheduling issue with semaphores
If there is another thread holding a lock that the main thread wants to
take while pretending to be the IO thread, we will wait forever as we do
not move SITL time forward while pretending to be the IO thread.

This patch simply allows time to move forward if we've failed to take a
semaphore immediately and need to wait.
2019-09-10 21:01:37 +10:00
Andy Piper
dde6dec145 AP_InertialSensor: correct reboot documentation for batch logger and filters 2019-09-10 20:29:56 +10:00
Randy Mackay
0e1a2efb7c EKF3: RNG_USE_HGT param only used when ALT_SOURCE = rangefinder 2019-09-10 18:44:52 +10:00
Randy Mackay
94a52b3525 EKF2: RNG_USE_HGT param only used when ALT_SOURCE = rangefinder 2019-09-10 18:44:52 +10:00
Andrew Tridgell
b33afde884 HAL_ChibiOS: allow safety button on CUAV_GPS to be used for "stay in bootloader"
allows for recovery of bad CAN firmware
2019-09-10 16:22:33 +10:00
Andrew Tridgell
c6a9f067e2 HAL_ChibiOS: enable LEDs on CUAV_GPS 2019-09-10 16:22:33 +10:00
Andrew Tridgell
3dfe15443d HAL_ChibiOS: fixed orientation of CUAV_GPS compass 2019-09-10 16:22:33 +10:00
Andrew Tridgell
21cce1385a AP_UAVCAN: support safety buttons on UAVCAN
the button works in parallel with any button attached by IOMCU or by a
pin, and obeys all the same BRD_SAFETY* options
2019-09-10 16:22:33 +10:00
Andrew Tridgell
03c1a8bfd9 HAL_ChibiOS: use safety button logic from AP_BoardConfig 2019-09-10 16:22:33 +10:00
Andrew Tridgell
5a96e374ba AP_BoardConfig: moved logic for safety button press to AP_BoardConfig
this allows for common code between CAN and pin safety switches, as
well as making the code neater as most of the logic is related to
AP_BoardConfig options
2019-09-10 16:22:33 +10:00
Andrew Tridgell
82a98ef95d AP_Notify: added NTZ_BUZZ_VOLUME parameter
it is fairly non-linear, but does work
2019-09-10 16:22:33 +10:00
Andrew Tridgell
39f4f7c208 AP_UAVCAN: added safety LED and button messages 2019-09-10 16:22:33 +10:00
Andrew Tridgell
0ea67943b9 HAL_ChibiOS: enable safety button on CUAV_GPS 2019-09-10 16:22:33 +10:00
Andrew Tridgell
c6c1c4bc31 AP_UAVCAN: support safety LEDs on UAVCAN 2019-09-10 16:22:33 +10:00
Andrew Tridgell
186eedf838 HAL_ChibiOS: enable safety LED 2019-09-10 16:22:33 +10:00
Andrew Tridgell
75696997cc HAL_ChibiOS: added buzzer support to CUAV_GPS 2019-09-10 16:22:33 +10:00
Andrew Tridgell
7c57546eb1 AP_Notify: support UAVCAN buzzers 2019-09-10 16:22:33 +10:00
Andrew Tridgell
d55f76c88e AP_UAVCAN: added buzzer support 2019-09-10 16:22:33 +10:00
Peter Barker
8fc55b9678 GCS_MAVLink: remove comm_get_available
available returns an unsigned integer, so this was just weird
2019-09-10 15:45:27 +10:00
Andrew Tridgell
cbe0af2463 HAL_ChibiOS: setup for LEDs on KakuteF4
this makes Kopis1 display LEDs properly
2019-09-10 13:03:28 +10:00
Andrew Tridgell
a4924e1c0b AP_Notify: allow setting of LED count in hwdef.dat 2019-09-10 13:03:28 +10:00
Andrew Tridgell
28b5f2b021 AP_Notify: simplify NeoPixel driver
use new API to avoid complexities
2019-09-10 13:03:28 +10:00
Andrew Tridgell
f441223b55 HAL_ChibiOS: implement updated NeoPixel API
allow for N leds per chain, and setting separate colours per led in
each chain
2019-09-10 13:03:28 +10:00
Andrew Tridgell
1cb608a9f4 AP_HAL: allow neopixel LEDs to be set more flexibly
allow for N leds per chain, with RGB control of each
2019-09-10 13:03:28 +10:00
Tom Pittenger
aa602b5e1b AP_Notify: add NeoPixel driver 2019-09-10 13:03:28 +10:00
Tom Pittenger
e3416b66dc AP_HAL_ChibiOS: add Neopixel output type, similar to dshot 2019-09-10 13:03:28 +10:00
Tom Pittenger
52be3903c0 SRV_Channel: add neopixel as an output type 2019-09-10 13:03:28 +10:00
Randy Mackay
aba4a1fdc8 AC_Avoidance: remove OADatabase check that can never be true 2019-09-10 09:15:56 +10:00
Randy Mackay
0dd8525c99 AP_HAL_SITL: resolve compiler warning in sitl_airspeed by using fabsf 2019-09-10 09:15:56 +10:00
Randy Mackay
2d128e0079 AP_Proximity: remove unused var from AriSimSITL 2019-09-10 09:15:56 +10:00
Randy Mackay
d4b047fc1f SITL: Gripper_EPM compiler warning resolved by using float and fabsf 2019-09-10 09:15:56 +10:00
Randy Mackay
1fd7618238 SITL: remove unused time_diff member 2019-09-10 09:15:56 +10:00
Michael du Breuil
9a7d64e8fc AP_NavEKF3: Allow the GPS to be responsible for logging 2019-09-10 09:09:17 +10:00
Michael du Breuil
a4d10b2e86 AP_NavEKF2: Allow the GPS to be responsible for logging 2019-09-10 09:09:17 +10:00
Michael du Breuil
f857eb4640 AP_GPS: Take responsibility for logging the GPS if the EKF wants logging 2019-09-10 09:09:17 +10:00
Willian Galvani
b92473111c AP_LeakDetector: Mark Leak pins RebootRequired 2019-09-09 09:53:28 -07:00
Andy Piper
6f3334b460 AP_Filesystem: build fixes for SITL on macOS 2019-09-09 20:18:00 +10:00