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

Create ArtnetEtherENC.h #79

Merged
merged 22 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion Artnet/Receiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ class Receiver_ {
}
template <typename T = S>
auto macAddress(uint8_t* mac) -> std::enable_if_t<std::is_same<T, EthernetUDP>::value> {
#ifndef ESP8266
#if !defined(ESP8266) && !defined(ARTNET_ETHER_IS_ENC28J60)
Ethernet.MACAddress(mac);
#endif
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest (on GitHub) version has the MACAddress() method.

https://github.com/JAndrassy/EthernetENC/blob/3a50d3aa9c1510e4090d1763ec3e91c700b764a1/src/Ethernet.h#L99

So, could you modify these lines as follows? (ESP8266 also has MACAddress() method now, #if directive has removed)

Suggested change
#if !defined(ESP8266) && !defined(ARTNET_ETHER_IS_ENC28J60)
Ethernet.MACAddress(mac);
#endif
Ethernet.MACAddress(mac);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

I was able to compile my sketch after cloning the latest ENC library and removing the #if directive

Readme and workflow have been updated to use git instead of regular installation

}
Expand Down
20 changes: 20 additions & 0 deletions ArtnetEtherENC.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#pragma once
#ifndef ARTNET_ETHER_H
#define ARTNET_ETHER_H

#define ARTNET_ENABLE_ETHER
#define ARTNET_ETHER_IS_ENC28J60

#include <Arduino.h>
#include <ArxTypeTraits.h>
#include <ArxContainer.h>
#include <EthernetENC.h>
#include <EthernetUdp.h>
#include "Artnet/util/TeensyDirtySTLErrorSolution/TeensyDirtySTLErrorSolution.h"
#include "Artnet/Manager.h"

using Artnet = art_net::Manager<EthernetUDP>;
using ArtnetSender = art_net::Sender<EthernetUDP>;
using ArtnetReceiver = art_net::Receiver<EthernetUDP>;

#endif // ARTNET_ETHER_H
Loading