MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / handle_eyes

Function handle_eyes

Software/Scratch/GoPiGo3Scratch.py:795–809  ·  view source on GitHub ↗

Open/Close left/right/both eyes

(regObj)

Source from the content-addressed store, hash-verified

793
794
795def handle_eyes(regObj):
796 '''
797 Open/Close left/right/both eyes
798 '''
799 if regObj.group(EYES_OPEN_GROUP):
800 if regObj.group(EYES_RIGHT_GROUP)==None:
801 gpg.open_left_eye()
802 if regObj.group(EYES_LEFT_GROUP)==None:
803 gpg.open_right_eye()
804 if regObj.group(EYES_CLOSE_GROUP):
805 if regObj.group(EYES_RIGHT_GROUP)==None:
806 gpg.close_left_eye()
807 if regObj.group(EYES_LEFT_GROUP)==None:
808 gpg.close_right_eye()
809 return None
810
811def set_speed(regObj):
812 '''

Callers 1

handle_GoPiGo3_msgFunction · 0.85

Calls 4

open_left_eyeMethod · 0.80
open_right_eyeMethod · 0.80
close_left_eyeMethod · 0.80
close_right_eyeMethod · 0.80

Tested by

no test coverage detected