Skip to content

Commit

Permalink
Fix module notifications with maskbit value of zero
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Sep 3, 2024
1 parent 29c8726 commit 6b66ef1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Next version

### 🔧 Fixed

* Fixed a bug that would make a module notification fail in some cases if its maskbit value was zero.


## 0.8.2 - August 19, 2024

### ✨ Improved
Expand Down
2 changes: 1 addition & 1 deletion python/lvmecp/dome.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def _update_internal(self, use_cache: bool = True):
new_status |= self.flag.POSITION_UNKNOWN

if new_status.value == 0:
new_status = self.flag.__unknown__
new_status = self.flag(self.flag.__unknown__)

return new_status

Expand Down
2 changes: 1 addition & 1 deletion python/lvmecp/safety.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def _update_internal(self, use_cache: bool = True):
new_status |= self.flag.RAIN_SENSOR_ALARM

if new_status.value == 0:
new_status = self.flag.__unknown__
new_status = self.flag(self.flag.__unknown__)

return new_status

Expand Down

0 comments on commit 6b66ef1

Please sign in to comment.