![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LGstaandart by
Diff: MTimer.c
- Revision:
- 106:250ddd8629c6
- Parent:
- 104:ab1cb4ff56b2
- Child:
- 107:4d178bcc9d8a
--- a/MTimer.c Thu Mar 31 14:03:40 2016 +0000 +++ b/MTimer.c Fri Apr 01 10:05:35 2016 +0000 @@ -58,7 +58,9 @@ /* sprintf((Time),"%d", Spi.DAC_B); WriteCon(Time); WriteCon("\n\r");*/ + if( Rate_Flag)CMD_Rate(); + // } } @@ -75,6 +77,7 @@ Event1Hz ++; Time1Hz++; } + } } ///////////////////////////////////////////////////// @@ -137,11 +140,13 @@ ResetDAC(DAC); D_QEI(); //чтение данных по счетчику - cheng(); // расчет вибропривода - -// CuruAngle = CuruAngle + Buff_32Point [CountVf] - 0xffff; - CuruAngle = CuruAngle + Buff_32Point [CountV255]; - + cheng(); // расчет вибропривода + + Gyro.OldCuruAngle = Gyro.CuruAngle; + Gyro.CuruAngle = Gyro.CuruAngle + Buff_32Point [CountV255]; + Gyro.Num += Gyro.CuruAngle-Gyro.OldCuruAngle; + + SPI_Exchange(); //Чтение ADS_SPI LPC_TIM1->IR = 1;