Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LG by
Diff: MTimer.c
- Revision:
- 108:030cdde08314
- Parent:
- 107:4d178bcc9d8a
- Child:
- 112:4a96133a1311
--- a/MTimer.c Fri Apr 01 16:13:55 2016 +0000
+++ b/MTimer.c Sat Apr 02 11:15:38 2016 +0000
@@ -143,11 +143,24 @@
D_QEI(); //чтение данных по счетчику
cheng(); // расчет вибропривода
- Gyro.OldCuruAngle = Gyro.CuruAngle;
- Gyro.CuruAngle = Gyro.CuruAngle + Buff_32Point [CountV255];
- Gyro.Num += Gyro.CuruAngle-Gyro.OldCuruAngle;
+
+// Gyro.CuruAngle += ((Buff_1Point [CountV255])*32)-Buff_32Point [CountV255];
+// Gyro.CuruAngle += Buff_1Point [CountV255]*32 + ((Buff_1Point [(CountV255 - 1 - 32) & 0xff] *32) - Buff_32Point [(CountV255 - 1) & 0xff]) - ((Buff_1Point [(CountV255 - 32) & 0xff] *32) - Buff_32Point [(CountV255 ) & 0xff]);
+// Gyro.CuruAngle += Buff_32Point [(CountV255 + 32) & 0xff]; //- Buff_32Point [(CountV255 ) & 0xff];
+
+ Gyro.CuruAngle += Buff_32Point [CountV31];// - Buff_1Point [(CountV255 - 1) & 0xff]*32;
+
+
+ //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;
