mirror of
https://github.com/eclipse/upm.git
synced 2025-07-27 06:01:16 +03:00
ADXL345: Add string based constructor
Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
56f4dd9a92
commit
48ecaeaea9
@ -41,7 +41,6 @@ AD8232::AD8232(int loPlus, int loMinus, int output, float aref) {
|
||||
|
||||
m_aref = aref;
|
||||
m_ares = (1 << m_aioOUT->getBit());
|
||||
m_callcons = 0;
|
||||
}
|
||||
|
||||
AD8232::AD8232(std::string initStr)
|
||||
@ -89,21 +88,20 @@ AD8232::AD8232(std::string initStr)
|
||||
}
|
||||
}
|
||||
m_ares = (1 << m_aioOUT->getBit());
|
||||
m_callcons = 1;
|
||||
}
|
||||
|
||||
AD8232::~AD8232()
|
||||
{
|
||||
if(!m_callcons)
|
||||
if(mraaIo != NULL)
|
||||
{
|
||||
delete mraaIo;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete m_gpioLOPlus;
|
||||
delete m_gpioLOMinus;
|
||||
delete m_aioOUT;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete mraaIo;
|
||||
}
|
||||
}
|
||||
|
||||
int AD8232::value()
|
||||
|
@ -112,7 +112,6 @@ namespace upm {
|
||||
|
||||
float m_aref;
|
||||
int m_ares;
|
||||
int m_callcons;
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user