improve a bit

master
Hideaki Tai 4 years ago
parent 9099ffcab4
commit 8439fdd373

@ -207,10 +207,10 @@ namespace arx {
} }
void streaming(const String& ip, const uint32_t universe_) { void streaming(const String& ip, const uint32_t universe_) {
uint32_t now = millis();
if (intervals.find(universe_) == intervals.end()) { if (intervals.find(universe_) == intervals.end()) {
intervals.insert(make_pair(universe_, millis())); intervals.insert(make_pair(universe_, now));
} }
uint32_t now = millis();
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…
Cancel
Save