From e699812af4405f40b8e74571db7f6ac3195a21ac Mon Sep 17 00:00:00 2001 From: "DrZiplok@gmail.com" Date: Sat, 27 Nov 2010 00:54:21 +0000 Subject: [PATCH] Don't zero fields in the ctor that can be zeroed by reset_I; the code gets replicated for every static instance of the class, which is obscene. git-svn-id: https://arducopter.googlecode.com/svn/trunk@941 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- libraries/PID/PID.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/libraries/PID/PID.h b/libraries/PID/PID.h index f9425c80b3..1fcd1b93da 100644 --- a/libraries/PID/PID.h +++ b/libraries/PID/PID.h @@ -20,10 +20,7 @@ public: /// PID(uint16_t address = 0) : _gain_array(0), - _address(address), - _integrator(0), - _last_error(0), - _last_derivative(0) + _address(address) {} /// Constructor @@ -34,10 +31,7 @@ public: /// PID(float *gain_array) : _gain_array(gain_array), - _address(0), - _integrator(0), - _last_error(0), - _last_derivative(0) + _address(0) {} /// Iterate the PID, return the new control value