Пример #1
0
 public void TestReset()
 {
     SimSPIGyro gyro = new SimSPIGyro((SPIPorts)m_port);
     gyro.SetPosition(1.025);
     Assert.AreEqual(1.025, m_gyro.GetAngle(), 0.0001);
     m_gyro.Reset();
     Assert.AreEqual(0.0, m_gyro.GetAngle(), 0.0001);
 }
Пример #2
0
 public void TestAnalogGyroGetRate()
 {
     SimSPIGyro gyro = new SimSPIGyro((SPIPorts)m_port);
     gyro.SetRate(1.025);
     Assert.AreEqual(1.025, m_gyro.GetRate(), 0.0001);
     gyro.SetRate(-1.0835);
     Assert.AreEqual(-1.0835, m_gyro.GetRate(), 0.0001);
 }