Skip to content

Commit

Permalink
applet.interface.uart: default to tty operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Sep 27, 2023
1 parent e9a9801 commit 41ce97c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion software/glasgow/applet/interface/uart/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ async def run(self, device, args):

@classmethod
def add_interact_arguments(cls, parser):
p_operation = parser.add_subparsers(dest="operation", metavar="OPERATION", required=True)
p_operation = parser.add_subparsers(dest="operation", metavar="OPERATION")

p_tty = p_operation.add_parser(
"tty", help="connect UART to stdin/stdout")
Expand Down Expand Up @@ -378,6 +378,8 @@ async def forward_in():
async def interact(self, device, args, uart):
asyncio.create_task(self._monitor_errors(device))

if args.operation is None:
await self._interact_tty(uart, stream=False)
if args.operation == "tty":
await self._interact_tty(uart, args.stream)
if args.operation == "pty":
Expand Down

0 comments on commit 41ce97c

Please sign in to comment.