Codec, thank you, I was wondering about the wait 2 seconds and what that would do to the rest of the code. It now makes sense. Thank you all who responded!
Yes, this is much better. In my case, I am only using it during practice, so that amount of time doesn’t matter. So, if time doesn’t matter, @Sylvie solution is simpler and easy to understand, but elsewhere yours works better. Good luck!
When I did what codec told me, I received this warning. Should I just ignore it?
09:15:34 – warning – warning: inequality comparison result unused [-Wunused-comparison]
if(Controller2.ButtonUp.pressing() && b) a != a, b = false;
^~
./main.cpp:1288:46: note: use ‘|=’ to turn this inequality comparison into an or-assignment
if(Controller2.ButtonUp.pressing() && b) a != a, b = false;
@Codec seems to have made the mistake of thinking that != follows the same pattern as |=, +=, -=, etc. It instead does not, and is an inequality comparison and not a shorthand for lv = !rv.