Skip to content

Commit

Permalink
Solve the possible conflict with iNav about stick cmd BTN_up, down, l…
Browse files Browse the repository at this point in the history
…eft and right
  • Loading branch information
ligenxxxx committed Sep 21, 2023
1 parent a6bdee9 commit d7c3b4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/msp_displayport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1265,13 +1265,13 @@ void update_cms_menu(uint16_t roll, uint16_t pitch, uint16_t yaw, uint16_t throt
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

0 comments on commit d7c3b4e

Please sign in to comment.