Skip to content

Conversation

@IvoFPV
Copy link
Contributor

@IvoFPV IvoFPV commented Nov 11, 2019

To go with betaflight/betaflight#9119. For now just for testing the calculation.
Todo:

  • Finalize basic support for firmware sliders
  • Backwards compatibility for 4.1 configurator only based calculation
  • GUI change for expert mode sliders

mikeller
mikeller previously approved these changes Nov 14, 2019
Copy link
Member

@mikeller mikeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - can you rebase this on latest master please - this should deal with the SonarCloud complaints - SonarCloud hates non-rebased code with a vengeance.

@IvoFPV
Copy link
Contributor Author

IvoFPV commented Nov 14, 2019

Still a lot of work required, this is just for testing currently with lots of random code duplicated and nowhere near finished 😄

@spatzengr
Copy link
Contributor

@IvoFPV , let me know where you need any help. I was looking at #294 and would love to make some progress toward this regard.

We need to somehow adjust the sliders based on quad class. We are overkilling the higher PID values with them being RED now (#1839) and it is not the case across the board. For example, a whoop requires higher PID (60+). A 5" on 6s with a really light frame requires PIDs in the 20s.

@stale
Copy link

stale bot commented Jan 22, 2020

This issue / pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

@stale stale bot added the Inactive label Jan 22, 2020
updateTabList(FEATURE_CONFIG.features);
}

TuningSliders.setExpertMode(checked);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be in here?

@stale stale bot removed the Inactive label Jan 25, 2020
@mikeller mikeller added this to the 10.7.0 milestone Jan 25, 2020
@spatzengr
Copy link
Contributor

Some thoughts:

image

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

@mikeller
Copy link
Member

Rebased, done some basic testing, seems to be working.

Will need more testing.

@mikeller mikeller marked this pull request as ready for review January 10, 2021 07:49
@asizon
Copy link
Member

asizon commented Jan 10, 2021

Thanks @mikeller i have start testing now. I can see that after move some sliders,PITCH value for p,i,d and f goes to wrong values, also after this if you want to put sliders on 1, never goes to default values.

image

In the other hand, seems that disabling-enabling Dmin doesnt have efect on D values yet.

@mikeller mikeller force-pushed the firmware-sliders branch 4 times, most recently from 8824c75 to 18b9095 Compare January 16, 2021 11:59
@mikeller
Copy link
Member

@asizon: Is this when using 4.3 firmware with the firmware based simplified settings, or older firmware without them? The configurator sliders will stop working with pre-simplified-settings 4.3 firmware after this.

mikeller
mikeller previously approved these changes Jan 16, 2021
@asizon
Copy link
Member

asizon commented Jan 16, 2021

@mikeller tested with latest 4.3 firmware, firmware based sliders, aniway I cant continue testing since there is an error and port is always loading:
image

@asizon
Copy link
Member

asizon commented Jan 16, 2021

image

@mikeller
Copy link
Member

@asizon: Ok, should be fixed now.

mikeller
mikeller previously approved these changes Jan 16, 2021
@asizon
Copy link
Member

asizon commented Jan 17, 2021

Thankyou @mikeller , this slider code is so complex, maybe merge it and continue the work in other PRs?. I have made another test, but seems that this feature need some extra work to make it work as expected. P values doesnt go correctly. Also if you move slider fast, values doesnt change, is super weird:
image

@mikeller
Copy link
Member

@asizon: Yes, I will get this pull request merged - since it is @IvoFPV's and not mine the process for me to push changes into it is not ideal. We can do the fixes in follow-up pull requests.

asizon
asizon previously approved these changes Jan 17, 2021
@McGiverGim
Copy link
Member

In my opinion, we must throw away the old pid sliders code, it never worked reliable, and use only the new firmware sliders.

But this will produce a lot of complains of users that want to use it with old versions of Betaflight.

@mikeller mikeller dismissed stale reviews from asizon and themself via afb8c05 January 17, 2021 09:40
mikeller
mikeller previously approved these changes Jan 17, 2021
@mikeller
Copy link
Member

mikeller commented Jan 17, 2021

