View Single Post
  #2   Spotlight this post!  
Unread 22-01-2015, 23:08
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,574
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Double Solenoid error in Eclipse

Quote:
Originally Posted by BananaKing1378 View Post
Hello! We are currently trying to set up a double acting solenoid in Eclipse.

First we create a DoubleSolenoid called Solenoid with the following line:
DoubleSolenoid Solenoid;

Next we construct it:
Solenoid(0,1);

Next, we try to set the Solenoid to forward. This is where the problem occurs. We are told that there is no member named "Forward". We have tried various ways of calling "set". Currently, we are using:

Solenoid.Set(DoubleSolenoid::kForward);
Sounds like you're using C++, since :: is not part of java.

Doing a bit of googling, I found that kForward is actually a member of the class "Value" defined within DoubleSolenoid. I have never written any c++, but as I read the docs online, my best guess at this line would be:
Solenoid.Set(DoubleSolenoid::Value.kForward);
Reply With Quote