Commit Graph

17561 Commits

Author SHA1 Message Date
Andrew Tridgell 9f0312d744 AP_AHRS: save/restore home to backup registers
restore on watchdog reset
2019-04-20 19:50:25 +10:00
Andrew Tridgell 723a7bb647 HAL_ChibiOS: save/restore home position in backup registers 2019-04-20 19:49:46 +10:00
Andrew Tridgell 186f36a5bd AP_HAL: added save/restore of home to backup registers 2019-04-20 19:49:11 +10:00
Andrew Tridgell 4139450db8 AP_InertialSensor: prevent watchdog in accelcal 2019-04-20 17:35:49 +10:00
Andrew Tridgell 6e80174147 HAL_ChibiOS: allow for delay in bootloader flash 2019-04-20 16:33:27 +10:00
Andrew Tridgell f89aadd2ba HAL_ChibiOS: fixed watchdog timeout setting 2019-04-20 16:31:28 +10:00
Andrew Tridgell 337cc16880 GCS_MAVLink: added method to lockup autopilot
used for watchdog testing
2019-04-20 15:17:55 +10:00
Andrew Tridgell 6252f97df4 AP_Logger: prevent log erase from triggering watchdog
# Conflicts:
#	libraries/DataFlash/DataFlash_File.cpp
2019-04-20 14:16:22 +10:00
Andrew Tridgell b6285547c3 AP_Logger: force logging on an armed watchdog reset
and don't clear sdcard space
2019-04-20 14:16:22 +10:00
Andrew Tridgell f5e170c76b HAL_ChibiOS: implement was_watchdog_armed() 2019-04-20 14:16:22 +10:00
Andrew Tridgell 63e636fd5a AP_HAL: added was_watchdog_armed()
allow decisions to be based on whether this is a watchdog reset and we
were armed
2019-04-20 14:16:22 +10:00
Andrew Tridgell ff3527eef5 AP_BoardConfig: auto-restore safety state on watchdog reset 2019-04-20 14:16:22 +10:00
Andrew Tridgell 0a263cf202 HAL_ChibiOS: added ability to restore safety state on watchdog reset
# Conflicts:
#	libraries/AP_HAL_ChibiOS/hwdef/common/stm32_util.c
2019-04-20 13:59:39 +10:00
Andrew Tridgell 187ced5115 AP_HAL: added was_watchdog_safety_off()
used to restore safety state on watchdog reset
2019-04-20 13:59:01 +10:00
Andrew Tridgell ddda455973 HAL_ChibiOS: change to 2s timeout on watchdog
a bit more of a safety net against false positives for stable release
2019-04-20 13:58:58 +10:00
Andrew Tridgell 3597e77f49 HAL_ChibiOS: fixed watchdog on H7 2019-04-20 13:57:43 +10:00
Andrew Tridgell 025496f65e AP_Compass: flag compass cal as long expected delay 2019-04-20 13:57:28 +10:00
Andrew Tridgell cec6f0e3d4 HAL_ChibiOS: implement scheduler->expect_delay_ms()
# Conflicts:
#	libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp
#	libraries/AP_HAL_ChibiOS/Scheduler.h
2019-04-20 13:57:23 +10:00
Andrew Tridgell 4e66449b52 AP_Logger: handle long delays in opening log files 2019-04-20 13:55:37 +10:00
Andrew Tridgell 3d386f333f AP_HAL: added expect_delay_ms() to Scheduler
used to notify scheduler of long expected delay in main thread
2019-04-20 13:55:33 +10:00
Andrew Tridgell fed89a0b16 HAL_ChibiOS: added commented out test code for watchdog 2019-04-20 13:55:27 +10:00
Andrew Tridgell 3cb134b67c AP_Baro: skip cal on watchdog reset 2019-04-20 13:55:21 +10:00
Andrew Tridgell 7e675805fa AP_Airspeed: skip cal on watchdog reset 2019-04-20 13:55:17 +10:00
Andrew Tridgell 3f0af2ce29 AP_InertialSensor: skip gyro cal on watchdog reset 2019-04-20 13:55:08 +10:00
Andrew Tridgell ad2ff5a207 HAL_ChibiOS: implement was_watchdog_reset()
# Conflicts:
#	libraries/AP_HAL_ChibiOS/Util.h
2019-04-20 13:55:03 +10:00
Andrew Tridgell 4b4eb33558 AP_HAL: added was_watchdog_reset()
# Conflicts:
#	libraries/AP_HAL/Util.h
2019-04-20 13:54:41 +10:00
Andrew Tridgell ac5294c974 HAL_ChibiOS: record reason for reset
allows us to tell if reset was due to watchdog
2019-04-20 13:54:18 +10:00
Andrew Tridgell 5823a6b963 HAL_ChibiOS: use BRD_OPTIONS to enable watchdog
# Conflicts:
#	libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp
2019-04-20 13:54:14 +10:00
Andrew Tridgell 348506b3c4 AP_BoardConfig: added BRD_OPTIONS
used to enable STM32 watchdog

