-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/WTMCRobotics/2024-Crescendo …
…into nstringham/run-build-on-ci
- Loading branch information
Showing
19 changed files
with
1,466 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# These files are auto generated by the WPILib VSCode extention | ||
vendordeps/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Class that organizes gains used when assigning values to slots | ||
*/ | ||
package frc.robot; | ||
|
||
public class Gains { | ||
|
||
/** | ||
* Pelvic | ||
*/ | ||
public double P; | ||
/** | ||
* Inflammatory | ||
*/ | ||
public double I; | ||
/** | ||
* Disease | ||
*/ | ||
public double D; | ||
public final double F; | ||
public final int IZONE; | ||
public double PEAK_OUTPUT; | ||
|
||
public Gains(double p, double i, double d, double f, int izone, double peakOutput) { | ||
P = p; | ||
I = i; | ||
D = d; | ||
F = f; | ||
IZONE = izone; | ||
PEAK_OUTPUT = peakOutput; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package frc.robot; | ||
|
||
import frc.robot.motor.MotorController; | ||
|
||
public class QuickActions { | ||
|
||
static MotorController leftParent; | ||
static MotorController leftChild; | ||
static MotorController rightParent; | ||
static MotorController rightChild; | ||
|
||
public static void setDriveMotors(MotorController leftParentMotor, MotorController rightParentMotor) { | ||
leftParent = leftParentMotor; | ||
rightParent = rightParentMotor; | ||
} | ||
|
||
public static void setAll(double percent) { | ||
leftParent.set(percent); | ||
rightParent.set(percent); | ||
} | ||
|
||
public static void stopAll() { | ||
leftParent.set(0.0); | ||
rightParent.set(0.0); | ||
} | ||
|
||
public static void turn(TurnDirection direction, double percent) { | ||
if (direction == TurnDirection.LEFT) { | ||
leftParent.set(-percent); | ||
rightParent.set(percent); | ||
} else if (direction == TurnDirection.RIGHT) { | ||
leftParent.set(percent); | ||
rightParent.set(-percent); | ||
} | ||
} | ||
|
||
public static void turnVelocity(TurnDirection direction, double percent) { | ||
if (direction == TurnDirection.LEFT) { | ||
leftParent.setVelocity(-percent); | ||
rightParent.setVelocity(percent); | ||
} else if (direction == TurnDirection.RIGHT) { | ||
leftParent.setVelocity(percent); | ||
rightParent.setVelocity(-percent); | ||
} | ||
} | ||
|
||
public enum TurnDirection { | ||
LEFT, | ||
RIGHT, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package frc.robot; | ||
|
||
import frc.robot.motor.MotorController; | ||
|
||
public class RobotMotors { | ||
|
||
public static void setupMotors(MotorController leftMotor, MotorController rightMotor) { | ||
leftMotor.setInverted(true); | ||
rightMotor.setInverted(false); | ||
} | ||
} |
Oops, something went wrong.