forkd

Dependencies:   mbed

Fork of LG2 by Dmitry Kovalev

Revision:
106:250ddd8629c6
Parent:
105:bd01d8d20fb6
Child:
107:4d178bcc9d8a
--- a/QEI.c	Thu Mar 31 14:03:40 2016 +0000
+++ b/QEI.c	Fri Apr 01 10:05:35 2016 +0000
@@ -3,7 +3,6 @@
 
 
 
-int CuruAngle ;
 
 int Dif_QEI;
 
@@ -53,13 +52,13 @@
 
     ////////////////////////////////////////////////////////////////////////////////////////////
     ///////////////////////////////////////////////////////////////////////////////////////////
-
+/*
     if (LPC_QEI->STAT) {					//e. "+" direction //r. стали вращаться в "+" сторону
-        Gyro.Cnt_Mns = -Cur_QEI;
+        Gyro.Cnt_Mns -= Cur_QEI;
     } else {
         Gyro.Cnt_Pls = Cur_QEI;
     }
-
+*/
     ////////// ???? Заплатка
     ////////// ???? Проблема начального заполнения буферов
     //////////////////////////////////////////////////////////////////////////////////////////////
@@ -85,9 +84,16 @@
         Buff_16PointD[CountV31] = /*(unsigned int)*/ (Pulse_16PointD /*+ 0xffff*/);
 
         Buff_Restored_sin [CountV31]= /*(unsigned int)*/( Buff_16PointD [ CountV31] /*+ 65536 */ - Buff_32Point[CountV31] );
-
-
-
+       /*
+        if(Buff_16Point[CountV255]<0)
+        {
+        Gyro.Cnt_Mns-=Buff_16Point[CountV255];
+        }
+        else
+        {
+        Gyro.Cnt_Pls+=Buff_16Point[CountV255];
+        }*/
+        
     if(Buff_Restored_sin [CountV31] > 0)Temp_F_ras += Buff_Restored_sin [CountV31];
     else Temp_F_ras -= Buff_Restored_sin [CountV31]; 			// расчет амплитуды