-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Swerve to common repo
- Loading branch information
Showing
15 changed files
with
426 additions
and
247 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package common.core.controllers; | ||
|
||
/** | ||
* Stores PID and feedforward constants. | ||
*/ | ||
public class PIDFFConfig { | ||
|
||
public double kP; | ||
public double kI; | ||
public double kD; | ||
public double kS; | ||
public double kV; | ||
public double kA; | ||
public double kG; | ||
|
||
/** | ||
* Creates a config to set PID and feedforward constants. | ||
* @param kP The proportional coefficient. | ||
* @param kI The integral coefficient. | ||
* @param kD The derivative coefficient. | ||
* @param kS The static gain. | ||
* @param kV The velocity gain. | ||
* @param kA The acceleration gain. | ||
* @param kG The gravity gain. | ||
*/ | ||
public PIDFFConfig(double kP, double kI, double kD, double kS, double kV, double kA, double kG) { | ||
this.kP = kP; | ||
this.kI = kI; | ||
this.kD = kD; | ||
this.kS = kS; | ||
this.kV = kV; | ||
this.kA = kA; | ||
this.kG = kG; | ||
} | ||
|
||
/** | ||
* Creates a config to set PID and feedforward constants. | ||
* @param kP The proportional coefficient. | ||
* @param kI The integral coefficient. | ||
* @param kD The derivative coefficient. | ||
* @param kS The static gain. | ||
* @param kV The velocity gain. | ||
* @param kG The gravity gain. | ||
*/ | ||
public PIDFFConfig(double kP, double kI, double kD, double kS, double kV, double kG) { | ||
this(kP, kI, kD, kS, kV, 0, kG); | ||
} | ||
|
||
/** | ||
* Creates a config to set PID constants. | ||
* @param kP The proportional coefficient. | ||
* @param kI The integral coefficient. | ||
* @param kD The derivative coefficient. | ||
*/ | ||
public PIDFFConfig(double kP, double kI, double kD) { | ||
this(kP, kI, kD, 0, 0, 0, 0); | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
src/main/java/common/core/NAR_Robot.java → ...main/java/common/core/misc/NAR_Robot.java
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package common.core; | ||
package common.core.misc; | ||
|
||
import java.lang.reflect.Method; | ||
import java.util.PriorityQueue; | ||
|
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
Oops, something went wrong.