Commit Graph

46618 Commits

Author SHA1 Message Date
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 f028747399 GCS_MAVLink: Remove todo since plane now supports MAV Protocol Capability Mission Fence 2021-03-05 16:48:57 +11:00
James O'Shannessy 198ec9a678 ArduPlane: Fix use of nullptr when AC_FENCE configured as DISABLED
Parameter upgrade needs to grab singleton as the fence library may not be built in to plane.
2021-03-05 16:48:57 +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 43e06e9040 AC_Fence: Fix int32_t overflow with large longitude values 2021-03-05 14:52:46 +11:00
James O'Shannessy 560943d6e0 ArduPlane: corrections to returning to the previous mode if fence was disabled while under action 2021-03-05 14:52:46 +11:00
James O'Shannessy 26811ad46d AP_Landing: Autoenable fence if required when landing was aborted 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 d055d7a581 ArduCopter: Cleanup - removes autoenabling of fence with AC_Fence parameter 2021-03-05 14:52:46 +11:00
James O'Shannessy 8ef68c8fb0 AC_Fence: Send text to gcs when fence is auto-enabled 2021-03-05 14:52:46 +11:00
James O'Shannessy b4bf41c6f9 AC_Fence: Adjustments to default parameters for addition to plane 2021-03-05 14:52:46 +11:00
James O'Shannessy 5dd40afe0a ArduPlane: Retrigger fence breach if mode
ArduPlane: Move auto enabling code to common fence library
2021-03-05 14:52:46 +11:00
James O'Shannessy 2c66e164d0 ArduPlane: Improvements to parameter upgrading between versions 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 f14e1c2799 ArduCopter: Ensure fence has opportunity to auto disable for landing 2021-03-05 14:52:46 +11:00
James O'Shannessy cfb648e1c5 ArduRover: Remove fence_checks in AP_Arming because they are common across all vehicles now 2021-03-05 14:52:46 +11:00
James O'Shannessy 8ab1cf869d ArduCopter: Remove fence_checks in AP_Arming because they are common across all vehicles now 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 af733b2f09 ArduPlane: Convert and remap old parameters 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 f774196b52 ArduPlane: Cleanup of unnecessary comments in fence logic 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 c316711351 ArduPlane: Add conversion from ArduPlane geofence param to AC_Fence param 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 254c28f142 AC_Fence: Improve auto enable documentation 2021-03-05 14:52:46 +11:00
James O'Shannessy a88f2721a8 ArduCopter: Use auto enable and auto disable from AC_Fence 2021-03-05 14:52:46 +11:00
James O'Shannessy 8a99d9dd00 ArduPlane: Use auto enable and auto disable from AC_Fence 2021-03-05 14:52:46 +11:00
James O'Shannessy b6d29d746b AC_Fence: Add common auto enable and auto disable 2021-03-05 14:52:46 +11:00
James O'Shannessy 2a9affe517 ArduCopter: Remove unused fence floor enable function 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
James O'Shannessy e4f1e26b5c AC_Fence: Disable fence floor when disabling the rest of the fence 2021-03-05 14:52:46 +11:00
James O'Shannessy f228adfa75 ArduCopter: Improve auto-enable/disable of fence 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
Steven Josefs c783410494 AC_Fence: adjusted AP_GROUPINFO to contain all copters 2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas 22bdc3e54c AC_Fence: extend pre-arm checks
Fix comments
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 92122e5133 Copter: automatically enable and disable floor fence on automated takeoff and landing 2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas 2e422f249a AC_Fence: small comment improvements. Do not call the same function four times 2021-03-05 14:52:46 +11:00
Dr.-Ing. Amilcar do Carmo Lucas 15e95be7d7 AC_Fence: do not delete the FENCE_ENABLE parameter. It would confuse many users.
Talked to Randy about this. The consensus was not to delete the parameter
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