Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
Hopefully fix main.yaml crash; add teamNumber=0 and gitignore the
wpilib_preferences.json file.

	modified:   .github/workflows/main.yml
	modified:   .gitignore
	modified:   .vscode/settings.json
	modified:   .wpilib/wpilib_preferences.json
	modified:   src/main/java/frc/robot/RobotContainer.java
  • Loading branch information
tbowers7 committed Oct 17, 2024
1 parent e5ba571 commit 0f30ad4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
# Runs a single command using the runners shell
- name: Compile and run tests on robot code
run: ./gradlew build
- run: ./gradlew spotlessCheck

# This workflow contains a job called "build" which is the main build
spotless:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,7 @@ out/
simgui*.json

# Version file
src/main/java/frc/robot/BuildConstants.java
src/main/java/frc/robot/BuildConstants.java

# Do not push changes to the wpilib_preferences,json file
wpilib_preferences.json
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
],
"java.test.defaultConfig": "WPIlibUnitTests",
"editor.indentSize": 2,
"editor.tabSize": 2,
"files.eol": "\n"
}
3 changes: 2 additions & 1 deletion .wpilib/wpilib_preferences.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "2024"
"projectYear": "2024",
"teamNumber": 0
}
8 changes: 7 additions & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public RobotContainer() {

/** Use this method to define your TeleOp commands. */
private void defineTeleopCommands() {

// Applies deadbands and inverts controls because joysticks
// are back-right positive while robot
// controls are front-left positive
Expand Down Expand Up @@ -168,8 +169,9 @@ private void defineTeleopCommands() {
: driveFieldOrientedDirectAngleSim);
}

/** Use this method to define your Autonomous commands. */
/** Use this method to define your Autonomous commands for use with PathPlanner / Choreo */
private void defineAutoCommands() {

NamedCommands.registerCommand(
"Zero", Commands.runOnce(() -> m_drivebase.zeroGyroWithAlliance()));
}
Expand All @@ -184,6 +186,7 @@ private void defineAutoCommands() {
* joysticks}.
*/
private void configureBindings() {

// Manually Re-Zero the Gyro
driverXbox.y().onTrue(Commands.runOnce(() -> m_drivebase.zeroGyroWithAlliance()));
}
Expand All @@ -194,17 +197,20 @@ private void configureBindings() {
* @return the command to run in autonomous
*/
public Command getAutonomousCommand() {

// An example command will be run in autonomous
return m_drivebase.getAutonomousCommand("New Auto");
// Use the ``autoChooser`` to define your auto path from the SmartDashboard
// return autoChooser.get();
}

public void setDriveMode() {

// drivebase.setDefaultCommand();
}

public void setMotorBrake(boolean brake) {

m_drivebase.setMotorBrake(brake);
}

Expand Down

0 comments on commit 0f30ad4

Please sign in to comment.