Well, I generally don't respond on weekends. Too much to do with my family.
Well, you got your states correct. And you are using the correct events (evUp and evDown).
You still haven't read and understood the discussion about conditions.
All of your transitions should be of the form Event [condition] / action. ... You don't seem to grasp that "above" or "below" are the only conditions that are allowed in the problem. |
Conditions of [downButton, upButt], [downButton, downBut], [upButton, upButton], etc. are wrong. The only words allowed inside the square brackets are [above] and [below]. Anything else is incorrect. Those are the allowed conditions.
A single transition should only have 1 event/condition/action on it. However, assuming that you meant for the outer arrows to each reflect 2 separate transitions, you made a mistake. If you are in the "Moving down" state and receive a "evDown" event, why would you ever transition to the "Moving Up" state? Same with receiving evUp in the Moving Up state.
Based on all of this, I feel you still don't quite grasp how state machines work.
Slow down. Draw the state diagram for the state transition table that I gave you last week. (3 states, 6 transitions, no conditions). Add the output actions. Remember,
this state transition table assumes there is no top or bottom limit, so it will never hit the top or bottom. The beep is only generated when the blinds hit the top or bottom, so
IN THIS EXAMPLE, you will not call beep(). Also, I will repeat that there are
NO CONDITIONS in this simplified state machine, so you should
not have [condition] on any of your transitions in your diagram for this simplified state machine.
If you don't understand how this simplified state machine operates, you won't understand how to add the top and bottom limits to it.
When you upload your simplified diagram, answer the following question: "Do you understand why each state/input combination leads to the associated output and subsequent new state?" If you don't understand a particular transition, tell me your concern, and we can see if we can explain it.
If you provide the simplified state diagram, I will help you understand how the top and bottom limits apply. If you give me another rehash of your guesses at a full state machine that has random conditions on the transitions, I won't bother responding any more. So, 3 states, 2 events, 6 transitions, no conditions, and output actions for the transitions. That's all--nothing else.