autotest: added CopterTailsitter test

test rearward rangefinder
This commit is contained in:
Andrew Tridgell 2024-09-09 15:48:35 +10:00
parent 83cac93e85
commit fc2f518934
2 changed files with 33 additions and 0 deletions

View File

@ -31,3 +31,17 @@ Q_A_RAT_YAW_I 0.039192
Q_A_RAT_YAW_IMAX 0.500000
Q_A_RAT_YAW_P 0.391919
Q_TRANS_DECEL 8
# setup rangefinder for tailsitter
SIM_SONAR_ROT 4
SIM_SONAR_SCALE 10
RNGFND1_TYPE 100
RNGFND1_PIN 0
RNGFND1_SCALING 10
RNGFND1_MIN_CM 10
RNGFND1_MAX_CM 5000
RNGFND1_ORIENT 12
RNGFND_LANDING 1
RNGFND_LND_ORNT 12

View File

@ -1049,6 +1049,24 @@ class AutoTestQuadPlane(vehicle_test_suite.TestSuite):
raise NotAchievedException("Changed throttle output on mode change to QHOVER")
self.disarm_vehicle()
def CopterTailsitter(self):
'''copter tailsitter test'''
self.customise_SITL_commandline(
[],
defaults_filepath=self.model_defaults_filepath('quadplane-copter_tailsitter'),
model="quadplane-copter_tailsitter",
wipe=True,
)
self.reboot_sitl()
self.wait_ready_to_arm()
self.takeoff(60, mode='GUIDED')
self.context_collect("STATUSTEXT")
self.progress("Starting QLAND")
self.change_mode("QLAND")
self.wait_statustext("Rangefinder engaged")
self.wait_disarmed(timeout=100)
def setup_ICEngine_vehicle(self):
'''restarts SITL with an IC Engine setup'''
model = "quadplane-ice"
@ -1812,6 +1830,7 @@ class AutoTestQuadPlane(vehicle_test_suite.TestSuite):
self.QAssist,
self.GyroFFT,
self.Tailsitter,
self.CopterTailsitter,
self.ICEngine,
self.ICEngineMission,
self.MAV_CMD_DO_ENGINE_CONTROL,