Browse Source

add favicon, fix callback

main
Hendrik Langer 4 years ago
parent
commit
0b91f56e98
  1. 4
      raspberry/roberto/Serial.py
  2. 2
      raspberry/roberto/camera/camera_gstreamer_webrtc.py
  3. 4
      raspberry/roberto/views/frontend/routes.py
  4. BIN
      raspberry/roberto/views/frontend/templates/favicon.ico
  5. BIN
      raspberry/roberto/views/frontend/templates/favicon.png

4
raspberry/roberto/Serial.py

@ -65,11 +65,11 @@ class Serial(object):
#self.alive = False
#raise
def add_callback(self, cmd, callback, arg=None):
def add_callback(self, cmd, callback, arg):
if not cmd in self._callbacks:
self._callbacks[cmd] = []
self._callbacks[cmd].append( (callback, arg) )
def del_callback(self, cmd, callback, arg=None):
def del_callback(self, cmd, callback, arg):
if cmd in self._callbacks:
self._callbacks[cmd].remove( (callback, arg) )

2
raspberry/roberto/camera/camera_gstreamer_webrtc.py

@ -196,7 +196,7 @@ class WebRTCCamera(Thread):
def emit_async(self, event, data):
self._queue.put({'job':'emit', 'event':event, 'data':data})
def send_battery(val, arg=None):
def send_battery(val, arg):
print("sending battery value %s" % val)
self.emit_async('battery', val)

4
raspberry/roberto/views/frontend/routes.py

@ -41,3 +41,7 @@ def virtualjoystick_js():
@frontend_blueprint.route('/manifest.json')
def manifest_json():
return render_template('manifest.json'), {'Content-Type': 'application/json'}
@frontend_blueprint.route('/favicon.ico')
def favicon_ico():
return send_file('templates/favicon.ico', mimetype='image/x-icon')

BIN
raspberry/roberto/views/frontend/templates/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
raspberry/roberto/views/frontend/templates/favicon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Loading…
Cancel
Save