Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump arxcontainer to v0.6.0 #91

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Artnet/ArtDmx.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ using SequenceMap = std::map<Destination, uint8_t>;
using CallbackMap = std::map<uint16_t, CallbackType>;
#else
// sender
using LastSendTimeMsMap = arx::map<Destination, uint32_t>;
using SequenceMap = arx::map<Destination, uint8_t>;
using LastSendTimeMsMap = arx::stdx::map<Destination, uint32_t>;
using SequenceMap = arx::stdx::map<Destination, uint8_t>;
// receiver
using CallbackMap = arx::map<uint16_t, CallbackType>;
using CallbackMap = arx::stdx::map<uint16_t, CallbackType>;
#endif

inline Metadata generateMetadataFrom(const uint8_t *packet)
Expand Down
4 changes: 1 addition & 3 deletions Artnet/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,9 @@ constexpr uint16_t PACKET_SIZE {530};
#if ARX_HAVE_LIBSTDCPLUSPLUS >= 201103L // Have libstdc++11
template <uint16_t SIZE>
using Array = std::array<uint8_t, SIZE>;
using namespace std;
#else
template <uint16_t SIZE>
using Array = arx::vector<uint8_t, SIZE>;
using namespace arx;
using Array = arx::stdx::vector<uint8_t, SIZE>;
#endif

struct RemoteInfo
Expand Down
7 changes: 1 addition & 6 deletions Artnet/Receiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,7 @@ class Receiver_
auto subscribeArtDmxUniverse(uint16_t universe, const Fn &func)
-> std::enable_if_t<arx::is_callable<Fn>::value>
{
#if ARX_HAVE_LIBSTDCPLUSPLUS >= 201103L // Have libstdc++11
this->callback_art_dmx_universes.insert(make_pair(universe, arx::function_traits<Fn>::cast(func)));
#else
// TODO: arx::map::insert()
this->callback_art_dmx_universes.insert(make_pair<uint16_t, ArtDmxCallback>(universe, arx::function_traits<Fn>::cast(func)));
#endif
this->callback_art_dmx_universes.insert(std::make_pair(universe, arx::function_traits<Fn>::cast(func)));
}

// subscribe artdmx packet for all universes
Expand Down
4 changes: 2 additions & 2 deletions Artnet/Sender.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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());
Expand Down
Binary file modified examples/Apps/TouchDesigner/artnet_test.toe
Binary file not shown.
4 changes: 2 additions & 2 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "*"
}
}
4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name=ArtNet
version=0.4.0
version=0.4.1
author=hideakitai
maintainer=hideakitai
sentence=Art-Net Sender/Receiver for Arduino (Ethernet, WiFi)
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
Loading