From af751cfc4c16c2ab42986422eb59f72d8e56ad52 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Wed, 20 Jan 2016 22:01:35 -0500 Subject: [PATCH] auto-sync --- firmware/hw_layer/adc_inputs.cpp | 3 +-- firmware/hw_layer/adc_inputs.h | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/firmware/hw_layer/adc_inputs.cpp b/firmware/hw_layer/adc_inputs.cpp index 4a31d0076d..870894a5bb 100644 --- a/firmware/hw_layer/adc_inputs.cpp +++ b/firmware/hw_layer/adc_inputs.cpp @@ -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; } diff --git a/firmware/hw_layer/adc_inputs.h b/firmware/hw_layer/adc_inputs.h index a3ac7f1fea..56680ccbe7 100644 --- a/firmware/hw_layer/adc_inputs.h +++ b/firmware/hw_layer/adc_inputs.h @@ -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