Some of the code that I have tried thus far is:
Code:
//code trial 1
Trigger DT1 = new Joystick.getTrigger(DriveStick);
//code trial 2
package edu.wpi.first.Command_Learner;
import edu.wpi.first.wpilibj.Joystick;
public class OI {
Joystick DriveStick = new Joystick(1);
Joystick SecondaryStick = new Joystick(2);
public OI(){
if(DriveStick.getTrigger()){
LauncherSpinWheels();
}
else{
LauncherStopWheels();
}
}
}
//code trial 3
package edu.wpi.first.Command_Learner;
import edu.wpi.first.Command_Learner.commands.LauncherSpinWheels;
import edu.wpi.first.wpilibj.Joystick;
public class OI {
Joystick DriveStick = new Joystick(1);
Joystick SecondaryStick = new Joystick(2);
public boolean ST1;
public OI(){
ST1 = DriveStick.getTrigger();
if(ST1=true){
new LauncherSpinWheels();}
I have been working on this more tonight and think I have gotten close in my 3rd trial of code(seen above). The only issue I am having is that the line with the command "LauncherSpinWheels." In netbeans it underlines in yellow indicating an error and says "New Instance ignored." If you need more in terms of my code please just let me know.
As for the Joystick, I am trying to get the trigger off of an attack 3 Logitech joystick(so it's a Boolean trigger).