mirror of https://github.com/ArduPilot/ardupilot
autotest: test gripper as both long and int
... and make use of context_collect for statustext
This commit is contained in:
parent
abf32906d2
commit
8d03d7e15d
|
@ -10297,62 +10297,40 @@ Also, ignores heartbeats not from our target system'''
|
||||||
self.set_rc(9, 2000)
|
self.set_rc(9, 2000)
|
||||||
self.wait_text("Gripper load grabb", check_context=True)
|
self.wait_text("Gripper load grabb", check_context=True)
|
||||||
self.progress("Test gripper with Mavlink cmd")
|
self.progress("Test gripper with Mavlink cmd")
|
||||||
|
|
||||||
|
self.context_collect('STATUSTEXT')
|
||||||
self.progress("Releasing load")
|
self.progress("Releasing load")
|
||||||
self.wait_text("Gripper load releas",
|
self.run_cmd(
|
||||||
the_function=lambda: self.mav.mav.command_long_send(1,
|
mavutil.mavlink.MAV_CMD_DO_GRIPPER,
|
||||||
1,
|
p1=1,
|
||||||
mavutil.mavlink.MAV_CMD_DO_GRIPPER,
|
p2=mavutil.mavlink.GRIPPER_ACTION_RELEASE
|
||||||
0,
|
)
|
||||||
1,
|
self.wait_text("Gripper load releas", check_context=True)
|
||||||
mavutil.mavlink.GRIPPER_ACTION_RELEASE,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
))
|
|
||||||
self.progress("Grabbing load")
|
self.progress("Grabbing load")
|
||||||
self.wait_text("Gripper load grabb",
|
self.run_cmd(
|
||||||
the_function=lambda: self.mav.mav.command_long_send(1,
|
mavutil.mavlink.MAV_CMD_DO_GRIPPER,
|
||||||
1,
|
p1=1,
|
||||||
mavutil.mavlink.MAV_CMD_DO_GRIPPER,
|
p2=mavutil.mavlink.GRIPPER_ACTION_GRAB
|
||||||
0,
|
)
|
||||||
1,
|
self.wait_text("Gripper load grabb", check_context=True)
|
||||||
mavutil.mavlink.GRIPPER_ACTION_GRAB,
|
|
||||||
0,
|
self.context_clear_collection('STATUSTEXT')
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
))
|
|
||||||
self.progress("Releasing load")
|
self.progress("Releasing load")
|
||||||
self.wait_text("Gripper load releas",
|
self.run_cmd_int(
|
||||||
the_function=lambda: self.mav.mav.command_long_send(1,
|
mavutil.mavlink.MAV_CMD_DO_GRIPPER,
|
||||||
1,
|
p1=1,
|
||||||
mavutil.mavlink.MAV_CMD_DO_GRIPPER,
|
p2=mavutil.mavlink.GRIPPER_ACTION_RELEASE
|
||||||
0,
|
)
|
||||||
1,
|
self.wait_text("Gripper load releas", check_context=True)
|
||||||
mavutil.mavlink.GRIPPER_ACTION_RELEASE,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
))
|
|
||||||
self.progress("Grabbing load")
|
self.progress("Grabbing load")
|
||||||
self.wait_text("Gripper load grabb",
|
self.run_cmd_int(
|
||||||
the_function=lambda: self.mav.mav.command_long_send(1,
|
mavutil.mavlink.MAV_CMD_DO_GRIPPER,
|
||||||
1,
|
p1=1,
|
||||||
mavutil.mavlink.MAV_CMD_DO_GRIPPER,
|
p2=mavutil.mavlink.GRIPPER_ACTION_GRAB
|
||||||
0,
|
)
|
||||||
1,
|
self.wait_text("Gripper load grabb", check_context=True)
|
||||||
mavutil.mavlink.GRIPPER_ACTION_GRAB,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
))
|
|
||||||
self.context_pop()
|
self.context_pop()
|
||||||
self.reboot_sitl()
|
self.reboot_sitl()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue