Tools: update autotest to work with heli SITL model changes

This commit is contained in:
bnsgeyer 2023-07-07 23:47:51 -04:00 committed by Bill Geyer
parent 10f93b9e50
commit 357043f815
3 changed files with 15 additions and 8 deletions

View File

@ -1,9 +1,9 @@
FRAME_CLASS 11
ATC_ANG_PIT_P 4.5
ATC_ANG_YAW_P 4.5
ATC_RAT_PIT_D 0.0012
ATC_RAT_PIT_P 0.001
ATC_RAT_PIT_FF 0.17
ATC_RAT_PIT_D 0.0005
ATC_RAT_PIT_P 0.02
ATC_RAT_PIT_FF 0.0
ATC_RAT_YAW_D 0.0015
ATC_RAT_YAW_P 0.14685
ATC_HOVR_ROL_TRM 0

View File

@ -70,7 +70,7 @@ ATC_ACCEL_Y_MAX 60000
ATC_HOVR_ROL_TRM 320
H_COL_MAX 1740
H_COL_MIN 1460
H_COL_ANG_MAX 10
H_COL_ANG_MAX 12
H_COL_ANG_MIN -2
H_RSC_MODE 2
H_RSC_SETPOINT 66

View File

@ -303,7 +303,7 @@ class AutoTestHelicopter(AutoTestCopter):
if abs(m.relative_alt) > 100:
raise NotAchievedException("Took off prematurely")
self.progress("Pushing throttle past half-way")
self.set_rc(3, 1600)
self.set_rc(3, 1650)
self.progress("Monitoring takeoff")
self.wait_altitude(6.9, 8, relative=True)
@ -401,20 +401,27 @@ class AutoTestHelicopter(AutoTestCopter):
self.context_collect('STATUSTEXT')
self.change_mode('STABILIZE')
self.progress("Triggering manual autorotation by disabling interlock")
self.set_rc(3, 1300)
self.set_rc(3, 1000)
self.set_rc(8, 1000)
self.wait_servo_channel_value(8, 1199, timeout=3)
self.progress("channel 8 set to autorotation window")
# wait to establish autorotation
self.delay_sim_time(2)
self.set_rc(8, 2000)
self.wait_servo_channel_value(8, 1659, timeout=AROT_RAMP_TIME * 1.1)
# give time for engine to power up
self.set_rc(3, 1400)
self.delay_sim_time(2)
self.progress("in-flight power recovery")
self.set_rc(3, 1700)
self.set_rc(3, 1500)
self.delay_sim_time(5)
# initiate autorotation again
self.set_rc(3, 1200)
self.set_rc(3, 1000)
self.set_rc(8, 1000)
self.wait_statustext(r"SIM Hit ground at ([0-9.]+) m/s",