From 71583669240563de90a7917180f2ae254ce19c2c Mon Sep 17 00:00:00 2001 From: Andrejus Date: Fri, 31 Aug 2018 17:43:54 +0100 Subject: [PATCH] Implement getting battery from SIM800 --- lib/homescreen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/homescreen.py b/lib/homescreen.py index 4e06925..d389447 100644 --- a/lib/homescreen.py +++ b/lib/homescreen.py @@ -17,9 +17,9 @@ They also *may*: """ ___license___ = "MIT" -___dependencies___ = ["database", "buttons", "random", "app", "sleep", "ugfx_helper", "wifi"] +___dependencies___ = ["database", "buttons", "random", "app", "sleep", "ugfx_helper", "wifi", "sim800"] -import database, ugfx, random, buttons, tilda, sleep, ugfx_helper, wifi, time +import database, ugfx, random, buttons, tilda, sleep, ugfx_helper, wifi, time, sim800 from app import App _state = None @@ -64,6 +64,6 @@ def wifi_strength(): # Charge in %, None if unavailable def battery(): - return None # todo: fix me, we can get this from the sim800 + return sim800.batterycharge() # todo: fix me, we can get this from the sim800