From ef607b8d7ad32b90b9fad3989aa91f0301ae86cc Mon Sep 17 00:00:00 2001 From: LAX18 Development Date: Tue, 12 Jan 2021 11:12:29 -0500 Subject: [PATCH] Ayy it might work --- python/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/api.py b/python/api.py index 3983644..3e41876 100644 --- a/python/api.py +++ b/python/api.py @@ -21,7 +21,7 @@ def readVoltage(bus): read = bus.read_word_data(address, 2) swapped = struct.unpack("H", read))[0] voltage = swapped * 1.25 /1000/16 - print(typeof voltage) + print(voltage) return voltage @@ -31,7 +31,7 @@ def readCapacity(bus): read = bus.read_word_data(address, 4) swapped = struct.unpack("H", read))[0] capacity = swapped/256 - print(typeof capacity) + print(voltage) return capacity @app.route('/battery',methods = ['POST','GET'])