1689 Commits

Author SHA1 Message Date
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 Barker
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
Peter Barker
f33e6911c8 Tools: allow size_compare_branches.py to test boards with modified hwdefs 2026-02-25 18:26:41 +11:00
Peter Barker
4b31e12760 Tools: size_compare_branches.py: correct functionality when only building bootloader
if the bootloader is not already preset in Tools/AP_Bootloaders then the configure step fails.  If you are only building the bootloader this is annoying!
2026-02-24 10:44:41 +11:00
Peter Barker
b2abfedc74 Tools: board_list: set SITL toolchain to None instead of 'native'
When the hwdef explicitly sets `env TOOLCHAIN native`, board_list.py
correctly converts the toolchain to None. But when SITL boards fall
through to the default toolchain assignment, the string 'native' was
used without conversion. This caused size_compare_branches.py to try
running 'native-strip' (which doesn't exist) instead of plain 'strip'
when comparing SITL ELFs, resulting in a silently-caught
FileNotFoundError and empty output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 18:15:53 +11:00
Peter Barker
fb10968347 Tools: fix trailing punctuation in markdown headers (MD026)
makes a lot of these headings consistent with other headings at the same level in these files!
2026-02-14 12:02:51 +11:00
Peter Barker
dd9cd85948 Tools: fix stray MD040 issues
the linter is somehow missing these
2026-02-13 11:13:01 +11:00
Andrew Tridgell
fd6584ae19 Tools: CAN_playback add --nodes filter for DroneCAN source node
allows filtering playback to only send frames from specified DroneCAN
source nodes

also adds --messages, which filters playback to only send DroneCAN
message frames matching the specified 16 bit message IDs
2026-02-05 16:13:55 +11:00
Peter Barker
7ceb7c31c7 global: fix whitespace issues in markdown files
global: fix MD007 unordered list indentation in markdown files

Normalize unordered list indentation to use 2-space multiples:
- Top-level list items start at column 0
- Nested list items use 2 additional spaces per level

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

global: fix MD009 trailing whitespace in markdown files

Remove trailing whitespace from all affected markdown files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

global: fix MD010 hard tabs in markdown files

Replace hard tab characters with 4 spaces.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

global: fix MD012 multiple consecutive blank lines in markdown

Collapse multiple consecutive blank lines to single blank lines
across all markdown files (excluding vendored code).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

global: fix MD007 list indentation base level in markdown

Shift list indentation left by 2 spaces so top-level list items
start at column 0 instead of column 2.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD022 blank lines around headings in markdown

Ensure headings are surrounded by blank lines as required by
markdownlint MD022 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD032 blank lines around lists in markdown

Ensure lists are surrounded by blank lines as required by
markdownlint MD032 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD031 blank lines around code blocks in markdown

Ensure fenced code blocks are surrounded by blank lines as required
by markdownlint MD031 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD047 files should end with single newline

Ensure all markdown files end with exactly one newline character
as required by markdownlint MD047 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD023 headings must start at beginning of line

Remove leading whitespace from heading lines as required by
markdownlint MD023 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD007 remaining list indentation in markdown

Fix unordered list indentation to use correct spacing as required
by markdownlint MD007 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD030 spaces after list markers in markdown

Reduce multiple spaces after list markers to single space as
required by markdownlint MD030 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD022 blank lines around setext headings

Ensure setext-style headings (underlined with === or ---) are
surrounded by blank lines as required by markdownlint MD022 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD018 missing space after hash in headings

Add space after hash marks in atx-style headings as required by
markdownlint MD018 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD019 multiple spaces after hash in headings

Reduce multiple spaces after hash marks to single space in
atx-style headings as required by markdownlint MD019 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD012 multiple consecutive blank lines in markdown

Remove multiple consecutive blank lines and ensure files end with
exactly one newline as required by markdownlint MD012 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD023 headings with leading whitespace

Remove leading whitespace from setext-style heading text lines
as required by markdownlint MD023 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD022 blank line after heading in markdown

Add missing blank line after heading as required by markdownlint
MD022 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD009 trailing non-breaking space in markdown

Remove trailing non-breaking space (U+00A0) as required by
markdownlint MD009 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD012 remaining multiple blank lines in markdown

Remove leading blank lines and whitespace-only lines that create
multiple consecutive blank lines.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:37:38 +11:00
Peter Barker
4f4457d259 Tools: extract_features.py: correct extraction for GRF rangefinder
define and classname don't match
2026-01-30 13:01:31 +00:00
Peter Barker
39cce1eeef Tools: build_options.py: add Lightware GRF
apparently missed this when the driver was added
2026-01-30 13:01:31 +00:00
Peter Barker
378c29d657 Tools: build_options.py: add TFS20L 2026-01-30 13:01:10 +00:00
Peter Barker
25bdd6dffc Tools: add --symbols to size_compare_branches.py
just lists the symbols added or removed
2026-01-30 13:00:41 +00:00
ES-Alexander
1221ab3247 Tools: scripts: mavlink_parse: mention Blimp as an option 2026-01-27 13:39:21 +11:00
ES-Alexander
44e1581d1b Tools: scripts: mavlink_parse: add ID numbers 2026-01-27 13:39:21 +11:00
ES-Alexander
b35fcd6c5f Tools: scripts: mavlink_parse: improve robustness 2026-01-27 13:39:21 +11:00
ES-Alexander
1e728e0c52 Tools: scripts: mavlink_parse: add missing message sets
Includes "all" as a fallback for known messages that aren't used in specified ArduPilot message sets.
Also moved to importing message sets dynamically, so there's a single source of truth.
2026-01-27 13:39:21 +11:00
ES-Alexander
665481116b Tools: scripts: mavlink_parse: add rst support
ArduPilot Wiki uses reStructuredText (rst) source files, so supporting rst output is essential for this script to generate wiki files.
2026-01-27 13:39:21 +11:00
Peter Barker
767390c17c Tools: add GPS debug logging to build server 2026-01-23 09:00:33 +11:00
Henry Wurzburg
20d43a5efe Tools: add mount POI lock Aux Func/Switch 2026-01-19 18:29:05 -05:00
Peter Barker
c060e7b68d Tools: skip building arm boards when testing new boards
compiler not available on CI machine
2026-01-14 09:43:22 +11:00
Peter Barker
b1a9562d09 Tools: add boards dynamically for SITL (i.e. hwdefs) 2026-01-14 09:43:22 +11:00
Peter Barker
3801c7118a Tools: remove no-longer-required running_python3 variables
this is always true now-adays
2026-01-11 17:41:07 -06:00
Peter Barker
188049d73a Tools: use normal layout for our enable defines for piccolocan, rename to AP_ namespace 2026-01-11 17:32:48 -06:00
Randy Mackay
820efa1327 Tools: add battery bms to build server 2026-01-08 10:23:59 +09:00
Peter Barker
a627d377fd Tools: stop showing strings command in extract_features.py 2026-01-06 11:40:32 +11:00
Willian Galvani
8b779a8f3b Tools: uploader: open serial port in exclusive mode 2026-01-05 18:53:15 +11:00
bhavyasree-A8
123aa83b53 Tools: clarify Feature() column in build_options.py 2025-12-31 10:29:32 +11:00
Peter Barker
c6b5bb2ece extract_features.py: do not show commands by default
no command-line option at the moment and we don't want this stuff emitted by default anyway.
2025-12-28 19:16:16 -06:00
Peter Barker
cfac833c21 Tools: emit progress to stderr not stdout
mixing the progress with stdout is causing problems for tools trying to consume stdout:

[update.py]: feature EF: Running (arm-none-eabi-nm --demangle --print-size /home/autotest/build/tmp/binaries.build/ZeroOneX6_Air/bin/blimp) in (.) (ZeroOneX6_Air,Blimp) not in build_options.py
[update.py]: feature EF: Running (strings /home/autotest/build/tmp/binaries.build/ZeroOneX6_Air/bin/blimp) in (.) (ZeroOneX6_Air,Blimp) not in build_options.py
2025-12-28 19:16:16 -06:00
James O'Shannessy
b16db812b0 Tools: Improvements to building of signed bootloaders
Adds ability to pass --omit-ardupilot-keys to build_bootloaders.py

Adds ability to pass multiple public keys to the signing of the bootloader. This extends the functionality of the single key that was previously possible. All keys are prefixed with --signing-key and are appended to the args.signing_key array. All keys are checked for presense, and type before being used to sign the bootloader.

General tidy up of the argument parser, prints a proper description of the role of the file.
2025-12-27 12:12:56 -06:00
James O'Shannessy
92d6da4fa9 signing: Improvements to make_secure_bl and make_secure_fw
This fixes make_secure_bl writing to the incorrect file (sys.argv[1]). The resultant file was whatever argv[1] was passed in as, which could have been --omit-ardupilot-keys.

This fixes make_secure_fw not running at all because of a possible return outside of a function. Also improves argument passing so we can get ourselves a better help file.
2025-12-27 12:12:56 -06:00
Peter Barker
ac5232a71a Tools: extract_features.py: use run_program from build_script_base.py 2025-12-21 14:10:01 +11:00