Skip to content

Commit 6503adc

Browse files
committed
Correctly assign new config to lib's config
1 parent 43e90a3 commit 6503adc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libraries/PDM/src/PDM.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ uint32_t AP3_PDM::getDecimationRate()
197197
//Send a given configuration struct to PDM
198198
bool AP3_PDM::updateConfig(am_hal_pdm_config_t newConfiguration)
199199
{
200-
ap3_err_t retval = (ap3_err_t)am_hal_pdm_configure(_PDMhandle, &newConfiguration);
200+
_PDMconfig = newConfiguration;
201+
ap3_err_t retval = (ap3_err_t)am_hal_pdm_configure(_PDMhandle, &_PDMconfig);
202+
201203
if (retval != AP3_OK)
202204
{
203205
return false;

0 commit comments

Comments
 (0)