示例#1
0
 private void OnEnable()
 {
     Missive.AddListener <DayNightMissive>(OnDayNightChange);
     GetDayNightState();
     speed_pid = new Control.PID();
     steer_pid = new Control.PID();
 }
 /// <summary>
 /// The user selected a PID from the list, and this method presents the values for the PID.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SelectedPIDChanged(object sender, EventArgs e)
 {
     _currentPID = (PID) _pidSettings.PIDSetup.SelectedItem;
     _pidSettings.SetPID(_currentPID.P, _currentPID.I, _currentPID.D);
 }
示例#3
0
 /// <summary>
 ///   Custom output controller by given PID configurations.
 /// </summary>
 public OutputController(PID pitchAnglePID, PID rollAnglePID, PID yawAnglePID, PID throttlePID,
                         PID horizontalForwardVelocityPID, PID horizontalRightwardVelocityPID)
     : this(new PIDSetup
 {
     PitchAngle = pitchAnglePID,
     RollAngle = rollAnglePID,
     YawAngle = yawAnglePID,
     Throttle = throttlePID,
     ForwardsAccel = horizontalForwardVelocityPID,
     RightwardsAccel = horizontalRightwardVelocityPID,
 })
 {
 }