Beispiel #1
0
    def move_to(self, pan, tilt, move_type='stop'):
        self.p.parse(
            self.comms.positioner_query(pkt.set_minimum_speeds(40, 40)), self)

        if move_type == 'abs':
            coord = qi.Coordinate(pan, tilt)
            self.p.parse(
                self.comms.positioner_query(pkt.move_to_entered_coords(coord)),
                self)
        elif move_type == 'delta':
            coord = qi.Coordinate(pan, tilt)
            self.p.parse(
                self.comms.positioner_query(pkt.move_to_delta_coords(coord)),
                self)
        elif move_type == 'zero':
            self.p.parse(
                self.comms.positioner_query(pkt.move_to_absolute_zero()), self)
        else:
            self.p.parse(self.comms.positioner_query(pkt.stop()), self)

        time.sleep(.08)
        self.p.parse(self.comms.positioner_query(pkt.get_status()), self)

        while self.status_executing is True:
            self.p.parse(self.comms.positioner_query(pkt.get_status()), self)
            time.sleep(.08)

        self.p.parse(
            self.comms.positioner_query(pkt.set_minimum_speeds(8, 17)), self)
Beispiel #2
0
 def init_comms_link(self):
     tries = 0
     rx = self.positioner_query(pkt.get_status())
     while tries < self._LIMIT and rx == None:
         rx = self.positioner_query(pkt.get_status())
     if rx == None:
         return False
     else:
         return True
Beispiel #3
0
    def jog_down(self, tilt_speed, target):
        p = Parser()
        rx = self.comms.positioner_query(pkt.get_status())
        p.parse(rx, self)

        while self.curr_position.tilt_angle() > target.tilt_angle():
            rx = self.comms.positioner_query(
                pkt.jog_positioner(0, 0, tilt_speed, 0))
            p.parse(rx, self)
            time.sleep(.08)

        p.parse(self.comms.positioner_query(pkt.get_status()), self)
Beispiel #4
0
 def update_positioner_stats(self):
     self.p.parse(self.comms.positioner_query(pkt.get_status()), self)
     self.p.parse(self.comms.positioner_query(pkt.get_angle_correction()),
                  self)
     self.p.parse(self.comms.positioner_query(pkt.get_soft_limit(0)), self)
     self.p.parse(self.comms.positioner_query(pkt.get_soft_limit(1)), self)
     self.p.parse(self.comms.positioner_query(pkt.get_soft_limit(2)), self)
     self.p.parse(self.comms.positioner_query(pkt.get_soft_limit(3)), self)
     self.p.parse(self.comms.positioner_query(pkt.get_minimum_speeds()),
                  self)
     self.p.parse(
         self.comms.positioner_query(
             pkt.get_set_communication_timeout(True, 0)), self)
     self.p.parse(self.comms.positioner_query(pkt.get_maximum_speeds()),
                  self)
 def get_status(self):
     self.p.parse(self.comms.positioner_query(pkt.get_status()), self)