I was able to create a toggle button to start and stop the streams wasn't able to get the button to stay synchronized with the actual state of the stream status. AI is telling me that the buttons are just arbitrary and only send a command but aren't actually linked to the state of the encoders.
var enc1 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x2054", 0);
var enc2 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x2448", 0);
var enc3 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x283C", 0);
// read current state from first encoder
var current = enc1.getValue();
// toggle state
var newState = (current == 1) ? 0 : 1;
// apply to all encoders
enc1.setValue(newState);
enc2.setValue(newState);
enc3.setValue(newState);
My workaround is to create two separate buttons. One for STOP and one for START. and then a third CONFIRM button. Next to these buttons i placed the stream status LEDs to show whether or not the buttons took effect.
var enc1 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x2054", 0);
var enc2 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x2448", 0);
var enc3 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x283C", 0);
enc1.setValue(1);
enc2.setValue(1);
enc3.setValue(1);
var enc1 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x2054", 0);
var enc2 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x2448", 0);
var enc3 = params.getParam("10006212054<br>Slot 5<br>9992-ENC", "0x283C", 0);
enc1.setValue(0);
enc2.setValue(0);
enc3.setValue(0);
Is this the best way to perform this task or is there a way to have the actual buttons reflect the stream state?
------------------------------
David Coleman
AV Systems Engineers
------------------------------