Closed almindor closed 8 months ago
@rfuest what do you think? I think we'll need to add some sort of state machine that can work well accross model and display itself.
In this case specifically I'm unhappy about how the sleeping state is not properly tied to init.
In this case specifically I'm unhappy about how the sleeping state is not properly tied to init.
I'm not sure I understand what you mean. Would you prefer that the initial state can be set by Model::init
instead of Display::init
? For the sleeping state I don't think this is necessary, because Model::init
is required to initialize the display into a non sleeping state. I also can't think of any other state that shouldn't be initialized to the same value by all Model::init
implementations. Do you have a use case in mind?
@rfuest I'm happy to merge this if you think it's good enough this way.
Adds a preliminary
is_sleeping
method. I'm not too happy about the state machine logic here though. I think we can merge this for the next version but I want to refactor things so that we can have a workable state machine for things like this that can properly tie into the Model inits etc.