//
// TailControl.h
//

#ifndef TAILDCONTROL_H_
#define TAILDCONTROL_H_


#include "Motor.h"
using namespace ecrobot;

#define TAIL_ANGLE_STAND_UP 108 /* 姰慡掆巭帪偺妏搙[搙] */
#define TAIL_ANGLE_DRIVE      3 /* 僶儔儞僗憱峴帪偺妏搙[搙] */
#define P_GAIN             2.5F /* 姰慡掆巭梡儌乕僞惂屼斾椺學悢 */
#define PWM_ABS_MAX          60 /* 姰慡掆巭梡儌乕僞惂屼PWM愨懳嵟戝抣 */

extern "C"
{
	#include "balancer.h"
};


class TailControl
{
public:

	/**
	 * Constructor.
	 */
	TailControl(Motor* pMotorT);
	
	~TailControl();
	
	void tail_control(signed int angle);

private:

	Motor* m_pMotorT;
};

#endif
