Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throttle must be in the mid when enter cam menu #160

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/msp_displayport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ void update_cms_menu(uint16_t roll, uint16_t pitch, uint16_t yaw, uint16_t throt

uint8_t IS_HI_throttle = IS_HI(throttle);
uint8_t IS_LO_throttle = IS_LO(throttle);
// uint8_t IS_MID_throttle = IS_MID(throttle);
uint8_t IS_MID_throttle = IS_MID(throttle);

uint8_t IS_HI_pitch = IS_HI(pitch);
uint8_t IS_LO_pitch = IS_LO(pitch);
Expand All @@ -1261,17 +1261,17 @@ void update_cms_menu(uint16_t roll, uint16_t pitch, uint16_t yaw, uint16_t throt
VirtualBtn = BTN_MID;
} else {
mid = 0;
if (IS_HI_yaw && IS_MID_roll && IS_MID_pitch)
if (IS_HI_yaw && IS_MID_roll && IS_MID_pitch && IS_MID_throttle)
VirtualBtn = BTN_ENTER;
else if (IS_LO_yaw && IS_MID_roll && IS_MID_pitch)
VirtualBtn = BTN_EXIT;
else if (IS_MID_yaw && IS_MID_roll && IS_HI_pitch)
else if (IS_MID_yaw && IS_MID_roll && IS_HI_pitch && !IS_HI_throttle)
VirtualBtn = BTN_UP;
else if (IS_MID_yaw && IS_MID_roll && IS_LO_pitch)
else if (IS_MID_yaw && IS_MID_roll && IS_LO_pitch && !IS_HI_throttle)
VirtualBtn = BTN_DOWN;
else if (IS_MID_yaw && IS_LO_roll && IS_MID_pitch)
else if (IS_MID_yaw && IS_LO_roll && IS_MID_pitch && !IS_HI_throttle)
VirtualBtn = BTN_LEFT;
else if (IS_MID_yaw && IS_HI_roll && IS_MID_pitch)
else if (IS_MID_yaw && IS_HI_roll && IS_MID_pitch && !IS_HI_throttle)
VirtualBtn = BTN_RIGHT;
else
VirtualBtn = BTN_INVALID;
Expand Down