SC7A20 tweaks (#1251)
* Clean up handling of addresses * Update SC7A20.hpp * Try remapped Accel readings * Fake LIS setup? * Refining build options
This commit is contained in:
@@ -17,7 +17,7 @@ public:
|
||||
static bool initalize();
|
||||
// 1 = rh, 2,=lh, 8=flat
|
||||
static Orientation getOrientation() {
|
||||
uint8_t val = ((FRToSI2C::I2C_RegisterRead(activeAddress, SC7A20_INT2_SOURCE) >> 2) - 1);
|
||||
uint8_t val = ((FRToSI2C::I2C_RegisterRead(isInImitationMode ? SC7A20_ADDRESS2 : SC7A20_ADDRESS, SC7A20_INT2_SOURCE) >> 2) - 1);
|
||||
if (val == 1) {
|
||||
#ifdef SC7_ORI_FLIP
|
||||
return Orientation::ORIENTATION_RIGHT_HAND;
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
static void getAxisReadings(int16_t &x, int16_t &y, int16_t &z);
|
||||
|
||||
private:
|
||||
static uint8_t activeAddress;
|
||||
static bool isInImitationMode;
|
||||
};
|
||||
|
||||
#endif /* CORE_DRIVERS_BMA223_HPP_ */
|
||||
|
||||
Reference in New Issue
Block a user