started working on OTA but downloading files is not functional yet
This commit is contained in:
@@ -67,17 +67,30 @@ class prgm_ledstrip
|
||||
|
||||
struct pixel
|
||||
{
|
||||
uint32_t index;
|
||||
uint8_t red;
|
||||
uint8_t green;
|
||||
uint8_t blue;
|
||||
uint32_t index;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint8_t red;
|
||||
uint8_t green;
|
||||
uint8_t blue;
|
||||
} rgb;
|
||||
struct
|
||||
{
|
||||
uint16_t hue;
|
||||
uint8_t saturation;
|
||||
uint8_t value;
|
||||
} hsv;
|
||||
};
|
||||
};
|
||||
|
||||
// Class Constructor
|
||||
prgm_ledstrip(uint32_t numberOfLEDs, uint32_t gpio);
|
||||
|
||||
// Set and clear functions only update the pixel value(s) locally but do not push the values to the strip
|
||||
FunctionStatus setPixel(struct pixel& pixel);
|
||||
FunctionStatus setPixelRGB(struct pixel& pixel);
|
||||
FunctionStatus setPixelHSV(struct pixel& pixel);
|
||||
FunctionStatus clearAll(void);
|
||||
|
||||
// Clears all pixels locally and automatically pushes the values to the strip
|
||||
|
||||
@@ -81,10 +81,10 @@ FunctionStatus ledmatrix::setPixel(uint32_t row, uint32_t column, uint8_t red, u
|
||||
{
|
||||
struct pixel p;
|
||||
p.index = index;
|
||||
p.red = red;
|
||||
p.green = green;
|
||||
p.blue = blue;
|
||||
returnValue = prgm_ledstrip::setPixel(p);
|
||||
p.rgb.red = red;
|
||||
p.rgb.green = green;
|
||||
p.rgb.blue = blue;
|
||||
returnValue = prgm_ledstrip::setPixelRGB(p);
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
|
||||
@@ -71,13 +71,29 @@ prgm_ledstrip::prgm_ledstrip(uint32_t numberOfLEDs, uint32_t gpio) : numberOfLED
|
||||
ESP_ERROR_CHECK(led_strip_new_rmt_device(&strip_config, &rmt_config, &led_strip));
|
||||
}
|
||||
|
||||
FunctionStatus prgm_ledstrip::setPixel(struct pixel& pixel)
|
||||
FunctionStatus prgm_ledstrip::setPixelRGB(struct pixel& pixel)
|
||||
{
|
||||
FunctionStatus returnValue = FUNCTION_STATUS_OK;
|
||||
|
||||
if (pixel.index < numberOfLEDs)
|
||||
{
|
||||
ESP_ERROR_CHECK(led_strip_set_pixel(led_strip, pixel.index, pixel.red, pixel.green, pixel.blue));
|
||||
ESP_ERROR_CHECK(led_strip_set_pixel(led_strip, pixel.index, pixel.rgb.red, pixel.rgb.green, pixel.rgb.blue));
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue = FUNCTION_STATUS_ERROR;
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
|
||||
FunctionStatus prgm_ledstrip::setPixelHSV(struct pixel& pixel)
|
||||
{
|
||||
FunctionStatus returnValue = FUNCTION_STATUS_OK;
|
||||
|
||||
if (pixel.index < numberOfLEDs)
|
||||
{
|
||||
ESP_ERROR_CHECK(led_strip_set_pixel_hsv(led_strip, pixel.index, pixel.hsv.hue, pixel.hsv.saturation, pixel.hsv.value));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -47,9 +47,10 @@
|
||||
// File-scope variables
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
static const char* ssid = "Kowalski";
|
||||
static const char* pass = "madagascar";
|
||||
static const char* ssid = "Skipper";
|
||||
static const char* pass = "w00t/?YeP";
|
||||
//static const char* ssid = "Kowalski";
|
||||
//static const char* pass = "madagascar";
|
||||
//static const char* ssid = "vbchaos";
|
||||
//static const char* pass = "mijninternet";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user