/* * double min_preassure = Double.MaxValue; * double max_preassure = 0; * * double min_flexor = Double.MaxValue; * double max_flexor = 0; */ public PeripheralManager(Graphics _graphics, GT.Interfaces.DigitalOutput _vibrationControl, GT.Interfaces.AnalogInput _analogPressureMeter, GT.Interfaces.AnalogInput _analogFlexorMeter) { vibrationControl = _vibrationControl; analogFlexorMeter = _analogFlexorMeter; analogPressureMeter = _analogPressureMeter; graphics = _graphics; vibraPelota = false; current_face = 0; }
public AnalogSampler(string id, GT.Socket socket_A, SamplerBag samplers) { _id = id; _analogInputPin3 = new GT.Interfaces.AnalogInput(socket_A, GT.Socket.Pin.Three, null); _analogInputPin4 = new GT.Interfaces.AnalogInput(socket_A, GT.Socket.Pin.Four, null); _analogInputPin5 = new GT.Interfaces.AnalogInput(socket_A, GT.Socket.Pin.Five, null); _analogInputPin3.Active = true; _analogInputPin4.Active = true; _analogInputPin5.Active = true; _pin3ProportionSampler = new DoubleSampler(null, _id + "_pin3_proportion"); samplers.Add(_pin3ProportionSampler); _pin4ProportionSampler = new DoubleSampler(null, _id + "_pin4_proportion"); samplers.Add(_pin4ProportionSampler); _pin5ProportionSampler = new DoubleSampler(null, _id + "_pin5_proportion"); samplers.Add(_pin5ProportionSampler); }