1
0
Fork 0

Use the DMX null start code timeout constant to prune received universes

This commit is contained in:
Kevin Matz 2021-08-16 10:15:42 -04:00
parent a6620f1def
commit 4440cb6f37
1 changed files with 5 additions and 5 deletions

View File

@ -156,7 +156,7 @@ void Universe::set(std::shared_ptr<ACN::DMP::Pdu> dmp,
*/
void Universe::setSource(std::shared_ptr<UniverseSource> source)
{
source_ = source;
source_ = source;
}
@ -172,7 +172,7 @@ uint8_t Universe::slot(const uint16_t addr)
/// not wait for a new E1.31 Synchronization Packet in order to update to the
/// next E1.31 Data Packet.
if (isSyncronized() && source()->isForced() && rxRate() == 0)
synchronize();
synchronize();
return DMX::Universe::slot(addr);
}
@ -398,8 +398,8 @@ Universe* MergeProxyUniverse::dominant_() const
Universe* ret = nullptr;
for (auto& [_, uni] : sources_)
{
if (uni->rxRate() < 1) // stale universes cannot be dominant
continue;
if (uni->rxRate() < (DMX::E111_DATA_LOSS_TIMEOUT / 1000.0))
continue; // stale universes cannot be dominant
if (!ret || uni->source()->priority() > ret->source()->priority())
ret = uni;
}
@ -415,7 +415,7 @@ void MergeProxyUniverse::newSource_(const UniverseSource &src)
{
sources_.emplace(src, new Universe());
sources_.at(src)->onData(std::bind(&SACN::MergeProxyUniverse::dataChangedNotifier,
this, std::placeholders::_1));
this, std::placeholders::_1));
}
}; // SACN