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

chore: Do not display trims position when trim is set as 3POS #4777

Merged
merged 2 commits into from
Mar 22, 2024

Conversation

3djc
Copy link
Collaborator

@3djc 3djc commented Mar 20, 2024

Do not draw the trim position indicator when trims are set to 3POS

@3djc 3djc changed the title Do not display trims position when trim is set as 3POS chore: Do not display trims position when trim is set as 3POS Mar 20, 2024
@froqstar
Copy link

For color LCD this works already?

@3djc
Copy link
Collaborator Author

3djc commented Mar 20, 2024

Part of 2.10 rc1 readme: Unused trim switches can be used as 3POS switches

@froqstar
Copy link

Should've asked differently:
For color LCD this is not a problem since the trim display code already checks for the trim being a 3pos switch?

@3djc
Copy link
Collaborator Author

3djc commented Mar 20, 2024

I see, no it is not checking, but it is not checking either if trims are disabled I think. Could you have a look @philmoz ?

@philmoz
Copy link
Collaborator

philmoz commented Mar 20, 2024

I see, no it is not checking, but it is not checking either if trims are disabled I think. Could you have a look @philmoz ?

Quick fix - add this between lines 2 and 3 of MainViewTrim::checkEvents()

  trim_t v = getRawTrimValue(mixerCurrentFlightMode, stickIndex);
  if (v.mode == TRIM_MODE_NONE || v.mode == TRIM_MODE_3POS) {
    // Hide trim if not being used
    if (!lv_obj_has_flag(lvobj, LV_OBJ_FLAG_HIDDEN))
      lv_obj_add_flag(lvobj, LV_OBJ_FLAG_HIDDEN);
    return;
  } else {
    if (lv_obj_has_flag(lvobj, LV_OBJ_FLAG_HIDDEN))
      lv_obj_clear_flag(lvobj, LV_OBJ_FLAG_HIDDEN);
  }

@pfeerick pfeerick added the bug 🪲 Something isn't working label Mar 20, 2024
@pfeerick pfeerick added this to the 2.10 milestone Mar 20, 2024
@pfeerick pfeerick added the UX-UI Related to user experience (UX) or user interface (UI) behaviour label Mar 22, 2024
@pfeerick pfeerick merged commit 49c1cb8 into main Mar 22, 2024
44 checks passed
@pfeerick pfeerick deleted the 3djc/remove-3pos-trim-mainview branch March 22, 2024 10:52
ThomasKuehne pushed a commit to ThomasKuehne/edgetx that referenced this pull request Mar 24, 2024
felipemanga pushed a commit to felipemanga/edgetx that referenced this pull request Mar 29, 2024
ThomasKuehne pushed a commit to ThomasKuehne/edgetx that referenced this pull request Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working UX-UI Related to user experience (UX) or user interface (UI) behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants