juijiu

Dependencies:   HIDScope QEI biquadFilter mbed

Fork of MotorArchitecture1-11 by Wouter Schuttert

Revision:
12:c59b25d07bb9
Parent:
11:c7e27de26ac0
--- a/main.cpp	Thu Nov 01 17:59:25 2018 +0000
+++ b/main.cpp	Thu Nov 01 18:24:55 2018 +0000
@@ -174,8 +174,8 @@
     twistf[0] = 1;
     twistf[1] = 0;
     
-    if (filteredsignal2 > (0.3*max2)){
-        abs_sig = (filteredsignal2 - (0.3*max2))/(0.7*max2)* gain;                    
+    if (filteredsignal2 > (0.4*max2)){
+        abs_sig = (filteredsignal2 - (0.4*max2))/(0.6*max2)* gain;                    
         }
     else
     {    abs_sig = 0;
@@ -219,8 +219,8 @@
     twistf[0] = -1;
     twistf[1] = 0;
     
-    if (filteredsignal2 > (0.3*max2)){
-        abs_sig = (filteredsignal2 - (0.3*max2))/(0.7*max2)* gain;                    
+    if (filteredsignal2 > (0.4*max2)){
+        abs_sig = (filteredsignal2 - (0.4*max2))/(0.6*max2)* gain;                    
         }
     else
     {    abs_sig = 0;
@@ -264,8 +264,8 @@
     twistf[0] = 0;
     twistf[1] = 1;
     
-    if (filteredsignal2 > (0.3*max2)){
-        abs_sig = (filteredsignal2 - (0.3*max2))/(0.7*max2)* gain;                    
+    if (filteredsignal2 > (0.4*max2)){
+        abs_sig = (filteredsignal2 - (0.4*max2))/(0.6*max2)* gain;                    
         }
     else
     {    abs_sig = 0;
@@ -309,8 +309,8 @@
     twistf[0] = 0;
     twistf[1] = -1;
     
-    if (filteredsignal2 > (0.3*max2)){
-        abs_sig = (filteredsignal2 - (0.3*max2))/(0.7*max2)* gain;                    
+    if (filteredsignal2 > (0.4*max2)){
+        abs_sig = (filteredsignal2 - (0.4*max2))/(0.6*max2)* gain;                    
         }
     else
     {    abs_sig = 0;