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

Fix MSP flow, make MSP timeout dynamic #2846

Merged
merged 1 commit into from Jun 28, 2022
Merged

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Mar 3, 2022

  • Add dynamic timeout for MSP calls with a save range 250- 2000ms (bounces back gradually to 4 fps).
  • Fix MSP_STATUS vs MSP_STATUS_EX as it was called unsupported (without software version control).
  • Fix [some] MSP calls stumbling over each other, without callback.
  • Remove checkUpdate profile from MSPHelper library as code should be in the caller.
  • Disconnect after crc packet error threshold has exceeded.

Note:
With a lower timeout the code shows more timeouts but overall the code is processing more calls optimizing processing.

@github-actions

This comment has been minimized.

@haslinghuis haslinghuis added this to For discussion in Finalizing Firmware 4.3 Release via automation Mar 3, 2022
@haslinghuis haslinghuis added this to the 10.8.0 milestone Mar 3, 2022
@haslinghuis haslinghuis moved this from For discussion to Configurator in Finalizing Firmware 4.3 Release Mar 3, 2022
@github-actions

This comment has been minimized.

@asizon asizon removed the RN: BUGFIX label Mar 3, 2022
@blckmn
Copy link
Member

blckmn commented Mar 4, 2022

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 -> PASS
  • approver count at least three -> PASS

@github-actions

This comment has been minimized.

@@ -579,7 +579,7 @@ TABS.motors.initialize = function (callback) {
// Amperage
function power_data_pull() {
motorVoltage.text(i18n.getMessage('motorsVoltageValue', [FC.ANALOG.voltage]));
motorMahDrawingElement.text(i18n.getMessage('motorsADrawingValue', [FC.ANALOG.amperage.toFixed(2)]));
motorMahDrawingElement.text(i18n.getMessage('motorsADrawingValue', [FC.ANALOG.amperage?.toFixed(2)]));
Copy link
Member

Choose a reason for hiding this comment

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

What does this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

The value was initial undefined causing an error. Faster processing seem to have side effects. Until now it's the only one found while optimizing MSP. Updated.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@haslinghuis haslinghuis marked this pull request as ready for review March 5, 2022 23:42
@haslinghuis haslinghuis force-pushed the fix_msp branch 2 times, most recently from 646b2a9 to 194ebb7 Compare March 6, 2022 00:22
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@haslinghuis haslinghuis force-pushed the fix_msp branch 2 times, most recently from fc45c9e to d1354d5 Compare June 25, 2022 02:15
@github-actions

This comment has been minimized.

@haslinghuis haslinghuis force-pushed the fix_msp branch 3 times, most recently from a9b0068 to 8f50699 Compare June 25, 2022 02:37
@github-actions

This comment has been minimized.

@haslinghuis haslinghuis force-pushed the fix_msp branch 2 times, most recently from b7277eb to d2117cf Compare June 25, 2022 22:51
@haslinghuis haslinghuis changed the title Fix MSP flow, make MSP timeout dynamic and add MSP statistics to status bar Fix MSP flow, make MSP timeout dynamic Jun 25, 2022
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Add parameters to status bar

Use async and await on serial_backend
@sonarcloud
Copy link

sonarcloud bot commented Jun 26, 2022

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 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link
Contributor

Do you want to test this code? Here you have an automated build:
Betaflight-Configurator-Android
Betaflight-Configurator-Linux
Betaflight-Configurator-macOS
Betaflight-Configurator-Windows
WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

@haslinghuis haslinghuis moved this from Configurator to Ready to merge in Finalizing Firmware 4.4 Release Jun 28, 2022
@blckmn blckmn merged commit e228ca0 into betaflight:master Jun 28, 2022
Finalizing Firmware 4.4 Release automation moved this from Ready to merge to Closed Jun 28, 2022
@haslinghuis haslinghuis deleted the fix_msp branch June 28, 2022 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

6 participants