Commit Graph

3752 Commits

Author SHA1 Message Date
Peter Barker
d92acaffce autotest: improve diagnostics around expected statustext 2024-02-23 20:13:29 +11:00
Peter Barker
21a01c5587 AP_GPS: remove dead GPS_MINDGPS variable 2024-02-22 14:41:29 +11:00
Peter Barker
e72a39353e default_params: rename vee-gull parameters to remove space 2024-02-22 14:41:29 +11:00
Clyde McQueen
f9db039dcc Sub: add SURFTRAK mode 2024-02-21 18:59:20 -03:00
Dr.-Ing. Amilcar do Carmo Lucas
b6b4c972f9 Tools: Script to fetch online ArduPilot parameter documentation (if not cached) and
add it to the specified file or to all *.param and *.parm files in the specified directory.

1. Checks if a local cache of the XML file exists in the target directory or on the directory of the target file:
 - If it does, the script loads the file content.
 - If it doesn't, the script sends a GET request to the URL to fetch the XML data for the requested vehicle type.
2. Parses the XML data and creates a dictionary of parameter documentation.
3. DELETES all comments that start at the beginning of a line
4. Adds the parameter documentation to the target file or to all *.param,*.parm files in the target directory.

Supports AP_Periph, AntennaTracker, ArduCopter, ArduPlane, ArduSub, Blimp, Heli, Rover and SITL vehicle types
Supports both Mission Planner and MAVProxy file formats
Supports sorting the parameters
Has unit tests with 88% coverage

AP_FLAKE8_CLEAN

Author: Amilcar do Carmo Lucas, IAV GmbH

# Conflicts:
#	.github/workflows/test_unit_tests.yml
2024-02-22 08:31:57 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
74640c9e65 Tools: Extracts parameter default values from an ArduPilot .bin file.
Supports Mission Planner, MAVProxy and QGCS file format output

Contains unittests with 95% coverage

Amilcar do Carmo Lucas, IAV GmbH
2024-02-21 18:24:16 +11:00
Peter Barker
e4fc55f282 autotest: add test that tracker can use moving baseline yaw 2024-02-21 16:56:25 +11:00
Peter Barker
56a73dedae autotest: adjust tests for new GPS messages 2024-02-20 19:35:01 +11:00
Andrew Tridgell
e9c59bf3ae autotest: fixed the 'X' frame 2024-02-19 14:30:13 +11:00
Andrew Tridgell
1d08662c72 autotest: fixed parameters for tilt quadplanes
and enable autotest of the disabled tilt quadplane frames
2024-02-18 16:28:43 +11:00
Richard Marko
04b46678a4 treewide: fix shebangs - /bin/bash -> /usr/bin/env bash
Most scripts/tools use non-portable `/bin/bash`, switch
to environment agnostic `/usr/bin/env bash`.
2024-02-13 11:36:23 +11:00
Peter Barker
e59d432281 autotest: change default board for test_build_options
rather more rpresentative of what people are likely to compile for
2024-02-11 11:04:38 +11:00
Peter Barker
81f2e15f8b Tools: add Gundaroo oval testing location 2024-02-10 20:56:09 +11:00
Peter Barker
0eb73c1db2 autotest: only check for PitotBlockage once vehicle is loitering
vehicle should be a in a steady state before we make the ratio change to synthesise a pitot blockage.

