Skip to content

Commit

Permalink
Added a DriveToGivenNoteWithBearingVisionAndVisionAssistanceConsidera…
Browse files Browse the repository at this point in the history
…tionCommand fork to determine our speed if not using vision?

Possible plan B?
  • Loading branch information
Rongrrz committed Apr 3, 2024
1 parent 678bfc3 commit b7fae7d
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package competition.subsystems.drive.commands;

import competition.subsystems.collector.CollectorSubsystem;
import competition.subsystems.drive.DriveSubsystem;
import competition.subsystems.oracle.DynamicOracle;
import competition.subsystems.pose.PoseSubsystem;
import competition.subsystems.vision.NoteSeekLogic;
import competition.subsystems.vision.VisionSubsystem;
import xbot.common.properties.PropertyFactory;
import xbot.common.subsystems.drive.control_logic.HeadingModule;

import javax.inject.Inject;

public class DriveToGivenNoteWithBearingVisionAndVisionAssistanceConsiderationCommand extends DriveToGivenNoteWithBearingVisionCommand{

VisionSubsystem vision;

@Inject
DriveToGivenNoteWithBearingVisionAndVisionAssistanceConsiderationCommand(PoseSubsystem pose, DriveSubsystem drive, DynamicOracle oracle, PropertyFactory pf, HeadingModule.HeadingModuleFactory headingModuleFactory, VisionSubsystem vision, CollectorSubsystem collector, NoteSeekLogic noteSeekLogic) {
super(pose, drive, oracle, pf, headingModuleFactory, vision, collector, noteSeekLogic);
this.vision = vision;
}

@Override
public void execute() {
super.setMaximumSpeedOverride(vision.getSpeedForAuto());
super.execute();
}
}

0 comments on commit b7fae7d

Please sign in to comment.