Using Gammon's LED Flasher library with a state machine?

Set the digital output to the state that you need as you enter the next state, as you have done.

Or just add a method to the library to do the same thing (like reset() or something). This could allow you to reset timers as well..

UPDATE: I just check the library header file and the object has everything you need...

    void begin ();
    void update ();
    void on ();
    void off ();
    bool isOn () const;