fork

Dependencies:   mbed

Fork of LG by igor Apu

Revision:
105:bd01d8d20fb6
Parent:
98:95b8e79f13e1
Child:
106:250ddd8629c6
--- a/QEI.c	Thu Mar 31 10:16:56 2016 +0000
+++ b/QEI.c	Thu Mar 31 14:03:40 2016 +0000
@@ -14,7 +14,7 @@
 int Pulse_16Point;
 int Pulse_32Point;
 int Pulse_16PointD;
-unsigned int Iras=0,Temp_F_ras=0;
+int Iras=0,Temp_F_ras=0;
 int yy = 0;
 
 
@@ -55,9 +55,9 @@
     ///////////////////////////////////////////////////////////////////////////////////////////
 
     if (LPC_QEI->STAT) {					//e. "+" direction //r. стали вращаться в "+" сторону
-        Gyro.Cnt_Mns = Dif_QEI;
+        Gyro.Cnt_Mns = -Cur_QEI;
     } else {
-        Gyro.Cnt_Pls = -Dif_QEI;
+        Gyro.Cnt_Pls = Cur_QEI;
     }
 
     ////////// ???? Заплатка
@@ -88,15 +88,15 @@
 
 
 
-    if(Buff_Restored_sin [CountV31] > 0)
-        Temp_F_ras += Buff_Restored_sin [CountV31];
+    if(Buff_Restored_sin [CountV31] > 0)Temp_F_ras += Buff_Restored_sin [CountV31];
     else Temp_F_ras -= Buff_Restored_sin [CountV31]; 			// расчет амплитуды
 
     if (CountV31 == 0) {								// если определеный так, то переписываем амиплитуду
         Gyro.F_ras = Temp_F_ras;
         Temp_F_ras = 0;
+       
     }
-    
+   
 
     } else if(CountV255 == 255) {
         FFF=1;//временная заплатка  для паузы перед заполнением остальных буферов