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: mathDSP.c
- Revision:
- 21:bc8c1cec3da6
- Parent:
- 1:f2adcae3d304
- Child:
- 129:406995a91322
diff -r 18e3fd7b92d0 -r bc8c1cec3da6 mathDSP.c --- a/mathDSP.c Tue Feb 02 17:14:25 2016 +0000 +++ b/mathDSP.c Wed Feb 03 07:19:30 2016 +0000 @@ -1,7 +1,6 @@ #include "Global.h" - BAND_PASS_TYPE BandPassType; @@ -41,21 +40,21 @@ __int64 coeff; // ~22.9 ~17600 768 | 10000Hz = 10 KHz |*| ????? |/|768000| Vibro_Filter_Aperture = Device_blk.Str.VB_N/DIV_CONST; //e. real expression is DEVICE_SAMPLE_RATE_HZ*Device_blk.Str.VB_N/7680000 -//8832 ������������ ���� 384 - i = L_mult(Vibro_Filter_Aperture,DIV_CONST2); //e. i �� ���������� ������.//��������� 2 16-�� ��������� �������� ����� � ��������� 32-� ���������� ����� +//8832 определяется выше 384 + i = L_mult(Vibro_Filter_Aperture,DIV_CONST2); //e. i до ближайшего целого.//умножение 2 16-ти разрядных знаковых чисел и получение 32-х разрядного числа // ? - if ((Device_blk.Str.VB_N - i)>DIV_CONST2) Vibro_Filter_Aperture++; //�������� �� ������������ L_mult() + if ((Device_blk.Str.VB_N - i)>DIV_CONST2) Vibro_Filter_Aperture++; //проверка на переполнение L_mult() - coeff = 0x7FFFFFFF/Vibro_Filter_Aperture;//��������� ��� ������������ + coeff = 0x7FFFFFFF/Vibro_Filter_Aperture;//насыщение при переполнении - for ( i=0; i < Vibro_Filter_Aperture; i++) /// �� �������� ���� ����������� ��� ������ ���������� ����... + for ( i=0; i < Vibro_Filter_Aperture; i++) /// не понятный цикл заполняющий три буфера заведенных выше... { BufInMovAverPls[i] = 0; BufInMovAverMns[i] = 0; hMovAver[i]= coeff; } Vibro_2_CountIn = MULT_7680_12500/Vibro_Filter_Aperture; - Vibro_2_CountIn++; //������� ������� + Vibro_2_CountIn++; //какойто счетчик } /****************************************************************************** @@ -262,4 +261,3 @@ return (smooth_HF>>22); //shift on additional 6 bits for smoothing 2^6 = 64 } -