AceUtils
0.5.0
Useful Arduino utilties which are too small as separate libraries, but complex enough to be shared among multiple projects, and often have external dependencies to other libraries.
|
The ModeGroup
struct defines a tree of sibling and parent/child modes which define the different modes of a clock that can be controlled by 2 buttons.
ModeGroup
.The ModeNavigator
extracts common navigation code to promote code reuse.
The advantage of using these classes is that the hierarchy of modes is data-driven instead of being hardcoded into various switch
statements. It is far easier to rearrange the UI of the clock, placing modes in different order, or at different levels, using a data-driven specification. When the navigation was in code, it was quite difficult to make changes without spending a lot of time fixing subtle UI bugs.
This package is used by:
(No time to write a full documentation. The next best thing is to look at the source code for one of the above clocks.)