fix(v16): proper init adcValues (#5701)

This commit is contained in:
richardclli
2024-12-12 11:21:10 +10:00
committed by GitHub
parent 6d17448be5
commit 0f86cd9a95
2 changed files with 23 additions and 29 deletions
+3
View File
@@ -35,6 +35,9 @@ static uint16_t adcValues[MAX_ANALOG_INPUTS] __DMA;
bool adcInit(const etx_hal_adc_driver_t* driver)
{
// Init buffer, provides non random values before mixer task starts
memset(adcValues, 0, sizeof(adcValues));
// If there is an init function, it MUST succeed
if (driver && (!driver->init || driver->init())) {
_hal_adc_driver = driver;