Boot logo.
This commit is contained in:
parent
8b10ec93c2
commit
002b2d0134
@ -23,7 +23,7 @@ const uint8_t u8x8_WLED_logo_4x12[388] U8X8_FONT_SECTION("u8x8_WLED_logo_4x12")
|
|||||||
"\0\0\377\377\0\77\77\0\0\0\5\7\2\7\5\0\0\0\377\77\300\377\301\376\376\0\0\0\0\0\0\0"
|
"\0\0\377\377\0\77\77\0\0\0\5\7\2\7\5\0\0\0\377\77\300\377\301\376\376\0\0\0\0\0\0\0"
|
||||||
"\0\0\0";
|
"\0\0\0";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Fontname: WLED_logo
|
Fontname: WLED_logo
|
||||||
Copyright:
|
Copyright:
|
||||||
Glyphs: 3/3
|
Glyphs: 3/3
|
||||||
|
@ -137,9 +137,6 @@ class FourLineDisplayUsermod : public Usermod {
|
|||||||
bool showSeconds = true; // display clock with seconds
|
bool showSeconds = true; // display clock with seconds
|
||||||
bool enabled = true;
|
bool enabled = true;
|
||||||
|
|
||||||
// needRedraw marks if redraw is required to prevent often redrawing.
|
|
||||||
//bool needRedraw = true;
|
|
||||||
|
|
||||||
// Next variables hold the previous known values to determine if redraw is
|
// Next variables hold the previous known values to determine if redraw is
|
||||||
// required.
|
// required.
|
||||||
String knownSsid = "";
|
String knownSsid = "";
|
||||||
@ -261,7 +258,7 @@ class FourLineDisplayUsermod : public Usermod {
|
|||||||
setContrast(contrast); //Contrast setup will help to preserve OLED lifetime. In case OLED need to be brighter increase number up to 255
|
setContrast(contrast); //Contrast setup will help to preserve OLED lifetime. In case OLED need to be brighter increase number up to 255
|
||||||
setPowerSave(0);
|
setPowerSave(0);
|
||||||
//drawString(0, 0, "Loading...");
|
//drawString(0, 0, "Loading...");
|
||||||
overlayLogo(PSTR("Loading..."),3000,1);
|
overlayLogo(3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// gets called every time WiFi is (re-)connected. Initialize own network
|
// gets called every time WiFi is (re-)connected. Initialize own network
|
||||||
@ -505,8 +502,8 @@ class FourLineDisplayUsermod : public Usermod {
|
|||||||
* pass line and colum info
|
* pass line and colum info
|
||||||
*/
|
*/
|
||||||
void setMarkLine(byte newMarkLineNum, byte newMarkColNum) {
|
void setMarkLine(byte newMarkLineNum, byte newMarkColNum) {
|
||||||
markLineNum = newMarkLineNum;
|
markLineNum = newMarkLineNum;
|
||||||
markColNum = newMarkColNum;
|
markColNum = newMarkColNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Draw the arrow for the current setting beiong changed
|
//Draw the arrow for the current setting beiong changed
|
||||||
@ -598,8 +595,8 @@ class FourLineDisplayUsermod : public Usermod {
|
|||||||
if (!wakeDisplay()) clear();
|
if (!wakeDisplay()) clear();
|
||||||
// Print the overlay
|
// Print the overlay
|
||||||
if (glyphType>0 && glyphType<255) {
|
if (glyphType>0 && glyphType<255) {
|
||||||
if (lineHeight == 2) drawGlyph(5, 0, glyphType, u8x8_4LineDisplay_WLED_icons_6x6, true);
|
if (lineHeight == 2) drawGlyph(5, 0, glyphType, u8x8_4LineDisplay_WLED_icons_6x6, true);
|
||||||
else drawGlyph(7, lineHeight, glyphType, u8x8_4LineDisplay_WLED_icons_2x2, true);
|
else drawGlyph(7, lineHeight, glyphType, u8x8_4LineDisplay_WLED_icons_2x2, true);
|
||||||
}
|
}
|
||||||
if (line1) {
|
if (line1) {
|
||||||
String buf = line1;
|
String buf = line1;
|
||||||
@ -608,26 +605,21 @@ class FourLineDisplayUsermod : public Usermod {
|
|||||||
}
|
}
|
||||||
overlayUntil = millis() + showHowLong;
|
overlayUntil = millis() + showHowLong;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Allows you to show one line and a glyph as overlay for a period of time.
|
/**
|
||||||
|
* Allows you to show Akemi WLED logo overlay for a period of time.
|
||||||
* Clears the screen and prints.
|
* Clears the screen and prints.
|
||||||
* Used in Rotary Encoder usermod.
|
|
||||||
*/
|
*/
|
||||||
void overlayLogo(const char* line1, long showHowLong, byte glyphType) {
|
void overlayLogo(long showHowLong) {
|
||||||
// Turn the display back on
|
// Turn the display back on
|
||||||
if (!wakeDisplay()) clear();
|
if (!wakeDisplay()) clear();
|
||||||
// Print the overlay
|
// Print the overlay
|
||||||
if (glyphType>0 && glyphType<255) {
|
if (lineHeight == 2) {
|
||||||
if (lineHeight == 2){ drawGlyph(2, 1, 1, u8x8_WLED_logo_4x4, true);
|
drawGlyph( 2, 1, 1, u8x8_WLED_logo_4x4, true);
|
||||||
drawGlyph(6, 1, 2, u8x8_WLED_logo_4x4, true);
|
drawGlyph( 6, 1, 2, u8x8_WLED_logo_4x4, true);
|
||||||
drawGlyph(10, 1, 3, u8x8_WLED_logo_4x4, true);
|
drawGlyph(10, 1, 3, u8x8_WLED_logo_4x4, true);
|
||||||
}else drawGlyph(7, lineHeight, glyphType, u8x8_4LineDisplay_WLED_icons_2x2, true);
|
} else
|
||||||
}
|
drawGlyph( 2, 0, 1, u8x8_WLED_logo_4x12);
|
||||||
if (line1) {
|
|
||||||
String buf = line1;
|
|
||||||
center(buf, getCols());
|
|
||||||
drawString(0, (glyphType<255?3:0)*lineHeight, buf.c_str());
|
|
||||||
}
|
|
||||||
overlayUntil = millis() + showHowLong;
|
overlayUntil = millis() + showHowLong;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,15 +361,15 @@ public:
|
|||||||
bool changedState = true;
|
bool changedState = true;
|
||||||
if (newState > LAST_UI_STATE || (newState == 7 && presetHigh==0 && presetLow == 0)) newState = 0;
|
if (newState > LAST_UI_STATE || (newState == 7 && presetHigh==0 && presetLow == 0)) newState = 0;
|
||||||
if (display != nullptr) {
|
if (display != nullptr) {
|
||||||
switch(newState) {
|
switch (newState) {
|
||||||
case 0: changedState = changeState(PSTR("Brightness"), 1, 0, 1); break; //1 = sun
|
case 0: changedState = changeState(PSTR("Brightness"), 1, 0, 1); break; //1 = sun
|
||||||
case 1: changedState = changeState(PSTR("Speed"), 1, 4, 2); break; //2 = skip forward
|
case 1: changedState = changeState(PSTR("Speed"), 1, 4, 2); break; //2 = skip forward
|
||||||
case 2: changedState = changeState(PSTR("Intensity"), 1, 8, 3); break; //3 = fire
|
case 2: changedState = changeState(PSTR("Intensity"), 1, 8, 3); break; //3 = fire
|
||||||
case 3: changedState = changeState(PSTR("Color Palette"), 2, 0, 4); break; //4 = custom palette
|
case 3: changedState = changeState(PSTR("Color Palette"), 2, 0, 4); break; //4 = custom palette
|
||||||
case 4: changedState = changeState(PSTR("Effect"), 3, 0, 5); break; //5 = puzzle piece
|
case 4: changedState = changeState(PSTR("Effect"), 3, 0, 5); break; //5 = puzzle piece
|
||||||
case 5: changedState = changeState(PSTR("Main Color"), 255, 255, 7); break; //7 = brush
|
case 5: changedState = changeState(PSTR("Main Color"), 255, 255, 7); break; //7 = brush
|
||||||
case 6: changedState = changeState(PSTR("Saturation"), 255, 255, 8); break; //8 = contrast
|
case 6: changedState = changeState(PSTR("Saturation"), 255, 255, 8); break; //8 = contrast
|
||||||
case 7: changedState = changeState(PSTR("Preset"), 255, 255, 6); break; //6 = moon
|
case 7: changedState = changeState(PSTR("Preset"), 255, 255, 11); break; //11 = heart
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (changedState) select_state = newState;
|
if (changedState) select_state = newState;
|
||||||
|
Loading…
Reference in New Issue
Block a user