mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Update for jart/json.cpp change
This commit is contained in:
@@ -87,10 +87,8 @@ struct MatchDataSender {
|
||||
std::shared_ptr<wpi::nt::NetworkTable> table =
|
||||
wpi::nt::NetworkTableInstance::GetDefault().GetTable("FMSInfo");
|
||||
MatchDataSenderEntry<wpi::nt::StringTopic> typeMetaData{
|
||||
table,
|
||||
".type",
|
||||
kSmartDashboardType,
|
||||
{{"SmartDashboard", kSmartDashboardType}}};
|
||||
table, ".type", kSmartDashboardType,
|
||||
wpi::util::json::object("SmartDashboard", kSmartDashboardType)};
|
||||
MatchDataSenderEntry<wpi::nt::StringTopic> gameData{table, "GameData", ""};
|
||||
MatchDataSenderEntry<wpi::nt::StringTopic> eventName{table, "EventName", ""};
|
||||
MatchDataSenderEntry<wpi::nt::IntegerTopic> matchNumber{table, "MatchNumber",
|
||||
|
||||
@@ -29,7 +29,7 @@ void MechanismLigament2d::UpdateEntries(
|
||||
std::shared_ptr<wpi::nt::NetworkTable> table) {
|
||||
m_typePub = table->GetStringTopic(".type").PublishEx(
|
||||
wpi::nt::StringTopic::TYPE_STRING,
|
||||
{{"SmartDashboard", kSmartDashboardType}});
|
||||
wpi::util::json::object("SmartDashboard", kSmartDashboardType));
|
||||
m_typePub.Set(kSmartDashboardType);
|
||||
|
||||
m_colorEntry = table->GetStringTopic("color").GetEntry("");
|
||||
|
||||
@@ -85,7 +85,8 @@ void SendableBuilderImpl::ClearProperties() {
|
||||
void SendableBuilderImpl::SetSmartDashboardType(std::string_view type) {
|
||||
if (!m_typePublisher) {
|
||||
m_typePublisher = m_table->GetStringTopic(".type").PublishEx(
|
||||
wpi::nt::StringTopic::TYPE_STRING, {{"SmartDashboard", type}});
|
||||
wpi::nt::StringTopic::TYPE_STRING,
|
||||
wpi::util::json::object("SmartDashboard", type));
|
||||
}
|
||||
m_typePublisher.Set(type);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ struct Instance {
|
||||
wpi::nt::StringPublisher typePublisher{
|
||||
table->GetStringTopic(".type").PublishEx(
|
||||
wpi::nt::StringTopic::TYPE_STRING,
|
||||
{{"SmartDashboard", kSmartDashboardType}})};
|
||||
wpi::util::json::object("SmartDashboard", kSmartDashboardType))};
|
||||
wpi::nt::MultiSubscriber tableSubscriber{
|
||||
wpi::nt::NetworkTableInstance::GetDefault(),
|
||||
{{fmt::format("{}/", table->GetPath())}}};
|
||||
|
||||
Reference in New Issue
Block a user