Fix stub handler never reporting position.

pull/375/head
Connor Rigby 2017-12-04 15:44:26 -08:00
parent af40143c05
commit 54f777edec
1 changed files with 4 additions and 1 deletions

View File

@ -103,7 +103,10 @@ defmodule Farmbot.Firmware.StubHandler do
end
def handle_call({:move_absolute, pos, _x_speed, _y_speed, _z_speed}, _from, state) do
{:reply, :ok, [{:report_current_position, pos.x, pos.y, pos.z}, :done], %{state | pos: pos}}
stub_responses = [{:report_current_position, pos.x, pos.y, pos.z},
{:report_encoder_position_scaled, pos.x, pos.y, pos.z},
{:report_encoder_position_raw, pos.x, pos.y, pos.z}, :done]
{:reply, :ok, stub_responses, %{state | pos: pos}}
end
def handle_call({:calibrate, _axis, _speed}, _from, state) do