Class Mode

java.lang.Object
com.crossbotics.ftchelper.robot.Mode
All Implemented Interfaces:
Toggleable

public final class Mode extends Object implements Toggleable
A rule a module follows every loop while it is on: a turret following the target, a launcher setting its speed from the distance. A button switches it (g2.back.toggle(robot.turret.followMode())); an action or an autonomous can too (robot.turret.followMode().on()).

Modes are for "always" rules; an Action is for steps that end. Docs: docs/modules/robot.md (section "Modes")

  • Method Details

    • on

      public void on()
      Switches it on.
    • off

      public void off()
      Switches it off.
    • toggle

      public void toggle()
      On if off, off if on.
      Specified by:
      toggle in interface Toggleable
    • isOn

      public boolean isOn()
      True while on.
    • name

      public String name()
      E.g. "Turret follow".