File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -210,4 +210,4 @@ def wait_for_new_color(self):
210210
211211 def on (self ):
212212 """Turn on the sensor and LED"""
213- self ._write ( f"port { self . port } ; plimit 1 ; set -1 \r " )
213+ self .reverse ( )
Original file line number Diff line number Diff line change @@ -199,4 +199,4 @@ def wait_for_new_color(self):
199199
200200 def on (self ):
201201 """Turn on the sensor and LED"""
202- self ._write ( f"port { self . port } ; plimit 1 ; set -1 \r " )
202+ self .reverse ( )
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ def isconnected(self):
188188
189189 def reverse (self ):
190190 """Reverse polarity"""
191- self ._write (f"port { self .port } ; plimit 1 ; set -1\r " )
191+ self ._write (f"port { self .port } ; port_plimit 1 ; set -1\r " )
192192
193193 def get (self ):
194194 """Extract information from device
@@ -253,7 +253,7 @@ def select(self):
253253
254254 def on (self ):
255255 """Turn on sensor"""
256- self ._write (f"port { self .port } ; plimit 1 ; on\r " )
256+ self ._write (f"port { self .port } ; port_plimit 1 ; on\r " )
257257
258258 def off (self ):
259259 """Turn off sensor"""
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ def plimit(self, plimit):
7171 """
7272 if not (plimit >= 0 and plimit <= 1 ):
7373 raise MotorError ("plimit should be 0 to 1" )
74- self ._write (f"port { self .port } ; plimit { plimit } \r " )
74+ self ._write (f"port { self .port } ; port_plimit { plimit } \r " )
7575
7676 def bias (self , bias ):
7777 """Bias motor
@@ -413,7 +413,7 @@ def plimit(self, plimit):
413413 """
414414 if not (plimit >= 0 and plimit <= 1 ):
415415 raise MotorError ("plimit should be 0 to 1" )
416- self ._write (f"port { self .port } ; plimit { plimit } \r " )
416+ self ._write (f"port { self .port } ; port_plimit { plimit } \r " )
417417
418418 def bias (self , bias ):
419419 """Bias motor
You can’t perform that action at this time.
0 commit comments