Fix firmware not opening after a reboot

pull/974/head
Connor Rigby 2019-08-12 10:21:30 -07:00
parent 1d0300c92e
commit 6bb6a90b40
No known key found for this signature in database
GPG Key ID: 29A88B24B70456E0
1 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,11 @@ defmodule FarmbotCore.FirmwareOpenTask do
@impl GenServer
def init(_args) do
send(self(), :open)
firmware_path = Asset.fbos_config(:firmware_path)
firmware_hardware = Asset.fbos_config(:firmware_hardware)
if firmware_path && firmware_hardware do
Config.update_config_value(:bool, "settings", "firmware_needs_open", true)
end
{:ok, %{timer: nil, attempts: 0, threshold: @attempt_threshold}}
end