Reply To: wait on a condition

PennController for IBEX Forums Support wait on a condition Reply To: wait on a condition

#7097
Jeremy
Keymaster

Hi Sam,

PennController’s top-down write-and-execute style makes this kind of disjunctive logic a little tricky. In your case, I suggest you just wait for the Timer element, and have the Selector element halt the timer upon selection:

newSelector("images")
  .add( getImage("on"), getImage("mid"), getImage("off"))
  .log()
  .callback( getTimer("waitSelector").stop() )
,
newTimer("waitSelector", 30000) 
  .start()
  .wait()

Also, you cannot use javascript’s ! operator on PennController commands (see this guide). If you want to negate a test, just replace test with testNot

Jeremy