-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
feat(color): Display current stick position on CurveEdit screen #2580
Conversation
You mean using auto-source? The solution implemented here looks quite cumbersome to me. It assumes the source of the last edited item should be used. What if I have not edited anything? |
As description says, this works only if you enter the EditCurve from edit input or edit mixer. |
I believe this is the first step just to get the functionality for color radios as well. The limitation now will be same for bw and color radios. Anyway this should be extended and cover all places in GUI. Otherwise it could be confusing... I am not asking in this PRs, but in future... if @eshifri can work on this one :) Thank you! |
This is at is a valid assumption to make, since the premise is the same as current B&W behaviour - if you access the curves screen via input or mixes, then the configured source for the curve input should be used. However, if you enter via the curves screen (or via an input with no configured source (?!)), then yes, there is no source, and thus the next level - an option that lets you pick a source, is valid. |
@pfeerick fine with me, then I'll leave it in your skilled hands and probably make a further PR then to add auto-source. |
This commit adds automatic source selection. |
33b6a59
to
1e5909a
Compare
Seems to be working perfectly on TX16S - uses configured source if curve editor accessed via inputs or mixes, otherwise uses whichever source is moved. I have found an edge case where it stops working - if you go into the curve editor via inputs or mixes, graph moves when you move the stick. If you then go into the curve editor directly via the curves tab, autosource doesn't work. But it does if you go in the other order. In other words, accessing the curves via inputs/mixes breaks autosource on the curve editor tab. |
This seemed to have fixed it... I think it was still locked from going in via the inputs/mixes screens? diff --git a/radio/src/gui/colorlcd/curveedit.cpp b/radio/src/gui/colorlcd/curveedit.cpp
index a6afc9115..29418c841 100644
--- a/radio/src/gui/colorlcd/curveedit.cpp
+++ b/radio/src/gui/colorlcd/curveedit.cpp
@@ -127,6 +127,8 @@ void CurveEdit::SetCurrentSource(uint32_t source)
CurveEdit::currentSource = source;
if (source)
lockSource = true;
+ else
+ lockSource = false;
}
mixsrc_t CurveEdit::currentSource = 0;
|
Yes, I think this is the proper fix. |
Many thanks to @pfeerick for finding the problem and the solution! |
Great! And you're welcome! :) |
27e7c90
to
05911e2
Compare
Thanks for the work done, How can I use it, there is a ready-made nightly firmware for RM TX16S? |
Once a PR is merged, it's in the next nightly build ;) https://github.com/EdgeTX/edgetx/releases/tag/nightly |
Thank you very much, I will test. |
Hello. |
I can reproduce it on the simulator. If the curve is used by Rudder source detector occasionally returns 87 instead of 4 when the stick is near zero crossing. So I guess sometimes it is a stick - sometimes it is an Input? |
…TX#2580) * Display current stick position on the CurveEdit screen * auto source selection * Display current stick position on the CurveEdit screen * auto source selection * unlock source when entering directly from model menu. * Whitespace * Git EoF newline Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Fixes #2508
This PR adds functionality to display stick position on the edit curve screen.
Functionality is similar to OTX and ETX B/W: if you enter CurveEdit from input or mixer the stick position is shown; if you go to this screen from CURVES tab - no cursor is shown on the curve.
(It is possible to keep "last used stick", but it does not look right to me.)