auto-sync
This commit is contained in:
parent
fbf8510ad6
commit
af751cfc4c
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue