File tree 4 files changed +6
-6
lines changed 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):
210
210
211
211
def on (self ):
212
212
"""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):
199
199
200
200
def on (self ):
201
201
"""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):
188
188
189
189
def reverse (self ):
190
190
"""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 " )
192
192
193
193
def get (self ):
194
194
"""Extract information from device
@@ -253,7 +253,7 @@ def select(self):
253
253
254
254
def on (self ):
255
255
"""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 " )
257
257
258
258
def off (self ):
259
259
"""Turn off sensor"""
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ def plimit(self, plimit):
71
71
"""
72
72
if not (plimit >= 0 and plimit <= 1 ):
73
73
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 " )
75
75
76
76
def bias (self , bias ):
77
77
"""Bias motor
@@ -413,7 +413,7 @@ def plimit(self, plimit):
413
413
"""
414
414
if not (plimit >= 0 and plimit <= 1 ):
415
415
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 " )
417
417
418
418
def bias (self , bias ):
419
419
"""Bias motor
You can’t perform that action at this time.
0 commit comments