Skip to content

Conversation

@mrRobot62
Copy link

@mrRobot62 mrRobot62 commented Mar 29, 2022

On mac I found a sporadic timing error which prevents to write a complete backup into a file. It must be something with the connection between FC and BF configurator, if there is a delay there, the case occurs

Problem was found here
GUI.interval_add(readingDumpIntervalName, () => { const currentTime = performance.now(); if (currentTime - lastCliStringReceived > 500) { this.cliEngine.unsubscribeOnRowCame(); GUI.interval_remove(readingDumpIntervalName); resolve(diffAll); }
Unfortunately increasing 500 to a bigger number do not fix this issue.
Sometimes it returns more or less nothing.

Based on a sporadic error my fix is not high spophisticated. In function TABS.presets.onSaveConfigClick I check text length, if it is to small, quit function with a warning otherwise write file.

Change diff all to dump all based on function name which is called.

@sonarqubecloud
Copy link

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

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions
Copy link
Contributor

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

@blckmn
Copy link
Member

blckmn commented Mar 30, 2022

AUTOMERGE: (FAIL)

  • github identifies PR as mergeable -> FAIL
  • assigned to a milestone -> FAIL
  • 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 -> FAIL
  • Tested label found -> FAIL
  • assigned to an approver -> FAIL
  • approver count at least three -> FAIL

@haslinghuis
Copy link
Member

@mrRobot62 please see also: #2879

Copy link
Member

@limonspb limonspb left a comment

Choose a reason for hiding this comment

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

@mrRobot62 could you please test the latest master and check if we need this fix from you now. Thanks!

});

this.cliEngine.sendLine(CliEngine.s_commandDiffAll);
this.cliEngine.sendLine(CliEngine.s_commandDumpAll);
Copy link
Member

Choose a reason for hiding this comment

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

this should stay Diff not dump. The idea is to actually save diff as it's smaller, faster to save/load and more flexible.

@github-actions
Copy link
Contributor

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.

@github-actions
Copy link
Contributor

Pull request closed automatically as inactive.

@github-actions github-actions bot closed this May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants