![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fork
Fork of LG by
Diff: Command.c
- Revision:
- 162:44e4ded32c6a
- Parent:
- 151:d565ce4d58c8
- Child:
- 163:affb5706d191
--- a/Command.c Sun May 15 19:12:12 2016 +0000 +++ b/Command.c Mon May 16 11:06:42 2016 +0000 @@ -269,8 +269,8 @@ BuffTemp[5] =(Temp >> 0) & 0xff;//ADC6 sesnsor 5 break; } - Check(BuffTemp, 6); - WriteConN (BuffTemp,6); + Check(BuffTemp, CRC_N); + WriteConN (BuffTemp,CRC_N); CountParam++; if(CountParam>21)CountParam=0;//зацикливания буфера от 0 до 21 @@ -436,8 +436,8 @@ BuffTemp[5] =(Temp >> 0) & 0xff;//ADC6 sesnsor 5 break; } - Check(BuffTemp, 8); - WriteConN (BuffTemp,8); + Check(BuffTemp, CRC_N); + WriteConN (BuffTemp,CRC_N); CountParam++; if(CountParam>21)CountParam=0;//зацикливания буфера от 0 до 21 } @@ -481,7 +481,7 @@ Temp = Gyro.CuruAngle; Gyro.CuruAngle = 0; -Temp = Gyro.AD_Fast >> 16; +//Temp = Gyro.AD_Fast >> 16; BuffTemp[ 6] =(Temp >> 8) & 0xff;//старший байт разности счетчиков BuffTemp[ 7] =(Temp >> 0) & 0xff;//младший байт разности счетчиков @@ -762,7 +762,8 @@ lengf=6; CRC_N=44; break; - + + case 0xA0://Delta_PS lengf=6; CRC_N=8; @@ -862,8 +863,8 @@ TempParam=(BuffTemp[3]) & 0x90; if (TempParam==Delta_500) CMD_Delta_500Hz(); else if (TempParam==Delta_EXT) CMD_Delta_Ext(); - else if (TempParam==PDelta_500) { Gyro.ModeOut=3; Gyro.Delta500_Event=0; WriteCon("Delta500"); } - else if (TempParam==PDelta_EXT) { Gyro.ModeOut=4; Gyro.DeltaEXT_Event=0; WriteCon("deltaEXT"); } + else if (TempParam==PDelta_500) { Gyro.ModeOut=3; Gyro.Delta500_Event=0; /*WriteCon("Delta500");*/ } + else if (TempParam==PDelta_EXT) { Gyro.ModeOut=4; Gyro.DeltaEXT_Event=0;/* WriteCon("deltaEXT"); */} break; case 0xD8: