private Task ExecuteGCode(string gcode) { var lines = new[] { gcode }; return(_migo.ExecuteGCode(lines)); }
private async Task SetBedTemperature(Migo migo, double bedTemperature) { var gcode = new[] { $"M140 S{bedTemperature.ToString("###")}" }; await migo.ExecuteGCode(gcode) .ConfigureAwait(false); }
private async Task SetBedTemperature(double preheat) { var gcode = new[] { $"M190 S{preheat.ToString("###")}" }; await _migo.ExecuteGCode(gcode) .ConfigureAwait(false); }
public async Task Should_exec_gcode() { var endpoint = new MigoEndpoint(MigoIp, MigoPort); var migo = new Migo(Init.LoggerFactory, endpoint); var gcode = "G28 X0 Y0"; var result = await migo.ExecuteGCode(new[] { gcode }) .ConfigureAwait(false); result.Success.Should().BeTrue(); }
public async Task Should_execute_g_code() { _fakeMigo .ReplyMode(FakeMigoMode.RequestReply) .ReplyGCodeDone(); var gcode = new[] { "G92 X5", "G0 F1200 X0", "G0 X5" }; var result = await _migo.ExecuteGCode(gcode) .ConfigureAwait(false); result.Success.Should().BeTrue(); }