Class OpModeOption

java.lang.Object
org.wpilib.hardware.hal.OpModeOption

public class OpModeOption extends Object
An individual opmode option.
  • Field Details

  • Constructor Details

    • OpModeOption

      public OpModeOption(long id, String name, String group, String description, int textColor, int backgroundColor)
      Constructor.
      Parameters:
      id - id
      name - name
      group - group
      description - description
      textColor - text color (0x00RRGGBB or -1 for default)
      backgroundColor - background color (0x00RRGGBB or -1 for default)
  • Method Details

    • getMode

      public RobotMode getMode()
      Gets the robot mode encoded in the ID.
      Returns:
      robot mode
    • makeId

      public static long makeId(RobotMode mode, long hash)
      Makes an ID from a robot mode and a hash.
      Parameters:
      mode - robot mode
      hash - hash of name
      Returns:
      ID