|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Double Solenoid error in Eclipse
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); |
|
#2
|
|||||
|
|||||
|
Re: Double Solenoid error in Eclipse
Quote:
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); |
|
#3
|
|||
|
|||
|
Re: Double Solenoid error in Eclipse
Quote:
DoubleSolenoid::kForward Keep in mind that if you should be able to type DoubleSolenoid, the two colons and pause, Elipse should list members of DoubleSolenoid for you. I believe the constants appear near the end. Last edited by JefferMC : 25-01-2015 at 17:33. Reason: remove a period that may cause confusion. |
|
#4
|
||||
|
||||
|
Re: Double Solenoid error in Eclipse
I'm voting with Alan on this one - change the name of your 'variable' Solenoid to something else. Both of those names are class names. That could be problematic.
|
|
#5
|
|||||
|
|||||
|
Re: Double Solenoid error in Eclipse
Just a thought -- is the name "Solenoid" conflicting with a library class name? Pick something a little more descriptive, like "gearselect" or "toteflipper" and see if the error remains.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|