Ejemplo n.º 1
0
 public static void AfterClass()
 {
     pdp.Dispose();
     pdp = null;
     fixture.Teardown();
     fixture = null;
 }
Ejemplo n.º 2
0
 public static void TearDownAfterClass()
 {
     if (RobotBase.IsSimulation)
     {
         return;
     }
     s_me?.Teardown();
     s_me = null;
 }
Ejemplo n.º 3
0
        public PDPTest(Type type, double expectedCurrentDraw)
        {
            MotorEncoderFixture mef = (MotorEncoderFixture)Activator.CreateInstance(type);

            if (fixture != null && !fixture.Equals(mef))
            {
                fixture.Teardown();
            }
            fixture = mef;
            fixture.Setup();

            this.expectedStoppedCurrentDraw = expectedCurrentDraw;
        }
Ejemplo n.º 4
0
        public MotorInvertingTest(Type type)
        {
            if (RobotBase.IsSimulation)
            {
                return;
            }
            MotorEncoderFixture mef = (MotorEncoderFixture)Activator.CreateInstance(type);

            if (fixture != null && !fixture.Equals(mef))
            {
                fixture.Teardown();
            }
            fixture = mef;
            fixture.Setup();
        }
Ejemplo n.º 5
0
        public PidTest(double p, double i, double d, Type type)
        {
            if (RobotBase.IsSimulation)
            {
                return;
            }

            MotorEncoderFixture mef = (MotorEncoderFixture)Activator.CreateInstance(type);

            if (s_me != null && !s_me.Equals(mef))
            {
                s_me.Teardown();
            }
            s_me = mef;
            m_kP = p;
            m_kI = i;
            m_kD = d;
        }
Ejemplo n.º 6
0
        public PIDTest(double p, double i, double d, Type type)
        {
            if (RobotBase.IsSimulation)
            {
                return;
            }

            MotorEncoderFixture mef = (MotorEncoderFixture)Activator.CreateInstance(type);

            if (me != null && !me.Equals(mef))
            {
                me.Teardown();
            }
            me = mef;
            this.k_p = p;
            this.k_i = i;
            this.k_d = d;
        }