mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
autotest: augment tracker tests to cover MISSION_START and SET_SERVO
This commit is contained in:
parent
cbc0043b9b
commit
8ee773f77d
@ -116,28 +116,36 @@ class AutoTestTracker(AutoTest):
|
||||
self.set_rc(chan, pwm)
|
||||
self.wait_servo_channel_value(chan, pwm)
|
||||
|
||||
def SERVOTEST(self):
|
||||
def MAV_CMD_DO_SET_SERVO(self):
|
||||
'''Test SERVOTEST mode'''
|
||||
self.change_mode(0) # "MANUAL"
|
||||
# magically changes to SERVOTEST (3)
|
||||
for value in 1900, 1200:
|
||||
channel = 1
|
||||
self.run_cmd(
|
||||
mavutil.mavlink.MAV_CMD_DO_SET_SERVO,
|
||||
p1=channel,
|
||||
p2=value,
|
||||
timeout=1,
|
||||
)
|
||||
self.wait_servo_channel_value(channel, value)
|
||||
for value in 1300, 1670:
|
||||
channel = 2
|
||||
self.run_cmd(
|
||||
mavutil.mavlink.MAV_CMD_DO_SET_SERVO,
|
||||
p1=channel,
|
||||
p2=value,
|
||||
timeout=1,
|
||||
)
|
||||
self.wait_servo_channel_value(channel, value)
|
||||
for method in self.run_cmd, self.run_cmd_int:
|
||||
for value in 1900, 1200:
|
||||
channel = 1
|
||||
method(
|
||||
mavutil.mavlink.MAV_CMD_DO_SET_SERVO,
|
||||
p1=channel,
|
||||
p2=value,
|
||||
timeout=1,
|
||||
)
|
||||
self.wait_servo_channel_value(channel, value)
|
||||
for value in 1300, 1670:
|
||||
channel = 2
|
||||
method(
|
||||
mavutil.mavlink.MAV_CMD_DO_SET_SERVO,
|
||||
p1=channel,
|
||||
p2=value,
|
||||
timeout=1,
|
||||
)
|
||||
self.wait_servo_channel_value(channel, value)
|
||||
|
||||
def MAV_CMD_MISSION_START(self):
|
||||
'''test MAV_CMD_MISSION_START mavlink command'''
|
||||
for method in self.run_cmd, self.run_cmd_int:
|
||||
self.change_mode(0) # "MANUAL"
|
||||
method(mavutil.mavlink.MAV_CMD_MISSION_START)
|
||||
self.wait_mode("AUTO")
|
||||
|
||||
def SCAN(self):
|
||||
'''Test SCAN mode'''
|
||||
@ -166,7 +174,8 @@ class AutoTestTracker(AutoTest):
|
||||
ret.extend([
|
||||
self.GUIDED,
|
||||
self.MANUAL,
|
||||
self.SERVOTEST,
|
||||
self.MAV_CMD_DO_SET_SERVO,
|
||||
self.MAV_CMD_MISSION_START,
|
||||
self.NMEAOutput,
|
||||
self.SCAN,
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user