Commit Graph

675 Commits

Author SHA1 Message Date
Shiv Tyagi 0cae113521 autotest: reset RNGFNDx_TYPE in rangefinder driver test
We should reset RNGFNDx_TYPE after we finish testing a set of rangefinder drivers to avoid failing successive tests.
Also, we now fail prearm checks if we receive no data from RF, we need to continuously send DISTANCE_SENSOR messages through mavlink to pass those checks while trying to arm.

Co-Authored-By: Peter Barker <7077857+peterbarker@users.noreply.github.com>
2021-11-13 09:47:39 +09:00
Andy Piper 9da11cd31d autotest: set SMAX during autotune test 2021-11-11 08:13:23 +09:00
Peter Barker d0872abdf9 autotest: FETtec tests: give vehicle a chance to realise ESCs are dead
Should remove the race condition where we disable an ESC but the vehicle
doesn't realise and lets the vehicle arm.

Also, waiting this long causes the ESCs to just go missing, not give a
telemetry failure
2021-11-02 09:39:17 +11:00
Andrew Tridgell e94fdac91f Tools: rename uLanding simulation to USD1 2021-10-26 15:31:12 +11:00
Peter Barker 7f125312f3 autotest: disable flapping GroundEffectCompensation_takeOffExpected test
This test is flapping.  More often now.
2021-10-25 14:09:22 +11:00
Peter Barker 754192ff26 autotest: improve gps-for-yaw test
There are flag values in the mavlink definitions for this message, so
make sure we get something approaching the right number.
2021-10-21 12:09:21 +11:00
Peter Barker fda0d16475 autotest: correct loiter-requires-position test for new SIM_GPS simulation
sitl_gps was sending out ubx packets even if the device was supposed to
be absent, allowing the EKF to get a lag and thus allocate its buffers.

The new sim doesn't do that, so we do need to direct the EKF to not use
the GPS.
2021-10-21 12:09:21 +11:00
Peter Barker 99126d3cc7 autotest: add autotest for getting yaw from moving-baseline GPS setup 2021-10-21 08:34:36 +11:00
Peter Barker 5125874681 autotest: add some tests for running multiple GPSs 2021-10-13 18:02:16 +11:00
Iampete1 59b40a3845 Tools: autotest: copter: remove check for PWM min/max zero 2021-10-11 22:19:17 -04:00
Peter Barker d7f037e548 autotest: add test for setting streamrates from files 2021-09-30 10:31:03 +10:00
Peter Barker c372189a9d autotest: add test for EKF losing then refinding a GPS 2021-09-29 15:51:50 +10:00
Randy Mackay f606fe727a Tools: conditional-yaw test timeout increased
the request is to rotate 360deg at 10deg/sec but the timeout is only 30sec.  We need at least 36
2021-09-28 00:17:25 +09:00
Peter Barker 93e6cfef35 autotest: move helicopter tests to own file 2021-09-27 11:58:39 +10:00
Peter Barker 6ae280a5d7 autotest: test GPS input using different simulated GPSs 2021-09-25 20:48:41 +10:00
Paul Riseborough 74a7e3b64a Tools: Rework copter vibration failsafe autotest
Allow more time for descent when vibration affected.
2021-09-23 18:55:28 +10:00
Peter Barker d7a5e460cc autotest: add tests for changing WPNAV_SPEED_{UP,DN}
and slight augment for WPNAV_SPEED
2021-09-08 21:29:38 +10:00
Peter Barker d1d03319ac Tools: make heli-blade simulation work 2021-09-08 14:33:19 +10:00
Peter Barker d94191b8d8 autotest: ensure WPNAV_SPEED changes speed in flight 2021-09-07 10:04:07 +09:00
Peter Barker e5c35d399c autotest: re-enable Heli spline waypoint test
position controller has been completely rewritten, so the bug should be
gone now....
2021-09-03 12:46:33 +10:00
Peter Barker 42c2f8d9f3 Revert "Tools: comment out the FETtecESC_safety_switch() function for now because it is failing"
This reverts commit d53299ecb0.
2021-09-01 18:25:51 +10:00
Josh Henderson 695ad5b4f6 Autotest: BaroDrivers tighten leeway for pressure and temp deltas 2021-08-24 09:55:01 +10:00
Josh Henderson 70166c8173 autotest: add battery_charge_state ok & low tests 2021-08-18 15:32:28 +10:00
Peter Barker 12ac5174d7 autotest: check battery_status.charge_state is critical on failsafe 2021-08-17 14:40:55 +10:00
Dr.-Ing. Amilcar do Carmo Lucas d53299ecb0 Tools: comment out the FETtecESC_safety_switch() function for now because it is failing
I do not understand why it is failing, and failed at fixing it.
2021-08-13 16:22:37 +10:00
Peter Barker 20f58afa93 Tools: complete rewrite of the ESC-configuration state machine
Co-authored-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>

