Exemplo n.º 1
0
 public void FillParameters(GCodeConfig conf)
 {
     fillParametersInProgress = true;
     dataGridGCodeConf.Rows.Clear();
     foreach (GCodeConfig.GCodeParam par in conf.GetParams())
     {
         dataGridGCodeConf.Rows.Add(par.code, par.strVal[0], par.strVal[1], par.strVal[2], par.strVal[3], par.strVal[4]);
     }
     gcodeConf = conf;
     fillParametersInProgress = false;
 }
Exemplo n.º 2
0
 void grblComm_ParameterUpdate(object sender, GrblConfig grblConf, GCodeConfig gcodeConf)
 {
     if (InvokeRequired)
     {
         BeginInvoke(new MethodInvoker(() => { grblComm_ParameterUpdate(sender, grblConf, gcodeConf); }));
         return;
     }
     paramView.FillParameters(grblConf);
     gcodeParamView.FillParameters(gcodeConf);
     manualControl.SetSliderMinMax(ManualControl.Sliders.SpindleSpeed,
                                   grblConf.GetParam(GrblConfig.GrblParam.Code.MinSpindleSpeedCode).floatVal,
                                   grblConf.GetParam(GrblConfig.GrblParam.Code.MaxSpindleSpeedCode).floatVal);
     toolStripProgressBuff.Maximum1 = 10;
     toolStripProgressBuff.Maximum2 = 10;
 }
Exemplo n.º 3
0
 public GrblComm()
 {
     portNames          = null;
     scanPortIx         = -1;
     activePort         = null;
     portOpened         = false;
     port               = new SerialPort();
     readLine           = new StringBuilder();
     grblStatus         = new GrblStatus();
     grblConfig         = new GrblConfig();
     gcodeConfig        = new GCodeConfig();
     port.DataReceived += port_DataReceived;
     standardMsgQueue   = new List <string>();
     urgentMsgQueue     = new List <string>();
     commandBatch       = new List <string>();
     ReadErrorCodes();
     scanCount         = 0;
     Global.grblStatus = grblStatus;
     Global.grblConfig = grblConfig;
 }