Button mapping in robotContainer.java gone wrong (REAL)

Heya there! So, i’ve been finishing up some button mapping before we test our robot. However, upon assigning a button to a certain function it proceeds to be non functional to summarize it.

m_operatorController
.a() //this is the part that is not functioning
.whileTrue(
m_shootingOrIntaking.intaking()
);

The method a(EventLoop) in the type XboxController is not applicable for the arguments ()Java(67108979)

You need to make m_operatorController a CommandXboxController object instead of just an XboxController object

Sure! Let me try that. Thanks.
Yea it works, now I have a new issue.

m_operatorController
.a()
//this one is not functioning .whileTrue(
m_shootingOrIntaking.intaking()
);

The method whileTrue(Command) in the type Trigger is not applicable for the arguments (void)Java(67108979)

m_shootingOrIntaking.intaking() needs to be a command factory method that has a return type of Command.

Thank you so much! It works as intended now. Have a great day.

1 Like