Go to Post why does everyone think im so violent? - Kim Masi [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 29-01-2011, 11:15
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Enhanced IO Error

Our team is trying to use the enhanced IO on the driver station this year because we are going to be using 13 digital inputs. I am having trouble getting the code correct I believe. When we try to enable the robot, the robot loses communication and we are seeing this error:

"Fatal error "IO is not attached or Enhanced IO is not enabled." in GetAnalogInRatio() in C:/windriver/workspace/WPILib/DriverStationEnhancedIO.cpp at 201"

I believe this error maybe because I am not setting everything up correctly in my code and it is crashing at run time. My problem is that the example code in the WPI User guide is setup for the SimpleRobot and we always use the IterativeRobot with the additional pointer stuff. Here's my current code:


under the class
Code:
class IterativeDemo : public IterativeRobot
{
	DriverStationEnhancedIO *ds;		// driver station object
under the constructor:
Code:
public:
	IterativeDemo(void)	{
	ds = &DriverStation::GetInstance()->GetEnhancedIO();	//new for 2011 - Configurable Pins
use example during the teleoperated:
Code:
		
HiLoSwitch = ds->GetDigital(1);	//Toggle switch for tower approach
GetTubeButton = ds->GetDigital(2);			//Button for Getting tube pickup
I suspect I am not constructing the ds variable correctly and everything is dying from there. I cannot find an example using the EnhancedIO driver station using the pointer method of variable handling that is done in IterativeRobot.

Can someone help us figure out what we are doing wrong. We'll get you whatever additional info you may need.
Reply With Quote
 


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 13:38.

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