Add changes getting values for upm parameters

Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com>
This commit is contained in:
Adelin Dobre
2018-07-31 14:29:52 +03:00
committed by Stefan Andritoiu
parent 5123a5c8e6
commit 252feac5c7
9 changed files with 39 additions and 39 deletions

View File

@ -110,9 +110,9 @@ BMPX8X::BMPX8X(std::string initStr) : mraaIo(initStr)
setOversampling(oss);
}
if(tok.substr(0, 9) == "writeReg:") {
uint8_t reg = std::stoi(tok.substr(9), &sz, 0);
uint8_t reg = std::stoul(tok.substr(9), &sz, 0);
tok = tok.substr(9);
uint8_t val = std::stoi(tok.substr(sz+1), nullptr, 0);
uint8_t val = std::stoul(tok.substr(sz+1), nullptr, 0);
writeReg(reg, val);
}
}