Codebase for FTC game season 2022-23, POWERPLAY
Simply run the following command in the terminal on macOS/linux to setup Git and the FtcRobotController Android Studio Project
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Big-Green-7245/teamcode2022_23/main/.assets/setupRepo.sh)"Alternatively, follow the follow guide
To work with the repository in Android Studio, first clone the newest (currently 7.2) version of FtcRobotController App. Then, replace the teamcode folder with this repository.
This can be easily done through git. In the terminal, move to a folder where you keep your robotics stuff, and run the following commands.
git clone https://github.com/FIRST-Tech-Challenge/FtcRobotController.git
cd FtcRobotController/
sudo rm -r .git
cd TeamCode/src/main/java/org/firstinspires/ftc/teamcode/
rm *
git clone https://github.com/Big-Green-7245/teamcode2022_23.git .To upload code to the device, connect to the Control Hub via USB or WiFi-Direct. Select the device and upload.
Note if connected wirelessly, Android Studio might require cli adb connection first with the following command
adb connect 192.168.43.1:5555Once connected, it should look like the above.
Every TeleOp/Autonomous program should have a programVer variable to keep track of version increments. Sometimes Android Studio does not update the code right away.
final String programVer="1.0";If you get an error saying that the Android Sdk is not found, try adding local.properties in your
project root directory with the following line
sdk.dir=/Users/yourusernamehere/Library/Android/sdkor pointing to wherever your Android Sdk is located.
To use Java 17, two files need to be edited: build.common.gradle and /FtcRobotController/build.gradle.
Locate
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}in both files and replace VERSION_1_7 or VERSON_1_8 with VERSION_17. Then resync gradle through a button that
should appear towards the top right or through the gradle menu on the right (Gradle -> Reload All Gradle Projects).
