You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,16 @@
2
2
3
3
Code for FRC 2036 Black Knights' 2020 Infinite Recharge robot.
4
4
5
+
## Environment
6
+
This project is most compatible with Java 11, which is
7
+
not the most recent version of Java.
8
+
9
+
It is
10
+
recommended to use [jEnv](https://github.com/jenv/jenv)
11
+
to switch between Java versions on Mac OS and Linux.
12
+
I followed [these](https://chamikakasun.medium.com/how-to-manage-multiple-java-version-in-macos-e5421345f6d0)
13
+
instructions to set up jEnv on macOS Big Sur.
14
+
5
15
## Building
6
16
7
17
This project uses gradle as its build system. The GradleRIO plugin provides a wide number of FRC specific gradle commands (see [here](https://github.com/wpilibsuite/GradleRIO) for details).
@@ -15,7 +25,7 @@ Deploying and displaying the log require your computer to be connected to the ro
15
25
16
26
Passing the `--offline` flag to gradle will prevent it from trying to update and/or download dependencies, which can be useful at competition.
17
27
18
-
It is **highly recommenced** to use intellij when working on the code. VSCode, though it is the officially supported editor, provides *very* limited code completion. Intellij provides excellent code completion, especially for kotlin.
28
+
It is **highly recommended** to use intellij when working on the code. VSCode, though it is the officially supported editor, provides *very* limited code completion. Intellij provides excellent code completion, especially for kotlin.
19
29
20
30
## FRC Documentation
21
31
The documentation for the FRC Control System can be found [here](https://docs.wpilib.org/en/latest/). These are very useful to refer to.
* periodic methods (other than the scheduler calls). Instead, the structure of the robot
33
33
* (including subsystems, commands, and button mappings) should be declared here.
34
34
*/
35
+
36
+
35
37
classRobotContainer {
36
38
val sch =CommandScheduler.getInstance()
37
39
var m_autoCommandChooser:SendableChooser<Command> =SendableChooser()
@@ -56,14 +58,15 @@ class RobotContainer {
56
58
val motorsLeft =SpeedControllerGroup(motorFrontLeft, motorBackLeft)
57
59
val motorsRight =SpeedControllerGroup(motorFrontRight, motorBackRight)
58
60
61
+
val visionToggle =VisionToggleSubsystem()
59
62
60
63
val gyro =AHRS()
61
64
val leftDrivetrainEncoder =Encoder(Constants.leftDrivetrainEncoderPortA, Constants.leftDrivetrainEncoderPortB, Constants.kDrivetrainEncoderAReversed)
62
65
val rightDrivetrainencoder =Encoder(Constants.rightDrivetrainEncoderPortA, Constants.rightDrivetrainEncoderPortB, Constants.kDrivetrainEncoderBReversed)
63
66
64
67
val drivetrain =DrivetrainSubsystem(motorsLeft, motorsRight, gyro, leftDrivetrainEncoder, rightDrivetrainencoder)
65
68
val shooter =ShooterSubsystem(CANSparkMax(Constants.kShooterPort, MotorType.kBrushless))
66
-
val intake =IntakeSubsystem(WPI_TalonSRX(Constants.kIntakePort), WPI_VictorSPX(Constants.kIntake2Port))
69
+
val intake =IntakeSubsystem(WPI_TalonSRX(Constants.kIntakePort), WPI_VictorSPX(Constants.kIntake2Port), visionToggle)
67
70
68
71
val indexer =IndexerSubsystem(WPI_TalonSRX(Constants.kIndexerPort))
69
72
val gate =GateSubsystem(WPI_TalonSRX(Constants.kGatePort), ColorSensorV3(I2C.Port.kOnboard))
0 commit comments