Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
439a5bf
FtcRobotController v7.1
CalKestis Dec 23, 2021
e945da2
Merge pull request #274 from FIRST-Tech-Challenge/20211223-120805-rel…
CalKestis Jan 17, 2022
fe758ed
FtcRobotController v7.2
CalKestis Jul 23, 2022
aba72e5
Merge pull request #324 from FIRST-Tech-Challenge/20220723-130006-rel…
CalKestis Jul 25, 2022
e0282fc
FtcRobotController v8.0
CalKestis Sep 7, 2022
2390680
Merge pull request #344 from FIRST-Tech-Challenge/20220907-131644-rel…
CalKestis Sep 13, 2022
35d4aa7
FtcRobotController v8.1
CalKestis Nov 21, 2022
501c7c0
Merge pull request #488 from FIRST-Tech-Challenge/20221121-115119-rel…
CalKestis Nov 22, 2022
3383440
FtcRobotController v8.1.1
CalKestis Dec 2, 2022
0879b47
Merge pull request #506 from FIRST-Tech-Challenge/20221201-150726-rel…
CalKestis Dec 2, 2022
5c8b4c4
FtcRobotController v8.2
CalKestis Jul 7, 2023
660a2f6
Merge pull request #654 from FIRST-Tech-Challenge/20230707-131020-rel…
CalKestis Jul 11, 2023
4de7b1e
FtcRobotController v9.0
CalKestis Aug 30, 2023
f3a5a54
Merge pull request #674 from FIRST-Tech-Challenge/20230830-154348-rel…
cmacfarl Sep 9, 2023
c023e97
FtcRobotController v9.0.1
CalKestis Sep 29, 2023
f326c0d
Merge pull request #731 from FIRST-Tech-Challenge/20230929-083754-rel…
CalKestis Sep 29, 2023
c303962
FtcRobotController v9.1
CalKestis Feb 15, 2024
1da45a3
Merge pull request #941 from FIRST-Tech-Challenge/20240215-115542-rel…
CalKestis Feb 16, 2024
48019d0
FtcRobotController v9.2
CalKestis Jul 1, 2024
6ce588f
Merge pull request #990 from FIRST-Tech-Challenge/20240701-085519-rel…
CalKestis Jul 11, 2024
7158b61
FtcRobotController v10.0
CalKestis Aug 28, 2024
f75e498
Merge pull request #1038 from FIRST-Tech-Challenge/20240828-111152-re…
CalKestis Sep 7, 2024
442c867
Update README.md
CalKestis Sep 7, 2024
054017d
FtcRobotController v10.1
CalKestis Sep 19, 2024
6af9bb6
Merge pull request #1074 from FIRST-Tech-Challenge/20240919-122750-re…
CalKestis Sep 20, 2024
9f11128
FtcRobotController v10.1
CalKestis Nov 2, 2024
ee16f8e
Merge pull request #1250 from FIRST-Tech-Challenge/20241102-092223-re…
cmacfarl Nov 6, 2024
9b83005
Merge branch 'main' into ftc-lib
dsmorse Nov 24, 2024
b7dc3b8
Merge pull request #1 from dsmorse/ftc-lib
dsmorse Nov 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If what you've read so far makes little sense, there are some very good git lear
[Git Book](https://git-scm.com/book/en/v2)
[Interactive Git Tutorial](https://try.github.io)

##### Guidlines for experienced GIT users.
### 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_.

Expand All @@ -38,9 +38,9 @@ This section guides you through filing a bug report. The better the report the

#### 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.
- Check the [forums](http://ftcforum.firstinspires.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.
- Perform a search of current [issues](https://github.com/FIRST-Tech-Challenge/FtcRobotController/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?

Expand All @@ -65,4 +65,4 @@ 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.
The best way to get momentum behind new features is to post a description of your idea in the discussions section of this repository. Build community support for it. The FTC Technology Team monitors the discussions. 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.
20 changes: 7 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
# Files for the ART/Dalvik VM
*.dex

# Java class files
# Java/JDK files
*.class
*.hprof

# Generated files
bin/
Expand Down Expand Up @@ -40,17 +41,10 @@ captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
.idea/

# For Mac users
.DS_Store

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
Expand Down Expand Up @@ -84,4 +78,4 @@ lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
# lint/reports/
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions FtcRobotController/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@ apply plugin: 'com.android.library'
android {

defaultConfig {
minSdkVersion 23
minSdkVersion 24
//noinspection ExpiredTargetSdkVersion
targetSdkVersion 28
buildConfigField "String", "APP_BUILD_TIME", '"' + (new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.ROOT).format(new Date())) + '"'
}

compileSdkVersion 29
buildFeatures {
buildConfig = true
}

compileSdkVersion 30

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
namespace = 'com.qualcomm.ftcrobotcontroller'
}

apply from: '../build.dependencies.gradle'
6 changes: 2 additions & 4 deletions FtcRobotController/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.qualcomm.ftcrobotcontroller"
android:versionCode="42"
android:versionName="7.0">
android:versionCode="57"
android:versionName="10.1.1">

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<application
android:allowBackup="true"
android:largeHeap="true"
android:extractNativeLibs="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppThemeRedRC"
Expand Down
Binary file removed FtcRobotController/src/main/assets/FTC_2016-17.dat
Binary file not shown.
9 changes: 0 additions & 9 deletions FtcRobotController/src/main/assets/FTC_2016-17.xml

This file was deleted.

Binary file removed FtcRobotController/src/main/assets/RelicVuMark.dat
Binary file not shown.
6 changes: 0 additions & 6 deletions FtcRobotController/src/main/assets/RelicVuMark.xml

This file was deleted.

Binary file not shown.
7 changes: 0 additions & 7 deletions FtcRobotController/src/main/assets/StonesAndChips.xml

This file was deleted.

Binary file removed FtcRobotController/src/main/assets/UltimateGoal.dat
Binary file not shown.
Binary file not shown.
10 changes: 0 additions & 10 deletions FtcRobotController/src/main/assets/UltimateGoal.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
/* Copyright (c) 2021 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;
import com.qualcomm.robotcore.util.ElapsedTime;

/*
* This file contains an 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 a selection is made from the menu, the corresponding OpMode is executed.
*
* This particular OpMode illustrates driving a 4-motor Omni-Directional (or Holonomic) robot.
* This code will work with either a Mecanum-Drive or an X-Drive train.
* Both of these drives are illustrated at https://gm0.org/en/latest/docs/robot-design/drivetrains/holonomic.html
* Note that a Mecanum drive must display an X roller-pattern when viewed from above.
*
* Also note that it is critical to set the correct rotation direction for each motor. See details below.
*
* Holonomic drives provide the ability for the robot to move in three axes (directions) simultaneously.
* Each motion axis is controlled by one Joystick axis.
*
* 1) Axial: Driving forward and backward Left-joystick Forward/Backward
* 2) Lateral: Strafing right and left Left-joystick Right and Left
* 3) Yaw: Rotating Clockwise and counter clockwise Right-joystick Right and Left
*
* This code is written assuming that the right-side motors need to be reversed for the robot to drive forward.
* When you first test your robot, if it moves backward when you push the left stick forward, then you must flip
* the direction of all 4 motors (see code below).
*
* 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="Basic: Omni Linear OpMode", group="Linear OpMode")
@Disabled
public class BasicOmniOpMode_Linear extends LinearOpMode {

// Declare OpMode members for each of the 4 motors.
private ElapsedTime runtime = new ElapsedTime();
private DcMotor leftFrontDrive = null;
private DcMotor leftBackDrive = null;
private DcMotor rightFrontDrive = null;
private DcMotor rightBackDrive = null;

@Override
public void runOpMode() {

// Initialize the hardware variables. Note that the strings used here must correspond
// to the names assigned during the robot configuration step on the DS or RC devices.
leftFrontDrive = hardwareMap.get(DcMotor.class, "left_front_drive");
leftBackDrive = hardwareMap.get(DcMotor.class, "left_back_drive");
rightFrontDrive = hardwareMap.get(DcMotor.class, "right_front_drive");
rightBackDrive = hardwareMap.get(DcMotor.class, "right_back_drive");

// ########################################################################################
// !!! IMPORTANT Drive Information. Test your motor directions. !!!!!
// ########################################################################################
// Most robots need the motors on one side to be reversed to drive forward.
// The motor reversals shown here are for a "direct drive" robot (the wheels turn the same direction as the motor shaft)
// If your robot has additional gear reductions or uses a right-angled drive, it's important to ensure
// that your motors are turning in the correct direction. So, start out with the reversals here, BUT
// when you first test your robot, push the left joystick forward and observe the direction the wheels turn.
// Reverse the direction (flip FORWARD <-> REVERSE ) of any wheel that runs backward
// Keep testing until ALL the wheels move the robot forward when you push the left joystick forward.
leftFrontDrive.setDirection(DcMotor.Direction.REVERSE);
leftBackDrive.setDirection(DcMotor.Direction.REVERSE);
rightFrontDrive.setDirection(DcMotor.Direction.FORWARD);
rightBackDrive.setDirection(DcMotor.Direction.FORWARD);

// Wait for the game to start (driver presses START)
telemetry.addData("Status", "Initialized");
telemetry.update();

waitForStart();
runtime.reset();

// run until the end of the match (driver presses STOP)
while (opModeIsActive()) {
double max;

// POV Mode uses left joystick to go forward & strafe, and right joystick to rotate.
double axial = -gamepad1.left_stick_y; // Note: pushing stick forward gives negative value
double lateral = gamepad1.left_stick_x;
double yaw = gamepad1.right_stick_x;

// Combine the joystick requests for each axis-motion to determine each wheel's power.
// Set up a variable for each drive wheel to save the power level for telemetry.
double leftFrontPower = axial + lateral + yaw;
double rightFrontPower = axial - lateral - yaw;
double leftBackPower = axial - lateral + yaw;
double rightBackPower = axial + lateral - yaw;

// Normalize the values so no wheel power exceeds 100%
// This ensures that the robot maintains the desired motion.
max = Math.max(Math.abs(leftFrontPower), Math.abs(rightFrontPower));
max = Math.max(max, Math.abs(leftBackPower));
max = Math.max(max, Math.abs(rightBackPower));

if (max > 1.0) {
leftFrontPower /= max;
rightFrontPower /= max;
leftBackPower /= max;
rightBackPower /= max;
}

// This is test code:
//
// Uncomment the following code to test your motor directions.
// Each button should make the corresponding motor run FORWARD.
// 1) First get all the motors to take to correct positions on the robot
// by adjusting your Robot Configuration if necessary.
// 2) Then make sure they run in the correct direction by modifying the
// the setDirection() calls above.
// Once the correct motors move in the correct direction re-comment this code.

/*
leftFrontPower = gamepad1.x ? 1.0 : 0.0; // X gamepad
leftBackPower = gamepad1.a ? 1.0 : 0.0; // A gamepad
rightFrontPower = gamepad1.y ? 1.0 : 0.0; // Y gamepad
rightBackPower = gamepad1.b ? 1.0 : 0.0; // B gamepad
*/

// Send calculated power to wheels
leftFrontDrive.setPower(leftFrontPower);
rightFrontDrive.setPower(rightFrontPower);
leftBackDrive.setPower(leftBackPower);
rightBackDrive.setPower(rightBackPower);

// Show the elapsed game time and wheel power.
telemetry.addData("Status", "Run Time: " + runtime.toString());
telemetry.addData("Front left/Right", "%4.2f, %4.2f", leftFrontPower, rightFrontPower);
telemetry.addData("Back left/Right", "%4.2f, %4.2f", leftBackPower, rightBackPower);
telemetry.update();
}
}}
Loading