Exemple #1
0
 public void FillParameters(GrblConfig conf)
 {
     dataGridGrblConf.Rows.Clear();
     foreach (GrblConfig.GrblParam par in conf.GetParams())
     {
         dataGridGrblConf.Rows.Add(par.code, conf.GetDescription(par.code), par.strVal);
     }
 }
Exemple #2
0
 public void FillParameters(GrblConfig conf)
 {
     fillParametersInProgress = true;
     dataGridGrblConf.Rows.Clear();
     foreach (GrblConfig.GrblParam par in conf.GetParams())
     {
         dataGridGrblConf.Rows.Add(par.code, conf.GetDescription(par.code), par.strVal);
     }
     grblConf = conf;
     fillParametersInProgress = false;
 }
Exemple #3
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;
 }
Exemple #4
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;
 }