添加电容同步采集功能
This commit is contained in:
@ -250,6 +250,24 @@ class ClassSensorCmd:
|
||||
#print(f"time={time.time()},len(buf) = {len(buf)}, tarLen={tarLen}, buf[0]={buf[0]}, buf[1]={buf[1]}, sum={checkSum}")
|
||||
pass
|
||||
return False
|
||||
|
||||
# 设置采集同步
|
||||
# addr:传感器地址
|
||||
def setSensorSync(self, addr):
|
||||
_pack = list()
|
||||
_pack.append(0xAA)
|
||||
_pack.append(0x55)
|
||||
_pack.append(0x03)
|
||||
_pack.append(self.CMD_SET_SENSOR_CDC_SYNC)
|
||||
_pack.append(0x00)
|
||||
_pack.append(0x00)
|
||||
_pack.append(0x00)
|
||||
_pack.append(0x00)
|
||||
_pack.append(0x00)
|
||||
self.calcSum(_pack)
|
||||
self._ch341.write(addr, _pack)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user