def gripper_is_closed(): gripper_status = Gripper.Gripper() res = Commands.read_io_signals(IO.IO(GRIPPER_ACKNOWLEDGE_SIGNAL, 1)).get_response() logging.info('Gripper ack decimal: ' + res) gripper_status.set_closed_status(res) return gripper_status.is_gripper_closed()
def read_gripper_hit(): gripper_status = Gripper.Gripper() gripper_status.set_closed_status( Commands.read_io_signals(IO.IO(GRIPPER_HIT_SIGNAL, 4))) return gripper_status
def read_gripper_closed_command_register(): gripper_status = Gripper.Gripper() gripper_status.set_closed_status( Commands.read_io_signals(IO.IO(GRIPPER_OPEN_CLOSE_SIGNAL, 4))) return gripper_status
def test_read_io_signals(self): io = IO.IO(4) res = Commands.read_io_signals(io) self.assertEqual(res.get_response(), '0')