Skip to content

Commit

Permalink
fixes Issue #1056
Browse files Browse the repository at this point in the history
  • Loading branch information
MAKOMO committed Dec 22, 2022
1 parent ca798c6 commit 879562a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/artisanlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '2.8.2'
__version__ = '2.8.3'
__revision__ = '0'
__build__ = '0'

Expand Down
3 changes: 2 additions & 1 deletion src/artisanlib/modbusport.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,8 @@ def peekSingleRegister(self,slave,register,code=3):
_log.info('peekSingleRegister(%d,%d,%d) failed', slave, register, code)
_log.debug(ex)
res = None
if not self.invalidResult(res,1):
error, _ = self.invalidResult(res,1)
if not error:
if code in [1,2]:
if res is not None and res.bits[0]:
return 1
Expand Down

0 comments on commit 879562a

Please sign in to comment.