mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00
BH1749: Fix inconsistences inside string init 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:
parent
3044bc6b49
commit
a106345527
@ -54,7 +54,7 @@ BH1749::BH1749(int bus, int addr) : m_bh1749(bh1749_init(bus, addr))
|
|||||||
BH1749::BH1749(std::string initStr) : mraaIo(initStr)
|
BH1749::BH1749(std::string initStr) : mraaIo(initStr)
|
||||||
{
|
{
|
||||||
mraa_io_descriptor* descs = mraaIo.getMraaDescriptors();
|
mraa_io_descriptor* descs = mraaIo.getMraaDescriptors();
|
||||||
std::vector<std::strings> upmTokens;
|
std::vector<std::string> upmTokens;
|
||||||
|
|
||||||
m_bh1749 = (bh1749_context)malloc(sizeof(struct _bh1749_context));
|
m_bh1749 = (bh1749_context)malloc(sizeof(struct _bh1749_context));
|
||||||
if(!m_bh1749)
|
if(!m_bh1749)
|
||||||
@ -82,7 +82,7 @@ BH1749::BH1749(std::string initStr) : mraaIo(initStr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bh1749_check_who_am_i(dev) != UPM_SUCCESS)
|
if(bh1749_check_who_am_i(m_bh1749) != UPM_SUCCESS)
|
||||||
throw std::runtime_error(std::string(__FUNCTION__)
|
throw std::runtime_error(std::string(__FUNCTION__)
|
||||||
+ ": bh1749_init() failed");
|
+ ": bh1749_init() failed");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user