mirror of
https://github.com/lowobservable/oec.git
synced 2026-04-29 05:06:05 +00:00
Extract create session from controller
This commit is contained in:
@@ -5,6 +5,7 @@ from serial import Serial
|
||||
from coax import Interface1
|
||||
|
||||
from .controller import Controller
|
||||
from .vt100 import VT100Session
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
@@ -32,7 +33,11 @@ def main():
|
||||
print(f'Interface firmware version {firmware_version}')
|
||||
|
||||
# Initialize and start the controller.
|
||||
controller = Controller(interface, [args.command, *args.command_args])
|
||||
host_command = [args.command, *args.command_args]
|
||||
|
||||
create_session = lambda terminal: VT100Session(terminal, host_command)
|
||||
|
||||
controller = Controller(interface, create_session)
|
||||
|
||||
print('Starting controller...')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user