Go to Post I am surprised at the relative conservative capability you described on our 2006 machine. As for the 2007 machine, in anticipation of an aquatic game, we have completed a robot that "walks on water" and are well along with one that can "part the sea". - Bill Beatty [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-03-2010, 01:08
Kyledoo Kyledoo is offline
Registered User
FRC #2603
 
Join Date: Jan 2010
Location: Ohio
Posts: 24
Kyledoo is an unknown quantity at this point
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!
Reply With Quote
  #2   Spotlight this post!  
Unread 26-03-2010, 09:35
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 26-03-2010, 22:25
Zme Zme is offline
Registered User
FRC #2619
 
Join Date: Jan 2009
Location: Michigan
Posts: 83
Zme is on a distinguished road
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);
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DIP switches for autonomous modes windell747 Electrical 17 24-03-2010 18:20
problems with using switches for autonomous ssica_jj NI LabVIEW 21 13-03-2010 21:39
Selecting autonomous modes using FRC PC Dashboard ellisk C/C++ 5 07-02-2010 10:31
multiple autonomous modes using easyc cerberus170 Programming 3 20-02-2007 15:01
Good Switch For Autonomous Mode Select misterfoo Electrical 11 19-03-2006 16:37


All times are GMT -5. The time now is 15:18.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi