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 PortHandler #2932

Merged
merged 1 commit into from May 28, 2022
Merged

Fix PortHandler #2932

merged 1 commit into from May 28, 2022

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented May 22, 2022

@McGiverGim found an issue with some GUI function continuous being called.

Fixes and improves following issues:

  • GUI updates were done in PortHandler every 500ms, moving them where status needs change.
  • Isolated PortHandler change handler in firmware flasher tab as it was working on other tabs.
  • PortHandler was cutting of text and adjusted the correction.
  • Auto-detect button was not always updated correctly.
  • Add recognition for SPRacing boards.
  • Disable flash button when flashing.
  • Don't check serial devices in DFU mode.
  • Don't check USB devices in serial mode.

Due to changes it was needed to rethink how to enable the auto-detect button.

@haslinghuis haslinghuis added this to the 10.8.0 milestone May 22, 2022
@haslinghuis haslinghuis added this to Needs work in Finalizing Firmware 4.3 Release via automation May 22, 2022
@haslinghuis haslinghuis self-assigned this May 22, 2022
@github-actions

This comment has been minimized.

@haslinghuis haslinghuis moved this from Needs work to Ready for review in Finalizing Firmware 4.3 Release May 22, 2022
@haslinghuis haslinghuis moved this from Ready for review to Needs work in Finalizing Firmware 4.3 Release May 23, 2022
@haslinghuis haslinghuis marked this pull request as draft May 23, 2022 00:01
@haslinghuis haslinghuis force-pushed the fix-porthandler branch 2 times, most recently from 1458fe7 to f6440e3 Compare May 23, 2022 21:59
@haslinghuis haslinghuis marked this pull request as ready for review May 23, 2022 22:02
@github-actions

This comment has been minimized.

@haslinghuis haslinghuis moved this from Needs work to Ready for review in Finalizing Firmware 4.3 Release May 23, 2022
@blckmn
Copy link
Member

blckmn commented May 23, 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 -> FAIL

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@limonspb limonspb requested a review from McGiverGim May 26, 2022 01:44
McGiverGim
McGiverGim previously approved these changes May 26, 2022
Copy link
Member

@McGiverGim McGiverGim left a comment

Choose a reason for hiding this comment

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

It's ok to me, only one thing I don't like, but approved.

@@ -267,7 +267,7 @@ PortHandler.selectPort = function(ports) {
const pathSelect = ports[i].path;
const isWindows = (OS === 'Windows');
const isTty = pathSelect.includes('tty');
const deviceRecognized = portName.includes('STM') || portName.includes('CP210');
const deviceRecognized = portName.includes('STM') || portName.includes('CP210') || portName.startsWith('SPR');
Copy link
Member

Choose a reason for hiding this comment

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

I don't like too much to have exclusions for one vendor. I think SPR must include STM in the name. I suppose is a customized variant of STM right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes we should have a policy on naming conventions. STM32H750 betaflight (legacy) target is shown as /dev/tty/ACM0 - SPRacingH7EXTREME

Comment on lines 26 to 27
ConfigStorage.get('showVirtualMode', res => self.showVirtualMode = res.showVirtualMode);
ConfigStorage.get('showAllSerialDevices', res => self.showAllSerialDevices = res.showAllSerialDevices);
Copy link
Member

Choose a reason for hiding this comment

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

Didn't we move to sync api now?

Suggested change
ConfigStorage.get('showVirtualMode', res => self.showVirtualMode = res.showVirtualMode);
ConfigStorage.get('showAllSerialDevices', res => self.showAllSerialDevices = res.showAllSerialDevices);
self.showVirtualMode = ConfigStorage.get('showVirtualMode').showVirtualMode);
self.showAllSerialDevices = ConfigStorage.get('showAllSerialDevices').showAllSerialDevices;

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes here: #2636 (will do afterwards when rebasing).

Copy link
Member

Choose a reason for hiding this comment

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

Sweet, yeah that one been dangling for a while now 🙈 I always hope it's been merged in

Copy link
Member Author

Choose a reason for hiding this comment

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

🥳 Finally got it approved. Rebased now.

chmelevskij
chmelevskij previously approved these changes May 26, 2022
@haslinghuis haslinghuis dismissed stale reviews from chmelevskij and McGiverGim via 8a26a1f May 27, 2022 00:58
@haslinghuis haslinghuis force-pushed the fix-porthandler branch 2 times, most recently from 8a26a1f to 0b8f3d8 Compare May 27, 2022 01:01
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@haslinghuis haslinghuis force-pushed the fix-porthandler branch 2 times, most recently from 753e311 to 912231f Compare May 27, 2022 01:26
@github-actions

This comment has been minimized.

@sonarcloud
Copy link

sonarcloud bot commented May 27, 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 0 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 merged commit 6093e7a into betaflight:master May 28, 2022
Finalizing Firmware 4.3 Release automation moved this from Ready for review to Finished (Merged) May 28, 2022
@haslinghuis haslinghuis deleted the fix-porthandler branch May 28, 2022 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants