Commit Graph

32127 Commits

Author SHA1 Message Date
Randy Mackay c74eea54c5 AP_InertialSensor: SCHA63T comment fix 2023-06-08 09:29:59 +10:00
Randy Mackay 9960e1e128 AP_HAL_ChibiOS: JFB100 board def fixup 2023-06-08 09:29:59 +10:00
Randy Mackay 655bdb3390 AP_InertialSensor: SCHA63T loses unused ret bool 2023-06-08 09:29:59 +10:00
jfbblue0922 4b556ea472 AP_HAL_ChibiOS: add JFB100 board definition 2023-06-08 09:29:59 +10:00
Randy Mackay fbfd8d506a AP_InertialSensor: formatting fixes 2023-06-08 09:29:59 +10:00
jfbblue0922 81424e2d05 AP_InertialSensor: add SCHA63T IMU support 2023-06-08 09:29:59 +10:00
jfbblue0922 7cfa0a6848 AP_Math: add crc8_sae 2023-06-08 09:29:59 +10:00
Henry Wurzburg ed81577bcc AP_Notify: fix incorrect buzzer pin type to stop always instantiating 2023-06-08 09:29:59 +10:00
James O'Shannessy d8721a72a2 AP_BattMonitor: Fixes the setting of a default parameter for battery instance #2 set in hwdef 2023-06-08 09:29:59 +10:00
Randy Mackay 110901e95d AC_WPNav: wpnav speed param check fixed 2023-06-08 09:29:59 +10:00
Andrew Tridgell 169d180961 HAL_ChibiOS: fixed USB pass-thru for 2nd USB endpoint
we need to align the endpoint ID in the structure
2023-06-08 09:29:59 +10:00
Andrew Tridgell 6f5d3a0dfd AP_AHRS: don't reject airspeed using EKF if dead-reckoning
when dead-reckoning the EKF wind estimate can diverge from reality,
leading to us rejecting a valid airspeed sensor. We are best off
trusting airspeed if we are dead-reckoning
2023-06-08 09:29:59 +10:00
Andrew Tridgell 5f6a1f7f71 AP_BoardConfig: fixed documentation of safety options
on and off were reversed
2023-06-08 09:29:59 +10:00
Iampete1 5d1bb3b1ca Filter: SlewLimiter: always caculate slew limit 2023-06-08 09:29:59 +10:00
Andrew Tridgell 250a4ffcef AP_BattMonitor: allow max amps to be configured on INA2XX
this allows for higer current ranges with lower resolution
2023-06-08 09:29:59 +10:00
Andrew Tridgell 67cfbcfc41 hwdef: use zero address for INA2XX to allow for different sensors 2023-06-08 09:29:59 +10:00
Andrew Tridgell b8b9f82084 AP_BattMonitor: auto-probe INA2XX address if address is zero
this makes life easier for users who don't know which device they have
2023-06-08 09:29:59 +10:00
Andrew Tridgell f54d851364 AP_BattMonitor: support INA228 and INA238 battery monitor
I2C monitors with similar functionality to INA226
2023-06-08 09:29:59 +10:00
Andy Piper ebd66e88e0 AC_AutoTune: load test gains for correct axis when testing yaw D 2023-06-08 09:29:59 +10:00
Paul Riseborough d98a60c2e1 AP_NavEKF3: Increase delta velocity bias state process noise
Required due to state variance collapse on ground with some systems using RTK GPS.
2023-06-08 09:29:59 +10:00
Paul Riseborough da22519de8 AP_NavEKF3: Strengthen recovery from bad delta velocity bias learning 2023-06-08 09:29:59 +10:00
Paul Riseborough 17003ff0f5 AP_NavEKF3: Increase default value of EK3_ABIAS_P_NSE
This is required because some hardware setups with RTK GPS have experienced a collapse of the delta velocity state variances.
2023-06-08 09:29:59 +10:00
Paul Riseborough 9c93cb8d46 AP_NavEKF3: Retune and fix delta velocity bias state variance protection 2023-06-08 09:29:59 +10:00
Andy Piper 383297f6be AP_NavEKF: ensure gyro biases are numbers
avoid errors during compass mot
2023-06-08 09:29:59 +10:00
Paul Riseborough 444f90352f AP_NavEKF3: Lock in wind state estimates when using srag to dead reckon 2023-06-08 09:29:59 +10:00
Andrew Tridgell 41e922c60e AP_ICEngine: fixed a bug engine control when running
if you have a mission item for engine control with delayed start at
height and the engine is already running them it would put the ICE
subsystem into a state where it would no longer start the engine

It was actually 2 bugs:

 - an engine control to do a height delayed start should be ignored if
   the engine is already running. This prevents an engine control to
   start the engine from stopping the engine

 - a start_chan high should always try to start the engine
   immediately, even if in the wait state
