cleanup docs and whitespace
This commit is contained in:
parent
71edfaf7e9
commit
fdb2980d0e
@ -124,11 +124,9 @@ void Universe::setData(const std::vector<uint8_t>& data)
|
|||||||
std::copy(data.begin(), data.end(), null_start_data.begin());
|
std::copy(data.begin(), data.end(), null_start_data.begin());
|
||||||
null_start_mutex.unlock();
|
null_start_mutex.unlock();
|
||||||
|
|
||||||
// update rx times
|
|
||||||
rx_timeout_(true);
|
|
||||||
|
|
||||||
// notify callbacks
|
rx_timeout_(true); // update rx times
|
||||||
doDataCallbacks();
|
doDataCallbacks(); // notify callbacks
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -267,6 +265,7 @@ void Universe::rx_timeout_(bool add_now)
|
|||||||
{
|
{
|
||||||
auto now = std::chrono::system_clock::now();
|
auto now = std::chrono::system_clock::now();
|
||||||
auto age = rxAge();
|
auto age = rxAge();
|
||||||
|
|
||||||
if (add_now)
|
if (add_now)
|
||||||
{
|
{
|
||||||
setStatus(Status::DMX_ACTIVE);
|
setStatus(Status::DMX_ACTIVE);
|
||||||
@ -282,7 +281,7 @@ void Universe::rx_timeout_(bool add_now)
|
|||||||
};
|
};
|
||||||
|
|
||||||
while (!rx_times_.empty())
|
while (!rx_times_.empty())
|
||||||
{
|
{ // drop timestamps that are older than the timeout period
|
||||||
age = elapsed(now, rx_times_.front());
|
age = elapsed(now, rx_times_.front());
|
||||||
if (age < rx_timeout_period_)
|
if (age < rx_timeout_period_)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user