OpenRoberta / robertalab-ev3dev

roberta lab connector for ev3dev
Apache License 2.0
17 stars 14 forks source link

cancel programs #22

Closed ensonic closed 8 years ago

ensonic commented 8 years ago

Test if we can use down+center to set the TRUE=false (to cancel loops).

Maybe use the scope dicts: https://github.com/OpenRoberta/robertalab-ev3dev/blob/develop/roberta/lab.py#L251

ensonic commented 8 years ago

Hmm, I am not sure the code used in the java ev3 side works. All it does is wrapping loops to look like:

    if TRUE:
        while True:
            # some code

@cvejoski can we make the FOREVER loop reference the global 'TRUE' var instead of a boolean True constant. (The global TRUE var should have been call RUNNING of something like it).

ensonic commented 8 years ago

The original idea is not feasible (the TRUE variable is basically not used). I found a hack to do it, I am now rasing an exception into the runner thread.