Skip to content

Commit

Permalink
Updating to a "robot" project, starting tests on pid controls
Browse files Browse the repository at this point in the history
  • Loading branch information
s-oronae authored and s-oronae committed Dec 27, 2019
1 parent 9b8acb4 commit 0d3033f
Show file tree
Hide file tree
Showing 17 changed files with 437 additions and 103 deletions.
58 changes: 54 additions & 4 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,18 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin/main" path="src/main/java">
<classpathentry kind="src" output="bin/default" path="src/main/java">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/java">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="lib" path="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.wpilibj/wpilibj-java/2019.4.1/181d600aa0815fca956ff6903748e99be9025949/wpilibj-java-2019.4.1.jar" sourcepath="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.wpilibj/wpilibj-java/2019.4.1/ba505e826a3d95e2acc68d1c219bb55781cd2b94/wpilibj-java-2019.4.1-sources.jar">
<attributes>
<attribute name="gradle_used_by_scope" value="main"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.ntcore/ntcore-java/2019.4.1/9dd5e2cf0d5080b10e19fb88d9372a170f7a034/ntcore-java-2019.4.1.jar" sourcepath="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.ntcore/ntcore-java/2019.4.1/ca376b47a204864e5bcd5b83d6219e07b42416c0/ntcore-java-2019.4.1-sources.jar">
<attributes>
<attribute name="gradle_used_by_scope" value="main"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.wpiutil/wpiutil-java/2019.4.1/5baa3eec5cac7654236b16afd3f0198bbe5dc946/wpiutil-java-2019.4.1.jar" sourcepath="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.wpiutil/wpiutil-java/2019.4.1/9b52975ba2540ee79b4ef0d2657104867e8e61d0/wpiutil-java-2019.4.1-sources.jar">
<attributes>
<attribute name="gradle_used_by_scope" value="main"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.thirdparty.frc2019.opencv/opencv-java/3.4.4-4/5c546c223045ef680e643d97726623031831b1c5/opencv-java-3.4.4-4.jar" sourcepath="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.thirdparty.frc2019.opencv/opencv-java/3.4.4-4/d433924d21ac1a7c0375495d982f61eb047484cb/opencv-java-3.4.4-4-sources.jar">
<attributes>
<attribute name="gradle_used_by_scope" value="main"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.cscore/cscore-java/2019.4.1/c7eee2f82bf88c65f62a042828bf0944a2a475bb/cscore-java-2019.4.1.jar" sourcepath="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.cscore/cscore-java/2019.4.1/372c1bff1cae104383c1930bcda43ab9a2b8dce9/cscore-java-2019.4.1-sources.jar">
<attributes>
<attribute name="gradle_used_by_scope" value="main"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.cameraserver/cameraserver-java/2019.4.1/d0d4a27f87a6b87eeed4ddc21964a0bc6e9e372/cameraserver-java-2019.4.1.jar" sourcepath="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.cameraserver/cameraserver-java/2019.4.1/e7853496f55bdfbd5142b91f916cbed6cba7372/cameraserver-java-2019.4.1-sources.jar">
<attributes>
<attribute name="gradle_used_by_scope" value="main"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.hal/hal-java/2019.4.1/fe4aec01e745838fa6997fba26b0917e35af9480/hal-java-2019.4.1.jar" sourcepath="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/edu.wpi.first.hal/hal-java/2019.4.1/88dcf5f101b260d9a332f5dfe4eb373d26e70a68/hal-java-2019.4.1-sources.jar">
<attributes>
<attribute name="gradle_used_by_scope" value="main"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/com.ctre.phoenix/api-java/5.12.0/67bee152c70e47d981b1ecb1b7d6b59465aa506e/api-java-5.12.0.jar" sourcepath="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/com.ctre.phoenix/api-java/5.12.0/aca8d84775394631caa2992da07e3b11f14bc513/api-java-5.12.0-sources.jar">
<attributes>
<attribute name="gradle_used_by_scope" value="main"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/com.ctre.phoenix/wpiapi-java/5.12.0/a355071240b46081f86795119258fa2ffa1401e5/wpiapi-java-5.12.0.jar" sourcepath="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/com.ctre.phoenix/wpiapi-java/5.12.0/7ba7915eee25afd745d0c76be698132d71c8f519/wpiapi-java-5.12.0-sources.jar">
<attributes>
<attribute name="gradle_used_by_scope" value="main"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/com.revrobotics.frc/SparkMax-java/1.1.9/b43056fe8c9091a3fbc599ce4460bf8c4f4c51b4/SparkMax-java-1.1.9.jar" sourcepath="C:/Users/s-oronae/.gradle/caches/modules-2/files-2.1/com.revrobotics.frc/SparkMax-java/1.1.9/7476b1fe2651507a6a4c9533ea77994254af4025/SparkMax-java-1.1.9-sources.jar">
<attributes>
<attribute name="gradle_used_by_scope" value="main"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/s-oronae/.m2/repository/junit/junit/4.12/junit-4.12.jar"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
19 changes: 9 additions & 10 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@
<projectDescription>
<name>2412RobotLibrary</name>
<comment></comment>
<projects>
</projects>
<projects/>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
<arguments/>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
<arguments/>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<linkedResources/>
<filteredResources/>
</projectDescription>
18 changes: 10 additions & 8 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#
#Thu Dec 26 23:28:02 PST 2019
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=11
6 changes: 6 additions & 0 deletions .wpilib/wpilib_preferences.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "Beta2019",
"teamNumber": 9999
}
71 changes: 32 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,39 +1,32 @@
/*
* This file was generated by the Gradle 'init' task.
*/

