From e34572a8f2ab3b13a6f282d89d466d07debd02ff Mon Sep 17 00:00:00 2001 From: Silver Kuusik Date: Tue, 14 Nov 2017 14:57:47 +0100 Subject: [PATCH] Update sumorobot.js --- sumorobot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sumorobot.js b/sumorobot.js index 152e17d..bc4642a 100755 --- a/sumorobot.js +++ b/sumorobot.js @@ -56,8 +56,8 @@ Sumorobot.prototype.connect = function() { console.log(data); var battery = JSON.parse(data)["battery_voltage"]; battery = Math.round((((battery - 3.0) * 100) / (4.2 - 3.6))); - $("#battery").html(battery + ""); - //$("#bar").html("Connected"); + $("#battery").html(battery + "%"); + $("#bar").html("Battery"); $("#bar").addClass("connected"); }; /* when there is an WebSocket error */