Class FeedTimeFinderOpMode

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

public abstract class FeedTimeFinderOpMode extends FinderOpMode
Finds how long a launcher's feeder must run per shot (feedSec), for a feeder that runs for a time: a CR servo or a motor (Launcher.feeder(Indexer.crServo("feeder")) in Robot.java), with no feed stop. It fires test shots and times each piece from the start of the feed to the shot. Fire several, from every place a piece can sit: the longest time sets the number. It shows the line to copy: Tunables.Feeder: feedSec = 0.45.

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


 @TeleOp(name = "Feed Time Finder", group = "Finders")
 public class FeedTimeFinder extends FeedTimeFinderOpMode {
     @Override protected RobotDefinition robot() { return new Robot(); }
 }
 
 LB = wheel on/off.  RB = a test shot (when the wheel is at speed).  X = clear the times.
 
KEEP HANDS AWAY from the wheel and the feeder; wear eye protection; nobody in front of the launcher. Docs: docs/tuning/07-feed-time-finder.md
  • 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

    • FeedTimeFinderOpMode

      public FeedTimeFinderOpMode()
  • 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()