use of com.qualcomm.robotcore.robocol.Command in project robotcode by OutoftheBoxFTC.
the class FtcLynxFirmwareUpdateActivity method getLynxModulesForFirmwareUpdate.
protected List<USBAccessibleLynxModule> getLynxModulesForFirmwareUpdate() {
CommandList.USBAccessibleLynxModulesRequest request = new CommandList.USBAccessibleLynxModulesRequest();
CommandList.USBAccessibleLynxModulesResp result = new CommandList.USBAccessibleLynxModulesResp();
// Send the command
availableLynxModules.clear();
request.includeModuleNumbers = false;
sendOrInject(new Command(CommandList.CMD_GET_USB_ACCESSIBLE_LYNX_MODULES, request.serialize()));
// Wait, but only a while, for the result
result = awaitResponse(availableLynxModules, result);
RobotLog.vv(TAG, "found %d lynx modules", result.modules.size());
return result.modules;
}
use of com.qualcomm.robotcore.robocol.Command in project robotcode by OutoftheBoxFTC.
the class FtcLynxFirmwareUpdateActivity method getCandidateLynxFirmwareImages.
// ----------------------------------------------------------------------------------------------
// Utility
// ----------------------------------------------------------------------------------------------
protected CommandList.LynxFirmwareImagesResp getCandidateLynxFirmwareImages() {
CommandList.LynxFirmwareImagesResp result = new CommandList.LynxFirmwareImagesResp();
availableLynxImages.clear();
sendOrInject(new Command(CommandList.CMD_GET_CANDIDATE_LYNX_FIRMWARE_IMAGES));
result = awaitResponse(availableLynxImages, result);
RobotLog.vv(TAG, "found %d lynx firmware images", result.firmwareImages.size());
return result;
}
use of com.qualcomm.robotcore.robocol.Command in project robotcode by OutoftheBoxFTC.
the class FtcLynxModuleAddressUpdateActivity method getUSBAccessibleLynxModules.
protected List<USBAccessibleLynxModule> getUSBAccessibleLynxModules() {
CommandList.USBAccessibleLynxModulesRequest request = new CommandList.USBAccessibleLynxModulesRequest();
CommandList.USBAccessibleLynxModulesResp result = new CommandList.USBAccessibleLynxModulesResp();
// Send the command
availableLynxModules.clear();
request.includeModuleNumbers = true;
sendOrInject(new Command(CommandList.CMD_GET_USB_ACCESSIBLE_LYNX_MODULES, request.serialize()));
// Wait, but only a while, for the result
result = awaitResponse(availableLynxModules, result);
RobotLog.vv(TAG, "found %d lynx modules", result.modules.size());
return result.modules;
}
use of com.qualcomm.robotcore.robocol.Command in project robotcode by OutoftheBoxFTC.
the class FtcWifiDirectRememberedGroupsActivity method requestRememberedGroups.
protected void requestRememberedGroups() {
RobotLog.vv(TAG, "requestRememberedGroups()");
networkConnectionHandler.sendCommand(new Command(CommandList.CMD_REQUEST_REMEMBERED_GROUPS));
}
use of com.qualcomm.robotcore.robocol.Command in project robotcode by OutoftheBoxFTC.
the class FtcWifiDirectRememberedGroupsActivity method onClearRememberedGroupsClicked.
// ----------------------------------------------------------------------------------------------
// Actions
// ----------------------------------------------------------------------------------------------
public void onClearRememberedGroupsClicked(View view) {
RobotLog.vv(TAG, "onClearRememberedGroupsClicked()");
if (!remoteConfigure) {
persistentGroupManager.deleteAllPersistentGroups();
AppUtil.getInstance().showToast(UILocation.BOTH, getString(R.string.toastWifiP2pRememberedGroupsCleared));
loadLocalGroups();
} else {
networkConnectionHandler.sendCommand(new Command(CommandList.CMD_CLEAR_REMEMBERED_GROUPS));
}
}
Aggregations