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: web serial disconnect logic #3575

Merged
merged 1 commit into from
Sep 12, 2023
Merged

Conversation

chmelevskij
Copy link
Member

@chmelevskij chmelevskij commented Sep 11, 2023

This PR fixes the disconnect on web version.

Mainly had to properly clean up even listeners, due to how we historically had serial connection as singleton. In the future we can instead create new WebSerial instance and destroy on disconnect allowing garbage collector to handle that.

But for now will just explicitly remove even listeners before adding the new ones.

Screen.Recording.2023-09-11.at.08.10.10.mov

@sonarcloud
Copy link

sonarcloud bot commented Sep 11, 2023

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-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!

@blckmn
Copy link
Member

blckmn commented Sep 11, 2023

AUTOMERGE: (FAIL)

  • github identifies PR as mergeable -> PASS
  • 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 -> FAIL

@nerdCopter
Copy link
Member

4dcae8e5 tested good for disconnect button via yarn vite.
yarn gulp debug work as well.

remaining to do: save and reboot to disconnect.

@haslinghuis haslinghuis merged commit 0a93ea4 into betaflight:master Sep 12, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: COMPLETED
Development

Successfully merging this pull request may close these issues.

None yet

4 participants