Commit Graph

408 Commits

Author SHA1 Message Date
Peter Barker
43cdceba8f autotest: tweak wait_ready_to_arm 2020-08-30 08:38:35 +10:00
Peter Barker
b7641345e1 autotest: set and get parameters directly using mavlink message 2020-08-30 08:38:35 +10:00
Pierre Kancir
936511a720 Autotest: common: correct some text format 2020-08-29 10:44:19 +10:00
Pierre Kancir
5b72de25e0 Autotest: update wait_distance_to_home
Autotest: copter: allow to pass min_distance for RTL

Autotest: rover: allow to pass min distance for RTL
2020-08-29 10:44:19 +10:00
Pierre Kancir
16b499d0f6 Autotest: allow to select which GPS flags we want to wait for 2020-08-27 09:11:13 +10:00
Peter Barker
80bee19bc9 autotest: correct race condition in button test
A BUTTON_CHANGE may have been emitted after we send the parameter but before it is processed by the autopilot
2020-08-26 13:22:14 +10:00
Pierre Kancir
a181fcf8a2 Autotest: common: put generated parameter and LogMessage files into buildlogs directory 2020-08-25 20:01:27 +10:00
Peter Barker
a523868b33 autotest: fix Beacon test 2020-08-25 17:21:50 +10:00
Peter Barker
69d246d63e autotest: add test for priority-based compass reordering 2020-08-25 08:30:04 +10:00
Peter Barker
bb697dd4b9 autotest: avoid using mavproxy for testing message intervals 2020-08-24 19:33:37 +10:00
Peter Barker
00bfe04539 autotest: remove duplicate recovery code from set-message-interval test 2020-08-24 14:00:38 +10:00
Peter Barker
03d0eda7f1 autotest: use a passthrough progress function for Telem objects 2020-08-24 13:24:41 +10:00
Pierre Kancir
8b92af732a Autotest: common: add wait_heartbeat to change_mode to clean up msg and give time to status to update 2020-08-21 13:35:51 +10:00
Peter Barker
cddb5fb1cc autotest: use message hook when waiting for statustext
Eliminates a race condition when waiting for statustexts.  Getting the
current sim time slurps messages.
2020-08-21 12:26:12 +10:00
Pierre Kancir
b7f46462f8 Autotest: common: reduce timeout on ArmFeature test
This is unnessary to wait for 60s for failure, 15s is enough
2020-08-21 09:13:32 +10:00
Pierre Kancir
acc4a1db3f Autotest: remove special case for vicon and default vicon for copter to false 2020-08-17 21:17:26 +10:00
Peter Barker
82dd7ece6c autotest: fix frsky bitop on float issue
Crops up in Python 3.8:

    gpi_lat = self.tf_encode_gps_latitude(gpi.lat)
  File "/home/pbarker/rc/ardupilot/Tools/autotest/common.py", line 6183, in tf_encode_gps_latitude
    value = ((abs(lat)/100)*6) | 0x40000000
TypeError: unsupported operand type(s) for |: 'float' and 'int'
2020-08-15 10:42:47 +10:00
Pierre Kancir
388fef23d9 Autotest: common: remove use of some raw mavproxy cmd for rc 2020-08-15 09:16:24 +10:00
Pierre Kancir
30fa433faa Tools: don't add duplicate param to context 2020-08-14 18:16:47 +10:00
Mark Whitehorn
d0ff26e782 autotest: expand quadplane AirMode autotest 2020-08-13 08:47:27 +10:00
Peter Barker
b9dc7118d4 autotest: add do_timesync_roundtrip to do a timesync against SITL
On the assumption that ArduPilot processes mavlink packets
synchronously (or at least in order), after we have run a timesync
roundtrip we can reasonably expect any mavlink command we have sent
prior to the roundtrip to have been processed, and we should be able to
see the results in the mavlink stream.
2020-08-05 13:24:15 +10:00
Peter Barker
4640c24872 autotest: correct checking for no-logs string 2020-08-04 15:12:08 +10:00
Peter Barker
b2748f19f6 autotest: correct validator for Distance wait-and-maintain 2020-08-04 15:12:08 +10:00
Willian Galvani
0f992ac6a3 Autotest: add test for Sub position hold 2020-08-03 20:19:28 -07:00
Peter Barker
66ffb4a17b autotest: retry parameter fetch in MIS_TOTAL test
There's a race condition with MAVProxy; it's fetching parameters here
and seems to ignore our requests.

