private void sliderKd_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e) { Kd = sliderKd.Value; if (boxKd != null) { boxKd.Text = Kd.ToString(FORMAT); } }
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; } }
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(); }