| 59 | |
| 60 | |
| 61 | void Switch::reset() { |
| 62 | std::cout << "** RESET Switch" << std::endl; |
| 63 | // Reset all states (calls constructor on all states in list) |
| 64 | tinyfsm::StateList<Off, On>::reset(); |
| 65 | |
| 66 | // Alternatively, make counter public above and reset the values |
| 67 | // here instead of using a copy-constructor with StateList<>: |
| 68 | //state<On>().counter = 0; |
| 69 | //state<Off>().counter = 0; |
| 70 | } |
| 71 | |
| 72 | FSM_INITIAL_STATE(Switch, Off) |
| 73 |
nothing calls this directly
no outgoing calls
no test coverage detected