@ -196,7 +196,7 @@ socket.on('battery', (data) => {
ctx.font = "24px Arial";
ctx.fillStyle = "blue";
//ctx.fillText("Hello World", canvas.width/3, 30);
socket.emit('get_stats', { "type": ["battery"] });
//socket.emit('get_stats', { "type": ["battery"] });
$('form#message').submit(function(event) {
socket.emit('text', {data: $('#message_data').val()});
@ -79,8 +79,7 @@ def get_stats(data):
sid = request.sid
print("client %s requesting stats" % sid)
from roberto import serial
if sid != webrtccamera.sid:
serial.add_callback('B', display_battery, sid)
@socketio.on('disconnect')
def disconnect():