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 |
closeAllUsbDevices() |
void |
closeMotorControllers() |
void |
closeServoControllers() |
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(TelemetryMessage 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 |
sendTelemetry(java.lang.String tag,
java.lang.String msg) |
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
RobotCoreException
java.lang.InterruptedException
public void displayGamePadInfo(java.lang.String activeOpModeName)
public Gamepad[] getGamepads()
public void refreshUserTelemetry(TelemetryMessage 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_INTERVAL
public void sendBatteryInfo()
public void sendTelemetry(java.lang.String tag, java.lang.String msg)
public void closeMotorControllers()
public void closeServoControllers()
public void closeAllUsbDevices()
public void restartRobot()
public java.lang.String getOpMode(java.lang.String extra)
public void updateBatteryLevel(float percent)