Go to Post It's that science and technology inspiration stuff - never know where it'll take you. :) - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 16-02-2011, 16:13
xinchi.he's Avatar
xinchi.he xinchi.he is offline
Registered User
AKA: Xinchi He
FRC #1209
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Tulsa,OK
Posts: 9
xinchi.he is an unknown quantity at this point
Send a message via MSN to xinchi.he
How does DriverStation.getInstance().getDigitalInput(1) work?

Hi.

I am confused with this method. For the lane tracking, why we need to receive digital values from driver station? How does this work? I am testing our sensors with the example code that provided by the templates. I can receive the changing values with DigitalInput.get(), but the output for those three sensors with DriverStation.getInstance().getDigitalInput() are all true without changing.

I am really confused. I need your help. Thank you!
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2011, 16:48
Robby Unruh's Avatar
Robby Unruh Robby Unruh is offline
*insert random dial-up tone here*
FRC #3266 (Robots R Us)
Team Role: Coach
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Eaton, OH
Posts: 338
Robby Unruh will become famous soon enough
Re: How does DriverStation.getInstance().getDigitalInput(1) work?

Quote:
Originally Posted by xinchi.he View Post
Hi.

I am confused with this method. For the lane tracking, why we need to receive digital values from driver station? How does this work? I am testing our sensors with the example code that provided by the templates. I can receive the changing values with DigitalInput.get(), but the output for those three sensors with DriverStation.getInstance().getDigitalInput() are all true without changing.

I am really confused. I need your help. Thank you!
The sensors might be a reverse bool, where if they're false it strikes up a nice ol' conversation with your motors (if you programmed them that way.)

That's just a complete guess, though. Haven't tried looking through the code at all.
__________________
[Robots R Us #3266]
2015: Georgia Southern Classic (Winners / Thanks 1319 & 1648!), Queen City
2014: Crossroads, Queen City
2013: Buckeye, Queen City, Crossroads
2012: Buckeye, Queen City

2011: Buckeye
2010: Buckeye
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2011, 17:08
Patrickwhite's Avatar
Patrickwhite Patrickwhite is offline
May the North be with you
FRC #0610 (The Coyotes)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Toronto
Posts: 88
Patrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of light
Re: How does DriverStation.getInstance().getDigitalInput(1) work?

The getDigitalInput() method in the example code is for user input, using the actual software driver station buttons to switch between forked and straight, and to take the left or right fork. They have nothing to do with the actual photoreceptors, and won't be changed by their state.

If you go to the I/O tab on your Driver Station, you will see the buttons.
__________________
while(!going.isTough());
tough.exit();

What will we do tonight, Warfa?
The same thing we do every night, Patrick. Sit and wait for Electrical.
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


All times are GMT -5. The time now is 22: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