#include "Behaviors/StateMachine.h"

$nodeclass PlayLED : StateNode {
  $setupmachine {
    // An empty node which just waits for a button press
    startNode: StateNode
    // Flashes the play LED for 1 second
    playLED: LedNode [getMC()->flash(RobotInfo::PlayLEDMask, 1.0, 1000)]
    // A simple loop which waits in startNode for the play button to be pressed,
    // flashes the play LED for 1 second and repeats
    startNode =B(RobotInfo::PlayButOffset, activateETID)=> playLED =C=> startNode
  }
}

REGISTER_BEHAVIOR(PlayLED);
