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 LG2 by
Diff: vibro.c
- Revision:
- 179:2b4e6bc277df
- Parent:
- 171:d227a6045305
- Child:
- 180:375dcd9c0cb6
--- a/vibro.c Sun Jul 03 13:40:48 2016 +0000
+++ b/vibro.c Tue Jul 05 14:00:50 2016 +0000
@@ -102,8 +102,10 @@
CaunAddMin = 0;
Gyro.MaxAmp = Gyro.CaunPlus + Gyro.CaunMin;//расчет максимальной амплитуды из востановленного синуса р-р.
- Gyro.Amp -= (Gyro.MaxAmp - 5000) * 1; // расчет амплитуды ВП с учетом разници
+ Gyro.Amp -= (Gyro.MaxAmp - 3000) * 1; // расчет амплитуды ВП с учетом разници
+
if((Gyro.Amp>>16) > 95) {Gyro.Amp= (95 << 16);} // временное ограничение роста амплитуды ВП в случае неподоженного гироскопа//////////
+
if(Gyro.RgConA&0x20) {Gyro.AmpPer = Gyro.Amp>>16;} //приведение амплитуды ВП к виду 0%-100%
}
