auto-sync

This commit is contained in:
rusEfi 2016-01-20 22:01:35 -05:00
parent 04b09fc692
commit 2dba0e0a71
2 changed files with 3 additions and 4 deletions

View File

@ -74,8 +74,7 @@ extern board_configuration_s *boardConfiguration;
static adcsample_t getAvgAdcValue(int index, adcsample_t *samples, int bufDepth, int numChannels) {
adcsample_t result = 0;
int i;
for (i = 0; i < bufDepth; i++) {
for (int i = 0; i < bufDepth; i++) {
result += samples[index];
index += numChannels;
}

View File

@ -27,11 +27,11 @@ void printFullAdcReportIfNeeded(void);
int getInternalAdcValue(const char *msg, adc_channel_e index);
/* Depth of the conversion buffer, channels are sampled X times each.*/
#define ADC_BUF_DEPTH_SLOW 1
#define ADC_BUF_DEPTH_SLOW 8
#define ADC_BUF_DEPTH_FAST 1
// max(ADC_BUF_DEPTH_SLOW, ADC_BUF_DEPTH_FAST)
#define MAX_ADC_GRP_BUF_DEPTH 1
#define MAX_ADC_GRP_BUF_DEPTH 8
#define ADC_MAX_CHANNELS_COUNT 16