public async Task <CNCMessage> JogZ(double Z, double Feed) { CNCMessage tmp = null; await Task.Run(() => { CNCMessage message = Protokoll.GetJogByYMessage(Z, Feed); Interface.SendMessage(message); tmp = Interface.ReceiveMessage(100); }); return(tmp); }
public async Task <CNCMessage> JogY(double Y, double Feed) { CNCMessage tmp = null; await Task.Run(() => { GRBLProtokoll pr = new GRBLProtokoll(); CNCMessage m = pr.GetCurrentFeedMessage(); //CNCMessage start = new CNCMessage() { Message = "Grbl 1.1g ['$' for help]" }; //var an = Interface.WaitReceiveMessage(100, start, 2000); CNCMessage message = Protokoll.GetJogByYMessage(Y, Feed); Interface.SendMessage(message); CNCMessage t = new CNCMessage() { Message = "ok" }; tmp = Interface.WaitReceiveMessage(100, t, 1000); }); return(tmp); }