Hi, So I am new to programming and I have been stuck on this one issue with coding: xbox controllers…
So basically here is an rundown on what I am trying to achieve:
I am trying to program an xbox controller to activate commands with the buttons and I am getting confused based off of “boolean” and “double”. Every time i set my command like this:
@Override
public void execute() {
// double y = RobotContainer.stickDriver.getY();
boolean spin = RobotContainer.oi.oController.getTopPressed();
RobotContainer.cellIntake.intakeSpinIn(spin);
It comes up with the error: The method intakeSpinIn(double) in the type CellIntake is not applicable for the arguments (boolean)Java(67108979)
And when i switch it to:
double spin = RobotContainer.oi.oController.getTopPressed():
It comes up with this error: Type mismatch: cannot convert from boolean to doubleJava(16777233)
I need help! I’m not sure if this amount of code will help explain this but let me know if you need some more extra detail.
Thanks so much!