mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 03:50:02 +03:00
added i2cWriteBuffer() for ledring stuff
fixed ledring stuff fixed mag orientation (thanks GrootWitBaas) git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@111 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
6e88b8ae30
commit
204d25d491
5 changed files with 53 additions and 33 deletions
|
@ -228,10 +228,17 @@ static void Mag_getRawADC(void)
|
|||
static int16_t rawADC[3];
|
||||
hmc5883lRead(rawADC);
|
||||
|
||||
// no way? is this finally the proper orientation??
|
||||
#if 0
|
||||
// no way? is this finally the proper orientation?? (seems -180 swapped)
|
||||
magADC[ROLL] = -rawADC[2]; // X
|
||||
magADC[PITCH] = rawADC[0]; // Y
|
||||
magADC[YAW] = rawADC[1]; // Z
|
||||
#else
|
||||
// no way? is THIS finally the proper orientation?? (by GrootWitBaas)
|
||||
magADC[ROLL] = rawADC[2]; // X
|
||||
magADC[PITCH] = -rawADC[0]; // Y
|
||||
magADC[YAW] = -rawADC[1]; // Z
|
||||
#endif
|
||||
}
|
||||
|
||||
void Mag_init(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue