-
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.
- Loading branch information
Showing
51 changed files
with
5,840 additions
and
396 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"enableCppIntellisense": false, | ||
"currentLanguage": "java", | ||
"projectYear": "2024", | ||
"teamNumber": 2204 | ||
} | ||
"enableCppIntellisense": false, | ||
"currentLanguage": "java", | ||
"projectYear": "2024", | ||
"teamNumber": 2204 | ||
} |
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 @@ | ||
[] |
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,98 @@ | ||
{ | ||
"keyboardJoysticks": [ | ||
{ | ||
"axisConfig": [ | ||
{ | ||
"decKey": 65, | ||
"incKey": 68 | ||
}, | ||
{ | ||
"decKey": 87, | ||
"incKey": 83 | ||
}, | ||
{ | ||
"decKey": 69, | ||
"decayRate": 0.0, | ||
"incKey": 82, | ||
"keyRate": 0.009999999776482582 | ||
} | ||
], | ||
"axisCount": 3, | ||
"buttonCount": 4, | ||
"buttonKeys": [ | ||
90, | ||
88, | ||
67, | ||
86 | ||
], | ||
"povConfig": [ | ||
{ | ||
"key0": 328, | ||
"key135": 323, | ||
"key180": 322, | ||
"key225": 321, | ||
"key270": 324, | ||
"key315": 327, | ||
"key45": 329, | ||
"key90": 326 | ||
} | ||
], | ||
"povCount": 1 | ||
}, | ||
{ | ||
"axisConfig": [ | ||
{ | ||
"decKey": 74, | ||
"incKey": 76 | ||
}, | ||
{ | ||
"decKey": 73, | ||
"incKey": 75 | ||
} | ||
], | ||
"axisCount": 2, | ||
"buttonCount": 4, | ||
"buttonKeys": [ | ||
77, | ||
44, | ||
46, | ||
47 | ||
], | ||
"povCount": 0 | ||
}, | ||
{ | ||
"axisConfig": [ | ||
{ | ||
"decKey": 263, | ||
"incKey": 262 | ||
}, | ||
{ | ||
"decKey": 265, | ||
"incKey": 264 | ||
} | ||
], | ||
"axisCount": 2, | ||
"buttonCount": 6, | ||
"buttonKeys": [ | ||
260, | ||
268, | ||
266, | ||
261, | ||
269, | ||
267 | ||
], | ||
"povCount": 0 | ||
}, | ||
{ | ||
"axisCount": 0, | ||
"buttonCount": 0, | ||
"povCount": 0 | ||
} | ||
], | ||
"robotJoysticks": [ | ||
{ | ||
"guid": "78696e70757401000000000000000000", | ||
"useGamepad": true | ||
} | ||
] | ||
} |
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,12 @@ | ||
{ | ||
"NTProvider": { | ||
"types": { | ||
"/FMSInfo": "FMSInfo", | ||
"/SmartDashboard/Auto Choices": "String Chooser", | ||
"/SmartDashboard/VisionSystemSim-main/Sim Field": "Field2d" | ||
} | ||
}, | ||
"NetworkTables Info": { | ||
"visible": true | ||
} | ||
} |
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,17 @@ | ||
package org.rambots; | ||
|
||
/** Automatically generated file containing build version information. */ | ||
public final class BuildConstants { | ||
public static final String MAVEN_GROUP = ""; | ||
public static final String MAVEN_NAME = "frc-2024"; | ||
public static final String VERSION = "unspecified"; | ||
public static final int GIT_REVISION = 1; | ||
public static final String GIT_SHA = "b55720df88c29f28dfcd9e76a0256378797c67ac"; | ||
public static final String GIT_DATE = "2024-01-12 08:28:13 PST"; | ||
public static final String GIT_BRANCH = "james/swerve"; | ||
public static final String BUILD_DATE = "2024-03-02 15:32:31 PST"; | ||
public static final long BUILD_UNIX_TIME = 1709422351326L; | ||
public static final int DIRTY = 1; | ||
|
||
private BuildConstants() {} | ||
} |
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,72 @@ | ||
// Copyright 2021-2024 FRC 6328 | ||
// http://github.com/Mechanical-Advantage | ||
// | ||
// This program is free software; you can redistribute it and/or | ||
// modify it under the terms of the GNU General Public License | ||
// version 3 as published by the Free Software Foundation or | ||
// available in the root directory of this project. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
package org.rambots; | ||
|
||
import edu.wpi.first.wpilibj.RobotBase; | ||
import org.rambots.util.Alert; | ||
|
||
/** | ||
* The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean | ||
* constants. This class should not be used for any other purpose. All constants should be declared | ||
* globally (i.e. public static). Do not put anything functional in this class. | ||
* | ||
* <p>It is advised to statically import this class (or one of its inner classes) wherever the | ||
* constants are needed, to reduce verbosity. | ||
*/ | ||
public final class Constants { | ||
public static final int loopPeriodMs = 20; | ||
private static RobotType robotType = RobotType.SIMBOT; | ||
public static final boolean tuningMode = true; | ||
public static final boolean characterizationMode = false; | ||
|
||
public static RobotType getRobot() { | ||
if (RobotBase.isReal() && robotType == RobotType.SIMBOT) { | ||
new Alert("Invalid Robot Selected, using COMPBOT as default", Alert.AlertType.ERROR) | ||
.set(true); | ||
robotType = RobotType.COMPBOT; | ||
} | ||
return robotType; | ||
} | ||
|
||
public static Mode getMode() { | ||
return switch (getRobot()) { | ||
case COMPBOT -> RobotBase.isReal() ? Mode.REAL : Mode.REPLAY; | ||
case SIMBOT -> Mode.SIM; | ||
}; | ||
} | ||
|
||
public enum Mode { | ||
/** Running on a real robot. */ | ||
REAL, | ||
|
||
/** Running a physics simulator. */ | ||
SIM, | ||
|
||
/** Replaying from a log file. */ | ||
REPLAY | ||
} | ||
|
||
public enum RobotType { | ||
SIMBOT, | ||
COMPBOT | ||
} | ||
|
||
/** Checks whether the robot the correct robot is selected when deploying. */ | ||
public static void main(String... args) { | ||
if (robotType == RobotType.SIMBOT) { | ||
System.err.println("Cannot deploy, invalid robot selected: " + robotType.toString()); | ||
System.exit(1); | ||
} | ||
} | ||
} |
Oops, something went wrong.