|
6 | 6 |
|
7 | 7 | import edu.wpi.first.math.geometry.Rotation2d; |
8 | 8 | import edu.wpi.first.wpilibj.DriverStation.Alliance; |
| 9 | +import edu.wpi.first.wpilibj.DigitalInput; |
9 | 10 | import edu.wpi.first.wpilibj.Joystick; |
10 | 11 | import edu.wpi.first.wpilibj.RobotController; |
11 | 12 | import edu.wpi.first.wpilibj.XboxController; |
|
66 | 67 | import org.strykeforce.telemetry.TelemetryController; |
67 | 68 | import org.strykeforce.telemetry.TelemetryService; |
68 | 69 |
|
| 70 | +import ch.qos.logback.classic.util.ContextInitializer; |
| 71 | + |
69 | 72 | public class RobotContainer { |
70 | 73 | private final ShoulderSubsystem shoulderSubsystem; |
71 | 74 | private final RobotStateSubsystem robotStateSubsystem; |
@@ -103,6 +106,13 @@ public class RobotContainer { |
103 | 106 | private HandSubsystem handSubsystem; |
104 | 107 |
|
105 | 108 | public RobotContainer() { |
| 109 | + DigitalInput eventFlag = new DigitalInput(10); |
| 110 | + boolean isEvent = eventFlag.get(); |
| 111 | + if (isEvent && Constants.isCompBot) { |
| 112 | + // must be set before the first call to LoggerFactory.getLogger(); |
| 113 | + System.setProperty(ContextInitializer.CONFIG_FILE_PROPERTY, "logback-event.xml"); |
| 114 | + System.out.println("Event Flag Removed - logging to file in ~lvuser/logs/"); |
| 115 | + } |
106 | 116 | constants = new Constants(); |
107 | 117 | handSubsystem = new HandSubsystem(constants); |
108 | 118 | intakeSubsystem = new IntakeSubsystem(constants); |
|
0 commit comments