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 43aca73
Show file tree
Hide file tree
Showing 17 changed files with 3,312 additions and 131 deletions.
2 changes: 1 addition & 1 deletion image_builder/image_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def build_image():
run_over_ssh("sudo apt-get install -y uuid")
run_over_ssh("sudo apt-get install -y git python3-pip pigpio libcap-dev "
"libmagic1 libturbojpeg0 libatlas-base-dev libffi-dev "
"cmake iptables python3-libcamera")
"cmake iptables python3-libcamera python3-gi")

print("Installing PrusaLink")
# Caution: not tied to requirements-pi.txt
Expand Down
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 43aca73

Please sign in to comment.