mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 10:04:33 +02:00
fixed radio api
This commit is contained in:
parent
f76dc5da14
commit
fea294b26f
|
@ -233,11 +233,11 @@ def post_modem_send_raw_stop():
|
|||
@app.route('/radio', methods=['GET', 'POST'])
|
||||
def get_post_radio():
|
||||
if request.method in ['POST']:
|
||||
if "radio_frequency" in [request.json]:
|
||||
if "radio_frequency" in request.json:
|
||||
app.radio_manager.set_frequency(request.json['radio_frequency'])
|
||||
if "radio_mode" in [request.json]:
|
||||
if "radio_mode" in request.json:
|
||||
app.radio_manager.set_mode(request.json['radio_mode'])
|
||||
if "radio_rf_level" in [request.json]:
|
||||
if "radio_rf_level" in request.json:
|
||||
app.radio_manager.set_rf_level(int(request.json['radio_rf_level']))
|
||||
|
||||
return api_response(request.json)
|
||||
|
|
Loading…
Reference in a new issue