summaryrefslogtreecommitdiff
path: root/kvmd/kvmd/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/kvmd/__init__.py')
-rw-r--r--kvmd/kvmd/__init__.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/kvmd/kvmd/__init__.py b/kvmd/kvmd/__init__.py
index ed8ce8da..8b950212 100644
--- a/kvmd/kvmd/__init__.py
+++ b/kvmd/kvmd/__init__.py
@@ -3,9 +3,10 @@ import asyncio
from .application import init
from .logging import get_logger
+from .ps2 import Ps2Keyboard
from .atx import Atx
+from .msd import MassStorageDevice
from .streamer import Streamer
-from .ps2 import Ps2Keyboard
from .server import Server
from . import gpio
@@ -17,6 +18,12 @@ def main() -> None:
with gpio.bcm():
loop = asyncio.get_event_loop()
+ keyboard = Ps2Keyboard(
+ clock=int(config["keyboard"]["pinout"]["clock"]),
+ data=int(config["keyboard"]["pinout"]["data"]),
+ pulse=float(config["keyboard"]["pulse"]),
+ )
+
atx = Atx(
power_led=int(config["atx"]["leds"]["pinout"]["power"]),
hdd_led=int(config["atx"]["leds"]["pinout"]["hdd"]),
@@ -26,6 +33,12 @@ def main() -> None:
long_click_delay=float(config["atx"]["switches"]["long_click_delay"]),
)
+ msd = MassStorageDevice(
+ bind=str(config["msd"]["bind"]),
+ init_delay=float(config["msd"]["init_delay"]),
+ loop=loop,
+ )
+
streamer = Streamer(
cap_power=int(config["video"]["pinout"]["cap"]),
conv_power=int(config["video"]["pinout"]["conv"]),
@@ -34,19 +47,15 @@ def main() -> None:
loop=loop,
)
- keyboard = Ps2Keyboard(
- clock=int(config["keyboard"]["pinout"]["clock"]),
- data=int(config["keyboard"]["pinout"]["data"]),
- pulse=float(config["keyboard"]["pulse"]),
- )
-
Server(
+ keyboard=keyboard,
atx=atx,
+ msd=msd,
streamer=streamer,
- keyboard=keyboard,
heartbeat=float(config["server"]["heartbeat"]),
atx_leds_poll=float(config["atx"]["leds"]["poll"]),
video_shutdown_delay=float(config["video"]["shutdown_delay"]),
+ msd_chunk_size=int(config["msd"]["chunk_size"]),
loop=loop,
).run(
host=str(config["server"]["host"]),