diff --git a/Peripherals/Inc/peripherals_ir_sensors.hpp b/Peripherals/Inc/peripherals_ir_sensors.hpp index e6c135d..a399abb 100644 --- a/Peripherals/Inc/peripherals_ir_sensors.hpp +++ b/Peripherals/Inc/peripherals_ir_sensors.hpp @@ -43,6 +43,9 @@ public: : adc(hadc), channels_(channels), gpios_{std::forward(gpios)...} { static_assert(sizeof...(Args) == N, "Not enough GPIOs passed."); + + for (auto& o : offsets_) + o = 0; } void startReading()