Fix stub_transport to complete firmware initialization.

pull/974/head
Connor Rigby 2019-04-10 11:51:12 -07:00
parent db54e2117d
commit 65fd18bb51
No known key found for this signature in database
GPG Key ID: 29A88B24B70456E0
1 changed files with 5 additions and 2 deletions

View File

@ -191,9 +191,12 @@ defmodule FarmbotFirmware.StubTransport do
{:reply, :ok, state, {:continue, resp_codes}}
end
def handle_call({_tag, {:software_version_read, _}}, _from, state) do
def handle_call({tag, {:software_version_read, _}} = code, _from, state) do
resp_codes = [
GCODE.new(:report_software_version, ["8.0.0.S"])
GCODE.new(:report_echo, [GCODE.encode(code)]),
GCODE.new(:report_begin, [], tag),
GCODE.new(:report_software_version, ["8.0.0.S"]),
GCODE.new(:report_success, [], tag)
]
{:reply, :ok, state, {:continue, resp_codes}}