From 205fa6afd64ad015fd3b3a79e595562b0284ca4a Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Thu, 20 Feb 2020 14:52:00 -0600 Subject: [PATCH] v9.1.2-rc4 --- VERSION | 2 +- farmbot_core/lib/farmbot_core/asset/point.ex | 4 +++- farmbot_ext/lib/farmbot_ext/api/sync_group.ex | 1 - farmbot_os/lib/farmbot_os/sys_calls/point_lookup.ex | 10 +++++++++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index d8980d83..2bb8fd9b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.1.2-rc3 +9.1.2-rc4 diff --git a/farmbot_core/lib/farmbot_core/asset/point.ex b/farmbot_core/lib/farmbot_core/asset/point.ex index c85a2f20..ab8e778c 100644 --- a/farmbot_core/lib/farmbot_core/asset/point.ex +++ b/farmbot_core/lib/farmbot_core/asset/point.ex @@ -24,7 +24,7 @@ defmodule FarmbotCore.Asset.Point do field(:z, :float) field(:tool_id, :integer) field(:discarded_at, :utc_datetime) - field(:gantry_mounted, :boolean, default: false) + field(:gantry_mounted, :boolean) field(:monitor, :boolean, default: true) timestamps() end @@ -40,6 +40,7 @@ defmodule FarmbotCore.Asset.Point do radius: point.radius, tool_id: point.tool_id, discarded_at: point.discarded_at, + gantry_mounted: point.gantry_mounted, x: point.x, y: point.y, z: point.z @@ -60,6 +61,7 @@ defmodule FarmbotCore.Asset.Point do :y, :z, :tool_id, + :gantry_mounted, :discarded_at, :monitor, :created_at, diff --git a/farmbot_ext/lib/farmbot_ext/api/sync_group.ex b/farmbot_ext/lib/farmbot_ext/api/sync_group.ex index bd5d0596..73f15b76 100644 --- a/farmbot_ext/lib/farmbot_ext/api/sync_group.ex +++ b/farmbot_ext/lib/farmbot_ext/api/sync_group.ex @@ -32,7 +32,6 @@ defmodule FarmbotExt.API.SyncGroup do FarmwareEnv, FirstPartyFarmware, FarmwareInstallation - # PublicKey ] @doc "Group 1 should have no external requirements" diff --git a/farmbot_os/lib/farmbot_os/sys_calls/point_lookup.ex b/farmbot_os/lib/farmbot_os/sys_calls/point_lookup.ex index f78e52a9..fba64a3a 100644 --- a/farmbot_os/lib/farmbot_os/sys_calls/point_lookup.ex +++ b/farmbot_os/lib/farmbot_os/sys_calls/point_lookup.ex @@ -33,6 +33,10 @@ defmodule FarmbotOS.SysCalls.PointLookup do tool = Asset.get_tool(id: id) p = Asset.get_point(tool_id: id) + IO.puts("======== BEGIN get_toolslot_for_tool(id)") + IO.inspect(tool) + IO.inspect(p) + with %{id: ^id} <- tool, %{name: name, x: x, y: y, z: z, gantry_mounted: mounted} <- p do maybe_adjust_coordinates(%{ @@ -48,8 +52,12 @@ defmodule FarmbotOS.SysCalls.PointLookup do end defp maybe_adjust_coordinates(%{gantry_mounted: true} = point) do + IO.puts("==== IT IS DOING THE CORRECT THING") %{point | x: Movement.get_current_x()} end - defp maybe_adjust_coordinates(point), do: point + defp maybe_adjust_coordinates(point) do + IO.puts("==== Using regular coordinates!") + point + end end