Add board orientation ROLL_90_YAW_270

This commit is contained in:
Julien Lecoeur
2019-09-05 20:41:32 -07:00
committed by Daniel Agar
parent c75954fef8
commit 7bea81f02c
3 changed files with 11 additions and 0 deletions
+8
View File
@@ -277,5 +277,13 @@ rotate_3f(enum Rotation rot, float &x, float &y, float &z)
x = tmp; x = tmp;
return; return;
} }
case ROTATION_ROLL_90_YAW_270: {
tmp = x;
x = -z;
z = y;
y = -tmp;
return;
}
} }
} }
+2
View File
@@ -84,6 +84,7 @@ enum Rotation {
ROTATION_PITCH_9_YAW_180 = 32, ROTATION_PITCH_9_YAW_180 = 32,
ROTATION_PITCH_45 = 33, ROTATION_PITCH_45 = 33,
ROTATION_PITCH_315 = 34, ROTATION_PITCH_315 = 34,
ROTATION_ROLL_90_YAW_270 = 35,
ROTATION_MAX ROTATION_MAX
}; };
@@ -129,6 +130,7 @@ const rot_lookup_t rot_lookup[] = {
{ 0, 9, 180 }, { 0, 9, 180 },
{ 0, 45, 0 }, { 0, 45, 0 },
{ 0, 315, 0 }, { 0, 315, 0 },
{ 90, 0, 270 },
}; };
/** /**
+1
View File
@@ -161,6 +161,7 @@ PARAM_DEFINE_FLOAT(SENS_BARO_QNH, 1013.25f);
* @value 32 Pitch 9°, Yaw 180° * @value 32 Pitch 9°, Yaw 180°
* @value 33 Pitch 45° * @value 33 Pitch 45°
* @value 34 Pitch 315° * @value 34 Pitch 315°
* @value 35 Roll 90°, Yaw 270°
* *
* @reboot_required true * @reboot_required true
* *