Commit Graph

2462 Commits

Author SHA1 Message Date
Peter Barker 42eec13f5e autotest: adjust CAN test for lack of MAVProxy 2021-03-18 13:50:57 +11:00
Peter Barker 21c124ab47 autotest: tidy set_parameters
Remove commented code, add more to the verbose option
2021-03-18 11:29:45 +11:00
Stavros Korokithakis f6fc6d22da autotest: Fix the climb-before-turn test 2021-03-18 07:37:21 +11:00
Samuel Tabor 36428f5074 Tools: Handle repeated add-param-file arguments to sim_vehicle.py. 2021-03-17 19:43:03 +11:00
Pierre Kancir ebe841ba70 Tools: param_parse: validate empty description and fields 2021-03-17 18:54:53 +11:00
Peter Barker da52e5d08c autotest: set SYSID_MYGCS in tests which need it
This was still relying on heartbeats coming from MAVProxy.  As speedup
increased those heartbeats may not come fast enough - and they really
should be coming from autotest as that's who's doing the commanding.

autotest: set SYSID_MYGCS in AFS test

autotest: set SYSID_MYGCS before setGCSfailsafe
2021-03-17 16:02:45 +11:00
Peter Barker 216140b58d autotest: remove un-needed portion of reset_delay_item
Looks like this function evolved and this appendix remained
2021-03-17 14:17:39 +11:00
Peter Barker f7d8994ce1 autotest: move assert_mission_count up, use it 2021-03-17 00:23:05 +11:00
Peter Barker 30c9d4bcf4 autotest: remove pointless loiter switch 2021-03-16 23:33:51 +11:00
Peter Barker 0c7f3d20a4 autotest: fix attitude test
autotest: add a get_messages_frame method

Attempts to get a set of messages as close as reasonable in time.
2021-03-16 14:19:44 +11:00
Stavros Korokithakis 29043d62e9 Add FLIGHT_OPTION to climb before RTL 2021-03-16 11:58:47 +11:00
Peter Barker 4b3adb806c autotest: add test for tailsitter throttle 2021-03-16 10:41:44 +11:00
Hwurzburg d15e01d390 Plane: fix DO_CHANGE_SPEED airspeed to impact only AUTO and GUIDED modes 2021-03-16 10:09:34 +11:00
Peter Barker eb702b0f82 Tools: add support for ATTITUDE_QUATERNION 2021-03-13 09:44:12 +11:00
Peter Barker 0414929310 autotest: fix Heli spline waypoint test
Mission isn't round-tripped so make it non-strict
2021-03-13 09:35:22 +11:00
yaapu 3bfa07d35a Tools:autotest, frsky passthrough fix for long status text message test 2021-03-13 00:14:27 +11:00
bugobliterator 5074b6d336 autotest: add test case for GPS ordering
also fix flake8 issues
2021-03-12 16:32:36 +09:00
bugobliterator 48277b43e4 Tools: add autotest for checking GPS ordering 2021-03-12 16:32:36 +09:00
Peter Barker f78d7c3b25 autotest: add option to not check current wp after set_current_wp
Sometimes a waypoint is set which we'll never emit as our current
waypoint (e.g. a JUMP)
2021-03-10 09:12:39 +11:00
Peter Barker 4a251bebbd autotest: fix fly_home_land_and_disarm; wp 7 is never current wp
This is never a current waypoint, so we can't wait for it
2021-03-10 09:12:39 +11:00
Peter Barker 3ddffdab9b autotest: correct wait_current_waypoint timeout behaviour 2021-03-10 09:12:39 +11:00
Randy Mackay 78ddd0512c Tools: autotest for copter spelling fix 2021-03-09 11:49:42 +11:00
Randy Mackay 4abae23306 Tools: disable QuadPlane.GyroFFT autotest 2021-03-08 08:52:05 +09:00
Peter Barker bdeadce95b autotest: improve deadreckoning test
autotest: use location_offset rather than coordinates in Deadreckoning test
2021-03-05 21:34:58 +11:00
Peter Barker 425ab1358a autotest: tidy streamrate handling
Stop setting MAVProxy stream rates; these are neither here-nor-there now as MAVProxy will only modify its own connection's streamrates now

Stop doing the set-streamrate dance to work around MAVProxy's
set_streamrate algorithms.

