fix(centurion): route sub-device notifications via sub_inverse in get_feature

Bridge MessageEvents arrive with sub_feat_idx + 0x100 as the notification
sub_id. get_feature() only checked self.inverse (parent features), so sub-
device feature notifications (including CENTURION_BATTERY_SOC charging
changes) were silently dropped with 'invalid feature index'.

Check sub_inverse at index - 0x100 for any index >= 0x100 so spontaneous
notifications from the headset (e.g. charging status change) are correctly
dispatched to the feature notification handler.
This commit is contained in:
Schmiddy 2026-04-22 22:39:58 +02:00 committed by Ken Sanislo
parent 2e039cf63a
commit f1864fd211
1 changed files with 2 additions and 0 deletions

View File

@ -301,6 +301,8 @@ class FeaturesArray(dict):
feature = self.inverse.get(index)
if feature is not None:
return feature
if index >= 0x100:
return self.sub_inverse.get(index - 0x100)
elif self._check():
feature = self.inverse.get(index)
if feature is not None: