implemented sync_detector logic. But it is a bit buggy: data stored in avg_ON is very similar to avg_OFF. But while sync_detector phase is inverted -- both behave the same way
This commit is contained in:
@ -76,11 +76,16 @@ void Error_Handler(void);
|
||||
#define ADC_BUFF_SIZE 50
|
||||
#endif
|
||||
|
||||
#define SYNC_DET_ON
|
||||
|
||||
/* Structure describing simple accumulation state for ADC processing */
|
||||
struct ADC_proc_typedef {
|
||||
uint8_t status; /* 0 - stopped, 1 - collecting, 2 - filled */
|
||||
uint32_t sum;
|
||||
uint32_t avg;
|
||||
uint32_t sum_ON;
|
||||
uint32_t sum_OFF;
|
||||
uint32_t avg_ON;
|
||||
uint32_t avg_OFF;
|
||||
uint32_t N;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user