|
|
@ -37,7 +37,7 @@ constexpr RotationMap::OmList RotationMap::omList_[] = {
|
|
|
|
|
|
|
|
|
|
|
|
uint16_t RotationMap::orientation(int32_t degrees) {
|
|
|
|
uint16_t RotationMap::orientation(int32_t degrees) {
|
|
|
|
uint16_t o = 1;
|
|
|
|
uint16_t o = 1;
|
|
|
|
for (auto&& [deg, orient] : omList_) {
|
|
|
|
for (auto&& [orient, deg] : omList_) {
|
|
|
|
if (deg == degrees) {
|
|
|
|
if (deg == degrees) {
|
|
|
|
o = orient;
|
|
|
|
o = orient;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -48,7 +48,7 @@ uint16_t RotationMap::orientation(int32_t degrees) {
|
|
|
|
|
|
|
|
|
|
|
|
int32_t RotationMap::degrees(uint16_t orientation) {
|
|
|
|
int32_t RotationMap::degrees(uint16_t orientation) {
|
|
|
|
int32_t d = 0;
|
|
|
|
int32_t d = 0;
|
|
|
|
for (auto&& [deg, orient] : omList_) {
|
|
|
|
for (auto&& [orient, deg] : omList_) {
|
|
|
|
if (orient == orientation) {
|
|
|
|
if (orient == orientation) {
|
|
|
|
d = deg;
|
|
|
|
d = deg;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|