RobotCore
1.0
WPILib port to raspberry Pi
Toggle main menu visibility
Loading...
Searching...
No Matches
RobotMode.java
1
// Copyright (c) FIRST and other WPILib contributors.
2
// Open Source Software; you can modify and/or share it under the terms of
3
// the WPILib BSD license file in the root directory of this project.
4
5
package
org.wpilib.hardware.hal;
6
8
public
enum
RobotMode {
10
UNKNOWN
(0),
12
AUTONOMOUS
(1),
14
TELEOPERATED
(2),
16
UTILITY
(3);
17
18
private
final
int
value;
19
20
RobotMode(
int
value) {
21
this.value = value;
22
}
23
29
public
int
getValue
() {
30
return
value;
31
}
32
34
public
static
RobotMode
fromInt
(
int
value) {
35
return
switch
(value) {
36
case
1 ->
AUTONOMOUS
;
37
case
2 ->
TELEOPERATED
;
38
case
3 ->
UTILITY
;
39
default
->
UNKNOWN
;
40
};
41
}
42
}
org.wpilib.hardware.hal.RobotMode.AUTONOMOUS
AUTONOMOUS
Definition
RobotMode.java:12
org.wpilib.hardware.hal.RobotMode.TELEOPERATED
TELEOPERATED
Definition
RobotMode.java:14
org.wpilib.hardware.hal.RobotMode.UTILITY
UTILITY
Definition
RobotMode.java:16
org.wpilib.hardware.hal.RobotMode.UNKNOWN
UNKNOWN
Definition
RobotMode.java:10
org.wpilib.hardware.hal.RobotMode.getValue
int getValue()
Definition
RobotMode.java:29
org.wpilib.hardware.hal.RobotMode.fromInt
static RobotMode fromInt(int value)
Definition
RobotMode.java:34
org
wpilib
hardware
hal
RobotMode.java
Generated by
1.18.0