corneliusmunz / legoino

Arduino Library for controlling Powered UP and Boost controllers
MIT License
257 stars 34 forks source link

Why use "enum struct" instead of "enum" for DuploTrainBaseSound? #61

Open fredlcore opened 3 years ago

fredlcore commented 3 years ago

https://github.com/corneliusmunz/legoino/blob/434b74fe6717640a9d054ef7533d68c764e33a5d/src/Lpf2HubConst.h#L224

For Color you use an enum which makes code much easier to read as you can just use RED or CYAN to refer to the respective colors. For the sounds, we have to write DuploTrainBaseSound::BRAKE which makes reading a bit more clumsy. It's of course nothing major and maybe I just overlook an important aspect, but if it is exchangeable, why not use a simple enum here as well?