![]() |
Using DS Virtrual switches to select autonomous modes
1. Is it possible?
2. How do you read the values from the Driver Station in the program? 3. To do this for autonomous, where do I need to put the code that says to read the inputs? I THINK it has to be done like this DriverStation *ds; ds = new DriverStation; bool in1 = ds->GetDIO(1); bool in2 = ds->GetDIO(2); (not sure if they are called DIO...) As always, any help is appreciated, alot of times once I figure something simple out, like where to put the code, everything else makes sense! |
Re: Using DS Virtrual switches to select autonomous modes
Put the code anywhere you want to read the inputs. Unlike previous years, the Driver Station inputs will not be forced to off/neutral during autonomous enabled. The values will not change; they will reflect the states of the switches immediately before autonomous enabled began.
|
Re: Using DS Virtrual switches to select autonomous modes
i would put the code either in disabledperiodic, autonomousinit, or just right where you need the value (can't say without knowing more on how your code is structured)
as for reading in the values i want to say its: DriverStation *ds; ds=DriverStation::GetInstance(); ds->GetDigitalIn(1); ds->GetDigitalIn(2); |
| All times are GMT -5. The time now is 13:49. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi