10.0.0-rc33: Add debug points

qa/10.0.0
Rick Carlino 2020-05-16 19:02:10 -05:00
parent 004f7bb1d7
commit 12ee219ba6
4 changed files with 22 additions and 2 deletions

View File

@ -1 +1 @@
10.0.0-rc32
10.0.0-rc33

View File

@ -6,6 +6,11 @@ defmodule FarmbotCeleryScript.Compiler.UpdateResource do
me = unquote(__MODULE__)
variable = unquote(Map.fetch!(args, :resource))
update = unquote(unpair(body, %{}))
if update["y"] do
IO.puts(" In update_resource_compiler y is #{inspect(update["y"])}")
end
# Go easy on the API...
case variable do
%AST{kind: :identifier} ->

View File

@ -8,7 +8,7 @@ defmodule FarmbotExt.API.DirtyWorker do
require Logger
require FarmbotCore.Logger
use GenServer
@timeout 100
@timeout 1
# these resources can't be accessed by `id`.
@singular [

View File

@ -69,6 +69,21 @@ defmodule FarmbotOS.SysCalls.ResourceUpdate do
def point_update_resource(type, id, params) do
with %{} = point <- Asset.get_point(id: id),
{:ok, point} <- Asset.update_point(point, params) do
real_y = point.y
if params["y"] do
{desired_y, _} = Float.parse(params["y"])
if real_y != desired_y do
FarmbotCore.Logger.error(3, "Y does not match up #{__MODULE__}")
raise "Y WAS NOT Correct #{inspect({real_y, desired_y})} @@@@"
else
IO.puts(
" point.y = \"#{real_y}\""
)
end
end
_ = Private.mark_dirty!(point)
:ok
else