mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Fix Y/Z axis mixup in self-test procedure (currently not used)
This commit is contained in:
parent
5d78a68bee
commit
38d416cf92
@ -357,8 +357,8 @@ int32_t PIOS_HMC5883_Test(void)
|
||||
uint8_t values[6];
|
||||
while (!PIOS_HMC5883_Read(PIOS_HMC5883_DATAOUT_XMSB_REG, values, 6)) ;
|
||||
int16_t x = (int16_t) (((uint16_t) values[0] << 8) + values[1]);
|
||||
int16_t y = (int16_t) (((uint16_t) values[2] << 8) + values[3]);
|
||||
int16_t z = (int16_t) (((uint16_t) values[4] << 8) + values[5]);
|
||||
int16_t z = (int16_t) (((uint16_t) values[2] << 8) + values[3]);
|
||||
int16_t y = (int16_t) (((uint16_t) values[4] << 8) + values[5]);
|
||||
|
||||
if(abs(abs(x) - 766) > 20)
|
||||
passed &= 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user