3a7d4a72b0e0aec439c2c27368e4be500c241d1c,Software/Scratch/GoPiGo3Scratch.py,,handle_buzzer,#Any#,535
Before Change
sensors = {}
port = "AD2" if regObj.group(SENSOR_BUZZER_PORT2_GROUP) else "AD1"
if known_sensors[port] == None or \
isinstance(known_sensors[port], easy.Buzzer) is False:
known_sensors[port] = easy.Buzzer(port,gpg)
try:
power = float(regObj.group(SENSOR_BUZZER_POWER_GROUP))
except:
power = 100 if regObj.group(SENSOR_BUZZER_POWER_GROUP)=="on" else 0
known_sensors[port].sound(power)
return {"{}: Buzzer".format(port):power}
After Change
except:
power = 100 if regObj.group(SENSOR_BUZZER_POWER_GROUP)=="on" else 0
Buzzer = get_sensor_instance(port, easy.Buzzer)
if Buzzer:
Buzzer.sound(power)
return {"{}: Buzzer".format(port):power}
def handle_distance(regObj):
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 17
Instances
Project Name: DexterInd/GoPiGo3
Commit Name: 3a7d4a72b0e0aec439c2c27368e4be500c241d1c
Time: 2017-06-19
Author: cleoqc1124@gmail.com
File Name: Software/Scratch/GoPiGo3Scratch.py
Class Name:
Method Name: handle_buzzer
Project Name: DexterInd/GoPiGo3
Commit Name: 3a7d4a72b0e0aec439c2c27368e4be500c241d1c
Time: 2017-06-19
Author: cleoqc1124@gmail.com
File Name: Software/Scratch/GoPiGo3Scratch.py
Class Name:
Method Name: handle_led
Project Name: DexterInd/GoPiGo3
Commit Name: 676cc5c95a9d4643aafdb5f0854815154037ea4f
Time: 2017-06-17
Author: cleoqc1124@gmail.com
File Name: Software/Scratch/GoPiGo3Scratch.py
Class Name:
Method Name: handle_light
Project Name: DexterInd/GoPiGo3
Commit Name: 3a7d4a72b0e0aec439c2c27368e4be500c241d1c
Time: 2017-06-19
Author: cleoqc1124@gmail.com
File Name: Software/Scratch/GoPiGo3Scratch.py
Class Name:
Method Name: handle_light
Project Name: DexterInd/GoPiGo3
Commit Name: 676cc5c95a9d4643aafdb5f0854815154037ea4f
Time: 2017-06-17
Author: cleoqc1124@gmail.com
File Name: Software/Scratch/GoPiGo3Scratch.py
Class Name:
Method Name: handle_buzzer