Skip to content

Commit

Permalink
Update console
Browse files Browse the repository at this point in the history
  • Loading branch information
blavka committed Apr 26, 2022
1 parent ddeb4ac commit 7e8d0cb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/hardwario/chester/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,17 @@ def _(event):
)

def run(self, prog: NRFJProg, console_file):
prog.rtt_start()
channels = prog.rtt_start()

if 'Logger' not in channels:
raise Exception('Not found RTT Logger channel')

if 'Terminal' not in channels:
raise Exception('Not found RTT Terminal channel')

def task_rtt_read(channel, buffer):
while prog.rtt_is_running:
with logger.catch(message='task_rtt_read'):
with logger.catch(message='task_rtt_read', reraise=True):
try:
line = prog.rtt_read(channel)
except NRFJProgRTTNoChannels:
Expand Down

0 comments on commit 7e8d0cb

Please sign in to comment.