Skip to content

Commit

Permalink
Add suspend variable
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeoLacruz committed Dec 15, 2024
1 parent 8a26897 commit ba7dc56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions piusv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def __init__(self, sh):
self._item_dict = {}
self._cyclic_update_active = False
self.alive = False
self.suspended = False

# check if shNG is running on Raspberry Pi
try:
Expand Down Expand Up @@ -189,6 +190,9 @@ def poll_device(self):
if self._cyclic_update_active:
self.logger.warning('Triggered cyclic poll_device, but previous cyclic run is still active. Therefore request will be skipped.')
return
elif self.suspended:
self.logger.warning('Triggered cyclic poll_device, but Plugin in suspended. Therefore request will be skipped.')
return
else:
self.logger.info('Triggering cyclic poll_device')

Expand Down

0 comments on commit ba7dc56

Please sign in to comment.