//-*-c++-*-
#ifndef INCLUDED_SmoothMovement_h_
#define INCLUDED_SmoothMovement_h_

#include "Behaviors/StateMachine.h"
#include "Events/EventRouter.h"

class SmoothMovement : public StateNode {
  public:
    SmoothMovement() : StateNode("SmoothMovement") {}

    virtual void setup() {
     #statemachine
      	startnode: StateNode =N=>center
	
	//noblink: LedNode [setPriority(MotionManager::kBackgroundPriority);
	//		  getMC() ->set(RobotInfo::FaceLEDMask, 0.0);]

	center: HeadPointerNode [getMC() ->setMaxSpeed(0, 0.1); getMC() ->setMaxSpeed(1, 0.2);
				getMC() ->lookAtPoint(5000, 0, 400);] >==EventTrans($,$$,EventBase::buttonEGID,
	 ChiaraInfo::GreenButOffset, EventBase::activateETID)
	[setSound("ping.wav");]==>{ret, howl}

	ret: HeadPointerNode [getMC() ->lookAtPoint(5000, 0, -100);]

	//bark =T(5000)=>{howl, blink}

	howl: SoundNode($, "howl.wav")
	{howl, ret}=C(1)=>center
	
	//blink: LedNode [getMC() ->cycle(RobotInfo::AllLEDMask, 1500, 1.0);]
	//blink: LedNode [getMC() ->flash(RobotInfo::AllLEDMask, 500);]
	
	//{howl, blink} =C(1)=> wait
    #endstatemachine
  }
};
#endif	
