diff --git a/Artnet/ArtDmx.h b/Artnet/ArtDmx.h index e393ad9..f1128b9 100644 --- a/Artnet/ArtDmx.h +++ b/Artnet/ArtDmx.h @@ -85,10 +85,10 @@ using SequenceMap = std::map; using CallbackMap = std::map; #else // sender -using LastSendTimeMsMap = arx::map; -using SequenceMap = arx::map; +using LastSendTimeMsMap = arx::stdx::map; +using SequenceMap = arx::stdx::map; // receiver -using CallbackMap = arx::map; +using CallbackMap = arx::stdx::map; #endif inline Metadata generateMetadataFrom(const uint8_t *packet) diff --git a/Artnet/Common.h b/Artnet/Common.h index fecd398..124eb32 100644 --- a/Artnet/Common.h +++ b/Artnet/Common.h @@ -64,11 +64,9 @@ constexpr uint16_t PACKET_SIZE {530}; #if ARX_HAVE_LIBSTDCPLUSPLUS >= 201103L // Have libstdc++11 template using Array = std::array; -using namespace std; #else template -using Array = arx::vector; -using namespace arx; +using Array = arx::stdx::vector; #endif struct RemoteInfo diff --git a/Artnet/Receiver.h b/Artnet/Receiver.h index f0c5466..abd5b25 100644 --- a/Artnet/Receiver.h +++ b/Artnet/Receiver.h @@ -153,12 +153,7 @@ class Receiver_ auto subscribeArtDmxUniverse(uint16_t universe, const Fn &func) -> std::enable_if_t::value> { -#if ARX_HAVE_LIBSTDCPLUSPLUS >= 201103L // Have libstdc++11 - this->callback_art_dmx_universes.insert(make_pair(universe, arx::function_traits::cast(func))); -#else - // TODO: arx::map::insert() - this->callback_art_dmx_universes.insert(make_pair(universe, arx::function_traits::cast(func))); -#endif + this->callback_art_dmx_universes.insert(std::make_pair(universe, arx::function_traits::cast(func))); } // subscribe artdmx packet for all universes diff --git a/Artnet/Sender.h b/Artnet/Sender.h index e9c8bf5..0ffb5b9 100644 --- a/Artnet/Sender.h +++ b/Artnet/Sender.h @@ -52,7 +52,7 @@ class Sender_ art_dmx::Destination dest {ip, net, subnet, universe}; uint32_t now = millis(); if (this->last_send_times.find(dest) == this->last_send_times.end()) { - this->last_send_times.insert(make_pair(dest, uint32_t(0))); + this->last_send_times.insert(std::make_pair(dest, uint32_t(0))); } if (now >= this->last_send_times[dest] + DEFAULT_INTERVAL_MS) { this->sendArxDmxInternal(dest, physical); @@ -105,7 +105,7 @@ class Sender_ } #endif if (this->sequences.find(dest) == this->sequences.end()) { - this->sequences.insert(make_pair(dest, uint8_t(0))); + this->sequences.insert(std::make_pair(dest, uint8_t(0))); } art_dmx::setMetadataTo(this->packet.data(), this->sequences[dest], physical, dest.net, dest.subnet, dest.universe); this->sendRawData(dest.ip, DEFAULT_PORT, this->packet.data(), this->packet.size()); diff --git a/examples/Apps/TouchDesigner/artnet_test.toe b/examples/Apps/TouchDesigner/artnet_test.toe index 341fd06..0493a5a 100644 Binary files a/examples/Apps/TouchDesigner/artnet_test.toe and b/examples/Apps/TouchDesigner/artnet_test.toe differ diff --git a/library.json b/library.json index 847150b..dac8a83 100644 --- a/library.json +++ b/library.json @@ -11,13 +11,13 @@ "url": "https://github.com/hideakitai", "maintainer": true }, - "version": "0.4.0", + "version": "0.4.1", "license": "MIT", "frameworks": "*", "platforms": "*", "dependencies": { - "hideakitai/ArxContainer": "*", + "hideakitai/ArxContainer": ">=0.6.0", "hideakitai/ArxTypeTraits": "*" } } diff --git a/library.properties b/library.properties index 3472f6f..96385ee 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ArtNet -version=0.4.0 +version=0.4.1 author=hideakitai maintainer=hideakitai sentence=Art-Net Sender/Receiver for Arduino (Ethernet, WiFi) @@ -7,4 +7,4 @@ paragraph=Art-Net Sender/Receiver for Arduino (Ethernet, WiFi) category=Communication url=https://github.com/hideakitai/ArtNet architectures=* -depends=ArxContainer,ArxTypeTraits +depends=ArxContainer(>=0.6.0),ArxTypeTraits