aboutsummaryrefslogtreecommitdiff
path: root/FtcRobotController/src
diff options
context:
space:
mode:
Diffstat (limited to 'FtcRobotController/src')
-rw-r--r--FtcRobotController/src/main/AndroidManifest.xml9
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptRegisterOpModes.java118
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/HardwareK9bot.java103
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/HardwarePushbotMatrix.java103
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/K9botTeleopTank_Linear.java120
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotAutoDriveToLine_Linear.java1
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotTeleopPOV_Linear.java1
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/PushbotTeleopTank_Iterative.java1
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorHTColor.java139
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorHTGyro.java102
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorLEGOLight.java99
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorLEGOTouch.java74
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/readme.md1
-rw-r--r--FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/sample_conventions.md1
14 files changed, 7 insertions, 865 deletions
diff --git a/FtcRobotController/src/main/AndroidManifest.xml b/FtcRobotController/src/main/AndroidManifest.xml
index 387f1bb..4bf2994 100644
--- a/FtcRobotController/src/main/AndroidManifest.xml
+++ b/FtcRobotController/src/main/AndroidManifest.xml
@@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.qualcomm.ftcrobotcontroller"
- android:versionCode="28"
- android:versionName="4.0">
+ android:versionCode="29"
+ android:versionName="4.1">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
@@ -33,6 +33,11 @@
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
+
+ <meta-data
+ android:name="org.firstinspires.main.entry"
+ android:value="true"
+ />
</activity>
<!-- The robot controller service in which most of the robot functionality is managed -->
diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptRegisterOpModes.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptRegisterOpModes.java
deleted file mode 100644
index 2427c7f..0000000
--- a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptRegisterOpModes.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/* --------------------------------------------------------------------------------
- * *** WARNING **** *** WARNING **** *** WARNING **** *** WARNING ****
- * This code is only designed to be used in the Android Studio code Environment.
- * It will not build if it is imported as a sample into the OnBot Java environment.
- * -------------------------------------------------------------------------------*/
-
-/* 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.OpModeManager;
-import com.qualcomm.robotcore.eventloop.opmode.OpModeRegistrar;
-
-import org.firstinspires.ftc.robotcontroller.external.samples.*;
-
-/**
- * This class demonstrates how to manually register opmodes.
- *
- * Note: It is NOT required to manually register OpModes, but this method is provided to support teams that
- * want to have centralized control over their opmode lists.
- * This sample is ALSO handy to use to selectively register the other sample opmodes.
- * Just copy/paste this sample to the TeamCode module and then uncomment the opmodes you wish to run.
- *
- * How it works:
- * The registerMyOpmodes method will be called by the system during the automatic registration process
- * You can register any of the opmodes in your App. by making manager.register() calls inside registerMyOpmodes();
- *
- * Note:
- * Even though you are performing a manual Registration, you should set the Annotations on your classes so they
- * can be placed into the correct Driver Station OpMode list... eg:
- *
- * @Autonomous(name="DriveAndScoreRed", group ="Red")
- * or
- * @TeleOp(name="FastDrive", group ="A-Team")
- *
- * Use Android Studio to Copy this Class, and Paste it into your team's code folder with a new name.
- * Then uncomment and copy the manager.register() call to register as many of your OpModes as you like.
- * You can even use it to temporarily register samples directly from the robotController/external/samples folder.
- */
-public class ConceptRegisterOpModes
-{
- @OpModeRegistrar
- public static void registerMyOpModes(OpModeManager manager) {
- // Un-comment any line to enable that sample.
- // Or add your own lines to register your Team opmodes.
-
- // Basic Templates
- // manager.register("Iterative Opmode", BasicOpMode_Iterative.class);
- // manager.register("Linear Opmode", BasicOpMode_Linear.class);
-
- // Driving Samples
- // manager.register("Teleop POV", PushbotTeleopPOV_Linear.class);
- // manager.register("Teleop Tank", PushbotTeleopTank_Iterative.class);
- // manager.register("Auto Drive Gyro", PushbotAutoDriveByGyro_Linear.class);
- // manager.register("Auto Drive Encoder", PushbotAutoDriveByEncoder_Linear.class);
- // manager.register("Auto Drive Time", PushbotAutoDriveByTime_Linear.class);
- // manager.register("Auto Drive Line", PushbotAutoDriveToLine_Linear.class);
- // manager.register("K9 Telop", K9botTeleopTank_Linear.class);
-
- // Sensor Samples
- // manager.register("BNO055 IMU", SensorBNO055IMU.class);
- // manager.register("BNO055 IMU Cal", SensorBNO055IMUCalibration.class);
- // manager.register("AdaFruit Color", SensorAdafruitRGB.class);
- // manager.register("Digital Touch", SensorDigitalTouch.class);
- // manager.register("DIM DIO", SensorDIO.class);
- // manager.register("HT Color", SensorHTColor.class);
- // manager.register("HT Gyro", SensorHTGyro.class);
- // manager.register("LEGO Light", SensorLEGOLight.class);
- // manager.register("LEGO Touch", SensorLEGOTouch.class);
- // manager.register("MR Color", SensorMRColor.class);
- // manager.register("MR Compass", SensorMRCompass.class);
- // manager.register("MR Gyro", SensorMRGyro.class);
- // manager.register("MR IR Seeker", SensorMRIrSeeker.class);
- // manager.register("MR ODS", SensorMROpticalDistance.class);
- // manager.register("MR Range Sensor", SensorMRRangeSensor.class);
- // manager.register("REV Color Distance", SensorREVColorDistance.class);
-
- // Concept Samples
- // manager.register("Null Op", ConceptNullOp.class);
- // manager.register("Compass Calibration", ConceptCompassCalibration.class);
- // manager.register("DIM as Indicator", ConceptDIMAsIndicator.class);
- // manager.register("I2C Address Change", ConceptI2cAddressChange.class);
- // manager.register("Ramp Motor Speed", ConceptRampMotorSpeed.class);
- // manager.register("Scan Servo", ConceptScanServo.class);
- // manager.register("Telemetry", ConceptTelemetry.class);
- // manager.register("Vuforia Navigation", ConceptVuforiaNavigation.class);
- // manager.register("Vuforia Navigation Webcam", ConceptVuforiaNavigationWebcam.class);
- // manager.register("Vuforia VuMarkID", ConceptVuforiaVuMarkIdentification.class);
- // manager.register("Vuforia VuMarkID Webcam", ConceptVuforiaVuMarkIdentificationWebcam.class);
- }
-}
diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/HardwareK9bot.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/HardwareK9bot.java
deleted file mode 100644
index bf5aa82..0000000
--- a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/HardwareK9bot.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/* 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 K9 robot.
- *
- * 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"
- * Servo channel: Servo to raise/lower arm: "arm"
- * Servo channel: Servo to open/close claw: "claw"
- *
- * Note: the configuration of the servos is such that:
- * As the arm servo approaches 0, the arm position moves up (away from the floor).
- * As the claw servo approaches 0, the claw opens up (drops the game element).
- */
-public class HardwareK9bot
-{
- /* Public OpMode members. */
- public DcMotor leftDrive = null;
- public DcMotor rightDrive = null;
- public Servo arm = null;
- public Servo claw = null;
-
- public final static double ARM_HOME = 0.2;
- public final static double CLAW_HOME = 0.2;
- public final static double ARM_MIN_RANGE = 0.20;
- public final static double ARM_MAX_RANGE = 0.90;
- public final static double CLAW_MIN_RANGE = 0.20;
- public final static double CLAW_MAX_RANGE = 0.7;
-
- /* Local OpMode members. */
- HardwareMap hwMap = null;
- private ElapsedTime period = new ElapsedTime();
-
- /* Constructor */
- public HardwareK9bot() {
- }
-
- /* Initialize standard Hardware interfaces */
- public void init(HardwareMap ahwMap) {
- // save reference to HW Map
- hwMap = ahwMap;
-
- // Define and Initialize Motors
- leftDrive = hwMap.get(DcMotor.class, "left_drive");
- rightDrive = hwMap.get(DcMotor.class, "right_drive");
- leftDrive.setDirection(DcMotor.Direction.REVERSE);
-
- // Set all motors to zero power
- leftDrive.setPower(0);
- rightDrive.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);
-
- // Define and initialize ALL installed servos.
- arm = hwMap.get(Servo.class, "arm");
- claw = hwMap.get(Servo.class, "claw");
- arm.setPosition(ARM_HOME);
- claw.setPosition(CLAW_HOME);
- }
-}
diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/HardwarePushbotMatrix.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/HardwarePushbotMatrix.java
deleted file mode 100644
index 3dafa8f..0000000
--- a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/HardwarePushbotMatrix.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/* 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.matrix.MatrixDcMotorController;
-import com.qualcomm.robotcore.hardware.HardwareMap;
-import com.qualcomm.robotcore.hardware.ServoController;
-
-/**
- * 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, using Matrix Hardware.
- * See PushbotTeleopTank_Iterative for a usage examples.
- *
- * This is coded as an Extension of HardwarePushbot to illustrate that the only additional
- * action REQUIRED for a MATRIX controller is enabling the Servos.
- *
- * 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.
- *
- * Matrix Controller has been assigned the name: "matrix controller"
- *
- * 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"
- *
- * In addition, the Matrix Controller has been assigned the name: "matrix controller"
- */
-public class HardwarePushbotMatrix extends HardwarePushbot
-{
- /* Public OpMode members. */
- private MatrixDcMotorController matrixMotorController = null;
- private ServoController matrixServoController = null;
-
- /* Constructor */
- public HardwarePushbotMatrix(){
-
- }
-
- /* Initialize standard Hardware interfaces */
- public void init(HardwareMap ahwMap) {
-
- // Initialize base Motor and Servo objects
- super.init(ahwMap);
-
- /*
- * Matrix controllers are special.
- *
- * A Matrix controller is one controller with both motors and servos
- * but software wants to treat it as two distinct controllers, one
- * DcMotorController, and one ServoController.
- *
- * We accomplish this by initializing Motor and Servo controller with the same name
- * given in the configuration. In the example below the name of the controller is
- * "MatrixController"
- *
- * Normally we don't need to access the controllers themselves, we deal directly with
- * the Motor and Servo objects, but the Matrix interface is different.
- *
- * In order to activate the servos, they need to be enabled on the controller with
- * a call to pwmEnable() and disabled with a call to pwmDisable()
- *
- * Also, the Matrix Motor controller interface provides a call that enables all motors to
- * updated simultaneously (with the same value).
- */
-
- // Initialize Matrix Motor and Servo objects
- matrixMotorController = ahwMap.get(MatrixDcMotorController.class, "matrix controller");
- matrixServoController = ahwMap.get(ServoController.class, "matrix controller");
-
- // Enable Servos
- matrixServoController.pwmEnable(); // Don't forget to enable Matrix Output
- }
-}
diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/K9botTeleopTank_Linear.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/K9botTeleopTank_Linear.java
deleted file mode 100644
index 41494f7..0000000
--- a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/K9botTeleopTank_Linear.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/* 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 HardwareK9bot class to define the devices on the robot.
- * All device access is managed through the HardwareK9bot class. (See this class for device names)
- * The code is structured as a LinearOpMode
- *
- * This particular OpMode executes a basic Tank Drive Teleop for the K9 bot
- * It raises and lowers the arm using the Gampad Y and A buttons respectively.
- * It also opens and closes the claw slowly using the X and B buttons.
- *
- * Note: the configuration of the servos is such that
- * as the arm servo approaches 0, the arm position moves up (away from the floor).
- * Also, as the claw servo approaches 0, the claw opens up (drops the game element).
- *
- * 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="K9bot: Telop Tank", group="K9bot")
-@Disabled
-public class K9botTeleopTank_Linear extends LinearOpMode {
-
- /* Declare OpMode members. */
- HardwareK9bot robot = new HardwareK9bot(); // Use a K9'shardware
- double armPosition = robot.ARM_HOME; // Servo safe position
- double clawPosition = robot.CLAW_HOME; // Servo safe position
- final double CLAW_SPEED = 0.01 ; // sets rate to move servo
- final double ARM_SPEED = 0.01 ; // sets rate to move servo
-
- @Override
- public void runOpMode() {
- double left;
- double right;
-
- /* 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 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 Y & A raise and lower the arm
- if (gamepad1.a)
- armPosition += ARM_SPEED;
- else if (gamepad1.y)
- armPosition -= ARM_SPEED;
-
- // Use gamepad X & B to open and close the claw
- if (gamepad1.x)
- clawPosition += CLAW_SPEED;
- else if (gamepad1.b)
- clawPosition -= CLAW_SPEED;
-
- // Move both servos to new position.
- armPosition = Range.clip(armPosition, robot.ARM_MIN_RANGE, robot.ARM_MAX_RANGE);
- robot.arm.setPosition(armPosition);
- clawPosition = Range.clip(clawPosition, robot.CLAW_MIN_RANGE, robot.CLAW_MAX_RANGE);
- robot.claw.setPosition(clawPosition);
-
- // Send telemetry message to signify robot running;
- telemetry.addData("arm", "%.2f", armPosition);
- telemetry.addData("claw", "%.2f", clawPosition);
- telemetry.addData("left", "%.2f", left);
- telemetry.addData("right", "%.2f", right);
- telemetry.update();
-
- // Pause for 40 mS each cycle = update 25 times a second.
- sleep(40);
- }
- }
-}
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
index bdabc17..2e174b1 100644
--- 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
@@ -60,7 +60,6 @@ public class PushbotAutoDriveToLine_Linear extends LinearOpMode {
/* Declare OpMode members. */
HardwarePushbot robot = new HardwarePushbot(); // Use a Pushbot's hardware
- // could also use HardwarePushbotMatrix class.
LightSensor lightSensor; // Primary LEGO Light sensor,
// OpticalDistanceSensor lightSensor; // Alternative MR ODS sensor
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
index cd84d15..cc168d8 100644
--- 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
@@ -54,7 +54,6 @@ public class PushbotTeleopPOV_Linear extends LinearOpMode {
/* Declare OpMode members. */
HardwarePushbot robot = new HardwarePushbot(); // Use a Pushbot's hardware
- // could also use HardwarePushbotMatrix class.
double clawOffset = 0; // Servo mid position
final double CLAW_SPEED = 0.02 ; // sets rate to move servo
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
index 1aec890..ec336a8 100644
--- 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
@@ -55,7 +55,6 @@ public class PushbotTeleopTank_Iterative extends OpMode{
/* Declare OpMode members. */
HardwarePushbot robot = new HardwarePushbot(); // use the class created to define a Pushbot's hardware
- // could also use HardwarePushbotMatrix class.
double clawOffset = 0.0 ; // Servo mid position
final double CLAW_SPEED = 0.02 ; // sets rate to move servo
diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorHTColor.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorHTColor.java
deleted file mode 100644
index e872273..0000000
--- a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorHTColor.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/* 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 legacy (NXT-compatible) Hitechnic Color Sensor v2.
- * It 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: HT color", group = "Sensor")
-@Disabled
-public class SensorHTColor 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.colorSensor.get("sensor_color");
-
- // turn the LED on in the beginning, just so user will know that the sensor is active.
- colorSensor.enableLed(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 gamepad1.
- bCurrState = gamepad1.x;
-
- // check for button state transitions.
- if (bCurrState && (bCurrState != bPrevState)) {
-
- // button is transitioning to a pressed state. Toggle LED.
- // on button press, enable the LED.
- bLedOn = !bLedOn;
- colorSensor.enableLed(bLedOn);
- }
-
- // update previous state variable.
- bPrevState = bCurrState;
-
- // convert the RGB values to HSV values.
- Color.RGBToHSV(colorSensor.red(), colorSensor.green(), colorSensor.blue(), 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/SensorHTGyro.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorHTGyro.java
deleted file mode 100644
index 0e853ca..0000000
--- a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorHTGyro.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/* 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.hitechnic.HiTechnicNxtGyroSensor;
-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 org.firstinspires.ftc.robotcore.external.navigation.AngleUnit;
-
-/*
- * This is an example LinearOpMode that shows how to use a legacy (NXT-compatible)
- * HiTechnic gyroscope. It assumes that the gyroscope 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: HT Gyro", group = "Sensor")
-@Disabled
-public class SensorHTGyro 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 HiTechnicNxtGyroSensor}, by contrast, provides functionality that
- * is unique to the HiTechnic gyro sensor.
- */
- Gyroscope gyroscope;
- HiTechnicNxtGyroSensor hiTechnicNxtGyroSensor;
-
- @Override public void runOpMode() throws InterruptedException {
-
- // Get a reference to the gyroscope from the hardware map
- gyroscope = hardwareMap.get(Gyroscope.class, "gyro");
-
- // Get a reference to the *implementation* of the gyroscope on the HiTechnic sensor.
- // Usually, you won't need to examine internal implementation details in this way, but
- // we do so to illustrate aspects of what is going on inside the sensor.
- hiTechnicNxtGyroSensor = hardwareMap.get(HiTechnicNxtGyroSensor.class, "gyro");
- // Alternately, we could have cast: hiTechnicNxtGyroSensor = (HiTechnicNxtGyroSensor)gyro;
-
- // Optionally, calibrate the gyro to establish a good value for its "zero deg/s" bias
- // voltage value. Calibration is not entirely necessary, as the default bias voltage
- // usually does a reasonable job. While calibration is performed, the gyro must remain
- // motionless. Note that for this gyro sensor, calibration data is not persistently
- // written to EEPROM, but rather should be performed each run.
- telemetry.log().add("calibrating...");
- hiTechnicNxtGyroSensor.calibrate(3000, 100);
- telemetry.log().add("...done...waiting for start...");
-
- // wait for the start button to be pressed.
- waitForStart();
- telemetry.log().clear();
-
- // loop until the opmode has been asked to stop
- while (opModeIsActive()) {
-
- double raw = hiTechnicNxtGyroSensor.readRawVoltage();
- double bias = hiTechnicNxtGyroSensor.getBiasVoltage();
-
- telemetry.addData("rate", "%.4f deg/s", gyroscope.getAngularVelocity(AngleUnit.DEGREES).zRotationRate);
- telemetry.addData("raw ", "%.4fv", raw);
- telemetry.addData("bias", "%.4fv", bias);
- telemetry.addData("volts", "%.4fv", raw-bias);
- telemetry.addData("deg/s/v", "%.4f deg/s/v", hiTechnicNxtGyroSensor.getDefaultDegreesPerSecondPerVolt());
-
- telemetry.update();
- idle();
- }
- }
-}
diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorLEGOLight.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorLEGOLight.java
deleted file mode 100644
index aeed891..0000000
--- a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorLEGOLight.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/* 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.LightSensor;
-
-/*
- *
- * This is an example LinearOpMode that shows how to use
- * a legacy (NXT-compatible) Light Sensor.
- * It assumes that the light sensor is configured with a name of "sensor_light".
- *
- * You can use the X button on gamepad1 to turn 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: LEGO light", group = "Sensor")
-@Disabled
-public class SensorLEGOLight extends LinearOpMode {
-
- LightSensor lightSensor; // Hardware Device Object
-
- @Override
- public void runOpMode() {
-
- // 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 Light Sensor object.
- lightSensor = hardwareMap.get(LightSensor.class, "sensor_light");
-
- // Set the LED state in the beginning.
- lightSensor.enableLed(bLedOn);
-
- // 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()) {
-
- // check the status of the x button .
- bCurrState = gamepad1.x;
-
- // check for button state transitions.
- if ((bCurrState == true) && (bCurrState != bPrevState)) {
-
- // button is transitioning to a pressed state. Toggle LED
- bLedOn = !bLedOn;
- lightSensor.enableLed(bLedOn);
- }
-
- // update previous state variable.
- bPrevState = bCurrState;
-
- // send the info back to driver station using telemetry function.
- telemetry.addData("LED", bLedOn ? "On" : "Off");
- telemetry.addData("Raw", lightSensor.getRawLightDetected());
- telemetry.addData("Normal", lightSensor.getLightDetected());
-
- telemetry.update();
- }
- }
-}
diff --git a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorLEGOTouch.java b/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorLEGOTouch.java
deleted file mode 100644
index 59f316a..0000000
--- a/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorLEGOTouch.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/* 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.TouchSensor;
-
-/*
- * This is an example LinearOpMode that shows how to use
- * a legacy (NXT-compatible) Touch Sensor.
- * It assumes that the touch sensor is configured with a name of "sensor_touch".
- *
- * 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: LEGO touch", group = "Sensor")
-@Disabled
-public class SensorLEGOTouch extends LinearOpMode {
-
- TouchSensor touchSensor; // Hardware Device Object
-
- @Override
- public void runOpMode() {
-
- // get a reference to our Light Sensor object.
- touchSensor = hardwareMap.get(TouchSensor.class, "sensor_touch");
- int counter = 0;
-
- // 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 (touchSensor.isPressed())
- telemetry.addData("Touch", "Is Pressed");
- else
- telemetry.addData("Touch", "Is Not Pressed");
-
- telemetry.update();
- }
- }
-}
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
index 8eeb7f0..5b66c4f 100644
--- 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
@@ -49,7 +49,6 @@ 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
-* K9bot class names are constructed as: K9bot - 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
index a2f6581..0f1aa13 100644
--- 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
@@ -42,7 +42,6 @@ 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
-* K9bot class names should be constructed as: K9bot - Mode - Action - OpModetype
* Concept class names should be constructed as: Concept - Topic - OpModetype
* Library class names should be constructed as: Library - Topic - OpModetype