Skip to content

Commit aa7ad25

Browse files
committed
Merge branch 'temp'
2 parents 6ef7b2d + 204be5a commit aa7ad25

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ buildscript {
3333
// applies to all sub-projects
3434
configure(subprojects) {
3535
group = 'org.strykeforce.thirdcoast'
36-
version = '19.5.0'
36+
version = '19.5.1'
3737

3838
apply plugin: 'java-library'
3939
apply plugin: 'idea'

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ internal const val PULSE_WIDTH_RISE_TO_FALL = "PULSE_WIDTH_RISE_TO_FALL"
2727
internal const val PULSE_WIDTH_RISE_TO_RISE = "PULSE_WIDTH_RISE_TO_RISE"
2828
internal const val FORWARD_LIMIT_SWITCH_CLOSED = "FORWARD_LIMIT_SWITCH_CLOSED"
2929
internal const val REVERSE_LIMIT_SWITCH_CLOSED = "REVERSE_LIMIT_SWITCH_CLOSED"
30+
internal const val TEMPERATURE = "TEMPERATURE"
3031

3132
/** Represents a [TalonSRX] telemetry-enable `Measurable` item. */
3233
class TalonItem @JvmOverloads constructor(
@@ -62,7 +63,8 @@ class TalonItem @JvmOverloads constructor(
6263
Measure(PULSE_WIDTH_RISE_TO_FALL, "PWM Pulse Width"),
6364
Measure(PULSE_WIDTH_RISE_TO_RISE, "PWM Period"),
6465
Measure(FORWARD_LIMIT_SWITCH_CLOSED, "Forward Limit Switch Closed"),
65-
Measure(REVERSE_LIMIT_SWITCH_CLOSED, "Reverse Limit Switch Closed")
66+
Measure(REVERSE_LIMIT_SWITCH_CLOSED, "Reverse Limit Switch Closed"),
67+
Measure(TEMPERATURE, "Controller Temperature")
6668
)
6769

6870
private val sensorCollection = requireNotNull(talon.sensorCollection)
@@ -95,6 +97,7 @@ class TalonItem @JvmOverloads constructor(
9597
PULSE_WIDTH_RISE_TO_RISE -> DoubleSupplier { sensorCollection.pulseWidthRiseToRiseUs.toDouble() }
9698
FORWARD_LIMIT_SWITCH_CLOSED -> DoubleSupplier { sensorCollection.isFwdLimitSwitchClosed.toDouble() }
9799
REVERSE_LIMIT_SWITCH_CLOSED -> DoubleSupplier { sensorCollection.isRevLimitSwitchClosed.toDouble() }
100+
TEMPERATURE -> DoubleSupplier { talon.temperature }
98101
else -> DoubleSupplier { 2767.0 }
99102
}
100103
}

0 commit comments

Comments
 (0)