I've just inserted a nunchuck in standalone mode into my quadcopter system and I don't understand something. (gyro is a ITG3200 WMP)
Why this code?
Code: Select all
#if defined(NUNCHACK)
.... .... ....
.... .... ....
ACC_ORIENTATION( ( (rawADC[3]<<2) + ((rawADC[5]>>4)&0x2) ) ,
- ( (rawADC[2]<<2) + ((rawADC[5]>>3)&0x2) ) ,
( ((rawADC[4]&0xFE)<<2) + ((rawADC[5]>>5)&0x6) ));
ACC_Common();
}
#endif
instead this other?
Code: Select all
#if defined(NUNCHACK)
.... .... ....
.... .... ....
ACC_ORIENTATION( ( (rawADC[3]<<2) + ((rawADC[5]>>4)&0x3) ) ,
- ( (rawADC[2]<<2) + ((rawADC[5]>>2)&0x3) ) ,
( (rawADC[4]<<2) + ((rawADC[5]>>6)&0x3) ));
ACC_Common();
}
#endif
I was finding a answer through forums without success
I'm sorry. My English is bad.
Thanks a lot