Class FeedStopFinderOpMode

java.lang.Object
com.qualcomm.robotcore.eventloop.opmode.OpMode
com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
com.crossbotics.ftchelper.finders.FinderOpMode
com.crossbotics.ftchelper.finders.FeedStopFinderOpMode

public abstract class FeedStopFinderOpMode extends FinderOpMode
Finds a launcher's feed stop positions (Launcher.feedStop("feed_stop") in Robot.java): where it holds the pieces back, and where it lets one through. It shows the line to copy: Tunables.Launcher: feedStopHold = 0.150, feedStopRelease = 0.550.

In "Tune and check" it is in the menu for a robot with a feed stop. On its own:


 @TeleOp(name = "Feed Stop Finder", group = "Finders")
 public class FeedStopFinder extends FeedStopFinderOpMode {
     @Override protected RobotDefinition robot() { return new Robot(); }
 }
 

With both positions saved, it also finds the two times:

  • feedStopMoveSec, how long the stop takes to open: worked out from the servo's catalog speed when Robot.java names the part (.feedStop("feed_stop", "gobilda-2000-speed")), with 25% extra for the load.
  • feedStopOpenSec, the backup time: LB spins the wheel up, RB fires a test shot (the stop opens, the indexer and pushing parts run like a real shot), and it times the piece until the wheel sees the shot. The longest test shot + 0.2 s. It warns when two pieces went through one opening.
Docs: docs/tuning/README.md, "Feed Stop Finder"
  • Field Details

    • MS_BEFORE_FORCE_STOP_AFTER_STOP_REQUESTED

      public static final int MS_BEFORE_FORCE_STOP_AFTER_STOP_REQUESTED
      See Also:
    • gamepad1

      public volatile com.qualcomm.robotcore.hardware.Gamepad gamepad1
    • gamepad2

      public volatile com.qualcomm.robotcore.hardware.Gamepad gamepad2
    • telemetry

      public org.firstinspires.ftc.robotcore.external.Telemetry telemetry
    • hardwareMap

      public volatile com.qualcomm.robotcore.hardware.HardwareMap hardwareMap
    • msStuckDetectStop

      @Deprecated public int msStuckDetectStop
      Deprecated.
  • Constructor Details

    • FeedStopFinderOpMode

      public FeedStopFinderOpMode()
  • Method Details

    • robot

      protected abstract RobotDefinition robot()
      The robot in five files: return new Robot();.
    • finderName

      protected String finderName()
      Description copied from class: FinderOpMode
      The finder's name, e.g. "Servo finder".
      Specified by:
      finderName in class FinderOpMode
    • setup

      protected void setup()
      Description copied from class: FinderOpMode
      Sets up the hardware, in INIT. Nothing may move here.
      Specified by:
      setup in class FinderOpMode
    • showInit

      protected void showInit(RobotTelemetry t)
      Description copied from class: FinderOpMode
      What INIT shows (the controls, a safety note).
      Overrides:
      showInit in class FinderOpMode
    • bind

      protected void bind(ControllerBindings c)
      Description copied from class: FinderOpMode
      Binds gamepad 1 buttons. Actions must be quick: never wait.
      Specified by:
      bind in class FinderOpMode
    • step

      protected void step()
      Description copied from class: FinderOpMode
      Runs once every loop after the buttons: moves things, measures. Never waits.
      Specified by:
      step in class FinderOpMode
    • show

      protected void show(RobotTelemetry t)
      Description copied from class: FinderOpMode
      The finder's own screen lines, every loop.
      Specified by:
      show in class FinderOpMode
    • helpLines

      protected String[] helpLines()
      Overrides:
      helpLines in class FinderOpMode
    • stopAll

      protected void stopAll()
      Description copied from class: FinderOpMode
      Stops every motor and servo it moves. Called at the end, always.
      Specified by:
      stopAll in class FinderOpMode
    • requestOpModeStop

      public final void requestOpModeStop()