107-systems / 107-Arduino-Cyphal

Arduino library for providing a convenient C++ interface for accessing OpenCyphal.
https://107-systems.org
MIT License
69 stars 31 forks source link

Fix UniqueId for ATSAME5x #189

Closed generationmake closed 1 year ago

generationmake commented 1 year ago

:bug: Bug Report

I think UniqueId does not work with ATSAME5x (https://www.adafruit.com/product/4759). I think it goes into ARDUINO_ARCH_SAMD but there is nothing defined for ATSAME5x.

aentinger commented 1 year ago

A very quick and dirty fix, try changing this line:

-#ifdef ARDUINO_ARCH_SAMD
+#if defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_SAMD_ADAFRUIT)
aentinger commented 1 year ago

And also this line accordingly.

generationmake commented 1 year ago

hi @aentinger it seems like it is more a problem with this line: https://github.com/107-systems/107-Arduino-Cyphal/blob/main/src/utility/UniqueId16.h#L38

aentinger commented 1 year ago

Done @generationmake :heavy_check_mark: :wink: