//-*-c++-*-
#ifndef INCLUDED_BlinkBehavior_h_
#define INCLUDED_BlinkBehavior_h_
 
#include "Behaviors/StateMachine.h"
#include "Events/EventRouter.h"

class BlinkBehavior : public StateNode {

public:
  BlinkBehavior() : StateNode("BlinkBehavior") {}
 
  virtual void setup() {
#statemachine

startnode: StateNode =N=> {noblink, wait}

noblink: LedNode [setPriority(MotionManager::kBackgroundPriority);
	          getMC()->set(RobotInfo::FaceLEDMask,0.0);]

wait: StateNode
  =E(buttonEGID, ChiaraInfo::GreenButOffset, activateETID)=>
     blink: LedNode [getMC()->cycle(RobotInfo::GreenLEDMask, 1500, 1.0);] =T(1000)=> wait

#endstatemachine
  }       // end of setup()

};

#endif
