![]() |
Case Structure
1 Attachment(s)
This is going into Teleop. I didn't use a Select block because I only want it to go Reverse when I push it. Would this accomplish what I want? Or am I breaking my robot?
|
Re: Case Structure
The way you have it now, it will always go in reverse, no matter whenther the button is pressed or not.
|
Re: Case Structure
What do I need to do to change that?
|
Re: Case Structure
Change one of the cases (True or False) from "Reverse" to "Forward"
Right now both cases set the solenoid to Reverse. BTW, a Select block can do the same thing. |
Re: Case Structure
Quote:
|
Re: Case Structure
That's what your code does now.
It will revert when you let go of the button. The Select is just a special 2-case Case. There are easy ways to make the button toggle for either approach. |
Re: Case Structure
Quote:
https://www.google.com/url?q=https%3...-XtvmfI_oiGQqA Would that work? And I can code into periodic tasks a solenoid position switch without breaking the togglability right? |
Re: Case Structure
That Toggle example would work fine, and it'll work in Periodic Tasks.
|
Re: Case Structure
So if i have code in Periodic that resets the position to forward, the toggle will still work right?
|
| All times are GMT -5. The time now is 09:50. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi