mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
fixing afk state
This commit is contained in:
parent
5fad35d62d
commit
5016a1f407
2 changed files with 2 additions and 6 deletions
|
@ -22,11 +22,7 @@ function startStopBeacon() {
|
|||
}
|
||||
|
||||
function setAwayFromKey(){
|
||||
if (state.away_from_key === true) {
|
||||
setModemBeacon(state.beacon_state, false);
|
||||
} else {
|
||||
setModemBeacon(state.beacon_state, true);
|
||||
}
|
||||
setModemBeacon(state.beacon_state, state.away_from_key);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -163,8 +163,8 @@ def post_beacon():
|
|||
enqueue_tx_command(command_beacon.BeaconCommand, request.json)
|
||||
else:
|
||||
app.state_manager.set('is_beacon_running', request.json['enabled'])
|
||||
app.state_manager.set('is_away_from_key', request.json['away_from_key'])
|
||||
|
||||
return api_response(request.json)
|
||||
|
||||
@app.route('/modem/ping_ping', methods=['POST'])
|
||||
def post_ping():
|
||||
|
|
Loading…
Reference in a new issue