<commit_before>//#include "DataInterpretor.h"
#include <ComData.h>
#include <StringEater.h>

#include <DataInterpretor.h>

#define MAX_COMMANDS 2
#define MAX_PARAM 2

void(*CommandList[MAX_COMMANDS])(const String[MAX_PARAM], const unsigned int number_params);

int registerd_commands = 0;

DataInterpretor DataManager;
//ComData test;

enum commands
{
	led_on,
	led_off
};

enum varTypes
{
	_Undefined,//0
	_String,//1
	_Int,//2
	_Uint,//3
	_Float,//4
	_Long,//5
	_Ulong,//6
	_Double,//7
	_Ldouble,//8
	_Char,//9
	_UChar,//10
	_Bool,//11
	_ComData,//12
};

void setup()
{
	Serial.begin(19200);
	Serial.write("Communication started\n");
}

void loop()
{
	GetSerialInput();
}

void GetSerialInput()
{
	if (Serial.available())
	{
		char inputbyte = (char)Serial.read();

		DataManager.addChar(inputbyte);

		if (DataManager.usableInput)
		{

			ComData params = DataManager.getComData();
			processdata(params);
		}
	}
}

void processdata(ComData &comdata)
{
	Serial.println("{found input:");

	for (unsigned int i = 0; i < MAX_PARAMS_COMDATA; i++)
	{
		String value;
<commit_msg>Arduino programma updated<commit_after>//#include "DataInterpretor.h"
#include <ComData.h>
#include <StringEater.h>

#include <DataInterpretor.h>

#define MAX_COMMANDS 2
#define MAX_PARAM 2

void(*CommandList[MAX_COMMANDS])(const String[MAX_PARAM], const unsigned int number_params);

int registerd_commands = 0;

DataInterpretor DataManager;
//ComData test;

enum commands
{
	led_on,
	led_off
};

enum varTypes
{
	_Undefined,//0
	_String,//1
	_Int,//2
	_Uint,//3
	_Float,//4
	_Long,//5
	_Ulong,//6
	_Double,//7
	_Ldouble,//8
	_Char,//9
	_UChar,//10
	_Bool,//11
	_ComData,//12
};

void setup()
{
	Serial.begin(19200);
	Serial.write("Communication started\n");
}

void loop()
{
	GetSerialInput();
}

void GetSerialInput()
{
	if (Serial.available())
	{
		char inputbyte = (char)Serial.read();

		DataManager.addChar(inputbyte);

		if (DataManager.usableInput)
		{
			ComData params = DataManager.getComData();
			processdata(params);
		}
	}
}

void processdata(ComData &comdata)
{
	Serial.println("{found input:");

	for (unsigned int i = 0; i < MAX_PARAMS_COMDATA; i++)
	{
		String value;

{'fraction_non_alphanumeric': 0.15242494226327943, 'fraction_numerical': 0.023094688221709007, 'mean_word_length': 4.282926829268293, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '6674973', 'n_tokens_mistral': 915, 'n_tokens_neox': 864, 'n_words': 168}