PID Control Library Question

I have a question about PID_v1 from by Brett Beauregard. I am also doing a project with Quadcopter which use the PID to balance my quadcopter, but the problem is have is that the quadcopter cannot balance. And i dont understand about the controlDirection in the PID library?

/* SetControllerDirection(...)*************************************************
 * The PID will either be connected to a DIRECT acting process (+Output leads 
 * to +Input) or a REVERSE acting process(+Output leads to -Input.)  we need to
 * know which one, because otherwise we may increase the output when we should
 * be decreasing.  This is called from the constructor.
 ******************************************************************************/
void PID::SetControllerDirection(int Direction)
{
   if(inAuto && Direction !=controllerDirection)
   {
	  kp = (0 - kp);
      ki = (0 - ki);
      kd = (0 - kd);
   }   
   controllerDirection = Direction;
}

For quadcopter, which Direction should i use?
if (Direction = DIRECT) the kp, ki, kd should be negative or positive?

I see that DIRECT mean output increases as input increases and INDIRECT means reverse!

I see that DIRECT mean output increases as input increases and INDIRECT means reverse!

Yes. So what are your input(s)? What are you using the output for?

You could read the documentation:

http://playground.arduino.cc/Code/PIDLibrarySetControllerDirection
"Direction: DIRECT (like a car) or REVERSE (like a refrigerator)"

DIRECT: If the Input is above the Setpoint, the Output goes LOWER.
If the speed of the car is above the desired speed set the throttle point lower.

REVERSE: If the Input is above the Setpoint the Output goes HIGHER.
If the temperature of the refrigerator is above the desired temperature, turn on the compressor more often or longer to bring the temperature down.

My inputs are angles from the MPU9150, and i want to balance the quadcopter. I use DIRECT method in PID to balance the quadcopter, but actually it cannot balance. In fact, i use use PID with inputs being the Pitch angles to control 2 motors, but i oscillates all the times.
PS: i already read this library, but still cannot apply for my quadcopter

You did PID tuning? or what? and what about Kalman Filtering?

My inputs are angles from the MPU9150, and i want to balance the quadcopter.

What you want doesn't really matter. What do you GET? How do you use what you get?

NI$HANT:
You did PID tuning? or what? and what about Kalman Filtering?

I did PID tuning many times, but it still oscillates after staying balanced 2 or 3 seconds.
I use DCM Algoritm + Complimentary Filter, not Kalman Filter

PaulS:

My inputs are angles from the MPU9150, and i want to balance the quadcopter.

What you want doesn't really matter. What do you GET? How do you use what you get?

What i get is the Roll, Pitch and Yaw angles, and i use those angles as inputs to my PID Controller.
The motor on the lower side will have higher duty cycle and on the upper side will have lower duty cycle. That is what my PID Controller does!