public void SetFilter(KalmanVelocityNoiseFilter _filter) { filter = _filter; ignoreChanges = true; A.Text = "" + filter.GetA(); H.Text = "" + filter.GetH(); Q.Text = "" + filter.GetQ(); R.Text = "" + filter.GetR(); P.Text = "" + filter.GetP(); X.Text = "" + filter.GetX(); ignoreChanges = false; }
private void A_TextChanged(object sender, EventArgs e) { if (ignoreChanges) { return; } filter.SetParameters(Utils.TextBoxSafeParseFloat(A, filter.GetA()), Utils.TextBoxSafeParseFloat(H, filter.GetH()), Utils.TextBoxSafeParseFloat(Q, filter.GetQ()), Utils.TextBoxSafeParseFloat(R, filter.GetR()), Utils.TextBoxSafeParseFloat(P, filter.GetP()), Utils.TextBoxSafeParseFloat(X, filter.GetX())); }