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

configure button bindings #19

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-1"
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-3"
id "com.peterabeles.gversion" version "1.10"
id "com.diffplug.spotless" version "6.25.0"
id "io.freefair.lombok" version "8.4"
Expand Down
20 changes: 11 additions & 9 deletions src/main/java/frc/robot/BuildConstants.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
package frc.robot;

/** Automatically generated file containing build version information. */
/**
* Automatically generated file containing build version information.
*/
public final class BuildConstants {
public static final String MAVEN_GROUP = "";
public static final String MAVEN_NAME = "4829-BaseRobotCode";
public static final String MAVEN_NAME = "4829-BaseRobotCode-1";
public static final String VERSION = "unspecified";
public static final int GIT_REVISION = 15;
public static final String GIT_SHA = "f6cf5383d95d1116029cbb69e2db020295f5c2bf";
public static final String GIT_DATE = "2024-11-09 19:29:39 EST";
public static final String GIT_BRANCH = "actual-unit-tests";
public static final String BUILD_DATE = "2024-11-09 19:50:39 EST";
public static final long BUILD_UNIX_TIME = 1731199839115L;
public static final int GIT_REVISION = 16;
public static final String GIT_SHA = "96078f7f7eb8a26dbec35e3ee1abb98234dcca13";
public static final String GIT_DATE = "2024-12-18 17:32:16 EST";
public static final String GIT_BRANCH = "configurbindingsmaxc";
public static final String BUILD_DATE = "2024-12-20 16:40:11 EST";
public static final long BUILD_UNIX_TIME = 1734730811073L;
public static final int DIRTY = 1;

private BuildConstants() {}
private BuildConstants(){}
}
11 changes: 9 additions & 2 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@

import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands;

import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import edu.wpi.first.wpilibj2.command.button.Trigger;
import frc.robot.commands.drive.DriveCommand;
public class RobotContainer {
CommandXboxController driverController = new CommandXboxController(4);
Trigger driverAButton = driverController.a();
public RobotContainer() {
configureBindings();
}

private void configureBindings() {}
private void configureBindings() {
driverAButton.onTrue(new DriveCommand(null, null, null, null, null, driverAButton, driverAButton));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we passing in null to this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bro it was hard enough to get @mychenezpz to write a button binding, id be proud of him for doing that lol. its null bc he didnt get to it ig

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ill write some better examples when i have time tmrw


}

public Command getAutonomousCommand() {
return Commands.print("No autonomous command configured");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class BrushlessMotorSim {
*
* @param motor the {@link DCMotor} model representing the motor(s) in the simulation
* @param gearRatio the gear ratio of the mechanism; values greater than 1 indicate a reduction
* @param loadIntertiaJKgMetersSquared the rotational inertia of the mechanism, in kg·m²
* @param loadIntertiaJKgMetersSquared the rotational inertia of the mechanism, in kg*m^2
* @param frictionVoltage the voltage required to overcome friction and make the mechanism move
*/
public BrushlessMotorSim(
Expand Down
Loading