Skip to content

Commit

Permalink
update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
linglejack06 committed Mar 13, 2024
1 parent 6507839 commit 5f0e776
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private void idle() {
.getAsBoolean())) { // dont seek if note in uptake or shotoer deck
state = State.SEEKING;
} else if (action == IntakeAction.REVERSE
|| inputs.noteSensed) { // reverse if note is found
|| (inputs.noteSensed && noteInShooterDeck.getAsBoolean())) { // reverse if note is found
state = State.REVERSING;
} else if (action == IntakeAction.OVERRIDE) {
state = State.OVERRIDE;
Expand All @@ -92,8 +92,11 @@ private void seeking() {
if (action != IntakeAction.INTAKE) {
state = State.IDLE;
}

io.setIntakeVoltage(IntakeConstants.intakePower);
if(!inputs.noteSensed) { // run until note is in uptake
io.setIntakeVoltage(IntakeConstants.intakePower);
} else {
io.setIntakeVoltage(0);
}
io.setBeltVoltage(IntakeConstants.beltPower);
}

Expand Down

0 comments on commit 5f0e776

Please sign in to comment.