|
@@ -207,6 +207,22 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
|
|
|
|
|
|
return item_value
|
|
return item_value
|
|
|
|
|
|
|
|
|
|
+ def one_key_down(self):
|
|
|
|
|
+ cmd = [0x55, 0x55, 0x69, 0x96, 0x00, 0x03, 0x00, 0xC8, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x01,
|
|
|
|
|
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
|
|
|
|
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
|
+ 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
|
+ 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
|
+ 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
|
+ 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x02]
|
|
|
|
|
+ # self.add_send_data_queue(cmd)
|
|
|
|
|
+ buf = bytearray(b"")
|
|
|
|
|
+ buf.extend(cmd)
|
|
|
|
|
+ # 55 55 02 5a 01 a4
|
|
|
|
|
+ if self.serial_ins.serial_handle is not None:
|
|
|
|
|
+ print("one_key_down buf {}".format(self.serial_ins.change_hex_to_int(buf)))
|
|
|
|
|
+ self.serial_ins.serial_handle.write(buf)
|
|
|
|
|
+
|
|
|
def get_device_info(self):
|
|
def get_device_info(self):
|
|
|
if not self.init_state:
|
|
if not self.init_state:
|
|
|
self.sendSocketMessage(code=1, msg="mcu设备未初始化", device_status=4)
|
|
self.sendSocketMessage(code=1, msg="mcu设备未初始化", device_status=4)
|