fixed read_raw()
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9056 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
e41ffa9424
commit
8b32e5715e
|
@ -220,9 +220,9 @@ static msg_t read_raw(void *ip, int32_t axes[L3GD20_NUMBER_OF_AXES]) {
|
||||||
}
|
}
|
||||||
if(((L3GD20Driver *)ip)->config->axesenabling & L3GD20_AE_Z){
|
if(((L3GD20Driver *)ip)->config->axesenabling & L3GD20_AE_Z){
|
||||||
axes[2] = (int16_t)(l3gd20SPIReadRegister(((L3GD20Driver *)ip)->config->spip,
|
axes[2] = (int16_t)(l3gd20SPIReadRegister(((L3GD20Driver *)ip)->config->spip,
|
||||||
L3GD20_AD_OUT_Y_L));
|
L3GD20_AD_OUT_Z_L));
|
||||||
axes[2] += (int16_t)(l3gd20SPIReadRegister(((L3GD20Driver *)ip)->config->spip,
|
axes[2] += (int16_t)(l3gd20SPIReadRegister(((L3GD20Driver *)ip)->config->spip,
|
||||||
L3GD20_AD_OUT_Y_H) << 8);
|
L3GD20_AD_OUT_Z_H) << 8);
|
||||||
axes[2] -= ((L3GD20Driver *)ip)->bias[2];
|
axes[2] -= ((L3GD20Driver *)ip)->bias[2];
|
||||||
}
|
}
|
||||||
#if L3GD20_SHARED_SPI
|
#if L3GD20_SHARED_SPI
|
||||||
|
|
Loading…
Reference in New Issue