fixing afk state

This commit is contained in:
DJ2LS 2024-05-02 08:49:17 +02:00
parent 5fad35d62d
commit 5016a1f407
2 changed files with 2 additions and 6 deletions

View file

@ -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);
}

View file

@ -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():