mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-21 21:50:35 +08:00
rotations: introduce support for ROTATION_PITCH_90_YAW_45
Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
@@ -91,7 +91,9 @@ enum Rotation : uint8_t {
|
|||||||
ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
|
ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
|
||||||
ROTATION_PITCH_315 = 39,
|
ROTATION_PITCH_315 = 39,
|
||||||
ROTATION_ROLL_90_PITCH_315 = 40,
|
ROTATION_ROLL_90_PITCH_315 = 40,
|
||||||
|
RESERVED_0 = 41,
|
||||||
|
RESERVED_1 = 42,
|
||||||
|
ROTATION_PITCH_90_YAW_45 = 43,
|
||||||
ROTATION_MAX
|
ROTATION_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -143,6 +145,9 @@ static constexpr rot_lookup_t rot_lookup[ROTATION_MAX] = {
|
|||||||
{ 90, 68, 293 },
|
{ 90, 68, 293 },
|
||||||
{ 0, 315, 0 },
|
{ 0, 315, 0 },
|
||||||
{ 90, 315, 0 },
|
{ 90, 315, 0 },
|
||||||
|
{ 0, 0, 0 },
|
||||||
|
{ 0, 0, 0 },
|
||||||
|
{ 0, 90, 45 },
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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_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),
|
static_assert(MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 == static_cast<MAV_SENSOR_ORIENTATION>(ROTATION_ROLL_90_PITCH_315),
|
||||||
"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[] = {
|
static const StreamListItem streams_list[] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user