Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Digital Inputs Driver Station (http://www.chiefdelphi.com/forums/showthread.php?t=75188)

dboisvert 24-02-2009 19:11

Digital Inputs Driver Station
 
So what I have right now is 2 light switched connected to the driver station.

I am having a hard time declaring them. I am not sure on the proper syntax.

Code:

DigitalInput *Switch1
DigitalInput *Switch2

Switch1 = new ?
Switch2 = new ?

Any help would be appreciated

Kristian Calhoun 24-02-2009 20:20

Re: Digital Inputs Driver Station
 
You shouldn't have to declare new Digital Inputs. Use the existing methods in the Driver Station class:

DriverStation *ds;
ds = new DriverStation();

ds->GetDigitalIn(channel);

byteit101 25-02-2009 20:09

Re: Digital Inputs Driver Station
 
Quote:

Originally Posted by Kristian Calhoun (Post 827488)
You shouldn't have to declare new Digital Inputs. Use the existing methods in the Driver Station class:

DriverStation *ds;
ds = new DriverStation();

ds->GetDigitalIn(channel);

DriverStation *ds;
ds = DriverStation::GetInstance();
We spent about an hour one meeting figuring this out :-)


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