Пример #1
0
        public void KillJob()
        {
            mode = 3;
            lock (jobList)
            {
                if (dataComplete == false && jobList.Count == 0)
                {
                    return;
                }
                dataComplete = false;
                jobFinished  = DateTime.Now;
                jobList.Clear();
                totalLines = linesSend;
            }
            exclusive = false;
            con.injectManualCommandFirst("M29");
            foreach (GCodeShort code in con.Main.main.codeEditor.getContentArray(3))
            {
                con.injectManualCommand(code.text);
            }
            con.Main.main.UpdateJobButtons.Invoke();
            con.firePrinterAction("L_JOB_KILLED"); //"Job killed");
            DoEndKillActions();
//|*/            Main.main.printPanel.Invoke(Main.main.printPanel.SetStatusJobKilled);
        }
Пример #2
0
        public void Save()
        {
            if (!changed)
            {
                return;           // nothing changed
            }
            string cmdsteps = "M92 X" + sx + " Y" + sy + " Z" + sz + " E" + se;
            string cmdfeed  = "M203 X" + fx + " Y" + fy + " Z" + fz + " E" + fe;
            string cmdmacc  = "M201 X" + ax + " Y" + ay + " Z" + az + " E" + ae;
            string cmdacc   = "M204 S" + acc + " T" + racc;
            string cmdav    = "M205 S" + avs + " T" + avt + " B" + avb + " X" + avx + " Z" + avz;
            string cmdho    = "M206 X" + hox + " Y" + hoy + " Z" + hoz;
            string cmdpid   = "M301 P" + ppid + " I" + ipid + " D" + dpid;

            conn.injectManualCommand(cmdsteps);
            conn.injectManualCommand(cmdfeed);
            conn.injectManualCommand(cmdmacc);
            conn.injectManualCommand(cmdacc);
            conn.injectManualCommand(cmdav);
            conn.injectManualCommand(cmdho);
            if (hasPID)
            {
                conn.injectManualCommand(cmdpid);
            }
            changed = false;
        }
Пример #3
0
        public void save(PrinterConnection conn)
        {
            if (!changed)
            {
                return;           // nothing changed
            }
            string cmd = "M206 T" + type + " P" + position + " ";

            if (type == 3)
            {
                cmd += "X" + val;
            }
            else
            {
                cmd += "S" + val;
            }
            conn.injectManualCommand(cmd);
            changed = false;
        }
Пример #4
0
 public void Update()
 {
     conn.injectManualCommand("M205");
 }