Go to Post Holy cow! Five years in FIRST and it only gets better! Skyway has supplied wheels to FIRST for ten years. Ten years ago Dean called Ken for wheels. Ken said yes. Man, we love helping you guys and gals get good wheels. ;) Bart at Skywaywheels.com - SkywayWheels [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 23-01-2009, 14:35
FRC1672's Avatar
FRC1672 FRC1672 is offline
Team 1672
FRC #1672 (Mahwah Robo T-Birds)
 
Join Date: Jan 2009
Rookie Year: 2003
Location: Mahwah
Posts: 29
FRC1672 is on a distinguished road
Issue with DS DigitalOutput

We were testing our digital output and used the set method from DigitalOutput.ccp
Code:

/**
* Set the value of a digital output.
* Set the value of a digital output to either one (true) or zero (false).
*/
void DigitalOutput::Set(UINT32 value)
{
m_module->SetDIO(m_channel, value);
}

we used:
set(0)
and set(1)

both gave us issues while building and compiling.

Code:

/**
* Create an instance of a digital output.
* Create an instance of a digital output given a slot and channel.
*/
DigitalOutput:igitalOutput(UINT32 slot, UINT32 channel)
{
InitDigitalOutput(slot, channel);
}

I believe our issue was with creating DigitalOutput object. Which slot and channel should we enter to reference?
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2009, 11:08
Kruuzr Kruuzr is offline
Mentor - electrical, software
AKA: Steve Cote
FRC #1922 (Ozram)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Henniker, NH
Posts: 33
Kruuzr has a spectacular aura aboutKruuzr has a spectacular aura about
Re: Issue with DS DigitalOutput

Actually, I believe your issue is with case. If you did actually use set(0); and set(1);, the compiler would not recognize the code. You would need to use Set(0); and Set(1); (C/C++ is case sensitive).
Reply With Quote
  #3   Spotlight this post!  
Unread 29-01-2009, 11:37
heydowns's Avatar
heydowns heydowns is offline
Registered User
AKA: Jeff Downs
FRC #1511 (Rolling Thunder)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Ra-Cha-Cha
Posts: 142
heydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond reputeheydowns has a reputation beyond repute
Re: Issue with DS DigitalOutput

Are you trying to change outputs on the cRIO/Robot or on the DS? Your post title said DS.

If that's the case, then you don't want to use the DigitalOutput class. Instead, have a look at the DriverStation class. There are functions in there to set the DS digital outputs.
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
Issue with Color Tracking Example (C/C++) and with Counters, Encoders, and Ultrasonic BradAMiller Programming 3 19-01-2009 21:24
Interrupt issue with new code EHaskins Programming 6 05-01-2008 00:27
A small issue with our Mecanums AGWSPilot Technical Discussion 15 18-03-2007 02:11
Issue with CMUCam2 Demo application Bio LabView and Data Acquisition 12 21-01-2006 16:08


All times are GMT -5. The time now is 03:17.

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