示例#1
0
 public void TestRestartAfterEnable()
 {
     SetupAbsoluteTolerance();
     SetupOutputRange();
     double setpoint = 2500.0;
     m_controller.Setpoint = setpoint;
     m_controller.Enable();
     Timer.Delay(0.5);
     Assert.IsTrue(m_table.GetBoolean("enabled"));
     Assert.IsTrue(m_controller.Enabled);
     Assert.AreNotEqual(0.0, s_me.GetMotor().Get());
     m_controller.Reset();
     Assert.IsFalse(m_table.GetBoolean("enabled"));
     Assert.IsFalse(m_controller.Enabled);
     Assert.AreEqual(0, s_me.GetMotor().Get(), 0);
 }
示例#2
0
 ///<inheritdoc/>
 protected internal override void _Initialize()
 {
     m_controller.Enable();
 }
示例#3
0
 /// <summary>
 /// Enables the internal <see cref="WPILib.PIDController">PIDController</see>
 /// </summary>
 public void Enable() => PIDController.Enable();