![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fork
Fork of LG by
Diff: QEI.c
- Revision:
- 30:17c84ed091b3
- Parent:
- 21:bc8c1cec3da6
- Child:
- 42:6fc307c4963e
--- a/QEI.c Fri Feb 05 08:02:55 2016 +0000 +++ b/QEI.c Fri Feb 05 23:21:54 2016 +0000 @@ -44,9 +44,9 @@ /////////////////////////////////////////////////////////////////////////////////////////// if (LPC_QEI->STAT) { //e. "+" direction //r. стали вращаться в "+" сторону - Main.Cnt_Mns = Dif_QEI; + Gyro.Cnt_Mns = Dif_QEI; } else { - Main.Cnt_Pls = -Dif_QEI; + Gyro.Cnt_Pls = -Dif_QEI; } ////////// ???? Заплатка ////////// ???? Проблема начального заполнения буферов @@ -62,7 +62,7 @@ Pulse_32Point += Buff_1Point[CountV255]; Pulse_32Point -= Buff_1Point[(CountV255-32) & 0xff]; // заполнение буфера накопленых приращений за 32 тактов - Main.Cnt_Dif = (Pulse_32Point+ 0xffff); + Gyro.Cnt_Dif = (Pulse_32Point+ 0xffff); Buff_32Point[CountV255] = (unsigned int) (Pulse_32Point + 0xffff); Pulse_16PointD += Buff_1Point[CountV255]; @@ -82,7 +82,7 @@ if(Buff_32Point[CountV255]>0) { Temp_F_ras += Buff_32Point[CountV255]; } else if ((CountV255 & 0x1f)==0) { - Main.F_ras=Temp_F_ras; + Gyro.F_ras=Temp_F_ras; Temp_F_ras=0; } else { Temp_F_ras -= Buff_32Point[CountV255];