Skip to content

Commit 487bc8a

Browse files
authored
Initial commit
0 parents  commit 487bc8a

132 files changed

Lines changed: 14672 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CONTRIBUTING.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Contributing to the FTC SDK
2+
3+
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.
4+
5+
## How can I contribute?
6+
7+
### Pull requests
8+
9+
__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.
10+
11+
![Pull Button](../doc/media/PullRequest.PNG)
12+
13+
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.
14+
15+
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.
16+
17+
If what you've read so far makes little sense, there are some very good git learning resources online.
18+
[Git Book](https://git-scm.com/book/en/v2)
19+
[Interactive Git Tutorial](https://try.github.io)
20+
21+
### Guidlines for experienced GIT users.
22+
23+
If you are absolutely certain that you want to push the big green button above, read on. Otherwise back _slowly away from keyboard_.
24+
25+
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/).
26+
27+
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.
28+
29+
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.
30+
31+
The latter would be the "best" way to manage software among a large team. But as with all things git there are many options.
32+
33+
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.
34+
35+
### Report bugs
36+
37+
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.
38+
39+
#### Before submitting a bug report
40+
41+
- 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.
42+
43+
- 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.
44+
45+
#### How Do I Submit A (Good) Bug Report?
46+
47+
Bugs are tracked as GitHub issues. Create an issue on ftctechnh/ftc_app and provide the following information.
48+
Explain the problem and include additional details to help maintainers reproduce the problem:
49+
50+
- Use a clear and descriptive title for the issue to identify the problem.
51+
52+
- Describe the exact steps which reproduce the problem in as many details as possible.
53+
54+
- Provide specific examples to demonstrate the steps.
55+
56+
- 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.
57+
58+
- 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)
59+
60+
- 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.
61+
62+
### Suggesting Enhancements
63+
64+
FIRST volunteers are awesome. You all have great ideas and we want to hear them.
65+
66+
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.
67+
68+
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.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Before issuing a pull request, please see the contributing page.

.github/workflows/android.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Android CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
permissions:
10+
checks: write
11+
contents: read
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: set up JDK 17
21+
uses: actions/setup-java@v4
22+
with:
23+
java-version: '17'
24+
distribution: 'temurin'
25+
cache: gradle
26+
27+
- name: Grant execute permission for gradlew
28+
run: chmod +x gradlew
29+
- name: Check formatting
30+
run: ./gradlew spotlessCheck
31+
- name: Compile (catch syntax/build errors)
32+
run: ./gradlew compileDebugJavaWithJavac
33+
- name: Run unit tests
34+
run: ./gradlew testDebugUnitTest --info
35+
- name: Upload test results
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: test-results
39+
path: TeamCode/build/test-results/testDebugUnitTest/
40+
- name: Upload HTML test report
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: junit-html-report
44+
path: TeamCode/build/reports/tests/testDebugUnitTest/
45+
- name: Report JUnit test results
46+
uses: dorny/test-reporter@v1
47+
if: always()
48+
with:
49+
name: JUnit Tests
50+
path: TeamCode/build/test-results/testDebugUnitTest/TEST-*.xml
51+
reporter: java-junit

