blob: 6a93cbd045f24c3e737b85a157ff54ab153ce171 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
from . import menu
import os
import logging
import pygame
from .serial import Serial
def main() -> int:
logger = logging.getLogger(__name__)
pygame.init()
serial = Serial(os.getenv("SERIAL_DEVICE", "/dev/null"), 115200)
INSTANCE = os.getenv("INSTANCE", "Unknown")
pygame.display.set_caption(f"SplitScreen Duo Menu ({INSTANCE})")
logging.basicConfig(
level=(logging.DEBUG if os.getenv("DEVELOPMENT", "").lower() else logging.INFO)
)
print("The Dual Screen Console")
logger.info(f"Running as {os.getenv("INSTANCE", "unknown")}")
menu.main_loop(serial, INSTANCE)
return 0
|