Quote:
Originally Posted by Tparbotmail
I did do quite a bit of coding tonight using these techniques and I am seeing case 2 logic being executed when case1 is the state iterative autonomous. If the encoder values I am checking for are true in both case1 and case2 then the sequence becomes unstable. The only way I can think to protect case1 logic from case2 is to use Booleans
Case1:
If (encoder < 400 && case1-Boolean == true && case2-Boolean == false)
Then do some work
State++
Break;
Case2:
If (encoder < 400 && case1-Boolean == false && case2-Boolean == true)
Do some other work.
Is there a way in eclipse to step throu the code while it is executing on the rio?
|
Sorry, I am not sure I understand what you are describing. Are you saying while state is 1, the logic in state 2 is executed? That's impossible unless you have a code path that did not have a "break" and the code fell through to the next case.