改主板垂直放置的config.h中的代码
/* enforce your individual sensor orientation - even overrides board specific defaults */
#define FORCE_ACC_ORIENTATION(X, Y, Z) {imu.accADC[ROLL] = -X; imu.accADC[PITCH] = Z; imu.accADC[YAW] = Y;}
#define FORCE_GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] = -Z; imu.gyroADC[PITCH] =-X; imu.gyroADC[YAW] =-Y;}
#define FORCE_MAG_ORIENTATION(X, Y, Z) {imu.magADC[ROLL] = X; imu.magADC[PITCH] =-Z; imu.magADC[YAW] =-Y;}
|