
//#include <Arduino.h>
//#include "Adafruit_NeoPixel.h"
#include <FastLED.h>

typedef struct hue_color
{
uint8_t hue;
uint8_t sat;
uint8_t bright;
} hue_color;

#define FASTLEDDLY 2

class elements
{
private:
    /* data */
    #define BRIGHTNESS 128
    #define SATURATION 255
public:

    uint16_t element_first_pixel, element_last_pixel;
    uint8_t element_number_pixels, elements_fraction;
    hue_color elements_huecolor;

    bool element_outside2inside = false;
    CRGB *element_pixels;

    void init(CRGB *pixels, unsigned int first_led, unsigned int number_leds, hue_color huecolor, bool outside2inside = false);
    void test(uint8_t huecolor, uint8_t saturation = SATURATION, uint8_t brightness = BRIGHTNESS, bool all_at_once = false);
    void test(hue_color huecolor, bool all_at_once = false);
    void test( bool all_at_once = false);
    void fill(uint8_t huecolor, uint8_t saturation = SATURATION, uint8_t brightness = BRIGHTNESS);
    void fill(hue_color  huecolor);
    void fill(void);
    void clean(void);
    void ffill(unsigned int fraction, uint8_t huecolor,  uint8_t saturation = SATURATION, uint8_t brightness = BRIGHTNESS);
    void ffill(unsigned int fraction, hue_color huecolor);
    void ffill(unsigned int fraction);
};


