Skip to content

Commit 29039b5

Browse files
committed
Merge branch 'feature/telemetry-junit'
2 parents 88a9f50 + 26f602e commit 29039b5

File tree

16 files changed

+211
-331
lines changed

16 files changed

+211
-331
lines changed

deadeye/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.diffplug.gradle.spotless'
22

3-
sourceCompatibility = 1.8
3+
sourceCompatibility = 11
44

55
dependencies {
66

swerve/src/main/java/org/strykeforce/thirdcoast/swerve/SwerveDrive.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
@SuppressWarnings("unused")
2121
public class SwerveDrive {
2222

23-
public final static int DEFAULT_ABSOLUTE_AZIMUTH_OFFSET = 200;
23+
public static final int DEFAULT_ABSOLUTE_AZIMUTH_OFFSET = 200;
2424
private static final Logger logger = LoggerFactory.getLogger(SwerveDrive.class);
2525
private static final int WHEEL_COUNT = 4;
2626
final AHRS gyro;

telemetry/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ buildscript {
1717
apply plugin: "kotlin"
1818
apply plugin: 'org.jetbrains.dokka'
1919

20-
sourceCompatibility = 1.8
20+
sourceCompatibility = 11
2121

2222

2323
repositories {
@@ -34,6 +34,9 @@ dependencies {
3434

3535
// Logging
3636
compile 'io.github.microutils:kotlin-logging:1.6.10'
37+
38+
// unit tests
39+
testImplementation 'org.skyscreamer:jsonassert:1.+'
3740

3841
}
3942

telemetry/src/main/kotlin/org/strykeforce/thirdcoast/telemetry/grapher/Subscription.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ class Subscription(inventory: Inventory, val client: String, requestJson: String
3838
.name("timestamp").value(System.currentTimeMillis())
3939
.name("data").beginArray()
4040
measurements.forEach { writer.value(it.asDouble) }
41-
writer.endArray()
42-
.endObject()
41+
writer.endArray().endObject()
4342
}
4443

4544
@Throws(IOException::class)

telemetry/src/main/kotlin/org/strykeforce/thirdcoast/telemetry/item/TalonItem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TalonItem @JvmOverloads constructor(
2121
override fun measurementFor(measure: Measure): DoubleSupplier {
2222
return when (measure) {
2323
UNKNOWN -> DoubleSupplier { 2767.0 }
24-
CLOSED_LOOP_TARGET -> DoubleSupplier { talon.getClosedLoopTarget(0).toDouble() }
24+
CLOSED_LOOP_TARGET -> DoubleSupplier { talon.getClosedLoopTarget(0) }
2525
OUTPUT_CURRENT -> DoubleSupplier { talon.outputCurrent }
2626
OUTPUT_VOLTAGE -> DoubleSupplier { talon.motorOutputVoltage }
2727
OUTPUT_PERCENT -> DoubleSupplier { talon.motorOutputPercent }

telemetry/src/test/groovy/org/strykeforce/thirdcoast/telemetry/InventoryTest.groovy

Lines changed: 0 additions & 73 deletions
This file was deleted.

telemetry/src/test/groovy/org/strykeforce/thirdcoast/telemetry/TelemetryServiceTest.groovy

Lines changed: 0 additions & 45 deletions
This file was deleted.

telemetry/src/test/groovy/org/strykeforce/thirdcoast/telemetry/grapher/MeasureTest.groovy

Lines changed: 0 additions & 20 deletions
This file was deleted.

telemetry/src/test/groovy/org/strykeforce/thirdcoast/telemetry/grapher/SubscriptionTest.groovy

Lines changed: 0 additions & 157 deletions
This file was deleted.

telemetry/src/test/groovy/org/strykeforce/thirdcoast/telemetry/item/TalonItemTest.groovy

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)