public IWheelEncoder produceWheelEncoder(slg.RobotAbstraction.Ids.WheelEncoderId wheelEncoderId, int updateFrequency, int resolution, int countChangedThreshold) { WheelEncoder encoder = new WheelEncoder(this) { WheelEncoderId = wheelEncoderId, UpdateFrequency = updateFrequency, // milliseconds Resolution = resolution, // must be set to avoid divide by zero in WheelEncoder.cs CountChangedThreshold = countChangedThreshold // ticks }; return encoder; }
public ISonarSRF04 produceSonarSRF04(slg.RobotAbstraction.Ids.GpioPinId triggerPin, slg.RobotAbstraction.Ids.GpioPinId outputPin, int updateFrequency, double distanceChangedThreshold) { return new SonarSRF04(this) { TriggerPin = (Ids.GpioPinId)triggerPin, OutputPin = (Ids.GpioPinId)outputPin, UpdateFrequency = updateFrequency, // milliseconds DistanceChangedThreshold = distanceChangedThreshold }; }
public IAnalogSensor produceAnalogSensor(slg.RobotAbstraction.Ids.AnalogPinId pin, int updateFrequency, double valueChangedThreshold) { return new AnalogSensor(this) { Pin = pin, UpdateFrequency = updateFrequency, // milliseconds ValueChangedThreshold = (int)valueChangedThreshold }; }
public ISharpGP2D12 produceSharpGP2D12(slg.RobotAbstraction.Ids.AnalogPinId pin, int updateFrequency, double distanceChangedThreshold) { return new SharpGP2D12(this) { Pin = pin, UpdateFrequency = updateFrequency, // milliseconds DistanceChangedThreshold = distanceChangedThreshold }; }