Skip to content

update feedforward and dynamic idle debug headers and graphs for 4.3 #521

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

Conversation

ctzsnooze
Copy link
Member

@ctzsnooze ctzsnooze commented Jun 23, 2021

This PR fixes debug header naming issues.

It builds on #514 , and is intended to sync with changes in firmware betaflight/betaflight#10805, where the debugs are re-ordered and re-named.

The intent is to:

  • correctly set the feedforward debug field names for 4.1, 4.2 and 4.3
  • appended [roll] to each where values are from roll only
  • correctly set the FF_INTERPOLATED and FF_LIMIT debugs to be 'centered', and scales them usably
  • scale the (FF_INTERPOLATED but not smoothed) setpoint trace to match that of normal setpoint
  • for 4.3, makes the debug group name appear as Feedforward [roll] to match the firmware name as proposed in Feedforward fix at centre and renaming betaflight#10805
  • for dynamic idle, show the user's motor rotation speed as RPM, not RPS, since the value we target in the CLI is RPM, and RPM is more readily understood.
  • Scale dynamic idle RPM to show zero at the bottom of the graphic panel
  • Show dynamic idle PID values for 4.3, keeping the older names for 4.2, and scale the PID values an equal amount either side of centre, which makes them easier to interpret
    It all works fine, as far as I can tell.

This images shows the various debugs, and how they can appear in 4.3 over betaflight/betaflight#10805

It is now quite easy to see the contribution made by boost to the overall feedforward signal, which is simply the rcSmoothed sum of delta and boost.

By overlaying the Setpoint, interpolated graph from this debug with normal setpoint we can:

  • identify the rcSmoothing delay, if any
  • determine if a 'gap' in normal setpoint is caused by not receiving a packet or by receiving a duplicate; a duplicate will cause a flat spot in plain setpoint but not in Setpoint, interpolated, whereas a non-received (dropped) packet causes a flat spot in both.

Screen Shot 2021-07-02 at 11 06 29

@ctzsnooze
Copy link
Member Author

added graph scaling to properly display FF_LIMIT debug.

@ctzsnooze ctzsnooze force-pushed the feedforward-field-names-and-graph-scaling branch from 1e27248 to e27ff43 Compare July 4, 2021 13:23
haslinghuis
haslinghuis previously approved these changes Jul 4, 2021
@ctzsnooze
Copy link
Member Author

This is how the feedforward section now appears in the log viewer header:

Screen Shot 2021-07-05 at 07 31 27

@ctzsnooze ctzsnooze force-pushed the feedforward-field-names-and-graph-scaling branch from d674caa to 7ba9854 Compare July 5, 2021 16:18
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 5, 2021

SonarCloud Quality Gate failed.

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

No Coverage information No Coverage information
8.3% 8.3% Duplication

@ctzsnooze
Copy link
Member Author

Made the feedforward debug graphs and graph names properly sensitive to version changes.

@ctzsnooze
Copy link
Member Author

ctzsnooze commented Jul 9, 2021

Have tested this with 4.3 and 4.2 logs, should be OK with earlier logs.
Happy to squash for merging anytime, I think it is ready.
Don't know how to fix the SonarCloud issue.
Please merge #512 first.

@github-actions
Copy link

github-actions bot commented Aug 9, 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 mikeller added this to the 3.6.0 milestone Aug 10, 2021
@ctzsnooze ctzsnooze force-pushed the feedforward-field-names-and-graph-scaling branch from 7ba9854 to 9f07f13 Compare August 30, 2021 00:37
@blckmn
Copy link
Member

blckmn commented Aug 31, 2021

AUTOMERGE: (FAIL)

  • github identifies PR as mergeable -> FAIL
  • assigned to a milestone -> PASS
  • cooling off period lapsed -> PASS
  • commit count less or equal to three -> PASS
  • Don't merge label NOT found -> PASS
  • at least one RN: label found -> PASS
  • Tested label found -> FAIL
  • assigned to an approver -> FAIL
  • approver count at least three -> FAIL

@mikeller mikeller force-pushed the feedforward-field-names-and-graph-scaling branch 4 times, most recently from 448895c to 2e74680 Compare August 31, 2021 12:11
@mikeller
Copy link
Member

@haslinghuis: Are you ok with this now?

@ctzsnooze ctzsnooze force-pushed the feedforward-field-names-and-graph-scaling branch from 2e74680 to f38561b Compare August 31, 2021 22:51
haslinghuis
haslinghuis previously approved these changes Aug 31, 2021
@ctzsnooze ctzsnooze force-pushed the feedforward-field-names-and-graph-scaling branch from f38561b to c26fa59 Compare September 1, 2021 00:08
@ctzsnooze
Copy link
Member Author

Sorry for the late inclusion of changes for Dynamic Idle.
In 4.3 the dynamic idle debug was changed to show P, I and D values as opposed to the previous values.
The scaling of the graphs also should be changed, it was unpredictable previously, that has been fixed, making comparisons from one file to the next much easier.

@ctzsnooze ctzsnooze changed the title update feedforward field defs and graphs for 4.3 update feedforward and dynamic idle debug headers and graphs for 4.3 Sep 1, 2021
haslinghuis
haslinghuis previously approved these changes Sep 1, 2021
@haslinghuis
Copy link
Member

haslinghuis commented Sep 1, 2021

#512 should be merged before this.

@ctzsnooze ctzsnooze force-pushed the feedforward-field-names-and-graph-scaling branch 2 times, most recently from 459edb2 to 2efdfa1 Compare September 3, 2021 10:21
@ctzsnooze
Copy link
Member Author

rebased

@ctzsnooze ctzsnooze force-pushed the feedforward-field-names-and-graph-scaling branch from 2efdfa1 to 854a999 Compare September 3, 2021 12:29
haslinghuis
haslinghuis previously approved these changes Sep 4, 2021
@ctzsnooze ctzsnooze force-pushed the feedforward-field-names-and-graph-scaling branch from 854a999 to 960ab51 Compare September 5, 2021 01:09
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 5, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
2.2% 2.2% Duplication

@ctzsnooze
Copy link
Member Author

Rebased and tested after merge of #512
Please let me know if there are any issues or changes, otherwise should be good to merge, so am removing the pinned label.

@ctzsnooze ctzsnooze removed the pinned label Sep 5, 2021
@ctzsnooze
Copy link
Member Author

Dmin debug from 4.3
Screen Shot 2021-09-05 at 11 17 13

Dynamic idle debug with dyn_idle_min_rpm set to 5000, note the label for the fourth debug trace says Min RPM now and matches the set value.
Screen Shot 2021-09-05 at 11 18 48

@ctzsnooze ctzsnooze mentioned this pull request Oct 27, 2021
@ctzsnooze
Copy link
Member Author

ctzsnooze commented Oct 27, 2021

Closed; all these 4.3 related changes are now in #539

@ctzsnooze ctzsnooze closed this Oct 27, 2021
@ctzsnooze ctzsnooze deleted the feedforward-field-names-and-graph-scaling branch December 28, 2021 20:50
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