Commit 1f9911df authored by Tim Powell's avatar Tim Powell

added error handling for incorrect inputs

parent 2a9cc583
......@@ -71,5 +71,5 @@ class BatteryHandler(Handler, QObject):
return 85.0
elif battery_data["bat85"] == 0:
return 0.0
return 0.0
else:
raise TypeError('Battery Percentage (entry \'bat85\' in the battery payload) is not 1 or 2.')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment