File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 1717mc : MyCobot
1818sp : int = 80
1919
20-
2120def setup ():
2221 global port , mc
2322
@@ -31,6 +30,17 @@ def setup():
3130 if _in == "1" :
3231 robot_model = MyCobot
3332 print ("MyCobot\n " )
33+ print ("Please enter the model type:" )
34+ print ("1. Pi" )
35+ print ("2. Jetson Nano" )
36+ print ("Default is Pi" )
37+ model_type = input ()
38+
39+ if model_type == "2" :
40+ port = "/dev/ttyTHS1"
41+ else :
42+ pass
43+
3444 elif _in == "2" :
3545 robot_model = MechArm
3646 print ("MechArm\n " )
@@ -48,10 +58,11 @@ def setup():
4858 print ("{} : {}" .format (idx , port ))
4959 idx += 1
5060
51- _in = input ("\n Please input 1 - {} to choice:" .format (idx - 1 ))
52- port = str (plist [int (_in ) - 1 ]).split (" - " )[0 ].strip ()
53- print (port )
54- print ("" )
61+ if port is None :
62+ _in = input ("\n Please input 1 - {} to choice:" .format (idx - 1 ))
63+ port = str (plist [int (_in ) - 1 ]).split (" - " )[0 ].strip ()
64+ print (port )
65+ print ("" )
5566
5667 baud = 1000000
5768 _baud = input ("Please input baud(default:1000000):" )
You can’t perform that action at this time.
0 commit comments