[ntcore] Rename constants to all caps style (#8676)

This commit is contained in:
Peter Johnson
2026-03-15 20:44:45 -07:00
committed by GitHub
parent 86dd3ca2b7
commit ab7e4766f6
99 changed files with 736 additions and 732 deletions

View File

@@ -30,7 +30,7 @@ NetworkTablesProvider::NetworkTablesProvider(Storage& storage,
m_typeCache{storage.GetChild("types")} {
storage.SetCustomApply([this] {
m_listener = m_poller.AddListener(
{{""}}, wpi::nt::EventFlags::kImmediate | wpi::nt::EventFlags::kTopic);
{{""}}, wpi::nt::EventFlags::IMMEDIATE | wpi::nt::EventFlags::TOPIC);
for (auto&& childIt : m_storage.GetChildren()) {
auto id = childIt.key();
auto typePtr = m_typeCache.FindValue(id);
@@ -125,7 +125,7 @@ void NetworkTablesProvider::Update() {
continue;
}
if (event.flags & wpi::nt::EventFlags::kUnpublish) {
if (event.flags & wpi::nt::EventFlags::UNPUBLISH) {
auto it = m_topicMap.find(info->topic);
if (it != m_topicMap.end()) {
m_poller.RemoveListener(it->second.listener);
@@ -140,14 +140,14 @@ void NetworkTablesProvider::Update() {
if (it2 != m_viewEntries.end()) {
m_viewEntries.erase(it2);
}
} else if (event.flags & wpi::nt::EventFlags::kPublish) {
} else if (event.flags & wpi::nt::EventFlags::PUBLISH) {
// subscribe to it; use a subscriber so we only get string values
SubListener sublistener;
sublistener.subscriber =
wpi::nt::StringTopic{info->topic}.Subscribe("");
sublistener.listener = m_poller.AddListener(
sublistener.subscriber,
wpi::nt::EventFlags::kValueAll | wpi::nt::EventFlags::kImmediate);
wpi::nt::EventFlags::VALUE_ALL | wpi::nt::EventFlags::IMMEDIATE);
m_topicMap.try_emplace(info->topic, std::move(sublistener));
}
} else if (auto valueData = event.GetValueEventData()) {