[ntcore] Notify locally on SetDefault (#4617)

This is necessary for the simulation GUI to pick up default publishes.
This commit is contained in:
Peter Johnson
2022-11-12 06:33:10 -08:00
committed by GitHub
parent b0f6dc199d
commit 179f569113

View File

@@ -1234,7 +1234,7 @@ bool LSImpl::SetDefaultEntryValue(NT_Handle pubsubentryHandle,
}
if (auto topic = GetTopic(pubsubentryHandle)) {
if (topic->type == NT_UNASSIGNED || topic->type == value.type()) {
// set without notifying
// force value timestamps to 0
topic->type = value.type();
topic->lastValue = value;
topic->lastValue.SetTime(0);
@@ -1249,9 +1249,7 @@ bool LSImpl::SetDefaultEntryValue(NT_Handle pubsubentryHandle,
return true;
}
}
if (publisher->active && m_network) {
m_network->SetValue(publisher->handle, value);
}
PublishLocalValue(publisher, topic->lastValue);
return true;
}
}