mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[ntcore] Rename constants to all caps style (#8676)
This commit is contained in:
@@ -292,7 +292,7 @@ public final class DriverStation {
|
||||
table
|
||||
.getStringTopic(".type")
|
||||
.publishEx(
|
||||
StringTopic.kTypeString, "{\"SmartDashboard\":\"" + kSmartDashboardType + "\"}")
|
||||
StringTopic.TYPE_STRING, "{\"SmartDashboard\":\"" + kSmartDashboardType + "\"}")
|
||||
.set(kSmartDashboardType);
|
||||
gameData = table.getStringTopic("GameData").publish();
|
||||
gameData.set("");
|
||||
|
||||
@@ -111,7 +111,7 @@ public abstract class RobotBase implements AutoCloseable {
|
||||
// wait for the NT server to actually start
|
||||
try {
|
||||
int count = 0;
|
||||
while (inst.getNetworkMode().contains(NetworkTableInstance.NetworkMode.kStarting)) {
|
||||
while (inst.getNetworkMode().contains(NetworkTableInstance.NetworkMode.STARTING)) {
|
||||
Thread.sleep(10);
|
||||
count++;
|
||||
if (count > 100) {
|
||||
@@ -126,7 +126,7 @@ public abstract class RobotBase implements AutoCloseable {
|
||||
inst.addConnectionListener(
|
||||
false,
|
||||
event -> {
|
||||
if (event.is(NetworkTableEvent.Kind.kConnected)) {
|
||||
if (event.is(NetworkTableEvent.Kind.CONNECTED)) {
|
||||
HAL.reportUsage("NT/" + event.connInfo.remote_id, "");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -208,7 +208,7 @@ public class MechanismLigament2d extends MechanismObject2d {
|
||||
table
|
||||
.getStringTopic(".type")
|
||||
.publishEx(
|
||||
StringTopic.kTypeString, "{\"SmartDashboard\":\"" + kSmartDashboardType + "\"}");
|
||||
StringTopic.TYPE_STRING, "{\"SmartDashboard\":\"" + kSmartDashboardType + "\"}");
|
||||
m_typePub.set(kSmartDashboardType);
|
||||
|
||||
if (m_angleEntry != null) {
|
||||
|
||||
@@ -230,7 +230,7 @@ public class SendableBuilderImpl implements NTSendableBuilder {
|
||||
m_typePub =
|
||||
m_table
|
||||
.getStringTopic(".type")
|
||||
.publishEx(StringTopic.kTypeString, "{\"SmartDashboard\":\"" + type + "\"}");
|
||||
.publishEx(StringTopic.TYPE_STRING, "{\"SmartDashboard\":\"" + type + "\"}");
|
||||
}
|
||||
m_typePub.set(type);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public final class Preferences {
|
||||
m_table
|
||||
.getStringTopic(".type")
|
||||
.publishEx(
|
||||
StringTopic.kTypeString, "{\"SmartDashboard\":\"" + kSmartDashboardType + "\"}");
|
||||
StringTopic.TYPE_STRING, "{\"SmartDashboard\":\"" + kSmartDashboardType + "\"}");
|
||||
m_typePublisher.set(kSmartDashboardType);
|
||||
|
||||
// Subscribe to all Preferences; this ensures we get the latest values
|
||||
@@ -87,7 +87,7 @@ public final class Preferences {
|
||||
m_listener =
|
||||
NetworkTableListener.createListener(
|
||||
m_tableSubscriber,
|
||||
EnumSet.of(NetworkTableEvent.Kind.kImmediate, NetworkTableEvent.Kind.kPublish),
|
||||
EnumSet.of(NetworkTableEvent.Kind.IMMEDIATE, NetworkTableEvent.Kind.PUBLISH),
|
||||
event -> {
|
||||
if (event.topicInfo != null) {
|
||||
Topic topic = event.topicInfo.getTopic();
|
||||
|
||||
Reference in New Issue
Block a user