kubtss / Mbed 2 deprecated BIRD2017

Dependencies:   mbed-rtos mbed

Revision:
9:d1fc0805ec7d
Parent:
8:ca92cb674004
--- a/Control/Trim.cpp	Tue Oct 13 13:10:21 2015 +0000
+++ b/Control/Trim.cpp	Wed Oct 14 13:44:32 2015 +0000
@@ -11,7 +11,7 @@
     upswstatus = 1;
     downswstatus = 1;
     
-    pitchrate = 0.5;
+    pitchrate = Global::gettrimpitchrate();
 }
 
 
@@ -46,9 +46,11 @@
 
 double Trim::calc(int trimpitch){
     return (double)trimpitch*pitchrate;
-}    
+}
 
 void Trim::update(){
+    pitchrate = Global::gettrimpitchrate();
+
     if(_upsw == 0){
         upswstatus = 0;
     }else if((_upsw == 1)&&(upswstatus == 0)){