Skip to content

Commit

Permalink
console (update):
Browse files Browse the repository at this point in the history
- renamed noncanonical.py to terminalMode.py for more clarity; if needed call terminalMode.py again when console finishes.
  • Loading branch information
PedroAntunes178 committed Dec 14, 2023
1 parent 22c8f49 commit 93d4b91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions submodules/LIB/scripts/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,14 @@ def clean_exit():
tb_read.close()
os.remove("./cnsl2soc")
os.remove("./soc2cnsl")
if DC1 is None:
script_arguments = ["python3", "../../scripts/terminalMode.py"]
subprocess.run(script_arguments)
sys.exit(0)


def cleanup_before_exit(signum, frame):
print(f"{PROGNAME}: Received signal {signum}. Ending...")
print(f"\n{PROGNAME}: Received signal {signum}. Ending...")
clean_exit()


Expand Down Expand Up @@ -322,7 +325,7 @@ def main():
elif byte == DC1:
print(f"{PROGNAME}: disabling IOB-SOC exclusive identifiers")
endFileTransfer()
script_arguments = ["python3", "../../scripts/noncanonical.py"]
script_arguments = ["python3", "../../scripts/terminalMode.py"]
subprocess.run(script_arguments)
print(f"{PROGNAME}: start reading user input")
input_thread.start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
import termios

print("IOb-Non-Canonical: activating terminal non-canonical mode")
print("IOb-TerminalMode: inverting terminal canonical and echo mode")

stdin = sys.stdin
fd = stdin.fileno()
Expand Down

0 comments on commit 93d4b91

Please sign in to comment.