✨ Add hook to extend serial port names
This commit is contained in:
1 parent
488a75737c
commit
2206b84f3e
2 files changed
+26
No files matched your search
@@ -188,6 +188,13 @@ def serialList():
|
||||
for additional in additionalPorts:
|
||||
candidates += glob.glob(additional)
|
||||
|
||||
hooks = octoprint.plugin.plugin_manager().get_hooks("octoprint.comm.transport.serial.additional_port_names")
|
||||
for name, hook in hooks.items():
|
||||
try:
|
||||
candidates += hook(candidates)
|
||||
except Exception:
|
||||
logging.getLogger(__name__).exception("Error while retrieving additional "
|
||||
"serial port names from hook {}".format(name))
|
||||
|
||||
# special treatment for virtual printer
|
||||
# TODO: Move that exclusively into the plugin
|
||||
|
||||
Reference in new issue
Block a user