def serve_wind(): with app.test_request_context('/'): socketio.emit('status.wind', status.wind(), namespace='/socket')
def serve_gps_raw_int(): with app.test_request_context('/'): socketio.emit('status.link', status.link(), namespace='/socket')
def serve_global_position_int(): with app.test_request_context('/'): socketio.emit('status.gps', status.gps(), namespace='/socket')
def serve_attitude(): with app.test_request_context('/'): socketio.emit('status.attitude', status.attitude(), namespace='/socket')
def serve_sys_status(): with app.test_request_context('/'): socketio.emit('status.battery', status.battery(), namespace='/socket')
def serve_calibration(text): with app.test_request_context('/'): socketio.emit('calibration', text, namespace='/socket')
def serve_vfr_hud(): with app.test_request_context('/'): socketio.emit('status.airspeed', status.airspeed(), namespace='/socket') socketio.emit('status.throttle', status.throttle(), namespace='/socket')
def serve_max_parameter_number(number): with app.test_request_context('/'): socketio.emit('parameter.max', {"max": number}, namespace='/socket')
def serve_waypoints(): with app.test_request_context('/'): socketio.emit('waypoints', waypoints.getAll(), namespace='/socket')
def serve_sda_enabled(enabled): with app.test_request_context('/'): socketio.emit('sda.enabled', enabled, namespace='/socket')
def serve_parameter(name, value): with app.test_request_context('/'): socketio.emit('parameter', {"name": name, "value": value}, namespace='/socket')
def serve_interop_obst(): with app.test_request_context('/'): socketio.emit('interop', {"obstacles": Data.pdata['obstacles'], "server_info": Data.pdata['server_info']}, namespace='/socket')
def serve_interop_message(message): with app.test_request_context('/'): socketio.emit('interop.message', message, namespace='/socket')
def serve_interop_time(time): with app.test_request_context('/'): socketio.emit('interop.time', time, namespace='/socket')
def serve_armed(): with app.test_request_context('/'): logger.error(str('armed is', status.armed())) socketio.emit('status.armed', status.armed(), namespace='/socket')
def serve_current(): with app.test_request_context('/'): socketio.emit('current', Data.currentWPIndex , namespace='/socket')
def serve_disconnect(): logger.warning('disconnect') with app.test_request_context('/'): socketio.emit('status.disconnect', str(True), namespace='/socket')
def serve_mode(mode): with app.test_request_context('/'): socketio.emit('mode', mode, namespace='/socket')