forked from marva/sumorobot-web
remove battery indication
This commit is contained in:
parent
13f4bb8346
commit
3a1a035389
@ -14,7 +14,7 @@
|
|||||||
<script src="sumorobot.js"></script>
|
<script src="sumorobot.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="bar">Battery: <span id="battery">0</span>%</div>
|
<div id="bar">Disconnected<span id="battery"></span></div>
|
||||||
<div id="stream">
|
<div id="stream">
|
||||||
<div class="btn-group btn-group-justified">
|
<div class="btn-group btn-group-justified">
|
||||||
<a href="#" class="btn btn-lg btn-danger btn-close">Close</a>
|
<a href="#" class="btn btn-lg btn-danger btn-close">Close</a>
|
||||||
|
@ -56,7 +56,7 @@ Sumorobot.prototype.connect = function() {
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
var battery = JSON.parse(data)["battery_voltage"];
|
var battery = JSON.parse(data)["battery_voltage"];
|
||||||
battery = Math.round((((battery - 3.6) * 100) / (4.2 - 3.6)));
|
battery = Math.round((((battery - 3.6) * 100) / (4.2 - 3.6)));
|
||||||
$("#battery").html(battery + "");
|
//$("#battery").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