Hello, i swear webcore is driving me crazy, i’ve spent 4 hours already tried to do something fairly uncomplicated and i’ve debuged the piston and left now only the non working part of the code.
What i need the piston to do is simple, while a switch was turned on or off in the last 30 seconds, turn strobe ON on my siren every 5 secs, thats it
here are the logs
|+1ms||╔Received event [Presence Marieta].switch = on with a delay of 33ms|
|+55ms||║RunTime Analysis CS > 15ms > PS > 27ms > PE > 14ms > CE|
|+58ms||║Runtime (36643 bytes) successfully initialized in 27ms (v0.3.110.20191009) (57ms)|
|+59ms||║╔Execution stage started|
|+162ms||║║Comparison (enum) on changed = false (96ms)|
|+164ms||║║Condition #10 evaluated false (100ms)|
|+165ms||║║Condition group #9 evaluated false (state did not change) (101ms)|
|+167ms||║╚Execution stage complete. (108ms)|
|+169ms||╚Event processed successfully (168ms)|
why on earth it doesnt trigger my siren`s strobe.
Switch got turned on in the last 30 secs which means state DID change yet logs show that state did not changed hence not turning on my siren.
I really can’t understand why, i’ve done much more complicated pistons but this just blows my mind. I tried with/without task cancellation policy to default and always run.
If i change the piston to “if switch changes” it works but like that i can’t make the while loop to work only on the 1st 30 sec after switch was changed.
I managed to do this with a global bool variable that runs asynchronous and figure out if my switch was on for 30 secs based of the state of that variable but still i don’t understand why my 1st piston didin’t work.