Help with pov button programming on XBox controller

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.

Send the full class file, the formatting seems to be a little off

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’m not sure that RunCommand is what you want. How do you stop the arm?

Since the error is referencing the Climber class you’re going to have to provide more context.

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)

  .whileHeld(()-> Climber.ClimberBot(Constants.HOOKS_BACK_SPEED), hooks_back)

  .whenReleased(()-> Climber.ClimberBot(0), hooks_back);

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

Can you put your code in github to see it all?

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.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.