fork

Dependencies:   mbed

Fork of LG by igor Apu

Revision:
217:15cd8752bb6c
Parent:
216:189b0ea1dc38
Child:
218:b4067cac75c0
--- a/SPI.c	Mon Sep 04 12:09:55 2017 +0000
+++ b/SPI.c	Mon Sep 04 12:55:13 2017 +0000
@@ -108,9 +108,9 @@
       			    if(count>128)
       			    {
       			    count=0;
-      			    Gyro.PLC_Eror_count = (SinMns+SinPls>>7); 
-       				sprintf((Time)," %d      %d       %d       %d  \r\n",SinPls>>7,(SinMns>>7), Gyro.PLC_Eror_count,Gyro.PLC_Phase);
-       		 		WriteCon(Time);
+      			    Gyro.PLC_Eror_count = (SinMns+SinPls)>>7; 
+       				/*sprintf((Time)," %d      %d       %d       %d  \r\n",SinPls>>7,(SinMns>>7), Gyro.PLC_Eror_count,Gyro.PLC_Phase);
+       		 		WriteCon(Time);*/
        		 	    SinPls=0;
        		 	    SinMns=0;
        		 	    if(Gyro.RgConA&0x8)
@@ -184,8 +184,13 @@
 	 countHFO=0;
 	 if(Gyro.RgConA&0x2) 
 		 {
+		 	
 		 	DeltaRegul=DeltaRegul>>17;
-		 	tempDeltaRegul=DeltaRegul>>17;
+		 	
+		 	sprintf((Time)," %d  %d \r\n",DeltaRegul,DeltaRegul>>16);
+       		WriteCon(Time);
+
+		 	tempDeltaRegul=DeltaRegul>>16;
 		 	Spi.DAC_A-=DeltaRegul*Gyro.HFO_Gain;
 		 	timer=10;
 		 }