forked from marva/sumorobot-web
Update sumorobot.js
This commit is contained in:
parent
bef66dfbda
commit
30b382b338
@ -57,7 +57,7 @@ Sumorobot.prototype.connect = function() {
|
|||||||
var battery = JSON.parse(data)["battery_voltage"];
|
var battery = JSON.parse(data)["battery_voltage"];
|
||||||
battery = Math.round((((battery - 3.0) * 100) / (4.2 - 3.0)));
|
battery = Math.round((((battery - 3.0) * 100) / (4.2 - 3.0)));
|
||||||
$("#battery").html(battery + "%");
|
$("#battery").html(battery + "%");
|
||||||
$("#bar").html("Battery");
|
//$("#bar").html("Battery");
|
||||||
$("#bar").addClass("connected");
|
$("#bar").addClass("connected");
|
||||||
};
|
};
|
||||||
/* when there is an WebSocket error */
|
/* when there is an WebSocket error */
|
||||||
|
Loading…
Reference in New Issue
Block a user