Exemplo n.º 1
0
        private Task ExecuteGCode(string gcode)
        {
            var lines = new[]
            {
                gcode
            };

            return(_migo.ExecuteGCode(lines));
        }
Exemplo n.º 2
0
        private async Task SetBedTemperature(Migo migo, double bedTemperature)
        {
            var gcode = new[]
            {
                $"M140 S{bedTemperature.ToString("###")}"
            };

            await migo.ExecuteGCode(gcode)
            .ConfigureAwait(false);
        }
Exemplo n.º 3
0
        private async Task SetBedTemperature(double preheat)
        {
            var gcode = new[]
            {
                $"M190 S{preheat.ToString("###")}"
            };

            await _migo.ExecuteGCode(gcode)
            .ConfigureAwait(false);
        }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
        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();
        }