示例#1
0
 private void sliderKd_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
 {
     Kd = sliderKd.Value;
     if (boxKd != null)
     {
         boxKd.Text = Kd.ToString(FORMAT);
     }
 }
示例#2
0
 void UpdateConfig()
 {
     try
     {
         if (this.TxtBoxKp.InvokeRequired)
         {
             this.Invoke(new UpdateConfigCallback(UpdateConfig));
         }
         else
         {
             TxtBoxKp.Text        = Kp.ToString();
             TxtBoxKi.Text        = Ki.ToString();
             TxtBoxKd.Text        = Kd.ToString();
             TxtBoxErrorMax.Text  = ErrorMax.ToString();
             TxtBoxPWMPeriod.Text = PWMPeriod.ToString();
             TxtBoxIntMax.Text    = IntMax.ToString();
         }
     }
     catch (Exception ex)
     {
         return;
     }
 }
示例#3
0
 public void Save(ConfigNode node)
 {
     node.SetValue("Kp", Kp.ToString());
     node.SetValue("Ki", Ki.ToString());
     node.SetValue("Kd", Kd.ToString());
 }
 private void derivativeSlider_Scroll(object sender, EventArgs e)
 {
     Kd          = (float)derivativeSlider.Value / 20.0f;
     dLabel.Text = Kd.ToString();
 }