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
This commit is contained in:
parent
cae987f6b3
commit
21c467fb5a
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue