add tools for serial stress

This commit is contained in:
Luc
2024-09-08 17:53:11 +08:00
parent 4b01d89095
commit ea07b30b04
2 changed files with 49 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ def main():
for port, desc, hwid in sorted(ports):
print(common.bcolors.COL_GREEN+" - {}: {} ".format(port, desc)+common.bcolors.END_COL)
desc.capitalize()
if (desc.find("SERIAL") != -1):
if (desc.find("SERIAL") != -1 or desc.find("UART") != -1):
portTFT = port
print(common.bcolors.COL_GREEN +
"Found " + portTFT + " for ESP3D"+common.bcolors.END_COL)
@@ -41,7 +41,7 @@ def main():
if (portTFT == ""):
print(common.bcolors.COL_RED+"No serial port found"+common.bcolors.END_COL)
exit(0)
ser = serial.Serial(portTFT, 115200)
ser = serial.Serial(portTFT, 1000000)
print(common.bcolors.COL_GREEN+"Now Simulating: " + fw_name + common.bcolors.END_COL)
starttime = common.current_milli_time()
# loop forever, just unplug the port to stop the program or do ctrl-c