Also correct named parameter from retry to attempts
2020-07-24 09:38:39 +10:00
Peter Barker
ccff006517 autotest: correct time-spent-waiting-to-arm for zero case 2020-07-23 18:10:06 +10:00
Peter Barker
f1fc61cb41 autotest: improve compass test diagnostics 2020-07-23 15:11:11 +10:00
Peter Barker
b69130d352 autotest: require uptime of 5s before declaring GPS definitely not present
Until we detect a GPS we mark it as "not present", even if the
parameters say that there should be one present.
2020-07-23 11:17:42 +10:00
Peter Barker
3b0524a7e1 autotest: add diagnostics to frsky passthrough test 2020-07-21 11:26:52 +10:00
Peter Barker
4acb66cd13 autotest: correct check of frsky home-relative altitude
GLOBAL_POSITION_INT.relative_alt is in mm
2020-07-20 13:31:17 +10:00
Peter Barker
ac827cf45b autotest: allow much more time for frsky test to finish
parameters don't seem to come down very fast at all
2020-07-20 13:31:17 +10:00
Peter Barker
a49580e0af autotest: improve debug on frsky tests 2020-07-20 13:31:17 +10:00
Peter Barker
d9aa334489 autotest: ensure cached sim time moves forward in frsky test 2020-07-20 13:31:17 +10:00
Peter Barker
6eb1d289b8 autotest: add trivial test for CRSF in copter 2020-07-07 18:48:06 +10:00
Samuel Tabor
bde9ce10e3 autotest: Add wipe as argument. 2020-07-07 11:46:32 +10:00
Peter Barker
6c9d756f11 autotest: validate context nesting 2020-07-06 14:21:55 +10:00
yaapu
0cbff6ac66 Tools: autotest FRSkyPassThrough increased timeout to let the test complete 2020-07-02 21:53:06 +10:00
yaapu
75b621a09f Tools: autotest added frsky serial_protocol 4 and 10 testing against mavlink telemetry 2020-07-02 21:53:06 +10:00
Peter Barker
53b6d1a639 autotest: wait for heartbeat when opening connection
# need to wait for a heartbeat to arrive as then mavutil will
        # select the correct set of messages for us to receive in
        # self.mav.messages.  You can actually recieve messages with
        # recv_match and those will not be in self.mav.messages until
        # you do this!

Also, wait_heartbeat ignores heartbeats from e.g. MAVProxy
2020-07-01 14:38:21 +10:00
Peter Barker
3737c13784 autotest: allow message rates to be set by message name, not just ID
Simply for convenience.
2020-06-24 18:09:28 +10:00
Peter Barker
cd1198bf49 autotest: drain mav before attempting to run a command
We're losing an arbitrary amount of data while getting the ACK, so it's
fine to lose whatever is in the buffer.
2020-06-24 18:09:28 +10:00
Peter Barker
d0b97b89e7 autotest: add an assert_receive_message method 2020-06-24 18:09:28 +10:00
Peter Barker
77e5236278 autotest: drain mavlink queue to avoid failing on slow MISSION_COUNT
It was observed from a log of a failed CI test that the ACK from
clearing the rally items took 6 wallclock seconds to arrive.

We were not waiting for that ACK to arrive before sending the request
for the mission item count, but if it has taken more than six seconds
for the ACK to arrive it is reasonable to assume that MISSION_COUNT
could very well take more than the 10 seconds we allow for it.

If we drain the mav before sending the request for the mission count we
should remove any signficiant timing problem due to a backlog of mavlnk
messages, but the amount of traffic here is problematic.

Also drain in lots of other places where we might be spending way too
long parsing messages.
2020-06-11 20:53:50 +10:00
Peter Barker
dc19dfaed8 autotest: fix several race conditions in RCOverride test 2020-06-11 08:30:32 +10:00
Peter Barker
e207bbdf2a autotest: fix SYSTEM_TIME stream detection function
MAVProxy's output is read by autotest via pexpect.

SITL's output is read by MAVProxy.

If we don't read MAVProxy's stdout then it doesn't read SITL and
everything stops.

Also, since we need to drain pexpects as part of reboot, and applying
parameter files requires rebooting... we need to append the expect
objects to the global list before we apply parameter files.  So move
that call.
2020-06-10 22:00:01 +10:00
bugobliterator
0528daecd8 autotest: increase timeout for compass calibration 2020-06-08 07:25:51 +10:00
bugobliterator
a5e9da337a Tools: autotest: fix FixedYawCalibration 2020-06-05 09:38:40 +10:00
Pierre Kancir
2c7fc65fbd Tools: common.py: add generic compass calibration test 2020-06-05 09:38:40 +10:00
Pierre Kancir
b72a17533c Tools: common: add a method to try arming and wait a result 2020-06-05 09:38:40 +10:00
Pierre Kancir
59de90d97f Tools: common.py: make max_delta a paramter for verify_parameter_values 2020-06-05 09:38:40 +10:00