added disconnected state in battery state in standalone

This commit is contained in:
Kavish Devar
2024-09-27 03:03:31 +05:30
parent 790d0f7338
commit 3df3f3bc5b

View File

@@ -83,7 +83,14 @@ class initL2CAP():
# Interpret the status
def interpret_status(status):
return "Charging" if status == 1 else "Not Charging"
if status == 1:
return "Charging"
elif status == 2:
return "Not charging"
elif status == 4:
return "Disconnected"
else:
return "Unknown"
# Print the results
print(f"Left Bud: {self.left_bud_level}% - {interpret_status(self.left_bud_status)}")