Skip to content

Change constant for averaging buffer size of analog inputs #211

@GioCC

Description

@GioCC

Currently, two independently defined constants are used:

#define ADC_MAX_AVERAGE      8 // must be 2^n
#define ADC_MAX_AVERAGE_LOG2 3 // please calculate LOG2(ADC_MAX_AVERAGE)

These should be bound to the same value, in order to avoid accidental misalignments:

#define ADC_MAX_AVERAGE_LOG2 3
#define ADC_MAX_AVERAGE      (1 << ADC_MAX_AVERAGE_LOG2) // must be 2^n

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions