-
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' into Initial-Pivot
- Loading branch information
Showing
8 changed files
with
86 additions
and
43 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
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,44 @@ | ||
package frc.robot.constants; | ||
|
||
import edu.wpi.first.wpilibj.RobotController; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class RobotConstants { | ||
private Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
public static String kProtoSerialNumber = "030dbdd8"; | ||
public static boolean isCompBot = (!RobotController.getSerialNumber().equals(kProtoSerialNumber)); | ||
|
||
public static final int kTalonConfigTimeout = 10; // ms | ||
|
||
// Joysticks | ||
public static final double kJoystickDeadband = 0.1; | ||
|
||
// Roborio ID's | ||
public static final int kMinAutoSwitchID = 0; | ||
public static final int kMaxAutoSwitchID = 5; | ||
public static final int kEventInterlockID = 6; | ||
|
||
// Constants Different between Comp and Proto | ||
public static Double kWheelDiameterInches = 3.0; | ||
|
||
public RobotConstants() { | ||
if (isCompBot) { | ||
logger.info("Using Comp Robot Constants"); | ||
kWheelDiameterInches = CompConstants.kWheelDiameterInches; | ||
} else { | ||
logger.info("Using Proto Robot Constants"); | ||
kWheelDiameterInches = ProtoConstants.kWheelDiameterInches; | ||
} | ||
} | ||
|
||
public static class CompConstants { | ||
// Drive | ||
public static final Double kWheelDiameterInches = 3.0; | ||
} | ||
|
||
public static class ProtoConstants { | ||
// Drive | ||
public static final Double kWheelDiameterInches = 3.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
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