This commit is contained in:
pikastech 2022-09-19 13:28:44 +08:00
parent 600950381e
commit a41f138895
2 changed files with 8 additions and 2 deletions

View File

@ -39,7 +39,10 @@ class ModBus(_modbus._ModBus):
lenth = super().serializeWriteRegister(addr, value)
return self.sendBuff[0:lenth]
def serializeMaskWriteRegister(self, addr: int, andMask: int, orMask: int) -> bytes:
def serializeMaskWriteRegister(self,
addr: int,
andMask: int,
orMask: int) -> bytes:
lenth = super().serializeMaskWriteRegister(addr, andMask, orMask)
return self.sendBuff[0:lenth]

View File

@ -39,7 +39,10 @@ class ModBus(_modbus._ModBus):
lenth = super().serializeWriteRegister(addr, value)
return self.sendBuff[0:lenth]
def serializeMaskWriteRegister(self, addr: int, andMask: int, orMask: int) -> bytes:
def serializeMaskWriteRegister(self,
addr: int,
andMask: int,
orMask: int) -> bytes:
lenth = super().serializeMaskWriteRegister(addr, andMask, orMask)
return self.sendBuff[0:lenth]