diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000000..bfd93bc78c5 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,68 @@ +# Contributing to the FTC SDK + +The following is a set of guidelines for contributing the FIRST FTC SDK. The FTC Technology Team welcomes suggestions for improvements to core software, ideas for new features, requests for built-in support of new sensors, and well written bug reports. + +## How can I contribute? + +### Pull requests + +__STOP!__ If you are new to git, do not understand the mechanics of forks, branches, and pulls, if what you just read is confusing, __do not__ push this button. Most likely it won't do what you think it will. + +![Pull Button](../doc/media/PullRequest.PNG) + +If you are looking at this button then you've pushed some changes to your team's fork of ftctechnh/ftc_app. Congratulations! You are almost certainly finished. + +The vast majority of pull requests seen on the ftctechnh/ftc_app repository are not intended to be merged into the official SDK. Team software is just that, your team's. It's specific to the tasks you are trying to accomplish, the testing you are doing, and goals your team has. You don't want that pushed into the official SDK. + +If what you've read so far makes little sense, there are some very good git learning resources online. +[Git Book](https://git-scm.com/book/en/v2) +[Interactive Git Tutorial](https://try.github.io) + +##### Guidlines for experienced GIT users. + +If you are absolutely certain that you want to push the big green button above, read on. Otherwise back _slowly away from keyboard_. + +The real intent for advanced users is often to issue a pull request from the [branch](https://www.atlassian.com/git/tutorials/using-branches/git-branch) on a local fork back to master on either the same local fork or a child of the team fork and not on the parent ftctechnh/ftc_app. See [Creating a Pull Request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). + +If that is indeed the intent, then you can merge your [topic branch](https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows#Topic-Branches) into master locally by hand before pushing it up to github, or if you want a pull request for pulls between branches on the same repository because, say, you want team members to look at your software before merging into master, you can select the base fork from the dropdown on the "Open a pull request" page and select your team repo instead of ftctechnh's. + +Alternatively, if you have a team repository forked from ftctechnh/ftc_app, and then team members individually fork from your team repository, then pull requests from the individual team member's forks will have the main team repository automatically selected as the base fork for the pull. And you won't inadvertently request to pull your team software into ftctechnh's repository. + +The latter would be the "best" way to manage software among a large team. But as with all things git there are many options. + +Pull requests that do not fall into the category above are evaluated by the FTC Technology Team on a case-by-case basis. Please note however that the deployment model of the SDK does not support direct pulls into ftctechnh/ftc_app. + +### Report bugs + +This section guides you through filing a bug report. The better the report the more likely it is to be root caused and fixed. Please refrain from feature requests or software enhancements when opening new issues. See Suggesting Enhancements below. + +#### Before submitting a bug report + +- Check the [forums](http://ftcforum.usfirst.org/forum.php) to see if someone else has run into the problem and whether there is an official solution that doesn't require a new SDK. + +- Perform a search of current [issues](https://github.com/ftctechnh/ftc_app/issues) to see if the problem has already been reported. If so, add a comment to the existing issue instead of creating a new one. + +#### How Do I Submit A (Good) Bug Report? + +Bugs are tracked as GitHub issues. Create an issue on ftctechnh/ftc_app and provide the following information. +Explain the problem and include additional details to help maintainers reproduce the problem: + +- Use a clear and descriptive title for the issue to identify the problem. + +- Describe the exact steps which reproduce the problem in as many details as possible. + +- Provide specific examples to demonstrate the steps. + +- Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior. Explain which behavior you expected to see instead and why. If applicable, include screenshots which show you following the described steps and clearly demonstrate the problem. + +- If you're reporting that the RobotController crashed, include the logfile with a stack trace of the crash. [Example of good bug report with stack trace](https://github.com/ftctechnh/ftc_app/issues/224) + +- If the problem wasn't triggered by a specific action, describe what you were doing before the problem happened and share more information using the guidelines below. + +### Suggesting Enhancements + +FIRST volunteers are awesome. You all have great ideas and we want to hear them. + +Enhancements should be broadly applicable to a large majority of teams, should not force teams to change their workflow, and should provide real value to the mission of FIRST as it relates to engaging youth in engineering activities. + +The best way to get momentum behind new features is to post a description of your idea in the forums. Build community support for it. The FTC Technology Team monitors the forums. We'll hear you and if there's a large enough call for the feature it's very likely to get put on the list for a future release. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000000..665369bbc93 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1 @@ +Before issuing a pull request, please see the contributing page. diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..3ba54c9ff83 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# built application files +*.apk +*.ap_ + +# Java class files +*.class + +# generated files +bin/ +gen/ + +# Local configuration file (sdk path, etc) +local.properties + +# Windows thumbnail db +Thumbs.db + +# OSX files +.DS_Store + +# Android Studio +*.iml +.idea +.gradle +build/ + +*ASUS_PC_01* + diff --git a/FtcRobotController/LICENSE b/FtcRobotController/LICENSE new file mode 100644 index 00000000000..2f0cb5927aa --- /dev/null +++ b/FtcRobotController/LICENSE @@ -0,0 +1,41 @@ +License information + +================================================================================ +FtcDriverStation, FtcRobotController, FtcCommon, Hardware, RobotCore +ModernRobotics, Analytics, and WirelessP2p have the following license: + +Copyright (c) 2014-2016 Qualcomm Technologies Inc + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted (subject to the limitations in the disclaimer below) provided that +the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list +of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +Neither the name of Qualcomm Technologies Inc nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +Qualcomm Technologies Inc., will periodically collect anonymous information +about the device this software is installed on such as the make, model, and +software versions, but no information that identifies you. + +NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS +LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/FtcRobotController/build.gradle b/FtcRobotController/build.gradle new file mode 100644 index 00000000000..daf4ee2d48a --- /dev/null +++ b/FtcRobotController/build.gradle @@ -0,0 +1,27 @@ +// +// build.gradle in FtcRobotController +// +apply plugin: 'com.android.library' + +android { + + defaultConfig { + minSdkVersion 19 + targetSdkVersion 26 + } + + compileSdkVersion 28 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } +} + +repositories { + flatDir { + dirs '../libs' + } +} + +apply from: 'build.release.gradle' diff --git a/FtcRobotController/build.release.gradle b/FtcRobotController/build.release.gradle new file mode 100644 index 00000000000..afc368f072d --- /dev/null +++ b/FtcRobotController/build.release.gradle @@ -0,0 +1,11 @@ +dependencies { + implementation (name:'Inspection-release', ext: 'aar') + implementation (name:'Blocks-release', ext: 'aar') + implementation (name:'RobotCore-release', ext: 'aar') + implementation (name:'RobotServer-release', ext: 'aar') + implementation (name:'OnBotJava-release', ext: 'aar') + implementation (name:'Hardware-release', ext: 'aar') + implementation (name:'FtcCommon-release', ext: 'aar') + implementation (name:'WirelessP2p-release', ext:'aar') + implementation 'com.android.support:support-compat:28.0.0' +} diff --git a/FtcRobotController/src/main/AndroidManifest.xml b/FtcRobotController/src/main/AndroidManifest.xml new file mode 100644 index 00000000000..8774c501fed --- /dev/null +++ b/FtcRobotController/src/main/AndroidManifest.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FtcRobotController/src/main/assets/FTC_2016-17.dat b/FtcRobotController/src/main/assets/FTC_2016-17.dat new file mode 100644 index 00000000000..d15d80a14f6 Binary files /dev/null and b/FtcRobotController/src/main/assets/FTC_2016-17.dat differ diff --git a/FtcRobotController/src/main/assets/FTC_2016-17.xml b/FtcRobotController/src/main/assets/FTC_2016-17.xml new file mode 100644 index 00000000000..f75b930c3a5 --- /dev/null +++ b/FtcRobotController/src/main/assets/FTC_2016-17.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/FtcRobotController/src/main/assets/RelicVuMark.dat b/FtcRobotController/src/main/assets/RelicVuMark.dat new file mode 100644 index 00000000000..e873bcfe81c Binary files /dev/null and b/FtcRobotController/src/main/assets/RelicVuMark.dat differ diff --git a/FtcRobotController/src/main/assets/RelicVuMark.xml b/FtcRobotController/src/main/assets/RelicVuMark.xml new file mode 100644 index 00000000000..b644913d0db --- /dev/null +++ b/FtcRobotController/src/main/assets/RelicVuMark.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/FtcRobotController/src/main/assets/RoverRuckus.dat b/FtcRobotController/src/main/assets/RoverRuckus.dat new file mode 100644 index 00000000000..461add830d0 Binary files /dev/null and b/FtcRobotController/src/main/assets/RoverRuckus.dat differ diff --git a/FtcRobotController/src/main/assets/RoverRuckus.tflite b/FtcRobotController/src/main/assets/RoverRuckus.tflite new file mode 100644 index 00000000000..2c538cbb697 Binary files /dev/null and b/FtcRobotController/src/main/assets/RoverRuckus.tflite differ diff --git a/FtcRobotController/src/main/assets/RoverRuckus.xml b/FtcRobotController/src/main/assets/RoverRuckus.xml new file mode 100644 index 00000000000..05eac7ea3a8 --- /dev/null +++ b/FtcRobotController/src/main/assets/RoverRuckus.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/FtcRobotController/src/main/assets/StonesAndChips.dat b/FtcRobotController/src/main/assets/StonesAndChips.dat new file mode 100644 index 00000000000..8ab481a1e40 Binary files /dev/null and b/FtcRobotController/src/main/assets/StonesAndChips.dat differ diff --git a/FtcRobotController/src/main/assets/StonesAndChips.xml b/FtcRobotController/src/main/assets/StonesAndChips.xml new file mode 100644 index 00000000000..2c6da5ef042 --- /dev/null +++ b/FtcRobotController/src/main/assets/StonesAndChips.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/BasicOpMode_Iterative.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/BasicOpMode_Iterative.java new file mode 100644 index 00000000000..9b96cfe2f67 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/BasicOpMode_Iterative.java @@ -0,0 +1,139 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.OpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.DcMotor; +import com.qualcomm.robotcore.util.ElapsedTime; +import com.qualcomm.robotcore.util.Range; + +/** + * This file contains an example of an iterative (Non-Linear) "OpMode". + * An OpMode is a 'program' that runs in either the autonomous or the teleop period of an FTC match. + * The names of OpModes appear on the menu of the FTC Driver Station. + * When an selection is made from the menu, the corresponding OpMode + * class is instantiated on the Robot Controller and executed. + * + * This particular OpMode just executes a basic Tank Drive Teleop for a two wheeled robot + * It includes all the skeletal structure that all iterative OpModes contain. + * + * Use Android Studios to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ + +@TeleOp(name="Basic: Iterative OpMode", group="Iterative Opmode") +@Disabled +public class BasicOpMode_Iterative extends OpMode +{ + // Declare OpMode members. + private ElapsedTime runtime = new ElapsedTime(); + private DcMotor leftDrive = null; + private DcMotor rightDrive = null; + + /* + * Code to run ONCE when the driver hits INIT + */ + @Override + public void init() { + telemetry.addData("Status", "Initialized"); + + // Initialize the hardware variables. Note that the strings used here as parameters + // to 'get' must correspond to the names assigned during the robot configuration + // step (using the FTC Robot Controller app on the phone). + leftDrive = hardwareMap.get(DcMotor.class, "left_drive"); + rightDrive = hardwareMap.get(DcMotor.class, "right_drive"); + + // Most robots need the motor on one side to be reversed to drive forward + // Reverse the motor that runs backwards when connected directly to the battery + leftDrive.setDirection(DcMotor.Direction.FORWARD); + rightDrive.setDirection(DcMotor.Direction.REVERSE); + + // Tell the driver that initialization is complete. + telemetry.addData("Status", "Initialized"); + } + + /* + * Code to run REPEATEDLY after the driver hits INIT, but before they hit PLAY + */ + @Override + public void init_loop() { + } + + /* + * Code to run ONCE when the driver hits PLAY + */ + @Override + public void start() { + runtime.reset(); + } + + /* + * Code to run REPEATEDLY after the driver hits PLAY but before they hit STOP + */ + @Override + public void loop() { + // Setup a variable for each drive wheel to save power level for telemetry + double leftPower; + double rightPower; + + // Choose to drive using either Tank Mode, or POV Mode + // Comment out the method that's not used. The default below is POV. + + // POV Mode uses left stick to go forward, and right stick to turn. + // - This uses basic math to combine motions and is easier to drive straight. + double drive = -gamepad1.left_stick_y; + double turn = gamepad1.right_stick_x; + leftPower = Range.clip(drive + turn, -1.0, 1.0) ; + rightPower = Range.clip(drive - turn, -1.0, 1.0) ; + + // Tank Mode uses one stick to control each wheel. + // - This requires no math, but it is hard to drive forward slowly and keep straight. + // leftPower = -gamepad1.left_stick_y ; + // rightPower = -gamepad1.right_stick_y ; + + // Send calculated power to wheels + leftDrive.setPower(leftPower); + rightDrive.setPower(rightPower); + + // Show the elapsed game time and wheel power. + telemetry.addData("Status", "Run Time: " + runtime.toString()); + telemetry.addData("Motors", "left (%.2f), right (%.2f)", leftPower, rightPower); + } + + /* + * Code to run ONCE after the driver hits STOP + */ + @Override + public void stop() { + } + +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/BasicOpMode_Linear.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/BasicOpMode_Linear.java new file mode 100644 index 00000000000..63b37bec5ec --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/BasicOpMode_Linear.java @@ -0,0 +1,114 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.hardware.DcMotor; +import com.qualcomm.robotcore.util.ElapsedTime; +import com.qualcomm.robotcore.util.Range; + + +/** + * This file contains an minimal example of a Linear "OpMode". An OpMode is a 'program' that runs in either + * the autonomous or the teleop period of an FTC match. The names of OpModes appear on the menu + * of the FTC Driver Station. When an selection is made from the menu, the corresponding OpMode + * class is instantiated on the Robot Controller and executed. + * + * This particular OpMode just executes a basic Tank Drive Teleop for a two wheeled robot + * It includes all the skeletal structure that all linear OpModes contain. + * + * Use Android Studios to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ + +@TeleOp(name="Basic: Linear OpMode", group="Linear Opmode") +@Disabled +public class BasicOpMode_Linear extends LinearOpMode { + + // Declare OpMode members. + private ElapsedTime runtime = new ElapsedTime(); + private DcMotor leftDrive = null; + private DcMotor rightDrive = null; + + @Override + public void runOpMode() { + telemetry.addData("Status", "Initialized"); + telemetry.update(); + + // Initialize the hardware variables. Note that the strings used here as parameters + // to 'get' must correspond to the names assigned during the robot configuration + // step (using the FTC Robot Controller app on the phone). + leftDrive = hardwareMap.get(DcMotor.class, "left_drive"); + rightDrive = hardwareMap.get(DcMotor.class, "right_drive"); + + // Most robots need the motor on one side to be reversed to drive forward + // Reverse the motor that runs backwards when connected directly to the battery + leftDrive.setDirection(DcMotor.Direction.FORWARD); + rightDrive.setDirection(DcMotor.Direction.REVERSE); + + // Wait for the game to start (driver presses PLAY) + waitForStart(); + runtime.reset(); + + // run until the end of the match (driver presses STOP) + while (opModeIsActive()) { + + // Setup a variable for each drive wheel to save power level for telemetry + double leftPower; + double rightPower; + + // Choose to drive using either Tank Mode, or POV Mode + // Comment out the method that's not used. The default below is POV. + + // POV Mode uses left stick to go forward, and right stick to turn. + // - This uses basic math to combine motions and is easier to drive straight. + double drive = -gamepad1.left_stick_y; + double turn = gamepad1.right_stick_x; + leftPower = Range.clip(drive + turn, -1.0, 1.0) ; + rightPower = Range.clip(drive - turn, -1.0, 1.0) ; + + // Tank Mode uses one stick to control each wheel. + // - This requires no math, but it is hard to drive forward slowly and keep straight. + // leftPower = -gamepad1.left_stick_y ; + // rightPower = -gamepad1.right_stick_y ; + + // Send calculated power to wheels + leftDrive.setPower(leftPower); + rightDrive.setPower(rightPower); + + // Show the elapsed game time and wheel power. + telemetry.addData("Status", "Run Time: " + runtime.toString()); + telemetry.addData("Motors", "left (%.2f), right (%.2f)", leftPower, rightPower); + telemetry.update(); + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptCompassCalibration.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptCompassCalibration.java new file mode 100644 index 00000000000..cd1da0a85de --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptCompassCalibration.java @@ -0,0 +1,121 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.CompassSensor; +import com.qualcomm.robotcore.util.ElapsedTime; + +/** + * This file illustrates the concept of calibrating a MR Compass + * It uses the common Pushbot hardware class to define the drive on the robot. + * The code is structured as a LinearOpMode + * + * This code assumes there is a compass configured with the name "compass" + * + * This code will put the compass into calibration mode, wait three seconds and then attempt + * to rotate two full turns clockwise. This will allow the compass to do a magnetic calibration. + * + * Once compete, the program will put the compass back into measurement mode and check to see if the + * calibration was successful. + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ + +@TeleOp(name="Concept: Compass Calibration", group="Concept") +@Disabled +public class ConceptCompassCalibration extends LinearOpMode { + + /* Declare OpMode members. */ + HardwarePushbot robot = new HardwarePushbot(); // Use a Pushbot's hardware + private ElapsedTime runtime = new ElapsedTime(); + CompassSensor compass; + + final static double MOTOR_POWER = 0.2; // scale from 0 to 1 + static final long HOLD_TIME_MS = 3000; + static final double CAL_TIME_SEC = 20; + + @Override + public void runOpMode() { + + /* Initialize the drive system variables. + * The init() method of the hardware class does all the work here + */ + robot.init(hardwareMap); + + // get a reference to our Compass Sensor object. + compass = hardwareMap.get(CompassSensor.class, "compass"); + + // Send telemetry message to signify robot waiting; + telemetry.addData("Status", "Ready to cal"); // + telemetry.update(); + + // Wait for the game to start (driver presses PLAY) + waitForStart(); + + // Set the compass to calibration mode + compass.setMode(CompassSensor.CompassMode.CALIBRATION_MODE); + telemetry.addData("Compass", "Compass in calibration mode"); + telemetry.update(); + + sleep(HOLD_TIME_MS); // Just do a sleep while we switch modes + + // Start the robot rotating clockwise + telemetry.addData("Compass", "Calibration mode. Turning the robot..."); + telemetry.update(); + robot.leftDrive.setPower(MOTOR_POWER); + robot.rightDrive.setPower(-MOTOR_POWER); + + // run until time expires OR the driver presses STOP; + runtime.reset(); + while (opModeIsActive() && (runtime.time() < CAL_TIME_SEC)) { + idle(); + } + + // Stop all motors and turn off claibration + robot.leftDrive.setPower(0); + robot.rightDrive.setPower(0); + compass.setMode(CompassSensor.CompassMode.MEASUREMENT_MODE); + telemetry.addData("Compass", "Returning to measurement mode"); + telemetry.update(); + + sleep(HOLD_TIME_MS); // Just do a sleep while we switch modes + + // Report whether the Calibration was successful or not. + if (compass.calibrationFailed()) + telemetry.addData("Compass", "Calibrate Failed. Try Again!"); + else + telemetry.addData("Compass", "Calibrate Passed."); + telemetry.update(); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptDIMAsIndicator.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptDIMAsIndicator.java new file mode 100644 index 00000000000..75b6ad44583 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptDIMAsIndicator.java @@ -0,0 +1,103 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.DeviceInterfaceModule; +import com.qualcomm.robotcore.util.ElapsedTime; + +/** + * This OpMode illustrates using the Device Interface Module as a signalling device. + * The code is structured as a LinearOpMode + * + * This code assumes a DIM name "dim". + * + * There are many examples where the robot might like to signal the driver, without requiring them + * to look at the driver station. This might be something like a "ball in hopper" condition or a + * "ready to shoot" condition. + * + * The DIM has two user settable indicator LEDs (one red one blue). These can be controlled + * directly from your program. + * + * Use Android Studios to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ +@TeleOp(name = "Concept: DIM As Indicator", group = "Concept") +@Disabled +public class ConceptDIMAsIndicator extends LinearOpMode { + + static final int BLUE_LED = 0; // Blue LED channel on DIM + static final int RED_LED = 1; // Red LED Channel on DIM + + // Create timer to toggle LEDs + private ElapsedTime runtime = new ElapsedTime(); + + // Define class members + DeviceInterfaceModule dim; + + @Override + public void runOpMode() { + + // Connect to motor (Assume standard left wheel) + // Change the text in quotes to match any motor name on your robot. + dim = hardwareMap.get(DeviceInterfaceModule.class, "dim"); + + // Toggle LEDs while Waiting for the start button + telemetry.addData(">", "Press Play to test LEDs." ); + telemetry.update(); + + while (!isStarted()) { + // Determine if we are on an odd or even second + boolean even = (((int)(runtime.time()) & 0x01) == 0); + dim.setLED(RED_LED, even); // Red for even + dim.setLED(BLUE_LED, !even); // Blue for odd + idle(); + } + + // Running now + telemetry.addData(">", "Press X for Blue, B for Red." ); + telemetry.update(); + + // Now just use red and blue buttons to set red and blue LEDs + while(opModeIsActive()){ + dim.setLED(BLUE_LED, gamepad1.x); + dim.setLED(RED_LED, gamepad1.b); + idle(); + } + + // Turn off LEDs; + dim.setLED(BLUE_LED, false); + dim.setLED(RED_LED, false); + telemetry.addData(">", "Done"); + telemetry.update(); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptI2cAddressChange.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptI2cAddressChange.java new file mode 100644 index 00000000000..4deef918444 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptI2cAddressChange.java @@ -0,0 +1,223 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.hardware.modernrobotics.ModernRoboticsUsbDeviceInterfaceModule; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.DeviceInterfaceModule; +import com.qualcomm.robotcore.hardware.I2cAddr; +import com.qualcomm.robotcore.util.RobotLog; +import com.qualcomm.robotcore.util.TypeConversion; + +import java.util.concurrent.locks.Lock; + +/** + * An example of a linear op mode that shows how to change the I2C address. + */ +@TeleOp(name = "Concept: I2c Address Change", group = "Concept") +@Disabled +public class ConceptI2cAddressChange extends LinearOpMode { + + public static final int ADDRESS_SET_NEW_I2C_ADDRESS = 0x70; + // trigger bytes used to change I2C address on ModernRobotics sensors. + public static final byte TRIGGER_BYTE_1 = 0x55; + public static final byte TRIGGER_BYTE_2 = (byte) 0xaa; + + // Expected bytes from the Modern Robotics IR Seeker V3 memory map + public static final byte IR_SEEKER_V3_FIRMWARE_REV = 0x12; + public static final byte IR_SEEKER_V3_SENSOR_ID = 0x49; + public static final I2cAddr IR_SEEKER_V3_ORIGINAL_ADDRESS = I2cAddr.create8bit(0x38); + + // Expected bytes from the Modern Robotics Color Sensor memory map + public static final byte COLOR_SENSOR_FIRMWARE_REV = 0x10; + public static final byte COLOR_SENSOR_SENSOR_ID = 0x43; + public static final byte COLOR_SENSOR_ORIGINAL_ADDRESS = 0x3C; + + public static final byte MANUFACTURER_CODE = 0x4d; + // Currently, this is set to expect the bytes from the IR Seeker. + // If you change these values so you're setting "FIRMWARE_REV" to + // COLOR_SENSOR_FIRMWARE_REV, and "SENSOR_ID" to "COLOR_SENSOR_SENSOR_ID", + // you'll be able to change the I2C address of the ModernRoboticsColorSensor. + // If the bytes you're expecting are different than what this op mode finds, + // a comparison will be printed out into the logfile. + public static final byte FIRMWARE_REV = IR_SEEKER_V3_FIRMWARE_REV; + public static final byte SENSOR_ID = IR_SEEKER_V3_SENSOR_ID; + + // These byte values are common with most Modern Robotics sensors. + public static final int READ_MODE = 0x80; + public static final int ADDRESS_MEMORY_START = 0x0; + public static final int TOTAL_MEMORY_LENGTH = 0x0c; + public static final int BUFFER_CHANGE_ADDRESS_LENGTH = 0x03; + + // The port where your sensor is connected. + int port = 5; + + byte[] readCache; + Lock readLock; + byte[] writeCache; + Lock writeLock; + + I2cAddr currentAddress = IR_SEEKER_V3_ORIGINAL_ADDRESS; + // I2c addresses on Modern Robotics devices must be divisible by 2, and between 0x7e and 0x10 + // Different hardware may have different rules. + // Be sure to read the requirements for the hardware you're using! + // If you use an invalid address, you may make your device completely unusable. + I2cAddr newAddress = I2cAddr.create8bit(0x42); + + DeviceInterfaceModule dim; + + @Override + public void runOpMode() { + + // set up the hardware devices we are going to use + dim = hardwareMap.get(DeviceInterfaceModule.class, "dim"); + + readCache = dim.getI2cReadCache(port); + readLock = dim.getI2cReadCacheLock(port); + writeCache = dim.getI2cWriteCache(port); + writeLock = dim.getI2cWriteCacheLock(port); + + // I2c addresses on Modern Robotics devices must be divisible by 2, and between 0x7e and 0x10 + // Different hardware may have different rules. + // Be sure to read the requirements for the hardware you're using! + ModernRoboticsUsbDeviceInterfaceModule.throwIfModernRoboticsI2cAddressIsInvalid(newAddress); + + // wait for the start button to be pressed + waitForStart(); + + performAction("read", port, currentAddress, ADDRESS_MEMORY_START, TOTAL_MEMORY_LENGTH); + + while(!dim.isI2cPortReady(port)) { + telemetry.addData("I2cAddressChange", "waiting for the port to be ready..."); + telemetry.update(); + sleep(1000); + } + + // update the local cache + dim.readI2cCacheFromController(port); + + // make sure the first bytes are what we think they should be. + int count = 0; + int[] initialArray = {READ_MODE, currentAddress.get8Bit(), ADDRESS_MEMORY_START, TOTAL_MEMORY_LENGTH, FIRMWARE_REV, MANUFACTURER_CODE, SENSOR_ID}; + while (!foundExpectedBytes(initialArray, readLock, readCache)) { + telemetry.addData("I2cAddressChange", "Confirming that we're reading the correct bytes..."); + telemetry.update(); + dim.readI2cCacheFromController(port); + sleep(1000); + count++; + // if we go too long with failure, we probably are expecting the wrong bytes. + if (count >= 10) { + telemetry.addData("I2cAddressChange", String.format("Looping too long with no change, probably have the wrong address. Current address: 8bit=0x%02x", currentAddress.get8Bit())); + hardwareMap.irSeekerSensor.get(String.format("Looping too long with no change, probably have the wrong address. Current address: 8bit=0x%02x", currentAddress.get8Bit())); + telemetry.update(); + } + } + + // Enable writes to the correct segment of the memory map. + performAction("write", port, currentAddress, ADDRESS_SET_NEW_I2C_ADDRESS, BUFFER_CHANGE_ADDRESS_LENGTH); + + // Write out the trigger bytes, and the new desired address. + writeNewAddress(); + dim.setI2cPortActionFlag(port); + dim.writeI2cCacheToController(port); + + telemetry.addData("I2cAddressChange", "Giving the hardware 60 seconds to make the change..."); + telemetry.update(); + + // Changing the I2C address takes some time. + sleep(60000); + + // Query the new address and see if we can get the bytes we expect. + dim.enableI2cReadMode(port, newAddress, ADDRESS_MEMORY_START, TOTAL_MEMORY_LENGTH); + dim.setI2cPortActionFlag(port); + dim.writeI2cCacheToController(port); + + int[] confirmArray = {READ_MODE, newAddress.get8Bit(), ADDRESS_MEMORY_START, TOTAL_MEMORY_LENGTH, FIRMWARE_REV, MANUFACTURER_CODE, SENSOR_ID}; + while (!foundExpectedBytes(confirmArray, readLock, readCache)) { + telemetry.addData("I2cAddressChange", "Have not confirmed the changes yet..."); + telemetry.update(); + dim.readI2cCacheFromController(port); + sleep(1000); + } + + telemetry.addData("I2cAddressChange", "Successfully changed the I2C address. New address: 8bit=0x%02x", newAddress.get8Bit()); + telemetry.update(); + RobotLog.i("Successfully changed the I2C address." + String.format("New address: 8bit=0x%02x", newAddress.get8Bit())); + + /**** IMPORTANT NOTE ******/ + // You need to add a line like this at the top of your op mode + // to update the I2cAddress in the driver. + //irSeeker.setI2cAddress(newAddress); + /***************************/ + + } + + private boolean foundExpectedBytes(int[] byteArray, Lock lock, byte[] cache) { + try { + lock.lock(); + boolean allMatch = true; + StringBuilder s = new StringBuilder(300 * 4); + String mismatch = ""; + for (int i = 0; i < byteArray.length; i++) { + s.append(String.format("expected: %02x, got: %02x \n", TypeConversion.unsignedByteToInt( (byte) byteArray[i]), cache[i])); + if (TypeConversion.unsignedByteToInt(cache[i]) != TypeConversion.unsignedByteToInt( (byte) byteArray[i])) { + mismatch = String.format("i: %d, byteArray[i]: %02x, cache[i]: %02x", i, byteArray[i], cache[i]); + allMatch = false; + } + } + RobotLog.e(s.toString() + "\n allMatch: " + allMatch + ", mismatch: " + mismatch); + return allMatch; + } finally { + lock.unlock(); + } + } + + private void performAction(String actionName, int port, I2cAddr i2cAddress, int memAddress, int memLength) { + if (actionName.equalsIgnoreCase("read")) dim.enableI2cReadMode(port, i2cAddress, memAddress, memLength); + if (actionName.equalsIgnoreCase("write")) dim.enableI2cWriteMode(port, i2cAddress, memAddress, memLength); + + dim.setI2cPortActionFlag(port); + dim.writeI2cCacheToController(port); + dim.readI2cCacheFromController(port); + } + + private void writeNewAddress() { + try { + writeLock.lock(); + writeCache[4] = (byte) newAddress.get8Bit(); + writeCache[5] = TRIGGER_BYTE_1; + writeCache[6] = TRIGGER_BYTE_2; + } finally { + writeLock.unlock(); + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptNullOp.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptNullOp.java new file mode 100644 index 00000000000..2f846959f34 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptNullOp.java @@ -0,0 +1,79 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.OpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.util.ElapsedTime; + +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * Demonstrates empty OpMode + */ +@TeleOp(name = "Concept: NullOp", group = "Concept") +@Disabled +public class ConceptNullOp extends OpMode { + + private ElapsedTime runtime = new ElapsedTime(); + + @Override + public void init() { + telemetry.addData("Status", "Initialized"); + } + + /* + * Code to run when the op mode is first enabled goes here + * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start() + */ + @Override + public void init_loop() { + } + + /* + * This method will be called ONCE when start is pressed + * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#loop() + */ + @Override + public void start() { + runtime.reset(); + } + + /* + * This method will be called repeatedly in a loop + * @see com.qualcomm.robotcore.eventloop.opmode.OpMode#loop() + */ + @Override + public void loop() { + telemetry.addData("Status", "Run Time: " + runtime.toString()); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptRampMotorSpeed.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptRampMotorSpeed.java new file mode 100644 index 00000000000..0a8f3dcc28c --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptRampMotorSpeed.java @@ -0,0 +1,114 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.DcMotor; + +/** + * This OpMode ramps a single motor speed up and down repeatedly until Stop is pressed. + * The code is structured as a LinearOpMode + * + * This code assumes a DC motor configured with the name "left_drive" as is found on a pushbot. + * + * INCREMENT sets how much to increase/decrease the power each cycle + * CYCLE_MS sets the update period. + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ +@TeleOp(name = "Concept: Ramp Motor Speed", group = "Concept") +@Disabled +public class ConceptRampMotorSpeed extends LinearOpMode { + + static final double INCREMENT = 0.01; // amount to ramp motor each CYCLE_MS cycle + static final int CYCLE_MS = 50; // period of each cycle + static final double MAX_FWD = 1.0; // Maximum FWD power applied to motor + static final double MAX_REV = -1.0; // Maximum REV power applied to motor + + // Define class members + DcMotor motor; + double power = 0; + boolean rampUp = true; + + + @Override + public void runOpMode() { + + // Connect to motor (Assume standard left wheel) + // Change the text in quotes to match any motor name on your robot. + motor = hardwareMap.get(DcMotor.class, "left_drive"); + + // Wait for the start button + telemetry.addData(">", "Press Start to run Motors." ); + telemetry.update(); + waitForStart(); + + // Ramp motor speeds till stop pressed. + while(opModeIsActive()) { + + // Ramp the motors, according to the rampUp variable. + if (rampUp) { + // Keep stepping up until we hit the max value. + power += INCREMENT ; + if (power >= MAX_FWD ) { + power = MAX_FWD; + rampUp = !rampUp; // Switch ramp direction + } + } + else { + // Keep stepping down until we hit the min value. + power -= INCREMENT ; + if (power <= MAX_REV ) { + power = MAX_REV; + rampUp = !rampUp; // Switch ramp direction + } + } + + // Display the current value + telemetry.addData("Motor Power", "%5.2f", power); + telemetry.addData(">", "Press Stop to end test." ); + telemetry.update(); + + // Set the motor to the new power and pause; + motor.setPower(power); + sleep(CYCLE_MS); + idle(); + } + + // Turn off motor and signal done; + motor.setPower(0); + telemetry.addData(">", "Done"); + telemetry.update(); + + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptRevSPARKMini.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptRevSPARKMini.java new file mode 100644 index 00000000000..b81b7dea72a --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptRevSPARKMini.java @@ -0,0 +1,112 @@ +/* Copyright (c) 2018 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.DcMotorSimple; +import com.qualcomm.robotcore.util.ElapsedTime; +import com.qualcomm.robotcore.util.Range; + + +/** + * + * This OpMode executes a basic Tank Drive Teleop for a two wheeled robot using two REV SPARK Minis. + * To use this example, connect two REV SPARK Minis into servo ports on the Expansion Hub. On the + * robot configuration, use the drop down list under 'Servos' to select 'REV SPARK Mini Controller' + * and name them 'left_drive' and 'right_drive'. + * + * Use Android Studios to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ + +@TeleOp(name="REV SPARK Mini Simple Drive Example", group="Concept") +@Disabled +public class ConceptRevSPARKMini extends LinearOpMode { + + // Declare OpMode members. + private ElapsedTime runtime = new ElapsedTime(); + private DcMotorSimple leftDrive = null; + private DcMotorSimple rightDrive = null; + + @Override + public void runOpMode() { + telemetry.addData("Status", "Initialized"); + telemetry.update(); + + // Initialize the hardware variables. Note that the strings used here as parameters + // to 'get' must correspond to the names assigned during the robot configuration + // step (using the FTC Robot Controller app on the phone). + leftDrive = hardwareMap.get(DcMotorSimple.class, "left_drive"); + rightDrive = hardwareMap.get(DcMotorSimple.class, "right_drive"); + + // Most robots need the motor on one side to be reversed to drive forward + // Reverse the motor that runs backwards when connected directly to the battery + leftDrive.setDirection(DcMotorSimple.Direction.FORWARD); + rightDrive.setDirection(DcMotorSimple.Direction.REVERSE); + + // Wait for the game to start (driver presses PLAY) + waitForStart(); + runtime.reset(); + + // run until the end of the match (driver presses STOP) + while (opModeIsActive()) { + + // Setup a variable for each drive wheel to save power level for telemetry + double leftPower; + double rightPower; + + // Choose to drive using either Tank Mode, or POV Mode + // Comment out the method that's not used. The default below is POV. + + // POV Mode uses left stick to go forward, and right stick to turn. + // - This uses basic math to combine motions and is easier to drive straight. + double drive = -gamepad1.left_stick_y; + double turn = gamepad1.right_stick_x; + leftPower = Range.clip(drive + turn, -1.0, 1.0) ; + rightPower = Range.clip(drive - turn, -1.0, 1.0) ; + + // Tank Mode uses one stick to control each wheel. + // - This requires no math, but it is hard to drive forward slowly and keep straight. + // leftPower = -gamepad1.left_stick_y ; + // rightPower = -gamepad1.right_stick_y ; + + // Send calculated power to wheels + leftDrive.setPower(leftPower); + rightDrive.setPower(rightPower); + + // Show the elapsed game time and wheel power. + telemetry.addData("Status", "Run Time: " + runtime.toString()); + telemetry.addData("Motors", "left (%.2f), right (%.2f)", leftPower, rightPower); + telemetry.update(); + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptScanServo.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptScanServo.java new file mode 100644 index 00000000000..8e9c899e40e --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptScanServo.java @@ -0,0 +1,115 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.Servo; + +/** + * This OpMode scans a single servo back and forwards until Stop is pressed. + * The code is structured as a LinearOpMode + * INCREMENT sets how much to increase/decrease the servo position each cycle + * CYCLE_MS sets the update period. + * + * This code assumes a Servo configured with the name "left_hand" as is found on a pushbot. + * + * NOTE: When any servo position is set, ALL attached servos are activated, so ensure that any other + * connected servos are able to move freely before running this test. + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ +@TeleOp(name = "Concept: Scan Servo", group = "Concept") +@Disabled +public class ConceptScanServo extends LinearOpMode { + + static final double INCREMENT = 0.01; // amount to slew servo each CYCLE_MS cycle + static final int CYCLE_MS = 50; // period of each cycle + static final double MAX_POS = 1.0; // Maximum rotational position + static final double MIN_POS = 0.0; // Minimum rotational position + + // Define class members + Servo servo; + double position = (MAX_POS - MIN_POS) / 2; // Start at halfway position + boolean rampUp = true; + + + @Override + public void runOpMode() { + + // Connect to servo (Assume PushBot Left Hand) + // Change the text in quotes to match any servo name on your robot. + servo = hardwareMap.get(Servo.class, "left_hand"); + + // Wait for the start button + telemetry.addData(">", "Press Start to scan Servo." ); + telemetry.update(); + waitForStart(); + + + // Scan servo till stop pressed. + while(opModeIsActive()){ + + // slew the servo, according to the rampUp (direction) variable. + if (rampUp) { + // Keep stepping up until we hit the max value. + position += INCREMENT ; + if (position >= MAX_POS ) { + position = MAX_POS; + rampUp = !rampUp; // Switch ramp direction + } + } + else { + // Keep stepping down until we hit the min value. + position -= INCREMENT ; + if (position <= MIN_POS ) { + position = MIN_POS; + rampUp = !rampUp; // Switch ramp direction + } + } + + // Display the current value + telemetry.addData("Servo Position", "%5.2f", position); + telemetry.addData(">", "Press Stop to end test." ); + telemetry.update(); + + // Set the servo to the new position and pause; + servo.setPosition(position); + sleep(CYCLE_MS); + idle(); + } + + // Signal done; + telemetry.addData(">", "Done"); + telemetry.update(); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptSoundsASJava.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptSoundsASJava.java new file mode 100644 index 00000000000..51d99d208c5 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptSoundsASJava.java @@ -0,0 +1,135 @@ +/* Copyright (c) 2018 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.ftccommon.SoundPlayer; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; + +import java.io.File; + +/** + * This file demonstrates how to play simple sounds on both the RC and DS phones. + * It illustrates how to build sounds into your application as a resource. + * This technique is best suited for use with Android Studio since it assumes you will be creating a new application + * + * If you are using OnBotJava, please see the ConceptSoundsOnBotJava sample + * + * Use Android Studios to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + * + * Operation: + * + * Gamepad X & B buttons are used to trigger sounds in this example, but any event can be used. + * Note: Time should be allowed for sounds to complete before playing other sounds. + * + * For sound files to be used as a compiled-in resource, they need to be located in a folder called "raw" under your "res" (resources) folder. + * You can create your own "raw" folder from scratch, or you can copy the one from the FtcRobotController module. + * + * Android Studio coders will ultimately need a folder in your path as follows: + * /TeamCode/src/main/res/raw + * + * Copy any .wav files you want to play into this folder. + * Make sure that your files ONLY use lower-case characters, and have no spaces or special characters other than underscore. + * + * The name you give your .wav files will become the resource ID for these sounds. + * eg: gold.wav becomes R.raw.gold + * + * If you wish to use the sounds provided for this sample, they are located in: + * /FtcRobotController/src/main/res/raw + * You can copy and paste the entire 'raw' folder using Android Studio. + * + */ + +@TeleOp(name="Concept: Sound Resources", group="Concept") +@Disabled +public class ConceptSoundsASJava extends LinearOpMode { + + // Declare OpMode members. + private boolean goldFound; // Sound file present flags + private boolean silverFound; + + private boolean isX = false; // Gamepad button state variables + private boolean isB = false; + + private boolean wasX = false; // Gamepad button history variables + private boolean WasB = false; + + @Override + public void runOpMode() { + + // Determine Resource IDs for sounds built into the RC application. + int silverSoundID = hardwareMap.appContext.getResources().getIdentifier("silver", "raw", hardwareMap.appContext.getPackageName()); + int goldSoundID = hardwareMap.appContext.getResources().getIdentifier("gold", "raw", hardwareMap.appContext.getPackageName()); + + // Determine if sound resources are found. + // Note: Preloading is NOT required, but it's a good way to verify all your sounds are available before you run. + if (goldSoundID != 0) + goldFound = SoundPlayer.getInstance().preload(hardwareMap.appContext, goldSoundID); + + if (silverSoundID != 0) + silverFound = SoundPlayer.getInstance().preload(hardwareMap.appContext, silverSoundID); + + // Display sound status + telemetry.addData("gold resource", goldFound ? "Found" : "NOT found\n Add gold.wav to /src/main/res/raw" ); + telemetry.addData("silver resource", silverFound ? "Found" : "Not found\n Add silver.wav to /src/main/res/raw" ); + + // Wait for the game to start (driver presses PLAY) + telemetry.addData(">", "Press Start to continue"); + telemetry.update(); + waitForStart(); + + telemetry.addData(">", "Press X, B to play sounds."); + telemetry.update(); + + // run until the end of the match (driver presses STOP) + while (opModeIsActive()) { + + // say Silver each time gamepad X is pressed (This sound is a resource) + if (silverFound && (isX = gamepad1.x) && !wasX) { + SoundPlayer.getInstance().startPlaying(hardwareMap.appContext, silverSoundID); + telemetry.addData("Playing", "Resource Silver"); + telemetry.update(); + } + + // say Gold each time gamepad B is pressed (This sound is a resource) + if (goldFound && (isB = gamepad1.b) && !WasB) { + SoundPlayer.getInstance().startPlaying(hardwareMap.appContext, goldSoundID); + telemetry.addData("Playing", "Resource Gold"); + telemetry.update(); + } + + // Save last button states + wasX = isX; + WasB = isB; + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptSoundsOnBotJava.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptSoundsOnBotJava.java new file mode 100644 index 00000000000..bacb66e3d41 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptSoundsOnBotJava.java @@ -0,0 +1,119 @@ +/* Copyright (c) 2018 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.ftccommon.SoundPlayer; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import java.io.File; + +/** + * This file demonstrates how to play simple sounds on both the RC and DS phones. + * It illustrates how to play sound files that have been copied to the RC Phone + * This technique is best suited for use with OnBotJava since it does not require the app to be modified. + * + * Operation: + * + * Gamepad X & B buttons are used to trigger sounds in this example, but any event can be used. + * Note: Time should be allowed for sounds to complete before playing other sounds. + * + * To play a new sound, you will need to copy the .wav files to the phone, and then provide the full path to them as part of your OpMode. + * This is done in this sample for the two sound files. silver.wav and gold.wav + * + * You can put the files in a variety of soundPaths, but we recommend you put them in the /FIRST/blocks/sounds folder. + * Your OpModes will have guaranteed access to this folder, and you can transfer files into this folder using the BLOCKS web page. + * -- There is a link called "sounds" on the right hand side of the color bar on the BLOCKS page that can be used to send sound files to this folder by default. + * Or you can use Windows File Manager, or ADB to transfer the sound files + * + * To get full use of THIS sample, you will need to copy two sound file called silver.wav and gold.wav to /FIRST/blocks/sounds on the RC phone. + * They can be located here: + * https://github.com/ftctechnh/ftc_app/tree/master/FtcRobotController/src/main/res/raw/gold.wav + * https://github.com/ftctechnh/ftc_app/tree/master/FtcRobotController/src/main/res/raw/silver.wav + */ + +@TeleOp(name="Concept: Sound Files", group="Concept") +@Disabled +public class ConceptSoundsOnBotJava extends LinearOpMode { + + // Point to sound files on the phone's drive + private String soundPath = "/FIRST/blocks/sounds"; + private File goldFile = new File("/sdcard" + soundPath + "/gold.wav"); + private File silverFile = new File("/sdcard" + soundPath + "/silver.wav"); + + // Declare OpMode members. + private boolean isX = false; // Gamepad button state variables + private boolean isB = false; + + private boolean wasX = false; // Gamepad button history variables + private boolean WasB = false; + + @Override + public void runOpMode() { + + // Make sure that the sound files exist on the phone + boolean goldFound = goldFile.exists(); + boolean silverFound = silverFile.exists(); + + // Display sound status + telemetry.addData("gold sound", goldFound ? "Found" : "NOT Found \nCopy gold.wav to " + soundPath ); + telemetry.addData("silver sound", silverFound ? "Found" : "NOT Found \nCopy silver.wav to " + soundPath ); + + // Wait for the game to start (driver presses PLAY) + telemetry.addData(">", "Press Start to continue"); + telemetry.update(); + waitForStart(); + + telemetry.addData(">", "Press X or B to play sounds."); + telemetry.update(); + + // run until the end of the match (driver presses STOP) + while (opModeIsActive()) { + + // say Silver each time gamepad X is pressed (This sound is a resource) + if (silverFound && (isX = gamepad1.x) && !wasX) { + SoundPlayer.getInstance().startPlaying(hardwareMap.appContext, silverFile); + telemetry.addData("Playing", "Silver File"); + telemetry.update(); + } + + // say Gold each time gamepad B is pressed (This sound is a resource) + if (goldFound && (isB = gamepad1.b) && !WasB) { + SoundPlayer.getInstance().startPlaying(hardwareMap.appContext, goldFile); + telemetry.addData("Playing", "Gold File"); + telemetry.update(); + } + + // Save last button states + wasX = isX; + WasB = isB; + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTelemetry.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTelemetry.java new file mode 100644 index 00000000000..d3b468282d8 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTelemetry.java @@ -0,0 +1,178 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.VoltageSensor; +import com.qualcomm.robotcore.util.ElapsedTime; + +import org.firstinspires.ftc.robotcore.external.Func; +import org.firstinspires.ftc.robotcore.external.Telemetry; + +/** + * {@link ConceptTelemetry} illustrates various ways in which telemetry can be + * transmitted from the robot controller to the driver station. The sample illustrates + * numeric and text data, formatted output, and optimized evaluation of expensive-to-acquire + * information. The telemetry {@link Telemetry#log() log} is illustrated by scrolling a poem + * to the driver station. + * + * @see Telemetry + */ +@TeleOp(name = "Concept: Telemetry", group = "Concept") +@Disabled +public class ConceptTelemetry extends LinearOpMode { + /** keeps track of the line of the poem which is to be emitted next */ + int poemLine = 0; + + /** keeps track of how long it's been since we last emitted a line of poetry */ + ElapsedTime poemElapsed = new ElapsedTime(); + + static final String[] poem = new String[] { + + "Mary had a little lamb,", + "His fleece was white as snow,", + "And everywhere that Mary went,", + "The lamb was sure to go.", + "", + "He followed her to school one day,", + "Which was against the rule,", + "It made the children laugh and play", + "To see a lamb at school.", + "", + "And so the teacher turned it out,", + "But still it lingered near,", + "And waited patiently about,", + "Till Mary did appear.", + "", + "\"Why does the lamb love Mary so?\"", + "The eager children cry.", + "\"Why, Mary loves the lamb, you know,\"", + "The teacher did reply.", + "", + "" + }; + + @Override public void runOpMode() { + + /* we keep track of how long it's been since the OpMode was started, just + * to have some interesting data to show */ + ElapsedTime opmodeRunTime = new ElapsedTime(); + + // We show the log in oldest-to-newest order, as that's better for poetry + telemetry.log().setDisplayOrder(Telemetry.Log.DisplayOrder.OLDEST_FIRST); + // We can control the number of lines shown in the log + telemetry.log().setCapacity(6); + // The interval between lines of poetry, in seconds + double sPoemInterval = 0.6; + + /** + * Wait until we've been given the ok to go. For something to do, we emit the + * elapsed time as we sit here and wait. If we didn't want to do anything while + * we waited, we would just call {@link #waitForStart()}. + */ + while (!isStarted()) { + telemetry.addData("time", "%.1f seconds", opmodeRunTime.seconds()); + telemetry.update(); + idle(); + } + + // Ok, we've been given the ok to go + + /** + * As an illustration, the first line on our telemetry display will display the battery voltage. + * The idea here is that it's expensive to compute the voltage (at least for purposes of illustration) + * so you don't want to do it unless the data is actually going to make it to the + * driver station (recall that telemetry transmission is throttled to reduce bandwidth use. + * Note that getBatteryVoltage() below returns 'Infinity' if there's no voltage sensor attached. + * + * @see Telemetry#getMsTransmissionInterval() + */ + telemetry.addData("voltage", "%.1f volts", new Func() { + @Override public Double value() { + return getBatteryVoltage(); + } + }); + + // Reset to keep some timing stats for the post-'start' part of the opmode + opmodeRunTime.reset(); + int loopCount = 1; + + // Go go gadget robot! + while (opModeIsActive()) { + + // Emit poetry if it's been a while + if (poemElapsed.seconds() > sPoemInterval) { + emitPoemLine(); + } + + // As an illustration, show some loop timing information + telemetry.addData("loop count", loopCount); + telemetry.addData("ms/loop", "%.3f ms", opmodeRunTime.milliseconds() / loopCount); + + // Show joystick information as some other illustrative data + telemetry.addLine("left joystick | ") + .addData("x", gamepad1.left_stick_x) + .addData("y", gamepad1.left_stick_y); + telemetry.addLine("right joystick | ") + .addData("x", gamepad1.right_stick_x) + .addData("y", gamepad1.right_stick_y); + + /** + * Transmit the telemetry to the driver station, subject to throttling. + * @see Telemetry#getMsTransmissionInterval() + */ + telemetry.update(); + + /** Update loop info and play nice with the rest of the {@link Thread}s in the system */ + loopCount++; + } + } + + // emits a line of poetry to the telemetry log + void emitPoemLine() { + telemetry.log().add(poem[poemLine]); + poemLine = (poemLine+1) % poem.length; + poemElapsed.reset(); + } + + // Computes the current battery voltage + double getBatteryVoltage() { + double result = Double.POSITIVE_INFINITY; + for (VoltageSensor sensor : hardwareMap.voltageSensor) { + double voltage = sensor.getVoltage(); + if (voltage > 0) { + result = Math.min(result, voltage); + } + } + return result; + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTensorFlowObjectDetection.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTensorFlowObjectDetection.java new file mode 100644 index 00000000000..146886c54a0 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTensorFlowObjectDetection.java @@ -0,0 +1,177 @@ +/* Copyright (c) 2018 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import java.util.List; +import org.firstinspires.ftc.robotcore.external.ClassFactory; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CameraDirection; +import org.firstinspires.ftc.robotcore.external.tfod.TFObjectDetector; +import org.firstinspires.ftc.robotcore.external.tfod.Recognition; + +/** + * This 2018-2019 OpMode illustrates the basics of using the TensorFlow Object Detection API to + * determine the position of the gold and silver minerals. + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list. + * + * IMPORTANT: In order to use this OpMode, you need to obtain your own Vuforia license key as + * is explained below. + */ +@TeleOp(name = "Concept: TensorFlow Object Detection", group = "Concept") +@Disabled +public class ConceptTensorFlowObjectDetection extends LinearOpMode { + private static final String TFOD_MODEL_ASSET = "RoverRuckus.tflite"; + private static final String LABEL_GOLD_MINERAL = "Gold Mineral"; + private static final String LABEL_SILVER_MINERAL = "Silver Mineral"; + + /* + * IMPORTANT: You need to obtain your own license key to use Vuforia. The string below with which + * 'parameters.vuforiaLicenseKey' is initialized is for illustration only, and will not function. + * A Vuforia 'Development' license key, can be obtained free of charge from the Vuforia developer + * web site at https://developer.vuforia.com/license-manager. + * + * Vuforia license keys are always 380 characters long, and look as if they contain mostly + * random data. As an example, here is a example of a fragment of a valid key: + * ... yIgIzTqZ4mWjk9wd3cZO9T1axEqzuhxoGlfOOI2dRzKS4T0hQ8kT ... + * Once you've obtained a license key, copy the string from the Vuforia web site + * and paste it in to your code on the next line, between the double quotes. + */ + private static final String VUFORIA_KEY = " -- YOUR NEW VUFORIA KEY GOES HERE --- "; + + /** + * {@link #vuforia} is the variable we will use to store our instance of the Vuforia + * localization engine. + */ + private VuforiaLocalizer vuforia; + + /** + * {@link #tfod} is the variable we will use to store our instance of the TensorFlow Object + * Detection engine. + */ + private TFObjectDetector tfod; + + @Override + public void runOpMode() { + // The TFObjectDetector uses the camera frames from the VuforiaLocalizer, so we create that + // first. + initVuforia(); + + if (ClassFactory.getInstance().canCreateTFObjectDetector()) { + initTfod(); + } else { + telemetry.addData("Sorry!", "This device is not compatible with TFOD"); + } + + /** Wait for the game to begin */ + telemetry.addData(">", "Press Play to start tracking"); + telemetry.update(); + waitForStart(); + + if (opModeIsActive()) { + /** Activate TensorFlow Object Detection. */ + if (tfod != null) { + tfod.activate(); + } + + while (opModeIsActive()) { + if (tfod != null) { + // getUpdatedRecognitions() will return null if no new information is available since + // the last time that call was made. + List updatedRecognitions = tfod.getUpdatedRecognitions(); + if (updatedRecognitions != null) { + telemetry.addData("# Object Detected", updatedRecognitions.size()); + if (updatedRecognitions.size() == 3) { + int goldMineralX = -1; + int silverMineral1X = -1; + int silverMineral2X = -1; + for (Recognition recognition : updatedRecognitions) { + if (recognition.getLabel().equals(LABEL_GOLD_MINERAL)) { + goldMineralX = (int) recognition.getLeft(); + } else if (silverMineral1X == -1) { + silverMineral1X = (int) recognition.getLeft(); + } else { + silverMineral2X = (int) recognition.getLeft(); + } + } + if (goldMineralX != -1 && silverMineral1X != -1 && silverMineral2X != -1) { + if (goldMineralX < silverMineral1X && goldMineralX < silverMineral2X) { + telemetry.addData("Gold Mineral Position", "Left"); + } else if (goldMineralX > silverMineral1X && goldMineralX > silverMineral2X) { + telemetry.addData("Gold Mineral Position", "Right"); + } else { + telemetry.addData("Gold Mineral Position", "Center"); + } + } + } + telemetry.update(); + } + } + } + } + + if (tfod != null) { + tfod.shutdown(); + } + } + + /** + * Initialize the Vuforia localization engine. + */ + private void initVuforia() { + /* + * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine. + */ + VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(); + + parameters.vuforiaLicenseKey = VUFORIA_KEY; + parameters.cameraDirection = CameraDirection.BACK; + + // Instantiate the Vuforia engine + vuforia = ClassFactory.getInstance().createVuforia(parameters); + + // Loading trackables is not necessary for the TensorFlow Object Detection engine. + } + + /** + * Initialize the TensorFlow Object Detection engine. + */ + private void initTfod() { + int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier( + "tfodMonitorViewId", "id", hardwareMap.appContext.getPackageName()); + TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId); + tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia); + tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTensorFlowObjectDetectionWebcam.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTensorFlowObjectDetectionWebcam.java new file mode 100644 index 00000000000..6bf8cf2380c --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptTensorFlowObjectDetectionWebcam.java @@ -0,0 +1,177 @@ +/* Copyright (c) 2018 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import java.util.List; +import org.firstinspires.ftc.robotcore.external.ClassFactory; +import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer; +import org.firstinspires.ftc.robotcore.external.tfod.TFObjectDetector; +import org.firstinspires.ftc.robotcore.external.tfod.Recognition; + +/** + * This 2018-2019 OpMode illustrates the basics of using the TensorFlow Object Detection API to + * determine the position of the gold and silver minerals. + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list. + * + * IMPORTANT: In order to use this OpMode, you need to obtain your own Vuforia license key as + * is explained below. + */ +@TeleOp(name = "Concept: TensorFlow Object Detection Webcam", group = "Concept") +@Disabled +public class ConceptTensorFlowObjectDetectionWebcam extends LinearOpMode { + private static final String TFOD_MODEL_ASSET = "RoverRuckus.tflite"; + private static final String LABEL_GOLD_MINERAL = "Gold Mineral"; + private static final String LABEL_SILVER_MINERAL = "Silver Mineral"; + + /* + * IMPORTANT: You need to obtain your own license key to use Vuforia. The string below with which + * 'parameters.vuforiaLicenseKey' is initialized is for illustration only, and will not function. + * A Vuforia 'Development' license key, can be obtained free of charge from the Vuforia developer + * web site at https://developer.vuforia.com/license-manager. + * + * Vuforia license keys are always 380 characters long, and look as if they contain mostly + * random data. As an example, here is a example of a fragment of a valid key: + * ... yIgIzTqZ4mWjk9wd3cZO9T1axEqzuhxoGlfOOI2dRzKS4T0hQ8kT ... + * Once you've obtained a license key, copy the string from the Vuforia web site + * and paste it in to your code on the next line, between the double quotes. + */ + private static final String VUFORIA_KEY = " -- YOUR NEW VUFORIA KEY GOES HERE --- "; + + /** + * {@link #vuforia} is the variable we will use to store our instance of the Vuforia + * localization engine. + */ + private VuforiaLocalizer vuforia; + + /** + * {@link #tfod} is the variable we will use to store our instance of the TensorFlow Object + * Detection engine. + */ + private TFObjectDetector tfod; + + @Override + public void runOpMode() { + // The TFObjectDetector uses the camera frames from the VuforiaLocalizer, so we create that + // first. + initVuforia(); + + if (ClassFactory.getInstance().canCreateTFObjectDetector()) { + initTfod(); + } else { + telemetry.addData("Sorry!", "This device is not compatible with TFOD"); + } + + /** Wait for the game to begin */ + telemetry.addData(">", "Press Play to start tracking"); + telemetry.update(); + waitForStart(); + + if (opModeIsActive()) { + /** Activate TensorFlow Object Detection. */ + if (tfod != null) { + tfod.activate(); + } + + while (opModeIsActive()) { + if (tfod != null) { + // getUpdatedRecognitions() will return null if no new information is available since + // the last time that call was made. + List updatedRecognitions = tfod.getUpdatedRecognitions(); + if (updatedRecognitions != null) { + telemetry.addData("# Object Detected", updatedRecognitions.size()); + if (updatedRecognitions.size() == 3) { + int goldMineralX = -1; + int silverMineral1X = -1; + int silverMineral2X = -1; + for (Recognition recognition : updatedRecognitions) { + if (recognition.getLabel().equals(LABEL_GOLD_MINERAL)) { + goldMineralX = (int) recognition.getLeft(); + } else if (silverMineral1X == -1) { + silverMineral1X = (int) recognition.getLeft(); + } else { + silverMineral2X = (int) recognition.getLeft(); + } + } + if (goldMineralX != -1 && silverMineral1X != -1 && silverMineral2X != -1) { + if (goldMineralX < silverMineral1X && goldMineralX < silverMineral2X) { + telemetry.addData("Gold Mineral Position", "Left"); + } else if (goldMineralX > silverMineral1X && goldMineralX > silverMineral2X) { + telemetry.addData("Gold Mineral Position", "Right"); + } else { + telemetry.addData("Gold Mineral Position", "Center"); + } + } + } + telemetry.update(); + } + } + } + } + + if (tfod != null) { + tfod.shutdown(); + } + } + + /** + * Initialize the Vuforia localization engine. + */ + private void initVuforia() { + /* + * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine. + */ + VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(); + + parameters.vuforiaLicenseKey = VUFORIA_KEY; + parameters.cameraName = hardwareMap.get(WebcamName.class, "Webcam 1"); + + // Instantiate the Vuforia engine + vuforia = ClassFactory.getInstance().createVuforia(parameters); + + // Loading trackables is not necessary for the TensorFlow Object Detection engine. + } + + /** + * Initialize the TensorFlow Object Detection engine. + */ + private void initTfod() { + int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier( + "tfodMonitorViewId", "id", hardwareMap.appContext.getPackageName()); + TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId); + tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia); + tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuMarkIdentification.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuMarkIdentification.java new file mode 100644 index 00000000000..f0d735bfb8d --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuMarkIdentification.java @@ -0,0 +1,186 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; + +import org.firstinspires.ftc.robotcore.external.ClassFactory; +import org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix; +import org.firstinspires.ftc.robotcore.external.matrices.VectorF; +import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit; +import org.firstinspires.ftc.robotcore.external.navigation.AxesOrder; +import org.firstinspires.ftc.robotcore.external.navigation.AxesReference; +import org.firstinspires.ftc.robotcore.external.navigation.Orientation; +import org.firstinspires.ftc.robotcore.external.navigation.RelicRecoveryVuMark; +import org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackables; + +/** + * This OpMode illustrates the basics of using the Vuforia engine to determine + * the identity of Vuforia VuMarks encountered on the field. The code is structured as + * a LinearOpMode. It shares much structure with {@link ConceptVuforiaNavigation}; we do not here + * duplicate the core Vuforia documentation found there, but rather instead focus on the + * differences between the use of Vuforia for navigation vs VuMark identification. + * + * @see ConceptVuforiaNavigation + * @see VuforiaLocalizer + * @see VuforiaTrackableDefaultListener + * see ftc_app/doc/tutorial/FTC_FieldCoordinateSystemDefinition.pdf + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list. + * + * IMPORTANT: In order to use this OpMode, you need to obtain your own Vuforia license key as + * is explained in {@link ConceptVuforiaNavigation}. + */ + +@TeleOp(name="Concept: VuMark Id", group ="Concept") +@Disabled +public class ConceptVuMarkIdentification extends LinearOpMode { + + public static final String TAG = "Vuforia VuMark Sample"; + + OpenGLMatrix lastLocation = null; + + /** + * {@link #vuforia} is the variable we will use to store our instance of the Vuforia + * localization engine. + */ + VuforiaLocalizer vuforia; + + @Override public void runOpMode() { + + /* + * To start up Vuforia, tell it the view that we wish to use for camera monitor (on the RC phone); + */ + int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier("cameraMonitorViewId", "id", hardwareMap.appContext.getPackageName()); + VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId); + + // OR... Do Not Activate the Camera Monitor View, to save power + // VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(); + + /* + * IMPORTANT: You need to obtain your own license key to use Vuforia. The string below with which + * 'parameters.vuforiaLicenseKey' is initialized is for illustration only, and will not function. + * A Vuforia 'Development' license key, can be obtained free of charge from the Vuforia developer + * web site at https://developer.vuforia.com/license-manager. + * + * Vuforia license keys are always 380 characters long, and look as if they contain mostly + * random data. As an example, here is a example of a fragment of a valid key: + * ... yIgIzTqZ4mWjk9wd3cZO9T1axEqzuhxoGlfOOI2dRzKS4T0hQ8kT ... + * Once you've obtained a license key, copy the string from the Vuforia web site + * and paste it in to your code on the next line, between the double quotes. + */ + parameters.vuforiaLicenseKey = " -- YOUR NEW VUFORIA KEY GOES HERE --- "; + + /* + * We also indicate which camera on the RC that we wish to use. + * Here we chose the back (HiRes) camera (for greater range), but + * for a competition robot, the front camera might be more convenient. + */ + parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK; + + /** + * Instantiate the Vuforia engine + */ + vuforia = ClassFactory.getInstance().createVuforia(parameters); + + + /** + * Load the data set containing the VuMarks for Relic Recovery. There's only one trackable + * in this data set: all three of the VuMarks in the game were created from this one template, + * but differ in their instance id information. + * @see VuMarkInstanceId + */ + VuforiaTrackables relicTrackables = this.vuforia.loadTrackablesFromAsset("RelicVuMark"); + VuforiaTrackable relicTemplate = relicTrackables.get(0); + relicTemplate.setName("relicVuMarkTemplate"); // can help in debugging; otherwise not necessary + + telemetry.addData(">", "Press Play to start"); + telemetry.update(); + waitForStart(); + + relicTrackables.activate(); + + while (opModeIsActive()) { + + /** + * See if any of the instances of {@link relicTemplate} are currently visible. + * {@link RelicRecoveryVuMark} is an enum which can have the following values: + * UNKNOWN, LEFT, CENTER, and RIGHT. When a VuMark is visible, something other than + * UNKNOWN will be returned by {@link RelicRecoveryVuMark#from(VuforiaTrackable)}. + */ + RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.from(relicTemplate); + if (vuMark != RelicRecoveryVuMark.UNKNOWN) { + + /* Found an instance of the template. In the actual game, you will probably + * loop until this condition occurs, then move on to act accordingly depending + * on which VuMark was visible. */ + telemetry.addData("VuMark", "%s visible", vuMark); + + /* For fun, we also exhibit the navigational pose. In the Relic Recovery game, + * it is perhaps unlikely that you will actually need to act on this pose information, but + * we illustrate it nevertheless, for completeness. */ + OpenGLMatrix pose = ((VuforiaTrackableDefaultListener)relicTemplate.getListener()).getPose(); + telemetry.addData("Pose", format(pose)); + + /* We further illustrate how to decompose the pose into useful rotational and + * translational components */ + if (pose != null) { + VectorF trans = pose.getTranslation(); + Orientation rot = Orientation.getOrientation(pose, AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES); + + // Extract the X, Y, and Z components of the offset of the target relative to the robot + double tX = trans.get(0); + double tY = trans.get(1); + double tZ = trans.get(2); + + // Extract the rotational components of the target relative to the robot + double rX = rot.firstAngle; + double rY = rot.secondAngle; + double rZ = rot.thirdAngle; + } + } + else { + telemetry.addData("VuMark", "not visible"); + } + + telemetry.update(); + } + } + + String format(OpenGLMatrix transformationMatrix) { + return (transformationMatrix != null) ? transformationMatrix.formatAsTransform() : "null"; + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuMarkIdentificationWebcam.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuMarkIdentificationWebcam.java new file mode 100644 index 00000000000..866261f223c --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuMarkIdentificationWebcam.java @@ -0,0 +1,194 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; + +import org.firstinspires.ftc.robotcore.external.ClassFactory; +import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName; +import org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix; +import org.firstinspires.ftc.robotcore.external.matrices.VectorF; +import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit; +import org.firstinspires.ftc.robotcore.external.navigation.AxesOrder; +import org.firstinspires.ftc.robotcore.external.navigation.AxesReference; +import org.firstinspires.ftc.robotcore.external.navigation.Orientation; +import org.firstinspires.ftc.robotcore.external.navigation.RelicRecoveryVuMark; +import org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackables; + +/** + * This OpMode illustrates the basics of using the Vuforia engine to determine + * the identity of Vuforia VuMarks encountered on the field. The code is structured as + * a LinearOpMode. It shares much structure with {@link ConceptVuforiaNavigationWebcam}; we do not here + * duplicate the core Vuforia documentation found there, but rather instead focus on the + * differences between the use of Vuforia for navigation vs VuMark identification. + * + * @see ConceptVuforiaNavigationWebcam + * @see VuforiaLocalizer + * @see VuforiaTrackableDefaultListener + * see ftc_app/doc/tutorial/FTC_FieldCoordinateSystemDefinition.pdf + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list. + * + * IMPORTANT: In order to use this OpMode, you need to obtain your own Vuforia license key as + * is explained in {@link ConceptVuforiaNavigationWebcam}. + */ + +@TeleOp(name="Concept: VuMark Id Webcam", group ="Concept") +@Disabled +public class ConceptVuMarkIdentificationWebcam extends LinearOpMode { + + public static final String TAG = "Vuforia VuMark Sample"; + + OpenGLMatrix lastLocation = null; + + /** + * {@link #vuforia} is the variable we will use to store our instance of the Vuforia + * localization engine. + */ + VuforiaLocalizer vuforia; + + /** + * This is the webcam we are to use. As with other hardware devices such as motors and + * servos, this device is identified using the robot configuration tool in the FTC application. + */ + WebcamName webcamName; + + @Override public void runOpMode() { + + /* + * Retrieve the camera we are to use. + */ + webcamName = hardwareMap.get(WebcamName.class, "Webcam 1"); + + /* + * To start up Vuforia, tell it the view that we wish to use for camera monitor (on the RC phone); + * If no camera monitor is desired, use the parameterless constructor instead (commented out below). + */ + int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier("cameraMonitorViewId", "id", hardwareMap.appContext.getPackageName()); + VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId); + + // OR... Do Not Activate the Camera Monitor View, to save power + // VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(); + + /* + * IMPORTANT: You need to obtain your own license key to use Vuforia. The string below with which + * 'parameters.vuforiaLicenseKey' is initialized is for illustration only, and will not function. + * A Vuforia 'Development' license key, can be obtained free of charge from the Vuforia developer + * web site at https://developer.vuforia.com/license-manager. + * + * Vuforia license keys are always 380 characters long, and look as if they contain mostly + * random data. As an example, here is a example of a fragment of a valid key: + * ... yIgIzTqZ4mWjk9wd3cZO9T1axEqzuhxoGlfOOI2dRzKS4T0hQ8kT ... + * Once you've obtained a license key, copy the string from the Vuforia web site + * and paste it in to your code on the next line, between the double quotes. + */ + parameters.vuforiaLicenseKey = " -- YOUR NEW VUFORIA KEY GOES HERE --- "; + + + /** + * We also indicate which camera on the RC we wish to use. For pedagogical purposes, + * we use the same logic as in {@link ConceptVuforiaNavigationWebcam}. + */ + parameters.cameraName = webcamName; + this.vuforia = ClassFactory.getInstance().createVuforia(parameters); + + /** + * Load the data set containing the VuMarks for Relic Recovery. There's only one trackable + * in this data set: all three of the VuMarks in the game were created from this one template, + * but differ in their instance id information. + * @see VuMarkInstanceId + */ + VuforiaTrackables relicTrackables = this.vuforia.loadTrackablesFromAsset("RelicVuMark"); + VuforiaTrackable relicTemplate = relicTrackables.get(0); + relicTemplate.setName("relicVuMarkTemplate"); // can help in debugging; otherwise not necessary + + telemetry.addData(">", "Press Play to start"); + telemetry.update(); + waitForStart(); + + relicTrackables.activate(); + + while (opModeIsActive()) { + + /** + * See if any of the instances of {@link relicTemplate} are currently visible. + * {@link RelicRecoveryVuMark} is an enum which can have the following values: + * UNKNOWN, LEFT, CENTER, and RIGHT. When a VuMark is visible, something other than + * UNKNOWN will be returned by {@link RelicRecoveryVuMark#from(VuforiaTrackable)}. + */ + RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.from(relicTemplate); + if (vuMark != RelicRecoveryVuMark.UNKNOWN) { + + /* Found an instance of the template. In the actual game, you will probably + * loop until this condition occurs, then move on to act accordingly depending + * on which VuMark was visible. */ + telemetry.addData("VuMark", "%s visible", vuMark); + + /* For fun, we also exhibit the navigational pose. In the Relic Recovery game, + * it is perhaps unlikely that you will actually need to act on this pose information, but + * we illustrate it nevertheless, for completeness. */ + OpenGLMatrix pose = ((VuforiaTrackableDefaultListener)relicTemplate.getListener()).getFtcCameraFromTarget(); + telemetry.addData("Pose", format(pose)); + + /* We further illustrate how to decompose the pose into useful rotational and + * translational components */ + if (pose != null) { + VectorF trans = pose.getTranslation(); + Orientation rot = Orientation.getOrientation(pose, AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES); + + // Extract the X, Y, and Z components of the offset of the target relative to the robot + double tX = trans.get(0); + double tY = trans.get(1); + double tZ = trans.get(2); + + // Extract the rotational components of the target relative to the robot + double rX = rot.firstAngle; + double rY = rot.secondAngle; + double rZ = rot.thirdAngle; + } + } + else { + telemetry.addData("VuMark", "not visible"); + } + + telemetry.update(); + } + } + + String format(OpenGLMatrix transformationMatrix) { + return (transformationMatrix != null) ? transformationMatrix.formatAsTransform() : "null"; + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuforiaNavRoverRuckus.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuforiaNavRoverRuckus.java new file mode 100644 index 00000000000..eb21cf78e9f --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuforiaNavRoverRuckus.java @@ -0,0 +1,311 @@ +/* Copyright (c) 2018 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; + +import org.firstinspires.ftc.robotcore.external.ClassFactory; +import org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix; +import org.firstinspires.ftc.robotcore.external.matrices.VectorF; +import org.firstinspires.ftc.robotcore.external.navigation.Orientation; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackables; + +import static org.firstinspires.ftc.robotcore.external.navigation.AngleUnit.DEGREES; +import static org.firstinspires.ftc.robotcore.external.navigation.AxesOrder.XYZ; +import static org.firstinspires.ftc.robotcore.external.navigation.AxesOrder.YZX; +import static org.firstinspires.ftc.robotcore.external.navigation.AxesReference.EXTRINSIC; +import static org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CameraDirection.BACK; +import static org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CameraDirection.FRONT; + +import java.util.ArrayList; +import java.util.List; + + +/** + * This 2018-2019 OpMode illustrates the basics of using the Vuforia localizer to determine + * positioning and orientation of robot on the FTC field. + * The code is structured as a LinearOpMode + * + * Vuforia uses the phone's camera to inspect it's surroundings, and attempt to locate target images. + * + * When images are located, Vuforia is able to determine the position and orientation of the + * image relative to the camera. This sample code than combines that information with a + * knowledge of where the target images are on the field, to determine the location of the camera. + * + * This example assumes a "square" field configuration where the red and blue alliance stations + * are on opposite walls of each other. + * + * From the Audience perspective, the Red Alliance station is on the right and the + * Blue Alliance Station is on the left. + + * The four vision targets are located in the center of each of the perimeter walls with + * the images facing inwards towards the robots: + * - BlueRover is the Mars Rover image target on the wall closest to the blue alliance + * - RedFootprint is the Lunar Footprint target on the wall closest to the red alliance + * - FrontCraters is the Lunar Craters image target on the wall closest to the audience + * - BackSpace is the Deep Space image target on the wall farthest from the audience + * + * A final calculation then uses the location of the camera on the robot to determine the + * robot's location and orientation on the field. + * + * @see VuforiaLocalizer + * @see VuforiaTrackableDefaultListener + * see ftc_app/doc/tutorial/FTC_FieldCoordinateSystemDefinition.pdf + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list. + * + * IMPORTANT: In order to use this OpMode, you need to obtain your own Vuforia license key as + * is explained below. + */ + +@TeleOp(name="Concept: Vuforia Rover Nav", group ="Concept") +@Disabled +public class ConceptVuforiaNavRoverRuckus extends LinearOpMode { + + /* + * IMPORTANT: You need to obtain your own license key to use Vuforia. The string below with which + * 'parameters.vuforiaLicenseKey' is initialized is for illustration only, and will not function. + * A Vuforia 'Development' license key, can be obtained free of charge from the Vuforia developer + * web site at https://developer.vuforia.com/license-manager. + * + * Vuforia license keys are always 380 characters long, and look as if they contain mostly + * random data. As an example, here is a example of a fragment of a valid key: + * ... yIgIzTqZ4mWjk9wd3cZO9T1axEqzuhxoGlfOOI2dRzKS4T0hQ8kT ... + * Once you've obtained a license key, copy the string from the Vuforia web site + * and paste it in to your code on the next line, between the double quotes. + */ + private static final String VUFORIA_KEY = " -- YOUR NEW VUFORIA KEY GOES HERE --- "; + + // Since ImageTarget trackables use mm to specifiy their dimensions, we must use mm for all the physical dimension. + // We will define some constants and conversions here + private static final float mmPerInch = 25.4f; + private static final float mmFTCFieldWidth = (12*6) * mmPerInch; // the width of the FTC field (from the center point to the outer panels) + private static final float mmTargetHeight = (6) * mmPerInch; // the height of the center of the target image above the floor + + // Select which camera you want use. The FRONT camera is the one on the same side as the screen. + // Valid choices are: BACK or FRONT + private static final VuforiaLocalizer.CameraDirection CAMERA_CHOICE = BACK; + + private OpenGLMatrix lastLocation = null; + private boolean targetVisible = false; + + /** + * {@link #vuforia} is the variable we will use to store our instance of the Vuforia + * localization engine. + */ + VuforiaLocalizer vuforia; + + @Override public void runOpMode() { + /* + * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine. + * We can pass Vuforia the handle to a camera preview resource (on the RC phone); + * If no camera monitor is desired, use the parameterless constructor instead (commented out below). + */ + int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier("cameraMonitorViewId", "id", hardwareMap.appContext.getPackageName()); + VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId); + + // VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(); + + parameters.vuforiaLicenseKey = VUFORIA_KEY ; + parameters.cameraDirection = CAMERA_CHOICE; + + // Instantiate the Vuforia engine + vuforia = ClassFactory.getInstance().createVuforia(parameters); + + // Load the data sets that for the trackable objects. These particular data + // sets are stored in the 'assets' part of our application. + VuforiaTrackables targetsRoverRuckus = this.vuforia.loadTrackablesFromAsset("RoverRuckus"); + VuforiaTrackable blueRover = targetsRoverRuckus.get(0); + blueRover.setName("Blue-Rover"); + VuforiaTrackable redFootprint = targetsRoverRuckus.get(1); + redFootprint.setName("Red-Footprint"); + VuforiaTrackable frontCraters = targetsRoverRuckus.get(2); + frontCraters.setName("Front-Craters"); + VuforiaTrackable backSpace = targetsRoverRuckus.get(3); + backSpace.setName("Back-Space"); + + // For convenience, gather together all the trackable objects in one easily-iterable collection */ + List allTrackables = new ArrayList(); + allTrackables.addAll(targetsRoverRuckus); + + /** + * In order for localization to work, we need to tell the system where each target is on the field, and + * where the phone resides on the robot. These specifications are in the form of transformation matrices. + * Transformation matrices are a central, important concept in the math here involved in localization. + * See Transformation Matrix + * for detailed information. Commonly, you'll encounter transformation matrices as instances + * of the {@link OpenGLMatrix} class. + * + * If you are standing in the Red Alliance Station looking towards the center of the field, + * - The X axis runs from your left to the right. (positive from the center to the right) + * - The Y axis runs from the Red Alliance Station towards the other side of the field + * where the Blue Alliance Station is. (Positive is from the center, towards the BlueAlliance station) + * - The Z axis runs from the floor, upwards towards the ceiling. (Positive is above the floor) + * + * This Rover Ruckus sample places a specific target in the middle of each perimeter wall. + * + * Before being transformed, each target image is conceptually located at the origin of the field's + * coordinate system (the center of the field), facing up. + */ + + /** + * To place the BlueRover target in the middle of the blue perimeter wall: + * - First we rotate it 90 around the field's X axis to flip it upright. + * - Then, we translate it along the Y axis to the blue perimeter wall. + */ + OpenGLMatrix blueRoverLocationOnField = OpenGLMatrix + .translation(0, mmFTCFieldWidth, mmTargetHeight) + .multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0, 0)); + blueRover.setLocation(blueRoverLocationOnField); + + /** + * To place the RedFootprint target in the middle of the red perimeter wall: + * - First we rotate it 90 around the field's X axis to flip it upright. + * - Second, we rotate it 180 around the field's Z axis so the image is flat against the red perimeter wall + * and facing inwards to the center of the field. + * - Then, we translate it along the negative Y axis to the red perimeter wall. + */ + OpenGLMatrix redFootprintLocationOnField = OpenGLMatrix + .translation(0, -mmFTCFieldWidth, mmTargetHeight) + .multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0, 180)); + redFootprint.setLocation(redFootprintLocationOnField); + + /** + * To place the FrontCraters target in the middle of the front perimeter wall: + * - First we rotate it 90 around the field's X axis to flip it upright. + * - Second, we rotate it 90 around the field's Z axis so the image is flat against the front wall + * and facing inwards to the center of the field. + * - Then, we translate it along the negative X axis to the front perimeter wall. + */ + OpenGLMatrix frontCratersLocationOnField = OpenGLMatrix + .translation(-mmFTCFieldWidth, 0, mmTargetHeight) + .multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0 , 90)); + frontCraters.setLocation(frontCratersLocationOnField); + + /** + * To place the BackSpace target in the middle of the back perimeter wall: + * - First we rotate it 90 around the field's X axis to flip it upright. + * - Second, we rotate it -90 around the field's Z axis so the image is flat against the back wall + * and facing inwards to the center of the field. + * - Then, we translate it along the X axis to the back perimeter wall. + */ + OpenGLMatrix backSpaceLocationOnField = OpenGLMatrix + .translation(mmFTCFieldWidth, 0, mmTargetHeight) + .multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0, -90)); + backSpace.setLocation(backSpaceLocationOnField); + + /** + * Create a transformation matrix describing where the phone is on the robot. + * + * The coordinate frame for the robot looks the same as the field. + * The robot's "forward" direction is facing out along X axis, with the LEFT side facing out along the Y axis. + * Z is UP on the robot. This equates to a bearing angle of Zero degrees. + * + * The phone starts out lying flat, with the screen facing Up and with the physical top of the phone + * pointing to the LEFT side of the Robot. It's very important when you test this code that the top of the + * camera is pointing to the left side of the robot. The rotation angles don't work if you flip the phone. + * + * If using the rear (High Res) camera: + * We need to rotate the camera around it's long axis to bring the rear camera forward. + * This requires a negative 90 degree rotation on the Y axis + * + * If using the Front (Low Res) camera + * We need to rotate the camera around it's long axis to bring the FRONT camera forward. + * This requires a Positive 90 degree rotation on the Y axis + * + * Next, translate the camera lens to where it is on the robot. + * In this example, it is centered (left to right), but 110 mm forward of the middle of the robot, and 200 mm above ground level. + */ + + final int CAMERA_FORWARD_DISPLACEMENT = 110; // eg: Camera is 110 mm in front of robot center + final int CAMERA_VERTICAL_DISPLACEMENT = 200; // eg: Camera is 200 mm above ground + final int CAMERA_LEFT_DISPLACEMENT = 0; // eg: Camera is ON the robot's center line + + OpenGLMatrix phoneLocationOnRobot = OpenGLMatrix + .translation(CAMERA_FORWARD_DISPLACEMENT, CAMERA_LEFT_DISPLACEMENT, CAMERA_VERTICAL_DISPLACEMENT) + .multiplied(Orientation.getRotationMatrix(EXTRINSIC, YZX, DEGREES, + CAMERA_CHOICE == FRONT ? 90 : -90, 0, 0)); + + /** Let all the trackable listeners know where the phone is. */ + for (VuforiaTrackable trackable : allTrackables) + { + ((VuforiaTrackableDefaultListener)trackable.getListener()).setPhoneInformation(phoneLocationOnRobot, parameters.cameraDirection); + } + + /** Wait for the game to begin */ + telemetry.addData(">", "Press Play to start tracking"); + telemetry.update(); + waitForStart(); + + /** Start tracking the data sets we care about. */ + targetsRoverRuckus.activate(); + while (opModeIsActive()) { + + // check all the trackable target to see which one (if any) is visible. + targetVisible = false; + for (VuforiaTrackable trackable : allTrackables) { + if (((VuforiaTrackableDefaultListener)trackable.getListener()).isVisible()) { + telemetry.addData("Visible Target", trackable.getName()); + targetVisible = true; + + // getUpdatedRobotLocation() will return null if no new information is available since + // the last time that call was made, or if the trackable is not currently visible. + OpenGLMatrix robotLocationTransform = ((VuforiaTrackableDefaultListener)trackable.getListener()).getUpdatedRobotLocation(); + if (robotLocationTransform != null) { + lastLocation = robotLocationTransform; + } + break; + } + } + + // Provide feedback as to where the robot is located (if we know). + if (targetVisible) { + // express position (translation) of robot in inches. + VectorF translation = lastLocation.getTranslation(); + telemetry.addData("Pos (in)", "{X, Y, Z} = %.1f, %.1f, %.1f", + translation.get(0) / mmPerInch, translation.get(1) / mmPerInch, translation.get(2) / mmPerInch); + + // express the rotation of the robot in degrees. + Orientation rotation = Orientation.getOrientation(lastLocation, EXTRINSIC, XYZ, DEGREES); + telemetry.addData("Rot (deg)", "{Roll, Pitch, Heading} = %.0f, %.0f, %.0f", rotation.firstAngle, rotation.secondAngle, rotation.thirdAngle); + } + else { + telemetry.addData("Visible Target", "none"); + } + telemetry.update(); + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuforiaNavigation.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuforiaNavigation.java new file mode 100644 index 00000000000..81ab6b68331 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuforiaNavigation.java @@ -0,0 +1,336 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.util.RobotLog; + +import org.firstinspires.ftc.robotcore.external.ClassFactory; +import org.firstinspires.ftc.robotcore.external.matrices.MatrixF; +import org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix; +import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit; +import org.firstinspires.ftc.robotcore.external.navigation.AxesOrder; +import org.firstinspires.ftc.robotcore.external.navigation.AxesReference; +import org.firstinspires.ftc.robotcore.external.navigation.Orientation; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackables; + +import java.util.ArrayList; +import java.util.List; + +/** + * This 2016-2017 OpMode illustrates the basics of using the Vuforia localizer to determine + * positioning and orientation of robot on the FTC field. + * The code is structured as a LinearOpMode + * + * Vuforia uses the phone's camera to inspect it's surroundings, and attempt to locate target images. + * + * When images are located, Vuforia is able to determine the position and orientation of the + * image relative to the camera. This sample code than combines that information with a + * knowledge of where the target images are on the field, to determine the location of the camera. + * + * This example assumes a "diamond" field configuration where the red and blue alliance stations + * are adjacent on the corner of the field furthest from the audience. + * From the Audience perspective, the Red driver station is on the right. + * The two vision target are located on the two walls closest to the audience, facing in. + * The Stones are on the RED side of the field, and the Chips are on the Blue side. + * + * A final calculation then uses the location of the camera on the robot to determine the + * robot's location and orientation on the field. + * + * @see VuforiaLocalizer + * @see VuforiaTrackableDefaultListener + * see ftc_app/doc/tutorial/FTC_FieldCoordinateSystemDefinition.pdf + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list. + * + * IMPORTANT: In order to use this OpMode, you need to obtain your own Vuforia license key as + * is explained below. + */ + +@TeleOp(name="Concept: Vuforia Navigation", group ="Concept") +@Disabled +public class ConceptVuforiaNavigation extends LinearOpMode { + + public static final String TAG = "Vuforia Navigation Sample"; + + OpenGLMatrix lastLocation = null; + + /** + * {@link #vuforia} is the variable we will use to store our instance of the Vuforia + * localization engine. + */ + VuforiaLocalizer vuforia; + + @Override public void runOpMode() { + /* + * To start up Vuforia, tell it the view that we wish to use for camera monitor (on the RC phone); + * If no camera monitor is desired, use the parameterless constructor instead (commented out below). + */ + int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier("cameraMonitorViewId", "id", hardwareMap.appContext.getPackageName()); + VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId); + + // OR... Do Not Activate the Camera Monitor View, to save power + // VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(); + + /* + * IMPORTANT: You need to obtain your own license key to use Vuforia. The string below with which + * 'parameters.vuforiaLicenseKey' is initialized is for illustration only, and will not function. + * A Vuforia 'Development' license key, can be obtained free of charge from the Vuforia developer + * web site at https://developer.vuforia.com/license-manager. + * + * Vuforia license keys are always 380 characters long, and look as if they contain mostly + * random data. As an example, here is a example of a fragment of a valid key: + * ... yIgIzTqZ4mWjk9wd3cZO9T1axEqzuhxoGlfOOI2dRzKS4T0hQ8kT ... + * Once you've obtained a license key, copy the string from the Vuforia web site + * and paste it in to your code on the next line, between the double quotes. + */ + parameters.vuforiaLicenseKey = " -- YOUR NEW VUFORIA KEY GOES HERE --- "; + + /* + * We also indicate which camera on the RC that we wish to use. + * Here we chose the back (HiRes) camera (for greater range), but + * for a competition robot, the front camera might be more convenient. + */ + parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK; + + /** + * Instantiate the Vuforia engine + */ + vuforia = ClassFactory.getInstance().createVuforia(parameters); + + /** + * Load the data sets that for the trackable objects we wish to track. These particular data + * sets are stored in the 'assets' part of our application (you'll see them in the Android + * Studio 'Project' view over there on the left of the screen). You can make your own datasets + * with the Vuforia Target Manager: https://developer.vuforia.com/target-manager. PDFs for the + * example "StonesAndChips", datasets can be found in in this project in the + * documentation directory. + */ + VuforiaTrackables stonesAndChips = this.vuforia.loadTrackablesFromAsset("StonesAndChips"); + VuforiaTrackable redTarget = stonesAndChips.get(0); + redTarget.setName("RedTarget"); // Stones + + VuforiaTrackable blueTarget = stonesAndChips.get(1); + blueTarget.setName("BlueTarget"); // Chips + + /** For convenience, gather together all the trackable objects in one easily-iterable collection */ + List allTrackables = new ArrayList(); + allTrackables.addAll(stonesAndChips); + + /** + * We use units of mm here because that's the recommended units of measurement for the + * size values specified in the XML for the ImageTarget trackables in data sets. E.g.: + * + * You don't *have to* use mm here, but the units here and the units used in the XML + * target configuration files *must* correspond for the math to work out correctly. + */ + float mmPerInch = 25.4f; + float mmBotWidth = 18 * mmPerInch; // ... or whatever is right for your robot + float mmFTCFieldWidth = (12*12 - 2) * mmPerInch; // the FTC field is ~11'10" center-to-center of the glass panels + + /** + * In order for localization to work, we need to tell the system where each target we + * wish to use for navigation resides on the field, and we need to specify where on the robot + * the phone resides. These specifications are in the form of transformation matrices. + * Transformation matrices are a central, important concept in the math here involved in localization. + * See Transformation Matrix + * for detailed information. Commonly, you'll encounter transformation matrices as instances + * of the {@link OpenGLMatrix} class. + * + * For the most part, you don't need to understand the details of the math of how transformation + * matrices work inside (as fascinating as that is, truly). Just remember these key points: + *
    + * + *
  1. You can put two transformations together to produce a third that combines the effect of + * both of them. If, for example, you have a rotation transform R and a translation transform T, + * then the combined transformation matrix RT which does the rotation first and then the translation + * is given by {@code RT = T.multiplied(R)}. That is, the transforms are multiplied in the + * reverse of the chronological order in which they applied.
  2. + * + *
  3. A common way to create useful transforms is to use methods in the {@link OpenGLMatrix} + * class and the Orientation class. See, for example, {@link OpenGLMatrix#translation(float, + * float, float)}, {@link OpenGLMatrix#rotation(AngleUnit, float, float, float, float)}, and + * {@link Orientation#getRotationMatrix(AxesReference, AxesOrder, AngleUnit, float, float, float)}. + * Related methods in {@link OpenGLMatrix}, such as {@link OpenGLMatrix#rotated(AngleUnit, + * float, float, float, float)}, are syntactic shorthands for creating a new transform and + * then immediately multiplying the receiver by it, which can be convenient at times.
  4. + * + *
  5. If you want to break open the black box of a transformation matrix to understand + * what it's doing inside, use {@link MatrixF#getTranslation()} to fetch how much the + * transform will move you in x, y, and z, and use {@link Orientation#getOrientation(MatrixF, + * AxesReference, AxesOrder, AngleUnit)} to determine the rotational motion that the transform + * will impart. See {@link #format(OpenGLMatrix)} below for an example.
  6. + * + *
+ * + * This example places the "stones" image on the perimeter wall to the Left + * of the Red Driver station wall. Similar to the Red Beacon Location on the Res-Q + * + * This example places the "chips" image on the perimeter wall to the Right + * of the Blue Driver station. Similar to the Blue Beacon Location on the Res-Q + * + * See the doc folder of this project for a description of the field Axis conventions. + * + * Initially the target is conceptually lying at the origin of the field's coordinate system + * (the center of the field), facing up. + * + * In this configuration, the target's coordinate system aligns with that of the field. + * + * In a real situation we'd also account for the vertical (Z) offset of the target, + * but for simplicity, we ignore that here; for a real robot, you'll want to fix that. + * + * To place the Stones Target on the Red Audience wall: + * - First we rotate it 90 around the field's X axis to flip it upright + * - Then we rotate it 90 around the field's Z access to face it away from the audience. + * - Finally, we translate it back along the X axis towards the red audience wall. + */ + OpenGLMatrix redTargetLocationOnField = OpenGLMatrix + /* Then we translate the target off to the RED WALL. Our translation here + is a negative translation in X.*/ + .translation(-mmFTCFieldWidth/2, 0, 0) + .multiplied(Orientation.getRotationMatrix( + /* First, in the fixed (field) coordinate system, we rotate 90deg in X, then 90 in Z */ + AxesReference.EXTRINSIC, AxesOrder.XZX, + AngleUnit.DEGREES, 90, 90, 0)); + redTarget.setLocation(redTargetLocationOnField); + RobotLog.ii(TAG, "Red Target=%s", format(redTargetLocationOnField)); + + /* + * To place the Stones Target on the Blue Audience wall: + * - First we rotate it 90 around the field's X axis to flip it upright + * - Finally, we translate it along the Y axis towards the blue audience wall. + */ + OpenGLMatrix blueTargetLocationOnField = OpenGLMatrix + /* Then we translate the target off to the Blue Audience wall. + Our translation here is a positive translation in Y.*/ + .translation(0, mmFTCFieldWidth/2, 0) + .multiplied(Orientation.getRotationMatrix( + /* First, in the fixed (field) coordinate system, we rotate 90deg in X */ + AxesReference.EXTRINSIC, AxesOrder.XZX, + AngleUnit.DEGREES, 90, 0, 0)); + blueTarget.setLocation(blueTargetLocationOnField); + RobotLog.ii(TAG, "Blue Target=%s", format(blueTargetLocationOnField)); + + /** + * Create a transformation matrix describing where the phone is on the robot. Here, we + * put the phone on the right hand side of the robot with the screen facing in (see our + * choice of BACK camera above) and in landscape mode. Starting from alignment between the + * robot's and phone's axes, this is a rotation of -90deg along the Y axis. + * + * When determining whether a rotation is positive or negative, consider yourself as looking + * down the (positive) axis of rotation from the positive towards the origin. Positive rotations + * are then CCW, and negative rotations CW. An example: consider looking down the positive Z + * axis towards the origin. A positive rotation about Z (ie: a rotation parallel to the the X-Y + * plane) is then CCW, as one would normally expect from the usual classic 2D geometry. + */ + OpenGLMatrix phoneLocationOnRobot = OpenGLMatrix + .translation(mmBotWidth/2,0,0) + .multiplied(Orientation.getRotationMatrix( + AxesReference.EXTRINSIC, AxesOrder.YZY, + AngleUnit.DEGREES, -90, 0, 0)); + RobotLog.ii(TAG, "phone=%s", format(phoneLocationOnRobot)); + + /** + * Let the trackable listeners we care about know where the phone is. We know that each + * listener is a {@link VuforiaTrackableDefaultListener} and can so safely cast because + * we have not ourselves installed a listener of a different type. + */ + ((VuforiaTrackableDefaultListener)redTarget.getListener()).setPhoneInformation(phoneLocationOnRobot, parameters.cameraDirection); + ((VuforiaTrackableDefaultListener)blueTarget.getListener()).setPhoneInformation(phoneLocationOnRobot, parameters.cameraDirection); + + /** + * A brief tutorial: here's how all the math is going to work: + * + * C = phoneLocationOnRobot maps phone coords -> robot coords + * P = tracker.getPose() maps image target coords -> phone coords + * L = redTargetLocationOnField maps image target coords -> field coords + * + * So + * + * C.inverted() maps robot coords -> phone coords + * P.inverted() maps phone coords -> imageTarget coords + * + * Putting that all together, + * + * L x P.inverted() x C.inverted() maps robot coords to field coords. + * + * @see VuforiaTrackableDefaultListener#getRobotLocation() + */ + + /** Wait for the game to begin */ + telemetry.addData(">", "Press Play to start tracking"); + telemetry.update(); + waitForStart(); + + /** Start tracking the data sets we care about. */ + stonesAndChips.activate(); + + while (opModeIsActive()) { + + for (VuforiaTrackable trackable : allTrackables) { + /** + * getUpdatedRobotLocation() will return null if no new information is available since + * the last time that call was made, or if the trackable is not currently visible. + * getRobotLocation() will return null if the trackable is not currently visible. + */ + telemetry.addData(trackable.getName(), ((VuforiaTrackableDefaultListener)trackable.getListener()).isVisible() ? "Visible" : "Not Visible"); // + + OpenGLMatrix robotLocationTransform = ((VuforiaTrackableDefaultListener)trackable.getListener()).getUpdatedRobotLocation(); + if (robotLocationTransform != null) { + lastLocation = robotLocationTransform; + } + } + /** + * Provide feedback as to where the robot was last located (if we know). + */ + if (lastLocation != null) { + // RobotLog.vv(TAG, "robot=%s", format(lastLocation)); + telemetry.addData("Pos", format(lastLocation)); + } else { + telemetry.addData("Pos", "Unknown"); + } + telemetry.update(); + } + } + + /** + * A simple utility that extracts positioning information from a transformation matrix + * and formats it in a form palatable to a human being. + */ + String format(OpenGLMatrix transformationMatrix) { + return transformationMatrix.formatAsTransform(); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuforiaNavigationWebcam.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuforiaNavigationWebcam.java new file mode 100644 index 00000000000..1b619f3dea5 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptVuforiaNavigationWebcam.java @@ -0,0 +1,461 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import android.graphics.Bitmap; + +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.util.RobotLog; +import com.qualcomm.robotcore.util.ThreadPool; +import com.vuforia.Frame; + +import org.firstinspires.ftc.robotcore.external.ClassFactory; +import org.firstinspires.ftc.robotcore.external.function.Consumer; +import org.firstinspires.ftc.robotcore.external.function.Continuation; +import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName; +import org.firstinspires.ftc.robotcore.external.matrices.MatrixF; +import org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix; +import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit; +import org.firstinspires.ftc.robotcore.external.navigation.AxesOrder; +import org.firstinspires.ftc.robotcore.external.navigation.AxesReference; +import org.firstinspires.ftc.robotcore.external.navigation.Orientation; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener; +import org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackables; +import org.firstinspires.ftc.robotcore.internal.system.AppUtil; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +/** + * This 2016-2017 OpMode illustrates the basics of using the Vuforia localizer to determine + * positioning and orientation of robot on the FTC field. + * The code is structured as a LinearOpMode + * + * Vuforia uses the phone's camera to inspect it's surroundings, and attempt to locate target images. + * + * When images are located, Vuforia is able to determine the position and orientation of the + * image relative to the camera. This sample code than combines that information with a + * knowledge of where the target images are on the field, to determine the location of the camera. + * + * This example assumes a "diamond" field configuration where the red and blue alliance stations + * are adjacent on the corner of the field furthest from the audience. + * From the Audience perspective, the Red driver station is on the right. + * The two vision target are located on the two walls closest to the audience, facing in. + * The Stones are on the RED side of the field, and the Chips are on the Blue side. + * + * A final calculation then uses the location of the camera on the robot to determine the + * robot's location and orientation on the field. + * + * @see VuforiaLocalizer + * @see VuforiaTrackableDefaultListener + * see ftc_app/doc/tutorial/FTC_FieldCoordinateSystemDefinition.pdf + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list. + * + * IMPORTANT: In order to use this OpMode, you need to obtain your own Vuforia license key as + * is explained below. + */ + +@TeleOp(name="Concept: Vuforia Nav Webcam", group ="Concept") +@Disabled +public class ConceptVuforiaNavigationWebcam extends LinearOpMode { + + public static final String TAG = "Vuforia Navigation Sample"; + + OpenGLMatrix lastLocation = null; + + /** + * @see #captureFrameToFile() + */ + int captureCounter = 0; + File captureDirectory = AppUtil.ROBOT_DATA_DIR; + + /** + * {@link #vuforia} is the variable we will use to store our instance of the Vuforia + * localization engine. + */ + VuforiaLocalizer vuforia; + + /** + * This is the webcam we are to use. As with other hardware devices such as motors and + * servos, this device is identified using the robot configuration tool in the FTC application. + */ + WebcamName webcamName; + + @Override public void runOpMode() { + + /* + * Retrieve the camera we are to use. + */ + webcamName = hardwareMap.get(WebcamName.class, "Webcam 1"); + + /* + * To start up Vuforia, tell it the view that we wish to use for camera monitor (on the RC phone); + * If no camera monitor is desired, use the parameterless constructor instead (commented out below). + */ + int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier("cameraMonitorViewId", "id", hardwareMap.appContext.getPackageName()); + VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId); + + // OR... Do Not Activate the Camera Monitor View, to save power + // VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(); + + /* + * IMPORTANT: You need to obtain your own license key to use Vuforia. The string below with which + * 'parameters.vuforiaLicenseKey' is initialized is for illustration only, and will not function. + * A Vuforia 'Development' license key, can be obtained free of charge from the Vuforia developer + * web site at https://developer.vuforia.com/license-manager. + * + * Vuforia license keys are always 380 characters long, and look as if they contain mostly + * random data. As an example, here is a example of a fragment of a valid key: + * ... yIgIzTqZ4mWjk9wd3cZO9T1axEqzuhxoGlfOOI2dRzKS4T0hQ8kT ... + * Once you've obtained a license key, copy the string from the Vuforia web site + * and paste it in to your code on the next line, between the double quotes. + */ + parameters.vuforiaLicenseKey = " -- YOUR NEW VUFORIA KEY GOES HERE --- "; + + /** + * We also indicate which camera on the RC we wish to use. + */ + parameters.cameraName = webcamName; + + /** + * Instantiate the Vuforia engine + */ + vuforia = ClassFactory.getInstance().createVuforia(parameters); + + /** + * Because this opmode processes frames in order to write them to a file, we tell Vuforia + * that we want to ensure that certain frame formats are available in the {@link Frame}s we + * see. + */ + vuforia.enableConvertFrameToBitmap(); + + /** @see #captureFrameToFile() */ + AppUtil.getInstance().ensureDirectoryExists(captureDirectory); + + + /** + * Load the data sets that for the trackable objects we wish to track. These particular data + * sets are stored in the 'assets' part of our application (you'll see them in the Android + * Studio 'Project' view over there on the left of the screen). You can make your own datasets + * with the Vuforia Target Manager: https://developer.vuforia.com/target-manager. PDFs for the + * example "StonesAndChips", datasets can be found in in this project in the + * documentation directory. + */ + VuforiaTrackables stonesAndChips = vuforia.loadTrackablesFromAsset("StonesAndChips"); + VuforiaTrackable redTarget = stonesAndChips.get(0); + redTarget.setName("RedTarget"); // Stones + + VuforiaTrackable blueTarget = stonesAndChips.get(1); + blueTarget.setName("BlueTarget"); // Chips + + /** For convenience, gather together all the trackable objects in one easily-iterable collection */ + List allTrackables = new ArrayList(); + allTrackables.addAll(stonesAndChips); + + /** + * We use units of mm here because that's the recommended units of measurement for the + * size values specified in the XML for the ImageTarget trackables in data sets. E.g.: + * + * You don't *have to* use mm here, but the units here and the units used in the XML + * target configuration files *must* correspond for the math to work out correctly. + */ + float mmPerInch = 25.4f; + float mmBotWidth = 18 * mmPerInch; // ... or whatever is right for your robot + float mmFTCFieldWidth = (12*12 - 2) * mmPerInch; // the FTC field is ~11'10" center-to-center of the glass panels + + /** + * In order for localization to work, we need to tell the system where each target we + * wish to use for navigation resides on the field, and we need to specify where on the robot + * the camera resides. These specifications are in the form of transformation matrices. + * Transformation matrices are a central, important concept in the math here involved in localization. + * See Transformation Matrix + * for detailed information. Commonly, you'll encounter transformation matrices as instances + * of the {@link OpenGLMatrix} class. + * + * For the most part, you don't need to understand the details of the math of how transformation + * matrices work inside (as fascinating as that is, truly). Just remember these key points: + *
    + * + *
  1. You can put two transformations together to produce a third that combines the effect of + * both of them. If, for example, you have a rotation transform R and a translation transform T, + * then the combined transformation matrix RT which does the rotation first and then the translation + * is given by {@code RT = T.multiplied(R)}. That is, the transforms are multiplied in the + * reverse of the chronological order in which they applied.
  2. + * + *
  3. A common way to create useful transforms is to use methods in the {@link OpenGLMatrix} + * class and the Orientation class. See, for example, {@link OpenGLMatrix#translation(float, + * float, float)}, {@link OpenGLMatrix#rotation(AngleUnit, float, float, float, float)}, and + * {@link Orientation#getRotationMatrix(AxesReference, AxesOrder, AngleUnit, float, float, float)}. + * Related methods in {@link OpenGLMatrix}, such as {@link OpenGLMatrix#rotated(AngleUnit, + * float, float, float, float)}, are syntactic shorthands for creating a new transform and + * then immediately multiplying the receiver by it, which can be convenient at times.
  4. + * + *
  5. If you want to break open the black box of a transformation matrix to understand + * what it's doing inside, use {@link MatrixF#getTranslation()} to fetch how much the + * transform will move you in x, y, and z, and use {@link Orientation#getOrientation(MatrixF, + * AxesReference, AxesOrder, AngleUnit)} to determine the rotational motion that the transform + * will impart. See {@link #format(OpenGLMatrix)} below for an example.
  6. + * + *
+ * + * This example places the "stones" image on the perimeter wall to the Left + * of the Red Driver station wall. Similar to the Red Beacon Location on the Res-Q + * + * This example places the "chips" image on the perimeter wall to the Right + * of the Blue Driver station. Similar to the Blue Beacon Location on the Res-Q + * + * See the doc folder of this project for a description of the Field Coordinate System + * conventions. + * + * Initially the target is conceptually lying at the origin of the Field Coordinate System + * (the center of the field), facing up. + * + * In this configuration, the target's coordinate system aligns with that of the field. + * + * In a real situation we'd also account for the vertical (Z) offset of the target, + * but for simplicity, we ignore that here; for a real robot, you'll want to fix that. + * + * To place the Stones Target on the Red Audience wall: + * - First we rotate it 90 around the field's X axis to flip it upright + * - Then we rotate it 90 around the field's Z access to face it away from the audience. + * - Finally, we translate it back along the X axis towards the red audience wall. + */ + OpenGLMatrix redTargetLocationOnField = OpenGLMatrix + /* Then we translate the target off to the RED WALL. Our translation here + is a negative translation in X.*/ + .translation(-mmFTCFieldWidth/2, 0, 0) + .multiplied(Orientation.getRotationMatrix( + /* First, in the fixed (field) coordinate system, we rotate 90deg in X, then 90 in Z */ + AxesReference.EXTRINSIC, AxesOrder.XZX, + AngleUnit.DEGREES, 90, 90, 0)); + redTarget.setLocationFtcFieldFromTarget(redTargetLocationOnField); + RobotLog.ii(TAG, "Red Target=%s", format(redTargetLocationOnField)); + + /* + * To place the Stones Target on the Blue Audience wall: + * - First we rotate it 90 around the field's X axis to flip it upright + * - Finally, we translate it along the Y axis towards the blue audience wall. + */ + OpenGLMatrix blueTargetLocationOnField = OpenGLMatrix + /* Then we translate the target off to the Blue Audience wall. + Our translation here is a positive translation in Y.*/ + .translation(0, mmFTCFieldWidth/2, 0) + .multiplied(Orientation.getRotationMatrix( + /* First, in the fixed (field) coordinate system, we rotate 90deg in X */ + AxesReference.EXTRINSIC, AxesOrder.XZX, + AngleUnit.DEGREES, 90, 0, 0)); + blueTarget.setLocationFtcFieldFromTarget(blueTargetLocationOnField); + RobotLog.ii(TAG, "Blue Target=%s", format(blueTargetLocationOnField)); + + /** + * We also need to tell Vuforia where the cameras are relative to the robot. + * + * Just as there is a Field Coordinate System, so too there is a Robot Coordinate System. + * The two share many similarities. The origin of the Robot Coordinate System is wherever + * you choose to make it on the robot, but typically you'd choose somewhere in the middle + * of the robot. From that origin, the Y axis is horizontal and positive out towards the + * "front" of the robot (however you choose "front" to be defined), the X axis is horizontal + * and positive out towards the "right" of the robot (i.e.: 90deg horizontally clockwise from + * the positive Y axis), and the Z axis is vertical towards the sky. + * + * Similarly, for each camera there is a Camera Coordinate System. The origin of a Camera + * Coordinate System lies in the middle of the sensor inside of the camera. The Z axis is + * positive coming out of the lens of the camera in a direction perpendicular to the plane + * of the sensor. When looking at the face of the lens of the camera (down the positive Z + * axis), the X axis is positive off to the right in the plane of the sensor, and the Y axis + * is positive out the top of the lens in the plane of the sensor at 90 horizontally + * counter clockwise from the X axis. + * + * Next, there is Phone Coordinate System (for robots that have phones, of course), though + * with the advent of Vuforia support for Webcams, this coordinate system is less significant + * than it was previously. The Phone Coordinate System is defined thusly: with the phone in + * flat front of you in portrait mode (i.e. as it is when running the robot controller app) + * and you are staring straight at the face of the phone, + * * X is positive heading off to your right, + * * Y is positive heading up through the top edge of the phone, and + * * Z is pointing out of the screen, toward you. + * The origin of the Phone Coordinate System is at the origin of the Camera Coordinate System + * of the front-facing camera on the phone. + * + * Finally, it is worth noting that trackable Vuforia Image Targets have their own + * coordinate system (see {@link VuforiaTrackable}. This is sometimes referred to as the + * Target Coordinate System. In keeping with the above, when looking at the target in its + * natural orientation, in the Target Coodinate System + * * X is positive heading off to your right, + * * Y is positive heading up through the top edge of the target, and + * * Z is pointing out of the target, toward you. + * + * One can observe that the Camera Coordinate System of the front-facing camera on a phone + * coincides with the Phone Coordinate System. Further, when a phone is placed on its back + * at the origin of the Robot Coordinate System and aligned appropriately, those coordinate + * systems also coincide with the Robot Coordinate System. Got it? + * + * In this example here, we're going to assume that we put the camera on the right side + * of the robot (facing outwards, of course). To determine the transformation matrix that + * describes that location, first consider the camera as lying on its back at the origin + * of the Robot Coordinate System such that the Camera Coordinate System and Robot Coordinate + * System coincide. Then the transformation we need is + * * first a rotation of the camera by +90deg along the robot X axis, + * * then a rotation of the camera by +90deg along the robot Z axis, and + * * finally a translation of the camera to the side of the robot. + * + * When determining whether a rotation is positive or negative, consider yourself as looking + * down the (positive) axis of rotation from the positive towards the origin. Positive rotations + * are then CCW, and negative rotations CW. An example: consider looking down the positive Z + * axis towards the origin. A positive rotation about Z (ie: a rotation parallel to the the X-Y + * plane) is then CCW, as one would normally expect from the usual classic 2D geometry. + */ + + OpenGLMatrix robotFromCamera = OpenGLMatrix + .translation(mmBotWidth/2,0,0) + .multiplied(Orientation.getRotationMatrix( + AxesReference.EXTRINSIC, AxesOrder.XZY, + AngleUnit.DEGREES, 90, 90, 0)); + RobotLog.ii(TAG, "camera=%s", format(robotFromCamera)); + + /** + * Let the trackable listeners we care about know where the camera is. We know that each + * listener is a {@link VuforiaTrackableDefaultListener} and can so safely cast because + * we have not ourselves installed a listener of a different type. + */ + ((VuforiaTrackableDefaultListener)redTarget.getListener()).setCameraLocationOnRobot(parameters.cameraName, robotFromCamera); + ((VuforiaTrackableDefaultListener)blueTarget.getListener()).setCameraLocationOnRobot(parameters.cameraName, robotFromCamera); + + /** + * A brief tutorial: here's how all the math is going to work: + * + * C = robotFromCamera maps camera coords -> robot coords + * P = tracker.getPose() maps image target coords -> camera coords + * L = redTargetLocationOnField maps image target coords -> field coords + * + * So + * + * C.inverted() maps robot coords -> camera coords + * P.inverted() maps camera coords -> imageTarget coords + * + * Putting that all together, + * + * L x P.inverted() x C.inverted() maps robot coords to field coords. + * + * @see VuforiaTrackableDefaultListener#getRobotLocation() + */ + + /** Wait for the game to begin */ + telemetry.addData(">", "Press Play to start tracking"); + telemetry.update(); + waitForStart(); + + /** Start tracking the data sets we care about. */ + stonesAndChips.activate(); + + boolean buttonPressed = false; + while (opModeIsActive()) { + + if (gamepad1.a && !buttonPressed) { + captureFrameToFile(); + } + buttonPressed = gamepad1.a; + + for (VuforiaTrackable trackable : allTrackables) { + /** + * getUpdatedRobotLocation() will return null if no new information is available since + * the last time that call was made, or if the trackable is not currently visible. + * getRobotLocation() will return null if the trackable is not currently visible. + */ + telemetry.addData(trackable.getName(), ((VuforiaTrackableDefaultListener)trackable.getListener()).isVisible() ? "Visible" : "Not Visible"); // + + OpenGLMatrix robotLocationTransform = ((VuforiaTrackableDefaultListener)trackable.getListener()).getUpdatedRobotLocation(); + if (robotLocationTransform != null) { + lastLocation = robotLocationTransform; + } + } + /** + * Provide feedback as to where the robot was last located (if we know). + */ + if (lastLocation != null) { + // RobotLog.vv(TAG, "robot=%s", format(lastLocation)); + telemetry.addData("Pos", format(lastLocation)); + } else { + telemetry.addData("Pos", "Unknown"); + } + telemetry.update(); + } + } + + /** + * A simple utility that extracts positioning information from a transformation matrix + * and formats it in a form palatable to a human being. + */ + String format(OpenGLMatrix transformationMatrix) { + return transformationMatrix.formatAsTransform(); + } + + /** + * Sample one frame from the Vuforia stream and write it to a .PNG image file on the robot + * controller in the /sdcard/FIRST/data directory. The images can be downloaded using Android + * Studio's Device File Explorer, ADB, or the Media Transfer Protocol (MTP) integration into + * Windows Explorer, among other means. The images can be useful during robot design and calibration + * in order to get a sense of what the camera is actually seeing and so assist in camera + * aiming and alignment. + */ + void captureFrameToFile() { + vuforia.getFrameOnce(Continuation.create(ThreadPool.getDefault(), new Consumer() + { + @Override public void accept(Frame frame) + { + Bitmap bitmap = vuforia.convertFrameToBitmap(frame); + if (bitmap != null) { + File file = new File(captureDirectory, String.format(Locale.getDefault(), "VuforiaFrame-%d.png", captureCounter++)); + try { + FileOutputStream outputStream = new FileOutputStream(file); + try { + bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream); + } finally { + outputStream.close(); + telemetry.log().add("captured %s", file.getName()); + } + } catch (IOException e) { + RobotLog.ee(TAG, e, "exception in captureFrameToFile()"); + } + } + } + })); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/HardwarePushbot.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/HardwarePushbot.java new file mode 100644 index 00000000000..4848137e119 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/HardwarePushbot.java @@ -0,0 +1,105 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.hardware.DcMotor; +import com.qualcomm.robotcore.hardware.HardwareMap; +import com.qualcomm.robotcore.hardware.Servo; +import com.qualcomm.robotcore.util.ElapsedTime; + +/** + * This is NOT an opmode. + * + * This class can be used to define all the specific hardware for a single robot. + * In this case that robot is a Pushbot. + * See PushbotTeleopTank_Iterative and others classes starting with "Pushbot" for usage examples. + * + * This hardware class assumes the following device names have been configured on the robot: + * Note: All names are lower case and some have single spaces between words. + * + * Motor channel: Left drive motor: "left_drive" + * Motor channel: Right drive motor: "right_drive" + * Motor channel: Manipulator drive motor: "left_arm" + * Servo channel: Servo to open left claw: "left_hand" + * Servo channel: Servo to open right claw: "right_hand" + */ +public class HardwarePushbot +{ + /* Public OpMode members. */ + public DcMotor leftDrive = null; + public DcMotor rightDrive = null; + public DcMotor leftArm = null; + public Servo leftClaw = null; + public Servo rightClaw = null; + + public static final double MID_SERVO = 0.5 ; + public static final double ARM_UP_POWER = 0.45 ; + public static final double ARM_DOWN_POWER = -0.45 ; + + /* local OpMode members. */ + HardwareMap hwMap = null; + private ElapsedTime period = new ElapsedTime(); + + /* Constructor */ + public HardwarePushbot(){ + + } + + /* Initialize standard Hardware interfaces */ + public void init(HardwareMap ahwMap) { + // Save reference to Hardware map + hwMap = ahwMap; + + // Define and Initialize Motors + leftDrive = hwMap.get(DcMotor.class, "left_drive"); + rightDrive = hwMap.get(DcMotor.class, "right_drive"); + leftArm = hwMap.get(DcMotor.class, "left_arm"); + leftDrive.setDirection(DcMotor.Direction.FORWARD); // Set to REVERSE if using AndyMark motors + rightDrive.setDirection(DcMotor.Direction.REVERSE);// Set to FORWARD if using AndyMark motors + + // Set all motors to zero power + leftDrive.setPower(0); + rightDrive.setPower(0); + leftArm.setPower(0); + + // Set all motors to run without encoders. + // May want to use RUN_USING_ENCODERS if encoders are installed. + leftDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); + rightDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); + leftArm.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); + + // Define and initialize ALL installed servos. + leftClaw = hwMap.get(Servo.class, "left_hand"); + rightClaw = hwMap.get(Servo.class, "right_hand"); + leftClaw.setPosition(MID_SERVO); + rightClaw.setPosition(MID_SERVO); + } + } + diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveByEncoder_Linear.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveByEncoder_Linear.java new file mode 100644 index 00000000000..b3f8b252c71 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveByEncoder_Linear.java @@ -0,0 +1,184 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Autonomous; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.hardware.DcMotor; +import com.qualcomm.robotcore.util.ElapsedTime; + +/** + * This file illustrates the concept of driving a path based on encoder counts. + * It uses the common Pushbot hardware class to define the drive on the robot. + * The code is structured as a LinearOpMode + * + * The code REQUIRES that you DO have encoders on the wheels, + * otherwise you would use: PushbotAutoDriveByTime; + * + * This code ALSO requires that the drive Motors have been configured such that a positive + * power command moves them forwards, and causes the encoders to count UP. + * + * The desired path in this example is: + * - Drive forward for 48 inches + * - Spin right for 12 Inches + * - Drive Backwards for 24 inches + * - Stop and close the claw. + * + * The code is written using a method called: encoderDrive(speed, leftInches, rightInches, timeoutS) + * that performs the actual movement. + * This methods assumes that each movement is relative to the last stopping place. + * There are other ways to perform encoder based moves, but this method is probably the simplest. + * This code uses the RUN_TO_POSITION mode to enable the Motor controllers to generate the run profile + * + * Use Android Studios to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ + +@Autonomous(name="Pushbot: Auto Drive By Encoder", group="Pushbot") +@Disabled +public class PushbotAutoDriveByEncoder_Linear extends LinearOpMode { + + /* Declare OpMode members. */ + HardwarePushbot robot = new HardwarePushbot(); // Use a Pushbot's hardware + private ElapsedTime runtime = new ElapsedTime(); + + static final double COUNTS_PER_MOTOR_REV = 1440 ; // eg: TETRIX Motor Encoder + static final double DRIVE_GEAR_REDUCTION = 2.0 ; // This is < 1.0 if geared UP + static final double WHEEL_DIAMETER_INCHES = 4.0 ; // For figuring circumference + static final double COUNTS_PER_INCH = (COUNTS_PER_MOTOR_REV * DRIVE_GEAR_REDUCTION) / + (WHEEL_DIAMETER_INCHES * 3.1415); + static final double DRIVE_SPEED = 0.6; + static final double TURN_SPEED = 0.5; + + @Override + public void runOpMode() { + + /* + * Initialize the drive system variables. + * The init() method of the hardware class does all the work here + */ + robot.init(hardwareMap); + + // Send telemetry message to signify robot waiting; + telemetry.addData("Status", "Resetting Encoders"); // + telemetry.update(); + + robot.leftDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); + robot.rightDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); + + robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); + robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); + + // Send telemetry message to indicate successful Encoder reset + telemetry.addData("Path0", "Starting at %7d :%7d", + robot.leftDrive.getCurrentPosition(), + robot.rightDrive.getCurrentPosition()); + telemetry.update(); + + // Wait for the game to start (driver presses PLAY) + waitForStart(); + + // Step through each leg of the path, + // Note: Reverse movement is obtained by setting a negative distance (not speed) + encoderDrive(DRIVE_SPEED, 48, 48, 5.0); // S1: Forward 47 Inches with 5 Sec timeout + encoderDrive(TURN_SPEED, 12, -12, 4.0); // S2: Turn Right 12 Inches with 4 Sec timeout + encoderDrive(DRIVE_SPEED, -24, -24, 4.0); // S3: Reverse 24 Inches with 4 Sec timeout + + robot.leftClaw.setPosition(1.0); // S4: Stop and close the claw. + robot.rightClaw.setPosition(0.0); + sleep(1000); // pause for servos to move + + telemetry.addData("Path", "Complete"); + telemetry.update(); + } + + /* + * Method to perfmorm a relative move, based on encoder counts. + * Encoders are not reset as the move is based on the current position. + * Move will stop if any of three conditions occur: + * 1) Move gets to the desired position + * 2) Move runs out of time + * 3) Driver stops the opmode running. + */ + public void encoderDrive(double speed, + double leftInches, double rightInches, + double timeoutS) { + int newLeftTarget; + int newRightTarget; + + // Ensure that the opmode is still active + if (opModeIsActive()) { + + // Determine new target position, and pass to motor controller + newLeftTarget = robot.leftDrive.getCurrentPosition() + (int)(leftInches * COUNTS_PER_INCH); + newRightTarget = robot.rightDrive.getCurrentPosition() + (int)(rightInches * COUNTS_PER_INCH); + robot.leftDrive.setTargetPosition(newLeftTarget); + robot.rightDrive.setTargetPosition(newRightTarget); + + // Turn On RUN_TO_POSITION + robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION); + robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION); + + // reset the timeout time and start motion. + runtime.reset(); + robot.leftDrive.setPower(Math.abs(speed)); + robot.rightDrive.setPower(Math.abs(speed)); + + // keep looping while we are still active, and there is time left, and both motors are running. + // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits + // its target position, the motion will stop. This is "safer" in the event that the robot will + // always end the motion as soon as possible. + // However, if you require that BOTH motors have finished their moves before the robot continues + // onto the next step, use (isBusy() || isBusy()) in the loop test. + while (opModeIsActive() && + (runtime.seconds() < timeoutS) && + (robot.leftDrive.isBusy() && robot.rightDrive.isBusy())) { + + // Display it for the driver. + telemetry.addData("Path1", "Running to %7d :%7d", newLeftTarget, newRightTarget); + telemetry.addData("Path2", "Running at %7d :%7d", + robot.leftDrive.getCurrentPosition(), + robot.rightDrive.getCurrentPosition()); + telemetry.update(); + } + + // Stop all motion; + robot.leftDrive.setPower(0); + robot.rightDrive.setPower(0); + + // Turn off RUN_TO_POSITION + robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); + robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); + + // sleep(250); // optional pause after each move + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveByGyro_Linear.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveByGyro_Linear.java new file mode 100644 index 00000000000..a366bec3e2d --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveByGyro_Linear.java @@ -0,0 +1,363 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.hardware.modernrobotics.ModernRoboticsI2cGyro; +import com.qualcomm.robotcore.eventloop.opmode.Autonomous; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.hardware.DcMotor; +import com.qualcomm.robotcore.util.ElapsedTime; +import com.qualcomm.robotcore.util.Range; + +/** + * This file illustrates the concept of driving a path based on Gyro heading and encoder counts. + * It uses the common Pushbot hardware class to define the drive on the robot. + * The code is structured as a LinearOpMode + * + * The code REQUIRES that you DO have encoders on the wheels, + * otherwise you would use: PushbotAutoDriveByTime; + * + * This code ALSO requires that you have a Modern Robotics I2C gyro with the name "gyro" + * otherwise you would use: PushbotAutoDriveByEncoder; + * + * This code requires that the drive Motors have been configured such that a positive + * power command moves them forward, and causes the encoders to count UP. + * + * This code uses the RUN_TO_POSITION mode to enable the Motor controllers to generate the run profile + * + * In order to calibrate the Gyro correctly, the robot must remain stationary during calibration. + * This is performed when the INIT button is pressed on the Driver Station. + * This code assumes that the robot is stationary when the INIT button is pressed. + * If this is not the case, then the INIT should be performed again. + * + * Note: in this example, all angles are referenced to the initial coordinate frame set during the + * the Gyro Calibration process, or whenever the program issues a resetZAxisIntegrator() call on the Gyro. + * + * The angle of movement/rotation is assumed to be a standardized rotation around the robot Z axis, + * which means that a Positive rotation is Counter Clock Wise, looking down on the field. + * This is consistent with the FTC field coordinate conventions set out in the document: + * ftc_app\doc\tutorial\FTC_FieldCoordinateSystemDefinition.pdf + * + * Use Android Studios to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ + +@Autonomous(name="Pushbot: Auto Drive By Gyro", group="Pushbot") +@Disabled +public class PushbotAutoDriveByGyro_Linear extends LinearOpMode { + + /* Declare OpMode members. */ + HardwarePushbot robot = new HardwarePushbot(); // Use a Pushbot's hardware + ModernRoboticsI2cGyro gyro = null; // Additional Gyro device + + static final double COUNTS_PER_MOTOR_REV = 1440 ; // eg: TETRIX Motor Encoder + static final double DRIVE_GEAR_REDUCTION = 2.0 ; // This is < 1.0 if geared UP + static final double WHEEL_DIAMETER_INCHES = 4.0 ; // For figuring circumference + static final double COUNTS_PER_INCH = (COUNTS_PER_MOTOR_REV * DRIVE_GEAR_REDUCTION) / + (WHEEL_DIAMETER_INCHES * 3.1415); + + // These constants define the desired driving/control characteristics + // The can/should be tweaked to suite the specific robot drive train. + static final double DRIVE_SPEED = 0.7; // Nominal speed for better accuracy. + static final double TURN_SPEED = 0.5; // Nominal half speed for better accuracy. + + static final double HEADING_THRESHOLD = 1 ; // As tight as we can make it with an integer gyro + static final double P_TURN_COEFF = 0.1; // Larger is more responsive, but also less stable + static final double P_DRIVE_COEFF = 0.15; // Larger is more responsive, but also less stable + + + @Override + public void runOpMode() { + + /* + * Initialize the standard drive system variables. + * The init() method of the hardware class does most of the work here + */ + robot.init(hardwareMap); + gyro = (ModernRoboticsI2cGyro)hardwareMap.gyroSensor.get("gyro"); + + // Ensure the robot it stationary, then reset the encoders and calibrate the gyro. + robot.leftDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); + robot.rightDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); + + // Send telemetry message to alert driver that we are calibrating; + telemetry.addData(">", "Calibrating Gyro"); // + telemetry.update(); + + gyro.calibrate(); + + // make sure the gyro is calibrated before continuing + while (!isStopRequested() && gyro.isCalibrating()) { + sleep(50); + idle(); + } + + telemetry.addData(">", "Robot Ready."); // + telemetry.update(); + + robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); + robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); + + // Wait for the game to start (Display Gyro value), and reset gyro before we move.. + while (!isStarted()) { + telemetry.addData(">", "Robot Heading = %d", gyro.getIntegratedZValue()); + telemetry.update(); + } + + gyro.resetZAxisIntegrator(); + + // Step through each leg of the path, + // Note: Reverse movement is obtained by setting a negative distance (not speed) + // Put a hold after each turn + gyroDrive(DRIVE_SPEED, 48.0, 0.0); // Drive FWD 48 inches + gyroTurn( TURN_SPEED, -45.0); // Turn CCW to -45 Degrees + gyroHold( TURN_SPEED, -45.0, 0.5); // Hold -45 Deg heading for a 1/2 second + gyroDrive(DRIVE_SPEED, 12.0, -45.0); // Drive FWD 12 inches at 45 degrees + gyroTurn( TURN_SPEED, 45.0); // Turn CW to 45 Degrees + gyroHold( TURN_SPEED, 45.0, 0.5); // Hold 45 Deg heading for a 1/2 second + gyroTurn( TURN_SPEED, 0.0); // Turn CW to 0 Degrees + gyroHold( TURN_SPEED, 0.0, 1.0); // Hold 0 Deg heading for a 1 second + gyroDrive(DRIVE_SPEED,-48.0, 0.0); // Drive REV 48 inches + + telemetry.addData("Path", "Complete"); + telemetry.update(); + } + + + /** + * Method to drive on a fixed compass bearing (angle), based on encoder counts. + * Move will stop if either of these conditions occur: + * 1) Move gets to the desired position + * 2) Driver stops the opmode running. + * + * @param speed Target speed for forward motion. Should allow for _/- variance for adjusting heading + * @param distance Distance (in inches) to move from current position. Negative distance means move backwards. + * @param angle Absolute Angle (in Degrees) relative to last gyro reset. + * 0 = fwd. +ve is CCW from fwd. -ve is CW from forward. + * If a relative angle is required, add/subtract from current heading. + */ + public void gyroDrive ( double speed, + double distance, + double angle) { + + int newLeftTarget; + int newRightTarget; + int moveCounts; + double max; + double error; + double steer; + double leftSpeed; + double rightSpeed; + + // Ensure that the opmode is still active + if (opModeIsActive()) { + + // Determine new target position, and pass to motor controller + moveCounts = (int)(distance * COUNTS_PER_INCH); + newLeftTarget = robot.leftDrive.getCurrentPosition() + moveCounts; + newRightTarget = robot.rightDrive.getCurrentPosition() + moveCounts; + + // Set Target and Turn On RUN_TO_POSITION + robot.leftDrive.setTargetPosition(newLeftTarget); + robot.rightDrive.setTargetPosition(newRightTarget); + + robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION); + robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION); + + // start motion. + speed = Range.clip(Math.abs(speed), 0.0, 1.0); + robot.leftDrive.setPower(speed); + robot.rightDrive.setPower(speed); + + // keep looping while we are still active, and BOTH motors are running. + while (opModeIsActive() && + (robot.leftDrive.isBusy() && robot.rightDrive.isBusy())) { + + // adjust relative speed based on heading error. + error = getError(angle); + steer = getSteer(error, P_DRIVE_COEFF); + + // if driving in reverse, the motor correction also needs to be reversed + if (distance < 0) + steer *= -1.0; + + leftSpeed = speed - steer; + rightSpeed = speed + steer; + + // Normalize speeds if either one exceeds +/- 1.0; + max = Math.max(Math.abs(leftSpeed), Math.abs(rightSpeed)); + if (max > 1.0) + { + leftSpeed /= max; + rightSpeed /= max; + } + + robot.leftDrive.setPower(leftSpeed); + robot.rightDrive.setPower(rightSpeed); + + // Display drive status for the driver. + telemetry.addData("Err/St", "%5.1f/%5.1f", error, steer); + telemetry.addData("Target", "%7d:%7d", newLeftTarget, newRightTarget); + telemetry.addData("Actual", "%7d:%7d", robot.leftDrive.getCurrentPosition(), + robot.rightDrive.getCurrentPosition()); + telemetry.addData("Speed", "%5.2f:%5.2f", leftSpeed, rightSpeed); + telemetry.update(); + } + + // Stop all motion; + robot.leftDrive.setPower(0); + robot.rightDrive.setPower(0); + + // Turn off RUN_TO_POSITION + robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); + robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); + } + } + + /** + * Method to spin on central axis to point in a new direction. + * Move will stop if either of these conditions occur: + * 1) Move gets to the heading (angle) + * 2) Driver stops the opmode running. + * + * @param speed Desired speed of turn. + * @param angle Absolute Angle (in Degrees) relative to last gyro reset. + * 0 = fwd. +ve is CCW from fwd. -ve is CW from forward. + * If a relative angle is required, add/subtract from current heading. + */ + public void gyroTurn ( double speed, double angle) { + + // keep looping while we are still active, and not on heading. + while (opModeIsActive() && !onHeading(speed, angle, P_TURN_COEFF)) { + // Update telemetry & Allow time for other processes to run. + telemetry.update(); + } + } + + /** + * Method to obtain & hold a heading for a finite amount of time + * Move will stop once the requested time has elapsed + * + * @param speed Desired speed of turn. + * @param angle Absolute Angle (in Degrees) relative to last gyro reset. + * 0 = fwd. +ve is CCW from fwd. -ve is CW from forward. + * If a relative angle is required, add/subtract from current heading. + * @param holdTime Length of time (in seconds) to hold the specified heading. + */ + public void gyroHold( double speed, double angle, double holdTime) { + + ElapsedTime holdTimer = new ElapsedTime(); + + // keep looping while we have time remaining. + holdTimer.reset(); + while (opModeIsActive() && (holdTimer.time() < holdTime)) { + // Update telemetry & Allow time for other processes to run. + onHeading(speed, angle, P_TURN_COEFF); + telemetry.update(); + } + + // Stop all motion; + robot.leftDrive.setPower(0); + robot.rightDrive.setPower(0); + } + + /** + * Perform one cycle of closed loop heading control. + * + * @param speed Desired speed of turn. + * @param angle Absolute Angle (in Degrees) relative to last gyro reset. + * 0 = fwd. +ve is CCW from fwd. -ve is CW from forward. + * If a relative angle is required, add/subtract from current heading. + * @param PCoeff Proportional Gain coefficient + * @return + */ + boolean onHeading(double speed, double angle, double PCoeff) { + double error ; + double steer ; + boolean onTarget = false ; + double leftSpeed; + double rightSpeed; + + // determine turn power based on +/- error + error = getError(angle); + + if (Math.abs(error) <= HEADING_THRESHOLD) { + steer = 0.0; + leftSpeed = 0.0; + rightSpeed = 0.0; + onTarget = true; + } + else { + steer = getSteer(error, PCoeff); + rightSpeed = speed * steer; + leftSpeed = -rightSpeed; + } + + // Send desired speeds to motors. + robot.leftDrive.setPower(leftSpeed); + robot.rightDrive.setPower(rightSpeed); + + // Display it for the driver. + telemetry.addData("Target", "%5.2f", angle); + telemetry.addData("Err/St", "%5.2f/%5.2f", error, steer); + telemetry.addData("Speed.", "%5.2f:%5.2f", leftSpeed, rightSpeed); + + return onTarget; + } + + /** + * getError determines the error between the target angle and the robot's current heading + * @param targetAngle Desired angle (relative to global reference established at last Gyro Reset). + * @return error angle: Degrees in the range +/- 180. Centered on the robot's frame of reference + * +ve error means the robot should turn LEFT (CCW) to reduce error. + */ + public double getError(double targetAngle) { + + double robotError; + + // calculate error in -179 to +180 range ( + robotError = targetAngle - gyro.getIntegratedZValue(); + while (robotError > 180) robotError -= 360; + while (robotError <= -180) robotError += 360; + return robotError; + } + + /** + * returns desired steering force. +/- 1 range. +ve = steer left + * @param error Error angle in robot relative degrees + * @param PCoeff Proportional Gain Coefficient + * @return + */ + public double getSteer(double error, double PCoeff) { + return Range.clip(error * PCoeff, -1, 1); + } + +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveByTime_Linear.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveByTime_Linear.java new file mode 100644 index 00000000000..a5bde9db9e3 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveByTime_Linear.java @@ -0,0 +1,125 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Autonomous; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.util.ElapsedTime; + +/** + * This file illustrates the concept of driving a path based on time. + * It uses the common Pushbot hardware class to define the drive on the robot. + * The code is structured as a LinearOpMode + * + * The code assumes that you do NOT have encoders on the wheels, + * otherwise you would use: PushbotAutoDriveByEncoder; + * + * The desired path in this example is: + * - Drive forward for 3 seconds + * - Spin right for 1.3 seconds + * - Drive Backwards for 1 Second + * - Stop and close the claw. + * + * The code is written in a simple form with no optimizations. + * However, there are several ways that this type of sequence could be streamlined, + * + * Use Android Studios to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ + +@Autonomous(name="Pushbot: Auto Drive By Time", group="Pushbot") +@Disabled +public class PushbotAutoDriveByTime_Linear extends LinearOpMode { + + /* Declare OpMode members. */ + HardwarePushbot robot = new HardwarePushbot(); // Use a Pushbot's hardware + private ElapsedTime runtime = new ElapsedTime(); + + + static final double FORWARD_SPEED = 0.6; + static final double TURN_SPEED = 0.5; + + @Override + public void runOpMode() { + + /* + * Initialize the drive system variables. + * The init() method of the hardware class does all the work here + */ + robot.init(hardwareMap); + + // Send telemetry message to signify robot waiting; + telemetry.addData("Status", "Ready to run"); // + telemetry.update(); + + // Wait for the game to start (driver presses PLAY) + waitForStart(); + + // Step through each leg of the path, ensuring that the Auto mode has not been stopped along the way + + // Step 1: Drive forward for 3 seconds + robot.leftDrive.setPower(FORWARD_SPEED); + robot.rightDrive.setPower(FORWARD_SPEED); + runtime.reset(); + while (opModeIsActive() && (runtime.seconds() < 3.0)) { + telemetry.addData("Path", "Leg 1: %2.5f S Elapsed", runtime.seconds()); + telemetry.update(); + } + + // Step 2: Spin right for 1.3 seconds + robot.leftDrive.setPower(TURN_SPEED); + robot.rightDrive.setPower(-TURN_SPEED); + runtime.reset(); + while (opModeIsActive() && (runtime.seconds() < 1.3)) { + telemetry.addData("Path", "Leg 2: %2.5f S Elapsed", runtime.seconds()); + telemetry.update(); + } + + // Step 3: Drive Backwards for 1 Second + robot.leftDrive.setPower(-FORWARD_SPEED); + robot.rightDrive.setPower(-FORWARD_SPEED); + runtime.reset(); + while (opModeIsActive() && (runtime.seconds() < 1.0)) { + telemetry.addData("Path", "Leg 3: %2.5f S Elapsed", runtime.seconds()); + telemetry.update(); + } + + // Step 4: Stop and close the claw. + robot.leftDrive.setPower(0); + robot.rightDrive.setPower(0); + robot.leftClaw.setPosition(1.0); + robot.rightClaw.setPosition(0.0); + + telemetry.addData("Path", "Complete"); + telemetry.update(); + sleep(1000); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveToLine_Linear.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveToLine_Linear.java new file mode 100644 index 00000000000..2e174b1351d --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveToLine_Linear.java @@ -0,0 +1,118 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Autonomous; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.hardware.LightSensor; + +/** + * This file illustrates the concept of driving up to a line and then stopping. + * It uses the common Pushbot hardware class to define the drive on the robot. + * The code is structured as a LinearOpMode + * + * The code shows using two different light sensors: + * The Primary sensor shown in this code is a legacy NXT Light sensor (called "sensor_light") + * Alternative "commented out" code uses a MR Optical Distance Sensor (called "sensor_ods") + * instead of the LEGO sensor. Chose to use one sensor or the other. + * + * Setting the correct WHITE_THRESHOLD value is key to stopping correctly. + * This should be set half way between the light and dark values. + * These values can be read on the screen once the OpMode has been INIT, but before it is STARTED. + * Move the senso on asnd off the white line and not the min and max readings. + * Edit this code to make WHITE_THRESHOLD half way between the min and max. + * + * Use Android Studios to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ + +@Autonomous(name="Pushbot: Auto Drive To Line", group="Pushbot") +@Disabled +public class PushbotAutoDriveToLine_Linear extends LinearOpMode { + + /* Declare OpMode members. */ + HardwarePushbot robot = new HardwarePushbot(); // Use a Pushbot's hardware + LightSensor lightSensor; // Primary LEGO Light sensor, + // OpticalDistanceSensor lightSensor; // Alternative MR ODS sensor + + static final double WHITE_THRESHOLD = 0.2; // spans between 0.1 - 0.5 from dark to light + static final double APPROACH_SPEED = 0.5; + + @Override + public void runOpMode() { + + /* Initialize the drive system variables. + * The init() method of the hardware class does all the work here + */ + robot.init(hardwareMap); + + // If there are encoders connected, switch to RUN_USING_ENCODER mode for greater accuracy + // robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); + // robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER); + + // get a reference to our Light Sensor object. + lightSensor = hardwareMap.lightSensor.get("sensor_light"); // Primary LEGO Light Sensor + // lightSensor = hardwareMap.opticalDistanceSensor.get("sensor_ods"); // Alternative MR ODS sensor. + + // turn on LED of light sensor. + lightSensor.enableLed(true); + + // Send telemetry message to signify robot waiting; + telemetry.addData("Status", "Ready to run"); // + telemetry.update(); + + // Wait for the game to start (driver presses PLAY) + // Abort this loop is started or stopped. + while (!(isStarted() || isStopRequested())) { + + // Display the light level while we are waiting to start + telemetry.addData("Light Level", lightSensor.getLightDetected()); + telemetry.update(); + idle(); + } + + // Start the robot moving forward, and then begin looking for a white line. + robot.leftDrive.setPower(APPROACH_SPEED); + robot.rightDrive.setPower(APPROACH_SPEED); + + // run until the white line is seen OR the driver presses STOP; + while (opModeIsActive() && (lightSensor.getLightDetected() < WHITE_THRESHOLD)) { + + // Display the light level while we are looking for the line + telemetry.addData("Light Level", lightSensor.getLightDetected()); + telemetry.update(); + } + + // Stop all motors + robot.leftDrive.setPower(0); + robot.rightDrive.setPower(0); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotTeleopPOV_Linear.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotTeleopPOV_Linear.java new file mode 100644 index 00000000000..cc168d8c61e --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotTeleopPOV_Linear.java @@ -0,0 +1,134 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.util.Range; + +/** + * This OpMode uses the common Pushbot hardware class to define the devices on the robot. + * All device access is managed through the HardwarePushbot class. + * The code is structured as a LinearOpMode + * + * This particular OpMode executes a POV Game style Teleop for a PushBot + * In this mode the left stick moves the robot FWD and back, the Right stick turns left and right. + * It raises and lowers the claw using the Gampad Y and A buttons respectively. + * It also opens and closes the claws slowly using the left and right Bumper buttons. + * + * Use Android Studios to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ + +@TeleOp(name="Pushbot: Teleop POV", group="Pushbot") +@Disabled +public class PushbotTeleopPOV_Linear extends LinearOpMode { + + /* Declare OpMode members. */ + HardwarePushbot robot = new HardwarePushbot(); // Use a Pushbot's hardware + double clawOffset = 0; // Servo mid position + final double CLAW_SPEED = 0.02 ; // sets rate to move servo + + @Override + public void runOpMode() { + double left; + double right; + double drive; + double turn; + double max; + + /* Initialize the hardware variables. + * The init() method of the hardware class does all the work here + */ + robot.init(hardwareMap); + + // Send telemetry message to signify robot waiting; + telemetry.addData("Say", "Hello Driver"); // + telemetry.update(); + + // Wait for the game to start (driver presses PLAY) + waitForStart(); + + // run until the end of the match (driver presses STOP) + while (opModeIsActive()) { + + // Run wheels in POV mode (note: The joystick goes negative when pushed forwards, so negate it) + // In this mode the Left stick moves the robot fwd and back, the Right stick turns left and right. + // This way it's also easy to just drive straight, or just turn. + drive = -gamepad1.left_stick_y; + turn = gamepad1.right_stick_x; + + // Combine drive and turn for blended motion. + left = drive + turn; + right = drive - turn; + + // Normalize the values so neither exceed +/- 1.0 + max = Math.max(Math.abs(left), Math.abs(right)); + if (max > 1.0) + { + left /= max; + right /= max; + } + + // Output the safe vales to the motor drives. + robot.leftDrive.setPower(left); + robot.rightDrive.setPower(right); + + // Use gamepad left & right Bumpers to open and close the claw + if (gamepad1.right_bumper) + clawOffset += CLAW_SPEED; + else if (gamepad1.left_bumper) + clawOffset -= CLAW_SPEED; + + // Move both servos to new position. Assume servos are mirror image of each other. + clawOffset = Range.clip(clawOffset, -0.5, 0.5); + robot.leftClaw.setPosition(robot.MID_SERVO + clawOffset); + robot.rightClaw.setPosition(robot.MID_SERVO - clawOffset); + + // Use gamepad buttons to move arm up (Y) and down (A) + if (gamepad1.y) + robot.leftArm.setPower(robot.ARM_UP_POWER); + else if (gamepad1.a) + robot.leftArm.setPower(robot.ARM_DOWN_POWER); + else + robot.leftArm.setPower(0.0); + + // Send telemetry message to signify robot running; + telemetry.addData("claw", "Offset = %.2f", clawOffset); + telemetry.addData("left", "%.2f", left); + telemetry.addData("right", "%.2f", right); + telemetry.update(); + + // Pace this loop so jaw action is reasonable speed. + sleep(50); + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotTeleopTank_Iterative.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotTeleopTank_Iterative.java new file mode 100644 index 00000000000..ec336a84783 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotTeleopTank_Iterative.java @@ -0,0 +1,135 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.OpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.util.Range; + +/** + * This file provides basic Telop driving for a Pushbot robot. + * The code is structured as an Iterative OpMode + * + * This OpMode uses the common Pushbot hardware class to define the devices on the robot. + * All device access is managed through the HardwarePushbot class. + * + * This particular OpMode executes a basic Tank Drive Teleop for a PushBot + * It raises and lowers the claw using the Gampad Y and A buttons respectively. + * It also opens and closes the claws slowly using the left and right Bumper buttons. + * + * Use Android Studios to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ + +@TeleOp(name="Pushbot: Teleop Tank", group="Pushbot") +@Disabled +public class PushbotTeleopTank_Iterative extends OpMode{ + + /* Declare OpMode members. */ + HardwarePushbot robot = new HardwarePushbot(); // use the class created to define a Pushbot's hardware + double clawOffset = 0.0 ; // Servo mid position + final double CLAW_SPEED = 0.02 ; // sets rate to move servo + + /* + * Code to run ONCE when the driver hits INIT + */ + @Override + public void init() { + /* Initialize the hardware variables. + * The init() method of the hardware class does all the work here + */ + robot.init(hardwareMap); + + // Send telemetry message to signify robot waiting; + telemetry.addData("Say", "Hello Driver"); // + } + + /* + * Code to run REPEATEDLY after the driver hits INIT, but before they hit PLAY + */ + @Override + public void init_loop() { + } + + /* + * Code to run ONCE when the driver hits PLAY + */ + @Override + public void start() { + } + + /* + * Code to run REPEATEDLY after the driver hits PLAY but before they hit STOP + */ + @Override + public void loop() { + double left; + double right; + + // Run wheels in tank mode (note: The joystick goes negative when pushed forwards, so negate it) + left = -gamepad1.left_stick_y; + right = -gamepad1.right_stick_y; + + robot.leftDrive.setPower(left); + robot.rightDrive.setPower(right); + + // Use gamepad left & right Bumpers to open and close the claw + if (gamepad1.right_bumper) + clawOffset += CLAW_SPEED; + else if (gamepad1.left_bumper) + clawOffset -= CLAW_SPEED; + + // Move both servos to new position. Assume servos are mirror image of each other. + clawOffset = Range.clip(clawOffset, -0.5, 0.5); + robot.leftClaw.setPosition(robot.MID_SERVO + clawOffset); + robot.rightClaw.setPosition(robot.MID_SERVO - clawOffset); + + // Use gamepad buttons to move the arm up (Y) and down (A) + if (gamepad1.y) + robot.leftArm.setPower(robot.ARM_UP_POWER); + else if (gamepad1.a) + robot.leftArm.setPower(robot.ARM_DOWN_POWER); + else + robot.leftArm.setPower(0.0); + + // Send telemetry message to signify robot running; + telemetry.addData("claw", "Offset = %.2f", clawOffset); + telemetry.addData("left", "%.2f", left); + telemetry.addData("right", "%.2f", right); + } + + /* + * Code to run ONCE after the driver hits STOP + */ + @Override + public void stop() { + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SampleRevBlinkinLedDriver.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SampleRevBlinkinLedDriver.java new file mode 100644 index 00000000000..337b7032152 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SampleRevBlinkinLedDriver.java @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2018 Craig MacFarlane + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted + * (subject to the limitations in the disclaimer below) provided that the following conditions are + * met: + * + * Redistributions of source code must retain the above copyright notice, this list of conditions + * and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions + * and the following disclaimer in the documentation and/or other materials provided with the + * distribution. + * + * Neither the name of Craig MacFarlane nor the names of its contributors may be used to + * endorse or promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS + * SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.hardware.rev.RevBlinkinLedDriver; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.OpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; + +import org.firstinspires.ftc.robotcore.external.Telemetry; +import org.firstinspires.ftc.robotcore.internal.system.Deadline; + +import java.util.concurrent.TimeUnit; + +/* + * Display patterns of a REV Robotics Blinkin LED Driver. + * AUTO mode cycles through all of the patterns. + * MANUAL mode allows the user to manually change patterns using the + * left and right bumpers of a gamepad. + * + * Configure the driver on a servo port, and name it "blinkin". + * + * Displays the first pattern upon init. + */ +@TeleOp(name="BlinkinExample") +@Disabled +public class SampleRevBlinkinLedDriver extends OpMode { + + /* + * Change the pattern every 10 seconds in AUTO mode. + */ + private final static int LED_PERIOD = 10; + + /* + * Rate limit gamepad button presses to every 500ms. + */ + private final static int GAMEPAD_LOCKOUT = 500; + + RevBlinkinLedDriver blinkinLedDriver; + RevBlinkinLedDriver.BlinkinPattern pattern; + + Telemetry.Item patternName; + Telemetry.Item display; + DisplayKind displayKind; + Deadline ledCycleDeadline; + Deadline gamepadRateLimit; + + protected enum DisplayKind { + MANUAL, + AUTO + } + + @Override + public void init() + { + displayKind = DisplayKind.AUTO; + + blinkinLedDriver = hardwareMap.get(RevBlinkinLedDriver.class, "blinkin"); + pattern = RevBlinkinLedDriver.BlinkinPattern.RAINBOW_RAINBOW_PALETTE; + blinkinLedDriver.setPattern(pattern); + + display = telemetry.addData("Display Kind: ", displayKind.toString()); + patternName = telemetry.addData("Pattern: ", pattern.toString()); + + ledCycleDeadline = new Deadline(LED_PERIOD, TimeUnit.SECONDS); + gamepadRateLimit = new Deadline(GAMEPAD_LOCKOUT, TimeUnit.MILLISECONDS); + } + + @Override + public void loop() + { + handleGamepad(); + + if (displayKind == DisplayKind.AUTO) { + doAutoDisplay(); + } else { + /* + * MANUAL mode: Nothing to do, setting the pattern as a result of a gamepad event. + */ + } + } + + /* + * handleGamepad + * + * Responds to a gamepad button press. Demonstrates rate limiting for + * button presses. If loop() is called every 10ms and and you don't rate + * limit, then any given button press may register as multiple button presses, + * which in this application is problematic. + * + * A: Manual mode, Right bumper displays the next pattern, left bumper displays the previous pattern. + * B: Auto mode, pattern cycles, changing every LED_PERIOD seconds. + */ + protected void handleGamepad() + { + if (!gamepadRateLimit.hasExpired()) { + return; + } + + if (gamepad1.a) { + setDisplayKind(DisplayKind.MANUAL); + gamepadRateLimit.reset(); + } else if (gamepad1.b) { + setDisplayKind(DisplayKind.AUTO); + gamepadRateLimit.reset(); + } else if ((displayKind == DisplayKind.MANUAL) && (gamepad1.left_bumper)) { + pattern = pattern.previous(); + displayPattern(); + gamepadRateLimit.reset(); + } else if ((displayKind == DisplayKind.MANUAL) && (gamepad1.right_bumper)) { + pattern = pattern.next(); + displayPattern(); + gamepadRateLimit.reset(); + } + } + + protected void setDisplayKind(DisplayKind displayKind) + { + this.displayKind = displayKind; + display.setValue(displayKind.toString()); + } + + protected void doAutoDisplay() + { + if (ledCycleDeadline.hasExpired()) { + pattern = pattern.next(); + displayPattern(); + ledCycleDeadline.reset(); + } + } + + protected void displayPattern() + { + blinkinLedDriver.setPattern(pattern); + patternName.setValue(pattern.toString()); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorAdafruitRGB.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorAdafruitRGB.java new file mode 100644 index 00000000000..6a94e25fb6a --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorAdafruitRGB.java @@ -0,0 +1,167 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import android.app.Activity; +import android.graphics.Color; +import android.view.View; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.ColorSensor; +import com.qualcomm.robotcore.hardware.DeviceInterfaceModule; +import com.qualcomm.robotcore.hardware.DigitalChannel; + +/* + * + * This is an example LinearOpMode that shows how to use + * the Adafruit RGB Sensor. It assumes that the I2C + * cable for the sensor is connected to an I2C port on the + * Core Device Interface Module. + * + * It also assuems that the LED pin of the sensor is connected + * to the digital signal pin of a digital port on the + * Core Device Interface Module. + * + * You can use the digital port to turn the sensor's onboard + * LED on or off. + * + * The op mode assumes that the Core Device Interface Module + * is configured with a name of "dim" and that the Adafruit color sensor + * is configured as an I2C device with a name of "sensor_color". + * + * It also assumes that the LED pin of the RGB sensor + * is connected to the signal pin of digital port #5 (zero indexed) + * of the Core Device Interface Module. + * + * You can use the X button on gamepad1 to toggle the LED on and off. + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ +@TeleOp(name = "Sensor: AdafruitRGB", group = "Sensor") +@Disabled // Comment this out to add to the opmode list +public class SensorAdafruitRGB extends LinearOpMode { + + ColorSensor sensorRGB; + DeviceInterfaceModule cdim; + + // we assume that the LED pin of the RGB sensor is connected to + // digital port 5 (zero indexed). + static final int LED_CHANNEL = 5; + + @Override + public void runOpMode() { + + // hsvValues is an array that will hold the hue, saturation, and value information. + float hsvValues[] = {0F,0F,0F}; + + // values is a reference to the hsvValues array. + final float values[] = hsvValues; + + // get a reference to the RelativeLayout so we can change the background + // color of the Robot Controller app to match the hue detected by the RGB sensor. + int relativeLayoutId = hardwareMap.appContext.getResources().getIdentifier("RelativeLayout", "id", hardwareMap.appContext.getPackageName()); + final View relativeLayout = ((Activity) hardwareMap.appContext).findViewById(relativeLayoutId); + + // bPrevState and bCurrState represent the previous and current state of the button. + boolean bPrevState = false; + boolean bCurrState = false; + + // bLedOn represents the state of the LED. + boolean bLedOn = true; + + // get a reference to our DeviceInterfaceModule object. + cdim = hardwareMap.deviceInterfaceModule.get("dim"); + + // set the digital channel to output mode. + // remember, the Adafruit sensor is actually two devices. + // It's an I2C sensor and it's also an LED that can be turned on or off. + cdim.setDigitalChannelMode(LED_CHANNEL, DigitalChannel.Mode.OUTPUT); + + // get a reference to our ColorSensor object. + sensorRGB = hardwareMap.colorSensor.get("sensor_color"); + + // turn the LED on in the beginning, just so user will know that the sensor is active. + cdim.setDigitalChannelState(LED_CHANNEL, bLedOn); + + // wait for the start button to be pressed. + waitForStart(); + + // loop and read the RGB data. + // Note we use opModeIsActive() as our loop condition because it is an interruptible method. + while (opModeIsActive()) { + + // check the status of the x button on gamepad. + bCurrState = gamepad1.x; + + // check for button-press state transitions. + if ((bCurrState == true) && (bCurrState != bPrevState)) { + + // button is transitioning to a pressed state. Toggle the LED. + bLedOn = !bLedOn; + cdim.setDigitalChannelState(LED_CHANNEL, bLedOn); + } + + // update previous state variable. + bPrevState = bCurrState; + + // convert the RGB values to HSV values. + Color.RGBToHSV((sensorRGB.red() * 255) / 800, (sensorRGB.green() * 255) / 800, (sensorRGB.blue() * 255) / 800, hsvValues); + + // send the info back to driver station using telemetry function. + telemetry.addData("LED", bLedOn ? "On" : "Off"); + telemetry.addData("Clear", sensorRGB.alpha()); + telemetry.addData("Red ", sensorRGB.red()); + telemetry.addData("Green", sensorRGB.green()); + telemetry.addData("Blue ", sensorRGB.blue()); + telemetry.addData("Hue", hsvValues[0]); + + // change the background color to match the color detected by the RGB sensor. + // pass a reference to the hue, saturation, and value array as an argument + // to the HSVToColor method. + relativeLayout.post(new Runnable() { + public void run() { + relativeLayout.setBackgroundColor(Color.HSVToColor(0xff, values)); + } + }); + + telemetry.update(); + } + + // Set the panel back to the default color + relativeLayout.post(new Runnable() { + public void run() { + relativeLayout.setBackgroundColor(Color.WHITE); + } + }); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorBNO055IMU.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorBNO055IMU.java new file mode 100644 index 00000000000..9102a108d87 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorBNO055IMU.java @@ -0,0 +1,184 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.hardware.bosch.BNO055IMU; +import com.qualcomm.hardware.bosch.JustLoggingAccelerationIntegrator; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; + +import org.firstinspires.ftc.robotcore.external.Func; +import org.firstinspires.ftc.robotcore.external.navigation.Acceleration; +import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit; +import org.firstinspires.ftc.robotcore.external.navigation.AxesOrder; +import org.firstinspires.ftc.robotcore.external.navigation.AxesReference; +import org.firstinspires.ftc.robotcore.external.navigation.Orientation; +import org.firstinspires.ftc.robotcore.external.navigation.Position; +import org.firstinspires.ftc.robotcore.external.navigation.Velocity; + +import java.util.Locale; + +/** + * {@link SensorBNO055IMU} gives a short demo on how to use the BNO055 Inertial Motion Unit (IMU) from AdaFruit. + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + * + * @see Adafruit IMU + */ +@TeleOp(name = "Sensor: BNO055 IMU", group = "Sensor") +@Disabled // Comment this out to add to the opmode list +public class SensorBNO055IMU extends LinearOpMode + { + //---------------------------------------------------------------------------------------------- + // State + //---------------------------------------------------------------------------------------------- + + // The IMU sensor object + BNO055IMU imu; + + // State used for updating telemetry + Orientation angles; + Acceleration gravity; + + //---------------------------------------------------------------------------------------------- + // Main logic + //---------------------------------------------------------------------------------------------- + + @Override public void runOpMode() { + + // Set up the parameters with which we will use our IMU. Note that integration + // algorithm here just reports accelerations to the logcat log; it doesn't actually + // provide positional information. + BNO055IMU.Parameters parameters = new BNO055IMU.Parameters(); + parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES; + parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC; + parameters.calibrationDataFile = "BNO055IMUCalibration.json"; // see the calibration sample opmode + parameters.loggingEnabled = true; + parameters.loggingTag = "IMU"; + parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator(); + + // Retrieve and initialize the IMU. We expect the IMU to be attached to an I2C port + // on a Core Device Interface Module, configured to be a sensor of type "AdaFruit IMU", + // and named "imu". + imu = hardwareMap.get(BNO055IMU.class, "imu"); + imu.initialize(parameters); + + // Set up our telemetry dashboard + composeTelemetry(); + + // Wait until we're told to go + waitForStart(); + + // Start the logging of measured acceleration + imu.startAccelerationIntegration(new Position(), new Velocity(), 1000); + + // Loop and update the dashboard + while (opModeIsActive()) { + telemetry.update(); + } + } + + //---------------------------------------------------------------------------------------------- + // Telemetry Configuration + //---------------------------------------------------------------------------------------------- + + void composeTelemetry() { + + // At the beginning of each telemetry update, grab a bunch of data + // from the IMU that we will then display in separate lines. + telemetry.addAction(new Runnable() { @Override public void run() + { + // Acquiring the angles is relatively expensive; we don't want + // to do that in each of the three items that need that info, as that's + // three times the necessary expense. + angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES); + gravity = imu.getGravity(); + } + }); + + telemetry.addLine() + .addData("status", new Func() { + @Override public String value() { + return imu.getSystemStatus().toShortString(); + } + }) + .addData("calib", new Func() { + @Override public String value() { + return imu.getCalibrationStatus().toString(); + } + }); + + telemetry.addLine() + .addData("heading", new Func() { + @Override public String value() { + return formatAngle(angles.angleUnit, angles.firstAngle); + } + }) + .addData("roll", new Func() { + @Override public String value() { + return formatAngle(angles.angleUnit, angles.secondAngle); + } + }) + .addData("pitch", new Func() { + @Override public String value() { + return formatAngle(angles.angleUnit, angles.thirdAngle); + } + }); + + telemetry.addLine() + .addData("grvty", new Func() { + @Override public String value() { + return gravity.toString(); + } + }) + .addData("mag", new Func() { + @Override public String value() { + return String.format(Locale.getDefault(), "%.3f", + Math.sqrt(gravity.xAccel*gravity.xAccel + + gravity.yAccel*gravity.yAccel + + gravity.zAccel*gravity.zAccel)); + } + }); + } + + //---------------------------------------------------------------------------------------------- + // Formatting + //---------------------------------------------------------------------------------------------- + + String formatAngle(AngleUnit angleUnit, double angle) { + return formatDegrees(AngleUnit.DEGREES.fromUnit(angleUnit, angle)); + } + + String formatDegrees(double degrees){ + return String.format(Locale.getDefault(), "%.1f", AngleUnit.DEGREES.normalize(degrees)); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorBNO055IMUCalibration.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorBNO055IMUCalibration.java new file mode 100644 index 00000000000..064e8a44bff --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorBNO055IMUCalibration.java @@ -0,0 +1,232 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.hardware.adafruit.AdafruitBNO055IMU; +import com.qualcomm.hardware.bosch.BNO055IMU; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.util.ReadWriteFile; + +import org.firstinspires.ftc.robotcore.external.Func; +import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit; +import org.firstinspires.ftc.robotcore.external.navigation.AxesOrder; +import org.firstinspires.ftc.robotcore.external.navigation.AxesReference; +import org.firstinspires.ftc.robotcore.external.navigation.Orientation; +import org.firstinspires.ftc.robotcore.internal.system.AppUtil; + +import java.io.File; +import java.util.Locale; + +/** + * {@link SensorBNO055IMUCalibration} calibrates the IMU accelerometer per + * "Section 3.11 Calibration" of the BNO055 specification. + * + *

Manual calibration of the IMU is definitely NOT necessary: except for the magnetometer + * (which is not used by the default {@link BNO055IMU.SensorMode#IMU + * SensorMode#IMU}), the BNO055 is internally self-calibrating and thus can be very successfully + * used without manual intervention. That said, performing a one-time calibration, saving the + * results persistently, then loading them again at each run can help reduce the time that automatic + * calibration requires.

+ * + *

This summary of the calibration process, from + * Intel, is informative:

+ * + *

"This device requires calibration in order to operate accurately. [...] Calibration data is + * lost on a power cycle. See one of the examples for a description of how to calibrate the device, + * but in essence:

+ * + *

There is a calibration status register available [...] that returns the calibration status + * of the accelerometer (ACC), magnetometer (MAG), gyroscope (GYR), and overall system (SYS). + * Each of these values range from 0 (uncalibrated) to 3 (fully calibrated). Calibration [ideally] + * involves certain motions to get all 4 values at 3. The motions are as follows (though see the + * datasheet for more information):

+ * + *
  • + *
      GYR: Simply let the sensor sit flat for a few seconds.
    + *
      ACC: Move the sensor in various positions. Start flat, then rotate slowly by 45 + * degrees, hold for a few seconds, then continue rotating another 45 degrees and + * hold, etc. 6 or more movements of this type may be required. You can move through + * any axis you desire, but make sure that the device is lying at least once + * perpendicular to the x, y, and z axis.
    + *
      MAG: Move slowly in a figure 8 pattern in the air, until the calibration values reaches 3.
    + *
      SYS: This will usually reach 3 when the other items have also reached 3. If not, continue + * slowly moving the device though various axes until it does."
    + *
  • + * + *

    To calibrate the IMU, run this sample opmode with a gamepad attached to the driver station. + * Once the IMU has reached sufficient calibration as reported on telemetry, press the 'A' + * button on the gamepad to write the calibration to a file. That file can then be indicated + * later when running an opmode which uses the IMU.

    + * + *

    Note: if your intended uses of the IMU do not include use of all its sensors (for exmaple, + * you might not use the magnetometer), then it makes little sense for you to wait for full + * calibration of the sensors you are not using before saving the calibration data. Indeed, + * it appears that in a SensorMode that doesn't use the magnetometer (for example), the + * magnetometer cannot actually be calibrated.

    + * + * @see AdafruitBNO055IMU + * @see BNO055IMU.Parameters#calibrationDataFile + * @see BNO055 product page + * @see BNO055 specification + */ +@TeleOp(name = "Sensor: BNO055 IMU Calibration", group = "Sensor") +@Disabled // Uncomment this to add to the opmode list +public class SensorBNO055IMUCalibration extends LinearOpMode + { + //---------------------------------------------------------------------------------------------- + // State + //---------------------------------------------------------------------------------------------- + + // Our sensors, motors, and other devices go here, along with other long term state + BNO055IMU imu; + + // State used for updating telemetry + Orientation angles; + + //---------------------------------------------------------------------------------------------- + // Main logic + //---------------------------------------------------------------------------------------------- + + @Override public void runOpMode() { + + telemetry.log().setCapacity(12); + telemetry.log().add(""); + telemetry.log().add("Please refer to the calibration instructions"); + telemetry.log().add("contained in the Adafruit IMU calibration"); + telemetry.log().add("sample opmode."); + telemetry.log().add(""); + telemetry.log().add("When sufficient calibration has been reached,"); + telemetry.log().add("press the 'A' button to write the current"); + telemetry.log().add("calibration data to a file."); + telemetry.log().add(""); + + // We are expecting the IMU to be attached to an I2C port on a Core Device Interface Module and named "imu". + BNO055IMU.Parameters parameters = new BNO055IMU.Parameters(); + parameters.loggingEnabled = true; + parameters.loggingTag = "IMU"; + imu = hardwareMap.get(BNO055IMU.class, "imu"); + imu.initialize(parameters); + + composeTelemetry(); + telemetry.log().add("Waiting for start..."); + + // Wait until we're told to go + while (!isStarted()) { + telemetry.update(); + idle(); + } + + telemetry.log().add("...started..."); + + while (opModeIsActive()) { + + if (gamepad1.a) { + + // Get the calibration data + BNO055IMU.CalibrationData calibrationData = imu.readCalibrationData(); + + // Save the calibration data to a file. You can choose whatever file + // name you wish here, but you'll want to indicate the same file name + // when you initialize the IMU in an opmode in which it is used. If you + // have more than one IMU on your robot, you'll of course want to use + // different configuration file names for each. + String filename = "AdafruitIMUCalibration.json"; + File file = AppUtil.getInstance().getSettingsFile(filename); + ReadWriteFile.writeFile(file, calibrationData.serialize()); + telemetry.log().add("saved to '%s'", filename); + + // Wait for the button to be released + while (gamepad1.a) { + telemetry.update(); + idle(); + } + } + + telemetry.update(); + } + } + + void composeTelemetry() { + + // At the beginning of each telemetry update, grab a bunch of data + // from the IMU that we will then display in separate lines. + telemetry.addAction(new Runnable() { @Override public void run() + { + // Acquiring the angles is relatively expensive; we don't want + // to do that in each of the three items that need that info, as that's + // three times the necessary expense. + angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES); + } + }); + + telemetry.addLine() + .addData("status", new Func() { + @Override public String value() { + return imu.getSystemStatus().toShortString(); + } + }) + .addData("calib", new Func() { + @Override public String value() { + return imu.getCalibrationStatus().toString(); + } + }); + + telemetry.addLine() + .addData("heading", new Func() { + @Override public String value() { + return formatAngle(angles.angleUnit, angles.firstAngle); + } + }) + .addData("roll", new Func() { + @Override public String value() { + return formatAngle(angles.angleUnit, angles.secondAngle); + } + }) + .addData("pitch", new Func() { + @Override public String value() { + return formatAngle(angles.angleUnit, angles.thirdAngle); + } + }); + } + + //---------------------------------------------------------------------------------------------- + // Formatting + //---------------------------------------------------------------------------------------------- + + String formatAngle(AngleUnit angleUnit, double angle) { + return formatDegrees(AngleUnit.DEGREES.fromUnit(angleUnit, angle)); + } + + String formatDegrees(double degrees){ + return String.format(Locale.getDefault(), "%.1f", AngleUnit.DEGREES.normalize(degrees)); + } +} \ No newline at end of file diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorColor.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorColor.java new file mode 100644 index 00000000000..5f86743762b --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorColor.java @@ -0,0 +1,200 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import android.app.Activity; +import android.graphics.Color; +import android.view.View; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.NormalizedColorSensor; +import com.qualcomm.robotcore.hardware.NormalizedRGBA; +import com.qualcomm.robotcore.hardware.SwitchableLight; + +/* + * This is an example LinearOpMode that shows how to use a color sensor in a generic + * way, insensitive which particular make or model of color sensor is used. The opmode + * assumes that the color sensor is configured with a name of "sensor_color". + * + * If the color sensor has a light which is controllable, you can use the X button on + * the gamepad to toggle the light on and off. + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ +@TeleOp(name = "Sensor: Color", group = "Sensor") +@Disabled +public class SensorColor extends LinearOpMode { + + /** The colorSensor field will contain a reference to our color sensor hardware object */ + NormalizedColorSensor colorSensor; + /** The relativeLayout field is used to aid in providing interesting visual feedback + * in this sample application; you probably *don't* need something analogous when you + * use a color sensor on your robot */ + View relativeLayout; + + /** + * The runOpMode() method is the root of this LinearOpMode, as it is in all linear opModes. + * Our implementation here, though is a bit unusual: we've decided to put all the actual work + * in the main() method rather than directly in runOpMode() itself. The reason we do that is that + * in this sample we're changing the background color of the robot controller screen as the + * opmode runs, and we want to be able to *guarantee* that we restore it to something reasonable + * and palatable when the opMode ends. The simplest way to do that is to use a try...finally + * block around the main, core logic, and an easy way to make that all clear was to separate + * the former from the latter in separate methods. + */ + @Override public void runOpMode() throws InterruptedException { + + // Get a reference to the RelativeLayout so we can later change the background + // color of the Robot Controller app to match the hue detected by the RGB sensor. + int relativeLayoutId = hardwareMap.appContext.getResources().getIdentifier("RelativeLayout", "id", hardwareMap.appContext.getPackageName()); + relativeLayout = ((Activity) hardwareMap.appContext).findViewById(relativeLayoutId); + + try { + runSample(); // actually execute the sample + } finally { + // On the way out, *guarantee* that the background is reasonable. It doesn't actually start off + // as pure white, but it's too much work to dig out what actually was used, and this is good + // enough to at least make the screen reasonable again. + // Set the panel back to the default color + relativeLayout.post(new Runnable() { + public void run() { + relativeLayout.setBackgroundColor(Color.WHITE); + } + }); + } + } + + protected void runSample() throws InterruptedException { + + // values is a reference to the hsvValues array. + float[] hsvValues = new float[3]; + final float values[] = hsvValues; + + // bPrevState and bCurrState keep track of the previous and current state of the button + boolean bPrevState = false; + boolean bCurrState = false; + + // Get a reference to our sensor object. + colorSensor = hardwareMap.get(NormalizedColorSensor.class, "sensor_color"); + + // If possible, turn the light on in the beginning (it might already be on anyway, + // we just make sure it is if we can). + if (colorSensor instanceof SwitchableLight) { + ((SwitchableLight)colorSensor).enableLight(true); + } + + // Wait for the start button to be pressed. + waitForStart(); + + // Loop until we are asked to stop + while (opModeIsActive()) { + // Check the status of the x button on the gamepad + bCurrState = gamepad1.x; + + // If the button state is different than what it was, then act + if (bCurrState != bPrevState) { + // If the button is (now) down, then toggle the light + if (bCurrState) { + if (colorSensor instanceof SwitchableLight) { + SwitchableLight light = (SwitchableLight)colorSensor; + light.enableLight(!light.isLightOn()); + } + } + } + bPrevState = bCurrState; + + // Read the sensor + NormalizedRGBA colors = colorSensor.getNormalizedColors(); + + /** Use telemetry to display feedback on the driver station. We show the conversion + * of the colors to hue, saturation and value, and display the the normalized values + * as returned from the sensor. + * @see HSV*/ + + Color.colorToHSV(colors.toColor(), hsvValues); + telemetry.addLine() + .addData("H", "%.3f", hsvValues[0]) + .addData("S", "%.3f", hsvValues[1]) + .addData("V", "%.3f", hsvValues[2]); + telemetry.addLine() + .addData("a", "%.3f", colors.alpha) + .addData("r", "%.3f", colors.red) + .addData("g", "%.3f", colors.green) + .addData("b", "%.3f", colors.blue); + + /** We also display a conversion of the colors to an equivalent Android color integer. + * @see Color */ + int color = colors.toColor(); + telemetry.addLine("raw Android color: ") + .addData("a", "%02x", Color.alpha(color)) + .addData("r", "%02x", Color.red(color)) + .addData("g", "%02x", Color.green(color)) + .addData("b", "%02x", Color.blue(color)); + + // Balance the colors. The values returned by getColors() are normalized relative to the + // maximum possible values that the sensor can measure. For example, a sensor might in a + // particular configuration be able to internally measure color intensity in a range of + // [0, 10240]. In such a case, the values returned by getColors() will be divided by 10240 + // so as to return a value it the range [0,1]. However, and this is the point, even so, the + // values we see here may not get close to 1.0 in, e.g., low light conditions where the + // sensor measurements don't approach their maximum limit. In such situations, the *relative* + // intensities of the colors are likely what is most interesting. Here, for example, we boost + // the signal on the colors while maintaining their relative balance so as to give more + // vibrant visual feedback on the robot controller visual display. + float max = Math.max(Math.max(Math.max(colors.red, colors.green), colors.blue), colors.alpha); + colors.red /= max; + colors.green /= max; + colors.blue /= max; + color = colors.toColor(); + + telemetry.addLine("normalized color: ") + .addData("a", "%02x", Color.alpha(color)) + .addData("r", "%02x", Color.red(color)) + .addData("g", "%02x", Color.green(color)) + .addData("b", "%02x", Color.blue(color)); + telemetry.update(); + + // convert the RGB values to HSV values. + Color.RGBToHSV(Color.red(color), Color.green(color), Color.blue(color), hsvValues); + + // change the background color to match the color detected by the RGB sensor. + // pass a reference to the hue, saturation, and value array as an argument + // to the HSVToColor method. + relativeLayout.post(new Runnable() { + public void run() { + relativeLayout.setBackgroundColor(Color.HSVToColor(0xff, values)); + } + }); + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorDIO.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorDIO.java new file mode 100644 index 00000000000..12d5d93db82 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorDIO.java @@ -0,0 +1,107 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.DeviceInterfaceModule; +import com.qualcomm.robotcore.hardware.DigitalChannel; + +/* + * This is an example LinearOpMode that shows how to use the digital inputs and outputs on the + * the Modern Robotics Device Interface Module. In addition, it shows how to use the Red and Blue LED + * + * This op mode assumes that there is a Device Interface Module attached, named 'dim'. + * On this DIM there is a digital input named 'digin' and an output named 'digout' + * + * To fully exercise this sample, connect pin 3 of the digin connector to pin 3 of the digout. + * Note: Pin 1 is indicated by the black stripe, so pin 3 is at the opposite end. + * + * The X button on the gamepad will be used to activate the digital output pin. + * The Red/Blue LED will be used to indicate the state of the digital input pin. + * Blue = false (0V), Red = true (5V) + * If the two pins are linked, the gamepad will change the LED color. + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list +*/ +@TeleOp(name = "Sensor: DIM DIO", group = "Sensor") +@Disabled +public class SensorDIO extends LinearOpMode { + +final int BLUE_LED_CHANNEL = 0; +final int RED_LED_CHANNEL = 1; + + @Override + public void runOpMode() { + + boolean inputPin; // Input State + boolean outputPin; // Output State + DeviceInterfaceModule dim; // Device Object + DigitalChannel digIn; // Device Object + DigitalChannel digOut; // Device Object + + // get a reference to a Modern Robotics DIM, and IO channels. + dim = hardwareMap.get(DeviceInterfaceModule.class, "dim"); // Use generic form of device mapping + digIn = hardwareMap.get(DigitalChannel.class, "digin"); // Use generic form of device mapping + digOut = hardwareMap.get(DigitalChannel.class, "digout"); // Use generic form of device mapping + + digIn.setMode(DigitalChannel.Mode.INPUT); // Set the direction of each channel + digOut.setMode(DigitalChannel.Mode.OUTPUT); + + // wait for the start button to be pressed. + telemetry.addData(">", "Press play, and then user X button to set DigOut"); + telemetry.update(); + waitForStart(); + + while (opModeIsActive()) { + + outputPin = gamepad1.x ; // Set the output pin based on x button + digOut.setState(outputPin); + inputPin = digIn.getState(); // Read the input pin + + // Display input pin state on LEDs + if (inputPin) { + dim.setLED(RED_LED_CHANNEL, true); + dim.setLED(BLUE_LED_CHANNEL, false); + } + else { + dim.setLED(RED_LED_CHANNEL, false); + dim.setLED(BLUE_LED_CHANNEL, true); + } + + telemetry.addData("Output", outputPin ); + telemetry.addData("Input", inputPin ); + telemetry.addData("LED", inputPin ? "Red" : "Blue" ); + telemetry.update(); + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorDigitalTouch.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorDigitalTouch.java new file mode 100644 index 00000000000..b367924e9e5 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorDigitalTouch.java @@ -0,0 +1,88 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.DigitalChannel; + +/* + * This is an example LinearOpMode that shows how to use + * a REV Robotics Touch Sensor. + * + * It assumes that the touch sensor is configured with a name of "sensor_digital". + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list. + */ +@TeleOp(name = "Sensor: Digital touch", group = "Sensor") +@Disabled +public class SensorDigitalTouch extends LinearOpMode { + /** + * The REV Robotics Touch Sensor + * is treated as a digital channel. It is HIGH if the button is unpressed. + * It pulls LOW if the button is pressed. + * + * Also, when you connect a REV Robotics Touch Sensor to the digital I/O port on the + * Expansion Hub using a 4-wire JST cable, the second pin gets connected to the Touch Sensor. + * The lower (first) pin stays unconnected.* + */ + + DigitalChannel digitalTouch; // Hardware Device Object + + @Override + public void runOpMode() { + + // get a reference to our digitalTouch object. + digitalTouch = hardwareMap.get(DigitalChannel.class, "sensor_digital"); + + // set the digital channel to input. + digitalTouch.setMode(DigitalChannel.Mode.INPUT); + + // wait for the start button to be pressed. + waitForStart(); + + // while the op mode is active, loop and read the light levels. + // Note we use opModeIsActive() as our loop condition because it is an interruptible method. + while (opModeIsActive()) { + + // send the info back to driver station using telemetry function. + // if the digital channel returns true it's HIGH and the button is unpressed. + if (digitalTouch.getState() == true) { + telemetry.addData("Digital Touch", "Is Not Pressed"); + } else { + telemetry.addData("Digital Touch", "Is Pressed"); + } + + telemetry.update(); + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorKLNavxMicro.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorKLNavxMicro.java new file mode 100644 index 00000000000..583f52569ad --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorKLNavxMicro.java @@ -0,0 +1,129 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.hardware.kauailabs.NavxMicroNavigationSensor; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.Gyroscope; +import com.qualcomm.robotcore.hardware.IntegratingGyroscope; +import com.qualcomm.robotcore.util.ElapsedTime; + +import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit; +import org.firstinspires.ftc.robotcore.external.navigation.AngularVelocity; +import org.firstinspires.ftc.robotcore.external.navigation.AxesOrder; +import org.firstinspires.ftc.robotcore.external.navigation.AxesReference; +import org.firstinspires.ftc.robotcore.external.navigation.Orientation; + +/* + * This is an example LinearOpMode that shows how to use Kauai Labs navX Micro Robotics Navigation + * Sensor. It assumes that the sensor is configured with a name of "navx". + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ +@TeleOp(name = "Sensor: KL navX Micro", group = "Sensor") +@Disabled +public class SensorKLNavxMicro extends LinearOpMode { + + /** In this sample, for illustration purposes we use two interfaces on the one gyro object. + * That's likely atypical: you'll probably use one or the other in any given situation, + * depending on what you're trying to do. {@link IntegratingGyroscope} (and it's base interface, + * {@link Gyroscope}) are common interfaces supported by possibly several different gyro + * implementations. {@link NavxMicroNavigationSensor}, by contrast, provides functionality that + * is unique to the navX Micro sensor. + */ + IntegratingGyroscope gyro; + NavxMicroNavigationSensor navxMicro; + + // A timer helps provide feedback while calibration is taking place + ElapsedTime timer = new ElapsedTime(); + + @Override public void runOpMode() throws InterruptedException { + // Get a reference to a Modern Robotics GyroSensor object. We use several interfaces + // on this object to illustrate which interfaces support which functionality. + navxMicro = hardwareMap.get(NavxMicroNavigationSensor.class, "navx"); + gyro = (IntegratingGyroscope)navxMicro; + // If you're only interested int the IntegratingGyroscope interface, the following will suffice. + // gyro = hardwareMap.get(IntegratingGyroscope.class, "navx"); + + // The gyro automatically starts calibrating. This takes a few seconds. + telemetry.log().add("Gyro Calibrating. Do Not Move!"); + + // Wait until the gyro calibration is complete + timer.reset(); + while (navxMicro.isCalibrating()) { + telemetry.addData("calibrating", "%s", Math.round(timer.seconds())%2==0 ? "|.." : "..|"); + telemetry.update(); + Thread.sleep(50); + } + telemetry.log().clear(); telemetry.log().add("Gyro Calibrated. Press Start."); + telemetry.clear(); telemetry.update(); + + // Wait for the start button to be pressed + waitForStart(); + telemetry.log().clear(); + + while (opModeIsActive()) { + + // Read dimensionalized data from the gyro. This gyro can report angular velocities + // about all three axes. Additionally, it internally integrates the Z axis to + // be able to report an absolute angular Z orientation. + AngularVelocity rates = gyro.getAngularVelocity(AngleUnit.DEGREES); + Orientation angles = gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES); + + telemetry.addLine() + .addData("dx", formatRate(rates.xRotationRate)) + .addData("dy", formatRate(rates.yRotationRate)) + .addData("dz", "%s deg/s", formatRate(rates.zRotationRate)); + + telemetry.addLine() + .addData("heading", formatAngle(angles.angleUnit, angles.firstAngle)) + .addData("roll", formatAngle(angles.angleUnit, angles.secondAngle)) + .addData("pitch", "%s deg", formatAngle(angles.angleUnit, angles.thirdAngle)); + telemetry.update(); + + idle(); // Always call idle() at the bottom of your while(opModeIsActive()) loop + } + } + + String formatRate(float rate) { + return String.format("%.3f", rate); + } + + String formatAngle(AngleUnit angleUnit, double angle) { + return formatDegrees(AngleUnit.DEGREES.fromUnit(angleUnit, angle)); + } + + String formatDegrees(double degrees){ + return String.format("%.1f", AngleUnit.DEGREES.normalize(degrees)); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRColor.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRColor.java new file mode 100644 index 00000000000..513ace8aa72 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRColor.java @@ -0,0 +1,139 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import android.app.Activity; +import android.graphics.Color; +import android.view.View; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.ColorSensor; + +/* + * + * This is an example LinearOpMode that shows how to use + * a Modern Robotics Color Sensor. + * + * The op mode assumes that the color sensor + * is configured with a name of "sensor_color". + * + * You can use the X button on gamepad1 to toggle the LED on and off. + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ +@TeleOp(name = "Sensor: MR Color", group = "Sensor") +@Disabled +public class SensorMRColor extends LinearOpMode { + + ColorSensor colorSensor; // Hardware Device Object + + + @Override + public void runOpMode() { + + // hsvValues is an array that will hold the hue, saturation, and value information. + float hsvValues[] = {0F,0F,0F}; + + // values is a reference to the hsvValues array. + final float values[] = hsvValues; + + // get a reference to the RelativeLayout so we can change the background + // color of the Robot Controller app to match the hue detected by the RGB sensor. + int relativeLayoutId = hardwareMap.appContext.getResources().getIdentifier("RelativeLayout", "id", hardwareMap.appContext.getPackageName()); + final View relativeLayout = ((Activity) hardwareMap.appContext).findViewById(relativeLayoutId); + + // bPrevState and bCurrState represent the previous and current state of the button. + boolean bPrevState = false; + boolean bCurrState = false; + + // bLedOn represents the state of the LED. + boolean bLedOn = true; + + // get a reference to our ColorSensor object. + colorSensor = hardwareMap.get(ColorSensor.class, "sensor_color"); + + // Set the LED in the beginning + colorSensor.enableLed(bLedOn); + + // wait for the start button to be pressed. + waitForStart(); + + // while the op mode is active, loop and read the RGB data. + // Note we use opModeIsActive() as our loop condition because it is an interruptible method. + while (opModeIsActive()) { + + // check the status of the x button on either gamepad. + bCurrState = gamepad1.x; + + // check for button state transitions. + if (bCurrState && (bCurrState != bPrevState)) { + + // button is transitioning to a pressed state. So Toggle LED + bLedOn = !bLedOn; + colorSensor.enableLed(bLedOn); + } + + // update previous state variable. + bPrevState = bCurrState; + + // convert the RGB values to HSV values. + Color.RGBToHSV(colorSensor.red() * 8, colorSensor.green() * 8, colorSensor.blue() * 8, hsvValues); + + // send the info back to driver station using telemetry function. + telemetry.addData("LED", bLedOn ? "On" : "Off"); + telemetry.addData("Clear", colorSensor.alpha()); + telemetry.addData("Red ", colorSensor.red()); + telemetry.addData("Green", colorSensor.green()); + telemetry.addData("Blue ", colorSensor.blue()); + telemetry.addData("Hue", hsvValues[0]); + + // change the background color to match the color detected by the RGB sensor. + // pass a reference to the hue, saturation, and value array as an argument + // to the HSVToColor method. + relativeLayout.post(new Runnable() { + public void run() { + relativeLayout.setBackgroundColor(Color.HSVToColor(0xff, values)); + } + }); + + telemetry.update(); + } + + // Set the panel back to the default color + relativeLayout.post(new Runnable() { + public void run() { + relativeLayout.setBackgroundColor(Color.WHITE); + } + }); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRCompass.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRCompass.java new file mode 100644 index 00000000000..583ac1aab3e --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRCompass.java @@ -0,0 +1,148 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.hardware.modernrobotics.ModernRoboticsI2cCompassSensor; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.CompassSensor; +import com.qualcomm.robotcore.util.ElapsedTime; + +import org.firstinspires.ftc.robotcore.external.navigation.Acceleration; + +/** + * The {@link SensorMRCompass} op mode provides a demonstration of the + * functionality provided by the Modern Robotics compass sensor. + * + * The op mode assumes that the MR compass is configured with a name of "compass". + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + * + * @see MR Compass Sensor + */ +@TeleOp(name = "Sensor: MR compass", group = "Sensor") +@Disabled // comment out or remove this line to enable this opmode +public class SensorMRCompass extends LinearOpMode { + + ModernRoboticsI2cCompassSensor compass; + ElapsedTime timer = new ElapsedTime(); + + @Override public void runOpMode() { + + // get a reference to our compass + compass = hardwareMap.get(ModernRoboticsI2cCompassSensor.class, "compass"); + + telemetry.log().setCapacity(20); + telemetry.log().add("The compass sensor operates quite well out-of-the"); + telemetry.log().add("box, as shipped by the manufacturer. Precision can"); + telemetry.log().add("however be somewhat improved with calibration."); + telemetry.log().add(""); + telemetry.log().add("To calibrate the compass once the opmode is"); + telemetry.log().add("started, make sure the compass is level, then"); + telemetry.log().add("press 'A' on the gamepad. Next, slowly rotate the "); + telemetry.log().add("compass in a full 360 degree circle while keeping"); + telemetry.log().add("it level. When complete, press 'B'."); + + // wait for the start button to be pressed + waitForStart(); + telemetry.log().clear(); + + while (opModeIsActive()) { + + // If the A button is pressed, start calibration and wait for the A button to rise + if (gamepad1.a && !compass.isCalibrating()) { + + telemetry.log().clear(); + telemetry.log().add("Calibration started"); + telemetry.log().add("Slowly rotate compass 360deg"); + telemetry.log().add("Press 'B' when complete"); + compass.setMode(CompassSensor.CompassMode.CALIBRATION_MODE); + timer.reset(); + + while (gamepad1.a && opModeIsActive()) { + doTelemetry(); + idle(); + } + } + + // If the B button is pressed, stop calibration and wait for the B button to rise + if (gamepad1.b && compass.isCalibrating()) { + + telemetry.log().clear(); + telemetry.log().add("Calibration complete"); + compass.setMode(CompassSensor.CompassMode.MEASUREMENT_MODE); + + if (compass.calibrationFailed()) { + telemetry.log().add("Calibration failed"); + compass.writeCommand(ModernRoboticsI2cCompassSensor.Command.NORMAL); + } + + while (gamepad1.a && opModeIsActive()) { + doTelemetry(); + idle(); + } + } + + doTelemetry(); + } + } + + protected void doTelemetry() { + + if (compass.isCalibrating()) { + + telemetry.addData("compass", "calibrating %s", Math.round(timer.seconds())%2==0 ? "|.." : "..|"); + + } else { + + // getDirection() returns a traditional compass heading in the range [0,360), + // with values increasing in a CW direction + telemetry.addData("heading", "%.1f", compass.getDirection()); + + // getAcceleration() returns the current 3D acceleration experienced by + // the sensor. This is used internally to the sensor to compute its tilt and thence + // to correct the magnetometer reading to produce tilt-corrected values in getDirection() + Acceleration accel = compass.getAcceleration(); + double accelMagnitude = Math.sqrt(accel.xAccel*accel.xAccel + accel.yAccel*accel.yAccel + accel.zAccel*accel.zAccel); + telemetry.addData("accel", accel); + telemetry.addData("accel magnitude", "%.3f", accelMagnitude); + + // getMagneticFlux returns the 3D magnetic field flux experienced by the sensor + telemetry.addData("mag flux", compass.getMagneticFlux()); + } + + // the command register provides status data + telemetry.addData("command", "%s", compass.readCommand()); + + telemetry.update(); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRGyro.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRGyro.java new file mode 100644 index 00000000000..e8df38f5c23 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRGyro.java @@ -0,0 +1,162 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.hardware.modernrobotics.ModernRoboticsI2cGyro; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.Gyroscope; +import com.qualcomm.robotcore.hardware.IntegratingGyroscope; +import com.qualcomm.robotcore.util.ElapsedTime; + +import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit; +import org.firstinspires.ftc.robotcore.external.navigation.AngularVelocity; +import org.firstinspires.ftc.robotcore.external.navigation.AxesOrder; +import org.firstinspires.ftc.robotcore.external.navigation.AxesReference; + +/* + * This is an example LinearOpMode that shows how to use the Modern Robotics Gyro. + * + * The op mode assumes that the gyro sensor is attached to a Device Interface Module + * I2C channel and is configured with a name of "gyro". + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list +*/ +@TeleOp(name = "Sensor: MR Gyro", group = "Sensor") +@Disabled +public class SensorMRGyro extends LinearOpMode { + + /** In this sample, for illustration purposes we use two interfaces on the one gyro object. + * That's likely atypical: you'll probably use one or the other in any given situation, + * depending on what you're trying to do. {@link IntegratingGyroscope} (and it's base interface, + * {@link Gyroscope}) are common interfaces supported by possibly several different gyro + * implementations. {@link ModernRoboticsI2cGyro}, by contrast, provides functionality that + * is unique to the Modern Robotics gyro sensor. + */ + IntegratingGyroscope gyro; + ModernRoboticsI2cGyro modernRoboticsI2cGyro; + + // A timer helps provide feedback while calibration is taking place + ElapsedTime timer = new ElapsedTime(); + + @Override + public void runOpMode() { + + boolean lastResetState = false; + boolean curResetState = false; + + // Get a reference to a Modern Robotics gyro object. We use several interfaces + // on this object to illustrate which interfaces support which functionality. + modernRoboticsI2cGyro = hardwareMap.get(ModernRoboticsI2cGyro.class, "gyro"); + gyro = (IntegratingGyroscope)modernRoboticsI2cGyro; + // If you're only interested int the IntegratingGyroscope interface, the following will suffice. + // gyro = hardwareMap.get(IntegratingGyroscope.class, "gyro"); + // A similar approach will work for the Gyroscope interface, if that's all you need. + + // Start calibrating the gyro. This takes a few seconds and is worth performing + // during the initialization phase at the start of each opMode. + telemetry.log().add("Gyro Calibrating. Do Not Move!"); + modernRoboticsI2cGyro.calibrate(); + + // Wait until the gyro calibration is complete + timer.reset(); + while (!isStopRequested() && modernRoboticsI2cGyro.isCalibrating()) { + telemetry.addData("calibrating", "%s", Math.round(timer.seconds())%2==0 ? "|.." : "..|"); + telemetry.update(); + sleep(50); + } + + telemetry.log().clear(); telemetry.log().add("Gyro Calibrated. Press Start."); + telemetry.clear(); telemetry.update(); + + // Wait for the start button to be pressed + waitForStart(); + telemetry.log().clear(); + telemetry.log().add("Press A & B to reset heading"); + + // Loop until we're asked to stop + while (opModeIsActive()) { + + // If the A and B buttons are pressed just now, reset Z heading. + curResetState = (gamepad1.a && gamepad1.b); + if (curResetState && !lastResetState) { + modernRoboticsI2cGyro.resetZAxisIntegrator(); + } + lastResetState = curResetState; + + // The raw() methods report the angular rate of change about each of the + // three axes directly as reported by the underlying sensor IC. + int rawX = modernRoboticsI2cGyro.rawX(); + int rawY = modernRoboticsI2cGyro.rawY(); + int rawZ = modernRoboticsI2cGyro.rawZ(); + int heading = modernRoboticsI2cGyro.getHeading(); + int integratedZ = modernRoboticsI2cGyro.getIntegratedZValue(); + + // Read dimensionalized data from the gyro. This gyro can report angular velocities + // about all three axes. Additionally, it internally integrates the Z axis to + // be able to report an absolute angular Z orientation. + AngularVelocity rates = gyro.getAngularVelocity(AngleUnit.DEGREES); + float zAngle = gyro.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle; + + // Read administrative information from the gyro + int zAxisOffset = modernRoboticsI2cGyro.getZAxisOffset(); + int zAxisScalingCoefficient = modernRoboticsI2cGyro.getZAxisScalingCoefficient(); + + telemetry.addLine() + .addData("dx", formatRate(rates.xRotationRate)) + .addData("dy", formatRate(rates.yRotationRate)) + .addData("dz", "%s deg/s", formatRate(rates.zRotationRate)); + telemetry.addData("angle", "%s deg", formatFloat(zAngle)); + telemetry.addData("heading", "%3d deg", heading); + telemetry.addData("integrated Z", "%3d", integratedZ); + telemetry.addLine() + .addData("rawX", formatRaw(rawX)) + .addData("rawY", formatRaw(rawY)) + .addData("rawZ", formatRaw(rawZ)); + telemetry.addLine().addData("z offset", zAxisOffset).addData("z coeff", zAxisScalingCoefficient); + telemetry.update(); + } + } + + String formatRaw(int rawValue) { + return String.format("%d", rawValue); + } + + String formatRate(float rate) { + return String.format("%.3f", rate); + } + + String formatFloat(float rate) { + return String.format("%.3f", rate); + } + +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRIrSeeker.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRIrSeeker.java new file mode 100644 index 00000000000..9bd6452fd14 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRIrSeeker.java @@ -0,0 +1,84 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.IrSeekerSensor; + +/* + * This is an example LinearOpMode that shows how to use + * the Modern Robotics ITR Seeker + * + * The op mode assumes that the IR Seeker + * is configured with a name of "sensor_ir". + * + * Set the switch on the Modern Robotics IR beacon to 1200 at 180.
    + * Turn on the IR beacon. + * Make sure the side of the beacon with the LED on is facing the robot.
    + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ +@TeleOp(name = "Sensor: MR IR Seeker", group = "Sensor") +@Disabled +public class SensorMRIrSeeker extends LinearOpMode { + + @Override + public void runOpMode() { + + IrSeekerSensor irSeeker; // Hardware Device Object + + // get a reference to our GyroSensor object. + irSeeker = hardwareMap.get(IrSeekerSensor.class, "sensor_ir"); + + // wait for the start button to be pressed. + waitForStart(); + + while (opModeIsActive()) { + + // Ensure we have a IR signal + if (irSeeker.signalDetected()) + { + // Display angle and strength + telemetry.addData("Angle", irSeeker.getAngle()); + telemetry.addData("Strength", irSeeker.getStrength()); + } + else + { + // Display loss of signal + telemetry.addData("Seeker", "Signal Lost"); + } + + telemetry.update(); + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMROpticalDistance.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMROpticalDistance.java new file mode 100644 index 00000000000..8424ef77698 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMROpticalDistance.java @@ -0,0 +1,71 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.OpticalDistanceSensor; + +/* + * This is an example LinearOpMode that shows how to use + * a Modern Robotics Optical Distance Sensor + * It assumes that the ODS sensor is configured with a name of "sensor_ods". + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + */ +@TeleOp(name = "Sensor: MR ODS", group = "Sensor") +@Disabled +public class SensorMROpticalDistance extends LinearOpMode { + + OpticalDistanceSensor odsSensor; // Hardware Device Object + + @Override + public void runOpMode() { + + // get a reference to our Light Sensor object. + odsSensor = hardwareMap.get(OpticalDistanceSensor.class, "sensor_ods"); + + // wait for the start button to be pressed. + waitForStart(); + + // while the op mode is active, loop and read the light levels. + // Note we use opModeIsActive() as our loop condition because it is an interruptible method. + while (opModeIsActive()) { + + // send the info back to driver station using telemetry function. + telemetry.addData("Raw", odsSensor.getRawLightDetected()); + telemetry.addData("Normal", odsSensor.getLightDetected()); + + telemetry.update(); + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRRangeSensor.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRRangeSensor.java new file mode 100644 index 00000000000..d7de1fff0e8 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorMRRangeSensor.java @@ -0,0 +1,72 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.hardware.modernrobotics.ModernRoboticsI2cRangeSensor; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; + +import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit; + +/** + * {@link SensorMRRangeSensor} illustrates how to use the Modern Robotics + * Range Sensor. + * + * The op mode assumes that the range sensor is configured with a name of "sensor_range". + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + * + * @see MR Range Sensor + */ +@TeleOp(name = "Sensor: MR range sensor", group = "Sensor") +@Disabled // comment out or remove this line to enable this opmode +public class SensorMRRangeSensor extends LinearOpMode { + + ModernRoboticsI2cRangeSensor rangeSensor; + + @Override public void runOpMode() { + + // get a reference to our compass + rangeSensor = hardwareMap.get(ModernRoboticsI2cRangeSensor.class, "sensor_range"); + + // wait for the start button to be pressed + waitForStart(); + + while (opModeIsActive()) { + telemetry.addData("raw ultrasonic", rangeSensor.rawUltrasonic()); + telemetry.addData("raw optical", rangeSensor.rawOptical()); + telemetry.addData("cm optical", "%.2f cm", rangeSensor.cmOptical()); + telemetry.addData("cm", "%.2f cm", rangeSensor.getDistance(DistanceUnit.CM)); + telemetry.update(); + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorREV2mDistance.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorREV2mDistance.java new file mode 100644 index 00000000000..30bb377dae1 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorREV2mDistance.java @@ -0,0 +1,89 @@ +/* +Copyright (c) 2018 FIRST + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted (subject to the limitations in the disclaimer below) provided that +the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list +of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +Neither the name of FIRST nor the names of its contributors may be used to +endorse or promote products derived from this software without specific prior +written permission. + +NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS +LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +package org.firstinspires.ftc.robotcontroller.external.samples; + +import com.qualcomm.hardware.rev.Rev2mDistanceSensor; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.hardware.DistanceSensor; + +import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit; + +/** + * {@link SensorREV2mDistance} illustrates how to use the REV Robotics + * Time-of-Flight Range Sensor. + * + * The op mode assumes that the range sensor is configured with a name of "sensor_range". + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list + * + * @see REV Robotics Web Page + */ +@TeleOp(name = "Sensor: REV2mDistance", group = "Sensor") +@Disabled +public class SensorREV2mDistance extends LinearOpMode { + + private DistanceSensor sensorRange; + + @Override + public void runOpMode() { + // you can use this as a regular DistanceSensor. + sensorRange = hardwareMap.get(DistanceSensor.class, "sensor_range"); + + // you can also cast this to a Rev2mDistanceSensor if you want to use added + // methods associated with the Rev2mDistanceSensor class. + Rev2mDistanceSensor sensorTimeOfFlight = (Rev2mDistanceSensor)sensorRange; + + telemetry.addData(">>", "Press start to continue"); + telemetry.update(); + + waitForStart(); + while(opModeIsActive()) { + // generic DistanceSensor methods. + telemetry.addData("deviceName",sensorRange.getDeviceName() ); + telemetry.addData("range", String.format("%.01f mm", sensorRange.getDistance(DistanceUnit.MM))); + telemetry.addData("range", String.format("%.01f cm", sensorRange.getDistance(DistanceUnit.CM))); + telemetry.addData("range", String.format("%.01f m", sensorRange.getDistance(DistanceUnit.METER))); + telemetry.addData("range", String.format("%.01f in", sensorRange.getDistance(DistanceUnit.INCH))); + + // Rev2mDistanceSensor specific methods. + telemetry.addData("ID", String.format("%x", sensorTimeOfFlight.getModelID())); + telemetry.addData("did time out", Boolean.toString(sensorTimeOfFlight.didTimeoutOccur())); + + telemetry.update(); + } + } + +} \ No newline at end of file diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorREVColorDistance.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorREVColorDistance.java new file mode 100644 index 00000000000..37910ca97b5 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorREVColorDistance.java @@ -0,0 +1,145 @@ +/* Copyright (c) 2017 FIRST. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted (subject to the limitations in the disclaimer below) provided that + * the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * Neither the name of FIRST nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS + * LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.firstinspires.ftc.robotcontroller.external.samples; + +import android.app.Activity; +import android.graphics.Color; +import android.view.View; + +import com.qualcomm.robotcore.eventloop.opmode.Disabled; +import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; +import com.qualcomm.robotcore.eventloop.opmode.TeleOp; +import com.qualcomm.robotcore.hardware.ColorSensor; +import com.qualcomm.robotcore.hardware.DistanceSensor; + +import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit; + +import java.util.Locale; + +/* + * This is an example LinearOpMode that shows how to use + * the REV Robotics Color-Distance Sensor. + * + * It assumes the sensor is configured with the name "sensor_color_distance". + * + * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name. + * Remove or comment out the @Disabled line to add this opmode to the Driver Station OpMode list. + */ +@TeleOp(name = "Sensor: REVColorDistance", group = "Sensor") +@Disabled // Comment this out to add to the opmode list +public class SensorREVColorDistance extends LinearOpMode { + + /** + * Note that the REV Robotics Color-Distance incorporates two sensors into one device. + * It has a light/distance (range) sensor. It also has an RGB color sensor. + * The light/distance sensor saturates at around 2" (5cm). This means that targets that are 2" + * or closer will display the same value for distance/light detected. + * + * Although you configure a single REV Robotics Color-Distance sensor in your configuration file, + * you can treat the sensor as two separate sensors that share the same name in your op mode. + * + * In this example, we represent the detected color by a hue, saturation, and value color + * model (see https://en.wikipedia.org/wiki/HSL_and_HSV). We change the background + * color of the screen to match the detected color. + * + * In this example, we also use the distance sensor to display the distance + * to the target object. Note that the distance sensor saturates at around 2" (5 cm). + * + */ + ColorSensor sensorColor; + DistanceSensor sensorDistance; + + @Override + public void runOpMode() { + + // get a reference to the color sensor. + sensorColor = hardwareMap.get(ColorSensor.class, "sensor_color_distance"); + + // get a reference to the distance sensor that shares the same name. + sensorDistance = hardwareMap.get(DistanceSensor.class, "sensor_color_distance"); + + // hsvValues is an array that will hold the hue, saturation, and value information. + float hsvValues[] = {0F, 0F, 0F}; + + // values is a reference to the hsvValues array. + final float values[] = hsvValues; + + // sometimes it helps to multiply the raw RGB values with a scale factor + // to amplify/attentuate the measured values. + final double SCALE_FACTOR = 255; + + // get a reference to the RelativeLayout so we can change the background + // color of the Robot Controller app to match the hue detected by the RGB sensor. + int relativeLayoutId = hardwareMap.appContext.getResources().getIdentifier("RelativeLayout", "id", hardwareMap.appContext.getPackageName()); + final View relativeLayout = ((Activity) hardwareMap.appContext).findViewById(relativeLayoutId); + + // wait for the start button to be pressed. + waitForStart(); + + // loop and read the RGB and distance data. + // Note we use opModeIsActive() as our loop condition because it is an interruptible method. + while (opModeIsActive()) { + // convert the RGB values to HSV values. + // multiply by the SCALE_FACTOR. + // then cast it back to int (SCALE_FACTOR is a double) + Color.RGBToHSV((int) (sensorColor.red() * SCALE_FACTOR), + (int) (sensorColor.green() * SCALE_FACTOR), + (int) (sensorColor.blue() * SCALE_FACTOR), + hsvValues); + + // send the info back to driver station using telemetry function. + telemetry.addData("Distance (cm)", + String.format(Locale.US, "%.02f", sensorDistance.getDistance(DistanceUnit.CM))); + telemetry.addData("Alpha", sensorColor.alpha()); + telemetry.addData("Red ", sensorColor.red()); + telemetry.addData("Green", sensorColor.green()); + telemetry.addData("Blue ", sensorColor.blue()); + telemetry.addData("Hue", hsvValues[0]); + + // change the background color to match the color detected by the RGB sensor. + // pass a reference to the hue, saturation, and value array as an argument + // to the HSVToColor method. + relativeLayout.post(new Runnable() { + public void run() { + relativeLayout.setBackgroundColor(Color.HSVToColor(0xff, values)); + } + }); + + telemetry.update(); + } + + // Set the panel back to the default color + relativeLayout.post(new Runnable() { + public void run() { + relativeLayout.setBackgroundColor(Color.WHITE); + } + }); + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/readme.md b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/readme.md new file mode 100644 index 00000000000..5b66c4f4b91 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/readme.md @@ -0,0 +1,54 @@ + +## Caution +No Team-specific code should be placed or modified in this ``.../samples`` folder. + +Full or partial Samples should be Copied from here, and then Pasted into +the team's folder, using the Android Studio cut and paste commands. +This automatically changes all file and class names to be consistent. + +### Naming of Samples + +To gain a better understanding of how the samples are organized, and how to interpret the +naming system, it will help to understand the conventions that were used during their creation. + +These conventions are described (in detail) in the sample_conventions.md file in this folder. + +To summarize: A range of different samples classes will reside in the java/external/samples. +The class names will follow a naming convention which indicates the purpose of each class. +The prefix of the name will be one of the following: + +Basic: This is a minimally functional OpMode used to illustrate the skeleton/structure + of a particular style of OpMode. These are bare bones examples. + +Sensor: This is a Sample OpMode that shows how to use a specific sensor. + It is not intended to drive a functioning robot, it is simply showing the minimal code + required to read and display the sensor values. + +Hardware: This is NOT an OpMode, but a helper class that is used to describe + one particular robot's hardware configuration: eg: For the K9 or Pushbot. + Look at any Pushbot sample to see how this can be used in an OpMode. + Teams can copy one of these to their team folder to create their own robot definition. + +Pushbot: This is a Sample OpMode that uses the Pushbot robot hardware as a base. + It may be used to provide some standard baseline Pushbot OpModes, or + to demonstrate how a particular sensor or concept can be used directly on the + Pushbot chassis. + +Concept: This is a sample OpMode that illustrates performing a specific function or concept. + These may be complex, but their operation should be explained clearly in the comments, + or the comments should reference an external doc, guide or tutorial. + Each OpMode should try to only demonstrate a single concept so they are easy to + locate based on their name. These OpModes may not produce a drivable robot. + +Library: This is a class, or set of classes used to implement some strategy. + These will typically NOT implement a full OpMode. Instead they will be included + by an OpMode to provide some stand-alone capability. + +After the prefix, other conventions will apply: + +* Sensor class names are constructed as: Sensor - Company - Type +* Hardware class names are constructed as: Hardware - Robot type +* Pushbot class names are constructed as: Pushbot - Mode - Action - OpModetype +* Concept class names are constructed as: Concept - Topic - OpModetype +* Library class names are constructed as: Library - Topic - OpModetype + diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/sample_conventions.md b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/sample_conventions.md new file mode 100644 index 00000000000..0f1aa131b5a --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/sample_conventions.md @@ -0,0 +1,118 @@ +## Sample Class/Opmode conventions +#### V 1.1.0 8/9/2017 + +This document defines the FTC Sample OpMode and Class conventions. + +### OpMode Name + +A range of different samples classes will reside in the java/external/samples folder. + +For ease of understanding, the class names will follow a naming convention which indicates +the purpose of each class. The prefix of the name will be one of the following: + +Basic: This is a minimally functional OpMode used to illustrate the skeleton/structure + of a particular style of OpMode. These are bare bones Tank Drive examples. + +Sensor: This is a Sample OpMode that shows how to use a specific sensor. + It is not intended to drive a functioning robot, it is simply showing the minimal code + required to read and display the sensor values. + +Hardware: This is not an actual OpMode, but a helper class that is used to describe + one particular robot's hardware configuration: eg: For the K9 or Pushbot. + Look at any Pushbot sample to see how this can be used in an OpMode. + Teams can copy one of these to create their own robot definition. + +Pushbot: This is a Sample OpMode that uses the Pushbot robot hardware as a base. + It may be used to provide some standard baseline Pushbot opmodes, or + to demonstrate how a particular sensor or concept can be used directly on the + Pushbot chassis. + +Concept: This is a sample OpMode that illustrates performing a specific function or concept. + These may be complex, but their operation should be explained clearly in the comments, + or the comments should reference an external doc, guide or tutorial. + Each OpMode should try to only demonstrate a single concept so they are easy to + locate based on their name. + +Library: This is a class, or set of classes used to implement some strategy. + These will typically NOT implement a full opmode. Instead they will be included + by an OpMode to provide some stand-alone capability. + +After the prefix, other conventions will apply: + +* Sensor class names should constructed as: Sensor - Company - Type +* Hardware class names should be constructed as: Hardware - Robot type +* Pushbot class names should be constructed as: Pushbot - Mode - Action - OpModetype +* Concept class names should be constructed as: Concept - Topic - OpModetype +* Library class names should be constructed as: Library - Topic - OpModetype + +### Sample OpMode Content/Style + +Code is formatted as per the Google Style Guide: + +https://google.github.io/styleguide/javaguide.html + +With “Sensor” and “Hardware” samples, the code should demonstrate the essential function, +and not be embellished with too much additional “clever” code. If a sensor has special +addressing needs, or has a variety of modes or outputs, these should be demonstrated as +simply as possible. + +Special programming methods, or robot control techniques should be reserved for “Concept” Samples, +and where possible, Samples should strive to only demonstrate a single concept, +eg: State machine coding, or a User Menu system, and not combine them into a single “all inclusive” +sample. This will prevent an “all inclusive” Sample being deleted just because one part of it +becomes obsolete. + +### Device Configuration Names + +The following device names are used in the external samples + +** Motors: +left_drive +right_drive +left_arm + +** Servos: +left_hand +right_hand +arm +claw + +** Sensors: +sensor_color +sensor_ir +sensor_light +sensor_ods +sensor_range +sensor_touch +sensor_color_distance +sensor_digital +digin +digout + +** Localization: +compass +gyro +imu +navx + +### Device Object Names + +Device Object names should use the same words as the device’s configuration name, but they +should be re-structured to be a suitable Java variable name. This should keep the same word order, +but adopt the style of beginning with a lower case letter, and then each subsequent word +starting with an upper case letter. + +Eg: from the examples above: tool, leftMotor, rightClawServo, rearLightSensor. + +Note: Sometimes it’s helpful to put the device type first, followed by the variant. +eg: motorLeft and motorRight, but this should only be done if the same word order +is used on the device configuration name. + +### OpMode code Comments + +Sample comments should read like normal code comments, that is, as an explanation of what the +sample code is doing. They should NOT be directives to the user, +like: “insert your joystick code here” as these comments typically aren’t +detailed enough to be useful. They also often get left in the code and become garbage. + +Instead, an example of the joystick code should be shown with a comment describing what it is doing. diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/internal/FtcOpModeRegister.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/internal/FtcOpModeRegister.java new file mode 100644 index 00000000000..9a94f5418f6 --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/internal/FtcOpModeRegister.java @@ -0,0 +1,70 @@ +/* Copyright (c) 2014, 2015 Qualcomm Technologies Inc + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted (subject to the limitations in the disclaimer below) provided that +the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list +of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +Neither the name of Qualcomm Technologies Inc nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS +LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +package org.firstinspires.ftc.robotcontroller.internal; + +import com.qualcomm.robotcore.eventloop.opmode.OpModeManager; +import com.qualcomm.robotcore.eventloop.opmode.OpModeRegister; + +import org.firstinspires.ftc.robotcontroller.external.samples.ConceptNullOp; + +/** + * {@link FtcOpModeRegister} is responsible for registering opmodes for use in an FTC game. + * @see #register(OpModeManager) + */ +public class FtcOpModeRegister implements OpModeRegister { + + /** + * {@link #register(OpModeManager)} is called by the SDK game in order to register + * OpMode classes or instances that will participate in an FTC game. + * + * There are two mechanisms by which an OpMode may be registered. + * + * 1) The preferred method is by means of class annotations in the OpMode itself. + * See, for example the class annotations in {@link ConceptNullOp}. + * + * 2) The other, retired, method is to modify this {@link #register(OpModeManager)} + * method to include explicit calls to OpModeManager.register(). + * This method of modifying this file directly is discouraged, as it + * makes updates to the SDK harder to integrate into your code. + * + * @param manager the object which contains methods for carrying out OpMode registrations + * + * @see com.qualcomm.robotcore.eventloop.opmode.TeleOp + * @see com.qualcomm.robotcore.eventloop.opmode.Autonomous + */ + public void register(OpModeManager manager) { + + /** + * Any manual OpMode class registrations should go here. + */ + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/internal/FtcRobotControllerActivity.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/internal/FtcRobotControllerActivity.java new file mode 100644 index 00000000000..791f744e79f --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/internal/FtcRobotControllerActivity.java @@ -0,0 +1,815 @@ +/* Copyright (c) 2014, 2015 Qualcomm Technologies Inc + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted (subject to the limitations in the disclaimer below) provided that +the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list +of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +Neither the name of Qualcomm Technologies Inc nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS +LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +package org.firstinspires.ftc.robotcontroller.internal; + +import android.app.ActionBar; +import android.app.Activity; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.ServiceConnection; +import android.content.SharedPreferences; +import android.content.res.Configuration; +import android.content.res.Resources; +import android.hardware.usb.UsbDevice; +import android.hardware.usb.UsbManager; +import android.net.wifi.WifiManager; +import android.os.Bundle; +import android.os.IBinder; +import android.preference.PreferenceManager; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.annotation.StringRes; +import android.view.Menu; +import android.view.MenuItem; +import android.view.MotionEvent; +import android.view.View; +import android.webkit.WebView; +import android.widget.ImageButton; +import android.widget.LinearLayout; +import android.widget.LinearLayout.LayoutParams; +import android.widget.PopupMenu; +import android.widget.TextView; + +import com.google.blocks.ftcrobotcontroller.BlocksActivity; +import com.google.blocks.ftcrobotcontroller.ProgrammingModeActivity; +import com.google.blocks.ftcrobotcontroller.ProgrammingModeControllerImpl; +import com.google.blocks.ftcrobotcontroller.ProgrammingWebHandlers; +import com.google.blocks.ftcrobotcontroller.runtime.BlocksOpMode; +import com.qualcomm.ftccommon.ClassManagerFactory; +import com.qualcomm.ftccommon.FtcAboutActivity; +import com.qualcomm.ftccommon.FtcEventLoop; +import com.qualcomm.ftccommon.FtcEventLoopIdle; +import com.qualcomm.ftccommon.FtcRobotControllerService; +import com.qualcomm.ftccommon.FtcRobotControllerService.FtcRobotControllerBinder; +import com.qualcomm.ftccommon.FtcRobotControllerSettingsActivity; +import com.qualcomm.ftccommon.LaunchActivityConstantsList; +import com.qualcomm.ftccommon.LaunchActivityConstantsList.RequestCode; +import com.qualcomm.ftccommon.ProgrammingModeController; +import com.qualcomm.ftccommon.Restarter; +import com.qualcomm.ftccommon.UpdateUI; +import com.qualcomm.ftccommon.configuration.EditParameters; +import com.qualcomm.ftccommon.configuration.FtcLoadFileActivity; +import com.qualcomm.ftccommon.configuration.RobotConfigFile; +import com.qualcomm.ftccommon.configuration.RobotConfigFileManager; +import com.qualcomm.ftcrobotcontroller.R; +import com.qualcomm.hardware.HardwareFactory; +import com.qualcomm.robotcore.eventloop.EventLoopManager; +import com.qualcomm.robotcore.eventloop.opmode.FtcRobotControllerServiceState; +import com.qualcomm.robotcore.eventloop.opmode.OpModeRegister; +import com.qualcomm.robotcore.hardware.configuration.LynxConstants; +import com.qualcomm.robotcore.hardware.configuration.Utility; +import com.qualcomm.robotcore.util.Device; +import com.qualcomm.robotcore.util.Dimmer; +import com.qualcomm.robotcore.util.ImmersiveMode; +import com.qualcomm.robotcore.util.RobotLog; +import com.qualcomm.robotcore.util.WebServer; +import com.qualcomm.robotcore.wifi.NetworkConnection; +import com.qualcomm.robotcore.wifi.NetworkConnectionFactory; +import com.qualcomm.robotcore.wifi.NetworkType; + +import org.firstinspires.ftc.ftccommon.external.SoundPlayingRobotMonitor; +import org.firstinspires.ftc.ftccommon.internal.FtcRobotControllerWatchdogService; +import org.firstinspires.ftc.ftccommon.internal.ProgramAndManageActivity; +import org.firstinspires.ftc.onbotjava.OnBotJavaClassLoader; +import org.firstinspires.ftc.onbotjava.OnBotJavaHelperImpl; +import org.firstinspires.ftc.onbotjava.OnBotJavaProgrammingMode; +import org.firstinspires.ftc.robotcore.external.navigation.MotionDetection; +import org.firstinspires.ftc.robotcore.internal.hardware.android.AndroidBoard; +import org.firstinspires.ftc.robotcore.internal.network.DeviceNameManagerFactory; +import org.firstinspires.ftc.robotcore.internal.network.PreferenceRemoterRC; +import org.firstinspires.ftc.robotcore.internal.network.StartResult; +import org.firstinspires.ftc.robotcore.internal.network.WifiDirectChannelChanger; +import org.firstinspires.ftc.robotcore.internal.network.WifiMuteEvent; +import org.firstinspires.ftc.robotcore.internal.network.WifiMuteStateMachine; +import org.firstinspires.ftc.robotcore.internal.opmode.ClassManager; +import org.firstinspires.ftc.robotcore.internal.system.AppUtil; +import org.firstinspires.ftc.robotcore.internal.system.Assert; +import org.firstinspires.ftc.robotcore.internal.system.PreferencesHelper; +import org.firstinspires.ftc.robotcore.internal.system.ServiceController; +import org.firstinspires.ftc.robotcore.internal.ui.LocalByRefIntentExtraHolder; +import org.firstinspires.ftc.robotcore.internal.ui.ThemedActivity; +import org.firstinspires.ftc.robotcore.internal.ui.UILocation; +import org.firstinspires.ftc.robotcore.internal.webserver.RobotControllerWebInfo; +import org.firstinspires.ftc.robotserver.internal.programmingmode.ProgrammingModeManager; +import org.firstinspires.inspection.RcInspectionActivity; + +import java.util.Queue; +import java.util.concurrent.ConcurrentLinkedQueue; + +@SuppressWarnings("WeakerAccess") +public class FtcRobotControllerActivity extends Activity + { + public static final String TAG = "RCActivity"; + public String getTag() { return TAG; } + + private static final int REQUEST_CONFIG_WIFI_CHANNEL = 1; + private static final int NUM_GAMEPADS = 2; + + protected WifiManager.WifiLock wifiLock; + protected RobotConfigFileManager cfgFileMgr; + + protected ProgrammingModeManager programmingModeManager; + protected ProgrammingModeController programmingModeController; + + protected UpdateUI.Callback callback; + protected Context context; + protected Utility utility; + protected StartResult prefRemoterStartResult = new StartResult(); + protected StartResult deviceNameStartResult = new StartResult(); + protected PreferencesHelper preferencesHelper; + protected final SharedPreferencesListener sharedPreferencesListener = new SharedPreferencesListener(); + + protected ImageButton buttonMenu; + protected TextView textDeviceName; + protected TextView textNetworkConnectionStatus; + protected TextView textRobotStatus; + protected TextView[] textGamepad = new TextView[NUM_GAMEPADS]; + protected TextView textOpMode; + protected TextView textErrorMessage; + protected ImmersiveMode immersion; + + protected UpdateUI updateUI; + protected Dimmer dimmer; + protected LinearLayout entireScreenLayout; + + protected FtcRobotControllerService controllerService; + protected NetworkType networkType; + + protected FtcEventLoop eventLoop; + protected Queue receivedUsbAttachmentNotifications; + + protected WifiMuteStateMachine wifiMuteStateMachine; + protected MotionDetection motionDetection; + + private static boolean permissionsValidated = false; + + private WifiDirectChannelChanger wifiDirectChannelChanger; + + protected class RobotRestarter implements Restarter { + + public void requestRestart() { + requestRobotRestart(); + } + + } + + protected boolean serviceShouldUnbind = false; + protected ServiceConnection connection = new ServiceConnection() { + @Override + public void onServiceConnected(ComponentName name, IBinder service) { + FtcRobotControllerBinder binder = (FtcRobotControllerBinder) service; + onServiceBind(binder.getService()); + } + + @Override + public void onServiceDisconnected(ComponentName name) { + RobotLog.vv(FtcRobotControllerService.TAG, "%s.controllerService=null", TAG); + controllerService = null; + } + }; + + @Override + protected void onNewIntent(Intent intent) { + super.onNewIntent(intent); + + if (UsbManager.ACTION_USB_DEVICE_ATTACHED.equals(intent.getAction())) { + UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); + RobotLog.vv(TAG, "ACTION_USB_DEVICE_ATTACHED: %s", usbDevice.getDeviceName()); + + if (usbDevice != null) { // paranoia + // We might get attachment notifications before the event loop is set up, so + // we hold on to them and pass them along only when we're good and ready. + if (receivedUsbAttachmentNotifications != null) { // *total* paranoia + receivedUsbAttachmentNotifications.add(usbDevice); + passReceivedUsbAttachmentsToEventLoop(); + } + } + } + } + + protected void passReceivedUsbAttachmentsToEventLoop() { + if (this.eventLoop != null) { + for (;;) { + UsbDevice usbDevice = receivedUsbAttachmentNotifications.poll(); + if (usbDevice == null) + break; + this.eventLoop.onUsbDeviceAttached(usbDevice); + } + } + else { + // Paranoia: we don't want the pending list to grow without bound when we don't + // (yet) have an event loop + while (receivedUsbAttachmentNotifications.size() > 100) { + receivedUsbAttachmentNotifications.poll(); + } + } + } + + /** + * There are cases where a permission may be revoked and the system restart will restart the + * FtcRobotControllerActivity, instead of the launch activity. Detect when that happens, and throw + * the device back to the permission validator activity. + */ + protected boolean enforcePermissionValidator() { + if (!permissionsValidated) { + RobotLog.vv(TAG, "Redirecting to permission validator"); + Intent permissionValidatorIntent = new Intent(AppUtil.getDefContext(), PermissionValidatorWrapper.class); + startActivity(permissionValidatorIntent); + finish(); + return true; + } else { + RobotLog.vv(TAG, "Permissions validated already"); + return false; + } + } + + public static void setPermissionsValidated() { + permissionsValidated = true; + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + if (enforcePermissionValidator()) { + return; + } + + RobotLog.onApplicationStart(); // robustify against onCreate() following onDestroy() but using the same app instance, which apparently does happen + RobotLog.vv(TAG, "onCreate()"); + ThemedActivity.appAppThemeToActivity(getTag(), this); // do this way instead of inherit to help AppInventor + + // Oddly, sometimes after a crash & restart the root activity will be something unexpected, like from the before crash? We don't yet understand + RobotLog.vv(TAG, "rootActivity is of class %s", AppUtil.getInstance().getRootActivity().getClass().getSimpleName()); + RobotLog.vv(TAG, "launchActivity is of class %s", FtcRobotControllerWatchdogService.launchActivity()); + Assert.assertTrue(FtcRobotControllerWatchdogService.isLaunchActivity(AppUtil.getInstance().getRootActivity())); + Assert.assertTrue(AppUtil.getInstance().isRobotController()); + + // Quick check: should we pretend we're not here, and so allow the Lynx to operate as + // a stand-alone USB-connected module? + if (LynxConstants.isRevControlHub()) { + if (LynxConstants.shouldDisableAndroidBoard()) { + // Double-sure check that the Lynx Module can operate over USB, etc, then get out of Dodge + RobotLog.vv(TAG, "disabling Dragonboard and exiting robot controller"); + AndroidBoard.getInstance().getAndroidBoardIsPresentPin().setState(false); + AppUtil.getInstance().finishRootActivityAndExitApp(); + } else { + // Double-sure check that we can talk to the DB over the serial TTY + AndroidBoard.getInstance().getAndroidBoardIsPresentPin().setState(true); + } + } + + context = this; + utility = new Utility(this); + + DeviceNameManagerFactory.getInstance().start(deviceNameStartResult); + + PreferenceRemoterRC.getInstance().start(prefRemoterStartResult); + + receivedUsbAttachmentNotifications = new ConcurrentLinkedQueue(); + eventLoop = null; + + setContentView(R.layout.activity_ftc_controller); + + preferencesHelper = new PreferencesHelper(TAG, context); + preferencesHelper.writeBooleanPrefIfDifferent(context.getString(R.string.pref_rc_connected), true); + preferencesHelper.getSharedPreferences().registerOnSharedPreferenceChangeListener(sharedPreferencesListener); + + entireScreenLayout = (LinearLayout) findViewById(R.id.entire_screen); + buttonMenu = (ImageButton) findViewById(R.id.menu_buttons); + buttonMenu.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + PopupMenu popupMenu = new PopupMenu(FtcRobotControllerActivity.this, v); + popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { + @Override + public boolean onMenuItemClick(MenuItem item) { + return onOptionsItemSelected(item); // Delegate to the handler for the hardware menu button + } + }); + popupMenu.inflate(R.menu.ftc_robot_controller); + popupMenu.show(); + } + }); + + updateMonitorLayout(getResources().getConfiguration()); + + BlocksOpMode.setActivityAndWebView(this, (WebView) findViewById(R.id.webViewBlocksRuntime)); + + /* + * Paranoia as the ClassManagerFactory requires EXTERNAL_STORAGE permissions + * and we've seen on the DS where the finish() call above does not short-circuit + * the onCreate() call for the activity and then we crash here because we don't + * have permissions. So... + */ + if (permissionsValidated) { + ClassManager.getInstance().setOnBotJavaClassHelper(new OnBotJavaHelperImpl()); + ClassManagerFactory.registerFilters(); + ClassManagerFactory.processAllClasses(); + } + + cfgFileMgr = new RobotConfigFileManager(this); + + // Clean up 'dirty' status after a possible crash + RobotConfigFile configFile = cfgFileMgr.getActiveConfig(); + if (configFile.isDirty()) { + configFile.markClean(); + cfgFileMgr.setActiveConfig(false, configFile); + } + + textDeviceName = (TextView) findViewById(R.id.textDeviceName); + textNetworkConnectionStatus = (TextView) findViewById(R.id.textNetworkConnectionStatus); + textRobotStatus = (TextView) findViewById(R.id.textRobotStatus); + textOpMode = (TextView) findViewById(R.id.textOpMode); + textErrorMessage = (TextView) findViewById(R.id.textErrorMessage); + textGamepad[0] = (TextView) findViewById(R.id.textGamepad1); + textGamepad[1] = (TextView) findViewById(R.id.textGamepad2); + immersion = new ImmersiveMode(getWindow().getDecorView()); + dimmer = new Dimmer(this); + dimmer.longBright(); + + programmingModeManager = new ProgrammingModeManager(); + programmingModeManager.register(new ProgrammingWebHandlers()); + programmingModeManager.register(new OnBotJavaProgrammingMode()); + programmingModeController = new ProgrammingModeControllerImpl( + this, (TextView) findViewById(R.id.textRemoteProgrammingMode), programmingModeManager); + + updateUI = createUpdateUI(); + callback = createUICallback(updateUI); + + PreferenceManager.setDefaultValues(this, R.xml.app_settings, false); + + WifiManager wifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE); + wifiLock = wifiManager.createWifiLock(WifiManager.WIFI_MODE_FULL_HIGH_PERF, ""); + + hittingMenuButtonBrightensScreen(); + + wifiLock.acquire(); + callback.networkConnectionUpdate(NetworkConnection.NetworkEvent.DISCONNECTED); + readNetworkType(); + ServiceController.startService(FtcRobotControllerWatchdogService.class); + bindToService(); + logPackageVersions(); + logDeviceSerialNumber(); + AndroidBoard.getInstance().logAndroidBoardInfo(); + RobotLog.logDeviceInfo(); + + if (preferencesHelper.readBoolean(getString(R.string.pref_wifi_automute), false)) { + initWifiMute(true); + } + } + + protected UpdateUI createUpdateUI() { + Restarter restarter = new RobotRestarter(); + UpdateUI result = new UpdateUI(this, dimmer); + result.setRestarter(restarter); + result.setTextViews(textNetworkConnectionStatus, textRobotStatus, textGamepad, textOpMode, textErrorMessage, textDeviceName); + return result; + } + + protected UpdateUI.Callback createUICallback(UpdateUI updateUI) { + UpdateUI.Callback result = updateUI.new Callback(); + result.setStateMonitor(new SoundPlayingRobotMonitor()); + return result; + } + + @Override + protected void onStart() { + super.onStart(); + RobotLog.vv(TAG, "onStart()"); + + // If we're start()ing after a stop(), then shut the old robot down so + // we can refresh it with new state (e.g., with new hw configurations) + shutdownRobot(); + + updateUIAndRequestRobotSetup(); + + cfgFileMgr.getActiveConfigAndUpdateUI(); + + // check to see if there is a preferred Wi-Fi to use. + checkPreferredChannel(); + + entireScreenLayout.setOnTouchListener(new View.OnTouchListener() { + @Override + public boolean onTouch(View v, MotionEvent event) { + dimmer.handleDimTimer(); + return false; + } + }); + } + + @Override + protected void onResume() { + super.onResume(); + RobotLog.vv(TAG, "onResume()"); + } + + @Override + protected void onPause() { + super.onPause(); + RobotLog.vv(TAG, "onPause()"); + if (programmingModeController.isActive()) { + programmingModeController.stopProgrammingMode(); + } + } + + @Override + protected void onStop() { + // Note: this gets called even when the configuration editor is launched. That is, it gets + // called surprisingly often. So, we don't actually do much here. + super.onStop(); + RobotLog.vv(TAG, "onStop()"); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + RobotLog.vv(TAG, "onDestroy()"); + + shutdownRobot(); // Ensure the robot is put away to bed + if (callback != null) callback.close(); + + PreferenceRemoterRC.getInstance().stop(prefRemoterStartResult); + DeviceNameManagerFactory.getInstance().stop(deviceNameStartResult); + + unbindFromService(); + // If the app manually (?) is stopped, then we don't need the auto-starting function (?) + ServiceController.stopService(FtcRobotControllerWatchdogService.class); + if (wifiLock != null) wifiLock.release(); + if (preferencesHelper != null) preferencesHelper.getSharedPreferences().unregisterOnSharedPreferenceChangeListener(sharedPreferencesListener); + + RobotLog.cancelWriteLogcatToDisk(); + } + + protected void bindToService() { + readNetworkType(); + Intent intent = new Intent(this, FtcRobotControllerService.class); + intent.putExtra(NetworkConnectionFactory.NETWORK_CONNECTION_TYPE, networkType); + serviceShouldUnbind = bindService(intent, connection, Context.BIND_AUTO_CREATE); + } + + protected void unbindFromService() { + if (serviceShouldUnbind) { + unbindService(connection); + serviceShouldUnbind = false; + } + } + + protected void logPackageVersions() { + RobotLog.logBuildConfig(com.qualcomm.ftcrobotcontroller.BuildConfig.class); + RobotLog.logBuildConfig(com.qualcomm.robotcore.BuildConfig.class); + RobotLog.logBuildConfig(com.qualcomm.hardware.BuildConfig.class); + RobotLog.logBuildConfig(com.qualcomm.ftccommon.BuildConfig.class); + RobotLog.logBuildConfig(com.google.blocks.BuildConfig.class); + RobotLog.logBuildConfig(org.firstinspires.inspection.BuildConfig.class); + } + + protected void logDeviceSerialNumber() { + RobotLog.ii(TAG, "Android device serial number: " + Device.getSerialNumberOrUnknown()); + } + + protected void readNetworkType() { + + // The code here used to defer to the value found in a configuration file + // to configure the network type. If the file was absent, then it initialized + // it with a default. + // + // However, bugs have been reported with that approach (empty config files, specifically). + // Moreover, the non-Wifi-Direct networking is end-of-life, so the simplest and most robust + // (e.g.: no one can screw things up by messing with the contents of the config file) fix is + // to do away with configuration file entirely. + // + // Control hubs are always running the access point model. Everything else, for the time + // being always runs the wifi direct model. + if (Device.isRevControlHub() == true) { + networkType = NetworkType.RCWIRELESSAP; + } else { + networkType = NetworkType.fromString(preferencesHelper.readString(context.getString(R.string.pref_pairing_kind), NetworkType.globalDefaultAsString())); + } + + // update the app_settings + preferencesHelper.writeStringPrefIfDifferent(context.getString(R.string.pref_pairing_kind), networkType.toString()); + } + + @Override + public void onWindowFocusChanged(boolean hasFocus){ + super.onWindowFocusChanged(hasFocus); + // When the window loses focus (e.g., the action overflow is shown), + // cancel any pending hide action. When the window gains focus, + // hide the system UI. + if (hasFocus) { + if (ImmersiveMode.apiOver19()){ + // Immersive flag only works on API 19 and above. + immersion.hideSystemUI(); + } + } else { + immersion.cancelSystemUIHide(); + } + } + + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + getMenuInflater().inflate(R.menu.ftc_robot_controller, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + int id = item.getItemId(); + + if (id == R.id.action_programming_mode) { + if (cfgFileMgr.getActiveConfig().isNoConfig()) { + // Tell the user they must configure the robot before starting programming mode. + // TODO: as we are no longer truly 'modal' this warning should be adapted + AppUtil.getInstance().showToast(UILocation.BOTH, context.getString(R.string.toastConfigureRobotBeforeProgrammingMode)); + } else { + Intent programmingModeIntent = new Intent(AppUtil.getDefContext(), ProgrammingModeActivity.class); + programmingModeIntent.putExtra( + LaunchActivityConstantsList.PROGRAMMING_MODE_ACTIVITY_PROGRAMMING_WEB_HANDLERS, + new LocalByRefIntentExtraHolder(programmingModeManager)); + startActivity(programmingModeIntent); + } + return true; + } else if (id == R.id.action_program_and_manage) { + Intent programmingModeIntent = new Intent(AppUtil.getDefContext(), ProgramAndManageActivity.class); + RobotControllerWebInfo webInfo = programmingModeManager.getWebServer().getConnectionInformation(); + programmingModeIntent.putExtra(LaunchActivityConstantsList.RC_WEB_INFO, webInfo.toJson()); + startActivity(programmingModeIntent); + } else if (id == R.id.action_inspection_mode) { + Intent inspectionModeIntent = new Intent(AppUtil.getDefContext(), RcInspectionActivity.class); + startActivity(inspectionModeIntent); + return true; + } + else if (id == R.id.action_blocks) { + Intent blocksIntent = new Intent(AppUtil.getDefContext(), BlocksActivity.class); + startActivity(blocksIntent); + return true; + } + else if (id == R.id.action_restart_robot) { + dimmer.handleDimTimer(); + AppUtil.getInstance().showToast(UILocation.BOTH, context.getString(R.string.toastRestartingRobot)); + requestRobotRestart(); + return true; + } + else if (id == R.id.action_configure_robot) { + EditParameters parameters = new EditParameters(); + Intent intentConfigure = new Intent(AppUtil.getDefContext(), FtcLoadFileActivity.class); + parameters.putIntent(intentConfigure); + startActivityForResult(intentConfigure, RequestCode.CONFIGURE_ROBOT_CONTROLLER.ordinal()); + } + else if (id == R.id.action_settings) { + // historical: this once erroneously used FTC_CONFIGURE_REQUEST_CODE_ROBOT_CONTROLLER + Intent settingsIntent = new Intent(AppUtil.getDefContext(), FtcRobotControllerSettingsActivity.class); + startActivityForResult(settingsIntent, RequestCode.SETTINGS_ROBOT_CONTROLLER.ordinal()); + return true; + } + else if (id == R.id.action_about) { + Intent intent = new Intent(AppUtil.getDefContext(), FtcAboutActivity.class); + startActivity(intent); + return true; + } + else if (id == R.id.action_exit_app) { + finish(); + return true; + } + + return super.onOptionsItemSelected(item); + } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + // don't destroy assets on screen rotation + updateMonitorLayout(newConfig); + } + + /** + * Updates the orientation of monitorContainer (which contains cameraMonitorView and + * tfodMonitorView) based on the given configuration. Makes the children split the space. + */ + private void updateMonitorLayout(Configuration configuration) { + LinearLayout monitorContainer = (LinearLayout) findViewById(R.id.monitorContainer); + if (configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) { + // When the phone is landscape, lay out the monitor views horizontally. + monitorContainer.setOrientation(LinearLayout.HORIZONTAL); + for (int i = 0; i < monitorContainer.getChildCount(); i++) { + View view = monitorContainer.getChildAt(i); + view.setLayoutParams(new LayoutParams(0, LayoutParams.MATCH_PARENT, 1 /* weight */)); + } + } else { + // When the phone is portrait, lay out the monitor views vertically. + monitorContainer.setOrientation(LinearLayout.VERTICAL); + for (int i = 0; i < monitorContainer.getChildCount(); i++) { + View view = monitorContainer.getChildAt(i); + view.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, 0, 1 /* weight */)); + } + } + monitorContainer.requestLayout(); + } + + @Override + protected void onActivityResult(int request, int result, Intent intent) { + if (request == REQUEST_CONFIG_WIFI_CHANNEL) { + if (result == RESULT_OK) { + AppUtil.getInstance().showToast(UILocation.BOTH, context.getString(R.string.toastWifiConfigurationComplete)); + } + } + // was some historical confusion about launch codes here, so we err safely + if (request == RequestCode.CONFIGURE_ROBOT_CONTROLLER.ordinal() || request == RequestCode.SETTINGS_ROBOT_CONTROLLER.ordinal()) { + // We always do a refresh, whether it was a cancel or an OK, for robustness + cfgFileMgr.getActiveConfigAndUpdateUI(); + } + } + + public void onServiceBind(final FtcRobotControllerService service) { + RobotLog.vv(FtcRobotControllerService.TAG, "%s.controllerService=bound", TAG); + controllerService = service; + updateUI.setControllerService(controllerService); + + updateUIAndRequestRobotSetup(); + programmingModeManager.setState(new FtcRobotControllerServiceState() { + @NonNull + @Override + public WebServer getWebServer() { + return service.getWebServer(); + } + + @Override + public EventLoopManager getEventLoopManager() { + return service.getRobot().eventLoopManager; + } + }); + } + + private void updateUIAndRequestRobotSetup() { + if (controllerService != null) { + callback.networkConnectionUpdate(controllerService.getNetworkConnectionStatus()); + callback.updateRobotStatus(controllerService.getRobotStatus()); + // Only show this first-time toast on headless systems: what we have now on non-headless suffices + requestRobotSetup(LynxConstants.isRevControlHub() + ? new Runnable() { + @Override public void run() { + showRestartRobotCompleteToast(R.string.toastRobotSetupComplete); + } + } + : null); + } + } + + private void requestRobotSetup(@Nullable Runnable runOnComplete) { + if (controllerService == null) return; + + RobotConfigFile file = cfgFileMgr.getActiveConfigAndUpdateUI(); + HardwareFactory hardwareFactory = new HardwareFactory(context); + try { + hardwareFactory.setXmlPullParser(file.getXml()); + } catch (Resources.NotFoundException e) { + file = RobotConfigFile.noConfig(cfgFileMgr); + hardwareFactory.setXmlPullParser(file.getXml()); + cfgFileMgr.setActiveConfigAndUpdateUI(false, file); + } + + OpModeRegister userOpModeRegister = createOpModeRegister(); + eventLoop = new FtcEventLoop(hardwareFactory, userOpModeRegister, callback, this, programmingModeController); + FtcEventLoopIdle idleLoop = new FtcEventLoopIdle(hardwareFactory, userOpModeRegister, callback, this, programmingModeController); + + controllerService.setCallback(callback); + controllerService.setupRobot(eventLoop, idleLoop, runOnComplete); + + passReceivedUsbAttachmentsToEventLoop(); + AndroidBoard.showErrorIfUnknownControlHub(); + } + + protected OpModeRegister createOpModeRegister() { + return new FtcOpModeRegister(); + } + + private void shutdownRobot() { + if (controllerService != null) controllerService.shutdownRobot(); + } + + private void requestRobotRestart() { + AppUtil.getInstance().showToast(UILocation.BOTH, AppUtil.getDefContext().getString(R.string.toastRestartingRobot)); + // + RobotLog.clearGlobalErrorMsg(); + RobotLog.clearGlobalWarningMsg(); + shutdownRobot(); + requestRobotSetup(new Runnable() { + @Override public void run() { + showRestartRobotCompleteToast(R.string.toastRestartRobotComplete); + } + }); + } + + private void showRestartRobotCompleteToast(@StringRes int resid) { + AppUtil.getInstance().showToast(UILocation.BOTH, AppUtil.getDefContext().getString(resid)); + } + + private void checkPreferredChannel() { + // For P2P network, check to see what preferred channel is. + if (networkType == NetworkType.WIFIDIRECT) { + int prefChannel = preferencesHelper.readInt(getString(com.qualcomm.ftccommon.R.string.pref_wifip2p_channel), -1); + if (prefChannel == -1) { + prefChannel = 0; + RobotLog.vv(TAG, "pref_wifip2p_channel: No preferred channel defined. Will use a default value of %d", prefChannel); + } else { + RobotLog.vv(TAG, "pref_wifip2p_channel: Found existing preferred channel (%d).", prefChannel); + } + + // attempt to set the preferred channel. + RobotLog.vv(TAG, "pref_wifip2p_channel: attempting to set preferred channel..."); + wifiDirectChannelChanger = new WifiDirectChannelChanger(); + wifiDirectChannelChanger.changeToChannel(prefChannel); + } + } + + protected void hittingMenuButtonBrightensScreen() { + ActionBar actionBar = getActionBar(); + if (actionBar != null) { + actionBar.addOnMenuVisibilityListener(new ActionBar.OnMenuVisibilityListener() { + @Override + public void onMenuVisibilityChanged(boolean isVisible) { + if (isVisible) { + dimmer.handleDimTimer(); + } + } + }); + } + } + + protected class SharedPreferencesListener implements SharedPreferences.OnSharedPreferenceChangeListener { + @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { + if (key.equals(context.getString(R.string.pref_app_theme))) { + ThemedActivity.restartForAppThemeChange(getTag(), getString(R.string.appThemeChangeRestartNotifyRC)); + } else if (key.equals(context.getString(R.string.pref_wifi_automute))) { + if (preferencesHelper.readBoolean(context.getString(R.string.pref_wifi_automute), false)) { + initWifiMute(true); + } else { + initWifiMute(false); + } + } + } + } + + protected void initWifiMute(boolean enable) { + if (enable) { + wifiMuteStateMachine = new WifiMuteStateMachine(); + wifiMuteStateMachine.initialize(); + wifiMuteStateMachine.start(); + + motionDetection = new MotionDetection(2.0, 10); + motionDetection.startListening(); + motionDetection.registerListener(new MotionDetection.MotionDetectionListener() { + @Override + public void onMotionDetected(double vector) + { + wifiMuteStateMachine.consumeEvent(WifiMuteEvent.USER_ACTIVITY); + } + }); + } else { + wifiMuteStateMachine.stop(); + wifiMuteStateMachine = null; + motionDetection.stopListening(); + motionDetection.purgeListeners(); + motionDetection = null; + } + } + + @Override + public void onUserInteraction() { + if (wifiMuteStateMachine != null) { + wifiMuteStateMachine.consumeEvent(WifiMuteEvent.USER_ACTIVITY); + } + } +} diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/internal/PermissionValidatorWrapper.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/internal/PermissionValidatorWrapper.java new file mode 100644 index 00000000000..1ae71b08ade --- /dev/null +++ b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/internal/PermissionValidatorWrapper.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2018 Craig MacFarlane + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are permitted + * (subject to the limitations in the disclaimer below) provided that the following conditions are + * met: + * + * Redistributions of source code must retain the above copyright notice, this list of conditions + * and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions + * and the following disclaimer in the documentation and/or other materials provided with the + * distribution. + * + * Neither the name of Craig MacFarlane nor the names of its contributors may be used to + * endorse or promote products derived from this software without specific prior written permission. + * + * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS + * SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.firstinspires.ftc.robotcontroller.internal; + +import android.Manifest; +import android.os.Bundle; + +import com.qualcomm.ftcrobotcontroller.R; + +import org.firstinspires.ftc.robotcore.internal.system.Misc; +import org.firstinspires.ftc.robotcore.internal.system.PermissionValidatorActivity; + +import java.util.ArrayList; +import java.util.List; + +public class PermissionValidatorWrapper extends PermissionValidatorActivity { + + private final String TAG = "PermissionValidatorWrapper"; + + /* + * The list of dangerous permissions the robot controller needs. + */ + protected List robotControllerPermissions = new ArrayList() {{ + add(Manifest.permission.WRITE_EXTERNAL_STORAGE); + add(Manifest.permission.READ_EXTERNAL_STORAGE); + add(Manifest.permission.CAMERA); + add(Manifest.permission.ACCESS_COARSE_LOCATION); + }}; + + private final static Class startApplication = FtcRobotControllerActivity.class; + + public String mapPermissionToExplanation(final String permission) { + if (permission.equals(Manifest.permission.WRITE_EXTERNAL_STORAGE)) { + return Misc.formatForUser(R.string.permRcWriteExternalStorageExplain); + } else if (permission.equals(Manifest.permission.READ_EXTERNAL_STORAGE)) { + return Misc.formatForUser(R.string.permRcReadExternalStorageExplain); + } else if (permission.equals(Manifest.permission.CAMERA)) { + return Misc.formatForUser(R.string.permRcCameraExplain); + } else if (permission.equals(Manifest.permission.ACCESS_COARSE_LOCATION)) { + return Misc.formatForUser(R.string.permAccessCoarseLocationExplain); + } + return Misc.formatForUser(R.string.permGenericExplain); + } + + @Override + protected void onCreate(Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + + permissions = robotControllerPermissions; + } + + protected Class onStartApplication() + { + FtcRobotControllerActivity.setPermissionsValidated(); + return startApplication; + } +} diff --git a/FtcRobotController/src/main/res/drawable-hdpi/ic_launcher.png b/FtcRobotController/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 00000000000..eebbc09c826 Binary files /dev/null and b/FtcRobotController/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/FtcRobotController/src/main/res/drawable-mdpi/ic_launcher.png b/FtcRobotController/src/main/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 00000000000..078253c307b Binary files /dev/null and b/FtcRobotController/src/main/res/drawable-mdpi/ic_launcher.png differ diff --git a/FtcRobotController/src/main/res/drawable-xhdpi/ic_launcher.png b/FtcRobotController/src/main/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 00000000000..af143c7c65a Binary files /dev/null and b/FtcRobotController/src/main/res/drawable-xhdpi/ic_launcher.png differ diff --git a/FtcRobotController/src/main/res/drawable-xhdpi/icon_menu.png b/FtcRobotController/src/main/res/drawable-xhdpi/icon_menu.png new file mode 100644 index 00000000000..6b9e997c562 Binary files /dev/null and b/FtcRobotController/src/main/res/drawable-xhdpi/icon_menu.png differ diff --git a/FtcRobotController/src/main/res/drawable-xhdpi/icon_robotcontroller.png b/FtcRobotController/src/main/res/drawable-xhdpi/icon_robotcontroller.png new file mode 100644 index 00000000000..022552f409c Binary files /dev/null and b/FtcRobotController/src/main/res/drawable-xhdpi/icon_robotcontroller.png differ diff --git a/FtcRobotController/src/main/res/drawable-xxhdpi/ic_launcher.png b/FtcRobotController/src/main/res/drawable-xxhdpi/ic_launcher.png new file mode 100644 index 00000000000..aeafa54b7ed Binary files /dev/null and b/FtcRobotController/src/main/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/FtcRobotController/src/main/res/layout/activity_ftc_controller.xml b/FtcRobotController/src/main/res/layout/activity_ftc_controller.xml new file mode 100644 index 00000000000..c74e2dee2b3 --- /dev/null +++ b/FtcRobotController/src/main/res/layout/activity_ftc_controller.xml @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FtcRobotController/src/main/res/menu/ftc_robot_controller.xml b/FtcRobotController/src/main/res/menu/ftc_robot_controller.xml new file mode 100644 index 00000000000..0d325c77ddd --- /dev/null +++ b/FtcRobotController/src/main/res/menu/ftc_robot_controller.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/FtcRobotController/src/main/res/raw/gold.wav b/FtcRobotController/src/main/res/raw/gold.wav new file mode 100644 index 00000000000..3a7baf88159 Binary files /dev/null and b/FtcRobotController/src/main/res/raw/gold.wav differ diff --git a/FtcRobotController/src/main/res/raw/silver.wav b/FtcRobotController/src/main/res/raw/silver.wav new file mode 100644 index 00000000000..25918a72ae5 Binary files /dev/null and b/FtcRobotController/src/main/res/raw/silver.wav differ diff --git a/FtcRobotController/src/main/res/values-sw600dp/dimens.xml b/FtcRobotController/src/main/res/values-sw600dp/dimens.xml new file mode 100644 index 00000000000..656eb60511e --- /dev/null +++ b/FtcRobotController/src/main/res/values-sw600dp/dimens.xml @@ -0,0 +1,41 @@ + + + + + + + diff --git a/FtcRobotController/src/main/res/values-sw720dp-land/dimens.xml b/FtcRobotController/src/main/res/values-sw720dp-land/dimens.xml new file mode 100644 index 00000000000..db2396cb5a1 --- /dev/null +++ b/FtcRobotController/src/main/res/values-sw720dp-land/dimens.xml @@ -0,0 +1,42 @@ + + + + + + 128dp + + diff --git a/FtcRobotController/src/main/res/values-w820dp/dimens.xml b/FtcRobotController/src/main/res/values-w820dp/dimens.xml new file mode 100644 index 00000000000..35fcf593bf9 --- /dev/null +++ b/FtcRobotController/src/main/res/values-w820dp/dimens.xml @@ -0,0 +1,39 @@ + + + + + 64dp + diff --git a/FtcRobotController/src/main/res/values/dimens.xml b/FtcRobotController/src/main/res/values/dimens.xml new file mode 100644 index 00000000000..63f1babc2f2 --- /dev/null +++ b/FtcRobotController/src/main/res/values/dimens.xml @@ -0,0 +1,40 @@ + + + + + + 16dp + 5dp + + \ No newline at end of file diff --git a/FtcRobotController/src/main/res/values/strings.xml b/FtcRobotController/src/main/res/values/strings.xml new file mode 100644 index 00000000000..d1485319c4c --- /dev/null +++ b/FtcRobotController/src/main/res/values/strings.xml @@ -0,0 +1,71 @@ + + + + + + + FTC Robot Controller + + + Self Inspect + Programming Mode + Program & Manage + Blocks + Settings + Restart Robot + Configure Robot + About + Exit + + + Configuration Complete + Restarting Robot + You must Configure Robot before starting Programming Mode. + + + + @style/AppThemeRedRC + @style/AppThemeGreenRC + @style/AppThemeBlueRC + @style/AppThemePurpleRC + @style/AppThemeOrangeRC + @style/AppThemeTealRC + + + @string/packageNameRobotController + + diff --git a/FtcRobotController/src/main/res/values/styles.xml b/FtcRobotController/src/main/res/values/styles.xml new file mode 100644 index 00000000000..07689c03896 --- /dev/null +++ b/FtcRobotController/src/main/res/values/styles.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FtcRobotController/src/main/res/xml/app_settings.xml b/FtcRobotController/src/main/res/xml/app_settings.xml new file mode 100644 index 00000000000..58d3aa9c70a --- /dev/null +++ b/FtcRobotController/src/main/res/xml/app_settings.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/FtcRobotController/src/main/res/xml/device_filter.xml b/FtcRobotController/src/main/res/xml/device_filter.xml new file mode 100644 index 00000000000..7677dad219d --- /dev/null +++ b/FtcRobotController/src/main/res/xml/device_filter.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + diff --git a/README.md b/README.md new file mode 100644 index 00000000000..832a2d396e8 --- /dev/null +++ b/README.md @@ -0,0 +1,795 @@ +## NOTICE + +This repository contains v5.0 of the FTC SDK. No further versions will pushed to https://github.com/ftctechnh/ftc_app. + +v5.0 has also been posted to https://github.com/FIRST-Tech-Challenge/SkyStone where all further releases will be posted for the 2019/20 season. + +Why are we doing this? Git/GitHub is not designed to store large binary blobs. As such the ftc_app repository has grown to over 1GB. Not only does this violate GitHub's usage policies, but puts an undue burden on users of the repository when they download it. For the foreseeable future a season specific version of the repository will be hosted at the url above. Different approaches to prevent the size problem from recurring are being evaluated by the FTC Technology Team. We realize that this creates a problem with teams that have maintained a history of software within the ftc_app workspace. We appreciate your patience and understanding as work to migrate to a permanent solution. + +## Welcome! +This GitHub repository contains the source code that is used to build an Android app to control a *FIRST* Tech Challenge competition robot. To use this SDK, download/clone the entire project to your local computer. + +If you are new to the *FIRST* Tech Challenge software and control system, you should visit the online wiki to learn how to install, configure, and use the software and control system: + +      https://github.com/ftctechnh/ftc_app/wiki + +Note that the wiki is an "evergreen" document that is constantly being updated and edited. It contains the most current information about the *FIRST* Tech Challenge software and control system. + +## Downloading the Project +It is important to note that this repository is large and can take a long time and use a lot of space to download. If you would like to save time and space, there are some options that you can choose to download only the most current version of the Android project folder: + +* If you are a git user, *FIRST* recommends that you use the --depth command line argument to only clone the most current version of the repository: + +

                git clone --depth=1 https://github.com/ftctechnh/ftc_app.git

    + +* Or, if you prefer, you can use the "Download Zip" button available through the main repository page. Downloading the project as a .ZIP file will keep the size of the download manageable. + +* You can also download the project folder (as a .zip or .tar.gz archive file) from the Downloads subsection of the Releases page for this repository. + +Once you have downloaded and uncompressed (if needed) your folder, you can use Android Studio to import the folder ("Import project (Eclipse ADT, Gradle, etc.)"). + +## Getting Help +### User Documentation and Tutorials +*FIRST* maintains an online wiki with information and tutorials on how to use the *FIRST* Tech Challenge software and robot control system. You can access the wiki at the following address: + +      https://github.com/ftctechnh/ftc_app/wiki + +### Javadoc Reference Material +The Javadoc reference documentation for the FTC SDK is now available online. Visit the following URL to view the FTC SDK documentation as a live website: + +      http://ftctechnh.github.io/ftc_app/doc/javadoc/index.html + +Documentation for the FTC SDK is also included with this repository. There is a subfolder called "doc" which contains several subfolders: + + * The folder "apk" contains the .apk files for the FTC Driver Station and FTC Robot Controller apps. + * The folder "javadoc" contains the JavaDoc user documentation for the FTC SDK. + +### Online User Forum +For technical questions regarding the SDK, please visit the FTC Technology forum: + +      http://ftcforum.usfirst.org/forumdisplay.php?156-FTC-Technology + +************************************************************************************** +# Release Information +************************************************************************************** + +Version 5.0 (built on 19.06.14) + + * Support for the REV Robotics Control Hub. + * Adds a Java preview pane to the Blocks editor. + * Adds a new offline export feature to the Blocks editor. + * Display wifi channel in Network circle on Driver Station. + * Adds calibration for Logitech C270 + * Updates build tooling and target SDK. + * Compliance with Google's permissions infrastructure (Required after build tooling update). + * Keep Alives to mitigate the Motorola wifi scanning problem. Telemetry substitute no longer necessary. + * Improves Vuforia error reporting. + * Fixes ftctechnh/ftc_app issues 621, 713. + * Miscellaneous bug fixes and improvements. + +************************************************************************************** +# Release Information +************************************************************************************** + +Version 4.3 (built on 18.10.31) + * Includes missing TensorFlow-related libraries and files. + +************************************************************************************** +# Release Information +************************************************************************************** + +Version 4.2 (built on 18.10.30) + * Includes fix to avoid deadlock situation with WatchdogMonitor which could result in USB communication errors. + - Comm error appeared to require that user disconnect USB cable and restart the Robot Controller app to recover. + - robotControllerLog.txt would have error messages that included the words "E RobotCore: lynx xmit lock: #### abandoning lock:" + * Includes fix to correctly list the parent module address for a REV Robotics Expansion Hub in a configuration (.xml) file. + - Bug in versions 4.0 and 4.1 would incorrect list the address module for a parent REV Robotics device as "1". + - If the parent module had a higher address value than the daisy-chained module, then this bug would prevent the Robot Controller from communicating with the downstream Expansion Hub. + * Added requirement for ACCESS_COARSE_LOCATION to allow a Driver Station running Android Oreo to scan for Wi-Fi Direct devices. + * Added google() repo to build.gradle because aapt2 must be downloaded from the google() repository beginning with version 3.2 of the Android Gradle Plugin. + - Important Note: Android Studio users will need to be connected to the Internet the first time build the ftc_app project. + - Internet connectivity is required for the first build so the appropriate files can be downloaded from the Google repository. + - Users should not need to be connected to the Internet for subsequent builds. + - This should also fix buid issue where Android Studio would complain that it "Could not find com.android.tools.lint:lint-gradle:26.1.4" (or similar). + * Added support for REV Spark Mini motor controller as part of the configuration menu for a servo/PWM port on the REV Expansion Hub. + * Provide examples for playing audio files in an Op Mode. + * Block Development Tool Changes + - Includes a fix for a problem with the Velocity blocks that were reported in the FTC Technology forum (Blocks Programming subforum). + - Change the "Save completed successfully." message to a white color so it will contrast with a green background. + - Fixed the "Download image" feature so it will work if there are text blocks in the op mode. + * Introduce support for Google's TensorFlow Lite technology for object detetion for 2018-2019 game. + - TensorFlow lite can recognize Gold Mineral and Silver Mineral from 2018-2019 game. + - Example Java and Block op modes are included to show how to determine the relative position of the gold block (left, center, right). + +************************************************************************************** +# Release Information +************************************************************************************** + +Version 4.1 (released on 18.09.24) + +Changes include: + * Fix to prevent crash when deprecated configuration annotations are used. + * Change to allow FTC Robot Controller APK to be auto-updated using FIRST Global Control Hub update scripts. + * Removed samples for non supported / non legal hardware. + * Improvements to Telemetry.addData block with "text" socket. + * Updated Blocks sample op mode list to include Rover Ruckus Vuforia example. + * Update SDK library version number. + +************************************************************************************** +# Release Information +************************************************************************************** + +Version 4.0 (released on 18.09.12) + +Changes include: + * Initial support for UVC compatible cameras + - If UVC camera has a unique serial number, RC will detect and enumerate by serial number. + - If UVC camera lacks a unique serial number, RC will only support one camera of that type connected. + - Calibration settings for a few cameras are included (see TeamCode/src/main/res/xml/teamwebcamcalibrations.xml for details). + - User can upload calibration files from Program and Manage web interface. + - UVC cameras seem to draw a fair amount of electrical current from the USB bus. + + This does not appear to present any problems for the REV Robotics Control Hub. + + This does seem to create stability problems when using some cameras with an Android phone-based Robot Controller. + + FTC Tech Team is investigating options to mitigate this issue with the phone-based Robot Controllers. + - Updated sample Vuforia Navigation and VuMark Op Modes to demonstrate how to use an internal phone-based camera and an external UVC webcam. + + * Support for improved motor control. + - REV Robotics Expansion Hub firmware 1.8 and greater will support a feed forward mechanism for closed loop motor control. + - FTC SDK has been modified to support PIDF coefficients (proportional, integral, derivative, and feed forward). + - FTC Blocks development tool modified to include PIDF programming blocks. + - Deprecated older PID-related methods and variables. + - REV's 1.8.x PIDF-related changes provide a more linear and accurate way to control a motor. + + * Wireless + - Added 5GHz support for wireless channel changing for those devices that support it. + + Tested with Moto G5 and E4 phones. + + Also tested with other (currently non-approved) phones such as Samsung Galaxy S8. + +* Improved Expansion Hub firmware update support in Robot Controller app + - Changes to make the system more robust during the firmware update process (when performed through Robot Controller app). + - User no longer has to disconnect a downstream daisy-chained Expansion Hub when updating an Expansion Hub's firmware. + + If user is updating an Expansion Hub's firmware through a USB connection, he/she does not have to disconnect RS485 connection to other Expansion Hubs. + + The user still must use a USB connection to update an Expansion Hub's firmware. + + The user cannot update the Expansion Hub firmware for a downstream device that is daisy chained through an RS485 connection. + - If an Expansion Hub accidentally gets "bricked" the Robot Controller app is now more likely to recognize the Hub when it scans the USB bus. + + Robot Controller app should be able to detect an Expansion Hub, even if it accidentally was bricked in a previous update attempt. + + Robot Controller app should be able to install the firmware onto the Hub, even if if accidentally was bricked in a previous update attempt. + + * Resiliency + - FTC software can detect and enable an FTDI reset feature that is available with REV Robotics v1.8 Expansion Hub firmware and greater. + + When enabled, the Expansion Hub can detect if it hasn't communicated with the Robot Controller over the FTDI (USB) connection. + + If the Hub hasn't heard from the Robot Controller in a while, it will reset the FTDI connection. + + This action helps system recover from some ESD-induced disruptions. + - Various fixes to improve reliability of FTC software. + + * Blocks + - Fixed errors with string and list indices in blocks export to java. + - Support for USB connected UVC webcams. + - Refactored optimized Blocks Vuforia code to support Rover Ruckus image targets. + - Added programming blocks to support PIDF (proportional, integral, derivative and feed forward) motor control. + - Added formatting options (under Telemetry and Miscellaneous categories) so user can set how many decimal places to display a numerical value. + - Support to play audio files (which are uploaded through Blocks web interface) on Driver Station in addition to the Robot Controller. + - Fixed bug with Download Image of Blocks feature. + - Support for REV Robotics Blinkin LED Controller. + - Support for REV Robotics 2m Distance Sensor. + - Added support for a REV Touch Sensor (no longer have to configure as a generic digital device). + - Added blocks for DcMotorEx methods. + + These are enhanced methods that you can use when supported by the motor controller hardware. + + The REV Robotics Expansion Hub supports these enhanced methods. + + Enhanced methods include methods to get/set motor velocity (in encoder pulses per second), get/set PIDF coefficients, etc.. + + * Modest Improvements in Logging + - Decrease frequency of battery checker voltage statements. + - Removed non-FTC related log statements (wherever possible). + - Introduced a "Match Logging" feature. + + Under "Settings" a user can enable/disable this feature (it's disabled by default). + + If enabled, user provides a "Match Number" through the Driver Station user interface (top of the screen). + * The Match Number is used to create a log file specifically with log statements from that particular Op Mode run. + * Match log files are stored in /sdcard/FIRST/matlogs on the Robot Controller. + * Once an op mode run is complete, the Match Number is cleared. + * This is a convenient way to create a separate match log with statements only related to a specific op mode run. + + * New Devices + - Support for REV Robotics Blinkin LED Controller. + - Support for REV Robotics 2m Distance Sensor. + - Added configuration option for REV 20:1 HD Hex Motor. + - Added support for a REV Touch Sensor (no longer have to configure as a generic digital device). + + * Miscellaneous + - Fixed some errors in the definitions for acceleration and velocity in our javadoc documentation. + - Added ability to play audio files on Driver Station + - When user is configuring an Expansion Hub, the LED on the Expansion Hub will change blink pattern (purple-cyan) to indicate which Hub is currently being configured. + - Renamed I2cSensorType to I2cDeviceType. + - Added an external sample Op Mode that demonstrates localization using 2018-2019 (Rover Ruckus presented by QualComm) Vuforia targets. + - Added an external sample Op Mode that demonstrates how to use the REV Robotics 2m Laser Distance Sensor. + - Added an external sample Op Mode that demonstrates how to use the REV Robotics Blinkin LED Controller. + - Re-categorized external Java sample Op Modes to "TeleOp" instead of "Autonomous". + +Known issues: + * Initial support for UVC compatible cameras + - UVC cameras seem to draw significant amount of current from the USB bus. + + This does not appear to present any problems for the REV Robotics Control Hub. + + This does seem to create stability problems when using some cameras with an Android phone-based Robot Controller. + + FTC Tech Team is investigating options to mitigate this issue with the phone-based Robot Controllers. + - There might be a possible deadlock which causes the RC to become unresponsive when using a UVC webcam with a Nougat Android Robot Controller. + + * Wireless + - When user selects a wireless channel, this channel does not necessarily persist if the phone is power cycled. + + Tech Team is hoping to eventually address this issue in a future release. + + Issue has been present since apps were introduced (i.e., it is not new with the v4.0 release). + - Wireless channel is not currently displayed for WiFi Direct connections. + + * Miscellaneous + - The blink indication feature that shows which Expansion Hub is currently being configured does not work for a newly created configuration file. + + User has to first save a newly created configuration file and then close and re-edit the file in order for blink indicator to work. + + +************************************************************************************** +# Release Information +************************************************************************************** + +Version 3.6 (built on 17.12.18) + +Changes include: + * Blocks Changes + - Uses updated Google Blockly software to allow users to edit their op modes on Apple iOS devices (including iPad and iPhone). + - Improvement in Blocks tool to handle corrupt op mode files. + - Autonomous op modes should no longer get switched back to tele-op after re-opening them to be edited. + - The system can now detect type mismatches during runtime and alert the user with a message on the Driver Station. + * Updated javadoc documentation for setPower() method to reflect correct range of values (-1 to +1). + * Modified VuforiaLocalizerImpl to allow for user rendering of frames + - Added a user-overrideable onRenderFrame() method which gets called by the class's renderFrame() method. + +************************************************************************************** +# Release Information +************************************************************************************** + +Version 3.5 (built on 17.10.30) + +Changes with version 3.5 include: + * Introduced a fix to prevent random op mode stops, which can occur after the Robot Controller app has been paused and then resumed (for example, when a user temporarily turns off the display of the Robot Controller phone, and then turns the screen back on). + * Introduced a fix to prevent random op mode stops, which were previously caused by random peer disconnect events on the Driver Station. + * Fixes issue where log files would be closed on pause of the RC or DS, but not re-opened upon resume. + * Fixes issue with battery handler (voltage) start/stop race. + * Fixes issue where Android Studio generated op modes would disappear from available list in certain situations. + * Fixes problem where OnBot Java would not build on REV Robotics Control Hub. + * Fixes problem where OnBot Java would not build if the date and time on the Robot Controller device was "rewound" (set to an earlier date/time). + * Improved error message on OnBot Java that occurs when renaming a file fails. + * Removed unneeded resources from android.jar binaries used by OnBot Java to reduce final size of Robot Controller app. + * Added MR_ANALOG_TOUCH_SENSOR block to Blocks Programming Tool. + +************************************************************************************** +# Release Information +************************************************************************************** + +Version 3.4 (built on 17.09.06) + +Changes with version 3.4 include: + * Added telemetry.update() statement for BlankLinearOpMode template. + * Renamed sample Block op modes to be more consistent with Java samples. + * Added some additional sample Block op modes. + * Reworded OnBot Java readme slightly. + +************************************************************************************** + +Version 3.3 (built on 17.09.04) + +This version of the software includes improves for the FTC Blocks Programming Tool and the OnBot Java Programming Tool. + +Changes with verion 3.3 include: + * Android Studio ftc_app project has been updated to use Gradle Plugin 2.3.3. + * Android Studio ftc_app project is already using gradle 3.5 distribution. + * Robot Controller log has been renamed to /sdcard/RobotControllerLog.txt (note that this change was actually introduced w/ v3.2). + * Improvements in I2C reliability. + * Optimized I2C read for REV Expansion Hub, with v1.7 firmware or greater. + * Updated all external/samples (available through OnBot and in Android project folder). + * Vuforia + - Added support for VuMarks that will be used for the 2017-2018 season game. + * Blocks + - Update to latest Google Blockly release. + - Sample op modes can be selected as a template when creating new op mode. + - Fixed bug where the blocks would disappear temporarily when mouse button is held down. + - Added blocks for Range.clip and Range.scale. + - User can now disable/enable Block op modes. + - Fix to prevent occasional Blocks deadlock. + * OnBot Java + - Significant improvements with autocomplete function for OnBot Java editor. + - Sample op modes can be selected as a template when creating new op mode. + - Fixes and changes to complete hardware setup feature. + - Updated (and more useful) onBot welcome message. + +Known issues: + * Android Studio + - After updating to the new v3.3 Android Studio project folder, if you get error messages indicating "InvalidVirtualFileAccessException" then you might need to do a File->Invalidate Caches / Restart to clear the error. + * OnBot Java + - Sometimes when you push the build button to build all op modes, the RC returns an error message that the build failed. If you press the build button a second time, the build typically suceeds. + +************************************************************************************** + +Version 3.2 (built on 17.08.02) + +This version of the software introduces the "OnBot Java" Development Tool. Similar to the FTC Blocks Development Tool, the FTC OnBot Java Development Tool allows a user to create, edit and build op modes dynamically using only a Javascript-enabled web browser. + +The OnBot Java Development Tool is an integrated development environment (IDE) that is served up by the Robot Controller. Op modes are created and edited using a Javascript-enabled browser (Google Chromse is recommended). Op modes are saved on the Robot Controller Android device directly. + +The OnBot Java Development Tool provides a Java programming environment that does NOT need Android Studio. + + + +Changes with version 3.2 include: + * Enhanced web-based development tools + - Introduction of OnBot Java Development Tool. + - Web-based programming and management features are "always on" (user no longer needs to put Robot Controller into programming mode). + - Web-based management interface (where user can change Robot Controller name and also easily download Robot Controller log file). + - OnBot Java, Blocks and Management features available from web based interface. + +* Blocks Programming Development Tool: + - Changed "LynxI2cColorRangeSensor" block to "REV Color/range sensor" block. + - Fixed tooltip for ColorSensor.isLightOn block. + Added blocks for ColorSensor.getNormalizedColors and LynxI2cColorRangeSensor.getNormalizedColors. + +* Added example op modes for digital touch sensor and REV Robotics Color Distance sensor. +* User selectable color themes. +* Includes many minor enhancements and fixes (too numerous to list). + +Known issues: +* Auto complete function is incomplete and does not support the following (for now): + - Access via *this* keyword + - Access via *super* keyword + - Members of the super cloass, not overridden by the class + - Any methods provided in the current class + - Inner classes + - Can't handle casted objects + - Any objects coming from an parenthetically enclosed expression + +************************************************************************************** + +Version 3.10 (built on 17.05.09) + +This version of the software provides support for the REV Robotics Expansion Hub. This version also includes improvements in the USB communication layer in an effort to enhance system resiliency. If you were using a 2.x version of the software previously, updating to version 3.1 requires that you also update your Driver Station software in addition to updating the Robot Controller software. + +Also note that in version 3.10 software, the setMaxSpeed and getMaxSpeed methods are no longer available (not deprecated, they have been removed from the SDK). Also note that the the new 3.x software incorporates motor profiles that a user can select as he/she configures the robot. + +Changes include: + * Blocks changes + - Added VuforiaTrackableDefaultListener.getPose and Vuforia.trackPose blocks. + - Added optimized blocks support for Vuforia extended tracking. + - Added atan2 block to the math category. + - Added useCompetitionFieldTargetLocations parameter to Vuforia.initialize block. If set to false, the target locations are placed at (0,0,0) with target orientation as specified in https://github.com/gearsincorg/FTCVuforiaDemo/blob/master/Robot_Navigation.java tutorial op mode. + * Incorporates additional improvements to USB comm layer to improve system resiliency (to recover from a greater number of communication disruptions). + +************************************************************************************** + +Additional Notes Regarding Version 3.00 (built on 17.04.13) + +In addition to the release changes listed below (see section labeled "Version 3.00 (built on 17.04.013)"), version 3.00 has the following important changes: + +1. Version 3.00 software uses a new version of the FTC Robocol (robot protocol). If you upgrade to v3.0 on the Robot Controller and/or Android Studio side, you must also upgrade the Driver Station software to match the new Robocol. +2. Version 3.00 software removes the setMaxSpeed and getMaxSpeed methods from the DcMotor class. If you have an op mode that formerly used these methods, you will need to remove the references/calls to these methods. Instead, v3.0 provides the max speed information through the use of motor profiles that are selected by the user during robot configuration. +3. Version 3.00 software currently does not have a mechanism to disable extra i2c sensors. We hope to re-introduce this function with a release in the near future. + +************************************************************************************** + +Version 3.00 (built on 17.04.13) + +*** Use this version of the software at YOUR OWN RISK!!! *** + +This software is being released as an "alpha" version. Use this version at your own risk! + +This pre-release software contains SIGNIFICANT changes, including changes to the Wi-Fi Direct pairing mechanism, rewrites of the I2C sensor classes, changes to the USB/FTDI layer, and the introduction of support for the REV Robotics Expansion Hub and the REV Robotics color-range-light sensor. These changes were implemented to improve the reliability and resiliency of the FTC control system. + +Please note, however, that version 3.00 is considered "alpha" code. This code is being released so that the FIRST community will have an opportunity to test the new REV Expansion Hub electronics module when it becomes available in May. The developers do not recommend using this code for critical applications (i.e., competition use). + +*** Use this version of the software at YOUR OWN RISK!!! *** + +Changes include: + * Major rework of sensor-related infrastructure. Includes rewriting sensor classes to implement synchronous I2C communication. + * Fix to reset Autonomous timer back to 30 seconds. + * Implementation of specific motor profiles for approved 12V motors (includes Tetrix, AndyMark, Matrix and REV models). + * Modest improvements to enhance Wi-Fi P2P pairing. + * Fixes telemetry log addition race. + * Publishes all the sources (not just a select few). + * Includes Block programming improvements + - Addition of optimized Vuforia blocks. + - Auto scrollbar to projects and sounds pages. + - Fixed blocks paste bug. + - Blocks execute after while-opModeIsActive loop (to allow for cleanup before exiting op mode). + - Added gyro integratedZValue block. + - Fixes bug with projects page for Firefox browser. + - Added IsSpeaking block to AndroidTextToSpeech. + * Implements support for the REV Robotics Expansion Hub + - Implements support for integral REV IMU (physically installed on I2C bus 0, uses same Bosch BNO055 9 axis absolute orientation sensor as Adafruit 9DOF abs orientation sensor). - Implements support for REV color/range/light sensor. + - Provides support to update Expansion Hub firmware through FTC SDK. + - Detects REV firmware version and records in log file. + - Includes support for REV Control Hub (note that the REV Control Hub is not yet approved for FTC use). + - Implements FTC Blocks programming support for REV Expansion Hub and sensor hardware. + - Detects and alerts when I2C device disconnect. + +************************************************************************************** + +Version 2.62 (built on 17.01.07) + * Added null pointer check before calling modeToByte() in finishModeSwitchIfNecessary method for ModernRoboticsUsbDcMotorController class. + * Changes to enhance Modern Robotics USB protocol robustness. + +************************************************************************************** + +Version 2.61 (released on 16.12.19) + * Blocks Programming mode changes: + - Fix to correct issue when an exception was thrown because an OpticalDistanceSensor object appears twice in the hardware map (the second time as a LightSensor). + +************************************************************************************** + +Version 2.6 (released on 16.12.16) + * Fixes for Gyro class: + - Improve (decrease) sensor refresh latency. + - fix isCalibrating issues. + * Blocks Programming mode changes: + - Blocks now ignores a device in the configuration xml if the name is empty. Other devices work in configuration work fine. + +************************************************************************************** + +Version 2.5 (internal release on released on 16.12.13) + * Blocks Programming mode changes: + - Added blocks support for AdafruitBNO055IMU. + - Added Download Op Mode button to FtcBocks.html. + - Added support for copying blocks in one OpMode and pasting them in an other OpMode. The clipboard content is stored on the phone, so the programming mode server must be running. + - Modified Utilities section of the toolbox. + - In Programming Mode, display information about the active connections. + - Fixed paste location when workspace has been scrolled. + - Added blocks support for the android Accelerometer. + - Fixed issue where Blocks Upload Op Mode truncated name at first dot. + - Added blocks support for Android SoundPool. + - Added type safety to blocks for Acceleration. + - Added type safety to blocks for AdafruitBNO055IMU.Parameters. + - Added type safety to blocks for AnalogInput. + - Added type safety to blocks for AngularVelocity. + - Added type safety to blocks for Color. + - Added type safety to blocks for ColorSensor. + - Added type safety to blocks for CompassSensor. + - Added type safety to blocks for CRServo. + - Added type safety to blocks for DigitalChannel. + - Added type safety to blocks for ElapsedTime. + - Added type safety to blocks for Gamepad. + - Added type safety to blocks for GyroSensor. + - Added type safety to blocks for IrSeekerSensor. + - Added type safety to blocks for LED. + - Added type safety to blocks for LightSensor. + - Added type safety to blocks for LinearOpMode. + - Added type safety to blocks for MagneticFlux. + - Added type safety to blocks for MatrixF. + - Added type safety to blocks for MrI2cCompassSensor. + - Added type safety to blocks for MrI2cRangeSensor. + - Added type safety to blocks for OpticalDistanceSensor. + - Added type safety to blocks for Orientation. + - Added type safety to blocks for Position. + - Added type safety to blocks for Quaternion. + - Added type safety to blocks for Servo. + - Added type safety to blocks for ServoController. + - Added type safety to blocks for Telemetry. + - Added type safety to blocks for Temperature. + - Added type safety to blocks for TouchSensor. + - Added type safety to blocks for UltrasonicSensor. + - Added type safety to blocks for VectorF. + - Added type safety to blocks for Velocity. + - Added type safety to blocks for VoltageSensor. + - Added type safety to blocks for VuforiaLocalizer.Parameters. + - Added type safety to blocks for VuforiaTrackable. + - Added type safety to blocks for VuforiaTrackables. + - Added type safety to blocks for enums in AdafruitBNO055IMU.Parameters. + - Added type safety to blocks for AndroidAccelerometer, AndroidGyroscope, AndroidOrientation, and AndroidTextToSpeech. + +************************************************************************************** + +Version 2.4 (released on 16.11.13) + * Fix to avoid crashing for nonexistent resources. + * Blocks Programming mode changes: + - Added blocks to support OpenGLMatrix, MatrixF, and VectorF. + - Added blocks to support AngleUnit, AxesOrder, AxesReference, CameraDirection, CameraMonitorFeedback, DistanceUnit, and TempUnit. + - Added blocks to support Acceleration. + - Added blocks to support LinearOpMode.getRuntime. + - Added blocks to support MagneticFlux and Position. + - Fixed typos. + - Made blocks for ElapsedTime more consistent with other objects. + - Added blocks to support Quaternion, Velocity, Orientation, AngularVelocity. + - Added blocks to support VuforiaTrackables, VuforiaTrackable, VuforiaLocalizer, VuforiaTrackableDefaultListener. + - Fixed a few blocks. + - Added type checking to new blocks. + - Updated to latest blockly. + - Added default variable blocks to navigation and matrix blocks. + - Fixed toolbox entry for openGLMatrix_rotation_withAxesArgs. + - When user downloads Blocks-generated op mode, only the .blk file is downloaded. + - When user uploads Blocks-generated op mode (.blk file), Javascript code is auto generated. + - Added DbgLog support. + - Added logging when a blocks file is read/written. + - Fixed bug to properly render blocks even if missing devices from configuration file. + - Added support for additional characters (not just alphanumeric) for the block file names (for download and upload). + - Added support for OpMode flavor (“Autonomous” or “TeleOp”) and group. + * Changes to Samples to prevent tutorial issues. + * Incorporated suggested changes from public pull 216 (“Replace .. paths”). + * Remove Servo Glitches when robot stopped. + * if user hits “Cancels” when editing a configuration file, clears the unsaved changes and reverts to original unmodified configuration. + * Added log info to help diagnose why the Robot Controller app was terminated (for example, by watch dog function). + * Added ability to transfer log from the controller. + * Fixed inconsistency for AngularVelocity + * Limit unbounded growth of data for telemetry. If user does not call telemetry.update() for LinearOpMode in a timely manner, data added for telemetry might get lost if size limit is exceeded. + +************************************************************************************** + +Version 2.35 (released on 16.10.06) + * Blockly programming mode - Removed unnecesary idle() call from blocks for new project. + +************************************************************************************** + +Version 2.30 (released on 16.10.05) + * Blockly programming mode: + - Mechanism added to save Blockly op modes from Programming Mode Server onto local device + - To avoid clutter, blocks are displayed in categorized folders + - Added support for DigitalChannel + - Added support for ModernRoboticsI2cCompassSensor + - Added support for ModernRoboticsI2cRangeSensor + - Added support for VoltageSensor + - Added support for AnalogInput + - Added support for AnalogOutput + - Fix for CompassSensor setMode block + * Vuforia + - Fix deadlock / make camera data available while Vuforia is running. + - Update to Vuforia 6.0.117 (recommended by Vuforia and Google to close security loophole). + * Fix for autonomous 30 second timer bug (where timer was in effect, even though it appeared to have timed out). + * opModeIsActive changes to allow cleanup after op mode is stopped (with enforced 2 second safety timeout). + * Fix to avoid reading i2c twice. + * Updated sample Op Modes. + * Improved logging and fixed intermittent freezing. + * Added digital I/O sample. + * Cleaned up device names in sample op modes to be consistent with Pushbot guide. + * Fix to allow use of IrSeekerSensorV3. + +************************************************************************************** + +Version 2.20 (released on 16.09.08) + * Support for Modern Robotics Compass Sensor. + * Support for Modern Robotics Range Sensor. + * Revise device names for Pushbot templates to match the names used in Pushbot guide. + * Fixed bug so that IrSeekerSensorV3 device is accessible as IrSeekerSensor in hardwareMap. + * Modified computer vision code to require an individual Vuforia license (per legal requirement from PTC). + * Minor fixes. + * Blockly enhancements: + - Support for Voltage Sensor. + - Support for Analog Input. + - Support for Analog Output. + - Support for Light Sensor. + - Support for Servo Controller. + +************************************************************************************** + +Version 2.10 (released on 16.09.03) + * Support for Adafruit IMU. + * Improvements to ModernRoboticsI2cGyro class + - Block on reset of z axis. + - isCalibrating() returns true while gyro is calibration. + * Updated sample gyro program. + * Blockly enhancements + - support for android.graphics.Color. + - added support for ElapsedTime. + - improved look and legibility of blocks. + - support for compass sensor. + - support for ultrasonic sensor. + - support for IrSeeker. + - support for LED. + - support for color sensor. + - support for CRServo + - prompt user to configure robot before using programming mode. + * Provides ability to disable audio cues. + * various bug fixes and improvements. + +************************************************************************************** + +Version 2.00 (released on 16.08.19) + * This is the new release for the upcoming 2016-2017 FIRST Tech Challenge Season. + * Channel change is enabled in the FTC Robot Controller app for Moto G 2nd and 3rd Gen phones. + * Users can now use annotations to register/disable their Op Modes. + * Changes in the Android SDK, JDK and build tool requirements (minsdk=19, java 1.7, build tools 23.0.3). + * Standardized units in analog input. + * Cleaned up code for existing analog sensor classes. + * setChannelMode and getChannelMode were REMOVED from the DcMotorController class. This is important - we no longer set the motor modes through the motor controller. + * setMode and getMode were added to the DcMotor class. + * ContinuousRotationServo class has been added to the FTC SDK. + * Range.clip() method has been overloaded so it can support this operation for int, short and byte integers. + * Some changes have been made (new methods added) on how a user can access items from the hardware map. + * Users can now set the zero power behavior for a DC motor so that the motor will brake or float when power is zero. + * Prototype Blockly Programming Mode has been added to FTC Robot Controller. Users can place the Robot Controller into this mode, and then use a device (such as a laptop) that has a Javascript enabled browser to write Blockly-based Op Modes directly onto the Robot Controller. + * Users can now configure the robot remotely through the FTC Driver Station app. + * Android Studio project supports Android Studio 2.1.x and compile SDK Version 23 (Marshmallow). + * Vuforia Computer Vision SDK integrated into FTC SDK. Users can use sample vision targets to get localization information on a standard FTC field. + * Project structure has been reorganized so that there is now a TeamCode package that users can use to place their local/custom Op Modes into this package. + * Inspection function has been integrated into the FTC Robot Controller and Driver Station Apps (Thanks Team HazMat… 9277 & 10650!). + * Audio cues have been incorporated into FTC SDK. + * Swap mechanism added to FTC Robot Controller configuration activity. For example, if you have two motor controllers on a robot, and you misidentified them in your configuration file, you can use the Swap button to swap the devices within the configuration file (so you do not have to manually re-enter in the configuration info for the two devices). + * Fix mechanism added to all user to replace an electronic module easily. For example, suppose a servo controller dies on your robot. You replace the broken module with a new module, which has a different serial number from the original servo controller. You can use the Fix button to automatically reconfigure your configuration file to use the serial number of the new module. + * Improvements made to fix resiliency and responsiveness of the system. + * For LinearOpMode the user now must for a telemetry.update() to update the telemetry data on the driver station. This update() mechanism ensures that the driver station gets the updated data properly and at the same time. + * The Auto Configure function of the Robot Controller is now template based. If there is a commonly used robot configuration, a template can be created so that the Auto Configure mechanism can be used to quickly configure a robot of this type. + * The logic to detect a runaway op mode (both in the LinearOpMode and OpMode types) and to abort the run, then auto recover has been improved/implemented. + * Fix has been incorporated so that Logitech F310 gamepad mappings will be correct for Marshmallow users. + +************************************************************************************** + +Release 16.07.08 + + * For the ftc_app project, the gradle files have been modified to support Android Studio 2.1.x. + + + +************************************************************************************** + +Release 16.03.30 + + * For the MIT App Inventor, the design blocks have new icons that better represent the function of each design component. + * Some changes were made to the shutdown logic to ensure the robust shutdown of some of our USB services. + * A change was made to LinearOpMode so as to allow a given instance to be executed more than once, which is required for the App Inventor. + * Javadoc improved/updated. + +************************************************************************************** + +Release 16.03.09 + + * Changes made to make the FTC SDK synchronous (significant change!) + - waitOneFullHardwareCycle() and waitForNextHardwareCycle() are no longer needed and have been deprecated. + - runOpMode() (for a LinearOpMode) is now decoupled from the system's hardware read/write thread. + - loop() (for an OpMode) is now decoupled from the system's hardware read/write thread. + - Methods are synchronous. + - For example, if you call setMode(DcMotorController.RunMode.RESET_ENCODERS) for a motor, the encoder is guaranteed to be reset when the method call is complete. + - For legacy module (NXT compatible), user no longer has to toggle between read and write modes when reading from or writing to a legacy device. + * Changes made to enhance reliability/robustness during ESD event. + * Changes made to make code thread safe. + * Debug keystore added so that user-generated robot controller APKs will all use the same signed key (to avoid conflicts if a team has multiple developer laptops for example). + * Firmware version information for Modern Robotics modules are now logged. + * Changes made to improve USB comm reliability and robustness. + * Added support for voltage indicator for legacy (NXT-compatible) motor controllers. + * Changes made to provide auto stop capabilities for op modes. + - A LinearOpMode class will stop when the statements in runOpMode() are complete. User does not have to push the stop button on the driver station. + - If an op mode is stopped by the driver station, but there is a run away/uninterruptible thread persisting, the app will log an error message then force itself to crash to stop the runaway thread. + * Driver Station UI modified to display lowest measured voltage below current voltage (12V battery). + * Driver Station UI modified to have color background for current voltage (green=good, yellow=caution, red=danger, extremely low voltage). + * javadoc improved (edits and additional classes). + * Added app build time to About activity for driver station and robot controller apps. + * Display local IP addresses on Driver Station About activity. + * Added I2cDeviceSynchImpl. + * Added I2cDeviceSync interface. + * Added seconds() and milliseconds() to ElapsedTime for clarity. + * Added getCallbackCount() to I2cDevice. + * Added missing clearI2cPortActionFlag. + * Added code to create log messages while waiting for LinearOpMode shutdown. + * Fix so Wifi Direct Config activity will no longer launch multiple times. + * Added the ability to specify an alternate i2c address in software for the Modern Robotics gyro. + +************************************************************************************** + +Release 16.02.09 + + * Improved battery checker feature so that voltage values get refreshed regularly (every 250 msec) on Driver Station (DS) user interface. + * Improved software so that Robot Controller (RC) is much more resilient and “self-healing” to USB disconnects: + - If user attempts to start/restart RC with one or more module missing, it will display a warning but still start up. + - When running an op mode, if one or more modules gets disconnected, the RC & DS will display warnings,and robot will keep on working in spite of the missing module(s). + - If a disconnected module gets physically reconnected the RC will auto detect the module and the user will regain control of the recently connected module. + - Warning messages are more helpful (identifies the type of module that’s missing plus its USB serial number). + * Code changes to fix the null gamepad reference when users try to reference the gamepads in the init() portion of their op mode. + * NXT light sensor output is now properly scaled. Note that teams might have to readjust their light threshold values in their op modes. + * On DS user interface, gamepad icon for a driver will disappear if the matching gamepad is disconnected or if that gamepad gets designated as a different driver. + * Robot Protocol (ROBOCOL) version number info is displayed in About screen on RC and DS apps. + * Incorporated a display filter on pairing screen to filter out devices that don’t use the “-“ format. This filter can be turned off to show all WiFi Direct devices. + * Updated text in License file. + * Fixed formatting error in OpticalDistanceSensor.toString(). + * Fixed issue on with a blank (“”) device name that would disrupt WiFi Direct Pairing. + * Made a change so that the WiFi info and battery info can be displayed more quickly on the DS upon connecting to RC. + * Improved javadoc generation. + * Modified code to make it easier to support language localization in the future. + +************************************************************************************** + +Release 16.01.04 + + * Updated compileSdkVersion for apps + * Prevent Wifi from entering power saving mode + * removed unused import from driver station + * Corrrected "Dead zone" joystick code. + * LED.getDeviceName and .getConnectionInfo() return null + * apps check for ROBOCOL_VERSION mismatch + * Fix for Telemetry also has off-by-one errors in its data string sizing / short size limitations error + * User telemetry output is sorted. + * added formatting variants to DbgLog and RobotLog APIs + * code modified to allow for a long list of op mode names. + * changes to improve thread safety of RobocolDatagramSocket + * Fix for "missing hardware leaves robot controller disconnected from driver station" error + * fix for "fast tapping of Init/Start causes problems" (toast is now only instantiated on UI thread). + * added some log statements for thread life cycle. + * moved gamepad reset logic inside of initActiveOpMode() for robustness + * changes made to mitigate risk of race conditions on public methods. + * changes to try and flag when WiFi Direct name contains non-printable characters. + * fix to correct race condition between .run() and .close() in ReadWriteRunnableStandard. + * updated FTDI driver + * made ReadWriteRunnableStanard interface public. + * fixed off-by-one errors in Command constructor + * moved specific hardware implmentations into their own package. + * moved specific gamepad implemnatations to the hardware library. + * changed LICENSE file to new BSD version. + * fixed race condition when shutting down Modern Robotics USB devices. + * methods in the ColorSensor classes have been synchronized. + * corrected isBusy() status to reflect end of motion. + * corrected "back" button keycode. + * the notSupported() method of the GyroSensor class was changed to protected (it should not be public). + + +************************************************************************************** + +Release 15.11.04.001 + + * Added Support for Modern Robotics Gyro. + - The GyroSensor class now supports the MR Gyro Sensor. + - Users can access heading data (about Z axis) + - Users can also access raw gyro data (X, Y, & Z axes). + - Example MRGyroTest.java op mode included. + * Improved error messages + - More descriptive error messages for exceptions in user code. + * Updated DcMotor API + * Enable read mode on new address in setI2cAddress + * Fix so that driver station app resets the gamepads when switching op modes. + * USB-related code changes to make USB comm more responsive and to display more explicit error messages. + - Fix so that USB will recover properly if the USB bus returns garbage data. + - Fix USB initializtion race condition. + - Better error reporting during FTDI open. + - More explicit messages during USB failures. + - Fixed bug so that USB device is closed if event loop teardown method was not called. + * Fixed timer UI issue + * Fixed duplicate name UI bug (Legacy Module configuration). + * Fixed race condition in EventLoopManager. + * Fix to keep references stable when updating gamepad. + * For legacy Matrix motor/servo controllers removed necessity of appending "Motor" and "Servo" to controller names. + * Updated HT color sensor driver to use constants from ModernRoboticsUsbLegacyModule class. + * Updated MR color sensor driver to use constants from ModernRoboticsUsbDeviceInterfaceModule class. + * Correctly handle I2C Address change in all color sensors + * Updated/cleaned up op modes. + - Updated comments in LinearI2cAddressChange.java example op mode. + - Replaced the calls to "setChannelMode" with "setMode" (to match the new of the DcMotor method). + - Removed K9AutoTime.java op mode. + - Added MRGyroTest.java op mode (demonstrates how to use MR Gyro Sensor). + - Added MRRGBExample.java op mode (demonstrates how to use MR Color Sensor). + - Added HTRGBExample.java op mode (demonstrates how to use HT legacy color sensor). + - Added MatrixControllerDemo.java (demonstrates how to use legacy Matrix controller). + * Updated javadoc documentation. + * Updated release .apk files for Robot Controller and Driver Station apps. + +T. Eng +November 5, 2015 + +************************************************************************************** + +Release 15.10.06.002 + + * Added support for Legacy Matrix 9.6V motor/servo controller. + * Cleaned up build.gradle file. + * Minor UI and bug fixes for driver station and robot controller apps. + * Throws error if Ultrasonic sensor (NXT) is not configured for legacy module port 4 or 5. + +T. Eng +October 6, 2015 + +************************************************************************************** + +In this latest version of the FTC SDK (20150803_001) the following changes should be noted: + + * New user interfaces for FTC Driver Station and FTC Robot Controller apps. + * An init() method is added to the OpMode class. + - For this release, init() is triggered right before the start() method. + - Eventually, the init() method will be triggered when the user presses an "INIT" button on driver station. + - The init() and loop() methods are now required (i.e., need to be overridden in the user's op mode). + - The start() and stop() methods are optional. + * A new LinearOpMode class is introduced. + - Teams can use the LinearOpMode mode to create a linear (not event driven) program model. + - Teams can use blocking statements like Thread.sleep() within a linear op mode. + * The API for the Legacy Module and Core Device Interface Module have been updated. + - Support for encoders with the Legacy Module is now working. + * The hardware loop has been updated for better performance. + + +T. Eng +August 3, 2015 diff --git a/TeamCode/build.gradle b/TeamCode/build.gradle new file mode 100644 index 00000000000..301ff649463 --- /dev/null +++ b/TeamCode/build.gradle @@ -0,0 +1,15 @@ +// +// build.gradle in TeamCode +// +// Most of the definitions for building your module reside in a common, shared +// file 'build.common.gradle'. Being factored in this way makes it easier to +// integrate updates to the FTC into your code. If you really need to customize +// the build definitions, you can place those customizations in this file, but +// please think carefully as to whether such customizations are really necessary +// before doing so. + + +// Custom definitions may go here + +// Include common definitions from above. +apply from: '../build.common.gradle' diff --git a/TeamCode/build.release.gradle b/TeamCode/build.release.gradle new file mode 100644 index 00000000000..bc8708f4246 --- /dev/null +++ b/TeamCode/build.release.gradle @@ -0,0 +1,9 @@ +dependencies { + implementation project(':FtcRobotController') + implementation (name: 'RobotCore-release', ext: 'aar') + implementation (name: 'Hardware-release', ext: 'aar') + implementation (name: 'FtcCommon-release', ext: 'aar') + implementation (name: 'WirelessP2p-release', ext:'aar') + implementation (name: 'tfod-release', ext:'aar') + implementation (name: 'tensorflow-lite-0.0.0-nightly', ext:'aar') +} diff --git a/TeamCode/src/main/AndroidManifest.xml b/TeamCode/src/main/AndroidManifest.xml new file mode 100644 index 00000000000..6c3420e3e1b --- /dev/null +++ b/TeamCode/src/main/AndroidManifest.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/readme.md b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/readme.md new file mode 100644 index 00000000000..2f7e3a4aa56 --- /dev/null +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/readme.md @@ -0,0 +1,121 @@ +## TeamCode Module + +Welcome! + +This module, TeamCode, is the place where you will write/paste the code for your team's +robot controller App. This module is currently empty (a clean slate) but the +process for adding OpModes is straightforward. + +## Creating your own OpModes + +The easiest way to create your own OpMode is to copy a Sample OpMode and make it your own. + +Sample opmodes exist in the FtcRobotController module. +To locate these samples, find the FtcRobotController module in the "Project/Android" tab. + +Expand the following tree elements: + FtcRobotController / java / org.firstinspires.ftc.robotcontroller / external / samples + +A range of different samples classes can be seen in this folder. +The class names follow a naming convention which indicates the purpose of each class. +The full description of this convention is found in the samples/sample_convention.md file. + +A brief synopsis of the naming convention is given here: +The prefix of the name will be one of the following: + +* Basic: This is a minimally functional OpMode used to illustrate the skeleton/structure + of a particular style of OpMode. These are bare bones examples. +* Sensor: This is a Sample OpMode that shows how to use a specific sensor. + It is not intended as a functioning robot, it is simply showing the minimal code + required to read and display the sensor values. +* Hardware: This is not an actual OpMode, but a helper class that is used to describe + one particular robot's hardware devices: eg: for a Pushbot. Look at any + Pushbot sample to see how this can be used in an OpMode. + Teams can copy one of these to create their own robot definition. +* Pushbot: This is a Sample OpMode that uses the Pushbot robot structure as a base. +* Concept: This is a sample OpMode that illustrates performing a specific function or concept. + These may be complex, but their operation should be explained clearly in the comments, + or the header should reference an external doc, guide or tutorial. +* Library: This is a class, or set of classes used to implement some strategy. + These will typically NOT implement a full OpMode. Instead they will be included + by an OpMode to provide some stand-alone capability. + +Once you are familiar with the range of samples available, you can choose one to be the +basis for your own robot. In all cases, the desired sample(s) needs to be copied into +your TeamCode module to be used. + +This is done inside Android Studio directly, using the following steps: + + 1) Locate the desired sample class in the Project/Android tree. + + 2) Right click on the sample class and select "Copy" + + 3) Expand the TeamCode / java folder + + 4) Right click on the org.firstinspires.ftc.teamcode folder and select "Paste" + + 5) You will be prompted for a class name for the copy. + Choose something meaningful based on the purpose of this class. + Start with a capital letter, and remember that there may be more similar classes later. + +Once your copy has been created, you should prepare it for use on your robot. +This is done by adjusting the OpMode's name, and enabling it to be displayed on the +Driver Station's OpMode list. + +Each OpMode sample class begins with several lines of code like the ones shown below: + +``` + @TeleOp(name="Template: Linear OpMode", group="Linear Opmode") + @Disabled +``` + +The name that will appear on the driver station's "opmode list" is defined by the code: + ``name="Template: Linear OpMode"`` +You can change what appears between the quotes to better describe your opmode. +The "group=" portion of the code can be used to help organize your list of OpModes. + +As shown, the current OpMode will NOT appear on the driver station's OpMode list because of the + ``@Disabled`` annotation which has been included. +This line can simply be deleted , or commented out, to make the OpMode visible. + + + +## ADVANCED Multi-Team App management: Cloning the TeamCode Module + +In some situations, you have multiple teams in your club and you want them to all share +a common code organization, with each being able to *see* the others code but each having +their own team module with their own code that they maintain themselves. + +In this situation, you might wish to clone the TeamCode module, once for each of these teams. +Each of the clones would then appear along side each other in the Android Studio module list, +together with the FtcRobotController module (and the original TeamCode module). + +Selective Team phones can then be programmed by selecting the desired Module from the pulldown list +prior to clicking to the green Run arrow. + +Warning: This is not for the inexperienced Software developer. +You will need to be comfortable with File manipulations and managing Android Studio Modules. +These changes are performed OUTSIDE of Android Studios, so close Android Studios before you do this. + +Also.. Make a full project backup before you start this :) + +To clone TeamCode, do the following: + +Note: Some names start with "Team" and others start with "team". This is intentional. + +1) Using your operating system file management tools, copy the whole "TeamCode" + folder to a sibling folder with a corresponding new name, eg: "Team0417". + +2) In the new Team0417 folder, delete the TeamCode.iml file. + +3) the new Team0417 folder, rename the "src/main/java/org/firstinspires/ftc/teamcode" folder + to a matching name with a lowercase 'team' eg: "team0417". + +4) In the new Team0417/src/main folder, edit the "AndroidManifest.xml" file, change the line that contains + package="org.firstinspires.ftc.teamcode" + to be + package="org.firstinspires.ftc.team0417" + +5) Add: include ':Team0417' to the "/settings.gradle" file. + +6) Open up Android Studios and clean out any old files by using the menu to "Build/Clean Project"" \ No newline at end of file diff --git a/TeamCode/src/main/res/raw/readme.md b/TeamCode/src/main/res/raw/readme.md new file mode 100644 index 00000000000..355a3c444b3 --- /dev/null +++ b/TeamCode/src/main/res/raw/readme.md @@ -0,0 +1 @@ +Place your sound files in this folder to use them as project resources. \ No newline at end of file diff --git a/TeamCode/src/main/res/values/strings.xml b/TeamCode/src/main/res/values/strings.xml new file mode 100644 index 00000000000..d781ec5f1e5 --- /dev/null +++ b/TeamCode/src/main/res/values/strings.xml @@ -0,0 +1,4 @@ + + + + diff --git a/TeamCode/src/main/res/xml/teamwebcamcalibrations.xml b/TeamCode/src/main/res/xml/teamwebcamcalibrations.xml new file mode 100644 index 00000000000..e2819d297d5 --- /dev/null +++ b/TeamCode/src/main/res/xml/teamwebcamcalibrations.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build.common.gradle b/build.common.gradle new file mode 100644 index 00000000000..082cfd49c86 --- /dev/null +++ b/build.common.gradle @@ -0,0 +1,109 @@ +/** + * build.common.gradle + * + * Try to avoid editing this file, as it may be updated from time to time as the FTC SDK + * evolves. Rather, if it is necessary to customize the build process, do those edits in + * the build.gradle file in TeamCode. + * + * This file contains the necessary content of the 'build.gradle' files for robot controller + * applications built using the FTC SDK. Each individual 'build.gradle' in those applications + * can simply contain the one line: + * + * apply from: '../build.common.gradle' + * + * which will pick up this file here. This approach allows makes it easier to integrate + * updates to the FTC SDK into your code. + */ + +import java.util.regex.Pattern + +apply plugin: 'com.android.application' + +android { + + compileSdkVersion 28 + + signingConfigs { + debug { + keyAlias 'androiddebugkey' + keyPassword 'android' + storeFile rootProject.file('libs/ftc.debug.keystore') + storePassword 'android' + } + } + + aaptOptions { + noCompress "tflite" + } + + defaultConfig { + applicationId 'com.qualcomm.ftcrobotcontroller' + minSdkVersion 19 + targetSdkVersion 26 + + /** + * We keep the versionCode and versionName of robot controller applications in sync with + * the master information published in the AndroidManifest.xml file of the FtcRobotController + * module. This helps avoid confusion that might arise from having multiple versions of + * a robot controller app simultaneously installed on a robot controller device. + * + * We accomplish this with the help of a funky little Groovy script that maintains that + * correspondence automatically. + * + * @see Configure Your Build + * @see Versioning Your App + */ + def manifestFile = project(':FtcRobotController').file('src/main/AndroidManifest.xml'); + def manifestText = manifestFile.getText() + // + def vCodePattern = Pattern.compile("versionCode=\"(\\d+(\\.\\d+)*)\"") + def matcher = vCodePattern.matcher(manifestText) + matcher.find() + def vCode = Integer.parseInt(matcher.group(1)) + // + def vNamePattern = Pattern.compile("versionName=\"(.*)\"") + matcher = vNamePattern.matcher(manifestText); + matcher.find() + def vName = matcher.group(1) + // + versionCode vCode + versionName vName + } + + // Advanced user code might just want to use Vuforia directly, so we set up the libs as needed + // http://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.BuildType.html + buildTypes { + release { + // Disable debugging for release versions so it can be uploaded to Google Play. + //debuggable true + ndk { + abiFilters "armeabi-v7a" + } + } + debug { + debuggable true + jniDebuggable true + renderscriptDebuggable true + ndk { + abiFilters "armeabi-v7a" + } + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } + + sourceSets.main { + jni.srcDirs = [] + jniLibs.srcDir rootProject.file('libs') + } +} + +repositories { + flatDir { + dirs rootProject.file('libs') + } +} +apply from: 'build.release.gradle' diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000000..bb3b818fc2b --- /dev/null +++ b/build.gradle @@ -0,0 +1,23 @@ +/** + * Top-level build file for ftc_app project. + * + * It is extraordinarily rare that you will ever need to edit this file. + */ +buildscript { + repositories { + google() + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:3.4.1' + } +} + +// This is now required because aapt2 has to be downloaded from the +// google() repository beginning with version 3.2 of the Android Gradle Plugin +allprojects { + repositories { + google() + jcenter() + } +} diff --git a/doc/apk/FtcDriverStation-release.apk b/doc/apk/FtcDriverStation-release.apk new file mode 100644 index 00000000000..941b8746094 Binary files /dev/null and b/doc/apk/FtcDriverStation-release.apk differ diff --git a/doc/apk/FtcRobotController-release.apk b/doc/apk/FtcRobotController-release.apk new file mode 100644 index 00000000000..63b0458f939 Binary files /dev/null and b/doc/apk/FtcRobotController-release.apk differ diff --git a/doc/javadoc/allclasses-frame.html b/doc/javadoc/allclasses-frame.html new file mode 100644 index 00000000000..136cf2e051e --- /dev/null +++ b/doc/javadoc/allclasses-frame.html @@ -0,0 +1,293 @@ + + + + + +All Classes + + + + +

    All Classes

    +
    + +
    + + diff --git a/doc/javadoc/allclasses-noframe.html b/doc/javadoc/allclasses-noframe.html new file mode 100644 index 00000000000..7dbf4a41ac5 --- /dev/null +++ b/doc/javadoc/allclasses-noframe.html @@ -0,0 +1,293 @@ + + + + + +All Classes + + + + +

    All Classes

    +
    + +
    + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/ClassManagerFactory.html b/doc/javadoc/com/qualcomm/ftccommon/ClassManagerFactory.html new file mode 100644 index 00000000000..59f1f514cdb --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/ClassManagerFactory.html @@ -0,0 +1,302 @@ + + + + + +ClassManagerFactory + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class ClassManagerFactory

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.ClassManagerFactory
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class ClassManagerFactory
      +extends java.lang.Object
      +
      A helper for classes that want to inspect the list of classes packaged with an APK. + + This is called very early in startup. Any classes that want to select a subset of the + classes packaged with the APK may implement ClassFilter and register with the ClassManager + here.
      +
    • +
    +
    +
    +
      +
    • + + + + +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          ClassManagerFactory

          +
          public ClassManagerFactory()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          registerFilters

          +
          public static void registerFilters()
          +
          Register all them that wants to see the classes in our APK
          +
        • +
        + + + +
          +
        • +

          registerResourceFilters

          +
          public static void registerResourceFilters()
          +
        • +
        + + + +
          +
        • +

          processAllClasses

          +
          public static void processAllClasses()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/CommandList.CmdPlaySound.html b/doc/javadoc/com/qualcomm/ftccommon/CommandList.CmdPlaySound.html new file mode 100644 index 00000000000..de3252d41a2 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/CommandList.CmdPlaySound.html @@ -0,0 +1,420 @@ + + + + + +CommandList.CmdPlaySound + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class CommandList.CmdPlaySound

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.CommandList.CmdPlaySound
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      CommandList
      +
      +
      +
      +
      public static class CommandList.CmdPlaySound
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          msPresentationTime

          +
          public final long msPresentationTime
          +
        • +
        + + + +
          +
        • +

          hashString

          +
          public final java.lang.String hashString
          +
        • +
        + + + +
          +
        • +

          waitForNonLoopingSoundsToFinish

          +
          public final boolean waitForNonLoopingSoundsToFinish
          +
        • +
        + + + +
          +
        • +

          volume

          +
          public final float volume
          +
        • +
        + + + +
          +
        • +

          loopControl

          +
          public final int loopControl
          +
        • +
        + + + +
          +
        • +

          rate

          +
          public final float rate
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          CmdPlaySound

          +
          public CmdPlaySound(long msPresentationTime,
          +                    java.lang.String hashString,
          +                    SoundPlayer.PlaySoundParams params)
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/CommandList.CmdRequestSound.html b/doc/javadoc/com/qualcomm/ftccommon/CommandList.CmdRequestSound.html new file mode 100644 index 00000000000..06e234cda7a --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/CommandList.CmdRequestSound.html @@ -0,0 +1,353 @@ + + + + + +CommandList.CmdRequestSound + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class CommandList.CmdRequestSound

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.CommandList.CmdRequestSound
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      CommandList
      +
      +
      +
      +
      public static class CommandList.CmdRequestSound
      +extends java.lang.Object
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        static java.lang.StringCommand 
        java.lang.StringhashString 
        intport 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        CmdRequestSound(java.lang.String hashString, + int port) 
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          hashString

          +
          public final java.lang.String hashString
          +
        • +
        + + + +
          +
        • +

          port

          +
          public final int port
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          CmdRequestSound

          +
          public CmdRequestSound(java.lang.String hashString,
          +                       int port)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          serialize

          +
          public java.lang.String serialize()
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/CommandList.CmdStopPlayingSounds.html b/doc/javadoc/com/qualcomm/ftccommon/CommandList.CmdStopPlayingSounds.html new file mode 100644 index 00000000000..14010a13def --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/CommandList.CmdStopPlayingSounds.html @@ -0,0 +1,338 @@ + + + + + +CommandList.CmdStopPlayingSounds + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class CommandList.CmdStopPlayingSounds

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.CommandList.CmdStopPlayingSounds
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      CommandList
      +
      +
      +
      +
      public static class CommandList.CmdStopPlayingSounds
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/CommandList.CmdVisuallyIdentify.html b/doc/javadoc/com/qualcomm/ftccommon/CommandList.CmdVisuallyIdentify.html new file mode 100644 index 00000000000..58a939f5a42 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/CommandList.CmdVisuallyIdentify.html @@ -0,0 +1,353 @@ + + + + + +CommandList.CmdVisuallyIdentify + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class CommandList.CmdVisuallyIdentify

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.CommandList.CmdVisuallyIdentify
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      CommandList
      +
      +
      +
      +
      public static class CommandList.CmdVisuallyIdentify
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          serialNumber

          +
          public final SerialNumber serialNumber
          +
        • +
        + + + +
          +
        • +

          shouldIdentify

          +
          public final boolean shouldIdentify
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          CmdVisuallyIdentify

          +
          public CmdVisuallyIdentify(SerialNumber serialNumber,
          +                           boolean shouldIdentify)
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxAddressChangeRequest.AddressChange.html b/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxAddressChangeRequest.AddressChange.html new file mode 100644 index 00000000000..d89c14007f1 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxAddressChangeRequest.AddressChange.html @@ -0,0 +1,238 @@ + + + + + +CommandList.LynxAddressChangeRequest.AddressChange + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class CommandList.LynxAddressChangeRequest.AddressChange

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.CommandList.LynxAddressChangeRequest.AddressChange
      • +
      +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        AddressChange() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          AddressChange

          +
          public AddressChange()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxAddressChangeRequest.html b/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxAddressChangeRequest.html new file mode 100644 index 00000000000..bfb1f40dfbd --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxAddressChangeRequest.html @@ -0,0 +1,304 @@ + + + + + +CommandList.LynxAddressChangeRequest + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class CommandList.LynxAddressChangeRequest

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.CommandList.LynxAddressChangeRequest
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      CommandList
      +
      +
      +
      +
      public static class CommandList.LynxAddressChangeRequest
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          LynxAddressChangeRequest

          +
          public LynxAddressChangeRequest()
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxFirmwareImagesResp.html b/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxFirmwareImagesResp.html new file mode 100644 index 00000000000..71e60a71a92 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxFirmwareImagesResp.html @@ -0,0 +1,285 @@ + + + + + +CommandList.LynxFirmwareImagesResp + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class CommandList.LynxFirmwareImagesResp

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.CommandList.LynxFirmwareImagesResp
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      CommandList
      +
      +
      +
      +
      public static class CommandList.LynxFirmwareImagesResp
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          LynxFirmwareImagesResp

          +
          public LynxFirmwareImagesResp()
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxFirmwareUpdate.html b/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxFirmwareUpdate.html new file mode 100644 index 00000000000..df456c621d2 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxFirmwareUpdate.html @@ -0,0 +1,285 @@ + + + + + +CommandList.LynxFirmwareUpdate + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class CommandList.LynxFirmwareUpdate

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.CommandList.LynxFirmwareUpdate
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      CommandList
      +
      +
      +
      +
      public static class CommandList.LynxFirmwareUpdate
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          LynxFirmwareUpdate

          +
          public LynxFirmwareUpdate()
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxFirmwareUpdateResp.html b/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxFirmwareUpdateResp.html new file mode 100644 index 00000000000..9f609eccae9 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/CommandList.LynxFirmwareUpdateResp.html @@ -0,0 +1,285 @@ + + + + + +CommandList.LynxFirmwareUpdateResp + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class CommandList.LynxFirmwareUpdateResp

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.CommandList.LynxFirmwareUpdateResp
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      CommandList
      +
      +
      +
      +
      public static class CommandList.LynxFirmwareUpdateResp
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          LynxFirmwareUpdateResp

          +
          public LynxFirmwareUpdateResp()
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/CommandList.USBAccessibleLynxModulesRequest.html b/doc/javadoc/com/qualcomm/ftccommon/CommandList.USBAccessibleLynxModulesRequest.html new file mode 100644 index 00000000000..ea23b371f68 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/CommandList.USBAccessibleLynxModulesRequest.html @@ -0,0 +1,321 @@ + + + + + +CommandList.USBAccessibleLynxModulesRequest + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class CommandList.USBAccessibleLynxModulesRequest

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.CommandList.USBAccessibleLynxModulesRequest
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      CommandList
      +
      +
      +
      +
      public static class CommandList.USBAccessibleLynxModulesRequest
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          forFirmwareUpdate

          +
          public boolean forFirmwareUpdate
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          USBAccessibleLynxModulesRequest

          +
          public USBAccessibleLynxModulesRequest()
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/CommandList.USBAccessibleLynxModulesResp.html b/doc/javadoc/com/qualcomm/ftccommon/CommandList.USBAccessibleLynxModulesResp.html new file mode 100644 index 00000000000..ef6ce0e7730 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/CommandList.USBAccessibleLynxModulesResp.html @@ -0,0 +1,285 @@ + + + + + +CommandList.USBAccessibleLynxModulesResp + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class CommandList.USBAccessibleLynxModulesResp

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.CommandList.USBAccessibleLynxModulesResp
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      CommandList
      +
      +
      +
      +
      public static class CommandList.USBAccessibleLynxModulesResp
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          USBAccessibleLynxModulesResp

          +
          public USBAccessibleLynxModulesResp()
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/CommandList.html b/doc/javadoc/com/qualcomm/ftccommon/CommandList.html new file mode 100644 index 00000000000..7ad0886c733 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/CommandList.html @@ -0,0 +1,900 @@ + + + + + +CommandList + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class CommandList

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • RobotCoreCommandList
      • +
      • +
          +
        • com.qualcomm.ftccommon.CommandList
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class CommandList
      +extends RobotCoreCommandList
      +
      List of RobotCore Robocol commands used by the FIRST apps
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          CMD_INIT_OP_MODE

          +
          public static final java.lang.String CMD_INIT_OP_MODE
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_RUN_OP_MODE

          +
          public static final java.lang.String CMD_RUN_OP_MODE
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_RESTART_ROBOT

          +
          public static final java.lang.String CMD_RESTART_ROBOT
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + + + + + +
          +
        • +

          CMD_SCAN_RESP

          +
          public static final java.lang.String CMD_SCAN_RESP
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_REQUEST_CONFIGURATIONS

          +
          public static final java.lang.String CMD_REQUEST_CONFIGURATIONS
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_REQUEST_CONFIGURATIONS_RESP

          +
          public static final java.lang.String CMD_REQUEST_CONFIGURATIONS_RESP
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_REQUEST_CONFIGURATION_TEMPLATES

          +
          public static final java.lang.String CMD_REQUEST_CONFIGURATION_TEMPLATES
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_REQUEST_CONFIGURATION_TEMPLATES_RESP

          +
          public static final java.lang.String CMD_REQUEST_CONFIGURATION_TEMPLATES_RESP
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_REQUEST_PARTICULAR_CONFIGURATION

          +
          public static final java.lang.String CMD_REQUEST_PARTICULAR_CONFIGURATION
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_REQUEST_PARTICULAR_CONFIGURATION_RESP

          +
          public static final java.lang.String CMD_REQUEST_PARTICULAR_CONFIGURATION_RESP
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_ACTIVATE_CONFIGURATION

          +
          public static final java.lang.String CMD_ACTIVATE_CONFIGURATION
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_SAVE_CONFIGURATION

          +
          public static final java.lang.String CMD_SAVE_CONFIGURATION
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_DELETE_CONFIGURATION

          +
          public static final java.lang.String CMD_DELETE_CONFIGURATION
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_DISCOVER_LYNX_MODULES

          +
          public static final java.lang.String CMD_DISCOVER_LYNX_MODULES
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_DISCOVER_LYNX_MODULES_RESP

          +
          public static final java.lang.String CMD_DISCOVER_LYNX_MODULES_RESP
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_REQUEST_REMEMBERED_GROUPS

          +
          public static final java.lang.String CMD_REQUEST_REMEMBERED_GROUPS
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_REQUEST_REMEMBERED_GROUPS_RESP

          +
          public static final java.lang.String CMD_REQUEST_REMEMBERED_GROUPS_RESP
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_START_PROGRAMMING_MODE

          +
          public static final java.lang.String CMD_START_PROGRAMMING_MODE
          +
          Command to start programming mode (blocks).
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_START_DS_PROGRAM_AND_MANAGE

          +
          public static final java.lang.String CMD_START_DS_PROGRAM_AND_MANAGE
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_START_PROGRAMMING_MODE_RESP

          +
          public static final java.lang.String CMD_START_PROGRAMMING_MODE_RESP
          +
          Response to a command to start programming mode (blocks). + + Programming mode connection information will be in extra data.
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_START_DS_PROGRAM_AND_MANAGE_RESP

          +
          public static final java.lang.String CMD_START_DS_PROGRAM_AND_MANAGE_RESP
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_PROGRAMMING_MODE_LOG_NOTIFICATION

          +
          public static final java.lang.String CMD_PROGRAMMING_MODE_LOG_NOTIFICATION
          +
          Notification that a message was logged during programming mode (blocks). + + Log message will be in extra data.
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_PROGRAMMING_MODE_PING_NOTIFICATION

          +
          public static final java.lang.String CMD_PROGRAMMING_MODE_PING_NOTIFICATION
          +
          Notification that the programming mode (blocks) server received a ping request. + + PingDetails (encoded as json) will be in extra data.
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_STOP_PROGRAMMING_MODE

          +
          public static final java.lang.String CMD_STOP_PROGRAMMING_MODE
          +
          Command to stop programming mode (blocks).
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_SET_MATCH_NUMBER

          +
          public static final java.lang.String CMD_SET_MATCH_NUMBER
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_GET_CANDIDATE_LYNX_FIRMWARE_IMAGES

          +
          public static final java.lang.String CMD_GET_CANDIDATE_LYNX_FIRMWARE_IMAGES
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_GET_CANDIDATE_LYNX_FIRMWARE_IMAGES_RESP

          +
          public static final java.lang.String CMD_GET_CANDIDATE_LYNX_FIRMWARE_IMAGES_RESP
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_GET_USB_ACCESSIBLE_LYNX_MODULES

          +
          public static final java.lang.String CMD_GET_USB_ACCESSIBLE_LYNX_MODULES
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_GET_USB_ACCESSIBLE_LYNX_MODULES_RESP

          +
          public static final java.lang.String CMD_GET_USB_ACCESSIBLE_LYNX_MODULES_RESP
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_LYNX_FIRMWARE_UPDATE

          +
          public static final java.lang.String CMD_LYNX_FIRMWARE_UPDATE
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_LYNX_FIRMWARE_UPDATE_RESP

          +
          public static final java.lang.String CMD_LYNX_FIRMWARE_UPDATE_RESP
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          CMD_LYNX_ADDRESS_CHANGE

          +
          public static final java.lang.String CMD_LYNX_ADDRESS_CHANGE
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          CommandList

          +
          public CommandList()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/ConfigWifiDirectActivity.Flag.html b/doc/javadoc/com/qualcomm/ftccommon/ConfigWifiDirectActivity.Flag.html new file mode 100644 index 00000000000..c0420f267b2 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/ConfigWifiDirectActivity.Flag.html @@ -0,0 +1,354 @@ + + + + + +ConfigWifiDirectActivity.Flag + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Enum ConfigWifiDirectActivity.Flag

    +
    +
    + +
    + +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static ConfigWifiDirectActivity.Flag[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (ConfigWifiDirectActivity.Flag c : ConfigWifiDirectActivity.Flag.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static ConfigWifiDirectActivity.Flag valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/ConfigWifiDirectActivity.html b/doc/javadoc/com/qualcomm/ftccommon/ConfigWifiDirectActivity.html new file mode 100644 index 00000000000..3ab31d5581a --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/ConfigWifiDirectActivity.html @@ -0,0 +1,401 @@ + + + + + +ConfigWifiDirectActivity + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class ConfigWifiDirectActivity

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • ThemedActivity
      • +
      • +
          +
        • com.qualcomm.ftccommon.ConfigWifiDirectActivity
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class ConfigWifiDirectActivity
      +extends ThemedActivity
      +
      This activity is used to correct any problems detected with the current + Wifi Direct settings.
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        static java.lang.StringTAG 
        +
      • +
      + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Static Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        java.lang.StringgetTag() 
        static voidlaunch(android.content.Context context) 
        static voidlaunch(android.content.Context context, + ConfigWifiDirectActivity.Flag flag) 
        protected voidonCreate(android.os.Bundle savedInstanceState) 
        protected voidonPause() 
        protected voidonResume() 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          ConfigWifiDirectActivity

          +
          public ConfigWifiDirectActivity()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getTag

          +
          public java.lang.String getTag()
          +
        • +
        + + + +
          +
        • +

          onCreate

          +
          protected void onCreate(android.os.Bundle savedInstanceState)
          +
        • +
        + + + +
          +
        • +

          onResume

          +
          protected void onResume()
          +
        • +
        + + + +
          +
        • +

          onPause

          +
          protected void onPause()
          +
        • +
        + + + +
          +
        • +

          launch

          +
          public static void launch(android.content.Context context)
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcAboutActivity.AboutFragment.html b/doc/javadoc/com/qualcomm/ftccommon/FtcAboutActivity.AboutFragment.html new file mode 100644 index 00000000000..1a81f419827 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcAboutActivity.AboutFragment.html @@ -0,0 +1,438 @@ + + + + + +FtcAboutActivity.AboutFragment + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcAboutActivity.AboutFragment

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • android.app.Fragment
      • +
      • +
          +
        • android.preference.PreferenceFragment
        • +
        • +
            +
          • com.qualcomm.ftccommon.FtcAboutActivity.AboutFragment
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.content.ComponentCallbacks, android.content.ComponentCallbacks2, android.view.View.OnCreateContextMenuListener
      +
      +
      +
      Enclosing class:
      +
      FtcAboutActivity
      +
      +
      +
      +
      public static class FtcAboutActivity.AboutFragment
      +extends android.preference.PreferenceFragment
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Nested Class Summary

        +
          +
        • + + +

          Nested classes/interfaces inherited from class android.preference.PreferenceFragment

          +android.preference.PreferenceFragment.OnPreferenceStartFragmentCallback
        • +
        +
          +
        • + + +

          Nested classes/interfaces inherited from class android.app.Fragment

          +android.app.Fragment.InstantiationException, android.app.Fragment.SavedState
        • +
        +
      • +
      + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        protected booleanremoteConfigure 
        +
          +
        • + + +

          Fields inherited from interface android.content.ComponentCallbacks2

          +TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        AboutFragment() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        voidonCreate(android.os.Bundle savedInstanceState) 
        voidrefreshAllUnavailable() 
        voidrefreshLocal(RobotCoreCommandList.AboutInfo aboutInfo) 
        voidrefreshRemote(RobotCoreCommandList.AboutInfo aboutInfo) 
        protected voidsetPreferenceSummary(int idPref, + java.lang.String value) 
        protected voidsetPreferenceSummary(java.lang.String prefName, + java.lang.String value) 
        +
          +
        • + + +

          Methods inherited from class android.preference.PreferenceFragment

          +addPreferencesFromIntent, addPreferencesFromResource, findPreference, getPreferenceManager, getPreferenceScreen, onActivityCreated, onActivityResult, onCreateView, onDestroy, onDestroyView, onPreferenceTreeClick, onSaveInstanceState, onStart, onStop, setPreferenceScreen
        • +
        +
          +
        • + + +

          Methods inherited from class android.app.Fragment

          +dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isVisible, onAttach, onAttach, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDetach, onHiddenChanged, onInflate, onInflate, onInflate, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onTrimMemory, onViewCreated, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, toString, unregisterForContextMenu
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          remoteConfigure

          +
          protected final boolean remoteConfigure
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          AboutFragment

          +
          public AboutFragment()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          refreshLocal

          +
          public void refreshLocal(RobotCoreCommandList.AboutInfo aboutInfo)
          +
        • +
        + + + +
          +
        • +

          refreshRemote

          +
          public void refreshRemote(RobotCoreCommandList.AboutInfo aboutInfo)
          +
        • +
        + + + +
          +
        • +

          refreshAllUnavailable

          +
          public void refreshAllUnavailable()
          +
        • +
        + + + +
          +
        • +

          onCreate

          +
          public void onCreate(android.os.Bundle savedInstanceState)
          +
          +
          Overrides:
          +
          onCreate in class android.preference.PreferenceFragment
          +
          +
        • +
        + + + +
          +
        • +

          setPreferenceSummary

          +
          protected void setPreferenceSummary(int idPref,
          +                                    java.lang.String value)
          +
        • +
        + + + +
          +
        • +

          setPreferenceSummary

          +
          protected void setPreferenceSummary(java.lang.String prefName,
          +                                    java.lang.String value)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcAboutActivity.html b/doc/javadoc/com/qualcomm/ftccommon/FtcAboutActivity.html new file mode 100644 index 00000000000..04df905caef --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcAboutActivity.html @@ -0,0 +1,530 @@ + + + + + +FtcAboutActivity + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcAboutActivity

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • ThemedActivity
      • +
      • +
          +
        • com.qualcomm.ftccommon.FtcAboutActivity
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class FtcAboutActivity
      +extends ThemedActivity
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          context

          +
          protected final android.content.Context context
          +
        • +
        + + + +
          +
        • +

          remoteConfigure

          +
          protected final boolean remoteConfigure
          +
        • +
        + + + + + + + +
          +
        • +

          refreshFuture

          +
          protected java.util.concurrent.Future refreshFuture
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          FtcAboutActivity

          +
          public FtcAboutActivity()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getTag

          +
          public java.lang.String getTag()
          +
        • +
        + + + +
          +
        • +

          getLocalAboutInfo

          +
          public static com.qualcomm.ftccommon.CommandList.AboutInfo getLocalAboutInfo()
          +
        • +
        + + + +
          +
        • +

          getAppVersion

          +
          protected static java.lang.String getAppVersion()
          +
        • +
        + + + +
          +
        • +

          getBuildTime

          +
          protected static java.lang.String getBuildTime()
          +
          https://code.google.com/p/android/issues/detail?id=220039
          +
        • +
        + + + +
          +
        • +

          startRefreshing

          +
          protected void startRefreshing()
          +
        • +
        + + + +
          +
        • +

          stopRefreshing

          +
          protected void stopRefreshing()
          +
        • +
        + + + +
          +
        • +

          refreshRemote

          +
          protected void refreshRemote(RobotCoreCommandList.AboutInfo aboutInfo)
          +
        • +
        + + + +
          +
        • +

          refresh

          +
          protected void refresh()
          +
        • +
        + + + +
          +
        • +

          onCreate

          +
          protected void onCreate(android.os.Bundle savedInstanceState)
          +
        • +
        + + + +
          +
        • +

          onResume

          +
          protected void onResume()
          +
        • +
        + + + +
          +
        • +

          onPause

          +
          protected void onPause()
          +
        • +
        + + + +
          +
        • +

          onDestroy

          +
          protected void onDestroy()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcAdvancedRCSettingsActivity.SettingsFragment.html b/doc/javadoc/com/qualcomm/ftccommon/FtcAdvancedRCSettingsActivity.SettingsFragment.html new file mode 100644 index 00000000000..5dba1bd6ddb --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcAdvancedRCSettingsActivity.SettingsFragment.html @@ -0,0 +1,395 @@ + + + + + +FtcAdvancedRCSettingsActivity.SettingsFragment + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcAdvancedRCSettingsActivity.SettingsFragment

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • android.app.Fragment
      • +
      • +
          +
        • android.preference.PreferenceFragment
        • +
        • +
            +
          • com.qualcomm.ftccommon.FtcAdvancedRCSettingsActivity.SettingsFragment
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.content.ComponentCallbacks, android.content.ComponentCallbacks2, android.view.View.OnCreateContextMenuListener
      +
      +
      +
      Enclosing class:
      +
      FtcAdvancedRCSettingsActivity
      +
      +
      +
      +
      public static class FtcAdvancedRCSettingsActivity.SettingsFragment
      +extends android.preference.PreferenceFragment
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Nested Class Summary

        +
          +
        • + + +

          Nested classes/interfaces inherited from class android.preference.PreferenceFragment

          +android.preference.PreferenceFragment.OnPreferenceStartFragmentCallback
        • +
        +
          +
        • + + +

          Nested classes/interfaces inherited from class android.app.Fragment

          +android.app.Fragment.InstantiationException, android.app.Fragment.SavedState
        • +
        +
      • +
      + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        protected booleanclientConnected 
        protected PreferencesHelperpreferencesHelper 
        protected booleanremoteConfigure 
        +
          +
        • + + +

          Fields inherited from interface android.content.ComponentCallbacks2

          +TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        SettingsFragment() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        voidonCreate(android.os.Bundle savedInstanceState) 
        +
          +
        • + + +

          Methods inherited from class android.preference.PreferenceFragment

          +addPreferencesFromIntent, addPreferencesFromResource, findPreference, getPreferenceManager, getPreferenceScreen, onActivityCreated, onActivityResult, onCreateView, onDestroy, onDestroyView, onPreferenceTreeClick, onSaveInstanceState, onStart, onStop, setPreferenceScreen
        • +
        +
          +
        • + + +

          Methods inherited from class android.app.Fragment

          +dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isVisible, onAttach, onAttach, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDetach, onHiddenChanged, onInflate, onInflate, onInflate, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onTrimMemory, onViewCreated, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, toString, unregisterForContextMenu
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          clientConnected

          +
          protected boolean clientConnected
          +
        • +
        + + + +
          +
        • +

          remoteConfigure

          +
          protected boolean remoteConfigure
          +
        • +
        + + + +
          +
        • +

          preferencesHelper

          +
          protected PreferencesHelper preferencesHelper
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          SettingsFragment

          +
          public SettingsFragment()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onCreate

          +
          public void onCreate(android.os.Bundle savedInstanceState)
          +
          +
          Overrides:
          +
          onCreate in class android.preference.PreferenceFragment
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcAdvancedRCSettingsActivity.html b/doc/javadoc/com/qualcomm/ftccommon/FtcAdvancedRCSettingsActivity.html new file mode 100644 index 00000000000..c0b51d7332f --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcAdvancedRCSettingsActivity.html @@ -0,0 +1,363 @@ + + + + + +FtcAdvancedRCSettingsActivity + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcAdvancedRCSettingsActivity

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • ThemedActivity
      • +
      • +
          +
        • com.qualcomm.ftccommon.FtcAdvancedRCSettingsActivity
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class FtcAdvancedRCSettingsActivity
      +extends ThemedActivity
      +
      FtcAdvancedRCSettingsActivity manages the editing of advanced RC settings
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        protected static java.lang.StringCLIENT_CONNECTED 
        static java.lang.StringTAG 
        +
      • +
      + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        java.lang.StringgetTag() 
        protected voidonCreate(android.os.Bundle savedInstanceState) 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          FtcAdvancedRCSettingsActivity

          +
          public FtcAdvancedRCSettingsActivity()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getTag

          +
          public java.lang.String getTag()
          +
        • +
        + + + +
          +
        • +

          onCreate

          +
          protected void onCreate(android.os.Bundle savedInstanceState)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoop.DefaultUsbModuleAttachmentHandler.html b/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoop.DefaultUsbModuleAttachmentHandler.html new file mode 100644 index 00000000000..6b2faafc440 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoop.DefaultUsbModuleAttachmentHandler.html @@ -0,0 +1,330 @@ + + + + + +FtcEventLoop.DefaultUsbModuleAttachmentHandler + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcEventLoop.DefaultUsbModuleAttachmentHandler

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.FtcEventLoop.DefaultUsbModuleAttachmentHandler
      • +
      +
    • +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        voidhandleUsbModuleAttach(RobotUsbModule module) +
        One of the hardware modules in the current robot configuration (such as a Modern Robotics + DC Motor Controller, a Modern Robotics Legacy Module, etc) is now newly attached to the + system (or so we think).
        +
        voidhandleUsbModuleDetach(RobotUsbModule module) +
        One of the hardware modules in the current robot configuration (such as a Modern Robotics + DC Motor Controller, a Modern Robotics Legacy Module, etc) has been disconnected from the + system.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          DefaultUsbModuleAttachmentHandler

          +
          public DefaultUsbModuleAttachmentHandler()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          handleUsbModuleAttach

          +
          public void handleUsbModuleAttach(RobotUsbModule module)
          +                           throws RobotCoreException,
          +                                  java.lang.InterruptedException
          +
          Description copied from interface: UsbModuleAttachmentHandler
          +
          One of the hardware modules in the current robot configuration (such as a Modern Robotics + DC Motor Controller, a Modern Robotics Legacy Module, etc) is now newly attached to the + system (or so we think). The code in this method should deal with this event by, e.g., + putting the module into a correctly operating state.
          +
          +
          Specified by:
          +
          handleUsbModuleAttach in interface UsbModuleAttachmentHandler
          +
          Parameters:
          +
          module - the module which is newly attached
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          handleUsbModuleDetach

          +
          public void handleUsbModuleDetach(RobotUsbModule module)
          +                           throws RobotCoreException,
          +                                  java.lang.InterruptedException
          +
          Description copied from interface: UsbModuleAttachmentHandler
          +
          One of the hardware modules in the current robot configuration (such as a Modern Robotics + DC Motor Controller, a Modern Robotics Legacy Module, etc) has been disconnected from the + system. The code in this method should deal with this event by, e.g., putting the module in + a state where it merely pretends to function.
          +
          +
          Specified by:
          +
          handleUsbModuleDetach in interface UsbModuleAttachmentHandler
          +
          Parameters:
          +
          module - the module which has become disconnected
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoop.html b/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoop.html new file mode 100644 index 00000000000..e6045dd4781 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoop.html @@ -0,0 +1,895 @@ + + + + + +FtcEventLoop + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcEventLoop

    +
    +
    + +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      EventLoop
      +
      +
      +
      +
      public class FtcEventLoop
      +extends FtcEventLoopBase
      +
      Main event loop to control the robot +

      + Modify this class with your own code, or create your own event loop by + implementing EventLoop.

      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          utility

          +
          protected final Utility utility
          +
        • +
        + + + +
          +
        • +

          opModeManager

          +
          protected final OpModeManagerImpl opModeManager
          +
        • +
        + + + + + + + +
          +
        • +

          recentlyAttachedUsbDevices

          +
          protected final java.util.Map<java.lang.String,java.lang.Long> recentlyAttachedUsbDevices
          +
        • +
        + + + +
          +
        • +

          opModeStopRequested

          +
          protected final java.util.concurrent.atomic.AtomicReference<OpMode> opModeStopRequested
          +
        • +
        +
      • +
      + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          createOpModeManager

          +
          protected static OpModeManagerImpl createOpModeManager(android.app.Activity activityContext)
          +
        • +
        + + + +
          +
        • +

          getOpModeManager

          +
          public OpModeManagerImpl getOpModeManager()
          +
          Description copied from interface: EventLoop
          +
          Returns the OpModeManager associated with this event loop
          +
          +
          Returns:
          +
          the OpModeManager associated with this event loop
          +
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          init

          +
          public void init(EventLoopManager eventLoopManager)
          +          throws RobotCoreException,
          +                 java.lang.InterruptedException
          +
          Init method +

          + This code will run when the robot first starts up. Place any initialization code in this + method. +

          + It is important to save a copy of the event loop manager from this method, as that is how + you'll get access to the gamepad. +

          + If an Exception is thrown then the event loop manager will not start the robot. +

          + Caller synchronizes: called on RobotSetupRunnable.run() thread

          +
          +
          Specified by:
          +
          init in interface EventLoop
          +
          Overrides:
          +
          init in class FtcEventLoopBase
          +
          Parameters:
          +
          eventLoopManager - event loop manager that is responsible for this event loop
          +
          Throws:
          +
          RobotCoreException - if a RobotCoreException is thrown, it will be handled + by the event loop manager. The manager will report that the robot failed + to start.
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + + + + + +
          +
        • +

          refreshUserTelemetry

          +
          public void refreshUserTelemetry(TelemetryMessage telemetry,
          +                                 double sInterval)
          +
          Description copied from interface: EventLoop
          +
          Update's the user portion of the driver station screen with the contents of the telemetry object + here provided if a sufficiently long duration has passed since the last update.
          +
          +
          Parameters:
          +
          telemetry - the telemetry object to send
          +
          sInterval - the required minimum interval. NaN indicates that a system default interval should be used.
          +
          +
        • +
        + + + +
          +
        • +

          teardown

          +
          public void teardown()
          +              throws RobotCoreException,
          +                     java.lang.InterruptedException
          +
          Teardown method +

          + This method will be called when the robot is being shut down. This method should stop the robot. There will be no more changes to write + to the hardware after this method is called. +

          + If an exception is thrown, then the event loop manager will attempt to shut down the robot + without the benefit of this method. +

          +
          +
          Specified by:
          +
          teardown in interface EventLoop
          +
          Overrides:
          +
          teardown in class FtcEventLoopBase
          +
          Throws:
          +
          RobotCoreException - if a RobotCoreException is thrown, it will be handled by the event + loop manager. The manager will then attempt to shut down the robot without the benefit + of the teardown method.
          +
          java.lang.InterruptedException
          +
          See Also:
          +

          + Caller synchronizes: called on EventLoopRunnable.run() thread.

          +
          +
        • +
        + + + +
          +
        • +

          processCommand

          +
          public CallbackResult processCommand(Command command)
          +                              throws java.lang.InterruptedException,
          +                                     RobotCoreException
          +
          If the driver station sends over a command, it will be routed to this method. You can choose + what to do with this command, or you can just ignore it completely. +

          + Called on RecvRunnable.run() thread. Method is thread safe, non-interfering

          +
          +
          Specified by:
          +
          processCommand in interface EventLoop
          +
          Overrides:
          +
          processCommand in class FtcEventLoopBase
          +
          Parameters:
          +
          command - command to process
          +
          Throws:
          +
          java.lang.InterruptedException
          +
          RobotCoreException
          +
          +
        • +
        + + + +
          +
        • +

          handleCommandScan

          +
          protected void handleCommandScan(java.lang.String extra)
          +                          throws RobotCoreException,
          +                                 java.lang.InterruptedException
          +
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          See Also:
          +
          FtcConfigurationActivity#doUSBScanAndUpdateUI()
          +
          +
        • +
        + + + +
          +
        • +

          handleCommandDiscoverLynxModules

          +
          protected void handleCommandDiscoverLynxModules(java.lang.String extra)
          +                                         throws RobotCoreException,
          +                                                java.lang.InterruptedException
          +
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          sendUIState

          +
          protected void sendUIState()
          +
          The driver station is requesting our opmode list/ UI state. Build up an appropriately-delimited + list and send it back to them. Also take this opportunity to forcibly refresh their error/warning + state: the opmode list is only infrequently requested (so sending another datagram isn't + a traffic burden) and it's requested just after a driver station reconnects after a disconnect + (so doing the refresh now is probably an opportune thing to do).
          +
          +
          Overrides:
          +
          sendUIState in class FtcEventLoopBase
          +
          +
        • +
        + + + +
          +
        • +

          handleCommandSetMatchNumber

          +
          protected void handleCommandSetMatchNumber(java.lang.String extra)
          +
        • +
        + + + +
          +
        • +

          handleCommandInitOpMode

          +
          protected void handleCommandInitOpMode(java.lang.String extra)
          +
        • +
        + + + +
          +
        • +

          handleCommandRunOpMode

          +
          protected void handleCommandRunOpMode(java.lang.String extra)
          +
        • +
        + + + +
          +
        • +

          requestOpModeStop

          +
          public void requestOpModeStop(OpMode opModeToStopIfActive)
          +
          Description copied from interface: EventLoop
          +
          Requests that an OpMode be stopped if it's the currently active one
          +
          +
          Parameters:
          +
          opModeToStopIfActive - the OpMode to stop if it's currently active
          +
          +
        • +
        + + + +
          +
        • +

          onUsbDeviceAttached

          +
          public void onUsbDeviceAttached(android.hardware.usb.UsbDevice usbDevice)
          +
          Deal with the fact that a UsbDevice has recently attached to the system
          +
          +
          Parameters:
          +
          usbDevice -
          +
          See Also:
          +
          EventLoop.processedRecentlyAttachedUsbDevices()
          +
          +
        • +
        + + + +
          +
        • +

          getSerialNumberOfUsbDevice

          +
          protected SerialNumber getSerialNumberOfUsbDevice(android.hardware.usb.UsbDevice usbDevice)
          +
        • +
        + + + +
          +
        • +

          pendUsbDeviceAttachment

          +
          public void pendUsbDeviceAttachment(SerialNumber serialNumber,
          +                                    long time,
          +                                    java.util.concurrent.TimeUnit unit)
          +
        • +
        + + + + + + + +
          +
        • +

          handleUsbModuleDetach

          +
          public void handleUsbModuleDetach(RobotUsbModule module)
          +                           throws RobotCoreException,
          +                                  java.lang.InterruptedException
          +
          Description copied from interface: EventLoop
          +
          Process the fact that a usb module has now become detached from the system. This is called + on the EventLoop thread by the EventLoopManager; there is sufficient time and correct context + to, e.g., fully disarm and 'pretend' the associated module.
          +
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          See Also:
          +
          EventLoop.processedRecentlyAttachedUsbDevices()
          +
          +
        • +
        + + + +
          +
        • +

          handleUsbModuleAttach

          +
          public void handleUsbModuleAttach(RobotUsbModule module)
          +                           throws RobotCoreException,
          +                                  java.lang.InterruptedException
          +
          Description copied from interface: EventLoop
          +
          Process the fact that (we believe) that the indicated module has now reappeared after a + previously observed detachment.
          +
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopBase.LynxUsbDeviceContainer.html b/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopBase.LynxUsbDeviceContainer.html new file mode 100644 index 00000000000..4166e9591e4 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopBase.LynxUsbDeviceContainer.html @@ -0,0 +1,403 @@ + + + + + +FtcEventLoopBase.LynxUsbDeviceContainer + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcEventLoopBase.LynxUsbDeviceContainer

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.FtcEventLoopBase.LynxUsbDeviceContainer
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      FtcEventLoopBase
      +
      +
      +
      +
      protected static class FtcEventLoopBase.LynxUsbDeviceContainer
      +extends java.lang.Object
      +
      abstracts whether we've got a live LynxUsbDeviceImpl or we just opened something locally ourselves.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          lynxUsbDevice

          +
          protected final LynxUsbDeviceImpl lynxUsbDevice
          +
        • +
        + + + +
          +
        • +

          robotUsbDevice

          +
          protected final RobotUsbDevice robotUsbDevice
          +
        • +
        + + + +
          +
        • +

          serialNumber

          +
          protected final SerialNumber serialNumber
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          LynxUsbDeviceContainer

          +
          public LynxUsbDeviceContainer(LynxUsbDeviceImpl lynxUsbDevice,
          +                              SerialNumber serialNumber)
          +
        • +
        + + + +
          +
        • +

          LynxUsbDeviceContainer

          +
          public LynxUsbDeviceContainer(RobotUsbDevice robotUsbDevice,
          +                              SerialNumber serialNumber)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          close

          +
          public void close()
          +
        • +
        + + + +
          +
        • +

          disengage

          +
          public void disengage()
          +
        • +
        + + + +
          +
        • +

          engage

          +
          public void engage()
          +
        • +
        + + + +
          +
        • +

          getRobotUsbDevice

          +
          public RobotUsbDevice getRobotUsbDevice()
          +
        • +
        + + + +
          +
        • +

          getSerialNumber

          +
          public SerialNumber getSerialNumber()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopBase.html b/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopBase.html new file mode 100644 index 00000000000..546c1f01fc6 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopBase.html @@ -0,0 +1,1099 @@ + + + + + +FtcEventLoopBase + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcEventLoopBase

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.FtcEventLoopBase
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      EventLoop
      +
      +
      +
      Direct Known Subclasses:
      +
      FtcEventLoop, FtcEventLoopIdle
      +
      +
      +
      +
      public abstract class FtcEventLoopBase
      +extends java.lang.Object
      +implements EventLoop
      +
      FtcEventLoopBase is an abstract base that handles defines core event processing + logic that's available whether or not a Robot is currently extant or not
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          networkConnectionHandler

          +
          protected NetworkConnectionHandler networkConnectionHandler
          +
        • +
        + + + +
          +
        • +

          activityContext

          +
          protected android.app.Activity activityContext
          +
        • +
        + + + +
          +
        • +

          robotCfgFileMgr

          +
          protected RobotConfigFileManager robotCfgFileMgr
          +
        • +
        + + + + + + + +
          +
        • +

          runningOnDriverStation

          +
          protected boolean runningOnDriverStation
          +
        • +
        + + + + + + + +
          +
        • +

          usbScanManager

          +
          protected USBScanManager usbScanManager
          +
        • +
        + + + +
          +
        • +

          userOpmodeRegister

          +
          protected final OpModeRegister userOpmodeRegister
          +
        • +
        + + + +
          +
        • +

          registeredOpModes

          +
          protected final RegisteredOpModes registeredOpModes
          +
        • +
        +
      • +
      + + + +
        +
      • + + +

        Method Detail

        + + + + + + + +
          +
        • +

          teardown

          +
          public void teardown()
          +              throws RobotCoreException,
          +                     java.lang.InterruptedException
          +
          Description copied from interface: EventLoop
          +
          Teardown method, this will be called after the last call to loop. You should place your robot + into a safe state before this method exits, since there will be no more changes to communicate + with your robot. + + Threading: called on the EventLoopRunnable.run() thread.
          +
          +
          Specified by:
          +
          teardown in interface EventLoop
          +
          Throws:
          +
          RobotCoreException - if a RobotCoreException is thrown, it will be handled by the event + loop manager. The manager will then attempt to shut down the robot without the benefit + of the teardown method.
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          processCommand

          +
          public CallbackResult processCommand(Command command)
          +                              throws java.lang.InterruptedException,
          +                                     RobotCoreException
          +
          Description copied from interface: EventLoop
          +
          Process command method, this will be called if the event loop manager receives a user defined + command. How this command is handled is up to the event loop implementation. + + Threading: called on the RecvRunnable.run() thread.
          +
          +
          Specified by:
          +
          processCommand in interface EventLoop
          +
          Parameters:
          +
          command - command to process
          +
          Throws:
          +
          java.lang.InterruptedException
          +
          RobotCoreException
          +
          +
        • +
        + + + +
          +
        • +

          handleCommandActivateConfiguration

          +
          protected void handleCommandActivateConfiguration(java.lang.String data)
          +
        • +
        + + + +
          +
        • +

          sendUIState

          +
          protected void sendUIState()
          +
        • +
        + + + +
          +
        • +

          checkForChangedOpModes

          +
          protected void checkForChangedOpModes()
          +
        • +
        + + + +
          +
        • +

          init

          +
          public void init(EventLoopManager eventLoopManager)
          +          throws RobotCoreException,
          +                 java.lang.InterruptedException
          +
          Description copied from interface: EventLoop
          +
          Init method, this will be called before the first call to loop. You should set up + your hardware in this method. + + Threading: called on the RobotSetupRunnable.run() thread, before the EventLoopRunnable.run() + thread is created.
          +
          +
          Specified by:
          +
          init in interface EventLoop
          +
          Parameters:
          +
          eventLoopManager - event loop manager that is responsible for this event loop
          +
          Throws:
          +
          RobotCoreException - if a RobotCoreException is thrown, it will be handled + by the event loop manager. The manager will report that the robot failed + to start.
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          handleCommandRestartRobot

          +
          protected void handleCommandRestartRobot()
          +
        • +
        + + + +
          +
        • +

          handleCommandRequestParticularConfiguration

          +
          protected void handleCommandRequestParticularConfiguration(java.lang.String data)
          +
        • +
        + + + +
          +
        • +

          handleCommandDeleteConfiguration

          +
          protected void handleCommandDeleteConfiguration(java.lang.String fileInfo)
          +
        • +
        + + + +
          +
        • +

          handleCommandSaveConfiguration

          +
          protected void handleCommandSaveConfiguration(java.lang.String fileInfo)
          +
        • +
        + + + +
          +
        • +

          handleCommandRequestConfigurations

          +
          protected void handleCommandRequestConfigurations()
          +
          Serialize the entire list of config file metadata and send to the driver station
          +
        • +
        + + + +
          +
        • +

          handleCommandRequestRememberedGroups

          +
          protected void handleCommandRequestRememberedGroups()
          +
          Serialize the list of remembered Wifi Direct groups and send it to the driver station
          +
        • +
        + + + +
          +
        • +

          handleCommandClearRememberedGroups

          +
          protected void handleCommandClearRememberedGroups()
          +
          Clear the list of remembered groups
          +
        • +
        + + + +
          +
        • +

          handleCommandLynxFirmwareUpdate

          +
          protected void handleCommandLynxFirmwareUpdate(Command commandRequest)
          +
          Update the firmware of the device indicated in the command. + + Note: we need to run this in a worker thread so that our command processor here + remains responsive and able to process new messages.
          +
        • +
        + + + +
          +
        • +

          updateLynxFirmware

          +
          protected boolean updateLynxFirmware(SerialNumber serialNumber,
          +                                     com.qualcomm.ftccommon.CommandList.FWImage imageFileName)
          +
          Updates the firmware of the Expansion Hub in the indicated USB-attached device + to be the indicated firmware.
          +
        • +
        + + + + + + + +
          +
        • +

          enterFirmwareUpdateMode

          +
          protected boolean enterFirmwareUpdateMode(RobotUsbDevice robotUsbDevice)
          +
        • +
        + + + +
          +
        • +

          handleCommandGetUSBAccessibleLynxModules

          +
          protected void handleCommandGetUSBAccessibleLynxModules(Command commandRequest)
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          handleCommandLynxChangeModuleAddresses

          +
          protected void handleCommandLynxChangeModuleAddresses(Command commandRequest)
          +
        • +
        + + + +
          +
        • +

          talkToParentLynxModule

          +
          protected void talkToParentLynxModule(DeviceManager deviceManager,
          +                                      LynxUsbDevice lynxUsbDevice,
          +                                      int moduleAddress,
          +                                      Consumer<LynxModule> consumer)
          +                               throws RobotCoreException,
          +                                      java.lang.InterruptedException,
          +                                      LynxNackException
          +
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          LynxNackException
          +
          +
        • +
        + + + +
          +
        • +

          handleCommandGetCandidateLynxFirmwareImages

          +
          protected void handleCommandGetCandidateLynxFirmwareImages(Command commandRequest)
          +
        • +
        + + + +
          +
        • +

          handleCommandRequestConfigurationTemplates

          +
          protected void handleCommandRequestConfigurationTemplates()
          +
          Serialize the entire list of config file metadata and send to the driver station
          +
        • +
        + + + +
          +
        • +

          handleCommandStartProgrammingMode

          +
          protected void handleCommandStartProgrammingMode()
          +
          Starts programming mode on the robot controller, as requested by driver station.
          +
        • +
        + + + +
          +
        • +

          handleCommandStartDriverStationProgramAndManage

          +
          protected void handleCommandStartDriverStationProgramAndManage()
          +
        • +
        + + + +
          +
        • +

          handleCommandStopProgrammingMode

          +
          protected void handleCommandStopProgrammingMode()
          +
          Stops programming mode on the robot controller, as requested by driver station.
          +
        • +
        + + + +
          +
        • +

          handleCommandShowDialog

          +
          protected void handleCommandShowDialog(Command command)
          +
        • +
        + + + +
          +
        • +

          handleCommandDismissDialog

          +
          protected void handleCommandDismissDialog(Command command)
          +
        • +
        + + + +
          +
        • +

          handleCommandDismissAllDialogs

          +
          protected void handleCommandDismissAllDialogs(Command command)
          +
        • +
        + + + +
          +
        • +

          handleCommandShowProgress

          +
          protected void handleCommandShowProgress(Command command)
          +
        • +
        + + + +
          +
        • +

          handleCommandDismissProgress

          +
          protected void handleCommandDismissProgress(Command command)
          +
        • +
        + + + +
          +
        • +

          handleCommandShowToast

          +
          protected void handleCommandShowToast(Command command)
          +
        • +
        + + + +
          +
        • +

          handleCommandRequestInspectionReport

          +
          protected void handleCommandRequestInspectionReport()
          +
          Return an inspection report of this (robot controller) device back to the caller
          +
        • +
        + + + +
          +
        • +

          handleCommandRequestAboutInfo

          +
          protected void handleCommandRequestAboutInfo(Command command)
          +
        • +
        + + + +
          +
        • +

          handleCommandDisconnectWifiDirect

          +
          protected void handleCommandDisconnectWifiDirect()
          +
        • +
        + + + +
          +
        • +

          handleCommandVisuallyIdentify

          +
          protected CallbackResult handleCommandVisuallyIdentify(Command command)
          +
        • +
        + + + +
          +
        • +

          handleCommandVisuallyConfirmWifiReset

          +
          protected CallbackResult handleCommandVisuallyConfirmWifiReset()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopHandler.html b/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopHandler.html new file mode 100644 index 00000000000..1a314161ad5 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopHandler.html @@ -0,0 +1,870 @@ + + + + + +FtcEventLoopHandler + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcEventLoopHandler

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.FtcEventLoopHandler
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class FtcEventLoopHandler
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          NO_VOLTAGE_SENSOR

          +
          public static final java.lang.String NO_VOLTAGE_SENSOR
          +
          This string is sent in the robot battery telemetry payload to identify + that no voltage sensor is available on the robot.
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          hardwareFactory

          +
          protected final HardwareFactory hardwareFactory
          +
        • +
        + + + +
          +
        • +

          robotControllerContext

          +
          protected final android.content.Context robotControllerContext
          +
        • +
        + + + + + + + +
          +
        • +

          robotControllerBatteryChecker

          +
          protected BatteryChecker robotControllerBatteryChecker
          +
        • +
        + + + +
          +
        • +

          robotControllerBatteryCheckerInterval

          +
          protected double robotControllerBatteryCheckerInterval
          +
        • +
        + + + +
          +
        • +

          robotBatteryTimer

          +
          protected ElapsedTime robotBatteryTimer
          +
        • +
        + + + +
          +
        • +

          robotBatteryInterval

          +
          protected double robotBatteryInterval
          +
        • +
        + + + +
          +
        • +

          robotBatteryStatistics

          +
          protected MovingStatistics robotBatteryStatistics
          +
        • +
        + + + +
          +
        • +

          robotBatteryLoggingTimer

          +
          protected ElapsedTime robotBatteryLoggingTimer
          +
        • +
        + + + +
          +
        • +

          robotBatteryLoggingInterval

          +
          protected double robotBatteryLoggingInterval
          +
        • +
        + + + +
          +
        • +

          userTelemetryTimer

          +
          protected ElapsedTime userTelemetryTimer
          +
        • +
        + + + +
          +
        • +

          userTelemetryInterval

          +
          protected double userTelemetryInterval
          +
        • +
        + + + +
          +
        • +

          refreshUserTelemetryLock

          +
          protected final java.lang.Object refreshUserTelemetryLock
          +
        • +
        + + + +
          +
        • +

          updateUITimer

          +
          protected ElapsedTime updateUITimer
          +
        • +
        + + + +
          +
        • +

          updateUIInterval

          +
          protected double updateUIInterval
          +
        • +
        + + + +
          +
        • +

          hardwareMap

          +
          protected HardwareMap hardwareMap
          +
          the actual hardware map seen by the user
          +
        • +
        + + + +
          +
        • +

          hardwareMapExtra

          +
          protected HardwareMap hardwareMapExtra
          +
          the hardware map in which we keep any extra devices (ones not used by the user) we need to instantiate
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          FtcEventLoopHandler

          +
          public FtcEventLoopHandler(HardwareFactory hardwareFactory,
          +                           UpdateUI.Callback callback,
          +                           android.content.Context robotControllerContext)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + + + + + +
          +
        • +

          close

          +
          public void close()
          +
        • +
        + + + +
          +
        • +

          closeHardwareMap

          +
          protected static void closeHardwareMap(HardwareMap hardwareMap)
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          getExtantLynxDeviceImpls

          +
          public java.util.List<LynxUsbDeviceImpl> getExtantLynxDeviceImpls()
          +
        • +
        + + + +
          +
        • +

          getHardwareDevice

          +
          public <T> T getHardwareDevice(java.lang.Class<? extends T> classOrInterface,
          +                               SerialNumber serialNumber,
          +                               <any> usbScanManagerSupplier)
          +
          Returns the device whose serial number is the one indicated, from the hardware map if possible + but instantiating / opening it if necessary. null is returned if the object cannot be + accessed.
          +
          +
          Parameters:
          +
          classOrInterface - the interface to retrieve on the returned object
          +
          serialNumber - the serial number of the object to retrieve
          +
          usbScanManagerSupplier - how to get a USBScanManager if it ends up we need one
          +
          +
        • +
        + + + +
          +
        • +

          displayGamePadInfo

          +
          public void displayGamePadInfo(java.lang.String activeOpModeName)
          +
        • +
        + + + +
          +
        • +

          getGamepads

          +
          public Gamepad[] getGamepads()
          +
        • +
        + + + +
          +
        • +

          refreshUserTelemetry

          +
          public 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. If the telemetry is transmitted, the + telemetry is cleared and the timer is reset. A battery voltage key may be added to the + message before transmission.
          +
          +
          Parameters:
          +
          telemetry - the telemetry data to send
          +
          requestedInterval - the minimum interval (s) since the last transmission. NaN indicates + that a default transmission interval should be used
          +
          See Also:
          +
          EventLoop.TELEMETRY_DEFAULT_INTERVAL
          +
          +
        • +
        + + + +
          +
        • +

          sendBatteryInfo

          +
          public void sendBatteryInfo()
          +
          Send robot phone power % and robot battery voltage level to Driver station
          +
        • +
        + + + +
          +
        • +

          sendTelemetry

          +
          public void sendTelemetry(java.lang.String tag,
          +                          java.lang.String msg)
          +
        • +
        + + + +
          +
        • +

          closeMotorControllers

          +
          protected static void closeMotorControllers(HardwareMap hardwareMap)
          +
        • +
        + + + +
          +
        • +

          closeServoControllers

          +
          protected static void closeServoControllers(HardwareMap hardwareMap)
          +
        • +
        + + + +
          +
        • +

          closeAutoCloseOnTeardown

          +
          protected static void closeAutoCloseOnTeardown(HardwareMap hardwareMap)
          +
        • +
        + + + +
          +
        • +

          closeBatteryMonitoring

          +
          protected void closeBatteryMonitoring()
          +
        • +
        + + + +
          +
        • +

          restartRobot

          +
          public void restartRobot()
          +
        • +
        + + + +
          +
        • +

          getOpMode

          +
          public java.lang.String getOpMode(java.lang.String extra)
          +
        • +
        + + + +
          +
        • +

          updateBatteryStatus

          +
          public void updateBatteryStatus(BatteryChecker.BatteryStatus status)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopIdle.html b/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopIdle.html new file mode 100644 index 00000000000..d782b55c7ca --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcEventLoopIdle.html @@ -0,0 +1,650 @@ + + + + + +FtcEventLoopIdle + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcEventLoopIdle

    +
    +
    + +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      EventLoop
      +
      +
      +
      +
      public class FtcEventLoopIdle
      +extends FtcEventLoopBase
      +
      FtcEventLoopIdle is an eventloop that runs whenever a full FtcEventLoop + is inappropriate. + + This event loop should be robust in the face of errors and exceptions, staying up until + it's explicitly shut down.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + + + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          init

          +
          public void init(EventLoopManager eventLoopManager)
          +          throws RobotCoreException,
          +                 java.lang.InterruptedException
          +
          Description copied from interface: EventLoop
          +
          Init method, this will be called before the first call to loop. You should set up + your hardware in this method. + + Threading: called on the RobotSetupRunnable.run() thread, before the EventLoopRunnable.run() + thread is created.
          +
          +
          Specified by:
          +
          init in interface EventLoop
          +
          Overrides:
          +
          init in class FtcEventLoopBase
          +
          Parameters:
          +
          eventLoopManager - event loop manager that is responsible for this event loop
          +
          Throws:
          +
          RobotCoreException - if a RobotCoreException is thrown, it will be handled + by the event loop manager. The manager will report that the robot failed + to start.
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          loop

          +
          public void loop()
          +          throws RobotCoreException,
          +                 java.lang.InterruptedException
          +
          Description copied from interface: EventLoop
          +
          This method will be repeatedly called by the event loop manager. + + Threading: called on the EventLoopRunnable.run() thread.
          +
          +
          Throws:
          +
          RobotCoreException - if a RobotCoreException is thrown, it will be handled + by the event loop manager. The manager may decide to either stop processing + this iteration of the loop, or it may decide to shut down the robot.
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          refreshUserTelemetry

          +
          public void refreshUserTelemetry(TelemetryMessage telemetry,
          +                                 double sInterval)
          +
          Description copied from interface: EventLoop
          +
          Update's the user portion of the driver station screen with the contents of the telemetry object + here provided if a sufficiently long duration has passed since the last update.
          +
          +
          Parameters:
          +
          telemetry - the telemetry object to send
          +
          sInterval - the required minimum interval. NaN indicates that a system default interval should be used.
          +
          +
        • +
        + + + +
          +
        • +

          teardown

          +
          public void teardown()
          +              throws RobotCoreException,
          +                     java.lang.InterruptedException
          +
          Description copied from interface: EventLoop
          +
          Teardown method, this will be called after the last call to loop. You should place your robot + into a safe state before this method exits, since there will be no more changes to communicate + with your robot. + + Threading: called on the EventLoopRunnable.run() thread.
          +
          +
          Specified by:
          +
          teardown in interface EventLoop
          +
          Overrides:
          +
          teardown in class FtcEventLoopBase
          +
          Throws:
          +
          RobotCoreException - if a RobotCoreException is thrown, it will be handled by the event + loop manager. The manager will then attempt to shut down the robot without the benefit + of the teardown method.
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          pendUsbDeviceAttachment

          +
          public void pendUsbDeviceAttachment(SerialNumber serialNumber,
          +                                    long time,
          +                                    java.util.concurrent.TimeUnit unit)
          +
        • +
        + + + +
          +
        • +

          onUsbDeviceAttached

          +
          public void onUsbDeviceAttached(android.hardware.usb.UsbDevice usbDevice)
          +
          Description copied from interface: EventLoop
          +
          Notifies the event loop that a UsbDevice has just been attached to the system. User interface + activities that receive UsbManager.ACTION_USB_DEVICE_ATTACHED notifications should retrieve + the UsbDevice using intent.getParcelableExtra(UsbManager.EXTRA_DEVICE) then pass that along + to this method in their event loop for processing. +

          + Implementations of this method should avoid doing significant processing during this notification. + Rather, they should squirrel the device away for processing during a later processedRecentlyAttachedUsbDevices + call. +

          +
          +
          Parameters:
          +
          usbDevice - the newly arrived device
          +
          See Also:
          +
          EventLoop.processedRecentlyAttachedUsbDevices()
          +
          +
        • +
        + + + + + + + +
          +
        • +

          handleUsbModuleDetach

          +
          public void handleUsbModuleDetach(RobotUsbModule module)
          +                           throws RobotCoreException,
          +                                  java.lang.InterruptedException
          +
          Description copied from interface: EventLoop
          +
          Process the fact that a usb module has now become detached from the system. This is called + on the EventLoop thread by the EventLoopManager; there is sufficient time and correct context + to, e.g., fully disarm and 'pretend' the associated module.
          +
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          See Also:
          +
          EventLoop.processedRecentlyAttachedUsbDevices()
          +
          +
        • +
        + + + +
          +
        • +

          handleUsbModuleAttach

          +
          public void handleUsbModuleAttach(RobotUsbModule module)
          +                           throws RobotCoreException,
          +                                  java.lang.InterruptedException
          +
          Description copied from interface: EventLoop
          +
          Process the fact that (we believe) that the indicated module has now reappeared after a + previously observed detachment.
          +
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          getOpModeManager

          +
          public OpModeManagerImpl getOpModeManager()
          +
          Description copied from interface: EventLoop
          +
          Returns the OpModeManager associated with this event loop
          +
          +
          Returns:
          +
          the OpModeManager associated with this event loop
          +
          +
        • +
        + + + +
          +
        • +

          requestOpModeStop

          +
          public void requestOpModeStop(OpMode opModeToStopIfActive)
          +
          Description copied from interface: EventLoop
          +
          Requests that an OpMode be stopped if it's the currently active one
          +
          +
          Parameters:
          +
          opModeToStopIfActive - the OpMode to stop if it's currently active
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcLynxFirmwareUpdateActivity.FwResponseStatus.html b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxFirmwareUpdateActivity.FwResponseStatus.html new file mode 100644 index 00000000000..3a3f613aa10 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxFirmwareUpdateActivity.FwResponseStatus.html @@ -0,0 +1,354 @@ + + + + + +FtcLynxFirmwareUpdateActivity.FwResponseStatus + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Enum FtcLynxFirmwareUpdateActivity.FwResponseStatus

    +
    +
    + +
    + +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static FtcLynxFirmwareUpdateActivity.FwResponseStatus[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (FtcLynxFirmwareUpdateActivity.FwResponseStatus c : FtcLynxFirmwareUpdateActivity.FwResponseStatus.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static FtcLynxFirmwareUpdateActivity.FwResponseStatus valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcLynxFirmwareUpdateActivity.ReceiveLoopCallback.html b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxFirmwareUpdateActivity.ReceiveLoopCallback.html new file mode 100644 index 00000000000..303015c3d8d --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxFirmwareUpdateActivity.ReceiveLoopCallback.html @@ -0,0 +1,284 @@ + + + + + +FtcLynxFirmwareUpdateActivity.ReceiveLoopCallback + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcLynxFirmwareUpdateActivity.ReceiveLoopCallback

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • RecvLoopRunnable.DegenerateCallback
      • +
      • +
          +
        • com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity.ReceiveLoopCallback
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      FtcLynxFirmwareUpdateActivity
      +
      +
      +
      +
      protected class FtcLynxFirmwareUpdateActivity.ReceiveLoopCallback
      +extends RecvLoopRunnable.DegenerateCallback
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + +
        Constructors 
        ModifierConstructor and Description
        protected ReceiveLoopCallback() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        CallbackResultcommandEvent(Command command) 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          ReceiveLoopCallback

          +
          protected ReceiveLoopCallback()
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcLynxFirmwareUpdateActivity.html b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxFirmwareUpdateActivity.html new file mode 100644 index 00000000000..e2821955550 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxFirmwareUpdateActivity.html @@ -0,0 +1,651 @@ + + + + + +FtcLynxFirmwareUpdateActivity + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcLynxFirmwareUpdateActivity

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • ThemedActivity
      • +
      • +
          +
        • com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class FtcLynxFirmwareUpdateActivity
      +extends ThemedActivity
      +
      FtcLynxFirmwareUpdateActivity manages the updating of the firmware on + all available attached lynx modules.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          networkConnectionHandler

          +
          protected NetworkConnectionHandler networkConnectionHandler
          +
        • +
        + + + +
          +
        • +

          recvLoopCallback

          +
          protected RecvLoopRunnable.RecvLoopCallback recvLoopCallback
          +
        • +
        + + + +
          +
        • +

          remoteConfigure

          +
          protected boolean remoteConfigure
          +
        • +
        + + + +
          +
        • +

          msResponseWait

          +
          protected int msResponseWait
          +
        • +
        + + + +
          +
        • +

          firmwareImageFile

          +
          protected FWImage firmwareImageFile
          +
        • +
        + + + + + + + +
          +
        • +

          enableUpdateButton

          +
          protected boolean enableUpdateButton
          +
        • +
        + + + +
          +
        • +

          cancelUpdate

          +
          protected boolean cancelUpdate
          +
        • +
        + + + + + + + + + + + + +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          FtcLynxFirmwareUpdateActivity

          +
          public FtcLynxFirmwareUpdateActivity()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getTag

          +
          public java.lang.String getTag()
          +
        • +
        + + + +
          +
        • +

          initializeDirectories

          +
          public static void initializeDirectories()
          +
        • +
        + + + +
          +
        • +

          onCreate

          +
          protected void onCreate(android.os.Bundle savedInstanceState)
          +
        • +
        + + + +
          +
        • +

          onStart

          +
          protected void onStart()
          +
        • +
        + + + +
          +
        • +

          onDestroy

          +
          protected void onDestroy()
          +
        • +
        + + + +
          +
        • +

          onUpdateLynxFirmwareClicked

          +
          public void onUpdateLynxFirmwareClicked(android.view.View view)
          +
        • +
        + + + +
          +
        • +

          onPause

          +
          protected void onPause()
          +
        • +
        + + + +
          +
        • +

          onStop

          +
          protected void onStop()
          +
        • +
        + + + + + + + +
          +
        • +

          getLynxModulesForFirmwareUpdate

          +
          protected java.util.List<USBAccessibleLynxModule> getLynxModulesForFirmwareUpdate()
          +
        • +
        + + + +
          +
        • +

          sendOrInject

          +
          protected void sendOrInject(Command cmd)
          +
        • +
        + + + + + +
          +
        • +

          awaitResponse

          +
          protected <T> T awaitResponse(java.util.concurrent.BlockingQueue<T> queue,
          +                              T defaultResponse)
          +
        • +
        + + + + + +
          +
        • +

          awaitResponse

          +
          protected <T> T awaitResponse(java.util.concurrent.BlockingQueue<T> queue,
          +                              T defaultResponse,
          +                              long time,
          +                              java.util.concurrent.TimeUnit timeUnit,
          +                              <any> status)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName.html b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName.html new file mode 100644 index 00000000000..47ca65da9d7 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName.html @@ -0,0 +1,349 @@ + + + + + +FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.AddressConfiguration.html b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.AddressConfiguration.html new file mode 100644 index 00000000000..ae1631ffb00 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.AddressConfiguration.html @@ -0,0 +1,387 @@ + + + + + +FtcLynxModuleAddressUpdateActivity.AddressConfiguration + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcLynxModuleAddressUpdateActivity.AddressConfiguration

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressConfiguration
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          starting

          +
          protected java.util.Map<SerialNumber,java.lang.Integer> starting
          +
        • +
        + + + +
          +
        • +

          current

          +
          protected java.util.Map<SerialNumber,java.lang.Integer> current
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          AddressConfiguration

          +
          public AddressConfiguration()
          +
        • +
        + + + + +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getStartingAddress

          +
          public int getStartingAddress(SerialNumber serialNumber)
          +
        • +
        + + + +
          +
        • +

          containsCurrentAddress

          +
          public boolean containsCurrentAddress(int address)
          +
        • +
        + + + +
          +
        • +

          putCurrentAddress

          +
          public void putCurrentAddress(SerialNumber serialNumber,
          +                              int address)
          +
        • +
        + + + +
          +
        • +

          getCurrentAddress

          +
          public int getCurrentAddress(SerialNumber serialNumber)
          +
        • +
        + + + +
          +
        • +

          findByCurrentAddress

          +
          public SerialNumber findByCurrentAddress(int address)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.DisplayedModule.html b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.DisplayedModule.html new file mode 100644 index 00000000000..8a43cef9dff --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.DisplayedModule.html @@ -0,0 +1,369 @@ + + + + + +FtcLynxModuleAddressUpdateActivity.DisplayedModule + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcLynxModuleAddressUpdateActivity.DisplayedModule

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModule
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          DisplayedModule

          +
          public DisplayedModule(android.view.View view)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getSerialNumber

          +
          public SerialNumber getSerialNumber()
          +
        • +
        + + + +
          +
        • +

          initialize

          +
          public void initialize(USBAccessibleLynxModule module,
          +                       java.util.List<java.lang.Integer> addresses)
          +
        • +
        + + + +
          +
        • +

          setNewAddress

          +
          public void setNewAddress(int newAddress)
          +
        • +
        + + + +
          +
        • +

          selectNoChange

          +
          protected void selectNoChange()
          +
        • +
        + + + + + + + +
          +
        • +

          getCurrentAddress

          +
          public int getCurrentAddress()
          +
        • +
        + + + +
          +
        • +

          getStartingAddress

          +
          public int getStartingAddress()
          +
        • +
        + + + +
          +
        • +

          initializeSpinnerList

          +
          protected void initializeSpinnerList(android.widget.Spinner spinner,
          +                                     java.util.List<java.lang.Integer> addresses,
          +                                     boolean changeable)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.DisplayedModuleList.html b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.DisplayedModuleList.html new file mode 100644 index 00000000000..fd824cd0b6c --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.DisplayedModuleList.html @@ -0,0 +1,405 @@ + + + + + +FtcLynxModuleAddressUpdateActivity.DisplayedModuleList + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcLynxModuleAddressUpdateActivity.DisplayedModuleList

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModuleList
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.ReceiveLoopCallback.html b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.ReceiveLoopCallback.html new file mode 100644 index 00000000000..22d8dd60c23 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.ReceiveLoopCallback.html @@ -0,0 +1,284 @@ + + + + + +FtcLynxModuleAddressUpdateActivity.ReceiveLoopCallback + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcLynxModuleAddressUpdateActivity.ReceiveLoopCallback

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • RecvLoopRunnable.DegenerateCallback
      • +
      • +
          +
        • com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.ReceiveLoopCallback
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      FtcLynxModuleAddressUpdateActivity
      +
      +
      +
      +
      protected class FtcLynxModuleAddressUpdateActivity.ReceiveLoopCallback
      +extends RecvLoopRunnable.DegenerateCallback
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + +
        Constructors 
        ModifierConstructor and Description
        protected ReceiveLoopCallback() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        CallbackResultcommandEvent(Command command) 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          ReceiveLoopCallback

          +
          protected ReceiveLoopCallback()
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.html b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.html new file mode 100644 index 00000000000..5082f0714e5 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcLynxModuleAddressUpdateActivity.html @@ -0,0 +1,583 @@ + + + + + +FtcLynxModuleAddressUpdateActivity + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcLynxModuleAddressUpdateActivity

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • EditActivity
      • +
      • +
          +
        • com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class FtcLynxModuleAddressUpdateActivity
      +extends EditActivity
      +
      FtcLynxModuleAddressUpdateActivity provides a means by which users can update + the (persistently stored) address of a Lynx Module
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          FtcLynxModuleAddressUpdateActivity

          +
          public FtcLynxModuleAddressUpdateActivity()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getTag

          +
          public java.lang.String getTag()
          +
        • +
        + + + +
          +
        • +

          onCreate

          +
          protected void onCreate(android.os.Bundle savedInstanceState)
          +
        • +
        + + + +
          +
        • +

          onStart

          +
          protected void onStart()
          +
        • +
        + + + +
          +
        • +

          onDestroy

          +
          protected void onDestroy()
          +
        • +
        + + + +
          +
        • +

          isDirty

          +
          protected boolean isDirty()
          +
        • +
        + + + +
          +
        • +

          onDoneButtonPressed

          +
          public void onDoneButtonPressed(android.view.View view)
          +
        • +
        + + + +
          +
        • +

          onCancelButtonPressed

          +
          public void onCancelButtonPressed(android.view.View view)
          +
        • +
        + + + +
          +
        • +

          onBackPressed

          +
          public void onBackPressed()
          +
        • +
        + + + +
          +
        • +

          doBackOrCancel

          +
          protected void doBackOrCancel()
          +
        • +
        + + + +
          +
        • +

          getUSBAccessibleLynxModules

          +
          protected java.util.List<USBAccessibleLynxModule> getUSBAccessibleLynxModules()
          +
        • +
        + + + + + +
          +
        • +

          awaitResponse

          +
          protected <T> T awaitResponse(java.util.concurrent.BlockingQueue<T> queue,
          +                              T defaultResponse)
          +
        • +
        + + + + + +
          +
        • +

          awaitResponse

          +
          protected <T> T awaitResponse(java.util.concurrent.BlockingQueue<T> queue,
          +                              T defaultResponse,
          +                              long time,
          +                              java.util.concurrent.TimeUnit timeUnit)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.FtcRobotControllerBinder.html b/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.FtcRobotControllerBinder.html new file mode 100644 index 00000000000..577a900689e --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.FtcRobotControllerBinder.html @@ -0,0 +1,318 @@ + + + + + +FtcRobotControllerService.FtcRobotControllerBinder + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcRobotControllerService.FtcRobotControllerBinder

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • android.os.Binder
      • +
      • +
          +
        • com.qualcomm.ftccommon.FtcRobotControllerService.FtcRobotControllerBinder
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.os.IBinder
      +
      +
      +
      Enclosing class:
      +
      FtcRobotControllerService
      +
      +
      +
      +
      public class FtcRobotControllerService.FtcRobotControllerBinder
      +extends android.os.Binder
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Nested Class Summary

        +
          +
        • + + +

          Nested classes/interfaces inherited from interface android.os.IBinder

          +android.os.IBinder.DeathRecipient
        • +
        +
      • +
      + +
        +
      • + + +

        Field Summary

        +
          +
        • + + +

          Fields inherited from interface android.os.IBinder

          +DUMP_TRANSACTION, FIRST_CALL_TRANSACTION, FLAG_ONEWAY, INTERFACE_TRANSACTION, LAST_CALL_TRANSACTION, LIKE_TRANSACTION, PING_TRANSACTION, TWEET_TRANSACTION
        • +
        +
      • +
      + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        FtcRobotControllerServicegetService() 
        +
          +
        • + + +

          Methods inherited from class android.os.Binder

          +attachInterface, clearCallingIdentity, dump, dump, dumpAsync, finalize, flushPendingCommands, getCallingPid, getCallingUid, getCallingUserHandle, getInterfaceDescriptor, isBinderAlive, joinThreadPool, linkToDeath, onTransact, pingBinder, queryLocalInterface, restoreCallingIdentity, transact, unlinkToDeath
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          FtcRobotControllerBinder

          +
          public FtcRobotControllerBinder()
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.html b/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.html new file mode 100644 index 00000000000..4b41f871684 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerService.html @@ -0,0 +1,631 @@ + + + + + +FtcRobotControllerService + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcRobotControllerService

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • android.content.Context
      • +
      • +
          +
        • android.content.ContextWrapper
        • +
        • +
            +
          • android.app.Service
          • +
          • +
              +
            • com.qualcomm.ftccommon.FtcRobotControllerService
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.content.ComponentCallbacks, android.content.ComponentCallbacks2, EventLoopManagerClient
      +
      +
      +
      +
      public class FtcRobotControllerService
      +extends android.app.Service
      +implements EventLoopManagerClient
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        static java.lang.StringTAG 
        +
          +
        • + + +

          Fields inherited from class android.app.Service

          +START_CONTINUATION_MASK, START_FLAG_REDELIVERY, START_FLAG_RETRY, START_NOT_STICKY, START_REDELIVER_INTENT, START_STICKY, START_STICKY_COMPATIBILITY
        • +
        +
          +
        • + + +

          Fields inherited from class android.content.Context

          +ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, FINGERPRINT_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
        • +
        +
          +
        • + + +

          Fields inherited from interface android.content.ComponentCallbacks2

          +TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
        • +
        +
      • +
      + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        NetworkConnectiongetNetworkConnection() 
        NetworkConnection.NetworkEventgetNetworkConnectionStatus() 
        RobotgetRobot() 
        RobotStatusgetRobotStatus() 
        WebServergetWebServer() 
        android.os.IBinderonBind(android.content.Intent intent) 
        voidonCreate() 
        voidonDestroy() 
        CallbackResultonNetworkConnectionEvent(NetworkConnection.NetworkEvent event) 
        voidonReceive(android.content.Context context, + android.content.Intent intent) 
        intonStartCommand(android.content.Intent intent, + int flags, + int startId) 
        booleanonUnbind(android.content.Intent intent) 
        voidsetCallback(UpdateUI.Callback callback) 
        voidsetupRobot(EventLoop eventLoop, + EventLoop idleEventLoop, + java.lang.Runnable runOnComplete) 
        voidshutdownRobot() 
        protected voidstartLEDS() 
        protected voidstopLEDS() 
        +
          +
        • + + +

          Methods inherited from class android.app.Service

          +dump, getApplication, onConfigurationChanged, onLowMemory, onRebind, onStart, onTaskRemoved, onTrimMemory, startForeground, stopForeground, stopSelf, stopSelf, stopSelfResult
        • +
        +
          +
        • + + +

          Methods inherited from class android.content.ContextWrapper

          +attachBaseContext, bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getSystemService, getSystemServiceName, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setTheme, setWallpaper, setWallpaper, startActivities, startActivities, startActivity, startActivity, startInstrumentation, startIntentSender, startIntentSender, startService, stopService, unbindService, unregisterReceiver
        • +
        +
          +
        • + + +

          Methods inherited from class android.content.Context

          +getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          FtcRobotControllerService

          +
          public FtcRobotControllerService()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onReceive

          +
          public void onReceive(android.content.Context context,
          +                      android.content.Intent intent)
          +
        • +
        + + + +
          +
        • +

          getNetworkConnection

          +
          public NetworkConnection getNetworkConnection()
          +
        • +
        + + + +
          +
        • +

          getNetworkConnectionStatus

          +
          public NetworkConnection.NetworkEvent getNetworkConnectionStatus()
          +
        • +
        + + + +
          +
        • +

          getRobotStatus

          +
          public RobotStatus getRobotStatus()
          +
        • +
        + + + +
          +
        • +

          getRobot

          +
          public Robot getRobot()
          +
        • +
        + + + + + + + +
          +
        • +

          onCreate

          +
          public void onCreate()
          +
          +
          Overrides:
          +
          onCreate in class android.app.Service
          +
          +
        • +
        + + + +
          +
        • +

          onStartCommand

          +
          public int onStartCommand(android.content.Intent intent,
          +                          int flags,
          +                          int startId)
          +
          +
          Overrides:
          +
          onStartCommand in class android.app.Service
          +
          +
        • +
        + + + +
          +
        • +

          onBind

          +
          public android.os.IBinder onBind(android.content.Intent intent)
          +
          +
          Specified by:
          +
          onBind in class android.app.Service
          +
          +
        • +
        + + + +
          +
        • +

          onUnbind

          +
          public boolean onUnbind(android.content.Intent intent)
          +
          +
          Overrides:
          +
          onUnbind in class android.app.Service
          +
          +
        • +
        + + + +
          +
        • +

          onDestroy

          +
          public void onDestroy()
          +
          +
          Overrides:
          +
          onDestroy in class android.app.Service
          +
          +
        • +
        + + + +
          +
        • +

          startLEDS

          +
          protected void startLEDS()
          +
        • +
        + + + +
          +
        • +

          stopLEDS

          +
          protected void stopLEDS()
          +
        • +
        + + + + + + + +
          +
        • +

          setupRobot

          +
          public void setupRobot(EventLoop eventLoop,
          +                       EventLoop idleEventLoop,
          +                       java.lang.Runnable runOnComplete)
          +
        • +
        + + + +
          +
        • +

          shutdownRobot

          +
          public void shutdownRobot()
          +
        • +
        + + + +
          +
        • +

          onNetworkConnectionEvent

          +
          public CallbackResult onNetworkConnectionEvent(NetworkConnection.NetworkEvent event)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerSettingsActivity.SettingsFragment.html b/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerSettingsActivity.SettingsFragment.html new file mode 100644 index 00000000000..734444bd536 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerSettingsActivity.SettingsFragment.html @@ -0,0 +1,362 @@ + + + + + +FtcRobotControllerSettingsActivity.SettingsFragment + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcRobotControllerSettingsActivity.SettingsFragment

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • android.app.Fragment
      • +
      • +
          +
        • android.preference.PreferenceFragment
        • +
        • +
            +
          • com.qualcomm.ftccommon.FtcRobotControllerSettingsActivity.SettingsFragment
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.content.ComponentCallbacks, android.content.ComponentCallbacks2, android.view.View.OnCreateContextMenuListener
      +
      +
      +
      Enclosing class:
      +
      FtcRobotControllerSettingsActivity
      +
      +
      +
      +
      public static class FtcRobotControllerSettingsActivity.SettingsFragment
      +extends android.preference.PreferenceFragment
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Nested Class Summary

        +
          +
        • + + +

          Nested classes/interfaces inherited from class android.preference.PreferenceFragment

          +android.preference.PreferenceFragment.OnPreferenceStartFragmentCallback
        • +
        +
          +
        • + + +

          Nested classes/interfaces inherited from class android.app.Fragment

          +android.app.Fragment.InstantiationException, android.app.Fragment.SavedState
        • +
        +
      • +
      + +
        +
      • + + +

        Field Summary

        +
          +
        • + + +

          Fields inherited from interface android.content.ComponentCallbacks2

          +TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        SettingsFragment() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        voidonActivityResult(int request, + int result, + android.content.Intent intent) 
        voidonCreate(android.os.Bundle savedInstanceState) 
        +
          +
        • + + +

          Methods inherited from class android.preference.PreferenceFragment

          +addPreferencesFromIntent, addPreferencesFromResource, findPreference, getPreferenceManager, getPreferenceScreen, onActivityCreated, onCreateView, onDestroy, onDestroyView, onPreferenceTreeClick, onSaveInstanceState, onStart, onStop, setPreferenceScreen
        • +
        +
          +
        • + + +

          Methods inherited from class android.app.Fragment

          +dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isVisible, onAttach, onAttach, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDetach, onHiddenChanged, onInflate, onInflate, onInflate, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onTrimMemory, onViewCreated, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, toString, unregisterForContextMenu
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          SettingsFragment

          +
          public SettingsFragment()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onCreate

          +
          public void onCreate(android.os.Bundle savedInstanceState)
          +
          +
          Overrides:
          +
          onCreate in class android.preference.PreferenceFragment
          +
          +
        • +
        + + + +
          +
        • +

          onActivityResult

          +
          public void onActivityResult(int request,
          +                             int result,
          +                             android.content.Intent intent)
          +
          +
          Overrides:
          +
          onActivityResult in class android.preference.PreferenceFragment
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerSettingsActivity.html b/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerSettingsActivity.html new file mode 100644 index 00000000000..5000f8f87b7 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcRobotControllerSettingsActivity.html @@ -0,0 +1,305 @@ + + + + + +FtcRobotControllerSettingsActivity + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcRobotControllerSettingsActivity

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • ThemedActivity
      • +
      • +
          +
        • com.qualcomm.ftccommon.FtcRobotControllerSettingsActivity
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class FtcRobotControllerSettingsActivity
      +extends ThemedActivity
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          FtcRobotControllerSettingsActivity

          +
          public FtcRobotControllerSettingsActivity()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getTag

          +
          public java.lang.String getTag()
          +
        • +
        + + + +
          +
        • +

          onCreate

          +
          protected void onCreate(android.os.Bundle savedInstanceState)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectChannelSelectorActivity.WifiChannelItemAdapter.html b/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectChannelSelectorActivity.WifiChannelItemAdapter.html new file mode 100644 index 00000000000..03e9074b056 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectChannelSelectorActivity.WifiChannelItemAdapter.html @@ -0,0 +1,336 @@ + + + + + +FtcWifiDirectChannelSelectorActivity.WifiChannelItemAdapter + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcWifiDirectChannelSelectorActivity.WifiChannelItemAdapter

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • android.widget.BaseAdapter
      • +
      • +
          +
        • android.widget.ArrayAdapter<WifiDirectChannelAndDescription>
        • +
        • +
            +
          • com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity.WifiChannelItemAdapter
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.widget.Adapter, android.widget.Filterable, android.widget.ListAdapter, android.widget.SpinnerAdapter, android.widget.ThemedSpinnerAdapter
      +
      +
      +
      Enclosing class:
      +
      FtcWifiDirectChannelSelectorActivity
      +
      +
      +
      +
      protected class FtcWifiDirectChannelSelectorActivity.WifiChannelItemAdapter
      +extends android.widget.ArrayAdapter<WifiDirectChannelAndDescription>
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        +
          +
        • + + +

          Fields inherited from interface android.widget.Adapter

          +IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        WifiChannelItemAdapter(android.content.Context context, + int resource, + WifiDirectChannelAndDescription[] objects) 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        android.view.ViewgetView(int position, + android.view.View convertView, + android.view.ViewGroup parent) 
        +
          +
        • + + +

          Methods inherited from class android.widget.ArrayAdapter

          +add, addAll, addAll, clear, createFromResource, getContext, getCount, getDropDownView, getDropDownViewTheme, getFilter, getItem, getItemId, getPosition, insert, notifyDataSetChanged, remove, setDropDownViewResource, setDropDownViewTheme, setNotifyOnChange, sort
        • +
        +
          +
        • + + +

          Methods inherited from class android.widget.BaseAdapter

          +areAllItemsEnabled, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
          +
        • + + +

          Methods inherited from interface android.widget.Adapter

          +getItemViewType, getViewTypeCount, hasStableIds, isEmpty, registerDataSetObserver, unregisterDataSetObserver
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          WifiChannelItemAdapter

          +
          public WifiChannelItemAdapter(android.content.Context context,
          +                              int resource,
          +                              WifiDirectChannelAndDescription[] objects)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getView

          +
          public android.view.View getView(int position,
          +                                 android.view.View convertView,
          +                                 android.view.ViewGroup parent)
          +
          +
          Specified by:
          +
          getView in interface android.widget.Adapter
          +
          Overrides:
          +
          getView in class android.widget.ArrayAdapter<WifiDirectChannelAndDescription>
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectChannelSelectorActivity.html b/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectChannelSelectorActivity.html new file mode 100644 index 00000000000..29bae091f7d --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectChannelSelectorActivity.html @@ -0,0 +1,438 @@ + + + + + +FtcWifiDirectChannelSelectorActivity + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcWifiDirectChannelSelectorActivity

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • ThemedActivity
      • +
      • +
          +
        • com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.widget.AdapterView.OnItemClickListener
      +
      +
      +
      +
      public class FtcWifiDirectChannelSelectorActivity
      +extends ThemedActivity
      +implements android.widget.AdapterView.OnItemClickListener
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        static java.lang.StringTAG 
        +
      • +
      + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        protected android.widget.ArrayAdapter<WifiDirectChannelAndDescription>getAdapter(android.widget.AdapterView<?> av) 
        java.lang.StringgetTag() 
        protected voidloadAdapter(android.widget.ListView itemsListView) 
        protected voidonCreate(android.os.Bundle savedInstanceState) 
        protected voidonDestroy() 
        voidonItemClick(android.widget.AdapterView<?> parent, + android.view.View view, + int position, + long id) 
        protected voidonStart() 
        voidonWifiSettingsClicked(android.view.View view) 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          FtcWifiDirectChannelSelectorActivity

          +
          public FtcWifiDirectChannelSelectorActivity()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getTag

          +
          public java.lang.String getTag()
          +
        • +
        + + + +
          +
        • +

          onCreate

          +
          protected void onCreate(android.os.Bundle savedInstanceState)
          +
        • +
        + + + +
          +
        • +

          onStart

          +
          protected void onStart()
          +
        • +
        + + + +
          +
        • +

          onDestroy

          +
          protected void onDestroy()
          +
        • +
        + + + +
          +
        • +

          getAdapter

          +
          protected android.widget.ArrayAdapter<WifiDirectChannelAndDescription> getAdapter(android.widget.AdapterView<?> av)
          +
        • +
        + + + +
          +
        • +

          loadAdapter

          +
          protected void loadAdapter(android.widget.ListView itemsListView)
          +
        • +
        + + + +
          +
        • +

          onItemClick

          +
          public void onItemClick(android.widget.AdapterView<?> parent,
          +                        android.view.View view,
          +                        int position,
          +                        long id)
          +
          +
          Specified by:
          +
          onItemClick in interface android.widget.AdapterView.OnItemClickListener
          +
          +
        • +
        + + + +
          +
        • +

          onWifiSettingsClicked

          +
          public void onWifiSettingsClicked(android.view.View view)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectRememberedGroupsActivity.RecvLoopCallback.html b/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectRememberedGroupsActivity.RecvLoopCallback.html new file mode 100644 index 00000000000..ee8ee8ee8fb --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectRememberedGroupsActivity.RecvLoopCallback.html @@ -0,0 +1,279 @@ + + + + + +FtcWifiDirectRememberedGroupsActivity.RecvLoopCallback + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcWifiDirectRememberedGroupsActivity.RecvLoopCallback

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • RecvLoopRunnable.DegenerateCallback
      • +
      • +
          +
        • com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity.RecvLoopCallback
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      FtcWifiDirectRememberedGroupsActivity
      +
      +
      +
      +
      protected class FtcWifiDirectRememberedGroupsActivity.RecvLoopCallback
      +extends RecvLoopRunnable.DegenerateCallback
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + +
        Constructors 
        ModifierConstructor and Description
        protected RecvLoopCallback() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        CallbackResultcommandEvent(Command command) 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          RecvLoopCallback

          +
          protected RecvLoopCallback()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          commandEvent

          +
          public CallbackResult commandEvent(Command command)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectRememberedGroupsActivity.WifiP2pGroupItemAdapter.html b/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectRememberedGroupsActivity.WifiP2pGroupItemAdapter.html new file mode 100644 index 00000000000..56293271ec4 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectRememberedGroupsActivity.WifiP2pGroupItemAdapter.html @@ -0,0 +1,292 @@ + + + + + +FtcWifiDirectRememberedGroupsActivity.WifiP2pGroupItemAdapter + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcWifiDirectRememberedGroupsActivity.WifiP2pGroupItemAdapter

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • android.widget.BaseAdapter
      • +
      • +
          +
        • android.widget.ArrayAdapter<WifiDirectGroupName>
        • +
        • +
            +
          • com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity.WifiP2pGroupItemAdapter
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.widget.Adapter, android.widget.Filterable, android.widget.ListAdapter, android.widget.SpinnerAdapter, android.widget.ThemedSpinnerAdapter
      +
      +
      +
      Enclosing class:
      +
      FtcWifiDirectRememberedGroupsActivity
      +
      +
      +
      +
      protected class FtcWifiDirectRememberedGroupsActivity.WifiP2pGroupItemAdapter
      +extends android.widget.ArrayAdapter<WifiDirectGroupName>
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        +
          +
        • + + +

          Fields inherited from interface android.widget.Adapter

          +IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        WifiP2pGroupItemAdapter(android.content.Context context, + int resource, + java.util.List<WifiDirectGroupName> objects) 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        +
          +
        • + + +

          Methods inherited from class android.widget.ArrayAdapter

          +add, addAll, addAll, clear, createFromResource, getContext, getCount, getDropDownView, getDropDownViewTheme, getFilter, getItem, getItemId, getPosition, getView, insert, notifyDataSetChanged, remove, setDropDownViewResource, setDropDownViewTheme, setNotifyOnChange, sort
        • +
        +
          +
        • + + +

          Methods inherited from class android.widget.BaseAdapter

          +areAllItemsEnabled, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
          +
        • + + +

          Methods inherited from interface android.widget.Adapter

          +getItemViewType, getViewTypeCount, hasStableIds, isEmpty, registerDataSetObserver, unregisterDataSetObserver
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          WifiP2pGroupItemAdapter

          +
          public WifiP2pGroupItemAdapter(android.content.Context context,
          +                               int resource,
          +                               java.util.List<WifiDirectGroupName> objects)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectRememberedGroupsActivity.html b/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectRememberedGroupsActivity.html new file mode 100644 index 00000000000..4231469bce1 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/FtcWifiDirectRememberedGroupsActivity.html @@ -0,0 +1,471 @@ + + + + + +FtcWifiDirectRememberedGroupsActivity + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class FtcWifiDirectRememberedGroupsActivity

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • ThemedActivity
      • +
      • +
          +
        • com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class FtcWifiDirectRememberedGroupsActivity
      +extends ThemedActivity
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          FtcWifiDirectRememberedGroupsActivity

          +
          public FtcWifiDirectRememberedGroupsActivity()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getTag

          +
          public java.lang.String getTag()
          +
        • +
        + + + +
          +
        • +

          onCreate

          +
          protected void onCreate(android.os.Bundle savedInstanceState)
          +
        • +
        + + + +
          +
        • +

          onStart

          +
          protected void onStart()
          +
        • +
        + + + +
          +
        • +

          onDestroy

          +
          protected void onDestroy()
          +
        • +
        + + + +
          +
        • +

          loadLocalGroups

          +
          protected void loadLocalGroups()
          +
        • +
        + + + +
          +
        • +

          requestRememberedGroups

          +
          protected void requestRememberedGroups()
          +
        • +
        + + + +
          +
        • +

          handleCommandRequestRememberedGroupsResp

          +
          protected CallbackResult handleCommandRequestRememberedGroupsResp(java.lang.String extra)
          +                                                           throws RobotCoreException
          +
          +
          Throws:
          +
          RobotCoreException
          +
          +
        • +
        + + + +
          +
        • +

          handleRememberedGroupsChanged

          +
          protected CallbackResult handleRememberedGroupsChanged()
          +
        • +
        + + + +
          +
        • +

          getLocalGroupList

          +
          protected java.util.List<WifiDirectGroupName> getLocalGroupList()
          +
        • +
        + + + +
          +
        • +

          loadGroupList

          +
          protected void loadGroupList(java.util.List<WifiDirectGroupName> names)
          +
        • +
        + + + +
          +
        • +

          onClearRememberedGroupsClicked

          +
          public void onClearRememberedGroupsClicked(android.view.View view)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/LaunchActivityConstantsList.RequestCode.html b/doc/javadoc/com/qualcomm/ftccommon/LaunchActivityConstantsList.RequestCode.html new file mode 100644 index 00000000000..042f3d907f1 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/LaunchActivityConstantsList.RequestCode.html @@ -0,0 +1,416 @@ + + + + + +LaunchActivityConstantsList.RequestCode + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Enum LaunchActivityConstantsList.RequestCode

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/LaunchActivityConstantsList.html b/doc/javadoc/com/qualcomm/ftccommon/LaunchActivityConstantsList.html new file mode 100644 index 00000000000..63467fb1950 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/LaunchActivityConstantsList.html @@ -0,0 +1,356 @@ + + + + + +LaunchActivityConstantsList + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class LaunchActivityConstantsList

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.LaunchActivityConstantsList
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class LaunchActivityConstantsList
      +extends java.lang.Object
      +
      List of RobotCore Robocol commands used by the FIRST apps
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Nested Class Summary

        + + + + + + + + + + +
        Nested Classes 
        Modifier and TypeClass and Description
        static class LaunchActivityConstantsList.RequestCode +
        Used internally to distinguish the results coming back from various launched + (sub)activities
        +
        +
      • +
      + + + + + +
        +
      • + + +

        Method Summary

        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          ZTE_WIFI_CHANNEL_EDITOR_PACKAGE

          +
          public static final java.lang.String ZTE_WIFI_CHANNEL_EDITOR_PACKAGE
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          VIEW_LOGS_ACTIVITY_FILENAME

          +
          public static final java.lang.String VIEW_LOGS_ACTIVITY_FILENAME
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          RC_WEB_INFO

          +
          public static final java.lang.String RC_WEB_INFO
          +
          The intent extra name for JSON encoded org.firstinspires.ftc.robotcore.internal.webserver.RobotControllerWebInfo used when launching + RemoteProgrammingModeActivity on the driver station.
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          PROGRAMMING_MODE_ACTIVITY_PROGRAMMING_WEB_HANDLERS

          +
          public static final java.lang.String PROGRAMMING_MODE_ACTIVITY_PROGRAMMING_WEB_HANDLERS
          +
          Used to pass in ProgrammingWebHandlers to a local activity
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          LaunchActivityConstantsList

          +
          public LaunchActivityConstantsList()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/ProgrammingModeController.html b/doc/javadoc/com/qualcomm/ftccommon/ProgrammingModeController.html new file mode 100644 index 00000000000..27d69f06a32 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/ProgrammingModeController.html @@ -0,0 +1,255 @@ + + + + + +ProgrammingModeController + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Interface ProgrammingModeController

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface ProgrammingModeController
      +
      Declares the interface for starting and stopping programming mode when requested from the driver + station.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          isActive

          +
          boolean isActive()
          +
          Returns true if programming mode is active; false otherwise.
          +
        • +
        + + + +
          +
        • +

          startProgrammingMode

          +
          void startProgrammingMode(FtcEventLoopHandler ftcEventLoopHandler)
          +
          Starts programming mode.
          +
        • +
        + + + +
          +
        • +

          stopProgrammingMode

          +
          void stopProgrammingMode()
          +
          Stops programming mode.
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/Restarter.html b/doc/javadoc/com/qualcomm/ftccommon/Restarter.html new file mode 100644 index 00000000000..109462d894c --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/Restarter.html @@ -0,0 +1,218 @@ + + + + + +Restarter + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Interface Restarter

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface Restarter
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          requestRestart

          +
          void requestRestart()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.CurrentlyPlaying.html b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.CurrentlyPlaying.html new file mode 100644 index 00000000000..8dd49221648 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.CurrentlyPlaying.html @@ -0,0 +1,349 @@ + + + + + +SoundPlayer.CurrentlyPlaying + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class SoundPlayer.CurrentlyPlaying

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.SoundPlayer.CurrentlyPlaying
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      SoundPlayer
      +
      +
      +
      +
      protected static class SoundPlayer.CurrentlyPlaying
      +extends java.lang.Object
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        protected intloopControl 
        protected longmsFinish 
        protected java.lang.RunnablerunWhenFinished 
        protected intstreamId 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + +
        Constructors 
        ModifierConstructor and Description
        protected CurrentlyPlaying() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        protected booleanisLooping() 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          msFinish

          +
          protected long msFinish
          +
        • +
        + + + +
          +
        • +

          streamId

          +
          protected int streamId
          +
        • +
        + + + +
          +
        • +

          loopControl

          +
          protected int loopControl
          +
        • +
        + + + +
          +
        • +

          runWhenFinished

          +
          protected java.lang.Runnable runWhenFinished
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          CurrentlyPlaying

          +
          protected CurrentlyPlaying()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          isLooping

          +
          protected boolean isLooping()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.InstanceHolder.html b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.InstanceHolder.html new file mode 100644 index 00000000000..b972982fca7 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.InstanceHolder.html @@ -0,0 +1,276 @@ + + + + + +SoundPlayer.InstanceHolder + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class SoundPlayer.InstanceHolder

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.SoundPlayer.InstanceHolder
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      SoundPlayer
      +
      +
      +
      +
      protected static class SoundPlayer.InstanceHolder
      +extends java.lang.Object
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + +
        Constructors 
        ModifierConstructor and Description
        protected InstanceHolder() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          InstanceHolder

          +
          protected InstanceHolder()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.LoadedSoundCache.html b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.LoadedSoundCache.html new file mode 100644 index 00000000000..46c03145df0 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.LoadedSoundCache.html @@ -0,0 +1,313 @@ + + + + + +SoundPlayer.LoadedSoundCache + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class SoundPlayer.LoadedSoundCache

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.SoundPlayer.LoadedSoundCache
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      SoundPlayer
      +
      +
      +
      +
      protected class SoundPlayer.LoadedSoundCache
      +extends java.lang.Object
      +
      SoundPlayer.LoadedSoundCache keeps track of loaded sounds, mapping sound resource id to loaded + sound id. It keeps track of which sounds have been recently used, and unloads neglected + songs when a configured capacity of loaded sounds has been reached.
      +
    • +
    +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.PlaySoundParams.html b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.PlaySoundParams.html new file mode 100644 index 00000000000..d81ec6340a8 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.PlaySoundParams.html @@ -0,0 +1,383 @@ + + + + + +SoundPlayer.PlaySoundParams + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class SoundPlayer.PlaySoundParams

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.SoundPlayer.PlaySoundParams
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      SoundPlayer
      +
      +
      +
      +
      public static class SoundPlayer.PlaySoundParams
      +extends java.lang.Object
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        intloopControl +
        -1 means playing loops forever, 0 is play once, 1 is play twice, etc
        +
        floatrate +
        playback rate (1.0 = normal playback, range 0.5 to 2.0)
        +
        floatvolume +
        an additional volume scaling that will be applied to this particular play action
        +
        booleanwaitForNonLoopingSoundsToFinish +
        whether to wait for any currently-playing non-looping sound to finish before playing
        +
        +
      • +
      + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        booleanisLooping() 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          volume

          +
          public float volume
          +
          an additional volume scaling that will be applied to this particular play action
          +
        • +
        + + + +
          +
        • +

          waitForNonLoopingSoundsToFinish

          +
          public boolean waitForNonLoopingSoundsToFinish
          +
          whether to wait for any currently-playing non-looping sound to finish before playing
          +
        • +
        + + + +
          +
        • +

          loopControl

          +
          public int loopControl
          +
          -1 means playing loops forever, 0 is play once, 1 is play twice, etc
          +
        • +
        + + + +
          +
        • +

          rate

          +
          public float rate
          +
          playback rate (1.0 = normal playback, range 0.5 to 2.0)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          PlaySoundParams

          +
          public PlaySoundParams()
          +
        • +
        + + + +
          +
        • +

          PlaySoundParams

          +
          public PlaySoundParams(boolean wait)
          +
        • +
        + + + + +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          isLooping

          +
          public boolean isLooping()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.SoundFromFile.html b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.SoundFromFile.html new file mode 100644 index 00000000000..8e3ae4b0cf4 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.SoundFromFile.html @@ -0,0 +1,222 @@ + + + + + +SoundPlayer.SoundFromFile + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Interface SoundPlayer.SoundFromFile

    +
    +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      SoundPlayer
      +
      +
      +
      +
      protected static interface SoundPlayer.SoundFromFile
      +
    • +
    +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.SoundInfo.html b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.SoundInfo.html new file mode 100644 index 00000000000..7cb849132a3 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.SoundInfo.html @@ -0,0 +1,487 @@ + + + + + +SoundPlayer.SoundInfo + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class SoundPlayer.SoundInfo

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • RefCounted
      • +
      • +
          +
        • com.qualcomm.ftccommon.SoundPlayer.SoundInfo
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      SoundPlayer
      +
      +
      +
      +
      protected class SoundPlayer.SoundInfo
      +extends RefCounted
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + + +
        Constructors 
        Constructor and Description
        SoundInfo(android.content.Context context, + int resourceId, + int msDuration) 
        SoundInfo(java.io.File file, + int msDuration) 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        protected java.lang.StringcomputeHash() 
        protected voiddestructor() 
        java.io.InputStreamgetInputStream() 
        java.lang.ObjectgetKey() 
        voidinitialize(int sampleId) 
        java.lang.StringtoString() 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          context

          +
          public final android.content.Context context
          +
        • +
        + + + +
          +
        • +

          resourceId

          +
          public final int resourceId
          +
        • +
        + + + +
          +
        • +

          file

          +
          public final java.io.File file
          +
        • +
        + + + +
          +
        • +

          msDuration

          +
          public final long msDuration
          +
        • +
        + + + +
          +
        • +

          sampleId

          +
          public int sampleId
          +
        • +
        + + + +
          +
        • +

          hashString

          +
          public java.lang.String hashString
          +
        • +
        + + + +
          +
        • +

          cbSize

          +
          public int cbSize
          +
        • +
        + + + +
          +
        • +

          msLastPlay

          +
          public long msLastPlay
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          SoundInfo

          +
          public SoundInfo(android.content.Context context,
          +                 int resourceId,
          +                 int msDuration)
          +
        • +
        + + + +
          +
        • +

          SoundInfo

          +
          public SoundInfo(java.io.File file,
          +                 int msDuration)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
        • +
        + + + +
          +
        • +

          initialize

          +
          public void initialize(int sampleId)
          +
        • +
        + + + +
          +
        • +

          destructor

          +
          protected void destructor()
          +
        • +
        + + + +
          +
        • +

          getInputStream

          +
          public java.io.InputStream getInputStream()
          +
        • +
        + + + +
          +
        • +

          computeHash

          +
          protected java.lang.String computeHash()
          +
        • +
        + + + +
          +
        • +

          getKey

          +
          public java.lang.Object getKey()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.StopWhat.html b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.StopWhat.html new file mode 100644 index 00000000000..c148bd68d7d --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.StopWhat.html @@ -0,0 +1,342 @@ + + + + + +SoundPlayer.StopWhat + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Enum SoundPlayer.StopWhat

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        All 
        Loops 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static SoundPlayer.StopWhatvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static SoundPlayer.StopWhat[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static SoundPlayer.StopWhat[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (SoundPlayer.StopWhat c : SoundPlayer.StopWhat.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static SoundPlayer.StopWhat valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.html b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.html new file mode 100644 index 00000000000..c720a7ed638 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/SoundPlayer.html @@ -0,0 +1,1247 @@ + + + + + +SoundPlayer + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class SoundPlayer

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.SoundPlayer
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.media.SoundPool.OnLoadCompleteListener
      +
      +
      +
      +
      public class SoundPlayer
      +extends java.lang.Object
      +implements android.media.SoundPool.OnLoadCompleteListener
      +
      SoundPlayer is a simple utility class that plays sounds on the phone. The class + is used through its singleton instance.
      +
      +
      See Also:
      +
      startPlaying(android.content.Context, int)
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          TRACE

          +
          public static boolean TRACE
          +
        • +
        + + + +
          +
        • +

          tracer

          +
          protected Tracer tracer
          +
        • +
        + + + +
          +
        • +

          msSoundTransmissionFreshness

          +
          public static final int msSoundTransmissionFreshness
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          lock

          +
          protected final java.lang.Object lock
          +
        • +
        + + + +
          +
        • +

          isRobotController

          +
          protected final boolean isRobotController
          +
        • +
        + + + +
          +
        • +

          soundPool

          +
          protected android.media.SoundPool soundPool
          +
        • +
        + + + +
          +
        • +

          currentlyLoadingLatch

          +
          protected java.util.concurrent.CountDownLatch currentlyLoadingLatch
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          threadPool

          +
          protected java.util.concurrent.ExecutorService threadPool
          +
        • +
        + + + +
          +
        • +

          scheduledThreadPool

          +
          protected java.util.concurrent.ScheduledExecutorService scheduledThreadPool
          +
        • +
        + + + +
          +
        • +

          sharedPreferences

          +
          protected android.content.SharedPreferences sharedPreferences
          +
        • +
        + + + +
          +
        • +

          soundOnVolume

          +
          protected float soundOnVolume
          +
        • +
        + + + +
          +
        • +

          soundOffVolume

          +
          protected float soundOffVolume
          +
        • +
        + + + +
          +
        • +

          masterVolume

          +
          protected float masterVolume
          +
        • +
        + + + +
          +
        • +

          mediaSizer

          +
          protected android.media.MediaPlayer mediaSizer
          +
        • +
        + + + + +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          SoundPlayer

          +
          public SoundPlayer(int simultaneousStreams,
          +                   int cacheSize)
          +
          Instantiates a new sound player.
          +
          +
          Parameters:
          +
          simultaneousStreams - the number of sounds that can simultaneously play from this player. + If one, then playing any new sound interrupts the playing of a + a previous sound
          +
          cacheSize - the maximum size of the cache of loaded sounds.
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getInstance

          +
          public static SoundPlayer getInstance()
          +
        • +
        + + + +
          +
        • +

          close

          +
          public void close()
          +
        • +
        + + + +
          +
        • +

          prefillSoundCache

          +
          public void prefillSoundCache(int... resourceIds)
          +
          Ensures that these local sounds are also in the local cache
          +
        • +
        + + + +
          +
        • +

          startPlaying

          +
          public void startPlaying(android.content.Context context,
          +                         int resId)
          +
          Asynchronously loads the indicated sound from its resource (if not already loaded), then + initiates its play once any current non-looping sound is finished playing.
          +
          +
          Parameters:
          +
          context - the context in which resId is to be interpreted
          +
          resId - the resource id of the raw resource containing the sound.
          +
          +
        • +
        + + + +
          +
        • +

          startPlaying

          +
          public void startPlaying(android.content.Context context,
          +                         java.io.File file)
          +
        • +
        + + + +
          +
        • +

          startPlaying

          +
          public void startPlaying(android.content.Context context,
          +                         int resId,
          +                         SoundPlayer.PlaySoundParams params,
          +                         <any> runWhenStarted,
          +                         java.lang.Runnable runWhenFinished)
          +
          Asynchronously loads the indicated sound from its resource (if not already loaded), then + initiates its play, optionally waiting for any currently non-looping playing sounds to finish first.
          +
          +
          Parameters:
          +
          context - the context in which resId is to be interpreted
          +
          resId - the resource id of the raw resource containing the sound.
          +
          params - controls how the playback proceeds
          +
          runWhenStarted - executed when the stream starts to play
          +
          runWhenFinished - executed when the stream finishes playing
          +
          +
        • +
        + + + +
          +
        • +

          startPlaying

          +
          public void startPlaying(android.content.Context context,
          +                         java.io.File file,
          +                         SoundPlayer.PlaySoundParams params,
          +                         <any> runWhenStarted,
          +                         java.lang.Runnable runWhenFinished)
          +
        • +
        + + + +
          +
        • +

          stopPlayingAll

          +
          public void stopPlayingAll()
          +
          Stops playing all sounds that are currently playing
          +
        • +
        + + + +
          +
        • +

          stopPlayingLoops

          +
          public void stopPlayingLoops()
          +
          Stops playing all sounds that are currently playing in a loop
          +
        • +
        + + + + + + + +
          +
        • +

          preload

          +
          public boolean preload(android.content.Context context,
          +                       int resourceId)
          +
          Preloads the sound so as to to reduce delays if the sound is subsequently played.
          +
        • +
        + + + +
          +
        • +

          preload

          +
          public boolean preload(android.content.Context context,
          +                       java.io.File file)
          +
          Preloads the sound so as to to reduce delays if the sound is subsequently played.
          +
        • +
        + + + +
          +
        • +

          setMasterVolume

          +
          public void setMasterVolume(float masterVolume)
          +
          Sets the master volume control that is applied to all played sounds
          +
          +
          See Also:
          +
          getMasterVolume()
          +
          +
        • +
        + + + +
          +
        • +

          getMasterVolume

          +
          public float getMasterVolume()
          +
          Returns the master volume control that is applied to all played sounds
          +
          +
          See Also:
          +
          setMasterVolume(float)
          +
          +
        • +
        + + + +
          +
        • +

          play

          +
          @Deprecated
          +public void play(android.content.Context context,
          +                              int resId)
          +
          Deprecated. use startPlaying(Context, int) instead
          +
        • +
        + + + +
          +
        • +

          play

          +
          @Deprecated
          +public void play(android.content.Context context,
          +                              int resId,
          +                              boolean waitForCompletion)
          +
          Deprecated. use #startPlaying(Context, int, PlaySoundParams, Consumer, Runnable) instead
          +
        • +
        + + + +
          +
        • +

          loadAndStartPlaying

          +
          protected void loadAndStartPlaying(android.content.Context context,
          +                                   int resourceId,
          +                                   SoundPlayer.PlaySoundParams params,
          +                                   <any> runWhenStarted,
          +                                   java.lang.Runnable runWhenFinished)
          +
        • +
        + + + +
          +
        • +

          loadAndStartPlaying

          +
          protected void loadAndStartPlaying(android.content.Context context,
          +                                   java.io.File file,
          +                                   SoundPlayer.PlaySoundParams params,
          +                                   <any> runWhenStarted,
          +                                   java.lang.Runnable runWhenFinished)
          +
        • +
        + + + +
          +
        • +

          ensureLoaded

          +
          protected SoundPlayer.SoundInfo ensureLoaded(android.content.Context context,
          +                                             int resourceId)
          +
        • +
        + + + +
          +
        • +

          ensureLoaded

          +
          protected SoundPlayer.SoundInfo ensureLoaded(android.content.Context context,
          +                                             java.io.File file)
          +
        • +
        + + + +
          +
        • +

          isLocalSoundOn

          +
          public boolean isLocalSoundOn()
          +
        • +
        + + + + + + + +
          +
        • +

          getMsDuration

          +
          protected int getMsDuration(android.content.Context context,
          +                            int resourceId)
          +
        • +
        + + + +
          +
        • +

          getMsDuration

          +
          protected int getMsDuration(android.content.Context context,
          +                            java.io.File file)
          +
        • +
        + + + +
          +
        • +

          waitForLoadCompletion

          +
          protected void waitForLoadCompletion()
          +
        • +
        + + + +
          +
        • +

          onLoadComplete

          +
          public void onLoadComplete(android.media.SoundPool soundPool,
          +                           int sampleId,
          +                           int status)
          +
          +
          Specified by:
          +
          onLoadComplete in interface android.media.SoundPool.OnLoadCompleteListener
          +
          +
        • +
        + + + +
          +
        • +

          getMsNow

          +
          protected long getMsNow()
          +
        • +
        + + + + + + + +
          +
        • +

          ensureCached

          +
          protected void ensureCached(android.content.Context context,
          +                            int resId)
          +
          Ensures this local sound is also in the local cache.
          +
        • +
        + + + + + + + +
          +
        • +

          handleCommandPlaySound

          +
          public CallbackResult handleCommandPlaySound(java.lang.String extra)
          +
        • +
        + + + +
          +
        • +

          handleCommandStopPlayingSounds

          +
          public CallbackResult handleCommandStopPlayingSounds(Command stopPlayingSoundsCommand)
          +
        • +
        + + + +
          +
        • +

          copy

          +
          protected static void copy(java.io.InputStream inputStream,
          +                           java.io.OutputStream outputStream,
          +                           int cbToCopy)
          +                    throws java.io.IOException
          +
          +
          Throws:
          +
          java.io.IOException
          +
          +
        • +
        + + + +
          +
        • +

          handleCommandRequestSound

          +
          public CallbackResult handleCommandRequestSound(Command requestSoundCommand)
          +
        • +
        + + + +
          +
        • +

          safeClose

          +
          protected void safeClose(java.lang.Object closeable)
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          play

          +
          public void play(android.content.Context context,
          +                 java.io.File file,
          +                 float volume,
          +                 int loop,
          +                 float rate)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/USBAccessibleLynxModule.html b/doc/javadoc/com/qualcomm/ftccommon/USBAccessibleLynxModule.html new file mode 100644 index 00000000000..5cb56a2b3b9 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/USBAccessibleLynxModule.html @@ -0,0 +1,462 @@ + + + + + +USBAccessibleLynxModule + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class USBAccessibleLynxModule

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.USBAccessibleLynxModule
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public final class USBAccessibleLynxModule
      +extends java.lang.Object
      +
      A simple utility class holding the serial number of a USB accessible lynx module and (optionally) its module address
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          moduleAddress

          +
          protected int moduleAddress
          +
        • +
        + + + +
          +
        • +

          moduleAddressChangeable

          +
          protected boolean moduleAddressChangeable
          +
        • +
        + + + +
          +
        • +

          firmwareVersionString

          +
          protected java.lang.String firmwareVersionString
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          USBAccessibleLynxModule

          +
          public USBAccessibleLynxModule(SerialNumber serialNumber)
          +
        • +
        + + + +
          +
        • +

          USBAccessibleLynxModule

          +
          public USBAccessibleLynxModule(SerialNumber serialNumber,
          +                               boolean moduleAddressChangeable)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getSerialNumber

          +
          public SerialNumber getSerialNumber()
          +
        • +
        + + + +
          +
        • +

          setSerialNumber

          +
          public void setSerialNumber(SerialNumber serialNumber)
          +
        • +
        + + + +
          +
        • +

          getModuleAddress

          +
          public int getModuleAddress()
          +
        • +
        + + + +
          +
        • +

          setModuleAddress

          +
          public void setModuleAddress(int moduleAddress)
          +
        • +
        + + + +
          +
        • +

          isModuleAddressChangeable

          +
          public boolean isModuleAddressChangeable()
          +
        • +
        + + + +
          +
        • +

          setModuleAddressChangeable

          +
          public void setModuleAddressChangeable(boolean moduleAddressChangeable)
          +
        • +
        + + + +
          +
        • +

          getFirmwareVersionString

          +
          public java.lang.String getFirmwareVersionString()
          +
        • +
        + + + +
          +
        • +

          getFinishedFirmwareVersionString

          +
          public java.lang.String getFinishedFirmwareVersionString()
          +
        • +
        + + + +
          +
        • +

          setFirmwareVersionString

          +
          public void setFirmwareVersionString(java.lang.String firmwareVersionString)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.Callback.DeviceNameManagerCallback.html b/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.Callback.DeviceNameManagerCallback.html new file mode 100644 index 00000000000..c7d8f72d247 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.Callback.DeviceNameManagerCallback.html @@ -0,0 +1,274 @@ + + + + + +UpdateUI.Callback.DeviceNameManagerCallback + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class UpdateUI.Callback.DeviceNameManagerCallback

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.UpdateUI.Callback.DeviceNameManagerCallback
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      UpdateUI.Callback
      +
      +
      +
      +
      protected class UpdateUI.Callback.DeviceNameManagerCallback
      +extends java.lang.Object
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        voidonDeviceNameChanged(java.lang.String newDeviceName) 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          DeviceNameManagerCallback

          +
          protected DeviceNameManagerCallback()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onDeviceNameChanged

          +
          public void onDeviceNameChanged(java.lang.String newDeviceName)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.Callback.html b/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.Callback.html new file mode 100644 index 00000000000..ba92a2c49a1 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.Callback.html @@ -0,0 +1,467 @@ + + + + + +UpdateUI.Callback + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class UpdateUI.Callback

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.UpdateUI.Callback
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      UpdateUI
      +
      +
      +
      +
      public class UpdateUI.Callback
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Callback

          +
          public Callback()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          close

          +
          public void close()
          +
        • +
        + + + +
          +
        • +

          getStateMonitor

          +
          public RobotStateMonitor getStateMonitor()
          +
        • +
        + + + +
          +
        • +

          setStateMonitor

          +
          public void setStateMonitor(RobotStateMonitor stateMonitor)
          +
        • +
        + + + +
          +
        • +

          restartRobot

          +
          public void restartRobot()
          +
          callback method to restart the robot
          +
        • +
        + + + +
          +
        • +

          updateUi

          +
          public void updateUi(java.lang.String opModeName,
          +                     Gamepad[] gamepads)
          +
        • +
        + + + +
          +
        • +

          networkConnectionUpdate

          +
          public void networkConnectionUpdate(NetworkConnection.NetworkEvent event)
          +
        • +
        + + + +
          +
        • +

          displayDeviceName

          +
          protected void displayDeviceName(java.lang.String name)
          +
        • +
        + + + +
          +
        • +

          updateNetworkConnectionStatus

          +
          public void updateNetworkConnectionStatus(NetworkStatus networkStatus)
          +
        • +
        + + + +
          +
        • +

          updateNetworkConnectionStatus

          +
          public void updateNetworkConnectionStatus(NetworkStatus networkStatus,
          +                                          java.lang.String extra)
          +
        • +
        + + + +
          +
        • +

          updatePeerStatus

          +
          public void updatePeerStatus(PeerStatus peerStatus)
          +
        • +
        + + + +
          +
        • +

          updateRobotStatus

          +
          public void updateRobotStatus(RobotStatus status)
          +
        • +
        + + + +
          +
        • +

          updateRobotState

          +
          public void updateRobotState(RobotState state)
          +
        • +
        + + + +
          +
        • +

          refreshStateStatus

          +
          protected void refreshStateStatus()
          +
        • +
        + + + +
          +
        • +

          refreshErrorTextOnUiThread

          +
          public void refreshErrorTextOnUiThread()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.html b/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.html new file mode 100644 index 00000000000..4190cc188bf --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/UpdateUI.html @@ -0,0 +1,562 @@ + + + + + +UpdateUI + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class UpdateUI

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.ftccommon.UpdateUI
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class UpdateUI
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          textDeviceName

          +
          protected android.widget.TextView textDeviceName
          +
        • +
        + + + +
          +
        • +

          textNetworkConnectionStatus

          +
          protected android.widget.TextView textNetworkConnectionStatus
          +
        • +
        + + + +
          +
        • +

          textRobotStatus

          +
          protected android.widget.TextView textRobotStatus
          +
        • +
        + + + +
          +
        • +

          textGamepad

          +
          protected android.widget.TextView[] textGamepad
          +
        • +
        + + + +
          +
        • +

          textOpMode

          +
          protected android.widget.TextView textOpMode
          +
        • +
        + + + +
          +
        • +

          textErrorMessage

          +
          protected android.widget.TextView textErrorMessage
          +
        • +
        + + + +
          +
        • +

          textErrorMessageOriginalColor

          +
          protected int textErrorMessageOriginalColor
          +
        • +
        + + + +
          +
        • +

          robotState

          +
          protected RobotState robotState
          +
        • +
        + + + +
          +
        • +

          robotStatus

          +
          protected RobotStatus robotStatus
          +
        • +
        + + + +
          +
        • +

          networkStatus

          +
          protected NetworkStatus networkStatus
          +
        • +
        + + + +
          +
        • +

          networkStatusExtra

          +
          protected java.lang.String networkStatusExtra
          +
        • +
        + + + +
          +
        • +

          peerStatus

          +
          protected PeerStatus peerStatus
          +
        • +
        + + + +
          +
        • +

          networkStatusMessage

          +
          protected java.lang.String networkStatusMessage
          +
        • +
        + + + +
          +
        • +

          stateStatusMessage

          +
          protected java.lang.String stateStatusMessage
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          UpdateUI

          +
          public UpdateUI(android.app.Activity activity,
          +                Dimmer dimmer)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setTextViews

          +
          public void setTextViews(android.widget.TextView textWifiDirectStatus,
          +                         android.widget.TextView textRobotStatus,
          +                         android.widget.TextView[] textGamepad,
          +                         android.widget.TextView textOpMode,
          +                         android.widget.TextView textErrorMessage,
          +                         android.widget.TextView textDeviceName)
          +
        • +
        + + + +
          +
        • +

          setText

          +
          protected void setText(android.widget.TextView textView,
          +                       java.lang.String message)
          +
        • +
        + + + + + + + +
          +
        • +

          setRestarter

          +
          public void setRestarter(Restarter restarter)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/UsbModuleAttachmentHandler.html b/doc/javadoc/com/qualcomm/ftccommon/UsbModuleAttachmentHandler.html new file mode 100644 index 00000000000..cbbfab4f72a --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/UsbModuleAttachmentHandler.html @@ -0,0 +1,275 @@ + + + + + +UsbModuleAttachmentHandler + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Interface UsbModuleAttachmentHandler

    +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods 
        Modifier and TypeMethod and Description
        voidhandleUsbModuleAttach(RobotUsbModule module) +
        One of the hardware modules in the current robot configuration (such as a Modern Robotics + DC Motor Controller, a Modern Robotics Legacy Module, etc) is now newly attached to the + system (or so we think).
        +
        voidhandleUsbModuleDetach(RobotUsbModule module) +
        One of the hardware modules in the current robot configuration (such as a Modern Robotics + DC Motor Controller, a Modern Robotics Legacy Module, etc) has been disconnected from the + system.
        +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          handleUsbModuleAttach

          +
          void handleUsbModuleAttach(RobotUsbModule module)
          +                    throws RobotCoreException,
          +                           java.lang.InterruptedException
          +
          One of the hardware modules in the current robot configuration (such as a Modern Robotics + DC Motor Controller, a Modern Robotics Legacy Module, etc) is now newly attached to the + system (or so we think). The code in this method should deal with this event by, e.g., + putting the module into a correctly operating state.
          +
          +
          Parameters:
          +
          module - the module which is newly attached
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          handleUsbModuleDetach

          +
          void handleUsbModuleDetach(RobotUsbModule module)
          +                    throws RobotCoreException,
          +                           java.lang.InterruptedException
          +
          One of the hardware modules in the current robot configuration (such as a Modern Robotics + DC Motor Controller, a Modern Robotics Legacy Module, etc) has been disconnected from the + system. The code in this method should deal with this event by, e.g., putting the module in + a state where it merely pretends to function.
          +
          +
          Parameters:
          +
          module - the module which has become disconnected
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/ViewLogsActivity.html b/doc/javadoc/com/qualcomm/ftccommon/ViewLogsActivity.html new file mode 100644 index 00000000000..7bd317398bb --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/ViewLogsActivity.html @@ -0,0 +1,357 @@ + + + + + +ViewLogsActivity + + + + + + + + + + + +
    +
    com.qualcomm.ftccommon
    +

    Class ViewLogsActivity

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • ThemedActivity
      • +
      • +
          +
        • com.qualcomm.ftccommon.ViewLogsActivity
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class ViewLogsActivity
      +extends ThemedActivity
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        static java.lang.StringFILENAME 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        ViewLogsActivity() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        java.lang.StringgetTag() 
        protected voidonCreate(android.os.Bundle savedInstanceState) 
        protected voidonStart() 
        java.lang.StringreadNLines(int n) 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          ViewLogsActivity

          +
          public ViewLogsActivity()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getTag

          +
          public java.lang.String getTag()
          +
        • +
        + + + +
          +
        • +

          onCreate

          +
          protected void onCreate(android.os.Bundle savedInstanceState)
          +
        • +
        + + + +
          +
        • +

          onStart

          +
          protected void onStart()
          +
        • +
        + + + +
          +
        • +

          readNLines

          +
          public java.lang.String readNLines(int n)
          +                            throws java.io.IOException
          +
          +
          Throws:
          +
          java.io.IOException
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/package-frame.html b/doc/javadoc/com/qualcomm/ftccommon/package-frame.html new file mode 100644 index 00000000000..c7f829827cc --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/package-frame.html @@ -0,0 +1,70 @@ + + + + + +com.qualcomm.ftccommon + + + + +

    com.qualcomm.ftccommon

    + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/package-summary.html b/doc/javadoc/com/qualcomm/ftccommon/package-summary.html new file mode 100644 index 00000000000..e889fe9e1b8 --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/package-summary.html @@ -0,0 +1,390 @@ + + + + + +com.qualcomm.ftccommon + + + + + + + + + + +
    +

    Package com.qualcomm.ftccommon

    +
    +
    Classes common to FTC aps
    +
    +

    See: Description

    +
    +
    + + + + +

    Package com.qualcomm.ftccommon Description

    +
    Classes common to FTC aps
    +
    + + + + + + diff --git a/doc/javadoc/com/qualcomm/ftccommon/package-tree.html b/doc/javadoc/com/qualcomm/ftccommon/package-tree.html new file mode 100644 index 00000000000..778b064486c --- /dev/null +++ b/doc/javadoc/com/qualcomm/ftccommon/package-tree.html @@ -0,0 +1,299 @@ + + + + + +com.qualcomm.ftccommon Class Hierarchy + + + + + + + + + + +
    +

    Hierarchy For Package com.qualcomm.ftccommon

    +Package Hierarchies: + +
    +
    +

    Class Hierarchy

    + +

    Interface Hierarchy

    + +

    Enum Hierarchy

    + +
    + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/EventLoop.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/EventLoop.html new file mode 100644 index 00000000000..b946256ce14 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/EventLoop.html @@ -0,0 +1,569 @@ + + + + + +EventLoop + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop
    +

    Interface EventLoop

    +
    +
    +
    +
      +
    • +
      +
      All Known Implementing Classes:
      +
      FtcEventLoop, FtcEventLoopBase, FtcEventLoopIdle
      +
      +
      +
      +
      public interface EventLoop
      +
      Event loop interface +

      + Event loops need to implement this interface. Contains methods for managing the life cycle of your robot.

      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods 
        Modifier and TypeMethod and Description
        OpModeManagerImplgetOpModeManager() +
        Returns the OpModeManager associated with this event loop
        +
        voidhandleUsbModuleAttach(RobotUsbModule module) +
        Process the fact that (we believe) that the indicated module has now reappeared after a + previously observed detachment.
        +
        voidhandleUsbModuleDetach(RobotUsbModule module) +
        Process the fact that a usb module has now become detached from the system.
        +
        voidinit(EventLoopManager eventLoopManager) +
        Init method, this will be called before the first call to loop.
        +
        voidloop() +
        This method will be repeatedly called by the event loop manager.
        +
        voidonUsbDeviceAttached(android.hardware.usb.UsbDevice usbDevice) +
        Notifies the event loop that a UsbDevice has just been attached to the system.
        +
        voidpendUsbDeviceAttachment(SerialNumber serialNumber, + long time, + java.util.concurrent.TimeUnit unit) 
        CallbackResultprocessCommand(Command command) +
        Process command method, this will be called if the event loop manager receives a user defined + command.
        +
        voidprocessedRecentlyAttachedUsbDevices() +
        Process the batch of newly arrived USB devices.
        +
        voidrefreshUserTelemetry(TelemetryMessage telemetry, + double sInterval) +
        Update's the user portion of the driver station screen with the contents of the telemetry object + here provided if a sufficiently long duration has passed since the last update.
        +
        voidrequestOpModeStop(OpMode opModeToStopIfActive) +
        Requests that an OpMode be stopped if it's the currently active one
        +
        voidteardown() +
        Teardown method, this will be called after the last call to loop.
        +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          init

          +
          void init(EventLoopManager eventLoopManager)
          +   throws RobotCoreException,
          +          java.lang.InterruptedException
          +
          Init method, this will be called before the first call to loop. You should set up + your hardware in this method. + + Threading: called on the RobotSetupRunnable.run() thread, before the EventLoopRunnable.run() + thread is created.
          +
          +
          Parameters:
          +
          eventLoopManager - event loop manager that is responsible for this event loop
          +
          Throws:
          +
          RobotCoreException - if a RobotCoreException is thrown, it will be handled + by the event loop manager. The manager will report that the robot failed + to start.
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          loop

          +
          void loop()
          +   throws RobotCoreException,
          +          java.lang.InterruptedException
          +
          This method will be repeatedly called by the event loop manager. + + Threading: called on the EventLoopRunnable.run() thread.
          +
          +
          Throws:
          +
          RobotCoreException - if a RobotCoreException is thrown, it will be handled + by the event loop manager. The manager may decide to either stop processing + this iteration of the loop, or it may decide to shut down the robot.
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          refreshUserTelemetry

          +
          void refreshUserTelemetry(TelemetryMessage telemetry,
          +                          double sInterval)
          +
          Update's the user portion of the driver station screen with the contents of the telemetry object + here provided if a sufficiently long duration has passed since the last update.
          +
          +
          Parameters:
          +
          telemetry - the telemetry object to send
          +
          sInterval - the required minimum interval. NaN indicates that a system default interval should be used.
          +
          +
        • +
        + + + +
          +
        • +

          teardown

          +
          void teardown()
          +       throws RobotCoreException,
          +              java.lang.InterruptedException
          +
          Teardown method, this will be called after the last call to loop. You should place your robot + into a safe state before this method exits, since there will be no more changes to communicate + with your robot. + + Threading: called on the EventLoopRunnable.run() thread.
          +
          +
          Throws:
          +
          RobotCoreException - if a RobotCoreException is thrown, it will be handled by the event + loop manager. The manager will then attempt to shut down the robot without the benefit + of the teardown method.
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          onUsbDeviceAttached

          +
          void onUsbDeviceAttached(android.hardware.usb.UsbDevice usbDevice)
          +
          Notifies the event loop that a UsbDevice has just been attached to the system. User interface + activities that receive UsbManager.ACTION_USB_DEVICE_ATTACHED notifications should retrieve + the UsbDevice using intent.getParcelableExtra(UsbManager.EXTRA_DEVICE) then pass that along + to this method in their event loop for processing. +

          + Implementations of this method should avoid doing significant processing during this notification. + Rather, they should squirrel the device away for processing during a later processedRecentlyAttachedUsbDevices + call. +

          +
          +
          Parameters:
          +
          usbDevice - the newly arrived device
          +
          See Also:
          +
          processedRecentlyAttachedUsbDevices()
          +
          +
        • +
        + + + +
          +
        • +

          pendUsbDeviceAttachment

          +
          void pendUsbDeviceAttachment(SerialNumber serialNumber,
          +                             long time,
          +                             java.util.concurrent.TimeUnit unit)
          +
        • +
        + + + +
          +
        • +

          processedRecentlyAttachedUsbDevices

          +
          void processedRecentlyAttachedUsbDevices()
          +                                  throws RobotCoreException,
          +                                         java.lang.InterruptedException
          +
          Process the batch of newly arrived USB devices. This is called on the EventLoop thread by + the EventLoopManager; there is sufficient time and correct context to, e.g., fully arm the + associated module software to make the device operational within the app.
          +
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          See Also:
          +
          handleUsbModuleDetach(RobotUsbModule), +onUsbDeviceAttached(UsbDevice)
          +
          +
        • +
        + + + +
          +
        • +

          handleUsbModuleDetach

          +
          void handleUsbModuleDetach(RobotUsbModule module)
          +                    throws RobotCoreException,
          +                           java.lang.InterruptedException
          +
          Process the fact that a usb module has now become detached from the system. This is called + on the EventLoop thread by the EventLoopManager; there is sufficient time and correct context + to, e.g., fully disarm and 'pretend' the associated module.
          +
          +
          Parameters:
          +
          module -
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          See Also:
          +
          processedRecentlyAttachedUsbDevices()
          +
          +
        • +
        + + + +
          +
        • +

          handleUsbModuleAttach

          +
          void handleUsbModuleAttach(RobotUsbModule module)
          +                    throws RobotCoreException,
          +                           java.lang.InterruptedException
          +
          Process the fact that (we believe) that the indicated module has now reappeared after a + previously observed detachment.
          +
          +
          Parameters:
          +
          module -
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          processCommand

          +
          CallbackResult processCommand(Command command)
          +                       throws java.lang.InterruptedException,
          +                              RobotCoreException
          +
          Process command method, this will be called if the event loop manager receives a user defined + command. How this command is handled is up to the event loop implementation. + + Threading: called on the RecvRunnable.run() thread.
          +
          +
          Parameters:
          +
          command - command to process
          +
          Throws:
          +
          java.lang.InterruptedException
          +
          RobotCoreException
          +
          +
        • +
        + + + +
          +
        • +

          getOpModeManager

          +
          OpModeManagerImpl getOpModeManager()
          +
          Returns the OpModeManager associated with this event loop
          +
          +
          Returns:
          +
          the OpModeManager associated with this event loop
          +
          +
        • +
        + + + +
          +
        • +

          requestOpModeStop

          +
          void requestOpModeStop(OpMode opModeToStopIfActive)
          +
          Requests that an OpMode be stopped if it's the currently active one
          +
          +
          Parameters:
          +
          opModeToStopIfActive - the OpMode to stop if it's currently active
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/EventLoopManager.EventLoopMonitor.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/EventLoopManager.EventLoopMonitor.html new file mode 100644 index 00000000000..2d3d1fa8b41 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/EventLoopManager.EventLoopMonitor.html @@ -0,0 +1,262 @@ + + + + + +EventLoopManager.EventLoopMonitor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop
    +

    Interface EventLoopManager.EventLoopMonitor

    +
    +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      EventLoopManager
      +
      +
      +
      +
      public static interface EventLoopManager.EventLoopMonitor
      +
      Callback to monitor when event loop changes state
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onStateChange

          +
          void onStateChange(RobotState state)
          +
        • +
        + + + +
          +
        • +

          onTelemetryTransmitted

          +
          void onTelemetryTransmitted()
          +
        • +
        + + + +
          +
        • +

          onPeerConnected

          +
          void onPeerConnected()
          +
        • +
        + + + +
          +
        • +

          onPeerDisconnected

          +
          void onPeerDisconnected()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/EventLoopManager.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/EventLoopManager.html new file mode 100644 index 00000000000..3f4f698a134 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/EventLoopManager.html @@ -0,0 +1,937 @@ + + + + + +EventLoopManager + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop
    +

    Class EventLoopManager

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.eventloop.EventLoopManager
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      SyncdDevice.Manager
      +
      +
      +
      +
      public class EventLoopManager
      +extends java.lang.Object
      +implements SyncdDevice.Manager
      +
      Event Loop Manager +

      + Takes RobocolDatagram messages, converts them into the appropriate data type, and then passes it + to the current EventLoop.

      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          SYSTEM_NONE_KEY

          +
          public static final java.lang.String SYSTEM_NONE_KEY
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          SYSTEM_ERROR_KEY

          +
          public static final java.lang.String SYSTEM_ERROR_KEY
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          SYSTEM_WARNING_KEY

          +
          public static final java.lang.String SYSTEM_WARNING_KEY
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          ROBOT_BATTERY_LEVEL_KEY

          +
          public static final java.lang.String ROBOT_BATTERY_LEVEL_KEY
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          RC_BATTERY_STATUS_KEY

          +
          public static final java.lang.String RC_BATTERY_STATUS_KEY
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          state

          +
          public RobotState state
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          EventLoopManager

          +
          public EventLoopManager(android.content.Context context,
          +                        EventLoopManagerClient eventLoopManagerClient,
          +                        EventLoop idleEventLoop)
          +
          Constructor
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getWebServer

          +
          public WebServer getWebServer()
          +
        • +
        + + + +
          +
        • +

          setMonitor

          +
          public void setMonitor(EventLoopManager.EventLoopMonitor monitor)
          +
          Set a monitor for this event loop, which will immediately have the appropriate method called to + indicate the current peer status.
          +
          +
          Parameters:
          +
          monitor - event loop monitor
          +
          +
        • +
        + + + + + + + +
          +
        • +

          getEventLoop

          +
          public EventLoop getEventLoop()
          +
          Get the current event loop
          +
          +
          Returns:
          +
          current event loop
          +
          +
        • +
        + + + +
          +
        • +

          getGamepad

          +
          public Gamepad getGamepad(int port)
          +
          Get the gamepad connected to a particular user
          +
          +
          Parameters:
          +
          port - user 0 and 1 are valid
          +
          Returns:
          +
          gamepad
          +
          +
        • +
        + + + +
          +
        • +

          getGamepads

          +
          public Gamepad[] getGamepads()
          +
          Get the gamepads +

          + Array index will match the user number

          +
          +
          Returns:
          +
          gamepad
          +
          +
        • +
        + + + +
          +
        • +

          getHeartbeat

          +
          public Heartbeat getHeartbeat()
          +
          Get the current heartbeat state
          +
          +
          Returns:
          +
          heartbeat
          +
          +
        • +
        + + + +
          +
        • +

          telemetryEvent

          +
          public CallbackResult telemetryEvent(RobocolDatagram packet)
          +
        • +
        + + + +
          +
        • +

          reportGlobalError

          +
          public CallbackResult reportGlobalError(java.lang.String error,
          +                                        boolean recoverable)
          +
        • +
        + + + +
          +
        • +

          packetReceived

          +
          public CallbackResult packetReceived(RobocolDatagram packet)
          +
        • +
        + + + +
          +
        • +

          refreshSystemTelemetryNow

          +
          public void refreshSystemTelemetryNow()
          +
          Forces an immediate refresh of the system telemetry
          +
        • +
        + + + +
          +
        • +

          refreshSystemTelemetry

          +
          public void refreshSystemTelemetry()
          +
          Do our best to maintain synchrony of the system error / warning state between applications + without incurring undo overhead.
          +
        • +
        + + + +
          +
        • +

          onNetworkConnectionEvent

          +
          public CallbackResult onNetworkConnectionEvent(NetworkConnection.NetworkEvent event)
          +
        • +
        + + + +
          +
        • +

          start

          +
          public void start(EventLoop eventLoop)
          +           throws RobotCoreException
          +
          Starts up the EventLoopManager. This mostly involves setting up the network + connections and listeners and senders, then getting the event loop thread going. + + Note that shutting down the EventLoopManager does not do a full + complete inverse. Rather, it leaves the underlying network connection alive and + running, as this, among other things, helps remote toasts to continue to function + correctly. Thus, we must be aware of that possibility here as we start.
          +
          +
          Throws:
          +
          RobotCoreException
          +
          See Also:
          +
          shutdown()
          +
          +
        • +
        + + + + + + + +
          +
        • +

          close

          +
          public void close()
          +
        • +
        + + + + + + + +
          +
        • +

          unregisterSyncdDevice

          +
          public void unregisterSyncdDevice(SyncdDevice device)
          +
          Unregisters a device from this event loop. It is specifically permitted to unregister + a device which is not currently registered; such an operation has no effect.
          +
          +
          Specified by:
          +
          unregisterSyncdDevice in interface SyncdDevice.Manager
          +
          Parameters:
          +
          device - the device to be unregistered. May not be null.
          +
          See Also:
          +
          registerSyncdDevice(SyncdDevice)
          +
          +
        • +
        + + + +
          +
        • +

          setEventLoop

          +
          public void setEventLoop(EventLoop eventLoop)
          +                  throws RobotCoreException
          +
          Replace the current event loop with a new event loop
          +
          +
          Parameters:
          +
          eventLoop - new event loop
          +
          Throws:
          +
          RobotCoreException - if event loop fails to init
          +
          +
        • +
        + + + +
          +
        • +

          sendTelemetryData

          +
          public void sendTelemetryData(TelemetryMessage telemetry)
          +
          Send telemetry data +

          + Send the telemetry data, and then clear the sent data

          +
          +
          Parameters:
          +
          telemetry - telemetry data
          +
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          onPeerConnected

          +
          public void onPeerConnected()
          +
        • +
        + + + +
          +
        • +

          onPeerDisconnected

          +
          public void onPeerDisconnected()
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          emptyEvent

          +
          public CallbackResult emptyEvent(RobocolDatagram packet)
          +
        • +
        + + + +
          +
        • +

          buildAndSendTelemetry

          +
          public void buildAndSendTelemetry(java.lang.String tag,
          +                                  java.lang.String msg)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/SyncdDevice.Manager.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/SyncdDevice.Manager.html new file mode 100644 index 00000000000..0108a44eb16 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/SyncdDevice.Manager.html @@ -0,0 +1,239 @@ + + + + + +SyncdDevice.Manager + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop
    +

    Interface SyncdDevice.Manager

    +
    +
    +
    +
      +
    • +
      +
      All Known Implementing Classes:
      +
      EventLoopManager
      +
      +
      +
      Enclosing interface:
      +
      SyncdDevice
      +
      +
      +
      +
      public static interface SyncdDevice.Manager
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          registerSyncdDevice

          +
          void registerSyncdDevice(SyncdDevice device)
          +
        • +
        + + + +
          +
        • +

          unregisterSyncdDevice

          +
          void unregisterSyncdDevice(SyncdDevice device)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/SyncdDevice.ShutdownReason.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/SyncdDevice.ShutdownReason.html new file mode 100644 index 00000000000..bc8613e81fb --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/SyncdDevice.ShutdownReason.html @@ -0,0 +1,373 @@ + + + + + +SyncdDevice.ShutdownReason + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop
    +

    Enum SyncdDevice.ShutdownReason

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        ABNORMAL +
        The device shutdown abnormally, and we don't know anything about when it might + be useful to try to communicate with it again.
        +
        ABNORMAL_ATTEMPT_REOPEN +
        The device shutdown abnormally, but due to a temporary circumstance (such as ESD) + that we believe might be recoverable from after a brief interval
        +
        NORMAL +
        The device shutdown normally
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static SyncdDevice.ShutdownReasonvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static SyncdDevice.ShutdownReason[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Detail

        + + + + + + + +
          +
        • +

          ABNORMAL

          +
          public static final SyncdDevice.ShutdownReason ABNORMAL
          +
          The device shutdown abnormally, and we don't know anything about when it might + be useful to try to communicate with it again. Its USB cable might have been pulled, + for example, and we don't know when it will be plugged back in, if ever.
          +
        • +
        + + + + +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static SyncdDevice.ShutdownReason[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (SyncdDevice.ShutdownReason c : SyncdDevice.ShutdownReason.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static SyncdDevice.ShutdownReason valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/SyncdDevice.Syncable.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/SyncdDevice.Syncable.html new file mode 100644 index 00000000000..638dc82bed0 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/SyncdDevice.Syncable.html @@ -0,0 +1,222 @@ + + + + + +SyncdDevice.Syncable + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop
    +

    Interface SyncdDevice.Syncable

    +
    +
    +
    +
      +
    • +
      +
      Enclosing interface:
      +
      SyncdDevice
      +
      +
      +
      +
      public static interface SyncdDevice.Syncable
      +
    • +
    +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/SyncdDevice.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/SyncdDevice.html new file mode 100644 index 00000000000..903db5b8898 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/SyncdDevice.html @@ -0,0 +1,360 @@ + + + + + +SyncdDevice + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop
    +

    Interface SyncdDevice

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface SyncdDevice
      +
      SyncdDevice is for a device that wants to be in sync with the event loop. If there is sync'd + device registered with the event loop manager then the event loop manager will run the event + loop in this manner: +
        +
      1. wait until all sync'd device have returned from blockUtilReady()
      2. +
      3. run EventLoop.loop()
      4. +
      5. call startBlockingWork() on all sync'd device
      6. +
      + Sync'd devices need to register themselves with the event loop manager + + Note: the original actual need for SyncdDevice per se now lies in the dustbin of time. + However, this self-same object and its associated registration mechanism is also used as part + of logic used to deal with abnormal device shutdown (e.g.: USB disconnects) and the processing + thereof. The interface thus probably now deserves a better name.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getShutdownReason

          +
          SyncdDevice.ShutdownReason getShutdownReason()
          +
          Has this device shutdown abnormally? Note that even if this method returns true that + a close() will still be necessary to fully clean up associated resources.
          +
          +
          Returns:
          +
          whether the device has experienced an abnormal shutdown
          +
          +
        • +
        + + + +
          +
        • +

          setOwner

          +
          void setOwner(RobotUsbModule owner)
          +
          Records the owning module of this sync'd device. The owner of the device is the party + that is responsible for the device's lifetime management, and thus who should be involved + if the device experiences problems and needs to be shutdown or restarted.
          +
          +
          See Also:
          +
          getOwner()
          +
          +
        • +
        + + + +
          +
        • +

          getOwner

          +
          RobotUsbModule getOwner()
          +
          Retrieves the owning module of this sync'd device.
          +
          +
          Returns:
          +
          the RobotUsbModule which is the owner of this device
          +
          See Also:
          +
          setOwner(RobotUsbModule)
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/AnnotatedOpModeManager.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/AnnotatedOpModeManager.html new file mode 100644 index 00000000000..a3d0b27f457 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/AnnotatedOpModeManager.html @@ -0,0 +1,268 @@ + + + + + +AnnotatedOpModeManager + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Interface AnnotatedOpModeManager

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          register

          +
          void register(java.lang.Class opModeClass)
          +
          Register a class for display on the driver station and availability for game play. + New instances of this class will be created as needed. The name used on the driver + station menu is taken from a TeleOp or Autonomous annotation on the + class itself (any Disabled attribute which may also be present is ignored). + If the class lacks both a TeleOp and a Autonomous annotation, then + no registration takes place.
          +
          +
          Parameters:
          +
          opModeClass - the class of the OpMode to create
          +
          See Also:
          +
          TeleOp, +Autonomous, +OpModeManager.register(String, Class)
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/AnnotatedOpModeRegistrar.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/AnnotatedOpModeRegistrar.html new file mode 100644 index 00000000000..74e71458944 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/AnnotatedOpModeRegistrar.html @@ -0,0 +1,289 @@ + + + + + +AnnotatedOpModeRegistrar + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Class AnnotatedOpModeRegistrar

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.eventloop.opmode.AnnotatedOpModeRegistrar
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Deprecated.  +
      The function formerly performed by this class is now automatically executed by the system
      +
      +
      +
      @Deprecated
      +public class AnnotatedOpModeRegistrar
      +extends java.lang.Object
      +
      Call register(OpModeManager) from FtcOpModeRegister.register() + in order to automatically register OpMode classes that you have annotated with @Autonomous + or @TeleOp.
      +
      +
      See Also:
      +
      Autonomous, +TeleOp
      +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Static Methods Concrete Methods Deprecated Methods 
        Modifier and TypeMethod and Description
        static voidregister(OpModeManager manager) +
        Deprecated.  +
        functionality now automatically called by the system
        +
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          AnnotatedOpModeRegistrar

          +
          public AnnotatedOpModeRegistrar()
          +
          Deprecated. 
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          register

          +
          @Deprecated
          +public static void register(OpModeManager manager)
          +
          Deprecated. functionality now automatically called by the system
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/Autonomous.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/Autonomous.html new file mode 100644 index 00000000000..8558e26f7e4 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/Autonomous.html @@ -0,0 +1,264 @@ + + + + + +Autonomous + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Annotation Type Autonomous

    +
    +
    +
    +
      +
    • +
      +
      +
      @Documented
      + @Target(value=TYPE)
      + @Retention(value=RUNTIME)
      +public @interface Autonomous
      +
      Provides an easy and non-centralized way of determining the OpMode list + shown on an FTC Driver Station. Put an Autonomous annotation on + your autonomous OpModes that you want to show up in the driver station display. + + If you want to temporarily disable an opmode, then set then also add + a Disabled annotation to it.
      +
      +
      See Also:
      +
      TeleOp, +Disabled, +OpModeRegistrar
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Optional Element Summary

        + + + + + + + + + + + + + + +
        Optional Elements 
        Modifier and TypeOptional Element and Description
        java.lang.Stringgroup +
        Optionally indicates a group of other OpModes with which the annotated + OpMode should be sorted on the driver station OpMode list.
        +
        java.lang.Stringname +
        The name to be used on the driver station display.
        +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Element Detail

        + + + +
          +
        • +

          name

          +
          public abstract java.lang.String name
          +
          The name to be used on the driver station display. If empty, the name of + the OpMode class will be used.
          +
          +
          Returns:
          +
          the name to use for the OpMode in the driver station.
          +
          +
          +
          Default:
          +
          ""
          +
          +
        • +
        +
      • +
      +
        +
      • + + +
          +
        • +

          group

          +
          public abstract java.lang.String group
          +
          Optionally indicates a group of other OpModes with which the annotated + OpMode should be sorted on the driver station OpMode list.
          +
          +
          Returns:
          +
          the group into which the annotated OpMode is to be categorized
          +
          +
          +
          Default:
          +
          ""
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/Disabled.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/Disabled.html new file mode 100644 index 00000000000..1fd875577f4 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/Disabled.html @@ -0,0 +1,171 @@ + + + + + +Disabled + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Annotation Type Disabled

    +
    +
    +
    +
      +
    • +
      +
      +
      @Documented
      + @Target(value=TYPE)
      + @Retention(value=RUNTIME)
      +public @interface Disabled
      +
      Provides a way to temporarily disable an OpMode annotated with + Autonomous or TeleOp from showing up + on the driver station OpMode list.
      +
      +
      See Also:
      +
      Autonomous, +TeleOp
      +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/EventLoopManagerClient.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/EventLoopManagerClient.html new file mode 100644 index 00000000000..e70e6bf74c1 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/EventLoopManagerClient.html @@ -0,0 +1,227 @@ + + + + + +EventLoopManagerClient + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Interface EventLoopManagerClient

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getWebServer

          +
          WebServer getWebServer()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/FtcRobotControllerServiceState.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/FtcRobotControllerServiceState.html new file mode 100644 index 00000000000..9a07b784b7f --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/FtcRobotControllerServiceState.html @@ -0,0 +1,231 @@ + + + + + +FtcRobotControllerServiceState + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Interface FtcRobotControllerServiceState

    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/LinearOpMode.LinearOpModeHelper.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/LinearOpMode.LinearOpModeHelper.html new file mode 100644 index 00000000000..d5808346a51 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/LinearOpMode.LinearOpModeHelper.html @@ -0,0 +1,369 @@ + + + + + +LinearOpMode.LinearOpModeHelper + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Class LinearOpMode.LinearOpModeHelper

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.eventloop.opmode.LinearOpMode.LinearOpModeHelper
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.lang.Runnable
      +
      +
      +
      Enclosing class:
      +
      LinearOpMode
      +
      +
      +
      +
      protected class LinearOpMode.LinearOpModeHelper
      +extends java.lang.Object
      +implements java.lang.Runnable
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        protected java.lang.RuntimeExceptionexception 
        protected booleanisShutdown 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        LinearOpModeHelper() 
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          exception

          +
          protected java.lang.RuntimeException exception
          +
        • +
        + + + +
          +
        • +

          isShutdown

          +
          protected boolean isShutdown
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          LinearOpModeHelper

          +
          public LinearOpModeHelper()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          run

          +
          public void run()
          +
          +
          Specified by:
          +
          run in interface java.lang.Runnable
          +
          +
        • +
        + + + +
          +
        • +

          hasRuntimeException

          +
          public boolean hasRuntimeException()
          +
        • +
        + + + +
          +
        • +

          getRuntimeException

          +
          public java.lang.RuntimeException getRuntimeException()
          +
        • +
        + + + +
          +
        • +

          isShutdown

          +
          public boolean isShutdown()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/LinearOpMode.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/LinearOpMode.html new file mode 100644 index 00000000000..f8eb45a6ed8 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/LinearOpMode.html @@ -0,0 +1,714 @@ + + + + + +LinearOpMode + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Class LinearOpMode

    +
    +
    + +
    +
      +
    • +
      +
      +
      public abstract class LinearOpMode
      +extends OpMode
      +
      Base class for user defined linear operation modes (op modes). +

      + This class derives from OpMode, but you should not override the methods from + OpMode.

      +
    • +
    +
    +
    +
      +
    • + + + + + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        LinearOpMode() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
        Modifier and TypeMethod and Description
        protected voidhandleLoop() 
        voididle() +
        Puts the current thread to sleep for a bit as it has nothing better to do.
        +
        voidinit_loop() +
        From the non-linear OpMode; do not override
        +
        voidinit() +
        From the non-linear OpMode; do not override
        +
        voidinternalPostInitLoop() +
        automatically update telemetry in a non-linear opmode
        +
        voidinternalPostLoop() +
        automatically update telemetry in a non-linear opmode
        +
        booleanisStarted() +
        Has the opMode been started?
        +
        booleanisStopRequested() +
        Has the the stopping of the opMode been requested?
        +
        voidloop() +
        From the non-linear OpMode; do not override
        +
        booleanopModeIsActive() +
        Answer as to whether this opMode is active and the robot should continue onwards.
        +
        abstract voidrunOpMode() +
        Override this method and place your code here.
        +
        voidsleep(long milliseconds) +
        Sleeps for the given amount of milliseconds, or until the thread is interrupted.
        +
        voidstart() +
        From the non-linear OpMode; do not override
        +
        voidstop() +
        From the non-linear OpMode; do not override
        +
        voidwaitForNextHardwareCycle() +
        Deprecated.  +
        The need for user code to synchronize with the loop() thread has been + obviated by improvements in the modern motor and servo controller implementations. + Remaining uses of this API are likely unncessarily wasting cycles. If a simple non-zero + delay is required, the sleep() method is a better choice. + If one simply wants to allow other threads to run, idle() is a good choice.
        +
        +
        voidwaitForStart() +
        Pauses the Linear Op Mode until start has been pressed or until the current thread + is interrupted.
        +
        voidwaitOneFullHardwareCycle() +
        Deprecated.  +
        The need for user code to synchronize with the loop() thread has been + obviated by improvements in the modern motor and servo controller implementations. + Remaining uses of this API are likely unncessarily wasting cycles. If a simple non-zero + delay is required, the sleep() method is a better choice. + If one simply wants to allow other threads to run, idle() is a good choice.
        +
        +
        + +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          LinearOpMode

          +
          public LinearOpMode()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          runOpMode

          +
          public abstract void runOpMode()
          +                        throws java.lang.InterruptedException
          +
          Override this method and place your code here. +

          + Please do not swallow the InterruptedException, as it is used in cases + where the op mode needs to be terminated early.

          +
          +
          Throws:
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          waitForStart

          +
          public void waitForStart()
          +
          Pauses the Linear Op Mode until start has been pressed or until the current thread + is interrupted.
          +
        • +
        + + + +
          +
        • +

          waitOneFullHardwareCycle

          +
          @Deprecated
          +public void waitOneFullHardwareCycle()
          +                                           throws java.lang.InterruptedException
          +
          Deprecated. The need for user code to synchronize with the loop() thread has been + obviated by improvements in the modern motor and servo controller implementations. + Remaining uses of this API are likely unncessarily wasting cycles. If a simple non-zero + delay is required, the sleep() method is a better choice. + If one simply wants to allow other threads to run, idle() is a good choice.
          +
          Wait for one full cycle of the hardware +

          + Each cycle of the hardware your commands are sent out to the hardware; and + the latest data is read back in. +

          + This method has a strong guarantee to wait for at least one + full hardware hardware cycle.

          +
          +
          Throws:
          +
          java.lang.InterruptedException
          +
          See Also:
          +
          Thread.sleep(long), +idle(), +waitForNextHardwareCycle()
          +
          +
        • +
        + + + +
          +
        • +

          waitForNextHardwareCycle

          +
          @Deprecated
          +public void waitForNextHardwareCycle()
          +                                           throws java.lang.InterruptedException
          +
          Deprecated. The need for user code to synchronize with the loop() thread has been + obviated by improvements in the modern motor and servo controller implementations. + Remaining uses of this API are likely unncessarily wasting cycles. If a simple non-zero + delay is required, the sleep() method is a better choice. + If one simply wants to allow other threads to run, idle() is a good choice.
          +
          Wait for the start of the next hardware cycle +

          + Each cycle of the hardware your commands are sent out to the hardware; and + the latest data is read back in. +

          + This method will wait for the current hardware cycle to finish, which is + also the start of the next hardware cycle.

          +
          +
          Throws:
          +
          java.lang.InterruptedException
          +
          See Also:
          +
          Thread.sleep(long), +idle(), +waitOneFullHardwareCycle()
          +
          +
        • +
        + + + +
          +
        • +

          idle

          +
          public final void idle()
          +
          Puts the current thread to sleep for a bit as it has nothing better to do. This allows other + threads in the system to run. + +

          One can use this method when you have nothing better to do in your code as you await state + managed by other threads to change. Calling idle() is entirely optional: it just helps make + the system a little more responsive and a little more efficient.

          + +

          idle() is conceptually related to waitOneFullHardwareCycle(), but makes no + guarantees as to completing any particular number of hardware cycles, if any.

          +
          +
          See Also:
          +
          opModeIsActive(), +waitOneFullHardwareCycle()
          +
          +
        • +
        + + + +
          +
        • +

          sleep

          +
          public final void sleep(long milliseconds)
          +
          Sleeps for the given amount of milliseconds, or until the thread is interrupted. This is + simple shorthand for the operating-system-provided sleep() method.
          +
          +
          Parameters:
          +
          milliseconds - amount of time to sleep, in milliseconds
          +
          See Also:
          +
          Thread.sleep(long)
          +
          +
        • +
        + + + +
          +
        • +

          opModeIsActive

          +
          public final boolean opModeIsActive()
          +
          Answer as to whether this opMode is active and the robot should continue onwards. If the + opMode is not active, the OpMode should terminate at its earliest convenience. + +

          Note that internally this method calls idle()

          +
          +
          Returns:
          +
          whether the OpMode is currently active. If this returns false, you should + break out of the loop in your runOpMode() method and return to its caller.
          +
          See Also:
          +
          runOpMode(), +isStarted(), +isStopRequested()
          +
          +
        • +
        + + + +
          +
        • +

          isStarted

          +
          public final boolean isStarted()
          +
          Has the opMode been started?
          +
          +
          Returns:
          +
          whether this opMode has been started or not
          +
          See Also:
          +
          opModeIsActive(), +isStopRequested()
          +
          +
        • +
        + + + +
          +
        • +

          isStopRequested

          +
          public final boolean isStopRequested()
          +
          Has the the stopping of the opMode been requested?
          +
          +
          Returns:
          +
          whether stopping opMode has been requested or not
          +
          See Also:
          +
          opModeIsActive(), +isStarted()
          +
          +
        • +
        + + + +
          +
        • +

          init

          +
          public final void init()
          +
          From the non-linear OpMode; do not override
          +
          +
          Specified by:
          +
          init in class OpMode
          +
          +
        • +
        + + + +
          +
        • +

          init_loop

          +
          public final void init_loop()
          +
          From the non-linear OpMode; do not override
          +
          +
          Overrides:
          +
          init_loop in class OpMode
          +
          +
        • +
        + + + +
          +
        • +

          start

          +
          public final void start()
          +
          From the non-linear OpMode; do not override
          +
          +
          Overrides:
          +
          start in class OpMode
          +
          +
        • +
        + + + +
          +
        • +

          loop

          +
          public final void loop()
          +
          From the non-linear OpMode; do not override
          +
          +
          Specified by:
          +
          loop in class OpMode
          +
          +
        • +
        + + + +
          +
        • +

          stop

          +
          public final void stop()
          +
          From the non-linear OpMode; do not override
          +
          +
          Overrides:
          +
          stop in class OpMode
          +
          +
        • +
        + + + +
          +
        • +

          handleLoop

          +
          protected void handleLoop()
          +
        • +
        + + + +
          +
        • +

          internalPostInitLoop

          +
          public void internalPostInitLoop()
          +
          Description copied from class: OpMode
          +
          automatically update telemetry in a non-linear opmode
          +
          +
          Overrides:
          +
          internalPostInitLoop in class OpMode
          +
          +
        • +
        + + + +
          +
        • +

          internalPostLoop

          +
          public void internalPostLoop()
          +
          Description copied from class: OpMode
          +
          automatically update telemetry in a non-linear opmode
          +
          +
          Overrides:
          +
          internalPostLoop in class OpMode
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpMode.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpMode.html new file mode 100644 index 00000000000..ac606e7736f --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpMode.html @@ -0,0 +1,708 @@ + + + + + +OpMode + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Class OpMode

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.eventloop.opmode.OpMode
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Direct Known Subclasses:
      +
      LinearOpMode
      +
      +
      +
      +
      public abstract class OpMode
      +extends java.lang.Object
      +
      Base class for user defined operation modes (op modes).
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        OpMode() +
        OpMode constructor
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods Concrete Methods 
        Modifier and TypeMethod and Description
        doublegetRuntime() +
        Get the number of seconds this op mode has been running
        +
        voidinit_loop() +
        User defined init_loop method
        +
        abstract voidinit() +
        User defined init method
        +
        voidinternalPostInitLoop() +
        automatically update telemetry in a non-linear opmode
        +
        voidinternalPostLoop() +
        automatically update telemetry in a non-linear opmode
        +
        voidinternalPreInit() 
        voidinternalUpdateTelemetryNow(TelemetryMessage telemetry) +
        This is an internal SDK method, not intended for use by user opmodes.
        +
        abstract voidloop() +
        User defined loop method
        +
        voidrequestOpModeStop() +
        Requests that this OpMode be shut down if it the currently active opMode, much as if the stop + button had been pressed on the driver station; if this is not the currently active OpMode, + then this function has no effect.
        +
        voidresetStartTime() +
        Reset the start time to zero.
        +
        voidstart() +
        User defined start method.
        +
        voidstop() +
        User defined stop method
        +
        voidupdateTelemetry(Telemetry telemetry) +
        Refreshes the user's telemetry on the driver station with the contents of the provided telemetry + object if a nominal amount of time has passed since the last telemetry transmission.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          gamepad1

          +
          public Gamepad gamepad1
          +
          Gamepad 1
          +
        • +
        + + + +
          +
        • +

          gamepad2

          +
          public Gamepad gamepad2
          +
          Gamepad 2
          +
        • +
        + + + +
          +
        • +

          telemetry

          +
          public Telemetry telemetry
          +
          The telemetry field contains an object in which a user may accumulate data which + is to be transmitted to the driver station. This data is automatically transmitted to the + driver station on a regular, periodic basis.
          +
        • +
        + + + +
          +
        • +

          hardwareMap

          +
          public HardwareMap hardwareMap
          +
          Hardware Mappings
          +
        • +
        + + + +
          +
        • +

          time

          +
          public double time
          +
          number of seconds this op mode has been running, this is + updated before every call to loop.
          +
        • +
        + + + +
          +
        • +

          msStuckDetectInit

          +
          public int msStuckDetectInit
          +
        • +
        + + + +
          +
        • +

          msStuckDetectInitLoop

          +
          public int msStuckDetectInitLoop
          +
        • +
        + + + +
          +
        • +

          msStuckDetectStart

          +
          public int msStuckDetectStart
          +
        • +
        + + + +
          +
        • +

          msStuckDetectLoop

          +
          public int msStuckDetectLoop
          +
        • +
        + + + +
          +
        • +

          msStuckDetectStop

          +
          public int msStuckDetectStop
          +
        • +
        + + + +
          +
        • +

          internalOpModeServices

          +
          public OpModeServices internalOpModeServices
          +
          this is logically an internal field. DO NOT USE
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          OpMode

          +
          public OpMode()
          +
          OpMode constructor +

          + The op mode name should be unique. It will be the name displayed on the driver station. If + multiple op modes have the same name, only one will be available.

          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          init

          +
          public abstract void init()
          +
          User defined init method +

          + This method will be called once when the INIT button is pressed.

          +
        • +
        + + + +
          +
        • +

          init_loop

          +
          public void init_loop()
          +
          User defined init_loop method +

          + This method will be called repeatedly when the INIT button is pressed. + This method is optional. By default this method takes no action.

          +
        • +
        + + + +
          +
        • +

          start

          +
          public void start()
          +
          User defined start method. +

          + This method will be called once when the PLAY button is first pressed. + This method is optional. By default this method takes not action. + Example usage: Starting another thread.

          +
        • +
        + + + +
          +
        • +

          loop

          +
          public abstract void loop()
          +
          User defined loop method +

          + This method will be called repeatedly in a loop while this op mode is running

          +
        • +
        + + + +
          +
        • +

          stop

          +
          public void stop()
          +
          User defined stop method +

          + This method will be called when this op mode is first disabled + + The stop method is optional. By default this method takes no action.

          +
        • +
        + + + +
          +
        • +

          requestOpModeStop

          +
          public final void requestOpModeStop()
          +
          Requests that this OpMode be shut down if it the currently active opMode, much as if the stop + button had been pressed on the driver station; if this is not the currently active OpMode, + then this function has no effect. Note as part of this processing, the OpMode's stop() + method will be called, as that is part of the usual shutdown logic. Note that requestOpModeStop() + may be called from any thread.
          +
          +
          See Also:
          +
          stop()
          +
          +
        • +
        + + + +
          +
        • +

          getRuntime

          +
          public double getRuntime()
          +
          Get the number of seconds this op mode has been running +

          + This method has sub millisecond accuracy.

          +
          +
          Returns:
          +
          number of seconds this op mode has been running
          +
          +
        • +
        + + + +
          +
        • +

          resetStartTime

          +
          public void resetStartTime()
          +
          Reset the start time to zero.
          +
        • +
        + + + +
          +
        • +

          updateTelemetry

          +
          public void updateTelemetry(Telemetry telemetry)
          +
          Refreshes the user's telemetry on the driver station with the contents of the provided telemetry + object if a nominal amount of time has passed since the last telemetry transmission. Once + transmitted, the contents of the telemetry object are (by default) cleared.
          +
          +
          Parameters:
          +
          telemetry - the telemetry data to transmit
          +
          See Also:
          +
          telemetry, +Telemetry.update()
          +
          +
        • +
        + + + +
          +
        • +

          internalPreInit

          +
          public void internalPreInit()
          +
        • +
        + + + +
          +
        • +

          internalPostInitLoop

          +
          public void internalPostInitLoop()
          +
          automatically update telemetry in a non-linear opmode
          +
        • +
        + + + +
          +
        • +

          internalPostLoop

          +
          public void internalPostLoop()
          +
          automatically update telemetry in a non-linear opmode
          +
        • +
        + + + +
          +
        • +

          internalUpdateTelemetryNow

          +
          public final void internalUpdateTelemetryNow(TelemetryMessage telemetry)
          +
          This is an internal SDK method, not intended for use by user opmodes.
          +
          +
          Parameters:
          +
          telemetry - the telemetry data to transmit
          +
          See Also:
          +
          telemetry, +Telemetry.update()
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeManager.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeManager.html new file mode 100644 index 00000000000..07061dfdeb7 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeManager.html @@ -0,0 +1,357 @@ + + + + + +OpModeManager + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Interface OpModeManager

    +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        static java.lang.StringDEFAULT_OP_MODE_NAME +
        DEFAULT_OP_MODE_NAME is the (non-localized) name of the default opmode, the one that + automatically runs whenever no user opmode is running.
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods 
        Modifier and TypeMethod and Description
        voidregister(OpModeMeta name, + java.lang.Class<? extends OpMode> opModeClass) +
        Registers a class for display on the driver station and availability for game play.
        +
        voidregister(OpModeMeta name, + OpMode opModeInstance) +
        Register an *instance* of a class for display on the driver station and availability + for game play.
        +
        voidregister(java.lang.String name, + java.lang.Class<? extends OpMode> opModeClass) +
        Registers a class for display on the driver station and availability for game play.
        +
        voidregister(java.lang.String name, + OpMode opModeInstance) +
        Register an *instance* of a class for display on the driver station and availability + for game play.
        +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          DEFAULT_OP_MODE_NAME

          +
          static final java.lang.String DEFAULT_OP_MODE_NAME
          +
          DEFAULT_OP_MODE_NAME is the (non-localized) name of the default opmode, the one that + automatically runs whenever no user opmode is running.
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          register

          +
          void register(java.lang.String name,
          +              java.lang.Class<? extends OpMode> opModeClass)
          +
          Registers a class for display on the driver station and availability for game play. + New instances of this class will be created as needed.
          +
          +
          Parameters:
          +
          name - the name to show on the driver station menu
          +
          opModeClass - the class of the OpMode to create
          +
          +
        • +
        + + + +
          +
        • +

          register

          +
          void register(OpModeMeta name,
          +              java.lang.Class<? extends OpMode> opModeClass)
          +
          Registers a class for display on the driver station and availability for game play. + New instances of this class will be created as needed.
          +
          +
          Parameters:
          +
          name - metadata regarding the class, including the name to show on the DS menu
          +
          opModeClass - the class of the OpMode to create
          +
          +
        • +
        + + + +
          +
        • +

          register

          +
          void register(java.lang.String name,
          +              OpMode opModeInstance)
          +
          Register an *instance* of a class for display on the driver station and availability + for game play. You won't likely use this method very often.
          +
          +
          Parameters:
          +
          name - the name to show on the driver station menu
          +
          opModeInstance - the object instance to use for that menu item
          +
          +
        • +
        + + + +
          +
        • +

          register

          +
          void register(OpModeMeta name,
          +              OpMode opModeInstance)
          +
          Register an *instance* of a class for display on the driver station and availability + for game play. You won't likely use this method very often.
          +
          +
          Parameters:
          +
          name - metadata regarding the opmode, including the name to show on the driver station menu
          +
          opModeInstance - the object instance to use for that menu item
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeManagerNotifier.Notifications.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeManagerNotifier.Notifications.html new file mode 100644 index 00000000000..fb1e106a5ab --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeManagerNotifier.Notifications.html @@ -0,0 +1,262 @@ + + + + + +OpModeManagerNotifier.Notifications + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Interface OpModeManagerNotifier.Notifications

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onOpModePreInit

          +
          void onOpModePreInit(OpMode opMode)
          +
          The indicated opmode is just about to be initialized.
          +
        • +
        + + + +
          +
        • +

          onOpModePreStart

          +
          void onOpModePreStart(OpMode opMode)
          +
          The indicated opmode is just about to be started.
          +
        • +
        + + + +
          +
        • +

          onOpModePostStop

          +
          void onOpModePostStop(OpMode opMode)
          +
          The indicated opmode has just been stopped.
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeManagerNotifier.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeManagerNotifier.html new file mode 100644 index 00000000000..256b70aa8e1 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeManagerNotifier.html @@ -0,0 +1,280 @@ + + + + + +OpModeManagerNotifier + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Interface OpModeManagerNotifier

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface OpModeManagerNotifier
      +
      OpModeManagerNotifier.Notifications is an interface by which interested + parties can receive notification of the coming and going of opmodes.
      +
      +
      See Also:
      +
      OpModeManagerImpl#getOpModeManagerOfActivity(Activity)
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          registerListener

          +
          OpMode registerListener(OpModeManagerNotifier.Notifications listener)
          +
          Registers an object as explicitly interested in receiving notifications as + to the coming and going of opmodes.
          +
          +
          Parameters:
          +
          listener - the object which is to receive notifications
          +
          Returns:
          +
          the currently active opmode at the instant of registration
          +
          See Also:
          +
          unregisterListener(Notifications)
          +
          +
        • +
        + + + +
          +
        • +

          unregisterListener

          +
          void unregisterListener(OpModeManagerNotifier.Notifications listener)
          +
          Unregisters a previously registered listener. If the provided listener is in + fact not currently registered, the call has no effect.
          +
          +
          Parameters:
          +
          listener - the listener to be unregistered.
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeRegister.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeRegister.html new file mode 100644 index 00000000000..31c8f8d9ee3 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeRegister.html @@ -0,0 +1,228 @@ + + + + + +OpModeRegister + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Interface OpModeRegister

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface OpModeRegister
      +
      Register Op Modes
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          register

          +
          void register(OpModeManager manager)
          +
          The Op Mode Manager will call this method when it wants a list of all + available op modes. Add you op mode to the list to enable it.
          +
          +
          Parameters:
          +
          manager - op mode manager
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeRegistrar.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeRegistrar.html new file mode 100644 index 00000000000..fcb692ed003 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/OpModeRegistrar.html @@ -0,0 +1,174 @@ + + + + + +OpModeRegistrar + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Annotation Type OpModeRegistrar

    +
    +
    +
    +
      +
    • +
      +
      +
      @Documented
      + @Target(value=METHOD)
      + @Retention(value=RUNTIME)
      +public @interface OpModeRegistrar
      +
      Provides an easy and non-centralized way of contributing to the OpMode list + shown on an FTC Driver Station. While Autonomous and TeleOp annotations + can be placed on your *own* classes to register them, to register classes found + in libraries *other* than your own it is best to use a mechanism that does not require + that you modify source code in that other library. OpModeRegistar provides such a + mechanism. +

      Place an OpModeRegistrar annotation on a static method in your code, and that + method will be automatically called at the right time to register classes. Inside + the method, call opModeManager.register() methods, just as you would had you been + registering methods by putting your code inside the FtcOpModeRegister.register() + method as the robot controller runtime suggests.

      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/TeleOp.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/TeleOp.html new file mode 100644 index 00000000000..1d088c9007d --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/TeleOp.html @@ -0,0 +1,263 @@ + + + + + +TeleOp + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.eventloop.opmode
    +

    Annotation Type TeleOp

    +
    +
    +
    +
      +
    • +
      +
      +
      @Documented
      + @Target(value=TYPE)
      + @Retention(value=RUNTIME)
      +public @interface TeleOp
      +
      Provides an easy and non-centralized way of determining the OpMode list + shown on an FTC Driver Station. Put an TeleOp annotation on + your teleop OpModes that you want to show up in the driver station display. + + If you want to temporarily disable an opmode from showing up, then set then also add + a Disabled annotation to it.
      +
      +
      See Also:
      +
      Autonomous, +Disabled
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Optional Element Summary

        + + + + + + + + + + + + + + +
        Optional Elements 
        Modifier and TypeOptional Element and Description
        java.lang.Stringgroup +
        Optionally indicates a group of other OpModes with which the annotated + OpMode should be sorted on the driver station OpMode list.
        +
        java.lang.Stringname +
        The name to be used on the driver station display.
        +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Element Detail

        + + + +
          +
        • +

          name

          +
          public abstract java.lang.String name
          +
          The name to be used on the driver station display. If empty, the name of + the OpMode class will be used.
          +
          +
          Returns:
          +
          the name to use for the OpMode on the driver station
          +
          +
          +
          Default:
          +
          ""
          +
          +
        • +
        +
      • +
      +
        +
      • + + +
          +
        • +

          group

          +
          public abstract java.lang.String group
          +
          Optionally indicates a group of other OpModes with which the annotated + OpMode should be sorted on the driver station OpMode list.
          +
          +
          Returns:
          +
          the group into which the annotated OpMode is to be categorized
          +
          +
          +
          Default:
          +
          ""
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/package-frame.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/package-frame.html new file mode 100644 index 00000000000..a3cdddf3599 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/package-frame.html @@ -0,0 +1,38 @@ + + + + + +com.qualcomm.robotcore.eventloop.opmode + + + + +

    com.qualcomm.robotcore.eventloop.opmode

    + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/package-summary.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/package-summary.html new file mode 100644 index 00000000000..4305a05d677 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/package-summary.html @@ -0,0 +1,249 @@ + + + + + +com.qualcomm.robotcore.eventloop.opmode + + + + + + + + + + +
    +

    Package com.qualcomm.robotcore.eventloop.opmode

    +
    +
    +
      +
    • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Interface Summary 
      InterfaceDescription
      AnnotatedOpModeManager +
      OpModeManager instances are used as part of a decentralized OpMode registration + mechanism.
      +
      EventLoopManagerClient +
      Provides certain functionality to the EventLoopManager from its client
      +
      FtcRobotControllerServiceState +
      Created by David on 7/7/2017.
      +
      OpModeManager +
      OpModeManager instances are used to register opmodes for use.
      +
      OpModeManagerNotifier +
      OpModeManagerNotifier.Notifications is an interface by which interested + parties can receive notification of the coming and going of opmodes.
      +
      OpModeManagerNotifier.Notifications +
      OpModeManagerNotifier.Notifications can be used to receive notifications of the comings + and goings of opmodes in the system.
      +
      OpModeRegister +
      Register Op Modes
      +
      +
    • +
    • + + + + + + + + + + + + + + + + + + + + +
      Class Summary 
      ClassDescription
      AnnotatedOpModeRegistrarDeprecated +
      The function formerly performed by this class is now automatically executed by the system
      +
      LinearOpMode +
      Base class for user defined linear operation modes (op modes).
      +
      OpMode +
      Base class for user defined operation modes (op modes).
      +
      +
    • +
    • + + + + + + + + + + + + + + + + + + + + + + + + +
      Annotation Types Summary 
      Annotation TypeDescription
      Autonomous +
      Provides an easy and non-centralized way of determining the OpMode list + shown on an FTC Driver Station.
      +
      Disabled +
      Provides a way to temporarily disable an OpMode annotated with + Autonomous or TeleOp from showing up + on the driver station OpMode list.
      +
      OpModeRegistrar +
      Provides an easy and non-centralized way of contributing to the OpMode list + shown on an FTC Driver Station.
      +
      TeleOp +
      Provides an easy and non-centralized way of determining the OpMode list + shown on an FTC Driver Station.
      +
      +
    • +
    +
    + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/package-tree.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/package-tree.html new file mode 100644 index 00000000000..3180f05379b --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/opmode/package-tree.html @@ -0,0 +1,163 @@ + + + + + +com.qualcomm.robotcore.eventloop.opmode Class Hierarchy + + + + + + + + + + +
    +

    Hierarchy For Package com.qualcomm.robotcore.eventloop.opmode

    +Package Hierarchies: + +
    +
    +

    Class Hierarchy

    + +

    Interface Hierarchy

    + +

    Annotation Type Hierarchy

    +
      +
    • com.qualcomm.robotcore.eventloop.opmode.Autonomous (implements java.lang.annotation.Annotation)
    • +
    • com.qualcomm.robotcore.eventloop.opmode.Disabled (implements java.lang.annotation.Annotation)
    • +
    • com.qualcomm.robotcore.eventloop.opmode.TeleOp (implements java.lang.annotation.Annotation)
    • +
    • com.qualcomm.robotcore.eventloop.opmode.OpModeRegistrar (implements java.lang.annotation.Annotation)
    • +
    +
    + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/package-frame.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/package-frame.html new file mode 100644 index 00000000000..c9f5c9fbb72 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/package-frame.html @@ -0,0 +1,31 @@ + + + + + +com.qualcomm.robotcore.eventloop + + + + +

    com.qualcomm.robotcore.eventloop

    + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/package-summary.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/package-summary.html new file mode 100644 index 00000000000..3d432400d70 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/package-summary.html @@ -0,0 +1,206 @@ + + + + + +com.qualcomm.robotcore.eventloop + + + + + + + + + + +
    +

    Package com.qualcomm.robotcore.eventloop

    +
    +
    RobotCore event loop library.
    +
    +

    See: Description

    +
    +
    + + + + +

    Package com.qualcomm.robotcore.eventloop Description

    +
    RobotCore event loop library. +

    + If you would like to create your own custom event loop, see EventLoop.

    +
    + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/eventloop/package-tree.html b/doc/javadoc/com/qualcomm/robotcore/eventloop/package-tree.html new file mode 100644 index 00000000000..85912a98b72 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/eventloop/package-tree.html @@ -0,0 +1,154 @@ + + + + + +com.qualcomm.robotcore.eventloop Class Hierarchy + + + + + + + + + + +
    +

    Hierarchy For Package com.qualcomm.robotcore.eventloop

    +Package Hierarchies: + +
    +
    +

    Class Hierarchy

    + +

    Interface Hierarchy

    + +

    Enum Hierarchy

    +
      +
    • java.lang.Object +
        +
      • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
      • +
      +
    • +
    +
    + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/exception/DuplicateNameException.html b/doc/javadoc/com/qualcomm/robotcore/exception/DuplicateNameException.html new file mode 100644 index 00000000000..053fbbc2f82 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/exception/DuplicateNameException.html @@ -0,0 +1,279 @@ + + + + + +DuplicateNameException + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.exception
    +

    Class DuplicateNameException

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Throwable
      • +
      • +
          +
        • java.lang.Exception
        • +
        • +
            +
          • java.lang.RuntimeException
          • +
          • +
              +
            • com.qualcomm.robotcore.exception.DuplicateNameException
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable
      +
      +
      +
      +
      public class DuplicateNameException
      +extends java.lang.RuntimeException
      +
      Created by bob on 2016-04-20.
      +
      +
      See Also:
      +
      Serialized Form
      +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        +
          +
        • + + +

          Methods inherited from class java.lang.Throwable

          +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          DuplicateNameException

          +
          public DuplicateNameException(java.lang.String message)
          +
        • +
        + + + +
          +
        • +

          DuplicateNameException

          +
          public DuplicateNameException(java.lang.String format,
          +                              java.lang.Object... args)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/exception/RobotCoreException.html b/doc/javadoc/com/qualcomm/robotcore/exception/RobotCoreException.html new file mode 100644 index 00000000000..e57c90bce9e --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/exception/RobotCoreException.html @@ -0,0 +1,325 @@ + + + + + +RobotCoreException + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.exception
    +

    Class RobotCoreException

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Throwable
      • +
      • +
          +
        • java.lang.Exception
        • +
        • +
            +
          • com.qualcomm.robotcore.exception.RobotCoreException
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable
      +
      +
      +
      +
      public class RobotCoreException
      +extends java.lang.Exception
      +
      +
      See Also:
      +
      Serialized Form
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + + + + + +
        Constructors 
        Constructor and Description
        RobotCoreException(java.lang.String message) 
        RobotCoreException(java.lang.String format, + java.lang.Object... args) 
        RobotCoreException(java.lang.String message, + java.lang.Throwable cause) 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static RobotCoreExceptioncreateChained(java.lang.Exception e, + java.lang.String format, + java.lang.Object... args) 
        +
          +
        • + + +

          Methods inherited from class java.lang.Throwable

          +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          RobotCoreException

          +
          public RobotCoreException(java.lang.String message)
          +
        • +
        + + + +
          +
        • +

          RobotCoreException

          +
          public RobotCoreException(java.lang.String message,
          +                          java.lang.Throwable cause)
          +
        • +
        + + + +
          +
        • +

          RobotCoreException

          +
          public RobotCoreException(java.lang.String format,
          +                          java.lang.Object... args)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          createChained

          +
          public static RobotCoreException createChained(java.lang.Exception e,
          +                                               java.lang.String format,
          +                                               java.lang.Object... args)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/exception/RobotProtocolException.html b/doc/javadoc/com/qualcomm/robotcore/exception/RobotProtocolException.html new file mode 100644 index 00000000000..fe5a90aaebf --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/exception/RobotProtocolException.html @@ -0,0 +1,273 @@ + + + + + +RobotProtocolException + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.exception
    +

    Class RobotProtocolException

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Throwable
      • +
      • +
          +
        • java.lang.Exception
        • +
        • +
            +
          • com.qualcomm.robotcore.exception.RobotProtocolException
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable
      +
      +
      +
      +
      public class RobotProtocolException
      +extends java.lang.Exception
      +
      +
      See Also:
      +
      Serialized Form
      +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        +
          +
        • + + +

          Methods inherited from class java.lang.Throwable

          +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          RobotProtocolException

          +
          public RobotProtocolException(java.lang.String message)
          +
        • +
        + + + +
          +
        • +

          RobotProtocolException

          +
          public RobotProtocolException(java.lang.String format,
          +                              java.lang.Object... args)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/exception/TargetPositionNotSetException.html b/doc/javadoc/com/qualcomm/robotcore/exception/TargetPositionNotSetException.html new file mode 100644 index 00000000000..c3b9e522dc3 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/exception/TargetPositionNotSetException.html @@ -0,0 +1,264 @@ + + + + + +TargetPositionNotSetException + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.exception
    +

    Class TargetPositionNotSetException

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Throwable
      • +
      • +
          +
        • java.lang.Exception
        • +
        • +
            +
          • java.lang.RuntimeException
          • +
          • +
              +
            • com.qualcomm.robotcore.exception.TargetPositionNotSetException
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable
      +
      +
      +
      +
      public class TargetPositionNotSetException
      +extends java.lang.RuntimeException
      +
      +
      See Also:
      +
      Serialized Form
      +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        +
          +
        • + + +

          Methods inherited from class java.lang.Throwable

          +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          TargetPositionNotSetException

          +
          public TargetPositionNotSetException()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/exception/package-frame.html b/doc/javadoc/com/qualcomm/robotcore/exception/package-frame.html new file mode 100644 index 00000000000..815b564e50a --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/exception/package-frame.html @@ -0,0 +1,22 @@ + + + + + +com.qualcomm.robotcore.exception + + + + +

    com.qualcomm.robotcore.exception

    + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/exception/package-summary.html b/doc/javadoc/com/qualcomm/robotcore/exception/package-summary.html new file mode 100644 index 00000000000..74dd59209ed --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/exception/package-summary.html @@ -0,0 +1,162 @@ + + + + + +com.qualcomm.robotcore.exception + + + + + + + + + + +
    +

    Package com.qualcomm.robotcore.exception

    +
    +
    RobotCore exception library.
    +
    +

    See: Description

    +
    +
    + + + + +

    Package com.qualcomm.robotcore.exception Description

    +
    RobotCore exception library.
    +
    + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/exception/package-tree.html b/doc/javadoc/com/qualcomm/robotcore/exception/package-tree.html new file mode 100644 index 00000000000..22d3af98db5 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/exception/package-tree.html @@ -0,0 +1,149 @@ + + + + + +com.qualcomm.robotcore.exception Class Hierarchy + + + + + + + + + + +
    +

    Hierarchy For Package com.qualcomm.robotcore.exception

    +Package Hierarchies: + +
    +
    +

    Class Hierarchy

    + +
    + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/AccelerationSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/AccelerationSensor.html new file mode 100644 index 00000000000..36cfefd8a90 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/AccelerationSensor.html @@ -0,0 +1,273 @@ + + + + + +AccelerationSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface AccelerationSensor

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getAcceleration

          +
          Acceleration getAcceleration()
          +
          Acceleration, measured in g's
          +
          +
          Returns:
          +
          acceleration in g's
          +
          +
        • +
        + + + +
          +
        • +

          status

          +
          java.lang.String status()
          +
          Status of this sensor, in string form
          +
          +
          Returns:
          +
          status
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogInput.html b/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogInput.html new file mode 100644 index 00000000000..031728844b2 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogInput.html @@ -0,0 +1,465 @@ + + + + + +AnalogInput + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class AnalogInput

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.AnalogInput
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      HardwareDevice
      +
      +
      +
      +
      public class AnalogInput
      +extends java.lang.Object
      +implements HardwareDevice
      +
      Control a single analog device
      +
    • +
    +
    +
    +
      +
    • + + + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        voidclose() +
        Closes this device
        +
        java.lang.StringgetConnectionInfo() +
        Get connection information about this device in a human readable format
        +
        java.lang.StringgetDeviceName() +
        Returns a string suitable for display to the user as to the type of device.
        +
        HardwareDevice.ManufacturergetManufacturer() +
        Returns an indication of the manufacturer of this device.
        +
        doublegetMaxVoltage() +
        Returns the maximum value that getVoltage() is capable of reading
        +
        intgetVersion() +
        Version
        +
        doublegetVoltage() +
        Returns the current voltage of this input.
        +
        voidresetDeviceConfigurationForOpMode() +
        Resets the device's configuration to that which is expected at the beginning of an OpMode.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          AnalogInput

          +
          public AnalogInput(AnalogInputController controller,
          +                   int channel)
          +
          Constructor
          +
          +
          Parameters:
          +
          controller - AnalogInput controller this channel is attached to
          +
          channel - channel on the analog input controller
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + + + + + +
          +
        • +

          getVoltage

          +
          public double getVoltage()
          +
          Returns the current voltage of this input.
          +
          +
          Returns:
          +
          the current analog input voltage, in volts.
          +
          +
        • +
        + + + +
          +
        • +

          getMaxVoltage

          +
          public double getMaxVoltage()
          +
          Returns the maximum value that getVoltage() is capable of reading
          +
          +
          Returns:
          +
          the maximum value that getVoltage() is capable of reading, in volts.
          +
          See Also:
          +
          getVoltage()
          +
          +
        • +
        + + + +
          +
        • +

          getDeviceName

          +
          public java.lang.String getDeviceName()
          +
          Description copied from interface: HardwareDevice
          +
          Returns a string suitable for display to the user as to the type of device. + Note that this is a device-type-specific name; it has nothing to do with the + name by which a user might have configured the device in a robot configuration.
          +
          +
          Specified by:
          +
          getDeviceName in interface HardwareDevice
          +
          Returns:
          +
          device manufacturer and name
          +
          +
        • +
        + + + +
          +
        • +

          getConnectionInfo

          +
          public java.lang.String getConnectionInfo()
          +
          Description copied from interface: HardwareDevice
          +
          Get connection information about this device in a human readable format
          +
          +
          Specified by:
          +
          getConnectionInfo in interface HardwareDevice
          +
          Returns:
          +
          connection info
          +
          +
        • +
        + + + +
          +
        • +

          getVersion

          +
          public int getVersion()
          +
          Description copied from interface: HardwareDevice
          +
          Version
          +
          +
          Specified by:
          +
          getVersion in interface HardwareDevice
          +
          Returns:
          +
          get the version of this device
          +
          +
        • +
        + + + +
          +
        • +

          resetDeviceConfigurationForOpMode

          +
          public void resetDeviceConfigurationForOpMode()
          +
          Description copied from interface: HardwareDevice
          +
          Resets the device's configuration to that which is expected at the beginning of an OpMode. + For example, motors will reset the their direction to 'forward'.
          +
          +
          Specified by:
          +
          resetDeviceConfigurationForOpMode in interface HardwareDevice
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogInputController.html b/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogInputController.html new file mode 100644 index 00000000000..74b67a9f8dd --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogInputController.html @@ -0,0 +1,305 @@ + + + + + +AnalogInputController + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface AnalogInputController

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getAnalogInputVoltage

          +
          double getAnalogInputVoltage(int channel)
          +
          Get the value of this analog input + + Return the current ADC results from the A0-A7 channel input pins.
          +
          +
          Parameters:
          +
          channel - which analog channel to read
          +
          Returns:
          +
          the current voltage in volts
          +
          +
        • +
        + + + +
          +
        • +

          getMaxAnalogInputVoltage

          +
          double getMaxAnalogInputVoltage()
          +
          Returns the maximum value that getAnalogInputVoltage() is capable of reading
          +
          +
          Returns:
          +
          the maximum value that getAnalogInputVoltage() is capable of reading, in volts.
          +
          See Also:
          +
          getAnalogInputVoltage(int)
          +
          +
        • +
        + + + +
          +
        • +

          getSerialNumber

          +
          SerialNumber getSerialNumber()
          +
          Serial Number
          +
          +
          Returns:
          +
          return the USB serial number of this device
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogOutput.html b/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogOutput.html new file mode 100644 index 00000000000..9513c4135c3 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogOutput.html @@ -0,0 +1,490 @@ + + + + + +AnalogOutput + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class AnalogOutput

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.AnalogOutput
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      HardwareDevice
      +
      +
      +
      +
      public class AnalogOutput
      +extends java.lang.Object
      +implements HardwareDevice
      +
      Control a single analog device
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          AnalogOutput

          +
          public AnalogOutput(AnalogOutputController controller,
          +                    int channel)
          +
          Constructor
          +
          +
          Parameters:
          +
          controller - AnalogOutput controller this channel is attached to
          +
          channel - channel on the analog output controller
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setAnalogOutputVoltage

          +
          public void setAnalogOutputVoltage(int voltage)
          +
          Sets the channel output voltage. + If mode == 0: takes input from -1023-1023, output in the range -4 to +4 volts. + If mode == 1, 2, or 3: takes input from 0-1023, output in the range 0 to 8 volts.
          +
          +
          Parameters:
          +
          voltage - voltage value in the correct range.
          +
          +
        • +
        + + + +
          +
        • +

          setAnalogOutputFrequency

          +
          public void setAnalogOutputFrequency(int freq)
          +
          Sets the channel output frequency in the range 1-5,000 Hz in mode 1, 2 or 3. + If mode 0 is selected, this field will be over-written to 0.
          +
          +
          Parameters:
          +
          freq - output frequency in the range1-5,000Hz
          +
          +
        • +
        + + + +
          +
        • +

          setAnalogOutputMode

          +
          public void setAnalogOutputMode(byte mode)
          +
          Sets the channel operating mode. + Mode 0: Voltage output. Range: -4V - 4V + Mode 1: Sine wave output. Range: 0 - 8V + Mode 2: Square wave output. Range: 0 - 8V + Mode 3: Triangle wave output. Range: 0 - 8V
          +
          +
          Parameters:
          +
          mode - voltage, sine, square, or triangle
          +
          +
        • +
        + + + + + + + +
          +
        • +

          getDeviceName

          +
          public java.lang.String getDeviceName()
          +
          Description copied from interface: HardwareDevice
          +
          Returns a string suitable for display to the user as to the type of device. + Note that this is a device-type-specific name; it has nothing to do with the + name by which a user might have configured the device in a robot configuration.
          +
          +
          Specified by:
          +
          getDeviceName in interface HardwareDevice
          +
          Returns:
          +
          device manufacturer and name
          +
          +
        • +
        + + + +
          +
        • +

          getConnectionInfo

          +
          public java.lang.String getConnectionInfo()
          +
          Description copied from interface: HardwareDevice
          +
          Get connection information about this device in a human readable format
          +
          +
          Specified by:
          +
          getConnectionInfo in interface HardwareDevice
          +
          Returns:
          +
          connection info
          +
          +
        • +
        + + + +
          +
        • +

          getVersion

          +
          public int getVersion()
          +
          Description copied from interface: HardwareDevice
          +
          Version
          +
          +
          Specified by:
          +
          getVersion in interface HardwareDevice
          +
          Returns:
          +
          get the version of this device
          +
          +
        • +
        + + + +
          +
        • +

          resetDeviceConfigurationForOpMode

          +
          public void resetDeviceConfigurationForOpMode()
          +
          Description copied from interface: HardwareDevice
          +
          Resets the device's configuration to that which is expected at the beginning of an OpMode. + For example, motors will reset the their direction to 'forward'.
          +
          +
          Specified by:
          +
          resetDeviceConfigurationForOpMode in interface HardwareDevice
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogOutputController.html b/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogOutputController.html new file mode 100644 index 00000000000..b266eb927c9 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogOutputController.html @@ -0,0 +1,335 @@ + + + + + +AnalogOutputController + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface AnalogOutputController

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice
      +
      +
      +
      All Known Subinterfaces:
      +
      DeviceInterfaceModule
      +
      +
      +
      +
      public interface AnalogOutputController
      +extends HardwareDevice
      +
      Interface for working with Analog Controllers +

      + Different analog input controllers will implement this interface.

      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getSerialNumber

          +
          SerialNumber getSerialNumber()
          +
          Serial Number
          +
          +
          Returns:
          +
          return the USB serial number of this device
          +
          +
        • +
        + + + +
          +
        • +

          setAnalogOutputVoltage

          +
          void setAnalogOutputVoltage(int port,
          +                            int voltage)
          +
          Sets the channel output voltage. + If mode == 0: takes input from -1023-1023, output in the range -4 to +4 volts. + If mode == 1, 2, or 3: takes input from 0-1023, output in the range 0 to 8 volts.
          +
          +
          Parameters:
          +
          port - channel 0 or 1
          +
          voltage - voltage value in the correct range.
          +
          +
        • +
        + + + +
          +
        • +

          setAnalogOutputFrequency

          +
          void setAnalogOutputFrequency(int port,
          +                              int freq)
          +
          Sets the channel output frequency in the range 1-5,000 Hz in mode 1, 2 or 3. + If mode 0 is selected, this field will be over-written to 0.
          +
          +
          Parameters:
          +
          port - 1 or 0
          +
          freq - output frequency in the range1-5,000Hz
          +
          +
        • +
        + + + +
          +
        • +

          setAnalogOutputMode

          +
          void setAnalogOutputMode(int port,
          +                         byte mode)
          +
          Sets the channel operating mode. + Mode 0: Voltage output. Range: -4V - 4V + Mode 1: Sine wave output. Range: 0 - 8V + Mode 2: Square wave output. Range: 0 - 8V + Mode 3: Triangle wave output. Range: 0 - 8V
          +
          +
          Parameters:
          +
          port - 0 or 1
          +
          mode - voltage, sine, square, or triangle
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogSensor.html new file mode 100644 index 00000000000..26cf2362ae4 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/AnalogSensor.html @@ -0,0 +1,229 @@ + + + + + +AnalogSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface AnalogSensor

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface AnalogSensor
      +
      Instances of this interface are sensors whose input is reported as a voltage level + to an analog to digital converter.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          readRawVoltage

          +
          double readRawVoltage()
          +
          Returns the sensor's current value as a raw voltage level. Note that for + Returns the light level voltage as reported by the sensor. Note that returned values + INCREASE as the light energy INCREASES.
          +
          +
          Returns:
          +
          unscaled / unclipped voltage level reported by the device
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/Blinker.Step.html b/doc/javadoc/com/qualcomm/robotcore/hardware/Blinker.Step.html new file mode 100644 index 00000000000..fc3afa0cc90 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/Blinker.Step.html @@ -0,0 +1,465 @@ + + + + + +Blinker.Step + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class Blinker.Step

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.Blinker.Step
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing interface:
      +
      Blinker
      +
      +
      +
      +
      public static class Blinker.Step
      +extends java.lang.Object
      +
      Blinker.Step represents a particular color held for a particular length of time.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        protected intcolor 
        protected intmsDuration 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + + +
        Constructors 
        Constructor and Description
        Step() 
        Step(int color, + long duration, + java.util.concurrent.TimeUnit unit) 
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          color

          +
          protected int color
          +
        • +
        + + + +
          +
        • +

          msDuration

          +
          protected int msDuration
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Step

          +
          public Step()
          +
        • +
        + + + +
          +
        • +

          Step

          +
          public Step(int color,
          +            long duration,
          +            java.util.concurrent.TimeUnit unit)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + + + + + +
          +
        • +

          equals

          +
          public boolean equals(java.lang.Object them)
          +
          +
          Overrides:
          +
          equals in class java.lang.Object
          +
          +
        • +
        + + + + + + + +
          +
        • +

          hashCode

          +
          public int hashCode()
          +
          +
          Overrides:
          +
          hashCode in class java.lang.Object
          +
          +
        • +
        + + + +
          +
        • +

          isLit

          +
          public boolean isLit()
          +
        • +
        + + + +
          +
        • +

          setLit

          +
          public void setLit(boolean isEnabled)
          +
        • +
        + + + +
          +
        • +

          getColor

          +
          public int getColor()
          +
        • +
        + + + +
          +
        • +

          setColor

          +
          public void setColor(int color)
          +
        • +
        + + + +
          +
        • +

          getDurationMs

          +
          public int getDurationMs()
          +
        • +
        + + + +
          +
        • +

          setDuration

          +
          public void setDuration(long duration,
          +                        java.util.concurrent.TimeUnit unit)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/Blinker.html b/doc/javadoc/com/qualcomm/robotcore/hardware/Blinker.html new file mode 100644 index 00000000000..264285044b2 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/Blinker.html @@ -0,0 +1,391 @@ + + + + + +Blinker + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface Blinker

    +
    +
    +
    +
      +
    • +
      +
      All Known Implementing Classes:
      +
      LightBlinker
      +
      +
      +
      +
      public interface Blinker
      +
      Blinker provides the means to control an LED or a light that can be illuminated in a + sequenced pattern of colors and durations.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Nested Class Summary

        + + + + + + + + + + +
        Nested Classes 
        Modifier and TypeInterface and Description
        static class Blinker.Step +
        Blinker.Step represents a particular color held for a particular length of time.
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods 
        Modifier and TypeMethod and Description
        intgetBlinkerPatternMaxLength() +
        Returns the maximum number of Blinker.Steps that can be present in a pattern
        +
        java.util.Collection<Blinker.Step>getPattern() +
        Returns the current blinking pattern
        +
        booleanpatternStackNotEmpty() +
        Returns whether the pattern stack is currently nonempty.
        +
        booleanpopPattern() +
        Pops the next pattern off of the stack of saved patterns, if any.
        +
        voidpushPattern(java.util.Collection<Blinker.Step> steps) +
        Saves the existing pattern such that it can be later restored, then calls setPattern().
        +
        voidsetConstant(int color) +
        Sets the blinker pattern to be a single, unchanging color
        +
        voidsetPattern(java.util.Collection<Blinker.Step> steps) +
        Sets the pattern with which this LED or light should illuminate.
        +
        voidstopBlinking() +
        Sets the blinker to constant black and frees any internal resources
        +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setPattern

          +
          void setPattern(java.util.Collection<Blinker.Step> steps)
          +
          Sets the pattern with which this LED or light should illuminate. If the list of steps is longer + than the maximum number supported, then the pattern is truncated.
          +
          +
          Parameters:
          +
          steps - the pattern of colors and durations that the LED or light should illuminate itself with
          +
          +
        • +
        + + + +
          +
        • +

          getPattern

          +
          java.util.Collection<Blinker.Step> getPattern()
          +
          Returns the current blinking pattern
          +
          +
          Returns:
          +
          the current blinking pattern
          +
          +
        • +
        + + + +
          +
        • +

          pushPattern

          +
          void pushPattern(java.util.Collection<Blinker.Step> steps)
          +
          Saves the existing pattern such that it can be later restored, then calls setPattern().
          +
          +
          Parameters:
          +
          steps - the new pattern to be displayed
          +
          +
        • +
        + + + +
          +
        • +

          patternStackNotEmpty

          +
          boolean patternStackNotEmpty()
          +
          Returns whether the pattern stack is currently nonempty.
          +
          +
          Returns:
          +
          whether the pattern stack is currently nonempty.
          +
          +
        • +
        + + + +
          +
        • +

          popPattern

          +
          boolean popPattern()
          +
          Pops the next pattern off of the stack of saved patterns, if any. + If the stack is empty, then this sets the blinker to a constant black.
          +
          +
          Returns:
          +
          whether or not a pattern was removed from the stack (ie: whether + the pattern stack was not empty prior to the call
          +
          +
        • +
        + + + +
          +
        • +

          setConstant

          +
          void setConstant(int color)
          +
          Sets the blinker pattern to be a single, unchanging color
          +
          +
          Parameters:
          +
          color - the color with which the LED or light should be illuminated
          +
          +
        • +
        + + + +
          +
        • +

          stopBlinking

          +
          void stopBlinking()
          +
          Sets the blinker to constant black and frees any internal resources
          +
        • +
        + + + +
          +
        • +

          getBlinkerPatternMaxLength

          +
          int getBlinkerPatternMaxLength()
          +
          Returns the maximum number of Blinker.Steps that can be present in a pattern
          +
          +
          Returns:
          +
          the maximum number of Blinker.Steps that can be present in a pattern
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/CRServo.html b/doc/javadoc/com/qualcomm/robotcore/hardware/CRServo.html new file mode 100644 index 00000000000..1022f0282cf --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/CRServo.html @@ -0,0 +1,295 @@ + + + + + +CRServo + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface CRServo

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getController

          +
          ServoController getController()
          +
          Returns the underlying servo controller on which this servo is situated.
          +
          +
          Returns:
          +
          the underlying servo controller on which this servo is situated.
          +
          See Also:
          +
          getPortNumber()
          +
          +
        • +
        + + + +
          +
        • +

          getPortNumber

          +
          int getPortNumber()
          +
          Returns the port number on the underlying servo controller on which this motor is situated.
          +
          +
          Returns:
          +
          the port number on the underlying servo controller on which this motor is situated.
          +
          See Also:
          +
          getController()
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/CRServoImpl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/CRServoImpl.html new file mode 100644 index 00000000000..6e8236baa11 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/CRServoImpl.html @@ -0,0 +1,748 @@ + + + + + +CRServoImpl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class CRServoImpl

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.CRServoImpl
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      CRServo, DcMotorSimple, HardwareDevice
      +
      +
      +
      Direct Known Subclasses:
      +
      CRServoImplEx
      +
      +
      +
      +
      public class CRServoImpl
      +extends java.lang.Object
      +implements CRServo
      +
      ContinuousRotationServoImpl provides an implementation of continuous + rotation servo functionality.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          CRServoImpl

          +
          public CRServoImpl(ServoController controller,
          +                   int portNumber)
          +
          Constructor
          +
          +
          Parameters:
          +
          controller - Servo controller that this servo is attached to
          +
          portNumber - physical port number on the servo controller
          +
          +
        • +
        + + + +
          +
        • +

          CRServoImpl

          +
          public CRServoImpl(ServoController controller,
          +                   int portNumber,
          +                   DcMotorSimple.Direction direction)
          +
          Constructor
          +
          +
          Parameters:
          +
          controller - Servo controller that this servo is attached to
          +
          portNumber - physical port number on the servo controller
          +
          direction - FORWARD for normal operation, REVERSE to reverse operation
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + + + + + +
          +
        • +

          getDeviceName

          +
          public java.lang.String getDeviceName()
          +
          Description copied from interface: HardwareDevice
          +
          Returns a string suitable for display to the user as to the type of device. + Note that this is a device-type-specific name; it has nothing to do with the + name by which a user might have configured the device in a robot configuration.
          +
          +
          Specified by:
          +
          getDeviceName in interface HardwareDevice
          +
          Returns:
          +
          device manufacturer and name
          +
          +
        • +
        + + + +
          +
        • +

          getConnectionInfo

          +
          public java.lang.String getConnectionInfo()
          +
          Description copied from interface: HardwareDevice
          +
          Get connection information about this device in a human readable format
          +
          +
          Specified by:
          +
          getConnectionInfo in interface HardwareDevice
          +
          Returns:
          +
          connection info
          +
          +
        • +
        + + + +
          +
        • +

          getVersion

          +
          public int getVersion()
          +
          Description copied from interface: HardwareDevice
          +
          Version
          +
          +
          Specified by:
          +
          getVersion in interface HardwareDevice
          +
          Returns:
          +
          get the version of this device
          +
          +
        • +
        + + + +
          +
        • +

          resetDeviceConfigurationForOpMode

          +
          public void resetDeviceConfigurationForOpMode()
          +
          Description copied from interface: HardwareDevice
          +
          Resets the device's configuration to that which is expected at the beginning of an OpMode. + For example, motors will reset the their direction to 'forward'.
          +
          +
          Specified by:
          +
          resetDeviceConfigurationForOpMode in interface HardwareDevice
          +
          +
        • +
        + + + + + + + +
          +
        • +

          getController

          +
          public ServoController getController()
          +
          Description copied from interface: CRServo
          +
          Returns the underlying servo controller on which this servo is situated.
          +
          +
          Specified by:
          +
          getController in interface CRServo
          +
          Returns:
          +
          the underlying servo controller on which this servo is situated.
          +
          See Also:
          +
          CRServo.getPortNumber()
          +
          +
        • +
        + + + +
          +
        • +

          getPortNumber

          +
          public int getPortNumber()
          +
          Description copied from interface: CRServo
          +
          Returns the port number on the underlying servo controller on which this motor is situated.
          +
          +
          Specified by:
          +
          getPortNumber in interface CRServo
          +
          Returns:
          +
          the port number on the underlying servo controller on which this motor is situated.
          +
          See Also:
          +
          CRServo.getController()
          +
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          setPower

          +
          public void setPower(double power)
          +
          Description copied from interface: DcMotorSimple
          +
          Sets the power level of the motor, expressed as a fraction of the maximum + possible power / speed supported according to the run mode in which the + motor is operating. + +

          Setting a power level of zero will brake the motor

          +
          +
          Specified by:
          +
          setPower in interface DcMotorSimple
          +
          Parameters:
          +
          power - the new power level of the motor, a value in the interval [-1.0, 1.0]
          +
          See Also:
          +
          DcMotorSimple.getPower(), +DcMotor.setMode(DcMotor.RunMode), +DcMotor.setPowerFloat()
          +
          +
        • +
        + + + +
          +
        • +

          getPower

          +
          public double getPower()
          +
          Description copied from interface: DcMotorSimple
          +
          Returns the current configured power level of the motor.
          +
          +
          Specified by:
          +
          getPower in interface DcMotorSimple
          +
          Returns:
          +
          the current level of the motor, a value in the interval [0.0, 1.0]
          +
          See Also:
          +
          DcMotorSimple.setPower(double)
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/CRServoImplEx.html b/doc/javadoc/com/qualcomm/robotcore/hardware/CRServoImplEx.html new file mode 100644 index 00000000000..6f20987aaf3 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/CRServoImplEx.html @@ -0,0 +1,488 @@ + + + + + +CRServoImplEx + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class CRServoImplEx

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/ColorSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/ColorSensor.html new file mode 100644 index 00000000000..d9408917b68 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/ColorSensor.html @@ -0,0 +1,392 @@ + + + + + +ColorSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface ColorSensor

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          red

          +
          int red()
          +
          Get the Red values detected by the sensor as an int.
          +
          +
          Returns:
          +
          reading, unscaled.
          +
          +
        • +
        + + + +
          +
        • +

          green

          +
          int green()
          +
          Get the Green values detected by the sensor as an int.
          +
          +
          Returns:
          +
          reading, unscaled.
          +
          +
        • +
        + + + +
          +
        • +

          blue

          +
          int blue()
          +
          Get the Blue values detected by the sensor as an int.
          +
          +
          Returns:
          +
          reading, unscaled.
          +
          +
        • +
        + + + +
          +
        • +

          alpha

          +
          int alpha()
          +
          Get the amount of light detected by the sensor as an int.
          +
          +
          Returns:
          +
          reading, unscaled.
          +
          +
        • +
        + + + +
          +
        • +

          argb

          +
          int argb()
          +
          Get the "hue"
          +
          +
          Returns:
          +
          hue
          +
          +
        • +
        + + + +
          +
        • +

          enableLed

          +
          void enableLed(boolean enable)
          +
          Enable the LED light
          +
          +
          Parameters:
          +
          enable - true to enable; false to disable
          +
          +
        • +
        + + + +
          +
        • +

          setI2cAddress

          +
          void setI2cAddress(I2cAddr newAddress)
          +
          Set the I2C address to a new value.
          +
        • +
        + + + +
          +
        • +

          getI2cAddress

          +
          I2cAddr getI2cAddress()
          +
          Get the current I2C Address of this object. + Not necessarily the same as the I2C address of the actual device. + + Return the current I2C address.
          +
          +
          Returns:
          +
          current I2C address
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.CompassMode.html b/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.CompassMode.html new file mode 100644 index 00000000000..e1b8c83bc62 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.CompassMode.html @@ -0,0 +1,342 @@ + + + + + +CompassSensor.CompassMode + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum CompassSensor.CompassMode

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static CompassSensor.CompassModevalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static CompassSensor.CompassMode[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static CompassSensor.CompassMode[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (CompassSensor.CompassMode c : CompassSensor.CompassMode.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static CompassSensor.CompassMode valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.html new file mode 100644 index 00000000000..af04a2f9967 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/CompassSensor.html @@ -0,0 +1,326 @@ + + + + + +CompassSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface CompassSensor

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getDirection

          +
          double getDirection()
          +
          Get the current direction, in degrees, in the range [0, 360). North is zero, + East is 90, South is 180, and West is 270.
          +
          +
          Returns:
          +
          current direction, in degrees
          +
          +
        • +
        + + + +
          +
        • +

          status

          +
          java.lang.String status()
          +
          Status of this sensor, in string form
          +
          +
          Returns:
          +
          status
          +
          +
        • +
        + + + + + + + +
          +
        • +

          calibrationFailed

          +
          boolean calibrationFailed()
          +
          Check to see whether calibration was successful. + After attempting a calibration, the hardware will (eventually) indicate whether or + not it was unsuccessful. The default is "success", even when the calibration is not + guaranteed to have completed successfully. + + A user should monitor this field for (at least) several seconds to determine success.
          +
          +
          Returns:
          +
          failure
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/ControlSystem.html b/doc/javadoc/com/qualcomm/robotcore/hardware/ControlSystem.html new file mode 100644 index 00000000000..4f19555aa1a --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/ControlSystem.html @@ -0,0 +1,339 @@ + + + + + +ControlSystem + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum ControlSystem

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<ControlSystem>
      • +
      • +
          +
        • com.qualcomm.robotcore.hardware.ControlSystem
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<ControlSystem>
      +
      +
      +
      +
      public enum ControlSystem
      +extends java.lang.Enum<ControlSystem>
      +
      Used to specify what type of control system a particular piece of hardware is connected to
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static ControlSystemvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static ControlSystem[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static ControlSystem[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (ControlSystem c : ControlSystem.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static ControlSystem valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.RunMode.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.RunMode.html new file mode 100644 index 00000000000..a7e687b6490 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.RunMode.html @@ -0,0 +1,495 @@ + + + + + +DcMotor.RunMode + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum DcMotor.RunMode

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<DcMotor.RunMode>
      • +
      • +
          +
        • com.qualcomm.robotcore.hardware.DcMotor.RunMode
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<DcMotor.RunMode>
      +
      +
      +
      Enclosing interface:
      +
      DcMotor
      +
      +
      +
      +
      public static enum DcMotor.RunMode
      +extends java.lang.Enum<DcMotor.RunMode>
      +
      The run mode of a motor DcMotor.RunMode controls how the motor interprets the + it's parameter settings passed through power- and encoder-related methods. + Some of these modes internally use PID + control to achieve their function, while others do not. Those that do are referred + to as "PID modes".
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Detail

        + + + +
          +
        • +

          RUN_WITHOUT_ENCODER

          +
          public static final DcMotor.RunMode RUN_WITHOUT_ENCODER
          +
          The motor is simply to run at whatever velocity is achieved by apply a particular + power level to the motor.
          +
        • +
        + + + +
          +
        • +

          RUN_USING_ENCODER

          +
          public static final DcMotor.RunMode RUN_USING_ENCODER
          +
          The motor is to do its best to run at targeted velocity. An encoder must be affixed + to the motor in order to use this mode. This is a PID mode.
          +
        • +
        + + + +
          +
        • +

          RUN_TO_POSITION

          +
          public static final DcMotor.RunMode RUN_TO_POSITION
          +
          The motor is to attempt to rotate in whatever direction is necessary to cause the + encoder reading to advance or retreat from its current setting to the setting which + has been provided through the setTargetPosition() method. + An encoder must be affixed to this motor in order to use this mode. This is a PID mode.
          +
        • +
        + + + +
          +
        • +

          STOP_AND_RESET_ENCODER

          +
          public static final DcMotor.RunMode STOP_AND_RESET_ENCODER
          +
          The motor is to set the current encoder position to zero. In contrast to + RUN_TO_POSITION, + the motor is not rotated in order to achieve this; rather, the current rotational + position of the motor is simply reinterpreted as the new zero value. However, as + a side effect of placing a motor in this mode, power is removed from the motor, causing + it to stop, though it is unspecified whether the motor enters brake or float mode. + + Further, it should be noted that setting a motor toSTOP_AND_RESET_ENCODER may or may not be a transient state: motors connected to some motor + controllers will remain in this mode until explicitly transitioned to a different one, while + motors connected to other motor controllers will automatically transition to a different + mode after the reset of the encoder is complete.
          +
        • +
        + + + + + + + + + + + + +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static DcMotor.RunMode[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (DcMotor.RunMode c : DcMotor.RunMode.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static DcMotor.RunMode valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + +
          +
        • +

          migrate

          +
          @Deprecated
          +public DcMotor.RunMode migrate()
          +
          Deprecated. Replace use of old constants with new
          +
          Returns the new new constant corresponding to old constant names.
          +
        • +
        + + + +
          +
        • +

          isPIDMode

          +
          public boolean isPIDMode()
          +
          Returns whether this RunMode is a PID-controlled mode or not
          +
          +
          Returns:
          +
          whether this RunMode is a PID-controlled mode or not
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.ZeroPowerBehavior.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.ZeroPowerBehavior.html new file mode 100644 index 00000000000..5c38ed54620 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.ZeroPowerBehavior.html @@ -0,0 +1,377 @@ + + + + + +DcMotor.ZeroPowerBehavior + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum DcMotor.ZeroPowerBehavior

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        BRAKE +
        The motor stops and then brakes, actively resisting any external force which attempts + to turn the motor.
        +
        FLOAT +
        The motor stops and then floats: an external force attempting to turn the motor is not + met with active resistence.
        +
        UNKNOWN +
        The behavior of the motor when zero power is applied is not currently known.
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static DcMotor.ZeroPowerBehaviorvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static DcMotor.ZeroPowerBehavior[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static DcMotor.ZeroPowerBehavior[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (DcMotor.ZeroPowerBehavior c : DcMotor.ZeroPowerBehavior.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static DcMotor.ZeroPowerBehavior valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.html new file mode 100644 index 00000000000..b346b6acba3 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotor.html @@ -0,0 +1,626 @@ + + + + + +DcMotor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface DcMotor

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getMotorType

          +
          MotorConfigurationType getMotorType()
          +
          Returns the assigned type for this motor. If no particular motor type has been + configured, then MotorConfigurationType#getUnspecifiedMotorType() will be returned. + Note that the motor type for a given motor is initially assigned in the robot + configuration user interface, though it may subsequently be modified using methods herein.
          +
          +
          Returns:
          +
          the assigned type for this motor
          +
          +
        • +
        + + + +
          +
        • +

          setMotorType

          +
          void setMotorType(MotorConfigurationType motorType)
          +
          Sets the assigned type of this motor. Usage of this method is very rare.
          +
          +
          Parameters:
          +
          motorType - the new assigned type for this motor
          +
          See Also:
          +
          getMotorType()
          +
          +
        • +
        + + + +
          +
        • +

          getController

          +
          DcMotorController getController()
          +
          Returns the underlying motor controller on which this motor is situated.
          +
          +
          Returns:
          +
          the underlying motor controller on which this motor is situated.
          +
          See Also:
          +
          getPortNumber()
          +
          +
        • +
        + + + +
          +
        • +

          getPortNumber

          +
          int getPortNumber()
          +
          Returns the port number on the underlying motor controller on which this motor is situated.
          +
          +
          Returns:
          +
          the port number on the underlying motor controller on which this motor is situated.
          +
          See Also:
          +
          getController()
          +
          +
        • +
        + + + + + + + +
          +
        • +

          getZeroPowerBehavior

          +
          DcMotor.ZeroPowerBehavior getZeroPowerBehavior()
          +
          Returns the current behavior of the motor were a power level of zero to be applied.
          +
          +
          Returns:
          +
          the current behavior of the motor were a power level of zero to be applied.
          +
          +
        • +
        + + + +
          +
        • +

          setPowerFloat

          +
          @Deprecated
          +void setPowerFloat()
          +
          Deprecated. This method is deprecated in favor of direct use of + setZeroPowerBehavior() and + setPower().
          +
          Sets the zero power behavior of the motor to FLOAT, then + applies zero power to that motor. + +

          Note that the change of the zero power behavior to FLOAT + remains in effect even following the return of this method. This is a breaking + change in behavior from previous releases of the SDK. Consider, for example, the + following code sequence:

          + +
          +     motor.setZeroPowerBehavior(ZeroPowerBehavior.BRAKE); // method not available in previous releases
          +     motor.setPowerFloat();
          +     motor.setPower(0.0);
          + 
          + +

          Starting from this release, this sequence of code will leave the motor floating. Previously, + the motor would have been left braked.

          +
          +
          See Also:
          +
          DcMotorSimple.setPower(double), +getPowerFloat(), +setZeroPowerBehavior(ZeroPowerBehavior)
          +
          +
        • +
        + + + +
          +
        • +

          getPowerFloat

          +
          boolean getPowerFloat()
          +
          Returns whether the motor is currently in a float power level.
          +
          +
          Returns:
          +
          whether the motor is currently in a float power level.
          +
          See Also:
          +
          setPowerFloat()
          +
          +
        • +
        + + + +
          +
        • +

          setTargetPosition

          +
          void setTargetPosition(int position)
          +
          Sets the desired encoder target position to which the motor should advance or retreat + and then actively hold thereat. This behavior is similar to the operation of a servo. + The maximum speed at which this advance or retreat occurs is governed by the power level + currently set on the motor. While the motor is advancing or retreating to the desired + taget position, isBusy() will return true. + +

          Note that adjustment to a target position is only effective when the motor is in + RUN_TO_POSITION + RunMode. Note further that, clearly, the motor must be equipped with an encoder in order + for this mode to function properly.

          +
          +
          Parameters:
          +
          position - the desired encoder target position
          +
          See Also:
          +
          getCurrentPosition(), +setMode(RunMode), +DcMotor.RunMode.RUN_TO_POSITION, +getTargetPosition(), +isBusy()
          +
          +
        • +
        + + + +
          +
        • +

          getTargetPosition

          +
          int getTargetPosition()
          +
          Returns the current target encoder position for this motor.
          +
          +
          Returns:
          +
          the current target encoder position for this motor.
          +
          See Also:
          +
          setTargetPosition(int)
          +
          +
        • +
        + + + +
          +
        • +

          isBusy

          +
          boolean isBusy()
          +
          Returns true if the motor is currently advancing or retreating to a target position.
          +
          +
          Returns:
          +
          true if the motor is currently advancing or retreating to a target position.
          +
          See Also:
          +
          setTargetPosition(int)
          +
          +
        • +
        + + + +
          +
        • +

          getCurrentPosition

          +
          int getCurrentPosition()
          +
          Returns the current reading of the encoder for this motor. The units for this reading, + that is, the number of ticks per revolution, are specific to the motor/encoder in question, + and thus are not specified here.
          +
          +
          Returns:
          +
          the current reading of the encoder for this motor
          +
          See Also:
          +
          getTargetPosition(), +DcMotor.RunMode.STOP_AND_RESET_ENCODER
          +
          +
        • +
        + + + +
          +
        • +

          setMode

          +
          void setMode(DcMotor.RunMode mode)
          +
          Sets the current run mode for this motor
          +
          +
          Parameters:
          +
          mode - the new current run mode for this motor
          +
          See Also:
          +
          DcMotor.RunMode, +getMode()
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorController.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorController.html new file mode 100644 index 00000000000..c98a4cb3def --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorController.html @@ -0,0 +1,551 @@ + + + + + +DcMotorController + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface DcMotorController

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice
      +
      +
      +
      All Known Subinterfaces:
      +
      DcMotorControllerEx
      +
      +
      +
      +
      public interface DcMotorController
      +extends HardwareDevice
      +
      Interface for working with DC Motor Controllers +

      + Different DC motor controllers will implement this interface.

      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setMotorType

          +
          void setMotorType(int motor,
          +                  MotorConfigurationType motorType)
          +
          Informs the motor controller of the type of a particular motor. This is normally used + only as part of the initialization of a motor.
          +
          +
          Parameters:
          +
          motor - port of the motor in question
          +
          motorType - the motor type.
          +
          +
        • +
        + + + +
          +
        • +

          getMotorType

          +
          MotorConfigurationType getMotorType(int motor)
          +
          Retrieves the motor type configured for this motor
          +
          +
          Parameters:
          +
          motor - the motor in question
          +
          Returns:
          +
          the configured type for that motor, or MotorConfigurationType#getUnspecifiedMotorType() + if no type has been configured
          +
          +
        • +
        + + + +
          +
        • +

          setMotorMode

          +
          void setMotorMode(int motor,
          +                  DcMotor.RunMode mode)
          +
          Set the current motor mode. DcMotor.RunMode
          +
          +
          Parameters:
          +
          motor - port of motor
          +
          mode - run mode
          +
          +
        • +
        + + + +
          +
        • +

          getMotorMode

          +
          DcMotor.RunMode getMotorMode(int motor)
          +
          Get the current motor mode. Returns the current "run mode".
          +
          +
          Parameters:
          +
          motor - port of motor
          +
          Returns:
          +
          run mode
          +
          +
        • +
        + + + +
          +
        • +

          setMotorPower

          +
          void setMotorPower(int motor,
          +                   double power)
          +
          Set the current motor power
          +
          +
          Parameters:
          +
          motor - port of motor
          +
          power - from -1.0 to 1.0
          +
          +
        • +
        + + + +
          +
        • +

          getMotorPower

          +
          double getMotorPower(int motor)
          +
          Get the current motor power
          +
          +
          Parameters:
          +
          motor - port of motor
          +
          Returns:
          +
          scaled from -1.0 to 1.0
          +
          +
        • +
        + + + +
          +
        • +

          isBusy

          +
          boolean isBusy(int motor)
          +
          Is the motor busy?
          +
          +
          Parameters:
          +
          motor - port of motor
          +
          Returns:
          +
          true if the motor is busy
          +
          +
        • +
        + + + +
          +
        • +

          setMotorZeroPowerBehavior

          +
          void setMotorZeroPowerBehavior(int motor,
          +                               DcMotor.ZeroPowerBehavior zeroPowerBehavior)
          +
          Sets the behavior of the motor when zero power is applied.
          +
          +
          Parameters:
          +
          zeroPowerBehavior - the behavior of the motor when zero power is applied.
          +
          +
        • +
        + + + +
          +
        • +

          getMotorZeroPowerBehavior

          +
          DcMotor.ZeroPowerBehavior getMotorZeroPowerBehavior(int motor)
          +
          Returns the current zero power behavior of the motor.
          +
          +
          Returns:
          +
          the current zero power behavior of the motor.
          +
          +
        • +
        + + + +
          +
        • +

          getMotorPowerFloat

          +
          boolean getMotorPowerFloat(int motor)
          +
          Is motor power set to float?
          +
          +
          Parameters:
          +
          motor - port of motor
          +
          Returns:
          +
          true of motor is set to float
          +
          +
        • +
        + + + +
          +
        • +

          setMotorTargetPosition

          +
          void setMotorTargetPosition(int motor,
          +                            int position)
          +
          Set the motor target position. This takes in an integer, which is not scaled. + + Motor power should be positive if using run to position
          +
          +
          Parameters:
          +
          motor - port of motor
          +
          position - range from Integer.MIN_VALUE to Integer.MAX_VALUE
          +
          +
        • +
        + + + +
          +
        • +

          getMotorTargetPosition

          +
          int getMotorTargetPosition(int motor)
          +
          Get the current motor target position
          +
          +
          Parameters:
          +
          motor - port of motor
          +
          Returns:
          +
          integer, unscaled
          +
          +
        • +
        + + + +
          +
        • +

          getMotorCurrentPosition

          +
          int getMotorCurrentPosition(int motor)
          +
          Get the current motor position
          +
          +
          Parameters:
          +
          motor - port of motor
          +
          Returns:
          +
          integer, unscaled
          +
          +
        • +
        + + + +
          +
        • +

          resetDeviceConfigurationForOpMode

          +
          void resetDeviceConfigurationForOpMode(int motor)
          +
          Reset the state we hold for the given motor so that it's clean at the start of an opmode
          +
          +
          Parameters:
          +
          motor -
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorControllerEx.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorControllerEx.html new file mode 100644 index 00000000000..ac305e84ef4 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorControllerEx.html @@ -0,0 +1,565 @@ + + + + + +DcMotorControllerEx + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface DcMotorControllerEx

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      DcMotorController, HardwareDevice
      +
      +
      +
      +
      public interface DcMotorControllerEx
      +extends DcMotorController
      +
      DcMotorControllerEx is an optional motor controller interface supported by some hardware + that provides enhanced motor functionality.
      +
      +
      See Also:
      +
      DcMotorEx
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setMotorEnable

          +
          void setMotorEnable(int motor)
          +
          Individually energizes a particular motor
          +
          +
          Parameters:
          +
          motor - the port number of the motor on this controller
          +
          See Also:
          +
          setMotorDisable(int), +isMotorEnabled(int)
          +
          +
        • +
        + + + +
          +
        • +

          setMotorDisable

          +
          void setMotorDisable(int motor)
          +
          Individually denergizes a particular motor
          +
          +
          Parameters:
          +
          motor - the port number of the motor on this controller
          +
          See Also:
          +
          setMotorEnable(int), +isMotorEnabled(int)
          +
          +
        • +
        + + + +
          +
        • +

          isMotorEnabled

          +
          boolean isMotorEnabled(int motor)
          +
          Returns whether a particular motor on the controller is energized
          +
          +
          Parameters:
          +
          motor - the port number of the motor on this controller
          +
          See Also:
          +
          setMotorEnable(int), +setMotorDisable(int)
          +
          +
        • +
        + + + +
          +
        • +

          setMotorVelocity

          +
          void setMotorVelocity(int motor,
          +                      double ticksPerSecond)
          +
          Sets the target velocity of the indicated motor.
          +
          +
          Parameters:
          +
          motor - the port number of the motor on this controller
          +
          ticksPerSecond - the new target rate for that motor, in ticks per second
          +
          +
        • +
        + + + +
          +
        • +

          setMotorVelocity

          +
          void setMotorVelocity(int motor,
          +                      double angularRate,
          +                      AngleUnit unit)
          +
          Sets the target velocity of the indicated motor.
          +
          +
          Parameters:
          +
          motor - motor whose velocity is to be adjusted
          +
          angularRate - the new target rate for that motor, in 'unit's per second
          +
          unit - the unit inw which angularRate is expressed.
          +
          See Also:
          +
          DcMotorEx.setVelocity(double, AngleUnit)
          +
          +
        • +
        + + + +
          +
        • +

          getMotorVelocity

          +
          double getMotorVelocity(int motor)
          +
          Returns the velocity of the indicated motor in ticks per second.
          +
          +
          Parameters:
          +
          motor - the motor whose velocity is desired
          +
          Returns:
          +
          the current target velocity of the motor in ticks per second
          +
          +
        • +
        + + + +
          +
        • +

          getMotorVelocity

          +
          double getMotorVelocity(int motor,
          +                        AngleUnit unit)
          +
          Returns the velocity of the indicated motor.
          +
          +
          Parameters:
          +
          motor - the motor whose velocity is desired
          +
          unit - the angular unit in which the velocity is to be expressed
          +
          Returns:
          +
          the current velocity of the motor
          +
          See Also:
          +
          DcMotorEx.getVelocity(AngleUnit)
          +
          +
        • +
        + + + + + + + + + + + + + + + + + + + +
          +
        • +

          setMotorTargetPosition

          +
          void setMotorTargetPosition(int motor,
          +                            int position,
          +                            int tolerance)
          +
          Sets the target position and tolerance for a 'run to position' operation.
          +
          +
          Parameters:
          +
          motor - the motor number to be affected
          +
          position - the desired target position, in encoder ticks
          +
          tolerance - the tolerance of the desired target position, in encoder ticks
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorEx.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorEx.html new file mode 100644 index 00000000000..77820c67e54 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorEx.html @@ -0,0 +1,653 @@ + + + + + +DcMotorEx + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface DcMotorEx

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      DcMotor, DcMotorSimple, HardwareDevice
      +
      +
      +
      All Known Implementing Classes:
      +
      DcMotorImplEx
      +
      +
      +
      +
      public interface DcMotorEx
      +extends DcMotor
      +
      The DcMotorEx interface provides enhanced motor functionality which is available with some + hardware devices. The DcMotorEx interface is typically used as a second interface on an object + whose primary interface is DcMotor. To access it, cast your DcMotor object + to DcMotorEx. However, it is perhaps prudent to first test whether the cast will succeed by + testing using 'instanceof'.
      +
      +
      See Also:
      +
      PwmControl
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + + + + + + + + + + + + + +
          +
        • +

          setVelocity

          +
          void setVelocity(double angularRate)
          +
          Sets the velocity of the motor
          +
          +
          Parameters:
          +
          angularRate - the desired ticks per second
          +
          +
        • +
        + + + +
          +
        • +

          setVelocity

          +
          void setVelocity(double angularRate,
          +                 AngleUnit unit)
          +
          Sets the velocity of the motor
          +
          +
          Parameters:
          +
          angularRate - the desired angular rate, in units per second
          +
          unit - the units in which angularRate is expressed
          +
          See Also:
          +
          getVelocity(AngleUnit)
          +
          +
        • +
        + + + +
          +
        • +

          getVelocity

          +
          double getVelocity()
          +
          Returns the current velocity of the motor, in ticks per second
          +
          +
          Returns:
          +
          the current velocity of the motor
          +
          +
        • +
        + + + +
          +
        • +

          getVelocity

          +
          double getVelocity(AngleUnit unit)
          +
          Returns the current velocity of the motor, in angular units per second
          +
          +
          Parameters:
          +
          unit - the units in which the angular rate is desired
          +
          Returns:
          +
          the current velocity of the motor
          +
          See Also:
          +
          setVelocity(double, AngleUnit)
          +
          +
        • +
        + + + +
          +
        • +

          setPIDCoefficients

          +
          @Deprecated
          +void setPIDCoefficients(DcMotor.RunMode mode,
          +                                     PIDCoefficients pidCoefficients)
          +
          Deprecated. Use #setPIDFCoefficients(RunMode, PIDFCoefficients) instead
          +
          Sets the PID control coefficients for one of the PID modes of this motor. + Note that in some controller implementations, setting the PID coefficients for one + mode on a motor might affect other modes on that motor, or might affect the PID + coefficients used by other motors on the same controller (this is not true on the + REV Expansion Hub).
          +
          +
          Parameters:
          +
          mode - either RunMode#RUN_USING_ENCODER or RunMode#RUN_TO_POSITION
          +
          pidCoefficients - the new coefficients to use when in that mode on this motor
          +
          See Also:
          +
          #getPIDCoefficients(RunMode)
          +
          +
        • +
        + + + + + + + +
          +
        • +

          setVelocityPIDFCoefficients

          +
          void setVelocityPIDFCoefficients(double p,
          +                                 double i,
          +                                 double d,
          +                                 double f)
          +
          A shorthand for setting the PIDF coefficients for the DcMotor.RunMode.RUN_USING_ENCODER + mode. MotorControlAlgorithm.PIDF is used.
          +
          +
          See Also:
          +
          #setPIDFCoefficients(RunMode, PIDFCoefficients)
          +
          +
        • +
        + + + +
          +
        • +

          setPositionPIDFCoefficients

          +
          void setPositionPIDFCoefficients(double p)
          +
          A shorthand for setting the PIDF coefficients for the DcMotor.RunMode.RUN_TO_POSITION + mode. MotorControlAlgorithm.PIDF is used. + + Readers are reminded that DcMotor.RunMode.RUN_TO_POSITION mode makes use of both + the coefficients set for RUN_TO_POSITION and the coefficients set for RUN_WITH_ENCODER, + due to the fact that internally the RUN_TO_POSITION logic calculates an on-the-fly velocity goal + on each control cycle, then (logically) runs the RUN_WITH_ENCODER logic. Because of that double- + layering, only the proportional ('p') coefficient makes logical sense for use in the RUN_TO_POSITION + coefficients.
          +
          +
          See Also:
          +
          setVelocityPIDFCoefficients(double, double, double, double), +#setPIDFCoefficients(RunMode, PIDFCoefficients)
          +
          +
        • +
        + + + +
          +
        • +

          getPIDCoefficients

          +
          @Deprecated
          +PIDCoefficients getPIDCoefficients(DcMotor.RunMode mode)
          +
          Deprecated. Use #getPIDFCoefficients(RunMode) instead
          +
          Returns the PID control coefficients used when running in the indicated mode + on this motor.
          +
          +
          Parameters:
          +
          mode - either RunMode#RUN_USING_ENCODER or RunMode#RUN_TO_POSITION
          +
          Returns:
          +
          the PID control coefficients used when running in the indicated mode on this motor
          +
          +
        • +
        + + + +
          +
        • +

          getPIDFCoefficients

          +
          PIDFCoefficients getPIDFCoefficients(DcMotor.RunMode mode)
          +
          Returns the PIDF control coefficients used when running in the indicated mode + on this motor.
          +
          +
          Parameters:
          +
          mode - either RunMode#RUN_USING_ENCODER or RunMode#RUN_TO_POSITION
          +
          Returns:
          +
          the PIDF control coefficients used when running in the indicated mode on this motor
          +
          See Also:
          +
          #setPIDFCoefficients(RunMode, PIDFCoefficients)
          +
          +
        • +
        + + + +
          +
        • +

          setTargetPositionTolerance

          +
          void setTargetPositionTolerance(int tolerance)
          +
          Sets the target positioning tolerance of this motor
          +
          +
          Parameters:
          +
          tolerance - the desired tolerance, in encoder ticks
          +
          See Also:
          +
          DcMotor.setTargetPosition(int)
          +
          +
        • +
        + + + +
          +
        • +

          getTargetPositionTolerance

          +
          int getTargetPositionTolerance()
          +
          Returns the current target positioning tolerance of this motor
          +
          +
          Returns:
          +
          the current target positioning tolerance of this motor
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorImpl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorImpl.html new file mode 100644 index 00000000000..cbb9e73b0ef --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorImpl.html @@ -0,0 +1,1100 @@ + + + + + +DcMotorImpl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class DcMotorImpl

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.DcMotorImpl
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorImplEx.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorImplEx.html new file mode 100644 index 00000000000..c8fa17befab --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorImplEx.html @@ -0,0 +1,820 @@ + + + + + +DcMotorImplEx + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class DcMotorImplEx

    +
    +
    + +
    + +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + + + + + + + + + + + + + +
          +
        • +

          setVelocity

          +
          public void setVelocity(double angularRate)
          +
          Description copied from interface: DcMotorEx
          +
          Sets the velocity of the motor
          +
          +
          Specified by:
          +
          setVelocity in interface DcMotorEx
          +
          Parameters:
          +
          angularRate - the desired ticks per second
          +
          +
        • +
        + + + +
          +
        • +

          setVelocity

          +
          public void setVelocity(double angularRate,
          +                        AngleUnit unit)
          +
          Description copied from interface: DcMotorEx
          +
          Sets the velocity of the motor
          +
          +
          Specified by:
          +
          setVelocity in interface DcMotorEx
          +
          Parameters:
          +
          angularRate - the desired angular rate, in units per second
          +
          unit - the units in which angularRate is expressed
          +
          See Also:
          +
          DcMotorEx.getVelocity(AngleUnit)
          +
          +
        • +
        + + + +
          +
        • +

          getVelocity

          +
          public double getVelocity()
          +
          Description copied from interface: DcMotorEx
          +
          Returns the current velocity of the motor, in ticks per second
          +
          +
          Specified by:
          +
          getVelocity in interface DcMotorEx
          +
          Returns:
          +
          the current velocity of the motor
          +
          +
        • +
        + + + +
          +
        • +

          getVelocity

          +
          public double getVelocity(AngleUnit unit)
          +
          Description copied from interface: DcMotorEx
          +
          Returns the current velocity of the motor, in angular units per second
          +
          +
          Specified by:
          +
          getVelocity in interface DcMotorEx
          +
          Parameters:
          +
          unit - the units in which the angular rate is desired
          +
          Returns:
          +
          the current velocity of the motor
          +
          See Also:
          +
          DcMotorEx.setVelocity(double, AngleUnit)
          +
          +
        • +
        + + + +
          +
        • +

          adjustAngularRate

          +
          protected double adjustAngularRate(double angularRate)
          +
        • +
        + + + +
          +
        • +

          setPIDCoefficients

          +
          public void setPIDCoefficients(DcMotor.RunMode mode,
          +                               PIDCoefficients pidCoefficients)
          +
          Description copied from interface: DcMotorEx
          +
          Sets the PID control coefficients for one of the PID modes of this motor. + Note that in some controller implementations, setting the PID coefficients for one + mode on a motor might affect other modes on that motor, or might affect the PID + coefficients used by other motors on the same controller (this is not true on the + REV Expansion Hub).
          +
          +
          Specified by:
          +
          setPIDCoefficients in interface DcMotorEx
          +
          Parameters:
          +
          mode - either RunMode#RUN_USING_ENCODER or RunMode#RUN_TO_POSITION
          +
          pidCoefficients - the new coefficients to use when in that mode on this motor
          +
          See Also:
          +
          #getPIDCoefficients(RunMode)
          +
          +
        • +
        + + + + + + + + + + + + + + + +
          +
        • +

          getPIDCoefficients

          +
          public PIDCoefficients getPIDCoefficients(DcMotor.RunMode mode)
          +
          Description copied from interface: DcMotorEx
          +
          Returns the PID control coefficients used when running in the indicated mode + on this motor.
          +
          +
          Specified by:
          +
          getPIDCoefficients in interface DcMotorEx
          +
          Parameters:
          +
          mode - either RunMode#RUN_USING_ENCODER or RunMode#RUN_TO_POSITION
          +
          Returns:
          +
          the PID control coefficients used when running in the indicated mode on this motor
          +
          +
        • +
        + + + +
          +
        • +

          getPIDFCoefficients

          +
          public PIDFCoefficients getPIDFCoefficients(DcMotor.RunMode mode)
          +
          Description copied from interface: DcMotorEx
          +
          Returns the PIDF control coefficients used when running in the indicated mode + on this motor.
          +
          +
          Specified by:
          +
          getPIDFCoefficients in interface DcMotorEx
          +
          Parameters:
          +
          mode - either RunMode#RUN_USING_ENCODER or RunMode#RUN_TO_POSITION
          +
          Returns:
          +
          the PIDF control coefficients used when running in the indicated mode on this motor
          +
          See Also:
          +
          #setPIDFCoefficients(RunMode, PIDFCoefficients)
          +
          +
        • +
        + + + +
          +
        • +

          getTargetPositionTolerance

          +
          public int getTargetPositionTolerance()
          +
          Description copied from interface: DcMotorEx
          +
          Returns the current target positioning tolerance of this motor
          +
          +
          Specified by:
          +
          getTargetPositionTolerance in interface DcMotorEx
          +
          Returns:
          +
          the current target positioning tolerance of this motor
          +
          +
        • +
        + + + +
          +
        • +

          setTargetPositionTolerance

          +
          public void setTargetPositionTolerance(int tolerance)
          +
          Description copied from interface: DcMotorEx
          +
          Sets the target positioning tolerance of this motor
          +
          +
          Specified by:
          +
          setTargetPositionTolerance in interface DcMotorEx
          +
          Parameters:
          +
          tolerance - the desired tolerance, in encoder ticks
          +
          See Also:
          +
          DcMotor.setTargetPosition(int)
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorSimple.Direction.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorSimple.Direction.html new file mode 100644 index 00000000000..e26812a2adb --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorSimple.Direction.html @@ -0,0 +1,366 @@ + + + + + +DcMotorSimple.Direction + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum DcMotorSimple.Direction

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<DcMotorSimple.Direction>
      +
      +
      +
      Enclosing interface:
      +
      DcMotorSimple
      +
      +
      +
      +
      public static enum DcMotorSimple.Direction
      +extends java.lang.Enum<DcMotorSimple.Direction>
      +
      DcMotors can be configured to internally reverse the values + to which, e.g., their motor power is set. This makes it easy + to have drive train motors on two sides of a robot: during initialization, + one would be set at at forward, the other at reverse, and the + difference between the two in that respect could be thereafter ignored. + +

      At the start of an OpMode, motors are guaranteed to be in the forward direction.

      +
      +
      See Also:
      +
      DcMotorSimple.setDirection(Direction)
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        FORWARD 
        REVERSE 
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static DcMotorSimple.Direction[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (DcMotorSimple.Direction c : DcMotorSimple.Direction.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static DcMotorSimple.Direction valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorSimple.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorSimple.html new file mode 100644 index 00000000000..d084ca5b7c1 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorSimple.html @@ -0,0 +1,351 @@ + + + + + +DcMotorSimple + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface DcMotorSimple

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setDirection

          +
          void setDirection(DcMotorSimple.Direction direction)
          +
          Sets the logical direction in which this motor operates.
          +
          +
          Parameters:
          +
          direction - the direction to set for this motor
          +
          See Also:
          +
          getDirection()
          +
          +
        • +
        + + + +
          +
        • +

          getDirection

          +
          DcMotorSimple.Direction getDirection()
          +
          Returns the current logical direction in which this motor is set as operating.
          +
          +
          Returns:
          +
          the current logical direction in which this motor is set as operating.
          +
          See Also:
          +
          setDirection(Direction)
          +
          +
        • +
        + + + +
          +
        • +

          setPower

          +
          void setPower(double power)
          +
          Sets the power level of the motor, expressed as a fraction of the maximum + possible power / speed supported according to the run mode in which the + motor is operating. + +

          Setting a power level of zero will brake the motor

          +
          +
          Parameters:
          +
          power - the new power level of the motor, a value in the interval [-1.0, 1.0]
          +
          See Also:
          +
          getPower(), +DcMotor.setMode(DcMotor.RunMode), +DcMotor.setPowerFloat()
          +
          +
        • +
        + + + +
          +
        • +

          getPower

          +
          double getPower()
          +
          Returns the current configured power level of the motor.
          +
          +
          Returns:
          +
          the current level of the motor, a value in the interval [0.0, 1.0]
          +
          See Also:
          +
          setPower(double)
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceInterfaceModule.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceInterfaceModule.html new file mode 100644 index 00000000000..0becc77f0b5 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceInterfaceModule.html @@ -0,0 +1,443 @@ + + + + + +DeviceInterfaceModule + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface DeviceInterfaceModule

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getDigitalInputStateByte

          +
          int getDigitalInputStateByte()
          +
          A byte containing the current logic levels present in the D7-D0 channel pins. + If a particular pin is in output mode, the current output state will be reported.
          +
        • +
        + + + +
          +
        • +

          setDigitalIOControlByte

          +
          void setDigitalIOControlByte(byte input)
          +
          If a particular bit is set to one, the corresponding channel pin will be in output mode. + Else it will be in input mode.
          +
          +
          Parameters:
          +
          input - - the desired setting for each channel pin.
          +
          +
        • +
        + + + +
          +
        • +

          getDigitalIOControlByte

          +
          byte getDigitalIOControlByte()
          +
          Get the digital IO control byte
          +
          +
          Returns:
          +
          control byte
          +
          +
        • +
        + + + +
          +
        • +

          setDigitalOutputByte

          +
          void setDigitalOutputByte(byte input)
          +
          If a a particular control field bit is set to one, the channel pin will be in output mode and + will reflect the value of the corresponding field bit.
          +
          +
          Parameters:
          +
          input - with output state of the digital pins.
          +
          +
        • +
        + + + +
          +
        • +

          getDigitalOutputStateByte

          +
          byte getDigitalOutputStateByte()
          +
          The D7-D0 output set field is a byte containing the required I/O output of the D7-D0 + channel pins. If the corresponding Dy-D0 I/O control field bit is set to one, the channel pin + will be in output mode and will reflect the value of the corresponding D7-D0 output set field bit.
          +
          +
          Returns:
          +
          D7-D0 output set field.
          +
          +
        • +
        + + + +
          +
        • +

          getLEDState

          +
          boolean getLEDState(int channel)
          +
          Indicates whether the LED on the given channel is on or not
          +
          +
          Returns:
          +
          true for ON, false for OFF
          +
          +
        • +
        + + + +
          +
        • +

          setLED

          +
          void setLED(int channel,
          +            boolean state)
          +
          Turn on or off a particular LED
          +
          +
          Parameters:
          +
          channel - - int indicating the ID of the LED.
          +
          state - - byte containing the desired setting.
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.UsbDeviceType.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.UsbDeviceType.html new file mode 100644 index 00000000000..ab4681f2332 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.UsbDeviceType.html @@ -0,0 +1,455 @@ + + + + + +DeviceManager.UsbDeviceType + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum DeviceManager.UsbDeviceType

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static DeviceManager.UsbDeviceType[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (DeviceManager.UsbDeviceType c : DeviceManager.UsbDeviceType.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static DeviceManager.UsbDeviceType valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.html new file mode 100644 index 00000000000..20b949e00fa --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DeviceManager.html @@ -0,0 +1,1329 @@ + + + + + +DeviceManager + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface DeviceManager

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface DeviceManager
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          scanForUsbDevices

          +
          ScannedDevices scanForUsbDevices()
          +                          throws RobotCoreException
          +
          Get a listing of currently connected USB devices +

          + This method will attempt to open all USB devices that are using an FTDI USB chipset. It will + then probe the device to determine if it is a Modern Robotics device. Finally, it will close the + device. +

          + Because of the opening and closing of devices, it is recommended that this method is not called + while any FTDI devices are in use.

          +
          +
          Returns:
          +
          a map of serial numbers to Modern Robotics device types
          +
          Throws:
          +
          RobotCoreException - if unable to open a device
          +
          +
        • +
        + + + +
          +
        • +

          createUsbDcMotorController

          +
          DcMotorController createUsbDcMotorController(SerialNumber serialNumber,
          +                                             java.lang.String name)
          +                                      throws RobotCoreException,
          +                                             java.lang.InterruptedException
          +
          Create an instance of a DcMotorController
          +
          +
          Parameters:
          +
          serialNumber - serial number of controller
          +
          Returns:
          +
          an instance of a DcMotorController
          +
          Throws:
          +
          RobotCoreException - if unable to create instance
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          createDcMotor

          +
          DcMotor createDcMotor(DcMotorController controller,
          +                      int portNumber,
          +                      MotorConfigurationType motorType,
          +                      java.lang.String name)
          +
          Create an instance of a DcMotor
          +
          +
          Parameters:
          +
          controller - DC Motor controller this motor is attached to
          +
          portNumber - physical port number on the controller
          +
          motorType - the optional type we know of for this motor
          +
          Returns:
          +
          an instance of a DcMotor
          +
          +
        • +
        + + + +
          +
        • +

          createDcMotorEx

          +
          DcMotor createDcMotorEx(DcMotorController controller,
          +                        int portNumber,
          +                        MotorConfigurationType motorType,
          +                        java.lang.String name)
          +
        • +
        + + + +
          +
        • +

          createUsbServoController

          +
          ServoController createUsbServoController(SerialNumber serialNumber,
          +                                         java.lang.String name)
          +                                  throws RobotCoreException,
          +                                         java.lang.InterruptedException
          +
          Create an instance of a ServoController
          +
          +
          Parameters:
          +
          serialNumber - serial number of controller
          +
          Returns:
          +
          an instance of a ServoController
          +
          Throws:
          +
          RobotCoreException - if unable to create instance
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          createServo

          +
          Servo createServo(ServoController controller,
          +                  int portNumber,
          +                  java.lang.String name)
          +
          Create an instance of a Servo
          +
          +
          Parameters:
          +
          controller - Servo controller this servo is attached to
          +
          portNumber - physical port number on the controller
          +
          Returns:
          +
          an instance of a Servo
          +
          +
        • +
        + + + +
          +
        • +

          createServoEx

          +
          Servo createServoEx(ServoControllerEx controller,
          +                    int portNumber,
          +                    java.lang.String name,
          +                    ServoConfigurationType servoType)
          +
        • +
        + + + +
          +
        • +

          createCRServo

          +
          CRServo createCRServo(ServoController controller,
          +                      int portNumber,
          +                      java.lang.String name)
          +
        • +
        + + + +
          +
        • +

          createCRServoEx

          +
          CRServo createCRServoEx(ServoControllerEx controller,
          +                        int portNumber,
          +                        java.lang.String name,
          +                        ServoConfigurationType servoType)
          +
        • +
        + + + +
          +
        • +

          createCustomServoDevice

          +
          HardwareDevice createCustomServoDevice(ServoController controller,
          +                                       int portNumber,
          +                                       ServoConfigurationType servoConfigurationType)
          +
        • +
        + + + +
          +
        • +

          createLynxCustomServoDevice

          +
          HardwareDevice createLynxCustomServoDevice(ServoControllerEx controller,
          +                                           int portNumber,
          +                                           ServoConfigurationType servoConfigurationType)
          +
        • +
        + + + +
          +
        • +

          createUsbLegacyModule

          +
          LegacyModule createUsbLegacyModule(SerialNumber serialNumber,
          +                                   java.lang.String name)
          +                            throws RobotCoreException,
          +                                   java.lang.InterruptedException
          +
          Create an instance of a LegacyModule
          +
          +
          Parameters:
          +
          serialNumber - serial number of legacy module
          +
          Returns:
          +
          an instance of a LegacyModule
          +
          Throws:
          +
          RobotCoreException - if unable to create instance
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          createDeviceInterfaceModule

          +
          DeviceInterfaceModule createDeviceInterfaceModule(SerialNumber serialNumber,
          +                                                  java.lang.String name)
          +                                           throws RobotCoreException,
          +                                                  java.lang.InterruptedException
          +
          +
          Parameters:
          +
          serialNumber - serial number of Core Device Interface module
          +
          Returns:
          +
          - an instance of a Core Device Interface Module
          +
          Throws:
          +
          RobotCoreException - if unable to create instance
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          createNxtTouchSensor

          +
          TouchSensor createNxtTouchSensor(LegacyModule legacyModule,
          +                                 int physicalPort,
          +                                 java.lang.String name)
          +
          +
          Parameters:
          +
          legacyModule - the Legacy Module this sensor is attached to
          +
          physicalPort - port number on Legacy Module it's connected to
          +
          Returns:
          +
          an instance of the NXT Touch Sensor
          +
          +
        • +
        + + + +
          +
        • +

          createHTTouchSensorMultiplexer

          +
          TouchSensorMultiplexer createHTTouchSensorMultiplexer(LegacyModule legacyModule,
          +                                                      int port,
          +                                                      java.lang.String name)
          +
          +
          Parameters:
          +
          legacyModule - the Legacy Module this sensor is attached to
          +
          port - port number on Legacy Module this sensor is connected to.
          +
          Returns:
          +
          an instance of the NXT Touch Sensor Multiplexer
          +
          +
        • +
        + + + +
          +
        • +

          createAnalogSensor

          +
          HardwareDevice createAnalogSensor(AnalogInputController controller,
          +                                  int channel,
          +                                  AnalogSensorConfigurationType type)
          +
          +
          Parameters:
          +
          controller - Analog Input Controller Module this device is connected to
          +
          Returns:
          +
          - an instance of an Analog Input device
          +
          +
        • +
        + + + +
          +
        • +

          createAnalogOutputDevice

          +
          AnalogOutput createAnalogOutputDevice(AnalogOutputController controller,
          +                                      int channel,
          +                                      java.lang.String name)
          +
          +
          Parameters:
          +
          controller - Analog Output Controller Module this device is connected to
          +
          Returns:
          +
          - an instance of an Analog Output device
          +
          +
        • +
        + + + +
          +
        • +

          createDigitalDevice

          +
          HardwareDevice createDigitalDevice(DigitalChannelController controller,
          +                                   int channel,
          +                                   DigitalIoDeviceConfigurationType type)
          +
          +
          Parameters:
          +
          controller - Device Interface Module this device is connected to
          +
          type -
          +
          Returns:
          +
          - an instance of an Digital Channel device
          +
          +
        • +
        + + + +
          +
        • +

          createPwmOutputDevice

          +
          PWMOutput createPwmOutputDevice(PWMOutputController controller,
          +                                int channel,
          +                                java.lang.String name)
          +
          +
          Parameters:
          +
          controller - PWM Output Controller Module this device is connected to
          +
          Returns:
          +
          - an instance of an Digital Channel device
          +
          +
        • +
        + + + +
          +
        • +

          createI2cDevice

          +
          I2cDevice createI2cDevice(I2cController controller,
          +                          DeviceConfiguration.I2cChannel channel,
          +                          java.lang.String name)
          +
          +
          Parameters:
          +
          controller - I2c Controller Module this device is conneced to
          +
          channel - the channel it's connected to on the Controller
          +
          Returns:
          +
          an instance of an I2c Channel device
          +
          +
        • +
        + + + + + + + +
          +
        • +

          createUserI2cDevice

          +
          HardwareDevice createUserI2cDevice(I2cController controller,
          +                                   DeviceConfiguration.I2cChannel channel,
          +                                   I2cDeviceConfigurationType type,
          +                                   java.lang.String name)
          +
          Returns a new instance of a user-defined sensor type.
          +
        • +
        + + + +
          +
        • +

          createUserI2cDevice

          +
          HardwareDevice createUserI2cDevice(RobotCoreLynxModule lynxModule,
          +                                   DeviceConfiguration.I2cChannel channel,
          +                                   I2cDeviceConfigurationType type,
          +                                   java.lang.String name)
          +
        • +
        + + + +
          +
        • +

          createHTDcMotorController

          +
          DcMotorController createHTDcMotorController(LegacyModule legacyModule,
          +                                            int physicalPort,
          +                                            java.lang.String name)
          +
          Create an instance of an NXT DcMotorController
          +
          +
          Parameters:
          +
          legacyModule - Legacy Module this device is connected to
          +
          physicalPort - port number on the Legacy Module this device is connected to
          +
          Returns:
          +
          a DcMotorController
          +
          +
        • +
        + + + + + + + +
          +
        • +

          createLynxModule

          +
          RobotCoreLynxModule createLynxModule(RobotCoreLynxUsbDevice lynxUsbDevice,
          +                                     int moduleAddress,
          +                                     boolean isParent,
          +                                     java.lang.String name)
          +
          Creates an instance of a LynxModule
          +
          +
          Parameters:
          +
          lynxUsbDevice -
          +
          moduleAddress -
          +
          Returns:
          +
          +
        • +
        + + + +
          +
        • +

          createWebcamName

          +
          WebcamName createWebcamName(SerialNumber serialNumber,
          +                            java.lang.String name)
          +                     throws RobotCoreException,
          +                            java.lang.InterruptedException
          +
          Creates a WebcamName from the indicated serialized contents
          +
          +
          Throws:
          +
          RobotCoreException
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          createHTServoController

          +
          ServoController createHTServoController(LegacyModule legacyModule,
          +                                        int physicalPort,
          +                                        java.lang.String name)
          +
          Create an instance of an NXT ServoController
          +
          +
          Parameters:
          +
          legacyModule - Legacy Module this device is connected to
          +
          physicalPort - port number on the Legacy Module this device is connected to
          +
          Returns:
          +
          a ServoController
          +
          +
        • +
        + + + +
          +
        • +

          createHTCompassSensor

          +
          CompassSensor createHTCompassSensor(LegacyModule legacyModule,
          +                                    int physicalPort,
          +                                    java.lang.String name)
          +
          Create an instance of a NxtCompassSensor
          +
          +
          Parameters:
          +
          legacyModule - Legacy Module this device is connected to
          +
          physicalPort - port number on the Legacy Module this device is connected to
          +
          Returns:
          +
          a CompassSensor
          +
          +
        • +
        + + + +
          +
        • +

          createMRDigitalTouchSensor

          +
          TouchSensor createMRDigitalTouchSensor(DigitalChannelController digitalController,
          +                                       int physicalPort,
          +                                       java.lang.String name)
          +
          Create an instance of a Modern Robotics TouchSensor on a digital controller
          +
          +
          Parameters:
          +
          digitalController - controller this device is connected to
          +
          physicalPort - the port number of the device on that controller
          +
          name - the name of this device in the hardware map
          +
          Returns:
          +
          a TouchSensor
          +
          +
        • +
        + + + +
          +
        • +

          createHTAccelerationSensor

          +
          AccelerationSensor createHTAccelerationSensor(LegacyModule legacyModule,
          +                                              int physicalPort,
          +                                              java.lang.String name)
          +
          Create an instance of a AccelerationSensor
          +
          +
          Parameters:
          +
          legacyModule - Legacy Module this device is connected to
          +
          physicalPort - port number on the Legacy Module this device is connected to
          +
          Returns:
          +
          an AccelerationSensor
          +
          +
        • +
        + + + +
          +
        • +

          createHTLightSensor

          +
          LightSensor createHTLightSensor(LegacyModule legacyModule,
          +                                int physicalPort,
          +                                java.lang.String name)
          +
          Create an instance of a LightSensor
          +
          +
          Parameters:
          +
          legacyModule - Legacy Module this device is connected to
          +
          physicalPort - port number on the Legacy Module this device is connected to
          +
          Returns:
          +
          a LightSensor
          +
          +
        • +
        + + + +
          +
        • +

          createHTIrSeekerSensor

          +
          IrSeekerSensor createHTIrSeekerSensor(LegacyModule legacyModule,
          +                                      int physicalPort,
          +                                      java.lang.String name)
          +
          Create an instance of a IrSeekerSensor
          +
          +
          Parameters:
          +
          legacyModule - Legacy Module this device is connected to
          +
          physicalPort - port number on the Legacy Module this device is connected to
          +
          Returns:
          +
          an IrSeekerSensor
          +
          +
        • +
        + + + +
          +
        • +

          createMRI2cIrSeekerSensorV3

          +
          IrSeekerSensor createMRI2cIrSeekerSensorV3(I2cController i2cController,
          +                                           DeviceConfiguration.I2cChannel channel,
          +                                           java.lang.String name)
          +
          Create an instance of a IrSeekerSensorV3
          +
          +
          Parameters:
          +
          i2cController - the I2cController this device is connected to
          +
          channel - port number on the Device Interface Module this device is connected to
          +
          Returns:
          +
          an IrSeekerSensor
          +
          +
        • +
        + + + +
          +
        • +

          createMRI2cIrSeekerSensorV3

          +
          IrSeekerSensor createMRI2cIrSeekerSensorV3(RobotCoreLynxModule module,
          +                                           DeviceConfiguration.I2cChannel channel,
          +                                           java.lang.String name)
          +
        • +
        + + + +
          +
        • +

          createNxtUltrasonicSensor

          +
          UltrasonicSensor createNxtUltrasonicSensor(LegacyModule legacyModule,
          +                                           int physicalPort,
          +                                           java.lang.String name)
          +
          Create an instance of an UltrasonicSensor
          +
          +
          Parameters:
          +
          legacyModule - Legacy Module this device is connected to
          +
          physicalPort - port number on the Legacy Module this device is connected to
          +
          Returns:
          +
          an UltrasonicSensor
          +
          +
        • +
        + + + +
          +
        • +

          createHTGyroSensor

          +
          GyroSensor createHTGyroSensor(LegacyModule legacyModule,
          +                              int physicalPort,
          +                              java.lang.String name)
          +
          Create an instance of a GyroSensor
          +
          +
          Parameters:
          +
          legacyModule - Legacy Module this device is connected to
          +
          physicalPort - port number on the Legacy Module this device is connected to
          +
          Returns:
          +
          a GyroSensor
          +
          +
        • +
        + + + +
          +
        • +

          createModernRoboticsI2cGyroSensor

          +
          GyroSensor createModernRoboticsI2cGyroSensor(I2cController i2cController,
          +                                             DeviceConfiguration.I2cChannel channel,
          +                                             java.lang.String name)
          +
          Create an instance of a GyroSensor
          +
          +
          Parameters:
          +
          i2cController - module this device is connected to
          +
          channel - i2c connection channel
          +
          Returns:
          +
          a GyroSensor
          +
          +
        • +
        + + + +
          +
        • +

          createModernRoboticsI2cGyroSensor

          +
          GyroSensor createModernRoboticsI2cGyroSensor(RobotCoreLynxModule module,
          +                                             DeviceConfiguration.I2cChannel channel,
          +                                             java.lang.String name)
          +
        • +
        + + + +
          +
        • +

          createAdafruitI2cColorSensor

          +
          ColorSensor createAdafruitI2cColorSensor(I2cController controller,
          +                                         DeviceConfiguration.I2cChannel channel,
          +                                         java.lang.String name)
          +
          Create an instance of a ColorSensor
          +
          +
          Parameters:
          +
          controller - Device Interface Module this sensor is connected to
          +
          channel - the I2C port on the Device Interface this module is connected to
          +
          Returns:
          +
          a ColorSensor
          +
          +
        • +
        + + + +
          +
        • +

          createAdafruitI2cColorSensor

          +
          ColorSensor createAdafruitI2cColorSensor(RobotCoreLynxModule module,
          +                                         DeviceConfiguration.I2cChannel channel,
          +                                         java.lang.String name)
          +
        • +
        + + + +
          +
        • +

          createLynxColorRangeSensor

          +
          ColorSensor createLynxColorRangeSensor(RobotCoreLynxModule module,
          +                                       DeviceConfiguration.I2cChannel channel,
          +                                       java.lang.String name)
          +
        • +
        + + + +
          +
        • +

          createHTColorSensor

          +
          ColorSensor createHTColorSensor(LegacyModule controller,
          +                                int channel,
          +                                java.lang.String name)
          +
          Create an instance of a ColorSensor
          +
          +
          Parameters:
          +
          controller - Legacy Module this sensor is attached to
          +
          channel - the I2C port it's connected to
          +
          Returns:
          +
          a ColorSensor
          +
          +
        • +
        + + + +
          +
        • +

          createModernRoboticsI2cColorSensor

          +
          ColorSensor createModernRoboticsI2cColorSensor(I2cController controller,
          +                                               DeviceConfiguration.I2cChannel channel,
          +                                               java.lang.String name)
          +
          Create an instance of a ColorSensor
          +
          +
          Parameters:
          +
          controller - Device Interface Module this sensor is attached to
          +
          channel - the I2C port it's connected to
          +
          Returns:
          +
          a ColorSensor
          +
          +
        • +
        + + + +
          +
        • +

          createModernRoboticsI2cColorSensor

          +
          ColorSensor createModernRoboticsI2cColorSensor(RobotCoreLynxModule module,
          +                                               DeviceConfiguration.I2cChannel channel,
          +                                               java.lang.String name)
          +
        • +
        + + + +
          +
        • +

          createLED

          +
          LED createLED(DigitalChannelController controller,
          +              int channel,
          +              java.lang.String name)
          +
          Create an instance of an LED
          +
          +
          Parameters:
          +
          controller - Digital Channel Controller this LED is connected to
          +
          channel - the digital port it's connected to
          +
          Returns:
          +
          an LED
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannel.Mode.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannel.Mode.html new file mode 100644 index 00000000000..bc5030e7db7 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannel.Mode.html @@ -0,0 +1,343 @@ + + + + + +DigitalChannel.Mode + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum DigitalChannel.Mode

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<DigitalChannel.Mode>
      • +
      • +
          +
        • com.qualcomm.robotcore.hardware.DigitalChannel.Mode
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<DigitalChannel.Mode>
      +
      +
      +
      Enclosing interface:
      +
      DigitalChannel
      +
      +
      +
      +
      public static enum DigitalChannel.Mode
      +extends java.lang.Enum<DigitalChannel.Mode>
      +
      Digital channel mode - input or output
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        INPUT 
        OUTPUT 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static DigitalChannel.ModevalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static DigitalChannel.Mode[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static DigitalChannel.Mode[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (DigitalChannel.Mode c : DigitalChannel.Mode.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static DigitalChannel.Mode valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannel.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannel.html new file mode 100644 index 00000000000..40ee968461c --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannel.html @@ -0,0 +1,353 @@ + + + + + +DigitalChannel + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface DigitalChannel

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice
      +
      +
      +
      All Known Implementing Classes:
      +
      DigitalChannelImpl
      +
      +
      +
      +
      public interface DigitalChannel
      +extends HardwareDevice
      +
      DigitalChannel is an interface by which digital channels can be controlled. + Such channels have a boolean state, and are modal as to direction, being either input + channels or output channels.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getMode

          +
          DigitalChannel.Mode getMode()
          +
          Returns whether the channel is in input or output mode
          +
          +
          Returns:
          +
          whether the channel is in input or output mode
          +
          See Also:
          +
          setMode(Mode)
          +
          +
        • +
        + + + +
          +
        • +

          setMode

          +
          void setMode(DigitalChannel.Mode mode)
          +
          Changes whether the channel is in input or output mode
          +
          +
          Parameters:
          +
          mode - whether the channel is in input or output mode
          +
          +
        • +
        + + + +
          +
        • +

          getState

          +
          boolean getState()
          +
          Returns the current state of the channel
          +
          +
          Returns:
          +
          the current state of the channel
          +
          +
        • +
        + + + +
          +
        • +

          setState

          +
          void setState(boolean state)
          +
          Sets the current state of the channel
          +
          +
          Parameters:
          +
          state - the new state of the channel
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelController.Mode.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelController.Mode.html new file mode 100644 index 00000000000..40fe9373fb1 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelController.Mode.html @@ -0,0 +1,373 @@ + + + + + +DigitalChannelController.Mode + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum DigitalChannelController.Mode

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        INPUT +
        Deprecated. 
        OUTPUT +
        Deprecated. 
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static DigitalChannelController.Mode[] values()
          +
          Deprecated. 
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (DigitalChannelController.Mode c : DigitalChannelController.Mode.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static DigitalChannelController.Mode valueOf(java.lang.String name)
          +
          Deprecated. 
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelController.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelController.html new file mode 100644 index 00000000000..b9613622f6c --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelController.html @@ -0,0 +1,390 @@ + + + + + +DigitalChannelController + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface DigitalChannelController

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice
      +
      +
      +
      All Known Subinterfaces:
      +
      DeviceInterfaceModule
      +
      +
      +
      +
      public interface DigitalChannelController
      +extends HardwareDevice
      +
      Interface for working with Digital Channel Controllers +

      + Different digital channel controllers will implement this interface.

      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getSerialNumber

          +
          SerialNumber getSerialNumber()
          +
          Serial Number
          +
          +
          Returns:
          +
          return the USB serial number of this device
          +
          +
        • +
        + + + +
          +
        • +

          getDigitalChannelMode

          +
          DigitalChannel.Mode getDigitalChannelMode(int channel)
          +
          Get the mode of a digital channel
          +
          +
          Parameters:
          +
          channel - channel
          +
          Returns:
          +
          INPUT or OUTPUT
          +
          +
        • +
        + + + +
          +
        • +

          setDigitalChannelMode

          +
          void setDigitalChannelMode(int channel,
          +                           DigitalChannel.Mode mode)
          +
          Set the mode of a digital channel
          +
          +
          Parameters:
          +
          channel - channel
          +
          mode - INPUT or OUTPUT
          +
          +
        • +
        + + + + + + + +
          +
        • +

          getDigitalChannelState

          +
          boolean getDigitalChannelState(int channel)
          +
          Get the state of a digital channel + If it's in OUTPUT mode, this will return the output bit. + If the channel is in INPUT mode, this will return the input bit.
          +
          +
          Parameters:
          +
          channel - channel
          +
          Returns:
          +
          true if set; otherwise false
          +
          +
        • +
        + + + +
          +
        • +

          setDigitalChannelState

          +
          void setDigitalChannelState(int channel,
          +                            boolean state)
          +
          Set the state of a digital channel +

          + The behavior of this method is undefined for digital channels in INPUT mode.

          +
          +
          Parameters:
          +
          channel - channel
          +
          state - true to set; false to unset
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelImpl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelImpl.html new file mode 100644 index 00000000000..d7c922449d6 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DigitalChannelImpl.html @@ -0,0 +1,543 @@ + + + + + +DigitalChannelImpl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class DigitalChannelImpl

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.DigitalChannelImpl
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          DigitalChannelImpl

          +
          public DigitalChannelImpl(DigitalChannelController controller,
          +                          int channel)
          +
          Constructor
          +
          +
          Parameters:
          +
          controller - Digital channel controller this channel is attached to
          +
          channel - channel on the digital channel controller
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + + + + + + + + + + + + + +
          +
        • +

          getState

          +
          public boolean getState()
          +
          Get the channel state
          +
          +
          Specified by:
          +
          getState in interface DigitalChannel
          +
          Returns:
          +
          state
          +
          +
        • +
        + + + +
          +
        • +

          setState

          +
          public void setState(boolean state)
          +
          Set the channel state +

          + The behavior of this method is undefined for INPUT digital channels.

          +
          +
          Specified by:
          +
          setState in interface DigitalChannel
          +
          Parameters:
          +
          state -
          +
          +
        • +
        + + + + + + + +
          +
        • +

          getDeviceName

          +
          public java.lang.String getDeviceName()
          +
          Description copied from interface: HardwareDevice
          +
          Returns a string suitable for display to the user as to the type of device. + Note that this is a device-type-specific name; it has nothing to do with the + name by which a user might have configured the device in a robot configuration.
          +
          +
          Specified by:
          +
          getDeviceName in interface HardwareDevice
          +
          Returns:
          +
          device manufacturer and name
          +
          +
        • +
        + + + +
          +
        • +

          getConnectionInfo

          +
          public java.lang.String getConnectionInfo()
          +
          Description copied from interface: HardwareDevice
          +
          Get connection information about this device in a human readable format
          +
          +
          Specified by:
          +
          getConnectionInfo in interface HardwareDevice
          +
          Returns:
          +
          connection info
          +
          +
        • +
        + + + +
          +
        • +

          getVersion

          +
          public int getVersion()
          +
          Description copied from interface: HardwareDevice
          +
          Version
          +
          +
          Specified by:
          +
          getVersion in interface HardwareDevice
          +
          Returns:
          +
          get the version of this device
          +
          +
        • +
        + + + +
          +
        • +

          resetDeviceConfigurationForOpMode

          +
          public void resetDeviceConfigurationForOpMode()
          +
          Description copied from interface: HardwareDevice
          +
          Resets the device's configuration to that which is expected at the beginning of an OpMode. + For example, motors will reset the their direction to 'forward'.
          +
          +
          Specified by:
          +
          resetDeviceConfigurationForOpMode in interface HardwareDevice
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/DistanceSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/DistanceSensor.html new file mode 100644 index 00000000000..9dc207c8e86 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/DistanceSensor.html @@ -0,0 +1,301 @@ + + + + + +DistanceSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface DistanceSensor

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice
      +
      +
      +
      +
      public interface DistanceSensor
      +extends HardwareDevice
      +
      The DistanceSensor may be found on hardware sensors which measure distance + by one means or another.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          distanceOutOfRange

          +
          static final double distanceOutOfRange
          +
          The value returned when a distance reading is not in fact available.
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getDistance

          +
          double getDistance(DistanceUnit unit)
          +
          Returns the current distance in the indicated distance units
          +
          +
          Parameters:
          +
          unit - the unit of distance in which the result should be returned
          +
          Returns:
          +
          the current distance sas measured by the sensor. If no reading is available + (perhaps the sensor is out of range), then distanceOutOfRange is + returned;
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/Engagable.html b/doc/javadoc/com/qualcomm/robotcore/hardware/Engagable.html new file mode 100644 index 00000000000..163ef8e4c98 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/Engagable.html @@ -0,0 +1,270 @@ + + + + + +Engagable + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface Engagable

    +
    +
    +
    +
      +
    • +
      +
      All Known Subinterfaces:
      +
      I2cDeviceSynch
      +
      +
      +
      All Known Implementing Classes:
      +
      I2cDeviceSynchImpl, I2cDeviceSynchImplOnSimple
      +
      +
      +
      +
      public interface Engagable
      +
      The engageable interface can be used to temporarily disengage higher-level hardware objects + from the services they manipulate, then later be able to re-engage them. Objects which implement + this interface include legacy motor and servo controllers.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods 
        Modifier and TypeMethod and Description
        voiddisengage() +
        Disengage the object from underlying services it uses to render its function.
        +
        voidengage() +
        (Re)enage the object with its underlying services.
        +
        booleanisEngaged() +
        Returns whether the object is currently in the engaged state.
        +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          disengage

          +
          void disengage()
          +
          Disengage the object from underlying services it uses to render its function. If + the object is presently disenaged, this method has no effect.
          +
        • +
        + + + +
          +
        • +

          engage

          +
          void engage()
          +
          (Re)enage the object with its underlying services. If the object is presently engaged, + this method has no effect.
          +
        • +
        + + + +
          +
        • +

          isEngaged

          +
          boolean isEngaged()
          +
          Returns whether the object is currently in the engaged state.
          +
          +
          Returns:
          +
          whether the object is currently in the engaged state.
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.GamepadCallback.html b/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.GamepadCallback.html new file mode 100644 index 00000000000..f12fa96178b --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.GamepadCallback.html @@ -0,0 +1,235 @@ + + + + + +Gamepad.GamepadCallback + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface Gamepad.GamepadCallback

    +
    +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      Gamepad
      +
      +
      +
      +
      public static interface Gamepad.GamepadCallback
      +
      Optional callback interface for monitoring changes due to MotionEvents and KeyEvents. + + This interface can be used to notify you if the gamepad changes due to either a KeyEvent or a + MotionEvent. It does not notify you if the gamepad changes for other reasons.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods 
        Modifier and TypeMethod and Description
        voidgamepadChanged(Gamepad gamepad) +
        This method will be called whenever the gamepad state has changed due to either a KeyEvent + or a MotionEvent.
        +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          gamepadChanged

          +
          void gamepadChanged(Gamepad gamepad)
          +
          This method will be called whenever the gamepad state has changed due to either a KeyEvent + or a MotionEvent.
          +
          +
          Parameters:
          +
          gamepad - device which state has changed
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.html b/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.html new file mode 100644 index 00000000000..3ca3055c8e8 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/Gamepad.html @@ -0,0 +1,1183 @@ + + + + + +Gamepad + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class Gamepad

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • RobocolParsableBase
      • +
      • +
          +
        • com.qualcomm.robotcore.hardware.Gamepad
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class Gamepad
      +extends RobocolParsableBase
      +
      Monitor a hardware gamepad. +

      + The buttons, analog sticks, and triggers are represented a public + member variables that can be read from or written to directly. +

      + Analog sticks are represented as floats that range from -1.0 to +1.0. They will be 0.0 while at + rest. The horizontal axis is labeled x, and the vertical axis is labeled y. +

      + Triggers are represented as floats that range from 0.0 to 1.0. They will be at 0.0 while at + rest. +

      + Buttons are boolean values. They will be true if the button is pressed, otherwise they will be + false. +

      + The codes KEYCODE_BUTTON_SELECT and KEYCODE_BACK are both be handled as a "back" button event. + Older Android devices (Kit Kat) map a Logitech F310 "back" button press to a KEYCODE_BUTTON_SELECT event. + Newer Android devices (Marshmallow or greater) map this "back" button press to a KEYCODE_BACK event. + Also, the REV Robotics Gamepad (REV-31-1159) has a "select" button instead of a "back" button on the gamepad. +

      + The dpad is represented as 4 buttons, dpad_up, dpad_down, dpad_left, and dpad_right

      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Nested Class Summary

        + + + + + + + + + + +
        Nested Classes 
        Modifier and TypeClass and Description
        static interface Gamepad.GamepadCallback +
        Optional callback interface for monitoring changes due to MotionEvents and KeyEvents.
        +
        +
      • +
      + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        booleana +
        button a
        +
        booleanb +
        button b
        +
        booleanback +
        button back
        +
        booleandpad_down +
        dpad down
        +
        booleandpad_left +
        dpad left
        +
        booleandpad_right +
        dpad right
        +
        booleandpad_up +
        dpad up
        +
        protected floatdpadThreshold +
        DPAD button will be considered pressed when the movement crosses this + threshold
        +
        booleanguide +
        button guide - often the large button in the middle of the controller.
        +
        intid +
        ID assigned to this gamepad by the OS.
        +
        static intID_SYNTHETIC +
        A gamepad with a phantom id a synthetic one made up by the system
        +
        static intID_UNASSOCIATED +
        A gamepad with an ID equal to ID_UNASSOCIATED has not been associated with any device.
        +
        protected floatjoystickDeadzone +
        If the motion value is less than the threshold, the controller will be + considered at rest
        +
        booleanleft_bumper +
        button left bumper
        +
        booleanleft_stick_button +
        left stick button
        +
        floatleft_stick_x +
        left analog stick horizontal axis
        +
        floatleft_stick_y +
        left analog stick vertical axis
        +
        floatleft_trigger +
        left trigger
        +
        booleanright_bumper +
        button right bumper
        +
        booleanright_stick_button +
        right stick button
        +
        floatright_stick_x +
        right analog stick horizontal axis
        +
        floatright_stick_y +
        right analog stick vertical axis
        +
        floatright_trigger +
        right trigger
        +
        booleanstart +
        button start
        +
        longtimestamp +
        Relative timestamp of the last time an event was detected
        +
        booleanx +
        button x
        +
        booleany +
        button y
        +
        +
      • +
      + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Static Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        booleanatRest() +
        Are all analog sticks and triggers in their rest position?
        +
        protected voidcallCallback() 
        protected floatcleanMotionValues(float number) 
        static voidclearWhitelistFilter() +
        Clear the device whitelist filter.
        +
        voidcopy(Gamepad gamepad) +
        Copy the state of a gamepad into this gamepad
        +
        static voidenableWhitelistFilter(int vendorId, + int productId) +
        Add a whitelist filter for a specific device vendor/product ID.
        +
        voidfromByteArray(byte[] byteArray) 
        intgetGamepadId() 
        MsgTypegetRobocolMsgType() 
        GamepadUsergetUser() 
        static booleanisGamepadDevice(int deviceId) +
        Does this device ID belong to a gamepad device?
        +
        protected booleanpressed(android.view.KeyEvent event) 
        voidrefreshTimestamp() +
        Refreshes the Gamepad's timestamp to be the current time.
        +
        voidreset() +
        Reset this gamepad into its initial state
        +
        voidsetGamepadId(int id) 
        voidsetJoystickDeadzone(float deadzone) +
        Set the joystick deadzone.
        +
        voidsetTimestamp(long timestamp) +
        Sets the time at which this Gamepad last changed its state, + in the SystemClock.uptimeMillis() time base.
        +
        voidsetUser(GamepadUser user) 
        byte[]toByteArray() 
        java.lang.StringtoString() +
        Display a summary of this gamepad, including the state of all buttons, analog sticks, and triggers
        +
        java.lang.Stringtype() +
        Get the type of gamepad as a String.
        +
        voidupdate(android.view.KeyEvent event) +
        Update the gamepad based on a KeyEvent
        +
        voidupdate(android.view.MotionEvent event) +
        Update the gamepad based on a MotionEvent
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          ID_UNASSOCIATED

          +
          public static final int ID_UNASSOCIATED
          +
          A gamepad with an ID equal to ID_UNASSOCIATED has not been associated with any device.
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          ID_SYNTHETIC

          +
          public static final int ID_SYNTHETIC
          +
          A gamepad with a phantom id a synthetic one made up by the system
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          left_stick_x

          +
          public float left_stick_x
          +
          left analog stick horizontal axis
          +
        • +
        + + + +
          +
        • +

          left_stick_y

          +
          public float left_stick_y
          +
          left analog stick vertical axis
          +
        • +
        + + + +
          +
        • +

          right_stick_x

          +
          public float right_stick_x
          +
          right analog stick horizontal axis
          +
        • +
        + + + +
          +
        • +

          right_stick_y

          +
          public float right_stick_y
          +
          right analog stick vertical axis
          +
        • +
        + + + +
          +
        • +

          dpad_up

          +
          public boolean dpad_up
          +
          dpad up
          +
        • +
        + + + +
          +
        • +

          dpad_down

          +
          public boolean dpad_down
          +
          dpad down
          +
        • +
        + + + +
          +
        • +

          dpad_left

          +
          public boolean dpad_left
          +
          dpad left
          +
        • +
        + + + +
          +
        • +

          dpad_right

          +
          public boolean dpad_right
          +
          dpad right
          +
        • +
        + + + +
          +
        • +

          a

          +
          public boolean a
          +
          button a
          +
        • +
        + + + +
          +
        • +

          b

          +
          public boolean b
          +
          button b
          +
        • +
        + + + +
          +
        • +

          x

          +
          public boolean x
          +
          button x
          +
        • +
        + + + +
          +
        • +

          y

          +
          public boolean y
          +
          button y
          +
        • +
        + + + +
          +
        • +

          guide

          +
          public boolean guide
          +
          button guide - often the large button in the middle of the controller. The OS may + capture this button before it is sent to the app; in which case you'll never + receive it.
          +
        • +
        + + + +
          +
        • +

          start

          +
          public boolean start
          +
          button start
          +
        • +
        + + + +
          +
        • +

          back

          +
          public boolean back
          +
          button back
          +
        • +
        + + + +
          +
        • +

          left_bumper

          +
          public boolean left_bumper
          +
          button left bumper
          +
        • +
        + + + +
          +
        • +

          right_bumper

          +
          public boolean right_bumper
          +
          button right bumper
          +
        • +
        + + + +
          +
        • +

          left_stick_button

          +
          public boolean left_stick_button
          +
          left stick button
          +
        • +
        + + + +
          +
        • +

          right_stick_button

          +
          public boolean right_stick_button
          +
          right stick button
          +
        • +
        + + + +
          +
        • +

          left_trigger

          +
          public float left_trigger
          +
          left trigger
          +
        • +
        + + + +
          +
        • +

          right_trigger

          +
          public float right_trigger
          +
          right trigger
          +
        • +
        + + + +
          +
        • +

          id

          +
          public int id
          +
          ID assigned to this gamepad by the OS. This value can change each time the device is plugged in.
          +
        • +
        + + + +
          +
        • +

          timestamp

          +
          public long timestamp
          +
          Relative timestamp of the last time an event was detected
          +
        • +
        + + + +
          +
        • +

          dpadThreshold

          +
          protected float dpadThreshold
          +
          DPAD button will be considered pressed when the movement crosses this + threshold
          +
        • +
        + + + +
          +
        • +

          joystickDeadzone

          +
          protected float joystickDeadzone
          +
          If the motion value is less than the threshold, the controller will be + considered at rest
          +
        • +
        +
      • +
      + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getUser

          +
          public GamepadUser getUser()
          +
        • +
        + + + +
          +
        • +

          setUser

          +
          public void setUser(GamepadUser user)
          +
        • +
        + + + +
          +
        • +

          setGamepadId

          +
          public void setGamepadId(int id)
          +
        • +
        + + + +
          +
        • +

          getGamepadId

          +
          public int getGamepadId()
          +
        • +
        + + + +
          +
        • +

          setTimestamp

          +
          public void setTimestamp(long timestamp)
          +
          Sets the time at which this Gamepad last changed its state, + in the SystemClock.uptimeMillis() time base.
          +
        • +
        + + + +
          +
        • +

          refreshTimestamp

          +
          public void refreshTimestamp()
          +
          Refreshes the Gamepad's timestamp to be the current time.
          +
        • +
        + + + +
          +
        • +

          copy

          +
          public void copy(Gamepad gamepad)
          +          throws RobotCoreException
          +
          Copy the state of a gamepad into this gamepad
          +
          +
          Parameters:
          +
          gamepad - state to be copied from
          +
          Throws:
          +
          RobotCoreException - if the copy fails - gamepad will be in an unknown + state if this exception is thrown
          +
          +
        • +
        + + + +
          +
        • +

          reset

          +
          public void reset()
          +
          Reset this gamepad into its initial state
          +
        • +
        + + + +
          +
        • +

          setJoystickDeadzone

          +
          public void setJoystickDeadzone(float deadzone)
          +
          Set the joystick deadzone. Must be between 0 and 1.
          +
          +
          Parameters:
          +
          deadzone - amount of joystick deadzone
          +
          +
        • +
        + + + +
          +
        • +

          update

          +
          public void update(android.view.MotionEvent event)
          +
          Update the gamepad based on a MotionEvent
          +
          +
          Parameters:
          +
          event - motion event
          +
          +
        • +
        + + + +
          +
        • +

          update

          +
          public void update(android.view.KeyEvent event)
          +
          Update the gamepad based on a KeyEvent
          +
          +
          Parameters:
          +
          event - key event
          +
          +
        • +
        + + + +
          +
        • +

          getRobocolMsgType

          +
          public MsgType getRobocolMsgType()
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          atRest

          +
          public boolean atRest()
          +
          Are all analog sticks and triggers in their rest position?
          +
          +
          Returns:
          +
          true if all analog sticks and triggers are at rest; otherwise false
          +
          +
        • +
        + + + +
          +
        • +

          type

          +
          public java.lang.String type()
          +
          Get the type of gamepad as a String. This method defaults to "Standard".
          +
          +
          Returns:
          +
          gamepad type
          +
          +
        • +
        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          Display a summary of this gamepad, including the state of all buttons, analog sticks, and triggers
          +
          +
          Returns:
          +
          a summary
          +
          +
        • +
        + + + +
          +
        • +

          cleanMotionValues

          +
          protected float cleanMotionValues(float number)
          +
        • +
        + + + +
          +
        • +

          pressed

          +
          protected boolean pressed(android.view.KeyEvent event)
          +
        • +
        + + + +
          +
        • +

          callCallback

          +
          protected void callCallback()
          +
        • +
        + + + +
          +
        • +

          enableWhitelistFilter

          +
          public static void enableWhitelistFilter(int vendorId,
          +                                         int productId)
          +
          Add a whitelist filter for a specific device vendor/product ID. +

          + This adds a whitelist to the gamepad detection method. If a device has been added to the + whitelist, then only devices that match the given vendor ID and product ID will be considered + gamepads. This method can be called multiple times to add multiple devices to the whitelist. +

          + If no whitelist entries have been added, then the default OS detection methods will be used.

          +
          +
          Parameters:
          +
          vendorId - the vendor ID
          +
          productId - the product ID
          +
          +
        • +
        + + + +
          +
        • +

          clearWhitelistFilter

          +
          public static void clearWhitelistFilter()
          +
          Clear the device whitelist filter.
          +
        • +
        + + + +
          +
        • +

          isGamepadDevice

          +
          public static boolean isGamepadDevice(int deviceId)
          +
          Does this device ID belong to a gamepad device?
          +
          +
          Parameters:
          +
          deviceId - device ID
          +
          Returns:
          +
          true, if gamepad device; false otherwise
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/GyroSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/GyroSensor.html new file mode 100644 index 00000000000..47d9c932d93 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/GyroSensor.html @@ -0,0 +1,426 @@ + + + + + +GyroSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface GyroSensor

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          calibrate

          +
          void calibrate()
          +
          Calibrate the gyro. For the Modern Robotics device this will null, or reset, + the Z axis heading.
          +
          +
          Throws:
          +
          java.lang.UnsupportedOperationException - if unsupported; not all gyro devices support this feature
          +
          +
        • +
        + + + +
          +
        • +

          isCalibrating

          +
          boolean isCalibrating()
          +
          Is the gyro performing a calibration operation?
          +
          +
          Returns:
          +
          true if yes, false otherwise
          +
          Throws:
          +
          java.lang.UnsupportedOperationException - if unsupported; not all gyro devices support this feature
          +
          +
        • +
        + + + +
          +
        • +

          getHeading

          +
          int getHeading()
          +
          Return the integrated Z axis as a cartesian heading.
          +
          +
          Returns:
          +
          heading between 0-360.
          +
          Throws:
          +
          java.lang.UnsupportedOperationException - if unsupported; not all gyro devices support this feature
          +
          +
        • +
        + + + +
          +
        • +

          getRotationFraction

          +
          double getRotationFraction()
          +
          Return the rotation of this sensor expressed as a fraction of the maximum possible reportable rotation
          +
          +
          Returns:
          +
          the current fractional rotation of this gyro (a value between 0.0 and 1.0)
          +
          Throws:
          +
          java.lang.UnsupportedOperationException - if unsupported; not all gyro devices support this feature
          +
          +
        • +
        + + + +
          +
        • +

          rawX

          +
          int rawX()
          +
          Return the gyro's raw X value.
          +
          +
          Returns:
          +
          X value
          +
          Throws:
          +
          java.lang.UnsupportedOperationException - if unsupported; not all gyro devices support this feature
          +
          +
        • +
        + + + +
          +
        • +

          rawY

          +
          int rawY()
          +
          Return the gyro's raw Y value.
          +
          +
          Returns:
          +
          Y value
          +
          Throws:
          +
          java.lang.UnsupportedOperationException - if unsupported; not all gyro devices support this feature
          +
          +
        • +
        + + + +
          +
        • +

          rawZ

          +
          int rawZ()
          +
          Return the gyro's raw Z value.
          +
          +
          Returns:
          +
          Z value
          +
          Throws:
          +
          java.lang.UnsupportedOperationException - if unsupported; not all gyro devices support this feature
          +
          +
        • +
        + + + +
          +
        • +

          resetZAxisIntegrator

          +
          void resetZAxisIntegrator()
          +
          Set the integrated Z axis to zero.
          +
          +
          Throws:
          +
          java.lang.UnsupportedOperationException - if unsupported; not all gyro devices support this feature
          +
          +
        • +
        + + + +
          +
        • +

          status

          +
          java.lang.String status()
          +
          Status of this sensor, in string form
          +
          +
          Returns:
          +
          status
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/Gyroscope.html b/doc/javadoc/com/qualcomm/robotcore/hardware/Gyroscope.html new file mode 100644 index 00000000000..ff8193d0451 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/Gyroscope.html @@ -0,0 +1,262 @@ + + + + + +Gyroscope + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface Gyroscope

    +
    +
    +
    +
      +
    • +
      +
      All Known Subinterfaces:
      +
      IntegratingGyroscope
      +
      +
      +
      +
      public interface Gyroscope
      +
      The Gyroscope interface exposes core, fundamental functionality that + is applicable to all gyroscopes: that of reporting angular rotation rate.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getAngularVelocityAxes

          +
          java.util.Set<Axis> getAngularVelocityAxes()
          +
          Returns the axes on which the gyroscope measures angular velocity. Some gyroscopes + measure angular velocity on all three axes (X, Y, & Z) while others measure on only + a subset, typically the Z axis. This method allows you to determine what information + is usefully returned through getAngularVelocity(AngleUnit).
          +
          +
          Returns:
          +
          the axes on which the gyroscope measures angular velocity.
          +
          See Also:
          +
          getAngularVelocity(AngleUnit)
          +
          +
        • +
        + + + +
          +
        • +

          getAngularVelocity

          +
          AngularVelocity getAngularVelocity(AngleUnit unit)
          +
          Returns the angular rotation rate across all the axes measured by the gyro. Axes + on which angular velocity is not measured are reported as zero.
          +
          +
          Parameters:
          +
          unit - the unit in which the rotation rates are to be returned (the time + dimension is always inverse-seconds).
          +
          Returns:
          +
          the angular rotation rate across all the supported axes
          +
          See Also:
          +
          getAngularVelocityAxes()
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDevice.Manufacturer.html b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDevice.Manufacturer.html new file mode 100644 index 00000000000..797d32b5f42 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDevice.Manufacturer.html @@ -0,0 +1,438 @@ + + + + + +HardwareDevice.Manufacturer + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum HardwareDevice.Manufacturer

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static HardwareDevice.Manufacturer[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (HardwareDevice.Manufacturer c : HardwareDevice.Manufacturer.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static HardwareDevice.Manufacturer valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDevice.html b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDevice.html new file mode 100644 index 00000000000..ea8123fbd74 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDevice.html @@ -0,0 +1,348 @@ + + + + + +HardwareDevice + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface HardwareDevice

    +
    +
    + +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getManufacturer

          +
          HardwareDevice.Manufacturer getManufacturer()
          +
          Returns an indication of the manufacturer of this device.
          +
          +
          Returns:
          +
          the device's manufacturer
          +
          +
        • +
        + + + +
          +
        • +

          getDeviceName

          +
          java.lang.String getDeviceName()
          +
          Returns a string suitable for display to the user as to the type of device. + Note that this is a device-type-specific name; it has nothing to do with the + name by which a user might have configured the device in a robot configuration.
          +
          +
          Returns:
          +
          device manufacturer and name
          +
          +
        • +
        + + + +
          +
        • +

          getConnectionInfo

          +
          java.lang.String getConnectionInfo()
          +
          Get connection information about this device in a human readable format
          +
          +
          Returns:
          +
          connection info
          +
          +
        • +
        + + + +
          +
        • +

          getVersion

          +
          int getVersion()
          +
          Version
          +
          +
          Returns:
          +
          get the version of this device
          +
          +
        • +
        + + + +
          +
        • +

          resetDeviceConfigurationForOpMode

          +
          void resetDeviceConfigurationForOpMode()
          +
          Resets the device's configuration to that which is expected at the beginning of an OpMode. + For example, motors will reset the their direction to 'forward'.
          +
        • +
        + + + +
          +
        • +

          close

          +
          void close()
          +
          Closes this device
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDeviceCloseOnTearDown.html b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDeviceCloseOnTearDown.html new file mode 100644 index 00000000000..80f38b161cf --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDeviceCloseOnTearDown.html @@ -0,0 +1,220 @@ + + + + + +HardwareDeviceCloseOnTearDown + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface HardwareDeviceCloseOnTearDown

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface HardwareDeviceCloseOnTearDown
      +
      Instances of HardwareDeviceCloseOnTearDown are those which should be + automatically closed when we we 'teardown' a robot
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          close

          +
          void close()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDeviceHealth.HealthStatus.html b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDeviceHealth.HealthStatus.html new file mode 100644 index 00000000000..ce6335d4628 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDeviceHealth.HealthStatus.html @@ -0,0 +1,372 @@ + + + + + +HardwareDeviceHealth.HealthStatus + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum HardwareDeviceHealth.HealthStatus

    +
    +
    + +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        CLOSED 
        HEALTHY +
        The device appears to be operating successfully
        +
        UNHEALTHY +
        Experiencing problems of an unspecified nature
        +
        UNKNOWN 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static HardwareDeviceHealth.HealthStatusvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static HardwareDeviceHealth.HealthStatus[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static HardwareDeviceHealth.HealthStatus[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (HardwareDeviceHealth.HealthStatus c : HardwareDeviceHealth.HealthStatus.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static HardwareDeviceHealth.HealthStatus valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDeviceHealth.html b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDeviceHealth.html new file mode 100644 index 00000000000..ff5ed6ec74d --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDeviceHealth.html @@ -0,0 +1,263 @@ + + + + + +HardwareDeviceHealth + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface HardwareDeviceHealth

    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDeviceHealthImpl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDeviceHealthImpl.html new file mode 100644 index 00000000000..294b4168a8e --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareDeviceHealthImpl.html @@ -0,0 +1,399 @@ + + + + + +HardwareDeviceHealthImpl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class HardwareDeviceHealthImpl

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.HardwareDeviceHealthImpl
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html new file mode 100644 index 00000000000..18713de7f0d --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html @@ -0,0 +1,565 @@ + + + + + +HardwareMap.DeviceMapping + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class HardwareMap.DeviceMapping<DEVICE_TYPE extends HardwareDevice>

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping<DEVICE_TYPE>
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Type Parameters:
      +
      DEVICE_TYPE -
      +
      +
      +
      All Implemented Interfaces:
      +
      java.lang.Iterable<DEVICE_TYPE>
      +
      +
      +
      Enclosing class:
      +
      HardwareMap
      +
      +
      +
      +
      public class HardwareMap.DeviceMapping<DEVICE_TYPE extends HardwareDevice>
      +extends java.lang.Object
      +implements java.lang.Iterable<DEVICE_TYPE>
      +
      A DeviceMapping contains a subcollection of the devices registered in a HardwareMap + comprised of all the devices of a particular device type
      +
      +
      See Also:
      +
      get(String), +get(String)
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        DeviceMapping(java.lang.Class<DEVICE_TYPE> deviceTypeClass) 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        DEVICE_TYPEcast(java.lang.Object obj) +
        A small utility that assists in keeping the Java generics type system happy
        +
        booleancontains(java.lang.String deviceName) +
        Returns whether a device of the indicated name is contained within this mapping
        +
        java.util.Set<java.util.Map.Entry<java.lang.String,DEVICE_TYPE>>entrySet() +
        Returns a collection of all the (name, device) pairs in this DeviceMapping.
        +
        DEVICE_TYPEget(java.lang.String deviceName) 
        java.lang.Class<DEVICE_TYPE>getDeviceTypeClass() +
        Returns the runtime device type for this mapping
        +
        protected voidinternalPut(SerialNumber serialNumber, + java.lang.String deviceName, + DEVICE_TYPE device) 
        java.util.Iterator<DEVICE_TYPE>iterator() +
        Returns an iterator over all the devices in this DeviceMapping.
        +
        voidput(SerialNumber serialNumber, + java.lang.String deviceName, + DEVICE_TYPE device) +
        (Advanced) Registers a new device in this DeviceMapping under the indicated name.
        +
        voidput(java.lang.String deviceName, + DEVICE_TYPE device) +
        Registers a new device in this DeviceMapping under the indicated name.
        +
        voidputLocal(java.lang.String deviceName, + DEVICE_TYPE device) 
        booleanremove(SerialNumber serialNumber, + java.lang.String deviceName) +
        (Advanced) Removes the device with the indicated name (if any) from this DeviceMapping.
        +
        booleanremove(java.lang.String deviceName) +
        (Advanced) Removes the device with the indicated name (if any) from this DeviceMapping.
        +
        intsize() +
        Returns the number of devices currently in this DeviceMapping
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
          +
        • + + +

          Methods inherited from interface java.lang.Iterable

          +forEach, spliterator
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          DeviceMapping

          +
          public DeviceMapping(java.lang.Class<DEVICE_TYPE> deviceTypeClass)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getDeviceTypeClass

          +
          public java.lang.Class<DEVICE_TYPE> getDeviceTypeClass()
          +
          Returns the runtime device type for this mapping
          +
        • +
        + + + +
          +
        • +

          cast

          +
          public DEVICE_TYPE cast(java.lang.Object obj)
          +
          A small utility that assists in keeping the Java generics type system happy
          +
        • +
        + + + +
          +
        • +

          get

          +
          public DEVICE_TYPE get(java.lang.String deviceName)
          +
        • +
        + + + + + +
          +
        • +

          put

          +
          public void put(java.lang.String deviceName,
          +                DEVICE_TYPE device)
          +
          Registers a new device in this DeviceMapping under the indicated name. Any existing device + with this name in this DeviceMapping is removed. The new device is also added to the + overall collection in the overall map itself. Note that this method is normally called + only by code in the SDK itself, not by user code.
          +
          +
          Parameters:
          +
          deviceName - the name by which the new device is to be known (case sensitive)
          +
          device - the new device to be named
          +
          See Also:
          +
          HardwareMap.put(String, HardwareDevice)
          +
          +
        • +
        + + + + + +
          +
        • +

          put

          +
          public void put(SerialNumber serialNumber,
          +                java.lang.String deviceName,
          +                DEVICE_TYPE device)
          +
          (Advanced) Registers a new device in this DeviceMapping under the indicated name. Any existing device + with this name in this DeviceMapping is removed. The new device is also added to the + overall collection in the overall map itself. Note that this method is normally called + only by code in the SDK itself, not by user code.
          +
          +
          Parameters:
          +
          serialNumber - the serial number of the device
          +
          deviceName - the name by which the new device is to be known (case sensitive)
          +
          device - the new device to be named
          +
          See Also:
          +
          HardwareMap.put(String, HardwareDevice)
          +
          +
        • +
        + + + + + +
          +
        • +

          internalPut

          +
          protected void internalPut(SerialNumber serialNumber,
          +                           java.lang.String deviceName,
          +                           DEVICE_TYPE device)
          +
        • +
        + + + + + +
          +
        • +

          putLocal

          +
          public void putLocal(java.lang.String deviceName,
          +                     DEVICE_TYPE device)
          +
        • +
        + + + +
          +
        • +

          contains

          +
          public boolean contains(java.lang.String deviceName)
          +
          Returns whether a device of the indicated name is contained within this mapping
          +
          +
          Parameters:
          +
          deviceName - the name sought
          +
          Returns:
          +
          whether a device of the indicated name is contained within this mapping
          +
          +
        • +
        + + + +
          +
        • +

          remove

          +
          public boolean remove(java.lang.String deviceName)
          +
          (Advanced) Removes the device with the indicated name (if any) from this DeviceMapping. The device + is also removed under that name in the overall map itself. Note that this method is normally + called only by code in the SDK itself, not by user code.
          +
          +
          Parameters:
          +
          deviceName - the name of the device to remove.
          +
          Returns:
          +
          whether any modifications were made to this DeviceMapping
          +
          See Also:
          +
          HardwareMap.remove(java.lang.String, com.qualcomm.robotcore.hardware.HardwareDevice)
          +
          +
        • +
        + + + +
          +
        • +

          remove

          +
          public boolean remove(SerialNumber serialNumber,
          +                      java.lang.String deviceName)
          +
          (Advanced) Removes the device with the indicated name (if any) from this DeviceMapping. The device + is also removed under that name in the overall map itself. Note that this method is normally + called only by code in the SDK itself, not by user code.
          +
          +
          Parameters:
          +
          serialNumber - (optional) the serial number of the device to remove
          +
          deviceName - the name of the device to remove.
          +
          Returns:
          +
          whether any modifications were made to this DeviceMapping
          +
          See Also:
          +
          HardwareMap.remove(java.lang.String, com.qualcomm.robotcore.hardware.HardwareDevice)
          +
          +
        • +
        + + + +
          +
        • +

          iterator

          +
          public java.util.Iterator<DEVICE_TYPE> iterator()
          +
          Returns an iterator over all the devices in this DeviceMapping.
          +
          +
          Specified by:
          +
          iterator in interface java.lang.Iterable<DEVICE_TYPE extends HardwareDevice>
          +
          Returns:
          +
          an iterator over all the devices in this DeviceMapping.
          +
          +
        • +
        + + + +
          +
        • +

          entrySet

          +
          public java.util.Set<java.util.Map.Entry<java.lang.String,DEVICE_TYPE>> entrySet()
          +
          Returns a collection of all the (name, device) pairs in this DeviceMapping.
          +
          +
          Returns:
          +
          a collection of all the (name, device) pairs in this DeviceMapping.
          +
          +
        • +
        + + + +
          +
        • +

          size

          +
          public int size()
          +
          Returns the number of devices currently in this DeviceMapping
          +
          +
          Returns:
          +
          the number of devices currently in this DeviceMapping
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareMap.html b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareMap.html new file mode 100644 index 00000000000..7cecd56e3db --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/HardwareMap.html @@ -0,0 +1,1113 @@ + + + + + +HardwareMap + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class HardwareMap

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.HardwareMap
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.lang.Iterable<HardwareDevice>
      +
      +
      +
      +
      public class HardwareMap
      +extends java.lang.Object
      +implements java.lang.Iterable<HardwareDevice>
      +
      HardwareMap provides a means of retrieving runtime HardwareDevice instances according to the + names with which the corresponding physical devices were associated during robot configuration. + +

      A HardwareMap also contains an associated application context in which it was instantiated. + Through their hardwareMap, this + provides access to a Context for OpModes, as such an appropriate instance is needed + by various system APIs.

      +
    • +
    +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          HardwareMap

          +
          public HardwareMap(android.content.Context appContext)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          get

          +
          public <T> T get(java.lang.Class<? extends T> classOrInterface,
          +                 java.lang.String deviceName)
          +
          Retrieves the (first) device with the indicated name which is also an instance of the + indicated class or interface. If no such device is found, an exception is thrown. Example: + +
          +    DcMotor motorLeft = hardwareMap.get(DcMotor.class, "motorLeft");
          +    ColorSensor colorSensor = hardwareMap.get(ColorSensor.class, "myColorSensor");
          + 
          +
          +
          Parameters:
          +
          classOrInterface - the class or interface indicating the type of the device object to be retrieved
          +
          deviceName - the name of the device object to be retrieved
          +
          Returns:
          +
          a device with the indicated name which is an instance of the indicated class or interface
          +
          See Also:
          +
          get(String), +getAll(Class), +HardwareMap.DeviceMapping.get(String), +tryGet(Class, String)
          +
          +
        • +
        + + + +
          +
        • +

          tryGet

          +
          public <T> T tryGet(java.lang.Class<? extends T> classOrInterface,
          +                    java.lang.String deviceName)
          +
          Retrieves the (first) device with the indicated name which is also an instance of the + indicated class or interface. If no such device is found, null is returned. + + This is not commonly used; get(java.lang.Class<? extends T>, java.lang.String) is the usual method for retreiving items from + the map.
          +
          +
          See Also:
          +
          get(Class, String)
          +
          +
        • +
        + + + +
          +
        • +

          get

          +
          public <T> T get(java.lang.Class<? extends T> classOrInterface,
          +                 SerialNumber serialNumber)
          +
          (Advanced) Returns the device with the indicated SerialNumber, if it exists, + cast to the indicated class or interface; otherwise, null.
          +
        • +
        + + + +
          +
        • +

          get

          +
          public HardwareDevice get(java.lang.String deviceName)
          +
          Returns the (first) device with the indicated name. If no such device is found, an exception is thrown. + Note that the compile-time type of the return value of this method is HardwareDevice, + which is usually not what is desired in user code. Thus, the programmer usually casts the + return type to the target type that the programmer knows the returned value to be: + +
          +    DcMotor motorLeft = (DcMotor)hardwareMap.get("motorLeft");
          +    ColorSensor colorSensor = (ColorSensor)hardwareMap.get("myColorSensor");
          + 
          +
          +
          Parameters:
          +
          deviceName - the name of the device object to be retrieved
          +
          Returns:
          +
          a device with the indicated name.
          +
          See Also:
          +
          get(Class, String), +HardwareMap.DeviceMapping.get(String)
          +
          +
        • +
        + + + +
          +
        • +

          getAll

          +
          public <T> java.util.List<T> getAll(java.lang.Class<? extends T> classOrInterface)
          +
          Returns all the devices which are instances of the indicated class or interface.
          +
          +
          Parameters:
          +
          classOrInterface - the class or interface indicating the type of the device object to be retrieved
          +
          Returns:
          +
          all the devices registered in the map which are instances of classOrInterface
          +
          See Also:
          +
          get(Class, String)
          +
          +
        • +
        + + + +
          +
        • +

          put

          +
          public void put(java.lang.String deviceName,
          +                HardwareDevice device)
          +
          Puts a device in the overall map without having it also reside in a type-specific DeviceMapping.
          +
          +
          Parameters:
          +
          deviceName - the name by which the device is to be known (case sensitive)
          +
          device - the device to be stored by that name
          +
          +
        • +
        + + + +
          +
        • +

          put

          +
          public void put(SerialNumber serialNumber,
          +                java.lang.String deviceName,
          +                HardwareDevice device)
          +
          (Advanced) Puts a device in the overall map without having it also reside in a type-specific DeviceMapping.
          +
          +
          Parameters:
          +
          serialNumber - the SerialNumber of the device
          +
          deviceName - the name by which the device is to be known (case sensitive)
          +
          device - the device to be stored by that name
          +
          +
        • +
        + + + +
          +
        • +

          internalPut

          +
          protected void internalPut(SerialNumber serialNumber,
          +                           java.lang.String deviceName,
          +                           HardwareDevice device)
          +
        • +
        + + + +
          +
        • +

          remove

          +
          public boolean remove(java.lang.String deviceName,
          +                      HardwareDevice device)
          +
          (Advanced) Removes a device from the overall map, if present. If the device is also present in a + DeviceMapping, then the device should be removed using HardwareMap.DeviceMapping.remove(java.lang.String) + instead of calling this method. + +

          This is normally called only by code in the SDK itself, not by user code.

          +
          +
          Parameters:
          +
          deviceName - the name of the device to remove
          +
          device - the device to remove under that name
          +
          Returns:
          +
          whether a device was removed or not
          +
          +
        • +
        + + + +
          +
        • +

          remove

          +
          public boolean remove(SerialNumber serialNumber,
          +                      java.lang.String deviceName,
          +                      HardwareDevice device)
          +
          (Advanced) Removes a device from the overall map, if present. If the device is also present in a + DeviceMapping, then the device should be removed using HardwareMap.DeviceMapping.remove(java.lang.String) + instead of calling this method. + +

          This is normally called only by code in the SDK itself, not by user code.

          +
          +
          Parameters:
          +
          serialNumber - (optional) the serial number of the device
          +
          deviceName - the name of the device to remove
          +
          device - the device to remove under that name
          +
          Returns:
          +
          whether a device was removed or not
          +
          +
        • +
        + + + +
          +
        • +

          getNamesOf

          +
          public java.util.Set<java.lang.String> getNamesOf(HardwareDevice device)
          +
          Returns all the names by which the device is known. Virtually always, there is but + a single name.
          +
          +
          Parameters:
          +
          device - the device whose names are desired.
          +
          Returns:
          +
          the set of names by which that device is known
          +
          +
        • +
        + + + +
          +
        • +

          recordDeviceName

          +
          protected void recordDeviceName(java.lang.String deviceName,
          +                                HardwareDevice device)
          +
        • +
        + + + +
          +
        • +

          rebuildDeviceNamesIfNecessary

          +
          protected void rebuildDeviceNamesIfNecessary()
          +
        • +
        + + + +
          +
        • +

          size

          +
          public int size()
          +
          Returns the number of unique device objects currently found in this HardwareMap.
          +
          +
          Returns:
          +
          the number of unique device objects currently found in this HardwareMap.
          +
          See Also:
          +
          iterator()
          +
          +
        • +
        + + + +
          +
        • +

          iterator

          +
          public java.util.Iterator<HardwareDevice> iterator()
          +
          Returns an iterator of all the devices in the HardwareMap.
          +
          +
          Specified by:
          +
          iterator in interface java.lang.Iterable<HardwareDevice>
          +
          Returns:
          +
          an iterator of all the devices in the HardwareMap.
          +
          See Also:
          +
          size()
          +
          +
        • +
        + + + +
          +
        • +

          logDevices

          +
          public void logDevices()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cAddr.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cAddr.html new file mode 100644 index 00000000000..5319bc5769d --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cAddr.html @@ -0,0 +1,321 @@ + + + + + +I2cAddr + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cAddr

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.I2cAddr
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public final class I2cAddr
      +extends java.lang.Object
      +
      I2cAddr represents an address on an I2C bus.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          I2cAddr

          +
          public I2cAddr(int i2cAddr7Bit)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          zero

          +
          public static I2cAddr zero()
          +
        • +
        + + + +
          +
        • +

          create7bit

          +
          public static I2cAddr create7bit(int i2cAddr7Bit)
          +
        • +
        + + + +
          +
        • +

          create8bit

          +
          public static I2cAddr create8bit(int i2cAddr8Bit)
          +
        • +
        + + + +
          +
        • +

          get8Bit

          +
          public int get8Bit()
          +
        • +
        + + + +
          +
        • +

          get7Bit

          +
          public int get7Bit()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cAddrConfig.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cAddrConfig.html new file mode 100644 index 00000000000..6d2727190f8 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cAddrConfig.html @@ -0,0 +1,254 @@ + + + + + +I2cAddrConfig + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface I2cAddrConfig

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setI2cAddress

          +
          void setI2cAddress(I2cAddr newAddress)
          +
          Configures a new I2C address to use
          +
          +
          Parameters:
          +
          newAddress - the new I2C address to use
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cAddressableDevice.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cAddressableDevice.html new file mode 100644 index 00000000000..7c59ed6ac4f --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cAddressableDevice.html @@ -0,0 +1,239 @@ + + + + + +I2cAddressableDevice + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface I2cAddressableDevice

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getI2cAddress

          +
          I2cAddr getI2cAddress()
          +
          Returns the I2C address currently in use to communicate with an I2C hardware device
          +
          +
          Returns:
          +
          the I2C address currently in use
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cController.I2cPortReadyBeginEndNotifications.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cController.I2cPortReadyBeginEndNotifications.html new file mode 100644 index 00000000000..58b24f7d32c --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cController.I2cPortReadyBeginEndNotifications.html @@ -0,0 +1,251 @@ + + + + + +I2cController.I2cPortReadyBeginEndNotifications + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface I2cController.I2cPortReadyBeginEndNotifications

    +
    +
    +
    +
      +
    • +
      +
      All Known Implementing Classes:
      +
      I2cDeviceSynchImpl.Callback
      +
      +
      +
      Enclosing interface:
      +
      I2cController
      +
      +
      +
      +
      public static interface I2cController.I2cPortReadyBeginEndNotifications
      +
      A callback interface through which a client can learn when portIsReady callbacks + begin and then later end.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onPortIsReadyCallbacksBegin

          +
          void onPortIsReadyCallbacksBegin(int port)
          +                          throws java.lang.InterruptedException
          +
          +
          Throws:
          +
          java.lang.InterruptedException
          +
          +
        • +
        + + + +
          +
        • +

          onPortIsReadyCallbacksEnd

          +
          void onPortIsReadyCallbacksEnd(int port)
          +                        throws java.lang.InterruptedException
          +
          +
          Throws:
          +
          java.lang.InterruptedException
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cController.I2cPortReadyCallback.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cController.I2cPortReadyCallback.html new file mode 100644 index 00000000000..0c93106200f --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cController.I2cPortReadyCallback.html @@ -0,0 +1,227 @@ + + + + + +I2cController.I2cPortReadyCallback + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface I2cController.I2cPortReadyCallback

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          portIsReady

          +
          void portIsReady(int port)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cController.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cController.html new file mode 100644 index 00000000000..7c2b628d4ec --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cController.html @@ -0,0 +1,1014 @@ + + + + + +I2cController + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface I2cController

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          I2C_BUFFER_START_ADDRESS

          +
          static final byte I2C_BUFFER_START_ADDRESS
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getSerialNumber

          +
          SerialNumber getSerialNumber()
          +
          Serial Number
          +
          +
          Returns:
          +
          return the USB serial number of this device
          +
          +
        • +
        + + + +
          +
        • +

          enableI2cReadMode

          +
          void enableI2cReadMode(int physicalPort,
          +                       I2cAddr i2cAddress,
          +                       int memAddress,
          +                       int length)
          +
          Enable read mode for a particular I2C device
          +
          +
          Parameters:
          +
          physicalPort - the port the device is attached to
          +
          i2cAddress - the i2c address of the device
          +
          memAddress - mem address at which to start reading
          +
          length - number of bytes to read
          +
          +
        • +
        + + + +
          +
        • +

          enableI2cWriteMode

          +
          void enableI2cWriteMode(int physicalPort,
          +                        I2cAddr i2cAddress,
          +                        int memAddress,
          +                        int length)
          +
          Enable write mode for a particular I2C device
          +
          +
          Parameters:
          +
          physicalPort - the port the device is attached to
          +
          i2cAddress - the i2c address of the device
          +
          memAddress - the memory address at which to start writing
          +
          length - number of bytes to read
          +
          +
        • +
        + + + +
          +
        • +

          getCopyOfReadBuffer

          +
          byte[] getCopyOfReadBuffer(int physicalPort)
          +
          Get a copy of the most recent data read in from the device
          +
          +
          Parameters:
          +
          physicalPort - the port the device is attached to
          +
          Returns:
          +
          a copy of the most recent data read in from the device
          +
          +
        • +
        + + + +
          +
        • +

          getCopyOfWriteBuffer

          +
          byte[] getCopyOfWriteBuffer(int physicalPort)
          +
          Get a copy of the data that is set to be written out to the device
          +
          +
          Parameters:
          +
          physicalPort - the port the device is attached to
          +
          Returns:
          +
          a copy of the data set to be written out to the device
          +
          +
        • +
        + + + +
          +
        • +

          copyBufferIntoWriteBuffer

          +
          void copyBufferIntoWriteBuffer(int physicalPort,
          +                               byte[] buffer)
          +
          Copy a byte array into the buffer that is set to be written out to the device
          +
          +
          Parameters:
          +
          physicalPort - the port the device is attached to
          +
          buffer - buffer to copy
          +
          +
        • +
        + + + +
          +
        • +

          setI2cPortActionFlag

          +
          void setI2cPortActionFlag(int port)
          +
          Set the port action flag; this flag tells the controller to send the + current data in its buffer to the I2C device
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          See Also:
          +
          clearI2cPortActionFlag(int)
          +
          +
        • +
        + + + +
          +
        • +

          clearI2cPortActionFlag

          +
          void clearI2cPortActionFlag(int port)
          +
          Clears the port action flag, undoing the effect of previous setI2cPortActionFlag()
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          See Also:
          +
          setI2cPortActionFlag(int)
          +
          +
        • +
        + + + +
          +
        • +

          isI2cPortActionFlagSet

          +
          boolean isI2cPortActionFlagSet(int port)
          +
          Get the port action flag; this flag is set if the particular port is busy.
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          +
        • +
        + + + +
          +
        • +

          readI2cCacheFromController

          +
          void readI2cCacheFromController(int port)
          +
          Read the local cache in from the I2C Controller + + NOTE: unless this method is called the internal cache isn't updated
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          +
        • +
        + + + +
          +
        • +

          writeI2cCacheToController

          +
          void writeI2cCacheToController(int port)
          +
          Write the local cache to the I2C Controller + + NOTE: unless this method is called the internal cache isn't updated
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          +
        • +
        + + + +
          +
        • +

          writeI2cPortFlagOnlyToController

          +
          void writeI2cPortFlagOnlyToController(int port)
          +
          Write just the port action flag in the local cache to the I2C controller
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          +
        • +
        + + + +
          +
        • +

          isI2cPortInReadMode

          +
          boolean isI2cPortInReadMode(int port)
          +
          Is the port in read mode?
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          Returns:
          +
          true if in read mode; otherwise false
          +
          +
        • +
        + + + +
          +
        • +

          isI2cPortInWriteMode

          +
          boolean isI2cPortInWriteMode(int port)
          +
          Is the port in write mode?
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          Returns:
          +
          true if in write mode; otherwise false
          +
          +
        • +
        + + + +
          +
        • +

          isI2cPortReady

          +
          boolean isI2cPortReady(int port)
          +
          Determine if a physical port is ready
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          Returns:
          +
          true if ready for command; false otherwise
          +
          +
        • +
        + + + +
          +
        • +

          getI2cReadCacheLock

          +
          java.util.concurrent.locks.Lock getI2cReadCacheLock(int port)
          +
          Get access to the read cache lock. +

          + This is needed if you are accessing the read cache directly. The read + cache lock needs to be acquired before attempting to interact with the read cache

          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          Returns:
          +
          lock
          +
          +
        • +
        + + + +
          +
        • +

          getI2cWriteCacheLock

          +
          java.util.concurrent.locks.Lock getI2cWriteCacheLock(int port)
          +
          Get access to the write cache lock. +

          + This is needed if you are accessing the write cache directly. The write + cache lock needs to be acquired before attempting to interact with the + write cache

          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          Returns:
          +
          lock
          +
          +
        • +
        + + + +
          +
        • +

          getI2cReadCache

          +
          byte[] getI2cReadCache(int port)
          +
          Get direct access to the cache that I2C reads will be populated into +

          + Please lock the cache before accessing it.

          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          Returns:
          +
          byte array
          +
          +
        • +
        + + + +
          +
        • +

          getI2cReadCacheTimeWindow

          +
          TimeWindow getI2cReadCacheTimeWindow(int port)
          +
          Returns the time window object into which timestamps are placed as the read cache is populated
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          Returns:
          +
          the time window object into which timestamps are placed as the read cache is populated
          +
          +
        • +
        + + + +
          +
        • +

          getI2cWriteCache

          +
          byte[] getI2cWriteCache(int port)
          +
          Get direct access to the cache that I2C writes will be populated into +

          + Please lock the cache before accessing it.

          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          Returns:
          +
          byte array
          +
          +
        • +
        + + + +
          +
        • +

          getMaxI2cWriteLatency

          +
          int getMaxI2cWriteLatency(int port)
          +
          Returns the maximum interval, in milliseconds, from when the controller receives an I2c write + transmission over USB to when that write is actually issued to the I2c device.
          +
          +
          Returns:
          +
          the maximum interval, in milliseconds, from when the controller receives an I2c write + transmission over USB to when that write is actually issued to the I2c device.
          +
          +
        • +
        + + + +
          +
        • +

          registerForI2cPortReadyCallback

          +
          void registerForI2cPortReadyCallback(I2cController.I2cPortReadyCallback callback,
          +                                     int port)
          +
          Register to be notified when a given I2C port is ready. + + The callback method will be called after the latest data has been read from the I2C Controller. + + Only one callback can be registered for a given port. Last to register wins.
          +
          +
          Parameters:
          +
          callback - register a callback
          +
          port - port to be monitored
          +
          +
        • +
        + + + +
          +
        • +

          getI2cPortReadyCallback

          +
          I2cController.I2cPortReadyCallback getI2cPortReadyCallback(int port)
          +
          Returns the callback currently registered to receive portIsReady notifications for the + indicated port
          +
          +
          Parameters:
          +
          port - the port of interest
          +
          Returns:
          +
          the currently registered callback, if any
          +
          +
        • +
        + + + +
          +
        • +

          deregisterForPortReadyCallback

          +
          void deregisterForPortReadyCallback(int port)
          +
          De-register for port ready notifications.
          +
          +
          Parameters:
          +
          port - port no longer being monitored.
          +
          +
        • +
        + + + +
          +
        • +

          registerForPortReadyBeginEndCallback

          +
          void registerForPortReadyBeginEndCallback(I2cController.I2cPortReadyBeginEndNotifications callback,
          +                                          int port)
          +
          Registers to be notification when portIsReady callbacks begin or cease
          +
          +
          Parameters:
          +
          callback - the callback to register
          +
          port - the port number to register the callback on
          +
          +
        • +
        + + + +
          +
        • +

          getPortReadyBeginEndCallback

          +
          I2cController.I2cPortReadyBeginEndNotifications getPortReadyBeginEndCallback(int port)
          +
          Returns the current callback registered for a given port
          +
          +
          Parameters:
          +
          port - the port in question
          +
          Returns:
          +
          the current callback for that port, or null if none presently exists
          +
          +
        • +
        + + + +
          +
        • +

          deregisterForPortReadyBeginEndCallback

          +
          void deregisterForPortReadyBeginEndCallback(int port)
          +
          Deregisters any existing notifications callback for the given port
          +
          +
          Parameters:
          +
          port - the port in question
          +
          +
        • +
        + + + +
          +
        • +

          isArmed

          +
          boolean isArmed()
          +
          Returns whether, as of this instant, this controller is alive and operational in + its normally expected mode; that is, whether it is currently in communication + with its underlying hardware or whether it is in some other state
          +
          +
          Returns:
          +
          the arming status of this controller
          +
          +
        • +
        + + + +
          +
        • +

          readI2cCacheFromModule

          +
          @Deprecated
          +void readI2cCacheFromModule(int port)
          +
          Deprecated. 
          +
          Deprecated, use readI2cCacheFromController(port)
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          +
        • +
        + + + +
          +
        • +

          writeI2cCacheToModule

          +
          @Deprecated
          +void writeI2cCacheToModule(int port)
          +
          Deprecated. 
          +
          Deprecated, use writeI2cCacheToController(port)
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          +
        • +
        + + + +
          +
        • +

          writeI2cPortFlagOnlyToModule

          +
          @Deprecated
          +void writeI2cPortFlagOnlyToModule(int port)
          +
          Deprecated. 
          +
          Deprecated, use writeI2cPortFlagOnlyToController(port)
          +
          +
          Parameters:
          +
          port - physical port number on the device
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cControllerPortDevice.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cControllerPortDevice.html new file mode 100644 index 00000000000..274064a4859 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cControllerPortDevice.html @@ -0,0 +1,256 @@ + + + + + +I2cControllerPortDevice + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface I2cControllerPortDevice

    +
    +
    +
    +
      +
    • +
      +
      All Known Subinterfaces:
      +
      I2cDevice
      +
      +
      +
      All Known Implementing Classes:
      +
      I2cControllerPortDeviceImpl, I2cDeviceImpl
      +
      +
      +
      +
      public interface I2cControllerPortDevice
      +
      The I2cControllerPortDevice interface should be supported by hardware devices which + occupy a port on an I2cController. It provides a means by which the controller + and the port so occupied can be retrieved.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getI2cController

          +
          I2cController getI2cController()
          +
          Returns the controller associated with this device.
          +
          +
          Returns:
          +
          the controller associated with this device
          +
          +
        • +
        + + + +
          +
        • +

          getPort

          +
          int getPort()
          +
          Returns the port on the associated controller that this device occupies.
          +
          +
          Returns:
          +
          the port on the associated controller that this device occupies
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cControllerPortDeviceImpl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cControllerPortDeviceImpl.html new file mode 100644 index 00000000000..2c02b3c0dc6 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cControllerPortDeviceImpl.html @@ -0,0 +1,423 @@ + + + + + +I2cControllerPortDeviceImpl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cControllerPortDeviceImpl

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.I2cControllerPortDeviceImpl
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          physicalPort

          +
          protected final int physicalPort
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          I2cControllerPortDeviceImpl

          +
          protected I2cControllerPortDeviceImpl(I2cController controller,
          +                                      int physicalPort)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          finishConstruction

          +
          protected void finishConstruction()
          +
        • +
        + + + +
          +
        • +

          controllerNowArmedOrPretending

          +
          protected void controllerNowArmedOrPretending()
          +
          intended as a subclass hook
          +
        • +
        + + + +
          +
        • +

          controllerNowDisarmed

          +
          protected void controllerNowDisarmed()
          +
          intended as a subclass hook
          +
        • +
        + + + +
          +
        • +

          onModuleStateChange

          +
          public void onModuleStateChange(RobotArmingStateNotifier module,
          +                                RobotArmingStateNotifier.ARMINGSTATE state)
          +
        • +
        + + + + + + + +
          +
        • +

          getPort

          +
          public int getPort()
          +
          Description copied from interface: I2cControllerPortDevice
          +
          Returns the port on the associated controller that this device occupies.
          +
          +
          Specified by:
          +
          getPort in interface I2cControllerPortDevice
          +
          Returns:
          +
          the port on the associated controller that this device occupies
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDevice.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDevice.html new file mode 100644 index 00000000000..f1ceb8f7daa --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDevice.html @@ -0,0 +1,976 @@ + + + + + +I2cDevice + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface I2cDevice

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          enableI2cReadMode

          +
          void enableI2cReadMode(I2cAddr i2cAddr,
          +                       int register,
          +                       int count)
          +
          Enable read mode for this I2C device. This simply sets bytes in the header of the write-cache; + it does not enqueue or transmit any data.
          +
          +
          Parameters:
          +
          i2cAddr - the address of the device on the I2c bus which should be read
          +
          register - I2c register number within the device at which to start reading
          +
          count - number of bytes to read
          +
          See Also:
          +
          writeI2cCacheToController()
          +
          +
        • +
        + + + +
          +
        • +

          enableI2cWriteMode

          +
          void enableI2cWriteMode(I2cAddr i2cAddr,
          +                        int register,
          +                        int count)
          +
          Enable write mode for this I2C device. This simply sets bytes in the header of the write-cache; + it does not enqueue or transmit any data.
          +
          +
          Parameters:
          +
          i2cAddr - the address of the device on the I2c bus which should be written
          +
          register - mem address at which to start writing
          +
          count - number of bytes to write
          +
          See Also:
          +
          writeI2cCacheToController()
          +
          +
        • +
        + + + +
          +
        • +

          isI2cPortInReadMode

          +
          boolean isI2cPortInReadMode()
          +
          Queries whether or not the controller has reported that it is in read mode.
          +
          +
          Returns:
          +
          whether or not this port is in read mode
          +
          +
        • +
        + + + +
          +
        • +

          isI2cPortInWriteMode

          +
          boolean isI2cPortInWriteMode()
          +
          Queries whether or not the controller has reported that it is in write mode.
          +
          +
          Returns:
          +
          whether or not this port is in write mode
          +
          +
        • +
        + + + +
          +
        • +

          readI2cCacheFromController

          +
          void readI2cCacheFromController()
          +
          Enqueue a request to the controller to read the range of data from the HW device that + was previously indicated in enableI2cReadMode(I2cAddr, int, int) and subsequently written + to the controller.
          +
        • +
        + + + +
          +
        • +

          writeI2cCacheToController

          +
          void writeI2cCacheToController()
          +
          Enqueue a request to the controller to write the current contents of the write cache + to the HW device.
          +
        • +
        + + + +
          +
        • +

          writeI2cPortFlagOnlyToController

          +
          void writeI2cPortFlagOnlyToController()
          +
          Enqueue a request to the controller to reissue the previous i2c transaction to the HW device.
          +
        • +
        + + + + + + + +
          +
        • +

          isI2cPortActionFlagSet

          +
          @Deprecated
          +boolean isI2cPortActionFlagSet()
          +
          Deprecated. this method returns a value that is rarely that which is expected
          +
          Returns whether the action flag is set in the read cache. This is rarely what is actually + desired by the I2cDevice client; it's use generally should be avoided.
          +
          +
          Returns:
          +
          the value of the action flag in the read cache.
          +
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          getI2cReadCacheTimeWindow

          +
          TimeWindow getI2cReadCacheTimeWindow()
          +
          Returns the time window object into which time stamps are written when the read cache is updated
          +
          +
          Returns:
          +
          the time window object into which time stamps are written when the read cache is updated
          +
          See Also:
          +
          getI2cReadCache()
          +
          +
        • +
        + + + +
          +
        • +

          getI2cReadCacheLock

          +
          java.util.concurrent.locks.Lock getI2cReadCacheLock()
          +
          Returns access to the lock controlling the read-cache. This lock must be held a while + the data accessible from getI2cReadCache() is accessed.
          +
          +
          Returns:
          +
          the lock gating access to the read cache
          +
          +
        • +
        + + + + + + + +
          +
        • +

          getI2cWriteCacheLock

          +
          java.util.concurrent.locks.Lock getI2cWriteCacheLock()
          +
          Returns access to the lock controlling the write-cache. This lock must be held a while + the data accessible from getI2cWriteCache() is accessed
          +
          +
          Returns:
          +
          the lock gating access to the write cache
          +
          +
        • +
        + + + +
          +
        • +

          getCopyOfReadBuffer

          +
          byte[] getCopyOfReadBuffer()
          +
          Atomically returns a copy of that portion of the read-cache which does not include the + initial four-byte header section: that contains the read payload most recently read from + the controller. The read-cache lock need not be held while executing this method.
          +
          +
          Returns:
          +
          a copy of the read payload
          +
          See Also:
          +
          getI2cReadCache()
          +
          +
        • +
        + + + +
          +
        • +

          getCopyOfWriteBuffer

          +
          byte[] getCopyOfWriteBuffer()
          +
          Atomically returns a copy that portion of the write-cache which does not include the + initial four-byte header section. The write-cache lock need not be held to execute this + method.
          +
          +
          Returns:
          +
          a copy of the user-data portion of the write-cache
          +
          See Also:
          +
          getI2cWriteCache()
          +
          +
        • +
        + + + +
          +
        • +

          copyBufferIntoWriteBuffer

          +
          void copyBufferIntoWriteBuffer(byte[] buffer)
          +
          Atomically copies the provided buffer into the user portion of the write cache, beginning + immediately following the four-byte header. The write-cache lock need not be held to execute this + method.
          +
          +
          Parameters:
          +
          buffer - the data to copy into the write cache
          +
          See Also:
          +
          getI2cWriteCache()
          +
          +
        • +
        + + + +
          +
        • +

          getMaxI2cWriteLatency

          +
          int getMaxI2cWriteLatency()
          +
          Returns the maximum interval, in milliseconds, from when the controller receives an I2c write + transmission over USB to when that write is actually issued to the I2c device.
          +
          +
          Returns:
          +
          the maximum interval, in milliseconds, from when the controller receives an I2c write + transmission over USB to when that write is actually issued to the I2c device.
          +
          +
        • +
        + + + + + + + + + + + + + + + +
          +
        • +

          getCallbackCount

          +
          int getCallbackCount()
          +
          Returns the number of callbacks ever experienced by this I2cDevice instance, whether or not + they were ever seen by a registered callback. This method is mostly useful for debugging and + gathering of statistics.
          +
          +
          Returns:
          +
          the number of port-is-ready callbacks ever experienced by this I2cDevice instance
          +
          +
        • +
        + + + +
          +
        • +

          isI2cPortReady

          +
          boolean isI2cPortReady()
          +
          Returns whether the I2cDevice instance has experienced a callback since the last issuance + of work to the controller. It is difficult to use this method effectively; in most + circumstances, one is better off registering a portIsReady() + callback and putting your processing logic there. Inside the callback, the port is, by definition, ready. + Alternately, consider using the I2cDeviceSynch interface instead.
          +
          +
          Returns:
          +
          whether the port is ready for new work
          +
          See Also:
          +
          I2cDeviceSynch, +registerForI2cPortReadyCallback(I2cController.I2cPortReadyCallback)
          +
          +
        • +
        + + + + + + + + + + + + + + + +
          +
        • +

          isArmed

          +
          boolean isArmed()
          +
          Returns whether, as of this instant, this I2cDevice is alive and operational in + its normally expected mode; that is, whether it is currently in communication + with its underlying hardware or whether it is in some other state
          +
          +
          Returns:
          +
          the arming status of this I2cDevice
          +
          +
        • +
        + + + + + + + +
          +
        • +

          readI2cCacheFromModule

          +
          @Deprecated
          +void readI2cCacheFromModule()
          +
          Deprecated. Use of readI2cCacheFromController() is suggested instead
          +
        • +
        + + + +
          +
        • +

          writeI2cCacheToModule

          +
          @Deprecated
          +void writeI2cCacheToModule()
          +
          Deprecated. Use of writeI2cCacheToController() is suggested instead
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceImpl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceImpl.html new file mode 100644 index 00000000000..7b27c38a0fc --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceImpl.html @@ -0,0 +1,1331 @@ + + + + + +I2cDeviceImpl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cDeviceImpl

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceReader.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceReader.html new file mode 100644 index 00000000000..8fb4912d0a6 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceReader.html @@ -0,0 +1,292 @@ + + + + + +I2cDeviceReader + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cDeviceReader

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.I2cDeviceReader
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class I2cDeviceReader
      +extends java.lang.Object
      +
      Monitor an I2C Device and read in the most current values
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        I2cDeviceReader(I2cDevice i2cDevice, + I2cAddr i2cAddress, + int memAddress, + int length) +
        Constructor
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        byte[]getReadBuffer() +
        Get a copy of the most recent data read in from the I2C device
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          I2cDeviceReader

          +
          public I2cDeviceReader(I2cDevice i2cDevice,
          +                       I2cAddr i2cAddress,
          +                       int memAddress,
          +                       int length)
          +
          Constructor
          +
          +
          Parameters:
          +
          i2cDevice - device to monitor
          +
          i2cAddress - I2C address to read from
          +
          memAddress - memory address to read from
          +
          length - length (in bytes) to read
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getReadBuffer

          +
          public byte[] getReadBuffer()
          +
          Get a copy of the most recent data read in from the I2C device
          +
          +
          Returns:
          +
          byte array
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynch.HeartbeatAction.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynch.HeartbeatAction.html new file mode 100644 index 00000000000..9b83ae2506d --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynch.HeartbeatAction.html @@ -0,0 +1,321 @@ + + + + + +I2cDeviceSynch.HeartbeatAction + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cDeviceSynch.HeartbeatAction

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.I2cDeviceSynch.HeartbeatAction
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing interface:
      +
      I2cDeviceSynch
      +
      +
      +
      +
      public static class I2cDeviceSynch.HeartbeatAction
      +extends java.lang.Object
      +
      Instances of HeartBeatAction indicate what action to carry out to perform + a heartbeat should that become necessary. The actual action to take is indicated + by one of several prioritized possibilities. When a heartbeat is needed, these + are considered in order, and the first one applicable given the state of the + I2C device at the time will be applied.
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        HeartbeatAction(boolean rereadLastRead, + boolean rewriteLastWritten, + I2cDeviceSynch.ReadWindow readWindow) +
        instantiates a new HeartbeatAction.
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          rereadLastRead

          +
          public final boolean rereadLastRead
          +
          Priority #1: re-issue the last I2C read operation, if possible.
          +
        • +
        + + + +
          +
        • +

          rewriteLastWritten

          +
          public final boolean rewriteLastWritten
          +
          Priority #2: re-issue the last I2C write operation, if possible.
          +
        • +
        + + + +
          +
        • +

          heartbeatReadWindow

          +
          public final I2cDeviceSynch.ReadWindow heartbeatReadWindow
          +
          Priority #3: explicitly read a given register window
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          HeartbeatAction

          +
          public HeartbeatAction(boolean rereadLastRead,
          +                       boolean rewriteLastWritten,
          +                       I2cDeviceSynch.ReadWindow readWindow)
          +
          instantiates a new HeartbeatAction.
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynch.ReadMode.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynch.ReadMode.html new file mode 100644 index 00000000000..e76c29d6c40 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynch.ReadMode.html @@ -0,0 +1,382 @@ + + + + + +I2cDeviceSynch.ReadMode + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum I2cDeviceSynch.ReadMode

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<I2cDeviceSynch.ReadMode>
      +
      +
      +
      Enclosing interface:
      +
      I2cDeviceSynch
      +
      +
      +
      +
      public static enum I2cDeviceSynch.ReadMode
      +extends java.lang.Enum<I2cDeviceSynch.ReadMode>
      +
      I2cDeviceSynch.ReadMode controls whether when asked to read we read only once or read multiple times. + + In all modes, it is guaranteed that a read() which follows a write() operation will + see the state of the device after the write has had effect.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        BALANCED +
        Continuously issue I2C reads as in REPEAT when we can, but do not automatically + transition back to read-mode following a write operation in order to do so.
        +
        ONLY_ONCE +
        Only issue a single I2C read, then set the read window to null to disable further reads.
        +
        REPEAT +
        Continuously issue I2C reads whenever there's nothing else needing to be done.
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static I2cDeviceSynch.ReadModevalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static I2cDeviceSynch.ReadMode[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Detail

        + + + +
          +
        • +

          REPEAT

          +
          public static final I2cDeviceSynch.ReadMode REPEAT
          +
          Continuously issue I2C reads whenever there's nothing else needing to be done. + In this mode, read() will not necessarily execute an I2C transaction + for every call but might instead return data previously read from the I2C device. + This mode is most useful in a device that spends most of its time doing read operations + and only very infrequently writes, if ever.
          +
          +
          See Also:
          +
          I2cDeviceSynchSimple.read(int, int)
          +
          +
        • +
        + + + +
          +
        • +

          BALANCED

          +
          public static final I2cDeviceSynch.ReadMode BALANCED
          +
          Continuously issue I2C reads as in REPEAT when we can, but do not automatically + transition back to read-mode following a write operation in order to do so. This mode is + most useful in a device which has a balanced mix of read() and write() operations, such + as a motor controller. Like REPEAT, this mode might return data that was + previously read a short while ago.
          +
        • +
        + + + +
          +
        • +

          ONLY_ONCE

          +
          public static final I2cDeviceSynch.ReadMode ONLY_ONCE
          +
          Only issue a single I2C read, then set the read window to null to disable further reads. + Executing a read() in this mode will always get fresh data + from the I2C device.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static I2cDeviceSynch.ReadMode[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (I2cDeviceSynch.ReadMode c : I2cDeviceSynch.ReadMode.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static I2cDeviceSynch.ReadMode valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynch.ReadWindow.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynch.ReadWindow.html new file mode 100644 index 00000000000..3968d40bb25 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynch.ReadWindow.html @@ -0,0 +1,615 @@ + + + + + +I2cDeviceSynch.ReadWindow + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cDeviceSynch.ReadWindow

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing interface:
      +
      I2cDeviceSynch
      +
      +
      +
      +
      public static class I2cDeviceSynch.ReadWindow
      +extends java.lang.Object
      +
      RegWindow is a utility class for managing the window of I2C register bytes that + are read from our I2C device on every hardware cycle
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        static intREAD_REGISTER_COUNT_MAX +
        enableI2cReadMode and enableI2cWriteMode both impose a maximum length + on the size of data that can be read or written at one time.
        +
        static intWRITE_REGISTER_COUNT_MAX 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        ReadWindow(int iregFirst, + int creg, + I2cDeviceSynch.ReadMode readMode) +
        Create a new register window with the indicated starting register and register count
        +
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          ReadWindow

          +
          public ReadWindow(int iregFirst,
          +                  int creg,
          +                  I2cDeviceSynch.ReadMode readMode)
          +
          Create a new register window with the indicated starting register and register count
          +
          +
          Parameters:
          +
          iregFirst - the index of the first register to read
          +
          creg - the number of registers to read
          +
          readMode - whether to repeat-read or read only once
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getRegisterFirst

          +
          public int getRegisterFirst()
          +
          Returns the first register in the window
          +
          +
          Returns:
          +
          the first register in the window
          +
          +
        • +
        + + + +
          +
        • +

          getRegisterMax

          +
          public int getRegisterMax()
          +
          Returns the first register NOT in the window
          +
          +
          Returns:
          +
          the first register NOT in the window
          +
          +
        • +
        + + + +
          +
        • +

          getRegisterCount

          +
          public int getRegisterCount()
          +
          Returns the number of registers in the window
          +
          +
          Returns:
          +
          the number of registers in the window
          +
          +
        • +
        + + + +
          +
        • +

          getReadMode

          +
          public I2cDeviceSynch.ReadMode getReadMode()
          +
          Returns the mode of the window
          +
          +
          Returns:
          +
          the mode of the window
          +
          +
        • +
        + + + +
          +
        • +

          hasWindowBeenUsedForRead

          +
          public boolean hasWindowBeenUsedForRead()
          +
          Returns whether a read has ever been issued for this window or not
          +
          +
          Returns:
          +
          whether a read has ever been issued for this window or not
          +
          +
        • +
        + + + +
          +
        • +

          noteWindowUsedForRead

          +
          public void noteWindowUsedForRead()
          +
          Sets that a read has in fact been issued for this window
          +
        • +
        + + + +
          +
        • +

          canBeUsedToRead

          +
          public boolean canBeUsedToRead()
          +
          Answers as to whether we're allowed to read using this window. This will return + false for ONLY_ONCE windows after noteWindowUsedForRead() has been called on them.
          +
          +
          Returns:
          +
          whether it is permitted to perform a read for this window.
          +
          +
        • +
        + + + +
          +
        • +

          mayInitiateSwitchToReadMode

          +
          public boolean mayInitiateSwitchToReadMode()
          +
          Answers as to whether this window in its present state ought to cause a transition + to read-mode when there's nothing else for the device to be doing.
          +
          +
          Returns:
          +
          whether this device should cause a read mode transition
          +
          +
        • +
        + + + +
          +
        • +

          readableCopy

          +
          public I2cDeviceSynch.ReadWindow readableCopy()
          +
          Returns a copy of this window but with the usedForRead flag clear
          +
          +
          Returns:
          +
          a fresh copy of the window into which data can actually be read.
          +
          +
        • +
        + + + +
          +
        • +

          sameAsIncludingMode

          +
          public boolean sameAsIncludingMode(I2cDeviceSynch.ReadWindow him)
          +
          Do the receiver and the indicated register window cover exactly the + same set of registers and have the same modality?
          +
          +
          Parameters:
          +
          him - the other window to compare to
          +
          Returns:
          +
          the result of the comparison
          +
          +
        • +
        + + + +
          +
        • +

          contains

          +
          public boolean contains(I2cDeviceSynch.ReadWindow him)
          +
          Answers as to whether the receiver wholly contains the indicated window.
          +
          +
          Parameters:
          +
          him - the window we wish to see whether we contain
          +
          Returns:
          +
          whether or not we contain the window
          +
          See Also:
          +
          contains(int, int)
          +
          +
        • +
        + + + +
          +
        • +

          containsWithSameMode

          +
          public boolean containsWithSameMode(I2cDeviceSynch.ReadWindow him)
          +
          Answers as to whether the receiver wholly contains the indicated window + and also has the same modality.
          +
          +
          Parameters:
          +
          him - the window we wish to see whether we contain
          +
          Returns:
          +
          whether or not we contain the window
          +
          +
        • +
        + + + +
          +
        • +

          contains

          +
          public boolean contains(int ireg,
          +                        int creg)
          +
          Answers as to whether the receiver wholly contains the indicated set of registers.
          +
          +
          Parameters:
          +
          ireg - the first register of interest
          +
          creg - the number of registers of interest
          +
          Returns:
          +
          whether or not the receiver contains this set of registers
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynch.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynch.html new file mode 100644 index 00000000000..a66d74bec0e --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynch.html @@ -0,0 +1,584 @@ + + + + + +I2cDeviceSynch + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface I2cDeviceSynch

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      Engagable, HardwareDevice, HardwareDeviceHealth, I2cAddrConfig, I2cAddressableDevice, I2cDeviceSynchSimple, RobotConfigNameable
      +
      +
      +
      All Known Implementing Classes:
      +
      I2cDeviceSynchImpl, I2cDeviceSynchImplOnSimple
      +
      +
      +
      +
      public interface I2cDeviceSynch
      +extends I2cDeviceSynchSimple, Engagable
      +
      I2cDeviceSynch is an interface that exposes functionality for interacting with I2c + devices. Its methods are synchronous, in that they complete their action before returning to the + caller. + +

      Methods are provided to read and write data simply and straightforwardly. Singleton bytes + or larger quantities of data can be read or written using read8() and + write8() or read() and write() + respectively. No attention to 'read mode' or 'write mode' is required. Simply call reads + and writes as you need them, and the right thing happens. + +

      For devices that automatically shutdown if no communication is received within a certain + duration, a heartbeat facility is optionally provided.

      + +

      On causality: regarding the sequencing of reads and writes, two important points are + worthy of mention. First, reads and writes are ultimately issued to the controller in the same + chronological order they were received by the device client instance. Second, even more + importantly, reads *always* see the effect of preceding writes on the controller. That is, + a read that follows a write will ensure that, first, the write gets issued to the controller, and + then, second, a read from the controller is subsequently issued. By contrast, absent such + constraints, a read might quickly return freshly-read data already present without having to + interact with the controller. Which brings us to...

      + +

      Reading data. The simplest way to read data is to call one of the variations of the + read() method. This is always correct, and will return data as accessed + from the I2c device. However, in many situations, reads can be significantly optimized by use + of a read window. With a read window, a larger chunk of the device's I2c register space + can be automatically read even if only a portion of it is needed to service a particular read() + call; this can make subsequent read()s significantly faster. Further, depending on the mode + of ReadWindow used, read + operations will occur in the background, and read()s will be serviced (subject to causality) out + of cached data updated and maintained by the background processing without any synchronous + communication with the I2c device itself. For sensors in particular, this mode of operation + can be particularly advantageous.

      + +

      Three modes of ReadWindow are + available:

      +
        +
      1. REPEAT. In this + mode, background reads are always scheduled and cached data updated whenever there's no other + (writing) work to do. This is the mode commonly used by sensors, who mostly execute reads + and only issue a write relatively infrequently.
      2. +
      3. BALANCED. In this + mode, background reads are also performed, but only if the user initiates a manual read first after + a write operation. The object does not automatically start background reads on its own, as the + transition from writing to reading can be a relatively expensive one. This mode can be useful + for objects like motor and servo controllers which exhibit a balanced mix of both write and + read operations
      4. +
      5. ONLY_ONCE. In this + mode, no background reading is performed; data is always retrieved with a synchronous + communication to the i2c device.
      6. +
      + +

      An I2cDeviceSynch has only one read window in effect at any particular time. This can + be updated with setReadWindow(ReadWindow) or ensureReadWindow(). + When a read() is made, if the registers requested therein are contained within the current + read window, then that whole window of data is read from the i2c device (if the cache is out + of date) and the appropriate portion thereof returned. In contrast, if the requested registers + are not so contained, then, in effect, a one-off ONLY_ONCE + is used without disturbing the window maintained by setReadWindow(ReadWindow). +

      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setReadWindow

          +
          void setReadWindow(I2cDeviceSynch.ReadWindow window)
          +
          Set the set of registers that we will read and read and read again on every hardware cycle
          +
          +
          Parameters:
          +
          window - the register window to read. May be null, indicating that no reads are to occur.
          +
          See Also:
          +
          getReadWindow()
          +
          +
        • +
        + + + + + + + +
          +
        • +

          ensureReadWindow

          +
          void ensureReadWindow(I2cDeviceSynch.ReadWindow windowNeeded,
          +                      I2cDeviceSynch.ReadWindow windowToSet)
          +
          Ensure that the current register window covers the indicated set of registers. + + If there is currently a non-null register window, and windowNeeded is non-null, + and the current register window entirely contains windowNeeded, then do nothing. + Otherwise, set the current register window to windowToSet.
          +
          +
          Parameters:
          +
          windowNeeded - Test the current register window, if any, against this window + to see if an update to the current register window is needed in + order to cover it. May be null, indicating that an update to the + current register window is always needed
          +
          windowToSet - If an update to the current register window is needed, then this + is the window to which it will be set. May be null.
          +
          See Also:
          +
          setReadWindow(ReadWindow), +I2cDeviceSynchSimple.read8(int)
          +
          +
        • +
        + + + +
          +
        • +

          readTimeStamped

          +
          TimestampedData readTimeStamped(int ireg,
          +                                int creg,
          +                                I2cDeviceSynch.ReadWindow readWindowNeeded,
          +                                I2cDeviceSynch.ReadWindow readWindowSet)
          +
          Advanced: Atomically calls ensureReadWindow() with the last two parameters and then + readTimeStamped() with the first two without the possibility of a concurrent client + interrupting in the middle.
          +
          +
          Parameters:
          +
          ireg - the register number of the first byte register to read
          +
          creg - the number of bytes / registers to read
          +
          readWindowNeeded - the read window we require
          +
          readWindowSet - the read window to set if the required read window is not current
          +
          Returns:
          +
          the data that was read, together with the timestamp
          +
          See Also:
          +
          ensureReadWindow(ReadWindow, ReadWindow), +I2cDeviceSynchSimple.readTimeStamped(int, int)
          +
          +
        • +
        + + + +
          +
        • +

          setHeartbeatInterval

          +
          void setHeartbeatInterval(int ms)
          +
          Sets the interval within which communication must be received by the I2C device lest + a timeout may occur. The default heartbeat interval is zero, signifying that no heartbeat + is maintained.
          +
          +
          Parameters:
          +
          ms - the new hearbeat interval, in milliseconds
          +
          See Also:
          +
          getHeartbeatInterval()
          +
          +
        • +
        + + + +
          +
        • +

          getHeartbeatInterval

          +
          int getHeartbeatInterval()
          +
          Returns the interval within which communication must be received by the I2C device lest + a timeout occur.
          +
          +
          Returns:
          +
          the current heartbeat interval, in milliseconds
          +
          See Also:
          +
          setHeartbeatInterval(int)
          +
          +
        • +
        + + + +
          +
        • +

          setHeartbeatAction

          +
          void setHeartbeatAction(I2cDeviceSynch.HeartbeatAction action)
          +
          Sets the action to take when the current heartbeat interval expires. + The default action is null; thus, to be useful, an action must always + be explicitly specified.
          +
          +
          Parameters:
          +
          action - the action to take at each heartbeat.
          +
          See Also:
          +
          getHeartbeatAction(), +setHeartbeatInterval(int)
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchDevice.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchDevice.html new file mode 100644 index 00000000000..2099725b495 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchDevice.html @@ -0,0 +1,559 @@ + + + + + +I2cDeviceSynchDevice + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cDeviceSynchDevice<DEVICE_CLIENT extends I2cDeviceSynchSimple>

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice<DEVICE_CLIENT>
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          deviceClientIsOwned

          +
          protected boolean deviceClientIsOwned
          +
        • +
        + + + +
          +
        • +

          isInitialized

          +
          protected boolean isInitialized
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + + + +
          +
        • +

          I2cDeviceSynchDevice

          +
          protected I2cDeviceSynchDevice(DEVICE_CLIENT deviceClient,
          +                               boolean deviceClientIsOwned)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          registerArmingStateCallback

          +
          protected void registerArmingStateCallback(boolean doInitialCallback)
          +
        • +
        + + + +
          +
        • +

          engage

          +
          protected void engage()
          +
        • +
        + + + +
          +
        • +

          disengage

          +
          protected void disengage()
          +
        • +
        + + + +
          +
        • +

          getDeviceClient

          +
          public DEVICE_CLIENT getDeviceClient()
          +
        • +
        + + + +
          +
        • +

          onModuleStateChange

          +
          public void onModuleStateChange(RobotArmingStateNotifier module,
          +                                RobotArmingStateNotifier.ARMINGSTATE state)
          +
        • +
        + + + +
          +
        • +

          initializeIfNecessary

          +
          protected void initializeIfNecessary()
          +
        • +
        + + + +
          +
        • +

          initialize

          +
          public boolean initialize()
          +
        • +
        + + + +
          +
        • +

          doInitialize

          +
          protected abstract boolean doInitialize()
          +
          Actually carries out the initialization of the instance.
          +
          +
          Returns:
          +
          Whether the initialization was successful or not
          +
          +
        • +
        + + + +
          +
        • +

          resetDeviceConfigurationForOpMode

          +
          public void resetDeviceConfigurationForOpMode()
          +
          Description copied from interface: HardwareDevice
          +
          Resets the device's configuration to that which is expected at the beginning of an OpMode. + For example, motors will reset the their direction to 'forward'.
          +
          +
          Specified by:
          +
          resetDeviceConfigurationForOpMode in interface HardwareDevice
          +
          +
        • +
        + + + + + + + +
          +
        • +

          getVersion

          +
          public int getVersion()
          +
          Description copied from interface: HardwareDevice
          +
          Version
          +
          +
          Specified by:
          +
          getVersion in interface HardwareDevice
          +
          Returns:
          +
          get the version of this device
          +
          +
        • +
        + + + +
          +
        • +

          getConnectionInfo

          +
          public java.lang.String getConnectionInfo()
          +
          Description copied from interface: HardwareDevice
          +
          Get connection information about this device in a human readable format
          +
          +
          Specified by:
          +
          getConnectionInfo in interface HardwareDevice
          +
          Returns:
          +
          connection info
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchDeviceWithParameters.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchDeviceWithParameters.html new file mode 100644 index 00000000000..1f46cdfd2ce --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchDeviceWithParameters.html @@ -0,0 +1,439 @@ + + + + + +I2cDeviceSynchDeviceWithParameters + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cDeviceSynchDeviceWithParameters<DEVICE_CLIENT extends I2cDeviceSynchSimple,PARAMETERS>

    +
    +
    + +
    + +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + + + +
          +
        • +

          I2cDeviceSynchDeviceWithParameters

          +
          protected I2cDeviceSynchDeviceWithParameters(DEVICE_CLIENT deviceClient,
          +                                             boolean isOwned,
          +                                             PARAMETERS parameters)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getParameters

          +
          public PARAMETERS getParameters()
          +
          Returns the parameter block currently in use for this sensor
          +
          +
          Returns:
          +
          the parameter block currently in use for this sensor
          +
          +
        • +
        + + + + + + + + + +
          +
        • +

          initialize

          +
          public boolean initialize(PARAMETERS parameters)
          +
          Allows for external initialization with non-default parameters
          +
          +
          Parameters:
          +
          parameters - the parameters with which the sensor should be initialized
          +
          Returns:
          +
          whether the initialization was successful or not.
          +
          +
        • +
        + + + + + +
          +
        • +

          internalInitialize

          +
          protected abstract boolean internalInitialize(PARAMETERS parameters)
          +
          Actually attempts to carry out initialization with the indicated parameter block. + If successful, said parameter block should be stored in the parameters + member variable.
          +
          +
          Parameters:
          +
          parameters - the parameter block with which to initialize
          +
          Returns:
          +
          whether initialization was successful or not
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.CONTROLLER_PORT_MODE.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.CONTROLLER_PORT_MODE.html new file mode 100644 index 00000000000..1b02f6f39e2 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.CONTROLLER_PORT_MODE.html @@ -0,0 +1,366 @@ + + + + + +I2cDeviceSynchImpl.CONTROLLER_PORT_MODE + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum I2cDeviceSynchImpl.CONTROLLER_PORT_MODE

    +
    +
    + +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static I2cDeviceSynchImpl.CONTROLLER_PORT_MODEvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static I2cDeviceSynchImpl.CONTROLLER_PORT_MODE[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static I2cDeviceSynchImpl.CONTROLLER_PORT_MODE[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (I2cDeviceSynchImpl.CONTROLLER_PORT_MODE c : I2cDeviceSynchImpl.CONTROLLER_PORT_MODE.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static I2cDeviceSynchImpl.CONTROLLER_PORT_MODE valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.Callback.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.Callback.html new file mode 100644 index 00000000000..d96ca6ab8d5 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.Callback.html @@ -0,0 +1,537 @@ + + + + + +I2cDeviceSynchImpl.Callback + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cDeviceSynchImpl.Callback

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          setActionFlag

          +
          protected boolean setActionFlag
          +
        • +
        + + + +
          +
        • +

          queueFullWrite

          +
          protected boolean queueFullWrite
          +
        • +
        + + + +
          +
        • +

          queueRead

          +
          protected boolean queueRead
          +
        • +
        + + + +
          +
        • +

          heartbeatRequired

          +
          protected boolean heartbeatRequired
          +
        • +
        + + + +
          +
        • +

          enabledReadMode

          +
          protected boolean enabledReadMode
          +
        • +
        + + + +
          +
        • +

          enabledWriteMode

          +
          protected boolean enabledWriteMode
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          doModuleIsArmedWorkEnabledWrites

          +
          protected boolean doModuleIsArmedWorkEnabledWrites
          +
        • +
        + + + +
          +
        • +

          haveSeenModuleIsArmedWork

          +
          protected boolean haveSeenModuleIsArmedWork
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Callback

          +
          protected Callback()
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.READ_CACHE_STATUS.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.READ_CACHE_STATUS.html new file mode 100644 index 00000000000..13cc23baef6 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.READ_CACHE_STATUS.html @@ -0,0 +1,390 @@ + + + + + +I2cDeviceSynchImpl.READ_CACHE_STATUS + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum I2cDeviceSynchImpl.READ_CACHE_STATUS

    +
    +
    + +
    + +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static I2cDeviceSynchImpl.READ_CACHE_STATUS[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (I2cDeviceSynchImpl.READ_CACHE_STATUS c : I2cDeviceSynchImpl.READ_CACHE_STATUS.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static I2cDeviceSynchImpl.READ_CACHE_STATUS valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.WRITE_CACHE_STATUS.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.WRITE_CACHE_STATUS.html new file mode 100644 index 00000000000..2e7d2092be7 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.WRITE_CACHE_STATUS.html @@ -0,0 +1,354 @@ + + + + + +I2cDeviceSynchImpl.WRITE_CACHE_STATUS + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum I2cDeviceSynchImpl.WRITE_CACHE_STATUS

    +
    +
    + +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        DIRTY 
        IDLE 
        QUEUED 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static I2cDeviceSynchImpl.WRITE_CACHE_STATUSvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static I2cDeviceSynchImpl.WRITE_CACHE_STATUS[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static I2cDeviceSynchImpl.WRITE_CACHE_STATUS[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (I2cDeviceSynchImpl.WRITE_CACHE_STATUS c : I2cDeviceSynchImpl.WRITE_CACHE_STATUS.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static I2cDeviceSynchImpl.WRITE_CACHE_STATUS valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.WriteCacheStatus.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.WriteCacheStatus.html new file mode 100644 index 00000000000..5a5adff3475 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.WriteCacheStatus.html @@ -0,0 +1,325 @@ + + + + + +I2cDeviceSynchImpl.WriteCacheStatus + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cDeviceSynchImpl.WriteCacheStatus

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.WriteCacheStatus
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      I2cDeviceSynchImpl
      +
      +
      +
      +
      protected class I2cDeviceSynchImpl.WriteCacheStatus
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          WriteCacheStatus

          +
          protected WriteCacheStatus()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + + + + + + + + + + + + + +
          +
        • +

          waitForIdle

          +
          public long waitForIdle()
          +                 throws java.lang.InterruptedException
          +
          Waits for the write cache to become idle. But that doesn't come within a totally unreasonable + amount of time, we're going to assume that our ReadWriteRunnable thread is either stuck or + is dead, and we're going to get out of here.
          +
          +
          Returns:
          +
          the time on the nanotime clock clock at which the idle transition occurred
          +
          Throws:
          +
          java.lang.InterruptedException
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.html new file mode 100644 index 00000000000..1525fb3c7d1 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImpl.html @@ -0,0 +1,2423 @@ + + + + + +I2cDeviceSynchImpl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cDeviceSynchImpl

    +
    +
    + +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          i2cAddr

          +
          protected I2cAddr i2cAddr
          +
        • +
        + + + +
          +
        • +

          i2cDevice

          +
          protected I2cDevice i2cDevice
          +
        • +
        + + + +
          +
        • +

          isI2cDeviceOwned

          +
          protected boolean isI2cDeviceOwned
          +
        • +
        + + + + + + + +
          +
        • +

          isControllerLegacy

          +
          protected boolean isControllerLegacy
          +
        • +
        + + + + + + + +
          +
        • +

          robotUsbModule

          +
          protected RobotUsbModule robotUsbModule
          +
        • +
        + + + +
          +
        • +

          isHooked

          +
          protected boolean isHooked
          +
        • +
        + + + +
          +
        • +

          isEngaged

          +
          protected boolean isEngaged
          +
        • +
        + + + +
          +
        • +

          readerWriterPreventionCount

          +
          protected java.util.concurrent.atomic.AtomicInteger readerWriterPreventionCount
          +
        • +
        + + + +
          +
        • +

          readerWriterGate

          +
          protected java.util.concurrent.locks.ReadWriteLock readerWriterGate
          +
        • +
        + + + +
          +
        • +

          readerWriterCount

          +
          protected java.util.concurrent.atomic.AtomicInteger readerWriterCount
          +
        • +
        + + + +
          +
        • +

          isClosing

          +
          protected boolean isClosing
          +
        • +
        + + + + + + + +
          +
        • +

          loggingEnabled

          +
          protected boolean loggingEnabled
          +
        • +
        + + + +
          +
        • +

          loggingTag

          +
          protected java.lang.String loggingTag
          +
        • +
        + + + +
          +
        • +

          name

          +
          protected java.lang.String name
          +
        • +
        + + + +
          +
        • +

          timeSinceLastHeartbeat

          +
          protected ElapsedTime timeSinceLastHeartbeat
          +
        • +
        + + + +
          +
        • +

          readCacheTimeWindow

          +
          protected TimeWindow readCacheTimeWindow
          +
        • +
        + + + +
          +
        • +

          readCache

          +
          protected byte[] readCache
          +
        • +
        + + + +
          +
        • +

          writeCache

          +
          protected byte[] writeCache
          +
        • +
        + + + +
          +
        • +

          dibCacheOverhead

          +
          protected static final int dibCacheOverhead
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          readCacheLock

          +
          protected java.util.concurrent.locks.Lock readCacheLock
          +
        • +
        + + + +
          +
        • +

          writeCacheLock

          +
          protected java.util.concurrent.locks.Lock writeCacheLock
          +
        • +
        + + + +
          +
        • +

          msCallbackLockWaitQuantum

          +
          protected static final int msCallbackLockWaitQuantum
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          msCallbackLockAbandon

          +
          protected static final int msCallbackLockAbandon
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          isWriteCoalescingEnabled

          +
          protected boolean isWriteCoalescingEnabled
          +
        • +
        + + + +
          +
        • +

          engagementLock

          +
          protected final java.lang.Object engagementLock
          +
        • +
        + + + +
          +
        • +

          concurrentClientLock

          +
          protected final java.lang.Object concurrentClientLock
          +
        • +
        + + + +
          +
        • +

          callbackLock

          +
          protected final java.lang.Object callbackLock
          +
        • +
        + + + +
          +
        • +

          disableReadWindows

          +
          protected boolean disableReadWindows
          +
        • +
        + + + + + + + + + + + + + + + +
          +
        • +

          isReadWindowSentToControllerInitialized

          +
          protected volatile boolean isReadWindowSentToControllerInitialized
          +
        • +
        + + + +
          +
        • +

          hasReadWindowChanged

          +
          protected volatile boolean hasReadWindowChanged
          +
        • +
        + + + +
          +
        • +

          nanoTimeReadCacheValid

          +
          protected volatile long nanoTimeReadCacheValid
          +
        • +
        + + + + + + + + + + + + + + + +
          +
        • +

          iregWriteFirst

          +
          protected volatile int iregWriteFirst
          +
        • +
        + + + +
          +
        • +

          cregWrite

          +
          protected volatile int cregWrite
          +
        • +
        + + + +
          +
        • +

          msHeartbeatInterval

          +
          protected volatile int msHeartbeatInterval
          +
        • +
        + + + + + + + +
          +
        • +

          heartbeatExecutor

          +
          protected volatile java.util.concurrent.ExecutorService heartbeatExecutor
          +
        • +
        +
      • +
      + + + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImplOnSimple.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImplOnSimple.html new file mode 100644 index 00000000000..cd3775c5800 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchImplOnSimple.html @@ -0,0 +1,1768 @@ + + + + + +I2cDeviceSynchImplOnSimple + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cDeviceSynchImplOnSimple

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchReadHistory.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchReadHistory.html new file mode 100644 index 00000000000..6745f1ea91c --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchReadHistory.html @@ -0,0 +1,303 @@ + + + + + +I2cDeviceSynchReadHistory + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface I2cDeviceSynchReadHistory

    +
    +
    +
    +
      +
    • +
      +
      All Known Implementing Classes:
      +
      I2cDeviceSynchImpl, I2cDeviceSynchImplOnSimple, I2cDeviceSynchReadHistoryImpl
      +
      +
      +
      +
      public interface I2cDeviceSynchReadHistory
      +
      I2cDeviceSynchReadHistory provides a means by which one can be guaranteed + to be informed of all data read by through an I2cDeviceSynch. This is + provided by means of a queue into which all data retrieved is (optionally) be stored. + +

      This functionality can be useful in I2c devices in which the mere act of reading data causes + state transitions in the actual device itself. For such devices, the history queue can (e.g.) + assist the software driver layer for the device in reliably tracking the device state.

      + +

      Implementations of I2cDeviceSynchReadHistory are commonly retrieved by casting from + an implementation of I2cDeviceSynch or I2cDeviceSynchSimple (but don't forget + to first test using instanceOf).

      +
    • +
    +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchReadHistoryImpl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchReadHistoryImpl.html new file mode 100644 index 00000000000..625c05630d0 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchReadHistoryImpl.html @@ -0,0 +1,433 @@ + + + + + +I2cDeviceSynchReadHistoryImpl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class I2cDeviceSynchReadHistoryImpl

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.I2cDeviceSynchReadHistoryImpl
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchSimple.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchSimple.html new file mode 100644 index 00000000000..b637bc84260 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cDeviceSynchSimple.html @@ -0,0 +1,715 @@ + + + + + +I2cDeviceSynchSimple + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface I2cDeviceSynchSimple

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + + + + + + + + + +
          +
        • +

          readTimeStamped

          +
          TimestampedData readTimeStamped(int ireg,
          +                                int creg)
          +
          Reads and returns a contiguous set of device I2C registers, together with a best-available + timestamp of when the actual I2C read occurred. Note that this can take many tens of + milliseconds to execute, and thus should not be called from the loop() thread. + +

          You can always just call this method without worrying at all about + read windows, + that will work, but usually it is more efficient to take some thought and care as to what set + of registers the I2C device controller is being set up to read, as adjusting that window + of registers incurs significant extra time.

          + +

          If the current read window can't be used to read the requested registers, then + a new read window will automatically be created as follows. If the current read window is non + null and wholly contains the registers to read but can't be read because it is a used-up + ReadMode#ONLY_ONCE window, + a new read fresh window will be created with the same set of registers. Otherwise, a + window that exactly covers the requested set of registers will be created.

          +
          +
          Parameters:
          +
          ireg - the register number of the first byte register to read
          +
          creg - the number of bytes / registers to read
          +
          Returns:
          +
          the data which was read, together with the timestamp
          +
          See Also:
          +
          read(int, int), +read8(int), +I2cDeviceSynch.ensureReadWindow(I2cDeviceSynch.ReadWindow, I2cDeviceSynch.ReadWindow)
          +
          +
        • +
        + + + +
          +
        • +

          write8

          +
          void write8(int ireg,
          +            int bVal)
          +
          Writes a byte to the indicated register using I2cWaitControl.ATOMIC semantics.
          +
          +
          Parameters:
          +
          ireg - the register number that is to be written
          +
          bVal - the byte which is to be written to that register
          +
          See Also:
          +
          write(int, byte[], I2cWaitControl)
          +
          +
        • +
        + + + +
          +
        • +

          write

          +
          void write(int ireg,
          +           byte[] data)
          +
          Writes data to a set of registers, beginning with the one indicated, using + I2cWaitControl.ATOMIC semantics.
          +
          +
          Parameters:
          +
          ireg - the first of the registers which is to be written
          +
          data - the data which is to be written to the registers
          +
          See Also:
          +
          write(int, byte[], I2cWaitControl)
          +
          +
        • +
        + + + +
          +
        • +

          write8

          +
          void write8(int ireg,
          +            int bVal,
          +            I2cWaitControl waitControl)
          +
          Writes a byte to the indicated register. See also + write(int, byte[], I2cWaitControl).
          +
          +
          Parameters:
          +
          ireg - the register number that is to be written
          +
          bVal - the byte which is to be written to that register
          +
          waitControl - controls the behavior of waiting for the completion of the write
          +
          See Also:
          +
          write(int, byte[], I2cWaitControl)
          +
          +
        • +
        + + + +
          +
        • +

          write

          +
          void write(int ireg,
          +           byte[] data,
          +           I2cWaitControl waitControl)
          +
          Writes data to a set of registers, beginning with the one indicated. The data will be + written to the I2C device in an expeditious manner. Once data is accepted by this API, + it is guaranteed that (barring catastrophic failure) the data will be transmitted to the + USB controller module before the I2cDeviceSync is closed. The call itself may or may block + until the data has been transmitted to the USB controller module according to a caller-provided + parameter.
          +
          +
          Parameters:
          +
          ireg - the first of the registers which is to be written
          +
          data - the data which is to be written to the registers
          +
          waitControl - controls the behavior of waiting for the completion of the write
          +
          +
        • +
        + + + +
          +
        • +

          waitForWriteCompletions

          +
          void waitForWriteCompletions(I2cWaitControl waitControl)
          +
          Waits for the most recent write to complete according to the behavior specified in writeControl.
          +
          +
          Parameters:
          +
          waitControl - controls the behavior of waiting for the completion of the write + Note that a value of I2cWaitControl.NONE is essentially a no-op.
          +
          +
        • +
        + + + +
          +
        • +

          enableWriteCoalescing

          +
          void enableWriteCoalescing(boolean enable)
          +
          Enables or disables an optimization wherein writes to two sets of adjacent register + ranges may be coalesced into a single I2c transaction if the second write comes along + while the first is still queued for writing. By default, write coalescing is disabled.
          +
          +
          Parameters:
          +
          enable - whether to enable write coalescing or not
          +
          See Also:
          +
          isWriteCoalescingEnabled()
          +
          +
        • +
        + + + +
          +
        • +

          isWriteCoalescingEnabled

          +
          boolean isWriteCoalescingEnabled()
          +
          Answers as to whether write coalescing is currently enabled on this device.
          +
          +
          Returns:
          +
          whether write coalescing is currently enabled or not.
          +
          See Also:
          +
          enableWriteCoalescing(boolean)
          +
          +
        • +
        + + + +
          +
        • +

          isArmed

          +
          boolean isArmed()
          +
          Returns whether, as of this instant, this device client is alive and operational in + its normally expected mode; that is, whether it is currently in communication + with its underlying hardware or whether it is in some other state. Note that a device + client which is not engaged will never report as armed.
          +
          +
          Returns:
          +
          the arming state of this device client
          +
          See Also:
          +
          Engagable.engage()
          +
          +
        • +
        + + + +
          +
        • +

          setI2cAddr

          +
          @Deprecated
          +void setI2cAddr(I2cAddr i2cAddr)
          +
          Deprecated. Use I2cAddrConfig.setI2cAddress(I2cAddr) instead.
          +
          Sets the I2C address of the underlying client. If necessary, the client may be briefly + disengaged (and then automatically reengaged) in the process.
          +
          +
          Parameters:
          +
          i2cAddr - the new I2C address
          +
          +
        • +
        + + + +
          +
        • +

          getI2cAddr

          +
          @Deprecated
          +I2cAddr getI2cAddr()
          +
          Deprecated. Use I2cAddressableDevice.getI2cAddress() instead.
          +
          Returns the I2C address currently being used by this device client
          +
          +
          Returns:
          +
          the current I2C address
          +
          +
        • +
        + + + +
          +
        • +

          setLogging

          +
          void setLogging(boolean enabled)
          +
          Turn logging on or off. Logging output can be viewed using the Android Logcat tools.
          +
          +
          Parameters:
          +
          enabled - whether to enable logging or not
          +
          +
        • +
        + + + + + + + +
          +
        • +

          setLoggingTag

          +
          void setLoggingTag(java.lang.String loggingTag)
          +
          Set the tag to use when logging is on.
          +
          +
          Parameters:
          +
          loggingTag - the logging tag to sue
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/I2cWaitControl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cWaitControl.html new file mode 100644 index 00000000000..ffb4f27a6bc --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/I2cWaitControl.html @@ -0,0 +1,369 @@ + + + + + +I2cWaitControl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum I2cWaitControl

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<I2cWaitControl>
      • +
      • +
          +
        • com.qualcomm.robotcore.hardware.I2cWaitControl
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<I2cWaitControl>
      +
      +
      +
      +
      public enum I2cWaitControl
      +extends java.lang.Enum<I2cWaitControl>
      +
      Values in I2cWaitControl control the semantics of waiting on I2c writes
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        ATOMIC +
        The associated write is guaranteed to make it out to the I2c device.
        +
        NONE +
        No write timing control is performed.
        +
        WRITTEN +
        The semantics of ATOMIC with the additional behavior that the wait of the + write call will not return until the data has actually been written to the I2c device.
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static I2cWaitControlvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static I2cWaitControl[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Detail

        + + + +
          +
        • +

          NONE

          +
          public static final I2cWaitControl NONE
          +
          No write timing control is performed. The associated write might not actually + make it out to the I2c device if a subsequent write updates the same locations with + different values.
          +
        • +
        + + + +
          +
        • +

          ATOMIC

          +
          public static final I2cWaitControl ATOMIC
          +
          The associated write is guaranteed to make it out to the I2c device. Thus, two + successive writes in the same location will result in two write transactions to the + device. However, the wait on the write call may return before any write has actually + made it to the I2c device.
          +
        • +
        + + + +
          +
        • +

          WRITTEN

          +
          public static final I2cWaitControl WRITTEN
          +
          The semantics of ATOMIC with the additional behavior that the wait of the + write call will not return until the data has actually been written to the I2c device. + This is useful in situations where a certain quiescent delay is required after a + particular I2c location has been updated.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static I2cWaitControl[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (I2cWaitControl c : I2cWaitControl.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static I2cWaitControl valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/IntegratingGyroscope.html b/doc/javadoc/com/qualcomm/robotcore/hardware/IntegratingGyroscope.html new file mode 100644 index 00000000000..fa1c267c42b --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/IntegratingGyroscope.html @@ -0,0 +1,200 @@ + + + + + +IntegratingGyroscope + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface IntegratingGyroscope

    +
    +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.IrSeekerIndividualSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.IrSeekerIndividualSensor.html new file mode 100644 index 00000000000..fb4f50e42b2 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.IrSeekerIndividualSensor.html @@ -0,0 +1,339 @@ + + + + + +IrSeekerSensor.IrSeekerIndividualSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class IrSeekerSensor.IrSeekerIndividualSensor

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSeekerIndividualSensor
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing interface:
      +
      IrSeekerSensor
      +
      +
      +
      +
      public static class IrSeekerSensor.IrSeekerIndividualSensor
      +extends java.lang.Object
      +
      IR Sensor attached to an IR Seeker +

      + Get the angle of this sensor, along with signal strength

      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        doublegetSensorAngle() +
        Get the angle at which this sensor is mounted
        +
        doublegetSensorStrength() +
        Get the strength of the IR signal detected by this sensor
        +
        java.lang.StringtoString() 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          IrSeekerIndividualSensor

          +
          public IrSeekerIndividualSensor()
          +
          Constructor
          +
        • +
        + + + +
          +
        • +

          IrSeekerIndividualSensor

          +
          public IrSeekerIndividualSensor(double angle,
          +                                double strength)
          +
          Constructor
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getSensorAngle

          +
          public double getSensorAngle()
          +
          Get the angle at which this sensor is mounted
          +
          +
          Returns:
          +
          sensor angle
          +
          +
        • +
        + + + +
          +
        • +

          getSensorStrength

          +
          public double getSensorStrength()
          +
          Get the strength of the IR signal detected by this sensor
          +
          +
          Returns:
          +
          IR strength, scaled from 0 to 1
          +
          +
        • +
        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.Mode.html b/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.Mode.html new file mode 100644 index 00000000000..0f22559bde5 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.Mode.html @@ -0,0 +1,343 @@ + + + + + +IrSeekerSensor.Mode + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum IrSeekerSensor.Mode

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<IrSeekerSensor.Mode>
      • +
      • +
          +
        • com.qualcomm.robotcore.hardware.IrSeekerSensor.Mode
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<IrSeekerSensor.Mode>
      +
      +
      +
      Enclosing interface:
      +
      IrSeekerSensor
      +
      +
      +
      +
      public static enum IrSeekerSensor.Mode
      +extends java.lang.Enum<IrSeekerSensor.Mode>
      +
      Enumeration of device modes
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        MODE_1200HZ 
        MODE_600HZ 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static IrSeekerSensor.ModevalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static IrSeekerSensor.Mode[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static IrSeekerSensor.Mode[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (IrSeekerSensor.Mode c : IrSeekerSensor.Mode.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static IrSeekerSensor.Mode valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.html new file mode 100644 index 00000000000..d7b55a27e99 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/IrSeekerSensor.html @@ -0,0 +1,463 @@ + + + + + +IrSeekerSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface IrSeekerSensor

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice
      +
      +
      +
      +
      public interface IrSeekerSensor
      +extends HardwareDevice
      +
      IR Seeker Sensor +

      + Determine the location of an IR source

      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setSignalDetectedThreshold

          +
          void setSignalDetectedThreshold(double threshold)
          +
          Set the minimum threshold for a signal to be considered detected
          +
          +
          Parameters:
          +
          threshold - minimum threshold
          +
          +
        • +
        + + + +
          +
        • +

          getSignalDetectedThreshold

          +
          double getSignalDetectedThreshold()
          +
          Get the minimum threshold for a signal to be considered detected
          +
          +
          Returns:
          +
          threshold
          +
          +
        • +
        + + + +
          +
        • +

          setMode

          +
          void setMode(IrSeekerSensor.Mode mode)
          +
          Set the device mode
          +
          +
          Parameters:
          +
          mode - sample rate
          +
          +
        • +
        + + + +
          +
        • +

          getMode

          +
          IrSeekerSensor.Mode getMode()
          +
          Get the device mode
          +
          +
          Returns:
          +
          device mode
          +
          +
        • +
        + + + +
          +
        • +

          signalDetected

          +
          boolean signalDetected()
          +
          Returns true if an IR signal is detected
          +
          +
          Returns:
          +
          true if signal is detected; otherwise false
          +
          +
        • +
        + + + +
          +
        • +

          getAngle

          +
          double getAngle()
          +
          Estimated angle in which the signal is coming from +

          + If the signal is estimated to be directly ahead, 0 will be returned. If the signal is to the + left a negative angle will be returned. If the signal is to the right a positive angle will be + returned. If no signal is detected, a 0 will be returned. +

          + NOTE: not all sensors give an accurate angle.

          +
          +
          Returns:
          +
          angle to IR signal
          +
          +
        • +
        + + + +
          +
        • +

          getStrength

          +
          double getStrength()
          +
          IR Signal strength +

          + Detected IR signal strength, on a scale of 0.0 to 1.0, where 0 is no signal detected and 1 is + max IR signal detected.

          +
          +
          Returns:
          +
          signal strength, scaled from 0 to 1
          +
          +
        • +
        + + + +
          +
        • +

          getIndividualSensors

          +
          IrSeekerSensor.IrSeekerIndividualSensor[] getIndividualSensors()
          +
          Get a list of all IR sensors attached to this seeker. The list will include the angle at which + the sensor is mounted, and the signal strength.
          +
          +
          Returns:
          +
          array of IrSensors
          +
          +
        • +
        + + + +
          +
        • +

          setI2cAddress

          +
          void setI2cAddress(I2cAddr newAddress)
          +
          Set the I2C address to a new value.
          +
        • +
        + + + +
          +
        • +

          getI2cAddress

          +
          I2cAddr getI2cAddress()
          +
          Get the current I2C Address of this object. + Not necessarily the same as the I2C address of the actual device. + + Return the current I2C address.
          +
          +
          Returns:
          +
          current I2C address
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/LED.html b/doc/javadoc/com/qualcomm/robotcore/hardware/LED.html new file mode 100644 index 00000000000..82b22656444 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/LED.html @@ -0,0 +1,488 @@ + + + + + +LED + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class LED

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.LED
      • +
      +
    • +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        LED(DigitalChannelController controller, + int physicalPort) +
        Constructor
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        voidclose() +
        Closes this device
        +
        voidenable(boolean set) +
        A method to turn on or turn off the LED
        +
        voidenableLight(boolean enable) +
        Turns the light on or off.
        +
        java.lang.StringgetConnectionInfo() +
        Get connection information about this device in a human readable format
        +
        java.lang.StringgetDeviceName() +
        Returns a string suitable for display to the user as to the type of device.
        +
        HardwareDevice.ManufacturergetManufacturer() +
        Returns an indication of the manufacturer of this device.
        +
        intgetVersion() +
        Version
        +
        booleanisLightOn() +
        Answers whether the light is on or off
        +
        voidresetDeviceConfigurationForOpMode() +
        Resets the device's configuration to that which is expected at the beginning of an OpMode.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          LED

          +
          public LED(DigitalChannelController controller,
          +           int physicalPort)
          +
          Constructor
          +
          +
          Parameters:
          +
          controller - Digital Channel Controller this LED is attached to
          +
          physicalPort - the physical port it's plugged into.
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          enable

          +
          public void enable(boolean set)
          +
          A method to turn on or turn off the LED
          +
          +
          Parameters:
          +
          set - - true turns it on, false turns it off.
          +
          +
        • +
        + + + +
          +
        • +

          isLightOn

          +
          public boolean isLightOn()
          +
          Description copied from interface: Light
          +
          Answers whether the light is on or off
          +
          +
          Specified by:
          +
          isLightOn in interface Light
          +
          Returns:
          +
          whether the light is on or off
          +
          +
        • +
        + + + +
          +
        • +

          enableLight

          +
          public void enableLight(boolean enable)
          +
          Description copied from interface: SwitchableLight
          +
          Turns the light on or off.
          +
          +
          Specified by:
          +
          enableLight in interface SwitchableLight
          +
          Parameters:
          +
          enable - if true, the light turns on; otherwise the light turns off
          +
          +
        • +
        + + + + + + + +
          +
        • +

          getDeviceName

          +
          public java.lang.String getDeviceName()
          +
          Description copied from interface: HardwareDevice
          +
          Returns a string suitable for display to the user as to the type of device. + Note that this is a device-type-specific name; it has nothing to do with the + name by which a user might have configured the device in a robot configuration.
          +
          +
          Specified by:
          +
          getDeviceName in interface HardwareDevice
          +
          Returns:
          +
          device manufacturer and name
          +
          +
        • +
        + + + +
          +
        • +

          getConnectionInfo

          +
          public java.lang.String getConnectionInfo()
          +
          Description copied from interface: HardwareDevice
          +
          Get connection information about this device in a human readable format
          +
          +
          Specified by:
          +
          getConnectionInfo in interface HardwareDevice
          +
          Returns:
          +
          connection info
          +
          +
        • +
        + + + +
          +
        • +

          getVersion

          +
          public int getVersion()
          +
          Description copied from interface: HardwareDevice
          +
          Version
          +
          +
          Specified by:
          +
          getVersion in interface HardwareDevice
          +
          Returns:
          +
          get the version of this device
          +
          +
        • +
        + + + +
          +
        • +

          resetDeviceConfigurationForOpMode

          +
          public void resetDeviceConfigurationForOpMode()
          +
          Description copied from interface: HardwareDevice
          +
          Resets the device's configuration to that which is expected at the beginning of an OpMode. + For example, motors will reset the their direction to 'forward'.
          +
          +
          Specified by:
          +
          resetDeviceConfigurationForOpMode in interface HardwareDevice
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModule.html b/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModule.html new file mode 100644 index 00000000000..92ff92a68e2 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModule.html @@ -0,0 +1,420 @@ + + + + + +LegacyModule + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface LegacyModule

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice, I2cController
      +
      +
      +
      +
      public interface LegacyModule
      +extends HardwareDevice, I2cController
      +
      Legacy Module for working with NXT devices. + + The Modern Robotics Core Legacy Module provides backward compatibility to enable LEGO NXT devices + to connect to an Android device or a PC via a USB connection. Each Legacy Module has six (6) ports and + virtually any combination of devices can be connected to the module. + + The Legacy Module firmware supports all NXT LEGO sensors (except the Lego Color Sensor), + HiTechnic sensors, Matrix controllers as well as the HiTechnic Tetrix motor and servo controllers. + + Each Legacy Module port can operate in digital as well as analog modes. In digital mode, legacy + connector pins 5 and 6 can be set to logic 0 or logic 1. + + In analog mode, the voltage on legacy connector pin 1 is measured using a 10 bit analog to digital + converter. Additionally, pins 5 and 6 can be set to logic 0 or logic 1 for control of the attached + device, such as a LEGO light sensor which uses pin 5 to turn the sensor LED on and off. + + In I2C mode, legacy connector pins 5 and 6 are used to communicate with I2C devices in accordance + with the LEGO interpretation of I2C. Ports 4 and 5 can additionally be switched into pin 1 9v + supply mode to permit LEGO ultrasonic range sensors to be used
      +
      +
      See Also:
      +
      Modern Robotics Legacy Module
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          enableAnalogReadMode

          +
          void enableAnalogReadMode(int physicalPort)
          +
          Enable a physical port in analog read mode
          +
          +
          Parameters:
          +
          physicalPort - physical port number on the device
          +
          +
        • +
        + + + +
          +
        • +

          readAnalogRaw

          +
          byte[] readAnalogRaw(int physicalPort)
          +
          Read an analog value from a device; only works in analog read mode
          +
          +
          Parameters:
          +
          physicalPort - physical port number on the device
          +
          Returns:
          +
          byte[] containing the two analog values; low byte first, high byte second
          +
          +
        • +
        + + + +
          +
        • +

          readAnalogVoltage

          +
          double readAnalogVoltage(int physicalPort)
          +
          Reads the analog voltage from a device. The port indicated must currently + be in analog read mode.
          +
          +
          Parameters:
          +
          physicalPort - the port whose voltage is to be read
          +
          Returns:
          +
          the voltage level read, in volts
          +
          +
        • +
        + + + +
          +
        • +

          getMaxAnalogInputVoltage

          +
          double getMaxAnalogInputVoltage()
          +
          Returns the maximum voltage that can be read by our analog inputs
          +
          +
          Returns:
          +
          the maximum voltage that can be read by our analog inputs
          +
          +
        • +
        + + + +
          +
        • +

          enable9v

          +
          void enable9v(int physicalPort,
          +              boolean enable)
          +
          Enable or disable 9V power on a port
          +
          +
          Parameters:
          +
          physicalPort - physical port number on the device
          +
          enable - true to enable; false to disable
          +
          +
        • +
        + + + +
          +
        • +

          setDigitalLine

          +
          void setDigitalLine(int physicalPort,
          +                    int line,
          +                    boolean set)
          +
          Set the value of digital line 0 or 1 while in analog mode. +

          + These are port pins 5 and 6.

          +
          +
          Parameters:
          +
          physicalPort - physical port number on the device
          +
          line - line 0 or 1
          +
          set - true to set; otherwise false
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModulePortDevice.html b/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModulePortDevice.html new file mode 100644 index 00000000000..e9e4f8a78f7 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModulePortDevice.html @@ -0,0 +1,252 @@ + + + + + +LegacyModulePortDevice + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface LegacyModulePortDevice

    +
    +
    +
    +
      +
    • +
      +
      All Known Implementing Classes:
      +
      LegacyModulePortDeviceImpl
      +
      +
      +
      +
      public interface LegacyModulePortDevice
      +
      The LegacyModulePortDevice interface should be supported by hardware devices which + occupy a port on a LegacyModule. It provides a means by which the module and the + port so occupied can be retrieved.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getLegacyModule

          +
          LegacyModule getLegacyModule()
          +
          Returns the legacy module associated with this device.
          +
          +
          Returns:
          +
          the legacy module associated with this device
          +
          +
        • +
        + + + +
          +
        • +

          getPort

          +
          int getPort()
          +
          Returns the port on the associated legacy module that this device occupies.
          +
          +
          Returns:
          +
          the port on the associated legacy module that this device occupies
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModulePortDeviceImpl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModulePortDeviceImpl.html new file mode 100644 index 00000000000..83b7a4c008a --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/LegacyModulePortDeviceImpl.html @@ -0,0 +1,419 @@ + + + + + +LegacyModulePortDeviceImpl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class LegacyModulePortDeviceImpl

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.LegacyModulePortDeviceImpl
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          physicalPort

          +
          protected final int physicalPort
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          LegacyModulePortDeviceImpl

          +
          protected LegacyModulePortDeviceImpl(LegacyModule module,
          +                                     int physicalPort)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          finishConstruction

          +
          protected void finishConstruction()
          +
        • +
        + + + +
          +
        • +

          moduleNowArmedOrPretending

          +
          protected void moduleNowArmedOrPretending()
          +
          intended as a subclass hook
          +
        • +
        + + + +
          +
        • +

          moduleNowDisarmed

          +
          protected void moduleNowDisarmed()
          +
          intended as a subclass hook
          +
        • +
        + + + +
          +
        • +

          onModuleStateChange

          +
          public void onModuleStateChange(RobotArmingStateNotifier module,
          +                                RobotUsbModule.ARMINGSTATE state)
          +
        • +
        + + + + + + + +
          +
        • +

          getPort

          +
          public int getPort()
          +
          Description copied from interface: LegacyModulePortDevice
          +
          Returns the port on the associated legacy module that this device occupies.
          +
          +
          Specified by:
          +
          getPort in interface LegacyModulePortDevice
          +
          Returns:
          +
          the port on the associated legacy module that this device occupies
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/Light.html b/doc/javadoc/com/qualcomm/robotcore/hardware/Light.html new file mode 100644 index 00000000000..8bce71dfbc5 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/Light.html @@ -0,0 +1,239 @@ + + + + + +Light + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface Light

    +
    +
    +
    +
      +
    • +
      +
      All Known Subinterfaces:
      +
      SwitchableLight
      +
      +
      +
      All Known Implementing Classes:
      +
      LED, LightMultiplexor
      +
      +
      +
      +
      public interface Light
      +
      Light instances are sources of illumination. They can inform as to whether + they are on or off.
      +
      +
      See Also:
      +
      SwitchableLight
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          isLightOn

          +
          boolean isLightOn()
          +
          Answers whether the light is on or off
          +
          +
          Returns:
          +
          whether the light is on or off
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/LightBlinker.html b/doc/javadoc/com/qualcomm/robotcore/hardware/LightBlinker.html new file mode 100644 index 00000000000..b1db8902037 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/LightBlinker.html @@ -0,0 +1,606 @@ + + + + + +LightBlinker + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class LightBlinker

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.LightBlinker
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      Blinker
      +
      +
      +
      +
      public class LightBlinker
      +extends java.lang.Object
      +implements Blinker
      +
      A LightBlinker is a handy utility that will flash a SwitchableLight + in a pattern of timed durations, and, optionally, colors, if the light supports same (NYI)
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Nested Class Summary

        +
          +
        • + + +

          Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.Blinker

          +Blinker.Step
        • +
        +
      • +
      + + + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        intgetBlinkerPatternMaxLength() +
        Returns the maximum number of Blinker.Steps that can be present in a pattern
        +
        java.util.Collection<Blinker.Step>getPattern() +
        Returns the current blinking pattern
        +
        protected booleanisCurrentPattern(java.util.Collection<Blinker.Step> steps) 
        booleanpatternStackNotEmpty() +
        Returns whether the pattern stack is currently nonempty.
        +
        booleanpopPattern() +
        Pops the next pattern off of the stack of saved patterns, if any.
        +
        voidpushPattern(java.util.Collection<Blinker.Step> steps) +
        Saves the existing pattern such that it can be later restored, then calls setPattern().
        +
        protected voidscheduleNext() 
        voidsetConstant(int color) +
        Sets the blinker pattern to be a single, unchanging color
        +
        voidsetPattern(java.util.Collection<Blinker.Step> steps) +
        Sets the pattern with which this LED or light should illuminate.
        +
        protected voidstop() 
        voidstopBlinking() +
        Sets the blinker to constant black and frees any internal resources
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + + + + + +
          +
        • +

          currentSteps

          +
          protected java.util.ArrayList<Blinker.Step> currentSteps
          +
        • +
        + + + +
          +
        • +

          previousSteps

          +
          protected java.util.Deque<java.util.ArrayList<Blinker.Step>> previousSteps
          +
        • +
        + + + +
          +
        • +

          future

          +
          protected java.util.concurrent.ScheduledFuture<?> future
          +
        • +
        + + + +
          +
        • +

          nextStep

          +
          protected int nextStep
          +
        • +
        +
      • +
      + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setConstant

          +
          public void setConstant(int color)
          +
          Description copied from interface: Blinker
          +
          Sets the blinker pattern to be a single, unchanging color
          +
          +
          Specified by:
          +
          setConstant in interface Blinker
          +
          Parameters:
          +
          color - the color with which the LED or light should be illuminated
          +
          +
        • +
        + + + +
          +
        • +

          stopBlinking

          +
          public void stopBlinking()
          +
          Description copied from interface: Blinker
          +
          Sets the blinker to constant black and frees any internal resources
          +
          +
          Specified by:
          +
          stopBlinking in interface Blinker
          +
          +
        • +
        + + + +
          +
        • +

          getBlinkerPatternMaxLength

          +
          public int getBlinkerPatternMaxLength()
          +
          Description copied from interface: Blinker
          +
          Returns the maximum number of Blinker.Steps that can be present in a pattern
          +
          +
          Specified by:
          +
          getBlinkerPatternMaxLength in interface Blinker
          +
          Returns:
          +
          the maximum number of Blinker.Steps that can be present in a pattern
          +
          +
        • +
        + + + +
          +
        • +

          pushPattern

          +
          public void pushPattern(java.util.Collection<Blinker.Step> steps)
          +
          Description copied from interface: Blinker
          +
          Saves the existing pattern such that it can be later restored, then calls setPattern().
          +
          +
          Specified by:
          +
          pushPattern in interface Blinker
          +
          Parameters:
          +
          steps - the new pattern to be displayed
          +
          +
        • +
        + + + +
          +
        • +

          patternStackNotEmpty

          +
          public boolean patternStackNotEmpty()
          +
          Description copied from interface: Blinker
          +
          Returns whether the pattern stack is currently nonempty.
          +
          +
          Specified by:
          +
          patternStackNotEmpty in interface Blinker
          +
          Returns:
          +
          whether the pattern stack is currently nonempty.
          +
          +
        • +
        + + + +
          +
        • +

          popPattern

          +
          public boolean popPattern()
          +
          Description copied from interface: Blinker
          +
          Pops the next pattern off of the stack of saved patterns, if any. + If the stack is empty, then this sets the blinker to a constant black.
          +
          +
          Specified by:
          +
          popPattern in interface Blinker
          +
          Returns:
          +
          whether or not a pattern was removed from the stack (ie: whether + the pattern stack was not empty prior to the call
          +
          +
        • +
        + + + +
          +
        • +

          setPattern

          +
          public void setPattern(java.util.Collection<Blinker.Step> steps)
          +
          Description copied from interface: Blinker
          +
          Sets the pattern with which this LED or light should illuminate. If the list of steps is longer + than the maximum number supported, then the pattern is truncated.
          +
          +
          Specified by:
          +
          setPattern in interface Blinker
          +
          Parameters:
          +
          steps - the pattern of colors and durations that the LED or light should illuminate itself with
          +
          +
        • +
        + + + +
          +
        • +

          isCurrentPattern

          +
          protected boolean isCurrentPattern(java.util.Collection<Blinker.Step> steps)
          +
        • +
        + + + +
          +
        • +

          getPattern

          +
          public java.util.Collection<Blinker.Step> getPattern()
          +
          Description copied from interface: Blinker
          +
          Returns the current blinking pattern
          +
          +
          Specified by:
          +
          getPattern in interface Blinker
          +
          Returns:
          +
          the current blinking pattern
          +
          +
        • +
        + + + +
          +
        • +

          scheduleNext

          +
          protected void scheduleNext()
          +
        • +
        + + + +
          +
        • +

          stop

          +
          protected void stop()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/LightMultiplexor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/LightMultiplexor.html new file mode 100644 index 00000000000..4dc88cf96f7 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/LightMultiplexor.html @@ -0,0 +1,386 @@ + + + + + +LightMultiplexor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class LightMultiplexor

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.LightMultiplexor
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          extantMultiplexors

          +
          protected static final java.util.Set<LightMultiplexor> extantMultiplexors
          +
        • +
        + + + + + + + +
          +
        • +

          enableCount

          +
          protected int enableCount
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          LightMultiplexor

          +
          protected LightMultiplexor(SwitchableLight target)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + + + + + +
          +
        • +

          isLightOn

          +
          public boolean isLightOn()
          +
          Description copied from interface: Light
          +
          Answers whether the light is on or off
          +
          +
          Specified by:
          +
          isLightOn in interface Light
          +
          Returns:
          +
          whether the light is on or off
          +
          +
        • +
        + + + +
          +
        • +

          enableLight

          +
          public void enableLight(boolean enable)
          +
          Description copied from interface: SwitchableLight
          +
          Turns the light on or off.
          +
          +
          Specified by:
          +
          enableLight in interface SwitchableLight
          +
          Parameters:
          +
          enable - if true, the light turns on; otherwise the light turns off
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/LightSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/LightSensor.html new file mode 100644 index 00000000000..67bcc9c057d --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/LightSensor.html @@ -0,0 +1,344 @@ + + + + + +LightSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface LightSensor

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getLightDetected

          +
          double getLightDetected()
          +
          Get the amount of light detected by the sensor, scaled and cliped to a range + which is a pragmatically useful sensitivity. Note that returned values INCREASE as + the light energy INCREASES.
          +
          +
          Returns:
          +
          amount of light, on a scale of 0.0 to 1.0
          +
          +
        • +
        + + + +
          +
        • +

          getRawLightDetected

          +
          double getRawLightDetected()
          +
          Returns a signal whose strength is proportional to the intensity of the light measured. + Note that returned values INCREASE as the light energy INCREASES. The units in which + this signal is returned are unspecified.
          +
          +
          Returns:
          +
          a value proportional to the amount of light detected, in unspecified units
          +
          +
        • +
        + + + +
          +
        • +

          getRawLightDetectedMax

          +
          double getRawLightDetectedMax()
          +
          Returns the maximum value that can be returned by getRawLightDetected().
          +
          +
          Returns:
          +
          the maximum value that can be returned by getRawLightDetected
          +
          See Also:
          +
          getRawLightDetected()
          +
          +
        • +
        + + + +
          +
        • +

          enableLed

          +
          void enableLed(boolean enable)
          +
          Enable the LED light
          +
          +
          Parameters:
          +
          enable - true to enable; false to disable
          +
          +
        • +
        + + + +
          +
        • +

          status

          +
          java.lang.String status()
          +
          Status of this sensor, in string form
          +
          +
          Returns:
          +
          status
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/LynxModuleMeta.html b/doc/javadoc/com/qualcomm/robotcore/hardware/LynxModuleMeta.html new file mode 100644 index 00000000000..f40c18046bb --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/LynxModuleMeta.html @@ -0,0 +1,374 @@ + + + + + +LynxModuleMeta + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class LynxModuleMeta

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.LynxModuleMeta
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class LynxModuleMeta
      +extends java.lang.Object
      +
      LynxModuleMeta has simple lynx module meta information for transmission from RC to DS
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          moduleAddress

          +
          protected int moduleAddress
          +
        • +
        + + + +
          +
        • +

          isParent

          +
          protected boolean isParent
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          LynxModuleMeta

          +
          public LynxModuleMeta(int moduleAddress,
          +                      boolean isParent)
          +
        • +
        + + + + + + + + +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getModuleAddress

          +
          public int getModuleAddress()
          +
        • +
        + + + +
          +
        • +

          isParent

          +
          public boolean isParent()
          +
        • +
        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/LynxModuleMetaList.html b/doc/javadoc/com/qualcomm/robotcore/hardware/LynxModuleMetaList.html new file mode 100644 index 00000000000..0f829a46ef1 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/LynxModuleMetaList.html @@ -0,0 +1,432 @@ + + + + + +LynxModuleMetaList + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class LynxModuleMetaList

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.LynxModuleMetaList
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + + + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          iterator

          +
          public java.util.Iterator<LynxModuleMeta> iterator()
          +
          +
          Specified by:
          +
          iterator in interface java.lang.Iterable<LynxModuleMeta>
          +
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          toSerializationString

          +
          public java.lang.String toSerializationString()
          +
        • +
        + + + +
          +
        • +

          fromSerializationString

          +
          public static LynxModuleMetaList fromSerializationString(java.lang.String serialization)
          +
        • +
        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/MotorControlAlgorithm.html b/doc/javadoc/com/qualcomm/robotcore/hardware/MotorControlAlgorithm.html new file mode 100644 index 00000000000..69577838c58 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/MotorControlAlgorithm.html @@ -0,0 +1,362 @@ + + + + + +MotorControlAlgorithm + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum MotorControlAlgorithm

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        LegacyPID +
        Deprecated.  +
        Switch to PIDF instead
        +
        +
        PIDF 
        Unknown 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static MotorControlAlgorithmvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static MotorControlAlgorithm[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static MotorControlAlgorithm[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (MotorControlAlgorithm c : MotorControlAlgorithm.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static MotorControlAlgorithm valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/NormalizedColorSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/NormalizedColorSensor.html new file mode 100644 index 00000000000..7517fe75da7 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/NormalizedColorSensor.html @@ -0,0 +1,255 @@ + + + + + +NormalizedColorSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface NormalizedColorSensor

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice
      +
      +
      +
      +
      public interface NormalizedColorSensor
      +extends HardwareDevice
      +
      NormalizedColorSensor returns color sensor data in standardized units, which + provides a measure of absolute color color intensity beyond the relative + intensities available using ColorSensor.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getNormalizedColors

          +
          NormalizedRGBA getNormalizedColors()
          +
          Reads the colors from the sensor
          +
          +
          Returns:
          +
          the current set of colors from the sensor
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/NormalizedRGBA.html b/doc/javadoc/com/qualcomm/robotcore/hardware/NormalizedRGBA.html new file mode 100644 index 00000000000..8f6c2d00afa --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/NormalizedRGBA.html @@ -0,0 +1,367 @@ + + + + + +NormalizedRGBA + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class NormalizedRGBA

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.NormalizedRGBA
      • +
      +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        floatalpha +
        normalized alpha value, in range [0,1)
        +
        floatblue +
        normalized blue value, in range [0,1)
        +
        floatgreen +
        normalized green value, in range [0,1)
        +
        floatred +
        normalized red value, in range [0,1)
        +
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        NormalizedRGBA() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        inttoColor() +
        Converts the normalized colors into an Android color integer
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          red

          +
          public float red
          +
          normalized red value, in range [0,1)
          +
        • +
        + + + +
          +
        • +

          green

          +
          public float green
          +
          normalized green value, in range [0,1)
          +
        • +
        + + + +
          +
        • +

          blue

          +
          public float blue
          +
          normalized blue value, in range [0,1)
          +
        • +
        + + + +
          +
        • +

          alpha

          +
          public float alpha
          +
          normalized alpha value, in range [0,1)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          NormalizedRGBA

          +
          public NormalizedRGBA()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          toColor

          +
          public int toColor()
          +
          Converts the normalized colors into an Android color integer
          +
          +
          See Also:
          +
          Color
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/OpticalDistanceSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/OpticalDistanceSensor.html new file mode 100644 index 00000000000..c393be0b85d --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/OpticalDistanceSensor.html @@ -0,0 +1,221 @@ + + + + + +OpticalDistanceSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface OpticalDistanceSensor

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice, LightSensor
      +
      +
      +
      +
      public interface OpticalDistanceSensor
      +extends LightSensor
      +
      OpticalDistanceSensor is a LightSensor whose reported light intensities + reflect (pun intended) a relationship to distance. Both raw readings and normalized readings + can be obtained; however, these both (usually) have an inverse-square relationship to distance, + and thus can be cumbersome to use. For an easier-to-use, linear relationship, see + DistanceSensor.
      +
      +
      See Also:
      +
      DistanceSensor
      +
      +
    • +
    +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/OrientationSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/OrientationSensor.html new file mode 100644 index 00000000000..c6b7425e93a --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/OrientationSensor.html @@ -0,0 +1,261 @@ + + + + + +OrientationSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface OrientationSensor

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getAngularOrientationAxes

          +
          java.util.Set<Axis> getAngularOrientationAxes()
          +
          Returns the axes on which the sensor measures angular orientation.
          +
          +
          Returns:
          +
          the axes on which the sensor measures angular orientation.
          +
          +
        • +
        + + + +
          +
        • +

          getAngularOrientation

          +
          Orientation getAngularOrientation(AxesReference reference,
          +                                  AxesOrder order,
          +                                  AngleUnit angleUnit)
          +
          Returns the absolute orientation of the sensor as a set three angles. Axes on which + absolute orientation is not measured are reported as zero.
          +
          +
          Parameters:
          +
          reference - the axes reference in which the result will be expressed
          +
          order - the axes order in which the result will be expressed
          +
          angleUnit - the angle units in which the result will be expressed
          +
          Returns:
          +
          the absolute orientation of the sensor
          +
          See Also:
          +
          Orientation
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/PIDCoefficients.html b/doc/javadoc/com/qualcomm/robotcore/hardware/PIDCoefficients.html new file mode 100644 index 00000000000..94da6ea01b9 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/PIDCoefficients.html @@ -0,0 +1,355 @@ + + + + + +PIDCoefficients + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class PIDCoefficients

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.PIDCoefficients
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class PIDCoefficients
      +extends java.lang.Object
      +
      PIDCoefficients conveys a set of configuration parameters for a PID algorithm.
      +
      +
      See Also:
      +
      PID controller
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        doubled 
        doublei 
        doublep 
        +
      • +
      + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        java.lang.StringtoString() 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          p

          +
          public double p
          +
        • +
        + + + +
          +
        • +

          i

          +
          public double i
          +
        • +
        + + + +
          +
        • +

          d

          +
          public double d
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          PIDCoefficients

          +
          public PIDCoefficients()
          +
        • +
        + + + +
          +
        • +

          PIDCoefficients

          +
          public PIDCoefficients(double p,
          +                       double i,
          +                       double d)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/PIDFCoefficients.html b/doc/javadoc/com/qualcomm/robotcore/hardware/PIDFCoefficients.html new file mode 100644 index 00000000000..9d18a5c3b00 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/PIDFCoefficients.html @@ -0,0 +1,430 @@ + + + + + +PIDFCoefficients + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class PIDFCoefficients

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.PIDFCoefficients
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          p

          +
          public double p
          +
        • +
        + + + +
          +
        • +

          i

          +
          public double i
          +
        • +
        + + + +
          +
        • +

          d

          +
          public double d
          +
        • +
        + + + +
          +
        • +

          f

          +
          public double f
          +
        • +
        + + + + +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          PIDFCoefficients

          +
          public PIDFCoefficients()
          +
        • +
        + + + +
          +
        • +

          PIDFCoefficients

          +
          public PIDFCoefficients(double p,
          +                        double i,
          +                        double d,
          +                        double f,
          +                        MotorControlAlgorithm algorithm)
          +
        • +
        + + + +
          +
        • +

          PIDFCoefficients

          +
          public PIDFCoefficients(double p,
          +                        double i,
          +                        double d,
          +                        double f)
          +
        • +
        + + + + + + + + +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutput.html b/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutput.html new file mode 100644 index 00000000000..2afb2b8d9b2 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutput.html @@ -0,0 +1,289 @@ + + + + + +PWMOutput + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface PWMOutput

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setPulseWidthOutputTime

          +
          void setPulseWidthOutputTime(int usDuration)
          +
        • +
        + + + +
          +
        • +

          getPulseWidthOutputTime

          +
          int getPulseWidthOutputTime()
          +
        • +
        + + + +
          +
        • +

          setPulseWidthPeriod

          +
          void setPulseWidthPeriod(int usFrame)
          +
        • +
        + + + +
          +
        • +

          getPulseWidthPeriod

          +
          int getPulseWidthPeriod()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputController.html b/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputController.html new file mode 100644 index 00000000000..f486883bae6 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputController.html @@ -0,0 +1,350 @@ + + + + + +PWMOutputController + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface PWMOutputController

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice
      +
      +
      +
      All Known Subinterfaces:
      +
      DeviceInterfaceModule
      +
      +
      +
      +
      public interface PWMOutputController
      +extends HardwareDevice
      +
      Interface for working with PWM Input Controllers +

      + Different analog input controllers will implement this interface.

      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getSerialNumber

          +
          SerialNumber getSerialNumber()
          +
          Serial Number
          +
          +
          Returns:
          +
          return the USB serial number of this device
          +
          +
        • +
        + + + +
          +
        • +

          setPulseWidthOutputTime

          +
          void setPulseWidthOutputTime(int port,
          +                             int usDuration)
          +
          Set the pulse width output time for this channel. Typically set to a value between + 750 and 2,250 to control a servo.
          +
          +
          Parameters:
          +
          port - port this device is attached to
          +
          usDuration - pulse width for the port in microseconds.
          +
          +
        • +
        + + + +
          +
        • +

          setPulseWidthPeriod

          +
          void setPulseWidthPeriod(int port,
          +                         int usPeriod)
          +
          Set the pulse width output period. Typically set to 20,000 to control servo.
          +
          +
          Parameters:
          +
          port - port this device is attached to
          +
          usPeriod - pulse repetition period in microseconds.
          +
          +
        • +
        + + + +
          +
        • +

          getPulseWidthOutputTime

          +
          int getPulseWidthOutputTime(int port)
          +
          Gets the pulse width for the channel output in units of 1 microsecond.
          +
          +
          Parameters:
          +
          port - port this device is attached to
          +
          Returns:
          +
          time pulse width for the channel in microseconds.
          +
          +
        • +
        + + + +
          +
        • +

          getPulseWidthPeriod

          +
          int getPulseWidthPeriod(int port)
          +
          Gets the pulse repetition period for the channel output in units of 1 microsecond.
          +
          +
          Parameters:
          +
          port - port this device is attached to
          +
          Returns:
          +
          period pulse repetition period in microseconds.
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputControllerEx.html b/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputControllerEx.html new file mode 100644 index 00000000000..a6ff3e17daa --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputControllerEx.html @@ -0,0 +1,245 @@ + + + + + +PWMOutputControllerEx + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface PWMOutputControllerEx

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface PWMOutputControllerEx
      +
      Created by bob on 2016-03-12.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setPwmEnable

          +
          void setPwmEnable(int port)
          +
        • +
        + + + +
          +
        • +

          setPwmDisable

          +
          void setPwmDisable(int port)
          +
        • +
        + + + +
          +
        • +

          isPwmEnabled

          +
          boolean isPwmEnabled(int port)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputEx.html b/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputEx.html new file mode 100644 index 00000000000..3217d077650 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputEx.html @@ -0,0 +1,249 @@ + + + + + +PWMOutputEx + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface PWMOutputEx

    +
    +
    +
    +
      +
    • +
      +
      All Known Implementing Classes:
      +
      PWMOutputImplEx
      +
      +
      +
      +
      public interface PWMOutputEx
      +
      Created by bob on 2016-03-12.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setPwmEnable

          +
          void setPwmEnable()
          +
        • +
        + + + +
          +
        • +

          setPwmDisable

          +
          void setPwmDisable()
          +
        • +
        + + + +
          +
        • +

          isPwmEnabled

          +
          boolean isPwmEnabled()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputImpl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputImpl.html new file mode 100644 index 00000000000..53055a615dc --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputImpl.html @@ -0,0 +1,561 @@ + + + + + +PWMOutputImpl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class PWMOutputImpl

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.PWMOutputImpl
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          PWMOutputImpl

          +
          public PWMOutputImpl(PWMOutputController controller,
          +                     int port)
          +
          Constructor
          +
          +
          Parameters:
          +
          controller - Digital port controller this port is attached to
          +
          port - port on the digital port controller
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setPulseWidthOutputTime

          +
          public void setPulseWidthOutputTime(int time)
          +
          Set the pulse width output time for this port. Typically set to a value between + 750 and 2,250 to control a servo.
          +
          +
          Specified by:
          +
          setPulseWidthOutputTime in interface PWMOutput
          +
          Parameters:
          +
          time - pulse width for the port in microseconds.
          +
          +
        • +
        + + + +
          +
        • +

          getPulseWidthOutputTime

          +
          public int getPulseWidthOutputTime()
          +
          Get the pulse width output time for this port
          +
          +
          Specified by:
          +
          getPulseWidthOutputTime in interface PWMOutput
          +
          +
        • +
        + + + +
          +
        • +

          setPulseWidthPeriod

          +
          public void setPulseWidthPeriod(int period)
          +
          Set the pulse width output period. Typically set to 20,000 to control servo.
          +
          +
          Specified by:
          +
          setPulseWidthPeriod in interface PWMOutput
          +
          Parameters:
          +
          period - pulse repetition period in microseconds.
          +
          +
        • +
        + + + +
          +
        • +

          getPulseWidthPeriod

          +
          public int getPulseWidthPeriod()
          +
          Get the pulse width output
          +
          +
          Specified by:
          +
          getPulseWidthPeriod in interface PWMOutput
          +
          +
        • +
        + + + + + + + +
          +
        • +

          getDeviceName

          +
          public java.lang.String getDeviceName()
          +
          Description copied from interface: HardwareDevice
          +
          Returns a string suitable for display to the user as to the type of device. + Note that this is a device-type-specific name; it has nothing to do with the + name by which a user might have configured the device in a robot configuration.
          +
          +
          Specified by:
          +
          getDeviceName in interface HardwareDevice
          +
          Returns:
          +
          device manufacturer and name
          +
          +
        • +
        + + + +
          +
        • +

          getConnectionInfo

          +
          public java.lang.String getConnectionInfo()
          +
          Description copied from interface: HardwareDevice
          +
          Get connection information about this device in a human readable format
          +
          +
          Specified by:
          +
          getConnectionInfo in interface HardwareDevice
          +
          Returns:
          +
          connection info
          +
          +
        • +
        + + + +
          +
        • +

          getVersion

          +
          public int getVersion()
          +
          Description copied from interface: HardwareDevice
          +
          Version
          +
          +
          Specified by:
          +
          getVersion in interface HardwareDevice
          +
          Returns:
          +
          get the version of this device
          +
          +
        • +
        + + + +
          +
        • +

          resetDeviceConfigurationForOpMode

          +
          public void resetDeviceConfigurationForOpMode()
          +
          Description copied from interface: HardwareDevice
          +
          Resets the device's configuration to that which is expected at the beginning of an OpMode. + For example, motors will reset the their direction to 'forward'.
          +
          +
          Specified by:
          +
          resetDeviceConfigurationForOpMode in interface HardwareDevice
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputImplEx.html b/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputImplEx.html new file mode 100644 index 00000000000..20b622c1258 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/PWMOutputImplEx.html @@ -0,0 +1,356 @@ + + + + + +PWMOutputImplEx + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class PWMOutputImplEx

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/PwmControl.PwmRange.html b/doc/javadoc/com/qualcomm/robotcore/hardware/PwmControl.PwmRange.html new file mode 100644 index 00000000000..b375cd9d04c --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/PwmControl.PwmRange.html @@ -0,0 +1,480 @@ + + + + + +PwmControl.PwmRange + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class PwmControl.PwmRange

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.PwmControl.PwmRange
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing interface:
      +
      PwmControl
      +
      +
      +
      +
      public static class PwmControl.PwmRange
      +extends java.lang.Object
      +
      PwmRange instances are used to specify the upper and lower pulse widths + and overall framing rate for a servo.
      +
      +
      See Also:
      +
      Guide to PWM and PPM, +HS-485HB servo information
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        static PwmControl.PwmRangedefaultRange +
        defaultRange is the default PWM range used
        +
        doubleusFrame +
        usFrame is the rate, in microseconds, at which the PWM is transmitted.
        +
        static doubleusFrameDefault +
        usFrameDefault is the default frame rate used, in microseconds
        +
        doubleusPulseLower +
        usPulseLower is the minimum PWM rate used, in microseconds.
        +
        static doubleusPulseLowerDefault 
        doubleusPulseUpper +
        usPulseLower is the maximum PWM rate used, in microseconds.
        +
        static doubleusPulseUpperDefault 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + + +
        Constructors 
        Constructor and Description
        PwmRange(double usPulseLower, + double usPulseUpper) +
        Creates a new PwmRange with the indicated lower and upper bounds and the default + framing rate.
        +
        PwmRange(double usPulseLower, + double usPulseUpper, + double usFrame) +
        Creates a new PwmRange with the indicated lower and upper bounds and the specified + framing rate.
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        booleanequals(java.lang.Object o) 
        inthashCode() 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          usFrameDefault

          +
          public static final double usFrameDefault
          +
          usFrameDefault is the default frame rate used, in microseconds
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          usPulseUpperDefault

          +
          public static final double usPulseUpperDefault
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          usPulseLowerDefault

          +
          public static final double usPulseLowerDefault
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          defaultRange

          +
          public static final PwmControl.PwmRange defaultRange
          +
          defaultRange is the default PWM range used
          +
        • +
        + + + +
          +
        • +

          usPulseLower

          +
          public final double usPulseLower
          +
          usPulseLower is the minimum PWM rate used, in microseconds. This corresponds to a servo position of 0.0.
          +
        • +
        + + + +
          +
        • +

          usPulseUpper

          +
          public final double usPulseUpper
          +
          usPulseLower is the maximum PWM rate used, in microseconds. This corresponds to a servo position of 1.0.
          +
        • +
        + + + +
          +
        • +

          usFrame

          +
          public final double usFrame
          +
          usFrame is the rate, in microseconds, at which the PWM is transmitted.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          PwmRange

          +
          public PwmRange(double usPulseLower,
          +                double usPulseUpper)
          +
          Creates a new PwmRange with the indicated lower and upper bounds and the default + framing rate.
          +
          +
          Parameters:
          +
          usPulseLower - the minimum PWM rate used, in microsecond
          +
          usPulseUpper - the maximum PWM rate used, in microseconds
          +
          +
        • +
        + + + +
          +
        • +

          PwmRange

          +
          public PwmRange(double usPulseLower,
          +                double usPulseUpper,
          +                double usFrame)
          +
          Creates a new PwmRange with the indicated lower and upper bounds and the specified + framing rate.
          +
          +
          Parameters:
          +
          usPulseLower - the minimum PWM rate used, in microsecond
          +
          usPulseUpper - the maximum PWM rate used, in microseconds
          +
          usFrame - the framing rate, in microseconds
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          equals

          +
          public boolean equals(java.lang.Object o)
          +
          +
          Overrides:
          +
          equals in class java.lang.Object
          +
          +
        • +
        + + + +
          +
        • +

          hashCode

          +
          public int hashCode()
          +
          +
          Overrides:
          +
          hashCode in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/PwmControl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/PwmControl.html new file mode 100644 index 00000000000..1632e900256 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/PwmControl.html @@ -0,0 +1,351 @@ + + + + + +PwmControl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface PwmControl

    +
    +
    +
    +
      +
    • +
      +
      All Known Implementing Classes:
      +
      CRServoImplEx, ServoImplEx
      +
      +
      +
      +
      public interface PwmControl
      +
      For hardware devices which are manipulated using a pulse width modulation (PWM) signal, + the PwmControl interface provides control of the width of pulses used and whether + the PWM is enabled or disabled. + +

      PWM is commonly used to control servos. PwmControl is thus found as a second + interface on servo objects whose primary interface is Servo or CRServo + when the underlying servo controller hardware supports this fine-grained control (not all + servo controllers provide such control). To access the PwmControl interface, + cast your Servo or CRServo object to PwmControl; however, it is + usually prudent to first test whether the cast will succeed by testing using

      instanceof
      .

      +
      +
      See Also:
      +
      DcMotorEx, +Pulse-width modulation
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Nested Class Summary

        + + + + + + + + + + +
        Nested Classes 
        Modifier and TypeInterface and Description
        static class PwmControl.PwmRange +
        PwmRange instances are used to specify the upper and lower pulse widths + and overall framing rate for a servo.
        +
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setPwmRange

          +
          void setPwmRange(PwmControl.PwmRange range)
          +
          Sets the PWM range limits for the servo
          +
          +
          Parameters:
          +
          range - the new PWM range limits for the servo
          +
          See Also:
          +
          getPwmRange()
          +
          +
        • +
        + + + + + + + +
          +
        • +

          setPwmEnable

          +
          void setPwmEnable()
          +
          Individually energizes the PWM for this particular servo.
          +
          +
          See Also:
          +
          setPwmDisable(), +isPwmEnabled()
          +
          +
        • +
        + + + +
          +
        • +

          setPwmDisable

          +
          void setPwmDisable()
          +
          Individually denergizes the PWM for this particular servo
          +
          +
          See Also:
          +
          setPwmEnable()
          +
          +
        • +
        + + + +
          +
        • +

          isPwmEnabled

          +
          boolean isPwmEnabled()
          +
          Returns whether the PWM is energized for this particular servo
          +
          +
          See Also:
          +
          setPwmEnable()
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/RobotConfigNameable.html b/doc/javadoc/com/qualcomm/robotcore/hardware/RobotConfigNameable.html new file mode 100644 index 00000000000..c91fb124c6d --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/RobotConfigNameable.html @@ -0,0 +1,279 @@ + + + + + +RobotConfigNameable + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface RobotConfigNameable

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setUserConfiguredName

          +
          void setUserConfiguredName(java.lang.String name)
          +
          Informs the device of a name by which it would be recognized by the user. Note that + the provided name may be null, in which case no such user-recognizable name is provided
          +
        • +
        + + + +
          +
        • +

          getUserConfiguredName

          +
          java.lang.String getUserConfiguredName()
          +
          Returns the human-recognizable name of this device, if same has been set.
          +
          +
          See Also:
          +
          setUserConfiguredName(String)
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/RobotCoreLynxModule.html b/doc/javadoc/com/qualcomm/robotcore/hardware/RobotCoreLynxModule.html new file mode 100644 index 00000000000..06fe3493efd --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/RobotCoreLynxModule.html @@ -0,0 +1,245 @@ + + + + + +RobotCoreLynxModule + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface RobotCoreLynxModule

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface RobotCoreLynxModule
      +
      RobotCoreLynxModule is the view of a Lynx Module available at the RobotCore layer.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getModuleAddress

          +
          int getModuleAddress()
          +
        • +
        + + + +
          +
        • +

          getFirmwareVersionString

          +
          java.lang.String getFirmwareVersionString()
          +
        • +
        + + + +
          +
        • +

          isParent

          +
          boolean isParent()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/RobotCoreLynxUsbDevice.html b/doc/javadoc/com/qualcomm/robotcore/hardware/RobotCoreLynxUsbDevice.html new file mode 100644 index 00000000000..2cf3b0777e3 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/RobotCoreLynxUsbDevice.html @@ -0,0 +1,253 @@ + + + + + +RobotCoreLynxUsbDevice + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface RobotCoreLynxUsbDevice

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface RobotCoreLynxUsbDevice
      +
      RobotCoreLynxUsbDevice is the subset of the functionality of the LynxUsbDevice + which is accessible from the RobotCore subsystem.
      +
    • +
    +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/ScannedDevices.MapAdapter.html b/doc/javadoc/com/qualcomm/robotcore/hardware/ScannedDevices.MapAdapter.html new file mode 100644 index 00000000000..67e12dd2222 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/ScannedDevices.MapAdapter.html @@ -0,0 +1,305 @@ + + + + + +ScannedDevices.MapAdapter + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class ScannedDevices.MapAdapter

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • <any>
      • +
      • +
          +
        • com.qualcomm.robotcore.hardware.ScannedDevices.MapAdapter
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      ScannedDevices
      +
      +
      +
      +
      protected static class ScannedDevices.MapAdapter
      +extends <any>
      +
      There *has* to be an easier way here, somehow.
      +
    • +
    +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/ScannedDevices.html b/doc/javadoc/com/qualcomm/robotcore/hardware/ScannedDevices.html new file mode 100644 index 00000000000..348a6942a5a --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/ScannedDevices.html @@ -0,0 +1,527 @@ + + + + + +ScannedDevices + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class ScannedDevices

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.ScannedDevices
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class ScannedDevices
      +extends java.lang.Object
      +
      ScannedDevices is a simple distinguished kind of map of serial numbers + to device types. Simple serialization and deserialization logic is provided.
      +
    • +
    +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.Direction.html b/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.Direction.html new file mode 100644 index 00000000000..348d64db889 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.Direction.html @@ -0,0 +1,353 @@ + + + + + +Servo.Direction + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum Servo.Direction

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<Servo.Direction>
      • +
      • +
          +
        • com.qualcomm.robotcore.hardware.Servo.Direction
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<Servo.Direction>
      +
      +
      +
      Enclosing interface:
      +
      Servo
      +
      +
      +
      +
      public static enum Servo.Direction
      +extends java.lang.Enum<Servo.Direction>
      +
      Servos can be configured to internally reverse the values + to which their positioning power is set. This makes it easy, e.g., + to have cooperating servos on two sides of a robot arm: + one would be set at at forward, the other at reverse, and the + difference between the two in that respect could be thereafter ignored. + +

      At the start of an OpMode, servos are guaranteed to be in the forward direction.

      +
      +
      See Also:
      +
      Servo.setDirection(Direction)
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        FORWARD 
        REVERSE 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static Servo.DirectionvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static Servo.Direction[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static Servo.Direction[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (Servo.Direction c : Servo.Direction.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static Servo.Direction valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.html b/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.html new file mode 100644 index 00000000000..8716d190e26 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/Servo.html @@ -0,0 +1,500 @@ + + + + + +Servo + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface Servo

    +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Nested Class Summary

        + + + + + + + + + + +
        Nested Classes 
        Modifier and TypeInterface and Description
        static class Servo.Direction +
        Servos can be configured to internally reverse the values + to which their positioning power is set.
        +
        + +
      • +
      + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        static doubleMAX_POSITION +
        The maximum allowable position to which a servo can be moved
        +
        static doubleMIN_POSITION +
        The minimum allowable position to which a servo can be moved
        +
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getController

          +
          ServoController getController()
          +
          Returns the underlying servo controller on which this servo is situated.
          +
          +
          Returns:
          +
          the underlying servo controller on which this servo is situated.
          +
          See Also:
          +
          getPortNumber()
          +
          +
        • +
        + + + +
          +
        • +

          getPortNumber

          +
          int getPortNumber()
          +
          Returns the port number on the underlying servo controller on which this motor is situated.
          +
          +
          Returns:
          +
          the port number on the underlying servo controller on which this motor is situated.
          +
          See Also:
          +
          getController()
          +
          +
        • +
        + + + +
          +
        • +

          setDirection

          +
          void setDirection(Servo.Direction direction)
          +
          Sets the logical direction in which this servo operates.
          +
          +
          Parameters:
          +
          direction - the direction to set for this servo
          +
          See Also:
          +
          getDirection(), +Servo.Direction
          +
          +
        • +
        + + + +
          +
        • +

          getDirection

          +
          Servo.Direction getDirection()
          +
          Returns the current logical direction in which this servo is set as operating.
          +
          +
          Returns:
          +
          the current logical direction in which this servo is set as operating.
          +
          See Also:
          +
          setDirection(Direction)
          +
          +
        • +
        + + + +
          +
        • +

          setPosition

          +
          void setPosition(double position)
          +
          Sets the current position of the servo, expressed as a fraction of its available + range. If PWM power is enabled for the servo, the servo will attempt to move to + the indicated position.
          +
          +
          Parameters:
          +
          position - the position to which the servo should move, a value in the range [0.0, 1.0]
          +
          See Also:
          +
          ServoController.pwmEnable(), +getPosition()
          +
          +
        • +
        + + + +
          +
        • +

          getPosition

          +
          double getPosition()
          +
          Returns the position to which the servo was last commanded to move. Note that this method + does NOT read a position from the servo through any electrical means, as no such electrical + mechanism is, generally, available.
          +
          +
          Returns:
          +
          the position to which the servo was last commanded to move, or Double.NaN + if no such position is known
          +
          See Also:
          +
          setPosition(double), +Double.NaN, +Double.isNaN()
          +
          +
        • +
        + + + +
          +
        • +

          scaleRange

          +
          void scaleRange(double min,
          +                double max)
          +
          Scales the available movement range of the servo to be a subset of its maximum range. Subsequent + positioning calls will operate within that subset range. This is useful if your servo has + only a limited useful range of movement due to the physical hardware that it is manipulating + (as is often the case) but you don't want to have to manually scale and adjust the input + to setPosition() each time. + +

          For example, if scaleRange(0.2, 0.8) is set; then servo positions will be + scaled to fit in that range:
          + setPosition(0.0) scales to 0.2
          + setPosition(1.0) scales to 0.8
          + setPosition(0.5) scales to 0.5
          + setPosition(0.25) scales to 0.35
          + setPosition(0.75) scales to 0.65
          +

          + +

          Note the parameters passed here are relative to the underlying full range of motion of + the servo, not its currently scaled range, if any. Thus, scaleRange(0.0, 1.0) will reset + the servo to its full range of movement.

          +
          +
          Parameters:
          +
          min - the lower limit of the servo movement range, a value in the interval [0.0, 1.0]
          +
          max - the upper limit of the servo movement range, a value in the interval [0.0, 1.0]
          +
          See Also:
          +
          setPosition(double)
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/ServoController.PwmStatus.html b/doc/javadoc/com/qualcomm/robotcore/hardware/ServoController.PwmStatus.html new file mode 100644 index 00000000000..118ee91911d --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/ServoController.PwmStatus.html @@ -0,0 +1,355 @@ + + + + + +ServoController.PwmStatus + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Enum ServoController.PwmStatus

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        DISABLED 
        ENABLED 
        MIXED 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static ServoController.PwmStatusvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static ServoController.PwmStatus[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static ServoController.PwmStatus[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (ServoController.PwmStatus c : ServoController.PwmStatus.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static ServoController.PwmStatus valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/ServoController.html b/doc/javadoc/com/qualcomm/robotcore/hardware/ServoController.html new file mode 100644 index 00000000000..fe0466807a0 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/ServoController.html @@ -0,0 +1,349 @@ + + + + + +ServoController + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface ServoController

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice
      +
      +
      +
      All Known Subinterfaces:
      +
      ServoControllerEx
      +
      +
      +
      +
      public interface ServoController
      +extends HardwareDevice
      +
      Interface for working with Servo Controllers +

      + Different servo controllers will implement this interface.

      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          pwmEnable

          +
          void pwmEnable()
          +
          Enables all of the servos connected to this controller
          +
        • +
        + + + +
          +
        • +

          pwmDisable

          +
          void pwmDisable()
          +
          Disables all of the servos connected to this controller
          +
        • +
        + + + +
          +
        • +

          getPwmStatus

          +
          ServoController.PwmStatus getPwmStatus()
          +
          Returns the enablement status of the collective set of servos connected to this controller
          +
          +
          Returns:
          +
          the enablement status of the collective set of servos connected to this controller
          +
          +
        • +
        + + + +
          +
        • +

          setServoPosition

          +
          void setServoPosition(int servo,
          +                      double position)
          +
          Set the position of a servo at the given channel
          +
          +
          Parameters:
          +
          servo - channel of servo
          +
          position - from 0.0 to 1.0
          +
          +
        • +
        + + + +
          +
        • +

          getServoPosition

          +
          double getServoPosition(int servo)
          +
          Get the position of a servo at a given channel
          +
          +
          Parameters:
          +
          servo - channel of servo
          +
          Returns:
          +
          position, scaled from 0.0 to 1.0
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/ServoControllerEx.html b/doc/javadoc/com/qualcomm/robotcore/hardware/ServoControllerEx.html new file mode 100644 index 00000000000..bd31ab46ab1 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/ServoControllerEx.html @@ -0,0 +1,392 @@ + + + + + +ServoControllerEx + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface ServoControllerEx

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice, ServoController
      +
      +
      +
      +
      public interface ServoControllerEx
      +extends ServoController
      +
      ServoControllerEx is an optional servo controller interface supported by some hardware + that provides enhanced servo functionality.
      +
      +
      See Also:
      +
      PwmControl
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + + + + + + + + + +
          +
        • +

          setServoPwmEnable

          +
          void setServoPwmEnable(int servo)
          +
          Individually energizes the PWM for a particular servo
          +
          +
          Parameters:
          +
          servo - the servo port number on the controller
          +
          See Also:
          +
          PwmControl.setPwmEnable()
          +
          +
        • +
        + + + +
          +
        • +

          setServoPwmDisable

          +
          void setServoPwmDisable(int servo)
          +
          Individually de-energizes the PWM for a particular servo
          +
          +
          Parameters:
          +
          servo - the servo port number on the controller
          +
          See Also:
          +
          PwmControl.setPwmDisable()
          +
          +
        • +
        + + + +
          +
        • +

          isServoPwmEnabled

          +
          boolean isServoPwmEnabled(int servo)
          +
          Returns whether the PWM is energized for this particular servo
          +
          +
          Parameters:
          +
          servo - the servo port number on the controller
          +
          See Also:
          +
          PwmControl.isPwmEnabled()
          +
          +
        • +
        + + + +
          +
        • +

          setServoType

          +
          void setServoType(int servo,
          +                  ServoConfigurationType servoType)
          +
          Sets the servo type for a particular servo
          +
          +
          Parameters:
          +
          servo - the servo port number on the controller
          +
          servoType - the ServoConfigurationType instance to set
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/ServoImpl.html b/doc/javadoc/com/qualcomm/robotcore/hardware/ServoImpl.html new file mode 100644 index 00000000000..445e9bcd733 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/ServoImpl.html @@ -0,0 +1,744 @@ + + + + + +ServoImpl + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class ServoImpl

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.ServoImpl
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      HardwareDevice, Servo
      +
      +
      +
      Direct Known Subclasses:
      +
      ServoImplEx
      +
      +
      +
      +
      public class ServoImpl
      +extends java.lang.Object
      +implements Servo
      +
      ServoImpl provides an implementation of the Servo interface that operates on top + of an instance of the ServoController interface.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          portNumber

          +
          protected int portNumber
          +
        • +
        + + + + + + + +
          +
        • +

          limitPositionMin

          +
          protected double limitPositionMin
          +
        • +
        + + + +
          +
        • +

          limitPositionMax

          +
          protected double limitPositionMax
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          ServoImpl

          +
          public ServoImpl(ServoController controller,
          +                 int portNumber)
          +
          Constructor
          +
          +
          Parameters:
          +
          controller - Servo controller that this servo is attached to
          +
          portNumber - physical port number on the servo controller
          +
          +
        • +
        + + + +
          +
        • +

          ServoImpl

          +
          public ServoImpl(ServoController controller,
          +                 int portNumber,
          +                 Servo.Direction direction)
          +
          COnstructor
          +
          +
          Parameters:
          +
          controller - Servo controller that this servo is attached to
          +
          portNumber - physical port number on the servo controller
          +
          direction - FORWARD for normal operation, REVERSE to reverse operation
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + + + + + +
          +
        • +

          getDeviceName

          +
          public java.lang.String getDeviceName()
          +
          Description copied from interface: HardwareDevice
          +
          Returns a string suitable for display to the user as to the type of device. + Note that this is a device-type-specific name; it has nothing to do with the + name by which a user might have configured the device in a robot configuration.
          +
          +
          Specified by:
          +
          getDeviceName in interface HardwareDevice
          +
          Returns:
          +
          device manufacturer and name
          +
          +
        • +
        + + + +
          +
        • +

          getConnectionInfo

          +
          public java.lang.String getConnectionInfo()
          +
          Description copied from interface: HardwareDevice
          +
          Get connection information about this device in a human readable format
          +
          +
          Specified by:
          +
          getConnectionInfo in interface HardwareDevice
          +
          Returns:
          +
          connection info
          +
          +
        • +
        + + + +
          +
        • +

          getVersion

          +
          public int getVersion()
          +
          Description copied from interface: HardwareDevice
          +
          Version
          +
          +
          Specified by:
          +
          getVersion in interface HardwareDevice
          +
          Returns:
          +
          get the version of this device
          +
          +
        • +
        + + + +
          +
        • +

          resetDeviceConfigurationForOpMode

          +
          public void resetDeviceConfigurationForOpMode()
          +
          Description copied from interface: HardwareDevice
          +
          Resets the device's configuration to that which is expected at the beginning of an OpMode. + For example, motors will reset the their direction to 'forward'.
          +
          +
          Specified by:
          +
          resetDeviceConfigurationForOpMode in interface HardwareDevice
          +
          +
        • +
        + + + + + + + + + + + + + + + + + + + + + + + +
          +
        • +

          setPosition

          +
          public void setPosition(double position)
          +
          Commands the servo to move to a designated position. This method initiates the movement; + the servo will arrive at the commanded position at some later time.
          +
          +
          Specified by:
          +
          setPosition in interface Servo
          +
          Parameters:
          +
          position - the commanded servo position. Should be in the range [0.0, 1.0].
          +
          See Also:
          +
          getPosition()
          +
          +
        • +
        + + + +
          +
        • +

          internalSetPosition

          +
          protected void internalSetPosition(double position)
          +
        • +
        + + + +
          +
        • +

          getPosition

          +
          public double getPosition()
          +
          Returns the position to which the servo was last commanded, or Double.NaN if that is + unavailable.
          +
          +
          Specified by:
          +
          getPosition in interface Servo
          +
          Returns:
          +
          the last commanded position
          +
          See Also:
          +
          setPosition(double), +Double.isNaN(double)
          +
          +
        • +
        + + + +
          +
        • +

          scaleRange

          +
          public void scaleRange(double min,
          +                       double max)
          +
          Automatically scales the position of the servo.
          +
          +
          Specified by:
          +
          scaleRange in interface Servo
          +
          Parameters:
          +
          min - the lower limit of the servo movement range, a value in the interval [0.0, 1.0]
          +
          max - the upper limit of the servo movement range, a value in the interval [0.0, 1.0]
          +
          See Also:
          +
          Servo.setPosition(double)
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/ServoImplEx.html b/doc/javadoc/com/qualcomm/robotcore/hardware/ServoImplEx.html new file mode 100644 index 00000000000..b4b10a16401 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/ServoImplEx.html @@ -0,0 +1,495 @@ + + + + + +ServoImplEx + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class ServoImplEx

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/SwitchableLight.html b/doc/javadoc/com/qualcomm/robotcore/hardware/SwitchableLight.html new file mode 100644 index 00000000000..4a6415c2336 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/SwitchableLight.html @@ -0,0 +1,247 @@ + + + + + +SwitchableLight + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface SwitchableLight

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      Light
      +
      +
      +
      All Known Implementing Classes:
      +
      LED, LightMultiplexor
      +
      +
      +
      +
      public interface SwitchableLight
      +extends Light
      +
      SwitchableLight instances are Lights whose on/off status can be + programmatically manipulated.
      +
      +
      See Also:
      +
      Light
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          enableLight

          +
          void enableLight(boolean enable)
          +
          Turns the light on or off.
          +
          +
          Parameters:
          +
          enable - if true, the light turns on; otherwise the light turns off
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/TimestampedData.html b/doc/javadoc/com/qualcomm/robotcore/hardware/TimestampedData.html new file mode 100644 index 00000000000..9b20cf15f59 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/TimestampedData.html @@ -0,0 +1,295 @@ + + + + + +TimestampedData + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class TimestampedData

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.hardware.TimestampedData
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Direct Known Subclasses:
      +
      TimestampedI2cData
      +
      +
      +
      +
      public class TimestampedData
      +extends java.lang.Object
      +
      TimestampedData pairs together data which has been read with the timestamp at which + the read occurred, as best that can be determined
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        byte[]data +
        the data in question
        +
        longnanoTime +
        the timestamp on the System.nanoTime() clock associated with that data
        +
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        TimestampedData() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          data

          +
          public byte[] data
          +
          the data in question
          +
        • +
        + + + +
          +
        • +

          nanoTime

          +
          public long nanoTime
          +
          the timestamp on the System.nanoTime() clock associated with that data
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          TimestampedData

          +
          public TimestampedData()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/TimestampedI2cData.html b/doc/javadoc/com/qualcomm/robotcore/hardware/TimestampedI2cData.html new file mode 100644 index 00000000000..e91d343dc45 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/TimestampedI2cData.html @@ -0,0 +1,390 @@ + + + + + +TimestampedI2cData + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Class TimestampedI2cData

    +
    +
    + +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        protected static java.util.concurrent.atomic.AtomicIntegerhealthStatusSuppressionCount +
        internal: keeps track of
        +
        I2cAddri2cAddr +
        the I2c address from which the data was read
        +
        intregister +
        the starting register address from which the data was retrieved
        +
        + +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        TimestampedI2cData() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static TimestampedI2cDatamakeFakeData(java.lang.Object deviceHavingProblems, + I2cAddr i2cAddr, + int ireg, + int creg) +
        Creates and returns fake I2C data for use in situations where data must be returned but actual + data is unavailable.
        +
        static voidsuppressNewHealthWarnings(boolean suppress) 
        static voidsuppressNewHealthWarningsWhile(java.lang.Runnable runnable) 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          i2cAddr

          +
          public I2cAddr i2cAddr
          +
          the I2c address from which the data was read
          +
        • +
        + + + +
          +
        • +

          register

          +
          public int register
          +
          the starting register address from which the data was retrieved
          +
        • +
        + + + +
          +
        • +

          healthStatusSuppressionCount

          +
          protected static java.util.concurrent.atomic.AtomicInteger healthStatusSuppressionCount
          +
          internal: keeps track of
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          TimestampedI2cData

          +
          public TimestampedI2cData()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          makeFakeData

          +
          public static TimestampedI2cData makeFakeData(java.lang.Object deviceHavingProblems,
          +                                              I2cAddr i2cAddr,
          +                                              int ireg,
          +                                              int creg)
          +
          Creates and returns fake I2C data for use in situations where data must be returned but actual + data is unavailable. Optionally, records that the device in question is having difficulties.
          +
        • +
        + + + +
          +
        • +

          suppressNewHealthWarningsWhile

          +
          public static void suppressNewHealthWarningsWhile(java.lang.Runnable runnable)
          +
        • +
        + + + +
          +
        • +

          suppressNewHealthWarnings

          +
          public static void suppressNewHealthWarnings(boolean suppress)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/TouchSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/TouchSensor.html new file mode 100644 index 00000000000..f985bf5ceb0 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/TouchSensor.html @@ -0,0 +1,275 @@ + + + + + +TouchSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface TouchSensor

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getValue

          +
          double getValue()
          +
          Represents how much force is applied to the touch sensor; for some touch sensors + this value will only ever be 0 or 1.
          +
          +
          Returns:
          +
          a number between 0 and 1
          +
          +
        • +
        + + + +
          +
        • +

          isPressed

          +
          boolean isPressed()
          +
          Return true if the touch sensor is being pressed
          +
          +
          Returns:
          +
          true if the touch sensor is being pressed
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/TouchSensorMultiplexer.html b/doc/javadoc/com/qualcomm/robotcore/hardware/TouchSensorMultiplexer.html new file mode 100644 index 00000000000..b32c4b80a05 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/TouchSensorMultiplexer.html @@ -0,0 +1,259 @@ + + + + + +TouchSensorMultiplexer + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface TouchSensorMultiplexer

    +
    +
    +
    +
      +
    • +
      +
      All Superinterfaces:
      +
      HardwareDevice
      +
      +
      +
      +
      public interface TouchSensorMultiplexer
      +extends HardwareDevice
      +
      NXT Touch Sensor Multiplexer.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          isTouchSensorPressed

          +
          boolean isTouchSensorPressed(int channel)
          +
        • +
        + + + +
          +
        • +

          getSwitches

          +
          int getSwitches()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/UltrasonicSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/UltrasonicSensor.html new file mode 100644 index 00000000000..0b4073d8a5a --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/UltrasonicSensor.html @@ -0,0 +1,272 @@ + + + + + +UltrasonicSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface UltrasonicSensor

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getUltrasonicLevel

          +
          double getUltrasonicLevel()
          +
          Get the Ultrasonic levels from this sensor
          +
          +
          Returns:
          +
          ultrasonic levels
          +
          +
        • +
        + + + +
          +
        • +

          status

          +
          java.lang.String status()
          +
          Status of this sensor, in string form
          +
          +
          Returns:
          +
          status
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/VisuallyIdentifiableHardwareDevice.html b/doc/javadoc/com/qualcomm/robotcore/hardware/VisuallyIdentifiableHardwareDevice.html new file mode 100644 index 00000000000..934166ac9e7 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/VisuallyIdentifiableHardwareDevice.html @@ -0,0 +1,221 @@ + + + + + +VisuallyIdentifiableHardwareDevice + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface VisuallyIdentifiableHardwareDevice

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface VisuallyIdentifiableHardwareDevice
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          visuallyIdentify

          +
          void visuallyIdentify(boolean shouldIdentify)
          +
          idempotent
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/VoltageSensor.html b/doc/javadoc/com/qualcomm/robotcore/hardware/VoltageSensor.html new file mode 100644 index 00000000000..ba84223f061 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/VoltageSensor.html @@ -0,0 +1,253 @@ + + + + + +VoltageSensor + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.hardware
    +

    Interface VoltageSensor

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getVoltage

          +
          double getVoltage()
          +
          Get the current voltage
          +
          +
          Returns:
          +
          voltage
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/package-frame.html b/doc/javadoc/com/qualcomm/robotcore/hardware/package-frame.html new file mode 100644 index 00000000000..1735e470e4e --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/package-frame.html @@ -0,0 +1,145 @@ + + + + + +com.qualcomm.robotcore.hardware + + + + +

    com.qualcomm.robotcore.hardware

    +
    +

    Interfaces

    + +

    Classes

    + +

    Enums

    + +
    + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/package-summary.html b/doc/javadoc/com/qualcomm/robotcore/hardware/package-summary.html new file mode 100644 index 00000000000..31e0f197646 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/package-summary.html @@ -0,0 +1,923 @@ + + + + + +com.qualcomm.robotcore.hardware + + + + + + + + + + +
    +

    Package com.qualcomm.robotcore.hardware

    +
    +
    RobotCore hardware library.
    +
    +

    See: Description

    +
    +
    + + + + +

    Package com.qualcomm.robotcore.hardware Description

    +
    RobotCore hardware library. +

    + Contains libraries for working with gamepads, DC motor controllers, servo controllers, and more.

    +
    + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/hardware/package-tree.html b/doc/javadoc/com/qualcomm/robotcore/hardware/package-tree.html new file mode 100644 index 00000000000..520576e633f --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/hardware/package-tree.html @@ -0,0 +1,389 @@ + + + + + +com.qualcomm.robotcore.hardware Class Hierarchy + + + + + + + + + + +
    +

    Hierarchy For Package com.qualcomm.robotcore.hardware

    +Package Hierarchies: + +
    +
    +

    Class Hierarchy

    + +

    Interface Hierarchy

    + +

    Enum Hierarchy

    + +
    + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/util/ElapsedTime.Resolution.html b/doc/javadoc/com/qualcomm/robotcore/util/ElapsedTime.Resolution.html new file mode 100644 index 00000000000..31979eebc0f --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/util/ElapsedTime.Resolution.html @@ -0,0 +1,347 @@ + + + + + +ElapsedTime.Resolution + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.util
    +

    Enum ElapsedTime.Resolution

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        MILLISECONDS 
        SECONDS 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static ElapsedTime.ResolutionvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static ElapsedTime.Resolution[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static ElapsedTime.Resolution[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (ElapsedTime.Resolution c : ElapsedTime.Resolution.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static ElapsedTime.Resolution valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/util/ElapsedTime.html b/doc/javadoc/com/qualcomm/robotcore/util/ElapsedTime.html new file mode 100644 index 00000000000..14958977ce7 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/util/ElapsedTime.html @@ -0,0 +1,699 @@ + + + + + +ElapsedTime + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.util
    +

    Class ElapsedTime

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.util.ElapsedTime
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class ElapsedTime
      +extends java.lang.Object
      +
      The ElapsedTime class provides a simple handy timer to measure elapsed time intervals. + The timer does not provide events or callbacks, as some other timers do. Rather, at an application- + determined juncture, one can reset() the timer. Thereafter, one can query the interval + of wall-clock time that has subsequently elapsed by calling the time(), seconds(), + or milliseconds() methods. The timer has nanosecond internal accuracy. The precision + reported by the time() method is either seconds or milliseconds, depending on how the + timer is initially constructed. + + This class is thread-safe.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Nested Class Summary

        + + + + + + + + + + +
        Nested Classes 
        Modifier and TypeClass and Description
        static class ElapsedTime.Resolution +
        An indicator of the resolution of a timer.
        +
        +
      • +
      + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        static longMILLIS_IN_NANO +
        the number of nanoseconds in a millisecond
        +
        protected longnsStartTime 
        protected doubleresolution 
        static longSECOND_IN_NANO +
        the number of nanoseconds in a second
        +
        +
      • +
      + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        ElapsedTime.ResolutiongetResolution() +
        Returns the resolution with which the timer was instantiated.
        +
        voidlog(java.lang.String label) +
        Log a message stating how long the timer has been running
        +
        doublemilliseconds() +
        Returns the duration that has elapsed since the last reset of this timer in milliseconds
        +
        longnanoseconds() +
        Returns the duration that has elapsed since the last reset of this timer in nanoseconds
        +
        longnow(java.util.concurrent.TimeUnit unit) +
        Returns the current time on the clock used by the timer
        +
        protected longnsNow() 
        voidreset() +
        Resets the internal state of the timer to reflect the current time.
        +
        doubleseconds() +
        Returns the duration that has elapsed since the last reset of this timer in seconds
        +
        doublestartTime() +
        Returns, in resolution-dependent units, the time at which this timer was last reset.
        +
        longstartTimeNanoseconds() +
        Returns the time at which the timer was last reset, in units of nanoseconds
        +
        doubletime() +
        Returns the duration that has elapsed since the last reset of this timer.
        +
        longtime(java.util.concurrent.TimeUnit unit) +
        Returns the duration that has elapsed since the last reset of this timer + as an integer in the units requested.
        +
        java.lang.StringtoString() +
        Returns a string indicating the current elapsed time of the timer.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          SECOND_IN_NANO

          +
          public static final long SECOND_IN_NANO
          +
          the number of nanoseconds in a second
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          MILLIS_IN_NANO

          +
          public static final long MILLIS_IN_NANO
          +
          the number of nanoseconds in a millisecond
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          nsStartTime

          +
          protected volatile long nsStartTime
          +
        • +
        + + + +
          +
        • +

          resolution

          +
          protected final double resolution
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + + + + + +
          +
        • +

          ElapsedTime

          +
          public ElapsedTime(long startTime)
          +
          Creates a timer with resolution Resolution.Seconds. + The timer is initialized with the provided start time. Zero is often a useful value to provide + here: in common usage such timers will often be processed by application logic virtually immediately.
          +
          +
          Parameters:
          +
          startTime - the initial value of the timer
          +
          See Also:
          +
          ElapsedTime()
          +
          +
        • +
        + + + +
          +
        • +

          ElapsedTime

          +
          public ElapsedTime(ElapsedTime.Resolution resolution)
          +
          Creates a timer with a resolution of seconds or milliseconds. The resolution + affects the units in which the time() method reports. The timer is initialized + with the current time.
          +
          +
          Parameters:
          +
          resolution - the resolution of the new timer
          +
          See Also:
          +
          ElapsedTime()
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          nsNow

          +
          protected long nsNow()
          +
        • +
        + + + +
          +
        • +

          now

          +
          public long now(java.util.concurrent.TimeUnit unit)
          +
          Returns the current time on the clock used by the timer
          +
          +
          Parameters:
          +
          unit - the time unit in which the current time should be returned
          +
          Returns:
          +
          the current time on the clock used by the timer
          +
          +
        • +
        + + + +
          +
        • +

          reset

          +
          public void reset()
          +
          Resets the internal state of the timer to reflect the current time. Instantaneously following + this reset, time() will report as zero.
          +
          +
          See Also:
          +
          time()
          +
          +
        • +
        + + + +
          +
        • +

          startTime

          +
          public double startTime()
          +
          Returns, in resolution-dependent units, the time at which this timer was last reset.
          +
          +
          Returns:
          +
          the reset time of the timer
          +
          +
        • +
        + + + +
          +
        • +

          startTimeNanoseconds

          +
          public long startTimeNanoseconds()
          +
          Returns the time at which the timer was last reset, in units of nanoseconds
          +
          +
          Returns:
          +
          the time at which the timer was last reset, in units of nanoseconds
          +
          +
        • +
        + + + +
          +
        • +

          time

          +
          public double time()
          +
          Returns the duration that has elapsed since the last reset of this timer. + Units used are either seconds or milliseconds, depending on the resolution with + which the timer was instantiated.
          +
          +
          Returns:
          +
          time duration since last timer reset
          +
          See Also:
          +
          ElapsedTime(), +ElapsedTime(Resolution), +seconds(), +milliseconds()
          +
          +
        • +
        + + + +
          +
        • +

          time

          +
          public long time(java.util.concurrent.TimeUnit unit)
          +
          Returns the duration that has elapsed since the last reset of this timer + as an integer in the units requested.
          +
          +
          Parameters:
          +
          unit - the units in which to return the answer
          +
          Returns:
          +
          time duration since last timer reset
          +
          +
        • +
        + + + +
          +
        • +

          seconds

          +
          public double seconds()
          +
          Returns the duration that has elapsed since the last reset of this timer in seconds
          +
          +
          Returns:
          +
          time duration since last timer reset
          +
          See Also:
          +
          time()
          +
          +
        • +
        + + + +
          +
        • +

          milliseconds

          +
          public double milliseconds()
          +
          Returns the duration that has elapsed since the last reset of this timer in milliseconds
          +
          +
          Returns:
          +
          time duration since last timer reset
          +
          See Also:
          +
          time()
          +
          +
        • +
        + + + +
          +
        • +

          nanoseconds

          +
          public long nanoseconds()
          +
          Returns the duration that has elapsed since the last reset of this timer in nanoseconds
          +
          +
          Returns:
          +
          time duration since last timer reset
          +
          See Also:
          +
          time()
          +
          +
        • +
        + + + +
          +
        • +

          getResolution

          +
          public ElapsedTime.Resolution getResolution()
          +
          Returns the resolution with which the timer was instantiated.
          +
          +
          Returns:
          +
          the resolution of the timer
          +
          +
        • +
        + + + +
          +
        • +

          log

          +
          public void log(java.lang.String label)
          +
          Log a message stating how long the timer has been running
          +
        • +
        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          Returns a string indicating the current elapsed time of the timer.
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/util/Range.html b/doc/javadoc/com/qualcomm/robotcore/util/Range.html new file mode 100644 index 00000000000..c67a0ec686d --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/util/Range.html @@ -0,0 +1,444 @@ + + + + + +Range + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.util
    +

    Class Range

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.util.Range
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class Range
      +extends java.lang.Object
      +
      Utility class for performing range operations
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static byteclip(byte number, + byte min, + byte max) +
        clip 'number' if 'number' is less than 'min' or greater than 'max'
        +
        static doubleclip(double number, + double min, + double max) +
        clip 'number' if 'number' is less than 'min' or greater than 'max'
        +
        static floatclip(float number, + float min, + float max) +
        clip 'number' if 'number' is less than 'min' or greater than 'max'
        +
        static intclip(int number, + int min, + int max) +
        clip 'number' if 'number' is less than 'min' or greater than 'max'
        +
        static shortclip(short number, + short min, + short max) +
        clip 'number' if 'number' is less than 'min' or greater than 'max'
        +
        static doublescale(double n, + double x1, + double x2, + double y1, + double y2) +
        Scale a number in the range of x1 to x2, to the range of y1 to y2
        +
        static voidthrowIfRangeIsInvalid(double number, + double min, + double max) +
        Throw an IllegalArgumentException if 'number' is less than 'min' or greater than 'max'
        +
        static voidthrowIfRangeIsInvalid(int number, + int min, + int max) +
        Throw an IllegalArgumentException if 'number' is less than 'min' or greater than 'max'
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          scale

          +
          public static double scale(double n,
          +                           double x1,
          +                           double x2,
          +                           double y1,
          +                           double y2)
          +
          Scale a number in the range of x1 to x2, to the range of y1 to y2
          +
          +
          Parameters:
          +
          n - number to scale
          +
          x1 - lower bound range of n
          +
          x2 - upper bound range of n
          +
          y1 - lower bound of scale
          +
          y2 - upper bound of scale
          +
          Returns:
          +
          a double scaled to a value between y1 and y2, inclusive
          +
          +
        • +
        + + + +
          +
        • +

          clip

          +
          public static double clip(double number,
          +                          double min,
          +                          double max)
          +
          clip 'number' if 'number' is less than 'min' or greater than 'max'
          +
          +
          Parameters:
          +
          number - number to test
          +
          min - minimum value allowed
          +
          max - maximum value allowed
          +
          +
        • +
        + + + +
          +
        • +

          clip

          +
          public static float clip(float number,
          +                         float min,
          +                         float max)
          +
          clip 'number' if 'number' is less than 'min' or greater than 'max'
          +
          +
          Parameters:
          +
          number - number to test
          +
          min - minimum value allowed
          +
          max - maximum value allowed
          +
          +
        • +
        + + + +
          +
        • +

          clip

          +
          public static int clip(int number,
          +                       int min,
          +                       int max)
          +
          clip 'number' if 'number' is less than 'min' or greater than 'max'
          +
          +
          Parameters:
          +
          number - number to test
          +
          min - minimum value allowed
          +
          max - maximum value allowed
          +
          +
        • +
        + + + +
          +
        • +

          clip

          +
          public static short clip(short number,
          +                         short min,
          +                         short max)
          +
          clip 'number' if 'number' is less than 'min' or greater than 'max'
          +
          +
          Parameters:
          +
          number - number to test
          +
          min - minimum value allowed
          +
          max - maximum value allowed
          +
          +
        • +
        + + + +
          +
        • +

          clip

          +
          public static byte clip(byte number,
          +                        byte min,
          +                        byte max)
          +
          clip 'number' if 'number' is less than 'min' or greater than 'max'
          +
          +
          Parameters:
          +
          number - number to test
          +
          min - minimum value allowed
          +
          max - maximum value allowed
          +
          +
        • +
        + + + +
          +
        • +

          throwIfRangeIsInvalid

          +
          public static void throwIfRangeIsInvalid(double number,
          +                                         double min,
          +                                         double max)
          +                                  throws java.lang.IllegalArgumentException
          +
          Throw an IllegalArgumentException if 'number' is less than 'min' or greater than 'max'
          +
          +
          Parameters:
          +
          number - number to test
          +
          min - minimum value allowed
          +
          max - maximum value allowed
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if number is outside of range
          +
          +
        • +
        + + + +
          +
        • +

          throwIfRangeIsInvalid

          +
          public static void throwIfRangeIsInvalid(int number,
          +                                         int min,
          +                                         int max)
          +                                  throws java.lang.IllegalArgumentException
          +
          Throw an IllegalArgumentException if 'number' is less than 'min' or greater than 'max'
          +
          +
          Parameters:
          +
          number - number to test
          +
          min - minimum value allowed
          +
          max - maximum value allowed
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if number is outside of range
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/util/SerialNumber.html b/doc/javadoc/com/qualcomm/robotcore/util/SerialNumber.html new file mode 100644 index 00000000000..45c06689385 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/util/SerialNumber.html @@ -0,0 +1,689 @@ + + + + + +SerialNumber + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.util
    +

    Class SerialNumber

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.util.SerialNumber
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable
      +
      +
      +
      +
      public abstract class SerialNumber
      +extends java.lang.Object
      +implements java.io.Serializable
      +
      Instances of SerialNumber represent serial number indentifiers of hardware devices. For + USB-attached devices, these are usually the low-level USB serial number (see UsbDevice.getSerialNumber(), + but that is not required. Rather, the notion of SerialNumber is a general purpose one + representing a user-visible digital identity for a particular device instance. + + 'Fake' serial numbers are serial numbers that will *never* appear for a real device; they + are useful, for example, as the serial number of a ControllerConfiguration that + has not yet been associated with a actual controller device. Fake serial numbers are never + shown to users. + + Note that *all* serial numbers loaded in memory at any given instant are guaranteed unique and + different, even the fake ones; this allows code that processes USB-device-bound ControllerConfigurations to operate easily on unbound ones as well, a significant coding + simplification. The technology used in fake serial numbers, UUIDs, in fact guarantees + uniqueness across space and time, so fake serial numbers can be recorded persistently and + still maintain uniqueness. Historically, non-unique 'fake' serial numbers were also used: these + appeared int the form of "-1" or "N/A". When loaded from persistent storage, such legacy + fake serial numbers are converted to unique ones to maintain the uniqueness guarantee.
      +
      +
      See Also:
      +
      Serialized Form
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          fakePrefix

          +
          protected static final java.lang.String fakePrefix
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          vendorProductPrefix

          +
          protected static final java.lang.String vendorProductPrefix
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          lynxModulePrefix

          +
          protected static final java.lang.String lynxModulePrefix
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          embedded

          +
          protected static final java.lang.String embedded
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          serialNumberString

          +
          protected final java.lang.String serialNumberString
          +
        • +
        + + + +
          +
        • +

          deviceDisplayNames

          +
          protected static final java.util.HashMap<java.lang.String,java.lang.String> deviceDisplayNames
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          SerialNumber

          +
          protected SerialNumber(java.lang.String serialNumberString)
          +
          Constructs a serial number using the supplied initialization string. If the initialization + string is a legacy form of fake serial number, a unique fake serial number is created.
          +
          +
          Parameters:
          +
          serialNumberString - the initialization string for the serial number.
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          createFake

          +
          public static SerialNumber createFake()
          +
        • +
        + + + +
          +
        • +

          createEmbedded

          +
          public static SerialNumber createEmbedded()
          +
        • +
        + + + +
          +
        • +

          fromString

          +
          public static SerialNumber fromString(java.lang.String serialNumberString)
          +
        • +
        + + + +
          +
        • +

          fromStringOrNull

          +
          public static SerialNumber fromStringOrNull(java.lang.String serialNumberString)
          +
        • +
        + + + +
          +
        • +

          fromUsbOrNull

          +
          public static SerialNumber fromUsbOrNull(java.lang.String serialNumberString)
          +
        • +
        + + + +
          +
        • +

          fromVidPid

          +
          public static SerialNumber fromVidPid(int vid,
          +                                      int pid,
          +                                      java.lang.String connectionPath)
          +
          Makes up a serial-number-like-thing for USB devices that internally lack a serial number.
          +
        • +
        + + + +
          +
        • +

          isVendorProduct

          +
          public boolean isVendorProduct()
          +
        • +
        + + + +
          +
        • +

          isFake

          +
          public boolean isFake()
          +
          Returns whether the indicated serial number is one of the legacy + fake serial number forms or not.
          +
          +
          Returns:
          +
          whether the the serial number is a legacy fake form of serial number
          +
          +
        • +
        + + + +
          +
        • +

          isUsb

          +
          public boolean isUsb()
          +
          Returns whether the serial number is one of an actual USB device.
          +
        • +
        + + + +
          +
        • +

          isEmbedded

          +
          public boolean isEmbedded()
          +
          Returns whether the serial number is the one used for the embedded + Expansion Hub inside a Rev Control Hub.
          +
        • +
        + + + +
          +
        • +

          getString

          +
          public java.lang.String getString()
          +
          Returns the string contents of the serial number. Result is not intended to be + displayed to humans.
          +
          +
          See Also:
          +
          Object.toString()
          +
          +
        • +
        + + + +
          +
        • +

          getScannableDeviceSerialNumber

          +
          public SerialNumber getScannableDeviceSerialNumber()
          +
          Returns the SerialNumber of the device associated with this one that would appear + in a ScannedDevices.
          +
        • +
        + + + +
          +
        • +

          matches

          +
          public boolean matches(java.lang.Object pattern)
          +
        • +
        + + + +
          +
        • +

          equals

          +
          public boolean equals(java.lang.Object object)
          +
          +
          Overrides:
          +
          equals in class java.lang.Object
          +
          +
        • +
        + + + +
          +
        • +

          equals

          +
          public boolean equals(java.lang.String string)
          +
        • +
        + + + +
          +
        • +

          hashCode

          +
          public int hashCode()
          +
          +
          Overrides:
          +
          hashCode in class java.lang.Object
          +
          +
        • +
        + + + +
          +
        • +

          noteSerialNumberType

          +
          public static void noteSerialNumberType(SerialNumber serialNumber,
          +                                        java.lang.String typeName)
          +
        • +
        + + + +
          +
        • +

          getDeviceDisplayName

          +
          public static java.lang.String getDeviceDisplayName(SerialNumber serialNumber)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/util/TypeConversion.html b/doc/javadoc/com/qualcomm/robotcore/util/TypeConversion.html new file mode 100644 index 00000000000..ffc65c958d9 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/util/TypeConversion.html @@ -0,0 +1,734 @@ + + + + + +TypeConversion + + + + + + + + + + + +
    +
    com.qualcomm.robotcore.util
    +

    Class TypeConversion

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • com.qualcomm.robotcore.util.TypeConversion
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class TypeConversion
      +extends java.lang.Object
      +
      Utility class for performing type conversions
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static intbyteArrayToInt(byte[] byteArray) +
        convert a byte array into an int; big endian is assumed
        +
        static intbyteArrayToInt(byte[] byteArray, + java.nio.ByteOrder byteOrder) +
        convert a byte array into an int
        +
        static longbyteArrayToLong(byte[] byteArray) +
        convert a byte array into a long; big endian is assumed
        +
        static longbyteArrayToLong(byte[] byteArray, + java.nio.ByteOrder byteOrder) +
        convert a byte array into a long
        +
        static shortbyteArrayToShort(byte[] byteArray) +
        convert a byte array into a short; big endian is assumed
        +
        static shortbyteArrayToShort(byte[] byteArray, + java.nio.ByteOrder byteOrder) +
        convert a byte array into a short
        +
        static shortbyteArrayToShort(byte[] byteArray, + int ibFirst, + java.nio.ByteOrder byteOrder) 
        static doubledoubleFromFixed(int value, + int fractionBits) 
        static doubledoubleFromFixed(long value, + int fractionBits) 
        static intdoubleToFixedInt(double value, + int fractionBits) 
        static longdoubleToFixedLong(double value, + int fractionBits) 
        static byte[]intToByteArray(int integer) +
        convert an int into a byte array; big endian is assumed
        +
        static byte[]intToByteArray(int integer, + java.nio.ByteOrder byteOrder) +
        convert an int into a byte array
        +
        static byte[]longToByteArray(long longInt) +
        convert a long into a byte array; big endian is assumed
        +
        static byte[]longToByteArray(long longInt, + java.nio.ByteOrder byteOrder) +
        convert a long into a byte array
        +
        static byte[]shortToByteArray(short shortInt) +
        convert a short into a byte array; big endian is assumed
        +
        static byte[]shortToByteArray(short shortInt, + java.nio.ByteOrder byteOrder) +
        convert a short into a byte array
        +
        static byte[]stringToUtf8(java.lang.String javaString) +
        Convert a Java String into a UTF-8 byte array
        +
        static booleantoBoolean(java.lang.Boolean value) 
        static booleantoBoolean(java.lang.Boolean value, + boolean defaultValue) 
        static doubleunsignedByteToDouble(byte b) +
        Accept a byte, treat that byte as an unsigned byte, then covert it to the return type
        +
        static intunsignedByteToInt(byte b) +
        Accept a byte, treat that byte as an unsigned byte, then covert it to the return type
        +
        static longunsignedIntToLong(int i) +
        Accept an int, treat that int as an unsigned int, then covert it to the return type
        +
        static intunsignedShortToInt(short s) +
        Treats a short as an unsigned value and returns that value as a int
        +
        static java.lang.Stringutf8ToString(byte[] utf8String) 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          shortToByteArray

          +
          public static byte[] shortToByteArray(short shortInt)
          +
          convert a short into a byte array; big endian is assumed
          +
          +
          Parameters:
          +
          shortInt -
          +
          Returns:
          +
          byte array
          +
          +
        • +
        + + + +
          +
        • +

          shortToByteArray

          +
          public static byte[] shortToByteArray(short shortInt,
          +                                      java.nio.ByteOrder byteOrder)
          +
          convert a short into a byte array
          +
          +
          Parameters:
          +
          shortInt -
          +
          byteOrder -
          +
          Returns:
          +
          byte array
          +
          +
        • +
        + + + +
          +
        • +

          intToByteArray

          +
          public static byte[] intToByteArray(int integer)
          +
          convert an int into a byte array; big endian is assumed
          +
          +
          Parameters:
          +
          integer -
          +
          Returns:
          +
          byte array
          +
          +
        • +
        + + + +
          +
        • +

          intToByteArray

          +
          public static byte[] intToByteArray(int integer,
          +                                    java.nio.ByteOrder byteOrder)
          +
          convert an int into a byte array
          +
          +
          Parameters:
          +
          integer -
          +
          byteOrder -
          +
          Returns:
          +
          byte array
          +
          +
        • +
        + + + +
          +
        • +

          longToByteArray

          +
          public static byte[] longToByteArray(long longInt)
          +
          convert a long into a byte array; big endian is assumed
          +
          +
          Parameters:
          +
          longInt -
          +
          Returns:
          +
          byte array
          +
          +
        • +
        + + + +
          +
        • +

          longToByteArray

          +
          public static byte[] longToByteArray(long longInt,
          +                                     java.nio.ByteOrder byteOrder)
          +
          convert a long into a byte array
          +
          +
          Parameters:
          +
          longInt -
          +
          byteOrder -
          +
          Returns:
          +
          byte array
          +
          +
        • +
        + + + +
          +
        • +

          byteArrayToShort

          +
          public static short byteArrayToShort(byte[] byteArray)
          +
          convert a byte array into a short; big endian is assumed
          +
          +
          Parameters:
          +
          byteArray -
          +
          Returns:
          +
          byte array
          +
          +
        • +
        + + + +
          +
        • +

          byteArrayToShort

          +
          public static short byteArrayToShort(byte[] byteArray,
          +                                     java.nio.ByteOrder byteOrder)
          +
          convert a byte array into a short
          +
          +
          Parameters:
          +
          byteArray -
          +
          byteOrder -
          +
          Returns:
          +
          byte array
          +
          +
        • +
        + + + +
          +
        • +

          byteArrayToShort

          +
          public static short byteArrayToShort(byte[] byteArray,
          +                                     int ibFirst,
          +                                     java.nio.ByteOrder byteOrder)
          +
        • +
        + + + +
          +
        • +

          byteArrayToInt

          +
          public static int byteArrayToInt(byte[] byteArray)
          +
          convert a byte array into an int; big endian is assumed
          +
          +
          Parameters:
          +
          byteArray -
          +
          Returns:
          +
          an integer
          +
          +
        • +
        + + + +
          +
        • +

          byteArrayToInt

          +
          public static int byteArrayToInt(byte[] byteArray,
          +                                 java.nio.ByteOrder byteOrder)
          +
          convert a byte array into an int
          +
          +
          Parameters:
          +
          byteArray -
          +
          byteOrder -
          +
          Returns:
          +
          an integer
          +
          +
        • +
        + + + +
          +
        • +

          byteArrayToLong

          +
          public static long byteArrayToLong(byte[] byteArray)
          +
          convert a byte array into a long; big endian is assumed
          +
          +
          Parameters:
          +
          byteArray -
          +
          Returns:
          +
          an integer
          +
          +
        • +
        + + + +
          +
        • +

          byteArrayToLong

          +
          public static long byteArrayToLong(byte[] byteArray,
          +                                   java.nio.ByteOrder byteOrder)
          +
          convert a byte array into a long
          +
          +
          Parameters:
          +
          byteArray -
          +
          byteOrder -
          +
          Returns:
          +
          a long
          +
          +
        • +
        + + + +
          +
        • +

          unsignedByteToInt

          +
          public static int unsignedByteToInt(byte b)
          +
          Accept a byte, treat that byte as an unsigned byte, then covert it to the return type
          +
          +
          Parameters:
          +
          b - byte to treat as unsigned byte
          +
          Returns:
          +
          a positive value between 0 and 255
          +
          +
        • +
        + + + +
          +
        • +

          unsignedShortToInt

          +
          public static int unsignedShortToInt(short s)
          +
          Treats a short as an unsigned value and returns that value as a int
          +
          +
          Parameters:
          +
          s - the short to be converted to an int
          +
          Returns:
          +
          a positive value between 0 and 65535
          +
          +
        • +
        + + + +
          +
        • +

          unsignedByteToDouble

          +
          public static double unsignedByteToDouble(byte b)
          +
          Accept a byte, treat that byte as an unsigned byte, then covert it to the return type
          +
          +
          Parameters:
          +
          b - byte to treat as unsigned byte
          +
          Returns:
          +
          a positive between 0 and 255
          +
          +
        • +
        + + + +
          +
        • +

          unsignedIntToLong

          +
          public static long unsignedIntToLong(int i)
          +
          Accept an int, treat that int as an unsigned int, then covert it to the return type
          +
          +
          Parameters:
          +
          i - int to treat as unsigned int
          +
          Returns:
          +
          a positive between 0 and 2^32
          +
          +
        • +
        + + + +
          +
        • +

          stringToUtf8

          +
          public static byte[] stringToUtf8(java.lang.String javaString)
          +
          Convert a Java String into a UTF-8 byte array
          +
          +
          Parameters:
          +
          javaString - Java String to convert
          +
          Returns:
          +
          UTF-8 byte array
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if unable to cleanly convert the Java String
          +
          +
        • +
        + + + +
          +
        • +

          doubleToFixedInt

          +
          public static int doubleToFixedInt(double value,
          +                                   int fractionBits)
          +
        • +
        + + + +
          +
        • +

          doubleFromFixed

          +
          public static double doubleFromFixed(int value,
          +                                     int fractionBits)
          +
        • +
        + + + +
          +
        • +

          doubleToFixedLong

          +
          public static long doubleToFixedLong(double value,
          +                                     int fractionBits)
          +
        • +
        + + + +
          +
        • +

          doubleFromFixed

          +
          public static double doubleFromFixed(long value,
          +                                     int fractionBits)
          +
        • +
        + + + +
          +
        • +

          utf8ToString

          +
          public static java.lang.String utf8ToString(byte[] utf8String)
          +
        • +
        + + + +
          +
        • +

          toBoolean

          +
          public static boolean toBoolean(java.lang.Boolean value)
          +
        • +
        + + + +
          +
        • +

          toBoolean

          +
          public static boolean toBoolean(java.lang.Boolean value,
          +                                boolean defaultValue)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/util/package-frame.html b/doc/javadoc/com/qualcomm/robotcore/util/package-frame.html new file mode 100644 index 00000000000..7cb5186740f --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/util/package-frame.html @@ -0,0 +1,26 @@ + + + + + +com.qualcomm.robotcore.util + + + + +

    com.qualcomm.robotcore.util

    + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/util/package-summary.html b/doc/javadoc/com/qualcomm/robotcore/util/package-summary.html new file mode 100644 index 00000000000..2f77917cd98 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/util/package-summary.html @@ -0,0 +1,176 @@ + + + + + +com.qualcomm.robotcore.util + + + + + + + + + + +
    +

    Package com.qualcomm.robotcore.util

    +
    +
    +
      +
    • + + + + + + + + + + + + + + + + + + + + + + + + +
      Class Summary 
      ClassDescription
      ElapsedTime +
      The ElapsedTime class provides a simple handy timer to measure elapsed time intervals.
      +
      Range +
      Utility class for performing range operations
      +
      SerialNumber +
      Instances of SerialNumber represent serial number indentifiers of hardware devices.
      +
      TypeConversion +
      Utility class for performing type conversions
      +
      +
    • +
    • + + + + + + + + + + + + +
      Enum Summary 
      EnumDescription
      ElapsedTime.Resolution +
      An indicator of the resolution of a timer.
      +
      +
    • +
    +
    + + + + + + diff --git a/doc/javadoc/com/qualcomm/robotcore/util/package-tree.html b/doc/javadoc/com/qualcomm/robotcore/util/package-tree.html new file mode 100644 index 00000000000..c7a8e27fba8 --- /dev/null +++ b/doc/javadoc/com/qualcomm/robotcore/util/package-tree.html @@ -0,0 +1,149 @@ + + + + + +com.qualcomm.robotcore.util Class Hierarchy + + + + + + + + + + +
    +

    Hierarchy For Package com.qualcomm.robotcore.util

    +Package Hierarchies: + +
    +
    +

    Class Hierarchy

    +
      +
    • java.lang.Object + +
    • +
    +

    Enum Hierarchy

    +
      +
    • java.lang.Object +
        +
      • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
      • +
      +
    • +
    +
    + + + + + + diff --git a/doc/javadoc/constant-values.html b/doc/javadoc/constant-values.html new file mode 100644 index 00000000000..d3d581282ab --- /dev/null +++ b/doc/javadoc/constant-values.html @@ -0,0 +1,1392 @@ + + + + + +Constant Field Values + + + + + + + + + + +
    +

    Constant Field Values

    +

    Contents

    + +
    +
    + + +

    com.qualcomm.*

    + + +
      +
    • + + + + + + + + + + + + + + +
      com.qualcomm.robotcore.eventloop.opmode.OpModeManager 
      Modifier and TypeConstant FieldValue
      + +public static final java.lang.StringDEFAULT_OP_MODE_NAME"$Stop$Robot$"
      +
    • +
    + +
      +
    • + + + + + + + + + + + + + + + + + + + +
      com.qualcomm.robotcore.util.ElapsedTime 
      Modifier and TypeConstant FieldValue
      + +public static final longMILLIS_IN_NANO1000000L
      + +public static final longSECOND_IN_NANO1000000000L
      +
    • +
    • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      com.qualcomm.robotcore.util.SerialNumber 
      Modifier and TypeConstant FieldValue
      + +protected static final java.lang.Stringembedded"(embedded)"
      + +protected static final java.lang.StringfakePrefix"FakeUSB:"
      + +protected static final java.lang.StringlynxModulePrefix"ExpHub:"
      + +protected static final java.lang.StringvendorProductPrefix"VendorProduct:"
      +
    • +
    + + + +

    org.firstinspires.*

    +
      +
    • + + + + + + + + + + + + + + +
      org.firstinspires.ftc.robotcore.external.navigation.Acceleration 
      Modifier and TypeConstant FieldValue
      + +public static final doubleearthGravity9.80665
      +
    • +
    • + + + + + + + + + + + + + + + + + + + +
      org.firstinspires.ftc.robotcore.external.navigation.AngleUnit 
      Modifier and TypeConstant FieldValue
      + +public static final floatPif3.1415927410125732f
      + +protected static final doubleTwoPi6.283185307179586
      +
    • +
    • + + + + + + + + + + + + + + + + + + + + + + + + +
      org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit 
      Modifier and TypeConstant FieldValue
      + +public static final doubleinfinity1.7976931348623157E308
      + +public static final doublemmPerInch25.4
      + +public static final doublemPerInch0.0254
      +
    • +
    • + + + + + + + + + + + + + + + + + + + + + + + + +
      org.firstinspires.ftc.robotcore.external.navigation.TempUnit 
      Modifier and TypeConstant FieldValue
      + +public static final doubleCperF0.5555555555555556
      + +public static final doublezeroCelsiusF32.0
      + +public static final doublezeroCelsiusK273.15
      +
    • +
    • + + + + + + + + + + + + + + + + + + + +
      org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase 
      Modifier and TypeConstant FieldValue
      + +public static final floatMM_FTC_FIELD_WIDTH3606.800048828125f
      + +public static final floatMM_PER_INCH25.399999618530273f
      +
    • +
    • + + + + + + + + + + + + + + +
      org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener 
      Modifier and TypeConstant FieldValue
      + +public static final java.lang.StringTAG"Vuforia"
      +
    • +
    +
    + + + + + + diff --git a/doc/javadoc/deprecated-list.html b/doc/javadoc/deprecated-list.html new file mode 100644 index 00000000000..c68eb206ec1 --- /dev/null +++ b/doc/javadoc/deprecated-list.html @@ -0,0 +1,403 @@ + + + + + +Deprecated List + + + + + + + +
    + + + + + + + +
    + + + +
    + + + + + + + + + + + + + + + +
    + +
    + + + + + + + +
    + + + + diff --git a/doc/javadoc/help-doc.html b/doc/javadoc/help-doc.html new file mode 100644 index 00000000000..d4b59da43b4 --- /dev/null +++ b/doc/javadoc/help-doc.html @@ -0,0 +1,222 @@ + + + + + +API Help + + + + + + + +
    + + + + + + + +
    + + +
    +

    How This API Document Is Organized

    +
    This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
    +
    +
    +
      +
    • +

      Overview

      +

      The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

      +
    • +
    • +

      Package

      +

      Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

      +
        +
      • Interfaces (italic)
      • +
      • Classes
      • +
      • Enums
      • +
      • Exceptions
      • +
      • Errors
      • +
      • Annotation Types
      • +
      +
    • +
    • +

      Class/Interface

      +

      Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

      +
        +
      • Class inheritance diagram
      • +
      • Direct Subclasses
      • +
      • All Known Subinterfaces
      • +
      • All Known Implementing Classes
      • +
      • Class/interface declaration
      • +
      • Class/interface description
      • +
      +
        +
      • Nested Class Summary
      • +
      • Field Summary
      • +
      • Constructor Summary
      • +
      • Method Summary
      • +
      +
        +
      • Field Detail
      • +
      • Constructor Detail
      • +
      • Method Detail
      • +
      +

      Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

      +
    • +
    • +

      Annotation Type

      +

      Each annotation type has its own separate page with the following sections:

      +
        +
      • Annotation Type declaration
      • +
      • Annotation Type description
      • +
      • Required Element Summary
      • +
      • Optional Element Summary
      • +
      • Element Detail
      • +
      +
    • +
    • +

      Enum

      +

      Each enum has its own separate page with the following sections:

      +
        +
      • Enum declaration
      • +
      • Enum description
      • +
      • Enum Constant Summary
      • +
      • Enum Constant Detail
      • +
      +
    • +
    • +

      Tree (Class Hierarchy)

      +

      There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

      +
        +
      • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
      • +
      • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
      • +
      +
    • +
    • +

      Deprecated API

      +

      The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

      +
    • +
    • +

      Index

      +

      The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

      +
    • +
    • +

      Prev/Next

      +

      These links take you to the next or previous class, interface, package, or related page.

      +
    • +
    • +

      Frames/No Frames

      +

      These links show and hide the HTML frames. All pages are available with or without frames.

      +
    • +
    • +

      All Classes

      +

      The All Classes link shows all classes and interfaces except non-static nested types.

      +
    • +
    • +

      Serialized Form

      +

      Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

      +
    • +
    • +

      Constant Field Values

      +

      The Constant Field Values page lists the static final fields and their values.

      +
    • +
    +This help file applies to API documentation generated using the standard doclet.
    + +
    + + + + + + + +
    + + + + diff --git a/doc/javadoc/index-all.html b/doc/javadoc/index-all.html new file mode 100644 index 00000000000..b62dcbd953f --- /dev/null +++ b/doc/javadoc/index-all.html @@ -0,0 +1,9083 @@ + + + + + +Index + + + + + + + +
    + + + + + + + +
    + + +
    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z  + + +

    A

    +
    +
    a - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    button a
    +
    +
    aboutFragment - Variable in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    AboutFragment() - Constructor for class com.qualcomm.ftccommon.FtcAboutActivity.AboutFragment
    +
     
    +
    Acceleration - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Instances of Acceleration represent the second derivative of Position over time.
    +
    +
    Acceleration() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.Acceleration
    +
     
    +
    Acceleration(DistanceUnit, double, double, double, long) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.Acceleration
    +
     
    +
    AccelerationSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Acceleration Sensor
    +
    +
    accelerationSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    accept(T) - Method in interface org.firstinspires.ftc.robotcore.external.Consumer
    +
    +
    Performs this operation on the given argument.
    +
    +
    acquireReaderLockShared() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    acquisitionTime - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Acceleration
    +
    +
    the time on the System.nanoTime() clock at which the data was acquired.
    +
    +
    acquisitionTime - Variable in class org.firstinspires.ftc.robotcore.external.navigation.AngularVelocity
    +
    +
    the time on the System.nanoTime() clock at which the data was acquired.
    +
    +
    acquisitionTime - Variable in class org.firstinspires.ftc.robotcore.external.navigation.MagneticFlux
    +
    +
    the time on the System.nanoTime() clock at which the data was acquired.
    +
    +
    acquisitionTime - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    the time on the System.nanoTime() clock at which the data was acquired.
    +
    +
    acquisitionTime - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Position
    +
    +
    the time on the System.nanoTime() clock at which the data was acquired.
    +
    +
    acquisitionTime - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Quaternion
    +
    +
    the time on the System.nanoTime() clock at which the data was acquired.
    +
    +
    acquisitionTime - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Temperature
    +
    +
    the time on the System.nanoTime() clock at which the data was acquired.
    +
    +
    acquisitionTime - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Velocity
    +
    +
    the time on the System.nanoTime() clock at which the data was acquired.
    +
    +
    activate() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
    +
    Activates all trackables, so that it is actively seeking their presence.
    +
    +
    activate() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackables
    +
    +
    Activates this trackables so that its localizer is actively seeking the presence + of the trackables that it contains.
    +
    +
    activity - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    The activity in which the localizer is to run.
    +
    +
    activityContext - Variable in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    adaptHomogeneous(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Automatically adapts vectors to and from homogeneous coordinates according to the + size of the receiver matrix.
    +
    +
    add(USBAccessibleLynxModule, List<Integer>) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModuleList
    +
     
    +
    add(MatrixF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Adds a matrix, in place, to the receiver
    +
    +
    add(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    add(float[]) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    add(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    add(String) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Log
    +
    +
    Adds a new entry the the log.
    +
    +
    add(String, Object...) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Log
    +
    +
    Adds a new entry to the log.
    +
    +
    addAction(Runnable) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    In addition to items and lines, a telemetry may also contain a list of actions.
    +
    +
    addData(String, String, Object...) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Adds an item to the end of the telemetry being built for driver station display.
    +
    +
    addData(String, Object) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Adds an item to the end if the telemetry being built for driver station display.
    +
    +
    addData(String, Func<T>) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Adds an item to the end of the telemetry being built for driver station display.
    +
    +
    addData(String, String, Func<T>) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Adds an item to the end of the telemetry being built for driver station display.
    +
    +
    addData(String, String, Object...) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Item
    +
    +
    Adds a new data item in the associated Telemetry immediately following the receiver.
    +
    +
    addData(String, Object) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Item
    +
    +
    Adds a new data item in the associated Telemetry immediately following the receiver.
    +
    +
    addData(String, Func<T>) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Item
    +
    +
    Adds a new data item in the associated Telemetry immediately following the receiver.
    +
    +
    addData(String, String, Func<T>) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Item
    +
    +
    Adds a new data item in the associated Telemetry immediately following the receiver.
    +
    +
    addData(String, String, Object...) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Line
    +
    +
    Adds a new data item at the end of the line which is the receiver.
    +
    +
    addData(String, Object) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Line
    +
    +
    Adds a new data item at the end of the line which is the receiver.
    +
    +
    addData(String, Func<T>) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Line
    +
    +
    Adds a new data item at the end of the line which is the receiver.
    +
    +
    addData(String, String, Func<T>) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Line
    +
    +
    Adds a new data item at the end of the line which is the receiver.
    +
    +
    added(MatrixF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a new matrix whose elements are the sum of the corresponding elements of + the receiver and the addend
    +
    +
    added(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    added(float[]) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    added(MatrixF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
    +
    Adds this vector, taken as a row vector against, to the indicated matrix.
    +
    +
    added(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    addLine() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Creates and returns a new line in the receiver Telemetry.
    +
    +
    addLine(String) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Creates and returns a new line in the receiver Telemetry.
    +
    +
    addRef(SoundPlayer.SoundInfo) - Static method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    address - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName
    +
     
    +
    AddressAndDisplayName(int, boolean) - Constructor for class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName
    +
     
    +
    AddressChange() - Constructor for class com.qualcomm.ftccommon.CommandList.LynxAddressChangeRequest.AddressChange
    +
     
    +
    AddressConfiguration() - Constructor for class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressConfiguration
    +
     
    +
    AddressConfiguration(List<USBAccessibleLynxModule>) - Constructor for class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressConfiguration
    +
     
    +
    addToHistoryQueue(TimestampedI2cData) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    addToHistoryQueue(TimestampedI2cData) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchReadHistoryImpl
    +
     
    +
    addTrackable(VuforiaTrackable) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable.Listener
    +
    +
    Adds a trackable on which this VuforiaTrackable.Listener is listening.
    +
    +
    addTrackable(VuforiaTrackable) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    addTransition(StateTransition) - Method in class org.firstinspires.ftc.robotcore.external.StateMachine
    +
    +
    addTransition + + Adds a transition to the state machine.
    +
    +
    addWebcamCalibrationFile(String) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
     
    +
    addWebcamCalibrationFile(File) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
     
    +
    adjustAngularRate(double) - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    adjustHooking() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    adjustHooking() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    adjustPosition(int) - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    adjustPower(double) - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    ahsvToColor(int, float, float, float) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    algorithm - Variable in class com.qualcomm.robotcore.hardware.PIDFCoefficients
    +
     
    +
    allDeviceMappings - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    allDevicesList - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    allDevicesMap - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    alpha() - Method in interface com.qualcomm.robotcore.hardware.ColorSensor
    +
    +
    Get the amount of light detected by the sensor as an int.
    +
    +
    alpha - Variable in class com.qualcomm.robotcore.hardware.NormalizedRGBA
    +
    +
    normalized alpha value, in range [0,1)
    +
    +
    AnalogInput - Class in com.qualcomm.robotcore.hardware
    +
    +
    Control a single analog device
    +
    +
    AnalogInput(AnalogInputController, int) - Constructor for class com.qualcomm.robotcore.hardware.AnalogInput
    +
    +
    Constructor
    +
    +
    analogInput - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    AnalogInputController - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Interface for working with Analog Controllers
    +
    +
    AnalogOutput - Class in com.qualcomm.robotcore.hardware
    +
    +
    Control a single analog device
    +
    +
    AnalogOutput(AnalogOutputController, int) - Constructor for class com.qualcomm.robotcore.hardware.AnalogOutput
    +
    +
    Constructor
    +
    +
    analogOutput - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    AnalogOutputController - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Interface for working with Analog Controllers
    +
    +
    AnalogSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Instances of this interface are sensors whose input is reported as a voltage level + to an analog to digital converter.
    +
    +
    AndroidAccelerometer - Class in org.firstinspires.ftc.robotcore.external.android
    +
    +
    A class that provides access to the Android Accelerometer.
    +
    +
    AndroidAccelerometer() - Constructor for class org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
    +
     
    +
    AndroidGyroscope - Class in org.firstinspires.ftc.robotcore.external.android
    +
    +
    A class that provides access to the Android Gyroscope.
    +
    +
    AndroidGyroscope() - Constructor for class org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
    +
     
    +
    AndroidOrientation - Class in org.firstinspires.ftc.robotcore.external.android
    +
    +
    A class that provides access to the Android sensors for Orientation.
    +
    +
    AndroidOrientation() - Constructor for class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
     
    +
    AndroidSoundPool - Class in org.firstinspires.ftc.robotcore.external.android
    +
    +
    A class that provides access to the Android SoundPool.
    +
    +
    AndroidSoundPool() - Constructor for class org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
    +
     
    +
    AndroidTextToSpeech - Class in org.firstinspires.ftc.robotcore.external.android
    +
    +
    A class that provides access to the Android TextToSpeech.
    +
    +
    AndroidTextToSpeech() - Constructor for class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
     
    +
    AngleUnit - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    An AngleUnit represents angles in different units of measure and + provides utility methods to convert across units.
    +
    +
    angleUnit - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    the unit in which the angles are expressed
    +
    +
    AngularVelocity - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Instances of AngularVelocity represent an instantaneous body-referenced 3D rotation rate.
    +
    +
    AngularVelocity() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.AngularVelocity
    +
     
    +
    AngularVelocity(AngleUnit, float, float, float, long) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.AngularVelocity
    +
     
    +
    AnnotatedOpModeManager - Interface in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    OpModeManager instances are used as part of a decentralized OpMode registration + mechanism.
    +
    +
    AnnotatedOpModeRegistrar - Class in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    Deprecated. +
    The function formerly performed by this class is now automatically executed by the system
    +
    +
    +
    AnnotatedOpModeRegistrar() - Constructor for class com.qualcomm.robotcore.eventloop.opmode.AnnotatedOpModeRegistrar
    +
    +
    Deprecated.
    +
    apiPowerMax - Static variable in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    apiPowerMin - Static variable in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    apiServoPositionMax - Static variable in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    apiServoPositionMin - Static variable in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    appContext - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    apply(File) - Method in interface com.qualcomm.ftccommon.SoundPlayer.SoundFromFile
    +
     
    +
    apply(T) - Method in interface org.firstinspires.ftc.robotcore.external.Function
    +
     
    +
    argb() - Method in interface com.qualcomm.robotcore.hardware.ColorSensor
    +
    +
    Get the "hue"
    +
    +
    assignReadWindow(I2cDeviceSynch.ReadWindow) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    atRest() - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Are all analog sticks and triggers in their rest position?
    +
    +
    Autonomous - Annotation Type in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    Provides an easy and non-centralized way of determining the OpMode list + shown on an FTC Driver Station.
    +
    +
    availableFWUpdateResps - Variable in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    availableLynxImages - Variable in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    availableLynxModules - Variable in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    availableLynxModules - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    averageOfList(List) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    awaitResponse(BlockingQueue<T>, T) - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    awaitResponse(BlockingQueue<T>, T, long, TimeUnit, <any>) - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    awaitResponse(BlockingQueue<T>, T) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    awaitResponse(BlockingQueue<T>, T, long, TimeUnit) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    axes() - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AxesOrder
    +
    +
    Returns the axes associated with this AxesOrder.
    +
    +
    AxesOrder - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    AxesOrder indicates the chronological order of axes about which the three rotations + of an Orientation take place.
    +
    +
    axesOrder - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    the order of axes around which our three rotations occur
    +
    +
    AxesReference - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    AxesReference indicates whether we have intrinsic rotations, where the axes + move with the object that is rotating, or extrinsic rotations, where they remain fixed + in the world around the object.
    +
    +
    axesReference - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    whether we have extrinsic or intrinsic rotations
    +
    +
    Axis - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Axis enumerates the common X,Y,Z three-dimensional orthogonal axes.
    +
    +
    + + + +

    B

    +
    +
    b - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    button b
    +
    +
    back - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    button back
    +
    +
    Blinker - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Blinker provides the means to control an LED or a light that can be illuminated in a + sequenced pattern of colors and durations.
    +
    +
    Blinker.Step - Class in com.qualcomm.robotcore.hardware
    +
    +
    Blinker.Step represents a particular color held for a particular length of time.
    +
    +
    blue() - Method in interface com.qualcomm.robotcore.hardware.ColorSensor
    +
    +
    Get the Blue values detected by the sensor as an int.
    +
    +
    blue - Variable in class com.qualcomm.robotcore.hardware.NormalizedRGBA
    +
    +
    normalized blue value, in range [0,1)
    +
    +
    buildAndSendTelemetry(String, String) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    bVal - Variable in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    bVal - Variable in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    bVal - Variable in enum org.firstinspires.ftc.robotcore.external.navigation.TempUnit
    +
     
    +
    bVal - Variable in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
     
    +
    byteArrayToInt(byte[]) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    convert a byte array into an int; big endian is assumed
    +
    +
    byteArrayToInt(byte[], ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    convert a byte array into an int
    +
    +
    byteArrayToLong(byte[]) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    convert a byte array into a long; big endian is assumed
    +
    +
    byteArrayToLong(byte[], ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    convert a byte array into a long
    +
    +
    byteArrayToShort(byte[]) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    convert a byte array into a short; big endian is assumed
    +
    +
    byteArrayToShort(byte[], ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    convert a byte array into a short
    +
    +
    byteArrayToShort(byte[], int, ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
     
    +
    + + + +

    C

    +
    +
    calibrate() - Method in interface com.qualcomm.robotcore.hardware.GyroSensor
    +
    +
    Calibrate the gyro.
    +
    +
    calibrationFailed() - Method in interface com.qualcomm.robotcore.hardware.CompassSensor
    +
    +
    Check to see whether calibration was successful.
    +
    +
    call() - Method in interface org.firstinspires.ftc.robotcore.external.ThrowingCallable
    +
     
    +
    callback - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    Callback() - Constructor for class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    callback - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    callback - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    Callback() - Constructor for class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    callbackCount - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    callbackLock - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    callCallback() - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
     
    +
    camera - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    If non-null, then this indicates the Camera to use with Vuforia.
    +
    +
    cameraDirection - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    If VuforiaLocalizer.Parameters.camera is null and VuforiaLocalizer.Parameters.cameraName is the 'unknown' camera name, then + this value is used to indicate the camera to use with Vuforia.
    +
    +
    cameraMonitorFeedback - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    Indicates the style of camera monitoring feedback to use.
    +
    +
    cameraMonitorViewIdParent - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    The resource id of the view within VuforiaLocalizer.Parameters.activity that will be used + as the parent for a live monitor which provides feedback as to what the + camera is seeing.
    +
    +
    cameraMonitorViewParent - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    The view that will be used as the parent for a live monitor which provides + feedback as to what the the camera is seeing.
    +
    +
    cameraName - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    If VuforiaLocalizer.Parameters.camera is non-null, this value is ignored.
    +
    +
    cameraName - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.PoseAndCamera
    +
     
    +
    cameraNameBack - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    cameraNameFront - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    canBeUsedToRead() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Answers as to whether we're allowed to read using this window.
    +
    +
    cancelUpdate - Variable in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    canCreateTFObjectDetector() - Method in class org.firstinspires.ftc.robotcore.external.ClassFactory
    +
    +
    Return true if this device is compatible with TensorFlow Object Detection, false otherwise.
    +
    +
    cast(Object) - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
    +
    A small utility that assists in keeping the Java generics type system happy
    +
    +
    cbSize - Variable in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    changeAddress(SerialNumber, int) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModuleList
    +
     
    +
    checkForChangedOpModes() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    ClassFactory - Class in org.firstinspires.ftc.robotcore.external
    +
    +
    ClassFactory provides a means by which various objects in the SDK may be logically + instantiated without exposing their external class identities to user's programs.
    +
    +
    ClassFactory() - Constructor for class org.firstinspires.ftc.robotcore.external.ClassFactory
    +
     
    +
    ClassFactory.InstanceHolder - Class in org.firstinspires.ftc.robotcore.external
    +
     
    +
    ClassManagerFactory - Class in com.qualcomm.ftccommon
    +
    +
    A helper for classes that want to inspect the list of classes packaged with an APK.
    +
    +
    ClassManagerFactory() - Constructor for class com.qualcomm.ftccommon.ClassManagerFactory
    +
     
    +
    cleanMotionValues(float) - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
     
    +
    clear() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Removes all items from the receiver whose value is not to be retained.
    +
    +
    clear() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Log
    +
    +
    Removes all entries from this Telemetry.Log
    +
    +
    clearAll() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Removes all items, lines, and actions from the receiver
    +
    +
    clearI2cPortActionFlag(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Clears the port action flag, undoing the effect of previous setI2cPortActionFlag()
    +
    +
    clearI2cPortActionFlag() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Clears the flag that I2cDevice.setI2cPortActionFlag() sets
    +
    +
    clearI2cPortActionFlag() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    clearWhitelistFilter() - Static method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Clear the device whitelist filter.
    +
    +
    CLIENT_CONNECTED - Static variable in class com.qualcomm.ftccommon.FtcAdvancedRCSettingsActivity
    +
     
    +
    clientConnected - Variable in class com.qualcomm.ftccommon.FtcAdvancedRCSettingsActivity.SettingsFragment
    +
     
    +
    clip(double, double, double) - Static method in class com.qualcomm.robotcore.util.Range
    +
    +
    clip 'number' if 'number' is less than 'min' or greater than 'max'
    +
    +
    clip(float, float, float) - Static method in class com.qualcomm.robotcore.util.Range
    +
    +
    clip 'number' if 'number' is less than 'min' or greater than 'max'
    +
    +
    clip(int, int, int) - Static method in class com.qualcomm.robotcore.util.Range
    +
    +
    clip 'number' if 'number' is less than 'min' or greater than 'max'
    +
    +
    clip(short, short, short) - Static method in class com.qualcomm.robotcore.util.Range
    +
    +
    clip 'number' if 'number' is less than 'min' or greater than 'max'
    +
    +
    clip(byte, byte, byte) - Static method in class com.qualcomm.robotcore.util.Range
    +
    +
    clip 'number' if 'number' is less than 'min' or greater than 'max'
    +
    +
    close() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase.LynxUsbDeviceContainer
    +
     
    +
    close() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    close() - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    close() - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.AnalogInput
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.AnalogOutput
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.DigitalChannelImpl
    +
     
    +
    close() - Method in interface com.qualcomm.robotcore.hardware.HardwareDevice
    +
    +
    Closes this device
    +
    +
    close() - Method in interface com.qualcomm.robotcore.hardware.HardwareDeviceCloseOnTearDown
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.HardwareDeviceHealthImpl
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.LED
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
     
    +
    close() - Method in interface com.qualcomm.robotcore.hardware.RobotCoreLynxUsbDevice
    +
     
    +
    close() - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
     
    +
    close() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
    +
    +
    Unloads all the sounds and releases the SoundPool.
    +
    +
    close() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Shuts down the TextToSpeech engine.
    +
    +
    close() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
    +
    Deactivates the trackables and cleans up.
    +
    +
    close() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CloseableFrame
    +
     
    +
    CloseableFrame(Frame) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CloseableFrame
    +
    +
    creating a CloseableFrame also has an effect equivalent to calling frame.clone()
    +
    +
    closeAutoCloseOnTeardown(HardwareMap) - Static method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    closeBatteryMonitoring() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    closeHardwareMap(HardwareMap) - Static method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    closeMotorControllers(HardwareMap) - Static method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    closeServoControllers(HardwareMap) - Static method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    CMD_ACTIVATE_CONFIGURATION - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_DELETE_CONFIGURATION - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_DISCOVER_LYNX_MODULES - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_DISCOVER_LYNX_MODULES_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_GET_CANDIDATE_LYNX_FIRMWARE_IMAGES - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_GET_CANDIDATE_LYNX_FIRMWARE_IMAGES_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_GET_USB_ACCESSIBLE_LYNX_MODULES - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_GET_USB_ACCESSIBLE_LYNX_MODULES_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_INIT_OP_MODE - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_LYNX_ADDRESS_CHANGE - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_LYNX_FIRMWARE_UPDATE - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_LYNX_FIRMWARE_UPDATE_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_PROGRAMMING_MODE_LOG_NOTIFICATION - Static variable in class com.qualcomm.ftccommon.CommandList
    +
    +
    Notification that a message was logged during programming mode (blocks).
    +
    +
    CMD_PROGRAMMING_MODE_PING_NOTIFICATION - Static variable in class com.qualcomm.ftccommon.CommandList
    +
    +
    Notification that the programming mode (blocks) server received a ping request.
    +
    +
    CMD_REQUEST_CONFIGURATION_TEMPLATES - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_REQUEST_CONFIGURATION_TEMPLATES_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_REQUEST_CONFIGURATIONS - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_REQUEST_CONFIGURATIONS_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_REQUEST_PARTICULAR_CONFIGURATION - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_REQUEST_PARTICULAR_CONFIGURATION_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_REQUEST_REMEMBERED_GROUPS - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_REQUEST_REMEMBERED_GROUPS_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_RESTART_ROBOT - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_RUN_OP_MODE - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_SAVE_CONFIGURATION - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_SCAN - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_SCAN_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_SET_MATCH_NUMBER - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_START_DS_PROGRAM_AND_MANAGE - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_START_DS_PROGRAM_AND_MANAGE_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CMD_START_PROGRAMMING_MODE - Static variable in class com.qualcomm.ftccommon.CommandList
    +
    +
    Command to start programming mode (blocks).
    +
    +
    CMD_START_PROGRAMMING_MODE_RESP - Static variable in class com.qualcomm.ftccommon.CommandList
    +
    +
    Response to a command to start programming mode (blocks).
    +
    +
    CMD_STOP_PROGRAMMING_MODE - Static variable in class com.qualcomm.ftccommon.CommandList
    +
    +
    Command to stop programming mode (blocks).
    +
    +
    CmdPlaySound(long, String, SoundPlayer.PlaySoundParams) - Constructor for class com.qualcomm.ftccommon.CommandList.CmdPlaySound
    +
     
    +
    CmdRequestSound(String, int) - Constructor for class com.qualcomm.ftccommon.CommandList.CmdRequestSound
    +
     
    +
    CmdStopPlayingSounds(SoundPlayer.StopWhat) - Constructor for class com.qualcomm.ftccommon.CommandList.CmdStopPlayingSounds
    +
     
    +
    CmdVisuallyIdentify(SerialNumber, boolean) - Constructor for class com.qualcomm.ftccommon.CommandList.CmdVisuallyIdentify
    +
     
    +
    col - Variable in class org.firstinspires.ftc.robotcore.external.matrices.SliceMatrixF
    +
     
    +
    color - Variable in class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    ColorSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Color Sensor
    +
    +
    colorSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    colorToHue(int) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    colorToSaturation(int) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    colorToValue(int) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    ColumnMajorMatrixF - Class in org.firstinspires.ftc.robotcore.external.matrices
    +
    +
    A ColumnMajorMatrixF is a dense matrix whose entries are arranged in + column-major order.
    +
    +
    ColumnMajorMatrixF(int, int) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.ColumnMajorMatrixF
    +
     
    +
    ColumnMatrixF - Class in org.firstinspires.ftc.robotcore.external.matrices
    +
    +
    A ColumnMatrixF is a matrix that converts a VectorF into a 1xn matrix
    +
    +
    ColumnMatrixF(VectorF) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.ColumnMatrixF
    +
     
    +
    com.qualcomm.ftccommon - package com.qualcomm.ftccommon
    +
    +
    Classes common to FTC aps
    +
    +
    com.qualcomm.robotcore.eventloop - package com.qualcomm.robotcore.eventloop
    +
    +
    RobotCore event loop library.
    +
    +
    com.qualcomm.robotcore.eventloop.opmode - package com.qualcomm.robotcore.eventloop.opmode
    +
     
    +
    com.qualcomm.robotcore.exception - package com.qualcomm.robotcore.exception
    +
    +
    RobotCore exception library.
    +
    +
    com.qualcomm.robotcore.hardware - package com.qualcomm.robotcore.hardware
    +
    +
    RobotCore hardware library.
    +
    +
    com.qualcomm.robotcore.util - package com.qualcomm.robotcore.util
    +
     
    +
    Command - Static variable in class com.qualcomm.ftccommon.CommandList.CmdPlaySound
    +
     
    +
    Command - Static variable in class com.qualcomm.ftccommon.CommandList.CmdRequestSound
    +
     
    +
    Command - Static variable in class com.qualcomm.ftccommon.CommandList.CmdStopPlayingSounds
    +
     
    +
    Command - Static variable in class com.qualcomm.ftccommon.CommandList.CmdVisuallyIdentify
    +
     
    +
    commandEvent(Command) - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity.ReceiveLoopCallback
    +
     
    +
    commandEvent(Command) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.ReceiveLoopCallback
    +
     
    +
    commandEvent(Command) - Method in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity.RecvLoopCallback
    +
     
    +
    commandEvent(Command) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    CommandList - Class in com.qualcomm.ftccommon
    +
    +
    List of RobotCore Robocol commands used by the FIRST apps
    +
    +
    CommandList() - Constructor for class com.qualcomm.ftccommon.CommandList
    +
     
    +
    CommandList.CmdPlaySound - Class in com.qualcomm.ftccommon
    +
     
    +
    CommandList.CmdRequestSound - Class in com.qualcomm.ftccommon
    +
     
    +
    CommandList.CmdStopPlayingSounds - Class in com.qualcomm.ftccommon
    +
     
    +
    CommandList.CmdVisuallyIdentify - Class in com.qualcomm.ftccommon
    +
     
    +
    CommandList.LynxAddressChangeRequest - Class in com.qualcomm.ftccommon
    +
     
    +
    CommandList.LynxAddressChangeRequest.AddressChange - Class in com.qualcomm.ftccommon
    +
     
    +
    CommandList.LynxFirmwareImagesResp - Class in com.qualcomm.ftccommon
    +
     
    +
    CommandList.LynxFirmwareUpdate - Class in com.qualcomm.ftccommon
    +
     
    +
    CommandList.LynxFirmwareUpdateResp - Class in com.qualcomm.ftccommon
    +
     
    +
    CommandList.USBAccessibleLynxModulesRequest - Class in com.qualcomm.ftccommon
    +
     
    +
    CommandList.USBAccessibleLynxModulesResp - Class in com.qualcomm.ftccommon
    +
     
    +
    compareTo(FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName
    +
     
    +
    CompassSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Compass Sensor
    +
    +
    compassSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    CompassSensor.CompassMode - Enum in com.qualcomm.robotcore.hardware
    +
     
    +
    computeHash() - Method in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    concatenateByteArrays(byte[], byte[]) - Static method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    concurrentClientLock - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    concurrentClientLock - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    ConfigWifiDirectActivity - Class in com.qualcomm.ftccommon
    +
    +
    This activity is used to correct any problems detected with the current + Wifi Direct settings.
    +
    +
    ConfigWifiDirectActivity() - Constructor for class com.qualcomm.ftccommon.ConfigWifiDirectActivity
    +
     
    +
    ConfigWifiDirectActivity.Flag - Enum in com.qualcomm.ftccommon
    +
     
    +
    congugate() - Method in class org.firstinspires.ftc.robotcore.external.navigation.Quaternion
    +
     
    +
    Const - Annotation Type in org.firstinspires.ftc.robotcore.external
    +
    +
    Const documents a method that promises not to change the internal state + of the method receiver.
    +
    +
    consumeEvent(Event) - Method in class org.firstinspires.ftc.robotcore.external.StateMachine
    +
    +
    consumeEvent + + Executes a state transition and returns the new state.
    +
    +
    Consumer<T> - Interface in org.firstinspires.ftc.robotcore.external
    +
    +
    Instances of Consumer are functions that act on an instance of a indicated type
    +
    +
    contains(String) - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
    +
    Returns whether a device of the indicated name is contained within this mapping
    +
    +
    contains(I2cDeviceSynch.ReadWindow) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Answers as to whether the receiver wholly contains the indicated window.
    +
    +
    contains(int, int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Answers as to whether the receiver wholly contains the indicated set of registers.
    +
    +
    containsCurrentAddress(int) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressConfiguration
    +
     
    +
    containsKey(SerialNumber) - Method in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    containsWithSameMode(I2cDeviceSynch.ReadWindow) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Answers as to whether the receiver wholly contains the indicated window + and also has the same modality.
    +
    +
    context - Variable in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    context - Variable in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    controller - Variable in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    controller - Variable in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    controller - Variable in class com.qualcomm.robotcore.hardware.I2cControllerPortDeviceImpl
    +
     
    +
    controller - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    controller - Variable in class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
     
    +
    controller - Variable in class com.qualcomm.robotcore.hardware.ServoImpl
    +
     
    +
    controllerEx - Variable in class com.qualcomm.robotcore.hardware.CRServoImplEx
    +
     
    +
    controllerEx - Variable in class com.qualcomm.robotcore.hardware.ServoImplEx
    +
     
    +
    controllerNowArmedOrPretending() - Method in class com.qualcomm.robotcore.hardware.I2cControllerPortDeviceImpl
    +
    +
    intended as a subclass hook
    +
    +
    controllerNowArmedOrPretending() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    controllerNowDisarmed() - Method in class com.qualcomm.robotcore.hardware.I2cControllerPortDeviceImpl
    +
    +
    intended as a subclass hook
    +
    +
    controllerPortMode - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    ControlSystem - Enum in com.qualcomm.robotcore.hardware
    +
    +
    Used to specify what type of control system a particular piece of hardware is connected to
    +
    +
    convertFrameToBitmap(Frame) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
    +
    +
    (Advanced) A helper utility that converts a Vuforia Frame into an Android Bitmap.
    +
    +
    copy(InputStream, OutputStream, int) - Static method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    copy(Gamepad) - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Copy the state of a gamepad into this gamepad
    +
    +
    copyBufferIntoWriteBuffer(int, byte[]) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Copy a byte array into the buffer that is set to be written out to the device
    +
    +
    copyBufferIntoWriteBuffer(byte[]) - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Atomically copies the provided buffer into the user portion of the write cache, beginning + immediately following the four-byte header.
    +
    +
    copyBufferIntoWriteBuffer(byte[]) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Copy a byte array into the buffer that is set to be written out to the device
    +
    +
    CperF - Static variable in enum org.firstinspires.ftc.robotcore.external.navigation.TempUnit
    +
     
    +
    create7bit(int) - Static method in class com.qualcomm.robotcore.hardware.I2cAddr
    +
     
    +
    create8bit(int) - Static method in class com.qualcomm.robotcore.hardware.I2cAddr
    +
     
    +
    createAdafruitI2cColorSensor(I2cController, DeviceConfiguration.I2cChannel, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a ColorSensor
    +
    +
    createAdafruitI2cColorSensor(RobotCoreLynxModule, DeviceConfiguration.I2cChannel, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createAnalogOutputDevice(AnalogOutputController, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createAnalogSensor(AnalogInputController, int, AnalogSensorConfigurationType) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createChained(Exception, String, Object...) - Static method in exception com.qualcomm.robotcore.exception.RobotCoreException
    +
     
    +
    createCRServo(ServoController, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createCRServoEx(ServoControllerEx, int, String, ServoConfigurationType) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createCustomServoDevice(ServoController, int, ServoConfigurationType) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createDcMotor(DcMotorController, int, MotorConfigurationType, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a DcMotor
    +
    +
    createDcMotorEx(DcMotorController, int, MotorConfigurationType, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createDeviceInterfaceModule(SerialNumber, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createDigitalDevice(DigitalChannelController, int, DigitalIoDeviceConfigurationType) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createEmbedded() - Static method in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    createFake() - Static method in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    createHTAccelerationSensor(LegacyModule, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a AccelerationSensor
    +
    +
    createHTColorSensor(LegacyModule, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a ColorSensor
    +
    +
    createHTCompassSensor(LegacyModule, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a NxtCompassSensor
    +
    +
    createHTDcMotorController(LegacyModule, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of an NXT DcMotorController
    +
    +
    createHTGyroSensor(LegacyModule, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a GyroSensor
    +
    +
    createHTIrSeekerSensor(LegacyModule, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a IrSeekerSensor
    +
    +
    createHTLightSensor(LegacyModule, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a LightSensor
    +
    +
    createHTServoController(LegacyModule, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of an NXT ServoController
    +
    +
    createHTTouchSensorMultiplexer(LegacyModule, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createI2cDevice(I2cController, DeviceConfiguration.I2cChannel, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createI2cDeviceSynch(RobotCoreLynxModule, DeviceConfiguration.I2cChannel, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createLED(DigitalChannelController, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of an LED
    +
    +
    createListWith(Object...) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    createListWithItemRepeated(Object, int) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    createLynxColorRangeSensor(RobotCoreLynxModule, DeviceConfiguration.I2cChannel, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createLynxCustomServoDevice(ServoControllerEx, int, ServoConfigurationType) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createLynxModule(RobotCoreLynxUsbDevice, int, boolean, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Creates an instance of a LynxModule
    +
    +
    createLynxUsbDevice(SerialNumber, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Creates an instance of a Lynx USB device
    +
    +
    createModernRoboticsI2cColorSensor(I2cController, DeviceConfiguration.I2cChannel, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a ColorSensor
    +
    +
    createModernRoboticsI2cColorSensor(RobotCoreLynxModule, DeviceConfiguration.I2cChannel, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createModernRoboticsI2cGyroSensor(I2cController, DeviceConfiguration.I2cChannel, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a GyroSensor
    +
    +
    createModernRoboticsI2cGyroSensor(RobotCoreLynxModule, DeviceConfiguration.I2cChannel, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createMRDigitalTouchSensor(DigitalChannelController, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a Modern Robotics TouchSensor on a digital controller
    +
    +
    createMRI2cIrSeekerSensorV3(I2cController, DeviceConfiguration.I2cChannel, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a IrSeekerSensorV3
    +
    +
    createMRI2cIrSeekerSensorV3(RobotCoreLynxModule, DeviceConfiguration.I2cChannel, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createNxtTouchSensor(LegacyModule, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createNxtUltrasonicSensor(LegacyModule, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of an UltrasonicSensor
    +
    +
    createOpModeManager(Activity) - Static method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    createParameters() - Static method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
     
    +
    createPwmOutputDevice(PWMOutputController, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createServo(ServoController, int, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a Servo
    +
    +
    createServoEx(ServoControllerEx, int, String, ServoConfigurationType) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createTFObjectDetector(TFObjectDetector.Parameters, VuforiaLocalizer) - Method in class org.firstinspires.ftc.robotcore.external.ClassFactory
    +
    +
    createTFObjectDetector returns + an instance of the TensorFlow object detector engine configured with the indicated set of parameters.
    +
    +
    createUsbDcMotorController(SerialNumber, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a DcMotorController
    +
    +
    createUsbLegacyModule(SerialNumber, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a LegacyModule
    +
    +
    createUsbServoController(SerialNumber, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Create an instance of a ServoController
    +
    +
    createUserI2cDevice(I2cController, DeviceConfiguration.I2cChannel, I2cDeviceConfigurationType, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Returns a new instance of a user-defined sensor type.
    +
    +
    createUserI2cDevice(RobotCoreLynxModule, DeviceConfiguration.I2cChannel, I2cDeviceConfigurationType, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
     
    +
    createVuforia(VuforiaLocalizer.Parameters) - Method in class org.firstinspires.ftc.robotcore.external.ClassFactory
    +
    +
    createVuforia returns + an instance of the Vuforia localizer engine configured with the indicated set of parameters.
    +
    +
    createVuforiaLocalizer(VuforiaLocalizer.Parameters) - Static method in class org.firstinspires.ftc.robotcore.external.ClassFactory
    +
    + +
    +
    createWebcamName(SerialNumber, String) - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Creates a WebcamName from the indicated serialized contents
    +
    +
    cregReadLast - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    cregWrite - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    CRServo - Interface in com.qualcomm.robotcore.hardware
    +
    +
    CRServo is the central interface supported by continuous rotation servos
    +
    +
    crservo - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    CRServoImpl - Class in com.qualcomm.robotcore.hardware
    +
    +
    ContinuousRotationServoImpl provides an implementation of continuous + rotation servo functionality.
    +
    +
    CRServoImpl(ServoController, int) - Constructor for class com.qualcomm.robotcore.hardware.CRServoImpl
    +
    +
    Constructor
    +
    +
    CRServoImpl(ServoController, int, DcMotorSimple.Direction) - Constructor for class com.qualcomm.robotcore.hardware.CRServoImpl
    +
    +
    Constructor
    +
    +
    CRServoImplEx - Class in com.qualcomm.robotcore.hardware
    +
    +
    CRServoEx provides access to extended functionality on continuous rotation + servos.
    +
    +
    CRServoImplEx(ServoControllerEx, int, ServoConfigurationType) - Constructor for class com.qualcomm.robotcore.hardware.CRServoImplEx
    +
     
    +
    CRServoImplEx(ServoControllerEx, int, DcMotorSimple.Direction, ServoConfigurationType) - Constructor for class com.qualcomm.robotcore.hardware.CRServoImplEx
    +
     
    +
    current - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressConfiguration
    +
     
    +
    currentAddressConfiguration - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModuleList
    +
     
    +
    currentlyLoadingInfo - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    currentlyLoadingLatch - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    CurrentlyPlaying() - Constructor for class com.qualcomm.ftccommon.SoundPlayer.CurrentlyPlaying
    +
     
    +
    currentlyPlayingSounds - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    currentModules - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    currentPoseAndCamera - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    currentState - Variable in class org.firstinspires.ftc.robotcore.external.StateMachine
    +
     
    +
    currentSteps - Variable in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    + + + +

    D

    +
    +
    d - Variable in class com.qualcomm.robotcore.hardware.PIDCoefficients
    +
     
    +
    d - Variable in class com.qualcomm.robotcore.hardware.PIDFCoefficients
    +
     
    +
    data - Variable in class com.qualcomm.robotcore.hardware.TimestampedData
    +
    +
    the data in question
    +
    +
    data - Variable in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    dataFrom(InstanceId) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId
    +
     
    +
    dataValue - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId
    +
     
    +
    DcMotor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    DcMotor interface provides access to full-featured motor functionality.
    +
    +
    dcMotor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    DcMotor.RunMode - Enum in com.qualcomm.robotcore.hardware
    +
    +
    The run mode of a motor DcMotor.RunMode controls how the motor interprets the + it's parameter settings passed through power- and encoder-related methods.
    +
    +
    DcMotor.ZeroPowerBehavior - Enum in com.qualcomm.robotcore.hardware
    +
    +
    ZeroPowerBehavior provides an indication as to a motor's behavior when a power level of zero + is applied.
    +
    +
    DcMotorController - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Interface for working with DC Motor Controllers
    +
    +
    dcMotorController - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    DcMotorControllerEx - Interface in com.qualcomm.robotcore.hardware
    +
    +
    DcMotorControllerEx is an optional motor controller interface supported by some hardware + that provides enhanced motor functionality.
    +
    +
    DcMotorEx - Interface in com.qualcomm.robotcore.hardware
    +
    +
    The DcMotorEx interface provides enhanced motor functionality which is available with some + hardware devices.
    +
    +
    DcMotorImpl - Class in com.qualcomm.robotcore.hardware
    +
    +
    Control a DC Motor attached to a DC Motor Controller
    +
    +
    DcMotorImpl(DcMotorController, int) - Constructor for class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Constructor
    +
    +
    DcMotorImpl(DcMotorController, int, DcMotorSimple.Direction) - Constructor for class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Constructor
    +
    +
    DcMotorImpl(DcMotorController, int, DcMotorSimple.Direction, MotorConfigurationType) - Constructor for class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Constructor
    +
    +
    DcMotorImplEx - Class in com.qualcomm.robotcore.hardware
    +
    +
    DcMotorImplEx is a motor that supports the DcMotorEx interface in addition + to simply DcMotor.
    +
    +
    DcMotorImplEx(DcMotorController, int) - Constructor for class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    DcMotorImplEx(DcMotorController, int, DcMotorSimple.Direction) - Constructor for class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    DcMotorImplEx(DcMotorController, int, DcMotorSimple.Direction, MotorConfigurationType) - Constructor for class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    DcMotorSimple - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Instances of DcMotorSimple interface provide a most basic motor-like functionality
    +
    +
    DcMotorSimple.Direction - Enum in com.qualcomm.robotcore.hardware
    +
    +
    DcMotors can be configured to internally reverse the values + to which, e.g., their motor power is set.
    +
    +
    deactivate() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
    +
    Deactivates all trackables, causing it to no longer see their presence.
    +
    +
    deactivate() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackables
    +
    +
    Deactivates this trackables, causing its localizer to no longer see the presence + of the trackables it contains.
    +
    +
    DEBUG - Static variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    DEBUG - Static variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    DEFAULT_OP_MODE_NAME - Static variable in interface com.qualcomm.robotcore.eventloop.opmode.OpModeManager
    +
    +
    DEFAULT_OP_MODE_NAME is the (non-localized) name of the default opmode, the one that + automatically runs whenever no user opmode is running.
    +
    +
    defaultRange - Static variable in class com.qualcomm.robotcore.hardware.PwmControl.PwmRange
    +
    +
    defaultRange is the default PWM range used
    +
    +
    DefaultUsbModuleAttachmentHandler() - Constructor for class com.qualcomm.ftccommon.FtcEventLoop.DefaultUsbModuleAttachmentHandler
    +
     
    +
    DenseMatrixF - Class in org.firstinspires.ftc.robotcore.external.matrices
    +
    +
    A DenseMatrixF is a matrix of floats whose storage is a contiguous float[] array.
    +
    +
    DenseMatrixF(int, int) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.DenseMatrixF
    +
     
    +
    deregisterForPortReadyBeginEndCallback(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Deregisters any existing notifications callback for the given port
    +
    +
    deregisterForPortReadyBeginEndCallback() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Unregisters any portIsReady() begin / end notifications object if any is present.
    +
    +
    deregisterForPortReadyBeginEndCallback() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    deregister for port-ready begin and cessation notifications
    +
    +
    deregisterForPortReadyCallback(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    De-register for port ready notifications.
    +
    +
    deregisterForPortReadyCallback() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Unregisters any callback currently registered.
    +
    +
    deregisterForPortReadyCallback() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Unregister for a port-ready callback
    +
    +
    deserialize(String) - Static method in class com.qualcomm.ftccommon.CommandList.CmdPlaySound
    +
     
    +
    deserialize(String) - Static method in class com.qualcomm.ftccommon.CommandList.CmdRequestSound
    +
     
    +
    deserialize(String) - Static method in class com.qualcomm.ftccommon.CommandList.CmdStopPlayingSounds
    +
     
    +
    deserialize(String) - Static method in class com.qualcomm.ftccommon.CommandList.CmdVisuallyIdentify
    +
     
    +
    deserialize(String) - Static method in class com.qualcomm.ftccommon.CommandList.LynxAddressChangeRequest
    +
     
    +
    deserialize(String) - Static method in class com.qualcomm.ftccommon.CommandList.LynxFirmwareImagesResp
    +
     
    +
    deserialize(String) - Static method in class com.qualcomm.ftccommon.CommandList.LynxFirmwareUpdate
    +
     
    +
    deserialize(String) - Static method in class com.qualcomm.ftccommon.CommandList.LynxFirmwareUpdateResp
    +
     
    +
    deserialize(String) - Static method in class com.qualcomm.ftccommon.CommandList.USBAccessibleLynxModulesRequest
    +
     
    +
    deserialize(String) - Static method in class com.qualcomm.ftccommon.CommandList.USBAccessibleLynxModulesResp
    +
     
    +
    destructor() - Method in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    deviceClient - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    deviceClientIsOwned - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    deviceDisplayNames - Static variable in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    DeviceInterfaceModule - Interface in com.qualcomm.robotcore.hardware
    +
    +
    DeviceInterfaceModule for working with various devices
    +
    +
    deviceInterfaceModule - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    DeviceManager - Interface in com.qualcomm.robotcore.hardware
    +
     
    +
    DeviceManager.UsbDeviceType - Enum in com.qualcomm.robotcore.hardware
    +
    +
    Enum of known USB Device Types
    +
    +
    DeviceMapping(Class<DEVICE_TYPE>) - Constructor for class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
     
    +
    DeviceNameManagerCallback() - Constructor for class com.qualcomm.ftccommon.UpdateUI.Callback.DeviceNameManagerCallback
    +
     
    +
    deviceNames - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    diagonalMatrix(int, float) - Static method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a new matrix which is zero everywhere except on the diagonal, where it has + an indicated value.
    +
    +
    diagonalMatrix(VectorF) - Static method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a new matrix which is zero everywhere, except on the diagonal, where its + values are taken from an indicated vector
    +
    +
    dibCacheOverhead - Static variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    DigitalChannel - Interface in com.qualcomm.robotcore.hardware
    +
    +
    DigitalChannel is an interface by which digital channels can be controlled.
    +
    +
    digitalChannel - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    DigitalChannel.Mode - Enum in com.qualcomm.robotcore.hardware
    +
    +
    Digital channel mode - input or output
    +
    +
    DigitalChannelController - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Interface for working with Digital Channel Controllers
    +
    +
    DigitalChannelController.Mode - Enum in com.qualcomm.robotcore.hardware
    +
    +
    Deprecated. + +
    +
    +
    DigitalChannelImpl - Class in com.qualcomm.robotcore.hardware
    +
    +
    Control a single digital channel
    +
    +
    DigitalChannelImpl(DigitalChannelController, int) - Constructor for class com.qualcomm.robotcore.hardware.DigitalChannelImpl
    +
    +
    Constructor
    +
    +
    dimensionsError() - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    dimensionsError(int, int) - Static method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    dimensionsError() - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    dimensionsError(int) - Static method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    direction - Variable in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    direction - Variable in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    direction - Variable in class com.qualcomm.robotcore.hardware.ServoImpl
    +
     
    +
    direction - Variable in enum org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CameraDirection
    +
     
    +
    Disabled - Annotation Type in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    Provides a way to temporarily disable an OpMode annotated with + Autonomous or TeleOp from showing up + on the driver station OpMode list.
    +
    +
    disableReadsAndWrites() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    disableReadWindows - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    discoverModules() - Method in interface com.qualcomm.robotcore.hardware.RobotCoreLynxUsbDevice
    +
     
    +
    disengage() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase.LynxUsbDeviceContainer
    +
     
    +
    disengage() - Method in interface com.qualcomm.robotcore.hardware.Engagable
    +
    +
    Disengage the object from underlying services it uses to render its function.
    +
    +
    disengage() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    disengage() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    disengage() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    displayDeviceName(String) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    DisplayedModule(View) - Constructor for class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModule
    +
     
    +
    displayedModuleList - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    DisplayedModuleList() - Constructor for class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModuleList
    +
     
    +
    displayGamePadInfo(String) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    displayName - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName
    +
     
    +
    distanceOutOfRange - Static variable in interface com.qualcomm.robotcore.hardware.DistanceSensor
    +
    +
    The value returned when a distance reading is not in fact available.
    +
    +
    DistanceSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    The DistanceSensor may be found on hardware sensors which measure distance + by one means or another.
    +
    +
    DistanceUnit - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    DistanceUnit represents a unit of measure of distance.
    +
    +
    doBackOrCancel() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    doInitialize() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
    +
    Actually carries out the initialization of the instance.
    +
    +
    doInitialize() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDeviceWithParameters
    +
     
    +
    doModuleIsArmedWork(boolean) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    doModuleIsArmedWorkEnabledWrites - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    dotProduct(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
    +
    Returns the dot product of this vector and another.
    +
    +
    doubleFromFixed(int, int) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
     
    +
    doubleFromFixed(long, int) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
     
    +
    doubleToFixedInt(double, int) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
     
    +
    doubleToFixedLong(double, int) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
     
    +
    dpad_down - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    dpad down
    +
    +
    dpad_left - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    dpad left
    +
    +
    dpad_right - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    dpad right
    +
    +
    dpad_up - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    dpad up
    +
    +
    dpadThreshold - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    DPAD button will be considered pressed when the movement crosses this + threshold
    +
    +
    DuplicateNameException - Exception in com.qualcomm.robotcore.exception
    +
    +
    Created by bob on 2016-04-20.
    +
    +
    DuplicateNameException(String) - Constructor for exception com.qualcomm.robotcore.exception.DuplicateNameException
    +
     
    +
    DuplicateNameException(String, Object...) - Constructor for exception com.qualcomm.robotcore.exception.DuplicateNameException
    +
     
    +
    + + + +

    E

    +
    +
    earthGravity - Static variable in class org.firstinspires.ftc.robotcore.external.navigation.Acceleration
    +
    +
    The (nominal) acceleration due to Earth's gravity + The units are in m/s^2
    +
    +
    ElapsedTime - Class in com.qualcomm.robotcore.util
    +
    +
    The ElapsedTime class provides a simple handy timer to measure elapsed time intervals.
    +
    +
    ElapsedTime() - Constructor for class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Creates a timer with resolution Resolution.Seconds + that is initialized with the now-current time.
    +
    +
    ElapsedTime(long) - Constructor for class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Creates a timer with resolution Resolution.Seconds.
    +
    +
    ElapsedTime(ElapsedTime.Resolution) - Constructor for class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Creates a timer with a resolution of seconds or milliseconds.
    +
    +
    ElapsedTime.Resolution - Enum in com.qualcomm.robotcore.util
    +
    +
    An indicator of the resolution of a timer.
    +
    +
    embedded - Static variable in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    emptyEvent(RobocolDatagram) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    emptyMatrix(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.ColumnMatrixF
    +
     
    +
    emptyMatrix(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.GeneralMatrixF
    +
     
    +
    emptyMatrix(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a new empty matrix of the indicated dimensions.
    +
    +
    emptyMatrix(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    emptyMatrix(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.RowMatrixF
    +
     
    +
    emptyMatrix(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.SliceMatrixF
    +
     
    +
    emptyTrackingResults(String) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
     
    +
    emptyTrackingResults(String) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaRelicRecovery
    +
     
    +
    enable(boolean) - Method in class com.qualcomm.robotcore.hardware.LED
    +
    +
    A method to turn on or turn off the LED
    +
    +
    enable9v(int, boolean) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
    +
    +
    Enable or disable 9V power on a port
    +
    +
    enableAnalogReadMode(int) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
    +
    +
    Enable a physical port in analog read mode
    +
    +
    enableConvertFrameToBitmap() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
    +
    +
    (Advanced) Ensures that Vuforia exposes necessary data formats in Frames that allows + VuforiaLocalizer.convertFrameToBitmap(Frame) to function
    +
    +
    enableConvertFrameToFormat(int...) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
    +
    +
    (Advanced) Ask Vuforia to convert frames to the given requested formats.
    +
    +
    enableCount - Variable in class com.qualcomm.robotcore.hardware.LightMultiplexor
    +
     
    +
    enabledReadMode - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    enabledWriteMode - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    enableI2cReadMode(int, I2cAddr, int, int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Enable read mode for a particular I2C device
    +
    +
    enableI2cReadMode(I2cAddr, int, int) - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Enable read mode for this I2C device.
    +
    +
    enableI2cReadMode(I2cAddr, int, int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Deprecated.
    +
    +
    enableI2cWriteMode(int, I2cAddr, int, int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Enable write mode for a particular I2C device
    +
    +
    enableI2cWriteMode(I2cAddr, int, int) - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Enable write mode for this I2C device.
    +
    +
    enableI2cWriteMode(I2cAddr, int, int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Deprecated.
    +
    +
    enableLed(boolean) - Method in interface com.qualcomm.robotcore.hardware.ColorSensor
    +
    +
    Enable the LED light
    +
    +
    enableLed(boolean) - Method in interface com.qualcomm.robotcore.hardware.LightSensor
    +
    +
    Enable the LED light
    +
    +
    enableLight(boolean) - Method in class com.qualcomm.robotcore.hardware.LED
    +
     
    +
    enableLight(boolean) - Method in class com.qualcomm.robotcore.hardware.LightMultiplexor
    +
     
    +
    enableLight(boolean) - Method in interface com.qualcomm.robotcore.hardware.SwitchableLight
    +
    +
    Turns the light on or off.
    +
    +
    enableReadsAndWrites() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    enableUpdateButton - Variable in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    enableWhitelistFilter(int, int) - Static method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Add a whitelist filter for a specific device vendor/product ID.
    +
    +
    enableWriteCoalescing(boolean) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    enableWriteCoalescing(boolean) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    enableWriteCoalescing(boolean) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Enables or disables an optimization wherein writes to two sets of adjacent register + ranges may be coalesced into a single I2c transaction if the second write comes along + while the first is still queued for writing.
    +
    +
    Engagable - Interface in com.qualcomm.robotcore.hardware
    +
    +
    The engageable interface can be used to temporarily disengage higher-level hardware objects + from the services they manipulate, then later be able to re-engage them.
    +
    +
    engage() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase.LynxUsbDeviceContainer
    +
     
    +
    engage() - Method in interface com.qualcomm.robotcore.hardware.Engagable
    +
    +
    (Re)enage the object with its underlying services.
    +
    +
    engage() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    engage() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    engage() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    engagementLock - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    engagementLock - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    ensureCached(Context, int) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Ensures this local sound is also in the local cache.
    +
    +
    ensureCached(String, SoundPlayer.SoundFromFile) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    returns a new ref on the returned SoundPlayer.SoundInfo; caller must releaseRef()
    +
    +
    ensureLoaded(Context, int) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    ensureLoaded(Context, File) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    ensureLoaded(String, SoundPlayer.SoundFromFile) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    returns a new ref on the returned SoundPlayer.SoundInfo; caller must releaseRef()
    +
    +
    ensureReadWindow(I2cDeviceSynch.ReadWindow, I2cDeviceSynch.ReadWindow) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynch
    +
    +
    Ensure that the current register window covers the indicated set of registers.
    +
    +
    ensureReadWindow(I2cDeviceSynch.ReadWindow, I2cDeviceSynch.ReadWindow) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    ensureReadWindow(I2cDeviceSynch.ReadWindow, I2cDeviceSynch.ReadWindow) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    enterFirmwareUpdateMode(RobotUsbDevice) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    entrySet() - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
    +
    Returns a collection of all the (name, device) pairs in this DeviceMapping.
    +
    +
    entrySet() - Method in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    equals(Object) - Method in class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    equals(Blinker.Step) - Method in class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    equals(Object) - Method in class com.qualcomm.robotcore.hardware.PwmControl.PwmRange
    +
     
    +
    equals(Object) - Method in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    equals(String) - Method in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    equals(Object) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId
    +
     
    +
    errorMessage - Variable in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    Event - Interface in org.firstinspires.ftc.robotcore.external
    +
    +
    A state machine event.
    +
    +
    event - Variable in class org.firstinspires.ftc.robotcore.external.StateTransition
    +
     
    +
    EventLoop - Interface in com.qualcomm.robotcore.eventloop
    +
    +
    Event loop interface
    +
    +
    eventLoopManager - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    EventLoopManager - Class in com.qualcomm.robotcore.eventloop
    +
    +
    Event Loop Manager
    +
    +
    EventLoopManager(Context, EventLoopManagerClient, EventLoop) - Constructor for class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Constructor
    +
    +
    EventLoopManager.EventLoopMonitor - Interface in com.qualcomm.robotcore.eventloop
    +
    +
    Callback to monitor when event loop changes state
    +
    +
    EventLoopManagerClient - Interface in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    Provides certain functionality to the EventLoopManager from its client
    +
    +
    exception - Variable in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode.LinearOpModeHelper
    +
     
    +
    extantMultiplexors - Static variable in class com.qualcomm.robotcore.hardware.LightMultiplexor
    +
     
    +
    + + + +

    F

    +
    +
    f - Variable in class com.qualcomm.robotcore.hardware.PIDFCoefficients
    +
     
    +
    failSafe() - Method in interface com.qualcomm.robotcore.hardware.RobotCoreLynxUsbDevice
    +
     
    +
    fakePrefix - Static variable in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    file - Variable in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    FILENAME - Static variable in class com.qualcomm.ftccommon.ViewLogsActivity
    +
     
    +
    fillCameraMonitorViewParent - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    Controls whether the camera monitor should entirely fill the camera monitor view parent + or not.
    +
    +
    filter(SensorEvent) - Method in class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
    +
    +
    filter + + Taken straight from the google documentation for implementing a low pass + filter for filtering out gravity.
    +
    +
    findByCurrentAddress(int) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressConfiguration
    +
     
    +
    findUnusedAddress() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModuleList
    +
     
    +
    finishConstruction() - Method in class com.qualcomm.robotcore.hardware.I2cControllerPortDeviceImpl
    +
     
    +
    finishConstruction() - Method in class com.qualcomm.robotcore.hardware.LegacyModulePortDeviceImpl
    +
     
    +
    firmwareImageFile - Variable in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    firmwareVersionString - Variable in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    firstAngle - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    the chronologically first rotation made in the AxesOrder
    +
    +
    flatten() - Method in class com.qualcomm.robotcore.hardware.LynxModuleMetaList
    +
     
    +
    forceDrainReadersAndWriters() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    forFirmwareUpdate - Variable in class com.qualcomm.ftccommon.CommandList.USBAccessibleLynxModulesRequest
    +
     
    +
    forLight(SwitchableLight) - Static method in class com.qualcomm.robotcore.hardware.LightMultiplexor
    +
     
    +
    formatAsTransform() - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    A simple utility that extracts positioning information from a transformation matrix + and formats it in a form palatable to a human being.
    +
    +
    formatAsTransform(AxesReference, AxesOrder, AngleUnit) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    A simple utility that extracts positioning information from a transformation matrix + and formats it in a form palatable to a human being.
    +
    +
    formatAsTransform() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    formatNumber(double, int) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    from(SerialNumber) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModuleList
    +
     
    +
    from(String) - Static method in enum com.qualcomm.robotcore.hardware.DeviceManager.UsbDeviceType
    +
     
    +
    from(VuforiaTrackable) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.RelicRecoveryVuMark
    +
     
    +
    from(VuforiaTrackable.Listener) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.RelicRecoveryVuMark
    +
     
    +
    from(VuMarkInstanceId) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.RelicRecoveryVuMark
    +
     
    +
    from(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CameraDirection
    +
    +
    Converts a string to the corresponding camera direction.
    +
    +
    from - Variable in class org.firstinspires.ftc.robotcore.external.StateTransition
    +
     
    +
    fromByteArray(byte[]) - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
     
    +
    fromCelsius(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.TempUnit
    +
     
    +
    fromCm(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    fromDegrees(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    fromDegrees(float) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    fromDegrees(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
     
    +
    fromDegrees(float) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
     
    +
    fromFarenheit(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.TempUnit
    +
     
    +
    fromGravity(double, double, double, long) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.Acceleration
    +
    +
    Returns an acceleration constructed from measures in units of earth's gravity + rather than explicit distance units.
    +
    +
    fromInches(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    fromIndex(int) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.Axis
    +
     
    +
    fromKelvin(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.TempUnit
    +
     
    +
    fromMeters(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    fromMm(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    fromRadians(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    fromRadians(float) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    fromRadians(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
     
    +
    fromRadians(float) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
     
    +
    fromSerializationString(String) - Static method in class com.qualcomm.robotcore.hardware.LynxModuleMetaList
    +
     
    +
    fromSerializationString(String) - Static method in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    fromString(String) - Static method in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    fromStringOrNull(String) - Static method in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    fromUnit(AngleUnit, double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    fromUnit(AngleUnit, float) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    fromUnit(DistanceUnit, double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    fromUnit(TempUnit, double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.TempUnit
    +
     
    +
    fromUnit(UnnormalizedAngleUnit, double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
     
    +
    fromUnit(UnnormalizedAngleUnit, float) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
     
    +
    fromUsbOrNull(String) - Static method in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    fromVidPid(int, int, String) - Static method in class com.qualcomm.robotcore.util.SerialNumber
    +
    +
    Makes up a serial-number-like-thing for USB devices that internally lack a serial number.
    +
    +
    FtcAboutActivity - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcAboutActivity() - Constructor for class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    FtcAboutActivity.AboutFragment - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcAdvancedRCSettingsActivity - Class in com.qualcomm.ftccommon
    +
    +
    FtcAdvancedRCSettingsActivity manages the editing of advanced RC settings
    +
    +
    FtcAdvancedRCSettingsActivity() - Constructor for class com.qualcomm.ftccommon.FtcAdvancedRCSettingsActivity
    +
     
    +
    FtcAdvancedRCSettingsActivity.SettingsFragment - Class in com.qualcomm.ftccommon
    +
     
    +
    ftcCameraBackFromPhone - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    ftcCameraFromRobotCoords - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    ftcCameraFromVuforiaCamera - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    ftcCameraFrontFromPhone - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    FtcEventLoop - Class in com.qualcomm.ftccommon
    +
    +
    Main event loop to control the robot
    +
    +
    FtcEventLoop(HardwareFactory, OpModeRegister, UpdateUI.Callback, Activity, ProgrammingModeController) - Constructor for class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    FtcEventLoop.DefaultUsbModuleAttachmentHandler - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcEventLoopBase - Class in com.qualcomm.ftccommon
    +
    +
    FtcEventLoopBase is an abstract base that handles defines core event processing + logic that's available whether or not a Robot is currently extant or not
    +
    +
    FtcEventLoopBase(HardwareFactory, OpModeRegister, UpdateUI.Callback, Activity, ProgrammingModeController) - Constructor for class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    FtcEventLoopBase.LynxUsbDeviceContainer - Class in com.qualcomm.ftccommon
    +
    +
    abstracts whether we've got a live LynxUsbDeviceImpl or we just opened something locally ourselves.
    +
    +
    ftcEventLoopHandler - Variable in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    FtcEventLoopHandler - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcEventLoopHandler(HardwareFactory, UpdateUI.Callback, Context) - Constructor for class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    FtcEventLoopIdle - Class in com.qualcomm.ftccommon
    +
    +
    FtcEventLoopIdle is an eventloop that runs whenever a full FtcEventLoop + is inappropriate.
    +
    +
    FtcEventLoopIdle(HardwareFactory, OpModeRegister, UpdateUI.Callback, Activity, ProgrammingModeController) - Constructor for class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    FtcLynxFirmwareUpdateActivity - Class in com.qualcomm.ftccommon
    +
    +
    FtcLynxFirmwareUpdateActivity manages the updating of the firmware on + all available attached lynx modules.
    +
    +
    FtcLynxFirmwareUpdateActivity() - Constructor for class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    FtcLynxFirmwareUpdateActivity.FwResponseStatus - Enum in com.qualcomm.ftccommon
    +
     
    +
    FtcLynxFirmwareUpdateActivity.ReceiveLoopCallback - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcLynxModuleAddressUpdateActivity - Class in com.qualcomm.ftccommon
    +
    +
    FtcLynxModuleAddressUpdateActivity provides a means by which users can update + the (persistently stored) address of a Lynx Module
    +
    +
    FtcLynxModuleAddressUpdateActivity() - Constructor for class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcLynxModuleAddressUpdateActivity.AddressConfiguration - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcLynxModuleAddressUpdateActivity.DisplayedModule - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcLynxModuleAddressUpdateActivity.DisplayedModuleList - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcLynxModuleAddressUpdateActivity.ReceiveLoopCallback - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcRobotControllerBinder() - Constructor for class com.qualcomm.ftccommon.FtcRobotControllerService.FtcRobotControllerBinder
    +
     
    +
    FtcRobotControllerService - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcRobotControllerService() - Constructor for class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    FtcRobotControllerService.FtcRobotControllerBinder - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcRobotControllerServiceState - Interface in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    Created by David on 7/7/2017.
    +
    +
    FtcRobotControllerSettingsActivity - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcRobotControllerSettingsActivity() - Constructor for class com.qualcomm.ftccommon.FtcRobotControllerSettingsActivity
    +
     
    +
    FtcRobotControllerSettingsActivity.SettingsFragment - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcWifiDirectChannelSelectorActivity - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcWifiDirectChannelSelectorActivity() - Constructor for class com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity
    +
     
    +
    FtcWifiDirectChannelSelectorActivity.WifiChannelItemAdapter - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcWifiDirectRememberedGroupsActivity - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcWifiDirectRememberedGroupsActivity() - Constructor for class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    FtcWifiDirectRememberedGroupsActivity.RecvLoopCallback - Class in com.qualcomm.ftccommon
    +
     
    +
    FtcWifiDirectRememberedGroupsActivity.WifiP2pGroupItemAdapter - Class in com.qualcomm.ftccommon
    +
     
    +
    Func<T> - Interface in org.firstinspires.ftc.robotcore.external
    +
    +
    Instances of Func are nullary producers of values.
    +
    +
    Function<T,R> - Interface in org.firstinspires.ftc.robotcore.external
    +
    +
    If we were running Java8, we'd just use the built-in interface
    +
    +
    future - Variable in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    + + + +

    G

    +
    +
    Gamepad - Class in com.qualcomm.robotcore.hardware
    +
    +
    Monitor a hardware gamepad.
    +
    +
    Gamepad() - Constructor for class com.qualcomm.robotcore.hardware.Gamepad
    +
     
    +
    Gamepad(Gamepad.GamepadCallback) - Constructor for class com.qualcomm.robotcore.hardware.Gamepad
    +
     
    +
    Gamepad.GamepadCallback - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Optional callback interface for monitoring changes due to MotionEvents and KeyEvents.
    +
    +
    gamepad1 - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    Gamepad 1
    +
    +
    gamepad2 - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    Gamepad 2
    +
    +
    gamepadChanged(Gamepad) - Method in interface com.qualcomm.robotcore.hardware.Gamepad.GamepadCallback
    +
    +
    This method will be called whenever the gamepad state has changed due to either a KeyEvent + or a MotionEvent.
    +
    +
    gamepadEvent(RobocolDatagram) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    GeneralMatrixF - Class in org.firstinspires.ftc.robotcore.external.matrices
    +
    +
    A GeneralMatrixF is a concrete matrix implementation that is supported by + a backing store consisting of an array of floats.
    +
    +
    GeneralMatrixF(int, int) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.GeneralMatrixF
    +
     
    +
    GeneralMatrixF(int, int, float[]) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.GeneralMatrixF
    +
     
    +
    get(String) - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
     
    +
    get(Class<? extends T>, String) - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
    +
    Retrieves the (first) device with the indicated name which is also an instance of the + indicated class or interface.
    +
    +
    get(Class<? extends T>, SerialNumber) - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
    +
    (Advanced) Returns the device with the indicated SerialNumber, if it exists, + cast to the indicated class or interface; otherwise, null.
    +
    +
    get(String) - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
    +
    Returns the (first) device with the indicated name.
    +
    +
    get(SerialNumber) - Method in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    get(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.ColumnMatrixF
    +
     
    +
    get(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.DenseMatrixF
    +
     
    +
    get(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a particular element of this matrix
    +
    +
    get(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.RowMatrixF
    +
     
    +
    get(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.SliceMatrixF
    +
     
    +
    get(int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    get() - Method in interface org.firstinspires.ftc.robotcore.external.Supplier
    +
     
    +
    get7Bit() - Method in class com.qualcomm.robotcore.hardware.I2cAddr
    +
     
    +
    get8Bit() - Method in class com.qualcomm.robotcore.hardware.I2cAddr
    +
     
    +
    getAcceleration() - Method in interface com.qualcomm.robotcore.hardware.AccelerationSensor
    +
    +
    Acceleration, measured in g's
    +
    +
    getAcceleration() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
    +
    +
    Returns an Acceleration object representing acceleration in X, Y and Z axes.
    +
    +
    getAdapter(AdapterView<?>) - Method in class com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity
    +
     
    +
    getAll(Class<? extends T>) - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
    +
    Returns all the devices which are instances of the indicated class or interface.
    +
    +
    getAnalogInputVoltage(int) - Method in interface com.qualcomm.robotcore.hardware.AnalogInputController
    +
    +
    Get the value of this analog input + + Return the current ADC results from the A0-A7 channel input pins.
    +
    +
    getAngle() - Method in interface com.qualcomm.robotcore.hardware.IrSeekerSensor
    +
    +
    Estimated angle in which the signal is coming from
    +
    +
    getAngle() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
    +
    Returns the angle in which the orientation sensor is tilted, treating Roll as the x-coordinate + and Pitch as the y-coordinate.
    +
    +
    getAngleUnit() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
    +
    +
    Returns the AngleUnit being used.
    +
    +
    getAngleUnit() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
    +
    Returns the AngleUnit being used.
    +
    +
    getAngularOrientation(AxesReference, AxesOrder, AngleUnit) - Method in interface com.qualcomm.robotcore.hardware.OrientationSensor
    +
    +
    Returns the absolute orientation of the sensor as a set three angles.
    +
    +
    getAngularOrientationAxes() - Method in interface com.qualcomm.robotcore.hardware.OrientationSensor
    +
    +
    Returns the axes on which the sensor measures angular orientation.
    +
    +
    getAngularVelocity(AngleUnit) - Method in interface com.qualcomm.robotcore.hardware.Gyroscope
    +
    +
    Returns the angular rotation rate across all the axes measured by the gyro.
    +
    +
    getAngularVelocity() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
    +
    +
    Returns an AngularVelocity object representing the rate of rotation around the device's local + X, Y and Z axis.
    +
    +
    getAngularVelocityAxes() - Method in interface com.qualcomm.robotcore.hardware.Gyroscope
    +
    +
    Returns the axes on which the gyroscope measures angular velocity.
    +
    +
    getAppVersion() - Static method in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    getAzimuth() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
    +
    Returns the azimuth.
    +
    +
    getBlinkerPatternMaxLength() - Method in interface com.qualcomm.robotcore.hardware.Blinker
    +
    +
    Returns the maximum number of Blinker.Steps that can be present in a pattern
    +
    +
    getBlinkerPatternMaxLength() - Method in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    getBuildTime() - Static method in class com.qualcomm.ftccommon.FtcAboutActivity
    +
    +
    https://code.google.com/p/android/issues/detail?id=220039
    +
    +
    getCallbackCount() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Returns the number of callbacks ever experienced by this I2cDevice instance, whether or not + they were ever seen by a registered callback.
    +
    +
    getCallbackCount() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    getCamera() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
    +
    +
    Provides access to the Camera used by Vuforia.
    +
    +
    getCameraCalibration() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
    +
    +
    (Advanced) Returns information about Vuforia's knowledge of the camera that it is using.
    +
    +
    getCameraDirection() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Deprecated. +
    This is of little use if a non-builtin camera is in use.
    +
    +
    +
    getCameraDirection() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.PoseAndCamera
    +
     
    +
    getCameraLocationOnRobot(CameraName) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    + +
    +
    getCameraManager() - Method in class org.firstinspires.ftc.robotcore.external.ClassFactory
    +
    +
    Returns a CameraManager which can be used to access the USB webcams + attached to the robot controller.
    +
    +
    getCameraName() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
    +
    +
    Provides access to the name of the camera used by Vuforia.
    +
    +
    getCameraName() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Returns the name of the camera most recently tracked, or null if tracking has never occurred.
    +
    +
    getCandidateLynxFirmwareImages() - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    getCapacity() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Log
    +
    +
    Returns the maximum number of lines which will be retained in a Telemetry.log()() and + shown on the driver station display.
    +
    +
    getCaption() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Item
    +
    +
    Returns the caption associated with this item.
    +
    +
    getCaptionValueSeparator() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Returns the string which is used to separate caption from value within a Telemetry + Telemetry.Item.
    +
    +
    getColor() - Method in class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    getColumn(int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a vector containing data of a particular column of the receiver.
    +
    +
    getConnectionInfo() - Method in class com.qualcomm.robotcore.hardware.AnalogInput
    +
     
    +
    getConnectionInfo() - Method in class com.qualcomm.robotcore.hardware.AnalogOutput
    +
     
    +
    getConnectionInfo() - Method in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    getConnectionInfo() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    getConnectionInfo() - Method in class com.qualcomm.robotcore.hardware.DigitalChannelImpl
    +
     
    +
    getConnectionInfo() - Method in interface com.qualcomm.robotcore.hardware.HardwareDevice
    +
    +
    Get connection information about this device in a human readable format
    +
    +
    getConnectionInfo() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    getConnectionInfo() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    getConnectionInfo() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getConnectionInfo() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getConnectionInfo() - Method in class com.qualcomm.robotcore.hardware.LED
    +
     
    +
    getConnectionInfo() - Method in class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
     
    +
    getConnectionInfo() - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
     
    +
    getController() - Method in interface com.qualcomm.robotcore.hardware.CRServo
    +
    +
    Returns the underlying servo controller on which this servo is situated.
    +
    +
    getController() - Method in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    getController() - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Returns the underlying motor controller on which this motor is situated.
    +
    +
    getController() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Get DC motor controller
    +
    +
    getController() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Deprecated. +
    Use of I2cControllerPortDevice.getI2cController() is suggested instead
    +
    +
    +
    getController() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    returns the I2cController on which this device is found
    +
    +
    getController() - Method in interface com.qualcomm.robotcore.hardware.Servo
    +
    +
    Returns the underlying servo controller on which this servo is situated.
    +
    +
    getController() - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
    +
    Get Servo Controller
    +
    +
    getCopyOfReadBuffer(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Get a copy of the most recent data read in from the device
    +
    +
    getCopyOfReadBuffer() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Atomically returns a copy of that portion of the read-cache which does not include the + initial four-byte header section: that contains the read payload most recently read from + the controller.
    +
    +
    getCopyOfReadBuffer() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Get a copy of the most recent data read in from the device
    +
    +
    getCopyOfWriteBuffer(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Get a copy of the data that is set to be written out to the device
    +
    +
    getCopyOfWriteBuffer() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Atomically returns a copy that portion of the write-cache which does not include the + initial four-byte header section.
    +
    +
    getCopyOfWriteBuffer() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Get a copy of the data that is set to be written out to the device
    +
    +
    getCountryCode() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Returns the current country code.
    +
    +
    getCurrentAddress(SerialNumber) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressConfiguration
    +
     
    +
    getCurrentAddress() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModule
    +
     
    +
    getCurrentPosition() - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Returns the current reading of the encoder for this motor.
    +
    +
    getCurrentPosition() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Get the current encoder value, accommodating the configured directionality of the motor.
    +
    +
    getData() - Method in class org.firstinspires.ftc.robotcore.external.matrices.DenseMatrixF
    +
    +
    Returns the contiguous array of floats which is the storage for this matrix
    +
    +
    getData() - Method in class org.firstinspires.ftc.robotcore.external.matrices.GeneralMatrixF
    +
     
    +
    getData() - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    getData() - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    getDeviceClient() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    getDeviceDisplayName(SerialNumber) - Static method in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    getDeviceName() - Method in class com.qualcomm.robotcore.hardware.AnalogInput
    +
     
    +
    getDeviceName() - Method in class com.qualcomm.robotcore.hardware.AnalogOutput
    +
     
    +
    getDeviceName() - Method in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    getDeviceName() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    getDeviceName() - Method in class com.qualcomm.robotcore.hardware.DigitalChannelImpl
    +
     
    +
    getDeviceName() - Method in interface com.qualcomm.robotcore.hardware.HardwareDevice
    +
    +
    Returns a string suitable for display to the user as to the type of device.
    +
    +
    getDeviceName() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    getDeviceName() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getDeviceName() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getDeviceName() - Method in class com.qualcomm.robotcore.hardware.LED
    +
     
    +
    getDeviceName() - Method in class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
     
    +
    getDeviceName() - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
     
    +
    getDeviceTypeClass() - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
    +
    Returns the runtime device type for this mapping
    +
    +
    getDigitalChannelMode(int) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
    +
    +
    Get the mode of a digital channel
    +
    +
    getDigitalChannelState(int) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
    +
    +
    Get the state of a digital channel + If it's in OUTPUT mode, this will return the output bit.
    +
    +
    getDigitalInputStateByte() - Method in interface com.qualcomm.robotcore.hardware.DeviceInterfaceModule
    +
    +
    A byte containing the current logic levels present in the D7-D0 channel pins.
    +
    +
    getDigitalIOControlByte() - Method in interface com.qualcomm.robotcore.hardware.DeviceInterfaceModule
    +
    +
    Get the digital IO control byte
    +
    +
    getDigitalOutputStateByte() - Method in interface com.qualcomm.robotcore.hardware.DeviceInterfaceModule
    +
    +
    The D7-D0 output set field is a byte containing the required I/O output of the D7-D0 + channel pins.
    +
    +
    getDirection() - Method in interface com.qualcomm.robotcore.hardware.CompassSensor
    +
    +
    Get the current direction, in degrees, in the range [0, 360).
    +
    +
    getDirection() - Method in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    getDirection() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Get the direction
    +
    +
    getDirection() - Method in interface com.qualcomm.robotcore.hardware.DcMotorSimple
    +
    +
    Returns the current logical direction in which this motor is set as operating.
    +
    +
    getDirection() - Method in interface com.qualcomm.robotcore.hardware.Servo
    +
    +
    Returns the current logical direction in which this servo is set as operating.
    +
    +
    getDirection() - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
    +
    Get the direction
    +
    +
    getDirection() - Method in enum org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CameraDirection
    +
     
    +
    getDisplayOrder() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Log
    +
    +
    Returns the order in which data in log is to be displayed on the driver station.
    +
    +
    getDistance(DistanceUnit) - Method in interface com.qualcomm.robotcore.hardware.DistanceSensor
    +
    +
    Returns the current distance in the indicated distance units
    +
    +
    getDistanceUnit() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
    +
    +
    Returns the DistanceUnit being used.
    +
    +
    getDurationMs() - Method in class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    getErrorMessage() - Method in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    getEventLoop() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Get the current event loop
    +
    +
    getEventLoopManager() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    getEventLoopManager() - Method in interface com.qualcomm.robotcore.eventloop.opmode.FtcRobotControllerServiceState
    +
     
    +
    getExtantLynxDeviceImpls() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    getFile(File) - Method in class com.qualcomm.ftccommon.SoundPlayer.LoadedSoundCache
    +
     
    +
    getFinishedFirmwareVersionString() - Method in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    getFirmwareVersionString() - Method in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    getFirmwareVersionString() - Method in interface com.qualcomm.robotcore.hardware.RobotCoreLynxModule
    +
     
    +
    getFrameOnce(<any>) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
    +
    +
    (Advanced) Calls the indicated code with a frame from the video stream, exactly once.
    +
    +
    getFrameQueue() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
    +
    +
    (Advanced) Returns a queue into which, if requested, Vuforia Frames are placed + as they become available.
    +
    +
    getFrameQueueCapacity() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
    +
    +
    (Advanced) Returns the current capacity of the frame queue.
    +
    +
    getFtcCameraFromRobot(CameraName) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    getFtcCameraFromTarget() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Returns the pose of the trackable if it is currently visible.
    +
    +
    getFtcFieldFromRobot() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Returns the OpenGLMatrix transform that represents the location of the robot + on in the FTC Field Coordinate System, or null if that cannot be computed.
    +
    +
    getFtcFieldFromTarget() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable
    +
    +
    Returns the location of the trackable in the FTC Field Coordinate System.
    +
    +
    getGamepad(int) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Get the gamepad connected to a particular user
    +
    +
    getGamepadId() - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
     
    +
    getGamepads() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    getGamepads() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Get the gamepads
    +
    +
    getHardwareDevice(Class<? extends T>, SerialNumber, <any>) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
    +
    Returns the device whose serial number is the one indicated, from the hardware map if possible + but instantiating / opening it if necessary.
    +
    +
    getHardwareMap() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    getHash(String) - Method in class com.qualcomm.ftccommon.SoundPlayer.LoadedSoundCache
    +
     
    +
    getHeading() - Method in interface com.qualcomm.robotcore.hardware.GyroSensor
    +
    +
    Return the integrated Z axis as a cartesian heading.
    +
    +
    getHealthStatus() - Method in interface com.qualcomm.robotcore.hardware.HardwareDeviceHealth
    +
     
    +
    getHealthStatus() - Method in class com.qualcomm.robotcore.hardware.HardwareDeviceHealthImpl
    +
     
    +
    getHealthStatus() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getHealthStatus() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getHeartbeat() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Get the current heartbeat state
    +
    +
    getHeartbeatAction() - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynch
    +
    +
    Returns the current action, if any, to take upon expiration of the heartbeat interval.
    +
    +
    getHeartbeatAction() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getHeartbeatAction() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getHeartbeatInterval() - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynch
    +
    +
    Returns the interval within which communication must be received by the I2C device lest + a timeout occur.
    +
    +
    getHeartbeatInterval() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getHeartbeatInterval() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getHistoryQueue() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getHistoryQueue() - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchReadHistory
    +
    +
    (Advanced) Returns a queue into which, if requested, TimestampedI2cDatas are (optionally) + placed as they become available.
    +
    +
    getHistoryQueue() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchReadHistoryImpl
    +
     
    +
    getHistoryQueueCapacity() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getHistoryQueueCapacity() - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchReadHistory
    +
    +
    Returns the current capacity of the history queue.
    +
    +
    getHistoryQueueCapacity() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchReadHistoryImpl
    +
     
    +
    getI2cAddr() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
    +
    Deprecated.
    +
    +
    getI2cAddr() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getI2cAddr() - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Deprecated. + +
    +
    +
    getI2cAddress() - Method in interface com.qualcomm.robotcore.hardware.ColorSensor
    +
    +
    Get the current I2C Address of this object.
    +
    +
    getI2cAddress() - Method in interface com.qualcomm.robotcore.hardware.I2cAddressableDevice
    +
    +
    Returns the I2C address currently in use to communicate with an I2C hardware device
    +
    +
    getI2cAddress() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getI2cAddress() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getI2cAddress() - Method in interface com.qualcomm.robotcore.hardware.IrSeekerSensor
    +
    +
    Get the current I2C Address of this object.
    +
    +
    getI2cController() - Method in interface com.qualcomm.robotcore.hardware.I2cControllerPortDevice
    +
    +
    Returns the controller associated with this device.
    +
    +
    getI2cController() - Method in class com.qualcomm.robotcore.hardware.I2cControllerPortDeviceImpl
    +
     
    +
    getI2cPortReadyCallback(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Returns the callback currently registered to receive portIsReady notifications for the + indicated port
    +
    +
    getI2cPortReadyCallback() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Returns the callback previously registered with I2cDevice.registerForI2cPortReadyCallback(com.qualcomm.robotcore.hardware.I2cController.I2cPortReadyCallback), or + null if no callback is currently registered.
    +
    +
    getI2cPortReadyCallback() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    returns the currently registered port-ready callback for this device
    +
    +
    getI2cReadCache(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Get direct access to the cache that I2C reads will be populated into
    +
    +
    getI2cReadCache() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Returns access to the read-cache into which data from the controller is read.
    +
    +
    getI2cReadCache() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Get direct access to the read cache used by this I2C device
    +
    +
    getI2cReadCacheLock(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Get access to the read cache lock.
    +
    +
    getI2cReadCacheLock() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Returns access to the lock controlling the read-cache.
    +
    +
    getI2cReadCacheLock() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Get access to the read cache lock.
    +
    +
    getI2cReadCacheTimeWindow(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Returns the time window object into which timestamps are placed as the read cache is populated
    +
    +
    getI2cReadCacheTimeWindow() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Returns the time window object into which time stamps are written when the read cache is updated
    +
    +
    getI2cReadCacheTimeWindow() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    getI2cWriteCache(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Get direct access to the cache that I2C writes will be populated into
    +
    +
    getI2cWriteCache() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Returns access to the write-cache from which data is written to the controller.
    +
    +
    getI2cWriteCache() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Get direct access to the write cache used by this I2C device
    +
    +
    getI2cWriteCacheLock(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Get access to the write cache lock.
    +
    +
    getI2cWriteCacheLock() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Returns access to the lock controlling the write-cache.
    +
    +
    getI2cWriteCacheLock() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Get access to the write cache lock.
    +
    +
    getIndividualSensors() - Method in interface com.qualcomm.robotcore.hardware.IrSeekerSensor
    +
    +
    Get a list of all IR sensors attached to this seeker.
    +
    +
    getInputStream() - Method in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    getInstance() - Static method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    getInstance() - Static method in class org.firstinspires.ftc.robotcore.external.ClassFactory
    +
     
    +
    getItem(int) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModule
    +
     
    +
    getItemSeparator() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Returns the string which is used to separate Telemetry.Items contained within a line.
    +
    +
    getKey() - Method in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    getLanguageCode() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Returns the current language code.
    +
    +
    getLastTrackedPoseVuforiaCamera() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Returns the pose associated with the last known tracked location of this trackable, if any.
    +
    +
    getLastTrackedRawPose() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    + +
    +
    getLEDState(int) - Method in interface com.qualcomm.robotcore.hardware.DeviceInterfaceModule
    +
    +
    Indicates whether the LED on the given channel is on or not
    +
    +
    getLegacyModule() - Method in interface com.qualcomm.robotcore.hardware.LegacyModulePortDevice
    +
    +
    Returns the legacy module associated with this device.
    +
    +
    getLegacyModule() - Method in class com.qualcomm.robotcore.hardware.LegacyModulePortDeviceImpl
    +
     
    +
    getLightDetected() - Method in interface com.qualcomm.robotcore.hardware.LightSensor
    +
    +
    Get the amount of light detected by the sensor, scaled and cliped to a range + which is a pragmatically useful sensitivity.
    +
    +
    getListener(String) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
     
    +
    getListener() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable
    +
    +
    Returns the current listener associated with this trackable.
    +
    +
    getLocalAboutInfo() - Static method in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    getLocalGroupList() - Method in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    getLocalizer() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackables
    +
    +
    Returns the VuforiaLocalizer which manages this list of trackables.
    +
    +
    getLocation() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable
    +
    +
    Returns the location of the trackable in the FTC Field Coordinate System.
    +
    +
    getLogging() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getLogging() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getLogging() - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
     
    +
    getLoggingTag() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getLoggingTag() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getLoggingTag() - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
     
    +
    getLoop() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
    +
    +
    Returns the number of repeats.
    +
    +
    getLynxModulesForFirmwareUpdate() - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    getLynxUsbDeviceForFirmwareUpdate(SerialNumber) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    getMagnitude() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
    +
    Returns a number between 0 and 1, indicating how much the device is tilted.
    +
    +
    getManufacturer() - Method in class com.qualcomm.robotcore.hardware.AnalogInput
    +
     
    +
    getManufacturer() - Method in class com.qualcomm.robotcore.hardware.AnalogOutput
    +
     
    +
    getManufacturer() - Method in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    getManufacturer() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    getManufacturer() - Method in class com.qualcomm.robotcore.hardware.DigitalChannelImpl
    +
     
    +
    getManufacturer() - Method in interface com.qualcomm.robotcore.hardware.HardwareDevice
    +
    +
    Returns an indication of the manufacturer of this device.
    +
    +
    getManufacturer() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    getManufacturer() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getManufacturer() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getManufacturer() - Method in class com.qualcomm.robotcore.hardware.LED
    +
     
    +
    getManufacturer() - Method in class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
     
    +
    getManufacturer() - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
     
    +
    getMasterVolume() - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Returns the master volume control that is applied to all played sounds
    +
    +
    getMaxAnalogInputVoltage() - Method in interface com.qualcomm.robotcore.hardware.AnalogInputController
    +
    +
    Returns the maximum value that getAnalogInputVoltage() is capable of reading
    +
    +
    getMaxAnalogInputVoltage() - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
    +
    +
    Returns the maximum voltage that can be read by our analog inputs
    +
    +
    getMaxI2cWriteLatency(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Returns the maximum interval, in milliseconds, from when the controller receives an I2c write + transmission over USB to when that write is actually issued to the I2c device.
    +
    +
    getMaxI2cWriteLatency() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Returns the maximum interval, in milliseconds, from when the controller receives an I2c write + transmission over USB to when that write is actually issued to the I2c device.
    +
    +
    getMaxI2cWriteLatency() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    getMaxVoltage() - Method in class com.qualcomm.robotcore.hardware.AnalogInput
    +
    +
    Returns the maximum value that getVoltage() is capable of reading
    +
    +
    getMode() - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Returns the current run mode for this motor
    +
    +
    getMode() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Get the current mode
    +
    +
    getMode() - Method in interface com.qualcomm.robotcore.hardware.DigitalChannel
    +
    +
    Returns whether the channel is in input or output mode
    +
    +
    getMode() - Method in class com.qualcomm.robotcore.hardware.DigitalChannelImpl
    +
    +
    Get the channel mode
    +
    +
    getMode() - Method in interface com.qualcomm.robotcore.hardware.IrSeekerSensor
    +
    +
    Get the device mode
    +
    +
    getModuleAddress() - Method in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    getModuleAddress() - Method in class com.qualcomm.robotcore.hardware.LynxModuleMeta
    +
     
    +
    getModuleAddress() - Method in interface com.qualcomm.robotcore.hardware.RobotCoreLynxModule
    +
     
    +
    getMonitor() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    return any event loop monitor previously set
    +
    +
    getMotorCurrentPosition(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Get the current motor position
    +
    +
    getMotorMode(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Get the current motor mode.
    +
    +
    getMotorPower(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Get the current motor power
    +
    +
    getMotorPowerFloat(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Is motor power set to float?
    +
    +
    getMotorTargetPosition(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Get the current motor target position
    +
    +
    getMotorType() - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Returns the assigned type for this motor.
    +
    +
    getMotorType(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Retrieves the motor type configured for this motor
    +
    +
    getMotorType() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    getMotorVelocity(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorControllerEx
    +
    +
    Returns the velocity of the indicated motor in ticks per second.
    +
    +
    getMotorVelocity(int, AngleUnit) - Method in interface com.qualcomm.robotcore.hardware.DcMotorControllerEx
    +
    +
    Returns the velocity of the indicated motor.
    +
    +
    getMotorZeroPowerBehavior(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Returns the current zero power behavior of the motor.
    +
    +
    getMsDuration(Context, int) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    getMsDuration(Context, File) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    getMsNow() - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    getMsTransmissionInterval() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Returns the minimum interval between Telemetry transmissions from the robot controller + to the driver station
    +
    +
    getName() - Method in interface org.firstinspires.ftc.robotcore.external.Event
    +
     
    +
    getName() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable
    +
    +
    Returns the user-determined name associated with this trackable.
    +
    +
    getName() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackables
    +
    +
    Returns the user-specified name for this trackables.
    +
    +
    getNamesOf(HardwareDevice) - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
    +
    Returns all the names by which the device is known.
    +
    +
    getNetworkConnection() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    getNetworkConnectionStatus() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    getNormalized() - Method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
     
    +
    getNormalizedColors() - Method in interface com.qualcomm.robotcore.hardware.NormalizedColorSensor
    +
    +
    Reads the colors from the sensor
    +
    +
    getOperationalDirection() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    getOpMode(String) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    getOpModeManager() - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    getOpModeManager() - Method in class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    getOpModeManager() - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
    +
    Returns the OpModeManager associated with this event loop
    +
    +
    getOrientation(MatrixF, AxesReference, AxesOrder, AngleUnit) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    Given a rotation matrix, and an AxesReference and AxesOrder, returns an orientation + that would produce that rotation matrix.
    +
    +
    getOrientation(MatrixF, AxesReference, AxesOrder, AngleUnit, Orientation.AngleSet) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    Given a rotation matrix, and an AxesReference and AxesOrder, returns an orientation + that would produce that rotation matrix.
    +
    +
    getOwner() - Method in interface com.qualcomm.robotcore.eventloop.SyncdDevice
    +
    +
    Retrieves the owning module of this sync'd device.
    +
    +
    getParameters() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDeviceWithParameters
    +
    +
    Returns the parameter block currently in use for this sensor
    +
    +
    getParams() - Method in class com.qualcomm.ftccommon.CommandList.CmdPlaySound
    +
     
    +
    getParent() - Method in class com.qualcomm.robotcore.hardware.LynxModuleMetaList
    +
     
    +
    getParent() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable
    +
    +
    Returns the parent trackable with which this trackable is associated, if any.
    +
    +
    getPattern() - Method in interface com.qualcomm.robotcore.hardware.Blinker
    +
    +
    Returns the current blinking pattern
    +
    +
    getPattern() - Method in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    getPhoneFromVuforiaCamera(VuforiaLocalizer.CameraDirection) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    + +
    +
    getPhoneLocationOnRobot() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    + +
    +
    getPIDCoefficients(int, DcMotor.RunMode) - Method in interface com.qualcomm.robotcore.hardware.DcMotorControllerEx
    +
    + +
    +
    getPIDCoefficients(DcMotor.RunMode) - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    Deprecated. +
    Use #getPIDFCoefficients(RunMode) instead
    +
    +
    +
    getPIDCoefficients(DcMotor.RunMode) - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    getPIDFCoefficients(int, DcMotor.RunMode) - Method in interface com.qualcomm.robotcore.hardware.DcMotorControllerEx
    +
    +
    Returns the coefficients used for PIDF control on the indicated motor when in the indicated mode
    +
    +
    getPIDFCoefficients(DcMotor.RunMode) - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    Returns the PIDF control coefficients used when running in the indicated mode + on this motor.
    +
    +
    getPIDFCoefficients(DcMotor.RunMode) - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    getPitch() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
    +
    Returns the pitch.
    +
    +
    getPort() - Method in interface com.qualcomm.robotcore.hardware.I2cControllerPortDevice
    +
    +
    Returns the port on the associated controller that this device occupies.
    +
    +
    getPort() - Method in class com.qualcomm.robotcore.hardware.I2cControllerPortDeviceImpl
    +
     
    +
    getPort() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    returns the port number on the controller on which this device is found
    +
    +
    getPort() - Method in interface com.qualcomm.robotcore.hardware.LegacyModulePortDevice
    +
    +
    Returns the port on the associated legacy module that this device occupies.
    +
    +
    getPort() - Method in class com.qualcomm.robotcore.hardware.LegacyModulePortDeviceImpl
    +
     
    +
    getPortNumber() - Method in interface com.qualcomm.robotcore.hardware.CRServo
    +
    +
    Returns the port number on the underlying servo controller on which this motor is situated.
    +
    +
    getPortNumber() - Method in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    getPortNumber() - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Returns the port number on the underlying motor controller on which this motor is situated.
    +
    +
    getPortNumber() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Get port number
    +
    +
    getPortNumber() - Method in interface com.qualcomm.robotcore.hardware.Servo
    +
    +
    Returns the port number on the underlying servo controller on which this motor is situated.
    +
    +
    getPortNumber() - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
    +
    Get Channel
    +
    +
    getPortReadyBeginEndCallback(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Returns the current callback registered for a given port
    +
    +
    getPortReadyBeginEndCallback() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Returns the object, if any, currently registered for portIsReady() begin / end notifications
    +
    +
    getPortReadyBeginEndCallback() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    returns the currently registered callback that will receive begin and cessation notifications
    +
    +
    getPose() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    A synonym for VuforiaTrackableDefaultListener.getPosePhone(), the latter being more descriptive of the + coordinate system of the value returned.
    +
    +
    getPoseCorrectionMatrix(VuforiaLocalizer.CameraDirection) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Deprecated. +
    These phone-based matrices are no longer of much relevance, as the + correct values, when of interest, are fixed and known.
    +
    +
    +
    getPosePhone() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Returns the pose of the trackable if it is currently visible.
    +
    +
    getPosition() - Method in interface com.qualcomm.robotcore.hardware.Servo
    +
    +
    Returns the position to which the servo was last commanded to move.
    +
    +
    getPosition() - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
    +
    Returns the position to which the servo was last commanded, or Double.NaN if that is + unavailable.
    +
    +
    getPower() - Method in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    getPower() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Get the current motor power
    +
    +
    getPower() - Method in interface com.qualcomm.robotcore.hardware.DcMotorSimple
    +
    +
    Returns the current configured power level of the motor.
    +
    +
    getPowerFloat() - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Returns whether the motor is currently in a float power level.
    +
    +
    getPowerFloat() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Is motor power set to float?
    +
    +
    getPulseWidthOutputTime() - Method in interface com.qualcomm.robotcore.hardware.PWMOutput
    +
     
    +
    getPulseWidthOutputTime(int) - Method in interface com.qualcomm.robotcore.hardware.PWMOutputController
    +
    +
    Gets the pulse width for the channel output in units of 1 microsecond.
    +
    +
    getPulseWidthOutputTime() - Method in class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
    +
    Get the pulse width output time for this port
    +
    +
    getPulseWidthPeriod() - Method in interface com.qualcomm.robotcore.hardware.PWMOutput
    +
     
    +
    getPulseWidthPeriod(int) - Method in interface com.qualcomm.robotcore.hardware.PWMOutputController
    +
    +
    Gets the pulse repetition period for the channel output in units of 1 microsecond.
    +
    +
    getPulseWidthPeriod() - Method in class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
    +
    Get the pulse width output
    +
    +
    getPwmRange() - Method in class com.qualcomm.robotcore.hardware.CRServoImplEx
    +
     
    +
    getPwmRange() - Method in interface com.qualcomm.robotcore.hardware.PwmControl
    +
    +
    Returns the current PWM range limits for the servo
    +
    +
    getPwmRange() - Method in class com.qualcomm.robotcore.hardware.ServoImplEx
    +
     
    +
    getPwmStatus() - Method in interface com.qualcomm.robotcore.hardware.ServoController
    +
    +
    Returns the enablement status of the collective set of servos connected to this controller
    +
    +
    getRate() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
    +
    +
    Returns the playback rate.
    +
    +
    getRawLightDetected() - Method in interface com.qualcomm.robotcore.hardware.LightSensor
    +
    +
    Returns a signal whose strength is proportional to the intensity of the light measured.
    +
    +
    getRawLightDetectedMax() - Method in interface com.qualcomm.robotcore.hardware.LightSensor
    +
    +
    Returns the maximum value that can be returned by LightSensor.getRawLightDetected().
    +
    +
    getRawPose() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    + +
    +
    getRawUpdatedPose() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    + +
    +
    getReadBuffer() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceReader
    +
    +
    Get a copy of the most recent data read in from the I2C device
    +
    +
    getReadMode() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Returns the mode of the window
    +
    +
    getReadWindow() - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynch
    +
    +
    Returns the current register window used for reading.
    +
    +
    getReadWindow() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getReadWindow() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getRegisterCount() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Returns the number of registers in the window
    +
    +
    getRegisterFirst() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Returns the first register in the window
    +
    +
    getRegisterMax() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Returns the first register NOT in the window
    +
    +
    getResolution() - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Returns the resolution with which the timer was instantiated.
    +
    +
    getResource(int) - Method in class com.qualcomm.ftccommon.SoundPlayer.LoadedSoundCache
    +
     
    +
    getRobocolMsgType() - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
     
    +
    getRobot() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    getRobotLocation() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    + +
    +
    getRobotStatus() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    getRobotUsbDevice() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase.LynxUsbDeviceContainer
    +
     
    +
    getRoll() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
    +
    Returns the roll.
    +
    +
    getRotationFraction() - Method in interface com.qualcomm.robotcore.hardware.GyroSensor
    +
    +
    Return the rotation of this sensor expressed as a fraction of the maximum possible reportable rotation
    +
    +
    getRotationMatrix() - Method in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    Returns the rotation matrix associated with the receiver Orientation.
    +
    +
    getRotationMatrix(AxesReference, AxesOrder, AngleUnit, float, float, float) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    Returns the rotation matrix associated with a particular set of three rotational angles.
    +
    +
    getRow(int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a vector containing data of a particular row of the receiver.
    +
    +
    getRuntime() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    Get the number of seconds this op mode has been running
    +
    +
    getRuntimeException() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode.LinearOpModeHelper
    +
     
    +
    getScannableDeviceSerialNumber() - Method in class com.qualcomm.robotcore.util.SerialNumber
    +
    +
    Returns the SerialNumber of the device associated with this one that would appear + in a ScannedDevices.
    +
    +
    getSensorAngle() - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSeekerIndividualSensor
    +
    +
    Get the angle at which this sensor is mounted
    +
    +
    getSensorStrength() - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSeekerIndividualSensor
    +
    +
    Get the strength of the IR signal detected by this sensor
    +
    +
    getSerialNumber() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase.LynxUsbDeviceContainer
    +
     
    +
    getSerialNumber() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModule
    +
     
    +
    getSerialNumber() - Method in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    getSerialNumber() - Method in interface com.qualcomm.robotcore.hardware.AnalogInputController
    +
    +
    Serial Number
    +
    +
    getSerialNumber() - Method in interface com.qualcomm.robotcore.hardware.AnalogOutputController
    +
    +
    Serial Number
    +
    +
    getSerialNumber() - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
    +
    +
    Serial Number
    +
    +
    getSerialNumber() - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Serial Number
    +
    +
    getSerialNumber() - Method in interface com.qualcomm.robotcore.hardware.PWMOutputController
    +
    +
    Serial Number
    +
    +
    getSerialNumberOfUsbDevice(UsbDevice) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    getService() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService.FtcRobotControllerBinder
    +
     
    +
    getServoPosition(int) - Method in interface com.qualcomm.robotcore.hardware.ServoController
    +
    +
    Get the position of a servo at a given channel
    +
    +
    getServoPwmRange(int) - Method in interface com.qualcomm.robotcore.hardware.ServoControllerEx
    +
    +
    Returns the PWM range of the indicated servo on this controller.
    +
    +
    getShutdownReason() - Method in interface com.qualcomm.robotcore.eventloop.SyncdDevice
    +
    +
    Has this device shutdown abnormally? Note that even if this method returns true that + a close() will still be necessary to fully clean up associated resources.
    +
    +
    getSignalDetectedThreshold() - Method in interface com.qualcomm.robotcore.hardware.IrSeekerSensor
    +
    +
    Get the minimum threshold for a signal to be considered detected
    +
    +
    getStartingAddress(SerialNumber) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressConfiguration
    +
     
    +
    getStartingAddress() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModule
    +
     
    +
    getState() - Method in interface com.qualcomm.robotcore.hardware.DigitalChannel
    +
    +
    Returns the current state of the channel
    +
    +
    getState() - Method in class com.qualcomm.robotcore.hardware.DigitalChannelImpl
    +
    +
    Get the channel state
    +
    +
    getStateMonitor() - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    getStatus() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.WriteCacheStatus
    +
     
    +
    getStatus() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Returns the TextToSpeech initialization status.
    +
    +
    getStrength() - Method in interface com.qualcomm.robotcore.hardware.IrSeekerSensor
    +
    +
    IR Signal strength
    +
    +
    getString() - Method in class com.qualcomm.robotcore.util.SerialNumber
    +
    +
    Returns the string contents of the serial number.
    +
    +
    getSwitches() - Method in interface com.qualcomm.robotcore.hardware.TouchSensorMultiplexer
    +
     
    +
    getTag() - Method in class com.qualcomm.ftccommon.ConfigWifiDirectActivity
    +
     
    +
    getTag() - Method in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    getTag() - Method in class com.qualcomm.ftccommon.FtcAdvancedRCSettingsActivity
    +
     
    +
    getTag() - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    getTag() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    getTag() - Method in class com.qualcomm.ftccommon.FtcRobotControllerSettingsActivity
    +
     
    +
    getTag() - Method in class com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity
    +
     
    +
    getTag() - Method in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    getTag() - Method in class com.qualcomm.ftccommon.ViewLogsActivity
    +
     
    +
    getTargetPosition() - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Returns the current target encoder position for this motor.
    +
    +
    getTargetPosition() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Get the current motor target position.
    +
    +
    getTargetPositionTolerance() - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    Returns the current target positioning tolerance of this motor
    +
    +
    getTargetPositionTolerance() - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    getTrackables() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable
    +
    +
    Returns the VuforiaTrackables of which this VuforiaTrackable is a member
    +
    +
    getTranslation() - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Assumes that the receiver is non-perspective transformation matrix.
    +
    +
    getType() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId
    +
     
    +
    getUltrasonicLevel() - Method in interface com.qualcomm.robotcore.hardware.UltrasonicSensor
    +
    +
    Get the Ultrasonic levels from this sensor
    +
    +
    getUnnormalized() - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    getUpdatedRobotLocation() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Returns the location of the robot, but only if a new location has been detected since + the last call to VuforiaTrackableDefaultListener.getUpdatedRobotLocation().
    +
    +
    getUpdatedVuforiaCameraFromTarget() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Returns the raw pose of the trackable, but only if a new pose is available since the last call + to VuforiaTrackableDefaultListener.getUpdatedVuforiaCameraFromTarget().
    +
    +
    getUSBAccessibleLynxDevices(boolean) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    getUSBAccessibleLynxModules() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    getUsbModuleAttachmentHandler() - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    getUser() - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
     
    +
    getUserConfiguredName() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getUserConfiguredName() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getUserConfiguredName() - Method in interface com.qualcomm.robotcore.hardware.RobotConfigNameable
    +
    +
    Returns the human-recognizable name of this device, if same has been set.
    +
    +
    getUserData() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable
    +
    +
    Retreives user data previously associated with this trackable object.
    +
    +
    getValue() - Method in interface com.qualcomm.robotcore.hardware.TouchSensor
    +
    +
    Represents how much force is applied to the touch sensor; for some touch sensors + this value will only ever be 0 or 1.
    +
    +
    getVelocity() - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    Returns the current velocity of the motor, in ticks per second
    +
    +
    getVelocity(AngleUnit) - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    Returns the current velocity of the motor, in angular units per second
    +
    +
    getVelocity() - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    getVelocity(AngleUnit) - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    getVersion() - Method in class com.qualcomm.robotcore.hardware.AnalogInput
    +
     
    +
    getVersion() - Method in class com.qualcomm.robotcore.hardware.AnalogOutput
    +
     
    +
    getVersion() - Method in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    getVersion() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    getVersion() - Method in class com.qualcomm.robotcore.hardware.DigitalChannelImpl
    +
     
    +
    getVersion() - Method in interface com.qualcomm.robotcore.hardware.HardwareDevice
    +
    +
    Version
    +
    +
    getVersion() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    getVersion() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    getVersion() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getVersion() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    getVersion() - Method in class com.qualcomm.robotcore.hardware.LED
    +
     
    +
    getVersion() - Method in class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
     
    +
    getVersion() - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
     
    +
    getView(int, View, ViewGroup) - Method in class com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity.WifiChannelItemAdapter
    +
     
    +
    getVoltage() - Method in class com.qualcomm.robotcore.hardware.AnalogInput
    +
    +
    Returns the current voltage of this input.
    +
    +
    getVoltage() - Method in interface com.qualcomm.robotcore.hardware.VoltageSensor
    +
    +
    Get the current voltage
    +
    +
    getVolume() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
    +
    +
    Returns the current volume.
    +
    +
    getVuforiaCameraFromTarget() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Returns the raw pose of the trackable as reported by Vuforia.
    +
    +
    getVuforiaLocalizer() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
     
    +
    getVuMarkInstanceId() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Returns the instance id of the currently visible VuMark associated with this + VuMark template, if any presently exists.
    +
    +
    getWebServer() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    getWebServer() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    getWebServer() - Method in interface com.qualcomm.robotcore.eventloop.opmode.EventLoopManagerClient
    +
     
    +
    getWriteCacheStatus() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    getX() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
    +
    +
    Returns the acceleration in the x-axis.
    +
    +
    getX() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
    +
    +
    Returns the angular speed around the x-axis.
    +
    +
    getY() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
    +
    +
    Returns the acceleration in the y-axis.
    +
    +
    getY() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
    +
    +
    Returns the angular speed around the y-axis.
    +
    +
    getZ() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
    +
    +
    Returns the acceleration in the z-axis.
    +
    +
    getZ() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
    +
    +
    Returns the angular speed around the z-axis.
    +
    +
    getZeroPowerBehavior() - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Returns the current behavior of the motor were a power level of zero to be applied.
    +
    +
    getZeroPowerBehavior() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    gracefullyDrainReadersAndWriters() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    gravity - Variable in class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
    +
     
    +
    green() - Method in interface com.qualcomm.robotcore.hardware.ColorSensor
    +
    +
    Get the Green values detected by the sensor as an int.
    +
    +
    green - Variable in class com.qualcomm.robotcore.hardware.NormalizedRGBA
    +
    +
    normalized green value, in range [0,1)
    +
    +
    guide - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    button guide - often the large button in the middle of the controller.
    +
    +
    Gyroscope - Interface in com.qualcomm.robotcore.hardware
    +
    +
    The Gyroscope interface exposes core, fundamental functionality that + is applicable to all gyroscopes: that of reporting angular rotation rate.
    +
    +
    GyroSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Gyro Sensor
    +
    +
    gyroSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    + + + +

    H

    +
    +
    handleCommandActivateConfiguration(String) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandClearRememberedGroups() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
    +
    Clear the list of remembered groups
    +
    +
    handleCommandDeleteConfiguration(String) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandDisconnectWifiDirect() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandDiscoverLynxModules(String) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    handleCommandDismissAllDialogs(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandDismissDialog(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandDismissProgress(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandGetCandidateLynxFirmwareImages(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandGetUSBAccessibleLynxModules(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandInitOpMode(String) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    handleCommandLynxChangeModuleAddresses(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandLynxFirmwareUpdate(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
    +
    Update the firmware of the device indicated in the command.
    +
    +
    handleCommandPlaySound(String) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    handleCommandRequestAboutInfo(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandRequestConfigurations() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
    +
    Serialize the entire list of config file metadata and send to the driver station
    +
    +
    handleCommandRequestConfigurationTemplates() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
    +
    Serialize the entire list of config file metadata and send to the driver station
    +
    +
    handleCommandRequestInspectionReport() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
    +
    Return an inspection report of this (robot controller) device back to the caller
    +
    +
    handleCommandRequestParticularConfiguration(String) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandRequestRememberedGroups() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
    +
    Serialize the list of remembered Wifi Direct groups and send it to the driver station
    +
    +
    handleCommandRequestRememberedGroupsResp(String) - Method in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    handleCommandRequestSound(Command) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    handleCommandRestartRobot() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandRunOpMode(String) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    handleCommandSaveConfiguration(String) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandScan(String) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    handleCommandSetMatchNumber(String) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    handleCommandShowDialog(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandShowProgress(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandShowToast(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandStartDriverStationProgramAndManage() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandStartProgrammingMode() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
    +
    Starts programming mode on the robot controller, as requested by driver station.
    +
    +
    handleCommandStopPlayingSounds(Command) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    handleCommandStopProgrammingMode() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
    +
    Stops programming mode on the robot controller, as requested by driver station.
    +
    +
    handleCommandVisuallyConfirmWifiReset() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleCommandVisuallyIdentify(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    handleLoop() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
     
    +
    handleRememberedGroupsChanged() - Method in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    handleUsbModuleAttach(RobotUsbModule) - Method in class com.qualcomm.ftccommon.FtcEventLoop.DefaultUsbModuleAttachmentHandler
    +
     
    +
    handleUsbModuleAttach(RobotUsbModule) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    handleUsbModuleAttach(RobotUsbModule) - Method in class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    handleUsbModuleAttach(RobotUsbModule) - Method in interface com.qualcomm.ftccommon.UsbModuleAttachmentHandler
    +
    +
    One of the hardware modules in the current robot configuration (such as a Modern Robotics + DC Motor Controller, a Modern Robotics Legacy Module, etc) is now newly attached to the + system (or so we think).
    +
    +
    handleUsbModuleAttach(RobotUsbModule) - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
    +
    Process the fact that (we believe) that the indicated module has now reappeared after a + previously observed detachment.
    +
    +
    handleUsbModuleDetach(RobotUsbModule) - Method in class com.qualcomm.ftccommon.FtcEventLoop.DefaultUsbModuleAttachmentHandler
    +
     
    +
    handleUsbModuleDetach(RobotUsbModule) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    handleUsbModuleDetach(RobotUsbModule) - Method in class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    handleUsbModuleDetach(RobotUsbModule) - Method in interface com.qualcomm.ftccommon.UsbModuleAttachmentHandler
    +
    +
    One of the hardware modules in the current robot configuration (such as a Modern Robotics + DC Motor Controller, a Modern Robotics Legacy Module, etc) has been disconnected from the + system.
    +
    +
    handleUsbModuleDetach(RobotUsbModule) - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
    +
    Process the fact that a usb module has now become detached from the system.
    +
    +
    HardwareDevice - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Interface used by Hardware Devices
    +
    +
    HardwareDevice.Manufacturer - Enum in com.qualcomm.robotcore.hardware
    +
     
    +
    HardwareDeviceCloseOnTearDown - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Instances of HardwareDeviceCloseOnTearDown are those which should be + automatically closed when we we 'teardown' a robot
    +
    +
    HardwareDeviceHealth - Interface in com.qualcomm.robotcore.hardware
    +
    +
    HardwareDeviceHealth provides an indication of the perceived health of a hardware device
    +
    +
    hardwareDeviceHealth - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    HardwareDeviceHealth.HealthStatus - Enum in com.qualcomm.robotcore.hardware
    +
     
    +
    HardwareDeviceHealthImpl - Class in com.qualcomm.robotcore.hardware
    +
    +
    HardwareDeviceHealthImpl provides a delegatable-to implemenatation of HardwareDeviceHealth
    +
    +
    HardwareDeviceHealthImpl(String) - Constructor for class com.qualcomm.robotcore.hardware.HardwareDeviceHealthImpl
    +
     
    +
    HardwareDeviceHealthImpl(String, Callable<HardwareDeviceHealth.HealthStatus>) - Constructor for class com.qualcomm.robotcore.hardware.HardwareDeviceHealthImpl
    +
     
    +
    hardwareFactory - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    hardwareMap - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
    +
    the actual hardware map seen by the user
    +
    +
    hardwareMap - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    Hardware Mappings
    +
    +
    HardwareMap - Class in com.qualcomm.robotcore.hardware
    +
    +
    HardwareMap provides a means of retrieving runtime HardwareDevice instances according to the + names with which the corresponding physical devices were associated during robot configuration.
    +
    +
    HardwareMap(Context) - Constructor for class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    HardwareMap.DeviceMapping<DEVICE_TYPE extends HardwareDevice> - Class in com.qualcomm.robotcore.hardware
    +
    +
    A DeviceMapping contains a subcollection of the devices registered in a HardwareMap + comprised of all the devices of a particular device type
    +
    +
    hardwareMapExtra - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
    +
    the hardware map in which we keep any extra devices (ones not used by the user) we need to instantiate
    +
    +
    hashCode() - Method in class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    hashCode() - Method in class com.qualcomm.robotcore.hardware.PwmControl.PwmRange
    +
     
    +
    hashCode() - Method in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    hashCode() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId
    +
     
    +
    hashString - Variable in class com.qualcomm.ftccommon.CommandList.CmdPlaySound
    +
     
    +
    hashString - Variable in class com.qualcomm.ftccommon.CommandList.CmdRequestSound
    +
     
    +
    hashString - Variable in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    hasReadWindowChanged - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    hasRuntimeException() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode.LinearOpModeHelper
    +
     
    +
    hasWindowBeenUsedForRead() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Returns whether a read has ever been issued for this window or not
    +
    +
    haveSeenModuleIsArmedWork - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    healthStatus - Variable in class com.qualcomm.robotcore.hardware.HardwareDeviceHealthImpl
    +
     
    +
    healthStatusSuppressionCount - Static variable in class com.qualcomm.robotcore.hardware.TimestampedI2cData
    +
    +
    internal: keeps track of
    +
    +
    HeartbeatAction(boolean, boolean, I2cDeviceSynch.ReadWindow) - Constructor for class com.qualcomm.robotcore.hardware.I2cDeviceSynch.HeartbeatAction
    +
    +
    instantiates a new HeartbeatAction.
    +
    +
    heartbeatAction - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    heartbeatAction - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    heartbeatEvent(RobocolDatagram, long) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    heartbeatExecutor - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    heartbeatExecutor - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    heartbeatReadWindow - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.HeartbeatAction
    +
    +
    Priority #3: explicitly read a given register window
    +
    +
    heartbeatRequired - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    historyQueue - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchReadHistoryImpl
    +
     
    +
    historyQueueCapacity - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchReadHistoryImpl
    +
     
    +
    historyQueueLock - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchReadHistoryImpl
    +
     
    +
    hook() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    hook() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    hsvToColor(float, float, float) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    + + + +

    I

    +
    +
    i - Variable in class com.qualcomm.robotcore.hardware.PIDCoefficients
    +
     
    +
    i - Variable in class com.qualcomm.robotcore.hardware.PIDFCoefficients
    +
     
    +
    I2C_BUFFER_START_ADDRESS - Static variable in interface com.qualcomm.robotcore.hardware.I2cController
    +
     
    +
    I2cAddr - Class in com.qualcomm.robotcore.hardware
    +
    +
    I2cAddr represents an address on an I2C bus.
    +
    +
    I2cAddr(int) - Constructor for class com.qualcomm.robotcore.hardware.I2cAddr
    +
     
    +
    i2cAddr - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    i2cAddr - Variable in class com.qualcomm.robotcore.hardware.TimestampedI2cData
    +
    +
    the I2c address from which the data was read
    +
    +
    I2cAddrConfig - Interface in com.qualcomm.robotcore.hardware
    +
    +
    I2cAddrConfig allows the runtime I2C address used with a sensor to be changed + or queried.
    +
    +
    I2cAddressableDevice - Interface in com.qualcomm.robotcore.hardware
    +
    +
    I2cAddressableDevice provides a means by which the address of a device + living on an I2C bus can be retrieved.
    +
    +
    I2cController - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Interface for working with Digital Channel Controllers
    +
    +
    I2cController.I2cPortReadyBeginEndNotifications - Interface in com.qualcomm.robotcore.hardware
    +
    +
    A callback interface through which a client can learn when portIsReady callbacks + begin and then later end.
    +
    +
    I2cController.I2cPortReadyCallback - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Callback interface for I2C port ready notifications
    +
    +
    I2cControllerPortDevice - Interface in com.qualcomm.robotcore.hardware
    +
    +
    The I2cControllerPortDevice interface should be supported by hardware devices which + occupy a port on an I2cController.
    +
    +
    I2cControllerPortDeviceImpl - Class in com.qualcomm.robotcore.hardware
    +
     
    +
    I2cControllerPortDeviceImpl(I2cController, int) - Constructor for class com.qualcomm.robotcore.hardware.I2cControllerPortDeviceImpl
    +
     
    +
    i2cDevice - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    I2cDevice - Interface in com.qualcomm.robotcore.hardware
    +
    +
    The I2cDevice interface abstracts the engine used to interact on with a specific I2c device + on a port of an I2cController.
    +
    +
    i2cDevice - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    I2cDeviceImpl - Class in com.qualcomm.robotcore.hardware
    +
    +
    Control a single I2C Device
    +
    +
    I2cDeviceImpl(I2cController, int) - Constructor for class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Constructor
    +
    +
    I2cDeviceReader - Class in com.qualcomm.robotcore.hardware
    +
    +
    Monitor an I2C Device and read in the most current values
    +
    +
    I2cDeviceReader(I2cDevice, I2cAddr, int, int) - Constructor for class com.qualcomm.robotcore.hardware.I2cDeviceReader
    +
    +
    Constructor
    +
    +
    i2cDeviceSynch - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    I2cDeviceSynch - Interface in com.qualcomm.robotcore.hardware
    +
    +
    I2cDeviceSynch is an interface that exposes functionality for interacting with I2c + devices.
    +
    +
    I2cDeviceSynch.HeartbeatAction - Class in com.qualcomm.robotcore.hardware
    +
    +
    Instances of HeartBeatAction indicate what action to carry out to perform + a heartbeat should that become necessary.
    +
    +
    I2cDeviceSynch.ReadMode - Enum in com.qualcomm.robotcore.hardware
    +
    +
    I2cDeviceSynch.ReadMode controls whether when asked to read we read only once or read multiple times.
    +
    +
    I2cDeviceSynch.ReadWindow - Class in com.qualcomm.robotcore.hardware
    +
    +
    RegWindow is a utility class for managing the window of I2C register bytes that + are read from our I2C device on every hardware cycle
    +
    +
    I2cDeviceSynchDevice<DEVICE_CLIENT extends I2cDeviceSynchSimple> - Class in com.qualcomm.robotcore.hardware
    +
    +
    I2cDeviceSynchDevice instances are I2c devices which are built on top of + I2cDeviceSynchSimple instances or subclasses thereof.
    +
    +
    I2cDeviceSynchDevice(DEVICE_CLIENT, boolean) - Constructor for class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    I2cDeviceSynchDeviceWithParameters<DEVICE_CLIENT extends I2cDeviceSynchSimple,PARAMETERS> - Class in com.qualcomm.robotcore.hardware
    +
    +
    I2cDeviceSynchDeviceWithParameters adds to I2cDeviceSynchDevice support for + sensors that can be publicly initialized with parameter block of a particular type.
    +
    +
    I2cDeviceSynchDeviceWithParameters(DEVICE_CLIENT, boolean, PARAMETERS) - Constructor for class com.qualcomm.robotcore.hardware.I2cDeviceSynchDeviceWithParameters
    +
     
    +
    I2cDeviceSynchImpl - Class in com.qualcomm.robotcore.hardware
    +
    +
    I2cDeviceSynchImpl is a utility class that makes it easy to read or write data to + an instance of I2cDevice.
    +
    +
    I2cDeviceSynchImpl(I2cDevice, I2cAddr, boolean) - Constructor for class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
    +
    Instantiate an I2cDeviceSynchImpl instance on the indicated I2cDevice + using the indicated I2C address.
    +
    +
    I2cDeviceSynchImpl(I2cDevice, boolean) - Constructor for class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
    +
    Instantiates an I2cDeviceSynchImpl instance on the indicated I2cDevice.
    +
    +
    I2cDeviceSynchImpl.Callback - Class in com.qualcomm.robotcore.hardware
    +
     
    +
    I2cDeviceSynchImpl.CONTROLLER_PORT_MODE - Enum in com.qualcomm.robotcore.hardware
    +
     
    +
    I2cDeviceSynchImpl.READ_CACHE_STATUS - Enum in com.qualcomm.robotcore.hardware
    +
     
    +
    I2cDeviceSynchImpl.WRITE_CACHE_STATUS - Enum in com.qualcomm.robotcore.hardware
    +
     
    +
    I2cDeviceSynchImpl.WriteCacheStatus - Class in com.qualcomm.robotcore.hardware
    +
     
    +
    I2cDeviceSynchImplOnSimple - Class in com.qualcomm.robotcore.hardware
    +
    +
    I2cDeviceSynchImplOnSimple takes an I2cDeviceSynchSimple and adds to it heartbeat and + readwindow functionality.
    +
    +
    I2cDeviceSynchImplOnSimple(I2cDeviceSynchSimple, boolean) - Constructor for class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    I2cDeviceSynchReadHistory - Interface in com.qualcomm.robotcore.hardware
    +
    +
    I2cDeviceSynchReadHistory provides a means by which one can be guaranteed + to be informed of all data read by through an I2cDeviceSynch.
    +
    +
    I2cDeviceSynchReadHistoryImpl - Class in com.qualcomm.robotcore.hardware
    +
    +
    I2cDeviceSynchReadHistoryImpl is a helper class providing an implementation + of the I2c read history queue
    +
    +
    I2cDeviceSynchReadHistoryImpl() - Constructor for class com.qualcomm.robotcore.hardware.I2cDeviceSynchReadHistoryImpl
    +
     
    +
    i2cDeviceSynchSimple - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    I2cDeviceSynchSimple - Interface in com.qualcomm.robotcore.hardware
    +
    +
    I2cDeviceSyncSimple is an interface that provides simple synchronous read and write + functionality to an I2c device.
    +
    +
    i2cDeviceSynchSimpleHistory - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    I2cWaitControl - Enum in com.qualcomm.robotcore.hardware
    +
    +
    Values in I2cWaitControl control the semantics of waiting on I2c writes
    +
    +
    id - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    ID assigned to this gamepad by the OS.
    +
    +
    ID_SYNTHETIC - Static variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    A gamepad with a phantom id a synthetic one made up by the system
    +
    +
    ID_UNASSOCIATED - Static variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    A gamepad with an ID equal to ID_UNASSOCIATED has not been associated with any device.
    +
    +
    identityMatrix(int) - Static method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns an identity matrix of the indicated dimension.
    +
    +
    identityMatrix() - Static method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    idle() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    Puts the current thread to sleep for a bit as it has nothing better to do.
    +
    +
    index - Variable in enum org.firstinspires.ftc.robotcore.external.navigation.Axis
    +
     
    +
    indexFromRowCol(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.ColumnMajorMatrixF
    +
     
    +
    indexFromRowCol(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.DenseMatrixF
    +
    +
    Given a row and column index into the matrix, returns the corresponding index + into the underlying float[] array.
    +
    +
    indexFromRowCol(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.RowMajorMatrixF
    +
     
    +
    indices() - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AxesOrder
    +
    +
    Returns the numerical axes indices associated with this AxesOrder.
    +
    +
    infinity - Static variable in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    init(EventLoopManager) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
    +
    Init method
    +
    +
    init(EventLoopManager) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    init(EventLoopManager) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    init(EventLoopManager) - Method in class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    init(EventLoopManager) - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
    +
    Init method, this will be called before the first call to loop.
    +
    +
    init() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    From the non-linear OpMode; do not override
    +
    +
    init() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    User defined init method
    +
    +
    init_loop() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    From the non-linear OpMode; do not override
    +
    +
    init_loop() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    User defined init_loop method
    +
    +
    initialize(USBAccessibleLynxModule, List<Integer>) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModule
    +
     
    +
    initialize(List<USBAccessibleLynxModule>) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModuleList
    +
     
    +
    initialize(int) - Method in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    initialize() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    initialize(PARAMETERS) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDeviceWithParameters
    +
    +
    Allows for external initialization with non-default parameters
    +
    +
    initialize(SoundPoolIntf) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
    +
    +
    Initializes the SoundPool.
    +
    +
    initialize() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Initialize the TextToSpeech engine.
    +
    +
    initialize(String, VuforiaLocalizer.CameraDirection, boolean, boolean, VuforiaLocalizer.Parameters.CameraMonitorFeedback, float, float, float, float, float, float, boolean) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
    +
    Initializes Vuforia, with a CameraDirection.
    +
    +
    initialize(String, CameraName, String, boolean, boolean, VuforiaLocalizer.Parameters.CameraMonitorFeedback, float, float, float, float, float, float, boolean) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
    +
    Initializes Vuforia, with a CameraName.
    +
    +
    initializeDirectories() - Static method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    initializeIfNecessary() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    initializeSpinnerList(Spinner, List<Integer>, boolean) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModule
    +
     
    +
    initStatus(I2cDeviceSynchImpl.WRITE_CACHE_STATUS) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.WriteCacheStatus
    +
     
    +
    initWriteCacheStatus(I2cDeviceSynchImpl.WRITE_CACHE_STATUS) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    inListGet(List, JavaUtil.AtMode, int, boolean) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    inListGetSublist(List, JavaUtil.AtMode, int, JavaUtil.AtMode, int) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    inListSet(List, JavaUtil.AtMode, int, boolean, Object) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    InstanceHolder() - Constructor for class com.qualcomm.ftccommon.SoundPlayer.InstanceHolder
    +
     
    +
    InstanceHolder() - Constructor for class org.firstinspires.ftc.robotcore.external.ClassFactory.InstanceHolder
    +
     
    +
    integrate(Velocity, double) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
     
    +
    integrate(Acceleration, double) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
     
    +
    IntegratingGyroscope - Interface in com.qualcomm.robotcore.hardware
    +
    +
    For gyroscopes which perform angular rotation rate integration inside the sensor, + IntegratingGyroscope provides a means by which the integrated rotation + can be easily retrieved.
    +
    +
    internalInitialize(PARAMETERS) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDeviceWithParameters
    +
    +
    Actually attempts to carry out initialization with the indicated parameter block.
    +
    +
    internalOpModeServices - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    this is logically an internal field.
    +
    +
    internalPostInitLoop() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
     
    +
    internalPostInitLoop() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    automatically update telemetry in a non-linear opmode
    +
    +
    internalPostLoop() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
     
    +
    internalPostLoop() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    automatically update telemetry in a non-linear opmode
    +
    +
    internalPreInit() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
     
    +
    internalPut(SerialNumber, String, DEVICE_TYPE) - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
     
    +
    internalPut(SerialNumber, String, HardwareDevice) - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    internalSetMode(DcMotor.RunMode) - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    internalSetPosition(double) - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
     
    +
    internalSetPower(double) - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    internalSetTargetPosition(int) - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    internalSetTargetPosition(int) - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    internalStopPlaying(SoundPlayer.StopWhat) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    internalUpdateTelemetryNow(TelemetryMessage) - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    This is an internal SDK method, not intended for use by user opmodes.
    +
    +
    inTextGetLetter(String, JavaUtil.AtMode, int) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    inTextGetSubstring(String, JavaUtil.AtMode, int, JavaUtil.AtMode, int) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    intToByteArray(int) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    convert an int into a byte array; big endian is assumed
    +
    +
    intToByteArray(int, ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    convert an int into a byte array
    +
    +
    inverted() - Method in enum com.qualcomm.robotcore.hardware.DcMotorSimple.Direction
    +
     
    +
    inverted() - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a matrix which is the matrix-multiplication inverse of the receiver.
    +
    +
    inverted() - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    iregReadLast - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    iregWriteFirst - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    iregWriteLast - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    IrSeekerIndividualSensor() - Constructor for class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSeekerIndividualSensor
    +
    +
    Constructor
    +
    +
    IrSeekerIndividualSensor(double, double) - Constructor for class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSeekerIndividualSensor
    +
    +
    Constructor
    +
    +
    irSeekerSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    IrSeekerSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    IR Seeker Sensor
    +
    +
    IrSeekerSensor.IrSeekerIndividualSensor - Class in com.qualcomm.robotcore.hardware
    +
    +
    IR Sensor attached to an IR Seeker
    +
    +
    IrSeekerSensor.Mode - Enum in com.qualcomm.robotcore.hardware
    +
    +
    Enumeration of device modes
    +
    +
    isActive() - Method in interface com.qualcomm.ftccommon.ProgrammingModeController
    +
    +
    Returns true if programming mode is active; false otherwise.
    +
    +
    isArmed() - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Returns whether, as of this instant, this controller is alive and operational in + its normally expected mode; that is, whether it is currently in communication + with its underlying hardware or whether it is in some other state
    +
    +
    isArmed() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Returns whether, as of this instant, this I2cDevice is alive and operational in + its normally expected mode; that is, whether it is currently in communication + with its underlying hardware or whether it is in some other state
    +
    +
    isArmed() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    isArmed() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    isArmed() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    isArmed() - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Returns whether, as of this instant, this device client is alive and operational in + its normally expected mode; that is, whether it is currently in communication + with its underlying hardware or whether it is in some other state.
    +
    +
    isAutoClear() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Answers whether Telemetry.clear() is automatically called after each call to Telemetry.update().
    +
    +
    isAvailable() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
    +
    +
    Returns true if the Android device has a accelerometer.
    +
    +
    isAvailable() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
    +
    +
    Returns true if the Android device has a gyroscope.
    +
    +
    isAvailable() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
    +
    Returns true if the Android device has the sensors required for orientation.
    +
    +
    isAvailable() - Method in class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
    +
    +
    Is the required sensor available on this device?
    +
    +
    isBusy() - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Returns true if the motor is currently advancing or retreating to a target position.
    +
    +
    isBusy(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Is the motor busy?
    +
    +
    isBusy() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Is the motor busy?
    +
    +
    isCalibrating() - Method in interface com.qualcomm.robotcore.hardware.GyroSensor
    +
    +
    Is the gyro performing a calibration operation?
    +
    +
    isClosing - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    isClosing - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    isControllerLegacy - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    isCurrentPattern(Collection<Blinker.Step>) - Method in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    isDirty() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    isEmbedded() - Method in class com.qualcomm.robotcore.util.SerialNumber
    +
    +
    Returns whether the serial number is the one used for the embedded + Expansion Hub inside a Rev Control Hub.
    +
    +
    isEngaged() - Method in interface com.qualcomm.robotcore.hardware.Engagable
    +
    +
    Returns whether the object is currently in the engaged state.
    +
    +
    isEngaged - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    isEngaged() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    isEngaged - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    isEngaged() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    isFake() - Method in class com.qualcomm.robotcore.util.SerialNumber
    +
    +
    Returns whether the indicated serial number is one of the legacy + fake serial number forms or not.
    +
    +
    isGamepadDevice(int) - Static method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Does this device ID belong to a gamepad device?
    +
    +
    isHooked - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    isHooked - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    isI2cDeviceOwned - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    isI2cPortActionFlagSet(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Get the port action flag; this flag is set if the particular port is busy.
    +
    +
    isI2cPortActionFlagSet() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Deprecated. +
    this method returns a value that is rarely that which is expected
    +
    +
    +
    isI2cPortActionFlagSet() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Check whether or not the action flag is set for this I2C port
    +
    +
    isI2cPortInReadMode(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Is the port in read mode?
    +
    +
    isI2cPortInReadMode() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Queries whether or not the controller has reported that it is in read mode.
    +
    +
    isI2cPortInReadMode() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Query whether or not the port is in Read mode
    +
    +
    isI2cPortInWriteMode(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Is the port in write mode?
    +
    +
    isI2cPortInWriteMode() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Queries whether or not the controller has reported that it is in write mode.
    +
    +
    isI2cPortInWriteMode() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Query whether or not this port is in write mode
    +
    +
    isI2cPortReady(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Determine if a physical port is ready
    +
    +
    isI2cPortReady() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Returns whether the I2cDevice instance has experienced a callback since the last issuance + of work to the controller.
    +
    +
    isI2cPortReady() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Query whether or not this I2c port is ready
    +
    +
    isInitialized - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    isLanguageAndCountryAvailable(String, String) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Returns true if the given language is supported.
    +
    +
    isLanguageAvailable(String) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Returns true if the given language is supported.
    +
    +
    isLightOn() - Method in class com.qualcomm.robotcore.hardware.LED
    +
     
    +
    isLightOn() - Method in interface com.qualcomm.robotcore.hardware.Light
    +
    +
    Answers whether the light is on or off
    +
    +
    isLightOn() - Method in class com.qualcomm.robotcore.hardware.LightMultiplexor
    +
     
    +
    isLit() - Method in class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    isLocalSoundOn() - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    isLooping() - Method in class com.qualcomm.ftccommon.SoundPlayer.CurrentlyPlaying
    +
     
    +
    isLooping() - Method in class com.qualcomm.ftccommon.SoundPlayer.PlaySoundParams
    +
     
    +
    isModuleAddressChangeable() - Method in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    isMotorEnabled(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorControllerEx
    +
    +
    Returns whether a particular motor on the controller is energized
    +
    +
    isMotorEnabled() - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    Returns whether this motor is energized
    +
    +
    isMotorEnabled() - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    isOpenForReading() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    isOpenForReading() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    isOpenForWriting() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    isOpenForWriting() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    isParent - Variable in class com.qualcomm.robotcore.hardware.LynxModuleMeta
    +
     
    +
    isParent() - Method in class com.qualcomm.robotcore.hardware.LynxModuleMeta
    +
     
    +
    isParent() - Method in interface com.qualcomm.robotcore.hardware.RobotCoreLynxModule
    +
     
    +
    isPIDMode() - Method in enum com.qualcomm.robotcore.hardware.DcMotor.RunMode
    +
    +
    Returns whether this RunMode is a PID-controlled mode or not
    +
    +
    isPressed() - Method in interface com.qualcomm.robotcore.hardware.TouchSensor
    +
    +
    Return true if the touch sensor is being pressed
    +
    +
    isPrime(double) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    isPwmEnabled() - Method in class com.qualcomm.robotcore.hardware.CRServoImplEx
    +
     
    +
    isPwmEnabled() - Method in interface com.qualcomm.robotcore.hardware.PwmControl
    +
    +
    Returns whether the PWM is energized for this particular servo
    +
    +
    isPwmEnabled(int) - Method in interface com.qualcomm.robotcore.hardware.PWMOutputControllerEx
    +
     
    +
    isPwmEnabled() - Method in interface com.qualcomm.robotcore.hardware.PWMOutputEx
    +
     
    +
    isPwmEnabled() - Method in class com.qualcomm.robotcore.hardware.PWMOutputImplEx
    +
     
    +
    isPwmEnabled() - Method in class com.qualcomm.robotcore.hardware.ServoImplEx
    +
     
    +
    isReadWindowSentToControllerInitialized - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    isRetained() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Item
    +
    +
    Returns whether the item is to be retained in a clear() operation.
    +
    +
    isRobotController - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    isServoPwmEnabled(int) - Method in interface com.qualcomm.robotcore.hardware.ServoControllerEx
    +
    +
    Returns whether the PWM is energized for this particular servo
    +
    +
    isShutdown - Variable in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode.LinearOpModeHelper
    +
     
    +
    isShutdown() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode.LinearOpModeHelper
    +
     
    +
    isSimpleOwned - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    isSpeaking() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Returns true if the TextToSpeech engine is busy speaking.
    +
    +
    isStarted() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    Has the opMode been started?
    +
    +
    isStopRequested() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    Has the the stopping of the opMode been requested?
    +
    +
    issueWrite() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    isTouchSensorPressed(int) - Method in interface com.qualcomm.robotcore.hardware.TouchSensorMultiplexer
    +
     
    +
    isUpdatedRobotLocation - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    isUsb() - Method in class com.qualcomm.robotcore.util.SerialNumber
    +
    +
    Returns whether the serial number is one of an actual USB device.
    +
    +
    isVendorProduct() - Method in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    isVisible - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    isVisible() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Answers whether the associated trackable is currently visible or not
    +
    +
    isWriteCoalescingEnabled - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    isWriteCoalescingEnabled() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    isWriteCoalescingEnabled() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    isWriteCoalescingEnabled() - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Answers as to whether write coalescing is currently enabled on this device.
    +
    +
    iterator() - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
    +
    Returns an iterator over all the devices in this DeviceMapping.
    +
    +
    iterator() - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
    +
    Returns an iterator of all the devices in the HardwareMap.
    +
    +
    iterator() - Method in class com.qualcomm.robotcore.hardware.LynxModuleMetaList
    +
     
    +
    + + + +

    J

    +
    +
    JavaUtil - Class in org.firstinspires.ftc.robotcore.external
    +
    +
    A class that provides utility methods used in FTC Java code generated from blocks.
    +
    +
    JavaUtil() - Constructor for class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    JavaUtil.AtMode - Enum in org.firstinspires.ftc.robotcore.external
    +
     
    +
    JavaUtil.SortDirection - Enum in org.firstinspires.ftc.robotcore.external
    +
     
    +
    JavaUtil.SortType - Enum in org.firstinspires.ftc.robotcore.external
    +
     
    +
    JavaUtil.TrimMode - Enum in org.firstinspires.ftc.robotcore.external
    +
     
    +
    joystickDeadzone - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    If the motion value is less than the threshold, the controller will be + considered at rest
    +
    +
    + + + +

    K

    +
    +
    keySet() - Method in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    + + + +

    L

    +
    +
    lastModuleAddressChoice - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModuleList
    +
     
    +
    lastTrackedPoseAndCamera - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    launch(Context) - Static method in class com.qualcomm.ftccommon.ConfigWifiDirectActivity
    +
     
    +
    launch(Context, ConfigWifiDirectActivity.Flag) - Static method in class com.qualcomm.ftccommon.ConfigWifiDirectActivity
    +
     
    +
    LaunchActivityConstantsList - Class in com.qualcomm.ftccommon
    +
    +
    List of RobotCore Robocol commands used by the FIRST apps
    +
    +
    LaunchActivityConstantsList() - Constructor for class com.qualcomm.ftccommon.LaunchActivityConstantsList
    +
     
    +
    LaunchActivityConstantsList.RequestCode - Enum in com.qualcomm.ftccommon
    +
    +
    Used internally to distinguish the results coming back from various launched + (sub)activities
    +
    +
    led - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    LED - Class in com.qualcomm.robotcore.hardware
    +
     
    +
    LED(DigitalChannelController, int) - Constructor for class com.qualcomm.robotcore.hardware.LED
    +
    +
    Constructor
    +
    +
    left_bumper - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    button left bumper
    +
    +
    left_stick_button - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    left stick button
    +
    +
    left_stick_x - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    left analog stick horizontal axis
    +
    +
    left_stick_y - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    left analog stick vertical axis
    +
    +
    left_trigger - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    left trigger
    +
    +
    legacyModule - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    LegacyModule - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Legacy Module for working with NXT devices.
    +
    +
    LegacyModulePortDevice - Interface in com.qualcomm.robotcore.hardware
    +
    +
    The LegacyModulePortDevice interface should be supported by hardware devices which + occupy a port on a LegacyModule.
    +
    +
    LegacyModulePortDeviceImpl - Class in com.qualcomm.robotcore.hardware
    +
     
    +
    LegacyModulePortDeviceImpl(LegacyModule, int) - Constructor for class com.qualcomm.robotcore.hardware.LegacyModulePortDeviceImpl
    +
     
    +
    length(int) - Static method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
    +
    Creates a new vector of the indicated length.
    +
    +
    length() - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    Light - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Light instances are sources of illumination.
    +
    +
    light - Variable in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    LightBlinker - Class in com.qualcomm.robotcore.hardware
    +
    +
    A LightBlinker is a handy utility that will flash a SwitchableLight + in a pattern of timed durations, and, optionally, colors, if the light supports same (NYI)
    +
    +
    LightBlinker(SwitchableLight) - Constructor for class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    LightMultiplexor - Class in com.qualcomm.robotcore.hardware
    +
    +
    A LightMultiplexor adapts a second SwitchableLight by adding reference + counting to SwitchableLight.enableLight(boolean): the light will be lit if the net + number of enables is greater than zero.
    +
    +
    LightMultiplexor(SwitchableLight) - Constructor for class com.qualcomm.robotcore.hardware.LightMultiplexor
    +
     
    +
    lightSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    LightSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Light Sensor
    +
    +
    limitPositionMax - Variable in class com.qualcomm.robotcore.hardware.ServoImpl
    +
     
    +
    limitPositionMin - Variable in class com.qualcomm.robotcore.hardware.ServoImpl
    +
     
    +
    LinearOpMode - Class in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    Base class for user defined linear operation modes (op modes).
    +
    +
    LinearOpMode() - Constructor for class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
     
    +
    LinearOpMode.LinearOpModeHelper - Class in com.qualcomm.robotcore.eventloop.opmode
    +
     
    +
    LinearOpModeHelper() - Constructor for class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode.LinearOpModeHelper
    +
     
    +
    loadAdapter(ListView) - Method in class com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity
    +
     
    +
    loadAndStartPlaying(Context, int, SoundPlayer.PlaySoundParams, <any>, Runnable) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    loadAndStartPlaying(Context, File, SoundPlayer.PlaySoundParams, <any>, Runnable) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    loadedSounds - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    loadGroupList(List<WifiDirectGroupName>) - Method in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    loadLocalGroups() - Method in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    loadTrackablesFromAsset(String) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
    +
    +
    Loads a Vuforia dataset from the indicated application asset, which must be of + type .XML.
    +
    +
    loadTrackablesFromFile(String) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
    +
    +
    Loads a Vuforia dataset from the indicated file, which must be a .XML file + and contain the full file path.
    +
    +
    lock - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    lock - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    lock - Variable in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    lock - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    log(int, String) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    log(int, String, Object...) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    log(String) - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Log a message stating how long the timer has been running
    +
    +
    log() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Returns the log of this Telemetry to which log entries may be appended.
    +
    +
    logDevices() - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    loggingEnabled - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    loggingTag - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    longToByteArray(long) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    convert a long into a byte array; big endian is assumed
    +
    +
    longToByteArray(long, ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    convert a long into a byte array
    +
    +
    loop() - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
    +
    Loop method, this will be called repeatedly while the robot is running.
    +
    +
    loop() - Method in class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    loop() - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
    +
    This method will be repeatedly called by the event loop manager.
    +
    +
    loop() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    From the non-linear OpMode; do not override
    +
    +
    loop() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    User defined loop method
    +
    +
    loopControl - Variable in class com.qualcomm.ftccommon.CommandList.CmdPlaySound
    +
     
    +
    loopControl - Variable in class com.qualcomm.ftccommon.SoundPlayer.CurrentlyPlaying
    +
     
    +
    loopControl - Variable in class com.qualcomm.ftccommon.SoundPlayer.PlaySoundParams
    +
    +
    -1 means playing loops forever, 0 is play once, 1 is play twice, etc
    +
    +
    LynxAddressChangeRequest() - Constructor for class com.qualcomm.ftccommon.CommandList.LynxAddressChangeRequest
    +
     
    +
    LynxFirmwareImagesResp() - Constructor for class com.qualcomm.ftccommon.CommandList.LynxFirmwareImagesResp
    +
     
    +
    LynxFirmwareUpdate() - Constructor for class com.qualcomm.ftccommon.CommandList.LynxFirmwareUpdate
    +
     
    +
    LynxFirmwareUpdateResp() - Constructor for class com.qualcomm.ftccommon.CommandList.LynxFirmwareUpdateResp
    +
     
    +
    LynxModuleMeta - Class in com.qualcomm.robotcore.hardware
    +
    +
    LynxModuleMeta has simple lynx module meta information for transmission from RC to DS
    +
    +
    LynxModuleMeta(int, boolean) - Constructor for class com.qualcomm.robotcore.hardware.LynxModuleMeta
    +
     
    +
    LynxModuleMeta(RobotCoreLynxModule) - Constructor for class com.qualcomm.robotcore.hardware.LynxModuleMeta
    +
     
    +
    LynxModuleMeta(LynxModuleMeta) - Constructor for class com.qualcomm.robotcore.hardware.LynxModuleMeta
    +
     
    +
    LynxModuleMetaList - Class in com.qualcomm.robotcore.hardware
    +
    + +
    +
    LynxModuleMetaList(SerialNumber) - Constructor for class com.qualcomm.robotcore.hardware.LynxModuleMetaList
    +
     
    +
    LynxModuleMetaList(SerialNumber, Collection<LynxModuleMeta>) - Constructor for class com.qualcomm.robotcore.hardware.LynxModuleMetaList
    +
     
    +
    LynxModuleMetaList(SerialNumber, List<RobotCoreLynxModule>) - Constructor for class com.qualcomm.robotcore.hardware.LynxModuleMetaList
    +
     
    +
    lynxModulePrefix - Static variable in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    lynxUsbDevice - Variable in class com.qualcomm.ftccommon.FtcEventLoopBase.LynxUsbDeviceContainer
    +
     
    +
    LynxUsbDeviceContainer(LynxUsbDeviceImpl, SerialNumber) - Constructor for class com.qualcomm.ftccommon.FtcEventLoopBase.LynxUsbDeviceContainer
    +
     
    +
    LynxUsbDeviceContainer(RobotUsbDevice, SerialNumber) - Constructor for class com.qualcomm.ftccommon.FtcEventLoopBase.LynxUsbDeviceContainer
    +
     
    +
    + + + +

    M

    +
    +
    MagneticFlux - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Instances of MagneticFlux represent a three-dimensional magnetic strength vector.
    +
    +
    MagneticFlux() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.MagneticFlux
    +
     
    +
    MagneticFlux(double, double, double, long) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.MagneticFlux
    +
     
    +
    magnitude() - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    magnitude() - Method in class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection.Vector
    +
     
    +
    magnitude() - Method in class org.firstinspires.ftc.robotcore.external.navigation.Quaternion
    +
     
    +
    makeFakeData(Object, I2cAddr, int, int) - Static method in class com.qualcomm.robotcore.hardware.TimestampedI2cData
    +
    +
    Creates and returns fake I2C data for use in situations where data must be returned but actual + data is unavailable.
    +
    +
    makeListFromText(String, String) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    makeTextFromList(List, String) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    map - Variable in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    MapAdapter() - Constructor for class com.qualcomm.robotcore.hardware.ScannedDevices.MapAdapter
    +
     
    +
    maskEvent(Event) - Method in class org.firstinspires.ftc.robotcore.external.StateMachine
    +
     
    +
    maskList - Variable in class org.firstinspires.ftc.robotcore.external.StateMachine
    +
     
    +
    masterVolume - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    matches(Object) - Method in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    matrix - Variable in class org.firstinspires.ftc.robotcore.external.matrices.SliceMatrixF
    +
     
    +
    matrix - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    MatrixF - Class in org.firstinspires.ftc.robotcore.external.matrices
    +
    +
    MatrixF represents a matrix of floats of a defined dimensionality but abstracts + the means by which a particular element of the matrix is retrieved or updated.
    +
    +
    MatrixF(int, int) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Creates a matrix containing the indicated number of rows and columns.
    +
    +
    MAX_POSITION - Static variable in interface com.qualcomm.robotcore.hardware.Servo
    +
    +
    The maximum allowable position to which a servo can be moved
    +
    +
    maxOfList(List) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    maxWebcamAspectRatio - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    Controls the aspect ratios used with webcams.
    +
    +
    mayInitiateSwitchToReadMode() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Answers as to whether this window in its present state ought to cause a transition + to read-mode when there's nothing else for the device to be doing.
    +
    +
    meanIntegrate(Velocity, Velocity) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
    +
    Integrate between two velocities to determine a change in position using an assumption + that the mean of the velocities has been acting the entire interval.
    +
    +
    meanIntegrate(Acceleration, Acceleration) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
    +
    Integrate between two accelerations to determine a change in velocity using an assumption + that the mean of the accelerations has been acting the entire interval.
    +
    +
    medianOfList(List) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    mediaSizer - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    migrate() - Method in enum com.qualcomm.robotcore.hardware.DcMotor.RunMode
    +
    +
    Deprecated. +
    Replace use of old constants with new
    +
    +
    +
    migrate() - Method in enum com.qualcomm.robotcore.hardware.DigitalChannelController.Mode
    +
    +
    Deprecated.
    +
    MILLIS_IN_NANO - Static variable in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    the number of nanoseconds in a millisecond
    +
    +
    milliseconds() - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Returns the duration that has elapsed since the last reset of this timer in milliseconds
    +
    +
    MIN_POSITION - Static variable in interface com.qualcomm.robotcore.hardware.Servo
    +
    +
    The minimum allowable position to which a servo can be moved
    +
    +
    minOfList(List) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    minus(Position, Position) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
     
    +
    minus(Velocity, Velocity) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
     
    +
    minus(Acceleration, Acceleration) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
     
    +
    minWebcamAspectRatio - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    Controls the aspect ratios used with webcams.
    +
    +
    MM_FTC_FIELD_WIDTH - Static variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
     
    +
    MM_PER_INCH - Static variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
     
    +
    mmPerInch - Static variable in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    modesOfList(List) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    module - Variable in class com.qualcomm.robotcore.hardware.LegacyModulePortDeviceImpl
    +
     
    +
    moduleAddress - Variable in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    moduleAddress - Variable in class com.qualcomm.robotcore.hardware.LynxModuleMeta
    +
     
    +
    moduleAddressChangeable - Variable in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    moduleList - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModuleList
    +
     
    +
    moduleNowArmedOrPretending() - Method in class com.qualcomm.robotcore.hardware.LegacyModulePortDeviceImpl
    +
    +
    intended as a subclass hook
    +
    +
    moduleNowDisarmed() - Method in class com.qualcomm.robotcore.hardware.LegacyModulePortDeviceImpl
    +
    +
    intended as a subclass hook
    +
    +
    modules - Variable in class com.qualcomm.robotcore.hardware.LynxModuleMetaList
    +
     
    +
    modulesToUpdate - Variable in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    MotionDetection - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    A class that will notify listeners when a phone is in motion.
    +
    +
    MotionDetection() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
    +
     
    +
    MotionDetection(double, int) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
    +
     
    +
    MotionDetection.MotionDetectionListener - Interface in org.firstinspires.ftc.robotcore.external.navigation
    +
     
    +
    MotionDetection.Vector - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
     
    +
    MotorControlAlgorithm - Enum in com.qualcomm.robotcore.hardware
    +
    +
    indicates the control algorithm variant to use with + DcMotor.RunMode.RUN_TO_POSITION and DcMotor.RunMode.RUN_USING_ENCODER.
    +
    +
    motorType - Variable in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    mPerInch - Static variable in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    msAbnormalReopenInterval - Static variable in interface com.qualcomm.robotcore.eventloop.SyncdDevice
    +
    +
    When a device shuts down with SyncdDevice.ShutdownReason.ABNORMAL_ATTEMPT_REOPEN, this is + the recommended duration of time to wait before attempting reopen.
    +
    +
    msCallbackLockAbandon - Static variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    msCallbackLockWaitQuantum - Static variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    msDuration - Variable in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    msDuration - Variable in class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    msFinish - Variable in class com.qualcomm.ftccommon.SoundPlayer.CurrentlyPlaying
    +
     
    +
    msHeartbeatInterval - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    msHeartbeatInterval - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    msLastPlay - Variable in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    msPresentationTime - Variable in class com.qualcomm.ftccommon.CommandList.CmdPlaySound
    +
     
    +
    msResponseWait - Variable in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    msResponseWait - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    msSoundTransmissionFreshness - Static variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    msStuckDetectInit - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
     
    +
    msStuckDetectInitLoop - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
     
    +
    msStuckDetectLoop - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
     
    +
    msStuckDetectStart - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
     
    +
    msStuckDetectStop - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
     
    +
    multiplied(MatrixF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a matrix which is the multiplication of the recevier with another matrix.
    +
    +
    multiplied(float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a new matrix in which all the entries of the receiver have been scaled + by an indicated value.
    +
    +
    multiplied(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Multiplies the receiver by the indicated vector, considered as a column matrix.
    +
    +
    multiplied(float[]) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Multiplies the receiver by the indicated vector, considered as a column matrix.
    +
    +
    multiplied(OpenGLMatrix) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    multiplied(MatrixF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    multiplied(MatrixF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
    +
    Multiplies this vector, taken as a row vector, against the indicated matrix.
    +
    +
    multiplied(float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
    +
    Returns a new vector containing the elements of this vector scaled by the indicated factor.
    +
    +
    multiply(MatrixF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Updates the receiver to be the product of itself and another matrix.
    +
    +
    multiply(float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    multiply(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    multiply(float[]) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    multiply(OpenGLMatrix) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
    +
    Updates the receiver to be the product of itself and another matrix.
    +
    +
    multiply(MatrixF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
    +
    Updates the receiver to be the product of itself and another matrix.
    +
    +
    multiply(float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    + + + +

    N

    +
    +
    name - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    name - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    nanoseconds() - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Returns the duration that has elapsed since the last reset of this timer in nanoseconds
    +
    +
    nanoTime - Variable in class com.qualcomm.robotcore.hardware.TimestampedData
    +
    +
    the timestamp on the System.nanoTime() clock associated with that data
    +
    +
    nanoTimeReadCacheValid - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    NavUtil - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    NavUtil is a collection of utilities that provide useful manipulations of + objects related to navigation.
    +
    +
    networkConnectionHandler - Variable in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    networkConnectionHandler - Variable in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    networkConnectionHandler - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    networkConnectionUpdate(NetworkConnection.NetworkEvent) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    networkStatus - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    networkStatusExtra - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    networkStatusMessage - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    newGson() - Static method in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    newLocationAvailable - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    newPoseAvailable - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    newReadsAndWritesAllowed() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    newReadsAndWritesAllowed() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    nextStep - Variable in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    NO_VOLTAGE_SENSOR - Static variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
    +
    This string is sent in the robot battery telemetry payload to identify + that no voltage sensor is available on the robot.
    +
    +
    NonConst - Annotation Type in org.firstinspires.ftc.robotcore.external
    +
    +
    NonConst documents a method that performs its function by updating internal + state of the method receiver.
    +
    +
    normalize(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    normalize(float) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    normalized() - Method in class org.firstinspires.ftc.robotcore.external.navigation.Quaternion
    +
     
    +
    normalized3D() - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
    +
    Consider this vector as a 3D coordinate or 3D homogeneous coordinate, and, if the + latter, return its normalized form.
    +
    +
    NormalizedColorSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    NormalizedColorSensor returns color sensor data in standardized units, which + provides a measure of absolute color color intensity beyond the relative + intensities available using ColorSensor.
    +
    +
    normalizeDegrees(double) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    normalizeDegrees(float) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    NormalizedRGBA - Class in com.qualcomm.robotcore.hardware
    +
    +
    NormalizedRGBA instances represent a set of normalized color values.
    +
    +
    NormalizedRGBA() - Constructor for class com.qualcomm.robotcore.hardware.NormalizedRGBA
    +
     
    +
    normalizeRadians(double) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    normalizeRadians(float) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    noteSerialNumberType(SerialNumber, String) - Static method in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    noteSoundUsage(SoundPlayer.SoundInfo) - Method in class com.qualcomm.ftccommon.SoundPlayer.LoadedSoundCache
    +
    +
    update the fact that this sound has been just used, again
    +
    +
    noteWindowUsedForRead() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Sets that a read has in fact been issued for this window
    +
    +
    notifyListeners(double) - Method in class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
    +
     
    +
    notifyListeners() - Method in class org.firstinspires.ftc.robotcore.external.SignificantMotionDetection
    +
     
    +
    now(TimeUnit) - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Returns the current time on the clock used by the timer
    +
    +
    nsNow() - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
     
    +
    nsStartTime - Variable in class com.qualcomm.robotcore.util.ElapsedTime
    +
     
    +
    nullStep() - Static method in class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    numCols - Variable in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    numCols() - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns the number of columns in this matrix
    +
    +
    numericValue - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId
    +
     
    +
    numRows - Variable in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    numRows() - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns the number of rows in this matrix
    +
    +
    + + + +

    O

    +
    +
    onAccuracyChanged(Sensor, int) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
    +
     
    +
    onAccuracyChanged(Sensor, int) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
    +
     
    +
    onAccuracyChanged(Sensor, int) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
     
    +
    onAccuracyChanged(Sensor, int) - Method in class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
    +
     
    +
    onActivityResult(int, int, Intent) - Method in class com.qualcomm.ftccommon.FtcRobotControllerSettingsActivity.SettingsFragment
    +
     
    +
    onBackPressed() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    onBind(Intent) - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    onCancelButtonPressed(View) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    onClearRememberedGroupsClicked(View) - Method in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    onCreate(Bundle) - Method in class com.qualcomm.ftccommon.ConfigWifiDirectActivity
    +
     
    +
    onCreate(Bundle) - Method in class com.qualcomm.ftccommon.FtcAboutActivity.AboutFragment
    +
     
    +
    onCreate(Bundle) - Method in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    onCreate(Bundle) - Method in class com.qualcomm.ftccommon.FtcAdvancedRCSettingsActivity
    +
     
    +
    onCreate(Bundle) - Method in class com.qualcomm.ftccommon.FtcAdvancedRCSettingsActivity.SettingsFragment
    +
     
    +
    onCreate(Bundle) - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    onCreate(Bundle) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    onCreate() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    onCreate(Bundle) - Method in class com.qualcomm.ftccommon.FtcRobotControllerSettingsActivity
    +
     
    +
    onCreate(Bundle) - Method in class com.qualcomm.ftccommon.FtcRobotControllerSettingsActivity.SettingsFragment
    +
     
    +
    onCreate(Bundle) - Method in class com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity
    +
     
    +
    onCreate(Bundle) - Method in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    onCreate(Bundle) - Method in class com.qualcomm.ftccommon.ViewLogsActivity
    +
     
    +
    onDestroy() - Method in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    onDestroy() - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    onDestroy() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    onDestroy() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    onDestroy() - Method in class com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity
    +
     
    +
    onDestroy() - Method in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    onDeviceNameChanged(String) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback.DeviceNameManagerCallback
    +
     
    +
    onDoneButtonPressed(View) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    onEnter(Event) - Method in interface org.firstinspires.ftc.robotcore.external.State
    +
    +
    Called by the framework when a state is entered.
    +
    +
    onExit(Event) - Method in interface org.firstinspires.ftc.robotcore.external.State
    +
    +
    Called by the framework when a state is exited.
    +
    +
    onItemClick(AdapterView<?>, View, int, long) - Method in class com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity
    +
     
    +
    onLoadComplete(SoundPool, int, int) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    onModuleStateChange(RobotArmingStateNotifier, RobotArmingStateNotifier.ARMINGSTATE) - Method in class com.qualcomm.robotcore.hardware.I2cControllerPortDeviceImpl
    +
     
    +
    onModuleStateChange(RobotArmingStateNotifier, RobotArmingStateNotifier.ARMINGSTATE) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    onModuleStateChange(RobotArmingStateNotifier, RobotUsbModule.ARMINGSTATE) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    onModuleStateChange(RobotArmingStateNotifier, RobotUsbModule.ARMINGSTATE) - Method in class com.qualcomm.robotcore.hardware.LegacyModulePortDeviceImpl
    +
     
    +
    onMotionDetected(double) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.MotionDetection.MotionDetectionListener
    +
     
    +
    onNetworkConnectionEvent(NetworkConnection.NetworkEvent) - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    onNetworkConnectionEvent(NetworkConnection.NetworkEvent) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    onNotTracked() - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable.Listener
    +
    +
    Called by the system to inform the trackable that it is no longer visible.
    +
    +
    onNotTracked() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Called by the system to inform the trackable that it is no longer visible.
    +
    +
    onOpModePostStop(OpMode) - Method in interface com.qualcomm.robotcore.eventloop.opmode.OpModeManagerNotifier.Notifications
    +
    +
    The indicated opmode has just been stopped.
    +
    +
    onOpModePreInit(OpMode) - Method in interface com.qualcomm.robotcore.eventloop.opmode.OpModeManagerNotifier.Notifications
    +
    +
    The indicated opmode is just about to be initialized.
    +
    +
    onOpModePreStart(OpMode) - Method in interface com.qualcomm.robotcore.eventloop.opmode.OpModeManagerNotifier.Notifications
    +
    +
    The indicated opmode is just about to be started.
    +
    +
    onPause() - Method in class com.qualcomm.ftccommon.ConfigWifiDirectActivity
    +
     
    +
    onPause() - Method in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    onPause() - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    onPeerConnected() - Method in interface com.qualcomm.robotcore.eventloop.EventLoopManager.EventLoopMonitor
    +
     
    +
    onPeerConnected() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    onPeerDisconnected() - Method in interface com.qualcomm.robotcore.eventloop.EventLoopManager.EventLoopMonitor
    +
     
    +
    onPeerDisconnected() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    onPortIsReadyCallbacksBegin(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController.I2cPortReadyBeginEndNotifications
    +
     
    +
    onPortIsReadyCallbacksBegin(int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    onPortIsReadyCallbacksEnd(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController.I2cPortReadyBeginEndNotifications
    +
     
    +
    onPortIsReadyCallbacksEnd(int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    onReceive(Context, Intent) - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    onResume() - Method in class com.qualcomm.ftccommon.ConfigWifiDirectActivity
    +
     
    +
    onResume() - Method in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    onSensorChanged(SensorEvent) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
    +
     
    +
    onSensorChanged(SensorEvent) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
    +
     
    +
    onSensorChanged(SensorEvent) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
     
    +
    onSensorChanged(SensorEvent) - Method in class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
    +
    +
    Internal implementations of the SensorEventListener interface.
    +
    +
    onSignificantMotion() - Method in interface org.firstinspires.ftc.robotcore.external.SignificantMotionDetection.SignificantMotionDetectionListener
    +
     
    +
    onStart() - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    onStart() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    onStart() - Method in class com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity
    +
     
    +
    onStart() - Method in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    onStart() - Method in class com.qualcomm.ftccommon.ViewLogsActivity
    +
     
    +
    onStartCommand(Intent, int, int) - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    onStateChange(RobotState) - Method in interface com.qualcomm.robotcore.eventloop.EventLoopManager.EventLoopMonitor
    +
     
    +
    onStop() - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    onTelemetryTransmitted() - Method in interface com.qualcomm.robotcore.eventloop.EventLoopManager.EventLoopMonitor
    +
     
    +
    onTracked(TrackableResult, CameraName, Camera, VuforiaTrackable) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable.Listener
    +
    +
    VuforiaTrackable.Listener.onTracked(TrackableResult, CameraName, Camera, org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable) is called by the system to notify the listener that its associated trackable is currently visible.
    +
    +
    onTracked(TrackableResult, CameraName, Camera, VuforiaTrackable) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    VuforiaTrackableDefaultListener.onTracked(TrackableResult, CameraName, Camera, org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable) is called by the system to notify the listener that its associated trackable is currently visible.
    +
    +
    onUnbind(Intent) - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    onUpdateLynxFirmwareClicked(View) - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    onUsbDeviceAttached(UsbDevice) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
    +
    Deal with the fact that a UsbDevice has recently attached to the system
    +
    +
    onUsbDeviceAttached(UsbDevice) - Method in class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    onUsbDeviceAttached(UsbDevice) - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
    +
    Notifies the event loop that a UsbDevice has just been attached to the system.
    +
    +
    onWifiSettingsClicked(View) - Method in class com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity
    +
     
    +
    OpenGLMatrix - Class in org.firstinspires.ftc.robotcore.external.matrices
    +
    +
    An OpenGLMatrix is a 4x4 matrix commonly used as a transformation matrix for 3D + homogeneous coordinates.
    +
    +
    OpenGLMatrix() - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    OpenGLMatrix(float[]) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    OpenGLMatrix(Matrix44F) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    OpMode - Class in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    Base class for user defined operation modes (op modes).
    +
    +
    OpMode() - Constructor for class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    OpMode constructor
    +
    +
    opModeIsActive() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    Answer as to whether this opMode is active and the robot should continue onwards.
    +
    +
    opModeManager - Variable in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    OpModeManager - Interface in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    OpModeManager instances are used to register opmodes for use.
    +
    +
    OpModeManagerNotifier - Interface in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    OpModeManagerNotifier.Notifications is an interface by which interested + parties can receive notification of the coming and going of opmodes.
    +
    +
    OpModeManagerNotifier.Notifications - Interface in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    OpModeManagerNotifier.Notifications can be used to receive notifications of the comings + and goings of opmodes in the system.
    +
    +
    OpModeRegister - Interface in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    Register Op Modes
    +
    +
    OpModeRegistrar - Annotation Type in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    Provides an easy and non-centralized way of contributing to the OpMode list + shown on an FTC Driver Station.
    +
    +
    opModeStopRequested - Variable in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    opticalDistanceSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    OpticalDistanceSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    OpticalDistanceSensor is a LightSensor whose reported light intensities + reflect (pun intended) a relationship to distance.
    +
    +
    org.firstinspires.ftc.robotcore.external - package org.firstinspires.ftc.robotcore.external
    +
     
    +
    org.firstinspires.ftc.robotcore.external.android - package org.firstinspires.ftc.robotcore.external.android
    +
     
    +
    org.firstinspires.ftc.robotcore.external.matrices - package org.firstinspires.ftc.robotcore.external.matrices
    +
     
    +
    org.firstinspires.ftc.robotcore.external.navigation - package org.firstinspires.ftc.robotcore.external.navigation
    +
     
    +
    Orientation - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Instances of Orientation represent a rotated stance in three-dimensional space + by way of a set of three successive rotations.
    +
    +
    Orientation() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
     
    +
    Orientation(AxesReference, AxesOrder, AngleUnit, float, float, float, long) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
     
    +
    Orientation.AngleSet - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Orientation.AngleSet is used to distinguish between the two sets of angles that will produce + a given rotation in a given axes reference and a given axes order
    +
    +
    OrientationSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    OrientationSensor provides access to sensors which measure absolute orientation
    +
    +
    override - Variable in class com.qualcomm.robotcore.hardware.HardwareDeviceHealthImpl
    +
     
    +
    + + + +

    P

    +
    +
    p - Variable in class com.qualcomm.robotcore.hardware.PIDCoefficients
    +
     
    +
    p - Variable in class com.qualcomm.robotcore.hardware.PIDFCoefficients
    +
     
    +
    packetReceived(RobocolDatagram) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    parameters - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDeviceWithParameters
    +
     
    +
    Parameters() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
     
    +
    Parameters(int) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
     
    +
    patternStackNotEmpty() - Method in interface com.qualcomm.robotcore.hardware.Blinker
    +
    +
    Returns whether the pattern stack is currently nonempty.
    +
    +
    patternStackNotEmpty() - Method in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    peerDiscoveryEvent(RobocolDatagram) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    peerStatus - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    pendUsbDeviceAttachment(SerialNumber, long, TimeUnit) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    pendUsbDeviceAttachment(SerialNumber, long, TimeUnit) - Method in class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    pendUsbDeviceAttachment(SerialNumber, long, TimeUnit) - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
     
    +
    phoneFromFtcCameraBack - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    phoneFromFtcCameraFront - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    phoneFromVuforiaCameraBack - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    phoneFromVuforiaCameraFront - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    physicalPort - Variable in class com.qualcomm.robotcore.hardware.I2cControllerPortDeviceImpl
    +
     
    +
    physicalPort - Variable in class com.qualcomm.robotcore.hardware.LegacyModulePortDeviceImpl
    +
     
    +
    PIDCoefficients - Class in com.qualcomm.robotcore.hardware
    +
    +
    PIDCoefficients conveys a set of configuration parameters for a PID algorithm.
    +
    +
    PIDCoefficients() - Constructor for class com.qualcomm.robotcore.hardware.PIDCoefficients
    +
     
    +
    PIDCoefficients(double, double, double) - Constructor for class com.qualcomm.robotcore.hardware.PIDCoefficients
    +
     
    +
    PIDFCoefficients - Class in com.qualcomm.robotcore.hardware
    +
    +
    PIDFCoefficients conveys a set of configuration parameters for a PIDF algorithm, + a PID algorithm which includes an additional feed-forward term.
    +
    +
    PIDFCoefficients() - Constructor for class com.qualcomm.robotcore.hardware.PIDFCoefficients
    +
     
    +
    PIDFCoefficients(double, double, double, double, MotorControlAlgorithm) - Constructor for class com.qualcomm.robotcore.hardware.PIDFCoefficients
    +
     
    +
    PIDFCoefficients(double, double, double, double) - Constructor for class com.qualcomm.robotcore.hardware.PIDFCoefficients
    +
     
    +
    PIDFCoefficients(PIDFCoefficients) - Constructor for class com.qualcomm.robotcore.hardware.PIDFCoefficients
    +
     
    +
    PIDFCoefficients(PIDCoefficients) - Constructor for class com.qualcomm.robotcore.hardware.PIDFCoefficients
    +
     
    +
    Pif - Static variable in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    play(Context, int) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Deprecated. + +
    +
    +
    play(Context, int, boolean) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Deprecated. +
    use #startPlaying(Context, int, PlaySoundParams, Consumer, Runnable) instead
    +
    +
    +
    play(Context, File, float, int, float) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    play(String) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
    +
    +
    Plays the sound with the given name.
    +
    +
    PlaySoundParams() - Constructor for class com.qualcomm.ftccommon.SoundPlayer.PlaySoundParams
    +
     
    +
    PlaySoundParams(boolean) - Constructor for class com.qualcomm.ftccommon.SoundPlayer.PlaySoundParams
    +
     
    +
    PlaySoundParams(SoundPlayer.PlaySoundParams) - Constructor for class com.qualcomm.ftccommon.SoundPlayer.PlaySoundParams
    +
     
    +
    plus(Position, Position) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
     
    +
    plus(Velocity, Velocity) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
     
    +
    plus(Acceleration, Acceleration) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
     
    +
    popPattern() - Method in interface com.qualcomm.robotcore.hardware.Blinker
    +
    +
    Pops the next pattern off of the stack of saved patterns, if any.
    +
    +
    popPattern() - Method in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    port - Variable in class com.qualcomm.ftccommon.CommandList.CmdRequestSound
    +
     
    +
    port - Variable in class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
     
    +
    portIsReady(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController.I2cPortReadyCallback
    +
     
    +
    portIsReady(int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    portIsReady(int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    portNumber - Variable in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    portNumber - Variable in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    portNumber - Variable in class com.qualcomm.robotcore.hardware.ServoImpl
    +
     
    +
    pose - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.PoseAndCamera
    +
     
    +
    PoseAndCamera(VuforiaPoseMatrix, CameraName) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.PoseAndCamera
    +
     
    +
    Position - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Instances of Position represent a three-dimensional distance in a particular distance unit.
    +
    +
    Position() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.Position
    +
     
    +
    Position(DistanceUnit, double, double, double, long) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.Position
    +
     
    +
    Predicate<T> - Interface in org.firstinspires.ftc.robotcore.external
    +
     
    +
    preferencesHelper - Variable in class com.qualcomm.ftccommon.FtcAdvancedRCSettingsActivity.SettingsFragment
    +
     
    +
    prefillSoundCache(int...) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Ensures that these local sounds are also in the local cache
    +
    +
    preload(Context, int) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Preloads the sound so as to to reduce delays if the sound is subsequently played.
    +
    +
    preload(Context, File) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Preloads the sound so as to to reduce delays if the sound is subsequently played.
    +
    +
    preloadSound(String) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
    +
    +
    Preloads the sound with the given name.
    +
    +
    pressed(KeyEvent) - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
     
    +
    previousSteps - Variable in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    prevReadCacheStatus - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    prevWriteCacheStatus - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    printTrackableNames() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
     
    +
    processAllClasses() - Static method in class com.qualcomm.ftccommon.ClassManagerFactory
    +
     
    +
    processCommand(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
    +
    If the driver station sends over a command, it will be routed to this method.
    +
    +
    processCommand(Command) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    processCommand(Command) - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
    +
    Process command method, this will be called if the event loop manager receives a user defined + command.
    +
    +
    processedRecentlyAttachedUsbDevices() - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
    +
    Process any usb devices that might have recently attached.
    +
    +
    processedRecentlyAttachedUsbDevices() - Method in class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    processedRecentlyAttachedUsbDevices() - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
    +
    Process the batch of newly arrived USB devices.
    +
    +
    PROGRAMMING_MODE_ACTIVITY_PROGRAMMING_WEB_HANDLERS - Static variable in class com.qualcomm.ftccommon.LaunchActivityConstantsList
    +
    +
    Used to pass in ProgrammingWebHandlers to a local activity
    +
    +
    programmingModeController - Variable in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    ProgrammingModeController - Interface in com.qualcomm.ftccommon
    +
    +
    Declares the interface for starting and stopping programming mode when requested from the driver + station.
    +
    +
    purgeListeners() - Method in class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
    +
    +
    purgeListeners
    +
    +
    pushPattern(Collection<Blinker.Step>) - Method in interface com.qualcomm.robotcore.hardware.Blinker
    +
    +
    Saves the existing pattern such that it can be later restored, then calls setPattern().
    +
    +
    pushPattern(Collection<Blinker.Step>) - Method in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    put(String, DEVICE_TYPE) - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
    +
    Registers a new device in this DeviceMapping under the indicated name.
    +
    +
    put(SerialNumber, String, DEVICE_TYPE) - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
    +
    (Advanced) Registers a new device in this DeviceMapping under the indicated name.
    +
    +
    put(String, HardwareDevice) - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
    +
    Puts a device in the overall map without having it also reside in a type-specific DeviceMapping.
    +
    +
    put(SerialNumber, String, HardwareDevice) - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
    +
    (Advanced) Puts a device in the overall map without having it also reside in a type-specific DeviceMapping.
    +
    +
    put(SerialNumber, DeviceManager.UsbDeviceType) - Method in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    put(int, int, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.ColumnMatrixF
    +
     
    +
    put(int, int, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.DenseMatrixF
    +
     
    +
    put(int, int, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Updates a particular element of this matrix
    +
    +
    put(int, int, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.RowMatrixF
    +
     
    +
    put(int, int, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.SliceMatrixF
    +
     
    +
    put(int, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    putCurrentAddress(SerialNumber, int) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressConfiguration
    +
     
    +
    putFile(File, SoundPlayer.SoundInfo) - Method in class com.qualcomm.ftccommon.SoundPlayer.LoadedSoundCache
    +
     
    +
    putLocal(String, DEVICE_TYPE) - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
     
    +
    putResource(int, SoundPlayer.SoundInfo) - Method in class com.qualcomm.ftccommon.SoundPlayer.LoadedSoundCache
    +
     
    +
    PwmControl - Interface in com.qualcomm.robotcore.hardware
    +
    +
    For hardware devices which are manipulated using a pulse width modulation (PWM) signal, + the PwmControl interface provides control of the width of pulses used and whether + the PWM is enabled or disabled.
    +
    +
    PwmControl.PwmRange - Class in com.qualcomm.robotcore.hardware
    +
    +
    PwmRange instances are used to specify the upper and lower pulse widths + and overall framing rate for a servo.
    +
    +
    pwmDisable() - Method in interface com.qualcomm.robotcore.hardware.ServoController
    +
    +
    Disables all of the servos connected to this controller
    +
    +
    pwmEnable() - Method in interface com.qualcomm.robotcore.hardware.ServoController
    +
    +
    Enables all of the servos connected to this controller
    +
    +
    pwmOutput - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    PWMOutput - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Created by bob on 2016-03-12.
    +
    +
    PWMOutputController - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Interface for working with PWM Input Controllers
    +
    +
    PWMOutputControllerEx - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Created by bob on 2016-03-12.
    +
    +
    PWMOutputEx - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Created by bob on 2016-03-12.
    +
    +
    PWMOutputImpl - Class in com.qualcomm.robotcore.hardware
    +
    +
    Control a single digital port
    +
    +
    PWMOutputImpl(PWMOutputController, int) - Constructor for class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
    +
    Constructor
    +
    +
    PWMOutputImplEx - Class in com.qualcomm.robotcore.hardware
    +
    +
    Created by bob on 2016-03-12.
    +
    +
    PWMOutputImplEx(PWMOutputController, int) - Constructor for class com.qualcomm.robotcore.hardware.PWMOutputImplEx
    +
     
    +
    PwmRange(double, double) - Constructor for class com.qualcomm.robotcore.hardware.PwmControl.PwmRange
    +
    +
    Creates a new PwmRange with the indicated lower and upper bounds and the default + framing rate.
    +
    +
    PwmRange(double, double, double) - Constructor for class com.qualcomm.robotcore.hardware.PwmControl.PwmRange
    +
    +
    Creates a new PwmRange with the indicated lower and upper bounds and the specified + framing rate.
    +
    +
    + + + +

    Q

    +
    +
    Quaternion - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    A Quaternion can indicate an orientation in three-space without the trouble of + possible gimbal-lock.
    +
    +
    Quaternion() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.Quaternion
    +
     
    +
    Quaternion(float, float, float, float, long) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.Quaternion
    +
     
    +
    queueFullWrite - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    queueRead - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    + + + +

    R

    +
    +
    randomInt(double, double) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    randomItemOfList(List) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    Range - Class in com.qualcomm.robotcore.util
    +
    +
    Utility class for performing range operations
    +
    +
    rate - Variable in class com.qualcomm.ftccommon.CommandList.CmdPlaySound
    +
     
    +
    rate - Variable in class com.qualcomm.ftccommon.SoundPlayer.PlaySoundParams
    +
    +
    playback rate (1.0 = normal playback, range 0.5 to 2.0)
    +
    +
    rawX() - Method in interface com.qualcomm.robotcore.hardware.GyroSensor
    +
    +
    Return the gyro's raw X value.
    +
    +
    rawY() - Method in interface com.qualcomm.robotcore.hardware.GyroSensor
    +
    +
    Return the gyro's raw Y value.
    +
    +
    rawZ() - Method in interface com.qualcomm.robotcore.hardware.GyroSensor
    +
    +
    Return the gyro's raw Z value.
    +
    +
    RC_BATTERY_STATUS_KEY - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    RC_WEB_INFO - Static variable in class com.qualcomm.ftccommon.LaunchActivityConstantsList
    +
    +
    The intent extra name for JSON encoded org.firstinspires.ftc.robotcore.internal.webserver.RobotControllerWebInfo used when launching + RemoteProgrammingModeActivity on the driver station.
    +
    +
    read(int, int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    read(int, int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    read(int, int) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Read a contiguous set of device I2C registers.
    +
    +
    read(JsonReader) - Method in class com.qualcomm.robotcore.hardware.ScannedDevices.MapAdapter
    +
     
    +
    read8(int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    read8(int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    read8(int) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Read the byte at the indicated register.
    +
    +
    READ_REGISTER_COUNT_MAX - Static variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    enableI2cReadMode and enableI2cWriteMode both impose a maximum length + on the size of data that can be read or written at one time.
    +
    +
    readableCopy() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Returns a copy of this window but with the I2cDeviceSynch.ReadWindow.usedForRead flag clear
    +
    +
    readAnalogRaw(int) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
    +
    +
    Read an analog value from a device; only works in analog read mode
    +
    +
    readAnalogVoltage(int) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
    +
    +
    Reads the analog voltage from a device.
    +
    +
    readCache - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readCacheIsValid() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readCacheLock - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readCacheStatus - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readCacheTimeWindow - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readCacheValidityCurrentOrImminent() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readerWriterCount - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readerWriterGate - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readerWriterPreventionCount - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readI2cCacheFromController(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Read the local cache in from the I2C Controller + + NOTE: unless this method is called the internal cache isn't updated
    +
    +
    readI2cCacheFromController() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Enqueue a request to the controller to read the range of data from the HW device that + was previously indicated in I2cDevice.enableI2cReadMode(I2cAddr, int, int) and subsequently written + to the controller.
    +
    +
    readI2cCacheFromController() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Trigger a read of the I2C cache
    +
    +
    readI2cCacheFromModule(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Deprecated.
    +
    +
    readI2cCacheFromModule() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Deprecated. +
    Use of I2cDevice.readI2cCacheFromController() is suggested instead
    +
    +
    +
    readI2cCacheFromModule() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Deprecated.
    +
    +
    readNLines(int) - Method in class com.qualcomm.ftccommon.ViewLogsActivity
    +
     
    +
    readRawVoltage() - Method in interface com.qualcomm.robotcore.hardware.AnalogSensor
    +
    +
    Returns the sensor's current value as a raw voltage level.
    +
    +
    readTimeStamped(int, int, I2cDeviceSynch.ReadWindow, I2cDeviceSynch.ReadWindow) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynch
    +
    +
    Advanced: Atomically calls ensureReadWindow() with the last two parameters and then + readTimeStamped() with the first two without the possibility of a concurrent client + interrupting in the middle.
    +
    +
    readTimeStamped(int, int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readTimeStamped(int, int, I2cDeviceSynch.ReadWindow, I2cDeviceSynch.ReadWindow) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readTimeStamped(int, int, I2cDeviceSynch.ReadWindow, I2cDeviceSynch.ReadWindow) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    readTimeStamped(int, int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    readTimeStamped(int, int) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Reads and returns a contiguous set of device I2C registers, together with a best-available + timestamp of when the actual I2C read occurred.
    +
    +
    ReadWindow(int, int, I2cDeviceSynch.ReadMode) - Constructor for class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Create a new register window with the indicated starting register and register count
    +
    +
    readWindow - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readWindow - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    readWindowActuallyRead - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readWindowSentToController - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    readWriteCache() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    rebuildDeviceNamesIfNecessary() - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    ReceiveLoopCallback() - Constructor for class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity.ReceiveLoopCallback
    +
     
    +
    ReceiveLoopCallback() - Constructor for class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.ReceiveLoopCallback
    +
     
    +
    recentlyAttachedUsbDevices - Variable in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    recordDeviceName(String, HardwareDevice) - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    recvLoopCallback - Variable in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    recvLoopCallback - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    RecvLoopCallback() - Constructor for class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity.RecvLoopCallback
    +
     
    +
    red() - Method in interface com.qualcomm.robotcore.hardware.ColorSensor
    +
    +
    Get the Red values detected by the sensor as an int.
    +
    +
    red - Variable in class com.qualcomm.robotcore.hardware.NormalizedRGBA
    +
    +
    normalized red value, in range [0,1)
    +
    +
    refresh() - Method in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    refreshAllUnavailable() - Method in class com.qualcomm.ftccommon.FtcAboutActivity.AboutFragment
    +
     
    +
    refreshErrorTextOnUiThread() - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    refreshFuture - Variable in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    refreshLocal(RobotCoreCommandList.AboutInfo) - Method in class com.qualcomm.ftccommon.FtcAboutActivity.AboutFragment
    +
     
    +
    refreshRemote(RobotCoreCommandList.AboutInfo) - Method in class com.qualcomm.ftccommon.FtcAboutActivity.AboutFragment
    +
     
    +
    refreshRemote(RobotCoreCommandList.AboutInfo) - Method in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    refreshStateStatus() - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    refreshSystemTelemetry() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Do our best to maintain synchrony of the system error / warning state between applications + without incurring undo overhead.
    +
    +
    refreshSystemTelemetryNow() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Forces an immediate refresh of the system telemetry
    +
    +
    refreshTimestamp() - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Refreshes the Gamepad's timestamp to be the current time.
    +
    +
    refreshUserTelemetry(TelemetryMessage, double) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    refreshUserTelemetry(TelemetryMessage, double) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
    +
    Updates the (indicated) user's telemetry: the telemetry is transmitted if a sufficient + interval has passed since the last transmission.
    +
    +
    refreshUserTelemetry(TelemetryMessage, double) - Method in class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    refreshUserTelemetry(TelemetryMessage, double) - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
    +
    Update's the user portion of the driver station screen with the contents of the telemetry object + here provided if a sufficiently long duration has passed since the last update.
    +
    +
    refreshUserTelemetryLock - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    register(Class) - Method in interface com.qualcomm.robotcore.eventloop.opmode.AnnotatedOpModeManager
    +
    +
    Register a class for display on the driver station and availability for game play.
    +
    +
    register(OpModeManager) - Static method in class com.qualcomm.robotcore.eventloop.opmode.AnnotatedOpModeRegistrar
    +
    +
    Deprecated. +
    functionality now automatically called by the system
    +
    +
    +
    register(String, Class<? extends OpMode>) - Method in interface com.qualcomm.robotcore.eventloop.opmode.OpModeManager
    +
    +
    Registers a class for display on the driver station and availability for game play.
    +
    +
    register(OpModeMeta, Class<? extends OpMode>) - Method in interface com.qualcomm.robotcore.eventloop.opmode.OpModeManager
    +
    +
    Registers a class for display on the driver station and availability for game play.
    +
    +
    register(String, OpMode) - Method in interface com.qualcomm.robotcore.eventloop.opmode.OpModeManager
    +
    +
    Register an *instance* of a class for display on the driver station and availability + for game play.
    +
    +
    register(OpModeMeta, OpMode) - Method in interface com.qualcomm.robotcore.eventloop.opmode.OpModeManager
    +
    +
    Register an *instance* of a class for display on the driver station and availability + for game play.
    +
    +
    register(OpModeManager) - Method in interface com.qualcomm.robotcore.eventloop.opmode.OpModeRegister
    +
    +
    The Op Mode Manager will call this method when it wants a list of all + available op modes.
    +
    +
    register - Variable in class com.qualcomm.robotcore.hardware.TimestampedI2cData
    +
    +
    the starting register address from which the data was retrieved
    +
    +
    registerArmingStateCallback(boolean) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    registeredOpModes - Variable in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    registerFilters() - Static method in class com.qualcomm.ftccommon.ClassManagerFactory
    +
    +
    Register all them that wants to see the classes in our APK
    +
    +
    registerForI2cPortReadyCallback(I2cController.I2cPortReadyCallback, int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Register to be notified when a given I2C port is ready.
    +
    +
    registerForI2cPortReadyCallback(I2cController.I2cPortReadyCallback) - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Registers an object to get portIsReady() + callbacks at regular intervals from the I2cDevice.
    +
    +
    registerForI2cPortReadyCallback(I2cController.I2cPortReadyCallback) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    The method used to register for a port-ready callback
    +
    +
    registerForPortReadyBeginEndCallback(I2cController.I2cPortReadyBeginEndNotifications, int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Registers to be notification when portIsReady callbacks begin or cease
    +
    +
    registerForPortReadyBeginEndCallback(I2cController.I2cPortReadyBeginEndNotifications) - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Register for notifications as to when portIsReady() + begin and end.
    +
    +
    registerForPortReadyBeginEndCallback(I2cController.I2cPortReadyBeginEndNotifications) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    registers for notifications as to when port-ready callbacks begin or cease
    +
    +
    registerListener(OpModeManagerNotifier.Notifications) - Method in interface com.qualcomm.robotcore.eventloop.opmode.OpModeManagerNotifier
    +
    +
    Registers an object as explicitly interested in receiving notifications as + to the coming and going of opmodes.
    +
    +
    registerListener(MotionDetection.MotionDetectionListener) - Method in class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
    +
    +
    registerListener
    +
    +
    registerListener(SignificantMotionDetection.SignificantMotionDetectionListener) - Method in class org.firstinspires.ftc.robotcore.external.SignificantMotionDetection
    +
     
    +
    registerResourceFilters() - Static method in class com.qualcomm.ftccommon.ClassManagerFactory
    +
     
    +
    registerSyncdDevice(SyncdDevice) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Register a sync'd device
    +
    +
    registerSyncdDevice(SyncdDevice) - Method in interface com.qualcomm.robotcore.eventloop.SyncdDevice.Manager
    +
     
    +
    releaseReaderLockShared() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    releaseRef(SoundPlayer.SoundInfo) - Static method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    RelicRecoveryVuMark - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Instances of RelicRecoveryVuMark represent the VuMarks used in the Relic Recovery + FTC competition of 2017-18.
    +
    +
    relicRecoveryVuMark - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaRelicRecovery.TrackingResults
    +
     
    +
    remoteConfigure - Variable in class com.qualcomm.ftccommon.FtcAboutActivity.AboutFragment
    +
     
    +
    remoteConfigure - Variable in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    remoteConfigure - Variable in class com.qualcomm.ftccommon.FtcAdvancedRCSettingsActivity.SettingsFragment
    +
     
    +
    remoteConfigure - Variable in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    remove(String) - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
    +
    (Advanced) Removes the device with the indicated name (if any) from this DeviceMapping.
    +
    +
    remove(SerialNumber, String) - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
    +
    (Advanced) Removes the device with the indicated name (if any) from this DeviceMapping.
    +
    +
    remove(String, HardwareDevice) - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
    +
    (Advanced) Removes a device from the overall map, if present.
    +
    +
    remove(SerialNumber, String, HardwareDevice) - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
    +
    (Advanced) Removes a device from the overall map, if present.
    +
    +
    remove(SerialNumber) - Method in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    removeAction(Object) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Removes a previously added action from the receiver.
    +
    +
    removeItem(Telemetry.Item) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Removes an item from the receiver telemetry, if present.
    +
    +
    removeLine(Telemetry.Line) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Removes a line from the receiver telemetry, if present.
    +
    +
    reportGlobalError(String, boolean) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    requestOpModeStop(OpMode) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    requestOpModeStop(OpMode) - Method in class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    requestOpModeStop(OpMode) - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
    +
    Requests that an OpMode be stopped if it's the currently active one
    +
    +
    requestOpModeStop() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    Requests that this OpMode be shut down if it the currently active opMode, much as if the stop + button had been pressed on the driver station; if this is not the currently active OpMode, + then this function has no effect.
    +
    +
    requestRememberedGroups() - Method in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    requestRestart() - Method in interface com.qualcomm.ftccommon.Restarter
    +
     
    +
    rereadLastRead - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.HeartbeatAction
    +
    +
    Priority #1: re-issue the last I2C read operation, if possible.
    +
    +
    reset() - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Reset this gamepad into its initial state
    +
    +
    reset() - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Resets the internal state of the timer to reflect the current time.
    +
    +
    resetDeviceConfigurationForOpMode() - Method in class com.qualcomm.robotcore.hardware.AnalogInput
    +
     
    +
    resetDeviceConfigurationForOpMode() - Method in class com.qualcomm.robotcore.hardware.AnalogOutput
    +
     
    +
    resetDeviceConfigurationForOpMode() - Method in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    resetDeviceConfigurationForOpMode(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Reset the state we hold for the given motor so that it's clean at the start of an opmode
    +
    +
    resetDeviceConfigurationForOpMode() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    resetDeviceConfigurationForOpMode() - Method in class com.qualcomm.robotcore.hardware.DigitalChannelImpl
    +
     
    +
    resetDeviceConfigurationForOpMode() - Method in interface com.qualcomm.robotcore.hardware.HardwareDevice
    +
    +
    Resets the device's configuration to that which is expected at the beginning of an OpMode.
    +
    +
    resetDeviceConfigurationForOpMode() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
     
    +
    resetDeviceConfigurationForOpMode() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice
    +
     
    +
    resetDeviceConfigurationForOpMode() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    resetDeviceConfigurationForOpMode() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    resetDeviceConfigurationForOpMode() - Method in class com.qualcomm.robotcore.hardware.LED
    +
     
    +
    resetDeviceConfigurationForOpMode() - Method in class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
     
    +
    resetDeviceConfigurationForOpMode() - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
     
    +
    resetStartTime() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    Reset the start time to zero.
    +
    +
    resetZAxisIntegrator() - Method in interface com.qualcomm.robotcore.hardware.GyroSensor
    +
    +
    Set the integrated Z axis to zero.
    +
    +
    resolution - Variable in class com.qualcomm.robotcore.util.ElapsedTime
    +
     
    +
    resourceId - Variable in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    Restarter - Interface in com.qualcomm.ftccommon
    +
     
    +
    restartRobot() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    restartRobot() - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
    +
    callback method to restart the robot
    +
    +
    reverse() - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AxesOrder
    +
    +
    Returns the AxesOrder which is the chronological reverse of the receiver.
    +
    +
    reverse() - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AxesReference
    +
     
    +
    rewriteLastWritten - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.HeartbeatAction
    +
    +
    Priority #2: re-issue the last I2C write operation, if possible.
    +
    +
    rgbWriteLast - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    right_bumper - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    button right bumper
    +
    +
    right_stick_button - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    right stick button
    +
    +
    right_stick_x - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    right analog stick horizontal axis
    +
    +
    right_stick_y - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    right analog stick vertical axis
    +
    +
    right_trigger - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    right trigger
    +
    +
    ROBOT_BATTERY_LEVEL_KEY - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    robotBatteryInterval - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    robotBatteryLoggingInterval - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    robotBatteryLoggingTimer - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    robotBatteryStatistics - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    robotBatteryTimer - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    robotCfgFileMgr - Variable in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    RobotConfigNameable - Interface in com.qualcomm.robotcore.hardware
    +
    +
    RobotConfigNameable provides access to the name by which a device has been configured + within a robot configuration
    +
    +
    robotControllerBatteryChecker - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    robotControllerBatteryCheckerInterval - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    robotControllerContext - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    RobotCoreException - Exception in com.qualcomm.robotcore.exception
    +
     
    +
    RobotCoreException(String) - Constructor for exception com.qualcomm.robotcore.exception.RobotCoreException
    +
     
    +
    RobotCoreException(String, Throwable) - Constructor for exception com.qualcomm.robotcore.exception.RobotCoreException
    +
     
    +
    RobotCoreException(String, Object...) - Constructor for exception com.qualcomm.robotcore.exception.RobotCoreException
    +
     
    +
    RobotCoreLynxModule - Interface in com.qualcomm.robotcore.hardware
    +
    +
    RobotCoreLynxModule is the view of a Lynx Module available at the RobotCore layer.
    +
    +
    RobotCoreLynxUsbDevice - Interface in com.qualcomm.robotcore.hardware
    +
    +
    RobotCoreLynxUsbDevice is the subset of the functionality of the LynxUsbDevice + which is accessible from the RobotCore subsystem.
    +
    +
    robotFromFtcCameraCoords - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    RobotProtocolException - Exception in com.qualcomm.robotcore.exception
    +
     
    +
    RobotProtocolException(String) - Constructor for exception com.qualcomm.robotcore.exception.RobotProtocolException
    +
     
    +
    RobotProtocolException(String, Object...) - Constructor for exception com.qualcomm.robotcore.exception.RobotProtocolException
    +
     
    +
    robotState - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    robotStatus - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    robotUsbDevice - Variable in class com.qualcomm.ftccommon.FtcEventLoopBase.LynxUsbDeviceContainer
    +
     
    +
    robotUsbModule - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    rotate(AngleUnit, float, float, float, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    rotate(AxesReference, AxesOrder, AngleUnit, float, float, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    rotated(AngleUnit, float, float, float, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    rotated(AxesReference, AxesOrder, AngleUnit, float, float, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    rotation(AngleUnit, float, float, float, float) - Static method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
    +
    Creates a matrix for rotation by the indicated angle around the indicated vector.
    +
    +
    rotation(AxesReference, AxesOrder, AngleUnit, float, float, float) - Static method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
    +
    Creates a matrix for a rotation specified by three successive rotation angles.
    +
    +
    Rotation - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Rotation captures an angluar direction of movement
    +
    +
    row - Variable in class org.firstinspires.ftc.robotcore.external.matrices.SliceMatrixF
    +
     
    +
    RowMajorMatrixF - Class in org.firstinspires.ftc.robotcore.external.matrices
    +
    +
    A RowMajorMatrixF is a dense matrix whose entries are arranged in + row-major order.
    +
    +
    RowMajorMatrixF(int, int) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.RowMajorMatrixF
    +
     
    +
    RowMatrixF - Class in org.firstinspires.ftc.robotcore.external.matrices
    +
    +
    A ColumnMatrixF is a matrix that converts a VectorF into a 1xn matrix
    +
    +
    RowMatrixF(VectorF) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.RowMatrixF
    +
     
    +
    run() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode.LinearOpModeHelper
    +
     
    +
    runningOnDriverStation - Variable in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    runOpMode() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    Override this method and place your code here.
    +
    +
    runWhenFinished - Variable in class com.qualcomm.ftccommon.SoundPlayer.CurrentlyPlaying
    +
     
    +
    + + + +

    S

    +
    +
    safeClose(Object) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    sameAsIncludingMode(I2cDeviceSynch.ReadWindow) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
    +
    Do the receiver and the indicated register window cover exactly the + same set of registers and have the same modality?
    +
    +
    sampleId - Variable in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    scale(double, double, double, double, double) - Static method in class com.qualcomm.robotcore.util.Range
    +
    +
    Scale a number in the range of x1 to x2, to the range of y1 to y2
    +
    +
    scale(float, float, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    scale(float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    scale(Position, double) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
     
    +
    scale(Velocity, double) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
     
    +
    scale(Acceleration, double) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.NavUtil
    +
     
    +
    scaled(float, float, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    scaled(float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    scaleRange(double, double) - Method in interface com.qualcomm.robotcore.hardware.Servo
    +
    +
    Scales the available movement range of the servo to be a subset of its maximum range.
    +
    +
    scaleRange(double, double) - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
    +
    Automatically scales the position of the servo.
    +
    +
    scanForUsbDevices() - Method in interface com.qualcomm.robotcore.hardware.DeviceManager
    +
    +
    Get a listing of currently connected USB devices
    +
    +
    ScannedDevices - Class in com.qualcomm.robotcore.hardware
    +
    +
    ScannedDevices is a simple distinguished kind of map of serial numbers + to device types.
    +
    +
    ScannedDevices(ScannedDevices) - Constructor for class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    ScannedDevices() - Constructor for class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    ScannedDevices.MapAdapter - Class in com.qualcomm.robotcore.hardware
    +
    +
    There *has* to be an easier way here, somehow.
    +
    +
    scheduledThreadPool - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    scheduleNext() - Method in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    SECOND_IN_NANO - Static variable in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    the number of nanoseconds in a second
    +
    +
    secondAngle - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    the chronologically second rotation made in the AxesOrder
    +
    +
    seconds() - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Returns the duration that has elapsed since the last reset of this timer in seconds
    +
    +
    secondsUsbPermissionTimeout - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    How long to wait for USB permissions when connecting to a webcam.
    +
    +
    selectNoChange() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModule
    +
     
    +
    sendBatteryInfo() - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
    +
    Send robot phone power % and robot battery voltage level to Driver station
    +
    +
    sendOrInject(Command) - Method in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    sendTelemetry(String, String) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    sendTelemetryData(TelemetryMessage) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Send telemetry data
    +
    +
    sendUIState() - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
    +
    The driver station is requesting our opmode list/ UI state.
    +
    +
    sendUIState() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    serialize() - Method in class com.qualcomm.ftccommon.CommandList.CmdPlaySound
    +
     
    +
    serialize() - Method in class com.qualcomm.ftccommon.CommandList.CmdRequestSound
    +
     
    +
    serialize() - Method in class com.qualcomm.ftccommon.CommandList.CmdStopPlayingSounds
    +
     
    +
    serialize() - Method in class com.qualcomm.ftccommon.CommandList.CmdVisuallyIdentify
    +
     
    +
    serialize() - Method in class com.qualcomm.ftccommon.CommandList.LynxAddressChangeRequest
    +
     
    +
    serialize() - Method in class com.qualcomm.ftccommon.CommandList.LynxFirmwareImagesResp
    +
     
    +
    serialize() - Method in class com.qualcomm.ftccommon.CommandList.LynxFirmwareUpdate
    +
     
    +
    serialize() - Method in class com.qualcomm.ftccommon.CommandList.LynxFirmwareUpdateResp
    +
     
    +
    serialize() - Method in class com.qualcomm.ftccommon.CommandList.USBAccessibleLynxModulesRequest
    +
     
    +
    serialize() - Method in class com.qualcomm.ftccommon.CommandList.USBAccessibleLynxModulesResp
    +
     
    +
    serialNumber - Variable in class com.qualcomm.ftccommon.CommandList.CmdVisuallyIdentify
    +
     
    +
    serialNumber - Variable in class com.qualcomm.ftccommon.FtcEventLoopBase.LynxUsbDeviceContainer
    +
     
    +
    serialNumber - Variable in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    serialNumber - Variable in class com.qualcomm.robotcore.hardware.LynxModuleMetaList
    +
     
    +
    SerialNumber - Class in com.qualcomm.robotcore.util
    +
    +
    Instances of SerialNumber represent serial number indentifiers of hardware devices.
    +
    +
    SerialNumber(String) - Constructor for class com.qualcomm.robotcore.util.SerialNumber
    +
    +
    Constructs a serial number using the supplied initialization string.
    +
    +
    serialNumberMap - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    serialNumberString - Variable in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    servo - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    Servo - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Instances of Servo interface provide access to servo hardware devices.
    +
    +
    Servo.Direction - Enum in com.qualcomm.robotcore.hardware
    +
    +
    Servos can be configured to internally reverse the values + to which their positioning power is set.
    +
    +
    servoController - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    ServoController - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Interface for working with Servo Controllers
    +
    +
    ServoController.PwmStatus - Enum in com.qualcomm.robotcore.hardware
    +
    +
    PWM Status - is pwm enabled?
    +
    +
    ServoControllerEx - Interface in com.qualcomm.robotcore.hardware
    +
    +
    ServoControllerEx is an optional servo controller interface supported by some hardware + that provides enhanced servo functionality.
    +
    +
    ServoImpl - Class in com.qualcomm.robotcore.hardware
    +
    +
    ServoImpl provides an implementation of the Servo interface that operates on top + of an instance of the ServoController interface.
    +
    +
    ServoImpl(ServoController, int) - Constructor for class com.qualcomm.robotcore.hardware.ServoImpl
    +
    +
    Constructor
    +
    +
    ServoImpl(ServoController, int, Servo.Direction) - Constructor for class com.qualcomm.robotcore.hardware.ServoImpl
    +
    +
    COnstructor
    +
    +
    ServoImplEx - Class in com.qualcomm.robotcore.hardware
    +
    +
    ServoImplEx provides access to extended functionality on servos.
    +
    +
    ServoImplEx(ServoControllerEx, int, ServoConfigurationType) - Constructor for class com.qualcomm.robotcore.hardware.ServoImplEx
    +
     
    +
    ServoImplEx(ServoControllerEx, int, Servo.Direction, ServoConfigurationType) - Constructor for class com.qualcomm.robotcore.hardware.ServoImplEx
    +
     
    +
    setActionFlag - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    setAnalogOutputFrequency(int) - Method in class com.qualcomm.robotcore.hardware.AnalogOutput
    +
    +
    Sets the channel output frequency in the range 1-5,000 Hz in mode 1, 2 or 3.
    +
    +
    setAnalogOutputFrequency(int, int) - Method in interface com.qualcomm.robotcore.hardware.AnalogOutputController
    +
    +
    Sets the channel output frequency in the range 1-5,000 Hz in mode 1, 2 or 3.
    +
    +
    setAnalogOutputMode(byte) - Method in class com.qualcomm.robotcore.hardware.AnalogOutput
    +
    +
    Sets the channel operating mode.
    +
    +
    setAnalogOutputMode(int, byte) - Method in interface com.qualcomm.robotcore.hardware.AnalogOutputController
    +
    +
    Sets the channel operating mode.
    +
    +
    setAnalogOutputVoltage(int) - Method in class com.qualcomm.robotcore.hardware.AnalogOutput
    +
    +
    Sets the channel output voltage.
    +
    +
    setAnalogOutputVoltage(int, int) - Method in interface com.qualcomm.robotcore.hardware.AnalogOutputController
    +
    +
    Sets the channel output voltage.
    +
    +
    setAngleUnit(AngleUnit) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
    +
    +
    Sets the AngleUnit to be used.
    +
    +
    setAngleUnit(AngleUnit) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
    +
    Sets the AngleUnit to be used.
    +
    +
    setAutoClear(boolean) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Sets whether Telemetry.clear() is automatically called after each call to Telemetry.update().
    +
    +
    setCallback(UpdateUI.Callback) - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    setCameraLocationOnRobot(CameraName, OpenGLMatrix) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Informs the VuforiaTrackableDefaultListener of the location of a particular camera + on the robot.
    +
    +
    setCapacity(int) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Log
    +
     
    +
    setCaption(String) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Item
    +
    +
    Sets the caption associated with this item.
    +
    +
    setCaptionValueSeparator(String) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
     
    +
    setColor(int) - Method in class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    setConstant(int) - Method in interface com.qualcomm.robotcore.hardware.Blinker
    +
    +
    Sets the blinker pattern to be a single, unchanging color
    +
    +
    setConstant(int) - Method in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    setControllerService(FtcRobotControllerService) - Method in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    setDigitalChannelMode(int, DigitalChannel.Mode) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
    +
    +
    Set the mode of a digital channel
    +
    +
    setDigitalChannelMode(int, DigitalChannelController.Mode) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
    +
    + +
    +
    setDigitalChannelState(int, boolean) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannelController
    +
    +
    Set the state of a digital channel
    +
    +
    setDigitalIOControlByte(byte) - Method in interface com.qualcomm.robotcore.hardware.DeviceInterfaceModule
    +
    +
    If a particular bit is set to one, the corresponding channel pin will be in output mode.
    +
    +
    setDigitalLine(int, int, boolean) - Method in interface com.qualcomm.robotcore.hardware.LegacyModule
    +
    +
    Set the value of digital line 0 or 1 while in analog mode.
    +
    +
    setDigitalOutputByte(byte) - Method in interface com.qualcomm.robotcore.hardware.DeviceInterfaceModule
    +
    +
    If a a particular control field bit is set to one, the channel pin will be in output mode and + will reflect the value of the corresponding field bit.
    +
    +
    setDirection(DcMotorSimple.Direction) - Method in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    setDirection(DcMotorSimple.Direction) - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Set the direction
    +
    +
    setDirection(DcMotorSimple.Direction) - Method in interface com.qualcomm.robotcore.hardware.DcMotorSimple
    +
    +
    Sets the logical direction in which this motor operates.
    +
    +
    setDirection(Servo.Direction) - Method in interface com.qualcomm.robotcore.hardware.Servo
    +
    +
    Sets the logical direction in which this servo operates.
    +
    +
    setDirection(Servo.Direction) - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
    +
    Set the direction
    +
    +
    setDisplayOrder(Telemetry.Log.DisplayOrder) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Log
    +
     
    +
    setDistanceUnit(DistanceUnit) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
    +
    +
    Sets the DistanceUnit to be used.
    +
    +
    setDuration(long, TimeUnit) - Method in class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    setErrorMessage(String) - Method in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    setEventLoop(EventLoop) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Replace the current event loop with a new event loop
    +
    +
    setFirmwareVersionString(String) - Method in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    setFrameQueueCapacity(int) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
    +
    +
    (Advanced) Sets the maximum number of Frames that will simultaneously be stored in the + frame queue.
    +
    +
    setGamepadId(int) - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
     
    +
    setHealthStatus(HardwareDeviceHealth.HealthStatus) - Method in interface com.qualcomm.robotcore.hardware.HardwareDeviceHealth
    +
     
    +
    setHealthStatus(HardwareDeviceHealth.HealthStatus) - Method in class com.qualcomm.robotcore.hardware.HardwareDeviceHealthImpl
    +
     
    +
    setHealthStatus(HardwareDeviceHealth.HealthStatus) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    setHealthStatus(HardwareDeviceHealth.HealthStatus) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    setHeartbeatAction(I2cDeviceSynch.HeartbeatAction) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynch
    +
    +
    Sets the action to take when the current heartbeat interval expires.
    +
    +
    setHeartbeatAction(I2cDeviceSynch.HeartbeatAction) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    setHeartbeatAction(I2cDeviceSynch.HeartbeatAction) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    setHeartbeatInterval(int) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynch
    +
    +
    Sets the interval within which communication must be received by the I2C device lest + a timeout may occur.
    +
    +
    setHeartbeatInterval(int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    setHeartbeatInterval(int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    setHistoryQueueCapacity(int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    setHistoryQueueCapacity(int) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchReadHistory
    +
    +
    Sets the maximum number of TimestampedI2cDatas that will simultaneously be stored in the + history queue.
    +
    +
    setHistoryQueueCapacity(int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchReadHistoryImpl
    +
     
    +
    setI2cAddr(I2cAddr) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
    +
    Deprecated.
    +
    +
    setI2cAddr(I2cAddr) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    setI2cAddr(I2cAddr) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Deprecated. + +
    +
    +
    setI2cAddress(I2cAddr) - Method in interface com.qualcomm.robotcore.hardware.ColorSensor
    +
    +
    Set the I2C address to a new value.
    +
    +
    setI2cAddress(I2cAddr) - Method in interface com.qualcomm.robotcore.hardware.I2cAddrConfig
    +
    +
    Configures a new I2C address to use
    +
    +
    setI2cAddress(I2cAddr) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    setI2cAddress(I2cAddr) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    setI2cAddress(I2cAddr) - Method in interface com.qualcomm.robotcore.hardware.IrSeekerSensor
    +
    +
    Set the I2C address to a new value.
    +
    +
    setI2cPortActionFlag(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Set the port action flag; this flag tells the controller to send the + current data in its buffer to the I2C device
    +
    +
    setI2cPortActionFlag() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Set the flag in the write cache that indicates that when the write cache is next transferred + to the controller an i2c transaction should take place.
    +
    +
    setI2cPortActionFlag() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Set the port action flag; this flag tells the controller to send the + current data in its buffer to the I2C device
    +
    +
    setItemSeparator(String) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
     
    +
    setJoystickDeadzone(float) - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Set the joystick deadzone.
    +
    +
    setLanguage(String) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Sets the language.
    +
    +
    setLanguageAndCountry(String, String) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Sets the language and country.
    +
    +
    setLED(int, boolean) - Method in interface com.qualcomm.robotcore.hardware.DeviceInterfaceModule
    +
    +
    Turn on or off a particular LED
    +
    +
    setListener(VuforiaTrackable.Listener) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable
    +
    +
    Sets an object that will receive notifications as the VuforiaTrackable + is tracked and is not tracked.
    +
    +
    setLit(boolean) - Method in class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    setLocation(OpenGLMatrix) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable
    +
    + +
    +
    setLocationFtcFieldFromTarget(OpenGLMatrix) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable
    +
    +
    Sets the location of the trackable in the the FTC Field Coordinate System.
    +
    +
    setLogging(boolean) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    setLogging(boolean) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    setLogging(boolean) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Turn logging on or off.
    +
    +
    setLoggingTag(String) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    setLoggingTag(String) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    setLoggingTag(String) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Set the tag to use when logging is on.
    +
    +
    setLoop(int) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
    +
    +
    Sets the number of repeats.
    +
    +
    setMasterVolume(float) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Sets the master volume control that is applied to all played sounds
    +
    +
    setMode(CompassSensor.CompassMode) - Method in interface com.qualcomm.robotcore.hardware.CompassSensor
    +
    +
    Change to calibration or measurement mode
    +
    +
    setMode(DcMotor.RunMode) - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Sets the current run mode for this motor
    +
    +
    setMode(DcMotor.RunMode) - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Set the current mode
    +
    +
    setMode(DigitalChannel.Mode) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannel
    +
    +
    Changes whether the channel is in input or output mode
    +
    +
    setMode(DigitalChannelController.Mode) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannel
    +
    +
    Deprecated. + +
    +
    +
    setMode(DigitalChannel.Mode) - Method in class com.qualcomm.robotcore.hardware.DigitalChannelImpl
    +
    +
    Set the channel mode
    +
    +
    setMode(DigitalChannelController.Mode) - Method in class com.qualcomm.robotcore.hardware.DigitalChannelImpl
    +
    +
    Deprecated.
    +
    +
    setMode(IrSeekerSensor.Mode) - Method in interface com.qualcomm.robotcore.hardware.IrSeekerSensor
    +
    +
    Set the device mode
    +
    +
    setModuleAddress(int) - Method in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    setModuleAddressChangeable(boolean) - Method in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    setMonitor(EventLoopManager.EventLoopMonitor) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Set a monitor for this event loop, which will immediately have the appropriate method called to + indicate the current peer status.
    +
    +
    setMotorDisable(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorControllerEx
    +
    +
    Individually denergizes a particular motor
    +
    +
    setMotorDisable() - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    Individually de-energizes this particular motor
    +
    +
    setMotorDisable() - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    setMotorEnable(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorControllerEx
    +
    +
    Individually energizes a particular motor
    +
    +
    setMotorEnable() - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    Individually energizes this particular motor
    +
    +
    setMotorEnable() - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    setMotorMode(int, DcMotor.RunMode) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Set the current motor mode.
    +
    +
    setMotorPower(int, double) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Set the current motor power
    +
    +
    setMotorTargetPosition(int, int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Set the motor target position.
    +
    +
    setMotorTargetPosition(int, int, int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorControllerEx
    +
    +
    Sets the target position and tolerance for a 'run to position' operation.
    +
    +
    setMotorType(MotorConfigurationType) - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Sets the assigned type of this motor.
    +
    +
    setMotorType(int, MotorConfigurationType) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Informs the motor controller of the type of a particular motor.
    +
    +
    setMotorType(MotorConfigurationType) - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    setMotorVelocity(int, double) - Method in interface com.qualcomm.robotcore.hardware.DcMotorControllerEx
    +
    +
    Sets the target velocity of the indicated motor.
    +
    +
    setMotorVelocity(int, double, AngleUnit) - Method in interface com.qualcomm.robotcore.hardware.DcMotorControllerEx
    +
    +
    Sets the target velocity of the indicated motor.
    +
    +
    setMotorZeroPowerBehavior(int, DcMotor.ZeroPowerBehavior) - Method in interface com.qualcomm.robotcore.hardware.DcMotorController
    +
    +
    Sets the behavior of the motor when zero power is applied.
    +
    +
    setMsTransmissionInterval(int) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Sets the minimum interval between Telemetry transmissions from the robot controller + to the driver station.
    +
    +
    setName(String) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable
    +
    +
    Sets a user-determined name associated with this trackable.
    +
    +
    setName(String) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackables
    +
    +
    Sets the name for this VuforiaTrackables and any of its contained + trackables which do not already have a user-specified name
    +
    +
    setNewAddress(int) - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModule
    +
     
    +
    setOwner(RobotUsbModule) - Method in interface com.qualcomm.robotcore.eventloop.SyncdDevice
    +
    +
    Records the owning module of this sync'd device.
    +
    +
    setPattern(Collection<Blinker.Step>) - Method in interface com.qualcomm.robotcore.hardware.Blinker
    +
    +
    Sets the pattern with which this LED or light should illuminate.
    +
    +
    setPattern(Collection<Blinker.Step>) - Method in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    setPhoneInformation(OpenGLMatrix, VuforiaLocalizer.CameraDirection) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Informs the listener of the location of the phone on the robot and the identity of + the camera being used.
    +
    +
    setPIDCoefficients(int, DcMotor.RunMode, PIDCoefficients) - Method in interface com.qualcomm.robotcore.hardware.DcMotorControllerEx
    +
    + +
    +
    setPIDCoefficients(DcMotor.RunMode, PIDCoefficients) - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    Deprecated. +
    Use #setPIDFCoefficients(RunMode, PIDFCoefficients) instead
    +
    +
    +
    setPIDCoefficients(DcMotor.RunMode, PIDCoefficients) - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    setPIDFCoefficients(int, DcMotor.RunMode, PIDFCoefficients) - Method in interface com.qualcomm.robotcore.hardware.DcMotorControllerEx
    +
    +
    Sets the coefficients used for PIDF control on the indicated motor when in the indicated mode
    +
    +
    setPIDFCoefficients(DcMotor.RunMode, PIDFCoefficients) - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    + +
    +
    setPIDFCoefficients(DcMotor.RunMode, PIDFCoefficients) - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    setPitch(float) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Sets the speech pitch.
    +
    +
    setPoseCorrectionMatrix(VuforiaLocalizer.CameraDirection, OpenGLMatrix) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    Deprecated.
    +
    +
    setPosition(double) - Method in interface com.qualcomm.robotcore.hardware.Servo
    +
    +
    Sets the current position of the servo, expressed as a fraction of its available + range.
    +
    +
    setPosition(double) - Method in class com.qualcomm.robotcore.hardware.ServoImpl
    +
    +
    Commands the servo to move to a designated position.
    +
    +
    setPositionPIDFCoefficients(double) - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    A shorthand for setting the PIDF coefficients for the DcMotor.RunMode.RUN_TO_POSITION + mode.
    +
    +
    setPositionPIDFCoefficients(double) - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    setPower(double) - Method in class com.qualcomm.robotcore.hardware.CRServoImpl
    +
     
    +
    setPower(double) - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Set the current motor power
    +
    +
    setPower(double) - Method in interface com.qualcomm.robotcore.hardware.DcMotorSimple
    +
    +
    Sets the power level of the motor, expressed as a fraction of the maximum + possible power / speed supported according to the run mode in which the + motor is operating.
    +
    +
    setPowerFloat() - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Deprecated. +
    This method is deprecated in favor of direct use of + setZeroPowerBehavior() and + setPower().
    +
    +
    +
    setPowerFloat() - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Deprecated.
    +
    +
    setPreferenceSummary(int, String) - Method in class com.qualcomm.ftccommon.FtcAboutActivity.AboutFragment
    +
     
    +
    setPreferenceSummary(String, String) - Method in class com.qualcomm.ftccommon.FtcAboutActivity.AboutFragment
    +
     
    +
    setPulseWidthOutputTime(int) - Method in interface com.qualcomm.robotcore.hardware.PWMOutput
    +
     
    +
    setPulseWidthOutputTime(int, int) - Method in interface com.qualcomm.robotcore.hardware.PWMOutputController
    +
    +
    Set the pulse width output time for this channel.
    +
    +
    setPulseWidthOutputTime(int) - Method in class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
    +
    Set the pulse width output time for this port.
    +
    +
    setPulseWidthPeriod(int) - Method in interface com.qualcomm.robotcore.hardware.PWMOutput
    +
     
    +
    setPulseWidthPeriod(int, int) - Method in interface com.qualcomm.robotcore.hardware.PWMOutputController
    +
    +
    Set the pulse width output period.
    +
    +
    setPulseWidthPeriod(int) - Method in class com.qualcomm.robotcore.hardware.PWMOutputImpl
    +
    +
    Set the pulse width output period.
    +
    +
    setPwmDisable() - Method in class com.qualcomm.robotcore.hardware.CRServoImplEx
    +
     
    +
    setPwmDisable() - Method in interface com.qualcomm.robotcore.hardware.PwmControl
    +
    +
    Individually denergizes the PWM for this particular servo
    +
    +
    setPwmDisable(int) - Method in interface com.qualcomm.robotcore.hardware.PWMOutputControllerEx
    +
     
    +
    setPwmDisable() - Method in interface com.qualcomm.robotcore.hardware.PWMOutputEx
    +
     
    +
    setPwmDisable() - Method in class com.qualcomm.robotcore.hardware.PWMOutputImplEx
    +
     
    +
    setPwmDisable() - Method in class com.qualcomm.robotcore.hardware.ServoImplEx
    +
     
    +
    setPwmEnable() - Method in class com.qualcomm.robotcore.hardware.CRServoImplEx
    +
     
    +
    setPwmEnable() - Method in interface com.qualcomm.robotcore.hardware.PwmControl
    +
    +
    Individually energizes the PWM for this particular servo.
    +
    +
    setPwmEnable(int) - Method in interface com.qualcomm.robotcore.hardware.PWMOutputControllerEx
    +
     
    +
    setPwmEnable() - Method in interface com.qualcomm.robotcore.hardware.PWMOutputEx
    +
     
    +
    setPwmEnable() - Method in class com.qualcomm.robotcore.hardware.PWMOutputImplEx
    +
     
    +
    setPwmEnable() - Method in class com.qualcomm.robotcore.hardware.ServoImplEx
    +
     
    +
    setPwmRange(PwmControl.PwmRange) - Method in class com.qualcomm.robotcore.hardware.CRServoImplEx
    +
     
    +
    setPwmRange(PwmControl.PwmRange) - Method in interface com.qualcomm.robotcore.hardware.PwmControl
    +
    +
    Sets the PWM range limits for the servo
    +
    +
    setPwmRange(PwmControl.PwmRange) - Method in class com.qualcomm.robotcore.hardware.ServoImplEx
    +
     
    +
    setRate(float) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
    +
    +
    Sets the playback rate.
    +
    +
    setReadWindow(I2cDeviceSynch.ReadWindow) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynch
    +
    +
    Set the set of registers that we will read and read and read again on every hardware cycle
    +
    +
    setReadWindow(I2cDeviceSynch.ReadWindow) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    setReadWindow(I2cDeviceSynch.ReadWindow) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    setReadWindowInternal(I2cDeviceSynch.ReadWindow) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    setRestarter(Restarter) - Method in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    setRetained(Boolean) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Item
    +
    +
    Sets whether the item is to be retained in clear() operation or not.
    +
    +
    setSerialNumber(SerialNumber) - Method in class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    setServoPosition(int, double) - Method in interface com.qualcomm.robotcore.hardware.ServoController
    +
    +
    Set the position of a servo at the given channel
    +
    +
    setServoPwmDisable(int) - Method in interface com.qualcomm.robotcore.hardware.ServoControllerEx
    +
    +
    Individually de-energizes the PWM for a particular servo
    +
    +
    setServoPwmEnable(int) - Method in interface com.qualcomm.robotcore.hardware.ServoControllerEx
    +
    +
    Individually energizes the PWM for a particular servo
    +
    +
    setServoPwmRange(int, PwmControl.PwmRange) - Method in interface com.qualcomm.robotcore.hardware.ServoControllerEx
    +
    +
    Sets the PWM range of the indicated servo.
    +
    +
    setServoType(int, ServoConfigurationType) - Method in interface com.qualcomm.robotcore.hardware.ServoControllerEx
    +
    +
    Sets the servo type for a particular servo
    +
    +
    setSignalDetectedThreshold(double) - Method in interface com.qualcomm.robotcore.hardware.IrSeekerSensor
    +
    +
    Set the minimum threshold for a signal to be considered detected
    +
    +
    setSpeechRate(float) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Sets the speech rate.
    +
    +
    setState(boolean) - Method in interface com.qualcomm.robotcore.hardware.DigitalChannel
    +
    +
    Sets the current state of the channel
    +
    +
    setState(boolean) - Method in class com.qualcomm.robotcore.hardware.DigitalChannelImpl
    +
    +
    Set the channel state
    +
    +
    setStateMonitor(RobotStateMonitor) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    setStatus(I2cDeviceSynchImpl.WRITE_CACHE_STATUS) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.WriteCacheStatus
    +
     
    +
    setSyncDeviceManager(SyncdDevice.Manager) - Method in interface com.qualcomm.robotcore.eventloop.SyncdDevice.Syncable
    +
     
    +
    setTargetPosition(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Sets the desired encoder target position to which the motor should advance or retreat + and then actively hold thereat.
    +
    +
    setTargetPosition(int) - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
    +
    Set the motor target position, using an integer.
    +
    +
    setTargetPositionTolerance(int) - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    Sets the target positioning tolerance of this motor
    +
    +
    setTargetPositionTolerance(int) - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    setText(TextView, String) - Method in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    setTextViews(TextView, TextView, TextView[], TextView, TextView, TextView) - Method in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    setTimestamp(long) - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Sets the time at which this Gamepad last changed its state, + in the SystemClock.uptimeMillis() time base.
    +
    +
    SettingsFragment() - Constructor for class com.qualcomm.ftccommon.FtcAdvancedRCSettingsActivity.SettingsFragment
    +
     
    +
    SettingsFragment() - Constructor for class com.qualcomm.ftccommon.FtcRobotControllerSettingsActivity.SettingsFragment
    +
     
    +
    setupRobot(EventLoop, EventLoop, Runnable) - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    setUsbModuleAttachmentHandler(UsbModuleAttachmentHandler) - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    setUser(GamepadUser) - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
     
    +
    setUserConfiguredName(String) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    setUserConfiguredName(String) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    setUserConfiguredName(String) - Method in interface com.qualcomm.robotcore.hardware.RobotConfigNameable
    +
    +
    Informs the device of a name by which it would be recognized by the user.
    +
    +
    setUserData(Object) - Method in interface org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackable
    +
    +
    Sets user data to be associated with this trackable object.
    +
    +
    setValue(String, Object...) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Item
    +
    +
    Updates the value of this item to be the result of the indicated string formatting operation.
    +
    +
    setValue(Object) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Item
    +
    +
    Updates the value of this item to be the result of applying Object.toString() + to the indicated object.
    +
    +
    setValue(Func<T>) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Item
    +
    +
    Updates the value of this item to be the indicated value producer.
    +
    +
    setValue(String, Func<T>) - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry.Item
    +
    +
    Updates the value of this item to be the indicated value producer.
    +
    +
    setVelocity(double) - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    Sets the velocity of the motor
    +
    +
    setVelocity(double, AngleUnit) - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    Sets the velocity of the motor
    +
    +
    setVelocity(double) - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    setVelocity(double, AngleUnit) - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    setVelocityPIDFCoefficients(double, double, double, double) - Method in interface com.qualcomm.robotcore.hardware.DcMotorEx
    +
    +
    A shorthand for setting the PIDF coefficients for the DcMotor.RunMode.RUN_USING_ENCODER + mode.
    +
    +
    setVelocityPIDFCoefficients(double, double, double, double) - Method in class com.qualcomm.robotcore.hardware.DcMotorImplEx
    +
     
    +
    setVolume(float) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
    +
    +
    Sets the volume.
    +
    +
    setWriteCacheStatus(I2cDeviceSynchImpl.WRITE_CACHE_STATUS) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    setZeroPowerBehavior(DcMotor.ZeroPowerBehavior) - Method in interface com.qualcomm.robotcore.hardware.DcMotor
    +
    +
    Sets the behavior of the motor when a power level of zero is applied.
    +
    +
    setZeroPowerBehavior(DcMotor.ZeroPowerBehavior) - Method in class com.qualcomm.robotcore.hardware.DcMotorImpl
    +
     
    +
    sharedPreferences - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    shortToByteArray(short) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    convert a short into a byte array; big endian is assumed
    +
    +
    shortToByteArray(short, ByteOrder) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    convert a short into a byte array
    +
    +
    shouldIdentify - Variable in class com.qualcomm.ftccommon.CommandList.CmdVisuallyIdentify
    +
     
    +
    shutdown() - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Performs the logical inverse of EventLoopManager.start(EventLoop).
    +
    +
    shutdownRobot() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    signalDetected() - Method in interface com.qualcomm.robotcore.hardware.IrSeekerSensor
    +
    +
    Returns true if an IR signal is detected
    +
    +
    SignificantMotionDetection - Class in org.firstinspires.ftc.robotcore.external
    +
     
    +
    SignificantMotionDetection() - Constructor for class org.firstinspires.ftc.robotcore.external.SignificantMotionDetection
    +
     
    +
    SignificantMotionDetection.SignificantMotionDetectionListener - Interface in org.firstinspires.ftc.robotcore.external
    +
     
    +
    size() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.DisplayedModuleList
    +
     
    +
    size() - Method in class com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping
    +
    +
    Returns the number of devices currently in this DeviceMapping
    +
    +
    size() - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
    +
    Returns the number of unique device objects currently found in this HardwareMap.
    +
    +
    size() - Method in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    sleep(long) - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    Sleeps for the given amount of milliseconds, or until the thread is interrupted.
    +
    +
    slice(int, int, int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a matrix which a submatrix of the receiver.
    +
    +
    slice(int, int) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a matrix which is a submatrix of the receiver starting at (0,0)
    +
    +
    SliceMatrixF - Class in org.firstinspires.ftc.robotcore.external.matrices
    +
    +
    A SliceMatrixF is a matrix whose implementation is a submatrix of some other matrix.
    +
    +
    SliceMatrixF(MatrixF, int, int, int, int) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.SliceMatrixF
    +
    +
    Creates a SliceMatrixF based on the indicated matrix whose upper left corner is at + (row, col) of that matrix and whose size is numRows x numCols.
    +
    +
    sort(List, JavaUtil.SortType, JavaUtil.SortDirection) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    SoundInfo(Context, int, int) - Constructor for class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    SoundInfo(File, int) - Constructor for class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    soundOffVolume - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    soundOnVolume - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    SoundPlayer - Class in com.qualcomm.ftccommon
    +
    +
    SoundPlayer is a simple utility class that plays sounds on the phone.
    +
    +
    SoundPlayer(int, int) - Constructor for class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Instantiates a new sound player.
    +
    +
    SoundPlayer.CurrentlyPlaying - Class in com.qualcomm.ftccommon
    +
     
    +
    SoundPlayer.InstanceHolder - Class in com.qualcomm.ftccommon
    +
     
    +
    SoundPlayer.LoadedSoundCache - Class in com.qualcomm.ftccommon
    +
    +
    SoundPlayer.LoadedSoundCache keeps track of loaded sounds, mapping sound resource id to loaded + sound id.
    +
    +
    SoundPlayer.PlaySoundParams - Class in com.qualcomm.ftccommon
    +
     
    +
    SoundPlayer.SoundFromFile - Interface in com.qualcomm.ftccommon
    +
     
    +
    SoundPlayer.SoundInfo - Class in com.qualcomm.ftccommon
    +
     
    +
    SoundPlayer.StopWhat - Enum in com.qualcomm.ftccommon
    +
     
    +
    soundPool - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    speak(String) - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
    +
    +
    Speaks the given text.
    +
    +
    standardDeviationOfList(List) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    start(EventLoop) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Starts up the EventLoopManager.
    +
    +
    start() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    From the non-linear OpMode; do not override
    +
    +
    start() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    User defined start method.
    +
    +
    start - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    button start
    +
    +
    start(State) - Method in class org.firstinspires.ftc.robotcore.external.StateMachine
    +
    +
    start + + Define the start state of the state machine.
    +
    +
    starting - Variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressConfiguration
    +
     
    +
    startLEDS() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    startListening() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
    +
    +
    Start listening to events from the Android accelerometer.
    +
    +
    startListening() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
    +
    +
    Start listening to events from the Android gyroscope.
    +
    +
    startListening() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
    +
    Start listening to events from the Android sensors.
    +
    +
    startListening() - Method in class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
    +
    +
    Start processing sensor data.
    +
    +
    startListening() - Method in class org.firstinspires.ftc.robotcore.external.SignificantMotionDetection
    +
    +
    Start processing sensor data.
    +
    +
    startPlaying(Context, int) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Asynchronously loads the indicated sound from its resource (if not already loaded), then + initiates its play once any current non-looping sound is finished playing.
    +
    +
    startPlaying(Context, File) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    startPlaying(Context, int, SoundPlayer.PlaySoundParams, <any>, Runnable) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Asynchronously loads the indicated sound from its resource (if not already loaded), then + initiates its play, optionally waiting for any currently non-looping playing sounds to finish first.
    +
    +
    startPlaying(Context, File, SoundPlayer.PlaySoundParams, <any>, Runnable) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    startPlayingLoadedSound(SoundPlayer.SoundInfo, SoundPlayer.PlaySoundParams, <any>, Runnable) - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    startProgrammingMode(FtcEventLoopHandler) - Method in interface com.qualcomm.ftccommon.ProgrammingModeController
    +
    +
    Starts programming mode.
    +
    +
    startRefreshing() - Method in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    startSwitchingToReadMode(I2cDeviceSynch.ReadWindow) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    startTime() - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Returns, in resolution-dependent units, the time at which this timer was last reset.
    +
    +
    startTimeNanoseconds() - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Returns the time at which the timer was last reset, in units of nanoseconds
    +
    +
    startUsbScanMangerIfNecessary() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    state - Variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    State - Interface in org.firstinspires.ftc.robotcore.external
    +
    +
    A state for a given state machine.
    +
    +
    stateGraph - Variable in class org.firstinspires.ftc.robotcore.external.StateMachine
    +
     
    +
    StateMachine - Class in org.firstinspires.ftc.robotcore.external
    +
    +
    Infrastructure for a very simple generic state machine.
    +
    +
    StateMachine() - Constructor for class org.firstinspires.ftc.robotcore.external.StateMachine
    +
     
    +
    stateStatusMessage - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    StateTransition - Class in org.firstinspires.ftc.robotcore.external
    +
     
    +
    StateTransition(State, Event, State) - Constructor for class org.firstinspires.ftc.robotcore.external.StateTransition
    +
     
    +
    status() - Method in interface com.qualcomm.robotcore.hardware.AccelerationSensor
    +
    +
    Status of this sensor, in string form
    +
    +
    status() - Method in interface com.qualcomm.robotcore.hardware.CompassSensor
    +
    +
    Status of this sensor, in string form
    +
    +
    status() - Method in interface com.qualcomm.robotcore.hardware.GyroSensor
    +
    +
    Status of this sensor, in string form
    +
    +
    status() - Method in interface com.qualcomm.robotcore.hardware.LightSensor
    +
    +
    Status of this sensor, in string form
    +
    +
    status() - Method in interface com.qualcomm.robotcore.hardware.UltrasonicSensor
    +
    +
    Status of this sensor, in string form
    +
    +
    Step() - Constructor for class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    Step(int, long, TimeUnit) - Constructor for class com.qualcomm.robotcore.hardware.Blinker.Step
    +
     
    +
    stop() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    From the non-linear OpMode; do not override
    +
    +
    stop() - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    User defined stop method
    +
    +
    stop() - Method in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    stop() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
    +
    +
    Stops the playback.
    +
    +
    stopBlinking() - Method in interface com.qualcomm.robotcore.hardware.Blinker
    +
    +
    Sets the blinker to constant black and frees any internal resources
    +
    +
    stopBlinking() - Method in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    stopLEDS() - Method in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    stopListening() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
    +
    +
    Stop listening to events from the Android accelerometer.
    +
    +
    stopListening() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
    +
    +
    Stop listening to events from the Android gyroscope.
    +
    +
    stopListening() - Method in class org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
    +
    +
    Stop listening to events from the Android sensors.
    +
    +
    stopListening() - Method in class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
    +
    +
    Stop processing sensor data.
    +
    +
    stopListening() - Method in class org.firstinspires.ftc.robotcore.external.SignificantMotionDetection
    +
    +
    Stop processing sensor data.
    +
    +
    stopPlayingAll() - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Stops playing all sounds that are currently playing
    +
    +
    stopPlayingLoops() - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
    +
    Stops playing all sounds that are currently playing in a loop
    +
    +
    stopProgrammingMode() - Method in interface com.qualcomm.ftccommon.ProgrammingModeController
    +
    +
    Stops programming mode.
    +
    +
    stopRefreshing() - Method in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    stopWhat - Variable in class com.qualcomm.ftccommon.CommandList.CmdStopPlayingSounds
    +
     
    +
    streamId - Variable in class com.qualcomm.ftccommon.SoundPlayer.CurrentlyPlaying
    +
     
    +
    stringToUtf8(String) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    Convert a Java String into a UTF-8 byte array
    +
    +
    stringValue - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId
    +
     
    +
    subtract(MatrixF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Subtracts a matrix, in place, from the receiver.
    +
    +
    subtract(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    subtract(float[]) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    subtract(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    subtracted(MatrixF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a new matrix whose elements are the difference of the corresponding elements of + the receiver and the subtrahend
    +
    +
    subtracted(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    subtracted(float[]) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    subtracted(MatrixF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
    +
    Subtracts the indicated matrix from this vector, taken as a row vector.
    +
    +
    subtracted(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    sumOfList(List) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    Supplier<T> - Interface in org.firstinspires.ftc.robotcore.external
    +
    +
    Represents a supplier of results.
    +
    +
    suppressNewHealthWarnings(boolean) - Static method in class com.qualcomm.robotcore.hardware.TimestampedI2cData
    +
     
    +
    suppressNewHealthWarningsWhile(Runnable) - Static method in class com.qualcomm.robotcore.hardware.TimestampedI2cData
    +
     
    +
    SwitchableLight - Interface in com.qualcomm.robotcore.hardware
    +
    +
    SwitchableLight instances are Lights whose on/off status can be + programmatically manipulated.
    +
    +
    SyncdDevice - Interface in com.qualcomm.robotcore.eventloop
    +
    +
    SyncdDevice is for a device that wants to be in sync with the event loop.
    +
    +
    SyncdDevice.Manager - Interface in com.qualcomm.robotcore.eventloop
    +
     
    +
    SyncdDevice.ShutdownReason - Enum in com.qualcomm.robotcore.eventloop
    +
    +
    SyncdDevice.ShutdownReason indicates the health of the shutdown of the device.
    +
    +
    SyncdDevice.Syncable - Interface in com.qualcomm.robotcore.eventloop
    +
     
    +
    SYSTEM_ERROR_KEY - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    SYSTEM_NONE_KEY - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    SYSTEM_WARNING_KEY - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    + + + +

    T

    +
    +
    TAG - Static variable in class com.qualcomm.ftccommon.ConfigWifiDirectActivity
    +
     
    +
    TAG - Static variable in class com.qualcomm.ftccommon.FtcAboutActivity
    +
     
    +
    TAG - Static variable in class com.qualcomm.ftccommon.FtcAdvancedRCSettingsActivity
    +
     
    +
    TAG - Static variable in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    TAG - Static variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    TAG - Static variable in class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    TAG - Static variable in class com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity
    +
     
    +
    TAG - Static variable in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity
    +
     
    +
    TAG - Static variable in class com.qualcomm.ftccommon.FtcRobotControllerService
    +
     
    +
    TAG - Static variable in class com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity
    +
     
    +
    TAG - Static variable in class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity
    +
     
    +
    TAG - Static variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    TAG - Static variable in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    tag - Variable in class com.qualcomm.robotcore.hardware.HardwareDeviceHealthImpl
    +
     
    +
    TAG - Static variable in class com.qualcomm.robotcore.hardware.LightBlinker
    +
     
    +
    TAG - Static variable in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    TAG - Static variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    talkToParentLynxModule(DeviceManager, LynxUsbDevice, int, Consumer<LynxModule>) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    target - Variable in class com.qualcomm.robotcore.hardware.LightMultiplexor
    +
     
    +
    TargetPositionNotSetException - Exception in com.qualcomm.robotcore.exception
    +
     
    +
    TargetPositionNotSetException() - Constructor for exception com.qualcomm.robotcore.exception.TargetPositionNotSetException
    +
     
    +
    teardown() - Method in class com.qualcomm.ftccommon.FtcEventLoop
    +
    +
    Teardown method
    +
    +
    teardown() - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    teardown() - Method in class com.qualcomm.ftccommon.FtcEventLoopIdle
    +
     
    +
    teardown() - Method in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
    +
    Teardown method, this will be called after the last call to loop.
    +
    +
    telemetry - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    The OpMode.telemetry field contains an object in which a user may accumulate data which + is to be transmitted to the driver station.
    +
    +
    Telemetry - Interface in org.firstinspires.ftc.robotcore.external
    +
    +
    Instances of Telemetry provide a means by which data can be transmitted from the + robot controller to the driver station and displayed on the driver station screen.
    +
    +
    Telemetry.Item - Interface in org.firstinspires.ftc.robotcore.external
    +
    +
    Instances of Telemetry.Item represent an item of data on the drive station telemetry display.
    +
    +
    Telemetry.Line - Interface in org.firstinspires.ftc.robotcore.external
    +
    +
    Instances of Telemetry.Line build lines of data on the driver station telemetry display.
    +
    +
    Telemetry.Log - Interface in org.firstinspires.ftc.robotcore.external
    +
    +
    The Telemetry.Log in a Telemetry instance provides an append-only list of messages + that appear on the driver station below the Telemetry.Items of the Telemetry.
    +
    +
    Telemetry.Log.DisplayOrder - Enum in org.firstinspires.ftc.robotcore.external
    +
    +
    Telemetry.Log.DisplayOrder instances indicate the desired ordering of a Telemetry.log().
    +
    +
    TELEMETRY_DEFAULT_INTERVAL - Static variable in interface com.qualcomm.robotcore.eventloop.EventLoop
    +
    +
    The value to pass to EventLoop.refreshUserTelemetry(TelemetryMessage, double) as the time interval + parameter in order to cause a system default interval to be used.
    +
    +
    telemetryEvent(RobocolDatagram) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
     
    +
    TeleOp - Annotation Type in com.qualcomm.robotcore.eventloop.opmode
    +
    +
    Provides an easy and non-centralized way of determining the OpMode list + shown on an FTC Driver Station.
    +
    +
    Temperature - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Instances of Temperature represent a temperature in a particular temperature scale.
    +
    +
    Temperature() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.Temperature
    +
     
    +
    Temperature(TempUnit, double, long) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.Temperature
    +
     
    +
    temperature - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Temperature
    +
     
    +
    TempUnit - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Instances of TempUnit enumerate a known different temperature scales
    +
    +
    test(T) - Method in interface org.firstinspires.ftc.robotcore.external.Predicate
    +
     
    +
    textDeviceName - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    textErrorMessage - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    textErrorMessageOriginalColor - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    textGamepad - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    textNetworkConnectionStatus - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    textOpMode - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    textRobotStatus - Variable in class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    textTrim(String, JavaUtil.TrimMode) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    theInstance - Static variable in class com.qualcomm.ftccommon.SoundPlayer.InstanceHolder
    +
     
    +
    theInstance - Static variable in class org.firstinspires.ftc.robotcore.external.ClassFactory.InstanceHolder
    +
     
    +
    thirdAngle - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    the chronologically third rotation made in the AxesOrder
    +
    +
    threadPool - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    throwIfRangeIsInvalid(double, double, double) - Static method in class com.qualcomm.robotcore.util.Range
    +
    +
    Throw an IllegalArgumentException if 'number' is less than 'min' or greater than 'max'
    +
    +
    throwIfRangeIsInvalid(int, int, int) - Static method in class com.qualcomm.robotcore.util.Range
    +
    +
    Throw an IllegalArgumentException if 'number' is less than 'min' or greater than 'max'
    +
    +
    ThrowingCallable<VALUE,EXCEPTION extends java.lang.Throwable> - Interface in org.firstinspires.ftc.robotcore.external
    +
    +
    An interface for workers that has a specialized exception set
    +
    +
    time - Variable in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    number of seconds this op mode has been running, this is + updated before every call to loop.
    +
    +
    time() - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Returns the duration that has elapsed since the last reset of this timer.
    +
    +
    time(TimeUnit) - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Returns the duration that has elapsed since the last reset of this timer + as an integer in the units requested.
    +
    +
    timeSinceLastHeartbeat - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    timestamp - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Relative timestamp of the last time an event was detected
    +
    +
    TimestampedData - Class in com.qualcomm.robotcore.hardware
    +
    +
    TimestampedData pairs together data which has been read with the timestamp at which + the read occurred, as best that can be determined
    +
    +
    TimestampedData() - Constructor for class com.qualcomm.robotcore.hardware.TimestampedData
    +
     
    +
    TimestampedI2cData - Class in com.qualcomm.robotcore.hardware
    +
    +
    TimestampedI2cData extends TimestampedData so as to provide an indication + of the I2c source from which the data was retrieved.
    +
    +
    TimestampedI2cData() - Constructor for class com.qualcomm.robotcore.hardware.TimestampedI2cData
    +
     
    +
    to - Variable in class org.firstinspires.ftc.robotcore.external.StateTransition
    +
     
    +
    toAngleUnit(AngleUnit) - Method in class org.firstinspires.ftc.robotcore.external.navigation.AngularVelocity
    +
    +
    Converts this AngularVelocity to one with the indicated angular units.
    +
    +
    toAngleUnit(AngleUnit) - Method in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    Converts this Orientation to one with the indicated angular units.
    +
    +
    toAxesOrder(AxesOrder) - Method in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    Converst the Orientation to an equivalent one with the indicated ordering of axes
    +
    +
    toAxesReference(AxesReference) - Method in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
    +
    Converts the Orientation to an equivalent one with the indicted point of view.
    +
    +
    toBoolean(Boolean) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
     
    +
    toBoolean(Boolean, boolean) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
     
    +
    toByteArray() - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
     
    +
    toCm(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    toColor() - Method in class com.qualcomm.robotcore.hardware.NormalizedRGBA
    +
    +
    Converts the normalized colors into an Android color integer
    +
    +
    toDegrees(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    toDegrees(float) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    toDegrees(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
     
    +
    toDegrees(float) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
     
    +
    toInches(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    toJson() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    toJson() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaRelicRecovery.TrackingResults
    +
     
    +
    toMeters(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    toMm(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    toRadians(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    toRadians(float) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    toRadians(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
     
    +
    toRadians(float) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
     
    +
    toSerializationString() - Method in class com.qualcomm.robotcore.hardware.LynxModuleMetaList
    +
     
    +
    toSerializationString() - Method in class com.qualcomm.robotcore.hardware.ScannedDevices
    +
     
    +
    toString() - Method in class com.qualcomm.ftccommon.FtcLynxModuleAddressUpdateActivity.AddressAndDisplayName
    +
     
    +
    toString() - Method in class com.qualcomm.ftccommon.SoundPlayer.SoundInfo
    +
     
    +
    toString() - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Display a summary of this gamepad, including the state of all buttons, analog sticks, and triggers
    +
    +
    toString() - Method in class com.qualcomm.robotcore.hardware.IrSeekerSensor.IrSeekerIndividualSensor
    +
     
    +
    toString() - Method in class com.qualcomm.robotcore.hardware.LynxModuleMeta
    +
     
    +
    toString() - Method in class com.qualcomm.robotcore.hardware.LynxModuleMetaList
    +
     
    +
    toString() - Method in class com.qualcomm.robotcore.hardware.PIDCoefficients
    +
     
    +
    toString() - Method in class com.qualcomm.robotcore.hardware.PIDFCoefficients
    +
     
    +
    toString() - Method in class com.qualcomm.robotcore.util.ElapsedTime
    +
    +
    Returns a string indicating the current elapsed time of the timer.
    +
    +
    toString() - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
     
    +
    toString() - Method in class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    toString() - Method in class org.firstinspires.ftc.robotcore.external.navigation.Acceleration
    +
     
    +
    toString(double) - Method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    toString() - Method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
     
    +
    toString() - Method in class org.firstinspires.ftc.robotcore.external.navigation.MagneticFlux
    +
     
    +
    toString() - Method in class org.firstinspires.ftc.robotcore.external.navigation.Orientation
    +
     
    +
    toString() - Method in class org.firstinspires.ftc.robotcore.external.navigation.Position
    +
     
    +
    toString() - Method in class org.firstinspires.ftc.robotcore.external.navigation.Velocity
    +
     
    +
    toString() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.PoseAndCamera
    +
     
    +
    toString() - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId
    +
     
    +
    toString() - Method in class org.firstinspires.ftc.robotcore.external.StateMachine
    +
     
    +
    toString() - Method in class org.firstinspires.ftc.robotcore.external.StateTransition
    +
     
    +
    toTitleCase(String) - Static method in class org.firstinspires.ftc.robotcore.external.JavaUtil
    +
     
    +
    touchSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    TouchSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    TouchSensor models a button.
    +
    +
    touchSensorMultiplexer - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    TouchSensorMultiplexer - Interface in com.qualcomm.robotcore.hardware
    +
    +
    NXT Touch Sensor Multiplexer.
    +
    +
    toUnit(DistanceUnit) - Method in class org.firstinspires.ftc.robotcore.external.navigation.Acceleration
    +
     
    +
    toUnit(DistanceUnit) - Method in class org.firstinspires.ftc.robotcore.external.navigation.Position
    +
     
    +
    toUnit(TempUnit) - Method in class org.firstinspires.ftc.robotcore.external.navigation.Temperature
    +
     
    +
    toUnit(DistanceUnit) - Method in class org.firstinspires.ftc.robotcore.external.navigation.Velocity
    +
     
    +
    toVector() - Method in class org.firstinspires.ftc.robotcore.external.matrices.ColumnMajorMatrixF
    +
     
    +
    toVector() - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    If the receiver is one-dimensional in one of its dimensions, returns a vector + containing the data of the receiver; otherwise, an exception is thrown.
    +
    +
    toVector() - Method in class org.firstinspires.ftc.robotcore.external.matrices.RowMajorMatrixF
    +
     
    +
    TRACE - Static variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    tracer - Variable in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    track(String) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
    +
    Returns the TrackingResults of the trackable with the given name.
    +
    +
    track(String) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaRelicRecovery
    +
     
    +
    trackable - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    TRACKABLE_NAMES - Static variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaRoverRuckus
    +
     
    +
    TrackingResults(VuforiaBase.TrackingResults) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    trackPose(String) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
    +
    Returns the TrackingResults of the pose of the trackable with the given name.
    +
    +
    trackPose(String) - Method in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaRelicRecovery
    +
     
    +
    transform(VectorF) - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Transforms the vector according to this matrix interpreted as a transformation matrix.
    +
    +
    transition(Event) - Method in class org.firstinspires.ftc.robotcore.external.StateMachine
    +
     
    +
    translate(float, float, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    translated(float, float, float) - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    translation(float, float, float) - Static method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    transposed() - Method in class org.firstinspires.ftc.robotcore.external.matrices.GeneralMatrixF
    +
     
    +
    transposed() - Method in class org.firstinspires.ftc.robotcore.external.matrices.MatrixF
    +
    +
    Returns a matrix which is the transposition of the receiver matrix.
    +
    +
    transposed() - Method in class org.firstinspires.ftc.robotcore.external.matrices.OpenGLMatrix
    +
     
    +
    tryGet(Class<? extends T>, String) - Method in class com.qualcomm.robotcore.hardware.HardwareMap
    +
    +
    Retrieves the (first) device with the indicated name which is also an instance of the + indicated class or interface.
    +
    +
    TwoPi - Static variable in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
     
    +
    type() - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Get the type of gamepad as a String.
    +
    +
    type - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId
    +
     
    +
    TypeConversion - Class in com.qualcomm.robotcore.util
    +
    +
    Utility class for performing type conversions
    +
    +
    typeFrom(InstanceId) - Static method in class org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId
    +
     
    +
    + + + +

    U

    +
    +
    ultrasonicSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    UltrasonicSensor - Interface in com.qualcomm.robotcore.hardware
    +
     
    +
    unhook() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    unhook() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    unit - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Acceleration
    +
    +
    The distance units in which this acceleration is expressed.
    +
    +
    unit - Variable in class org.firstinspires.ftc.robotcore.external.navigation.AngularVelocity
    +
    +
    the angular unit in which angular rates are expressed.
    +
    +
    unit - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Position
    +
     
    +
    unit - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Temperature
    +
     
    +
    unit - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Velocity
    +
    +
    The distance units in which this velocity is expressed.
    +
    +
    unMaskEvent(Event) - Method in class org.firstinspires.ftc.robotcore.external.StateMachine
    +
     
    +
    UnnormalizedAngleUnit - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    An UnnormalizedAngleUnit represents angles in different units of measure and + provides utility methods to convert across units.
    +
    +
    unregisterListener(OpModeManagerNotifier.Notifications) - Method in interface com.qualcomm.robotcore.eventloop.opmode.OpModeManagerNotifier
    +
    +
    Unregisters a previously registered listener.
    +
    +
    unregisterSyncdDevice(SyncdDevice) - Method in class com.qualcomm.robotcore.eventloop.EventLoopManager
    +
    +
    Unregisters a device from this event loop.
    +
    +
    unregisterSyncdDevice(SyncdDevice) - Method in interface com.qualcomm.robotcore.eventloop.SyncdDevice.Manager
    +
     
    +
    unsignedByteToDouble(byte) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    Accept a byte, treat that byte as an unsigned byte, then covert it to the return type
    +
    +
    unsignedByteToInt(byte) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    Accept a byte, treat that byte as an unsigned byte, then covert it to the return type
    +
    +
    unsignedIntToLong(int) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    Accept an int, treat that int as an unsigned int, then covert it to the return type
    +
    +
    unsignedShortToInt(short) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
    +
    Treats a short as an unsigned value and returns that value as a int
    +
    +
    update(MotionEvent) - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Update the gamepad based on a MotionEvent
    +
    +
    update(KeyEvent) - Method in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    Update the gamepad based on a KeyEvent
    +
    +
    update() - Method in interface org.firstinspires.ftc.robotcore.external.Telemetry
    +
    +
    Sends the receiver Telemetry to the driver station if more than the transmission interval has elapsed since the last transmission, or schedules the transmission + of the receiver should no subsequent Telemetry state be scheduled for transmission before + the transmission interval expires.
    +
    +
    updateBatteryStatus(BatteryChecker.BatteryStatus) - Method in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    updateFirmwareOnce(FtcEventLoopBase.LynxUsbDeviceContainer, String, byte[], SerialNumber) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    updateLynxFirmware(SerialNumber, com.qualcomm.ftccommon.CommandList.FWImage) - Method in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
    +
    Updates the firmware of the Expansion Hub in the indicated USB-attached device + to be the indicated firmware.
    +
    +
    updateNetworkConnectionStatus(NetworkStatus) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    updateNetworkConnectionStatus(NetworkStatus, String) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    updatePeerStatus(PeerStatus) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    updateRobotState(RobotState) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    updateRobotStatus(RobotStatus) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    updateStateMachines() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.Callback
    +
     
    +
    updateTelemetry(Telemetry) - Method in class com.qualcomm.robotcore.eventloop.opmode.OpMode
    +
    +
    Refreshes the user's telemetry on the driver station with the contents of the provided telemetry + object if a nominal amount of time has passed since the last telemetry transmission.
    +
    +
    UpdateUI - Class in com.qualcomm.ftccommon
    +
     
    +
    UpdateUI(Activity, Dimmer) - Constructor for class com.qualcomm.ftccommon.UpdateUI
    +
     
    +
    updateUi(String, Gamepad[]) - Method in class com.qualcomm.ftccommon.UpdateUI.Callback
    +
     
    +
    UpdateUI.Callback - Class in com.qualcomm.ftccommon
    +
     
    +
    UpdateUI.Callback.DeviceNameManagerCallback - Class in com.qualcomm.ftccommon
    +
     
    +
    updateUIInterval - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    updateUITimer - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    USBAccessibleLynxModule - Class in com.qualcomm.ftccommon
    +
    +
    A simple utility class holding the serial number of a USB accessible lynx module and (optionally) its module address
    +
    +
    USBAccessibleLynxModule(SerialNumber) - Constructor for class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    USBAccessibleLynxModule(SerialNumber, boolean) - Constructor for class com.qualcomm.ftccommon.USBAccessibleLynxModule
    +
     
    +
    USBAccessibleLynxModulesRequest() - Constructor for class com.qualcomm.ftccommon.CommandList.USBAccessibleLynxModulesRequest
    +
     
    +
    USBAccessibleLynxModulesResp() - Constructor for class com.qualcomm.ftccommon.CommandList.USBAccessibleLynxModulesResp
    +
     
    +
    usbModuleAttachmentHandler - Variable in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    UsbModuleAttachmentHandler - Interface in com.qualcomm.ftccommon
    +
    +
    UsbModuleAttachmentHandler is a notification interface through which policies for dealing + with the attachment and detachment can be provided.
    +
    +
    usbScanManager - Variable in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    useExtendedTracking - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    Indicates whether to use Vuforia's extended tracking mode.
    +
    +
    userOpmodeRegister - Variable in class com.qualcomm.ftccommon.FtcEventLoopBase
    +
     
    +
    userTelemetryInterval - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    userTelemetryTimer - Variable in class com.qualcomm.ftccommon.FtcEventLoopHandler
    +
     
    +
    usFrame - Variable in class com.qualcomm.robotcore.hardware.PwmControl.PwmRange
    +
    +
    usFrame is the rate, in microseconds, at which the PWM is transmitted.
    +
    +
    usFrameDefault - Static variable in class com.qualcomm.robotcore.hardware.PwmControl.PwmRange
    +
    +
    usFrameDefault is the default frame rate used, in microseconds
    +
    +
    usPulseLower - Variable in class com.qualcomm.robotcore.hardware.PwmControl.PwmRange
    +
    +
    usPulseLower is the minimum PWM rate used, in microseconds.
    +
    +
    usPulseLowerDefault - Static variable in class com.qualcomm.robotcore.hardware.PwmControl.PwmRange
    +
     
    +
    usPulseUpper - Variable in class com.qualcomm.robotcore.hardware.PwmControl.PwmRange
    +
    +
    usPulseLower is the maximum PWM rate used, in microseconds.
    +
    +
    usPulseUpperDefault - Static variable in class com.qualcomm.robotcore.hardware.PwmControl.PwmRange
    +
     
    +
    utf8ToString(byte[]) - Static method in class com.qualcomm.robotcore.util.TypeConversion
    +
     
    +
    utility - Variable in class com.qualcomm.ftccommon.FtcEventLoop
    +
     
    +
    + + + +

    V

    +
    +
    value() - Method in interface org.firstinspires.ftc.robotcore.external.Func
    +
    +
    Returns a value of the indicated type
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.ftccommon.ConfigWifiDirectActivity.Flag
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity.FwResponseStatus
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.ftccommon.LaunchActivityConstantsList.RequestCode
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.ftccommon.SoundPlayer.StopWhat
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.eventloop.SyncdDevice.ShutdownReason
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.CompassSensor.CompassMode
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.ControlSystem
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.DcMotor.RunMode
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.DcMotor.ZeroPowerBehavior
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.DcMotorSimple.Direction
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.DeviceManager.UsbDeviceType
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.DigitalChannel.Mode
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.DigitalChannelController.Mode
    +
    +
    Deprecated.
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.HardwareDevice.Manufacturer
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.HardwareDeviceHealth.HealthStatus
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadMode
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.CONTROLLER_PORT_MODE
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.READ_CACHE_STATUS
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.WRITE_CACHE_STATUS
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.I2cWaitControl
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.IrSeekerSensor.Mode
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.MotorControlAlgorithm
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.Servo.Direction
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.hardware.ServoController.PwmStatus
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum com.qualcomm.robotcore.util.ElapsedTime.Resolution
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.JavaUtil.AtMode
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.JavaUtil.SortDirection
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.JavaUtil.SortType
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.JavaUtil.TrimMode
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.AxesOrder
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.AxesReference
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.Axis
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.Orientation.AngleSet
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.RelicRecoveryVuMark
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.Rotation
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.TempUnit
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CameraDirection
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters.CameraMonitorFeedback
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId.Type
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    valueOf(String) - Static method in enum org.firstinspires.ftc.robotcore.external.Telemetry.Log.DisplayOrder
    +
    +
    Returns the enum constant of this type with the specified name.
    +
    +
    values() - Static method in enum com.qualcomm.ftccommon.ConfigWifiDirectActivity.Flag
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.ftccommon.FtcLynxFirmwareUpdateActivity.FwResponseStatus
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.ftccommon.LaunchActivityConstantsList.RequestCode
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.ftccommon.SoundPlayer.StopWhat
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.eventloop.SyncdDevice.ShutdownReason
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.CompassSensor.CompassMode
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.ControlSystem
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.DcMotor.RunMode
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.DcMotor.ZeroPowerBehavior
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.DcMotorSimple.Direction
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.DeviceManager.UsbDeviceType
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.DigitalChannel.Mode
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.DigitalChannelController.Mode
    +
    +
    Deprecated.
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.HardwareDevice.Manufacturer
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.HardwareDeviceHealth.HealthStatus
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadMode
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.CONTROLLER_PORT_MODE
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.READ_CACHE_STATUS
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.WRITE_CACHE_STATUS
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.I2cWaitControl
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.IrSeekerSensor.Mode
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.MotorControlAlgorithm
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.Servo.Direction
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.hardware.ServoController.PwmStatus
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum com.qualcomm.robotcore.util.ElapsedTime.Resolution
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.JavaUtil.AtMode
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.JavaUtil.SortDirection
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.JavaUtil.SortType
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.JavaUtil.TrimMode
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.AxesOrder
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.AxesReference
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.Axis
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.Orientation.AngleSet
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.RelicRecoveryVuMark
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.Rotation
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.TempUnit
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CameraDirection
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters.CameraMonitorFeedback
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId.Type
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    values() - Static method in enum org.firstinspires.ftc.robotcore.external.Telemetry.Log.DisplayOrder
    +
    +
    Returns an array containing the constants of this enum type, in +the order they are declared.
    +
    +
    Vector() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.MotionDetection.Vector
    +
     
    +
    VectorF - Class in org.firstinspires.ftc.robotcore.external.matrices
    +
    +
    A VectorF represents a single-dimensional vector of floats.
    +
    +
    VectorF(float[]) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    VectorF(float) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    VectorF(float, float) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    VectorF(float, float, float) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    VectorF(float, float, float, float) - Constructor for class org.firstinspires.ftc.robotcore.external.matrices.VectorF
    +
     
    +
    Velocity - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Instances of Velocity represent the derivative of Position over time.
    +
    +
    Velocity() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.Velocity
    +
     
    +
    Velocity(DistanceUnit, double, double, double, long) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.Velocity
    +
     
    +
    vendorProductPrefix - Static variable in class com.qualcomm.robotcore.util.SerialNumber
    +
     
    +
    VIEW_LOGS_ACTIVITY_FILENAME - Static variable in class com.qualcomm.ftccommon.LaunchActivityConstantsList
    +
     
    +
    ViewLogsActivity - Class in com.qualcomm.ftccommon
    +
     
    +
    ViewLogsActivity() - Constructor for class com.qualcomm.ftccommon.ViewLogsActivity
    +
     
    +
    VisuallyIdentifiableHardwareDevice - Interface in com.qualcomm.robotcore.hardware
    +
     
    +
    visuallyIdentify(boolean) - Method in interface com.qualcomm.robotcore.hardware.VisuallyIdentifiableHardwareDevice
    +
    +
    idempotent
    +
    +
    voltageSensor - Variable in class com.qualcomm.robotcore.hardware.HardwareMap
    +
     
    +
    VoltageSensor - Interface in com.qualcomm.robotcore.hardware
    +
    +
    Voltage Sensor
    +
    +
    volume - Variable in class com.qualcomm.ftccommon.CommandList.CmdPlaySound
    +
     
    +
    volume - Variable in class com.qualcomm.ftccommon.SoundPlayer.PlaySoundParams
    +
    +
    an additional volume scaling that will be applied to this particular play action
    +
    +
    VuforiaBase - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    An abstract base class that provides simplified access to Vuforia.
    +
    +
    VuforiaBase(String, String[], OpenGLMatrix[]) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
    +
     
    +
    VuforiaBase.TrackingResults - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
     
    +
    vuforiaCameraFromFtcCamera - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    vuforiaCameraFrontFromVuforiaCameraBack - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    vuforiaLicenseKey - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    The license key with which to use Vuforia.
    +
    +
    VuforiaLocalizer - Interface in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    Robot "localization" denotes a robot's ability to establish its own position and + orientation within its frame of reference.
    +
    +
    VuforiaLocalizer.CameraDirection - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    VuforiaLocalizer.CameraDirection enumerates the identities of the builtin phone cameras that Vuforia can use.
    +
    +
    VuforiaLocalizer.CloseableFrame - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    VuforiaLocalizer.CloseableFrame exposes a close() method so that one can proactively + reduce memory pressure when we're done with a Frame
    +
    +
    VuforiaLocalizer.Parameters - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    VuforiaLocalizer.Parameters provides configuration information for instantiating the Vuforia localizer
    +
    +
    VuforiaLocalizer.Parameters.CameraMonitorFeedback - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    VuforiaLocalizer.Parameters.CameraMonitorFeedback enumerates the kinds of positioning feedback that + may be drawn in the camera monitor window.
    +
    +
    VuforiaRelicRecovery - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    A class that provides simplified access to Vuforia for the Relic Recovery game (2017-2018).
    +
    +
    VuforiaRelicRecovery() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.VuforiaRelicRecovery
    +
     
    +
    VuforiaRelicRecovery.TrackingResults - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
     
    +
    VuforiaRoverRuckus - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    A class that provides simplified access to Vuforia for the Rover Ruckus game (2018-2019).
    +
    +
    VuforiaRoverRuckus() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.VuforiaRoverRuckus
    +
     
    +
    VuforiaTrackable - Interface in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    VuforiaTrackable provides access to an individual trackable Vuforia target.
    +
    +
    VuforiaTrackable.Listener - Interface in org.firstinspires.ftc.robotcore.external.navigation
    +
     
    +
    VuforiaTrackableDefaultListener - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    VuforiaTrackableDefaultListener is the default listener used for VuforiaTrackable + implementations.
    +
    +
    VuforiaTrackableDefaultListener() - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    VuforiaTrackableDefaultListener(VuforiaTrackable) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
    +
    If a null VuforiaTrackable is provided, then VuforiaTrackableDefaultListener.addTrackable(VuforiaTrackable) + must be called later, before tracking actually begins.
    +
    +
    VuforiaTrackableDefaultListener.PoseAndCamera - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
     
    +
    VuforiaTrackables - Interface in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    VuforiaTrackables represents a set of targets that can be visually tracked.
    +
    +
    vuMarkInstanceId - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
    +
     
    +
    VuMarkInstanceId - Class in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    VuMarkInstanceId captures the identifying state decoded from a particular instance + of a Vuforia VuMark.
    +
    +
    VuMarkInstanceId(InstanceId) - Constructor for class org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId
    +
     
    +
    VuMarkInstanceId.Type - Enum in org.firstinspires.ftc.robotcore.external.navigation
    +
    +
    VuMarkInstanceId.Type indicates the type of data that was found in the InstanceId + from which this data was decoded.
    +
    +
    + + + +

    W

    +
    +
    w - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Quaternion
    +
     
    +
    waitForIdle() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.WriteCacheStatus
    +
    +
    Waits for the write cache to become idle.
    +
    +
    waitForIdleWriteCache() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    waitForLoadCompletion() - Method in class com.qualcomm.ftccommon.SoundPlayer
    +
     
    +
    waitForNextHardwareCycle() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    Deprecated. +
    The need for user code to synchronize with the loop() thread has been + obviated by improvements in the modern motor and servo controller implementations. + Remaining uses of this API are likely unncessarily wasting cycles. If a simple non-zero + delay is required, the sleep() method is a better choice. + If one simply wants to allow other threads to run, LinearOpMode.idle() is a good choice.
    +
    +
    +
    waitForNonLoopingSoundsToFinish - Variable in class com.qualcomm.ftccommon.CommandList.CmdPlaySound
    +
     
    +
    waitForNonLoopingSoundsToFinish - Variable in class com.qualcomm.ftccommon.SoundPlayer.PlaySoundParams
    +
    +
    whether to wait for any currently-playing non-looping sound to finish before playing
    +
    +
    waitForStart() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    Pauses the Linear Op Mode until start has been pressed or until the current thread + is interrupted.
    +
    +
    waitForValidReadCache() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    waitForWriteCompletionInternal(I2cWaitControl) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    waitForWriteCompletions(I2cWaitControl) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    waitForWriteCompletions(I2cWaitControl) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    waitForWriteCompletions(I2cWaitControl) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Waits for the most recent write to complete according to the behavior specified in writeControl.
    +
    +
    waitOneFullHardwareCycle() - Method in class com.qualcomm.robotcore.eventloop.opmode.LinearOpMode
    +
    +
    Deprecated. +
    The need for user code to synchronize with the loop() thread has been + obviated by improvements in the modern motor and servo controller implementations. + Remaining uses of this API are likely unncessarily wasting cycles. If a simple non-zero + delay is required, the sleep() method is a better choice. + If one simply wants to allow other threads to run, LinearOpMode.idle() is a good choice.
    +
    +
    +
    webcamCalibrationFiles - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    Camera calibrations resident in files instead of resources.
    +
    +
    webcamCalibrationResources - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
    +
    +
    The resources (if any, may be empty or null) used to provide additional camera calibration data for + webcams used with Vuforia.
    +
    +
    WifiChannelItemAdapter(Context, int, WifiDirectChannelAndDescription[]) - Constructor for class com.qualcomm.ftccommon.FtcWifiDirectChannelSelectorActivity.WifiChannelItemAdapter
    +
     
    +
    WifiP2pGroupItemAdapter(Context, int, List<WifiDirectGroupName>) - Constructor for class com.qualcomm.ftccommon.FtcWifiDirectRememberedGroupsActivity.WifiP2pGroupItemAdapter
    +
     
    +
    write(int, byte[]) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    write(int, byte[], I2cWaitControl) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    write(int, byte[]) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    write(int, byte[], I2cWaitControl) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    write(int, byte[]) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Writes data to a set of registers, beginning with the one indicated, using + I2cWaitControl.ATOMIC semantics.
    +
    +
    write(int, byte[], I2cWaitControl) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Writes data to a set of registers, beginning with the one indicated.
    +
    +
    write(JsonWriter, Map<SerialNumber, DeviceManager.UsbDeviceType>) - Method in class com.qualcomm.robotcore.hardware.ScannedDevices.MapAdapter
    +
     
    +
    write8(int, int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    write8(int, int, I2cWaitControl) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    write8(int, int) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    write8(int, int, I2cWaitControl) - Method in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImplOnSimple
    +
     
    +
    write8(int, int) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Writes a byte to the indicated register using I2cWaitControl.ATOMIC semantics.
    +
    +
    write8(int, int, I2cWaitControl) - Method in interface com.qualcomm.robotcore.hardware.I2cDeviceSynchSimple
    +
    +
    Writes a byte to the indicated register.
    +
    +
    WRITE_REGISTER_COUNT_MAX - Static variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynch.ReadWindow
    +
     
    +
    writeCache - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    writeCacheLock - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    writeCacheStatus - Variable in class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl
    +
     
    +
    WriteCacheStatus() - Constructor for class com.qualcomm.robotcore.hardware.I2cDeviceSynchImpl.WriteCacheStatus
    +
     
    +
    writeI2cCacheToController(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Write the local cache to the I2C Controller + + NOTE: unless this method is called the internal cache isn't updated
    +
    +
    writeI2cCacheToController() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Enqueue a request to the controller to write the current contents of the write cache + to the HW device.
    +
    +
    writeI2cCacheToController() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Trigger a write of the I2C cache
    +
    +
    writeI2cCacheToModule(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Deprecated.
    +
    +
    writeI2cCacheToModule() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Deprecated. +
    Use of I2cDevice.writeI2cCacheToController() is suggested instead
    +
    +
    +
    writeI2cCacheToModule() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Deprecated.
    +
    +
    writeI2cPortFlagOnlyToController(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Write just the port action flag in the local cache to the I2C controller
    +
    +
    writeI2cPortFlagOnlyToController() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Enqueue a request to the controller to reissue the previous i2c transaction to the HW device.
    +
    +
    writeI2cPortFlagOnlyToController() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Write only the action flag
    +
    +
    writeI2cPortFlagOnlyToModule(int) - Method in interface com.qualcomm.robotcore.hardware.I2cController
    +
    +
    Deprecated.
    +
    +
    writeI2cPortFlagOnlyToModule() - Method in interface com.qualcomm.robotcore.hardware.I2cDevice
    +
    +
    Deprecated. + +
    +
    +
    writeI2cPortFlagOnlyToModule() - Method in class com.qualcomm.robotcore.hardware.I2cDeviceImpl
    +
    +
    Deprecated.
    +
    +
    + + + +

    X

    +
    +
    x - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    button x
    +
    +
    x - Variable in class org.firstinspires.ftc.robotcore.external.navigation.MagneticFlux
    +
    +
    the flux in the X direction
    +
    +
    x - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Position
    +
     
    +
    x - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Quaternion
    +
     
    +
    x - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    xAccel - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Acceleration
    +
     
    +
    xAngle - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    xRotationRate - Variable in class org.firstinspires.ftc.robotcore.external.navigation.AngularVelocity
    +
    +
    the instantaneous body-referenced rotation rate about the x-axis in units + of "AngularVelocity.units per second".
    +
    +
    xVeloc - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Velocity
    +
     
    +
    + + + +

    Y

    +
    +
    y - Variable in class com.qualcomm.robotcore.hardware.Gamepad
    +
    +
    button y
    +
    +
    y - Variable in class org.firstinspires.ftc.robotcore.external.navigation.MagneticFlux
    +
    +
    the flux in the Y direction
    +
    +
    y - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Position
    +
     
    +
    y - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Quaternion
    +
     
    +
    y - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    yAccel - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Acceleration
    +
     
    +
    yAngle - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    yRotationRate - Variable in class org.firstinspires.ftc.robotcore.external.navigation.AngularVelocity
    +
    +
    the instantaneous body-referenced rotation rate about the y-axis in units + of "AngularVelocity.units per second".
    +
    +
    yVeloc - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Velocity
    +
     
    +
    + + + +

    Z

    +
    +
    z - Variable in class org.firstinspires.ftc.robotcore.external.navigation.MagneticFlux
    +
    +
    the flux in the Z direction
    +
    +
    z - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Position
    +
     
    +
    z - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Quaternion
    +
     
    +
    z - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    zAccel - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Acceleration
    +
     
    +
    zAngle - Variable in class org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
    +
     
    +
    zero() - Static method in class com.qualcomm.robotcore.hardware.I2cAddr
    +
     
    +
    zeroCelsiusF - Static variable in enum org.firstinspires.ftc.robotcore.external.navigation.TempUnit
    +
     
    +
    zeroCelsiusK - Static variable in enum org.firstinspires.ftc.robotcore.external.navigation.TempUnit
    +
     
    +
    zRotationRate - Variable in class org.firstinspires.ftc.robotcore.external.navigation.AngularVelocity
    +
    +
    the instantaneous body-referenced rotation rate about the z-axis in units + of "AngularVelocity.units per second".
    +
    +
    ZTE_WIFI_CHANNEL_EDITOR_PACKAGE - Static variable in class com.qualcomm.ftccommon.LaunchActivityConstantsList
    +
     
    +
    zVeloc - Variable in class org.firstinspires.ftc.robotcore.external.navigation.Velocity
    +
     
    +
    +A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 
    + +
    + + + + + + + +
    + + + + diff --git a/doc/javadoc/index.html b/doc/javadoc/index.html new file mode 100644 index 00000000000..6ed0808704d --- /dev/null +++ b/doc/javadoc/index.html @@ -0,0 +1,75 @@ + + + + + +Generated Documentation (Untitled) + + + + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/ClassFactory.InstanceHolder.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/ClassFactory.InstanceHolder.html new file mode 100644 index 00000000000..2080987532a --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/ClassFactory.InstanceHolder.html @@ -0,0 +1,276 @@ + + + + + +ClassFactory.InstanceHolder + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Class ClassFactory.InstanceHolder

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.ClassFactory.InstanceHolder
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      ClassFactory
      +
      +
      +
      +
      protected static class ClassFactory.InstanceHolder
      +extends java.lang.Object
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + +
        Constructors 
        ModifierConstructor and Description
        protected InstanceHolder() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          InstanceHolder

          +
          protected InstanceHolder()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/ClassFactory.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/ClassFactory.html new file mode 100644 index 00000000000..4514e4cc496 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/ClassFactory.html @@ -0,0 +1,403 @@ + + + + + +ClassFactory + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Class ClassFactory

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.ClassFactory
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public abstract class ClassFactory
      +extends java.lang.Object
      +
      ClassFactory provides a means by which various objects in the SDK may be logically + instantiated without exposing their external class identities to user's programs.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          ClassFactory

          +
          public ClassFactory()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getInstance

          +
          public static ClassFactory getInstance()
          +
        • +
        + + + + + + + +
          +
        • +

          canCreateTFObjectDetector

          +
          public abstract boolean canCreateTFObjectDetector()
          +
          Return true if this device is compatible with TensorFlow Object Detection, false otherwise.
          +
        • +
        + + + +
          +
        • +

          createTFObjectDetector

          +
          public abstract TFObjectDetector createTFObjectDetector(TFObjectDetector.Parameters parameters,
          +                                                        VuforiaLocalizer vuforiaLocalizer)
          +
          createTFObjectDetector returns + an instance of the TensorFlow object detector engine configured with the indicated set of parameters.
          +
          +
          Parameters:
          +
          parameters - the parameters used to configure the instance of the engine
          +
          vuforiaLocalizer - the VuforiaLocalizer that will be used to obtain camera frames
          +
          Returns:
          +
          an instance of the TensorFlow object detector engine.
          +
          See Also:
          +
          TFObjectDetector
          +
          +
        • +
        + + + +
          +
        • +

          getCameraManager

          +
          public abstract CameraManager getCameraManager()
          +
          Returns a CameraManager which can be used to access the USB webcams + attached to the robot controller.
          +
          +
          See Also:
          +
          CameraManager
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/Const.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Const.html new file mode 100644 index 00000000000..42ff2f9d348 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Const.html @@ -0,0 +1,172 @@ + + + + + +Const + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Annotation Type Const

    +
    +
    +
    +
      +
    • +
      +
      +
      @Documented
      + @Target(value=METHOD)
      + @Retention(value=CLASS)
      +public @interface Const
      +
      Const documents a method that promises not to change the internal state + of the method receiver. Documenting methods in this way helps programmers understand + which methods examine the object and return results based on that examination but don't + change the internal object state and which methods, by contrast, perform their function + but updating or changing internal object state.
      +
      +
      See Also:
      +
      NonConst
      +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/Consumer.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Consumer.html new file mode 100644 index 00000000000..fd9d98146d1 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Consumer.html @@ -0,0 +1,228 @@ + + + + + +Consumer + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface Consumer<T>

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface Consumer<T>
      +
      Instances of Consumer are functions that act on an instance of a indicated type
      +
    • +
    +
    +
    +
      +
    • + + +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + + + +
          +
        • +

          accept

          +
          void accept(T value)
          +
          Performs this operation on the given argument.
          +
          +
          Parameters:
          +
          value - the input argument
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/Event.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Event.html new file mode 100644 index 00000000000..a0ac965f977 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Event.html @@ -0,0 +1,220 @@ + + + + + +Event + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface Event

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface Event
      +
      A state machine event. Implement this interface as an enumeration + to define states for a given state machine.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getName

          +
          java.lang.String getName()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/Func.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Func.html new file mode 100644 index 00000000000..609406540c6 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Func.html @@ -0,0 +1,227 @@ + + + + + +Func + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface Func<T>

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface Func<T>
      +
      Instances of Func are nullary producers of values. + TODO: uses of this should probably be replaced with uses of Supplier.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          value

          +
          T value()
          +
          Returns a value of the indicated type
          +
          +
          Returns:
          +
          a value of the indicated type
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/Function.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Function.html new file mode 100644 index 00000000000..e43acec339a --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Function.html @@ -0,0 +1,221 @@ + + + + + +Function + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface Function<T,R>

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface Function<T,R>
      +
      If we were running Java8, we'd just use the built-in interface
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.AtMode.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.AtMode.html new file mode 100644 index 00000000000..2336199abba --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.AtMode.html @@ -0,0 +1,378 @@ + + + + + +JavaUtil.AtMode + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Enum JavaUtil.AtMode

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<JavaUtil.AtMode>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.JavaUtil.AtMode
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<JavaUtil.AtMode>
      +
      +
      +
      Enclosing class:
      +
      JavaUtil
      +
      +
      +
      +
      public static enum JavaUtil.AtMode
      +extends java.lang.Enum<JavaUtil.AtMode>
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static JavaUtil.AtModevalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static JavaUtil.AtMode[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static JavaUtil.AtMode[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (JavaUtil.AtMode c : JavaUtil.AtMode.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static JavaUtil.AtMode valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.SortDirection.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.SortDirection.html new file mode 100644 index 00000000000..5d5673a70a5 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.SortDirection.html @@ -0,0 +1,342 @@ + + + + + +JavaUtil.SortDirection + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Enum JavaUtil.SortDirection

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<JavaUtil.SortDirection>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.JavaUtil.SortDirection
        • +
        +
      • +
      +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        ASCENDING 
        DESCENDING 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static JavaUtil.SortDirectionvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static JavaUtil.SortDirection[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static JavaUtil.SortDirection[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (JavaUtil.SortDirection c : JavaUtil.SortDirection.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static JavaUtil.SortDirection valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.SortType.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.SortType.html new file mode 100644 index 00000000000..118948bc9b3 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.SortType.html @@ -0,0 +1,354 @@ + + + + + +JavaUtil.SortType + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Enum JavaUtil.SortType

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<JavaUtil.SortType>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.JavaUtil.SortType
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<JavaUtil.SortType>
      +
      +
      +
      Enclosing class:
      +
      JavaUtil
      +
      +
      +
      +
      public static enum JavaUtil.SortType
      +extends java.lang.Enum<JavaUtil.SortType>
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        IGNORE_CASE 
        NUMERIC 
        TEXT 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static JavaUtil.SortTypevalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static JavaUtil.SortType[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static JavaUtil.SortType[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (JavaUtil.SortType c : JavaUtil.SortType.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static JavaUtil.SortType valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.TrimMode.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.TrimMode.html new file mode 100644 index 00000000000..a8a5ac8f3da --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.TrimMode.html @@ -0,0 +1,354 @@ + + + + + +JavaUtil.TrimMode + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Enum JavaUtil.TrimMode

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<JavaUtil.TrimMode>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.JavaUtil.TrimMode
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<JavaUtil.TrimMode>
      +
      +
      +
      Enclosing class:
      +
      JavaUtil
      +
      +
      +
      +
      public static enum JavaUtil.TrimMode
      +extends java.lang.Enum<JavaUtil.TrimMode>
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        BOTH 
        LEFT 
        RIGHT 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static JavaUtil.TrimModevalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static JavaUtil.TrimMode[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static JavaUtil.TrimMode[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (JavaUtil.TrimMode c : JavaUtil.TrimMode.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static JavaUtil.TrimMode valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.html new file mode 100644 index 00000000000..0d7aef17261 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/JavaUtil.html @@ -0,0 +1,711 @@ + + + + + +JavaUtil + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Class JavaUtil

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.JavaUtil
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class JavaUtil
      +extends java.lang.Object
      +
      A class that provides utility methods used in FTC Java code generated from blocks.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          JavaUtil

          +
          public JavaUtil()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          inTextGetLetter

          +
          public static java.lang.String inTextGetLetter(java.lang.String str,
          +                                               JavaUtil.AtMode atMode,
          +                                               int i)
          +
        • +
        + + + +
          +
        • +

          inTextGetSubstring

          +
          public static java.lang.String inTextGetSubstring(java.lang.String str,
          +                                                  JavaUtil.AtMode atMode1,
          +                                                  int i1,
          +                                                  JavaUtil.AtMode atMode2,
          +                                                  int i2)
          +
        • +
        + + + +
          +
        • +

          toTitleCase

          +
          public static java.lang.String toTitleCase(java.lang.String str)
          +
        • +
        + + + +
          +
        • +

          textTrim

          +
          public static java.lang.String textTrim(java.lang.String str,
          +                                        JavaUtil.TrimMode trimMode)
          +
        • +
        + + + +
          +
        • +

          formatNumber

          +
          public static java.lang.String formatNumber(double number,
          +                                            int precision)
          +
        • +
        + + + +
          +
        • +

          isPrime

          +
          public static boolean isPrime(double d)
          +
        • +
        + + + +
          +
        • +

          sumOfList

          +
          public static double sumOfList(java.util.List list)
          +
        • +
        + + + +
          +
        • +

          minOfList

          +
          public static double minOfList(java.util.List list)
          +
        • +
        + + + +
          +
        • +

          maxOfList

          +
          public static double maxOfList(java.util.List list)
          +
        • +
        + + + +
          +
        • +

          averageOfList

          +
          public static double averageOfList(java.util.List list)
          +
        • +
        + + + +
          +
        • +

          medianOfList

          +
          public static double medianOfList(java.util.List list)
          +
        • +
        + + + +
          +
        • +

          modesOfList

          +
          public static java.util.List modesOfList(java.util.List list)
          +
        • +
        + + + +
          +
        • +

          standardDeviationOfList

          +
          public static double standardDeviationOfList(java.util.List list)
          +
        • +
        + + + +
          +
        • +

          randomItemOfList

          +
          public static java.lang.Object randomItemOfList(java.util.List list)
          +
        • +
        + + + +
          +
        • +

          randomInt

          +
          public static int randomInt(double a,
          +                            double b)
          +
        • +
        + + + +
          +
        • +

          createListWith

          +
          public static java.util.List createListWith(java.lang.Object... elements)
          +
        • +
        + + + +
          +
        • +

          createListWithItemRepeated

          +
          public static java.util.List createListWithItemRepeated(java.lang.Object element,
          +                                                        int n)
          +
        • +
        + + + +
          +
        • +

          inListGet

          +
          public static java.lang.Object inListGet(java.util.List list,
          +                                         JavaUtil.AtMode atMode,
          +                                         int i,
          +                                         boolean remove)
          +
        • +
        + + + +
          +
        • +

          inListSet

          +
          public static void inListSet(java.util.List list,
          +                             JavaUtil.AtMode atMode,
          +                             int i,
          +                             boolean insert,
          +                             java.lang.Object value)
          +
        • +
        + + + +
          +
        • +

          inListGetSublist

          +
          public static java.util.List inListGetSublist(java.util.List list,
          +                                              JavaUtil.AtMode atMode1,
          +                                              int i1,
          +                                              JavaUtil.AtMode atMode2,
          +                                              int i2)
          +
        • +
        + + + + + + + +
          +
        • +

          makeTextFromList

          +
          public static java.lang.String makeTextFromList(java.util.List list,
          +                                                java.lang.String delimiter)
          +
        • +
        + + + +
          +
        • +

          makeListFromText

          +
          public static java.util.List makeListFromText(java.lang.String text,
          +                                              java.lang.String delimiter)
          +
        • +
        + + + +
          +
        • +

          colorToHue

          +
          public static float colorToHue(int color)
          +
        • +
        + + + +
          +
        • +

          colorToSaturation

          +
          public static float colorToSaturation(int color)
          +
        • +
        + + + +
          +
        • +

          colorToValue

          +
          public static float colorToValue(int color)
          +
        • +
        + + + +
          +
        • +

          hsvToColor

          +
          public static int hsvToColor(float hue,
          +                             float saturation,
          +                             float value)
          +
        • +
        + + + +
          +
        • +

          ahsvToColor

          +
          public static int ahsvToColor(int alpha,
          +                              float hue,
          +                              float saturation,
          +                              float value)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/NonConst.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/NonConst.html new file mode 100644 index 00000000000..ec5b01ab671 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/NonConst.html @@ -0,0 +1,172 @@ + + + + + +NonConst + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Annotation Type NonConst

    +
    +
    +
    +
      +
    • +
      +
      +
      @Documented
      + @Target(value=METHOD)
      + @Retention(value=CLASS)
      +public @interface NonConst
      +
      NonConst documents a method that performs its function by updating internal + state of the method receiver. Documenting methods in this way helps programmers understand + which methods examine the object and return results based on that examination but don't + change the internal object state and which methods, by contrast, perform their function + but updating or changing internal object state.
      +
      +
      See Also:
      +
      Const
      +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/Predicate.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Predicate.html new file mode 100644 index 00000000000..8d81f94ef0d --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Predicate.html @@ -0,0 +1,220 @@ + + + + + +Predicate + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface Predicate<T>

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface Predicate<T>
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + + + +
          +
        • +

          test

          +
          boolean test(T t)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/SignificantMotionDetection.SignificantMotionDetectionListener.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/SignificantMotionDetection.SignificantMotionDetectionListener.html new file mode 100644 index 00000000000..5ad03b0e8b4 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/SignificantMotionDetection.SignificantMotionDetectionListener.html @@ -0,0 +1,222 @@ + + + + + +SignificantMotionDetection.SignificantMotionDetectionListener + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface SignificantMotionDetection.SignificantMotionDetectionListener

    +
    +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      SignificantMotionDetection
      +
      +
      +
      +
      public static interface SignificantMotionDetection.SignificantMotionDetectionListener
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onSignificantMotion

          +
          void onSignificantMotion()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/SignificantMotionDetection.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/SignificantMotionDetection.html new file mode 100644 index 00000000000..7da7248c641 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/SignificantMotionDetection.html @@ -0,0 +1,332 @@ + + + + + +SignificantMotionDetection + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Class SignificantMotionDetection

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.SignificantMotionDetection
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class SignificantMotionDetection
      +extends java.lang.Object
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          SignificantMotionDetection

          +
          public SignificantMotionDetection()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          startListening

          +
          public void startListening()
          +
          Start processing sensor data.
          +
        • +
        + + + +
          +
        • +

          stopListening

          +
          public void stopListening()
          +
          Stop processing sensor data.
          +
        • +
        + + + + + + + +
          +
        • +

          notifyListeners

          +
          protected void notifyListeners()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/State.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/State.html new file mode 100644 index 00000000000..2fa28a1a2da --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/State.html @@ -0,0 +1,247 @@ + + + + + +State + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface State

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface State
      +
      A state for a given state machine. Implement this interface to define + actions to happen upon transitions into and out of a given state.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods 
        Modifier and TypeMethod and Description
        voidonEnter(Event event) +
        Called by the framework when a state is entered.
        +
        voidonExit(Event event) +
        Called by the framework when a state is exited.
        +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onEnter

          +
          void onEnter(Event event)
          +
          Called by the framework when a state is entered.
          +
          +
          Parameters:
          +
          event - The event that generated the transition.
          +
          +
        • +
        + + + +
          +
        • +

          onExit

          +
          void onExit(Event event)
          +
          Called by the framework when a state is exited.
          +
          +
          Parameters:
          +
          event - The event that generated the transition.
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/StateMachine.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/StateMachine.html new file mode 100644 index 00000000000..8c656a07c10 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/StateMachine.html @@ -0,0 +1,457 @@ + + + + + +StateMachine + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Class StateMachine

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.StateMachine
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class StateMachine
      +extends java.lang.Object
      +
      Infrastructure for a very simple generic state machine. Part of a collection + of classes including State, Event, and StateTransition. All this class does + is manage a directed graph and execute transitions on events. + + Create instances of a state machine by deriving from this class and defining + states, events, and transitions. See usages of StateMachine for reference + implementations.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          currentState

          +
          protected State currentState
          +
        • +
        + + + +
          +
        • +

          stateGraph

          +
          protected java.util.HashMap<State,java.util.ArrayList<StateTransition>> stateGraph
          +
        • +
        + + + +
          +
        • +

          maskList

          +
          protected java.util.ArrayList<Event> maskList
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          StateMachine

          +
          public StateMachine()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          start

          +
          protected void start(State state)
          +
          start + + Define the start state of the state machine. Should be called + from the start method of the feature's state machine.
          +
          +
          Parameters:
          +
          state - The initial state.
          +
          +
        • +
        + + + +
          +
        • +

          addTransition

          +
          public void addTransition(StateTransition transition)
          +
          addTransition + + Adds a transition to the state machine.
          +
          +
          Parameters:
          +
          transition - the transition to add.
          +
          +
        • +
        + + + +
          +
        • +

          consumeEvent

          +
          public State consumeEvent(Event event)
          +
          consumeEvent + + Executes a state transition and returns the new state. + *
          +
          +
          Parameters:
          +
          event - The event to consume
          +
          Returns:
          +
          The new state, or the current state if the current state does not have a + matching event edge.
          +
          +
        • +
        + + + +
          +
        • +

          maskEvent

          +
          public void maskEvent(Event event)
          +
        • +
        + + + +
          +
        • +

          unMaskEvent

          +
          public void unMaskEvent(Event event)
          +
        • +
        + + + +
          +
        • +

          transition

          +
          protected State transition(Event event)
          +
        • +
        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/StateTransition.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/StateTransition.html new file mode 100644 index 00000000000..c21b0a22dd2 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/StateTransition.html @@ -0,0 +1,338 @@ + + + + + +StateTransition + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Class StateTransition

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.StateTransition
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class StateTransition
      +extends java.lang.Object
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        protected Eventevent 
        protected Statefrom 
        protected Stateto 
        +
      • +
      + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        java.lang.StringtoString() 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          StateTransition

          +
          public StateTransition(State from,
          +                       Event event,
          +                       State to)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/Supplier.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Supplier.html new file mode 100644 index 00000000000..6ca14e10c02 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Supplier.html @@ -0,0 +1,221 @@ + + + + + +Supplier + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface Supplier<T>

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface Supplier<T>
      +
      Represents a supplier of results. + There is no requirement that a new or distinct result be returned each time the supplier is invoked. + This is a functional interface whose functional method is get().
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          get

          +
          T get()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.Item.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.Item.html new file mode 100644 index 00000000000..9971771ee99 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.Item.html @@ -0,0 +1,507 @@ + + + + + +Telemetry.Item + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface Telemetry.Item

    +
    +
    +
    +
      +
    • +
      +
      Enclosing interface:
      +
      Telemetry
      +
      +
      +
      +
      public static interface Telemetry.Item
      +
      Instances of Telemetry.Item represent an item of data on the drive station telemetry display.
      +
      +
      See Also:
      +
      #addData(String, Object)}
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods 
        Modifier and TypeMethod and Description
        <T> Telemetry.ItemaddData(java.lang.String caption, + Func<T> valueProducer) +
        Adds a new data item in the associated Telemetry immediately following the receiver.
        +
        Telemetry.ItemaddData(java.lang.String caption, + java.lang.Object value) +
        Adds a new data item in the associated Telemetry immediately following the receiver.
        +
        <T> Telemetry.ItemaddData(java.lang.String caption, + java.lang.String format, + Func<T> valueProducer) +
        Adds a new data item in the associated Telemetry immediately following the receiver.
        +
        Telemetry.ItemaddData(java.lang.String caption, + java.lang.String format, + java.lang.Object... args) +
        Adds a new data item in the associated Telemetry immediately following the receiver.
        +
        java.lang.StringgetCaption() +
        Returns the caption associated with this item.
        +
        booleanisRetained() +
        Returns whether the item is to be retained in a clear() operation.
        +
        Telemetry.ItemsetCaption(java.lang.String caption) +
        Sets the caption associated with this item.
        +
        Telemetry.ItemsetRetained(java.lang.Boolean retained) +
        Sets whether the item is to be retained in clear() operation or not.
        +
        <T> Telemetry.ItemsetValue(Func<T> valueProducer) +
        Updates the value of this item to be the indicated value producer.
        +
        Telemetry.ItemsetValue(java.lang.Object value) +
        Updates the value of this item to be the result of applying Object.toString() + to the indicated object.
        +
        <T> Telemetry.ItemsetValue(java.lang.String format, + Func<T> valueProducer) +
        Updates the value of this item to be the indicated value producer.
        +
        Telemetry.ItemsetValue(java.lang.String format, + java.lang.Object... args) +
        Updates the value of this item to be the result of the indicated string formatting operation.
        +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getCaption

          +
          java.lang.String getCaption()
          +
          Returns the caption associated with this item.
          +
          +
          Returns:
          +
          the caption associated with this item.
          +
          See Also:
          +
          setCaption(String), +addData(String, Object)
          +
          +
        • +
        + + + +
          +
        • +

          setCaption

          +
          Telemetry.Item setCaption(java.lang.String caption)
          +
          Sets the caption associated with this item.
          +
          +
          Parameters:
          +
          caption - the new caption associated with this item.
          +
          Returns:
          +
          the receiver
          +
          See Also:
          +
          getCaption()
          +
          +
        • +
        + + + +
          +
        • +

          setValue

          +
          Telemetry.Item setValue(java.lang.String format,
          +                        java.lang.Object... args)
          +
          Updates the value of this item to be the result of the indicated string formatting operation.
          +
          +
          Parameters:
          +
          format - the format of the data
          +
          args - the arguments associated with the format
          +
          Returns:
          +
          the receiver
          +
          See Also:
          +
          addData(String, String, Object...)
          +
          +
        • +
        + + + +
          +
        • +

          setValue

          +
          Telemetry.Item setValue(java.lang.Object value)
          +
          Updates the value of this item to be the result of applying Object.toString() + to the indicated object.
          +
          +
          Parameters:
          +
          value - the object to which Object.toString() should be applied
          +
          Returns:
          +
          the receiver
          +
          See Also:
          +
          addData(String, Object)
          +
          +
        • +
        + + + +
          +
        • +

          setValue

          +
          <T> Telemetry.Item setValue(Func<T> valueProducer)
          +
          Updates the value of this item to be the indicated value producer.
          +
          +
          Parameters:
          +
          valueProducer - an object that produces values to be rendered.
          +
          Returns:
          +
          the receiver
          +
          See Also:
          +
          addData(String, Func)
          +
          +
        • +
        + + + +
          +
        • +

          setValue

          +
          <T> Telemetry.Item setValue(java.lang.String format,
          +                            Func<T> valueProducer)
          +
          Updates the value of this item to be the indicated value producer.
          +
          +
          Parameters:
          +
          format - this string used to format values produced
          +
          valueProducer - an object that produces values to be rendered.
          +
          Returns:
          +
          the receiver
          +
          See Also:
          +
          addData(String, String, Func)
          +
          +
        • +
        + + + +
          +
        • +

          setRetained

          +
          Telemetry.Item setRetained(java.lang.Boolean retained)
          +
          Sets whether the item is to be retained in clear() operation or not. + This is initially true for items that whose value is computed with a + value producer; otherwise, it is initially false.
          +
          +
          Parameters:
          +
          retained - if true, then the value will be retained during a clear(). Null will + return the setting to its initial value.
          +
          Returns:
          +
          the receiver
          +
          See Also:
          +
          Telemetry.clear(), +isRetained()
          +
          +
        • +
        + + + +
          +
        • +

          isRetained

          +
          boolean isRetained()
          +
          Returns whether the item is to be retained in a clear() operation.
          +
          +
          Returns:
          +
          whether the item is to be retained in a clear() operation.
          +
          See Also:
          +
          setRetained(Boolean)
          +
          +
        • +
        + + + + + + + + + + + + + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.Line.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.Line.html new file mode 100644 index 00000000000..feb9d4ef3e1 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.Line.html @@ -0,0 +1,302 @@ + + + + + +Telemetry.Line + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface Telemetry.Line

    +
    +
    +
    +
      +
    • +
      +
      Enclosing interface:
      +
      Telemetry
      +
      +
      +
      +
      public static interface Telemetry.Line
      +
      Instances of Telemetry.Line build lines of data on the driver station telemetry display.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods 
        Modifier and TypeMethod and Description
        <T> Telemetry.ItemaddData(java.lang.String caption, + Func<T> valueProducer) +
        Adds a new data item at the end of the line which is the receiver.
        +
        Telemetry.ItemaddData(java.lang.String caption, + java.lang.Object value) +
        Adds a new data item at the end of the line which is the receiver.
        +
        <T> Telemetry.ItemaddData(java.lang.String caption, + java.lang.String format, + Func<T> valueProducer) +
        Adds a new data item at the end of the line which is the receiver.
        +
        Telemetry.ItemaddData(java.lang.String caption, + java.lang.String format, + java.lang.Object... args) +
        Adds a new data item at the end of the line which is the receiver.
        +
        +
      • +
      +
    • +
    +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.Log.DisplayOrder.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.Log.DisplayOrder.html new file mode 100644 index 00000000000..78de7187b4f --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.Log.DisplayOrder.html @@ -0,0 +1,343 @@ + + + + + +Telemetry.Log.DisplayOrder + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Enum Telemetry.Log.DisplayOrder

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static Telemetry.Log.DisplayOrdervalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static Telemetry.Log.DisplayOrder[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static Telemetry.Log.DisplayOrder[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (Telemetry.Log.DisplayOrder c : Telemetry.Log.DisplayOrder.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static Telemetry.Log.DisplayOrder valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.Log.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.Log.html new file mode 100644 index 00000000000..bd32381019f --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.Log.html @@ -0,0 +1,378 @@ + + + + + +Telemetry.Log + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface Telemetry.Log

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getCapacity

          +
          int getCapacity()
          +
          Returns the maximum number of lines which will be retained in a Telemetry.log()() and + shown on the driver station display.
          +
          +
          Returns:
          +
          the maximum number of lines which will be retained in a Telemetry.log()()
          +
          See Also:
          +
          setCapacity(int)
          +
          +
        • +
        + + + +
          +
        • +

          setCapacity

          +
          void setCapacity(int capacity)
          +
          +
          See Also:
          +
          getCapacity()
          +
          +
        • +
        + + + +
          +
        • +

          getDisplayOrder

          +
          Telemetry.Log.DisplayOrder getDisplayOrder()
          +
          Returns the order in which data in log is to be displayed on the driver station.
          +
          +
          Returns:
          +
          the order in which data in log is to be displayed on the driver station.
          +
          See Also:
          +
          setDisplayOrder(DisplayOrder)
          +
          +
        • +
        + + + + + + + +
          +
        • +

          add

          +
          void add(java.lang.String entry)
          +
          Adds a new entry the the log. Transmits the updated log to the driver station at the + earliest opportunity.
          +
          +
          Parameters:
          +
          entry - the new log entry to add
          +
          +
        • +
        + + + +
          +
        • +

          add

          +
          void add(java.lang.String format,
          +         java.lang.Object... args)
          +
          Adds a new entry to the log. Transmits the updated log to the driver station at the + earliest opportunity.
          +
          +
          Parameters:
          +
          format - the format string used to format the log entry
          +
          args - the data used to format the log entry
          +
          +
        • +
        + + + +
          +
        • +

          clear

          +
          void clear()
          +
          Removes all entries from this Telemetry.Log
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.html new file mode 100644 index 00000000000..91688ce5b22 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/Telemetry.html @@ -0,0 +1,892 @@ + + + + + +Telemetry + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface Telemetry

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface Telemetry
      +
      Instances of Telemetry provide a means by which data can be transmitted from the + robot controller to the driver station and displayed on the driver station screen. + +

      Simple use of Telemetry consists of a series of addData() calls, followed by a call to update(). For example:

      + +
      +     // LinearOpMode
      +     telemetry.addData("count", currentCount);
      +     telemetry.addData("elapsedTime", "%.3f", elapsedSeconds);
      +     telemetry.update();
      + 
      + +

      In the 2015/16 season, the call to update() was not required; now, however, + in a LinearOpMode, unless update() is called, nothing will appear on the + driver station screen. In other, loop-based opmodes, update() continues to be called + automatically at the end of OpMode.loop() and OpMode.init_loop(); no call to + update() is required in loop-based opmodes.

      + +
      +     // loop-based opmode
      +     telemetry.addData("count", currentCount);
      +     telemetry.addData("elapsedTime", "%.3f", elapsedSeconds);
      + 
      + +

      By default (but see setAutoClear()), data is cleared from the + telemetry after each call to update(); thus, you need to issue addData() for the entire contents of the telemetry screen on each update cycle. + This behavior is just as it was in the 2015/16 season.

      + +

      A more complicated use of Telemetry might have different parts of the program update + different items on the display in a decoupled, decentralized manner. Such situations might + usefully avail themselves of turning off the auto-clear setting. For example:

      + +
      +     telemetry.setAutoClear(false);
      +     Telemetry.Item countItem = telemetry.addData("count", 0);
      +     Telemetry.Item elapsedItem = telemetry.addData("elapsedTime", 0);
      +
      +     void onePartOfYourCode() {
      +         ...
      +         countItem.setValue(0);
      +         telemetry.update();
      +         ...
      +     }
      +
      +     void anotherPartOfYourCode() {
      +         ...
      +         elapsedItem.setValue("%.3f", elapsedSeconds);
      +         telemetry.update();
      +         ...
      +     }
      + 
      + +

      In this way different parts of the code can update only a portion of the telemetry screen + without disturbing other parts.

      + +

      Below the list of caption, value, pairs, on the screen a Telemetry also displays + a short, unstructured log of messages. Use log().add() + to add to the log. See also log().

      + +

      Actual transmission to the driver station is throttled to avoid use of excessive bandwidth. + By default, transmission will occur at most every 250ms. This interval can be controlled with + setMsTransmissionInterval(). Any update()s which + occur more frequently will not be transmitted if superseded by a subsequent update() + before the transmission interval expires.

      + +

      As mentioned above, by default, after each call to update(), the method clear() + is automatically called. Thus, in simple usage, after each update(), you'll want to issue + addData() calls to rebuild the entire driver station telemetry + screen that you wish to observe. This simple usage can be modified in two ways.

      + +

      First, the automatic issuance of calls to clear() can be altered by means of + setAutoClear(boolean). If auto clearing is set to false, previously added telemetry + items remain present from update() to update(), but their value can still be altered + using Item.setValue(), items can be removed using removeItem(Item), + and new items can be added using addData() and Item.addData().

      + +

      Second, telemetry items created in a functional form using addData(String, Func) or + Telemetry.Item.addData(String, Func) are not automatically removed when clear() + is called, either implicitly or explicitly (though they are removed when clearAll() is + called). The intent of such items is allow a one-time specification of telemetry items by + providing a function that can produce a value to be displayed rather than providing the + actual value itself. Such functions are evaluated only when it is known that telemetry is going to + be transmitted to the driver station (and so a value is required). This approach can be particularly + useful if the acquisition of the data to be displayed is relatively expensive or time consuming, as + that cost is only expended when actually useful. + + In addition to one-item-per-line display on the driver station, multiple items per line can + be displayed by starting with a call to addLine() and then following up with one or more + addData(String, Object) calls. For example: + +

      +     telemetry.addLine()
      +          .addData("count", currentCount)
      +          .addData("elapsedTime", "%.3f", seconds);
      +     telemetry.addLine()
      +          .addData("voltage", "%.1f", getCurrentVoltage())
      +          .addData("orientation", "%s", getOrientation());
      +     telemetry.update();
      + 
      + +

      Items on the same line are separated by the item separator. Caption + and value within an item are separated by the caption value separator.

      + +

      Note: in the 2015/16 season, it was possible for Telemetry instances to be automatically + sorted in alphabetical order by caption. This functionality is no longer supported.

      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods 
        Modifier and TypeMethod and Description
        java.lang.ObjectaddAction(java.lang.Runnable action) +
        In addition to items and lines, a telemetry may also contain a list of actions.
        +
        <T> Telemetry.ItemaddData(java.lang.String caption, + Func<T> valueProducer) +
        Adds an item to the end of the telemetry being built for driver station display.
        +
        Telemetry.ItemaddData(java.lang.String caption, + java.lang.Object value) +
        Adds an item to the end if the telemetry being built for driver station display.
        +
        <T> Telemetry.ItemaddData(java.lang.String caption, + java.lang.String format, + Func<T> valueProducer) +
        Adds an item to the end of the telemetry being built for driver station display.
        +
        Telemetry.ItemaddData(java.lang.String caption, + java.lang.String format, + java.lang.Object... args) +
        Adds an item to the end of the telemetry being built for driver station display.
        +
        Telemetry.LineaddLine() +
        Creates and returns a new line in the receiver Telemetry.
        +
        Telemetry.LineaddLine(java.lang.String lineCaption) +
        Creates and returns a new line in the receiver Telemetry.
        +
        voidclear() +
        Removes all items from the receiver whose value is not to be retained.
        +
        voidclearAll() +
        Removes all items, lines, and actions from the receiver
        +
        java.lang.StringgetCaptionValueSeparator() +
        Returns the string which is used to separate caption from value within a Telemetry + Telemetry.Item.
        +
        java.lang.StringgetItemSeparator() +
        Returns the string which is used to separate Telemetry.Items contained within a line.
        +
        intgetMsTransmissionInterval() +
        Returns the minimum interval between Telemetry transmissions from the robot controller + to the driver station
        +
        booleanisAutoClear() +
        Answers whether clear() is automatically called after each call to update().
        +
        Telemetry.Loglog() +
        Returns the log of this Telemetry to which log entries may be appended.
        +
        booleanremoveAction(java.lang.Object token) +
        Removes a previously added action from the receiver.
        +
        booleanremoveItem(Telemetry.Item item) +
        Removes an item from the receiver telemetry, if present.
        +
        booleanremoveLine(Telemetry.Line line) +
        Removes a line from the receiver telemetry, if present.
        +
        voidsetAutoClear(boolean autoClear) +
        Sets whether clear() is automatically called after each call to update().
        +
        voidsetCaptionValueSeparator(java.lang.String captionValueSeparator) 
        voidsetItemSeparator(java.lang.String itemSeparator) 
        voidsetMsTransmissionInterval(int msTransmissionInterval) +
        Sets the minimum interval between Telemetry transmissions from the robot controller + to the driver station.
        +
        booleanupdate() +
        Sends the receiver Telemetry to the driver station if more than the transmission interval has elapsed since the last transmission, or schedules the transmission + of the receiver should no subsequent Telemetry state be scheduled for transmission before + the transmission interval expires.
        +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          addData

          +
          Telemetry.Item addData(java.lang.String caption,
          +                       java.lang.String format,
          +                       java.lang.Object... args)
          +
          Adds an item to the end of the telemetry being built for driver station display. The value shown + will be the result of calling String.format() + with the indicated format and arguments. The caption and value are shown on the driver station + separated by the caption value separator. The item + is removed if clear() or clearAll() is called.
          +
          +
          Parameters:
          +
          caption - the caption to use
          +
          format - the string by which the arguments are to be formatted
          +
          args - the arguments to format
          +
          Returns:
          +
          an Telemetry.Item that can be used to update the value or append further Telemetry.Items
          +
          See Also:
          +
          addData(String, Object), +addData(String, Func)
          +
          +
        • +
        + + + + + + + +
          +
        • +

          addData

          +
          <T> Telemetry.Item addData(java.lang.String caption,
          +                           Func<T> valueProducer)
          +
          Adds an item to the end of the telemetry being built for driver station display. The value shown + will be the result of calling toString() on the object which is + returned from invoking valueProducer.Func.value() value()}. The caption and value are + shown on the driver station separated by the caption value + separator. The item is removed if clearAll() is called, but not if + clear() is called. + +

          The valueProducer is evaluated only if actual transmission to the driver station + is to occur. This is important, as it provides a means of displaying telemetry which + is relatively expensive to evaluate while avoiding computation or delay on evaluations + which won't be transmitted due to transmission interval throttling.

          +
          +
          Parameters:
          +
          caption - the caption to use
          +
          valueProducer - the object which will provide the value to display
          +
          Returns:
          +
          an Telemetry.Item that can be used to update the value or append further Telemetry.Items
          +
          See Also:
          +
          addData(String, String, Object...), +addData(String, Object), +addData(String, String, Func), +getMsTransmissionInterval()
          +
          +
        • +
        + + + +
          +
        • +

          addData

          +
          <T> Telemetry.Item addData(java.lang.String caption,
          +                           java.lang.String format,
          +                           Func<T> valueProducer)
          +
          Adds an item to the end of the telemetry being built for driver station display. The value shown + will be the result of calling String.format(java.lang.String, java.lang.Object...) on the object which is returned from invoking + valueProducer.Func.value() value()}. The caption and value are shown on the driver station + separated by the caption value separator. The item is removed + if clearAll() is called, but not if clear() is called. + +

          The valueProducer is evaluated only if actual transmission to the driver station + is to occur. This is important, as it provides a means of displaying telemetry which + is relatively expensive to evaluate while avoiding computation or delay on evaluations + which won't be transmitted due to transmission interval throttling.

          +
          +
          Parameters:
          +
          caption - the caption to use
          +
          valueProducer - the object which will provide the value to display
          +
          Returns:
          +
          an Telemetry.Item that can be used to update the value or append further Telemetry.Items
          +
          See Also:
          +
          addData(String, String, Object...), +addData(String, Object), +addData(String, Func), +getMsTransmissionInterval()
          +
          +
        • +
        + + + +
          +
        • +

          removeItem

          +
          boolean removeItem(Telemetry.Item item)
          +
          Removes an item from the receiver telemetry, if present.
          +
          +
          Parameters:
          +
          item - the item to remove
          +
          Returns:
          +
          true if any change was made to the receive (ie: the item was present); false otherwise
          +
          +
        • +
        + + + + + + + +
          +
        • +

          clearAll

          +
          void clearAll()
          +
          Removes all items, lines, and actions from the receiver
          +
          +
          See Also:
          +
          clear()
          +
          +
        • +
        + + + +
          +
        • +

          addAction

          +
          java.lang.Object addAction(java.lang.Runnable action)
          +
          In addition to items and lines, a telemetry may also contain a list of actions. + When the telemetry is to be updated, these actions are evaluated before the telemetry + lines are composed just prior to transmission. A typical use of such actions is to + initialize some state variable, parts of which are subsequently displayed in items. + This can help avoid needless re-evaluation. + +

          Actions are cleared with clearAll(), and can be removed with removeAction().

          +
          +
          Parameters:
          +
          action - the action to execute before composing the lines telemetry
          +
          Returns:
          +
          a token by which the action can be later removed.
          +
          See Also:
          +
          addData(String, Object), +removeAction(Object), +addLine(), +update()
          +
          +
        • +
        + + + +
          +
        • +

          removeAction

          +
          boolean removeAction(java.lang.Object token)
          +
          Removes a previously added action from the receiver.
          +
          +
          Parameters:
          +
          token - the token previously returned from addAction().
          +
          Returns:
          +
          whether any change was made to the receiver
          +
          +
        • +
        + + + +
          +
        • +

          update

          +
          boolean update()
          +
          Sends the receiver Telemetry to the driver station if more than the transmission interval has elapsed since the last transmission, or schedules the transmission + of the receiver should no subsequent Telemetry state be scheduled for transmission before + the transmission interval expires.
          +
          +
          Returns:
          +
          whether a transmission to the driver station occurred or not
          +
          +
        • +
        + + + + + + + +
          +
        • +

          addLine

          +
          Telemetry.Line addLine(java.lang.String lineCaption)
          +
          Creates and returns a new line in the receiver Telemetry.
          +
          +
          Parameters:
          +
          lineCaption - the caption for the line
          +
          Returns:
          +
          a new line in the receiver Telemetry
          +
          +
        • +
        + + + +
          +
        • +

          removeLine

          +
          boolean removeLine(Telemetry.Line line)
          +
          Removes a line from the receiver telemetry, if present.
          +
          +
          Parameters:
          +
          line - the line to be removed
          +
          Returns:
          +
          whether any change was made to the receiver
          +
          +
        • +
        + + + + + + + +
          +
        • +

          setAutoClear

          +
          void setAutoClear(boolean autoClear)
          +
          Sets whether clear() is automatically called after each call to update().
          +
          +
          Parameters:
          +
          autoClear - if true, clear() is automatically called after each call to update().
          +
          +
        • +
        + + + +
          +
        • +

          getMsTransmissionInterval

          +
          int getMsTransmissionInterval()
          +
          Returns the minimum interval between Telemetry transmissions from the robot controller + to the driver station
          +
          +
          Returns:
          +
          the minimum interval between Telemetry transmissions from the robot controller to the diver station
          +
          See Also:
          +
          setMsTransmissionInterval(int)
          +
          +
        • +
        + + + +
          +
        • +

          setMsTransmissionInterval

          +
          void setMsTransmissionInterval(int msTransmissionInterval)
          +
          Sets the minimum interval between Telemetry transmissions from the robot controller + to the driver station.
          +
          +
          Parameters:
          +
          msTransmissionInterval - the minimum interval between Telemetry transmissions + from the robot controller to the driver station
          +
          See Also:
          +
          getMsTransmissionInterval()
          +
          +
        • +
        + + + +
          +
        • +

          getItemSeparator

          +
          java.lang.String getItemSeparator()
          +
          Returns the string which is used to separate Telemetry.Items contained within a line. The default + separator is " | ".
          +
          +
          Returns:
          +
          the string which is use to separate Telemetry.Items contained within a line.
          +
          See Also:
          +
          setItemSeparator(String), +addLine()
          +
          +
        • +
        + + + +
          +
        • +

          setItemSeparator

          +
          void setItemSeparator(java.lang.String itemSeparator)
          +
          +
          See Also:
          +
          setItemSeparator(String)
          +
          +
        • +
        + + + +
          +
        • +

          getCaptionValueSeparator

          +
          java.lang.String getCaptionValueSeparator()
          +
          Returns the string which is used to separate caption from value within a Telemetry + Telemetry.Item. The default separator is " : ";
          +
          +
          Returns:
          +
          the string which is used to separate caption from value within a Telemetry Telemetry.Item.
          +
          +
        • +
        + + + +
          +
        • +

          setCaptionValueSeparator

          +
          void setCaptionValueSeparator(java.lang.String captionValueSeparator)
          +
          +
          See Also:
          +
          getCaptionValueSeparator()
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/ThrowingCallable.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/ThrowingCallable.html new file mode 100644 index 00000000000..e2b9b59c285 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/ThrowingCallable.html @@ -0,0 +1,229 @@ + + + + + +ThrowingCallable + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external
    +

    Interface ThrowingCallable<VALUE,EXCEPTION extends java.lang.Throwable>

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface ThrowingCallable<VALUE,EXCEPTION extends java.lang.Throwable>
      +
      An interface for workers that has a specialized exception set
      +
      +
      See Also:
      +
      Runnable, +Callable
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          call

          +
          VALUE call()
          +    throws EXCEPTION extends java.lang.Throwable
          +
          +
          Throws:
          +
          EXCEPTION extends java.lang.Throwable
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidAccelerometer.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidAccelerometer.html new file mode 100644 index 00000000000..c30335d391f --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidAccelerometer.html @@ -0,0 +1,441 @@ + + + + + +AndroidAccelerometer + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.android
    +

    Class AndroidAccelerometer

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.hardware.SensorEventListener
      +
      +
      +
      +
      public class AndroidAccelerometer
      +extends java.lang.Object
      +implements android.hardware.SensorEventListener
      +
      A class that provides access to the Android Accelerometer.
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        AccelerationgetAcceleration() +
        Returns an Acceleration object representing acceleration in X, Y and Z axes.
        +
        DistanceUnitgetDistanceUnit() +
        Returns the DistanceUnit being used.
        +
        doublegetX() +
        Returns the acceleration in the x-axis.
        +
        doublegetY() +
        Returns the acceleration in the y-axis.
        +
        doublegetZ() +
        Returns the acceleration in the z-axis.
        +
        booleanisAvailable() +
        Returns true if the Android device has a accelerometer.
        +
        voidonAccuracyChanged(android.hardware.Sensor sensor, + int accuracy) 
        voidonSensorChanged(android.hardware.SensorEvent sensorEvent) 
        voidsetDistanceUnit(DistanceUnit distanceUnit) +
        Sets the DistanceUnit to be used.
        +
        voidstartListening() +
        Start listening to events from the Android accelerometer.
        +
        voidstopListening() +
        Stop listening to events from the Android accelerometer.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          AndroidAccelerometer

          +
          public AndroidAccelerometer()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onAccuracyChanged

          +
          public void onAccuracyChanged(android.hardware.Sensor sensor,
          +                              int accuracy)
          +
          +
          Specified by:
          +
          onAccuracyChanged in interface android.hardware.SensorEventListener
          +
          +
        • +
        + + + +
          +
        • +

          onSensorChanged

          +
          public void onSensorChanged(android.hardware.SensorEvent sensorEvent)
          +
          +
          Specified by:
          +
          onSensorChanged in interface android.hardware.SensorEventListener
          +
          +
        • +
        + + + +
          +
        • +

          setDistanceUnit

          +
          public void setDistanceUnit(DistanceUnit distanceUnit)
          +
          Sets the DistanceUnit to be used.
          +
        • +
        + + + +
          +
        • +

          getDistanceUnit

          +
          public DistanceUnit getDistanceUnit()
          +
          Returns the DistanceUnit being used.
          +
        • +
        + + + +
          +
        • +

          getX

          +
          public double getX()
          +
          Returns the acceleration in the x-axis.
          +
        • +
        + + + +
          +
        • +

          getY

          +
          public double getY()
          +
          Returns the acceleration in the y-axis.
          +
        • +
        + + + +
          +
        • +

          getZ

          +
          public double getZ()
          +
          Returns the acceleration in the z-axis.
          +
        • +
        + + + +
          +
        • +

          getAcceleration

          +
          public Acceleration getAcceleration()
          +
          Returns an Acceleration object representing acceleration in X, Y and Z axes.
          +
        • +
        + + + +
          +
        • +

          isAvailable

          +
          public boolean isAvailable()
          +
          Returns true if the Android device has a accelerometer.
          +
        • +
        + + + +
          +
        • +

          startListening

          +
          public void startListening()
          +
          Start listening to events from the Android accelerometer.
          +
        • +
        + + + +
          +
        • +

          stopListening

          +
          public void stopListening()
          +
          Stop listening to events from the Android accelerometer.
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidGyroscope.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidGyroscope.html new file mode 100644 index 00000000000..87a577726f3 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidGyroscope.html @@ -0,0 +1,443 @@ + + + + + +AndroidGyroscope + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.android
    +

    Class AndroidGyroscope

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.hardware.SensorEventListener
      +
      +
      +
      +
      public class AndroidGyroscope
      +extends java.lang.Object
      +implements android.hardware.SensorEventListener
      +
      A class that provides access to the Android Gyroscope.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        AndroidGyroscope() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        AngleUnitgetAngleUnit() +
        Returns the AngleUnit being used.
        +
        AngularVelocitygetAngularVelocity() +
        Returns an AngularVelocity object representing the rate of rotation around the device's local + X, Y and Z axis.
        +
        floatgetX() +
        Returns the angular speed around the x-axis.
        +
        floatgetY() +
        Returns the angular speed around the y-axis.
        +
        floatgetZ() +
        Returns the angular speed around the z-axis.
        +
        booleanisAvailable() +
        Returns true if the Android device has a gyroscope.
        +
        voidonAccuracyChanged(android.hardware.Sensor sensor, + int accuracy) 
        voidonSensorChanged(android.hardware.SensorEvent sensorEvent) 
        voidsetAngleUnit(AngleUnit angleUnit) +
        Sets the AngleUnit to be used.
        +
        voidstartListening() +
        Start listening to events from the Android gyroscope.
        +
        voidstopListening() +
        Stop listening to events from the Android gyroscope.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          AndroidGyroscope

          +
          public AndroidGyroscope()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onAccuracyChanged

          +
          public void onAccuracyChanged(android.hardware.Sensor sensor,
          +                              int accuracy)
          +
          +
          Specified by:
          +
          onAccuracyChanged in interface android.hardware.SensorEventListener
          +
          +
        • +
        + + + +
          +
        • +

          onSensorChanged

          +
          public void onSensorChanged(android.hardware.SensorEvent sensorEvent)
          +
          +
          Specified by:
          +
          onSensorChanged in interface android.hardware.SensorEventListener
          +
          +
        • +
        + + + +
          +
        • +

          setAngleUnit

          +
          public void setAngleUnit(AngleUnit angleUnit)
          +
          Sets the AngleUnit to be used.
          +
        • +
        + + + +
          +
        • +

          getAngleUnit

          +
          public AngleUnit getAngleUnit()
          +
          Returns the AngleUnit being used.
          +
        • +
        + + + +
          +
        • +

          getX

          +
          public float getX()
          +
          Returns the angular speed around the x-axis.
          +
        • +
        + + + +
          +
        • +

          getY

          +
          public float getY()
          +
          Returns the angular speed around the y-axis.
          +
        • +
        + + + +
          +
        • +

          getZ

          +
          public float getZ()
          +
          Returns the angular speed around the z-axis.
          +
        • +
        + + + +
          +
        • +

          getAngularVelocity

          +
          public AngularVelocity getAngularVelocity()
          +
          Returns an AngularVelocity object representing the rate of rotation around the device's local + X, Y and Z axis.
          +
        • +
        + + + +
          +
        • +

          isAvailable

          +
          public boolean isAvailable()
          +
          Returns true if the Android device has a gyroscope.
          +
        • +
        + + + +
          +
        • +

          startListening

          +
          public void startListening()
          +
          Start listening to events from the Android gyroscope.
          +
        • +
        + + + +
          +
        • +

          stopListening

          +
          public void stopListening()
          +
          Stop listening to events from the Android gyroscope.
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidOrientation.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidOrientation.html new file mode 100644 index 00000000000..bf9970179c5 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidOrientation.html @@ -0,0 +1,459 @@ + + + + + +AndroidOrientation + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.android
    +

    Class AndroidOrientation

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.android.AndroidOrientation
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.hardware.SensorEventListener
      +
      +
      +
      +
      public class AndroidOrientation
      +extends java.lang.Object
      +implements android.hardware.SensorEventListener
      +
      A class that provides access to the Android sensors for Orientation.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        AndroidOrientation() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        doublegetAngle() +
        Returns the angle in which the orientation sensor is tilted, treating Roll as the x-coordinate + and Pitch as the y-coordinate.
        +
        AngleUnitgetAngleUnit() +
        Returns the AngleUnit being used.
        +
        doublegetAzimuth() +
        Returns the azimuth.
        +
        doublegetMagnitude() +
        Returns a number between 0 and 1, indicating how much the device is tilted.
        +
        doublegetPitch() +
        Returns the pitch.
        +
        doublegetRoll() +
        Returns the roll.
        +
        booleanisAvailable() +
        Returns true if the Android device has the sensors required for orientation.
        +
        voidonAccuracyChanged(android.hardware.Sensor sensor, + int accuracy) 
        voidonSensorChanged(android.hardware.SensorEvent sensorEvent) 
        voidsetAngleUnit(AngleUnit angleUnit) +
        Sets the AngleUnit to be used.
        +
        voidstartListening() +
        Start listening to events from the Android sensors.
        +
        voidstopListening() +
        Stop listening to events from the Android sensors.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          AndroidOrientation

          +
          public AndroidOrientation()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onAccuracyChanged

          +
          public void onAccuracyChanged(android.hardware.Sensor sensor,
          +                              int accuracy)
          +
          +
          Specified by:
          +
          onAccuracyChanged in interface android.hardware.SensorEventListener
          +
          +
        • +
        + + + +
          +
        • +

          onSensorChanged

          +
          public void onSensorChanged(android.hardware.SensorEvent sensorEvent)
          +
          +
          Specified by:
          +
          onSensorChanged in interface android.hardware.SensorEventListener
          +
          +
        • +
        + + + +
          +
        • +

          setAngleUnit

          +
          public void setAngleUnit(AngleUnit angleUnit)
          +
          Sets the AngleUnit to be used.
          +
        • +
        + + + +
          +
        • +

          getAngleUnit

          +
          public AngleUnit getAngleUnit()
          +
          Returns the AngleUnit being used.
          +
        • +
        + + + +
          +
        • +

          getAzimuth

          +
          public double getAzimuth()
          +
          Returns the azimuth.
          +
        • +
        + + + +
          +
        • +

          getPitch

          +
          public double getPitch()
          +
          Returns the pitch.
          +
        • +
        + + + +
          +
        • +

          getRoll

          +
          public double getRoll()
          +
          Returns the roll.
          +
        • +
        + + + +
          +
        • +

          getAngle

          +
          public double getAngle()
          +
          Returns the angle in which the orientation sensor is tilted, treating Roll as the x-coordinate + and Pitch as the y-coordinate.
          +
        • +
        + + + +
          +
        • +

          getMagnitude

          +
          public double getMagnitude()
          +
          Returns a number between 0 and 1, indicating how much the device is tilted.
          +
        • +
        + + + +
          +
        • +

          isAvailable

          +
          public boolean isAvailable()
          +
          Returns true if the Android device has the sensors required for orientation.
          +
        • +
        + + + +
          +
        • +

          startListening

          +
          public void startListening()
          +
          Start listening to events from the Android sensors.
          +
        • +
        + + + +
          +
        • +

          stopListening

          +
          public void stopListening()
          +
          Stop listening to events from the Android sensors.
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidSoundPool.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidSoundPool.html new file mode 100644 index 00000000000..a996f11a252 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidSoundPool.html @@ -0,0 +1,443 @@ + + + + + +AndroidSoundPool + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.android
    +

    Class AndroidSoundPool

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class AndroidSoundPool
      +extends java.lang.Object
      +
      A class that provides access to the Android SoundPool.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        AndroidSoundPool() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        voidclose() +
        Unloads all the sounds and releases the SoundPool.
        +
        intgetLoop() +
        Returns the number of repeats.
        +
        floatgetRate() +
        Returns the playback rate.
        +
        floatgetVolume() +
        Returns the current volume.
        +
        voidinitialize(SoundPoolIntf soundPool) +
        Initializes the SoundPool.
        +
        booleanplay(java.lang.String soundName) +
        Plays the sound with the given name.
        +
        booleanpreloadSound(java.lang.String soundName) +
        Preloads the sound with the given name.
        +
        voidsetLoop(int loop) +
        Sets the number of repeats.
        +
        voidsetRate(float rate) +
        Sets the playback rate.
        +
        voidsetVolume(float volume) +
        Sets the volume.
        +
        voidstop() +
        Stops the playback.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          AndroidSoundPool

          +
          public AndroidSoundPool()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          initialize

          +
          public void initialize(SoundPoolIntf soundPool)
          +
          Initializes the SoundPool.
          +
        • +
        + + + +
          +
        • +

          preloadSound

          +
          public boolean preloadSound(java.lang.String soundName)
          +
          Preloads the sound with the given name.
          +
          +
          Returns:
          +
          true if sound is successfully preloaded, false otherwise
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          play

          +
          public boolean play(java.lang.String soundName)
          +
          Plays the sound with the given name.
          +
          +
          Returns:
          +
          true if sound is successfully loaded, false otherwise + throws IllegalStateException if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          stop

          +
          public void stop()
          +
          Stops the playback.
          +
        • +
        + + + +
          +
        • +

          getVolume

          +
          public float getVolume()
          +
          Returns the current volume.
          +
        • +
        + + + +
          +
        • +

          setVolume

          +
          public void setVolume(float volume)
          +
          Sets the volume. Volume range is 0.0 to 1.0.
          +
        • +
        + + + +
          +
        • +

          getRate

          +
          public float getRate()
          +
          Returns the playback rate.
          +
        • +
        + + + +
          +
        • +

          setRate

          +
          public void setRate(float rate)
          +
          Sets the playback rate. Rate range is 0.5 to 2.0. Normal rate is 1.0.
          +
        • +
        + + + +
          +
        • +

          getLoop

          +
          public int getLoop()
          +
          Returns the number of repeats.
          +
        • +
        + + + +
          +
        • +

          setLoop

          +
          public void setLoop(int loop)
          +
          Sets the number of repeats. Loop 0 means no repeats. Loop -1 means repeat indefinitely.
          +
        • +
        + + + +
          +
        • +

          close

          +
          public void close()
          +
          Unloads all the sounds and releases the SoundPool.
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidTextToSpeech.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidTextToSpeech.html new file mode 100644 index 00000000000..0468b261944 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/AndroidTextToSpeech.html @@ -0,0 +1,517 @@ + + + + + +AndroidTextToSpeech + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.android
    +

    Class AndroidTextToSpeech

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class AndroidTextToSpeech
      +extends java.lang.Object
      +
      A class that provides access to the Android TextToSpeech.
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        voidclose() +
        Shuts down the TextToSpeech engine.
        +
        java.lang.StringgetCountryCode() +
        Returns the current country code.
        +
        java.lang.StringgetLanguageCode() +
        Returns the current language code.
        +
        java.lang.StringgetStatus() +
        Returns the TextToSpeech initialization status.
        +
        voidinitialize() +
        Initialize the TextToSpeech engine.
        +
        booleanisLanguageAndCountryAvailable(java.lang.String languageCode, + java.lang.String countryCode) +
        Returns true if the given language is supported.
        +
        booleanisLanguageAvailable(java.lang.String languageCode) +
        Returns true if the given language is supported.
        +
        booleanisSpeaking() +
        Returns true if the TextToSpeech engine is busy speaking.
        +
        voidsetLanguage(java.lang.String languageCode) +
        Sets the language.
        +
        voidsetLanguageAndCountry(java.lang.String languageCode, + java.lang.String countryCode) +
        Sets the language and country.
        +
        voidsetPitch(float pitch) +
        Sets the speech pitch.
        +
        voidsetSpeechRate(float speechRate) +
        Sets the speech rate.
        +
        voidspeak(java.lang.String text) +
        Speaks the given text.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          AndroidTextToSpeech

          +
          public AndroidTextToSpeech()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          initialize

          +
          public void initialize()
          +
          Initialize the TextToSpeech engine.
          +
        • +
        + + + +
          +
        • +

          getStatus

          +
          public java.lang.String getStatus()
          +
          Returns the TextToSpeech initialization status.
          +
        • +
        + + + +
          +
        • +

          getLanguageCode

          +
          public java.lang.String getLanguageCode()
          +
          Returns the current language code.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          getCountryCode

          +
          public java.lang.String getCountryCode()
          +
          Returns the current country code.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          isSpeaking

          +
          public boolean isSpeaking()
          +
          Returns true if the TextToSpeech engine is busy speaking.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          setPitch

          +
          public void setPitch(float pitch)
          +
          Sets the speech pitch. 1.0 is the normal pitch. Lower values will lower the tone of the + synthesized voice. Greater values will increase the tone of the synthesized voice.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          setSpeechRate

          +
          public void setSpeechRate(float speechRate)
          +
          Sets the speech rate. 1.0 is the normal speech rate. Lower values will slow down the speech + (0.5 is half the normal speech rate). Greater values will accelerate the speech (2.0 is twice + the normal speech rate).
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          isLanguageAvailable

          +
          public boolean isLanguageAvailable(java.lang.String languageCode)
          +
          Returns true if the given language is supported. The languageCode must be an ISO 639 alpha-2 + or alpha-3 language code, or a language subtag up to 8 characters in length.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          isLanguageAndCountryAvailable

          +
          public boolean isLanguageAndCountryAvailable(java.lang.String languageCode,
          +                                             java.lang.String countryCode)
          +
          Returns true if the given language is supported. The languageCode must be an ISO 639 alpha-2 + or alpha-3 language code, or a language subtag up to 8 characters in length. The countryCode + must be an ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          setLanguage

          +
          public void setLanguage(java.lang.String languageCode)
          +
          Sets the language. The languageCode must be an ISO 639 alpha-2 or alpha-3 language code, or a + language subtag up to 8 characters in length.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          setLanguageAndCountry

          +
          public void setLanguageAndCountry(java.lang.String languageCode,
          +                                  java.lang.String countryCode)
          +
          Sets the language and country. The languageCode must be an ISO 639 alpha-2 or alpha-3 language + code, or a language subtag up to 8 characters in length. The countryCode must be an ISO 3166 + alpha-2 country code or a UN M.49 numeric-3 area code.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          speak

          +
          public void speak(java.lang.String text)
          +
          Speaks the given text.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          close

          +
          public void close()
          +
          Shuts down the TextToSpeech engine.
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/package-frame.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/package-frame.html new file mode 100644 index 00000000000..e65f1041659 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/package-frame.html @@ -0,0 +1,23 @@ + + + + + +org.firstinspires.ftc.robotcore.external.android + + + + +

    org.firstinspires.ftc.robotcore.external.android

    + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/package-summary.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/package-summary.html new file mode 100644 index 00000000000..e59e74df09f --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/package-summary.html @@ -0,0 +1,165 @@ + + + + + +org.firstinspires.ftc.robotcore.external.android + + + + + + + + + + +
    +

    Package org.firstinspires.ftc.robotcore.external.android

    +
    +
    +
      +
    • + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Class Summary 
      ClassDescription
      AndroidAccelerometer +
      A class that provides access to the Android Accelerometer.
      +
      AndroidGyroscope +
      A class that provides access to the Android Gyroscope.
      +
      AndroidOrientation +
      A class that provides access to the Android sensors for Orientation.
      +
      AndroidSoundPool +
      A class that provides access to the Android SoundPool.
      +
      AndroidTextToSpeech +
      A class that provides access to the Android TextToSpeech.
      +
      +
    • +
    +
    + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/package-tree.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/package-tree.html new file mode 100644 index 00000000000..58bceaee4d1 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/android/package-tree.html @@ -0,0 +1,138 @@ + + + + + +org.firstinspires.ftc.robotcore.external.android Class Hierarchy + + + + + + + + + + +
    +

    Hierarchy For Package org.firstinspires.ftc.robotcore.external.android

    +Package Hierarchies: + +
    +
    +

    Class Hierarchy

    +
      +
    • java.lang.Object +
        +
      • org.firstinspires.ftc.robotcore.external.android.AndroidAccelerometer (implements android.hardware.SensorEventListener)
      • +
      • org.firstinspires.ftc.robotcore.external.android.AndroidGyroscope (implements android.hardware.SensorEventListener)
      • +
      • org.firstinspires.ftc.robotcore.external.android.AndroidOrientation (implements android.hardware.SensorEventListener)
      • +
      • org.firstinspires.ftc.robotcore.external.android.AndroidSoundPool
      • +
      • org.firstinspires.ftc.robotcore.external.android.AndroidTextToSpeech
      • +
      +
    • +
    +
    + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/ColumnMajorMatrixF.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/ColumnMajorMatrixF.html new file mode 100644 index 00000000000..50b6d89a4d1 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/ColumnMajorMatrixF.html @@ -0,0 +1,361 @@ + + + + + +ColumnMajorMatrixF + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.matrices
    +

    Class ColumnMajorMatrixF

    +
    +
    + +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          ColumnMajorMatrixF

          +
          public ColumnMajorMatrixF(int nRows,
          +                          int nCols)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          indexFromRowCol

          +
          protected int indexFromRowCol(int row,
          +                              int col)
          +
          Description copied from class: DenseMatrixF
          +
          Given a row and column index into the matrix, returns the corresponding index + into the underlying float[] array.
          +
          +
          Specified by:
          +
          indexFromRowCol in class DenseMatrixF
          +
          Parameters:
          +
          row - the row whose index is desired
          +
          col - the column whose index is desired
          +
          Returns:
          +
          the index of (row,col) in the data returned by DenseMatrixF.getData()
          +
          +
        • +
        + + + +
          +
        • +

          toVector

          +
          public VectorF toVector()
          +
          Description copied from class: MatrixF
          +
          If the receiver is one-dimensional in one of its dimensions, returns a vector + containing the data of the receiver; otherwise, an exception is thrown.
          +
          +
          Overrides:
          +
          toVector in class MatrixF
          +
          Returns:
          +
          a vector containing the data of the receiver
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/ColumnMatrixF.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/ColumnMatrixF.html new file mode 100644 index 00000000000..f111e3a5e74 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/ColumnMatrixF.html @@ -0,0 +1,371 @@ + + + + + +ColumnMatrixF + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.matrices
    +

    Class ColumnMatrixF

    +
    +
    + +
    +
      +
    • +
      +
      +
      public class ColumnMatrixF
      +extends MatrixF
      +
      A ColumnMatrixF is a matrix that converts a VectorF into a 1xn matrix
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          ColumnMatrixF

          +
          public ColumnMatrixF(VectorF vector)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          get

          +
          public float get(int row,
          +                 int col)
          +
          Description copied from class: MatrixF
          +
          Returns a particular element of this matrix
          +
          +
          Specified by:
          +
          get in class MatrixF
          +
          Parameters:
          +
          row - the index of the row of the element to return
          +
          col - the index of the column of the element to return
          +
          Returns:
          +
          the element at the indicated row and column
          +
          See Also:
          +
          MatrixF.put(int, int, float)
          +
          +
        • +
        + + + +
          +
        • +

          put

          +
          public void put(int row,
          +                int col,
          +                float value)
          +
          Description copied from class: MatrixF
          +
          Updates a particular element of this matrix
          +
          +
          Specified by:
          +
          put in class MatrixF
          +
          Parameters:
          +
          row - the index of the row of the element to update
          +
          col - the index of the column of the element to update
          +
          value - the new value for the indicated element
          +
          +
        • +
        + + + +
          +
        • +

          emptyMatrix

          +
          public MatrixF emptyMatrix(int numRows,
          +                           int numCols)
          +
          Description copied from class: MatrixF
          +
          Returns a new empty matrix of the indicated dimensions. If a specific implementation + associated with the receiver can be used with these dimensions, then such is used; otherwise + a general matrix implementation will be used.
          +
          +
          Specified by:
          +
          emptyMatrix in class MatrixF
          +
          Returns:
          +
          a new empty matrix of the indicated dimensions
          +
          See Also:
          +
          OpenGLMatrix.emptyMatrix(int, int)
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/DenseMatrixF.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/DenseMatrixF.html new file mode 100644 index 00000000000..2a779b9fd02 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/DenseMatrixF.html @@ -0,0 +1,405 @@ + + + + + +DenseMatrixF + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.matrices
    +

    Class DenseMatrixF

    +
    +
    + +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          DenseMatrixF

          +
          protected DenseMatrixF(int nRows,
          +                       int nCols)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          get

          +
          public float get(int row,
          +                 int col)
          +
          Description copied from class: MatrixF
          +
          Returns a particular element of this matrix
          +
          +
          Specified by:
          +
          get in class MatrixF
          +
          Parameters:
          +
          row - the index of the row of the element to return
          +
          col - the index of the column of the element to return
          +
          Returns:
          +
          the element at the indicated row and column
          +
          See Also:
          +
          MatrixF.put(int, int, float)
          +
          +
        • +
        + + + +
          +
        • +

          put

          +
          public void put(int row,
          +                int col,
          +                float value)
          +
          Description copied from class: MatrixF
          +
          Updates a particular element of this matrix
          +
          +
          Specified by:
          +
          put in class MatrixF
          +
          Parameters:
          +
          row - the index of the row of the element to update
          +
          col - the index of the column of the element to update
          +
          value - the new value for the indicated element
          +
          +
        • +
        + + + +
          +
        • +

          getData

          +
          public abstract float[] getData()
          +
          Returns the contiguous array of floats which is the storage for this matrix
          +
          +
          Returns:
          +
          the contiguous array of floats which is the storage for this matrix
          +
          +
        • +
        + + + +
          +
        • +

          indexFromRowCol

          +
          protected abstract int indexFromRowCol(int row,
          +                                       int col)
          +
          Given a row and column index into the matrix, returns the corresponding index + into the underlying float[] array.
          +
          +
          Parameters:
          +
          row - the row whose index is desired
          +
          col - the column whose index is desired
          +
          Returns:
          +
          the index of (row,col) in the data returned by getData()
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/GeneralMatrixF.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/GeneralMatrixF.html new file mode 100644 index 00000000000..5aae90a0fea --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/GeneralMatrixF.html @@ -0,0 +1,401 @@ + + + + + +GeneralMatrixF + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.matrices
    +

    Class GeneralMatrixF

    +
    +
    + +
    +
      +
    • +
      +
      +
      public class GeneralMatrixF
      +extends RowMajorMatrixF
      +
      A GeneralMatrixF is a concrete matrix implementation that is supported by + a backing store consisting of an array of floats. The matrix is stored in row-major order.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          GeneralMatrixF

          +
          public GeneralMatrixF(int numRows,
          +                      int numCols)
          +
        • +
        + + + +
          +
        • +

          GeneralMatrixF

          +
          public GeneralMatrixF(int numRows,
          +                      int numCols,
          +                      float[] data)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          getData

          +
          public float[] getData()
          +
          Description copied from class: DenseMatrixF
          +
          Returns the contiguous array of floats which is the storage for this matrix
          +
          +
          Specified by:
          +
          getData in class DenseMatrixF
          +
          Returns:
          +
          the contiguous array of floats which is the storage for this matrix
          +
          +
        • +
        + + + +
          +
        • +

          emptyMatrix

          +
          public MatrixF emptyMatrix(int numRows,
          +                           int numCols)
          +
          Description copied from class: MatrixF
          +
          Returns a new empty matrix of the indicated dimensions. If a specific implementation + associated with the receiver can be used with these dimensions, then such is used; otherwise + a general matrix implementation will be used.
          +
          +
          Specified by:
          +
          emptyMatrix in class MatrixF
          +
          Returns:
          +
          a new empty matrix of the indicated dimensions
          +
          See Also:
          +
          OpenGLMatrix.emptyMatrix(int, int)
          +
          +
        • +
        + + + +
          +
        • +

          transposed

          +
          public GeneralMatrixF transposed()
          +
          Description copied from class: MatrixF
          +
          Returns a matrix which is the transposition of the receiver matrix.
          +
          +
          Overrides:
          +
          transposed in class MatrixF
          +
          Returns:
          +
          a matrix which is the transposition of the receiver matrix.
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/MatrixF.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/MatrixF.html new file mode 100644 index 00000000000..262d4a613df --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/MatrixF.html @@ -0,0 +1,1276 @@ + + + + + +MatrixF + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.matrices
    +

    Class MatrixF

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.matrices.MatrixF
      • +
      +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        protected intnumCols 
        protected intnumRows 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        MatrixF(int numRows, + int numCols) +
        Creates a matrix containing the indicated number of rows and columns.
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
        Modifier and TypeMethod and Description
        protected VectorFadaptHomogeneous(VectorF him) +
        Automatically adapts vectors to and from homogeneous coordinates according to the + size of the receiver matrix.
        +
        voidadd(float[] him) 
        voidadd(MatrixF addend) +
        Adds a matrix, in place, to the receiver
        +
        voidadd(VectorF him) 
        MatrixFadded(float[] him) 
        MatrixFadded(MatrixF addend) +
        Returns a new matrix whose elements are the sum of the corresponding elements of + the receiver and the addend
        +
        MatrixFadded(VectorF him) 
        static MatrixFdiagonalMatrix(int dim, + float scale) +
        Returns a new matrix which is zero everywhere except on the diagonal, where it has + an indicated value.
        +
        static MatrixFdiagonalMatrix(VectorF vector) +
        Returns a new matrix which is zero everywhere, except on the diagonal, where its + values are taken from an indicated vector
        +
        protected java.lang.RuntimeExceptiondimensionsError() 
        protected static java.lang.RuntimeExceptiondimensionsError(int numRows, + int numCols) 
        abstract MatrixFemptyMatrix(int numRows, + int numCols) +
        Returns a new empty matrix of the indicated dimensions.
        +
        java.lang.StringformatAsTransform() +
        A simple utility that extracts positioning information from a transformation matrix + and formats it in a form palatable to a human being.
        +
        java.lang.StringformatAsTransform(AxesReference axesReference, + AxesOrder axesOrder, + AngleUnit unit) +
        A simple utility that extracts positioning information from a transformation matrix + and formats it in a form palatable to a human being.
        +
        abstract floatget(int row, + int col) +
        Returns a particular element of this matrix
        +
        VectorFgetColumn(int col) +
        Returns a vector containing data of a particular column of the receiver.
        +
        VectorFgetRow(int row) +
        Returns a vector containing data of a particular row of the receiver.
        +
        VectorFgetTranslation() +
        Assumes that the receiver is non-perspective transformation matrix.
        +
        static MatrixFidentityMatrix(int dim) +
        Returns an identity matrix of the indicated dimension.
        +
        MatrixFinverted() +
        Returns a matrix which is the matrix-multiplication inverse of the receiver.
        +
        MatrixFmultiplied(float scale) +
        Returns a new matrix in which all the entries of the receiver have been scaled + by an indicated value.
        +
        VectorFmultiplied(float[] him) +
        Multiplies the receiver by the indicated vector, considered as a column matrix.
        +
        MatrixFmultiplied(MatrixF him) +
        Returns a matrix which is the multiplication of the recevier with another matrix.
        +
        VectorFmultiplied(VectorF him) +
        Multiplies the receiver by the indicated vector, considered as a column matrix.
        +
        voidmultiply(float scale) 
        voidmultiply(float[] him) 
        voidmultiply(MatrixF him) +
        Updates the receiver to be the product of itself and another matrix.
        +
        voidmultiply(VectorF him) 
        intnumCols() +
        Returns the number of columns in this matrix
        +
        intnumRows() +
        Returns the number of rows in this matrix
        +
        abstract voidput(int row, + int col, + float value) +
        Updates a particular element of this matrix
        +
        SliceMatrixFslice(int numRows, + int numCols) +
        Returns a matrix which is a submatrix of the receiver starting at (0,0)
        +
        SliceMatrixFslice(int row, + int col, + int numRows, + int numCols) +
        Returns a matrix which a submatrix of the receiver.
        +
        voidsubtract(float[] him) 
        voidsubtract(MatrixF subtrahend) +
        Subtracts a matrix, in place, from the receiver.
        +
        voidsubtract(VectorF him) 
        MatrixFsubtracted(float[] him) 
        MatrixFsubtracted(MatrixF subtrahend) +
        Returns a new matrix whose elements are the difference of the corresponding elements of + the receiver and the subtrahend
        +
        MatrixFsubtracted(VectorF him) 
        java.lang.StringtoString() 
        VectorFtoVector() +
        If the receiver is one-dimensional in one of its dimensions, returns a vector + containing the data of the receiver; otherwise, an exception is thrown.
        +
        VectorFtransform(VectorF him) +
        Transforms the vector according to this matrix interpreted as a transformation matrix.
        +
        MatrixFtransposed() +
        Returns a matrix which is the transposition of the receiver matrix.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          numRows

          +
          protected int numRows
          +
        • +
        + + + +
          +
        • +

          numCols

          +
          protected int numCols
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          MatrixF

          +
          public MatrixF(int numRows,
          +               int numCols)
          +
          Creates a matrix containing the indicated number of rows and columns.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          slice

          +
          @Const
          +public SliceMatrixF slice(int row,
          +                                  int col,
          +                                  int numRows,
          +                                  int numCols)
          +
          Returns a matrix which a submatrix of the receiver.
          +
          +
          Parameters:
          +
          row - the row in the receiver at which the submatrix is to start
          +
          col - the column in the receiver at which the submatrix is to start
          +
          numRows - the number of rows in the submatrix
          +
          numCols - the number of columns in the submatrix
          +
          Returns:
          +
          the newly created submatrix
          +
          See Also:
          +
          slice(int, int)
          +
          +
        • +
        + + + +
          +
        • +

          slice

          +
          @Const
          +public SliceMatrixF slice(int numRows,
          +                                  int numCols)
          +
          Returns a matrix which is a submatrix of the receiver starting at (0,0)
          +
          +
          Parameters:
          +
          numRows - the number of rows in the submatrix
          +
          numCols - the number of columns in the submatrix
          +
          Returns:
          +
          the newly created submatrix
          +
          See Also:
          +
          slice(int, int, int, int)
          +
          +
        • +
        + + + +
          +
        • +

          identityMatrix

          +
          public static MatrixF identityMatrix(int dim)
          +
          Returns an identity matrix of the indicated dimension. An identity matrix is zero + everywhere except on the diagonal, where it is one.
          +
          +
          Parameters:
          +
          dim - the size of the indentity matrix to return
          +
          Returns:
          +
          the new identity matrix
          +
          +
        • +
        + + + +
          +
        • +

          diagonalMatrix

          +
          public static MatrixF diagonalMatrix(int dim,
          +                                     float scale)
          +
          Returns a new matrix which is zero everywhere except on the diagonal, where it has + an indicated value.
          +
          +
          Parameters:
          +
          dim - the size of the matrix to return
          +
          scale - the value to place on its diagonal
          +
          Returns:
          +
          the new matrix
          +
          +
        • +
        + + + +
          +
        • +

          diagonalMatrix

          +
          public static MatrixF diagonalMatrix(VectorF vector)
          +
          Returns a new matrix which is zero everywhere, except on the diagonal, where its + values are taken from an indicated vector
          +
          +
          Parameters:
          +
          vector - the values to place on the diagonal
          +
          Returns:
          +
          the new matrix
          +
          +
        • +
        + + + +
          +
        • +

          emptyMatrix

          +
          @Const
          +public abstract MatrixF emptyMatrix(int numRows,
          +                                            int numCols)
          +
          Returns a new empty matrix of the indicated dimensions. If a specific implementation + associated with the receiver can be used with these dimensions, then such is used; otherwise + a general matrix implementation will be used.
          +
          +
          Returns:
          +
          a new empty matrix of the indicated dimensions
          +
          See Also:
          +
          OpenGLMatrix.emptyMatrix(int, int)
          +
          +
        • +
        + + + +
          +
        • +

          numRows

          +
          @Const
          +public int numRows()
          +
          Returns the number of rows in this matrix
          +
          +
          Returns:
          +
          the number of rows in this matrix
          +
          +
        • +
        + + + +
          +
        • +

          numCols

          +
          @Const
          +public int numCols()
          +
          Returns the number of columns in this matrix
          +
          +
          Returns:
          +
          the number of columns in this matrix
          +
          +
        • +
        + + + +
          +
        • +

          get

          +
          @Const
          +public abstract float get(int row,
          +                                  int col)
          +
          Returns a particular element of this matrix
          +
          +
          Parameters:
          +
          row - the index of the row of the element to return
          +
          col - the index of the column of the element to return
          +
          Returns:
          +
          the element at the indicated row and column
          +
          See Also:
          +
          put(int, int, float)
          +
          +
        • +
        + + + +
          +
        • +

          put

          +
          @NonConst
          +public abstract void put(int row,
          +                                    int col,
          +                                    float value)
          +
          Updates a particular element of this matrix
          +
          +
          Parameters:
          +
          row - the index of the row of the element to update
          +
          col - the index of the column of the element to update
          +
          value - the new value for the indicated element
          +
          +
        • +
        + + + +
          +
        • +

          getRow

          +
          @Const
          +public VectorF getRow(int row)
          +
          Returns a vector containing data of a particular row of the receiver.
          +
          +
          Parameters:
          +
          row - the row to extract
          +
          Returns:
          +
          a vector containing the data of the indicated row
          +
          +
        • +
        + + + +
          +
        • +

          getColumn

          +
          @Const
          +public VectorF getColumn(int col)
          +
          Returns a vector containing data of a particular column of the receiver.
          +
          +
          Parameters:
          +
          col - the column to extract
          +
          Returns:
          +
          a vector containing data of the indicated column
          +
          +
        • +
        + + + +
          +
        • +

          toString

          +
          @Const
          +public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          formatAsTransform

          +
          public java.lang.String formatAsTransform()
          +
          A simple utility that extracts positioning information from a transformation matrix + and formats it in a form palatable to a human being. This should only be invoked on + a matrix which is a transformation matrix. + + We report here using an extrinsic angle reference, meaning that all three angles are + rotations in the (fixed) field coordinate system, as this is perhaps easiest to + conceptually understand. And we use an angle order of XYZ, which results in the Z + angle, being applied last (after X and Y rotations) and so representing the robot's + heading on the field, which is often what is of most interest in robot navigation.
          +
          +
          Returns:
          +
          a description of the angles represented by this transformation matrix.
          +
          See Also:
          +
          formatAsTransform(AxesReference, AxesOrder, AngleUnit), +Transformation Matrix
          +
          +
        • +
        + + + +
          +
        • +

          formatAsTransform

          +
          public java.lang.String formatAsTransform(AxesReference axesReference,
          +                                          AxesOrder axesOrder,
          +                                          AngleUnit unit)
          +
          A simple utility that extracts positioning information from a transformation matrix + and formats it in a form palatable to a human being. This should only be invoked on + a matrix which is a transformation matrix.
          +
          +
          Parameters:
          +
          axesReference - the reference frame of the angles to use in reporting the transformation
          +
          axesOrder - the order of the angles to use in reporting the transformation
          +
          unit - the angular unit to use in reporting the transformation
          +
          Returns:
          +
          a description of the angles represented by this transformation matrix.
          +
          See Also:
          +
          formatAsTransform(), +Transformation Matrix
          +
          +
        • +
        + + + +
          +
        • +

          transposed

          +
          @Const
          +public MatrixF transposed()
          +
          Returns a matrix which is the transposition of the receiver matrix.
          +
          +
          Returns:
          +
          a matrix which is the transposition of the receiver matrix.
          +
          +
        • +
        + + + +
          +
        • +

          multiply

          +
          @NonConst
          +public void multiply(MatrixF him)
          +
          Updates the receiver to be the product of itself and another matrix.
          +
          +
          Parameters:
          +
          him - the matrix with which the receiver is to be multiplied.
          +
          +
        • +
        + + + +
          +
        • +

          multiplied

          +
          @Const
          +public MatrixF multiplied(MatrixF him)
          +
          Returns a matrix which is the multiplication of the recevier with another matrix.
          +
          +
          Parameters:
          +
          him - the matrix with which the receiver is to be multiplied.
          +
          Returns:
          +
          a matrix which is the product of the two matrices
          +
          +
        • +
        + + + +
          +
        • +

          multiplied

          +
          @Const
          +public MatrixF multiplied(float scale)
          +
          Returns a new matrix in which all the entries of the receiver have been scaled + by an indicated value.
          +
          +
          Parameters:
          +
          scale - the factor with which to scale each entry of the receiver
          +
          Returns:
          +
          the new, scaled matrix
          +
          +
        • +
        + + + +
          +
        • +

          multiply

          +
          @NonConst
          +public void multiply(float scale)
          +
        • +
        + + + +
          +
        • +

          multiplied

          +
          @Const
          +public VectorF multiplied(VectorF him)
          +
          Multiplies the receiver by the indicated vector, considered as a column matrix.
          +
          +
          Parameters:
          +
          him - the vector with which the receiver is to be multiplied
          +
          Returns:
          +
          a matrix which is the product of the receiver and the vector
          +
          +
        • +
        + + + + + + + +
          +
        • +

          multiplied

          +
          @Const
          +public VectorF multiplied(float[] him)
          +
          Multiplies the receiver by the indicated vector, considered as a column matrix.
          +
          +
          Parameters:
          +
          him - the vector with which the receiver is to be multiplied
          +
          Returns:
          +
          a matrix which is the product of the receiver and the vector
          +
          +
        • +
        + + + +
          +
        • +

          multiply

          +
          @NonConst
          +public void multiply(float[] him)
          +
        • +
        + + + +
          +
        • +

          toVector

          +
          @Const
          +public VectorF toVector()
          +
          If the receiver is one-dimensional in one of its dimensions, returns a vector + containing the data of the receiver; otherwise, an exception is thrown.
          +
          +
          Returns:
          +
          a vector containing the data of the receiver
          +
          +
        • +
        + + + +
          +
        • +

          added

          +
          @Const
          +public MatrixF added(MatrixF addend)
          +
          Returns a new matrix whose elements are the sum of the corresponding elements of + the receiver and the addend
          +
          +
          Parameters:
          +
          addend - the matrix which is to be added to the receiver
          +
          Returns:
          +
          the new matrix
          +
          +
        • +
        + + + +
          +
        • +

          add

          +
          @NonConst
          +public void add(MatrixF addend)
          +
          Adds a matrix, in place, to the receiver
          +
          +
          Parameters:
          +
          addend - the matrix which is to be added to the receiver
          +
          +
        • +
        + + + +
          +
        • +

          subtracted

          +
          @Const
          +public MatrixF subtracted(MatrixF subtrahend)
          +
          Returns a new matrix whose elements are the difference of the corresponding elements of + the receiver and the subtrahend
          +
          +
          Parameters:
          +
          subtrahend - the matrix which is to be subtracted from the receiver
          +
          Returns:
          +
          the new matrix
          +
          +
        • +
        + + + +
          +
        • +

          subtract

          +
          @NonConst
          +public void subtract(MatrixF subtrahend)
          +
          Subtracts a matrix, in place, from the receiver.
          +
          +
          Parameters:
          +
          subtrahend - the matrix which is to be subtracted from the receiver
          +
          +
        • +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          +
        • +

          getTranslation

          +
          @Const
          +public VectorF getTranslation()
          +
          Assumes that the receiver is non-perspective transformation matrix. Returns the translation + component of the transformation.
          +
          +
          Returns:
          +
          the translation component of the transformation
          +
          +
        • +
        + + + +
          +
        • +

          dimensionsError

          +
          protected java.lang.RuntimeException dimensionsError()
          +
        • +
        + + + +
          +
        • +

          dimensionsError

          +
          protected static java.lang.RuntimeException dimensionsError(int numRows,
          +                                                            int numCols)
          +
        • +
        + + + +
          +
        • +

          inverted

          +
          @Const
          +public MatrixF inverted()
          +
          Returns a matrix which is the matrix-multiplication inverse of the receiver.
          +
          +
          Returns:
          +
          a matrix which is the matrix-multiplication inverse of the receiver
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/OpenGLMatrix.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/OpenGLMatrix.html new file mode 100644 index 00000000000..56dbff54bd2 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/OpenGLMatrix.html @@ -0,0 +1,800 @@ + + + + + +OpenGLMatrix + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.matrices
    +

    Class OpenGLMatrix

    +
    +
    + +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          OpenGLMatrix

          +
          public OpenGLMatrix()
          +
        • +
        + + + +
          +
        • +

          OpenGLMatrix

          +
          public OpenGLMatrix(float[] data)
          +
        • +
        + + + +
          +
        • +

          OpenGLMatrix

          +
          public OpenGLMatrix(Matrix44F matrix)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          emptyMatrix

          +
          public MatrixF emptyMatrix(int numRows,
          +                           int numCols)
          +
          Description copied from class: MatrixF
          +
          Returns a new empty matrix of the indicated dimensions. If a specific implementation + associated with the receiver can be used with these dimensions, then such is used; otherwise + a general matrix implementation will be used.
          +
          +
          Specified by:
          +
          emptyMatrix in class MatrixF
          +
          Returns:
          +
          a new empty matrix of the indicated dimensions
          +
          See Also:
          +
          emptyMatrix(int, int)
          +
          +
        • +
        + + + +
          +
        • +

          rotation

          +
          public static OpenGLMatrix rotation(AngleUnit angleUnit,
          +                                    float angle,
          +                                    float dx,
          +                                    float dy,
          +                                    float dz)
          +
          Creates a matrix for rotation by the indicated angle around the indicated vector.
          +
        • +
        + + + + + + + +
          +
        • +

          translation

          +
          public static OpenGLMatrix translation(float dx,
          +                                       float dy,
          +                                       float dz)
          +
        • +
        + + + +
          +
        • +

          identityMatrix

          +
          public static OpenGLMatrix identityMatrix()
          +
        • +
        + + + +
          +
        • +

          getData

          +
          public float[] getData()
          +
          Description copied from class: DenseMatrixF
          +
          Returns the contiguous array of floats which is the storage for this matrix
          +
          +
          Specified by:
          +
          getData in class DenseMatrixF
          +
          Returns:
          +
          the contiguous array of floats which is the storage for this matrix
          +
          +
        • +
        + + + +
          +
        • +

          scale

          +
          @NonConst
          +public void scale(float scaleX,
          +                             float scaleY,
          +                             float scaleZ)
          +
        • +
        + + + +
          +
        • +

          scale

          +
          @NonConst
          +public void scale(float scale)
          +
        • +
        + + + +
          +
        • +

          translate

          +
          @NonConst
          +public void translate(float dx,
          +                                 float dy,
          +                                 float dz)
          +
        • +
        + + + +
          +
        • +

          rotate

          +
          @NonConst
          +public void rotate(AngleUnit angleUnit,
          +                              float angle,
          +                              float dx,
          +                              float dy,
          +                              float dz)
          +
        • +
        + + + + + + + +
          +
        • +

          scaled

          +
          @Const
          +public OpenGLMatrix scaled(float scaleX,
          +                                   float scaleY,
          +                                   float scaleZ)
          +
        • +
        + + + + + + + +
          +
        • +

          translated

          +
          @Const
          +public OpenGLMatrix translated(float dx,
          +                                       float dy,
          +                                       float dz)
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          inverted

          +
          @Const
          +public OpenGLMatrix inverted()
          +
          Description copied from class: MatrixF
          +
          Returns a matrix which is the matrix-multiplication inverse of the receiver.
          +
          +
          Overrides:
          +
          inverted in class MatrixF
          +
          Returns:
          +
          a matrix which is the matrix-multiplication inverse of the receiver
          +
          +
        • +
        + + + +
          +
        • +

          transposed

          +
          @Const
          +public OpenGLMatrix transposed()
          +
          Description copied from class: MatrixF
          +
          Returns a matrix which is the transposition of the receiver matrix.
          +
          +
          Overrides:
          +
          transposed in class MatrixF
          +
          Returns:
          +
          a matrix which is the transposition of the receiver matrix.
          +
          +
        • +
        + + + + + + + +
          +
        • +

          multiplied

          +
          @Const
          +public MatrixF multiplied(MatrixF him)
          +
          Description copied from class: MatrixF
          +
          Returns a matrix which is the multiplication of the recevier with another matrix.
          +
          +
          Overrides:
          +
          multiplied in class MatrixF
          +
          Parameters:
          +
          him - the matrix with which the receiver is to be multiplied.
          +
          Returns:
          +
          a matrix which is the product of the two matrices
          +
          +
        • +
        + + + +
          +
        • +

          multiply

          +
          @NonConst
          +public void multiply(OpenGLMatrix him)
          +
          Updates the receiver to be the product of itself and another matrix.
          +
          +
          Parameters:
          +
          him - the matrix with which the receiver is to be multiplied.
          +
          +
        • +
        + + + +
          +
        • +

          multiply

          +
          @NonConst
          +public void multiply(MatrixF him)
          +
          Updates the receiver to be the product of itself and another matrix.
          +
          +
          Overrides:
          +
          multiply in class MatrixF
          +
          Parameters:
          +
          him - the matrix with which the receiver is to be multiplied.
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/RowMajorMatrixF.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/RowMajorMatrixF.html new file mode 100644 index 00000000000..b05b9ea71c6 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/RowMajorMatrixF.html @@ -0,0 +1,361 @@ + + + + + +RowMajorMatrixF + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.matrices
    +

    Class RowMajorMatrixF

    +
    +
    + +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          RowMajorMatrixF

          +
          public RowMajorMatrixF(int nRows,
          +                       int nCols)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          indexFromRowCol

          +
          protected int indexFromRowCol(int row,
          +                              int col)
          +
          Description copied from class: DenseMatrixF
          +
          Given a row and column index into the matrix, returns the corresponding index + into the underlying float[] array.
          +
          +
          Specified by:
          +
          indexFromRowCol in class DenseMatrixF
          +
          Parameters:
          +
          row - the row whose index is desired
          +
          col - the column whose index is desired
          +
          Returns:
          +
          the index of (row,col) in the data returned by DenseMatrixF.getData()
          +
          +
        • +
        + + + +
          +
        • +

          toVector

          +
          public VectorF toVector()
          +
          Description copied from class: MatrixF
          +
          If the receiver is one-dimensional in one of its dimensions, returns a vector + containing the data of the receiver; otherwise, an exception is thrown.
          +
          +
          Overrides:
          +
          toVector in class MatrixF
          +
          Returns:
          +
          a vector containing the data of the receiver
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/RowMatrixF.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/RowMatrixF.html new file mode 100644 index 00000000000..ad354ca1212 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/RowMatrixF.html @@ -0,0 +1,371 @@ + + + + + +RowMatrixF + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.matrices
    +

    Class RowMatrixF

    +
    +
    + +
    +
      +
    • +
      +
      +
      public class RowMatrixF
      +extends MatrixF
      +
      A ColumnMatrixF is a matrix that converts a VectorF into a 1xn matrix
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          RowMatrixF

          +
          public RowMatrixF(VectorF vector)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          get

          +
          public float get(int row,
          +                 int col)
          +
          Description copied from class: MatrixF
          +
          Returns a particular element of this matrix
          +
          +
          Specified by:
          +
          get in class MatrixF
          +
          Parameters:
          +
          row - the index of the row of the element to return
          +
          col - the index of the column of the element to return
          +
          Returns:
          +
          the element at the indicated row and column
          +
          See Also:
          +
          MatrixF.put(int, int, float)
          +
          +
        • +
        + + + +
          +
        • +

          put

          +
          public void put(int row,
          +                int col,
          +                float value)
          +
          Description copied from class: MatrixF
          +
          Updates a particular element of this matrix
          +
          +
          Specified by:
          +
          put in class MatrixF
          +
          Parameters:
          +
          row - the index of the row of the element to update
          +
          col - the index of the column of the element to update
          +
          value - the new value for the indicated element
          +
          +
        • +
        + + + +
          +
        • +

          emptyMatrix

          +
          public MatrixF emptyMatrix(int numRows,
          +                           int numCols)
          +
          Description copied from class: MatrixF
          +
          Returns a new empty matrix of the indicated dimensions. If a specific implementation + associated with the receiver can be used with these dimensions, then such is used; otherwise + a general matrix implementation will be used.
          +
          +
          Specified by:
          +
          emptyMatrix in class MatrixF
          +
          Returns:
          +
          a new empty matrix of the indicated dimensions
          +
          See Also:
          +
          OpenGLMatrix.emptyMatrix(int, int)
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/SliceMatrixF.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/SliceMatrixF.html new file mode 100644 index 00000000000..31244054f92 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/SliceMatrixF.html @@ -0,0 +1,446 @@ + + + + + +SliceMatrixF + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.matrices
    +

    Class SliceMatrixF

    +
    +
    + +
    +
      +
    • +
      +
      +
      public class SliceMatrixF
      +extends MatrixF
      +
      A SliceMatrixF is a matrix whose implementation is a submatrix of some other matrix.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          matrix

          +
          protected MatrixF matrix
          +
        • +
        + + + +
          +
        • +

          row

          +
          protected int row
          +
        • +
        + + + +
          +
        • +

          col

          +
          protected int col
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          SliceMatrixF

          +
          public SliceMatrixF(MatrixF matrix,
          +                    int row,
          +                    int col,
          +                    int numRows,
          +                    int numCols)
          +
          Creates a SliceMatrixF based on the indicated matrix whose upper left corner is at + (row, col) of that matrix and whose size is numRows x numCols.
          +
          +
          Parameters:
          +
          matrix - the matrix we are to take a slice of
          +
          row - the row in matrix in which the slice is to begin
          +
          col - the column in matrix in which the slice is to begin
          +
          numRows - the number of rows that the slice should be
          +
          numCols - the number of columns that the slice should be
          +
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          get

          +
          public float get(int row,
          +                 int col)
          +
          Description copied from class: MatrixF
          +
          Returns a particular element of this matrix
          +
          +
          Specified by:
          +
          get in class MatrixF
          +
          Parameters:
          +
          row - the index of the row of the element to return
          +
          col - the index of the column of the element to return
          +
          Returns:
          +
          the element at the indicated row and column
          +
          See Also:
          +
          MatrixF.put(int, int, float)
          +
          +
        • +
        + + + +
          +
        • +

          put

          +
          public void put(int row,
          +                int col,
          +                float value)
          +
          Description copied from class: MatrixF
          +
          Updates a particular element of this matrix
          +
          +
          Specified by:
          +
          put in class MatrixF
          +
          Parameters:
          +
          row - the index of the row of the element to update
          +
          col - the index of the column of the element to update
          +
          value - the new value for the indicated element
          +
          +
        • +
        + + + +
          +
        • +

          emptyMatrix

          +
          public MatrixF emptyMatrix(int numRows,
          +                           int numCols)
          +
          Description copied from class: MatrixF
          +
          Returns a new empty matrix of the indicated dimensions. If a specific implementation + associated with the receiver can be used with these dimensions, then such is used; otherwise + a general matrix implementation will be used.
          +
          +
          Specified by:
          +
          emptyMatrix in class MatrixF
          +
          Returns:
          +
          a new empty matrix of the indicated dimensions
          +
          See Also:
          +
          OpenGLMatrix.emptyMatrix(int, int)
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/VectorF.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/VectorF.html new file mode 100644 index 00000000000..96c9cfdb1b1 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/VectorF.html @@ -0,0 +1,687 @@ + + + + + +VectorF + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.matrices
    +

    Class VectorF

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.matrices.VectorF
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class VectorF
      +extends java.lang.Object
      +
      A VectorF represents a single-dimensional vector of floats. It is not a matrix, + but can easily be converted into either a RowMatrixF or a ColumnMatrixF should + that be desired. That said, vectors can be multiplied by matrices to their left (or right); this + is commonly used to transform a set of coordinates (in the vector) by a transformation matrix.
      +
      +
      See Also:
      +
      MatrixF, +RowMatrixF, +ColumnMatrixF
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        protected float[]data 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + + + + + + + + + + + +
        Constructors 
        Constructor and Description
        VectorF(float x) 
        VectorF(float[] data) 
        VectorF(float x, + float y) 
        VectorF(float x, + float y, + float z) 
        VectorF(float x, + float y, + float z, + float w) 
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          data

          +
          protected float[] data
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          VectorF

          +
          public VectorF(float[] data)
          +
        • +
        + + + +
          +
        • +

          VectorF

          +
          public VectorF(float x)
          +
        • +
        + + + +
          +
        • +

          VectorF

          +
          public VectorF(float x,
          +               float y)
          +
        • +
        + + + +
          +
        • +

          VectorF

          +
          public VectorF(float x,
          +               float y,
          +               float z)
          +
        • +
        + + + +
          +
        • +

          VectorF

          +
          public VectorF(float x,
          +               float y,
          +               float z,
          +               float w)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          length

          +
          public static VectorF length(int length)
          +
          Creates a new vector of the indicated length. The vector will contain zeros.
          +
          +
          Parameters:
          +
          length - the length of the new vector to return
          +
          Returns:
          +
          the newly created vector
          +
          +
        • +
        + + + +
          +
        • +

          getData

          +
          @Const
          +public float[] getData()
          +
        • +
        + + + +
          +
        • +

          length

          +
          @Const
          +public int length()
          +
        • +
        + + + +
          +
        • +

          get

          +
          @Const
          +public float get(int index)
          +
        • +
        + + + +
          +
        • +

          put

          +
          @NonConst
          +public void put(int index,
          +                           float value)
          +
        • +
        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        + + + +
          +
        • +

          normalized3D

          +
          @Const
          +public VectorF normalized3D()
          +
          Consider this vector as a 3D coordinate or 3D homogeneous coordinate, and, if the + latter, return its normalized form. In either case, the result is of length three, and + contains coordinate values for x, y, and z at indices 0, 1, and 2 respectively.
          +
          +
          Returns:
          +
          the normalized form of this coordinate vector
          +
          See Also:
          +
          Homogeneous coordinates
          +
          +
        • +
        + + + +
          +
        • +

          magnitude

          +
          @Const
          +public float magnitude()
          +
        • +
        + + + +
          +
        • +

          dotProduct

          +
          @Const
          +public float dotProduct(VectorF him)
          +
          Returns the dot product of this vector and another.
          +
          +
          Parameters:
          +
          him - the other vector with whom the dot product is to be formed
          +
          Returns:
          +
          the dot product of this vector and another.
          +
          See Also:
          +
          Dot product
          +
          +
        • +
        + + + +
          +
        • +

          multiplied

          +
          @Const
          +public MatrixF multiplied(MatrixF him)
          +
          Multiplies this vector, taken as a row vector, against the indicated matrix.
          +
        • +
        + + + +
          +
        • +

          added

          +
          @Const
          +public MatrixF added(MatrixF addend)
          +
          Adds this vector, taken as a row vector against, to the indicated matrix.
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          subtracted

          +
          @Const
          +public MatrixF subtracted(MatrixF subtrahend)
          +
          Subtracts the indicated matrix from this vector, taken as a row vector.
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          multiplied

          +
          @Const
          +public VectorF multiplied(float scale)
          +
          Returns a new vector containing the elements of this vector scaled by the indicated factor.
          +
        • +
        + + + +
          +
        • +

          multiply

          +
          @NonConst
          +public void multiply(float scale)
          +
        • +
        + + + +
          +
        • +

          dimensionsError

          +
          protected java.lang.RuntimeException dimensionsError()
          +
        • +
        + + + +
          +
        • +

          dimensionsError

          +
          protected static java.lang.RuntimeException dimensionsError(int length)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/package-frame.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/package-frame.html new file mode 100644 index 00000000000..bdbb332c73e --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/package-frame.html @@ -0,0 +1,28 @@ + + + + + +org.firstinspires.ftc.robotcore.external.matrices + + + + +

    org.firstinspires.ftc.robotcore.external.matrices

    + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/package-summary.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/package-summary.html new file mode 100644 index 00000000000..0552cbc9a4b --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/package-summary.html @@ -0,0 +1,200 @@ + + + + + +org.firstinspires.ftc.robotcore.external.matrices + + + + + + + + + + +
    +

    Package org.firstinspires.ftc.robotcore.external.matrices

    +
    +
    +
      +
    • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Class Summary 
      ClassDescription
      ColumnMajorMatrixF +
      A ColumnMajorMatrixF is a dense matrix whose entries are arranged in + column-major order.
      +
      ColumnMatrixF +
      A ColumnMatrixF is a matrix that converts a VectorF into a 1xn matrix
      +
      DenseMatrixF +
      A DenseMatrixF is a matrix of floats whose storage is a contiguous float[] array.
      +
      GeneralMatrixF +
      A GeneralMatrixF is a concrete matrix implementation that is supported by + a backing store consisting of an array of floats.
      +
      MatrixF +
      MatrixF represents a matrix of floats of a defined dimensionality but abstracts + the means by which a particular element of the matrix is retrieved or updated.
      +
      OpenGLMatrix +
      An OpenGLMatrix is a 4x4 matrix commonly used as a transformation matrix for 3D + homogeneous coordinates.
      +
      RowMajorMatrixF +
      A RowMajorMatrixF is a dense matrix whose entries are arranged in + row-major order.
      +
      RowMatrixF +
      A ColumnMatrixF is a matrix that converts a VectorF into a 1xn matrix
      +
      SliceMatrixF +
      A SliceMatrixF is a matrix whose implementation is a submatrix of some other matrix.
      +
      VectorF +
      A VectorF represents a single-dimensional vector of floats.
      +
      +
    • +
    +
    + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/package-tree.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/package-tree.html new file mode 100644 index 00000000000..35d615c3264 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/matrices/package-tree.html @@ -0,0 +1,155 @@ + + + + + +org.firstinspires.ftc.robotcore.external.matrices Class Hierarchy + + + + + + + + + + +
    +

    Hierarchy For Package org.firstinspires.ftc.robotcore.external.matrices

    +Package Hierarchies: + +
    +
    +

    Class Hierarchy

    +
      +
    • java.lang.Object +
        +
      • org.firstinspires.ftc.robotcore.external.matrices.MatrixF +
          +
        • org.firstinspires.ftc.robotcore.external.matrices.ColumnMatrixF
        • +
        • org.firstinspires.ftc.robotcore.external.matrices.DenseMatrixF + +
        • +
        • org.firstinspires.ftc.robotcore.external.matrices.RowMatrixF
        • +
        • org.firstinspires.ftc.robotcore.external.matrices.SliceMatrixF
        • +
        +
      • +
      • org.firstinspires.ftc.robotcore.external.matrices.VectorF
      • +
      +
    • +
    +
    + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Acceleration.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Acceleration.html new file mode 100644 index 00000000000..c44b558b228 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Acceleration.html @@ -0,0 +1,454 @@ + + + + + +Acceleration + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class Acceleration

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.Acceleration
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class Acceleration
      +extends java.lang.Object
      +
      Instances of Acceleration represent the second derivative of Position over time. This + is also to say that Position is a double integration of Acceleration with respect + to time.
      +
      +
      See Also:
      +
      Velocity, +Position
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        longacquisitionTime +
        the time on the System.nanoTime() clock at which the data was acquired.
        +
        static doubleearthGravity +
        The (nominal) acceleration due to Earth's gravity + The units are in m/s^2
        +
        DistanceUnitunit +
        The distance units in which this acceleration is expressed.
        +
        doublexAccel 
        doubleyAccel 
        doublezAccel 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + + +
        Constructors 
        Constructor and Description
        Acceleration() 
        Acceleration(DistanceUnit unit, + double xAccel, + double yAccel, + double zAccel, + long acquisitionTime) 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + +
        All Methods Static Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static AccelerationfromGravity(double gx, + double gy, + double gz, + long acquisitionTime) +
        Returns an acceleration constructed from measures in units of earth's gravity + rather than explicit distance units.
        +
        java.lang.StringtoString() 
        AccelerationtoUnit(DistanceUnit distanceUnit) 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          earthGravity

          +
          public static final double earthGravity
          +
          The (nominal) acceleration due to Earth's gravity + The units are in m/s^2
          +
          +
          See Also:
          +
          Constant Field Values
          +
          +
        • +
        + + + +
          +
        • +

          unit

          +
          public DistanceUnit unit
          +
          The distance units in which this acceleration is expressed. The time unit is always "per second per second".
          +
        • +
        + + + +
          +
        • +

          xAccel

          +
          public double xAccel
          +
        • +
        + + + +
          +
        • +

          yAccel

          +
          public double yAccel
          +
        • +
        + + + +
          +
        • +

          zAccel

          +
          public double zAccel
          +
        • +
        + + + +
          +
        • +

          acquisitionTime

          +
          public long acquisitionTime
          +
          the time on the System.nanoTime() clock at which the data was acquired. If no + timestamp is associated with this particular set of data, this value is zero.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Acceleration

          +
          public Acceleration()
          +
        • +
        + + + +
          +
        • +

          Acceleration

          +
          public Acceleration(DistanceUnit unit,
          +                    double xAccel,
          +                    double yAccel,
          +                    double zAccel,
          +                    long acquisitionTime)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          fromGravity

          +
          public static Acceleration fromGravity(double gx,
          +                                       double gy,
          +                                       double gz,
          +                                       long acquisitionTime)
          +
          Returns an acceleration constructed from measures in units of earth's gravity + rather than explicit distance units.
          +
        • +
        + + + + + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/AngleUnit.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/AngleUnit.html new file mode 100644 index 00000000000..918a007c6b7 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/AngleUnit.html @@ -0,0 +1,657 @@ + + + + + +AngleUnit + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum AngleUnit

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<AngleUnit>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.navigation.AngleUnit
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<AngleUnit>
      +
      +
      +
      +
      public enum AngleUnit
      +extends java.lang.Enum<AngleUnit>
      +
      An AngleUnit represents angles in different units of measure and + provides utility methods to convert across units. AngleUnit does not + maintain angle information information internally, but only helps organize + and use angle measures that may be maintained separately across various contexts. +

      + Angles can be distinguished along (at least) two axes: +

        +
      1. the fundamental unit (radians vs degrees)
      2. +
      3. whether the angular quantity is normalized or not to the range of [-180,+180) degrees
      4. +
      + Normalized angles are of most utility when dealing with physical angles, as normalization + removes ambiguity of representation. In particular, two angles can be compared for equality + by subtracting them, normalizing, and testing whether the absolute value of the result is + smaller than some tolerance threshold. This approach neatly handles all cases of cyclical + wrapping without unexpected discontinuities. +

      +

      + Unnormalized angles can be handy when the angular quantity is not a physical angle but some + related quantity such as an angular velocity or acceleration, where the + quantity in question lacks the 360-degree cyclical equivalence of a physical angle. +

      +

      + AngleUnit expresses normalized angles, while UnnormalizedAngleUnit expresses unnormalized ones +

      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Detail

        + + + +
          +
        • +

          DEGREES

          +
          public static final AngleUnit DEGREES
          +
        • +
        + + + +
          +
        • +

          RADIANS

          +
          public static final AngleUnit RADIANS
          +
        • +
        +
      • +
      + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static AngleUnit[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (AngleUnit c : AngleUnit.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static AngleUnit valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + +
          +
        • +

          fromDegrees

          +
          public double fromDegrees(double degrees)
          +
        • +
        + + + +
          +
        • +

          fromDegrees

          +
          public float fromDegrees(float degrees)
          +
        • +
        + + + +
          +
        • +

          fromRadians

          +
          public double fromRadians(double radians)
          +
        • +
        + + + +
          +
        • +

          fromRadians

          +
          public float fromRadians(float radians)
          +
        • +
        + + + +
          +
        • +

          fromUnit

          +
          public double fromUnit(AngleUnit them,
          +                       double theirs)
          +
        • +
        + + + +
          +
        • +

          fromUnit

          +
          public float fromUnit(AngleUnit them,
          +                      float theirs)
          +
        • +
        + + + +
          +
        • +

          toDegrees

          +
          public double toDegrees(double inOurUnits)
          +
        • +
        + + + +
          +
        • +

          toDegrees

          +
          public float toDegrees(float inOurUnits)
          +
        • +
        + + + +
          +
        • +

          toRadians

          +
          public double toRadians(double inOurUnits)
          +
        • +
        + + + +
          +
        • +

          toRadians

          +
          public float toRadians(float inOurUnits)
          +
        • +
        + + + +
          +
        • +

          normalize

          +
          public double normalize(double mine)
          +
        • +
        + + + +
          +
        • +

          normalize

          +
          public float normalize(float mine)
          +
        • +
        + + + +
          +
        • +

          normalizeDegrees

          +
          public static double normalizeDegrees(double degrees)
          +
        • +
        + + + +
          +
        • +

          normalizeDegrees

          +
          public static float normalizeDegrees(float degrees)
          +
        • +
        + + + +
          +
        • +

          normalizeRadians

          +
          public static double normalizeRadians(double radians)
          +
        • +
        + + + +
          +
        • +

          normalizeRadians

          +
          public static float normalizeRadians(float radians)
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/AngularVelocity.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/AngularVelocity.html new file mode 100644 index 00000000000..32b7727baf9 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/AngularVelocity.html @@ -0,0 +1,422 @@ + + + + + +AngularVelocity + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class AngularVelocity

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.AngularVelocity
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class AngularVelocity
      +extends java.lang.Object
      +
      Instances of AngularVelocity represent an instantaneous body-referenced 3D rotation rate. + +

      The instantaneous rate of change of an Orientation, which is what we are representing + here, has unexpected subtleties. As described in Section 9.3 of the MIT Kinematics Lecture below, + the instantaneous body-referenced rotation rate angles are decoupled (their order does not + matter) but their conversion into a corresponding instantaneous rate of change of a set of + related Euler angles (ie: Orientation involves a non-obvious transformation on two + of the rotation rates.

      +
      +
      See Also:
      +
      MIT Kinematics Lecture, +Understanding Euler Angles, +Angular Velocity
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        longacquisitionTime +
        the time on the System.nanoTime() clock at which the data was acquired.
        +
        AngleUnitunit +
        the angular unit in which angular rates are expressed.
        +
        floatxRotationRate +
        the instantaneous body-referenced rotation rate about the x-axis in units + of "units per second".
        +
        floatyRotationRate +
        the instantaneous body-referenced rotation rate about the y-axis in units + of "units per second".
        +
        floatzRotationRate +
        the instantaneous body-referenced rotation rate about the z-axis in units + of "units per second".
        +
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + + +
        Constructors 
        Constructor and Description
        AngularVelocity() 
        AngularVelocity(AngleUnit unit, + float xRotationRate, + float yRotationRate, + float zRotationRate, + long acquisitionTime) 
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          unit

          +
          public AngleUnit unit
          +
          the angular unit in which angular rates are expressed. The time unit thereof + is always "per second".
          +
        • +
        + + + +
          +
        • +

          xRotationRate

          +
          public float xRotationRate
          +
          the instantaneous body-referenced rotation rate about the x-axis in units + of "units per second".
          +
        • +
        + + + +
          +
        • +

          yRotationRate

          +
          public float yRotationRate
          +
          the instantaneous body-referenced rotation rate about the y-axis in units + of "units per second".
          +
        • +
        + + + +
          +
        • +

          zRotationRate

          +
          public float zRotationRate
          +
          the instantaneous body-referenced rotation rate about the z-axis in units + of "units per second".
          +
        • +
        + + + +
          +
        • +

          acquisitionTime

          +
          public long acquisitionTime
          +
          the time on the System.nanoTime() clock at which the data was acquired. If no + timestamp is associated with this particular set of data, this value is zero.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          AngularVelocity

          +
          public AngularVelocity()
          +
        • +
        + + + +
          +
        • +

          AngularVelocity

          +
          public AngularVelocity(AngleUnit unit,
          +                       float xRotationRate,
          +                       float yRotationRate,
          +                       float zRotationRate,
          +                       long acquisitionTime)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          toAngleUnit

          +
          public AngularVelocity toAngleUnit(AngleUnit unit)
          +
          Converts this AngularVelocity to one with the indicated angular units.
          +
          +
          Parameters:
          +
          unit - the units to use in the returned [@link AngularVelocity}
          +
          Returns:
          +
          a new [@link AngularVelocity} with the same data but in the indicated units
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/AxesOrder.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/AxesOrder.html new file mode 100644 index 00000000000..5d152c3b824 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/AxesOrder.html @@ -0,0 +1,527 @@ + + + + + +AxesOrder + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum AxesOrder

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<AxesOrder>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.navigation.AxesOrder
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<AxesOrder>
      +
      +
      +
      +
      public enum AxesOrder
      +extends java.lang.Enum<AxesOrder>
      +
      AxesOrder indicates the chronological order of axes about which the three rotations + of an Orientation take place. The geometry of three space is such that there are + exactly twelve distinct rotational orders.
      +
      +
      See Also:
      +
      Orientation, +AxesReference, +Euler Angles
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        XYX 
        XYZ 
        XZX 
        XZY 
        YXY 
        YXZ 
        YZX 
        YZY 
        ZXY 
        ZXZ 
        ZYX 
        ZYZ 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Static Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        Axis[]axes() +
        Returns the axes associated with this AxesOrder.
        +
        int[]indices() +
        Returns the numerical axes indices associated with this AxesOrder.
        +
        AxesOrderreverse() +
        Returns the AxesOrder which is the chronological reverse of the receiver.
        +
        static AxesOrdervalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static AxesOrder[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static AxesOrder[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (AxesOrder c : AxesOrder.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static AxesOrder valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + +
          +
        • +

          indices

          +
          public int[] indices()
          +
          Returns the numerical axes indices associated with this AxesOrder.
          +
          +
          Returns:
          +
          the numerical axes indices associated with this AxesOrder.
          +
          +
        • +
        + + + + + + + +
          +
        • +

          reverse

          +
          public AxesOrder reverse()
          +
          Returns the AxesOrder which is the chronological reverse of the receiver.
          +
          +
          Returns:
          +
          the AxesOrder which is the chronological reverse of the receiver.
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/AxesReference.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/AxesReference.html new file mode 100644 index 00000000000..13811e822ba --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/AxesReference.html @@ -0,0 +1,360 @@ + + + + + +AxesReference + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum AxesReference

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<AxesReference>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.navigation.AxesReference
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<AxesReference>
      +
      +
      +
      +
      public enum AxesReference
      +extends java.lang.Enum<AxesReference>
      +
      AxesReference indicates whether we have intrinsic rotations, where the axes + move with the object that is rotating, or extrinsic rotations, where they remain fixed + in the world around the object.
      +
      +
      See Also:
      +
      Orientation, +AxesOrder, +Euler Angles
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        EXTRINSIC 
        INTRINSIC 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + +
        All Methods Static Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        AxesReferencereverse() 
        static AxesReferencevalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static AxesReference[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static AxesReference[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (AxesReference c : AxesReference.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static AxesReference valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Axis.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Axis.html new file mode 100644 index 00000000000..ed91e49a6ec --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Axis.html @@ -0,0 +1,412 @@ + + + + + +Axis + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum Axis

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<Axis>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.navigation.Axis
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<Axis>
      +
      +
      +
      +
      public enum Axis
      +extends java.lang.Enum<Axis>
      +
      Axis enumerates the common X,Y,Z three-dimensional orthogonal axes.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        UNKNOWN 
        X 
        Y 
        Z 
        +
      • +
      + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        intindex 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static AxisfromIndex(int index) 
        static AxisvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static Axis[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Detail

        + + + +
          +
        • +

          X

          +
          public static final Axis X
          +
        • +
        + + + +
          +
        • +

          Y

          +
          public static final Axis Y
          +
        • +
        + + + +
          +
        • +

          Z

          +
          public static final Axis Z
          +
        • +
        + + + +
          +
        • +

          UNKNOWN

          +
          public static final Axis UNKNOWN
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          index

          +
          public int index
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static Axis[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (Axis c : Axis.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static Axis valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + +
          +
        • +

          fromIndex

          +
          public static Axis fromIndex(int index)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/DistanceUnit.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/DistanceUnit.html new file mode 100644 index 00000000000..06837870778 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/DistanceUnit.html @@ -0,0 +1,599 @@ + + + + + +DistanceUnit + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum DistanceUnit

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<DistanceUnit>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<DistanceUnit>
      +
      +
      +
      +
      public enum DistanceUnit
      +extends java.lang.Enum<DistanceUnit>
      +
      DistanceUnit represents a unit of measure of distance.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        CM 
        INCH 
        METER 
        MM 
        +
      • +
      + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        bytebVal 
        static doubleinfinity 
        static doublemmPerInch 
        static doublemPerInch 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Static Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        doublefromCm(double cm) 
        doublefromInches(double inches) 
        doublefromMeters(double meters) 
        doublefromMm(double mm) 
        doublefromUnit(DistanceUnit him, + double his) 
        doubletoCm(double inOurUnits) 
        doubletoInches(double inOurUnits) 
        doubletoMeters(double inOurUnits) 
        doubletoMm(double inOurUnits) 
        java.lang.StringtoString() 
        java.lang.StringtoString(double inOurUnits) 
        static DistanceUnitvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static DistanceUnit[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static DistanceUnit[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (DistanceUnit c : DistanceUnit.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static DistanceUnit valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + +
          +
        • +

          fromMeters

          +
          public double fromMeters(double meters)
          +
        • +
        + + + +
          +
        • +

          fromInches

          +
          public double fromInches(double inches)
          +
        • +
        + + + +
          +
        • +

          fromCm

          +
          public double fromCm(double cm)
          +
        • +
        + + + +
          +
        • +

          fromMm

          +
          public double fromMm(double mm)
          +
        • +
        + + + +
          +
        • +

          fromUnit

          +
          public double fromUnit(DistanceUnit him,
          +                       double his)
          +
        • +
        + + + +
          +
        • +

          toMeters

          +
          public double toMeters(double inOurUnits)
          +
        • +
        + + + +
          +
        • +

          toInches

          +
          public double toInches(double inOurUnits)
          +
        • +
        + + + +
          +
        • +

          toCm

          +
          public double toCm(double inOurUnits)
          +
        • +
        + + + +
          +
        • +

          toMm

          +
          public double toMm(double inOurUnits)
          +
        • +
        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString(double inOurUnits)
          +
        • +
        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Enum<DistanceUnit>
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/MagneticFlux.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/MagneticFlux.html new file mode 100644 index 00000000000..75488813fb7 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/MagneticFlux.html @@ -0,0 +1,384 @@ + + + + + +MagneticFlux + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class MagneticFlux

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.MagneticFlux
      • +
      +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        longacquisitionTime +
        the time on the System.nanoTime() clock at which the data was acquired.
        +
        doublex +
        the flux in the X direction
        +
        doubley +
        the flux in the Y direction
        +
        doublez +
        the flux in the Z direction
        +
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + + +
        Constructors 
        Constructor and Description
        MagneticFlux() 
        MagneticFlux(double x, + double y, + double z, + long acquisitionTime) 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        java.lang.StringtoString() 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          x

          +
          public double x
          +
          the flux in the X direction
          +
        • +
        + + + +
          +
        • +

          y

          +
          public double y
          +
          the flux in the Y direction
          +
        • +
        + + + +
          +
        • +

          z

          +
          public double z
          +
          the flux in the Z direction
          +
        • +
        + + + +
          +
        • +

          acquisitionTime

          +
          public long acquisitionTime
          +
          the time on the System.nanoTime() clock at which the data was acquired. If no + timestamp is associated with this particular set of data, this value is zero.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          MagneticFlux

          +
          public MagneticFlux()
          +
        • +
        + + + +
          +
        • +

          MagneticFlux

          +
          public MagneticFlux(double x,
          +                    double y,
          +                    double z,
          +                    long acquisitionTime)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/MotionDetection.MotionDetectionListener.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/MotionDetection.MotionDetectionListener.html new file mode 100644 index 00000000000..d6444a78a1c --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/MotionDetection.MotionDetectionListener.html @@ -0,0 +1,222 @@ + + + + + +MotionDetection.MotionDetectionListener + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Interface MotionDetection.MotionDetectionListener

    +
    +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      MotionDetection
      +
      +
      +
      +
      public static interface MotionDetection.MotionDetectionListener
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          onMotionDetected

          +
          void onMotionDetected(double vector)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/MotionDetection.Vector.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/MotionDetection.Vector.html new file mode 100644 index 00000000000..f0b0ffd6f9c --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/MotionDetection.Vector.html @@ -0,0 +1,272 @@ + + + + + +MotionDetection.Vector + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class MotionDetection.Vector

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.MotionDetection.Vector
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      MotionDetection
      +
      +
      +
      +
      public class MotionDetection.Vector
      +extends java.lang.Object
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        Vector() 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        doublemagnitude() 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Vector

          +
          public Vector()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          magnitude

          +
          public double magnitude()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/MotionDetection.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/MotionDetection.html new file mode 100644 index 00000000000..202e7936d40 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/MotionDetection.html @@ -0,0 +1,496 @@ + + + + + +MotionDetection + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class MotionDetection

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.MotionDetection
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      android.hardware.SensorEventListener
      +
      +
      +
      +
      public class MotionDetection
      +extends java.lang.Object
      +implements android.hardware.SensorEventListener
      +
      A class that will notify listeners when a phone is in motion.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          MotionDetection

          +
          public MotionDetection()
          +
        • +
        + + + +
          +
        • +

          MotionDetection

          +
          public MotionDetection(double detectionThreshold,
          +                       int rateLimitSeconds)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          filter

          +
          protected MotionDetection.Vector filter(android.hardware.SensorEvent sensorEvent)
          +
          filter + + Taken straight from the google documentation for implementing a low pass + filter for filtering out gravity. + + See https://developer.android.com/reference/android/hardware/SensorEvent#values
          +
          +
          Parameters:
          +
          sensorEvent - The sensor data spit out by android for the accelerometer.
          +
          Returns:
          +
          a Vector filtered of gravity's influence.
          +
          +
        • +
        + + + + + + + +
          +
        • +

          purgeListeners

          +
          public void purgeListeners()
          +
          purgeListeners
          +
        • +
        + + + +
          +
        • +

          isAvailable

          +
          public boolean isAvailable()
          +
          Is the required sensor available on this device?
          +
        • +
        + + + +
          +
        • +

          startListening

          +
          public void startListening()
          +
          Start processing sensor data.
          +
        • +
        + + + +
          +
        • +

          stopListening

          +
          public void stopListening()
          +
          Stop processing sensor data.
          +
        • +
        + + + +
          +
        • +

          notifyListeners

          +
          protected void notifyListeners(double vector)
          +
        • +
        + + + +
          +
        • +

          onSensorChanged

          +
          public void onSensorChanged(android.hardware.SensorEvent sensorEvent)
          +
          Internal implementations of the SensorEventListener interface.
          +
          +
          Specified by:
          +
          onSensorChanged in interface android.hardware.SensorEventListener
          +
          +
        • +
        + + + +
          +
        • +

          onAccuracyChanged

          +
          public void onAccuracyChanged(android.hardware.Sensor sensor,
          +                              int i)
          +
          +
          Specified by:
          +
          onAccuracyChanged in interface android.hardware.SensorEventListener
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/NavUtil.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/NavUtil.html new file mode 100644 index 00000000000..fe6b14b762f --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/NavUtil.html @@ -0,0 +1,446 @@ + + + + + +NavUtil + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class NavUtil

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.NavUtil
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class NavUtil
      +extends java.lang.Object
      +
      NavUtil is a collection of utilities that provide useful manipulations of + objects related to navigation.
      +
    • +
    +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Orientation.AngleSet.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Orientation.AngleSet.html new file mode 100644 index 00000000000..dcf36418328 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Orientation.AngleSet.html @@ -0,0 +1,344 @@ + + + + + +Orientation.AngleSet + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum Orientation.AngleSet

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<Orientation.AngleSet>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.navigation.Orientation.AngleSet
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<Orientation.AngleSet>
      +
      +
      +
      Enclosing class:
      +
      Orientation
      +
      +
      +
      +
      public static enum Orientation.AngleSet
      +extends java.lang.Enum<Orientation.AngleSet>
      +
      Orientation.AngleSet is used to distinguish between the two sets of angles that will produce + a given rotation in a given axes reference and a given axes order
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        THEONE 
        THEOTHER 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static Orientation.AngleSetvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static Orientation.AngleSet[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static Orientation.AngleSet[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (Orientation.AngleSet c : Orientation.AngleSet.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static Orientation.AngleSet valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Orientation.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Orientation.html new file mode 100644 index 00000000000..a96d8cec6bd --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Orientation.html @@ -0,0 +1,717 @@ + + + + + +Orientation + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class Orientation

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.Orientation
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class Orientation
      +extends java.lang.Object
      +
      Instances of Orientation represent a rotated stance in three-dimensional space + by way of a set of three successive rotations. + +

      There are several ways that a particular orientation in three-space can be represented. + One way is by specifying a (unit) directional vector about which the orientation is to occur, + together with a rotation angle about that axis. This representation is unique up to the sign of the + direction and angle; that is a rotation a about a vector v produces the same + rotation as a rotation -a about the vector -v. While this manner of specifying a + rotation is easy to visualize if the vector in question is one of the cardinal axes (ie: X,Y, or Z), + many find it more difficult to visualize more complex rotations in this manner.

      + +

      An alternative, more common, way to represent a particular orientation in three-space is by means + of indicating three angles of rotation about three successive axes. You might for example be familiar + with the notions of heading, elevation, and bank angles for aircraft. Unfortunately, there are 24 + different yet equivalent ways that a set of three rotational angles about three axes can represent + the same effective rotation. As might be expected, this can be the source of much confusion. The + 24 different representations break down as follows.

      + +

      First is the matter of the axes reference: is the coordinate system in which the referred-to rotational + axes reside a coordinate system that moves with (and so remains fixed relative to) the object being rotated, + or do the axes remain fixed relative to the world around the object and are unaffected by the + object's rotational motion? The former situation is referred to as an intrinsic + reference perspective while the latter is an extrinsic perspective. + Both points of view are equally valid methodologies, but one or the other may be more understandable + or useful in a given application situation. +

      + +

      The extrinsic-vs-intrinsic difference accounts for a factor of two in our list of 24 different + representations. The remaining factor of 12 breaks down into whether the three rotations all use + different axes (and so are a permutation of X, Y, and Z, of which there are six in number), or whether + the first and last axes are the same and the middle one different (e.g. Z-Y-Z); this has three + choices for the first axis (which is also used for the last) and two remaining choices for the + second axis, for a total, again, of six possibilities. The geometry of three-space is such that these + twelve choices are the only distinct representational possibilities. As with the extrinsic-vs- + intrinsic difference, all twelve of these axis orders are equally valid ways of + indicating orientation, but in any given application, one way may be more useful or easier to + understand than another. +

      + +

      Even on top of all that, for a given intrinsic-vs-extrinsic distinction, and a given axes + ordering, there are two sets of angle rotation that will produce the same orientation. For example, + an extrinsic, XZX rotation of (in degrees) 90, -90, 0 is equivalent to an extrinsic, XZX rotation + of -90, 90, -180.

      + +

      As was mentioned, much confusion has historically arisen from talking about an orientation as + a set of three angles without also clearly indicating which of the 24 representational possibilities + one is working within. One aim of Orientation is to reduce that confusion by being explicitly + clear about this issue: an Orientation always carries along with it the indication of the + AxesReference and AxesOrder of the orientation. Methods are provided for converting + an Orientation to and from its associated rotation matrix.

      +
      +
      See Also:
      +
      Euler Angles, +Axis-Angle Representation, +Axes Conventions, +Rotation Matrix
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          axesReference

          +
          public AxesReference axesReference
          +
          whether we have extrinsic or intrinsic rotations
          +
          +
          See Also:
          +
          axesOrder
          +
          +
        • +
        + + + +
          +
        • +

          axesOrder

          +
          public AxesOrder axesOrder
          +
          the order of axes around which our three rotations occur
          +
          +
          See Also:
          +
          axesReference
          +
          +
        • +
        + + + +
          +
        • +

          angleUnit

          +
          public AngleUnit angleUnit
          +
          the unit in which the angles are expressed
          +
        • +
        + + + +
          +
        • +

          firstAngle

          +
          public float firstAngle
          +
          the chronologically first rotation made in the AxesOrder
          +
        • +
        + + + +
          +
        • +

          secondAngle

          +
          public float secondAngle
          +
          the chronologically second rotation made in the AxesOrder
          +
        • +
        + + + +
          +
        • +

          thirdAngle

          +
          public float thirdAngle
          +
          the chronologically third rotation made in the AxesOrder
          +
        • +
        + + + +
          +
        • +

          acquisitionTime

          +
          public long acquisitionTime
          +
          the time on the System.nanoTime() clock at which the data was acquired. If no + timestamp is associated with this particular set of data, this value is zero.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Orientation

          +
          public Orientation()
          +
        • +
        + + + +
          +
        • +

          Orientation

          +
          public Orientation(AxesReference axesReference,
          +                   AxesOrder axesOrder,
          +                   AngleUnit angleUnit,
          +                   float firstAngle,
          +                   float secondAngle,
          +                   float thirdAngle,
          +                   long acquisitionTime)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          toAngleUnit

          +
          public Orientation toAngleUnit(AngleUnit angleUnit)
          +
          Converts this Orientation to one with the indicated angular units.
          +
          +
          Parameters:
          +
          angleUnit - the units to use in the returned [@link Orientation}
          +
          Returns:
          +
          a new [@link Orientation} with the same data but in the indicated units
          +
          +
        • +
        + + + +
          +
        • +

          toAxesReference

          +
          public Orientation toAxesReference(AxesReference axesReference)
          +
          Converts the Orientation to an equivalent one with the indicted point of view.
          +
          +
          Parameters:
          +
          axesReference - whether we wish to consider rotations from an extrinsic or intrinsic point of view
          +
          Returns:
          +
          an equivalent orientation but with the indicated point of view.
          +
          +
        • +
        + + + +
          +
        • +

          toAxesOrder

          +
          public Orientation toAxesOrder(AxesOrder axesOrder)
          +
          Converst the Orientation to an equivalent one with the indicated ordering of axes
          +
          +
          Parameters:
          +
          axesOrder - the desired ordering of axes
          +
          Returns:
          +
          an equivalent orientation with the indicated axes order
          +
          +
        • +
        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        + + + + + + + +
          +
        • +

          getRotationMatrix

          +
          public static OpenGLMatrix getRotationMatrix(AxesReference axesReference,
          +                                             AxesOrder axesOrder,
          +                                             AngleUnit unit,
          +                                             float firstAngle,
          +                                             float secondAngle,
          +                                             float thirdAngle)
          +
          Returns the rotation matrix associated with a particular set of three rotational angles.
          +
          +
          Returns:
          +
          the rotation matrix associated with a particular set of three rotational angles.
          +
          See Also:
          +
          getRotationMatrix(), +Rotation Matrix
          +
          +
        • +
        + + + + + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Position.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Position.html new file mode 100644 index 00000000000..412fe116727 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Position.html @@ -0,0 +1,403 @@ + + + + + +Position + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class Position

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.Position
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class Position
      +extends java.lang.Object
      +
      Instances of Position represent a three-dimensional distance in a particular distance unit.
      +
      +
      See Also:
      +
      Acceleration, +Position
      +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        longacquisitionTime +
        the time on the System.nanoTime() clock at which the data was acquired.
        +
        DistanceUnitunit 
        doublex 
        doubley 
        doublez 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + + +
        Constructors 
        Constructor and Description
        Position() 
        Position(DistanceUnit unit, + double x, + double y, + double z, + long acquisitionTime) 
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          x

          +
          public double x
          +
        • +
        + + + +
          +
        • +

          y

          +
          public double y
          +
        • +
        + + + +
          +
        • +

          z

          +
          public double z
          +
        • +
        + + + +
          +
        • +

          acquisitionTime

          +
          public long acquisitionTime
          +
          the time on the System.nanoTime() clock at which the data was acquired. If no + timestamp is associated with this particular set of data, this value is zero.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Position

          +
          public Position()
          +
        • +
        + + + +
          +
        • +

          Position

          +
          public Position(DistanceUnit unit,
          +                double x,
          +                double y,
          +                double z,
          +                long acquisitionTime)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + + + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Quaternion.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Quaternion.html new file mode 100644 index 00000000000..0df309b6493 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Quaternion.html @@ -0,0 +1,415 @@ + + + + + +Quaternion + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class Quaternion

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.Quaternion
      • +
      +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        longacquisitionTime +
        the time on the System.nanoTime() clock at which the data was acquired.
        +
        floatw 
        floatx 
        floaty 
        floatz 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + + +
        Constructors 
        Constructor and Description
        Quaternion() 
        Quaternion(float w, + float x, + float y, + float z, + long acquisitionTime) 
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          w

          +
          public float w
          +
        • +
        + + + +
          +
        • +

          x

          +
          public float x
          +
        • +
        + + + +
          +
        • +

          y

          +
          public float y
          +
        • +
        + + + +
          +
        • +

          z

          +
          public float z
          +
        • +
        + + + +
          +
        • +

          acquisitionTime

          +
          public long acquisitionTime
          +
          the time on the System.nanoTime() clock at which the data was acquired. If no + timestamp is associated with this particular set of data, this value is zero.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Quaternion

          +
          public Quaternion()
          +
        • +
        + + + +
          +
        • +

          Quaternion

          +
          public Quaternion(float w,
          +                  float x,
          +                  float y,
          +                  float z,
          +                  long acquisitionTime)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          magnitude

          +
          public float magnitude()
          +
        • +
        + + + +
          +
        • +

          normalized

          +
          public Quaternion normalized()
          +
        • +
        + + + +
          +
        • +

          congugate

          +
          public Quaternion congugate()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/RelicRecoveryVuMark.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/RelicRecoveryVuMark.html new file mode 100644 index 00000000000..e0d67abcb9f --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/RelicRecoveryVuMark.html @@ -0,0 +1,403 @@ + + + + + +RelicRecoveryVuMark + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum RelicRecoveryVuMark

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<RelicRecoveryVuMark>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.navigation.RelicRecoveryVuMark
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<RelicRecoveryVuMark>
      +
      +
      +
      +
      public enum RelicRecoveryVuMark
      +extends java.lang.Enum<RelicRecoveryVuMark>
      +
      Instances of RelicRecoveryVuMark represent the VuMarks used in the Relic Recovery + FTC competition of 2017-18.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static RelicRecoveryVuMark[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (RelicRecoveryVuMark c : RelicRecoveryVuMark.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static RelicRecoveryVuMark valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + + + + + + + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Rotation.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Rotation.html new file mode 100644 index 00000000000..3ca9dc5a180 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Rotation.html @@ -0,0 +1,339 @@ + + + + + +Rotation + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum Rotation

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<Rotation>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.navigation.Rotation
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<Rotation>
      +
      +
      +
      +
      public enum Rotation
      +extends java.lang.Enum<Rotation>
      +
      Rotation captures an angluar direction of movement
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        CCW 
        CW 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static RotationvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static Rotation[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static Rotation[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (Rotation c : Rotation.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static Rotation valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/TempUnit.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/TempUnit.html new file mode 100644 index 00000000000..2900140bed7 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/TempUnit.html @@ -0,0 +1,492 @@ + + + + + +TempUnit + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum TempUnit

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<TempUnit>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.navigation.TempUnit
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<TempUnit>
      +
      +
      +
      +
      public enum TempUnit
      +extends java.lang.Enum<TempUnit>
      +
      Instances of TempUnit enumerate a known different temperature scales
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        CELSIUS 
        FARENHEIT 
        KELVIN 
        +
      • +
      + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        bytebVal 
        static doubleCperF 
        static doublezeroCelsiusF 
        static doublezeroCelsiusK 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Static Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        doublefromCelsius(double celsius) 
        doublefromFarenheit(double farenheit) 
        doublefromKelvin(double kelvin) 
        doublefromUnit(TempUnit him, + double his) 
        static TempUnitvalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static TempUnit[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Detail

        + + + +
          +
        • +

          CELSIUS

          +
          public static final TempUnit CELSIUS
          +
        • +
        + + + +
          +
        • +

          FARENHEIT

          +
          public static final TempUnit FARENHEIT
          +
        • +
        + + + +
          +
        • +

          KELVIN

          +
          public static final TempUnit KELVIN
          +
        • +
        +
      • +
      + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static TempUnit[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (TempUnit c : TempUnit.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static TempUnit valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + +
          +
        • +

          fromCelsius

          +
          public double fromCelsius(double celsius)
          +
        • +
        + + + +
          +
        • +

          fromKelvin

          +
          public double fromKelvin(double kelvin)
          +
        • +
        + + + +
          +
        • +

          fromFarenheit

          +
          public double fromFarenheit(double farenheit)
          +
        • +
        + + + +
          +
        • +

          fromUnit

          +
          public double fromUnit(TempUnit him,
          +                       double his)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Temperature.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Temperature.html new file mode 100644 index 00000000000..a82e59d7c87 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Temperature.html @@ -0,0 +1,351 @@ + + + + + +Temperature + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class Temperature

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.Temperature
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class Temperature
      +extends java.lang.Object
      +
      Instances of Temperature represent a temperature in a particular temperature scale.
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        longacquisitionTime +
        the time on the System.nanoTime() clock at which the data was acquired.
        +
        doubletemperature 
        TempUnitunit 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + + +
        Constructors 
        Constructor and Description
        Temperature() 
        Temperature(TempUnit unit, + double temperature, + long acquisitionTime) 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        TemperaturetoUnit(TempUnit tempUnit) 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          temperature

          +
          public double temperature
          +
        • +
        + + + +
          +
        • +

          acquisitionTime

          +
          public long acquisitionTime
          +
          the time on the System.nanoTime() clock at which the data was acquired. If no + timestamp is associated with this particular set of data, this value is zero.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Temperature

          +
          public Temperature()
          +
        • +
        + + + +
          +
        • +

          Temperature

          +
          public Temperature(TempUnit unit,
          +                   double temperature,
          +                   long acquisitionTime)
          +
        • +
        +
      • +
      + + +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/UnnormalizedAngleUnit.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/UnnormalizedAngleUnit.html new file mode 100644 index 00000000000..34c486ea220 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/UnnormalizedAngleUnit.html @@ -0,0 +1,545 @@ + + + + + +UnnormalizedAngleUnit + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum UnnormalizedAngleUnit

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<UnnormalizedAngleUnit>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.navigation.UnnormalizedAngleUnit
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      All Implemented Interfaces:
      +
      java.io.Serializable, java.lang.Comparable<UnnormalizedAngleUnit>
      +
      +
      +
      +
      public enum UnnormalizedAngleUnit
      +extends java.lang.Enum<UnnormalizedAngleUnit>
      +
      An UnnormalizedAngleUnit represents angles in different units of measure and + provides utility methods to convert across units. UnnormalizedAngleUnit does not + maintain angle information information internally, but only helps organize + and use angle measures that may be maintained separately across various contexts. +

      + Angles can be distinguished along (at least) two axes: +

        +
      1. the fundamental unit (radians vs degrees)
      2. +
      3. whether the angular quantity is normalized or not to the range of [-180,+180) degrees
      4. +
      + Normalized angles are of most utility when dealing with physical angles, as normalization + removes ambiguity of representation. In particular, two angles can be compared for equality + by subtracting them, normalizing, and testing whether the absolute value of the result is + smaller than some tolerance threshold. This approach neatly handles all cases of cyclical + wrapping without unexpected discontinuities. +

      +

      + Unnormalized angles can be handy when the angular quantity is not a physical angle but some + related quantity such as an angular velocity or acceleration, where the + quantity in question lacks the 360-degree cyclical equivalence of a physical angle. +

      +

      + AngleUnit expresses normalized angles, while UnnormalizedAngleUnit expresses unnormalized ones +

      +
    • +
    +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          bVal

          +
          public final byte bVal
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static UnnormalizedAngleUnit[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (UnnormalizedAngleUnit c : UnnormalizedAngleUnit.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static UnnormalizedAngleUnit valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + +
          +
        • +

          fromDegrees

          +
          public double fromDegrees(double degrees)
          +
        • +
        + + + +
          +
        • +

          fromDegrees

          +
          public float fromDegrees(float degrees)
          +
        • +
        + + + +
          +
        • +

          fromRadians

          +
          public double fromRadians(double radians)
          +
        • +
        + + + +
          +
        • +

          fromRadians

          +
          public float fromRadians(float radians)
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          toDegrees

          +
          public double toDegrees(double inOurUnits)
          +
        • +
        + + + +
          +
        • +

          toDegrees

          +
          public float toDegrees(float inOurUnits)
          +
        • +
        + + + +
          +
        • +

          toRadians

          +
          public double toRadians(double inOurUnits)
          +
        • +
        + + + +
          +
        • +

          toRadians

          +
          public float toRadians(float inOurUnits)
          +
        • +
        + + + +
          +
        • +

          getNormalized

          +
          public AngleUnit getNormalized()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Velocity.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Velocity.html new file mode 100644 index 00000000000..6108df2a251 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/Velocity.html @@ -0,0 +1,406 @@ + + + + + +Velocity + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class Velocity

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.Velocity
      • +
      +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        longacquisitionTime +
        the time on the System.nanoTime() clock at which the data was acquired.
        +
        DistanceUnitunit +
        The distance units in which this velocity is expressed.
        +
        doublexVeloc 
        doubleyVeloc 
        doublezVeloc 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + + + + +
        Constructors 
        Constructor and Description
        Velocity() 
        Velocity(DistanceUnit unit, + double xVeloc, + double yVeloc, + double zVeloc, + long acquisitionTime) 
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          unit

          +
          public DistanceUnit unit
          +
          The distance units in which this velocity is expressed. The time unit is always "per second".
          +
        • +
        + + + +
          +
        • +

          xVeloc

          +
          public double xVeloc
          +
        • +
        + + + +
          +
        • +

          yVeloc

          +
          public double yVeloc
          +
        • +
        + + + +
          +
        • +

          zVeloc

          +
          public double zVeloc
          +
        • +
        + + + +
          +
        • +

          acquisitionTime

          +
          public long acquisitionTime
          +
          the time on the System.nanoTime() clock at which the data was acquired. If no + timestamp is associated with this particular set of data, this value is zero.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Velocity

          +
          public Velocity()
          +
        • +
        + + + +
          +
        • +

          Velocity

          +
          public Velocity(DistanceUnit unit,
          +                double xVeloc,
          +                double yVeloc,
          +                double zVeloc,
          +                long acquisitionTime)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + + + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuMarkInstanceId.Type.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuMarkInstanceId.Type.html new file mode 100644 index 00000000000..da555fb9167 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuMarkInstanceId.Type.html @@ -0,0 +1,372 @@ + + + + + +VuMarkInstanceId.Type + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum VuMarkInstanceId.Type

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • java.lang.Enum<VuMarkInstanceId.Type>
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId.Type
        • +
        +
      • +
      +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        DATA 
        NUMERIC 
        STRING 
        UNKNOWN 
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + +
        All Methods Static Methods Concrete Methods 
        Modifier and TypeMethod and Description
        static VuMarkInstanceId.TypevalueOf(java.lang.String name) +
        Returns the enum constant of this type with the specified name.
        +
        static VuMarkInstanceId.Type[]values() +
        Returns an array containing the constants of this enum type, in +the order they are declared.
        +
        +
          +
        • + + +

          Methods inherited from class java.lang.Enum

          +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
        • +
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +getClass, notify, notifyAll, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static VuMarkInstanceId.Type[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (VuMarkInstanceId.Type c : VuMarkInstanceId.Type.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static VuMarkInstanceId.Type valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuMarkInstanceId.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuMarkInstanceId.html new file mode 100644 index 00000000000..4e853b6e86f --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuMarkInstanceId.html @@ -0,0 +1,449 @@ + + + + + +VuMarkInstanceId + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class VuMarkInstanceId

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.VuMarkInstanceId
      • +
      +
    • +
    +
    +
      +
    • +
      +
      +
      public class VuMarkInstanceId
      +extends java.lang.Object
      +
      VuMarkInstanceId captures the identifying state decoded from a particular instance + of a Vuforia VuMark.
      +
      +
      See Also:
      +
      com.vuforia.VuMarkTarget, +com.vuforia.InstanceId
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + + + + + +
          +
        • +

          numericValue

          +
          protected int numericValue
          +
        • +
        + + + +
          +
        • +

          stringValue

          +
          protected java.lang.String stringValue
          +
        • +
        + + + +
          +
        • +

          dataValue

          +
          protected byte[] dataValue
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          VuMarkInstanceId

          +
          public VuMarkInstanceId(InstanceId instanceId)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        + + + +
          +
        • +

          dataFrom

          +
          protected static byte[] dataFrom(InstanceId instanceId)
          +
        • +
        + + + + + + + +
          +
        • +

          equals

          +
          public boolean equals(java.lang.Object o)
          +
          +
          Overrides:
          +
          equals in class java.lang.Object
          +
          +
        • +
        + + + +
          +
        • +

          hashCode

          +
          public int hashCode()
          +
          +
          Overrides:
          +
          hashCode in class java.lang.Object
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaBase.TrackingResults.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaBase.TrackingResults.html new file mode 100644 index 00000000000..38bfbe421a5 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaBase.TrackingResults.html @@ -0,0 +1,444 @@ + + + + + +VuforiaBase.TrackingResults + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class VuforiaBase.TrackingResults

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase.TrackingResults
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          name

          +
          public java.lang.String name
          +
        • +
        + + + +
          +
        • +

          isVisible

          +
          public boolean isVisible
          +
        • +
        + + + +
          +
        • +

          isUpdatedRobotLocation

          +
          public boolean isUpdatedRobotLocation
          +
        • +
        + + + + + + + +
          +
        • +

          x

          +
          public float x
          +
        • +
        + + + +
          +
        • +

          y

          +
          public float y
          +
        • +
        + + + +
          +
        • +

          z

          +
          public float z
          +
        • +
        + + + +
          +
        • +

          xAngle

          +
          public float xAngle
          +
        • +
        + + + +
          +
        • +

          yAngle

          +
          public float yAngle
          +
        • +
        + + + +
          +
        • +

          zAngle

          +
          public float zAngle
          +
        • +
        +
      • +
      + + + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          formatAsTransform

          +
          public java.lang.String formatAsTransform()
          +
        • +
        + + + +
          +
        • +

          toJson

          +
          public java.lang.String toJson()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaBase.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaBase.html new file mode 100644 index 00000000000..d0a1b782fbd --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaBase.html @@ -0,0 +1,584 @@ + + + + + +VuforiaBase + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class VuforiaBase

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Direct Known Subclasses:
      +
      VuforiaRelicRecovery, VuforiaRoverRuckus
      +
      +
      +
      +
      public abstract class VuforiaBase
      +extends java.lang.Object
      +
      An abstract base class that provides simplified access to Vuforia.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + + + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          VuforiaBase

          +
          protected VuforiaBase(java.lang.String assetName,
          +                      java.lang.String[] trackableNames,
          +                      OpenGLMatrix[] locationsOnField)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          initialize

          +
          public void initialize(java.lang.String vuforiaLicenseKey,
          +                       VuforiaLocalizer.CameraDirection cameraDirection,
          +                       boolean useExtendedTracking,
          +                       boolean enableCameraMonitoring,
          +                       VuforiaLocalizer.Parameters.CameraMonitorFeedback cameraMonitorFeedback,
          +                       float dx,
          +                       float dy,
          +                       float dz,
          +                       float xAngle,
          +                       float yAngle,
          +                       float zAngle,
          +                       boolean useCompetitionFieldTargetLocations)
          +
          Initializes Vuforia, with a CameraDirection.
          +
        • +
        + + + +
          +
        • +

          initialize

          +
          public void initialize(java.lang.String vuforiaLicenseKey,
          +                       CameraName cameraName,
          +                       java.lang.String webcamCalibrationFilename,
          +                       boolean useExtendedTracking,
          +                       boolean enableCameraMonitoring,
          +                       VuforiaLocalizer.Parameters.CameraMonitorFeedback cameraMonitorFeedback,
          +                       float dx,
          +                       float dy,
          +                       float dz,
          +                       float xAngle,
          +                       float yAngle,
          +                       float zAngle,
          +                       boolean useCompetitionFieldTargetLocations)
          +
          Initializes Vuforia, with a CameraName.
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          activate

          +
          public void activate()
          +
          Activates all trackables, so that it is actively seeking their presence.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          deactivate

          +
          public void deactivate()
          +
          Deactivates all trackables, causing it to no longer see their presence.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          +
        • +
        + + + +
          +
        • +

          track

          +
          public VuforiaBase.TrackingResults track(java.lang.String name)
          +
          Returns the TrackingResults of the trackable with the given name.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          java.lang.IllegalArgumentException - if name is not the name of a trackable.
          +
          +
        • +
        + + + +
          +
        • +

          trackPose

          +
          public VuforiaBase.TrackingResults trackPose(java.lang.String name)
          +
          Returns the TrackingResults of the pose of the trackable with the given name. + The pose is the location of the trackable in the phone's coordinate system.
          +
          +
          Throws:
          +
          java.lang.IllegalStateException - if initialized has not been called yet.
          +
          java.lang.IllegalArgumentException - if name is not the name of a trackable.
          +
          +
        • +
        + + + + + + + + + + + +
          +
        • +

          close

          +
          public void close()
          +
          Deactivates the trackables and cleans up.
          +
        • +
        + + + +
          +
        • +

          printTrackableNames

          +
          public java.lang.String printTrackableNames()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.CameraDirection.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.CameraDirection.html new file mode 100644 index 00000000000..644c4bea030 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.CameraDirection.html @@ -0,0 +1,443 @@ + + + + + +VuforiaLocalizer.CameraDirection + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum VuforiaLocalizer.CameraDirection

    +
    +
    +
      +
    • java.lang.Object
    • +
    • + +
    • +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Enum Constant Summary

        + + + + + + + + + + + + + + + + + +
        Enum Constants 
        Enum Constant and Description
        BACK 
        DEFAULT +
        Using BACK or FRONT is a better choice than DEFAULT
        +
        FRONT 
        UNKNOWN +
        A direction whose particulars are not actually known
        +
        +
      • +
      + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        protected intdirection 
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + + + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          direction

          +
          protected final int direction
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          values

          +
          public static VuforiaLocalizer.CameraDirection[] values()
          +
          Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
          +for (VuforiaLocalizer.CameraDirection c : VuforiaLocalizer.CameraDirection.values())
          +    System.out.println(c);
          +
          +
          +
          Returns:
          +
          an array containing the constants of this enum type, in the order they are declared
          +
          +
        • +
        + + + +
          +
        • +

          valueOf

          +
          public static VuforiaLocalizer.CameraDirection valueOf(java.lang.String name)
          +
          Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
          +
          +
          Parameters:
          +
          name - the name of the enum constant to be returned.
          +
          Returns:
          +
          the enum constant with the specified name
          +
          Throws:
          +
          java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
          +
          java.lang.NullPointerException - if the argument is null
          +
          +
        • +
        + + + +
          +
        • +

          getDirection

          +
          public int getDirection()
          +
        • +
        + + + +
          +
        • +

          from

          +
          public static VuforiaLocalizer.CameraDirection from(java.lang.String string)
          +
          Converts a string to the corresponding camera direction. Returns UNKNOWN on failure.
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.CloseableFrame.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.CloseableFrame.html new file mode 100644 index 00000000000..e61713bcd55 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.CloseableFrame.html @@ -0,0 +1,282 @@ + + + + + +VuforiaLocalizer.CloseableFrame + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class VuforiaLocalizer.CloseableFrame

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • Frame
      • +
      • +
          +
        • org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CloseableFrame
        • +
        +
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing interface:
      +
      VuforiaLocalizer
      +
      +
      +
      +
      public static class VuforiaLocalizer.CloseableFrame
      +extends Frame
      +
      VuforiaLocalizer.CloseableFrame exposes a close() method so that one can proactively + reduce memory pressure when we're done with a Frame
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        CloseableFrame(Frame frame) +
        creating a CloseableFrame also has an effect equivalent to calling frame.clone()
        +
        +
      • +
      + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + +
        All Methods Instance Methods Concrete Methods 
        Modifier and TypeMethod and Description
        voidclose() 
        +
          +
        • + + +

          Methods inherited from class java.lang.Object

          +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          CloseableFrame

          +
          public CloseableFrame(Frame frame)
          +
          creating a CloseableFrame also has an effect equivalent to calling frame.clone()
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          close

          +
          public void close()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.Parameters.CameraMonitorFeedback.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.Parameters.CameraMonitorFeedback.html new file mode 100644 index 00000000000..d867038505a --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.Parameters.CameraMonitorFeedback.html @@ -0,0 +1,373 @@ + + + + + +VuforiaLocalizer.Parameters.CameraMonitorFeedback + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Enum VuforiaLocalizer.Parameters.CameraMonitorFeedback

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.Parameters.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.Parameters.html new file mode 100644 index 00000000000..ac7797d463d --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.Parameters.html @@ -0,0 +1,691 @@ + + + + + +VuforiaLocalizer.Parameters + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class VuforiaLocalizer.Parameters

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.Parameters
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing interface:
      +
      VuforiaLocalizer
      +
      +
      +
      +
      public static class VuforiaLocalizer.Parameters
      +extends java.lang.Object
      +
      VuforiaLocalizer.Parameters provides configuration information for instantiating the Vuforia localizer
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          vuforiaLicenseKey

          +
          public java.lang.String vuforiaLicenseKey
          +
          The license key with which to use Vuforia. Vuforia will not load without a valid license being + provided. Vuforia 'Development' license keys, which is what is needed here, can be obtained + free of charge from the Vuforia developer web site at https://developer.vuforia.com/license-manager + + Valid Vuforia license keys are always 380 characters long, and look as if they contain mostly + random data. As an example, here is a example of a fragment of a valid key: + ... yIgIzTqZ4mWjk9wd3cZO9T1axEqzuhxoGlfOOI2dRzKS4T0hQ8kT ... + Once you've obtained a license key, copy the string form of the key from the Vuforia web site + and paste it in to your code as the value of the 'vuforiaLicenseKey' field of the + VuforiaLocalizer.Parameters instance with which you initialize Vuforia.
          +
        • +
        + + + + + + + +
          +
        • +

          cameraName

          +
          public CameraName cameraName
          +
          If camera is non-null, this value is ignored. + + Otherwise, if this value is neither null nor the 'unknown' camera name, the it indicates + the name of the camera to use with Vuforia. It will be opened as needed. + + Otherwise, if this value is the 'unknown' camera name, then this value is ignored and + cameraDirection is used to indicate the camera. + + Otherwise, this value is null, and an error has occurred.
          +
          +
          See Also:
          +
          camera, +cameraDirection
          +
          +
        • +
        + + + +
          +
        • +

          cameraDirection

          +
          public VuforiaLocalizer.CameraDirection cameraDirection
          +
          If camera is null and cameraName is the 'unknown' camera name, then + this value is used to indicate the camera to use with Vuforia. Note that this value + can only indicate the use of built-in cameras found on a phone.
          +
          +
          See Also:
          +
          camera, +cameraName
          +
          +
        • +
        + + + +
          +
        • +

          useExtendedTracking

          +
          public boolean useExtendedTracking
          +
          Indicates whether to use Vuforia's extended tracking mode. Extended tracking + allows tracking to continue even once an image tracker has gone out of view.
          +
          +
          See Also:
          +
          Vuforia Extended Tracking
          +
          +
        • +
        + + + + + + + + + + + + + + + +
          +
        • +

          fillCameraMonitorViewParent

          +
          public boolean fillCameraMonitorViewParent
          +
          Controls whether the camera monitor should entirely fill the camera monitor view parent + or not. If true, then, depending on the aspect ratios of the camera and the view, some + of the camera's data might not be seen. The default is false, which renders the entire + camera image in the camera monitor view (if the latter is specified).
          +
          +
          See Also:
          +
          cameraMonitorViewIdParent, +cameraMonitorViewParent
          +
          +
        • +
        + + + +
          +
        • +

          activity

          +
          public android.app.Activity activity
          +
          The activity in which the localizer is to run. May be null, in which case + the contextually current activity will be used.
          +
        • +
        + + + +
          +
        • +

          webcamCalibrationResources

          +
          public int[] webcamCalibrationResources
          +
          The resources (if any, may be empty or null) used to provide additional camera calibration data for + webcams used with Vuforia. Using calibrated camera helps increase the accuracy of + Vuforia image target tracking. Calibration for several cameras is built into the FTC SDK; + the optional resources here provides a means for teams to provide calibrations beyond this + built-in set. + + The format required of the XML resource is indicated in the teamwebcamcalibrations + resource provided.
          +
          +
          See Also:
          +
          webcamCalibrationFiles
          +
          +
        • +
        + + + +
          +
        • +

          webcamCalibrationFiles

          +
          public java.io.File[] webcamCalibrationFiles
          +
          Camera calibrations resident in files instead of resources.
          +
          +
          See Also:
          +
          webcamCalibrationResources
          +
          +
        • +
        + + + +
          +
        • +

          maxWebcamAspectRatio

          +
          public double maxWebcamAspectRatio
          +
          Controls the aspect ratios used with webcams. Webcams whose aspect ratio (defined as + width / height) is larger than this value will not be used unless no other viable options exist. + + Example values of some utility include 1920.0 / 1080.0, 640.0 / 480.0, and the like.
          +
          +
          See Also:
          +
          minWebcamAspectRatio
          +
          +
        • +
        + + + +
          +
        • +

          minWebcamAspectRatio

          +
          public double minWebcamAspectRatio
          +
          Controls the aspect ratios used with webcams. Webcams whose aspect ratio (defined as + width / height) is smaller than this value will not be used unless no other viable options exist.
          +
          +
          See Also:
          +
          maxWebcamAspectRatio
          +
          +
        • +
        + + + +
          +
        • +

          secondsUsbPermissionTimeout

          +
          public int secondsUsbPermissionTimeout
          +
          How long to wait for USB permissions when connecting to a webcam.
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          Parameters

          +
          public Parameters()
          +
        • +
        + + + +
          +
        • +

          Parameters

          +
          public Parameters(int cameraMonitorViewIdParent)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          addWebcamCalibrationFile

          +
          public void addWebcamCalibrationFile(java.lang.String name)
          +
        • +
        + + + +
          +
        • +

          addWebcamCalibrationFile

          +
          public void addWebcamCalibrationFile(java.io.File file)
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.html new file mode 100644 index 00000000000..3a960603ac2 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaLocalizer.html @@ -0,0 +1,533 @@ + + + + + +VuforiaLocalizer + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Interface VuforiaLocalizer

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface VuforiaLocalizer
      +
      Robot "localization" denotes a robot's ability to establish its own position and + orientation within its frame of reference. The VuforiaLocalizer interface provides + an interface for interacting with subsystems that can help support localization through + visual means.
      +
      +
      See Also:
      +
      Mobile robot navigation
      +
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          loadTrackablesFromAsset

          +
          VuforiaTrackables loadTrackablesFromAsset(java.lang.String assetName)
          +
          Loads a Vuforia dataset from the indicated application asset, which must be of + type .XML. The corresponding .DAT asset must be a sibling. Note that this operation + can be extremely lengthy, possibly taking a few seconds to execute. Loading datasets + from an asset you stored in your application APK is the recommended approach to + packaging datasets so they always travel along with your code. + +

          Datasets are created using the Vuforia Target Manager

          +
          +
          Parameters:
          +
          assetName - the name of the .XML dataset asset to load
          +
          Returns:
          +
          a DataSet that can be used to manipulate the loaded data
          +
          See Also:
          +
          loadTrackablesFromFile(String)
          +
          +
        • +
        + + + +
          +
        • +

          loadTrackablesFromFile

          +
          VuforiaTrackables loadTrackablesFromFile(java.lang.String absoluteFileName)
          +
          Loads a Vuforia dataset from the indicated file, which must be a .XML file + and contain the full file path. The corresponding .DAT file must be a sibling + file in the same directory. Note that this operation can be extremely lengthy, + possibly taking a few seconds to execute. + +

          Datasets are created using the Vuforia Target Manager

          +
          +
          Parameters:
          +
          absoluteFileName - the full path to the .XML file of the dataset
          +
          Returns:
          +
          a DataSet that can be used to manipulate the loaded data
          +
          See Also:
          +
          loadTrackablesFromAsset(String)
          +
          +
        • +
        + + + +
          +
        • +

          getCamera

          +
          Camera getCamera()
          +
          Provides access to the Camera used by Vuforia. Will be null if a built-in camera + is in use. Note that Vuforia is usually actively interacting with this Camera; users + should on their own not initiate streaming, close the camera, or the like.
          +
        • +
        + + + +
          +
        • +

          getCameraName

          +
          CameraName getCameraName()
          +
          Provides access to the name of the camera used by Vuforia.
          +
        • +
        + + + +
          +
        • +

          getCameraCalibration

          +
          CameraCalibration getCameraCalibration()
          +
          (Advanced) Returns information about Vuforia's knowledge of the camera that it is using.
          +
          +
          Returns:
          +
          information about Vuforia's knowledge of the camera that it is using.
          +
          See Also:
          +
          com.vuforia.Tool#getProjectionGL(CameraCalibration, float, float)
          +
          +
        • +
        + + + +
          +
        • +

          getFrameQueue

          +
          java.util.concurrent.BlockingQueue<VuforiaLocalizer.CloseableFrame> getFrameQueue()
          +
          (Advanced) Returns a queue into which, if requested, Vuforia Frames are placed + as they become available. This provides a means by which camera image data can be accessed + even while the Vuforia engine is running. + +

          While the Vuforia engine is running, it takes exclusive ownership of the camera it is + using. This impedes the ability to also use that camera image data in alternative visual + processing algorithms. However, periodically (at a rate of tens of Hz), the Vuforia engine + makes available Frames containing snapshots from the camera, and through which + camera image data can be retrieved. These can optionally be retrieved through the frame + queue.

          + +

          To access these Frames, call setFrameQueueCapacity(int) to enable the + frame queue. Once enabled, the frame queue can be accessed using getFrameQueue() + and the methods thereon used to access Frames as they become available.

          + +

          When setFrameQueueCapacity(int) is called, any frame queue returned previously by + getFrameQueue() becomes invalid and must be re-fetched.

          +
          +
          Returns:
          +
          a queue through which Vuforia Frames may be retrieved.
          +
          See Also:
          +
          setFrameQueueCapacity(int), +Frame (Java), +Frame (C++), +BlockingQueue
          +
          +
        • +
        + + + +
          +
        • +

          setFrameQueueCapacity

          +
          void setFrameQueueCapacity(int capacity)
          +
          (Advanced) Sets the maximum number of Frames that will simultaneously be stored in the + frame queue. If the queue is full and new Frames become available, older frames + will be discarded. The frame queue initially has a capacity of zero. + +

          Note that calling this method invalidates any frame queue retrieved previously + through getFrameQueue().

          +
          +
          Parameters:
          +
          capacity - the maximum number of items that may be stored in the frame queue
          +
          See Also:
          +
          getFrameQueue(), +getFrameQueueCapacity()
          +
          +
        • +
        + + + +
          +
        • +

          getFrameQueueCapacity

          +
          int getFrameQueueCapacity()
          +
          (Advanced) Returns the current capacity of the frame queue.
          +
          +
          Returns:
          +
          the current capacity of the frame queue.
          +
          See Also:
          +
          setFrameQueueCapacity(int), +getFrameQueue()
          +
          +
        • +
        + + + +
          +
        • +

          getFrameOnce

          +
          void getFrameOnce(<any> frameConsumer)
          +
          (Advanced) Calls the indicated code with a frame from the video stream, exactly once.
          +
          +
          Parameters:
          +
          frameConsumer - the code to call with the to-be-processed frame.
          +
          +
        • +
        + + + +
          +
        • +

          enableConvertFrameToBitmap

          +
          void enableConvertFrameToBitmap()
          +
          (Advanced) Ensures that Vuforia exposes necessary data formats in Frames that allows + convertFrameToBitmap(Frame) to function
          +
        • +
        + + + +
          +
        • +

          enableConvertFrameToFormat

          +
          boolean[] enableConvertFrameToFormat(int... pixelFormats)
          +
          (Advanced) Ask Vuforia to convert frames to the given requested formats. Returns + success/failure result for each format.
          +
          +
          Parameters:
          +
          pixelFormats - Formats to request Vuforia to convert to.
          +
          +
        • +
        + + + +
          +
        • +

          convertFrameToBitmap

          +
          android.graphics.Bitmap convertFrameToBitmap(Frame frame)
          +
          (Advanced) A helper utility that converts a Vuforia Frame into an Android Bitmap.
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaRelicRecovery.TrackingResults.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaRelicRecovery.TrackingResults.html new file mode 100644 index 00000000000..1e6a6d06cd8 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaRelicRecovery.TrackingResults.html @@ -0,0 +1,297 @@ + + + + + +VuforiaRelicRecovery.TrackingResults + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class VuforiaRelicRecovery.TrackingResults

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaRelicRecovery.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaRelicRecovery.html new file mode 100644 index 00000000000..58c4bff30a8 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaRelicRecovery.html @@ -0,0 +1,362 @@ + + + + + +VuforiaRelicRecovery + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class VuforiaRelicRecovery

    +
    +
    + +
    +
      +
    • +
      +
      +
      public class VuforiaRelicRecovery
      +extends VuforiaBase
      +
      A class that provides simplified access to Vuforia for the Relic Recovery game (2017-2018).
      +
    • +
    +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaRoverRuckus.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaRoverRuckus.html new file mode 100644 index 00000000000..07a1cddada1 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaRoverRuckus.html @@ -0,0 +1,305 @@ + + + + + +VuforiaRoverRuckus + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class VuforiaRoverRuckus

    +
    +
    + +
    +
      +
    • +
      +
      +
      public class VuforiaRoverRuckus
      +extends VuforiaBase
      +
      A class that provides simplified access to Vuforia for the Rover Ruckus game (2018-2019).
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          TRACKABLE_NAMES

          +
          public static final java.lang.String[] TRACKABLE_NAMES
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          VuforiaRoverRuckus

          +
          public VuforiaRoverRuckus()
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackable.Listener.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackable.Listener.html new file mode 100644 index 00000000000..108f0c30895 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackable.Listener.html @@ -0,0 +1,276 @@ + + + + + +VuforiaTrackable.Listener + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Interface VuforiaTrackable.Listener

    +
    +
    +
    + +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + + + + + +
          +
        • +

          onNotTracked

          +
          void onNotTracked()
          +
          Called by the system to inform the trackable that it is no longer visible.
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackable.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackable.html new file mode 100644 index 00000000000..3e718a11851 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackable.html @@ -0,0 +1,499 @@ + + + + + +VuforiaTrackable + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Interface VuforiaTrackable

    +
    +
    +
    +
      +
    • +
      +
      +
      public interface VuforiaTrackable
      +
      VuforiaTrackable provides access to an individual trackable Vuforia target.
      +
    • +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setListener

          +
          void setListener(VuforiaTrackable.Listener listener)
          +
          Sets an object that will receive notifications as the VuforiaTrackable + is tracked and is not tracked. If no listener is provided, then a default listener + is used.
          +
          +
          Parameters:
          +
          listener - the object which is to receive tracking notifications regarding this trackable. + If this is null, then a default listener is used. Thus, there is always + a listener associated with a VuforiaTrackable.
          +
          See Also:
          +
          getListener(), +VuforiaTrackableDefaultListener
          +
          +
        • +
        + + + + + + + +
          +
        • +

          setLocationFtcFieldFromTarget

          +
          void setLocationFtcFieldFromTarget(OpenGLMatrix ftcFieldFromTarget)
          +
          Sets the location of the trackable in the the FTC Field Coordinate System. + By default, the location is null, indicating that it is unknown.
          +
          +
          Parameters:
          +
          ftcFieldFromTarget - the location of the trackable in the FTC Field Coordinate System. This + transformation maps coordinates in the Target Coordinate System + to coordinates in the FTC Field Coordinate System.
          +
          See Also:
          +
          getLocation(), +VuforiaTrackableDefaultListener.getRobotLocation(), +setLocation(OpenGLMatrix)
          +
          +
        • +
        + + + + + + + +
          +
        • +

          getFtcFieldFromTarget

          +
          OpenGLMatrix getFtcFieldFromTarget()
          +
          Returns the location of the trackable in the FTC Field Coordinate System. The returned + transformation will map coordinates in the Target Coordinate System to coordinates in the + FTC Field Coordinate System.
          +
          +
          Returns:
          +
          the location of the trackable in the FTC Field Coordinate System.
          +
          See Also:
          +
          setLocationFtcFieldFromTarget(OpenGLMatrix), +getLocation()
          +
          +
        • +
        + + + +
          +
        • +

          getLocation

          +
          OpenGLMatrix getLocation()
          +
          Returns the location of the trackable in the FTC Field Coordinate System. + A synonym for getFtcFieldFromTarget().
          +
          +
          Returns:
          +
          the location of the trackable in the FTC Field Coordinate System.
          +
          +
        • +
        + + + +
          +
        • +

          setUserData

          +
          void setUserData(java.lang.Object object)
          +
          Sets user data to be associated with this trackable object. The SDK does not internally + use this functionality; rather, it is intended as a means by which user code can easily + keep track of trackable-specific state.
          +
          +
          Parameters:
          +
          object - user data to be associated with this trackable object.
          +
          See Also:
          +
          getUserData()
          +
          +
        • +
        + + + +
          +
        • +

          getUserData

          +
          java.lang.Object getUserData()
          +
          Retreives user data previously associated with this trackable object.
          +
          +
          Returns:
          +
          user data previously associated with this trackable object.
          +
          See Also:
          +
          setUserData(Object)
          +
          +
        • +
        + + + + + + + +
          +
        • +

          setName

          +
          void setName(java.lang.String name)
          +
          Sets a user-determined name associated with this trackable. This is mostly useful for debugging.
          +
          +
          Parameters:
          +
          name - a user-determined name
          +
          See Also:
          +
          getName(), +setUserData(Object)
          +
          +
        • +
        + + + +
          +
        • +

          getName

          +
          java.lang.String getName()
          +
          Returns the user-determined name associated with this trackable.
          +
          +
          Returns:
          +
          the user-determined name associated with this trackable.
          +
          See Also:
          +
          setName(String), +VuforiaTrackables.setName(String)
          +
          +
        • +
        + + + +
          +
        • +

          getParent

          +
          VuforiaTrackable getParent()
          +
          Returns the parent trackable with which this trackable is associated, if any.
          +
          +
          Returns:
          +
          the parent trackable with which this trackable is associated, if any.
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackableDefaultListener.PoseAndCamera.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackableDefaultListener.PoseAndCamera.html new file mode 100644 index 00000000000..be09d758df1 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackableDefaultListener.PoseAndCamera.html @@ -0,0 +1,340 @@ + + + + + +VuforiaTrackableDefaultListener.PoseAndCamera + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class VuforiaTrackableDefaultListener.PoseAndCamera

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener.PoseAndCamera
      • +
      +
    • +
    +
    +
      +
    • +
      +
      Enclosing class:
      +
      VuforiaTrackableDefaultListener
      +
      +
      +
      +
      protected static class VuforiaTrackableDefaultListener.PoseAndCamera
      +extends java.lang.Object
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Summary

        + + + + + + + + + + + + + + +
        Fields 
        Modifier and TypeField and Description
        CameraNamecameraName 
        VuforiaPoseMatrixpose 
        +
      • +
      + +
        +
      • + + +

        Constructor Summary

        + + + + + + + + +
        Constructors 
        Constructor and Description
        PoseAndCamera(VuforiaPoseMatrix pose, + CameraName cameraName) 
        +
      • +
      + + +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Field Detail

        + + + +
          +
        • +

          pose

          +
          public final VuforiaPoseMatrix pose
          +
        • +
        + + + +
          +
        • +

          cameraName

          +
          public final CameraName cameraName
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Constructor Detail

        + + + +
          +
        • +

          PoseAndCamera

          +
          public PoseAndCamera(VuforiaPoseMatrix pose,
          +                     CameraName cameraName)
          +
        • +
        +
      • +
      + +
        +
      • + + +

        Method Detail

        + + + + + + + +
          +
        • +

          toString

          +
          public java.lang.String toString()
          +
          +
          Overrides:
          +
          toString in class java.lang.Object
          +
          +
        • +
        +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackableDefaultListener.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackableDefaultListener.html new file mode 100644 index 00000000000..bea8e15d459 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackableDefaultListener.html @@ -0,0 +1,1225 @@ + + + + + +VuforiaTrackableDefaultListener + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Class VuforiaTrackableDefaultListener

    +
    +
    +
      +
    • java.lang.Object
    • +
    • +
        +
      • org.firstinspires.ftc.robotcore.external.navigation.VuforiaTrackableDefaultListener
      • +
      +
    • +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackables.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackables.html new file mode 100644 index 00000000000..fb753aaabb7 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/VuforiaTrackables.html @@ -0,0 +1,347 @@ + + + + + +VuforiaTrackables + + + + + + + + + + + +
    +
    org.firstinspires.ftc.robotcore.external.navigation
    +

    Interface VuforiaTrackables

    +
    +
    +
    + +
    +
    +
      +
    • + +
        +
      • + + +

        Method Summary

        + + + + + + + + + + + + + + + + + + + + + + + + + + +
        All Methods Instance Methods Abstract Methods 
        Modifier and TypeMethod and Description
        voidactivate() +
        Activates this trackables so that its localizer is actively seeking the presence + of the trackables that it contains.
        +
        voiddeactivate() +
        Deactivates this trackables, causing its localizer to no longer see the presence + of the trackables it contains.
        +
        VuforiaLocalizergetLocalizer() +
        Returns the VuforiaLocalizer which manages this list of trackables.
        +
        java.lang.StringgetName() +
        Returns the user-specified name for this trackables.
        +
        voidsetName(java.lang.String name) +
        Sets the name for this VuforiaTrackables and any of its contained + trackables which do not already have a user-specified name
        +
        +
          +
        • + + +

          Methods inherited from interface java.util.List

          +add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
        • +
        +
          +
        • + + +

          Methods inherited from interface java.util.Collection

          +parallelStream, removeIf, stream
        • +
        +
          +
        • + + +

          Methods inherited from interface java.lang.Iterable

          +forEach
        • +
        +
      • +
      +
    • +
    +
    +
    +
      +
    • + +
        +
      • + + +

        Method Detail

        + + + +
          +
        • +

          setName

          +
          void setName(java.lang.String name)
          +
          Sets the name for this VuforiaTrackables and any of its contained + trackables which do not already have a user-specified name
          +
          +
          Parameters:
          +
          name - the name for this trackables
          +
          See Also:
          +
          getName()
          +
          +
        • +
        + + + +
          +
        • +

          getName

          +
          java.lang.String getName()
          +
          Returns the user-specified name for this trackables.
          +
          +
          Returns:
          +
          the user-specified name for this trackables.
          +
          See Also:
          +
          setName(String)
          +
          +
        • +
        + + + +
          +
        • +

          activate

          +
          void activate()
          +
          Activates this trackables so that its localizer is actively seeking the presence + of the trackables that it contains.
          +
          +
          See Also:
          +
          deactivate()
          +
          +
        • +
        + + + +
          +
        • +

          deactivate

          +
          void deactivate()
          +
          Deactivates this trackables, causing its localizer to no longer see the presence + of the trackables it contains.
          +
          +
          See Also:
          +
          activate()
          +
          +
        • +
        + + + + +
      • +
      +
    • +
    +
    +
    + + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/package-frame.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/package-frame.html new file mode 100644 index 00000000000..bcdc3d39800 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/package-frame.html @@ -0,0 +1,62 @@ + + + + + +org.firstinspires.ftc.robotcore.external.navigation + + + + +

    org.firstinspires.ftc.robotcore.external.navigation

    + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/package-summary.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/package-summary.html new file mode 100644 index 00000000000..d993384eef6 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/package-summary.html @@ -0,0 +1,391 @@ + + + + + +org.firstinspires.ftc.robotcore.external.navigation + + + + + + + + + + +
    +

    Package org.firstinspires.ftc.robotcore.external.navigation

    +
    +
    + +
    + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/package-tree.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/package-tree.html new file mode 100644 index 00000000000..87b4b9e5745 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/navigation/package-tree.html @@ -0,0 +1,208 @@ + + + + + +org.firstinspires.ftc.robotcore.external.navigation Class Hierarchy + + + + + + + + + + +
    +

    Hierarchy For Package org.firstinspires.ftc.robotcore.external.navigation

    +Package Hierarchies: + +
    +
    +

    Class Hierarchy

    + +

    Interface Hierarchy

    + +

    Enum Hierarchy

    + +
    + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/package-frame.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/package-frame.html new file mode 100644 index 00000000000..a473907040e --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/package-frame.html @@ -0,0 +1,53 @@ + + + + + +org.firstinspires.ftc.robotcore.external + + + + +

    org.firstinspires.ftc.robotcore.external

    + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/package-summary.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/package-summary.html new file mode 100644 index 00000000000..03340bf8b06 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/package-summary.html @@ -0,0 +1,311 @@ + + + + + +org.firstinspires.ftc.robotcore.external + + + + + + + + + + +
    +

    Package org.firstinspires.ftc.robotcore.external

    +
    +
    + +
    + + + + + + diff --git a/doc/javadoc/org/firstinspires/ftc/robotcore/external/package-tree.html b/doc/javadoc/org/firstinspires/ftc/robotcore/external/package-tree.html new file mode 100644 index 00000000000..4454745f443 --- /dev/null +++ b/doc/javadoc/org/firstinspires/ftc/robotcore/external/package-tree.html @@ -0,0 +1,176 @@ + + + + + +org.firstinspires.ftc.robotcore.external Class Hierarchy + + + + + + + + + + +
    +

    Hierarchy For Package org.firstinspires.ftc.robotcore.external

    +Package Hierarchies: + +
    +
    +

    Class Hierarchy

    + +

    Interface Hierarchy

    + +

    Annotation Type Hierarchy

    +
      +
    • org.firstinspires.ftc.robotcore.external.NonConst (implements java.lang.annotation.Annotation)
    • +
    • org.firstinspires.ftc.robotcore.external.Const (implements java.lang.annotation.Annotation)
    • +
    +

    Enum Hierarchy

    + +
    + + + + + + diff --git a/doc/javadoc/overview-frame.html b/doc/javadoc/overview-frame.html new file mode 100644 index 00000000000..93f4677da73 --- /dev/null +++ b/doc/javadoc/overview-frame.html @@ -0,0 +1,29 @@ + + + + + +Overview List + + + + + + +

     

    + + diff --git a/doc/javadoc/overview-summary.html b/doc/javadoc/overview-summary.html new file mode 100644 index 00000000000..6456f4b31b6 --- /dev/null +++ b/doc/javadoc/overview-summary.html @@ -0,0 +1,176 @@ + + + + + +Overview + + + + + + + +
    + + + + + + + +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Packages 
    PackageDescription
    com.qualcomm.ftccommon +
    Classes common to FTC aps
    +
    com.qualcomm.robotcore.eventloop +
    RobotCore event loop library.
    +
    com.qualcomm.robotcore.eventloop.opmode 
    com.qualcomm.robotcore.exception +
    RobotCore exception library.
    +
    com.qualcomm.robotcore.hardware +
    RobotCore hardware library.
    +
    com.qualcomm.robotcore.util 
    org.firstinspires.ftc.robotcore.external 
    org.firstinspires.ftc.robotcore.external.android 
    org.firstinspires.ftc.robotcore.external.matrices 
    org.firstinspires.ftc.robotcore.external.navigation 
    +
    + +
    + + + + + + + +
    + + + + diff --git a/doc/javadoc/overview-tree.html b/doc/javadoc/overview-tree.html new file mode 100644 index 00000000000..ca9efe26795 --- /dev/null +++ b/doc/javadoc/overview-tree.html @@ -0,0 +1,741 @@ + + + + + +Class Hierarchy + + + + + + + +
    + + + + + + + +
    + + + +
    +

    Class Hierarchy

    + +

    Interface Hierarchy

    + +

    Annotation Type Hierarchy

    +
      +
    • com.qualcomm.robotcore.eventloop.opmode.Autonomous (implements java.lang.annotation.Annotation)
    • +
    • com.qualcomm.robotcore.eventloop.opmode.Disabled (implements java.lang.annotation.Annotation)
    • +
    • com.qualcomm.robotcore.eventloop.opmode.OpModeRegistrar (implements java.lang.annotation.Annotation)
    • +
    • com.qualcomm.robotcore.eventloop.opmode.TeleOp (implements java.lang.annotation.Annotation)
    • +
    • org.firstinspires.ftc.robotcore.external.Const (implements java.lang.annotation.Annotation)
    • +
    • org.firstinspires.ftc.robotcore.external.NonConst (implements java.lang.annotation.Annotation)
    • +
    +

    Enum Hierarchy

    + +
    + +
    + + + + + + + +
    + + + + diff --git a/doc/javadoc/package-list b/doc/javadoc/package-list new file mode 100644 index 00000000000..849d6f0f4eb --- /dev/null +++ b/doc/javadoc/package-list @@ -0,0 +1,10 @@ +com.qualcomm.ftccommon +com.qualcomm.robotcore.eventloop +com.qualcomm.robotcore.eventloop.opmode +com.qualcomm.robotcore.exception +com.qualcomm.robotcore.hardware +com.qualcomm.robotcore.util +org.firstinspires.ftc.robotcore.external +org.firstinspires.ftc.robotcore.external.android +org.firstinspires.ftc.robotcore.external.matrices +org.firstinspires.ftc.robotcore.external.navigation diff --git a/doc/javadoc/script.js b/doc/javadoc/script.js new file mode 100644 index 00000000000..b3463569314 --- /dev/null +++ b/doc/javadoc/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/doc/javadoc/serialized-form.html b/doc/javadoc/serialized-form.html new file mode 100644 index 00000000000..14e865e1a59 --- /dev/null +++ b/doc/javadoc/serialized-form.html @@ -0,0 +1,170 @@ + + + + + +Serialized Form + + + + + + + + + + +
    +

    Serialized Form

    +
    +
    + +
    + + + + + + diff --git a/doc/javadoc/stylesheet.css b/doc/javadoc/stylesheet.css new file mode 100644 index 00000000000..98055b22d6d --- /dev/null +++ b/doc/javadoc/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/doc/legal/AudioBlocksSounds.txt b/doc/legal/AudioBlocksSounds.txt new file mode 100644 index 00000000000..4eab3bc0fd1 --- /dev/null +++ b/doc/legal/AudioBlocksSounds.txt @@ -0,0 +1,21 @@ +The sound files listed below in this SDK were purchased from www.audioblocks.com under the +following license. + + http://support.audioblocks.com/customer/en/portal/topics/610636-licensing-faq-s/articles + + How am I allowed to use your content? + Last Updated: Aug 11, 2016 01:51PM EDT + Our content may be used for nearly any project, commercial or otherwise, including feature + films, broadcast, commercial, industrial, educational video, print projects, multimedia, + games, and the internet, so long as substantial value is added to the content. (For example, + incorporating an audio clip into a commercial qualifies, while reposting our audio clip on + YouTube with no modification or no visual component does not.) Once you download a file it is + yours to keep and use forever, royalty- free, even if you change your subscription or cancel + your account. + +List of applicable sound files + + chimeconnect.wav + chimedisconnect.wav + errormessage.wav + warningmessage.wav \ No newline at end of file diff --git a/doc/legal/Exhibit A - LEGO Open Source License Agreement.txt b/doc/legal/Exhibit A - LEGO Open Source License Agreement.txt new file mode 100644 index 00000000000..10c13b93d41 --- /dev/null +++ b/doc/legal/Exhibit A - LEGO Open Source License Agreement.txt @@ -0,0 +1,15 @@ +EXHIBIT A - LEGO® Open Source License Agreement + +The contents of the file 'nxtstartupsound.wav' contained in this SDK are subject to the +LEGO® Open Source License Agreement Version 1.0 (the "License"); you may not use this +file except in compliance with the License. You may obtain a copy of the License +at "LEGO Open Source License.pdf" contained in the same directory as this exhibit. + +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT +WARRANTY OF ANY KIND, either express or implied. See the License for the specific +language governing rights and limitations under the License. + +The Original Code is \AT91SAM7S256\Resource\SOUNDS\!Startup.rso. +LEGO is the owner of the Original Code. Portions created by Robert Atkinson are +Copyright (C) 2015. All Rights Reserved. +Contributor(s): Robert Atkinson. \ No newline at end of file diff --git a/doc/legal/LEGO Open Source License.pdf b/doc/legal/LEGO Open Source License.pdf new file mode 100644 index 00000000000..91884984712 Binary files /dev/null and b/doc/legal/LEGO Open Source License.pdf differ diff --git a/doc/media/PullRequest.PNG b/doc/media/PullRequest.PNG new file mode 100644 index 00000000000..8cba3a987b6 Binary files /dev/null and b/doc/media/PullRequest.PNG differ diff --git a/doc/media/chips.jpg b/doc/media/chips.jpg new file mode 100644 index 00000000000..95005b9a256 Binary files /dev/null and b/doc/media/chips.jpg differ diff --git a/doc/media/readme.md b/doc/media/readme.md new file mode 100644 index 00000000000..43825a2e311 --- /dev/null +++ b/doc/media/readme.md @@ -0,0 +1,5 @@ +## Vuforia Localizer Sample Image Targets + +The files in this folder are the printable images that correspond to the sample +trackable data sets that have been included with integration of Vuforia to the +FTC SDK. See the ConceptVuforiaNavigation.java OpMode for details. diff --git a/doc/media/stones.jpg b/doc/media/stones.jpg new file mode 100644 index 00000000000..0eeb19fb2da Binary files /dev/null and b/doc/media/stones.jpg differ diff --git a/doc/media/target_chips_A4.pdf b/doc/media/target_chips_A4.pdf new file mode 100644 index 00000000000..7dfbaf956ef Binary files /dev/null and b/doc/media/target_chips_A4.pdf differ diff --git a/doc/media/target_chips_USLetter.pdf b/doc/media/target_chips_USLetter.pdf new file mode 100644 index 00000000000..281895b9a99 Binary files /dev/null and b/doc/media/target_chips_USLetter.pdf differ diff --git a/doc/media/target_stones_A4.pdf b/doc/media/target_stones_A4.pdf new file mode 100644 index 00000000000..200415bb9bf Binary files /dev/null and b/doc/media/target_stones_A4.pdf differ diff --git a/doc/media/target_stones_USLetter.pdf b/doc/media/target_stones_USLetter.pdf new file mode 100644 index 00000000000..599d335628e Binary files /dev/null and b/doc/media/target_stones_USLetter.pdf differ diff --git a/doc/tutorial/README.txt b/doc/tutorial/README.txt new file mode 100644 index 00000000000..a4752bce065 --- /dev/null +++ b/doc/tutorial/README.txt @@ -0,0 +1,7 @@ +What happened to the FTC Software Development Tutorials??? + +In an effort to save space and reduce download time, the older (and outdated) tutorial documents (FTCTraining_Manual.pdf, FTC_FieldCoordinateSystemDefinition.pdf, FTC_NextGenGuide.pdf, and FTC_ZTE_ChannelChange.pdf) have been removed. + +You can find the releveant PDF files attached to the "Releases" page of the GitHub repository: + +https://github.com/ftctechnh/ftc_app/releases diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000000..01b8bf6b1f9 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..caf54fa2801 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip diff --git a/gradlew b/gradlew new file mode 100644 index 00000000000..91a7e269e19 --- /dev/null +++ b/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 00000000000..8a0b282aa68 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/libs/Analytics-release.aar b/libs/Analytics-release.aar new file mode 100644 index 00000000000..8752cf9f278 Binary files /dev/null and b/libs/Analytics-release.aar differ diff --git a/libs/Blocks-release-sources.jar b/libs/Blocks-release-sources.jar new file mode 100644 index 00000000000..fd7662cf3a2 Binary files /dev/null and b/libs/Blocks-release-sources.jar differ diff --git a/libs/Blocks-release.aar b/libs/Blocks-release.aar new file mode 100644 index 00000000000..bd33c1869a1 Binary files /dev/null and b/libs/Blocks-release.aar differ diff --git a/libs/FtcCommon-release-sources.jar b/libs/FtcCommon-release-sources.jar new file mode 100644 index 00000000000..2a786f2028c Binary files /dev/null and b/libs/FtcCommon-release-sources.jar differ diff --git a/libs/FtcCommon-release.aar b/libs/FtcCommon-release.aar new file mode 100644 index 00000000000..4e746d0c890 Binary files /dev/null and b/libs/FtcCommon-release.aar differ diff --git a/libs/Hardware-release-sources.jar b/libs/Hardware-release-sources.jar new file mode 100644 index 00000000000..3eb3204deb7 Binary files /dev/null and b/libs/Hardware-release-sources.jar differ diff --git a/libs/Hardware-release.aar b/libs/Hardware-release.aar new file mode 100644 index 00000000000..cefa52c682b Binary files /dev/null and b/libs/Hardware-release.aar differ diff --git a/libs/Inspection-release-sources.jar b/libs/Inspection-release-sources.jar new file mode 100644 index 00000000000..ae045d7bc47 Binary files /dev/null and b/libs/Inspection-release-sources.jar differ diff --git a/libs/Inspection-release.aar b/libs/Inspection-release.aar new file mode 100644 index 00000000000..bf3c9301e48 Binary files /dev/null and b/libs/Inspection-release.aar differ diff --git a/libs/OnBotJava-release-sources.jar b/libs/OnBotJava-release-sources.jar new file mode 100644 index 00000000000..3a98b08f844 Binary files /dev/null and b/libs/OnBotJava-release-sources.jar differ diff --git a/libs/OnBotJava-release.aar b/libs/OnBotJava-release.aar new file mode 100644 index 00000000000..a25a3d43b57 Binary files /dev/null and b/libs/OnBotJava-release.aar differ diff --git a/libs/README.txt b/libs/README.txt new file mode 100644 index 00000000000..3d3485239dd --- /dev/null +++ b/libs/README.txt @@ -0,0 +1 @@ +Location of external libs diff --git a/libs/RobotCore-release-sources.jar b/libs/RobotCore-release-sources.jar new file mode 100644 index 00000000000..cd5d0c41f13 Binary files /dev/null and b/libs/RobotCore-release-sources.jar differ diff --git a/libs/RobotCore-release.aar b/libs/RobotCore-release.aar new file mode 100644 index 00000000000..9e3e1c4e8f7 Binary files /dev/null and b/libs/RobotCore-release.aar differ diff --git a/libs/RobotServer-release-sources.jar b/libs/RobotServer-release-sources.jar new file mode 100644 index 00000000000..60b056d023c Binary files /dev/null and b/libs/RobotServer-release-sources.jar differ diff --git a/libs/RobotServer-release.aar b/libs/RobotServer-release.aar new file mode 100644 index 00000000000..b3766c4d9cd Binary files /dev/null and b/libs/RobotServer-release.aar differ diff --git a/libs/Vuforia.jar b/libs/Vuforia.jar new file mode 100644 index 00000000000..43bf627cde2 Binary files /dev/null and b/libs/Vuforia.jar differ diff --git a/libs/WirelessP2p-release.aar b/libs/WirelessP2p-release.aar new file mode 100644 index 00000000000..08e72e7a82c Binary files /dev/null and b/libs/WirelessP2p-release.aar differ diff --git a/libs/armeabi-v7a/libVuforia.so b/libs/armeabi-v7a/libVuforia.so new file mode 100644 index 00000000000..b8ef4f79314 Binary files /dev/null and b/libs/armeabi-v7a/libVuforia.so differ diff --git a/libs/ftc.debug.keystore b/libs/ftc.debug.keystore new file mode 100644 index 00000000000..a7204e66d94 Binary files /dev/null and b/libs/ftc.debug.keystore differ diff --git a/libs/tensorflow-lite-0.0.0-nightly.aar b/libs/tensorflow-lite-0.0.0-nightly.aar new file mode 100644 index 00000000000..01095bcd40b Binary files /dev/null and b/libs/tensorflow-lite-0.0.0-nightly.aar differ diff --git a/libs/tfod-release.aar b/libs/tfod-release.aar new file mode 100644 index 00000000000..197173d3d9c Binary files /dev/null and b/libs/tfod-release.aar differ diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000000..9e2cfb3b4b0 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,2 @@ +include ':FtcRobotController' +include ':TeamCode'