rotations: introduce support for ROTATION_PITCH_90_YAW_45

Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
Claudio Micheli
2021-08-17 17:53:45 +02:00
committed by bresch
parent 0ae4ed5d3b
commit 38fa74a27a
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -91,7 +91,9 @@ enum Rotation : uint8_t {
ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
ROTATION_PITCH_315 = 39,
ROTATION_ROLL_90_PITCH_315 = 40,
RESERVED_0 = 41,
RESERVED_1 = 42,
ROTATION_PITCH_90_YAW_45 = 43,
ROTATION_MAX
};
@@ -143,6 +145,9 @@ static constexpr rot_lookup_t rot_lookup[ROTATION_MAX] = {
{ 90, 68, 293 },
{ 0, 315, 0 },
{ 90, 315, 0 },
{ 0, 0, 0 },
{ 0, 0, 0 },
{ 0, 90, 45 },
};
/**
+1 -1
View File
@@ -233,7 +233,7 @@ static_assert(MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 == static_cast<MAV_SE
static_assert(MAV_SENSOR_ROTATION_PITCH_315 == static_cast<MAV_SENSOR_ORIENTATION>(ROTATION_PITCH_315), "Pitch: 315");
static_assert(MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 == static_cast<MAV_SENSOR_ORIENTATION>(ROTATION_ROLL_90_PITCH_315),
"Roll: 90, Pitch: 315");
static_assert(41 == ROTATION_MAX, "Keep MAV_SENSOR_ROTATION and PX4 Rotation in sync");
static_assert(41 + 3 == ROTATION_MAX, "Keep MAV_SENSOR_ROTATION and PX4 Rotation in sync");
static const StreamListItem streams_list[] = {