use of com.qualcomm.robotcore.exception.RobotCoreException in project robotcode by OutoftheBoxFTC.
the class FtcLoadFileActivity method commandEvent.
// ------------------------------------------------------------------------------------------------
// Remote handling
// ------------------------------------------------------------------------------------------------
@Override
public CallbackResult commandEvent(Command command) {
CallbackResult result = CallbackResult.NOT_HANDLED;
try {
String name = command.getName();
String extra = command.getExtra();
if (name.equals(CommandList.CMD_REQUEST_CONFIGURATIONS_RESP)) {
result = handleCommandRequestConfigFilesResp(extra);
} else if (name.equals(CommandList.CMD_NOTIFY_ACTIVE_CONFIGURATION)) {
result = handleCommandNotifyActiveConfig(extra);
}
} catch (RobotCoreException e) {
RobotLog.logStacktrace(e);
}
return result;
}
use of com.qualcomm.robotcore.exception.RobotCoreException in project robotcode by OutoftheBoxFTC.
the class ConfigureFromTemplateActivity method commandEvent.
// ----------------------------------------------------------------------------------------------
// Network listener
// ----------------------------------------------------------------------------------------------
@Override
public CallbackResult commandEvent(Command command) {
CallbackResult result = CallbackResult.NOT_HANDLED;
try {
String name = command.getName();
String extra = command.getExtra();
if (name.equals(CommandList.CMD_SCAN_RESP)) {
result = handleCommandScanResp(extra);
} else if (name.equals(CommandList.CMD_REQUEST_CONFIGURATIONS_RESP)) {
result = handleCommandRequestConfigurationsResp(extra);
} else if (name.equals(CommandList.CMD_REQUEST_CONFIGURATION_TEMPLATES_RESP)) {
result = handleCommandRequestTemplatesResp(extra);
} else if (name.equals(CommandList.CMD_REQUEST_PARTICULAR_CONFIGURATION_RESP)) {
result = handleCommandRequestParticularConfigurationResp(extra);
} else if (name.equals(CommandList.CMD_NOTIFY_ACTIVE_CONFIGURATION)) {
result = handleCommandNotifyActiveConfig(extra);
}
} catch (RobotCoreException e) {
RobotLog.logStacktrace(e);
}
return result;
}
Aggregations