In c++, whenever you have a conditional statement, you need curly braces around the code to be executed if the condition is met if the code is longer than one line. Your first statement should become:
if (Controller.ButtonL1.pressing()){
LeftWing.set(true);
RightWing.set(true);
}
Here is some code we use that works fine. If this does not fix the issue I would try using a different solenoid.
vex::digital_out LeftWing = vex::digital_out(Brain.ThreeWirePort.A);
vex::digital_out RightWing = vex::digital_out(Brain.ThreeWirePort.B);
int main() {
while (true) {
if (Controller.ButtonL1.pressing()) {
LeftWing.set(true); // Open the solenoid
} else {
LeftWing.set(false); // Close the solenoid
if (Controller.ButtonL2.pressing()) {
RightWing.set(true); // Open the solenoid
} else {
RightWing.set(false); // Close the solenoid
}
}
}