<commit_before>/**
 * Project TO52
 */


#include "Ring.h"

/**
 * Ring implementation
 */

mutex mtx;
bool running;

void ringPlay(){
	mtx.lock();
	while(running == true)
	{
		mtx.unlock();

		digitalWrite (0, HIGH);
		delayMicroseconds (500);
		digitalWrite (0,  LOW);
		delayMicroseconds (500);
	}
}


Ring::Ring(){
	wiringPiSetup();
	pinMode(0, OUTPUT);
	this->running = false;
}

void Ring::play() {
	cout << "Ringing" << endl;

	mtx.lock();

	if(running != true){
		running = true;

		mtx.unlock();

		this->t = new thread(ringPlay);
	}
}

void Ring::stop(){
	mtx.lock();
	running = false;
	mtx.unlock();
}
<commit_msg>supress this<commit_after>/**
 * Project TO52
 */


#include "Ring.h"

/**
 * Ring implementation
 */

mutex mtx;
bool running;

void ringPlay(){
	mtx.lock();
	while(running == true)
	{
		mtx.unlock();

		digitalWrite (0, HIGH);
		delayMicroseconds (500);
		digitalWrite (0,  LOW);
		delayMicroseconds (500);
	}
}


Ring::Ring(){
	wiringPiSetup();
	pinMode(0, OUTPUT);
	running = false;
}

void Ring::play() {
	cout << "Ringing" << endl;

	mtx.lock();

	if(running != true){
		running = true;

		mtx.unlock();

		this->t = new thread(ringPlay);
	}
}

void Ring::stop(){
	mtx.lock();
	running = false;
	mtx.unlock();
}

{'fraction_non_alphanumeric': 0.19308125502815768, 'fraction_numerical': 0.017699115044247787, 'mean_word_length': 3.5567765567765566, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 6, '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': '7077019', 'n_tokens_mistral': 543, 'n_tokens_neox': 486, 'n_words': 107}