![]() |
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::DigitalOutput(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? |
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).
|
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. |
| All times are GMT -5. The time now is 02:41. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi