public OscProbe probe; //< The input of this channels /// <summary>Plug input to the oscilloscope channel</summary> /// <param name="oscProbe">Default input connected to this channel</param> public void Plug(OscProbe oscProbe) { if (oscProbe.Gui != null) { oscProbe.Gui.Unplug(); } probe = oscProbe; OnPlugHandle(); }
/// <summary>Unplug probe from channel</summary> public void Unplug() { if (probe == null) { return; } probe.Gui = null; probe = OscProbe.Null; OnPlugHandle(); }
private float autoDivisions = 2; //< Auto attenuation fit to X divisions /// <summary>Initialize oscilloscope channel</summary> /// <param name="oscProbe">Default input connected to this channel</param> /// <param name="bufferSize">Buffer capacity</param> public void Initialize(Oscilloscope osc, OscProbe oscProbe, int bufferSize) { oscilloscope = osc; oscSettings = osc.oscSettings; oscRenderer = osc.oscRenderer; chanLabelPosX = oscSettings.rectangle.xMin; valsLabelPosX = oscSettings.rectangle.xMax; label.color = color; statusText.color = color; ledPlugged.colorOn = color; ledPlugged.message = label.text = channelName.ToString(); buffer = new Vector3[bufferSize]; Plug(oscProbe); RenderGUI(); }