Remove useless and misleading set of streamrate in Plane test; we reset
streamrates on the reboot immediately following this set.  Considering
the streamrate was never eset this was a good thing.
2021-03-05 21:34:58 +11:00
James O'Shannessy bcc0da9c47 AutoTest: Adds additional autotests to capture mode change while breached
AutoTest: Adds test for fence breach switching to guided mode when no fence return point is present. In upstream, this results in a vehicle fly-away.
2021-03-05 14:52:46 +11:00
James O'Shannessy 269fa5cbe2 AutoTest: Copter remove FENCE_AUTOENABLE tests
Addresses comments made in review, removes the FENCE_AUTOENABLE param for copter.
No param means no tests required.
2021-03-05 14:52:46 +11:00
James O'Shannessy dac5996d93 AutoTest: Fix autotest conflicts after rebase on upstream 2021-03-05 14:52:46 +11:00
James O'Shannessy e16bbe6e18 AutoTest: Ensure fence state is disabled at end of test
This appears to be another case of the fence state carrying over from one test to another. Disabling the fence at the end of the test appears to have fixed this problem
2021-03-05 14:52:46 +11:00
James O'Shannessy 31462418c6 AutoTest: Ensure Copter can RTL and Land even when Fence Floor has not been auto disabled 2021-03-05 14:52:46 +11:00
James O'Shannessy fa7be629e5 AutoTest: Make fence tests flake8 compliant 2021-03-05 14:52:46 +11:00
James O'Shannessy 01b27bdb61 AutoTest: revert change that breaks quadplane 2021-03-05 14:52:46 +11:00
James O'Shannessy 2353b55452 AutoTest: Address race conditions in changes to fence tests 2021-03-05 14:52:46 +11:00
James O'Shannessy 76a2a76b54 AutotTest: Adds autotests for Plane to test RetRally flag added to AC_Fence 2021-03-05 14:52:46 +11:00
James O'Shannessy 8545715837 AutoTest: Add Static Fence Tests for unallowed arming when breaching geofence 2021-03-05 14:52:46 +11:00
James O'Shannessy 6f7ba3b037 AutoTest: Ensure fence is disabled at end of throttle_failsafe_fence test 2021-03-05 14:52:46 +11:00
James O'Shannessy 6251b6eead AutoTest: Rebase and carry across changes from autotest 2021-03-05 14:52:46 +11:00
James O'Shannessy b2346ef6df AutoTest: Adds additional tests to ArduCopter to test autoenable and floor
Adds tests for:
* Testing auto-enable disabled (when no autoenabling of the fence is required)
* Test auto-enabled always after takeoff (when takeoff complete condition met)
* Test auto-enabled disable floor only (when land sequence begins)
* Test auto- on arm/disarm (when vehicle is armed/disarmed)
* Tests ability to land when fence is breached
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas dd5ede0fe0 autotest: small comment improvements 2021-03-05 14:52:46 +11:00
James O'Shannessy bbd606b8b5 AutoTest: Corrections to autotests 2021-03-05 14:52:46 +11:00
James O'Shannessy a3efc9ad98 AutoTest: Fix MAVlite test allowing plane fence to be enabled 2021-03-05 14:52:46 +11:00
James O'Shannessy 47e76a1807 AutoTest: Move fence enable/disable to common location 2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas 528defd560 Autotest: activate the fence via a mavlink command
This should not be required in the future, please fix this and revert this commit
2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas 8d8753b14c Autotest: fix two copter tests after parameter rename
I'm not sure if a better fix would be to remove the set_parameter() call
2021-03-05 14:52:46 +11:00
James O'Shannessy 215901be30 Autotest: Correct the logic for fence based autotest functions
Adds corrections to enabling fence using aux function.
Correctly test fences statically. Only uploaded fences can be checked using a fence file, so we check those first. Then we add steps to check tin can, max and minm all set the fence as present, as expected.
Plane will support MAV_PROTOCOL_CAPABILITY_MISSION_FENCE, so we assert that it does support it.
To test ceiling and floor, leverage some existing functions for takeoff, change altitude and land. Check for respective breach.
Add a floor breach check to copter.
2021-03-05 14:52:46 +11:00
James O'Shannessy 1a3e168ced Autotest: Fence is present, but test looking for not present
Autotest: Remove ties to mavlink FENCE_ACTION

