<commit_before>import wiringpi2 as wiringpi

from GPIOPin import GPIOPin
from PinMode import PinMode

from WarningLevel import WarningLevel
from ActorController import ActorController

__author__ = '<NAME>'


class SpeakerController(ActorController):
	def __init__(self):
		self.frequenzy = 3500

	def start_warning(self, warning_level):
		if warning_level == WarningLevel.DANGEROUS_SITUATION_WARNING.value:
			wiringpi.softToneCreate(GPIOPin.PIN_SOUND.value)
			wiringpi.softToneWrite(GPIOPin.PIN_SOUND.value, self.frequenzy)<commit_msg>stop_warning method implemented in SpeakerController<commit_after>import wiringpi2 as wiringpi

from GPIOPin import GPIOPin
from PinMode import PinMode

from WarningLevel import WarningLevel
from ActorController import ActorController

__author__ = '<NAME>'


class SpeakerController(ActorController):
	def __init__(self):
		self.frequenzy = 3500
		self.stop_frequency = 0

	def start_warning(self, warning_level):
		if warning_level == WarningLevel.DANGEROUS_SITUATION_WARNING.value:
			wiringpi.softToneCreate(GPIOPin.PIN_SOUND.value)
			wiringpi.softToneWrite(GPIOPin.PIN_SOUND.value, self.frequenzy)

	def stop_warning(self):
		wiringpi.softToneCreate(GPIOPin.PIN_SOUND.value)
		wiringpi.softToneWrite(GPIOPin.PIN_SOUND.value, self.stop_frequency)
{'fraction_non_alphanumeric': 0.07059736229635376, 'fraction_numerical': 0.008533747090768037, 'mean_word_length': 6.914110429447852, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6100579', 'n_tokens_mistral': 476, 'n_tokens_neox': 428, 'n_words': 84}