Skip to content
Snippets Groups Projects
Commit d13e9ec9 authored by Matteo Pignataro's avatar Matteo Pignataro
Browse files

[Analog-pressure-sensor] Corrected bind function for non-copy constructible

parent 882f7063
Branches
No related tags found
No related merge requests found
......@@ -73,14 +73,14 @@ int main()
ADS1118 ads1118(spiSlave);
std::function<ADCData()> getVoltageFunction =
std::bind(&ADS1118::getVoltage, ads1118, channel1);
std::bind(&ADS1118::getVoltage, std::ref(ads1118), channel1);
HSCMAND015PA analogSensor(getVoltageFunction);
analogSensor.init();
analogSensor.selfTest();
std::function<ADCData()> getVoltageFunction2 =
std::bind(&ADS1118::getVoltage, ads1118, channel2);
std::bind(&ADS1118::getVoltage, std::ref(ads1118), channel2);
HSCMRNN030PA analogSensor2(getVoltageFunction2);
analogSensor2.init();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment