def getGoal(self, image, headinfo): #now = time.time() # Filter the snapshots and return the angle and the color (_, head) = headinfo goalLoc = None yellow = goal.run(image, head[1], 'yellow') if yellow: goalLoc = ('Yellow', yellow) else: blue = goal.run(image, head[1], 'blue') if blue: goalLoc = ('Blue',blue) return goalLoc
def getGoal(image, headinfo): # now = time.time() # Filter the snapshots and return the angle and the color (_, head) = headinfo goalLoc = None yellow = goal.run(image, head[1], "yellow") if yellow: goalLoc = ("Yellow", yellow) else: blue = goal.run(image, head[1], "blue") if blue: goalLoc = ("Blue", blue) return goalLoc
def getGoal(self, image, headinfo): #now = time.time() # Filter the snapshots and return the angle and the color (_, head) = headinfo goalLoc = None yellow = goal.run(image, head[1], 'yellow') if yellow: goalLoc = ('Yellow', yellow) else: blue = goal.run(image, head[1], 'blue') if blue: goalLoc = ('Blue', blue) return goalLoc
def getGoal(self, image, headinfo): #now = time.time() # Filter the snapshots and return the angle and the color (_, head) = headinfo goalLoc = None yellow = goal.run(image, head[1], 'yellow') if yellow: goalLoc = ('Yellow', yellow) # yellow goal , anyone got a better value? self.ledProxy.fadeRGB('LeftFaceLeds',0x00ff3000, 0) else: blue = goal.run(image, head[1], 'blue') if blue: goalLoc = ('Blue',blue) # blue LeftFaceLed self.ledProxy.fadeRGB('LeftFaceLeds', 0xffffff, 0) return goalLoc