Blink begin

This commit is contained in:
2022-01-06 17:48:10 +01:00
parent 512be25b9e
commit 18b13fe506
2 changed files with 6 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ eDict_t Escapes[] = {
{"\u001b[0m","reset",eDict_t::CONTROL, RESET_ALL}, {"\u001b[0m","reset",eDict_t::CONTROL, RESET_ALL},
{"\u001b[1m","bold",eDict_t::CONTROL, BOLD}, {"\u001b[1m","bold",eDict_t::CONTROL, BOLD},
{"\u001b[4m","underline",eDict_t::CONTROL, UNDERLINE}, {"\u001b[4m","underline",eDict_t::CONTROL, UNDERLINE},
{"\u001b[5m","blink",eDict_t::CONTROL, BLINK},
{"\u001b[7m","reversed",eDict_t::CONTROL, REVERSED}, {"\u001b[7m","reversed",eDict_t::CONTROL, REVERSED},
{"\u001b[2J","clear",eDict_t::CONTROL, CLEAR_ALL}, {"\u001b[2J","clear",eDict_t::CONTROL, CLEAR_ALL},
{"\u001b[97;%dm","loops",eDict_t::CONTOL_WITH_PARAM, LOOPS}, {"\u001b[97;%dm","loops",eDict_t::CONTOL_WITH_PARAM, LOOPS},
@@ -92,6 +93,9 @@ bool Scroller::decodeEscape2Setting(String es)
case UNDERLINE: case UNDERLINE:
_act_setting.font.underline = true; _act_setting.font.underline = true;
break; break;
case BLINK:
_act_setting.font.blink = true;
break;
case REVERSED: case REVERSED:
_act_setting.font.reversed = true; _act_setting.font.reversed = true;
uint32_t tcolor = _act_setting.font.bcolor; uint32_t tcolor = _act_setting.font.bcolor;

View File

@@ -20,7 +20,7 @@ typedef struct {
} ; } ;
} eDict_t; } eDict_t;
enum {RESET_ALL,CLEAR_ALL, BOLD, UNDERLINE=4,REVERSED=7, SPEED, TIMEOUT, LOOPS}; enum {RESET_ALL,CLEAR_ALL, BOLD, UNDERLINE=4, BLINK=5,REVERSED=7, SPEED, TIMEOUT, LOOPS};
struct Setting struct Setting
{ {
@@ -31,6 +31,7 @@ struct Setting
bool underline; bool underline;
bool reversed; bool reversed;
bool bold; bool bold;
bool blink;
} font; } font;
struct { struct {
uint8_t loops; uint8_t loops;