Browse Source

libupm: add fixes for 2 sensors

Signed-off-by: John Crispin <blogic@openwrt.org>
John Crispin 9 years ago
parent
commit
180999e20f

+ 11
- 0
libs/libupm/patches/002-at42qt1070-id.patch View File

@@ -0,0 +1,11 @@
1
+--- a/src/at42qt1070/at42qt1070.cxx
2
++++ b/src/at42qt1070/at42qt1070.cxx
3
+@@ -53,7 +53,7 @@
4
+         return;
5
+     }
6
+ 
7
+-    if (readChipID() != 0x2E) {
8
++    if (readChipID() != 0x1b && readChipID() != 0x2E) {
9
+         throw std::runtime_error("Chip ID does not match the expected value (2Eh)");
10
+     }
11
+ 

+ 11
- 0
libs/libupm/patches/003-lsm303-args.patch View File

@@ -0,0 +1,11 @@
1
+--- a/src/lsm303/lsm303.h
2
++++ b/src/lsm303/lsm303.h
3
+@@ -34,7 +34,7 @@
4
+ 
5
+ /* LSM303 Address definitions */
6
+ #define LSM303_MAG 0x1E // assuming SA0 grounded
7
+-#define LSM303_ACC 0x18 // assuming SA0 grounded
8
++#define LSM303_ACC 0x1E // assuming SA0 grounded
9
+ 
10
+ /* LSM303 Register definitions */
11
+ #define CTRL_REG1_A 0x20