mathertel / DmxSerial2

An Arduino library for sending and receiving DMX RDM packets.
BSD 3-Clause "New" or "Revised" License
99 stars 30 forks source link

Remove unnecessary comarisons #17

Closed g0uus closed 5 years ago

g0uus commented 6 years ago

Hi Mathias,

This is the change discussed in Merge pull request #13 from peternewman/patch-1.

https://github.com/mathertel/DmxSerial2/commit/63aa0e8b812ee11375dbd3d65bfc67bac6a13892#commitcomment-30769229

Simple change to remove unnecessary if tests (because it is already performed by earlier code) and to expand scope of tests in body of the MUTE/UNMUTE actions such that we only initialise the return packet if we are going to send it.

Graham

mathertel commented 5 years ago

Thanks. good finding. saving 44 bytes!