Update PipeWorker debug logs

pull/974/head
Gabriel Burnworth 2019-08-14 12:06:48 -07:00 committed by Connor Rigby
parent 21eef22c55
commit 3f1a4ddc89
No known key found for this signature in database
GPG Key ID: 29A88B24B70456E0
1 changed files with 2 additions and 1 deletions

View File

@ -40,6 +40,7 @@ defmodule FarmbotCore.FarmwareRuntime.PipeWorker do
end
def handle_call({:write, packet}, _from, state) do
Logger.debug "writing #{byte_size(packet)} bytes"
reply = :erlang.port_command(state.pipe, packet)
{:reply, reply, state}
end
@ -62,7 +63,7 @@ defmodule FarmbotCore.FarmwareRuntime.PipeWorker do
end
def handle_info({pipe, {:data, data}}, %{pipe: pipe, buffer: buffer} = state) do
Logger.debug "bufferring #{byte_size(data)} bytes"
Logger.debug "buffering #{byte_size(data)} bytes"
{:noreply, %{state | buffer: buffer <> data}}
end