diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-09-28 23:24:52 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-09-28 23:24:52 +0000 |
commit | 21c467fb5a2818f186c9a43228e397b8c470a2dd (patch) | |
tree | a4eb636db4c9a82e0239b9a3302f2253288eb592 /os/ex | |
parent | cae987f6b386b63dc0563190fa0e0466b9f47016 (diff) | |
download | ChibiOS-21c467fb5a2818f186c9a43228e397b8c470a2dd.tar.gz ChibiOS-21c467fb5a2818f186c9a43228e397b8c470a2dd.tar.bz2 ChibiOS-21c467fb5a2818f186c9a43228e397b8c470a2dd.zip |
Improved LPS25H driver and related demo: improved sensitivity handling.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9820 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ex')
-rw-r--r-- | os/ex/ST/lps25h.c | 2 | ||||
-rw-r--r-- | os/ex/ST/lps25h.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/os/ex/ST/lps25h.c b/os/ex/ST/lps25h.c index 47832500d..b038d1c26 100644 --- a/os/ex/ST/lps25h.c +++ b/os/ex/ST/lps25h.c @@ -144,7 +144,7 @@ static msg_t read_cooked(void *ip, float* axis) { msg = read_raw(ip, &raw);
- *axis = raw / ((LPS25HDriver *)ip)->sensitivity;
+ *axis = raw * ((LPS25HDriver *)ip)->sensitivity;
*axis -= ((LPS25HDriver *)ip)->bias;
return msg;
}
diff --git a/os/ex/ST/lps25h.h b/os/ex/ST/lps25h.h index a03e4e3bf..085b9228d 100644 --- a/os/ex/ST/lps25h.h +++ b/os/ex/ST/lps25h.h @@ -40,7 +40,7 @@ /**
* @brief LPS25H driver version string.
*/
-#define EX_LPS25H_VERSION "1.0.2"
+#define EX_LPS25H_VERSION "1.0.3"
/**
* @brief LPS25H driver version major number.
@@ -55,7 +55,7 @@ /**
* @brief LPS25H driver version patch number.
*/
-#define EX_LPS25H_PATCH 2
+#define EX_LPS25H_PATCH 3
/** @} */
/**
@@ -65,7 +65,7 @@ */ #define LPS25H_NUMBER_OF_AXES 1U -#define LPS25H_SENS 4096.0f /**< LSB/hPa */ +#define LPS25H_SENS 0.00024414f /**< hPa/LSB */ /** @} */ /** |