#!/bin/sh

lAudioTip=$1

script_path=`echo $0 | awk -F '/' '{for(i=2;i<NF;i++) printf"/"$i}'`
echo $script_path

if [ "$lAudioTip" != "no" ];then
	./simple_adec_bind_ao -r 8000 -t g711a -i audio/roadLampTestStart.pcm
fi

	sleep 5
	$script_path/roadLamp 1
	if [ $? != 0 ]; then
		exit -1
	fi
	sleep 2
	$script_path/roadLamp 2
	sleep 2
	$script_path/roadLamp 0
	sleep 1

if [ "$lAudioTip" != "no" ];then
	./simple_adec_bind_ao -r 8000 -t g711a -i audio/roadLampTestEnd.pcm
fi