Commit Graph
1720 Commits
Author SHA1 Message Date
Peter Barker a4147441a5 Tools: add LIS2MDL back in with a comment that it generally wasn't used 2026-06-01 17:05:32 +10:00
Jacob Dahl 6563ed1d2f Tools: remove LIS2MDL driver, use IIS2MDC
LIS2MDL and IIS2MDC are the same ST silicon with identical register
maps, WHO_AM_I, I2C address and sensitivity. Remove the separate
LIS2MDL driver entirely and switch boards that referenced it to IIS2MDC.

AIRBRAINH743 COMPASS line changed from LIS2MDL to IIS2MDC.
2026-06-01 17:05:32 +10:00
Pierre Kancir 8d225aa7e7 Tools: build_script_base: make BuildScriptBase base class and progress_prefix abstract
this prevent linter to trigger on none existing progress_prefix on the base class
Child class will now have TypeError if they don't implement  progress_prefix
2026-05-27 08:50:02 +10:00
Pierre Kancir da8bd63a35 Tools: build_script_base: fix call error return 2026-05-27 08:50:02 +10:00
Peter Barker dea45a24e5 autotest: disallow BRD_TYPE in defaults.parm for new/modified boards
should always be specified in hwdef as BOARD_TYPE_DEFAULT
2026-05-26 22:31:26 +10:00
Peter Barker 8f5f690771 Tools: ensure new boards have both a README.md and an image 2026-05-23 09:55:03 +10:00
Andrew TridgellandClaude Opus 4.7 fce9883d2f AP_Networking: add SITL TAP backend for host-side reachability
New AP_Networking_SITL_TUN backend that opens a Linux TAP device and
bridges the lwIP stack to it. Slots into the same "ethernet" position
in PPP_ETHERNET_GATEWAY mode that the ChibiOS backend takes on real
hardware, so a SITL build acting as a PPPGW can be reached by developer
tools on the host (browsers, curl, ...) at the periph's PPP-side IP.

A new Tools/scripts/Networking/sitl_network.sh handles the one-time
host setup: it creates the TAP device under the current user (so the
SITL binary needs no extra privileges), assigns the host's IP, and
installs iptables MASQUERADE + FORWARD rules so the SITL subnet can
reach the wider host network / internet via NAT. The matching `down`
action undoes exactly what `up` put in place, using a small state file
in /tmp to remember the outbound interface and the previous
net.ipv4.ip_forward setting. Tools/scripts/Networking/README.md
documents the usage and customisation knobs.

    Tools/scripts/Networking/sitl_network.sh up     # create TAP + NAT
    sim_vehicle.py -v Plane -f quadplane-PPP
    curl http://10.77.193.20/                       # PPPGW web UI
    Tools/scripts/Networking/sitl_network.sh down

The backend's init falls back to a "PPPGW-only, no host bridge" mode
if the TAP device is not pre-created (TUNSETIFF returns EPERM): it
seeds activeSettings from the user-configured IP params and prints a
one-line warning. That way the same hwdef works in autotest (which
runs without root and without sitl_network.sh) and in developer
sessions (which run it).

Gated by AP_NETWORKING_BACKEND_SITL_TUN (default 0); turned on in a
per-board hwdef when wanted. AP_NETWORKING_NEED_LWIP is widened to
include this backend so the lwIP sources get pulled into the build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 17:08:34 +10:00
Andrew TridgellandClaude Opus 4.7 3ad3bb46ff AP_HAL_SITL: add sitl_periph_PPP PPPGW build target
New SITL AP_Periph board modelled on the ChibiOS PPPGW boards (eg
Pixhawk6X-PPPGW), with the PPP networking backend, scripting, and a
ROMFS-embedded copy of the pppgw_webui.lua web interface from
Tools/AP_Periph/Web. Intended for end-to-end PPP testing between two
ArduPilot SITL processes and for exercising the PPPGW web server in
SITL.

The hwdef:
 - enables AP_PERIPH_NETWORKING_ENABLED, AP_NETWORKING_BACKEND_PPP and
   AP_NETWORKING_CAN_MCAST_ENABLED;
 - points NET_PPP_PORT at serial 1 so the periph can be wired to the
   plane SITL via --serial1=tcpclient:127.0.0.1:<port>;
 - enables AP_SCRIPTING + AP_FILESYSTEM_ROMFS + AP_PARAM_DYNAMIC, and
   embeds Tools/AP_Periph/Web/ via ROMFS_DIRECTORY;
 - disables Lua bindings whose backing libraries AP_Periph does not link
   (AP_Vehicle/AC_Fence/AP_Button/AP_Camera/AP_Mount/AP_OpticalFlow/
   AP_VisualOdom/AP_Frsky_Telem/AP_Arming/RC_Channel). ChibiOS periph
   builds handle this via defaults_periph.h; SITL periph has no
   equivalent so we list the gates inline.

