Make ClockWidget widget optional #283
Labels
No labels
bug
conflicts
documentation
DO NOT MERGE
duplicate
enhancement
good first issue
hardware
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
greg/info-orbs#283
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
No reason why it should be hardcoded. Maybe I don't want a clock?
I Agree. I think all widgets should behave the same including the ability to turn them off
We can do that, we just need to make sure that something like
WidgetSet::next()does not go into an infinite recursion.At the moment, it expects at least one widget to be enabled.
github.com/brettdottech/info-orbs@f584d09f14/firmware/src/core/widget/WidgetSet.cpp (L43)WidgetSet::next() should first check the count
That only helps if you compile with 0 widgets (and that will probably "never" happen, but we should check for it anyway).
But we also need to check for the case that a user disables all widgets in the WebUI. That might actually happen by accident.
don't forget WidgetSet::prev() :-(
maybe better to check m_enabled as this is what the user can change.. Once we add the ability to change it's value in the UI.