Fix for short toothbrush BLE advertisements
@@ -207,7 +207,13 @@ def obj0007(xobj):
def obj0010(xobj):
"""Toothbrush"""
if xobj[0] == 0:
+ if len(xobj) == 1:
+ return {'toothbrush': 1}
+ else:
return {'toothbrush': 1, 'counter': xobj[1]}
+ else:
+ if len(xobj) == 1:
+ return {'toothbrush': 0}
else:
return {'toothbrush': 0, 'score': xobj[1]}