@McGiverGim: I can see your point. But I do not fully agree with 'it never worked reliable'. I agree that they are not perfect, and there are a number of edge cases where they fail, but based on the amount of feedback we are getting for them, with very little of it negative / bug reports, I think that the value that users are getting out of them outweighs the rough edges.
But I fully agree that we should 'freeze' the code for the configurator sliders, and focus all of our future work on the firmware sliders.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
1.1% 1.1% Duplication

@spatzengr
Copy link
Contributor

@mikeller , agreed. The user base - in general - loves the sliders and the option to still type in what you want is key.

As they are transferred from Configurator based to Firmware based we just need to keep an eye on CONSISTANCY of how they work!

Something to consider is hiding the new sliders unless "Expert Mode" is toggled in the configurator. I would not worry about that type of thing in the OSD sliders, just the configurator. But that is something that can be looked at in the new PR.

Removing the sliders or altering how the current sliders work in form would cause an uproar IMHO and it would be hard to defend the "BF is too complicated" complains that would follow.

Mspatz
[P.s. with that said, the ONLY thing that does not make sense in the 10.7 slider version is how the PD Balance slider now changes D vs. P. That was an @ctzsnooze, Brian White, (and others) thing.

First, as the slider goes higher it makes PD ratio lower, not higher. Also it does not align with the fact that you tune in this order ... Filters -> D -> P-> I-> FF. For optimal wash performace, you want D as high as you can - just below the oscillation point - and then balance P off of it. And then on to i-Term, etc.... So in the current code, every time you change the PD Balance slider you have to typically tweak the P & D Gain slider too. In Configurator 10.6, that was not the case (by orignal deaign). Alas, I argured against the change back when it was made from 10.6 to 10.7 and failed; I'm not sure the majority agrees (yet) but hope a couple vidoes since has changed some minds (if anyone even watches); and reverting back to the better behavior does go agains my conaistancy argument. But rest assured, if it would be UAVflight, it would be the other way to be LESS complicated.]

Copy link
Member

@McGiverGim McGiverGim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. The code seems ok to me. Is big so it will surely appear some bug but nothing that I can see looking at the code.

I commented in the firmware PR that I think is better to use a more "dynamic" and generic approach, without a list of defined sliders. It was rejected because it was not expected to modify the sliders in a future. Now we can see a lot of conditionals and elements hardcoded and defined in the Configurator, more because we maintain backwards compatibility with versions without firmware support. I only hope this will not end in a nightmare of maintenance.

},
"pidTuningRollPitchRatioSliderHelp": {
"message": "Roll Pitch Ratio",
"description": "This needs a meaningful help text"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is missing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@McGiverGim , this should be "Pitch Roll Ratio" (flipped) as most raise Pitch gains. So as the slider goes up, the Pitch should go up, not Roll. That said, i reckon this is controlled in BF now (firmware based)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - these were missing originally in the pull request. I have added placeholders for now, so we can decide for each one if we need a help text, or if we should remove the tooltip.

@spatzengr: The respective simplified setting in the firmware is currently called simplified_roll_pitch_ratio - so if we decide to rename this then we should do it now, before any of this is released, and change it in the firmware too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikeller , I created the other slider tool tips and can give the new ones a shot. I think we should change Roll/Pitch slider to Pitch/Roll for the reasons outlined above. I also think D_min slider maybe should change, but that would not revise the name and is 50/50 to me on that one (could go either way).

I actually just created a branch in my repo to take a look at doing this change, but i'm sure it would take me hours and you minutes. So if you are willing, it would not hurt my feelings. This was the only FW thing and the rest should be configurator items to polish up.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spatzengr: Hehe, one could argue that these hours would be well spent on honing your JS / git / GitHub skills. 😛
But I don't mind doing the change - we can probably combine it with the tooltip texts, so let me know when you have these, and I can do the change.

},
"pidTuningIGainSliderHelp": {
"message": "I Gain",
"description": "This needs a meaningful help text"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This too...

},
"pidTuningDMinRatioSliderHelp": {
"message": "D Min Ratio",
"description": "This needs a meaningful help text"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants