Skip to content

Commit

Permalink
Add new UI!
Browse files Browse the repository at this point in the history
  • Loading branch information
Aircoookie committed Dec 5, 2019
1 parent 173c752 commit d6c0642
Show file tree
Hide file tree
Showing 8 changed files with 2,798 additions and 2,486 deletions.
1,995 changes: 1,320 additions & 675 deletions wled00/data/index.htm

Large diffs are not rendered by default.

608 changes: 0 additions & 608 deletions wled00/data/index_mobile.htm

This file was deleted.

2 changes: 1 addition & 1 deletion wled00/html_other.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const char PAGE_msg[] PROGMEM = R"=====(<!DOCTYPE html>
const char PAGE_update[] PROGMEM = R"=====(<!DOCTYPE html>
<html><head><meta content='width=device-width' name='viewport'><title>WLED Update</title><script>function B(){window.history.back()}</script>
<style>.bt{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px}input[type=file]{font-size:16px}body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%}</style></head>
<body><h2>WLED Software Update</h2>Installed version: 0.8.6<br>Download the latest binary: <a href="https://github.com/Aircoookie/WLED/releases"><img src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square"></a><br><form method='POST' action='/update' enctype='multipart/form-data'><input type='file' class="bt" name='update' required><br><input type='submit' class="bt" value='Update!'></form><button type="button" class="bt" onclick="B()">Back</button></body></html>)=====";
<body><h2>WLED Software Update</h2>Installed version: 0.9.0-dev<br>Download the latest binary: <a href="https://github.com/Aircoookie/WLED/releases"><img src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square"></a><br><form method='POST' action='/update' enctype='multipart/form-data'><input type='file' class="bt" name='update' required><br><input type='submit' class="bt" value='Update!'></form><button type="button" class="bt" onclick="B()">Back</button></body></html>)=====";
//new user welcome page
Expand Down
2 changes: 1 addition & 1 deletion wled00/html_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,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" target="_blank">WLED</a> version 0.8.6<br><br>
<a href="https://github.com/Aircoookie/WLED" target="_blank">WLED</a> version 0.9.0-dev<br><br>
<a href="https://github.com/Aircoookie/WLED/wiki/Contributors-&-About" target="_blank">Contributors, dependencies and special thanks</a><br>
A huge thank you to everyone who helped me create WLED!<br><br>
(c) 2016-2019 Christian Schwinne <br>
Expand Down
2,656 changes: 1,458 additions & 1,198 deletions wled00/html_ui.h

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions wled00/wled00.ino
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@


//version code in format yymmddb (b = daily build)
#define VERSION 1912042
char versionString[] = "0.8.7-dev";
#define VERSION 1912043
char versionString[] = "0.9.0-dev";


//AP and OTA default passwords (for maximum change them!)
Expand Down
2 changes: 1 addition & 1 deletion wled00/wled02_xml.ino
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void getSettingsJS(byte subPage, char* dest)
sappend('c',"GB",strip.gammaCorrectBri);
sappend('c',"GC",strip.gammaCorrectCol);
sappend('c',"TF",fadeTransition);
sappend('v',"TD",transitionDelay);
sappend('v',"TD",transitionDelayDefault);
sappend('c',"PF",strip.paletteFade);
sappend('v',"BF",briMultiplier);
sappend('v',"TB",nightlightTargetBri);
Expand Down
15 changes: 15 additions & 0 deletions wled00/wled19_json.ino
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ bool deserializeState(JsonObject root)

int cy = root["pl"] | -1;
presetCyclingEnabled = (cy >= 0);
JsonObject ccnf = root["ccnf"];
presetCycleMin = ccnf["min"] | presetCycleMin;
presetCycleMax = ccnf["max"] | presetCycleMax;
tr = ccnf["time"] | -1;
if (tr >= 2)
{
presetCycleTime = tr;
presetCycleTime *= 100;
}

JsonObject nl = root["nl"];
nightlightActive = nl["on"] | nightlightActive;
Expand Down Expand Up @@ -183,6 +192,12 @@ void serializeState(JsonObject root)
root["ps"] = currentPreset;
root["pss"] = savedPresets;
root["pl"] = (presetCyclingEnabled) ? 0: -1;

//temporary for preser cycle
JsonObject ccnf = root.createNestedObject("ccnf");
ccnf["min"] = presetCycleMin;
ccnf["max"] = presetCycleMax;
ccnf["time"] = presetCycleTime/100;

JsonObject nl = root.createNestedObject("nl");
nl["on"] = nightlightActive;
Expand Down

0 comments on commit d6c0642

Please sign in to comment.