lsm303: make code alot more robust and fix getHeading() call

Note that from this UPM release libmraa 0.5.2+ is required

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-11-07 10:53:42 +00:00
parent e9da4719fb
commit 44b1ff7f75
3 changed files with 35 additions and 30 deletions

View File

@@ -129,6 +129,7 @@ class LSM303 {
private:
int readThenWrite(uint8_t reg);
mraa_result_t setRegisterSafe(uint8_t slave, uint8_t sregister, uint8_t data);
mraa_i2c_context m_i2c;
int m_addrMag;