Hello, I am getting a couple errors when trying to program the POV button on our Xbox controller. The goal is when the up button or 0 degree button is pressed, it raises an arm up. However, I am getting two errors and I’m not sure how to fix them. The errors are
The constructor RunCommand(middle_extend::pov0, Climber) is undefinedJava(134217858)
The type Climber does not define pov0() that is applicable hereJava(603979903)
Any help on getting this to work would be appreciated.
I’m not sure what you mean, the line of code that’s having the issue is new
POVButton(operator, 0) .whenPressed(new RunCommand(middle_extend :: pov0,middle_extend));
i’m not sure if this helps but thanks for the response
I also wrote a when released function and I set that to be a 0 value so it stops running. This is how I have the button currently setup and it’s not working at all.
new JoystickButton(operator,Button.kBumperRight.value)
a) is it not working or is it throwing errors?
b) what’s hooks_back? (Or just send the java file)
c) send the Climber class because the previous errors were referencing it
The docs for RunCommand are asking for a Runnable and a Subsystem. The error message you posted is telling you that your usage isn’t providing a Runnable and a Subsystem.
The constructor RunCommand(middle_extend::pov0, Climber) is undefinedJava(134217858)
middle_extend::pov() is not a Runnable according to the compiler.