Skip to content

Commit

Permalink
v14.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCarlino committed Jun 15, 2021
1 parent b97ad76 commit 006db24
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.1.2-RC2
14.1.2
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ defimpl FarmbotCore.AssetWorker, for: FarmbotCore.Asset.PinBinding do
:ok

{:error, reason} ->
Logger.error("BAD AST: " <> inspect(reason))
Logger.error("BAD AST: " <> inspect(ast))
FarmbotCore.Logger.error(1, "error executing #{state.pin_binding}: #{reason}")
end

Expand Down
16 changes: 13 additions & 3 deletions farmbot_core/lib/firmware/uart_core.ex
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,18 @@ defmodule FarmbotCore.Firmware.UARTCore do
# This is a reasonable (but not perfect) assumption. RC
@minutes 10
@fw_timeout 1000 * 60 * @minutes

# ==== HISTORICAL NOTE ABOUT FBExpress 1.0 ===============
# Unlike USB serial ports, FBExpress serial uses GPIO.
# This means the GPIO is always running with no definitive
# start/stop signal. This means the parser gets "stuck" on
# the wrong GCode block. The end result is a firmware handler
# that sits there and does nothing. To get around this,
# we do a "health check" after a certain amount of time to
# ensure the farmduion is actually running.
@bugfix_timeout 60_000
# ===== END HISTORICAL CODE ==============================

# This is a helper method that I use for inspecting GCode
# over SSH. It is not used by production systems except for
# debugging.
Expand Down Expand Up @@ -77,7 +88,6 @@ defmodule FarmbotCore.Firmware.UARTCore do
end

def init(opts) do
Logger.debug("UARTCore Opts: " <> inspect(opts))
BotState.firmware_offline()
path = Keyword.fetch!(opts, :path)
{:ok, uart_pid} = Support.connect(path)
Expand All @@ -92,7 +102,7 @@ defmodule FarmbotCore.Firmware.UARTCore do
Support.disconnect(state1, "Rebooting firmware")
# Reset state tree
{:ok, next_state} = init(path: old_path, fw_type: state1.fw_type)
FarmbotCore.Logger.info(1, "Firmware restart initiated")
Logger.debug("Firmware restart initiated")
{:noreply, next_state}
end

Expand Down Expand Up @@ -154,7 +164,7 @@ defmodule FarmbotCore.Firmware.UARTCore do
borked = BotState.fetch().informational_settings.firmware_version == nil

if silent || borked do
msg = "Rebooting inactive Farmduino. Uptime ms: #{Support.uptime_ms()}"
msg = "Rebooting inactive Farmduino. #{Support.uptime_ms()}"
FarmbotCore.Logger.debug(3, msg)

package =
Expand Down
2 changes: 1 addition & 1 deletion farmbot_core/lib/firmware/uart_observer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ defmodule FarmbotCore.Firmware.UARTObserver do
FarmbotCore.Firmware.Flash.raw_flash(package, path)
end

{:ok, uart_pid} = UARTCore.start_link(path: path, fw_package: package)
{:ok, uart_pid} = UARTCore.start_link(path: path, fw_type: package)
uart_pid
end
end
Expand Down

0 comments on commit 006db24

Please sign in to comment.