Allow emergency_lock while in boot and configuration states

pull/974/head
Connor Rigby 2019-07-10 12:25:28 -07:00
parent d9e9b03a46
commit 21b5aa1ac8
No known key found for this signature in database
GPG Key ID: 29A88B24B70456E0
1 changed files with 2 additions and 2 deletions

View File

@ -389,12 +389,12 @@ defmodule FarmbotFirmware do
# EmergencyLock should be ran immediately
def handle_command({tag, {:command_emergency_lock, []}} = code, {pid, _ref}, state) do
{:reply, {:ok, tag}, %{state | command_queue: [{pid, code} | state.command_queue]}, 0}
{:reply, {:ok, tag}, %{state | command_queue: [{pid, code}], configuration_queue: []}, 0}
end
# EmergencyUnLock should be ran immediately
def handle_command({tag, {:command_emergency_unlock, []}} = code, {pid, _ref}, state) do
{:reply, {:ok, tag}, %{state | command_queue: [{pid, code} | state.command_queue]}, 0}
{:reply, {:ok, tag}, %{state | command_queue: [{pid, code}], configuration_queue: []}, 0}
end
# If not in an acceptable state, return an error immediately.