示例#1
0
 def restart_device(self):
     """
     Makes device restart
     :return: None
     """
     pack = ThyrCommPackage(self._address)
     pack.cmd = CMD.Device_Restart
     pack.data = 0
     log.info(f'Restarting device')
     self._write_data_transaction(pack)
示例#2
0
 def set_display_orientation(self, display_orientation):
     """
     Set the display orientation of the device NORMAL or ROTATED
     :param display_orientation: Selectable amongst Orientation.NORMAL and Orientation.ROTATED
     :return:
     """
     pack = ThyrCommPackage(self._address)
     pack.cmd = CMD.Display_Orientation
     pack.data = display_orientation
     log.info(f'Setting display orientation to {display_orientation}')
     self._write_data_transaction(pack)
示例#3
0
 def set_response_delay(self, response_delay):
     """
     Set the time delay between receiving a telegram and sending the answer.
     :param response_delay: Value range: 1 ... 99999 μs (default 5500 μs)
     :return:
     """
     pack = ThyrCommPackage(self._address)
     pack.cmd = CMD.Response_Delay
     pack.data = response_delay
     log.info(f'Setting response delay to: {response_delay}')
     self._write_data_transaction(pack)
示例#4
0
 def set_display_unit(self, display_unit):
     """
     Set the display unit in the device's display
     :param display_unit: Selectable amongst :Units.MBAR, Units.TORR and Units.HPA
     :return:
     """
     pack = ThyrCommPackage(self._address)
     pack.cmd = CMD.Display_Unit
     pack.data = display_unit
     log.info(f"Setting display units to: {display_unit}")
     self._write_data_transaction(pack)
示例#5
0
 def set_baud_rate(self, baud_rate):
     """
     Set the baud rate for data transmission
     :param baud_rate: Value possibilities: 9600, 14400, 19200, 28800, 38400, 57600, 115200 Bd
     :return:None
     """
     pack = ThyrCommPackage(self._address)
     pack.cmd = CMD.Baud_Rate
     pack.data = baud_rate
     log.info(f'Setting baud rate to {baud_rate}')
     self._write_data_transaction(pack)