2023-06-08 09:29:59 +10:00
Andrew Tridgell 87c767df5c AP_RCProtocol: return true on initial protocol detection
we need to tell the IO firmware that a byte was consumed when we first
detect a protocol as otherwise the next bad byte on DSM will lock us
on the DSM port
2023-06-08 09:29:59 +10:00
Andrew Tridgell 3b50123f18 AP_IOMCU: fixed issue with not regaining RC input
this fixes an issue where when you lose R/C input on IOMCU that you
may not regain it when R/C comes back.

The issue stems from us still processing the DSM uart when we are
using the SD3 "SBUS" uart for RC input, and still doing the switch of
the SD3 config every 2 seconds.

When we are not searching for a new protocol we should not be changing
UART config
2023-06-08 09:29:59 +10:00
Andrew Tridgell 784bfb53f2 AP_NavEKF3: handle core setup failure
ensure num_cores is left as zero so that calls such as Log_Write don't
de-reference nullptr
2023-06-08 09:29:59 +10:00
Andrew Tridgell 259e51e0e8 AP_NavEKF2: handle core setup failure
ensure num_cores is left as zero so that calls such as Log_Write don't
de-reference nullptr
2023-06-08 09:29:59 +10:00
Andrew Tridgell 2bbffdd6c6 AP_Param: added set() to AP_Enum 2023-06-08 09:29:59 +10:00
Peter Barker 38279fc5dd AP_Logger: do not rotate logs when disarming if we are replay-logging 2023-06-08 09:29:59 +10:00
Andrew Tridgell e3537cb01d AP_Logger: added LOG_DARM_RATEMAX
this sets the logging rate max when disarmed. In combination with
LOG_DISARMED=3 it gives a very nice setup to get always on logging
with very little addition to the log sizes. It is particularly useful
in combination with LOG_REPLAY=1
2023-06-08 09:29:59 +10:00
Andrew Tridgell 1c78e4f7f9 AP_Logger: added LOG_DISARMED=3
when LOG_DISARMED is set to 3 then we log while disarmed but if we
reboot without ever arming the log is discarded. This allows for using
LOG_DISARMED without filling the microSD.
2023-06-08 09:29:59 +10:00
Andrew Tridgell f69188d43a AP_Logger: use AP_Enum for log_disarmed 2023-06-08 09:29:59 +10:00
Henry Wurzburg b23b6cd4bf AP_HAL_ChibiOS: Add SpeedyBeeF405WING 2023-06-08 09:29:59 +10:00
Andy Piper 69c0b1c567 AP_HAL_ChibiOS: correct locking on LED thread 2023-05-28 07:53:16 +10:00
Andy Piper e8d1afd108 AP_HAL_ChibiOS: move LED processing to a separate thread
LED processing on a separate thread allows much longer LED lengths to be handled without
compromising dshot timing or timeouts. The thread is also run at a lower priority to
reflect its lack of flight criticality
2023-05-28 07:53:16 +10:00
Andy Piper f97cd5c5ab AP_HAL: add helper functions for LEDs
add PRIORITY_LED for led output thread
2023-05-28 07:53:16 +10:00
Andy Piper c042577827 AP_HAL_ChibiOS: reduce IMU SPI low speed to 1Mhz to avoid chip initialization issues 2023-05-25 18:12:00 +01:00
Andy Piper d1600d3bf7 AP_HAL_ChibiOS: FoxeerH743 GA release 2023-05-24 17:21:41 +10:00
Andy Piper 9afcc8cf24 AP_HAL_ChibiOS: update MambaF405v2 for ICM42688, bdshot and DMA on UART1 2023-05-24 17:20:05 +10:00
Andy Piper a667e3728c AP_HAL_ChibiOS: add BMI270 and ICM42688 to FlywooF745 2023-05-24 17:20:05 +10:00
Andy Piper d5535cc0cf AP_HAL_ChibiOS: remove erroneous FlywooF745v2 2023-05-24 17:20:05 +10:00
Andy Piper 3ec036c4ea AP_HAL_ChibiOS: hwdef for FlywooF745v2
Add SPL06 baro to FlywooF745v1
2023-05-24 17:20:05 +10:00
Paul Riseborough 3c99766a5a AP_NavEKF3: Improve protection against GPS glitches during yaw alignment 2023-04-21 09:48:59 +10:00
Paul Riseborough 007bc804bd AP_NavEKF3: Reduce use of GSF yaw for planes with no compass 2023-04-21 09:48:59 +10:00
Andy Piper 27628099ce AP_HAL_ChibiOS: hwdef for MatekF405-TE/VTOL including bdshot 2023-04-21 09:48:59 +10:00
bugobliterator 42d21ab9bc AP_InertialSensor: fix hardfault in BatchSampler 2023-04-21 09:48:59 +10:00
Peter Barker f3502a71e9 AP_InertialSensor: correct access beyond array in Ins TCal 2023-04-21 09:48:59 +10:00
Peter Barker aecffd2778 SimOnHW: correct compilation on CubeOrangePlus
this was at 2 to reduce CPU load.

