public void TestPidGetRate() { using (Encoder c = new Encoder(0, 1)) { c.PIDSourceType = PIDSourceType.Rate; SimData.Encoder[0].Period = 1.0 / 50; Assert.That(c.PidGet(), Is.EqualTo(50)); } }
public void TestPidGetDisplacement() { using (Encoder c = new Encoder(0, 1)) { c.PIDSourceType = PIDSourceType.Displacement; SimData.Encoder[0].Count = 50 * 4; Assert.That(c.PidGet(), Is.EqualTo(50)); } }