14 from PyQt6.QtCore import QCoreApplication |
14 from PyQt6.QtCore import QCoreApplication |
15 from PyQt6.QtSerialPort import QSerialPortInfo |
15 from PyQt6.QtSerialPort import QSerialPortInfo |
16 |
16 |
17 from eric7 import Preferences |
17 from eric7 import Preferences |
18 from eric7.EricGui import EricPixmapCache |
18 from eric7.EricGui import EricPixmapCache |
|
19 from eric7.SystemUtilities import OSUtilities |
19 |
20 |
20 from .DeviceBase import BaseDevice |
21 from .DeviceBase import BaseDevice |
21 |
22 |
22 SupportedBoards = { |
23 SupportedBoards = { |
23 "bbc_microbit": { |
24 "bbc_microbit": { |
374 if port.hasVendorIdentifier() and port.hasProductIdentifier(): |
375 if port.hasVendorIdentifier() and port.hasProductIdentifier(): |
375 supported = False |
376 supported = False |
376 vid = port.vendorIdentifier() |
377 vid = port.vendorIdentifier() |
377 pid = port.productIdentifier() |
378 pid = port.productIdentifier() |
378 |
379 |
|
380 if OSUtilities.isMacPlatform() and port.portName().startswith("tty."): |
|
381 # don't use the tty. variant on macOS; use the cu. one instead |
|
382 continue |
|
383 |
379 for board in SupportedBoards: |
384 for board in SupportedBoards: |
380 if (vid, pid) in SupportedBoards[board]["ids"] or ( |
385 if (vid, pid) in SupportedBoards[board]["ids"] or ( |
381 vid, |
386 vid, |
382 None, |
387 None, |
383 ) in SupportedBoards[board]["ids"]: |
388 ) in SupportedBoards[board]["ids"]: |