Skip to content

Commit a6cd74d

Browse files
comment on the exception for grey
1 parent 3b2977d commit a6cd74d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

PicoAutonomousRobotics.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ def setLFLightValue(self,lightThreshold):
217217

218218
#this returns True when sensor is over light and FALSE over Dark.
219219
#Light/Dark is determined by the thresholds.
220+
# This code will throw an exception if the value returned is in the 'gery' area.
221+
#This can happen is you sample half on /off a line for instance.
222+
#Setting the thresholds to the same value will negate this functionality
220223
def isLFSensorLight(self,whichSensor):
221224
if(whichSensor == "c"):
222225
sensorVal = self.CentreLF.read_u16()

0 commit comments

Comments
 (0)