Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:ChristianTremblay/BAC0 into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianTremblay committed Jul 8, 2020
2 parents a36b930 + 3e48820 commit 6af8c42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 1 addition & 4 deletions BAC0/core/devices/Device.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,7 @@ def __init__(
self.properties.device_id = device_id
self.properties.network = network
self.properties.pollDelay = poll
if poll < 10:
self.properties.fast_polling = True
else:
self.properties.fast_polling = False
self.properties.fast_polling = True if poll < 10 else False
self.properties.name = ""
self.properties.vendor_id = 0
self.properties.objects_list = []
Expand Down
8 changes: 3 additions & 5 deletions BAC0/core/io/Read.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,9 @@ def read(
raise UnknownObjectError("Unknown object {}".format(args))
elif reason == "bufferOverflow":
self._log.warning(
"Buffer capacity exceeded in device{}".format(args)
)
raise BufferOverflow(
"Buffer capacity exceeded in device{}".format(args)
"Buffer capacity exceeded in device {}".format(args)
)
return self._split_the_read_request(args, arr_index)
else:
# Other error... consider NoResponseFromController (65)
# even if the real reason is another one
Expand All @@ -211,7 +209,7 @@ def _split_the_read_request(self, args, arr_index):
"""
When a device doesn't support segmentation, this function
will split the request according to the length of the
predicted result which can be known when readin the array_index
predicted result which can be known when reading the array_index
number 0.
This can be a very long process as some devices count a large
Expand Down

0 comments on commit 6af8c42

Please sign in to comment.