From db0e179512bf250ff5d5e661f900c60e2ca93c43 Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Wed, 12 Feb 2020 08:41:24 -0600 Subject: [PATCH 1/3] Release v9.0.4-rc4 --- CHANGELOG.md | 8 ++++++++ VERSION | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cea577b0..7c3961b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +# 9.0.4 + + * Bug fix for slow Farmware execution (Thanks, @jsimmonds2) + * Dependency upgrades + * Upgrade VintageNet (networking library) + * Removal of `dump_info` RPCs + * Numerous internal improvements, such as increasing test coverage and changing dependency injection scheme. + # 9.0.3 * Dependency updates diff --git a/VERSION b/VERSION index 73c1ea18..373368bb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.0.4-rc3 +9.0.4-rc4 From e7aa6724ca1ef12ee18060ad5a985563df9a8343 Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Wed, 12 Feb 2020 09:15:22 -0600 Subject: [PATCH 2/3] Release v9.0.4-rc4 --- farmbot_os/lib/farmbot_os/sys_calls/flash_firmware.ex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/farmbot_os/lib/farmbot_os/sys_calls/flash_firmware.ex b/farmbot_os/lib/farmbot_os/sys_calls/flash_firmware.ex index a57091f1..970e66e0 100644 --- a/farmbot_os/lib/farmbot_os/sys_calls/flash_firmware.ex +++ b/farmbot_os/lib/farmbot_os/sys_calls/flash_firmware.ex @@ -32,9 +32,7 @@ defmodule FarmbotOS.SysCalls.FlashFirmware do {_, 0} <- Avrdude.flash(hex_file, tty, fun) do FarmbotCore.Logger.success(2, "Firmware flashed successfully!") - %{ - firmware_path: tty - } + %{firmware_path: tty} |> Asset.update_fbos_config!() |> Private.mark_dirty!(%{}) @@ -63,11 +61,13 @@ defmodule FarmbotOS.SysCalls.FlashFirmware do defp find_reset_fun("express_k10") do FarmbotCore.Logger.debug(3, "Using special reset function for express") - &FarmbotOS.Platform.Target.FirmwareReset.GPIO.reset/1 + fun = &FarmbotOS.Platform.Target.FirmwareReset.GPIO.reset/0 + {:ok, fun} end defp find_reset_fun(_) do FarmbotCore.Logger.debug(3, "Using default reset function") - &FarmbotFirmware.NullReset.reset/1 + fun = &FarmbotFirmware.NullReset.reset/0 + {:ok, fun} end end From 4cff9f3b9702650420acbdf82f05f43d19a6649b Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Wed, 12 Feb 2020 10:09:07 -0600 Subject: [PATCH 3/3] Dynamic module loading "fix" --- farmbot_firmware/test/param_test.exs | 6 +++--- farmbot_os/lib/farmbot_os/configurator/router.ex | 4 +++- farmbot_os/lib/farmbot_os/sys_calls/flash_firmware.ex | 6 +++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/farmbot_firmware/test/param_test.exs b/farmbot_firmware/test/param_test.exs index ef0a48eb..8b6357ff 100644 --- a/farmbot_firmware/test/param_test.exs +++ b/farmbot_firmware/test/param_test.exs @@ -163,13 +163,13 @@ defmodule FarmbotFirmware.ParamTest do {"encoder scaling, z-axis", nil, "1.2"} assert Param.to_human(:encoder_missed_steps_decay_x, float_value) == - {"missed step decay, x-axis", @steps, "1.2"} + {"missed step decay, x-axis", steps, "1.2"} assert Param.to_human(:encoder_missed_steps_decay_y, float_value) == - {"missed step decay, y-axis", @steps, "1.2"} + {"missed step decay, y-axis", steps, "1.2"} assert Param.to_human(:encoder_missed_steps_decay_z, float_value) == - {"missed step decay, z-axis", @steps, "1.2"} + {"missed step decay, z-axis", steps, "1.2"} assert Param.to_human(:encoder_use_for_pos_x, 1) == {"use encoders for positioning, x-axis", nil, true} diff --git a/farmbot_os/lib/farmbot_os/configurator/router.ex b/farmbot_os/lib/farmbot_os/configurator/router.ex index 72b537c6..9003cade 100644 --- a/farmbot_os/lib/farmbot_os/configurator/router.ex +++ b/farmbot_os/lib/farmbot_os/configurator/router.ex @@ -23,7 +23,9 @@ defmodule FarmbotOS.Configurator.Router do plug(:match) plug(:dispatch) - @network_layer Application.get_env(:farmbot, FarmbotOS.Configurator)[:network_layer] + @network_layer Application.get_env(:farmbot, FarmbotOS.Configurator)[ + :network_layer + ] @telemetry_layer FarmbotOS.Configurator.DetsTelemetryLayer # Trigger for captive portal for various operating systems diff --git a/farmbot_os/lib/farmbot_os/sys_calls/flash_firmware.ex b/farmbot_os/lib/farmbot_os/sys_calls/flash_firmware.ex index 970e66e0..9e7c5c81 100644 --- a/farmbot_os/lib/farmbot_os/sys_calls/flash_firmware.ex +++ b/farmbot_os/lib/farmbot_os/sys_calls/flash_firmware.ex @@ -61,7 +61,11 @@ defmodule FarmbotOS.SysCalls.FlashFirmware do defp find_reset_fun("express_k10") do FarmbotCore.Logger.debug(3, "Using special reset function for express") - fun = &FarmbotOS.Platform.Target.FirmwareReset.GPIO.reset/0 + # "magic" workaround to avoid compiler warnings. + # We used to inject this via App config, but it was + # error prone. + mod = :"Elixir.FarmbotOS.Platform.Target.FirmwareReset.GPIO" + fun = &mod.reset/0 {:ok, fun} end