Autotest: Add ArduPlane autotest to test ceiling and floor

Adds a test to ensure the vehicle reverts to RTL when breaching a ceiling or floor.

Autotest: Progress the test once we reach takeoff complete and fence enable

Autotest: Use RC_OPTION for Aux Switch functionality

Autotest: Enable fence last
2021-03-05 14:52:46 +11:00
Paul Riseborough d52594c576 Tools: Fix set_home autotest
Don't try to get home until EKF has passed alignment and GPs checks.
Use a more realistic lat/lon offset threshold
2021-03-05 12:10:01 +11:00
Peter Barker 4aed767fe9 autotest: add test for MAV_CMD_DO_SET_MISSION_CURRENT 2021-03-04 11:59:33 +11:00
Peter Barker a235246628 autotest: correct units in new AHRS2 test 2021-03-03 18:41:14 +11:00
Pierre Kancir ecc89411f9 Tools: put UART_chargen in skip list 2021-03-03 18:07:38 +11:00
Peter Barker b3ee5d5f59 autotest: increase verbosity in AHRS2 test 2021-03-03 16:29:33 +11:00
Randy Mackay a35a7e1523 Tools: autotest manual control test requires 12 deg
adjusted down because of lower default angle_max
2021-03-03 08:03:39 +09:00
Peter Barker 317181922c autotest: ensure we're getting vaguely sane data in AHRS2 message 2021-03-02 20:48:36 +11:00
Peter Barker cc83562add autotest: tidy fence handling 2021-03-02 16:54:06 +11:00
Peter Barker b2d4cefa85 autotest: change heli default RPM type to 10
Change default to SITL
2021-03-02 15:41:44 +11:00
Peter Barker 4d2cf8c95b AP_Frsky_SPort: correct handling of RPM sensor data
Nails support down to just two RPM sensors for the time being.

Simplifies things (there was an issue here when I corrected RPM-in-SITL)
2021-03-02 15:41:44 +11:00
Peter Barker eb499ff731 autotest: improve frsky SPort test
- reduces verbosity as we only check the remaining items when new data
received
 - reduces repoll interval and explains why we need to re-poll
2021-03-02 15:41:44 +11:00
Peter Barker 7b251b6fd4 autotest: add diagnostics for frsky tests 2021-03-02 15:41:44 +11:00
Peter Barker 2671a2f71f autotest: fix up FRSky tests for running under Valgrind 2021-03-02 15:41:44 +11:00
Peter Barker 360512f6b0 autotest: preserve commandline customisations on reboot under valgrind 2021-03-02 15:41:44 +11:00
Peter Barker fc9a93ba67 autotest: stop using mavproxy for clearing missions 2021-03-02 14:24:36 +11:00
Peter Barker 97e2596bf8 autotest: stop clearing mission at start of test
These are implicitly cleared by the framework
2021-03-02 14:24:36 +11:00
Peter Barker 973510a4ff autotest: push context after customising cmdline
doing things in the other order causes problems when running the
complete suite
2021-03-02 14:24:36 +11:00
Peter Barker 5d1e105534 autotest: allow more time for mission upload and download
We upload some rather large missions....
2021-03-02 14:24:36 +11:00
Peter Barker 10007e2e42 autotest: load missions natively rather than using MAVProxy 2021-03-02 14:24:36 +11:00
Peter Barker 993d87469c autotest: move mission upload functions from rover to common 2021-03-02 14:24:36 +11:00
Peter Barker 34a52e9cfe autotest: use wait_statustext in place of mavproxy.expect for autorotate test 2021-03-02 13:34:09 +11:00
Peter Barker 0daa1a63d3 autotest: remove pointless fetch_parameters call
And the entire method, replace with equivalent test
2021-03-01 17:27:52 +11:00
nkruzan 3e0f9ab4e7 Tools:autotest\common.py fix text typo 2021-03-01 15:15:38 +11:00
Peter Barker 61138f342a autotest: do not time out receiving of heartbeat if running gdb
pausing indefinitely when running GDB is OK.
2021-03-01 13:44:23 +11:00
Peter Barker 1f47698076 autotest: use change_mode in place of mavproxy.send 2021-03-01 13:10:09 +11:00
Peter Barker d3b3c443bc autotest: reset copter completely after autotune test 2021-02-25 10:49:58 +11:00
Peter Barker 013415eb31 autotest: make and mark arducopter.py as flake8-compliant 2021-02-24 15:10:10 +11:00
Peter Barker 79f21ed639 autotest: add test for GSF logging 2021-02-23 12:36:33 +11:00
Peter Barker 9d681eecc4 autotest: move to state outside when we leave log structure
No vertical whitespace allowed in the structures...

