Exemplo n.º 1
0
 def openport_atgmCommand(self):
     if self._atgmMedia is not None:
         self._atgmMedia.release()
         self._atgmMedia = None
     self._atgmMedia = AC.SerialMedia(
         unix_path_to_port=self.atgmCommand_device_text.get(),
         baudrate=38400)
     self._atgmMedia.responseEvent += self._atgmCommandResponseRecieved
     self._atgmMedia.steps_responseEvent += self._atgm_stepsResponseRecieved
     if self._atgmMedia.is_open:
         self.atgmCommand_openPort_label.config(text="Active")
Exemplo n.º 2
0
 def openport(self):
     """
     opens serial port
     """
     self._atgmMedia = AC.SerialMedia(
         unix_path_to_port=self.device_text.get(),
         baudrate=self.baudrate.get())
     if self._atgmMedia.is_open:
         self.echoScrolledTextBox.insert('[Connected]...\n')
         self._atgmMedia.responseEvent += self._responseRecieved
     else:
         self.echoScrolledTextBox.insert('[Port not found]...\n')
     return
Exemplo n.º 3
0
 def __init__(self, port, baudrate):
     self.left_movement = ad.ATGMData()
     self.right_movement = ad.ATGMData()
     self.top_movement = ad.ATGMData()
     self.bottom_movement = ad.ATGMData()
     self._construct_calibration_packets()
     self._atgmMedia = ac.SerialMedia(port, baudrate)
     self._atgmMedia.responseEvent += self._responseHandler
     self._worldCalibThread = None
     self._scenarioCalibThread = None
     self._world_loop_stopevent = None
     self._scenario_loop_stopevent = None
     self.number_left_steps = None
     self.number_right_steps = None
     self.number_top_steps = None
     self.number_botton_steps = None