Skip to content

Commit

Permalink
Release of v0.6.2
Browse files Browse the repository at this point in the history
Added /easter joke subpage
Added Easter (6) effect
Merged Single and Multi Dynamic (7) effects
Added Easter theme
Added North Korea timezone
  • Loading branch information
Aircoookie committed Mar 31, 2018
1 parent ba04aa7 commit 72223c7
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 62 deletions.
52 changes: 31 additions & 21 deletions wled00/WS2812FX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,31 +322,35 @@ void WS2812FX::mode_random_color(void) {


/*
* Lights every LED in a random color. Changes one random LED after the other
* to another random color.
* Lights some pastel colors
*/
void WS2812FX::mode_single_dynamic(void) {
if(_counter_mode_call == 0) {
for(uint16_t i=0; i < _led_count; i++) {
if (!_locked[i])
setPixelColor(i, color_wheel(random(256)));
}
}
int ran = random(_led_count);
if (!_locked[ran])
setPixelColor(ran, color_wheel(random(256)));
show();
_mode_delay = 10 + ((5000 * (uint32_t)(SPEED_MAX - _speed)) / SPEED_MAX);
void WS2812FX::mode_easter(void) {
//uint32_t cols[]{0x00F7ECC5,0x00F8D5C7,0x00F9E2E7,0x00BED9D4,0x00F7ECC5,0x00F8D5C7,0x00F9E2E7};
uint32_t cols[]{0x00FF8040,0x00E5D241,0x0077FF77,0x0077F0F0,0x00FF8040,0x00E5D241,0x0077FF77};
mode_colorful_internal(cols);
}


/*
* Lights multiple random leds in a random color (higher intensity, more updates)
*/
void WS2812FX::mode_multi_dynamic(void) {
for(uint16_t i=0; i < _led_count; i++) {
if (!_locked[i] && random(256)<=_intensity)
setPixelColor(i, color_wheel(random(256)));
void WS2812FX::mode_dynamic(void) {
if(_counter_mode_call == 0) {
for(uint16_t i=0; i < _led_count; i++) {
if (!_locked[i])
setPixelColor(i, color_wheel(random(256)));
}
}
if (_intensity > 0) //multi dynamic
{
for(uint16_t i=0; i < _led_count; i++) {
if (!_locked[i] && random(256)<_intensity)
setPixelColor(i, color_wheel(random(256)));
}
} else { //single dynamic
int ran = random(_led_count);
if (!_locked[ran])
setPixelColor(ran, color_wheel(random(256)));
}
show();
_mode_delay = 100 + ((5000 * (uint32_t)(SPEED_MAX - _speed)) / SPEED_MAX);
Expand Down Expand Up @@ -1024,14 +1028,20 @@ void WS2812FX::mode_chase_rainbow_white(void) {
_mode_delay = 10 + ((30 * (uint32_t)(SPEED_MAX - _speed)) / _led_count);
}


/*
* Red - Amber - Green - Blue lights running
*/
void WS2812FX::mode_colorful(void) {
uint32_t cols[]{0x00FF0000,0x00EEBB00,0x0000EE00,0x000077CC,0x00FF0000,0x00EEBB00,0x0000EE00};
mode_colorful_internal(cols);
}

/*
* Common function for 4-color-running (Colorful, easter)
*/
void WS2812FX::mode_colorful_internal(uint32_t cols[]) {
int i = 0;
for (i; i < _led_count-3 ; i+=4)
for (i; i < _led_count ; i+=4)
{
if(!_locked[i])setPixelColor(i, cols[_counter_mode_step]);
if(!_locked[i+1])setPixelColor(i+1, cols[_counter_mode_step+1]);
Expand All @@ -1057,7 +1067,7 @@ void WS2812FX::mode_colorful(void) {
show();
if (_speed > SPEED_MIN) _counter_mode_step++; //static if lowest speed
if (_counter_mode_step >3) _counter_mode_step = 0;
_mode_delay = 100 + (25 * (uint32_t)(SPEED_MAX - _speed));
_mode_delay = 50 + (15 * (uint32_t)(SPEED_MAX - _speed));
}


Expand Down
13 changes: 7 additions & 6 deletions wled00/WS2812FX.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
#define FX_MODE_COLOR_WIPE 3
#define FX_MODE_COLOR_WIPE_RANDOM 4
#define FX_MODE_RANDOM_COLOR 5
#define FX_MODE_SINGLE_DYNAMIC 6
#define FX_MODE_MULTI_DYNAMIC 7
#define FX_MODE_EASTER 6
#define FX_MODE_DYNAMIC 7
#define FX_MODE_RAINBOW 8
#define FX_MODE_RAINBOW_CYCLE 9
#define FX_MODE_SCAN 10
Expand Down Expand Up @@ -143,8 +143,8 @@ class WS2812FX : public NeoPixelBrightnessBus<PIXELFEATURE, PIXELMETHOD> {
_mode[FX_MODE_COLOR_WIPE] = &WS2812FX::mode_color_wipe;
_mode[FX_MODE_COLOR_WIPE_RANDOM] = &WS2812FX::mode_color_wipe_random;
_mode[FX_MODE_RANDOM_COLOR] = &WS2812FX::mode_random_color;
_mode[FX_MODE_SINGLE_DYNAMIC] = &WS2812FX::mode_single_dynamic;
_mode[FX_MODE_MULTI_DYNAMIC] = &WS2812FX::mode_multi_dynamic;
_mode[FX_MODE_EASTER] = &WS2812FX::mode_easter;
_mode[FX_MODE_DYNAMIC] = &WS2812FX::mode_dynamic;
_mode[FX_MODE_RAINBOW] = &WS2812FX::mode_rainbow;
_mode[FX_MODE_RAINBOW_CYCLE] = &WS2812FX::mode_rainbow_cycle;
_mode[FX_MODE_SCAN] = &WS2812FX::mode_scan;
Expand Down Expand Up @@ -309,8 +309,8 @@ class WS2812FX : public NeoPixelBrightnessBus<PIXELFEATURE, PIXELMETHOD> {
mode_color_wipe(void),
mode_color_wipe_random(void),
mode_random_color(void),
mode_single_dynamic(void),
mode_multi_dynamic(void),
mode_easter(void),
mode_dynamic(void),
mode_breath(void),
mode_fade(void),
mode_scan(void),
Expand Down Expand Up @@ -339,6 +339,7 @@ class WS2812FX : public NeoPixelBrightnessBus<PIXELFEATURE, PIXELMETHOD> {
mode_chase_flash_random(void),
mode_chase_rainbow_white(void),
mode_colorful(void),
mode_colorful_internal(uint32_t*),
mode_traffic_light(void),
mode_color_sweep_random(void),
mode_running_color(void),
Expand Down
6 changes: 3 additions & 3 deletions wled00/data/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head><meta charset="utf-8">
<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico'/>
<title>WLED 0.6.1</title>
<title>WLED 0.6.2</title>
<script>
var d=document;
var w=window.getComputedStyle(d.querySelector("html"));
Expand Down Expand Up @@ -581,8 +581,8 @@
<option value="3">Wipe (3)</option>
<option value="4">Wipe Random (4)</option>
<option value="5">Color R (5)</option>
<option value="6">Single Dynamic (6)</option>
<option value="7">All Dynamic (7)</option>
<option value="6">Easter (6)</option>
<option value="7">Dynamic (7)</option>
<option value="8">Colorloop (8)</option>
<option value="9">Rainbow (9)</option>
<option value="10">Scan (10)</option>
Expand Down
Binary file modified wled00/data/settings_time.htm
Binary file not shown.
Binary file modified wled00/data/settings_ui.htm
Binary file not shown.
6 changes: 3 additions & 3 deletions wled00/htmls00.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const char PAGE_index0[] PROGMEM = R"=====(
<html>
<head><meta charset="utf-8">
<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico'/>
<title>WLED 0.6.1</title>
<title>WLED 0.6.2</title>
<script>var d=document;var w=window.getComputedStyle(d.querySelector("html"));resp="";var nla=false;var nra=false;var nsa=false;var sto=false;var uwv=false;var sbf=true;var firstload=true;var lastsx=0;var nState=0;var cv=0;var lm=0;aC="";bC="";dC="";function gId(a){return d.getElementById(a)}function Startup(){var a=window.getComputedStyle(d.querySelector("html"));aC=a.getPropertyValue("--aCol");bC=a.getPropertyValue("--bCol");dC=a.getPropertyValue("--dCol");CV(0);setInterval("GIO()",5000);GIO()}function GIO(){nocache="&nocache="+Math.random()*1000000;var a=new XMLHttpRequest();a.onreadystatechange=function(){if(this.readyState==4){if(this.status==200){if(this.responseXML!=null){d.Cf.SA.value=this.responseXML.getElementsByTagName("ac")[0].childNodes[0].nodeValue;d.Cf.SR.value=this.responseXML.getElementsByTagName("cl")[0].childNodes[0].nodeValue;d.Cf.SG.value=this.responseXML.getElementsByTagName("cl")[1].childNodes[0].nodeValue;d.Cf.SB.value=this.responseXML.getElementsByTagName("cl")[2].childNodes[0].nodeValue;if(this.responseXML.getElementsByTagName("wv")[0].childNodes[0].nodeValue>=0){d.Cf.SW.value=this.responseXML.getElementsByTagName("wv")[0].childNodes[0].nodeValue;uwv=true}else{uwv=false}Cf.TX.selectedIndex=this.responseXML.getElementsByTagName("fx")[0].childNodes[0].nodeValue;d.Cf.SX.value=this.responseXML.getElementsByTagName("sx")[0].childNodes[0].nodeValue;d.Cf.IX.value=this.responseXML.getElementsByTagName("ix")[0].childNodes[0].nodeValue;nla=(this.responseXML.getElementsByTagName("nl")[0].innerHTML)!=0?true:false;if(firstload){d.Cf.NC.checked=(this.responseXML.getElementsByTagName("nf")[0].innerHTML)!=0?true:false;d.Cf.SN.value=this.responseXML.getElementsByTagName("nd")[0].childNodes[0].nodeValue;d.Cf.ST.value=this.responseXML.getElementsByTagName("nt")[0].childNodes[0].nodeValue;CV(parseInt(this.responseXML.getElementsByTagName("md")[0].childNodes[0].nodeValue))}firstload=false;nState=0;nState=(this.responseXML.getElementsByTagName("nr")[0].innerHTML)!=0?1:0;nState+=(this.responseXML.getElementsByTagName("ns")[0].innerHTML)!=0?2:0;d.getElementsByClassName("desc")[0].innerHTML=this.responseXML.getElementsByTagName("ds")[0].innerHTML;UV()}}}};a.open("GET","win/"+resp+nocache,true);a.send(null);resp=""}function GC(){resp+="&A="+Cf.SA.value;resp+="&R="+Cf.SR.value;resp+="&G="+Cf.SG.value;resp+="&B="+Cf.SB.value;if(uwv){resp+="&W="+Cf.SW.value}UV();GIO()}function GX(){resp+="&FX="+Cf.TX.selectedIndex;resp+="&SX="+Cf.SX.value;resp+="&IX="+Cf.IX.value;UV();GIO()}function GetRGB(){var a,l,n,j,m,e,c,u;var k=d.Cf.SH.value,x=d.Cf.SS.value,o=255;j=Math.floor(k*6);m=k*6-j;e=o*(1-x);c=o*(1-m*x);u=o*(1-(1-m)*x);switch(j%6){case 0:a=o,l=u,n=e;break;case 1:a=c,l=o,n=e;break;case 2:a=e,l=o,n=u;break;case 3:a=e,l=c,n=o;break;case 4:a=u,l=e,n=o;break;case 5:a=o,l=e,n=c}d.Cf.SR.value=a;d.Cf.SG.value=l;d.Cf.SB.value=n;GC()}function GetCC(){resp+="&CP=";resp+=d.Cf.PF.value;resp+="&CS=";resp+=d.Cf.SF.value;resp+="&CM=";resp+=d.Cf.HF.value;resp+=(d.Cf.SC.checked)?"&CF=1":"&CF=0";resp+=(d.Cf.EC.checked)?"&CE=1":"&CE=0";GIO()}function CV(a){if(sto){CloseSettings()}gId("slA").style.display="none";gId("srgb").style.display="none";gId("shs").style.display="none";gId("slW").style.display="none";gId("tlX").style.display="none";gId("tlP").style.display="none";gId("tlN").style.display="none";if(a<2){if(uwv){gId("slW").style.display="block"}gId("slA").style.display="block"}switch(a){case 0:gId("srgb").style.display="block";lm=0;break;case 1:gId("shs").style.display="block";lm=1;break;case 2:gId("tlP").style.display="block";break;case 3:gId("tlX").style.display="block";break;case 4:gId("tlN").style.display="block"}cv=a;mdb.style.fill=(lm>0)?aC:dC}function rgb2hex(e,c,a){var b=a|(c<<8)|(e<<16);return"#"+(16777216+b).toString(16).slice(1)}function lingrad(e,c,a){return"linear-gradient("+bC+","+rgb2hex(e,c,a)+")"}function UV(){d.body.style.background=lingrad(Cf.SR.value,Cf.SG.value,Cf.SB.value);setHS(Cf.SR.value,Cf.SG.value,Cf.SB.value);fxb.style.fill=(d.Cf.TX.selectedIndex>0)?aC:dC;nlb.style.fill=(nla)?aC:dC;ntb.style.fill=(nla)?aC:dC;switch(nState){case 0:gId("path1").style.fill=dC;gId("path2").style.fill=dC;break;case 1:gId("path1").style.fill=aC;gId("path2").style.fill=dC;break;case 2:gId("path1").style.fill=dC;gId("path2").style.fill=aC;break;case 3:gId("path1").style.fill=aC;gId("path2").style.fill=aC}tgb.style.fill=(Cf.SA.value>0)?aC:dC;ccX.style.display=(Cf.TX.selectedIndex>52)?"block":"none";fof.style.fill=(Cf.TX.selectedIndex>52)?aC:dC;fmr.style.fill=(Cf.TX.selectedIndex<1)?aC:dC}function TgT(){if(Cf.SA.value>0){resp+="&T=0";Cf.SA.value=0}else{resp+="&T=2"}UV();GIO()}function SwFX(a){var b=Cf.TX.selectedIndex+a;Cf.TX.selectedIndex=b;if(b<0){Cf.TX.selectedIndex=0}if(b>57){Cf.TX.selectedIndex=53}GX()}function TgHSB(){if(cv<2){(cv)?CV(0):CV(1)}else{CV(lm)}}function SwitchPS(a){d.Cf.FF.value=parseInt(d.Cf.FF.value)+a;if(d.Cf.FF.value<0){d.Cf.FF.value=0}if(d.Cf.FF.value>24){d.Cf.FF.value=24}}function PSIO(a){if(a){resp+="&PS=";resp+=d.Cf.FF.value}else{if(d.Cf.BC.checked&&d.Cf.CC.checked&&d.Cf.FC.checked){resp+="&PL=";resp+=d.Cf.FF.value}else{if(d.Cf.BC.checked){resp+="&PA=";resp+=d.Cf.FF.value}if(d.Cf.CC.checked){resp+="&PC=";resp+=d.Cf.FF.value}if(d.Cf.FC.checked){resp+="&PX=";resp+=d.Cf.FF.value}}}GIO()}function OpenSettings(){sto=true;stb.style.fill=aC;cdB.style.display="none";stf.style.display="inline";if(sbf){stf.src="/settings"}sbf=false}function CloseSettings(){sto=false;stb.style.fill=dC;cdB.style.display="inline";stf.style.display="none"}function TgS(){if(sto){CloseSettings()}else{OpenSettings()}}function TgNl(){nla=!nla;if(nla){resp+="&NL="+d.Cf.SN.value;resp+="&NT="+d.Cf.ST.value;resp+=(d.Cf.NC.checked)?"&NF=1":"&NF=0"}else{resp+="&NL=0"}UV();GIO()}function TgN(){nState++;if(nState>3){nState=0}switch(nState){case 0:resp+="&SN=0&RN=0";break;case 1:resp+="&SN=0&RN=1";break;case 2:resp+="&SN=1&RN=0";break;case 3:resp+="&SN=1&RN=1"}UV();GIO()}function setHS(){var e,k,j,a=arguments[0]/255,i=arguments[1]/255,l=arguments[2]/255,f,o,n=Math.max(a,i,l),m=n-Math.min(a,i,l),c=function(b){return(n-b)/6/m+1/2};if(m==0){f=o=0}else{o=m/n;e=c(a);k=c(i);j=c(l);if(a===n){f=j-k}else{if(i===n){f=(1/3)+e-j}else{if(l===n){f=(2/3)+k-e}}}if(f<0){f+=1}else{if(f>1){f-=1}}}if(o>0){d.Cf.SH.value=f}d.Cf.SS.value=o}function CS(a){switch(a){case 0:resp+="&SW";break;case 1:resp+="&SB";break;case 2:resp+="&SR=1";break;case 3:resp+="&SP";break;case 4:resp+="&SC";break;case 5:resp+="&SR=0"}GIO()};</script>
)=====";

Expand Down Expand Up @@ -84,8 +84,8 @@ Effect Panel<br><br>
<option value=3>Wipe (3)</option>
<option value=4>Wipe Random (4)</option>
<option value=5>Color R (5)</option>
<option value=6>Single Dynamic (6)</option>
<option value=7>All Dynamic (7)</option>
<option value=6>Easter (6)</option>
<option value=7>Dynamic (7)</option>
<option value=8>Colorloop (8)</option>
<option value=9>Rainbow (9)</option>
<option value=10>Scan (10)</option>
Expand Down
5 changes: 3 additions & 2 deletions wled00/htmls01.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Color Theme:
<option value="9">Nixie</option>
<option value="10">Terminal</option>
<option value="11">C64</option>
<option value="12">Placeholder</option>
<option value="12">Easter</option>
<option value="13">Placeholder</option>
<option value="14">The End</option>
<option value="15" id="co">Custom</option>
Expand Down Expand Up @@ -248,6 +248,7 @@ Time zone:
<option value="10">JST(KST)</option>
<option value="11">AEST/AEDT</option>
<option value="12">NZST/NZDT</option>
<option value="13">North Korea</option>
</select><br>
UTC offset: <input name="UO" type="number" min="-65500" max="65500" required> seconds (max. 18 hours)<br>
Current local time is <span class="times">unknown</span>.
Expand Down Expand Up @@ -335,7 +336,7 @@ HTTP traffic is unencrypted. An attacker in the same network can intercept form
<button type="button" onclick="U()">Manual OTA Update</button><br>
Enable ArduinoOTA: <input type="checkbox" name="AO"><br>
<h3>About</h3>
<a href="https://github.com/Aircoookie/WLED">WLED</a> version 0.6.1<br>
<a href="https://github.com/Aircoookie/WLED">WLED</a> version 0.6.2<br>
(c) 2016-2018 Christian Schwinne <br>
<i>Licensed under the MIT license</i><br><br>
<i>Uses libraries:</i><br>
Expand Down
8 changes: 4 additions & 4 deletions wled00/wled00.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
/*
* @title WLED project sketch
* @version 0.6.1
* @version 0.6.2
* @author Christian Schwinne
*/

Expand Down Expand Up @@ -33,8 +33,8 @@
#include "WS2812FX.h"

//version in format yymmddb (b = daily build)
#define VERSION 1803182
const String versionString = "0.6.1";
#define VERSION 1804011
const String versionString = "0.6.2";

//AP and OTA default passwords (change them!)
String apPass = "wled1234";
Expand Down Expand Up @@ -72,7 +72,7 @@ IPAddress staticIP(0, 0, 0, 0);
IPAddress staticGateway(0, 0, 0, 0);
IPAddress staticSubnet(255, 255, 255, 0);
IPAddress staticDNS(8, 8, 8, 8); //only for NTP
bool useHSB = false, useHSBDefault = false;
bool useHSB = true, useHSBDefault = true;
bool turnOnAtBoot = true;
bool initLedsLast = false;
byte bootPreset = 0;
Expand Down
63 changes: 41 additions & 22 deletions wled00/wled05_init.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,6 @@ void wledInit()
buildCssColorString();
userBeginPreConnection();

WiFi.disconnect(); //close old connections

if (staticIP[0] != 0)
{
WiFi.config(staticIP, staticGateway, staticSubnet, staticDNS);
} else
{
WiFi.config(0U, 0U, 0U);
}

if (apSSID.length()>0)
{
DEBUG_PRINT("USING AP");
DEBUG_PRINTLN(apSSID.length());
initAP();
} else
{
DEBUG_PRINTLN("NO AP");
WiFi.softAPdisconnect(true);
}

initCon();

DEBUG_PRINTLN("");
Expand Down Expand Up @@ -78,6 +57,26 @@ void wledInit()
}

//SERVER INIT
//seasonal greetings
server.on("/easter", HTTP_GET, [](){
if (currentTheme == 12)
{
effectCurrent = 6;
strip.setMode(effectCurrent);
effectSpeed = 200;
strip.setSpeed(effectSpeed);
uint8_t chance = random(255);
if (chance > 250) {serveMessage(200, "&#x1F423;&#x1F423;&#x1F423;&#x1F423;&#x1F423;", "You are super special! Here are 5 chicks for you!", 254);}
else if (chance > 230) {serveMessage(200, "&#x1F423;&#x1F423;&#x1F423;&#x1F423;", "You are genuinely special! Here are 4 chicks for you!", 254);}
else if (chance > 200) {serveMessage(200, "&#x1F423;&#x1F423;&#x1F423;", "You are very special! Here are 3 chicks for you!", 254);}
else if (chance > 140) {serveMessage(200, "&#x1F423;&#x1F423;", "You are quite special! Here are 2 chicks for you!", 254);}
else if (chance > 1) {serveMessage(200, "&#x1F423;", "Happy Easter to you! Here's your personal chick!", 254);}
else {serveMessage(200, "&#x1F430;My basket is empty!&#x1F430;", "So sorry you always have bad luck... Why not try again?", 254);}
} else
{
serveMessage(200, "&#x1F608;April Fools!&#x1F608;", "You could try to <a href=\"/settings/ui\">decorate</a> for Easter first!", 254);
}
});
//settings page
server.on("/settings", HTTP_GET, [](){
serveSettings(0);
Expand Down Expand Up @@ -324,6 +323,26 @@ void initAP(){

void initCon()
{
WiFi.disconnect(); //close old connections

if (staticIP[0] != 0)
{
WiFi.config(staticIP, staticGateway, staticSubnet, staticDNS);
} else
{
WiFi.config(0U, 0U, 0U);
}

if (apSSID.length()>0)
{
DEBUG_PRINT("USING AP");
DEBUG_PRINTLN(apSSID.length());
initAP();
} else
{
DEBUG_PRINTLN("NO AP");
WiFi.softAPdisconnect(true);
}
int fail_count = 0;
if (clientSSID.length() <1 || clientSSID.equals("Your_Network")) fail_count = apWaitTimeSecs*2;
WiFi.begin(clientSSID.c_str(), clientPass.c_str());
Expand All @@ -341,7 +360,6 @@ void initCon()
}
if (millis()-lastTry > 499) {
con = (WiFi.status() == WL_CONNECTED);
if (con) DEBUG_PRINTLN("rofl");
lastTry = millis();
DEBUG_PRINTLN("C_NC");
if (!recoveryAPDisabled && fail_count > apWaitTimeSecs*2)
Expand Down Expand Up @@ -374,6 +392,7 @@ void buildCssColorString()
case 9: cs[0]="f70"; cs[1]="421"; cs[2]="221"; cs[3]="a50"; cs[4]="f70"; cs[5]="f70"; break;//nixie
case 10: cs[0]="2d2"; cs[1]="010"; cs[2]="121"; cs[3]="060"; cs[4]="040"; cs[5]="3f3"; break; //terminal
case 11: cs[0]="867ADE"; cs[1]="4033A3"; cs[2]="483AAA"; cs[3]="483AAA"; cs[4]=""; cs[5]="867ADE"; break; //c64
case 12: cs[0]="fbe8a6"; cs[1]="d2fdff"; cs[2]="b4dfe5"; cs[3]="f4976c"; cs[4]=""; cs[5]="303c6c"; break; //c64
case 14: cs[0]="fc7"; cs[1]="49274a"; cs[2]="94618e"; cs[3]="f4decb"; cs[4]="0008"; cs[5]="f4decb"; break; //end
case 15: for (int i=0;i<6;i++)cs[i]=cssCol[i];//custom
}
Expand Down
5 changes: 4 additions & 1 deletion wled00/wled10_ntp.ino
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ TimeChangeRule NZDT = {Second, Sun, Sep, 2, 780 }; //Daylight time = UTC + 13
TimeChangeRule NZST = {First, Sun, Apr, 3, 720 }; //Standard time = UTC + 12 hours
Timezone tzNZ(NZDT, NZST);

Timezone* timezones[] = { &tzUTC, &tzUK, &tzEUCentral, &tzEUEastern, &tzUSEastern, &tzUSCentral, &tzUSMountain, &tzUSArizona, &tzUSPacific, &tzChina, &tzJapan, &tzAUEastern, &tzNZ};
TimeChangeRule NKST = {Last, Sun, Mar, 1, 510}; //Pyongyang Time = UTC + 8.5 hours
Timezone tzNK(NKST, NKST);

Timezone* timezones[] = {&tzUTC, &tzUK, &tzEUCentral, &tzEUEastern, &tzUSEastern, &tzUSCentral, &tzUSMountain, &tzUSArizona, &tzUSPacific, &tzChina, &tzJapan, &tzAUEastern, &tzNZ, &tzNK};

void handleNetworkTime()
{
Expand Down

0 comments on commit 72223c7

Please sign in to comment.