Exemplo n.º 1
0
 public void ConnectToRunningSDPrint()
 {
     m_oswRefreshTimer.Start();
     JobBeginTimer.Stop();
     JobBeginTimer.Reset();
     Status        = JobStatus.Printing;
     m_lSDFilePos  = 0L;
     m_lSDFileSize = 0L;
 }
Exemplo n.º 2
0
        public override void Stop()
        {
            JobBeginTimer.Stop();
            if (m_oGCodeReader != null)
            {
                m_oGCodeReader.Close();
            }

            aborted = true;
        }
Exemplo n.º 3
0
        public override bool Start(out List <string> start_gcode)
        {
            m_oGCodeReader = new GCodeBufferedFileReader(GCodeFilename, m_ulFastForward, out var fEStartingLocation);
            start_gcode    = null;
            if (!m_oGCodeReader.IsOpen)
            {
                return(false);
            }

            try
            {
                MaxLines = m_oGCodeReader.MaxLines;
                if (m_bSDOnly)
                {
                    Details.jobParams.estimatedTime = MaxLines / 50f;
                }
            }
            catch (NotImplementedException ex)
            {
                MaxLines = 0L;
            }
            JobBeginTimer.Stop();
            JobBeginTimer.Reset();
            Status            = JobStatus.Printing;
            CurrentLineNumber = m_ulFastForward;
            start_gcode       = new List <string>()
            {
                string.Format("N{0} M110", CurrentLineNumber % 65536UL)
            };
            if (m_ulFastForward != 0UL)
            {
                start_gcode.Insert(0, string.Format("G92 E{0}", fEStartingLocation));
            }

            return(true);
        }