Otherwise, changes to the shape of the takeoff will affect the heuristics used to detect pitot blockage.
2024-02-10 20:56:00 +11:00
Peter Barker
ecae3a462c Tools: param_parse.py: correct extraction of enum class in nested classes
It was putting AP_HAL::AnalogIn::PowerStatusFlag in AP_HAL::AnalogIn
2024-02-06 11:13:14 +11:00
Peter Barker
d4cbb54e35 autotest: tidy setting of board type
splitting the string isn't pretty - just set two variables.
2024-01-24 18:42:18 +11:00
J.R. Bronkar
3a3f4ea446 autotest: Fractional Loiter Turn Test 2024-01-22 20:27:20 -08:00
Andrew Tridgell
1341abc6b4 Tools: fixed name of pitch limit parameters 2024-01-23 15:00:30 +11:00
Andrew Tridgell
7de56d434c Tools: fixed parameter names 2024-01-23 15:00:30 +11:00
Andrew Tridgell
eb492bd0aa autotest: fixed quadplane test 2024-01-23 15:00:30 +11:00
Andrew Tridgell
af420746ee Tools: param file TRIM_PITCH_DEG to PTCH_TRIM_DEG 2024-01-23 15:00:30 +11:00
Andrew Tridgell
2f5cb42030 Tools: convert param files for LAND_PITCH_DEG 2024-01-23 15:00:30 +11:00
Andrew Tridgell
7a57ac640f Tools: convert param files LIM_ROLL_CD -> ROLL_LIMIT_DEG 2024-01-23 15:00:30 +11:00
Andrew Tridgell
badf8fabdd Tools: convert param files for pitch limits 2024-01-23 15:00:30 +11:00
Andrew Tridgell
a06b2d7328 Tools: param rename for CRUISE_ALT_FLOOR 2024-01-23 15:00:30 +11:00
Andrew Tridgell
e0cd06cc83 Tools: fixed name of TRIM_PITCH_DEG 2024-01-23 15:00:30 +11:00
Andrew Tridgell
286f6887bd Tools: convert ALT_HOLD_RTL and ALT_HOLD_FBWCM 2024-01-23 15:00:30 +11:00
Andrew Tridgell
863f25e645 Tools: convert ARSPD_FBW_MIN/MAX to AIRSPEED_MIN and AIRSPEED_MAX 2024-01-23 15:00:30 +11:00
Andrew Tridgell
4fea71246d Tools: change TRIM_ARSPD_CM to AIRSPEED_CRUISE 2024-01-23 15:00:30 +11:00
Tim Tuxworth
afc093a9b2 autotest: change default params from TRIM_PITCH_CD to TRIM_PITCH_DEG 2024-01-23 15:00:30 +11:00
Simon Hancock
098a53e318 Tools: Updates to log message units and help text
parse.py: Remove lone bullet points rendered on replay messages
enum_parse.py: Tweak regex on enum parser to handle comments like: "FRED = 10, ///< text"
2024-01-21 14:26:54 +11:00
Peter Barker
a1fe322f46 Tools: param_parse.py: stop emitting field text in JSON output 2024-01-17 18:33:25 +11:00
Peter Barker
e7cd43ad86 Tools: param_parse.py: sort RCn_OPTIONS progamatically 2024-01-17 18:33:25 +11:00
Peter Barker
0b7f6c90e5 autotest: stop testing embedded param parser
we're moving to ROMFS defaults files
2024-01-17 18:28:48 +11:00
Peter Barker
51ed5b8dd9 Tools: param_parse.py: remove xmlemit_mp
this was used for a while to create xml files suitable for MissionPlanner toconsume.  MissionPlanner now uses apm.pdef.xml
2024-01-17 14:10:01 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
2564ca03e2 Tools: Spell correction 2024-01-17 08:40:15 +09:00
Peter Barker
a77df87b01 Tools: rename sim_periph_gps to sim_gps_universal, recreate sim_periph_gps 2024-01-16 12:16:35 +11:00
Simon Hancock
c0a503d74d autotest: Provide format and unit/multiplier info for log messages
Definitions of each character are extracted from LogStructure.h
Data is extracted by parsing the logging definition struct
Also parse WriteMessage() calls for messages not defined in struct
Add support to separate log descriptions for messages with same field list
Compute derived unit from combination of format, unit and multiplier
For XML output the format and derived unit into new attributes
Add enumerations to the XML output (bitmasks were already done)
For MD,RST,HTML, output either derived unit, 'char[n]', 'bitmask' or 'enum'
Fix support for Blimp by adding it to the parse_enum.py lookup table
2024-01-16 11:24:34 +11:00
Andrew Tridgell
7e5e55a97b autotest: fix for flapping multicast log download test
we had two ports outputting to 14550 which could cause the test to be
very slow
2024-01-10 18:07:29 +11:00
Peter Barker
5acf58c310 autotest: add test for receiving base messages 2024-01-07 13:04:03 -08:00
David Buzz
977b5dfe33 Tools: DynamicRpmNotches is mostly within 5% but 10% prevents the test from flapping as much 2024-01-07 10:32:47 +11:00
Peter Barker
2cfbd25988 Tools: improve diagnostics from failed check_replay 2024-01-05 10:12:18 +11:00
Andrew Tridgell
f8c3b494d1 autotest: fixed missing Blimp for enum parsing 2024-01-05 09:33:31 +11:00
Peter Barker
18adc77979 autotest: add flight test for OpticalFlow 2024-01-04 20:48:46 +11:00
Peter Barker
24f7ff7b61 autotest: Use contexts to control script lifetimes in networking tests
this way if the test gets an exception part-way through the scripts are removed from the directories appropriately
2024-01-03 17:36:10 +11:00
Andrew Tridgell
60bfcf3cdc autotest: added a web server test
both native sockets and PPP
2024-01-03 12:14:47 +11:00
Andrew Tridgell
799b01c6c6 Tools: added --enable-ppp to sim_vehicle.py 2024-01-03 12:14:47 +11:00
Andrew Tridgell
816e3fae3e autotest: fixed flapping sub log download test
the log being downloaded can be very large, and times out. Setting
LOG_DISARMED=1 gives us a small log to download
2024-01-02 11:34:12 +11:00
Peter Mullen
948ee94cee Tools/autotest: Add LUA interface to access Range Finder state 2024-01-02 11:31:02 +11:00
Andrew Tridgell
f5bc7f02a8 Tools: changed to --enable-fgview 2024-01-02 08:12:37 +11:00
Michael du Breuil
a45353b17f autotest: Update tests for relay 2023-12-19 10:01:01 +11:00
Thomas Watson
de5b46e028 Tools: remove references to legacy UART order
Also delete some unused variables and update the completions.
2023-12-19 06:53:15 +11:00
Andrew Tridgell
59ec0a6b56 Tools: added test for InertialLabs EAHRS 2023-12-17 09:47:30 +11:00
Andrew Tridgell
75fca4c171 Tools: fixed AerobaticsScripting test
we no longer allow open() on directories so that we match ChibiOS
FATFS
2023-12-11 18:00:38 +11:00
Randy Mackay
fdb1c26ae8 Tools: copter do-change-speed autotest checks takeoff 2023-12-06 08:44:52 +09:00
Peter Barker
59badf6947 autotest: fix message_has_field_values for strings 2023-12-05 20:15:21 +11:00
Peter Barker
7bd2e728f3 autotest: tidy Rover Scripting test 2023-12-05 20:15:21 +11:00
Ryan Friedman
bcd11701fa Tools: Add MicroStrain7 support
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-12-05 11:09:22 +11:00
Bob Long
49dea0bd2e autotest: add DCM climb rate test for quadplanes 2023-12-05 10:44:37 +11:00
Tom Pittenger
5bc3830451 autotest: don't set DHCP in SITL/CI because we can't 2023-12-02 08:17:52 +11:00
Clyde McQueen
ce824b725d Sub: copy 4.1 parm defaults 2023-11-29 22:13:02 -03:00
Tom Pittenger
2650137e8c Tools: fix AP_Periph param docs generator 2023-11-29 12:11:14 +11:00
Andrew Tridgell
afe0b849b9 Tools: test all 4 network port types 2023-11-28 12:18:55 +11:00
Gone4Dirt
1355c60daf autotest: Test both telemetry protocols for IE24 fuel cell 2023-11-28 11:27:14 +11:00
Peter Barker
aa9bbd0fcb waf: invert ekf2-disable command-line option 2023-11-27 09:05:08 +11:00
Andrew Tridgell
afc112295c Tools: allow networking in SITL periph 2023-11-26 11:28:57 +11:00
Ryan Friedman
07cfd14828 Tools: remove enable-networking
* This flag was already removed, but the flags were left around

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-26 10:36:20 +11:00
Ryan Friedman
ea237724c7 Tools: autotest: Fix junit printing for double str
* Can't concetenate a double to a string without fstring or a type
  change

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-24 18:08:53 +11:00
Peter Barker
a8e2908e8b autotest: build AP_Periph parameters in autotest 2023-11-23 12:17:49 -08:00
Peter Barker
4fd54dccaf autotest: correct python function typing bug around Dict vs dict 2023-11-23 10:02:26 +11:00
Pierre Kancir
8cd91b4789 Tools: add more tests for log downloads 2023-11-22 18:35:21 +11:00
Pierre Kancir
92c338f5d4 Tools: fix junit report and add firmware version on report 2023-11-22 18:32:19 +11:00
Pierre Kancir
c1c730a9bb Tools: fix flake8 issue 2023-11-22 18:32:19 +11:00
Pierre Kancir
3d379c2b07 Tools: add junit output for autotest 2023-11-22 18:32:19 +11:00
Andrew Tridgell
d23c633b2c Tools: added a test for serial over CAN
download a log with mavproxy from a serial over CAN port which then
comes out as UDP
2023-11-22 17:19:12 +11:00
Andy Piper
942be4f2f8 autotest: update PIDNotches to use AP_Filter format 2023-11-21 13:26:23 +11:00
Andy Piper
61e91dde35 autotest: add PID notches test 2023-11-21 13:26:23 +11:00
Andrew Tridgell
f175cb19a1 Tools: added autotest for networking over UDP
downloads a log with mavlink over UDP from NET_P1 port
2023-11-17 10:54:24 -08:00
Andrew Tridgell
7024f4d22a Tools: change to --disable-networking for SITL 2023-11-17 10:54:24 -08:00
Andrew Tridgell
d625a1b13b Tools: fixed EFI test suite disarm 2023-11-17 13:09:02 +11:00
Andrew Tridgell
6b2fe38ce8 Tools: fixed fuel flow EFI test 2023-11-17 13:09:02 +11:00
Peter Barker
6c0d540afe autotest: add simulator Hirth EFI 2023-11-17 13:09:02 +11:00
Ryan Friedman
ec2b47ba59 Tools: ros2: Enable networking when needed
* DDS was built without networking so UDP stopped working
* Networking is automatically added when you want network tests
* --enable-networking should only be on sitl

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-15 21:30:27 -08:00
Tom Pittenger
ba2cbbcebf Tools/autotest: fix whitespace in sim_vehicle.py 2023-11-15 12:43:41 -08:00
Andrew Tridgell
bbe7ad484e Tools: added --enable-networking and --enable-networking-tests to sim_vehicle.py 2023-11-15 12:43:41 -08:00
Ryan Friedman
c4e2c4f7cb Tools: Expect different GSOF detection string
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-14 10:26:01 +11:00
Nick Exton
55d7965379 autotest: Rover: fix return type for invalid DO_SET_MISSION_CURRENT 2023-11-14 10:22:45 +11:00
Nick Exton
64e6a85e4b autotest: Test when invalid tag is selected via DO_JUMP_TAG 2023-11-14 10:22:45 +11:00
Nick Exton
b96acbc97e autotest: Test when invalid item is selected via DO_SET_MISSION_CURRENT 2023-11-14 10:22:45 +11:00
Nick Exton
e2e05af914 autotest: Add test for handling of param2 (reset) of DO_SET_MISSION_CURRENT 2023-11-14 10:22:45 +11:00
Peter Barker
0143bf22d4 autotest: understand verbose and very_vrbose for wait_message_field_values 2023-11-12 08:19:49 +11:00
Peter Barker
8d03d7e15d autotest: test gripper as both long and int
... and make use of context_collect for statustext
2023-11-08 18:15:25 +11:00
Peter Barker
b69879fe87 autotest: add test for battery reset 2023-11-08 18:14:27 +11:00
Peter Barker
387aa63b90 Tools: handle MAV_CMD_DO_SPRAYER as both long and int 2023-11-07 10:55:46 +11:00
Andrew Tridgell
78ae42c45f Tools: added Web Tools landing page 2023-11-06 10:33:24 +11:00
Peter Barker
0e2261832e autotest: more test for emitted digicam command-long messages 2023-11-02 15:54:13 +11:00
Peter Barker
dc824506ae autotest: add test for correct response to pressure calibration when no airspeed 2023-11-02 15:52:30 +11:00
Willian Galvani
40cdb5d01e Autotest: improve flapping Sub test 2023-11-01 20:43:38 +11:00
Peter Barker
6439528d6a autotest: augment tests for running the prearm checks 2023-11-01 19:30:44 +11:00
Iampete1
9ed5dfc768 Tools: autotest: Plane: TerrainRally: test terrain alt frame on rally point 2023-11-01 19:06:39 +11:00
Randy Mackay
24db18db32 Tools: correct copter mount test 2023-11-01 18:16:55 +11:00
Peter Barker
29f5bce611 autotest: tidy testing of SentToComponents 2023-11-01 12:32:47 +11:00
Peter Barker
a53d583963 autotest: assert_received_message_values gets timeout and check_context 2023-11-01 12:32:47 +11:00
Iampete1
220ab515b7 autotest: plane: add MAV_CMD_NAV_ALTITUDE_WAIT wiggle check 2023-10-31 14:06:22 +11:00
Willian Galvani
24bed08c4e Tools: Autotest: fix and re-enable Subs's MAV_CMD_DO_CHANGE_SPEED test 2023-10-31 09:23:26 +11:00
Nick Exton
f6a2f2e535 autotest: Add Copter test to verify clearing ROIs 2023-10-30 08:28:23 +09:00
Peter Barker
a8bd417527 autotest: cope with rename of AutoTest to Testsuite 2023-10-27 14:17:09 +11:00
Peter Barker
00bbb61411 autotest: rename common.py to vehicle_test_suite.py 2023-10-27 14:17:09 +11:00
Peter Barker
e110ee5537 autotest: stop using removed MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS 2023-10-26 13:19:59 +11:00
Peter Barker
5e55e143cc autotest: test MAV_CMD_CONTROL_HIGH_LATENCY as both long and int 2023-10-26 13:19:29 +11:00
Peter Barker
73be6c55f7 Tools: add Sagetech MXS simulator 2023-10-25 20:06:47 +11:00
Peter Barker
f9165c786d autotest: add test for Copter taking off above-home via command int 2023-10-24 12:59:19 +11:00
Peter Barker
7de20c09f2 autotest: test MAV_CMD_NAV_TAKEOFF on Copter 2023-10-24 12:59:19 +11:00
Peter Barker
c3c7784c23 autotest: add explicit tes for MAV_CMD_DO_FENCE_ENABLE 2023-10-24 11:37:18 +11:00
Peter Barker
c65675a64d autotest: add an epsilon kwarg for assert_parameter_values
... and reimplement assert_parameter_vaue in terms of that function
2023-10-20 17:59:05 +11:00
Peter Barker
091c315fa4 autotest: add a test for quadplane Q_GUIDED_MODE 2023-10-19 09:16:45 +11:00
Peter Barker
0e458f3342 autotest: test DO_SEND_BANNER as both long and int 2023-10-18 19:49:17 +11:00
Peter Barker
69b4694cee autotest: allow more time for disarm on vtol-state test
right on the edge
2023-10-18 19:49:06 +11:00
Peter Barker
7e1492d2b7 autotest: add test for MAV_CMD_NAV_TAKEOFF for quadplane using command_long 2023-10-18 19:49:06 +11:00
Peter Barker
e8be3a4e21 autotest: add explicit test for MAV_CMD_GET_HOME_POSITION 2023-10-18 19:48:23 +11:00
Peter Barker
a98def0b6d autotest: add test for SET_ATTITUDE_TARGET headings 2023-10-18 11:17:32 +11:00
Peter Barker
7d9cd3c1de Tools: accept LOITER_UNLIM and RETURN_TO_LAUNCH as command_int 2023-10-17 12:58:57 +11:00
Peter Barker
aaca600a94 autotest: test setting modes via COMMAND_INT and DO_SET_MODE 2023-10-17 10:41:36 +11:00
Peter Barker
acf8162e5e autotest: correct hook removal for Copter tests
these hooks were remaining active if the test failed
2023-10-16 12:15:29 +11:00
Andrew Tridgell
823a917ae1 autotest: added Plane.TerrainRally test
reproduces the issue from
https://github.com/ArduPilot/ardupilot/issues/25157
2023-10-14 10:46:00 +11:00
Peter Barker
56e9be120a autotest: don't build examples for fmuv2
needs extra defines as we kill features from it
2023-10-11 19:09:46 +11:00
Peter Barker
c942dad35e Tools: allow Plane to run MAV_CMD_MISSION_START as long and int 2023-10-11 19:05:56 +11:00
Peter Barker
28a141b423 autotest: add autotests for MAV_CMD_SET_SOURCE_SET mavlink command 2023-10-11 18:37:02 +11:00
Peter Barker
e2531a93f2 Tools: accept MAV_CMD_CONDITION_YAW as both long and int in Sub 2023-10-10 08:32:54 +09:00
Andrew Tridgell
65099d0626 Tools: allow Ohm units in parameters 2023-10-08 11:04:21 +11:00
Peter Barker
54c5809428 Tools: add InterActTest to show interaction with automated setup 2023-10-06 13:03:53 +11:00
Peter Barker
675c6e27e9 autotest: fix interact 2023-10-06 13:03:53 +11:00
Anthony Luo
695831628a Tools: document airspeed params 2023-10-05 08:18:44 +11:00
Peter Barker
3dfd06cff2 Tools: add tests for MAV_CMD_DO_LAND_START for both int and long 2023-10-04 19:04:25 +11:00
Peter Barker
4adc3fb25f autotest: test MAV_CMD_DO_AUX_FUNCTION as both COMMAND_LONG and COMMAND_INT 2023-10-04 19:01:22 +11:00
Peter Barker
938ec84fa7 autotest: add (disabled) sub test for MAV_CMD_DO_CHANGE_SPEED
this doesn't work on master either...
2023-10-04 18:36:52 +11:00
Peter Barker
f72bfcc373 autotest: add upload_rally_points_from_locations 2023-10-03 23:55:22 +11:00
Peter Barker
41518a4fc0 autotest: add test for Sub MAV_CMD_MISSION_START 2023-10-03 23:54:40 +11:00
Peter Barker
d74947db10 Tools: handle message interval commands as both long and int 2023-10-03 10:12:21 +09:00
Andrew Tridgell
a60c449833 autotest: enable ADSB on ADSB SITL periph 2023-10-02 21:45:28 +11:00
Peter Barker
1641aa42ec autotest: add test for MAV_CMD_DO_LAND_START 2023-09-29 13:55:32 +10:00
Peter Barker
3a465829b3 Tools: accept several mode-changing commands via command_int
... as well as via command_long
2023-09-29 08:56:50 +10:00
Peter Barker
e2895c08ae autotest: rename PayLoadPlaceMission to PayloadPlaceMission 2023-09-28 17:13:38 +10:00
Peter Barker
5cb20abaa7 autotest: rename get_message_rate to measure_message_rate 2023-09-28 13:43:59 +10:00
Peter Barker
ad70237013 Tools: handle MAV_CMD_DO_FLIGHTTERMINATION as both long and int 2023-09-27 11:27:45 -07:00
Peter Barker
67b9a50153 autotest: add test for Plane do-go-around 2023-09-27 17:37:55 +10:00
Paul Riseborough
acfb5ccc05 Tools: Add test for quadplane forward motor use and pitch limiting 2023-09-27 11:43:45 +10:00
Peter Barker
fa6ec69bf1 autotest: add tests for Sub NAV_LAND and NAV_LOITER_UNLIM via mavlink 2023-09-26 11:38:28 +10:00
Peter Barker
489bb2c897 autotest: add test for MAV_CMD_AIRFRAME_CONFIGURATION 2023-09-26 11:37:42 +10:00
Peter Barker
e8792eec68 autotest: add test for enabling autotune via mavlink command 2023-09-26 11:36:57 +10:00