Skip to content

Commit

Permalink
Fix AT32 detection (betaflight#3935)
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis authored May 6, 2024
1 parent 1a73e86 commit 71dad13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/port_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ 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') || portName.startsWith('SPR');
const deviceFilter = ['AT32', 'CP210', 'SPR', 'STM32'];
const deviceRecognized = deviceFilter.some(device => portName.includes(device));
const legacyDeviceRecognized = portName.includes('usb');
if (isWindows && deviceRecognized || isTty && (deviceRecognized || legacyDeviceRecognized)) {
this.portPickerElement.val(pathSelect);
Expand Down

0 comments on commit 71dad13

Please sign in to comment.