public class FtcEventLoopHandler
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NO_VOLTAGE_SENSOR
This string is sent in the robot battery telemetry payload to indicate
that no voltage sensor is available on the robot.
|
| Constructor and Description |
|---|
FtcEventLoopHandler(HardwareFactory hardwareFactory,
UpdateUI.Callback callback,
Context robotControllerContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
displayGamePadInfo(java.lang.String activeOpModeName) |
EventLoopManager |
getEventLoopManager() |
Gamepad[] |
getGamepads() |
HardwareMap |
getHardwareMap() |
java.lang.String |
getOpMode(java.lang.String extra) |
void |
init(EventLoopManager eventLoopManager) |
void |
refreshUserTelemetry(Telemetry telemetry,
double requestedInterval)
Updates the (indicated) user's telemetry: the telemetry is transmitted if a sufficient
interval has passed since the last transmission.
|
void |
restartRobot() |
void |
sendBatteryInfo()
Send robot phone power % and robot battery voltage level to Driver station
|
void |
sendCommand(Command command) |
void |
sendTelemetry(java.lang.String tag,
java.lang.String msg) |
void |
shutdownCoreInterfaceDeviceModules() |
void |
shutdownLegacyModules() |
void |
shutdownMotorControllers() |
void |
shutdownServoControllers() |
void |
updateBatteryLevel(float percent) |
public static final java.lang.String NO_VOLTAGE_SENSOR
public FtcEventLoopHandler(HardwareFactory hardwareFactory,
UpdateUI.Callback callback,
Context robotControllerContext)
public void init(EventLoopManager eventLoopManager)
public EventLoopManager getEventLoopManager()
public HardwareMap getHardwareMap() throws RobotCoreException, java.lang.InterruptedException
RobotCoreExceptionjava.lang.InterruptedExceptionpublic void displayGamePadInfo(java.lang.String activeOpModeName)
public Gamepad[] getGamepads()
public void refreshUserTelemetry(Telemetry telemetry, double requestedInterval)
telemetry - the telemetry data to sendrequestedInterval - the minimum interval (s) since the last transmission. NaN indicates
that a default transmission interval should be usedEventLoop.TELEMETRY_DEFAULT_INTERVALpublic void sendBatteryInfo()
public void sendTelemetry(java.lang.String tag,
java.lang.String msg)
public void shutdownMotorControllers()
public void shutdownServoControllers()
public void shutdownLegacyModules()
public void shutdownCoreInterfaceDeviceModules()
public void restartRobot()
public void sendCommand(Command command)
public java.lang.String getOpMode(java.lang.String extra)
public void updateBatteryLevel(float percent)