sparkfun / SparkFunDMX

https://www.sparkfun.com/
Other
30 stars 7 forks source link

Allow for more than one instance #13

Closed BlinxFox closed 10 months ago

BlinxFox commented 10 months ago

Remove the static keyword from the header.

This allows for more instances when you have several HardwareSerial's.

For reference: https://forum.arduino.cc/t/could-this-library-be-edited-to-run-more-than-one-instance/1191897/38

sfe-SparkFro commented 10 months ago

Thanks for your contribution! Looks good to me, will merge this in and make a new release shortly here.

Sorry this was implemented as a static class, that wasn't intentional. A previous implementation was written in a way that only allowed one instance to be created, and looks like that just got carried through to this version accidentally.

Thanks again!