Skip to content
Permalink
Browse files

Add log for executing `take-photo`

  • Loading branch information
ConnorRigby committed Nov 13, 2019
1 parent 0ba112c commit 477a179ff96144f580e10670f7b5bd4371950deb
Showing with 4 additions and 7 deletions.
  1. +4 −7 farmbot_celery_script/lib/farmbot_celery_script/compilers/farmware_compiler.ex
@@ -1,6 +1,10 @@
defmodule FarmbotCeleryScript.Compiler.Farmware do
alias FarmbotCeleryScript.Compiler

def take_photo(%{body: params}, env) do
execute_script(%{args: %{label: "take-photo"}, body: params}, env)
end

def execute_script(%{args: %{label: package}, body: params}, _env) do
env =
Enum.map(params, fn %{args: %{label: key, value: value}} ->
@@ -35,13 +39,6 @@ defmodule FarmbotCeleryScript.Compiler.Farmware do
end
end

def take_photo(_, _env) do
# {:execute_script, [], ["take_photo", {:%{}, [], []}]}
quote location: :keep do
FarmbotCeleryScript.SysCalls.execute_script("take-photo", %{})
end
end

def update_farmware(%{args: %{package: package}}, env) do
quote location: :keep do
package = unquote(Compiler.compile_ast(package, env))

0 comments on commit 477a179

Please sign in to comment.
You can’t perform that action at this time.