示例#1
0
def serve_wind():
    with app.test_request_context('/'):
        socketio.emit('status.wind', status.wind(), namespace='/socket')
示例#2
0
def serve_gps_raw_int():
    with app.test_request_context('/'):
        socketio.emit('status.link', status.link(), namespace='/socket')
示例#3
0
def serve_global_position_int():
    with app.test_request_context('/'):
        socketio.emit('status.gps', status.gps(), namespace='/socket')
示例#4
0
def serve_attitude():
    with app.test_request_context('/'):
      socketio.emit('status.attitude', status.attitude(), namespace='/socket')
示例#5
0
def serve_sys_status():
    with app.test_request_context('/'):
        socketio.emit('status.battery', status.battery(), namespace='/socket')
示例#6
0
def serve_calibration(text):
    with app.test_request_context('/'):
        socketio.emit('calibration', text, namespace='/socket')
示例#7
0
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')
示例#8
0
def serve_max_parameter_number(number):
    with app.test_request_context('/'):
        socketio.emit('parameter.max', {"max": number}, namespace='/socket')
示例#9
0
def serve_waypoints():
    with app.test_request_context('/'):
        socketio.emit('waypoints', waypoints.getAll(), namespace='/socket')
示例#10
0
def serve_sda_enabled(enabled):
    with app.test_request_context('/'):
        socketio.emit('sda.enabled', enabled, namespace='/socket')
示例#11
0
def serve_parameter(name, value):
    with app.test_request_context('/'):
        socketio.emit('parameter', {"name": name, "value": value}, namespace='/socket')
示例#12
0
def serve_interop_obst():
    with app.test_request_context('/'):
        socketio.emit('interop', {"obstacles": Data.pdata['obstacles'],
                                  "server_info": Data.pdata['server_info']}, namespace='/socket')
示例#13
0
def serve_interop_message(message):
    with app.test_request_context('/'):
        socketio.emit('interop.message', message, namespace='/socket')
示例#14
0
def serve_interop_time(time):
    with app.test_request_context('/'):
        socketio.emit('interop.time', time, namespace='/socket')
示例#15
0
def serve_armed():
    with app.test_request_context('/'):
        logger.error(str('armed is', status.armed()))
        socketio.emit('status.armed', status.armed(), namespace='/socket')
示例#16
0
def serve_current():
    with app.test_request_context('/'):
        socketio.emit('current', Data.currentWPIndex , namespace='/socket')
示例#17
0
def serve_disconnect():
    logger.warning('disconnect')
    with app.test_request_context('/'):
        socketio.emit('status.disconnect', str(True), namespace='/socket')
示例#18
0
def serve_mode(mode):
    with app.test_request_context('/'):
        socketio.emit('mode', mode, namespace='/socket')