Skip to content

Commit 89d4879

Browse files
committed
Update for 2019
1 parent 7b72363 commit 89d4879

File tree

12 files changed

+30
-42
lines changed

12 files changed

+30
-42
lines changed

build.gradle

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@ plugins {
44
id "idea"
55
}
66

7-
version = '18.2.1'
7+
version = "19.0.0"
88

99
repositories {
1010
jcenter()
11-
maven { url = "https://raw.githubusercontent.com/Open-RIO/Maven-Mirror/master/m2" }
11+
maven { url = "http://devsite.ctr-electronics.com/maven/release/" }
1212
maven { url = "http://first.wpi.edu/FRC/roborio/maven/release" }
1313
mavenLocal()
1414
}
1515

1616
dependencies {
1717
// FRC libs
18-
compile 'openrio.mirror.third.ctre:CTRE-phoenix-java:5.7.1.0'
19-
compile "edu.wpi.first.wpilibj:wpilibj-java:2018.4.1"
20-
compile "edu.wpi.first.ntcore:ntcore-java:4.1.0"
21-
compile "edu.wpi.first.cscore:cscore-java:1.3.0"
22-
compile "org.opencv:opencv-java:3.2.0"
18+
compile "edu.wpi.first.wpilibj:wpilibj-java:2019.1.1"
19+
compile "edu.wpi.first.ntcore:ntcore-java:2019.1.1"
20+
compile "edu.wpi.first.cscore:cscore-java:2019.1.1"
21+
compile "edu.wpi.first.thirdparty.frc2019.opencv:opencv-java:3.4.4-4"
22+
23+
// Vendor libs
24+
compile "com.ctre.phoenix:api-java:5.12.0"
25+
compile "com.ctre.phoenix:wpiapi-java:5.12.0"
2326

2427
// Kotlin
2528
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"
@@ -75,7 +78,7 @@ test {
7578
}
7679

7780
def robotManifest = {
78-
attributes 'Main-Class': 'edu.wpi.first.wpilibj.RobotBase',
81+
attributes 'Main-Class': 'org.strykeforce.thirdcoast.MainKt',
7982
'Robot-Class': 'org.strykeforce.thirdcoast.Robot',
8083
'Specification-Title': 'Third Coast Telemetry',
8184
'Specification-Version': "${thirdcoast_version}",

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ kotlin.code.style=official
22
kotlin_version = 1.3.11
33
junit_version = 5.2.0
44
koin_version = 1.0.1
5-
thirdcoast_version = 18.7.3
5+
thirdcoast_version = 19.0.0

gradle/wrapper/gradle-wrapper.jar

-987 Bytes
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Tue Oct 23 14:18:08 EDT 2018
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ APP_NAME="Gradle"
2828
APP_BASE_NAME=`basename "$0"`
2929

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

3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"

gradlew.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
1414
set APP_HOME=%DIRNAME%
1515

1616
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
17+
set DEFAULT_JVM_OPTS="-Xmx64m"
1818

1919
@rem Find java.exe
2020
if defined JAVA_HOME goto findJavaFromJavaHome

script/tct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ while [ $# -gt 0 ]; do
2323
shift
2424
done
2525

26-
/usr/local/frc/JRE/bin/java -Djava.library.path=/usr/local/frc/lib/ -jar /usr/local/lib/tct.jar 2> $log
26+
/usr/local/frc/JRE/bin/java -Djava.library.path=/usr/local/frc/third-party/lib -jar /usr/local/lib/tct.jar 2> $log
2727
echo
2828
echo reboot roboRIO to restart robot code.

src/main/kotlin/org/strykeforce/thirdcoast/Koin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private fun getWheels(): Array<Wheel> {
6969
continuousCurrentLimit = 10
7070
peakCurrentLimit = 0
7171
peakCurrentDuration = 0
72-
slot_0.apply {
72+
slot0.apply {
7373
kP = 10.0
7474
kI = 0.0
7575
kD = 100.0
Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
11
package org.strykeforce.thirdcoast
22

3-
import org.koin.core.parameter.parametersOf
4-
import org.koin.log.Logger.SLF4JLogger
5-
import org.koin.standalone.KoinComponent
6-
import org.koin.standalone.StandAloneContext
7-
import org.koin.standalone.inject
8-
import org.strykeforce.thirdcoast.command.Command
9-
10-
class Main : KoinComponent, Runnable {
11-
12-
override fun run() {
13-
val toml = parseResource("/test.toml")
14-
val root = Command.createFromToml(toml)
15-
val shell: Shell by inject { parametersOf(root) }
16-
shell.run()
17-
}
18-
}
3+
import edu.wpi.first.wpilibj.RobotBase
194

205
/**
21-
* Entry for command-line testing on laptop.
6+
* Main initialization function. Do not perform any initialization here.
7+
*
8+
* <p>If you change your main robot class, change the parameter type.
229
*/
23-
fun main() {
24-
StandAloneContext.startKoin(listOf(tctModule), logger = SLF4JLogger())
25-
Main().run()
10+
fun main(args : Array<String>) {
11+
RobotBase.startRobot(::Robot)
2612
}

src/main/kotlin/org/strykeforce/thirdcoast/talon/FeedbackCoefficientCommand.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ class FeedbackCoefficientCommand(
2525
get() = formatMenu(
2626
when (pidIndex) {
2727
0 -> talonService.activeConfiguration.primaryPID.selectedFeedbackCoefficient
28-
else -> talonService.activeConfiguration.auxilaryPID.selectedFeedbackCoefficient
28+
else -> talonService.activeConfiguration.auxiliaryPID.selectedFeedbackCoefficient
2929
}
3030
)
3131

3232
override fun execute(): Command {
3333
val config = talonService.activeConfiguration
3434
val default = when (pidIndex) {
3535
0 -> config.primaryPID.selectedFeedbackCoefficient
36-
else -> config.auxilaryPID.selectedFeedbackCoefficient
36+
else -> config.auxiliaryPID.selectedFeedbackCoefficient
3737
}
3838

3939
val paramValue = param.readDouble(reader, default)

0 commit comments

Comments
 (0)