But particularly when CubeOrangePlus is playing around with auxiliary IMUs we really want to be running on SimOnHardware just what we're running on the normal firmware.  We can find CPU cycles elsewhere....
2023-04-21 09:48:59 +10:00
Andy Piper 3e83d40bd8 AP_HAL_ChibiOS: ensure that DMA source is correct on DMA send for rcout 2023-03-26 16:46:53 +11:00
Andy Piper aabfce2099 AP_HAL_ChibiOS: ensure the rcout TIM_UP DMA request source is re-instated after cancellation
This fixes a bug in bdshot whereby dma cancellation could result in the wrong DMA channel
being used for dshot output and hence motors stopping
2023-03-26 16:46:51 +11:00
Andrew Tridgell 7527c6e278 HAL_ChibiOS: support starting the clock at non-zero
for testing time wrap bugs
2023-03-26 16:46:47 +11:00
Andrew Tridgell c55a2916f6 HAL_ChibiOS: switched to 64 bit maths for DShot timings
this fixes a timer wrap bug at 71 minutes after boot that impacts
bdshot
2023-03-26 16:46:44 +11:00
bugobliterator b9e9d4cc4f AP_InertialSensor: fix duplicate sensor detection for AUX sensors 2023-03-24 11:55:45 +11:00
bugobliterator f88db74356 AP_HAL_ChibiOS: add support for initialising extra sensors as AUX 2023-03-24 11:55:45 +11:00
bugobliterator 6eaa05960f AP_InertialSensor: increase the temp tolerance for INV2 driver for fifo reset 2023-03-23 08:00:05 +11:00
bugobliterator deeeb4134c AP_NavEKF3: use INS_MAX_INSTANCES instead of MAX_EKF_CORES for IMU mask 2023-03-21 10:04:16 +11:00
bugobliterator 08bea2fcd2 AP_InertialSensor: move from INS_ top level parameters to INS 2023-03-21 10:04:16 +11:00
bugobliterator e7533c006b SITL: add support for auxiliary IMUs 2023-03-21 10:04:16 +11:00
bugobliterator 14ae431056 AP_DAL: use MAX_EKF_CORES instead of INS_MAX_INSTANCES in ekf_low_time_remaining 2023-03-21 10:04:16 +11:00
bugobliterator f3dc4216d2 AP_HAL_ChibiOS: allow instantiation of upto 5 IMUs on CubeOrangePlus 2023-03-21 10:04:16 +11:00
bugobliterator 4e93e99fe5 AP_NavEKF: Five IMUs need slightly more stack space with GCC 6.3.1
The extra space is take by the inactive sensor bias state code.
2023-03-21 10:04:16 +11:00
bugobliterator 10439cc42e AP_InertialSensor: add support for extra Aux IMUs 2023-03-21 10:04:16 +11:00
Peter Barker 1cd3e7327d AP_EFI: add defines for Lutan and MegaSquirt 2023-03-21 09:01:13 +11:00
Peter Barker 615f36f8a0 AP_UAVCAN: tidy AP_EFI defines 2023-03-21 09:01:13 +11:00
Peter Barker 1e38200293 AP_PiccoloCAN: tidy AP_EFI defines 2023-03-21 09:01:13 +11:00
Peter Barker 593983df7a AP_EFI: tidy AP_EFI defines 2023-03-21 09:01:13 +11:00
Peter Barker e76462f005 AP_OSD: move OSD minimizement to minimize_features.inc 2023-03-21 08:47:53 +11:00
Peter Barker 8278d5ad76 AP_HAL_ChibiOS: move OSD minimizement to minimize_features.inc 2023-03-21 08:47:53 +11:00
Peter Barker 1ffc5d2faa AP_OSD: add and use AP_OSD_config.h 2023-03-21 08:47:53 +11:00
Peter Barker 6ebd73f144 AP_RCTelemetry: add and use AP_RCTelemetry_config.h 2023-03-21 08:47:53 +11:00
Peter Barker 35e3dcd83b AP_RCProtocol: HAL_LOGGING_ENABLED in place of checking build types
We don't care how logging works, just that it does
2023-03-21 08:31:27 +11:00
Michael Oborne 76beaeab64 CubeOrangePlus-SimOnHardWare: add support 2023-03-20 10:09:31 -07:00
Henry Wurzburg ed7a622928 AP_Arming:correct RUDDER_ARMING description 2023-03-20 10:03:39 -07:00
Henry Wurzburg 0a96f037f5 AP_Scripting:provide altitude loss safety abort for plane aerobatics 2023-03-20 04:48:57 -07:00
QioTek 011fdf6e2b AP_RAMTRON: added PB85RS128C and PB85RS2MC 2023-03-19 17:22:53 +11:00
Peter Barker 8e15b2f349 AP_Mission: correct missing transitive include problem 2023-03-19 09:08:41 +11:00
Peter Barker d200ed1b08 AP_HAL_ChibiOS: correct defaulting of camera backends in minimize_features.inc 2023-03-19 09:08:41 +11:00
Peter Barker b850c9cb16 AP_Notify: correct config boards include
Important to include AP_HAL_Boards.h directly, rather than relying on someone else having done it or getting it transitively
2023-03-19 09:08:41 +11:00
Peter Barker 59af9436db AP_Gripper: correct config boards include
Important to include AP_HAL_Boards.h directly, rather than relying on someone else having done it or getting it transitively
2023-03-19 09:08:41 +11:00
Peter Barker 84bf020897 AP_GPS: correct config boards include
Important to include AP_HAL_Boards.h directly, rather than relying on someone else having done it or getting it transitively
2023-03-19 09:08:41 +11:00
Peter Barker 191e5eb9c9 AP_Generator: correct config boards include
Important to include AP_HAL_Boards.h directly, rather than relying on someone else having done it or getting it transitively
2023-03-19 09:08:41 +11:00
Peter Barker 48544e3e70 AP_Camera: correct config boards include
Important to include AP_HAL_Boards.h directly, rather than relying on someone else having done it or getting it transitively
2023-03-19 09:08:41 +11:00
Andrew Tridgell 0489323551 HAL_ChibiOS: Revert "HAL_ChibiOS: fix a memory corruption bug on STM32H757"
This reverts commit 63633368f5.

