improve a bit
This commit is contained in:
parent
9099ffcab4
commit
8439fdd373
6
Artnet.h
6
Artnet.h
@ -207,10 +207,10 @@ namespace arx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void streaming(const String& ip, const uint32_t universe_) {
|
void streaming(const String& ip, const uint32_t universe_) {
|
||||||
if (intervals.find(universe_) == intervals.end()) {
|
|
||||||
intervals.insert(make_pair(universe_, millis()));
|
|
||||||
}
|
|
||||||
uint32_t now = millis();
|
uint32_t now = millis();
|
||||||
|
if (intervals.find(universe_) == intervals.end()) {
|
||||||
|
intervals.insert(make_pair(universe_, now));
|
||||||
|
}
|
||||||
if (now >= intervals[universe_] + DEFAULT_INTERVAL_MS) {
|
if (now >= intervals[universe_] + DEFAULT_INTERVAL_MS) {
|
||||||
set_universe(universe_);
|
set_universe(universe_);
|
||||||
send_packet(ip);
|
send_packet(ip);
|
||||||
|
Loading…
Reference in New Issue
Block a user