Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DriveDistanceOffBoard Example Doesn't Seem to Work with Controller #3108

Closed
modelmat opened this issue Jan 20, 2021 · 1 comment · Fixed by #3199
Closed

DriveDistanceOffBoard Example Doesn't Seem to Work with Controller #3108

modelmat opened this issue Jan 20, 2021 · 1 comment · Fixed by #3199
Labels
type: bug Something isn't working.

Comments

@modelmat
Copy link
Contributor

Describe the bug
I don't seem to be able to use the XboxController on Port 1 to control the drivetrain using the default command.

To Reproduce
Steps to reproduce the behavior:

  1. Build examples and run the examples
  2. Run the DriveDistanceOffboardexampl
  3. Using an xboxcontroller connected to port two move the sticks and observed nothing happening on the DifferentialDrive widget.

Expected behavior
The robot moves in ArcadeDrive

Additional context
C++ - not sure if this happens in Java.

m_drive.SetDefaultCommand(frc2::RunCommand(
[this] {
m_drive.ArcadeDrive(
m_driverController.GetY(frc::GenericHID::kLeftHand),
m_driverController.GetX(frc::GenericHID::kRightHand));
},
{&m_drive}));

@modelmat modelmat added the type: bug Something isn't working. label Jan 20, 2021
@prateekma
Copy link
Member

This is because the Set() method of the ExampleSmartMotorController class doesn't do anything. A potential fix would be to store the set value in a variable and return that in Get() so that it's visible in LW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants