Default commands must require their subsystem!

After realizing I shouldn’t have everything in just I decided to move our code over to a command based framework. Despite all the trouble its been, so far I cannot figure out this error. It seems to me everything is correct, and according to the official docs it is, so I’m wondering if anybody can spot me to where I am wrong:
Command - pastebin. com/NiFY9c8f
Subsystem - pastebin. com/7VNPQRJf - pastebin. com/KGCHbmKM - pastebin. com/j6wdtAat

_driving.setDefaultCommand(new driveJoystick());
public void driveJoystick(drivingSystem subsystem, double forward, double rotate, Boolean squareInput) {

You aren’t passing the drivingSystem subsystem when you create the default command, so it isn’t requiring it.

How would I do that? I can’t find anywhere in the docs where it says how to do it.

Figured it out, had to append _driving.

_driving.setDefaultCommand(new RunCommand(() -> _driving.setDriveParams((-driveStick.getRawAxis(1) * 0.5), (driveStick.getRawAxis(4) * 0.5), true), _driving));
1 Like

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