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: QEI.c
- Revision:
- 105:bd01d8d20fb6
- Parent:
- 98:95b8e79f13e1
- Child:
- 106:250ddd8629c6
diff -r ab1cb4ff56b2 -r bd01d8d20fb6 QEI.c
--- a/QEI.c Thu Mar 31 10:16:56 2016 +0000
+++ b/QEI.c Thu Mar 31 14:03:40 2016 +0000
@@ -14,7 +14,7 @@
int Pulse_16Point;
int Pulse_32Point;
int Pulse_16PointD;
-unsigned int Iras=0,Temp_F_ras=0;
+int Iras=0,Temp_F_ras=0;
int yy = 0;
@@ -55,9 +55,9 @@
///////////////////////////////////////////////////////////////////////////////////////////
if (LPC_QEI->STAT) { //e. "+" direction //r. стали вращаться в "+" сторону
- Gyro.Cnt_Mns = Dif_QEI;
+ Gyro.Cnt_Mns = -Cur_QEI;
} else {
- Gyro.Cnt_Pls = -Dif_QEI;
+ Gyro.Cnt_Pls = Cur_QEI;
}
////////// ???? Заплатка
@@ -88,15 +88,15 @@
- if(Buff_Restored_sin [CountV31] > 0)
- Temp_F_ras += Buff_Restored_sin [CountV31];
+ if(Buff_Restored_sin [CountV31] > 0)Temp_F_ras += Buff_Restored_sin [CountV31];
else Temp_F_ras -= Buff_Restored_sin [CountV31]; // расчет амплитуды
if (CountV31 == 0) { // если определеный так, то переписываем амиплитуду
Gyro.F_ras = Temp_F_ras;
Temp_F_ras = 0;
+
}
-
+
} else if(CountV255 == 255) {
FFF=1;//временная заплатка для паузы перед заполнением остальных буферов
