Analyser Oscilloscope Waveform On/Off (SOLVED)
-
Afternoon all!
I have 2 analyzers running oscilloscopes in my project. 1 for the unprocessed signal, and 1 for the processed signal with buttons set up to enable/disable both.
The only thing is, when I push the button to disable one of them, the waveform only pauses.
Is there a way for the waveform to totally turn off or disappear until it's enabled again instead of just pausing on the screen?
I’ll put a quick 30-second video of my plugin below so you can see what I mean…
-
@SteveRiggs Why don't you just hide the floating tile in question?
Look great by the way! -
@ustk Thanks man. The GUI is almost there now. A few more tweaks and we'll be rockin!!
That's a good idea! If my button is named ‘unprocessedWaveformLabel’ and my floating tile is named ‘DrySignalWaveform’, Could it be something like this?...
// Show/Hide DrySignalWaveform const var unprocessedWaveformLabel = Content.getComponent("unprocessedWaveformLabel"); inline function onunprocessedWaveformLabelControl(component, value) { if (value) { DrySignalWaveform.showControl(true); } else { DrySignalWaveform.showControl(false); } }; Content.getComponent("unprocessedWaveformLabel").setControlCallback(onunprocessedWaveformLabelControl); const var DrySignalWaveform = Content.getComponent("DrySignalWaveform");
-
@ustk Yep, that worked!
Cheers for the help dude! :beer_mug:
-
@SteveRiggs very slightly less code...
DrySignalWaveform.showControl(value);
-
@Lindon Ah! Nice one. I'm unsure which part to swap out though? The 'if/else' section?
So more like this below? or something else?
// Show/Hide DrySignalWaveform const var unprocessedWaveformLabel = Content.getComponent("unprocessedWaveformLabel"); inline function onunprocessedWaveformLabelControl(component, value) { DrySignalWaveform.showControl(value); }; Content.getComponent("unprocessedWaveformLabel").setControlCallback(onunprocessedWaveformLabelControl); const var DrySignalWaveform = Content.getComponent("DrySignalWaveform");
-
@SteveRiggs
@Lindon's right, that's easier this way, even if both are good....