Exemple #1
0
 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;
 }
Exemple #2
0
 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
     };
 }
Exemple #3
0
 public IAnalogSensor produceAnalogSensor(slg.RobotAbstraction.Ids.AnalogPinId pin, int updateFrequency, double valueChangedThreshold)
 {
     return new AnalogSensor(this)
     {
         Pin = pin,
         UpdateFrequency = updateFrequency,              // milliseconds
         ValueChangedThreshold = (int)valueChangedThreshold
     };
 }
Exemple #4
0
 public ISharpGP2D12 produceSharpGP2D12(slg.RobotAbstraction.Ids.AnalogPinId pin, int updateFrequency, double distanceChangedThreshold)
 {
     return new SharpGP2D12(this)
     {
         Pin = pin,
         UpdateFrequency = updateFrequency,              // milliseconds
         DistanceChangedThreshold = distanceChangedThreshold
     };
 }