auto-sync
This commit is contained in:
parent
04b09fc692
commit
2dba0e0a71
|
@ -74,8 +74,7 @@ extern board_configuration_s *boardConfiguration;
|
||||||
|
|
||||||
static adcsample_t getAvgAdcValue(int index, adcsample_t *samples, int bufDepth, int numChannels) {
|
static adcsample_t getAvgAdcValue(int index, adcsample_t *samples, int bufDepth, int numChannels) {
|
||||||
adcsample_t result = 0;
|
adcsample_t result = 0;
|
||||||
int i;
|
for (int i = 0; i < bufDepth; i++) {
|
||||||
for (i = 0; i < bufDepth; i++) {
|
|
||||||
result += samples[index];
|
result += samples[index];
|
||||||
index += numChannels;
|
index += numChannels;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,11 @@ void printFullAdcReportIfNeeded(void);
|
||||||
int getInternalAdcValue(const char *msg, adc_channel_e index);
|
int getInternalAdcValue(const char *msg, adc_channel_e index);
|
||||||
|
|
||||||
/* Depth of the conversion buffer, channels are sampled X times each.*/
|
/* 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
|
#define ADC_BUF_DEPTH_FAST 1
|
||||||
|
|
||||||
// max(ADC_BUF_DEPTH_SLOW, ADC_BUF_DEPTH_FAST)
|
// 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
|
#define ADC_MAX_CHANNELS_COUNT 16
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue