Added missing input mode set when adding pots to BAPhysicalControls

pull/1/head
Steve Lascos 6 years ago
parent abebab76a8
commit 1c153eae69
  1. 2
      src/peripherals/BAPhysicalControls.cpp

@ -64,11 +64,13 @@ unsigned BAPhysicalControls::addSwitch(uint8_t pin, unsigned long intervalMillis
unsigned BAPhysicalControls::addPot(uint8_t pin, unsigned minCalibration, unsigned maxCalibration) { unsigned BAPhysicalControls::addPot(uint8_t pin, unsigned minCalibration, unsigned maxCalibration) {
m_pots.emplace_back(pin, minCalibration, maxCalibration); m_pots.emplace_back(pin, minCalibration, maxCalibration);
pinMode(pin, INPUT);
return m_pots.size()-1; return m_pots.size()-1;
} }
unsigned BAPhysicalControls::addPot(uint8_t pin, unsigned minCalibration, unsigned maxCalibration, bool swapDirection) { unsigned BAPhysicalControls::addPot(uint8_t pin, unsigned minCalibration, unsigned maxCalibration, bool swapDirection) {
m_pots.emplace_back(pin, minCalibration, maxCalibration, swapDirection); m_pots.emplace_back(pin, minCalibration, maxCalibration, swapDirection);
pinMode(pin, INPUT);
return m_pots.size()-1; return m_pots.size()-1;
} }

Loading…
Cancel
Save