Skip to content

Commit

Permalink
Fix AT32 detection
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed May 5, 2024
1 parent 461e2db commit e25c325
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 e25c325

Please sign in to comment.