|
4 | 4 |
|
5 | 5 | package frc.robot; |
6 | 6 |
|
| 7 | +import ch.qos.logback.classic.util.ContextInitializer; |
7 | 8 | import edu.wpi.first.math.geometry.Rotation2d; |
| 9 | +import edu.wpi.first.wpilibj.DigitalInput; |
8 | 10 | import edu.wpi.first.wpilibj.DriverStation.Alliance; |
9 | 11 | import edu.wpi.first.wpilibj.Joystick; |
10 | 12 | import edu.wpi.first.wpilibj.RobotController; |
@@ -103,6 +105,14 @@ public class RobotContainer { |
103 | 105 | private HandSubsystem handSubsystem; |
104 | 106 |
|
105 | 107 | public RobotContainer() { |
| 108 | + DigitalInput eventFlag = new DigitalInput(10); |
| 109 | + boolean isEvent = eventFlag.get(); |
| 110 | + if (isEvent && Constants.isCompBot) { |
| 111 | + // must be set before the first call to LoggerFactory.getLogger(); |
| 112 | + System.setProperty(ContextInitializer.CONFIG_FILE_PROPERTY, "logback-event.xml"); |
| 113 | + System.out.println("Event Flag Removed - logging to file in ~lvuser/logs/"); |
| 114 | + } |
| 115 | + |
106 | 116 | constants = new Constants(); |
107 | 117 | handSubsystem = new HandSubsystem(constants); |
108 | 118 | intakeSubsystem = new IntakeSubsystem(constants); |
@@ -145,14 +155,16 @@ public RobotContainer() { |
145 | 155 | // FIX ME |
146 | 156 | robotStateSubsystem.setAllianceColor(Alliance.Blue); |
147 | 157 |
|
148 | | - configureTelemetry(); |
149 | | - configurePaths(); |
| 158 | + // configurePaths(); |
150 | 159 | configureDriverButtonBindings(); |
151 | 160 | configureOperatorButtonBindings(); |
152 | 161 | configureMatchDashboard(); |
153 | | - configurePitDashboard(); |
154 | | - new Trigger(RobotController::getUserButton) |
155 | | - .onTrue(new HealthCheckCommand(driveSubsystem, intakeSubsystem)); |
| 162 | + if (!isEvent) { |
| 163 | + configureTelemetry(); |
| 164 | + configurePitDashboard(); |
| 165 | + new Trigger(RobotController::getUserButton) |
| 166 | + .onTrue(new HealthCheckCommand(driveSubsystem, intakeSubsystem)); |
| 167 | + } |
156 | 168 | } |
157 | 169 |
|
158 | 170 | public void setAuto(boolean isAuto) { |
|
0 commit comments