Wait_Until Question
I have a wait_until placed in each of my source functions, but it seems that the wait_until only triggers when the system was previously off, not while it is on:
DEFINE_FUNCTION fcnDVD()
{
IF (nPower = 0) //Room Off
{
//turn room on, set waits/timelines, etc
fcnPwrOn()
}
WAIT_UNTIL(!TIMELINE_ACTIVE(tl_ProjWarmUp))
{
SEND_STRING dvPROJ, "cProjComp,fcnCheckSum(cProjComp)" //proj component input
nCurrentSource=1
}
}
My hope here was that the wait_until would work as a sort of flag when the system is already on. Am I just coding this wrong, or do I need a different flag to check other than the active/inactive timeline? I figured the timeline was good because it has the necessary 45 sec. delay aready in it.
Comments
This would also be easier to track in debug for troubleshooting purposes.
Jeff
BUTTON_EVENT[dcSources] //latches source buttons together { PUSH: { nCurrentSource = GET_LAST(dcSources) IF (nPower = 0) //<----------------------------------Sneaky!!!! { //start the projector polling, send proj pwr, update var text fields SWITCH(GET_LAST(dcSources)) { CASE 1: fcnDVD() CASE 2: fcnCamera() CASE 3: fcnSAT() } } } }Switch-Case doesn't exactly work here if the room is already on....Guess that's why I should really proofread my code as I do revisions!