.gitignore

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Built application files
2+
*.apk
3+
*.aar
4+
*.ap_
5+
*.aab
6+
7+
!libs/*.aar
8+
9+
# Files for the ART/Dalvik VM
10+
*.dex
11+
12+
# Java/JDK files
13+
*.class
14+
*.hprof
15+
16+
# Generated files
17+
bin/
18+
gen/
19+
out/
20+
# Uncomment the following line in case you need and you don't have the release build type files in your app
21+
# release/
22+
23+
# Gradle files
24+
.gradle/
25+
build/
26+
27+
# Local configuration file (sdk path, etc)
28+
local.properties
29+
30+
# Proguard folder generated by Eclipse
31+
proguard/
32+
33+
# Log Files
34+
*.log
35+
36+
# Android Studio Navigation editor temp files
37+
.navigation/
38+
39+
# Android Studio captures folder
40+
captures/
41+
42+
# IntelliJ
43+
*.iml
44+
.idea/
45+
46+
# For Mac users
47+
.DS_Store
48+
49+
# Keystore files
50+
# Uncomment the following lines if you do not want to check your keystore files in.
51+
#*.jks
52+
#*.keystore
53+
54+
# External native build folder generated in Android Studio 2.2 and later
55+
.externalNativeBuild
56+
.cxx/
57+
58+
# Google Services (e.g. APIs or Firebase)
59+
# google-services.json
60+
61+
# Freeline
62+
freeline.py
63+
freeline/
64+
freeline_project_description.json
65+
66+
# fastlane
67+
fastlane/report.xml
68+
fastlane/Preview.html
69+
fastlane/screenshots
70+
fastlane/test_output
71+
fastlane/readme.md
72+
73+
# Version control
74+
vcs.xml
75+
76+
# lint
77+
lint/intermediates/
78+
lint/generated/
79+
lint/outputs/
80+
lint/tmp/
81+
# lint/reports/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "TeamCode/src/main/java/org/firstinspires/ftc/teamcode/vcsc/core"]
2+
path = TeamCode/src/main/java/org/firstinspires/ftc/teamcode/vcsc/core
3+
url = https://github.com/VCSilverCircuits/core.git

.run/Fix Formatting.run.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Fix Formatting" type="GradleRunConfiguration" factoryName="Gradle">
3+
<ExternalSystemSettings>
4+
<option name="executionName" />
5+
<option name="externalProjectPath" value="$PROJECT_DIR$" />
6+
<option name="externalSystemIdString" value="GRADLE" />
7+
<option name="scriptParameters" value="" />
8+
<option name="taskDescriptions">
9+
<list />
10+
</option>
11+
<option name="taskNames">
12+
<list>
13+
<option value="spotlessApply" />
14+
</list>
15+
</option>
16+
<option name="vmOptions" />
17+
</ExternalSystemSettings>
18+
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
19+
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
20+
<DebugAllEnabled>false</DebugAllEnabled>
21+
<RunAsTest>false</RunAsTest>
22+
<method v="2" />
23+
</configuration>
24+
</component>

.run/Sloth Load.run.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Sloth Load" type="GradleRunConfiguration" factoryName="Gradle">
3+
<ExternalSystemSettings>
4+
<option name="executionName" />
5+
<option name="externalProjectPath" value="$PROJECT_DIR$" />
6+
<option name="externalSystemIdString" value="GRADLE" />
7+
<option name="scriptParameters" value="" />
8+
<option name="taskDescriptions">
9+
<list />
10+
</option>
11+
<option name="taskNames">
12+
<list>
13+
<option value=":TeamCode:deploySloth" />
14+
</list>
15+
</option>
16+
<option name="vmOptions" />
17+
</ExternalSystemSettings>
18+
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
19+
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
20+
<DebugAllEnabled>false</DebugAllEnabled>
21+
<RunAsTest>false</RunAsTest>
22+
<method v="2" />
23+
</configuration>
24+
</component>

.run/TeamCode [check].run.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="TeamCode [check]" type="GradleRunConfiguration" factoryName="Gradle">
3+
<ExternalSystemSettings>
4+
<option name="executionName" />
5+
<option name="externalProjectPath" value="$PROJECT_DIR$" />
6+
<option name="externalSystemIdString" value="GRADLE" />
7+
<option name="scriptParameters" value="" />
8+
<option name="taskDescriptions">
9+
<list />
10+
</option>
11+
<option name="taskNames">
12+
<list>
13+
<option value="check" />
14+
</list>
15+
</option>
16+
<option name="vmOptions" />
17+
</ExternalSystemSettings>
18+
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
19+
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
20+
<DebugAllEnabled>false</DebugAllEnabled>
21+
<RunAsTest>false</RunAsTest>
22+
<method v="2" />
23+
</configuration>
24+
</component>

.run/TeamCode.run.xml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="TeamCode" type="AndroidRunConfigurationType" factoryName="Android App" activateToolWindowBeforeRun="false">
3+
<module name="TeamCode.TeamCode" />
4+
<option name="ANDROID_RUN_CONFIGURATION_SCHEMA_VERSION" value="1" />
5+
<option name="DEPLOY" value="true" />
6+
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
7+
<option name="DEPLOY_AS_INSTANT" value="false" />
8+
<option name="ARTIFACT_NAME" value="" />
9+
<option name="PM_INSTALL_OPTIONS" value="" />
10+
<option name="ALL_USERS" value="false" />
11+
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
12+
<option name="ALLOW_ASSUME_VERIFIED" value="false" />
13+
<option name="CLEAR_APP_STORAGE" value="false" />
14+
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
15+
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
16+
<option name="MODE" value="default_activity" />
17+
<option name="RESTORE_ENABLED" value="false" />
18+
<option name="RESTORE_FILE" value="" />
19+
<option name="RESTORE_FRESH_INSTALL_ONLY" value="false" />
20+
<option name="CLEAR_LOGCAT" value="false" />
21+
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
22+
<option name="TARGET_SELECTION_MODE" value="DEVICE_AND_SNAPSHOT_COMBO_BOX" />
23+
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
24+
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
25+
<option name="DEBUGGER_TYPE" value="Auto" />
26+
<Auto>
27+
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
28+
<option name="SHOW_STATIC_VARS" value="true" />
29+
<option name="WORKING_DIR" value="" />
30+
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
31+
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
32+
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
33+
<option name="DEBUG_SANDBOX_SDK" value="false" />
34+
</Auto>
35+
<Hybrid>
36+
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
37+
<option name="SHOW_STATIC_VARS" value="true" />
38+
<option name="WORKING_DIR" value="" />
39+
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
40+
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
41+
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
42+
<option name="DEBUG_SANDBOX_SDK" value="false" />
43+
</Hybrid>
44+
<Java>
45+
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
46+
<option name="DEBUG_SANDBOX_SDK" value="false" />
47+
</Java>
48+
<Native>
49+
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
50+
<option name="SHOW_STATIC_VARS" value="true" />
51+
<option name="WORKING_DIR" value="" />
52+
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
53+
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
54+
<option name="ATTACH_ON_WAIT_FOR_DEBUGGER" value="false" />
55+
<option name="DEBUG_SANDBOX_SDK" value="false" />
56+
</Native>
57+
<Profilers>
58+
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
59+
<option name="STARTUP_PROFILING_ENABLED" value="false" />
60+
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
61+
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Java/Kotlin Method Sample (legacy)" />
62+
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
63+
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
64+
</Profilers>
65+
<option name="DEEP_LINK" value="" />
66+
<option name="ACTIVITY" value="" />
67+
<option name="ACTIVITY_CLASS" value="" />
68+
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
69+
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
70+
<method v="2">
71+
<option name="Gradle.BeforeRunTask" enabled="false" tasks="removeSlothRemote" externalProjectPath="$PROJECT_DIR$/TeamCode" vmOptions="" scriptParameters="" />
72+
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
73+
</method>
74+
</configuration>
75+
</component>

FtcRobotController/build.gradle

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import java.text.SimpleDateFormat
2+
3+
//
4+
// build.gradle in FtcRobotController
5+
//
6+
apply plugin: 'com.android.library'
7+
8+
android {
9+
10+
defaultConfig {
11+
minSdkVersion 24
12+
//noinspection ExpiredTargetSdkVersion
13+
targetSdkVersion 28
14+
buildConfigField "String", "APP_BUILD_TIME", '"' + (new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.ROOT).format(new Date())) + '"'
15+
}
16+
17+
buildFeatures {
18+
buildConfig = true
19+
}
20+
21+
compileSdkVersion 30
22+
23+
compileOptions {
24+
sourceCompatibility JavaVersion.VERSION_1_8
25+
targetCompatibility JavaVersion.VERSION_1_8
26+
}
27+
namespace = 'com.qualcomm.ftcrobotcontroller'
28+
}
29+
30+
apply from: '../build.dependencies.gradle'

0 commit comments

Comments
 (0)