10.0.0-rc33: Add debug points
parent
004f7bb1d7
commit
12ee219ba6
|
@ -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} ->
|
||||
|
|
|
@ -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 [
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue