mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpilib] Include sendable type information in topic metadata (#6741)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <networktables/StringArrayTopic.h>
|
||||
#include <ntcore_cpp.h>
|
||||
#include <wpi/SmallVector.h>
|
||||
#include <wpi/json.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user