Commit Graph

38164 Commits

Author SHA1 Message Date
Peter Barker
aef8f9d4dd AP_HAL_Linux: remove vestiges of board sensor specifications
all moved to hwdef
2025-02-25 14:38:45 +11:00
Peter Barker
0d05814d30 AP_HAL_Linux: move BARO lines to hwdef 2025-02-25 14:38:45 +11:00
Peter Barker
1fa2cf38d5 AP_HAL_Linux: move parsing of BARO lines up to AP_HAL hwdef.py 2025-02-25 14:38:45 +11:00
Peter Barker
34735b30df AP_HAL: move parsing of BARO lines up to AP_HAL hwdef.py 2025-02-25 14:38:45 +11:00
Peter Barker
b9ad86943d AP_HAL_ChibiOS: move parsing of BARO lines up to AP_HAL hwdef.py 2025-02-25 14:38:45 +11:00
Peter Barker
0714b3abc2 AP_HAL_Linux: move COMPASS definitions to hwdef 2025-02-25 14:38:45 +11:00
Peter Barker
bdce6f2779 AP_HAL_Linux: move parsing of COMPASS hwdef lines up to hwdef.py 2025-02-25 14:38:45 +11:00
Peter Barker
5d7e5b1aff AP_HAL: move parsing of COMPASS hwdef lines up to hwdef.py 2025-02-25 14:38:45 +11:00
Peter Barker
0a485f9902 AP_HAL_ChibiOS: move parsing of COMPASS hwdef lines up to hwdef.py 2025-02-25 14:38:45 +11:00
Peter Barker
2998190c4b AP_HAL_Linux: hwdef: best-guess IMU fix on rst-zynq 2025-02-25 14:38:45 +11:00
Peter Barker
687e870edd AP_HAL_Linux: move IMU line parsing up into hwdef.py, use it for Linux HAL 2025-02-25 14:38:45 +11:00
Peter Barker
8fb665914e AP_HAL: move IMU line parsing up into hwdef.py, use it for Linux HAL 2025-02-25 14:38:45 +11:00
Peter Barker
f93e637c2c AP_HAL_ChibiOS: move IMU line parsing up into hwdef.py, use it for Linux HAL 2025-02-25 14:38:45 +11:00
Peter Barker
0f59e9b2bb AP_HAL_Linux:tidy bebop defines 2025-02-25 14:38:45 +11:00
Peter Barker
e2fdb81ff6 AP_NavEKF3: remove unused assignments of posCheckPassed
... and more-tightly scope variables to avoid similar problems in future

../../libraries/AP_NavEKF3/AP_NavEKF3_PosVelFusion.cpp:898:17: warning: Value stored to 'posCheckPassed' is never read [deadcode.DeadStores]
                posCheckPassed = true;
                ^                ~~~~
../../libraries/AP_NavEKF3/AP_NavEKF3_PosVelFusion.cpp:946:17: warning: Value stored to 'posCheckPassed' is never read [deadcode.DeadStores]
                posCheckPassed = true;
                ^                ~~~~
2025-02-25 14:38:21 +11:00
Peter Barker
cfa145940a AP_NavEKF3: remove duplicate assignment of posCheckPassed
this assignment is done 4 lines down

../../libraries/AP_NavEKF3/AP_NavEKF3_PosVelFusion.cpp:823:17: warning: Value stored to 'posCheckPassed' is never read [deadcode.DeadStores]
                posCheckPassed = true;
                ^                ~~~~
2025-02-25 14:38:21 +11:00
Henry Wurzburg
6a77d56053 RC_Channel: correct AUX func 182 comment 2025-02-25 09:38:59 +09:00
Peter Barker
ac55b111dd hwdef: remove un-needed AP_NOTIFY_TONEALARM_ENABLED
this is infered by having ALARM set
2025-02-25 11:21:48 +11:00
Bob Long
f72022f606 AP_Scripting: call reset_all_aux_auths on start 2025-02-25 11:19:59 +11:00
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
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
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
Shiv Tyagi
5f1d3dac68 AP_HAL_ChibiOS: 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
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
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
0197220bc5 AP_HAL_ChibiOS: use new AP_PERIPH_HOBBYWING_ESC define 2025-02-20 21:56:14 +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
49755d6212 AP_HAL_ChibiOS: use new AP_PERIPH_EFI_ENABLED define 2025-02-20 13:05:19 +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
dac5269af1 AP_RangeFinder: mark many functions as __INITFUNC__
... implying they can go into external flash
2025-02-19 18:01:48 +11:00