From 391e4268c40a071151e4352c4cfb049bb6b79a06 Mon Sep 17 00:00:00 2001 From: jasonshort Date: Fri, 19 Nov 2010 07:18:40 +0000 Subject: [PATCH] git-svn-id: https://arducopter.googlecode.com/svn/trunk@859 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- libraries/PID/PID.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libraries/PID/PID.cpp b/libraries/PID/PID.cpp index c4195eb316..ed9f5a53d6 100644 --- a/libraries/PID/PID.cpp +++ b/libraries/PID/PID.cpp @@ -21,11 +21,7 @@ PID::get_pid(long err, long dt, float scaler) if(_kd != 0){ // Compute derivative component //derivative = (error - previous_error)/dt - float derivative = (error - _last_error) / dt; - - //Serial.print("d: "); - //Serial.println(derivative,DEC); - + float derivative = 1000 * (error - _last_error) / dt; _last_error = error; output += _kd * derivative; // Sum the derivative component }