The original code just had a button labeled "Effect" which simply increments; the code handled this in a clever, simple way: if the `default` condition of the `switch (effect) {}` block was run, the effect counter would be reset to 0.
In this way it's easy to add more effects; no "max" or "stop" conditional needs to maintained nor coded. But, while cycling through the 4 original effects is fine, doing so through the 8 or 10 would be annoying.
So I changed it to "Efct+", and then to add "Efct-" I decremented the index, and only added a check to make sure it didn't go below 0. The only thing this didn't handle is you couldn't decrement below 0 and then wrap around to the last effect; I felt this was a (well, lazy) good compromise.
I thought about making other UI improvements, like "rotating" menus allow control of other things besides Exposure Lock and Light, but didn't get to it.


Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.