sde1000 / python-dali

Library for controlling DALI lighting systems
Other
150 stars 71 forks source link

Fix event filter type handling for control devices #107

Closed sl-wallace closed 2 years ago

sl-wallace commented 2 years ago

I realised my implementation of the event filters could be slightly improved – the InstanceEventFilter enum is an IntEnum, so it makes sense for the SetEventFilters sequence to be able to handle using a plain int as well as the proper enum type. This mostly is useful for the higher-level application code I'm writing, by allowing it to be able to run SetEventFilters with filter_value=0 to disable all filters regardless of type (assuming that the filters are only 8 bits wide, which is so far the case for all types I've seen).