Skip to content

Commit f772c12

Browse files
committed
Change implementation
1 parent d2e4791 commit f772c12

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cores/esp32/MacAddress.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ MacAddress::MacAddress(const char *macstr){
2828
fromString(macstr);
2929
}
3030

31+
MacAddress::MacAddress(const String &macstr){
32+
fromString(macstr.c_str());
33+
}
34+
3135
MacAddress::MacAddress(uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5, uint8_t b6) {
3236
_type = MAC6;
3337
memset(_mac.bytes, 0, sizeof(_mac.bytes));

cores/esp32/MacAddress.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class MacAddress : public Printable {
5454
MacAddress(const uint8_t *macbytearray) : MacAddress(MAC6, macbytearray) {}
5555

5656
MacAddress(const char *macstr);
57-
MacAddress(const String &macstr) : MacAddress(macstr.c_str()) {}
57+
MacAddress(const String &macstr);
5858

5959
virtual ~MacAddress() {}
6060

0 commit comments

Comments
 (0)