Browse Source

disable battery stats for now

main
Hendrik Langer 4 years ago
parent
commit
0ce3fa9d83
  1. 2
      raspberry/roberto/views/frontend/templates/index.html
  2. 1
      raspberry/roberto/views/websocket/routes.py

2
raspberry/roberto/views/frontend/templates/index.html

@ -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()});

1
raspberry/roberto/views/websocket/routes.py

@ -79,7 +79,6 @@ 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')

Loading…
Cancel
Save