def update(): """ called by the nmea listener process when seabus coordinates have been updated """ telemetry = seabus_telemetry() socketio.emit('seabus_moved', telemetry, namespace='/seabus_data') return ('', 202)
def on_connect(): """ send initial telemetry on client connect """ telemetry = seabus_telemetry() emit('seabus_moved', telemetry)
def position_data(): """ Serve up position data to API clients """ telemetry = seabus_telemetry() return jsonify(telemetry)