Conversation
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoRefactor pitch-aware throttle PID attenuation
AI Description
Diagram
High-Level Assessment
Files changed (11)
|
Code Review by Qodo
1.
|
|
163d7cc should resolve the issue Qodo pointed out, I think? I think the merge resolution is just deleting calculateTPAThtrottle? |
|
@Jetrell Does it make sense to allow multirotor |
|
@breadoven When I read it the other day. I was actually left wondering why you did that. And you have tested it in HITL ? I only had a quick skim through on the phone. I might have missed something. However I assume the I-term remains active to preserve attitude control . Even when the P, D, and Feedforward terms is scale down to 0.0 ? I think it could be more robust. It would seem the path you have taken is to make it work with one setting. There are so many new AI driven commits being added with many of the settings they bring along not being completely needed.. But here we have a crucial flight setting, that would be better separated for multiple reasons, and not the least safety in setup... That's just my view anyway. |
I didn't change the existing settings or the basic TPA calculation method just the way it was coded to make it clearer (It always worked with only 1 setting for Fixed wing is constrained to a minimum |
|
Your explanation makes sense. I must have missed one of those points last night..
Well it actually has been causing problems as mentioned in my last post. |
That is a problem. And not just for this one setting, right? Platform defaults not happening on upgrade to the version where the setting is introduced seems like a wider issue. This isn't the only setting with platform defaults, eh? I know @b14ckyy did some good work on the upgrade path for settings. Perhaps we can find a way to fix the broader problem, rather than just a bandaid for this one particular setting? A thought is when platform defaults are important, we could do any of the following: Configurator could check for a "never set" sentinel value and set the platform default. "Has never been set" would be the firmware default. Alternatively:
|
There are a couple. But its more a case of having certain functions enabled or disabled by default, for the benefit of the user. Below is a sample of those.. A few could have been coupled in the early days. But now that we have mixer profiles for VTOL operation, it is imperative those settings have different identities. Because there tuning requirements are different in each mixer profile.
Besides the above. There are more than double that amount of settings that are specific to each platform. And don't have a function to perform on the other... Like this random example - But getting back to this. The fact I'm not unaware that setting resources are a limited. But I feel we are allowing simple settings to get through in some cases. While we are debating here over the need for an extra far more important setting.
Do you mean that certain platform specific settings will be applied when a certain mixer platform type is selected ? But I'm not sure how that will work for a VTOL. |
|
If we have new settings with platform specific defaults, I can extend the settings conversion tool to read the platform type before applying an upgrade and then add the appropriate settings to it. So we just define them in the upgrade profile json. The only issue might be, if there are platform specific differences within one class for example for wings and planes with tail. Or vtol setups. Configurator derives the platform type based on the mixer config but full custom mixes could be an issue. Alternative we could add a follow up popup if the platform type is not 100% reliably detected so the user decides? |
|
For the record it seems |
|
RAM / Flash usage vs. base commit
See RAM/flash optimization guide for techniques to reduce usage. |
|
Test firmware build ready — commit Download firmware for PR #11969 249 targets built. Find your board's
|
Refactors code for PID Throttle PID attenuation (TPA). General code clean up with notable changes as follows:
calculateTPAThtrottlerenamed totpaPitchThrottleAdjustmentto better describe its purpose which has now changed so it only provides a pitch based TPA throttle adjustment/compensation value rather than a direct throttle output value.tpaPitchThrottleAdjustmentsimplified to remove redundant code. Comment added to better describe its purpose.tpa_ratefor multirotor constrained 0 to 100 to prevent -ve TPA factors for settings > 100.tpaFactorat idle removed fortpa_rate< 100. There's no reason for a step change just because the throttle reduces from 1us above idle to idle. Seems to be a hangover from code going back some time that was never corrected after recent changes.The
settings.yamldescription fortpa_pitch_compensationneeds improving but hasn't been changed for this PR in light of #11904 and #11956.HITL testing on fixed wing and multirotor testing shows the TPA factor values behave as expected.