添加电容同步采集功能

This commit is contained in:
jinggaoyang-68
2025-01-07 13:35:29 +08:00
parent b5455a269c
commit 8e01b24dac
2 changed files with 21 additions and 0 deletions

View File

@ -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