loop ? on : off & holding ? loop_exit : false
First I want to see if there is a loop, and if so turn the LED on, if not turn it off. Next if I hold the button for 500ms I want to exit any loop, otherwise just return false.
If I run either of the commands seperately, it works fine. When I run it as noted above, I can't turn the LED off or exit the loop. What am I doing wrong?
First I want to see if there is a loop, and if so turn the LED on, if not turn it off. Next if I hold the button for 500ms I want to exit any loop, otherwise just return false.
If I run either of the commands seperately, it works fine. When I run it as noted above, I can't turn the LED off or exit the loop. What am I doing wrong?
Posté Thu 31 Oct 13 @ 10:02 am
Fixed it with the following:
holding ? loop_exit : loop ? on : off
-josh
holding ? loop_exit : loop ? on : off
-josh
Posté Thu 31 Oct 13 @ 10:43 am
maybe try:
loop ? on & holding ? loop_exit : nothing : off
not sure why you want the condition of holding on the loop exit, I think it might mean you could miss the loop out point... I would just use
loop ? on & loop_exit : off & loop
or
loop ? on & loop_exit : off
I think the reason yours didn't work as you expected was that if the track was looping, it would never see your loop exit condition as that is relying on the track not to be looping to be seen.
loop ? on : off & holding ? loop_exit : false
loop ? on & holding ? loop_exit : nothing : off
not sure why you want the condition of holding on the loop exit, I think it might mean you could miss the loop out point... I would just use
loop ? on & loop_exit : off & loop
or
loop ? on & loop_exit : off
I think the reason yours didn't work as you expected was that if the track was looping, it would never see your loop exit condition as that is relying on the track not to be looping to be seen.
loop ? on : off & holding ? loop_exit : false
Posté Thu 31 Oct 13 @ 10:55 am