Skip to content

Commit

Permalink
Add Wifi setup page
Browse files Browse the repository at this point in the history
  • Loading branch information
TojikCZ committed Jan 18, 2024
1 parent aa13174 commit 5e6495b
Show file tree
Hide file tree
Showing 15 changed files with 3,310 additions and 130 deletions.
4 changes: 4 additions & 0 deletions prusa/link/printer_adapter/prusa_cam.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from ..cameras.v4l2_driver import V4L2Driver
from ..conditions import HW, use_connect_errors
from ..config import Config, Settings
from ..network_manager import NetworkComponent
from ..sdk_augmentation.printer import CameraOnly
from ..service_discovery import ServiceDiscovery
from .command_queue import CommandQueue
Expand All @@ -37,6 +38,7 @@ def __init__(self, cfg: Config, settings: Settings) -> None:
self.cfg: Config = cfg
log.info('Starting adapter for port %s', self.cfg.printer.port)
self.settings: Settings = settings
self.network_component = NetworkComponent()

use_connect_errors(self.settings.use_connect())

Expand Down Expand Up @@ -119,13 +121,15 @@ def stop(self, fast: bool = False) -> None:
self.camera_governor.stop()
self.command_queue.stop()
self.printer.indicate_stop()
self.network_component.stop()

log.debug("Stop signalled")

if not fast:
self.service_discovery.unregister()
self.printer.wait_stopped()
self.camera_governor.wait_stopped()
self.network_component.wait_stooped()

log.debug("Remaining threads, that might prevent stopping:")
for thread in enumerate_threads():
Expand Down
Loading

0 comments on commit 5e6495b

Please sign in to comment.