Skip to content

Commit

Permalink
Merge branch '2024.12.0' of https://github.com/lubeda/EspHoMaTriXv2 i…
Browse files Browse the repository at this point in the history
…nto 2024.12.0
  • Loading branch information
lubeda committed Dec 11, 2024
2 parents 6005e02 + e11dd39 commit 07e9dd1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
13 changes: 1 addition & 12 deletions components/ehmtxv2/EHMTX.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#ifndef EHMTX_H
#define EHMTX_H
#include "esphome.h"
#ifdef EHMTXv2_MULTICOLOR_TEXT
#include <array>
#endif
#define USE_Fireplugin
#include "esphome/components/time/real_time_clock.h"

Expand Down Expand Up @@ -38,7 +35,7 @@ const uint8_t TEXTSCROLLSTART = 8;
const uint8_t TEXTSTARTOFFSET = (32 - 8);

const uint16_t POLLINGINTERVAL = 250;
static const char *const EHMTX_VERSION = "2024.11.0";
static const char *const EHMTX_VERSION = "2024.12.1";
static const char *const TAG = "EHMTXv2";

enum show_mode : uint8_t
Expand Down Expand Up @@ -365,10 +362,6 @@ namespace esphome
PROGMEM Color text_color, progressbar_color, progressbar_back_color;
PROGMEM std::string text;
PROGMEM std::string icon_name;
#ifdef EHMTXv2_MULTICOLOR_TEXT
PROGMEM std::array<Color, 96> charcolors;

#endif
#endif
#ifdef USE_ESP8266
Color text_color, progressbar_color, progressbar_back_color;
Expand All @@ -381,10 +374,6 @@ namespace esphome
Color heatColor(uint8_t temperature);
void status();

#ifdef EHMTXv2_MULTICOLOR_TEXT
void multicolor(std::string text,Color c);
#endif

void draw();
bool isfree();
bool update_slot(uint8_t _icon);
Expand Down
15 changes: 0 additions & 15 deletions components/ehmtxv2/EHMTX_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,26 +85,11 @@ namespace esphome
this->sbitmap = nullptr;
#ifdef EHMTXv2_ADV_BITMAP
this->bitmap = nullptr;
#endif
#ifdef EHMTXv2_MULTICOLOR_TEXT
this->charcolors = {};
#endif
this->progressbar_color = esphome::display::COLOR_OFF;
this->progressbar_back_color = esphome::display::COLOR_OFF;
}

#ifdef EHMTXv2_MULTICOLOR_TEXT
void EHMTX_queue::multicolor(std::string _text,Color c)
{
std::regex color_re("(#[A-Fa-f0-9]{6})");
this->text = std::regex_replace(_text, color_re, "");

for (std::string::size_type i = 0; i < _text.size(); ++i) {
this->charcolors[i] = c;
}
}
#endif

void EHMTX_queue::status()
{
switch (this->mode)
Expand Down
1 change: 1 addition & 0 deletions tests/ulanzi-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,4 @@ ehmtxv2:
animation:
- id: animation_black
file: 1pixel.gif

0 comments on commit 07e9dd1

Please sign in to comment.