Пример #1
0
        //
        #endregion
        //-------------------------------------------------------------------------
        #region Private
        //
        PidParamEdit SetPidParam(double value, PidParamEdit ppe)
        {
            if (_pidFactors == null)
            {
                return(PidParamEdit.None);
            }
            //
            switch (ppe)
            {
            case PidParamEdit.None:
                break;

            case PidParamEdit.P:
                _pidFactors.Kp = value;
                break;

            case PidParamEdit.I:
                _pidFactors.Ki = value;
                break;

            case PidParamEdit.D:
                _pidFactors.Kd = value;
                break;

            default:
                break;
            }
            //
            return(PidParamEdit.None);
        }
Пример #2
0
 private void ntbxD_PreviewMouseDown(object sender, MouseButtonEventArgs e)
 {
     _pidParamEdit = PidParamEdit.D;
     OnParamEdit(this, null);
 }