Skip to content

Commit

Permalink
Merge branch 'main' of github.com:StuyPulse/PulseCrewPrep
Browse files Browse the repository at this point in the history
  • Loading branch information
zixifeng12 committed Mar 21, 2024
2 parents 467a2a7 + cc7d264 commit f8eb462
Show file tree
Hide file tree
Showing 5 changed files with 287 additions and 676 deletions.
18 changes: 9 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ allprojects {

// Set this to the latest version of StuyLib.
// You can check here: https://github.com/StuyPulse/StuyLib/releases.
final String STUYLIB_VERSION = 'v2024.1.5'
// final String STUYLIB_VERSION = 'v2024.1.5'

def ROBOT_MAIN_CLASS = "com.stuypulse.robot.Main"

Expand Down Expand Up @@ -78,7 +78,7 @@ dependencies {

testImplementation 'junit:junit:4.13.1'

implementation "com.github.StuyPulse:StuyLib:${STUYLIB_VERSION}";
// implementation "com.github.StuyPulse:StuyLib:${STUYLIB_VERSION}";
}

// Simulation configuration (e.g. environment variables).
Expand All @@ -97,13 +97,13 @@ spotless {
endWithNewline()

importOrder(
'com.stuypulse.stuylib',
'com.stuypulse.constants',
'com.stuypulse.subsystems',
'com.stuypulse.commands',
'com.stuypulse.commands.auton',
'com.stuypulse.util',
'com.stuypulse',
// 'com.stuypulse.stuylib',
// 'com.stuypulse.constants',
// 'com.stuypulse.subsystems',
// 'com.stuypulse.commands',
// 'com.stuypulse.commands.auton',
// 'com.stuypulse.util',
// 'com.stuypulse',
'edu.wpi',
'com.revrobotics'
)
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/com/stuypulse/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import com.stuypulse.robot.commands.auton.DoNothingAuton;
import com.stuypulse.robot.constants.Ports;
import com.stuypulse.stuylib.input.Gamepad;
import com.stuypulse.stuylib.input.gamepads.AutoGamepad;

import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
Expand All @@ -17,8 +15,9 @@
public class RobotContainer {

// Gamepads
public final Gamepad driver = new AutoGamepad(Ports.Gamepad.DRIVER);
public final Gamepad operator = new AutoGamepad(Ports.Gamepad.OPERATOR);
// public final Gamepad driver = new AutoGamepad(Ports.Gamepad.DRIVER);
// public final Gamepad operator = new AutoGamepad(Ports.Gamepad.OPERATOR);
// replace these with non stuylib controllers

// Subsystem

Expand Down
25 changes: 12 additions & 13 deletions src/main/java/com/stuypulse/robot/constants/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

package com.stuypulse.robot.constants;

import com.stuypulse.stuylib.network.SmartBoolean;
import com.stuypulse.stuylib.network.SmartNumber;

import edu.wpi.first.math.util.Units;

/*-
Expand All @@ -18,28 +15,30 @@
*/
public interface Settings {

SmartBoolean DEBUG_MODE = new SmartBoolean("Debug Mode", true);

Boolean DEBUG_MODE = true;

public interface TankDrive {
// If speed is below this, use quick turn
SmartNumber BASE_TURNING_SPEED = new SmartNumber("Driver Settings/Base Turn Speed", 0.45);

double BASE_TURNING_SPEED = 0.45;

// Low Pass Filter and deadband for Driver Controls
SmartNumber SPEED_DEADBAND = new SmartNumber("Driver Settings/Speed Deadband", 0.00);
SmartNumber ANGLE_DEADBAND = new SmartNumber("Driver Settings/Turn Deadband", 0.00);
double SPEED_DEADBAND = 0.00;
double ANGLE_DEADBAND = 0.00;

double SPEED_POWER = 2.0;
double ANGLE_POWER = 1.0;

SmartNumber SPEED_POWER = new SmartNumber("Driver Settings/Speed Power", 2.0);
SmartNumber ANGLE_POWER = new SmartNumber("Driver Settings/Turn Power", 1.0);
double SPEED_FILTER = 0.125;
double ANGLE_FILTER = 0.005;

SmartNumber SPEED_FILTER = new SmartNumber("DriPver Settings/Speed Filtering", 0.125);
SmartNumber ANGLE_FILTER = new SmartNumber("Driver Settings/Turn Filtering", 0.005);

boolean USING_GYRO = true;

// Width of the robot
// update
double TRACK_WIDTH = Units.inchesToMeters(26.9);

boolean USING_GYRO = true;
}

}
Loading

0 comments on commit f8eb462

Please sign in to comment.