Beispiel #1
0
 def _connect_to_port(self):
     try:
         return serial_communication.connect(port=self._port,
                                             baudrate=TC_BAUDRATE)
     except SerialException:
         raise SerialException("Thermocycler device not found on {}".format(
             self._port))
Beispiel #2
0
 def _connect_to_port(self, port=None):
     try:
         temp_deck = environ.get('OT_TEMP_DECK_ID', None)
         self._connection = serial_communication.connect(
             device_name=temp_deck, port=port, baudrate=TEMP_DECK_BAUDRATE)
     except SerialException:
         # if another process is using the port, pyserial raises an
         # exception that describes a "readiness to read" which is confusing
         error_msg = 'Unable to access Serial port to Temp-Deck. This is '
         error_msg += 'because another process is currently using it, or '
         error_msg += 'the Serial port is disabled on this device (OS)'
         raise SerialException(error_msg)
Beispiel #3
0
 def _connect_to_port(self, port=None):
     try:
         mag_deck = environ.get('OT_MAG_DECK_ID')
         self._connection = serial_communication.connect(
             device_name=mag_deck, port=port, baudrate=MAG_DECK_BAUDRATE)
     except SerialException:
         # if another process is using the port, pyserial raises an
         # exception that describes a "readiness to read" which is confusing
         error_msg = "Unable to access Serial port to Mag-Deck. This is"
         " because another process is currently using it, or"
         " the Serial port is disabled on this device (OS)"
         raise SerialException(error_msg)
     except TypeError:
         # This happens if there are no ttyMagDeck devices in /dev
         # For development use ENABLE_VIRTUAL_SMOOTHIE=true
         raise SerialException('No port specified')