-
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.
* Start drive train code Co-authored-by: Julian Sprague <julspr@users.noreply.github.com> Co-authored-by: Dogloverblue <Dogloverblue@users.noreply.github.com> Co-authored-by: nguyenjerry2608@gmail.com <nguyenjerry2608@gmail.com> Co-authored-by: 222mi.ash@gmail.com <222mi.ash@gmail.com> Co-authored-by: atsuke-axolotl <atsuke-axolotl@users.noreply.github.com> Co-authored-by: Patricia-R <Patricia-R@users.noreply.github.com> * Fix April Tag size * make a class for simply moving the robot * improve vision * Add Jack's wrapper class Co-authored-by: DogLoverPink <DogLoverPink@users.noreply.github.com> Co-authored-by: BookSerpent <BookSerpent@users.noreply.github.com> Co-authored-by: Julian Sprague <julspr@users.noreply.github.com> Co-authored-by: 222mi.ash@gmail.com <222mi.ash@gmail.com> * Vision Improvments * Add mechanical wheel test Co-authored-by: Julian Sprague <julspr@users.noreply.github.com> Co-authored-by: nguyenjerry2608@gmail.com <nguyenjerry2608@gmail.com> Co-authored-by: 222mi.ash@gmail.com <222mi.ash@gmail.com> --------- Co-authored-by: Julian Sprague <julspr@users.noreply.github.com> Co-authored-by: Dogloverblue <Dogloverblue@users.noreply.github.com> Co-authored-by: nguyenjerry2608@gmail.com <nguyenjerry2608@gmail.com> Co-authored-by: 222mi.ash@gmail.com <222mi.ash@gmail.com> Co-authored-by: atsuke-axolotl <atsuke-axolotl@users.noreply.github.com> Co-authored-by: Patricia-R <Patricia-R@users.noreply.github.com> Co-authored-by: DogLoverPink <DogLoverPink@users.noreply.github.com> Co-authored-by: BookSerpent <BookSerpent@users.noreply.github.com>
- Loading branch information
1 parent
9180bc5
commit 8925289
Showing
18 changed files
with
1,464 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
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.