Tune gpio timeout, set default for firmware version

pull/369/head
Connor Rigby 2017-11-29 23:33:05 -08:00
parent cec26b5fed
commit d60f008d30
4 changed files with 5 additions and 3 deletions

View File

@ -110,11 +110,13 @@ defmodule Farmbot.BotState do
configuration: %{},
informational_settings: %{
controller_version: @version,
firmware_version: "disconnected",
commit: @commit,
target: @target,
env: @env,
busy: false,
sync_status: :sync_now,
locked: false
},
user_env: %{},
process_info: %{

View File

@ -306,7 +306,7 @@ defmodule Farmbot.Firmware do
defp handle_gcode(:report_params_complete, state) do
Logger.success 3, "Firmware initialized."
{nil, %{state | initialized: true}}
{nil, %{state | initializing: false, initialized: true}}
end
defp handle_gcode({:report_software_version, version}, state) do

View File

@ -63,7 +63,7 @@ defmodule Farmbot.Target.GPIO.AleHandler do
new_state = %{state | pins: %{state.pins | pin => %{pin_state | state: :rising}}}
{:noreply, [], new_state}
else
timer = Process.send_after(self(), {:gpio_timer, pin}, 1500)
timer = Process.send_after(self(), {:gpio_timer, pin}, 300)
new_state = %{state | pins: %{state.pins | pin => %{pin_state | timer: timer, state: :rising}}}
{:noreply, [{:pin_trigger, pin}], new_state}
end

View File

@ -1 +1 @@
iex --sname farmbot --cookie democookie --remsh farmbot@farmbot-7e4b
iex --sname farmbot --cookie democookie --remsh farmbot@farmbot-eb30