We concatenate all of the LogStructure files; without this we remain in
state_inside and try to parse every line in the concatenation as if it
were a log structure definition
2021-02-23 12:36:33 +11:00
Peter Barker 44ec74030e autotest: recover from flip in althold to remove stabilise throttle problem 2021-02-21 23:11:26 +11:00
Peter Barker a4a5d52c35 autotest: extend time allowed for RTL for simplemode test 2021-02-21 22:45:06 +11:00
Peter Barker 9120882e9e autotest: print name of open dataflash log when test exception caught
The stack trace is already extremely useful... but mapping back to the
relevant dataflash log is a bit of a pain.

Adding more stuff to this method in the future might be good, too.
2021-02-21 21:35:35 +11:00
Peter Barker adf44f3b2b autotest: make and declare sim_vehicle.py flake8-clean 2021-02-21 21:35:17 +11:00
Peter Barker 98451e499a autotest: make and declare balancebot flake8-clean 2021-02-21 21:35:17 +11:00
Peter Barker b5f490aff4 autotest: make fly_proximity_avoidance_test_alt_no_avoid more reliable 2021-02-21 17:44:10 +11:00
Peter Barker d4aef2dba8 autotest: stop using MAVProxy to change mode 2021-02-20 00:03:24 +11:00
Peter Barker 05c9b79a5e autotest: make and declare quadplane.py flake8-clean 2021-02-20 00:02:33 +11:00
Peter Barker c13d229877 autotest: use self.set_current_waypoint rather than "wp set" to set current wp 2021-02-19 12:25:40 +11:00
Peter Barker 148e2e751f autotest: add set_current_waypoint 2021-02-19 12:25:40 +11:00
Peter Barker b7044d3708 autotest: remove use of global expect_list 2021-02-18 18:18:30 +11:00
Peter Barker 2d17f019b6 autotest: remove pointless manipulation of expect list
start_sitl and start_mavproxy already do this stuff
2021-02-18 18:18:30 +11:00
Peter Barker dcc04ccd09 autotest: stop using MAVProxy to change modes 2021-02-18 17:38:52 +11:00
Peter Barker 2c1df16442 autotest: increase button message timeout to allow for Valgrind speed 2021-02-18 17:04:16 +11:00
Peter Barker ad06a616b8 autotest: adjust for low log transfer rate under valgrind 2021-02-18 17:04:16 +11:00
Peter Barker bcc1cb9dbb autotest: use get_parameter in place of mav's param object
This is the only place in the code that does this
2021-02-18 15:06:26 +11:00
Peter Barker b1ccf3b3f8 autotest: add test for rangefinder-based proximity avoidance enablement 2021-02-18 15:05:51 +11:00
Peter Barker 3cf1b9444f autotest: get_sim_time_cached in NMEA output test to stop losing msgs 2021-02-18 11:26:22 +11:00
Peter Barker ce61f44505 autotest: reset SITL commandline after fetching unhidden parameters
this makes a difference under Valgrind, which has to reboot slightly differently to normal SITL
2021-02-18 11:26:22 +11:00
Peter Barker e221e6ce45 autotest: flake8 compliance for ardusub.py 2021-02-18 10:43:05 +11:00
Peter Barker 628a3843b2 autotest: flake8 compliance for arduplane.py 2021-02-18 10:43:05 +11:00
Peter Barker 78aa729b90 autotest: flake8 compliance for common.py 2021-02-18 10:43:05 +11:00
Peter Barker 4c56ac7eb3 autotest: flake8 compliance for antennatracker.py 2021-02-18 10:43:05 +11:00
Peter Barker 726f54e37f autotest: flake8 compliance for rover.py 2021-02-18 10:43:05 +11:00
Peter Barker e3887c8d93 autotest: make and mark autotest.py flake8-clean 2021-02-18 10:43:05 +11:00