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/ST/lps25h.c | |
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/ST/lps25h.c')
-rw-r--r-- | os/ex/ST/lps25h.c | 2 |
1 files changed, 1 insertions, 1 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;
}
|