123
Fork of LG by
Diff: QEI.c
- Revision:
- 45:cbc955aecebe
- Parent:
- 43:3f7c8a0ea59c
- Child:
- 86:398da56ef751
--- a/QEI.c Tue Feb 09 07:47:33 2016 +0000 +++ b/QEI.c Tue Feb 09 13:47:26 2016 +0000 @@ -112,7 +112,7 @@ - if(Buff_32Point[CountV255]>0) { + /* if(Buff_32Point[CountV255]>0) { Temp_F_ras += Buff_32Point[CountV255]; } else if ((CountV255 & 0x1f)==0) { Gyro.F_ras=Temp_F_ras; @@ -121,7 +121,7 @@ Temp_F_ras -= Buff_32Point[CountV255]; } - +*/ } @@ -137,7 +137,7 @@ if (Dif_QEI > 0xfff) Dif_QEI -= 0x10000; // обработка прохода значения через ноль - Buff_1Point[CountV255] = (unsigned int) (Dif_QEI + 0xffff);// накопление в буфер еденичных значений приращения по каждому такту. + Buff_1Point[CountV255] = /*(unsigned int)*/ (Dif_QEI /* + 0xffff*/ );// накопление в буфер еденичных значений приращения по каждому такту. //////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// @@ -154,28 +154,28 @@ if(FFF==1) { // если прошло 32 такта вибро подвеса начать заполнять остальные буверы. Pulse_8Point += Buff_1Point[CountV255]; Pulse_8Point -= Buff_1Point[(CountV255-8) & 0xff]; // заполнение буфера накопленых приращений за 8 тактов - Buff_8Point[CountV255] = (unsigned int) (Pulse_8Point + 0xffff); + Buff_8Point[CountV255] = /*(unsigned int)*/ (Pulse_8Point/* + 0xffff*/); Pulse_16Point += Buff_1Point[CountV255]; Pulse_16Point -= Buff_1Point[(CountV255-16) & 0xff]; // заполнение буфера накопленых приращений за 16 тактов - Buff_16Point[CountV255] = (unsigned int) (Pulse_16Point + 0xffff); + Buff_16Point[CountV255] = /*(unsigned int)*/ (Pulse_16Point /*+ 0xffff*/); Pulse_32Point += Buff_1Point[CountV255]; Pulse_32Point -= Buff_1Point[(CountV255-32) & 0xff]; // заполнение буфера накопленых приращений за 32 тактов - Gyro.Cnt_Dif = (Pulse_32Point+ 0xffff); - Buff_32Point[CountV255] = (unsigned int) (Pulse_32Point + 0xffff); + Gyro.Cnt_Dif = (Pulse_32Point/*+ 0xffff*/); + Buff_32Point[CountV255] = /*(unsigned int)*/ (Pulse_32Point /*+ 0xffff*/); Pulse_16PointD += Buff_1Point[CountV255]; Pulse_16PointD -= Buff_1Point[(CountV255-16) & 0xff]; // заполнение буфера накопленых приращений за 16 тактов Двойныз Pulse_16PointD += Buff_1Point[(CountV255-32) & 0xff]; // Pulse_16PointD -= Buff_1Point[(CountV255-48) & 0xff]; // з - Buff_16PointD[CountV255] = (unsigned int) (Pulse_16PointD + 0xffff); + Buff_16PointD[CountV255] = /*(unsigned int)*/ (Pulse_16PointD /*+ 0xffff*/); // Buff_Restored_sin [CountVf]= (unsigned int)( ((Buff_16Point[CountVf]*2)) - Buff_32Point[CountVf] ); - Buff_Restored_sin [CountV255]= (unsigned int)( Buff_16PointD [ CountV255] + 65536 - Buff_32Point[CountV255] ); + Buff_Restored_sin [CountV255]= /*(unsigned int)*/( Buff_16PointD [ CountV255] /*+ 65536 */ - Buff_32Point[CountV255] ); @@ -192,7 +192,7 @@ } else if(CountV255 == 255) { FFF=1;//временная заплатка для паузы перед заполнением остальных буферов - for (yy = 0; yy < 256; yy++ ) { + for (yy = 0; yy < 31; yy++ ) { Buff_1Point [yy] = 0xffff; Buff_16Point [yy] = 0xffff; Buff_32Point [yy] = 0xffff;