mirror of
https://github.com/eclipse/upm.git
synced 2025-07-05 19:31:15 +03:00
BMG160: Add string based cons for 3-axis Gyroscope
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
40f6bd9c6c
commit
9f545f10af
@ -173,10 +173,9 @@ BMA250E::BMA250E(std::string initStr) : mraaIo(initStr)
|
||||
writeReg(reg, val);
|
||||
}
|
||||
if(tok.substr(0,9) == "setRange:") {
|
||||
BMA250E_RANGE_T scale = (BMA250E_RANGE_T)std::stoi(tok.substr(22),nullptr,0);
|
||||
BMA250E_RANGE_T scale = (BMA250E_RANGE_T)std::stoi(tok.substr(9),nullptr,0);
|
||||
setRange(scale);
|
||||
}
|
||||
|
||||
if(tok.substr(0,13) == "setBandwidth:") {
|
||||
BMA250E_BW_T bw = (BMA250E_BW_T)std::stoi(tok.substr(13),nullptr,0);
|
||||
setBandwidth(bw);
|
||||
|
Reference in New Issue
Block a user