diff --git a/wpilibc/src/main/native/cpp/smartdashboard/SendableBuilderImpl.cpp b/wpilibc/src/main/native/cpp/smartdashboard/SendableBuilderImpl.cpp index c0638504119..a49689b81dc 100644 --- a/wpilibc/src/main/native/cpp/smartdashboard/SendableBuilderImpl.cpp +++ b/wpilibc/src/main/native/cpp/smartdashboard/SendableBuilderImpl.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include "frc/smartdashboard/SmartDashboard.h" @@ -94,7 +95,8 @@ void SendableBuilderImpl::ClearProperties() { void SendableBuilderImpl::SetSmartDashboardType(std::string_view type) { if (!m_typePublisher) { - m_typePublisher = m_table->GetStringTopic(".type").Publish(); + m_typePublisher = m_table->GetStringTopic(".type").PublishEx( + nt::StringTopic::kTypeString, {{"SmartDashboard", type}}); } m_typePublisher.Set(type); } diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SendableBuilderImpl.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SendableBuilderImpl.java index 2f288910744..99a28624bd3 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SendableBuilderImpl.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SendableBuilderImpl.java @@ -251,7 +251,10 @@ public void addCloseable(AutoCloseable closeable) { @Override public void setSmartDashboardType(String type) { if (m_typePub == null) { - m_typePub = m_table.getStringTopic(".type").publish(); + m_typePub = + m_table + .getStringTopic(".type") + .publishEx(StringTopic.kTypeString, "{\"SmartDashboard\":\"" + type + "\"}"); } m_typePub.set(type); }