ROMFS support for SITL hwdefs (the ROMFS / ROMFS_WILDCARD /
ROMFS_DIRECTORY keywords) is added to sitl_hwdef.py, modelled on the
ChibiOS hwdef parser. Files are published via env_vars['ROMFS_FILES']
and picked up by the existing waf embed_ROMFS_files step in boards.py.

A new sitl_periph_PPP-specific defaults file
(Tools/autotest/default_params/periph-ppp.parm) holds runtime overrides
that should always apply to this build: NET_PPP_BAUD=921600 (saner
than the 12.5Mbaud real-hardware default for the loopback-TCP
transport), and SCR_ENABLE=1 so the web interface script comes up at
boot.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 17:08:34 +10:00
Andy Piper d9b30d1010 scripts: add build option for EKF bootstrap reset
Add AP_AHRS_EKF_RESET_ENABLED to the custom build server so the
EKF bootstrap reset aux function can be compiled out on
flash-constrained boards. Enabled by default, depends on EKF3.
2026-05-13 18:04:37 +01:00
Peter Barker e69c03557c Tools: do not work with AP_PERIPH_ defines on non-periph boards 2026-05-06 17:48:58 +10:00
Peter Barker bbed8c1333 Tools: allow support for MAV_CMD_GET_HOME_POSITION to be compiled out
superseded by MAV_CMD_REQUEST_MESSAGE
2026-05-06 17:47:25 +10:00
Peter Barker 9c142a4c18 Tools: remove rallypoint/fencepoint protocols 2026-04-30 19:52:50 +10:00
Peter Barker c9c9ff2984 Tools: test_new_boards.py: prevent bad lines in defaults.parm
where we have the ability to set a default using a define in the hwdef we should.
2026-04-28 07:47:26 +10:00
cuav-chen2 84f74fc0d7 Tools: Scripts: Decode devid: add ADIS16607 2026-04-27 10:24:51 +10:00
Peter Barker fbc82ee347 Tools: convert to hwdef system 2026-04-21 10:06:15 +10:00
Peter Barker df9dd14608 Tools: understand markdown code guards when looking for underlines
this was marking code included within blocks (```) as having heading underlines.  Which we shouldn't do inside fenced code blocks.
2026-04-20 19:25:51 +10:00
Peter BarkerandClaude Sonnet 4.6 fe2e31fe30 Tools: extend RST markup check to catch :ref: cross-references
Widen check_markdown_rst_hyperlinks to also flag RST cross-references
(:[a-z]+:`...`) alongside the existing RST external hyperlink check.
Rename the pass message to "RST-style markup" to reflect the broader
scope.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 21:29:44 +10:00
Peter BarkerandClaude Sonnet 4.6 e5cf41a864 Tools: fix checking for rst-style links in markdown files
Fix `text <url>`_ (single-underscore RST named hyperlinks) missed by
the earlier pass, which only converted the double-underscore anonymous
form `text <url>`__. Affected files fell into two groups:

- Files already on this branch (BROTHERHOBBYF405v3, ZeroOneX6,
  ZeroOneX6_Air, SDMODELH7V2, TBS_LUCID_H7_WING, TBS_LUCID_H7_WING_AIO,
  PixSurveyA2-IND): the conversion script regex only matched `__`.

- Files not yet touched by this branch (PixPilot-C3, PixPilot-V3,
  PixPilot-V6, PixPilot-V6PRO, PixSurveyA1-IND): never processed as
  they were not in the branch diff at the time.

Also extend check_branch_conventions.py to catch both `_` and `__`
variants using `__\?` (making the second underscore optional).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 08:08:51 +10:00
Peter BarkerandClaude Sonnet 4.6 9322273615 Tools/scripts: check_branch_conventions: detect RST-style hyperlinks in markdown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 10:27:47 +10:00
Christian Clauss 0b863c87e7 Tools: Raise Artistic Style errors in CI 2026-04-15 18:39:26 +10:00
Peter BarkerandClaude Sonnet 4.6 514280962e Tools/scripts: check_branch_conventions: detect setext/RST underline headings in markdown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 15:42:48 +10:00
Peter BarkerandClaude Sonnet 4.6 510556e359 CI: check submodule references exist in the submodule repo
For each commit on the branch that modifies a submodule reference,
verify that the referenced SHA exists in the local submodule via
`git cat-file -e <sha>^{commit}`.  Submodule directories that are
not initialised are skipped with a warning.

This catches cases where a branch points a submodule at a SHA that
lives only in a private fork and would therefore fail when GitHub
Actions tries to fetch it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 11:15:21 +10:00
Christian Clauss 80b2e39b16 Tools: Run shellcheck in GitHub Actions CI 2026-04-11 13:07:05 +10:00
Norihiko Itou db3db56079 AP_InertialSensor: add STM's ASM330LHH
Apply review
2026-04-07 20:03:04 +09:00
Randy Mackay 01f4f030ba Tools: extract features fix for batt watt max 2026-04-07 20:02:09 +09:00
Peter BarkerandClaude Sonnet 4.6 0a2e614ed0 Tools: check_branch_conventions: check submodule updates are isolated
Any commit that updates a submodule pointer must contain no other
changed paths — no other files, no other submodules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 10:36:08 +10:00
Thomas Watson dd9bd7a08a Tools: fix build_bootloaders debug symbol flag
The debug flag, contrary to its documentation, enables a debug build,
increasing the size of the binary and changing its contents. Fix the
documentation to describe what it actually does.

Then add the same flag as waf to just add symbols without changing the
actual binary.
2026-04-04 14:34:44 -05:00
Brown dd8a3ddf3b AP_InertialSensor: add LSM6DSV driver
Add driver for the ST LSM6DSV16X 6-axis IMU with support for:
- WHOAMI-based chip detection (Invensensev3-style check_whoami)
- HAODR mode-1 for high-accuracy ODR (1000-8000 Hz)
- continuous FIFO burst reads
- fast sampling via INS_FAST_SAMPLE / INS_GYRO_RATE
- accelerometer second-stage LPF2
2026-04-01 19:03:47 +11:00
Henry Wurzburg 55bbd39946 Tools: build server support for throw mode 2026-04-01 08:46:32 +11:00
Peter Barker bf667e0fa3 Tools: build_binaries.py: remove pointless read_string_from_filepath wrapper
predates the pathlib methods

... also the unused string_in_filepath method
2026-04-01 08:42:11 +11:00
Peter Barker 0a62cb443d Tools: use pathlib.Path for reading entire files 2026-03-30 10:35:51 +11:00
Christian Clauss 92643e1eb1 Tools: Use with open() as to close file handles 2026-03-27 12:21:12 +11:00
Randy Mackay 2fbb90c8aa Tools: signing README wording improvements 2026-03-26 20:40:42 +09:00
Randy Mackay 7b41c5e9d3 Tools: signing README fixes 2026-03-26 20:40:42 +09:00
Christian Clauss bd8b1b5c36 Tools: Use dict.item() to get both keys and values 2026-03-25 20:06:49 +11:00
Peter Barker f3b510026c Tools: scripts: add option to show differences in size_compare_differences.py 2026-03-25 18:32:59 +11:00
Thomas Watson 2d14165ec5 Tools: remove now-unnecessary Python future dependency
Neither we nor our dependencies need it anymore.
2026-03-24 09:33:17 -05:00
Peter Barker 2147e4e534 Tools: check_branch_conventions.py: sanity check author emails on commits 2026-03-24 11:38:55 +11:00
Peter Barker bc1aa19b28 Tools: avoid errors for catching bare exception 2026-03-23 08:14:01 +11:00
Christian Clauss a7aabe4d5b Tools: Fix ruff rule E402 Module level import not at top of file 2026-03-21 17:27:49 +11:00
Peter BarkerandClaude Sonnet 4.6 eac402aa58 Tools: check_branch_conventions: reject blacklisted subsystem prefixes
Adds check_good_commit_subsystem() which fails if any commit in the PR
uses a prefix from BLACKLISTED_PREFIXES (currently just "DEBUG").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 09:10:05 +11:00
Christian Clauss 54e17cb60e Tools: sort Python imports 2026-03-20 09:33:39 +11:00
Magnus Lindhé 7d646c5777 Tools: Add ArduPlane tests for Kebni SensAItion
- One test in IMU mode and one in INS mode.
- Also add build option to enable SensAItion as External AHRS
- Also adapt to updated AHRS_OPTIONS definition
2026-03-20 09:32:48 +11:00
Peter Barker 69774359ab Tools: correct feature extraction for compasses
read was removed from many backends; choose a different symbol for determining presence of driver
2026-03-18 18:34:13 +11:00
Peter Barker 09964a4ebe Tools: correct Python import lines for ruff correctness 2026-03-14 20:08:01 +11:00
Peter Barker 37d309e174 Tools: correct noqa annotations 2026-03-14 20:08:01 +11:00
Peter Barker 8aaa8be1ba Tools: add and use check_branch_conventions.py
allows for more elaborate checks, and for people to check things locally before PRing
2026-03-11 18:28:39 +11:00
rishabsingh3003 33add14f28 Tools: AP_AVOIDANCE_ALTHOLD_ENABLED define for AltHold avoidance 2026-03-05 08:50:35 +09:00
Peter Barker 7fcbfddfed Tools: add size_history.py - a tool to visualize size changes over time
Quick-and-dirty, but functional.
2026-03-04 18:16:58 +11:00
Yves be90f6185a Tools: Scripts: add DTS6012M to build options 2026-02-27 12:43:42 +11:00