Migrate ESPColor to Color (#1551)

* Migrate ESPColor to Color

* color.h constructor fix

* Updated componets to use Color
Added a using for ESPColor

* Lint fixes

* Fixed value error

* Update display components to use colorutil

* Updated to latest PR comments

* Fixed COLOR_WHITE

* Moved esp_scale to color_utils

* Rename color_utils to display_color_utils
This commit is contained in:
SenexCrenshaw
2021-03-02 09:08:57 -05:00
committed by GitHub
parent b17e0c298e
commit ac25b138f5
25 changed files with 272 additions and 369 deletions
@@ -2,6 +2,7 @@
#include "esphome/core/component.h"
#include "esphome/core/helpers.h"
#include "esphome/core/color.h"
#include "esphome/components/light/light_output.h"
#include "esphome/components/light/addressable_light.h"
@@ -73,7 +74,7 @@ class NeoPixelBusLightOutputBase : public light::AddressableLight {
// ========== INTERNAL METHODS ==========
void setup() override {
for (int i = 0; i < this->size(); i++) {
(*this)[i] = light::ESPColor(0, 0, 0, 0);
(*this)[i] = Color(0, 0, 0, 0);
}
this->effect_data_ = new uint8_t[this->size()];