# Conflicts:
#	libraries/AP_BoardConfig/AP_BoardConfig.cpp
#	libraries/AP_BoardConfig/AP_BoardConfig.h
2019-04-20 13:53:45 +10:00
Andrew Tridgell 78ac3e1e2f HAL_ChibiOS: added IWDG watchdog support
this resets the MCU if the main loop stops for 1 second

# Conflicts:
#	libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp
2019-04-20 13:52:31 +10:00
Andrew Tridgell ae2d4e6edc HAL_ChibiOS: change CUAVv5Nano default PWM count to 11 2019-04-11 16:12:32 +10:00
Andrew Tridgell 021816ecbc HAL_ChibiOS: fixed CUAVv5Nano uarts 2019-04-11 16:12:29 +10:00
Andrew Tridgell ee9d084757 HAL_ChibiOS: support for CUAVv5Nano board
F765 with no IOMCU
2019-04-11 16:12:27 +10:00
Andrew Tridgell 1420265513 HAL_ChibiOS: fixed fallback to microSD for storage
this is used when FRAM fails on a board with microSD support. The
double init caused the validate() in the FATFS code to fail
2019-04-07 13:40:24 +10:00
Andrew Tridgell f50a6b59cc AP_TECS: fixed a bug in changes from rate-limited to non-limited airspeed
The calculation of the non-limited airspeed rate demand used the last
non-limited airspeed, whereas it should have used the last adjusted
value. This led to a single frame spike in airspeed demand, which fed
through to a sudden change in pitch integrator.
2019-04-01 09:29:25 +11:00
Andrew Tridgell b1a8055f20 AP_TECS: prevent airspeed demand spikes causing large pitch changes
a short term spike in the derivative of speed demand could cause the
constraint on the pitch integrator to push the pitch integrator to
very low values, causing a sharp nose down which takes a long time to
recover from
2019-04-01 09:29:25 +11:00
Andrew Tridgell 0360f887a0 HAL_ChibiOS: allocate threads from any heap
this fixes a failure on MatekF405-Wing where it fails to allocate the
SPI thread for the IMU
2019-02-27 12:00:18 +11:00
Andrew Tridgell d71c8bc7ce AP_Compass: change to 3 compasses in SITL 2019-02-25 10:52:25 +11:00
Rob Ratcliff 199412adf2 RC_Channel: treat UINT16_MAX as a value of 0 in set_override
Addresses ignore R/C override issue documented here:
https://github.com/ArduPilot/ardupilot/issues/1667
2019-02-25 10:52:25 +11:00
Randy Mackay 8d3e1e45a7 AC_PosControl: remove unnecessary init of last_update_xy_ms 2019-02-25 10:52:25 +11:00
Andrew Tridgell f03893c2f8 HAL_ChibiOS: setup APJ board IDs in environment 2019-02-25 10:52:25 +11:00
Andrew Tridgell 2187ee4611 HAL_ChibiOS: fixed mini-pix uart order 2019-02-25 10:52:25 +11:00
Andrew Tridgell 659e8395d5 AP_NavEKF3: fixed EKF compass switching
when we had 3 compasses the lack of the 'break' meant when we switched
compass in flight we would always switch back instantly to the one
that we had just rejected.
2019-02-25 10:52:25 +11:00
Andrew Tridgell fe724e40b3 AP_NavEKF2: fixed EKF compass switching
when we had 3 compasses the lack of the 'break' meant when we switched
compass in flight we would always switch back instantly to the one
that we had just rejected.
2019-02-25 10:52:25 +11:00
Andrew Tridgell 037469db30 AC_WPNav: prevent I term buildup during landing
this prevents I term buildup in the XY velocity controller during
landing. This to account for the EKF giving a non-zero horizontal
velocity when we have touched down. The I term buildup in the XY
velocity controller can lead to the attitude error going above the
level for disabling the relax function as the throttle mix is
changed. That results in large motor outputs which can tip over the
vehicle after touchdown.

Thanks to Leonard for the suggestion
2019-02-25 10:52:25 +11:00
Andrew Tridgell 4b33865ee2 AP_Math: fixed inefficient sq() function 2019-02-25 10:52:25 +11:00
Andrew Tridgell 51acb72152 AP_RangeFinder: fixed lightware serial with LW20 lidar
it needs a longer serial write to force it to serial mode from i2c
2019-02-25 10:52:25 +11:00
Andrew Tridgell 3dd4cf4d87 AP_Rangefinder: probe all I2C buses for rangefinders 2019-02-25 10:52:25 +11:00
Andrew Tridgell a2f0ff7386 Filter: fixed crash on zero cutoff frequency
this fixes #10435
2019-02-25 10:52:25 +11:00
Andrew Tridgell ba53230f70 HAL_ChibiOS: fixed CAN on Pixhawk4 and PH4-mini
the silent pins floating disabled CAN
2019-01-23 13:26:55 +11:00