Commit Graph

66654 Commits

Author SHA1 Message Date
Bob Long
7b3a6434de AP_Arming: add reset_all_aux_auths 2025-02-25 11:19:59 +11:00
Thomas Watson
71be1194cb AP_Filesystem: FATFS: clean up error handling
Remove redundant checks of the stream, cases that could never occur
(both before and after combining allocations), and clarify errno
propagation.
2025-02-25 11:17:50 +11:00
Thomas Watson
b9cad62acf AP_Filesystem: FATFS: combine file allocations
The file handle and object are always allocated together. Combine them
to avoid overhead from extra allocations and additional error cases.

Also simplify by using strdup for the pathname.
2025-02-25 11:17:50 +11:00
Peter Barker
30ffcaa8bd autotest: test terarangeri2c 2025-02-25 11:12:06 +11:00
Peter Barker
dbffd74fb5 AP_RangeFinder: stop using ownptr for i2c device 2025-02-25 11:12:06 +11:00
Peter Barker
cf1a1ec88b AP_Rangefinder: request measurement for timer routine to collect
the timer routing attempts to read a reading off the bus straihgt-up, but after initialisation the sensor will not be attempting to provide one, so this will always fail.

Request a sample as the last thing we do in the init routine
2025-02-25 11:12:06 +11:00
Peter Barker
e17c3127b1 add teraranger simulator 2025-02-25 11:12:06 +11:00
Peter Barker
0862ec445f SITL: sort i2c include list
will reduce conflicts on various branches if we keep these sorted
2025-02-25 11:12:06 +11:00
Andrew Tridgell
500d190df3 AP_GPS: prevent NULL ptr deref
if we get an unexpected VALSET NACK we could dereference NULL. This
could happen if we reboot while configuring an invalid key
2025-02-25 11:08:56 +11:00
Andrew Tridgell
69c540a0de AP_GPS: fixed the check for disabling CONFIG_RATE_SOL config
we should stop looking for SOL as soon as we know we have PVT, instead
of waiting for all others to be cleared

may help with
https://discuss.ardupilot.org/t/fc-tries-to-config-gps-constantly-when-trying-to-arm-in-loiter-mode/129930
2025-02-25 11:08:56 +11:00
Iampete1
6ad05dc2c3 Plane: don't switch to RTL on battery failsafe if in autoland 2025-02-25 11:06:38 +11:00
Iampete1
d84a3ec26f Plane: allow Failsafe_Action_AUTOLAND_OR_RTL without MODE_AUTOLAND_ENABLED and defualt to RTL 2025-02-25 11:06:38 +11:00
Henry Wurzburg
9b7c88152b ArduPlane: add AUTOLAND as LOW volt batt failsafe 2025-02-25 11:06:38 +11:00
Henry Wurzburg
2ba548bb27 AP_BattMonitor: add AUTOLAND as LOW volt batt failsafe 2025-02-25 11:06:38 +11:00
Willian Galvani
19e10577df SRV_Channel: initialize focus and zoom with 1000 range 2025-02-25 08:18:05 +09:00
Willian Galvani
4bdcb2883e AP_Camera: allow focus and zoom control with servos 2025-02-25 08:18:05 +09:00
Peter Barker
827c8d5f88 AP_Airspeed: inline get_pressure
this doesn't gain us anything; it's a private function which is only called in one place and replicates checks that the caller already makes (it devolves into a one-liner, essentially!)

This method is also confusing as it sits next to "get_temperature" in the code, which is actually a match for get_differential_pressure, not get_pressure

... but the chief advantage IMO is not updating the healthy state in this method.
2025-02-25 08:37:41 +11:00
Peter Barker
d0824a8d9b AP_BattMonitor: add Copter brake/land failsafe action to parameter metadata 2025-02-24 22:42:33 +11:00
Iampete1
fc47d7c2d0 AP_BoardConfig: SAFETY_MASK include full 32 channels in docs 2025-02-24 14:53:08 +11:00
Peter Barker
ae55f9a020 autotest: add a test for brake/land failsafe 2025-02-24 12:56:07 +11:00
Shiv Tyagi
5f1d3dac68 AP_HAL_ChibiOS: use new AP_PERIPH_MSP_ENABLED define 2025-02-23 10:28:54 +11:00
Shiv Tyagi
dabd9ba73e Tools: use new AP_PERIPH_MSP_ENABLED define 2025-02-23 10:28:54 +11:00
Shiv Tyagi
e1e074bc09 AP_HAL_ChibiOS: use new AP_PERIPH_RELAY_ENABLED define 2025-02-23 08:58:36 +11:00
Shiv Tyagi
873abe3fd3 Tools: use new AP_PERIPH_RELAY_ENABLED define 2025-02-23 08:58:36 +11:00
Thomas Watson
e696a83371 AP_Filesystem: LittleFS: avoid leaking directory on close error 2025-02-22 09:46:33 -05:00
Thomas Watson
0246b03424 AP_Filesystem: LittleFS: use NEW_NOTHROW instead of new
Unfortunate CI did not catch this...
2025-02-22 09:46:33 -05:00
Thomas Watson
232f6524f6 AP_Scripting: patch vendored Lua to 5.3.6
In particular this fixes some exceedingly rare/impossible
use-after-frees.

