-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
b1b6e32
commit 4b93dd0
Showing
4 changed files
with
47 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package frc.robot.subsystems.led; | ||
|
||
import edu.wpi.first.wpilibj.DriverStation; | ||
import edu.wpi.first.wpilibj.DriverStation.Alliance; | ||
import frc.robot.Constants; | ||
import frc.robot.Constants.LED_STATE; | ||
|
||
public class LED_IOSim implements LED_IO { | ||
LED_STATE ledState; | ||
|
||
public LED_IOSim() { | ||
ledState = Constants.LED_STATE.BLUE; | ||
setLEDState(ledState); | ||
} | ||
|
||
@Override | ||
public void updateInputs(LED_IOInputs inputs) { | ||
inputs.ledState = ledState; | ||
} | ||
|
||
@Override | ||
public void noBumpersPressed() { | ||
if (DriverStation.getAlliance().get() == Alliance.Blue) { | ||
setLEDState(LED_STATE.BLUE); | ||
// led.set(Constants.LEDConstants.COLOR_BLUE); | ||
|
||
} else { | ||
setLEDState(LED_STATE.RED); | ||
// led.set(Constants.LEDConstants.COLOR_RED); | ||
} | ||
} | ||
|
||
@Override | ||
public void setLEDState(LED_STATE state) { | ||
ledState = state; | ||
} | ||
} |