tidy message sending using templates
Calculate and enforce the minimum update period.
Disable unused features to save flash
forced time gaps between all transmits
correct ESC reset functionality
Avoid re-initialization repeatition
Make sure we stop FETtec if safety is on (ignore reverse) this reduces duplicated code
Error count calculation changed
   as the telemetry error count is absolute only the overflow status can be safed and used for the percentage calculation
Update the README to add autotests information
FETtec needs a time gap between frames
  This allows running at high fast_loop_rates
do not send fast_throttle data if a configuration command just got sent
Example parameter configuration file is for a Quadcopter with ESCs connected to Telem2
remove two FIXME
fix compilation in master
Fix the ESC not re-initializing issue.
  Now we re-init whenever we loose connection
RVMASK parameter changes only take effect when not armed
Improve documentation
Always use the same wording when referring to fast-throttle commands
fix pre-arm check message
assure the length of the memmove is positive
Set HAL_AP_FETTEC_CONFIGURE_ESCS to 0 when no ESC hardware is available and you want to test the UART send function
2021-08-13 16:22:37 +10:00
Peter Barker e263063600 autotest: a gap in the beginning of the SERVO_FTW_MASK is now allowed, test it
make sure the SERVO_FWT_MASK is valid:
  - it can have bit gaps between active channels, but channels higher than 12 are not allowed (AP_EST_TELEM limitation)
  - Explain that the FETtec ESC IDs inside the FETtec Firmware need to be contiguous and start at 1.
add tests for ESC power outages
add test that safety switch zeroes PWM for FETtec ESC
2021-08-13 16:22:37 +10:00
Peter Barker 3bc4cf710f autotest: add test for FETtecESC 2021-08-13 16:22:37 +10:00
Peter Barker abb6521127 Revert "autotest: use SIM_STATE (common.xml) instead of SIMSTATE (ardupilotmega.xml)"
This reverts commit 540a56adb8.

Polling this message caused issues on reboot - shouldn't be a problem
but is.

Retrying that showed that the Tracker GUIDED test failed reliably due to
a yaw problem.
2021-08-07 16:18:05 +10:00
Peter Barker 44d5885d99 autotest: augment blending test to ensure GPS switch events make log 2021-08-06 15:30:18 +10:00
Peter Barker 540a56adb8 autotest: use SIM_STATE (common.xml) instead of SIMSTATE (ardupilotmega.xml)
It is a useful superset
2021-08-05 18:35:11 +10:00
Peter Barker ca35d01baa autotest: move upload_simple_relhome_mission up 2021-08-05 10:38:03 +10:00
Josh Henderson 162b3b70cf Autotest: use MAV_POS_TARGET_TYPE_MASK, remove POS_TYPE_MASK_FORCE 2021-08-03 12:48:38 +10:00
Peter Barker 909decc5be autotest: move wait_attitude up to common.py 2021-07-28 17:20:28 +10:00
Paul Riseborough 7f3980c1f4 Tools: Rework Copter VibrationFailsafe test to use commanded land 2021-07-22 18:20:45 +10:00
Paul Riseborough ff1c465a17 Tools: relax navigation test accuracy 2021-07-22 18:20:45 +10:00
Peter Barker 27de0a3d23 autotest: add new Copter yaw tests 2021-07-21 17:05:01 +10:00
Peter Barker 571ae46b0f Tools: split yaw-vehicle-for-mount-roi test out 2021-07-19 18:16:13 +10:00
Peter Barker 2ae6030f0c autotest: add baro i2c drivers autotest 2021-07-14 17:46:15 +10:00
Peter Barker 14d271776e autotest: break out a fly_mission method 2021-07-14 17:46:15 +10:00
Peter Barker 53e980bada autotest: add test for two consecutive drops with no reboot 2021-07-14 16:38:36 +09:00
Pierre Kancir 8234fd4c39 Tools: autotest: add IRLock SITL test 2021-07-12 17:50:31 +10:00
Leonard Hall 33ec8b965b Tools: Autotest update guided bitbask to include acceleration 2021-07-10 20:25:05 +09:00
Andrew Tridgell 5a5018cda2 autotest: adjust test_altitude_types for small change in longitude_scale 2021-07-10 07:20:41 +10:00
Peter Barker aa27479e95 autotest: show output from Replay run 2021-07-08 16:20:12 +10:00
Siddharth Purohit 2750b361aa autotest: move to using tool instead of tools program group 2021-07-07 17:31:09 +10:00
Peter Barker df02289493 autotest: add test for two consecutive drops with no reboot 2021-07-07 12:01:07 +10:00
Randy Mackay 5ec75578ab Tools: add copter gps_glitch_loiter_test2
checks for twitches in Loiter after GPS glitch
2021-06-25 16:52:57 +09:00
Randy Mackay f3c96b438b Tools: autotest of vibration failsafe 2021-06-24 08:34:56 +10:00
Peter Barker d6f619fb1a autotest: emit 'attempt 1/3' when retrying set_parameter
Also reterm things in terms of attempts rather than retries
2021-06-24 08:30:03 +10:00