public IDeviceValue <T> AsyncCachedBacked <T>(IDeviceValue <T> inner)
        {
            var result = new AsyncCacheBackedDeviceValue <T>(inner);

            result.Initialize();
            return(result);
        }
        public IDeviceValue <float> TweeningAdapter(IDeviceValue <float> deviceValue, float tweenFactor)
        {
            var result = new TweeningDeviceValueAdapter(deviceValue, tweenFactor);

            result.Initialize();
            return(result);
        }
 public IntegerAsFloatDeviceValueAdapter(IDeviceValue <int> deviceValue, int offset, int multiplier)
 {
     _deviceValue = deviceValue;
     _offset      = offset;
     _multiplier  = multiplier;
 }
 public GhettoRemoteServo(string name, IDeviceValue <float> position, float defaultAngle) : base(name, DeviceType.Servo)
 {
     this.position     = position;
     this.defaultAngle = defaultAngle;
 }
 public IDeviceValue <float> IntToFloatAdapter(IDeviceValue <int> deviceValue, int offset, int multiplier)
 {
     return(new IntegerAsFloatDeviceValueAdapter(deviceValue, offset, multiplier));
 }
 public IDeviceValue <float> WithMultiplierShift(IDeviceValue <float> value, float multiplier, float offset)
 {
     return(new MultiplyShiftDeviceValueImpl(value, multiplier, offset));
 }
 public IDeviceValue <T> WithCache <T>(IDeviceValue <T> value)
 {
     return(new CachedDeviceValueImpl <T>(value));
 }
Exemple #8
0
 public MultiplyShiftDeviceValueImpl(IDeviceValue <float> value, float multiplier, float offset)
 {
     _value      = value;
     _multiplier = multiplier;
     _offset     = offset;
 }
 public TweeningDeviceValueAdapter(IDeviceValue <float> deviceValue, float tweenFactor)
 {
     this.deviceValue    = deviceValue;
     this.tweenFactor    = tweenFactor;
     this.invTweenFactor = 1 - tweenFactor;
 }
 public AsyncCacheBackedDeviceValue(IDeviceValue <T> inner)
 {
     this.inner = inner;
 }
 protected GpioInputBase(string name, DeviceType type, IDeviceValue <T> value) : base(name, type)
 {
     this.value = value;
 }
 public GhettoRemoteServo(string name, IDeviceValue<float> position, float defaultAngle) : base (name, DeviceType.Servo) {
    this.position = position;
    this.defaultAngle = defaultAngle;
 }
 public GpioDigitalOutputImpl(string name, IDeviceValue <bool> value) : base(name, DeviceType.DigitalOutput, value)
 {
 }
 public GpioAnalogOutputImpl(string name, IDeviceValue <float> value) : base(name, DeviceType.AnalogOutput, value)
 {
 }
Exemple #15
0
 public CachedDeviceValueImpl(IDeviceValue <T> backing)
 {
     this.backing     = backing;
     this.cachedValue = backing.Get();
 }
Exemple #16
0
 public GpioMotorImpl(string name, IDeviceValue <float> value) : base(name, DeviceType.Motor, value)
 {
 }