123
Fork of LG by
Diff: Command.c
- Revision:
- 128:1e4675a36c93
- Parent:
- 125:9400e64d0636
- Child:
- 129:406995a91322
diff -r 6a7472d67804 -r 1e4675a36c93 Command.c --- a/Command.c Mon Apr 11 03:13:42 2016 +0000 +++ b/Command.c Mon Apr 11 11:04:34 2016 +0000 @@ -192,15 +192,18 @@ } Check(BuffTemp, 6); WriteConN (BuffTemp,6); + CountParam++; - if(CountParam>21)CountParam=0;//зацикливания буфера от 0 до 21 } void CMD_Delta_Ext(void) { unsigned int Temp; + Gyro.EXT_Latch=0; + WriteCon("0"); BuffTemp[ 0] = Gyro.SOC_Out; + WriteCon("1"); BuffTemp[ 1] = Gyro.My_Addres; Temp = Gyro.CuruAngle; @@ -210,18 +213,20 @@ BuffTemp[ 3] =(Temp >> 0) & 0xff;//младший байт разности счетчиков BuffTemp[ 4] = CountParam; - switch(CountParam) { + switch(CountParam) { - + WriteCon("5"); //F_ras case 0: Temp = Gyro.F_ras; BuffTemp[5] = (Temp >> 8) & 0xff; + break; case 1: BuffTemp[5] = (Temp >> 0) & 0xff; + break; @@ -230,11 +235,13 @@ case 2: Temp = 0;//HFO BuffTemp[5] = (Temp >> 8) & 0xff; + break; case 3: Temp = 0;//HFO BuffTemp[5] = (Temp >> 0) & 0xff; + break; @@ -243,10 +250,12 @@ case 4: Temp = (unsigned int)((7680000*16/(Gyro.Frq>>12))); BuffTemp[5] = (Temp >> 8) & 0xff; + break; case 5: BuffTemp[5] = (Temp >> 0) & 0xff; + break; @@ -351,10 +360,9 @@ BuffTemp[5] =(Temp >> 0) & 0xff;//ADC6 sesnsor 5 break; } - Check(BuffTemp, 6); - WriteConN (BuffTemp,6); + Check(BuffTemp, 8); + WriteConN (BuffTemp,8); CountParam++; - if(CountParam>21)CountParam=0;//зацикливания буфера от 0 до 21 }