Fix crash on unexpected Side. ( The corners are not all interpreted as 0! )
This commit is contained in:
parent
607bb18fb3
commit
06f8f96e98
@ -24,7 +24,9 @@ class TogglDelegate(ZeiDelegate):
|
||||
def handleNotification(self, cHandle, data):
|
||||
if cHandle == 38: # Side Change Notification
|
||||
side = struct.unpack("B", data)[0]
|
||||
self._trackProjectByMapping(self.mappings[side])
|
||||
self._trackProjectByMapping(
|
||||
self.mappings[side] if side in self.mappings else self.mappings[0]
|
||||
)
|
||||
else:
|
||||
_log.info("Notification from hndl: %s - %r", cHandle, data)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user