@@ -107,7 +107,7 @@ def config_pin(self, pin):
107107 Config pin for QEP
108108 '''
109109 result = call (["config-pin" , pin , "qep" ])
110- print "config_pin> pin={0} result={1}" .format (pin , result )
110+ print ( "config_pin> pin={0} result={1}" .format (pin , result ) )
111111 return result
112112
113113 def cat_file (self , path ):
@@ -116,7 +116,7 @@ def cat_file(self, path):
116116 Print contents of file
117117 '''
118118 result = call (["cat" , path ])
119- print "cat_file> path={0} result={1}" .format (path , result )
119+ print ( "cat_file> path={0} result={1}" .format (path , result ) )
120120 return result
121121
122122 def __init__ (self , eqep_num ):
@@ -127,10 +127,10 @@ def __init__(self, eqep_num):
127127 eqep_num can be: EQEP0, EQEP1, EQEP2 or EQEP2b based on which pins \
128128 the rotary encoder is connected to.
129129 '''
130- print ">>>>>>>> TEST CALL BEGIN"
130+ print ( ">>>>>>>> TEST CALL BEGIN" )
131131
132132 ###################################
133- print ">>>>>> eqep0: P9_27, P9_92"
133+ print ( ">>>>>> eqep0: P9_27, P9_92" )
134134 pin = "P9_27"
135135 self .config_pin (pin )
136136
@@ -141,7 +141,7 @@ def __init__(self, eqep_num):
141141 self .cat_file (path );
142142
143143 ###################################
144- print ">>>>>>> eqep1: P8.33, P8.35"
144+ print ( ">>>>>>> eqep1: P8.33, P8.35" )
145145
146146 pin = "P8.33"
147147 self .config_pin (pin )
@@ -153,7 +153,7 @@ def __init__(self, eqep_num):
153153 self .cat_file (path );
154154
155155 ###################################
156- print ">>>>>>> eqep2: P8.11, P8.12"
156+ print ( ">>>>>>> eqep2: P8.11, P8.12" )
157157
158158 pin = "P8.11"
159159 self .config_pin (pin )
@@ -165,7 +165,7 @@ def __init__(self, eqep_num):
165165 self .cat_file (path );
166166
167167 ###################################
168- print ">>>>>>> eqep2b: P8.41, P8.42"
168+ print ( ">>>>>>> eqep2b: P8.41, P8.42" )
169169
170170 pin = "P8.41"
171171 self .config_pin (pin )
@@ -177,7 +177,7 @@ def __init__(self, eqep_num):
177177 self .cat_file (path );
178178
179179 ###################################
180- print ">>>>>>>> TEST CALL END"
180+ print ( ">>>>>>>> TEST CALL END" )
181181
182182 print ("RotaryEncoder(): eqep_num: {0}" .format (eqep_num ))
183183 print ("RotaryEncoder(): self._eqep_dirs[0]: {0}" .format (self ._eqep_dirs [0 ]))
@@ -307,7 +307,7 @@ def zero(self):
307307# encoder.zero()
308308#
309309#def loop():
310- # print "encoder position : "+encoder.getPosition()
310+ # print( "encoder position : "+encoder.getPosition() )
311311# delay(1000)
312312#
313313#run(setup, loop)
0 commit comments