Add timeout to ADC to stop infinite loop
This commit is contained in:
parent
bc75971fc8
commit
7868d2f7b7
@ -36,7 +36,7 @@ class LightSensors {
|
|||||||
util::for_constexpr(
|
util::for_constexpr(
|
||||||
[](const auto& idx) {
|
[](const auto& idx) {
|
||||||
constexpr auto i = idx.value;
|
constexpr auto i = idx.value;
|
||||||
HAL_ADC_PollForConversion(&hadc, HAL_MAX_DELAY);
|
HAL_ADC_PollForConversion(&hadc, 1000);
|
||||||
m_adcValues[i] = HAL_ADC_GetValue(&hadc);
|
m_adcValues[i] = HAL_ADC_GetValue(&hadc);
|
||||||
},
|
},
|
||||||
std::make_index_sequence<m_adcValues.size()>{});
|
std::make_index_sequence<m_adcValues.size()>{});
|
||||||
|
Loading…
Reference in New Issue
Block a user