TER Atienza Pongnot 2019 / TLE5206_lib

Fork of TLE5206_lib by nicolas Atienza

Revision:
4:a2009252a961
Parent:
3:fa6c021ddefe
--- a/TLE5206_lib.cpp	Tue Mar 26 17:00:06 2019 +0000
+++ b/TLE5206_lib.cpp	Thu Mar 28 07:30:04 2019 +0000
@@ -19,19 +19,19 @@
         this->pwmIN1 = TLE5206_SAT_LOW;
         this->pwmIN2 = 0.0;
     }else if (duty_cycle < 0){
-        this.pwmIN1 = -TLE5206_SAT_LOW/TLE5206_NO_SAT_LOW*duty_cycle;
-        this.pwmIN2 = 0.0;
-    }else if (dutycycle < TLE5206_NO_SAT_LOW){
-        this.pwmIN1 = 0.0;
-        this.pwmIN2 = TLE5206_SAT_LOW/TLE5206_NO_SAT_LOW*duty_cycle;
-    }else if (dutycycle < TLE5206_SAT_LOW){
-        this.pwmIN1 = 0.0;
-        this.pwmIN2 = TLE5206_SAT_LOW;
-    }else if (dutycycle < TLE5206_SAT_HIGH){
-        this.pwmIN1 = 0.0;
-        this.pwmIN2 = dutycycle;
+        this->pwmIN1 = -TLE5206_SAT_LOW/TLE5206_NO_SAT_LOW*duty_cycle;
+        this->pwmIN2 = 0.0;
+    }else if (duty_cycle < TLE5206_NO_SAT_LOW){
+        this->pwmIN1 = 0.0;
+        this->pwmIN2 = TLE5206_SAT_LOW/TLE5206_NO_SAT_LOW*duty_cycle;
+    }else if (duty_cycle < TLE5206_SAT_LOW){
+        this->pwmIN1 = 0.0;
+        this->pwmIN2 = TLE5206_SAT_LOW;
+    }else if (duty_cycle < TLE5206_SAT_HIGH){
+        this->pwmIN1 = 0.0;
+        this->pwmIN2 = duty_cycle;
     }else {
-        this.pwmIN1 = 0.0;
-        this.pwmIN2 = TLE5206_SAT_HIGH;
+        this->pwmIN1 = 0.0;
+        this->pwmIN2 = TLE5206_SAT_HIGH;
     }
 }
\ No newline at end of file