Add the new docs from the distribution and clarify where we get our code
from. To maintain our alterations, the following patches have been
applied to the source from upstream's repository (1221e987...75ea9ccb)
to bring the source up to date:

* Bug: Long brackets with a huge number of '=' causes overflow

  A long bracket with too many equal signs can overflow the 'int' used for
  the counting and some arithmetic done on the value. Changing the counter
  to 'size_t' avoids that. (Because what is counted goes to a buffer, an
  overflow in the counter will first raise a buffer-overflow error.)

* Fixed bug in 'lua_upvaluejoin'

  Bug-fix: joining an upvalue with itself could cause a use-after-free
  crash.

* Fixed typos in comments

* Fixed missing GC barriers in compiler and undump

  While building a new prototype, the GC needs barriers for every object
  (strings and nested prototypes) that is attached to the new prototype.

* Updated release number and copyright year

* Fixed bug: invalid mode can crash 'io.popen'

* Fixed bug: Negation overflow in getlocal/setlocal

* 'realloc' can fail when shrinking a block

  According to ISO C, 'realloc' can fail when shrinking a block. If that
  happens, 'l_alloc' simply ignores the fail and returns the original
  block.

* Fixed bug of long strings in binary chunks

  When "undumping" a long string, the function 'LoadVector' can call the
  reader function, which can run the garbage collector, which can collect
  the string being read. So, the string must be anchored during the call
  to 'LoadVector'.
2025-02-22 14:45:30 +00:00
Shiv Tyagi
297ec3fa7c AP_Scripting: use new AP_PERIPH_RC_OUT_ENABLED define 2025-02-22 18:26:07 +11:00
Shiv Tyagi
11e42a94d0 AP_HAL_ChibiOS: use new AP_PERIPH_RC_OUT_ENABLED define 2025-02-22 18:26:07 +11:00
Shiv Tyagi
6a429b887a Tools: use new AP_PERIPH_RC_OUT_ENABLED define 2025-02-22 18:26:07 +11:00
SULILG
1793c4c5f1 AP_HAL_ChibiOS_hwdef : Modify the LED on the SULILGH7-P1-P2 flight controller 2025-02-22 14:03:06 +11:00
Bob Long
8d427dd229 GCS_Common: fix missing #if for CAMERA_FOV_STATUS 2025-02-22 13:52:51 +11:00
Peter Barker
922f86a7ed AP_GPS: correct uBlox config debugging 2025-02-21 21:47:51 -05:00
Shiv Tyagi
76aed8f89c Tools: use new AP_PERIPH_HOBBYWING_ESC define 2025-02-20 21:56:14 +11:00
Shiv Tyagi
0197220bc5 AP_HAL_ChibiOS: use new AP_PERIPH_HOBBYWING_ESC define 2025-02-20 21:56:14 +11:00
Shiv Tyagi
2b6bbedce6 Tools: use new AP_PERIPH_NOTIFY_ENABLED define 2025-02-20 13:32:20 +11:00
Shiv Tyagi
44d07c8f79 AP_Scripting: use new AP_PERIPH_NOTIFY_ENABLED define 2025-02-20 13:32:20 +11:00
Shiv Tyagi
85b3d6a625 AP_HAL_ChibiOS: use new AP_PERIPH_NOTIFY_ENABLED define 2025-02-20 13:32:20 +11:00
Shiv Tyagi
82a0347657 Tools: use new AP_PERIPH_EFI_ENABLED define 2025-02-20 13:05:19 +11:00
Shiv Tyagi
49755d6212 AP_HAL_ChibiOS: use new AP_PERIPH_EFI_ENABLED define 2025-02-20 13:05:19 +11:00
Shiv Tyagi
9b226edf3a Tools: use new AP_PERIPH_ADSB_ENABLED define 2025-02-20 12:06:00 +11:00
Shiv Tyagi
ab725360c1 AP_HAL_ChibiOS: use new AP_PERIPH_ADSB_ENABLED define 2025-02-20 12:06:00 +11:00
Peter Barker
6dcb350b72 Copter: save a few bytes in variance check 2025-02-19 17:03:25 +09:00
Peter Barker
b0c31d865e ArduPlane: mark many functions as __INITFUNC__
... implying they can go into external flash
2025-02-19 18:01:48 +11:00
Peter Barker
4bd5bb27c9 ArduCopter: mark many functions as __INITFUNC__
... implying they can go into external flash
2025-02-19 18:01:48 +11:00
Peter Barker
dac5269af1 AP_RangeFinder: mark many functions as __INITFUNC__
... implying they can go into external flash
2025-02-19 18:01:48 +11:00
Peter Barker
2ec34d1b05 AP_Proximity: mark many functions as __INITFUNC__
... implying they can go into external flash
2025-02-19 18:01:48 +11:00
Peter Barker
a6d88fd25e AP_Compass: mark many functions as __INITFUNC__
... implying they can go into external flash
2025-02-19 18:01:48 +11:00
Peter Barker
51d202fd8a AP_Baro: mark many functions as __INITFUNC__
... implying they can go into external flash
2025-02-19 18:01:48 +11:00
Peter Barker
68969e110e AP_Airspeed: mark many functions as __INITFUNC__
... implying they can go into external flash
2025-02-19 18:01:48 +11:00