Class MotorDirectionCheckOpMode

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

public abstract class MotorDirectionCheckOpMode extends FinderOpMode
Motor Direction Check: spins ONE drive motor at a time, set up exactly as Robot.java says (its direction, from reversed(...)), so you see if each wheel rolls FORWARD. A wrong direction makes the robot drive in circles, strafe the wrong way, or fight itself. Run it on every new robot and after any motor or wire is changed. Put the robot on a block first: the wheels spin.

Hold X = front-left (tank: left), Y = front-right (tank: right), A = back-left, B = back-right: that motor runs at 30% while held. Each wheel must roll the way that drives the robot forward. A wheel that rolls backward: add its name to reversed(...) on the drive line in Robot.java (or take it out).

It is in "Tune and check" for every robot in five files with a drive. On its own, in TeamCode:


 @TeleOp(name = "Motor Direction Check", group = "Finders")
 public class MotorDirectionCheck extends MotorDirectionCheckOpMode {
     @Override protected RobotDefinition robot() { return new Robot(); }
 }
 
Docs: docs/modules/finders.md. Guide: docs/tuning/README.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

    • MotorDirectionCheckOpMode

      public MotorDirectionCheckOpMode()
  • Method Details

    • robot

      protected abstract RobotDefinition robot()
      Your robot in five files (return new Robot();): its drive is checked.
    • 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()