plugins {
id 'java'
id 'maven-publish'
id 'eclipse'
}

repositories {
mavenLocal()
maven {
url = 'https://repo1.maven.org/maven2/'
}

maven {
url = 'https://first.wpi.edu/FRC/roborio/maven/release/'
}

maven {
url = 'http://www.revrobotics.com/content/sw/max/sdk/maven/'
}
}

dependencies {
compile 'edu.wpi.first.wpilibj:wpilibj-java:2019.4.1'
compile 'edu.wpi.first.wpiutil:wpiutil-java:2019.4.1'
compile 'com.revrobotics.frc:SparkMax-java:1.5.0'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:3.2.0'
testCompile 'net.bytebuddy:byte-buddy-agent:1.10.3'
testCompile 'net.bytebuddy:byte-buddy:1.10.3'
testCompile 'org.objenesis:objenesis:2.6'
}

group = '2412RobotLibrary'
version = '0.1'
sourceCompatibility = '1.11'
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2019.4.1"
id "eclipse"
}

repositories {
mavenLocal()
mavenCentral()
}

// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
// Also defines JUnit 4.
dependencies {
compile wpi.deps.wpilib()
compile wpi.deps.vendor.java()
nativeZip wpi.deps.vendor.jni(wpi.platforms.roborio)
nativeDesktopZip wpi.deps.vendor.jni(wpi.platforms.desktop)
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:3.2.0'
testCompile 'net.bytebuddy:byte-buddy-agent:1.10.3'
testCompile 'net.bytebuddy:byte-buddy:1.10.3'
testCompile 'org.objenesis:objenesis:2.6'
testCompile 'org.junit.jupiter:junit-jupiter-api:5.2.0'
testCompile 'org.junit.jupiter:junit-jupiter-params:5.2.0'
testCompile 'org.junit.jupiter:junit-jupiter-engine:5.2.0'
}


wrapper {
gradleVersion = '5.0'
}
30 changes: 30 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>

<project name="FRC Deployment" default="deploy">

<!--
The following properties can be defined to override system level
settings. These should not be touched unless you know what you're
doing. The primary use is to override the wpilib version when
working with older robots that can't compile with the latest
libraries.
-->

<!-- By default the system version of WPI is used -->
<!-- <property name="version" value=""/> -->

<!-- By default the system team number is used -->
<!-- <property name="team-number" value=""/> -->

<!-- By default the target is set to 10.TE.AM.2 -->
<!-- <property name="target" value=""/> -->

<!-- Any other property in build.properties can also be overridden. -->

<property file="${user.home}/wpilib/wpilib.properties"/>
<property file="build.properties"/>
<property file="${user.home}/wpilib/java/${version}/ant/build.properties"/>

<import file="${wpilib.ant.dir}/build.xml"/>

</project>
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip
distributionPath=permwrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=permwrapper/dists
18 changes: 1 addition & 17 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -44,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
DEFAULT_JVM_OPTS='"-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
18 changes: 1 addition & 17 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand All @@ -30,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@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="-Xmx64m" "-Xms64m"
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
30 changes: 26 additions & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
/*
* This file was generated by the Gradle 'init' task.
*/
import org.gradle.internal.os.OperatingSystem

rootProject.name = '2412RobotLibrary'
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
String frcYear = '2019'
File frcHome
if (OperatingSystem.current().isWindows()) {
String publicFolder = System.getenv('PUBLIC')
if (publicFolder == null) {
publicFolder = "C:\\Users\\Public"
}
frcHome = new File(publicFolder, "frc${frcYear}")
} else {
def userFolder = System.getProperty("user.home")
frcHome = new File(userFolder, "frc${frcYear}")
}
def frcHomeMaven = new File(frcHome, 'maven')
maven {
name 'frcHome'
url frcHomeMaven
}
}
}

rootProject.name = '2412RobotLibrary'
14 changes: 14 additions & 0 deletions site.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/edu.wpi.first.wpilib.plugins.cpp.feature_2018.4.1.jar" id="edu.wpi.first.wpilib.plugins.cpp.feature" version="2018.4.1">
<category name="edu.wpi.first.wpilib.plugins"/>
</feature>
<feature url="features/edu.wpi.first.wpilib.plugins.java.feature_2018.4.1.jar" id="edu.wpi.first.wpilib.plugins.java.feature" version="2018.4.1">
<category name="edu.wpi.first.wpilib.plugins"/>
</feature>
<category-def name="edu.wpi.first.wpilib.plugins" label="WPILib Robot Development">
<description>
Core WPILib Robot Development Tools.
</description>
</category-def>
</site>
2 changes: 1 addition & 1 deletion src/main/java/com/robototes/motors/PIDCanSparkMax.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import com.robototes.units.UnitTypes.TimeUnits;

/**
* A wrapper class for CANSparkMax by Revrobotics. Allows for PID Control of the
* A wrapper class for CANSparkMax by RevRobotics. Allows for PID Control of the
* motor
*
* @author Eli Orona
Expand Down
Loading

0 comments on commit 0d3033f

Please sign in to comment.