this broke CAN1 on some H743 boards
2023-03-19 07:17:28 +11:00
Randy Mackay e5be8e9bf0 AP_Scripting: copter deadreckoning lua check fixes 2023-03-18 08:55:21 +09:00
Randy Mackay 3d39f9bb20 AP_Scripting: copter deadreckon applet gets param desc and md 2023-03-18 08:55:21 +09:00
Randy Mackay bf0d096276 AP_Scripting: copter deadreckoning moved to applet directory 2023-03-18 08:55:21 +09:00
Andrew Tridgell 63633368f5 HAL_ChibiOS: fix a memory corruption bug on STM32H757
this fixes an issue where a variable in SRAM1 gets set to a bad value
when we reset AHB1 with the top bit (a reserved bit)

the bug was only reproducible with this particular commit:

https://github.com/tridge/ardupilot/commits/cubeorangplus-crash-boot-bisect

but likely is just luck that it triggered on that commit. In this
instance it triggered as AP_OSD::singleton was reset to non-nullptr,
causing a panic() in AP_OSD::AP_OSD()

compiler was gcc 10.2-2020-q4
2023-03-18 08:35:51 +11:00
Andrew Tridgell 32578b796b hwdef: fixed polarity of VDD_5V_PERIPH_EN on several boards
we can tell these are incorrect as they init to LOW, and previously we
didn't have handling of VDD_5V_PERIPH_EN, so we know that LOW is
enabled or the boards would not have worked

this fixes GPS on Pixhawk1
2023-03-17 17:40:51 +11:00
Randy Mackay 5b96998e62 AP_Mission: add camera zoom and focus support
also image-start-capture, video-start-capture, video-stop-capture
2023-03-16 07:47:01 +09:00
Randy Mackay a3e3e5fd2d GCS_MAVLink: send mav-cmd-set-camera-zoom to AP_Camera
also send focus and image capture
2023-03-16 07:47:01 +09:00
Randy Mackay 227daf31f7 AP_Camera: support mav-cmd-set-camera-zoom from GCS
also support focus and image capture commands
2023-03-16 07:47:01 +09:00
Randy Mackay 267f459c7e AP_Camera: remove unnecessary includes 2023-03-16 07:47:01 +09:00
Randy Mackay a8b9b2742d GCS_MAVLink: move camera command handling to AP_Camera 2023-03-16 07:47:01 +09:00
Randy Mackay 9ccf08a0f8 AP_Camera: add handle_command_long 2023-03-16 07:47:01 +09:00
Peter Barker 3bc42b888f AP_EFI: use uint16_t to store offset
prevents infinite loop if there are exactly 255 bytes ready to read
2023-03-15 13:34:17 -07:00
Peter Barker 440db27807 AP_RCProtocol: correct use of MAX_CHANNELS in SRXL2
This is a little all over the place.  Safe, but ARRAY_SIZE ensures correctness, and we save memory...
2023-03-15 13:33:45 -07:00
Peter Barker d5bca05fb6 AP_RCProtocol: SRXL2 uses own define for max-channels
Different protocol, different count.
2023-03-15 13:33:45 -07:00