<commit_before>#ifndef _EFFECT_H
#define _EFFECT_H

#include "Tlc5940.h"
#include "Output.h"

class EffectParams {
public:
	EffectParams(){};
	union {
		struct {
			uint16_t attack = 0;
			uint16_t decay = 40;
			uint16_t triggerLevel = 100;	
			uint16_t triggerHoldOff = 0;	
		} asStruct;
		uint16_t asArray[3];
	};
};

class Effect{
public:
	Effect();
	virtual ~Effect();
	virtual void run(uint16_t newLevel, Output *output);

	uint8_t id;
	EffectParams params;

protected:
	uint16_t curLevel = 0;
	uint32_t lastBlink;
	uint8_t isNotTriggerHoldOff();
};

class VUMeterEffect : public Effect {
public:
	VUMeterEffect();
	void run(uint16_t newLevel, Output *output);
};

class FlashEffect : public Effect {
public:
	FlashEffect();
	void run(uint16_t newLevel, Output *output);
};

class RandomBlinkEffect : public Effect {
public:
	RandomBlinkEffect();
	void run(uint16_t newLevel, Output *output);
private:
	uint16_t levels[6];	
};

class ChaseEffect : public Effect {
public:
	ChaseEffect();
	void run(uint16_t newLevel, Output *output);
private:
	uint16_t levels[6];		
	uint8_t flags[6];		
};
#endif<commit_msg>Move level and flag arrays to base class<commit_after>#ifndef _EFFECT_H
#define _EFFECT_H

#include "Tlc5940.h"
#include "Output.h"

class EffectParams {
public:
	EffectParams(){};
	union {
		struct {
			uint16_t attack = 0;
			uint16_t decay = 40;
			uint16_t triggerLevel = 100;	
			uint16_t triggerHoldOff = 0;	
		} asStruct;
		uint16_t asArray[3];
	};
};

class Effect{
public:
	Effect();
	virtual ~Effect();
	virtual void run(uint16_t newLevel, Output *output);

	uint8_t id;
	EffectParams params;

protected:
	uint16_t levels[16];		
	uint8_t flags[16];		

	uint16_t curLevel = 0;
	uint32_t lastBlink;
	uint8_t isNotTriggerHoldOff();
};

class VUMeterEffect : public Effect {
public:
	VUMeterEffect();
	void run(uint16_t newLevel, Output *output);
};

class FlashEffect : public Effect {
public:
	FlashEffect();
	void run(uint16_t newLevel, Output *output);
};

class RandomBlinkEffect : public Effect {
public:
	RandomBlinkEffect();
	void run(uint16_t newLevel, Output *output);
private:
};

class ChaseEffect : public Effect {
public:
	ChaseEffect();
	void run(uint16_t newLevel, Output *output);
private:
};
#endif
{'fraction_non_alphanumeric': 0.1131484794275492, 'fraction_numerical': 0.04159212880143113, 'mean_word_length': 4.902374670184696, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4700056', 'n_tokens_mistral': 905, 'n_tokens_neox': 824, 'n_words': 216}