Skip to content

Commit

Permalink
fix(api): encode unknown gcode inputs in tc control script (#15285)
Browse files Browse the repository at this point in the history
  • Loading branch information
caila-marashaj authored May 29, 2024
1 parent 41f6945 commit 7de5e83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/src/opentrons/hardware_control/scripts/tc_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
_MOVE_LID: "M240.D", # move lid stepper motor
"ol": "M126", # open lid
"cl": "M127", # close lid
"sw": "M901.D", # status of all switches
"lt": "M141.D", # get lid temperature
"pt": "M105.D", # get plate temperature
}


Expand Down Expand Up @@ -68,7 +71,7 @@ async def comms_loop(dev: Serial) -> bool:
await handle_gcode_shortcut(dev, command)
else:
try:
dev.write(f"{command}\n")
dev.write(f"{command}\n".encode())
print(await message_return(dev))
except TypeError:
print("Invalid input.")
Expand Down

0 comments on commit 7de5e83

Please sign in to comment.