![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fork
Fork of LG by
Diff: main.c
- Revision:
- 215:b58b887fd367
- Parent:
- 214:4c70e452c491
- Child:
- 216:189b0ea1dc38
--- a/main.c Wed Aug 16 09:00:25 2017 +0000 +++ b/main.c Tue Aug 29 06:33:08 2017 +0000 @@ -14,11 +14,11 @@ **-------------------------------------------------------------------------------------------------------- *********************************************************************************************************/ #include "Global.h" -#include "Device.h" + /****************************************************************************** ** Main Function main() ******************************************************************************/ -extern Device device; //Single global for all device hardware-independent algorithm + unsigned int addres; uint32_t Result[5]; extern uint32_t CMD_Mode; @@ -50,17 +50,28 @@ UART_InitSet (0, 115200, 0x03); UART_InitSet (1, 115200, 0x03); */ Out_G_photo(Gyro.Gain_Sin, Gyro.Gain_Cos); - for(int q=0; q<256; q++) + for(int q=0; q<300; q++) { BuffADC_1Point[CountV255] =0; } for(int q=0; q<64; q++) { - BuffADC_32Point [q] = 0; + BuffADC_32PointD [q] = 0; BuffADC_64Point [q] = 0; Buff_Restored_Mod [q] = 0; } while ( 1 ) { + if(Time1Hz<5) + { + ADC_64Point=0; + ADC_32PointD=0; + for(int q=0; q<64; q++) + { + BuffADC_32PointD [q] = 0; + BuffADC_64Point [q] = 0; + Buff_Restored_Mod [q] = 0; + } + } Event_1250Hz(); Event_100KHz(); Event_2KHz();