Compare commits
62 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eda10b1cc3 | |||
| 0eeec51bb0 | |||
| aa4e7fa5c8 | |||
| b3e74ab9b1 | |||
| 99394f8672 | |||
| 2ab8a2591d | |||
| a613b8c978 | |||
| fa31f97c47 | |||
| 1d2a6f9237 | |||
| 359c7b31a9 | |||
| bbab062fad | |||
| 443f266296 | |||
| 589806d0fd | |||
| f1d638c064 | |||
| 191251f71b | |||
| 6867d1021b | |||
| 7fa5cd847c | |||
| 8903503aef | |||
| e5c0e8de97 | |||
| 75b19fd09d | |||
| 3000a9e98d | |||
| 8cd0a07fa0 | |||
| ae21907558 | |||
| 0f380fe7c6 | |||
| 1ea5d12735 | |||
| 0927c4ff5e | |||
| a734762639 | |||
| cb2cb3db9b | |||
| bd442ece90 | |||
| fcc1f49cf0 | |||
| 2d17b93f29 | |||
| 95475b2ddc | |||
| f080be00e5 | |||
| a596203a6b | |||
| 3afa105ce0 | |||
| d7d35fa401 | |||
| 83950c08a3 | |||
| bfe5cea7b4 | |||
| e0694b1b5b | |||
| 7b5c3b7dd5 | |||
| f0ed3c5730 | |||
| 9d7c7bd981 | |||
| 71fd7e5b68 | |||
| 82e1063801 | |||
| dc076f96cb | |||
| 7c0bc690e8 | |||
| e1760bdab0 | |||
| 006a66bed4 | |||
| 4c88233a6f | |||
| 9f482877c3 | |||
| 0776e8f5f4 | |||
| 92b3959a6a | |||
| 3e66fc21bb | |||
| a16b525cb6 | |||
| e165274b8f | |||
| 5342ec38e1 | |||
| b0f8047f71 | |||
| a53ebf1ee5 | |||
| 3c47e312da | |||
| a2f12208b2 | |||
| c329a85a1b | |||
| 3165ed4fae |
+4
-1
@@ -9,4 +9,7 @@ lib/readme.txt
|
|||||||
.clang_complete
|
.clang_complete
|
||||||
.gcc-flags.json
|
.gcc-flags.json
|
||||||
|
|
||||||
.vscode/*
|
.vscode/*
|
||||||
|
.pio/*
|
||||||
|
|
||||||
|
*.bin
|
||||||
|
|||||||
+456
-625
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,674 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SPIFFS Editor</title>
|
||||||
|
<style type="text/css" media="screen">
|
||||||
|
.contextMenu {
|
||||||
|
z-index: 300;
|
||||||
|
position: absolute;
|
||||||
|
left: 5px;
|
||||||
|
border: 1px solid #444;
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
display: none;
|
||||||
|
box-shadow: 0 0 10px rgba( 0, 0, 0, .4 );
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
.contextMenu ul {
|
||||||
|
list-style: none;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.contextMenu li {
|
||||||
|
position: relative;
|
||||||
|
min-width: 60px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.contextMenu span {
|
||||||
|
color: #444;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
.contextMenu li:hover { background: #444; }
|
||||||
|
.contextMenu li:hover span { color: #EEE; }
|
||||||
|
|
||||||
|
.css-treeview ul, .css-treeview li {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview input {
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview {
|
||||||
|
font: normal 11px Verdana, Arial, Sans-serif;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview span {
|
||||||
|
color: #00f;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview span:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview input + label + ul {
|
||||||
|
margin: 0 0 0 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview input ~ ul {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview label, .css-treeview label::before {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview input:disabled + label {
|
||||||
|
cursor: default;
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview input:checked:not(:disabled) ~ ul {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview label, .css-treeview label::before {
|
||||||
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAACgCAYAAAAFOewUAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAApxJREFUeNrslM1u00AQgGdthyalFFOK+ClIIKQKyqUVQvTEE3DmAhLwAhU8QZoH4A2Q2gMSFace4MCtJ8SPBFwAkRuiHKpA6sRN/Lu7zG5i14kctaUqRGhGXnu9O/Pt7MzsMiklvF+9t2kWTDvyIrAsA0aKRRi1T0C/hJ4LUbt5/8rNpWVlp8RSr9J40b48fxFaTQ9+ft8EZ6MJYb0Ok+dnYGpmPgXwKIAvLx8vYXc5GdMAQJgQEkpjRTh36TS2U+DWW/D17WuYgm8pwJyY1npZsZKOxImOV1I/h4+O6vEg5GCZBpgmA6hX8wHKUHDRBXQYicQ4rlc3Tf0VMs8DHBS864F2YFspjgUYjKX/Az3gsdQd2eeBHwmdGWXHcgBGSkZXOXohcEXebRoQcAgjqediNY+AVyu3Z3sAKqfKoGMsewBeEIOPgQxxPJIjcGH6qtL/0AdADzKGnuuD+2tLK7Q8DhHHbOBW+KEzcHLuYc82MkEUekLiwuvVH+guQBQzOG4XdAb8EOcRcqQvDkY2iCLuxECJ43JobMXoutqGgDa2T7UqLKwt9KRyuxKVByqVXXqIoCCUCAqhUOioTWC7G4TQEOD0APy2/7G2Xpu1J4+lxeQ4TXBbITDpoVelRN/BVFbwu5oMMJUBhoXy5tmdRcMwymP2OLQaLjx9/vnBo6V3K6izATmSnMa0Dq7ferIohJhr1p01zrlz49rZF4OMs8JkX23vVQzYp+wbYGV/KpXKjvspl8tsIKCrMNAYFxj2GKS5ZWxg4ewKsJfaGMIY5KXqPz8LBBj6+yDvVP79+yDp/9F9oIx3OisHWwe7Oal0HxCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgwD8E/BZgAP0qhKj3rXO7AAAAAElFTkSuQmCC") no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview label, .css-treeview span, .css-treeview label::before {
|
||||||
|
display: inline-block;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 16px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview label {
|
||||||
|
background-position: 18px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview label::before {
|
||||||
|
content: "";
|
||||||
|
width: 16px;
|
||||||
|
margin: 0 22px 0 0;
|
||||||
|
vertical-align: middle;
|
||||||
|
background-position: 0 -32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview input:checked + label::before {
|
||||||
|
background-position: 0 -16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* webkit adjacent element selector bugfix */
|
||||||
|
@media screen and (-webkit-min-device-pixel-ratio:0)
|
||||||
|
{
|
||||||
|
.css-treeview{
|
||||||
|
-webkit-animation: webkit-adjacent-element-selector-bugfix infinite 1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes webkit-adjacent-element-selector-bugfix
|
||||||
|
{
|
||||||
|
from {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploader {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
height:28px;
|
||||||
|
line-height: 24px;
|
||||||
|
padding-left: 10px;
|
||||||
|
background-color: #444;
|
||||||
|
color:#EEE;
|
||||||
|
}
|
||||||
|
#tree {
|
||||||
|
position: absolute;
|
||||||
|
top: 28px;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width:200px;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
#editor, #preview {
|
||||||
|
position: absolute;
|
||||||
|
top: 28px;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 200px;
|
||||||
|
}
|
||||||
|
#preview {
|
||||||
|
background-color: #EEE;
|
||||||
|
padding:5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
function createFileUploader(element, tree, editor){
|
||||||
|
var xmlHttp;
|
||||||
|
var input = document.createElement("input");
|
||||||
|
input.type = "file";
|
||||||
|
input.multiple = false;
|
||||||
|
input.name = "data";
|
||||||
|
document.getElementById(element).appendChild(input);
|
||||||
|
var path = document.createElement("input");
|
||||||
|
path.id = "upload-path";
|
||||||
|
path.type = "text";
|
||||||
|
path.name = "path";
|
||||||
|
path.defaultValue = "/";
|
||||||
|
document.getElementById(element).appendChild(path);
|
||||||
|
var button = document.createElement("button");
|
||||||
|
button.innerHTML = 'Upload';
|
||||||
|
document.getElementById(element).appendChild(button);
|
||||||
|
var mkdir = document.createElement("button");
|
||||||
|
mkdir.innerHTML = 'MkDir';
|
||||||
|
document.getElementById(element).appendChild(mkdir);
|
||||||
|
var mkfile = document.createElement("button");
|
||||||
|
mkfile.innerHTML = 'MkFile';
|
||||||
|
document.getElementById(element).appendChild(mkfile);
|
||||||
|
|
||||||
|
function httpPostProcessRequest(){
|
||||||
|
if (xmlHttp.readyState == 4){
|
||||||
|
if(xmlHttp.status != 200) alert("ERROR["+xmlHttp.status+"]: "+xmlHttp.responseText);
|
||||||
|
else {
|
||||||
|
tree.refreshPath(path.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function createPath(p){
|
||||||
|
xmlHttp = new XMLHttpRequest();
|
||||||
|
xmlHttp.onreadystatechange = httpPostProcessRequest;
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append("path", p);
|
||||||
|
xmlHttp.open("PUT", "/edit");
|
||||||
|
xmlHttp.send(formData);
|
||||||
|
}
|
||||||
|
|
||||||
|
mkfile.onclick = function(e){
|
||||||
|
if(path.value.indexOf(".") === -1) return;
|
||||||
|
createPath(path.value);
|
||||||
|
editor.loadUrl(path.value);
|
||||||
|
};
|
||||||
|
mkdir.onclick = function(e){
|
||||||
|
if(path.value.length < 2) return;
|
||||||
|
var dir = path.value
|
||||||
|
if(dir.indexOf(".") !== -1){
|
||||||
|
if(dir.lastIndexOf("/") === 0) return;
|
||||||
|
dir = dir.substring(0, dir.lastIndexOf("/"));
|
||||||
|
}
|
||||||
|
createPath(dir);
|
||||||
|
};
|
||||||
|
button.onclick = function(e){
|
||||||
|
if(input.files.length === 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
xmlHttp = new XMLHttpRequest();
|
||||||
|
xmlHttp.onreadystatechange = httpPostProcessRequest;
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append("data", input.files[0], path.value);
|
||||||
|
xmlHttp.open("POST", "/edit");
|
||||||
|
xmlHttp.send(formData);
|
||||||
|
}
|
||||||
|
input.onchange = function(e){
|
||||||
|
if(input.files.length === 0) return;
|
||||||
|
var filename = input.files[0].name;
|
||||||
|
var ext = /(?:\.([^.]+))?$/.exec(filename)[1];
|
||||||
|
var name = /(.*)\.[^.]+$/.exec(filename)[1];
|
||||||
|
if(typeof name !== undefined){
|
||||||
|
if(name.length > 8) name = name.substring(0, 8);
|
||||||
|
filename = name;
|
||||||
|
}
|
||||||
|
if(typeof ext !== undefined){
|
||||||
|
if(ext === "html") ext = "htm";
|
||||||
|
else if(ext === "jpeg") ext = "jpg";
|
||||||
|
filename = filename + "." + ext;
|
||||||
|
}
|
||||||
|
if(path.value === "/" || path.value.lastIndexOf("/") === 0){
|
||||||
|
path.value = "/"+filename;
|
||||||
|
} else {
|
||||||
|
path.value = path.value.substring(0, path.value.lastIndexOf("/")+1)+filename;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTree(element, editor){
|
||||||
|
var preview = document.getElementById("preview");
|
||||||
|
var treeRoot = document.createElement("div");
|
||||||
|
treeRoot.className = "css-treeview";
|
||||||
|
document.getElementById(element).appendChild(treeRoot);
|
||||||
|
|
||||||
|
function loadDownload(path){
|
||||||
|
document.getElementById('download-frame').src = path+"?download=true";
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadPreview(path){
|
||||||
|
document.getElementById("editor").style.display = "none";
|
||||||
|
preview.style.display = "block";
|
||||||
|
preview.innerHTML = '<img src="'+path+'" style="max-width:100%; max-height:100%; margin:auto; display:block;" />';
|
||||||
|
}
|
||||||
|
|
||||||
|
function fillFolderMenu(el, path){
|
||||||
|
var list = document.createElement("ul");
|
||||||
|
el.appendChild(list);
|
||||||
|
var action = document.createElement("li");
|
||||||
|
list.appendChild(action);
|
||||||
|
var isChecked = document.getElementById(path).checked;
|
||||||
|
var expnd = document.createElement("li");
|
||||||
|
list.appendChild(expnd);
|
||||||
|
if(isChecked){
|
||||||
|
expnd.innerHTML = "<span>Collapse</span>";
|
||||||
|
expnd.onclick = function(e){
|
||||||
|
document.getElementById(path).checked = false;
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
var refrsh = document.createElement("li");
|
||||||
|
list.appendChild(refrsh);
|
||||||
|
refrsh.innerHTML = "<span>Refresh</span>";
|
||||||
|
refrsh.onclick = function(e){
|
||||||
|
var leaf = document.getElementById(path).parentNode;
|
||||||
|
if(leaf.childNodes.length == 3) leaf.removeChild(leaf.childNodes[2]);
|
||||||
|
httpGet(leaf, path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
expnd.innerHTML = "<span>Expand</span>";
|
||||||
|
expnd.onclick = function(e){
|
||||||
|
document.getElementById(path).checked = true;
|
||||||
|
var leaf = document.getElementById(path).parentNode;
|
||||||
|
if(leaf.childNodes.length == 3) leaf.removeChild(leaf.childNodes[2]);
|
||||||
|
httpGet(leaf, path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var upload = document.createElement("li");
|
||||||
|
list.appendChild(upload);
|
||||||
|
upload.innerHTML = "<span>Upload</span>";
|
||||||
|
upload.onclick = function(e){
|
||||||
|
var pathEl = document.getElementById("upload-path");
|
||||||
|
if(pathEl){
|
||||||
|
var subPath = pathEl.value;
|
||||||
|
if(subPath.lastIndexOf("/") < 1) pathEl.value = path+subPath;
|
||||||
|
else pathEl.value = path.substring(subPath.lastIndexOf("/"))+subPath;
|
||||||
|
}
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
var delFile = document.createElement("li");
|
||||||
|
list.appendChild(delFile);
|
||||||
|
delFile.innerHTML = "<span>Delete</span>";
|
||||||
|
delFile.onclick = function(e){
|
||||||
|
httpDelete(path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function fillFileMenu(el, path){
|
||||||
|
var list = document.createElement("ul");
|
||||||
|
el.appendChild(list);
|
||||||
|
var action = document.createElement("li");
|
||||||
|
list.appendChild(action);
|
||||||
|
if(isTextFile(path)){
|
||||||
|
action.innerHTML = "<span>Edit</span>";
|
||||||
|
action.onclick = function(e){
|
||||||
|
editor.loadUrl(path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
} else if(isImageFile(path)){
|
||||||
|
action.innerHTML = "<span>Preview</span>";
|
||||||
|
action.onclick = function(e){
|
||||||
|
loadPreview(path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var download = document.createElement("li");
|
||||||
|
list.appendChild(download);
|
||||||
|
download.innerHTML = "<span>Download</span>";
|
||||||
|
download.onclick = function(e){
|
||||||
|
loadDownload(path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
var delFile = document.createElement("li");
|
||||||
|
list.appendChild(delFile);
|
||||||
|
delFile.innerHTML = "<span>Delete</span>";
|
||||||
|
delFile.onclick = function(e){
|
||||||
|
httpDelete(path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function showContextMenu(e, path, isfile){
|
||||||
|
var divContext = document.createElement("div");
|
||||||
|
var scrollTop = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop;
|
||||||
|
var scrollLeft = document.body.scrollLeft ? document.body.scrollLeft : document.documentElement.scrollLeft;
|
||||||
|
var left = e.clientX + scrollLeft;
|
||||||
|
var top = e.clientY + scrollTop;
|
||||||
|
divContext.className = 'contextMenu';
|
||||||
|
divContext.style.display = 'block';
|
||||||
|
divContext.style.left = left + 'px';
|
||||||
|
divContext.style.top = top + 'px';
|
||||||
|
if(isfile) fillFileMenu(divContext, path);
|
||||||
|
else fillFolderMenu(divContext, path);
|
||||||
|
document.body.appendChild(divContext);
|
||||||
|
var width = divContext.offsetWidth;
|
||||||
|
var height = divContext.offsetHeight;
|
||||||
|
divContext.onmouseout = function(e){
|
||||||
|
if(e.clientX < left || e.clientX > (left + width) || e.clientY < top || e.clientY > (top + height)){
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(divContext);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTreeLeaf(path, name, size){
|
||||||
|
var leaf = document.createElement("li");
|
||||||
|
leaf.id = (((path == "/")?"":path)+"/"+name).toLowerCase();
|
||||||
|
var label = document.createElement("span");
|
||||||
|
label.textContent = name.toLowerCase();
|
||||||
|
leaf.appendChild(label);
|
||||||
|
leaf.onclick = function(e){
|
||||||
|
if(isTextFile(leaf.id)){
|
||||||
|
editor.loadUrl(leaf.id);
|
||||||
|
} else if(isImageFile(leaf.id)){
|
||||||
|
loadPreview(leaf.id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
leaf.oncontextmenu = function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
showContextMenu(e, leaf.id, true);
|
||||||
|
};
|
||||||
|
return leaf;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTreeBranch(path, name, disabled){
|
||||||
|
var leaf = document.createElement("li");
|
||||||
|
var check = document.createElement("input");
|
||||||
|
check.type = "checkbox";
|
||||||
|
check.id = (((path == "/")?"":path)+"/"+name).toLowerCase();
|
||||||
|
if(typeof disabled !== "undefined" && disabled) check.disabled = "disabled";
|
||||||
|
leaf.appendChild(check);
|
||||||
|
var label = document.createElement("label");
|
||||||
|
label.for = check.id;
|
||||||
|
label.textContent = name.toLowerCase();
|
||||||
|
leaf.appendChild(label);
|
||||||
|
check.onchange = function(e){
|
||||||
|
if(check.checked){
|
||||||
|
if(leaf.childNodes.length == 3) leaf.removeChild(leaf.childNodes[2]);
|
||||||
|
httpGet(leaf, check.id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
label.onclick = function(e){
|
||||||
|
if(!check.checked){
|
||||||
|
check.checked = true;
|
||||||
|
if(leaf.childNodes.length == 3) leaf.removeChild(leaf.childNodes[2]);
|
||||||
|
httpGet(leaf, check.id);
|
||||||
|
} else {
|
||||||
|
check.checked = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
leaf.oncontextmenu = function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
showContextMenu(e, check.id, false);
|
||||||
|
}
|
||||||
|
return leaf;
|
||||||
|
}
|
||||||
|
|
||||||
|
function addList(parent, path, items){
|
||||||
|
var list = document.createElement("ul");
|
||||||
|
parent.appendChild(list);
|
||||||
|
var ll = items.length;
|
||||||
|
for(var i = 0; i < ll; i++){
|
||||||
|
var item = items[i];
|
||||||
|
var itemEl;
|
||||||
|
if(item.type === "file"){
|
||||||
|
itemEl = createTreeLeaf(path, item.name, item.size);
|
||||||
|
} else {
|
||||||
|
itemEl = createTreeBranch(path, item.name);
|
||||||
|
}
|
||||||
|
list.appendChild(itemEl);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function isTextFile(path){
|
||||||
|
var ext = /(?:\.([^.]+))?$/.exec(path)[1];
|
||||||
|
if(typeof ext !== undefined){
|
||||||
|
switch(ext){
|
||||||
|
case "txt":
|
||||||
|
case "htm":
|
||||||
|
case "html":
|
||||||
|
case "js":
|
||||||
|
case "json":
|
||||||
|
case "c":
|
||||||
|
case "h":
|
||||||
|
case "cpp":
|
||||||
|
case "css":
|
||||||
|
case "xml":
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isImageFile(path){
|
||||||
|
var ext = /(?:\.([^.]+))?$/.exec(path)[1];
|
||||||
|
if(typeof ext !== undefined){
|
||||||
|
switch(ext){
|
||||||
|
case "png":
|
||||||
|
case "jpg":
|
||||||
|
case "gif":
|
||||||
|
case "ico":
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.refreshPath = function(path){
|
||||||
|
if(path.lastIndexOf('/') < 1){
|
||||||
|
path = '/';
|
||||||
|
treeRoot.removeChild(treeRoot.childNodes[0]);
|
||||||
|
httpGet(treeRoot, "/");
|
||||||
|
} else {
|
||||||
|
path = path.substring(0, path.lastIndexOf('/'));
|
||||||
|
var leaf = document.getElementById(path).parentNode;
|
||||||
|
if(leaf.childNodes.length == 3) leaf.removeChild(leaf.childNodes[2]);
|
||||||
|
httpGet(leaf, path);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function delCb(path){
|
||||||
|
return function(){
|
||||||
|
if (xmlHttp.readyState == 4){
|
||||||
|
if(xmlHttp.status != 200){
|
||||||
|
alert("ERROR["+xmlHttp.status+"]: "+xmlHttp.responseText);
|
||||||
|
} else {
|
||||||
|
if(path.lastIndexOf('/') < 1){
|
||||||
|
path = '/';
|
||||||
|
treeRoot.removeChild(treeRoot.childNodes[0]);
|
||||||
|
httpGet(treeRoot, "/");
|
||||||
|
} else {
|
||||||
|
path = path.substring(0, path.lastIndexOf('/'));
|
||||||
|
var leaf = document.getElementById(path).parentNode;
|
||||||
|
if(leaf.childNodes.length == 3) leaf.removeChild(leaf.childNodes[2]);
|
||||||
|
httpGet(leaf, path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpDelete(filename){
|
||||||
|
xmlHttp = new XMLHttpRequest();
|
||||||
|
xmlHttp.onreadystatechange = delCb(filename);
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append("path", filename);
|
||||||
|
xmlHttp.open("DELETE", "/edit");
|
||||||
|
xmlHttp.send(formData);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCb(parent, path){
|
||||||
|
return function(){
|
||||||
|
if (xmlHttp.readyState == 4){
|
||||||
|
//clear loading
|
||||||
|
if(xmlHttp.status == 200) addList(parent, path, JSON.parse(xmlHttp.responseText));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpGet(parent, path){
|
||||||
|
xmlHttp = new XMLHttpRequest(parent, path);
|
||||||
|
xmlHttp.onreadystatechange = getCb(parent, path);
|
||||||
|
xmlHttp.open("GET", "/list?dir="+path, true);
|
||||||
|
xmlHttp.send(null);
|
||||||
|
//start loading
|
||||||
|
}
|
||||||
|
|
||||||
|
httpGet(treeRoot, "/");
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createEditor(element, file, lang, theme, type){
|
||||||
|
function getLangFromFilename(filename){
|
||||||
|
var lang = "plain";
|
||||||
|
var ext = /(?:\.([^.]+))?$/.exec(filename)[1];
|
||||||
|
if(typeof ext !== undefined){
|
||||||
|
switch(ext){
|
||||||
|
case "txt": lang = "plain"; break;
|
||||||
|
case "htm": lang = "html"; break;
|
||||||
|
case "js": lang = "javascript"; break;
|
||||||
|
case "c": lang = "c_cpp"; break;
|
||||||
|
case "cpp": lang = "c_cpp"; break;
|
||||||
|
case "css":
|
||||||
|
case "scss":
|
||||||
|
case "php":
|
||||||
|
case "html":
|
||||||
|
case "json":
|
||||||
|
case "xml":
|
||||||
|
lang = ext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return lang;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(typeof file === "undefined") file = "/index.htm";
|
||||||
|
|
||||||
|
if(typeof lang === "undefined"){
|
||||||
|
lang = getLangFromFilename(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(typeof theme === "undefined") theme = "textmate";
|
||||||
|
|
||||||
|
if(typeof type === "undefined"){
|
||||||
|
type = "text/"+lang;
|
||||||
|
if(lang === "c_cpp") type = "text/plain";
|
||||||
|
}
|
||||||
|
|
||||||
|
var xmlHttp = null;
|
||||||
|
var editor = ace.edit(element);
|
||||||
|
|
||||||
|
//post
|
||||||
|
function httpPostProcessRequest(){
|
||||||
|
if (xmlHttp.readyState == 4){
|
||||||
|
if(xmlHttp.status != 200) alert("ERROR["+xmlHttp.status+"]: "+xmlHttp.responseText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function httpPost(filename, data, type){
|
||||||
|
xmlHttp = new XMLHttpRequest();
|
||||||
|
xmlHttp.onreadystatechange = httpPostProcessRequest;
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append("data", new Blob([data], { type: type }), filename);
|
||||||
|
xmlHttp.open("POST", "/edit");
|
||||||
|
xmlHttp.send(formData);
|
||||||
|
}
|
||||||
|
//get
|
||||||
|
function httpGetProcessRequest(){
|
||||||
|
if (xmlHttp.readyState == 4){
|
||||||
|
document.getElementById("preview").style.display = "none";
|
||||||
|
document.getElementById("editor").style.display = "block";
|
||||||
|
if(xmlHttp.status == 200) editor.setValue(xmlHttp.responseText);
|
||||||
|
else editor.setValue("");
|
||||||
|
editor.clearSelection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function httpGet(theUrl){
|
||||||
|
xmlHttp = new XMLHttpRequest();
|
||||||
|
xmlHttp.onreadystatechange = httpGetProcessRequest;
|
||||||
|
xmlHttp.open("GET", theUrl, true);
|
||||||
|
xmlHttp.send(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(lang !== "plain") editor.getSession().setMode("ace/mode/"+lang);
|
||||||
|
editor.setTheme("ace/theme/"+theme);
|
||||||
|
editor.$blockScrolling = Infinity;
|
||||||
|
editor.getSession().setUseSoftTabs(true);
|
||||||
|
editor.getSession().setTabSize(2);
|
||||||
|
editor.setHighlightActiveLine(true);
|
||||||
|
editor.setShowPrintMargin(false);
|
||||||
|
editor.commands.addCommand({
|
||||||
|
name: 'saveCommand',
|
||||||
|
bindKey: {win: 'Ctrl-S', mac: 'Command-S'},
|
||||||
|
exec: function(editor) {
|
||||||
|
httpPost(file, editor.getValue()+"", type);
|
||||||
|
},
|
||||||
|
readOnly: false
|
||||||
|
});
|
||||||
|
editor.commands.addCommand({
|
||||||
|
name: 'undoCommand',
|
||||||
|
bindKey: {win: 'Ctrl-Z', mac: 'Command-Z'},
|
||||||
|
exec: function(editor) {
|
||||||
|
editor.getSession().getUndoManager().undo(false);
|
||||||
|
},
|
||||||
|
readOnly: false
|
||||||
|
});
|
||||||
|
editor.commands.addCommand({
|
||||||
|
name: 'redoCommand',
|
||||||
|
bindKey: {win: 'Ctrl-Shift-Z', mac: 'Command-Shift-Z'},
|
||||||
|
exec: function(editor) {
|
||||||
|
editor.getSession().getUndoManager().redo(false);
|
||||||
|
},
|
||||||
|
readOnly: false
|
||||||
|
});
|
||||||
|
httpGet(file);
|
||||||
|
editor.loadUrl = function(filename){
|
||||||
|
file = filename;
|
||||||
|
lang = getLangFromFilename(file);
|
||||||
|
type = "text/"+lang;
|
||||||
|
if(lang !== "plain") editor.getSession().setMode("ace/mode/"+lang);
|
||||||
|
httpGet(file);
|
||||||
|
}
|
||||||
|
return editor;
|
||||||
|
}
|
||||||
|
function onBodyLoad(){
|
||||||
|
var vars = {};
|
||||||
|
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value; });
|
||||||
|
var editor = createEditor("editor", vars.file, vars.lang, vars.theme);
|
||||||
|
var tree = createTree("tree", editor);
|
||||||
|
createFileUploader("uploader", tree, editor);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.9/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
</head>
|
||||||
|
<body onload="onBodyLoad();">
|
||||||
|
<div id="uploader"></div>
|
||||||
|
<div id="tree"></div>
|
||||||
|
<div id="editor"></div>
|
||||||
|
<div id="preview" style="display:none;"></div>
|
||||||
|
<iframe id=download-frame style='display:none;'></iframe>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 34 KiB |
+2600
-97
File diff suppressed because one or more lines are too long
@@ -1,13 +1,23 @@
|
|||||||
;
|
#define USE_WS2812FX_DMA 0 // 0 = Used PIN is ignored & set to RX/GPIO3; 1 = Used PIN is ignored & set to TX/GPIO1; 2 = Uses PIN is ignored & set to D4/GPIO2; Uses WS2812FX, see: https://github.com/kitesurfer1404/WS2812FX
|
||||||
#define USE_WS2812FX_DMA 0 // 0 = Used PIN is ignored & set to RX/GPIO3; 1 = Used PIN is ignored & set to D4/GPIO2; 2 = Uses PIN is ignored & set to TX/GPIO1; Uses WS2812FX, see: https://github.com/kitesurfer1404/WS2812FX
|
// or comment it out
|
||||||
|
#if defined(USE_WS2812FX_DMA)
|
||||||
|
#define MAXLEDS 384 // due to memory limit of esp8266 at the moment only 384 leds are supported in DMA Mode. More can crash if mqtt is used.
|
||||||
|
#else
|
||||||
|
#define MAXLEDS 4096
|
||||||
|
#endif
|
||||||
// Neopixel
|
// Neopixel
|
||||||
#define PIN 3 // PIN (15 / D8) where neopixel / WS2811 strip is attached
|
#define LED_PIN 3 // PIN (15 / D8) where neopixel / WS2811 strip is attached; is configurable, if USE_WS2812FX_DMA is not defined. Just for the start
|
||||||
#define NUMLEDS 144 // Number of leds in the strip
|
#define NUMLEDS 50 // Number of leds in the; is configurable just for the start
|
||||||
|
#define RGBORDER "GRBW" // RGBOrder; is configurable just for the start
|
||||||
|
#define FX_OPTIONS 48 // ws2812fx Options 48 = SIZE_SMALL + FADE_MEDIUM is configurable just for the start; for WS2812FX setSegment OPTIONS, see: https://github.com/kitesurfer1404/WS2812FX/blob/master/extras/WS2812FX%20Users%20Guide.md
|
||||||
|
//#define LED_TYPE_WS2811 // Uncomment, if LED type uses 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
|
||||||
#define LED_BUILTIN 2 // ESP-12F has the built in LED on GPIO2, see https://github.com/esp8266/Arduino/issues/2192
|
#define LED_BUILTIN 2 // ESP-12F has the built in LED on GPIO2, see https://github.com/esp8266/Arduino/issues/2192
|
||||||
#define RGBW // If defined, use RGBW Strips
|
#define POWER_SUPPLY 12 // PIN (12 / D6) If defined, enable output to control external power supply
|
||||||
|
#if defined(POWER_SUPPLY)
|
||||||
|
#define POWER_ON HIGH // Define the output state to turn on the power supply, either HIGH or LOW. Opposite will be uses for power off.
|
||||||
|
#endif
|
||||||
|
|
||||||
const char HOSTNAME[] = "McLightingRGBW_01"; // Friedly hostname
|
char HOSTNAME[65] = "McLightingRGBW"; // Friedly hostname is configurable just for the start. Hostname should not contain spaces as this can break Home Assistant discovery if used.
|
||||||
|
|
||||||
#define ENABLE_OTA 1 // If defined, enable Arduino OTA code. If set to 0 enable Arduino OTA code, if set to 1 enable ESP8266HTTPUpdateServer OTA code.
|
#define ENABLE_OTA 1 // If defined, enable Arduino OTA code. If set to 0 enable Arduino OTA code, if set to 1 enable ESP8266HTTPUpdateServer OTA code.
|
||||||
#define ENABLE_MQTT 1 // If defined use MQTT OR AMQTT, if set to 0 enable MQTT client code, see: https://github.com/toblum/McLighting/wiki/MQTT-API, if set to 1, enable Async MQTT code, see: https://github.com/marvinroger/async-mqtt-client
|
#define ENABLE_MQTT 1 // If defined use MQTT OR AMQTT, if set to 0 enable MQTT client code, see: https://github.com/toblum/McLighting/wiki/MQTT-API, if set to 1, enable Async MQTT code, see: https://github.com/marvinroger/async-mqtt-client
|
||||||
@@ -16,22 +26,28 @@ const char HOSTNAME[] = "McLightingRGBW_01"; // Friedly hostname
|
|||||||
#define MQTT_HOME_ASSISTANT_SUPPORT // If defined, use AMQTT and select Tools -> IwIP Variant -> Higher Bandwidth
|
#define MQTT_HOME_ASSISTANT_SUPPORT // If defined, use AMQTT and select Tools -> IwIP Variant -> Higher Bandwidth
|
||||||
#define ENABLE_BUTTON 14 // If defined, enable button handling code, see: https://github.com/toblum/McLighting/wiki/Button-control, the value defines the input pin (14 / D5) for switching the LED strip on / off, connect this PIN to ground to trigger button.
|
#define ENABLE_BUTTON 14 // If defined, enable button handling code, see: https://github.com/toblum/McLighting/wiki/Button-control, the value defines the input pin (14 / D5) for switching the LED strip on / off, connect this PIN to ground to trigger button.
|
||||||
//#define ENABLE_BUTTON_GY33 12 // If defined, enable button handling code for GY-33 color sensor to scan color. The value defines the input pin (12 / D6) for read color data with RGB sensor, connect this PIN to ground to trigger button.
|
//#define ENABLE_BUTTON_GY33 12 // If defined, enable button handling code for GY-33 color sensor to scan color. The value defines the input pin (12 / D6) for read color data with RGB sensor, connect this PIN to ground to trigger button.
|
||||||
|
#if defined(ENABLE_BUTTON_GY33)
|
||||||
|
#define GAMMA 2.5 // Gamma correction for GY-33 sensor
|
||||||
|
#endif
|
||||||
//#define ENABLE_REMOTE 13 // If defined, enable Remote Control via TSOP31238. The value defines the input pin (13 / D7) for TSOP31238 Out
|
//#define ENABLE_REMOTE 13 // If defined, enable Remote Control via TSOP31238. The value defines the input pin (13 / D7) for TSOP31238 Out
|
||||||
|
|
||||||
#define ENABLE_STATE_SAVE 1 // If defined, save state on reboot, if set to 0 in EEPROM, if set to 1 on SPIFFS
|
#define ENABLE_STATE_SAVE 1 // If defined, load saved state on reboot and save state. If set to 0 from EEPROM, if set to 1 from SPIFFS
|
||||||
|
|
||||||
#define ENABLE_LEGACY_ANIMATIONS // Enable Legacy Animations
|
#define ENABLE_LEGACY_ANIMATIONS // Enable Legacy Animations
|
||||||
|
#define CUSTOM_WS2812FX_ANIMATIONS // uncomment and put animations in "custom_ws2812fx_animations.h"
|
||||||
#define ENABLE_E131 // E1.31 implementation You have to uncomment #define USE_WS2812FX_DMA and set it to 0
|
#define ENABLE_E131 // E1.31 implementation You have to uncomment #define USE_WS2812FX_DMA and set it to 0
|
||||||
#define ENABLE_TV // Enable TV Animation
|
#define ENABLE_TV // Enable TV Animation
|
||||||
|
#define USE_HTML_MIN_GZ // uncomment for using index.htm & edit.htm from PROGMEM instead of SPIFFs
|
||||||
|
|
||||||
#if defined(ENABLE_E131)
|
#if defined(ENABLE_E131)
|
||||||
|
#define MULTICAST false
|
||||||
#define START_UNIVERSE 1 // First DMX Universe to listen for
|
#define START_UNIVERSE 1 // First DMX Universe to listen for
|
||||||
#define END_UNIVERSE 2 // Total number of Universes to listen for, starting at UNIVERSE
|
uint8_t END_UNIVERSE = START_UNIVERSE; // Total number of Universes to listen for, starting at UNIVERSE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_REMOTE)
|
#if defined(ENABLE_REMOTE)
|
||||||
int selected_color = 1;
|
uint8_t selected_color = 1;
|
||||||
int chng = 1;
|
|
||||||
uint64_t last_remote_cmd;
|
uint64_t last_remote_cmd;
|
||||||
enum RMT_BTN {ON_OFF, MODE_UP, MODE_DOWN, RED_UP, RED_DOWN, GREEN_UP, GREEN_DOWN, BLUE_UP, BLUE_DOWN, WHITE_UP, WHITE_DOWN, BRIGHTNESS_UP, BRIGHTNESS_DOWN, SPEED_UP, SPEED_DOWN, COL_M, COL_B, COL_X, AUTOMODE, CUST_1, CUST_2, CUST_3, CUST_4, CUST_5, REPEATCMD, BTN_CNT};
|
enum RMT_BTN {ON_OFF, MODE_UP, MODE_DOWN, RED_UP, RED_DOWN, GREEN_UP, GREEN_DOWN, BLUE_UP, BLUE_DOWN, WHITE_UP, WHITE_DOWN, BRIGHTNESS_UP, BRIGHTNESS_DOWN, SPEED_UP, SPEED_DOWN, COL_M, COL_B, COL_X, AUTOMODE, CUST_1, CUST_2, CUST_3, CUST_4, CUST_5, REPEATCMD, BTN_CNT};
|
||||||
// Change your IR Commands here. You can see them in console, after you pressed a button on the remote
|
// Change your IR Commands here. You can see them in console, after you pressed a button on the remote
|
||||||
@@ -47,7 +63,19 @@ const char HOSTNAME[] = "McLightingRGBW_01"; // Friedly hostname
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MQTT_HOME_ASSISTANT_SUPPORT)
|
#if defined(MQTT_HOME_ASSISTANT_SUPPORT)
|
||||||
#define MQTT_HOME_ASSISTANT_0_84_SUPPORT // Comment if using HA version < 0.84
|
#define MQTT_HOME_ASSISTANT_0_87_SUPPORT // Comment if using HA version < 0.87
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_WS2812FX_DMA) && (USE_WS2812FX_DMA < 0 || USE_WS2812FX_DMA > 2)
|
||||||
|
#error "Definition of USE_WS2812FX_DMA is wrong!"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(ENABLE_MQTT) and ENABLE_MQTT < 0 and ENABLE_MQTT > 1
|
||||||
|
#error "Definition of ENABLE_MQTT is wrong!"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(ENABLE_MQTT) and ENABLE_MQTT < 0 and ENABLE_MQTT > 1
|
||||||
|
#error "Definition of ENABLE_MQTT is wrong!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_HOMEASSISTANT) and !defined(ENABLE_MQTT)
|
#if defined(ENABLE_HOMEASSISTANT) and !defined(ENABLE_MQTT)
|
||||||
@@ -59,21 +87,24 @@ const char HOSTNAME[] = "McLightingRGBW_01"; // Friedly hostname
|
|||||||
|
|
||||||
// parameters for automatically cycling favorite patterns
|
// parameters for automatically cycling favorite patterns
|
||||||
uint32_t autoParams[][6] = { // main_color, back_color, xtra_color, speed, mode, duration (seconds)
|
uint32_t autoParams[][6] = { // main_color, back_color, xtra_color, speed, mode, duration (seconds)
|
||||||
{0xff000000, 0x00ff0000, 0x00000000, 200, 1, 5}, // blink red/geen for 5 seconds
|
{0x00ff0000, 0x0000ff00, 0x00000000, 200, 1, 5000}, // blink red/geen for 5 seconds
|
||||||
{0x00ff0000, 0x0000ff00, 0x00000000, 200, 3, 10}, // wipe green/blue for 10 seconds
|
{0x0000ff00, 0x000000ff, 0x00000000, 200, 3, 10000}, // wipe green/blue for 10 seconds
|
||||||
{0x0000ff00, 0xff000000, 0x00000000, 60, 14, 10}, // dual scan blue on red for 10 seconds
|
{0x000000ff, 0x00ff0000, 0x00000000, 60, 14, 10000}, // dual scan blue on red for 10 seconds
|
||||||
{0x0000ff00, 0xff000000, 0x00000000, 40, 45, 15}, // fireworks blue/red for 15 seconds
|
{0x000000ff, 0x00ff0000, 0x00000000, 40, 45, 15000}, // fireworks blue/red for 15 seconds
|
||||||
{0xff000000, 0x00ff0000, 0x0000ff00, 40, 54, 15} // tricolor chase red/green/blue for 15 seconds
|
{0x00ff0000, 0x0000ff00, 0x000000ff, 40, 54, 15000} // tricolor chase red/green/blue for 15 seconds
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(ENABLE_MQTT)
|
#if defined(ENABLE_MQTT)
|
||||||
char mqtt_buf[80];
|
char mqtt_buf[80];
|
||||||
char mqtt_intopic[strlen(HOSTNAME) + 3 + 1]; // Topic in will be: <HOSTNAME>/in
|
char mqtt_will_topic[sizeof(HOSTNAME) + 7]; // Topic 'will' will be:HOSTNAME "/status";
|
||||||
char mqtt_outtopic[strlen(HOSTNAME) + 4 + 1]; // Topic out will be: <HOSTNAME>/out
|
const char mqtt_will_payload[] = "OFFLINE";
|
||||||
|
char mqtt_intopic[sizeof(HOSTNAME) + 3]; // Topic 'in' will be: <HOSTNAME>/in
|
||||||
|
char mqtt_outtopic[sizeof(HOSTNAME) + 4]; // Topic 'out' will be: <HOSTNAME>/out
|
||||||
|
bool mqtt_lwt_boot_flag = true;
|
||||||
#if ENABLE_MQTT == 0
|
#if ENABLE_MQTT == 0
|
||||||
#define MQTT_MAX_PACKET_SIZE 2048
|
#define MQTT_MAX_PACKET_SIZE 512
|
||||||
#define MQTT_MAX_RECONNECT_TRIES 4
|
#define MQTT_MAX_RECONNECT_TRIES 4
|
||||||
int mqtt_reconnect_retries = 0;
|
uint8_t mqtt_reconnect_retries = 0;
|
||||||
uint8_t qossub = 0; // PubSubClient can sub qos 0 or 1
|
uint8_t qossub = 0; // PubSubClient can sub qos 0 or 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -83,24 +114,20 @@ uint32_t autoParams[][6] = { // main_color, back_color, xtra_color, speed, mod
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_HOMEASSISTANT)
|
#if defined(ENABLE_HOMEASSISTANT)
|
||||||
char mqtt_ha_state_in[5 + strlen(HOSTNAME) + 12 + 1]; // Topic in will be: home/<HOSTNAME>_ha/state/in"
|
char mqtt_ha_config[20 + sizeof(HOSTNAME) + 7]; // Topic config will be: "homeassistant/light/<HOSTNAME>/config"
|
||||||
char mqtt_ha_state_out[5 + strlen(HOSTNAME) + 13 + 1]; // Topic in will be: home/<HOSTNAME>_ha/state/out"
|
char mqtt_ha_state_in[5 + sizeof(HOSTNAME) + 12]; // Topic in will be: "home/<HOSTNAME>_ha/state/in"
|
||||||
|
char mqtt_ha_state_out[5 + sizeof(HOSTNAME) + 13]; // Topic in will be: "home/<HOSTNAME>_ha/state/out"
|
||||||
const char* on_cmd = "ON";
|
const char* on_cmd = "ON";
|
||||||
const char* off_cmd = "OFF";
|
const char* off_cmd = "OFF";
|
||||||
bool new_ha_mqtt_msg = false;
|
bool new_ha_mqtt_msg = false;
|
||||||
uint16_t color_temp = 327; // min is 154 and max is 500
|
uint16_t color_temp = 327; // min is 154 and max is 500
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_MQTT_HOSTNAME_CHIPID)
|
char mqtt_clientid[sizeof(HOSTNAME) + 9];
|
||||||
char mqtt_clientid[64];
|
char mqtt_host[65] = ""; //is configurable just for the start
|
||||||
#else
|
uint16_t mqtt_port = 1883; //is configurable just for the start
|
||||||
const char* mqtt_clientid = HOSTNAME;
|
char mqtt_user[33] = ""; //is configurable just for the start
|
||||||
#endif
|
char mqtt_pass[33] = ""; //is configurable just for the start
|
||||||
|
|
||||||
char mqtt_host[64] = "";
|
|
||||||
char mqtt_port[6] = "";
|
|
||||||
char mqtt_user[32] = "";
|
|
||||||
char mqtt_pass[32] = "";
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -110,18 +137,19 @@ uint32_t autoParams[][6] = { // main_color, back_color, xtra_color, speed, mod
|
|||||||
#define DBG_OUTPUT_PORT Serial // Set debug output port
|
#define DBG_OUTPUT_PORT Serial // Set debug output port
|
||||||
|
|
||||||
// List of all color modes
|
// List of all color modes
|
||||||
enum MODE {OFF, AUTO, TV, E131, CUSTOM, HOLD, SET_ALL, SET_MODE, SET_COLOR, SET_SPEED, SET_BRIGHTNESS};
|
#if defined(ENABLE_LEGACY_ANIMATIONS)
|
||||||
MODE mode = SET_MODE; // Standard mode that is active when software starts
|
enum MODE {OFF, AUTO, TV, E131, CUSTOM, HOLD, SET_ALL, SET_MODE, SET_COLOR, SET_SPEED, SET_BRIGHTNESS, INIT_STRIP, WIPE, RAINBOW, RAINBOWCYCLE, THEATERCHASE, TWINKLERANDOM, THEATERCHASERAINBOW};
|
||||||
|
#else
|
||||||
|
enum MODE {OFF, AUTO, TV, E131, CUSTOM, HOLD, SET_ALL, SET_MODE, SET_COLOR, SET_SPEED, SET_BRIGHTNESS, INIT_STRIP};
|
||||||
|
#endif
|
||||||
|
MODE mode = SET_ALL; // Standard mode that is active when software starts
|
||||||
MODE prevmode = mode;
|
MODE prevmode = mode;
|
||||||
|
|
||||||
int ws2812fx_speed = 196; // Global variable for storing the delay between color changes --> smaller == faster
|
uint8_t ws2812fx_speed = 196; // Global variable for storing the delay between color changes --> smaller == faster
|
||||||
int brightness = 196; // Global variable for storing the brightness (255 == 100%)
|
uint8_t brightness = 196; // Global variable for storing the brightness (255 == 100%)
|
||||||
|
uint8_t ws2812fx_mode = 0; // Global variable for storing the WS2812FX modes
|
||||||
|
|
||||||
int ws2812fx_mode = 0; // Helper variable to set WS2812FX modes
|
uint32_t hex_colors[3] = {}; // Color array for setting WS2812FX
|
||||||
|
|
||||||
bool shouldSaveConfig = false; // For WiFiManger custom config
|
|
||||||
|
|
||||||
uint32_t hex_colors[3] = {}; // Color array for setting WS2812FX
|
|
||||||
struct ledstate // Data structure to store a state of a single led
|
struct ledstate // Data structure to store a state of a single led
|
||||||
{
|
{
|
||||||
uint8_t red;
|
uint8_t red;
|
||||||
@@ -130,22 +158,23 @@ struct ledstate // Data structure to store a state of a single le
|
|||||||
uint8_t white;
|
uint8_t white;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct ledstate LEDState; // Define the datatype LEDState
|
typedef struct ledstate LEDState; // Define the datatype LEDState
|
||||||
LEDState ledstates[NUMLEDS]; // Get an array of led states to store the state of the whole strip
|
uint8_t* ledstates; // Set a pointer to get an array of led states to store the state of the whole strip
|
||||||
LEDState main_color = { 255, 0, 0, 0 }; // Store the "main color" of the strip used in single color modes
|
LEDState main_color = { 255, 0, 0, 0 }; // Store the "main color" of the strip used in single color modes
|
||||||
LEDState back_color = { 0, 0, 0, 0 }; // Store the "2nd color" of the strip used in single color modes
|
LEDState back_color = { 0, 0, 0, 0 }; // Store the "2nd color" of the strip used in single color modes
|
||||||
LEDState xtra_color = { 0, 0, 0, 0 }; // Store the "3rd color" of the strip used in single color modes
|
LEDState xtra_color = { 0, 0, 0, 0 }; // Store the "3rd color" of the strip used in single color modes
|
||||||
|
|
||||||
|
bool updateConfig = false; // For WiFiManger custom config and config
|
||||||
char last_state[67]; // Keeps the state representation before auto or off mode
|
char last_state[67]; // Keeps the state representation before auto or off mode
|
||||||
bool updateState = false;
|
bool updateState = false;
|
||||||
|
|
||||||
// Button handling
|
// Button handling
|
||||||
|
|
||||||
#if defined(ENABLE_BUTTON)
|
#if defined(ENABLE_BUTTON)
|
||||||
//#define BTN_MODE_SHORT "STA|mo|fxm| h| s| r1| g1| b1| w1| r2| g2| b2| w2| r3| g3| b3| w3" // Example
|
//#define BTN_MODE_SHORT "STA|mo|fxm| s| b| r1| g1| b1| w1| r2| g2| b2| w2| r3| g3| b3| w3" // Example
|
||||||
#define BTN_MODE_SHORT "STA| 5| 0|255|196| 0| 0| 0|255| 0| 0| 0| 0| 0| 0| 0| 0" // Static white
|
#define BTN_MODE_SHORT "STA| 5| 0|196|255| 0| 0| 0|255| 0| 0| 0| 0| 0| 0| 0| 0" // Static white
|
||||||
#define BTN_MODE_MEDIUM "STA| 5| 48|200|196|255|102| 0| 0| 0| 0| 0| 0| 0| 0| 0| 0" // Fire flicker
|
#define BTN_MODE_MEDIUM "STA| 5| 48|196|200|255|102| 0| 0| 0| 0| 0| 0| 0| 0| 0| 0" // Fire flicker
|
||||||
#define BTN_MODE_LONG "STA| 5| 46|200|196|255|102| 0| 0| 0| 0| 0| 0| 0| 0| 0| 0" // Fireworks random
|
#define BTN_MODE_LONG "STA| 5| 46|196|200|255|102| 0| 0| 0| 0| 0| 0| 0| 0| 0| 0" // Fireworks random
|
||||||
unsigned long keyPrevMillis = 0;
|
unsigned long keyPrevMillis = 0;
|
||||||
const unsigned long keySampleIntervalMs = 25;
|
const unsigned long keySampleIntervalMs = 25;
|
||||||
byte longKeyPressCountMax = 80; // 80 * 25 = 2000 ms
|
byte longKeyPressCountMax = 80; // 80 * 25 = 2000 ms
|
||||||
@@ -162,3 +191,22 @@ bool updateState = false;
|
|||||||
byte KeyPressCount_gy33 = 0;
|
byte KeyPressCount_gy33 = 0;
|
||||||
byte prevKeyState_gy33 = HIGH; // button is active low
|
byte prevKeyState_gy33 = HIGH; // button is active low
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct {
|
||||||
|
uint16_t stripSize = NUMLEDS;
|
||||||
|
char RGBOrder[5] = RGBORDER;
|
||||||
|
#if defined(USE_WS2812FX_DMA)
|
||||||
|
#if USE_WS2812FX_DMA == 0
|
||||||
|
uint8_t pin = 3;
|
||||||
|
#endif
|
||||||
|
#if USE_WS2812FX_DMA == 1
|
||||||
|
uint8_t pin = 2;
|
||||||
|
#endif
|
||||||
|
#if USE_WS2812FX_DMA == 2
|
||||||
|
uint8_t pin = 1;
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
uint8_t pin = LED_PIN;
|
||||||
|
#endif
|
||||||
|
uint8_t fxoptions = FX_OPTIONS;
|
||||||
|
} WS2812FXStripSettings;
|
||||||
|
|||||||
@@ -0,0 +1,463 @@
|
|||||||
|
#include <pgmspace.h>
|
||||||
|
|
||||||
|
#define edit_htm_gz_len 5489
|
||||||
|
static const char edit_htm_gz[] PROGMEM ={
|
||||||
|
0x1f, 0x8b, 0x08, 0x08, 0x10, 0x9c, 0x83, 0x5c, 0x04, 0x00, 0x65, 0x64,
|
||||||
|
0x69, 0x74, 0x2e, 0x68, 0x74, 0x6d, 0x00, 0xed, 0x1c, 0x67, 0x7b, 0xf2,
|
||||||
|
0x36, 0xf0, 0x7b, 0x7f, 0x85, 0xeb, 0x8e, 0x40, 0x99, 0x21, 0x24, 0x6f,
|
||||||
|
0x66, 0x5b, 0x76, 0x12, 0xa0, 0x84, 0x91, 0x84, 0xa4, 0xeb, 0x31, 0xb6,
|
||||||
|
0x00, 0x27, 0xc6, 0x76, 0x6c, 0x13, 0x20, 0x69, 0xfa, 0xdb, 0x7b, 0x92,
|
||||||
|
0xbc, 0x07, 0x38, 0xa3, 0xf3, 0x29, 0xef, 0x00, 0x4b, 0x77, 0xa7, 0xbb,
|
||||||
|
0xd3, 0xe9, 0x74, 0x3a, 0x49, 0x3e, 0xfe, 0xbc, 0xda, 0xa9, 0x0c, 0x6e,
|
||||||
|
0x2e, 0x6a, 0xcc, 0xd4, 0x98, 0x49, 0xdf, 0x7e, 0x76, 0x8c, 0xbf, 0x18,
|
||||||
|
0x89, 0x93, 0x27, 0x27, 0x2c, 0x92, 0xd9, 0x6f, 0x3f, 0x63, 0x98, 0xe3,
|
||||||
|
0x29, 0xe2, 0x04, 0xfc, 0x03, 0x7e, 0x1a, 0xa2, 0x21, 0xa1, 0x6f, 0xfb,
|
||||||
|
0x17, 0x67, 0xf5, 0x7a, 0x9f, 0xa9, 0x09, 0xa2, 0xa1, 0x68, 0xc7, 0x39,
|
||||||
|
0x52, 0x68, 0x02, 0xe8, 0xc6, 0x4a, 0x42, 0x8c, 0xb1, 0x52, 0xd1, 0x09,
|
||||||
|
0x6b, 0xa0, 0xa5, 0x91, 0xe3, 0x75, 0x9d, 0x65, 0x66, 0x48, 0x10, 0xb9,
|
||||||
|
0x13, 0x56, 0xe7, 0x35, 0x44, 0x89, 0x92, 0x4f, 0x96, 0x57, 0x64, 0x0c,
|
||||||
|
0xd3, 0x46, 0xf2, 0x9c, 0x79, 0x86, 0x42, 0xfa, 0x79, 0xca, 0x88, 0xb2,
|
||||||
|
0x80, 0x96, 0x87, 0xcc, 0x4e, 0x3e, 0x7f, 0x64, 0x97, 0xaa, 0x8a, 0x2e,
|
||||||
|
0x1a, 0xa2, 0x22, 0x1f, 0x32, 0xdc, 0x48, 0x57, 0xa4, 0xb9, 0x81, 0x9c,
|
||||||
|
0x3a, 0x09, 0x8d, 0x8d, 0x43, 0x66, 0x57, 0x5d, 0x3a, 0x45, 0x23, 0x45,
|
||||||
|
0x13, 0x90, 0x76, 0xc8, 0x6c, 0xab, 0x4b, 0x06, 0xc0, 0x45, 0x81, 0xf9,
|
||||||
|
0xa2, 0x58, 0x2c, 0xba, 0xea, 0x39, 0xfe, 0x7e, 0xa2, 0x29, 0x73, 0x59,
|
||||||
|
0xc8, 0xf0, 0x8a, 0xa4, 0x00, 0xe4, 0x17, 0xf5, 0x5d, 0xfc, 0xc7, 0x01,
|
||||||
|
0x11, 0x44, 0x5d, 0x95, 0xb8, 0xd5, 0x21, 0x23, 0x2b, 0x32, 0x72, 0x53,
|
||||||
|
0x5e, 0x66, 0xf4, 0x29, 0x27, 0x28, 0x8b, 0x43, 0x26, 0x0f, 0x7f, 0xb6,
|
||||||
|
0xf3, 0xd0, 0x84, 0x36, 0x19, 0x71, 0x09, 0x26, 0x9f, 0x36, 0xff, 0x66,
|
||||||
|
0x8b, 0x4c, 0xd2, 0xc1, 0x18, 0x83, 0x98, 0x19, 0x5d, 0x7c, 0x42, 0xc0,
|
||||||
|
0x4e, 0xc1, 0x64, 0xd2, 0xa9, 0x18, 0x73, 0x33, 0x51, 0x82, 0x56, 0x74,
|
||||||
|
0x4e, 0xd6, 0x33, 0x3a, 0xd2, 0xc4, 0xb1, 0x0f, 0x60, 0x81, 0xc4, 0xc9,
|
||||||
|
0xd4, 0x38, 0x1c, 0x29, 0x92, 0x60, 0xd5, 0xbc, 0x84, 0x69, 0x70, 0x2e,
|
||||||
|
0xb9, 0x94, 0x28, 0x89, 0x3a, 0xb4, 0x89, 0x3b, 0xc3, 0xcf, 0xbf, 0xa1,
|
||||||
|
0xa8, 0xc0, 0xb8, 0x57, 0x79, 0x9e, 0x82, 0x19, 0xa7, 0x4d, 0x44, 0xd9,
|
||||||
|
0x53, 0xa4, 0x72, 0x82, 0x20, 0xca, 0x13, 0x28, 0x5b, 0xc7, 0x01, 0x34,
|
||||||
|
0x0a, 0x1c, 0x04, 0x3b, 0x4c, 0x43, 0x12, 0x67, 0x88, 0x8f, 0xc8, 0xd5,
|
||||||
|
0x84, 0x28, 0x67, 0x16, 0xa2, 0x60, 0x4c, 0x0f, 0x99, 0xbd, 0xbc, 0x5b,
|
||||||
|
0x23, 0xfc, 0x5c, 0xd3, 0xa1, 0x33, 0x00, 0x59, 0x04, 0xb2, 0xda, 0xda,
|
||||||
|
0xd6, 0x74, 0x95, 0x93, 0x5d, 0xed, 0xd1, 0x6e, 0xa4, 0xdd, 0x1c, 0xec,
|
||||||
|
0x43, 0x51, 0x96, 0x44, 0x19, 0x65, 0x46, 0x92, 0xc2, 0xdf, 0x87, 0xc8,
|
||||||
|
0xb5, 0xa7, 0x2e, 0x37, 0x48, 0x76, 0x38, 0x55, 0x1e, 0x91, 0xc6, 0x3c,
|
||||||
|
0xbb, 0x2c, 0xc7, 0x6c, 0x6c, 0x3d, 0x86, 0xc9, 0xa6, 0xcd, 0x5e, 0xad,
|
||||||
|
0x56, 0xb3, 0x30, 0x6c, 0x34, 0x5d, 0xcf, 0x18, 0x30, 0x32, 0x1e, 0x45,
|
||||||
|
0xb4, 0x80, 0x5e, 0x4c, 0xfb, 0x4a, 0x1c, 0xad, 0x3a, 0x1c, 0x47, 0x74,
|
||||||
|
0xd8, 0xc6, 0xee, 0x7f, 0xf9, 0x2c, 0xb4, 0x51, 0x51, 0x56, 0xe7, 0x06,
|
||||||
|
0xf3, 0x1c, 0x6b, 0xb0, 0x29, 0x2a, 0xc7, 0x8b, 0xc6, 0x0a, 0x9a, 0xdb,
|
||||||
|
0x40, 0xf4, 0xd9, 0x63, 0xc6, 0x98, 0x0f, 0x6d, 0xc6, 0x49, 0xcc, 0x36,
|
||||||
|
0x1e, 0x92, 0x57, 0x48, 0x13, 0x38, 0x99, 0x4b, 0x33, 0x25, 0x4d, 0xe4,
|
||||||
|
0x40, 0xe2, 0x7e, 0x88, 0xf1, 0x67, 0x66, 0xca, 0x53, 0x66, 0x0e, 0x85,
|
||||||
|
0x50, 0x21, 0x21, 0xde, 0xf0, 0x1b, 0x32, 0x0c, 0x8c, 0xd1, 0xbd, 0x68,
|
||||||
|
0xac, 0x03, 0x71, 0x55, 0xc5, 0xd2, 0x43, 0x84, 0x49, 0xe5, 0xf3, 0xe3,
|
||||||
|
0x18, 0x26, 0x1a, 0x49, 0xd1, 0x34, 0x04, 0x87, 0x2e, 0x36, 0x92, 0x8c,
|
||||||
|
0x80, 0x78, 0x45, 0xe3, 0xa8, 0x96, 0xc1, 0x98, 0x90, 0x26, 0x89, 0x1b,
|
||||||
|
0xf9, 0xa3, 0xfd, 0x94, 0x02, 0xff, 0x3c, 0x42, 0x12, 0x7c, 0xe3, 0x21,
|
||||||
|
0x1f, 0x34, 0x03, 0xf2, 0xa7, 0x00, 0x9e, 0x26, 0x16, 0xb5, 0xdf, 0x09,
|
||||||
|
0x15, 0xff, 0x88, 0x89, 0xa5, 0x2e, 0xc2, 0x46, 0x3a, 0xac, 0xf0, 0xf0,
|
||||||
|
0x70, 0x84, 0xc6, 0x8a, 0x86, 0x98, 0xe7, 0x37, 0xea, 0x8d, 0xf0, 0x76,
|
||||||
|
0x08, 0xcc, 0x70, 0x23, 0x09, 0x09, 0xb6, 0xc8, 0x41, 0x72, 0x02, 0x1a,
|
||||||
|
0x73, 0x73, 0xc9, 0x08, 0xb1, 0xcf, 0xec, 0x5e, 0xac, 0x36, 0xf8, 0x29,
|
||||||
|
0xe2, 0xef, 0x91, 0x70, 0x28, 0x2b, 0x46, 0xc2, 0x6e, 0x30, 0x19, 0xa9,
|
||||||
|
0x16, 0xe2, 0x41, 0x3e, 0x52, 0x2f, 0x6e, 0x7f, 0x32, 0xd7, 0xa4, 0x04,
|
||||||
|
0x2b, 0x70, 0x06, 0x77, 0x28, 0xce, 0xb8, 0x09, 0xca, 0xa9, 0xf2, 0xe4,
|
||||||
|
0x68, 0xc4, 0xe9, 0x68, 0xaf, 0x98, 0x16, 0xaf, 0xca, 0x9d, 0xde, 0x22,
|
||||||
|
0xdf, 0x6c, 0x4c, 0x94, 0x12, 0x7c, 0x7e, 0xe8, 0x5f, 0x4e, 0x6b, 0x97,
|
||||||
|
0x13, 0xf8, 0x55, 0xc6, 0x8f, 0x95, 0x49, 0xa5, 0x74, 0x83, 0x7f, 0xd4,
|
||||||
|
0x3b, 0x68, 0x71, 0x89, 0x7f, 0x34, 0x86, 0xbd, 0xfa, 0xf5, 0x69, 0x6f,
|
||||||
|
0x30, 0x2a, 0xdc, 0xe6, 0x85, 0x42, 0x7d, 0x75, 0xdb, 0x2d, 0x97, 0x6f,
|
||||||
|
0x1b, 0x07, 0xe2, 0x6d, 0xbf, 0x7c, 0x3e, 0xba, 0xae, 0xcb, 0xb7, 0x57,
|
||||||
|
0xe7, 0xd2, 0xcd, 0x75, 0x6f, 0x97, 0xe7, 0x25, 0xe9, 0x02, 0x23, 0xa8,
|
||||||
|
0xcb, 0xf3, 0x5e, 0xad, 0x7e, 0x89, 0x7e, 0xd0, 0x74, 0xa9, 0xbd, 0x3d,
|
||||||
|
0xcf, 0xe7, 0x4b, 0xdd, 0x49, 0x03, 0x5c, 0xf4, 0x8a, 0x93, 0xea, 0xf5,
|
||||||
|
0x4e, 0x33, 0x55, 0x91, 0xce, 0xce, 0x9a, 0xdd, 0xe6, 0xea, 0xe1, 0xf2,
|
||||||
|
0xaa, 0xfb, 0x38, 0xa8, 0xd5, 0x76, 0xaa, 0xb3, 0xd2, 0xb4, 0xb5, 0x28,
|
||||||
|
0x4d, 0x2f, 0xf7, 0xbb, 0xb7, 0xca, 0x69, 0xb1, 0x54, 0xe8, 0x16, 0x26,
|
||||||
|
0xed, 0x7e, 0x9d, 0xe3, 0x51, 0xb1, 0x5d, 0x31, 0xce, 0xf7, 0xfb, 0x17,
|
||||||
|
0xe5, 0xfa, 0xa2, 0x74, 0xdf, 0x9b, 0x8b, 0xa7, 0x4d, 0xb5, 0xb4, 0xa7,
|
||||||
|
0xf7, 0x7e, 0xc8, 0xb5, 0xe6, 0x9f, 0x9e, 0x1a, 0xbb, 0xe2, 0x76, 0xf1,
|
||||||
|
0x9e, 0x37, 0xb8, 0xcb, 0x87, 0x5e, 0x63, 0xda, 0x18, 0xca, 0xf3, 0x83,
|
||||||
|
0x4e, 0xee, 0xc2, 0xf8, 0xd4, 0x7e, 0xd2, 0xdb, 0xe2, 0xbd, 0xf4, 0x58,
|
||||||
|
0x4f, 0x1d, 0x18, 0x85, 0xfb, 0xeb, 0x41, 0xf5, 0x71, 0x75, 0xa6, 0x95,
|
||||||
|
0xf4, 0x52, 0x9e, 0x6b, 0xf6, 0x7a, 0xe2, 0xf6, 0x20, 0x5f, 0xc9, 0x4d,
|
||||||
|
0xcf, 0x8b, 0xad, 0xcb, 0x91, 0xb1, 0x9b, 0xdb, 0xd7, 0x7e, 0x50, 0xaf,
|
||||||
|
0xaf, 0x24, 0x75, 0xbf, 0xd7, 0xd7, 0x0e, 0xce, 0x8b, 0xf9, 0x51, 0x71,
|
||||||
|
0x7f, 0xbc, 0xac, 0x73, 0x83, 0xee, 0x41, 0x6a, 0x6c, 0xec, 0xd7, 0x6e,
|
||||||
|
0xf7, 0xda, 0xe7, 0x37, 0xa3, 0x7c, 0xe7, 0x3e, 0x25, 0xc8, 0x37, 0x0d,
|
||||||
|
0x75, 0x76, 0x31, 0x19, 0x2e, 0x9a, 0x67, 0xa5, 0xc7, 0xd6, 0x72, 0xff,
|
||||||
|
0xf1, 0x66, 0xc8, 0xef, 0x36, 0x84, 0x76, 0xa9, 0x7b, 0x3e, 0xe9, 0xd6,
|
||||||
|
0xee, 0xd5, 0xbb, 0xde, 0x60, 0xba, 0xb3, 0x37, 0xe8, 0x17, 0x2e, 0x53,
|
||||||
|
0xd5, 0xeb, 0xeb, 0x5c, 0x75, 0xfb, 0xd3, 0xf5, 0xfc, 0x66, 0x32, 0xdb,
|
||||||
|
0x57, 0x17, 0xe7, 0xab, 0x9b, 0x6d, 0x59, 0xbd, 0xd5, 0x6f, 0x9b, 0x9d,
|
||||||
|
0xe5, 0xd9, 0xac, 0x73, 0xb5, 0x7d, 0x96, 0x9b, 0x16, 0x53, 0x9d, 0xbd,
|
||||||
|
0xc7, 0xda, 0x64, 0xb7, 0x51, 0xb9, 0x2d, 0xab, 0x93, 0x59, 0x69, 0x6f,
|
||||||
|
0x3a, 0xdc, 0x5f, 0x9c, 0x36, 0x2f, 0x4f, 0xab, 0xbd, 0xf2, 0xb0, 0x7b,
|
||||||
|
0x23, 0xf2, 0xdd, 0xa2, 0x26, 0xf1, 0x3b, 0x83, 0x71, 0xfe, 0xaa, 0xad,
|
||||||
|
0xef, 0x57, 0x4f, 0xcb, 0xfd, 0xfd, 0xbd, 0x62, 0xbd, 0x70, 0x53, 0xd7,
|
||||||
|
0xd5, 0xbb, 0xc9, 0xe5, 0xcd, 0x5d, 0x73, 0x98, 0x2b, 0x3d, 0xed, 0x4c,
|
||||||
|
0x74, 0xa1, 0x2b, 0x14, 0x10, 0x2a, 0x9f, 0x2e, 0x66, 0x42, 0xe3, 0x7a,
|
||||||
|
0x78, 0xca, 0x4f, 0xca, 0x8d, 0xfe, 0xfd, 0xed, 0xb0, 0x33, 0x54, 0xa6,
|
||||||
|
0x7c, 0x6d, 0x88, 0x46, 0x3d, 0xa5, 0xcb, 0x97, 0x26, 0x77, 0x0f, 0x10,
|
||||||
|
0x36, 0xfd, 0x70, 0x93, 0x2a, 0x5d, 0xad, 0xe6, 0x3b, 0xb7, 0x3b, 0x7a,
|
||||||
|
0xa9, 0xf9, 0x30, 0x6e, 0x2a, 0x8d, 0xb6, 0x8e, 0x16, 0x65, 0x54, 0x3b,
|
||||||
|
0xeb, 0x5c, 0x4c, 0xba, 0xcb, 0xe5, 0xc5, 0xf9, 0xd9, 0x1d, 0xdf, 0x38,
|
||||||
|
0xdd, 0x7b, 0x30, 0x5a, 0xb9, 0x7c, 0x49, 0x28, 0x55, 0x9f, 0x9a, 0x0d,
|
||||||
|
0x79, 0x3e, 0xaf, 0xa6, 0x0a, 0x46, 0xab, 0xf9, 0xa9, 0xbb, 0x5f, 0x9d,
|
||||||
|
0x9e, 0x9e, 0x8e, 0x3a, 0xe5, 0xeb, 0x54, 0xb3, 0xf6, 0xc4, 0x9f, 0xb6,
|
||||||
|
0xe6, 0x37, 0xfc, 0x7e, 0xa1, 0x7d, 0x5f, 0xbb, 0x44, 0xf7, 0x2d, 0x71,
|
||||||
|
0x31, 0x7f, 0xbc, 0x3a, 0x4d, 0x4d, 0xe6, 0xdd, 0x72, 0xf7, 0xa9, 0xd3,
|
||||||
|
0x28, 0x0e, 0x85, 0xd2, 0x68, 0xbf, 0xd6, 0xe1, 0x7b, 0xfc, 0x43, 0xf7,
|
||||||
|
0xb1, 0x7a, 0x7f, 0x53, 0x10, 0x2b, 0xad, 0xf9, 0xb2, 0x56, 0x39, 0x2f,
|
||||||
|
0xee, 0x9c, 0x2b, 0xa3, 0xf6, 0x50, 0x99, 0x1b, 0x0f, 0x8d, 0x49, 0x95,
|
||||||
|
0x2b, 0x0c, 0x3e, 0x5d, 0x3e, 0xb4, 0x9a, 0x0b, 0xe3, 0xa0, 0xd9, 0x5b,
|
||||||
|
0xcd, 0x97, 0xcd, 0xab, 0xf2, 0xea, 0xe1, 0x6a, 0x38, 0x7c, 0x38, 0x53,
|
||||||
|
0x2a, 0x95, 0xcb, 0x4a, 0xe9, 0x61, 0x7a, 0xd9, 0x11, 0x95, 0xc1, 0x75,
|
||||||
|
0xe5, 0x53, 0xa3, 0x38, 0xe8, 0xd6, 0x3a, 0xd5, 0x7c, 0xe9, 0x62, 0x55,
|
||||||
|
0xc8, 0x7d, 0x6a, 0x14, 0x86, 0xea, 0x7c, 0xfb, 0xbc, 0x98, 0x92, 0x96,
|
||||||
|
0xa8, 0x5b, 0x1c, 0x0c, 0xcb, 0xa3, 0xb3, 0x41, 0x55, 0x55, 0xae, 0x90,
|
||||||
|
0x04, 0x96, 0x51, 0xbe, 0xaa, 0x8f, 0x16, 0xf3, 0x5d, 0xa5, 0xdd, 0x3e,
|
||||||
|
0xbf, 0x2c, 0x4f, 0x95, 0xe1, 0x6a, 0xd7, 0x98, 0x09, 0x3d, 0xbe, 0xbd,
|
||||||
|
0x58, 0xcd, 0x2e, 0x0a, 0x9d, 0x56, 0x97, 0x6b, 0xdd, 0x2d, 0x0f, 0x72,
|
||||||
|
0x8f, 0x72, 0x59, 0xd9, 0xbb, 0xda, 0x69, 0xee, 0x89, 0x4f, 0xa5, 0xc1,
|
||||||
|
0xac, 0x2f, 0xb7, 0xb9, 0x7c, 0xf5, 0xe1, 0xd3, 0x18, 0x69, 0x67, 0xca,
|
||||||
|
0xf4, 0x7c, 0xaa, 0x6d, 0xab, 0xf9, 0xed, 0x27, 0x4d, 0x7a, 0x2a, 0x1e,
|
||||||
|
0x68, 0xb7, 0xf5, 0x62, 0x07, 0xba, 0xe0, 0xfc, 0x7e, 0x58, 0xd8, 0x79,
|
||||||
|
0xbc, 0xea, 0x3e, 0xdd, 0xa8, 0xa9, 0xc5, 0xe8, 0xa6, 0x71, 0x95, 0x6b,
|
||||||
|
0xaa, 0xc3, 0xe6, 0xdd, 0x23, 0x0c, 0xe6, 0x7d, 0x43, 0x3f, 0x6b, 0x56,
|
||||||
|
0xb4, 0xf6, 0x0f, 0xa5, 0x9b, 0xfa, 0xf2, 0xae, 0xd0, 0x68, 0xf6, 0x77,
|
||||||
|
0x6f, 0xaf, 0x97, 0x93, 0x22, 0x5a, 0x34, 0xf5, 0xf3, 0x31, 0xd7, 0x68,
|
||||||
|
0x9f, 0xdd, 0xec, 0x36, 0x87, 0x0f, 0x17, 0x4f, 0xfb, 0xad, 0x72, 0xf9,
|
||||||
|
0x6e, 0x2f, 0xb5, 0xaa, 0x3e, 0x5e, 0x5d, 0x7c, 0x3a, 0x80, 0x6f, 0x35,
|
||||||
|
0x77, 0x50, 0x3f, 0x50, 0xce, 0x96, 0x3b, 0x1d, 0x51, 0x3f, 0xbd, 0x5e,
|
||||||
|
0xa0, 0x4f, 0x1d, 0x4e, 0xca, 0x9f, 0x2e, 0x2b, 0x30, 0x88, 0xba, 0x30,
|
||||||
|
0x22, 0x6b, 0x67, 0x5d, 0x18, 0x90, 0xb5, 0x33, 0x18, 0x9a, 0xa4, 0x68,
|
||||||
|
0x0a, 0xff, 0x9d, 0xe1, 0x0a, 0x5a, 0x54, 0x83, 0xc7, 0x29, 0x85, 0x5d,
|
||||||
|
0x54, 0xf7, 0x6b, 0xb9, 0xf2, 0xed, 0xa4, 0x74, 0x91, 0x7f, 0x98, 0x36,
|
||||||
|
0xef, 0x76, 0xb4, 0x61, 0xe7, 0x53, 0x09, 0x7f, 0x6a, 0x52, 0x7d, 0x70,
|
||||||
|
0xdf, 0x9f, 0x77, 0x67, 0x95, 0x0a, 0x9b, 0x04, 0x4f, 0x9c, 0xd1, 0x90,
|
||||||
|
0x8a, 0x38, 0xe3, 0x2d, 0x6e, 0x07, 0x4f, 0x40, 0x71, 0x5d, 0xd1, 0x86,
|
||||||
|
0x68, 0x69, 0x4a, 0x03, 0x51, 0x66, 0x7b, 0xcf, 0x1d, 0xb2, 0x11, 0xc8,
|
||||||
|
0xf0, 0x2a, 0x98, 0xf5, 0x0c, 0x91, 0xe7, 0xa4, 0x0c, 0x27, 0x89, 0x13,
|
||||||
|
0x98, 0x99, 0x66, 0xa2, 0x20, 0x48, 0xb1, 0x26, 0x95, 0x50, 0xff, 0x98,
|
||||||
|
0x71, 0xc2, 0x92, 0xed, 0x7d, 0x75, 0xb9, 0x31, 0x00, 0x89, 0x12, 0x93,
|
||||||
|
0x84, 0x69, 0x38, 0x22, 0x61, 0x59, 0x87, 0x57, 0x12, 0x8e, 0x9a, 0x02,
|
||||||
|
0xf8, 0xa7, 0x54, 0x73, 0x3a, 0xc5, 0xf3, 0x6a, 0x5c, 0xe1, 0xc2, 0xf8,
|
||||||
|
0x26, 0x84, 0x32, 0x3b, 0x31, 0x27, 0x66, 0x6b, 0x62, 0x62, 0x52, 0x31,
|
||||||
|
0xa6, 0x0e, 0x6f, 0x13, 0x20, 0x44, 0xb0, 0x89, 0xdc, 0x37, 0x0c, 0x0d,
|
||||||
|
0x98, 0x18, 0x4e, 0xb8, 0xe3, 0x78, 0x50, 0x00, 0x03, 0x81, 0xd1, 0x0c,
|
||||||
|
0x7f, 0xd3, 0x08, 0x49, 0xd1, 0x98, 0xd1, 0x7c, 0x32, 0x16, 0x97, 0xcc,
|
||||||
|
0x37, 0x39, 0x13, 0xe7, 0x7b, 0xb2, 0x70, 0x63, 0xe8, 0xba, 0x8d, 0xe1,
|
||||||
|
0x64, 0x81, 0x49, 0x58, 0x51, 0x17, 0x0e, 0xe1, 0x05, 0x60, 0x97, 0x47,
|
||||||
|
0x19, 0x55, 0x5c, 0x22, 0x29, 0x43, 0x62, 0x99, 0xc3, 0x7c, 0x92, 0xa2,
|
||||||
|
0x52, 0x2e, 0x83, 0xb2, 0x39, 0xc5, 0x4e, 0x00, 0xc7, 0xc9, 0x30, 0xdb,
|
||||||
|
0x51, 0xe6, 0xcd, 0x12, 0x8b, 0xc3, 0x8c, 0xc9, 0x61, 0xc6, 0xe2, 0x30,
|
||||||
|
0x63, 0x72, 0x28, 0xca, 0x63, 0x51, 0x16, 0x0d, 0xc4, 0x6c, 0xeb, 0x44,
|
||||||
|
0x50, 0x47, 0x54, 0x93, 0x71, 0x8b, 0xf6, 0x3d, 0x5a, 0x8d, 0x35, 0x6e,
|
||||||
|
0x86, 0xf4, 0xd8, 0xa4, 0x6d, 0x1a, 0x6e, 0x56, 0xc7, 0x9a, 0x32, 0x83,
|
||||||
|
0x12, 0xa7, 0x32, 0x18, 0x8b, 0xdb, 0x5c, 0xb8, 0x81, 0x0c, 0x25, 0x2e,
|
||||||
|
0x96, 0x23, 0x85, 0xbf, 0xe3, 0xbe, 0x98, 0xab, 0x92, 0xc2, 0x09, 0x64,
|
||||||
|
0xf1, 0x11, 0x2b, 0x42, 0xf7, 0xaf, 0xf0, 0x34, 0x3a, 0x36, 0x83, 0x6b,
|
||||||
|
0xbe, 0xc0, 0xd0, 0x2e, 0xec, 0x47, 0x8e, 0xec, 0x42, 0xd1, 0xae, 0x72,
|
||||||
|
0x84, 0xc8, 0x10, 0x42, 0x64, 0x09, 0x1c, 0x6a, 0xf8, 0xa1, 0x6b, 0x32,
|
||||||
|
0x5a, 0x88, 0x17, 0x42, 0xfe, 0x25, 0xd7, 0x17, 0xd8, 0x4a, 0x5e, 0x25,
|
||||||
|
0xa5, 0x97, 0xe1, 0x91, 0x62, 0x18, 0xca, 0x2c, 0x5a, 0x52, 0x67, 0x9c,
|
||||||
|
0x17, 0xf2, 0x84, 0xe5, 0x40, 0x9f, 0x38, 0xe4, 0x1c, 0xa6, 0x10, 0x49,
|
||||||
|
0x73, 0xa4, 0x99, 0x2f, 0x54, 0x8d, 0x98, 0xf0, 0x3b, 0x18, 0xb4, 0x7a,
|
||||||
|
0x22, 0x06, 0xcb, 0x0e, 0x87, 0x0e, 0x2f, 0x2e, 0x16, 0xd6, 0x68, 0x1b,
|
||||||
|
0x6b, 0x36, 0x28, 0xda, 0xae, 0x9f, 0xda, 0x71, 0x0e, 0xd6, 0x87, 0x4e,
|
||||||
|
0xde, 0x86, 0xd7, 0x44, 0xd5, 0xb0, 0x32, 0x33, 0xe3, 0xb9, 0xcc, 0x63,
|
||||||
|
0xb1, 0x18, 0x18, 0xf8, 0x9c, 0x81, 0xea, 0xa2, 0x84, 0x2e, 0x4d, 0x23,
|
||||||
|
0x4c, 0x98, 0xe3, 0x26, 0xcd, 0xe0, 0xce, 0x4a, 0x33, 0x54, 0x3b, 0x49,
|
||||||
|
0x87, 0xa1, 0x47, 0x4e, 0x63, 0x96, 0x33, 0xe9, 0xd4, 0x30, 0xd4, 0x23,
|
||||||
|
0x77, 0xa1, 0xb9, 0xdc, 0x38, 0x61, 0x04, 0x85, 0x9f, 0x63, 0x0a, 0x59,
|
||||||
|
0x4a, 0xbc, 0x46, 0xe9, 0x25, 0x58, 0x52, 0xcf, 0x3a, 0x79, 0x13, 0x8a,
|
||||||
|
0x90, 0xc5, 0xb9, 0x24, 0xc0, 0x62, 0xc7, 0xc0, 0x04, 0xeb, 0xaf, 0x9c,
|
||||||
|
0x41, 0xe8, 0x2f, 0xaa, 0x12, 0x06, 0x18, 0x73, 0x92, 0x8e, 0xfc, 0xf5,
|
||||||
|
0x32, 0x37, 0xc3, 0x75, 0x24, 0xa6, 0x76, 0x90, 0x1d, 0x16, 0x26, 0xc8,
|
||||||
|
0x30, 0xdb, 0x2f, 0xaf, 0xce, 0x04, 0x4b, 0xb6, 0x64, 0x96, 0x53, 0x55,
|
||||||
|
0x24, 0x0b, 0x95, 0xa9, 0x28, 0x09, 0x09, 0x42, 0x29, 0xe9, 0x95, 0x45,
|
||||||
|
0xe5, 0x8c, 0xe9, 0x6b, 0x44, 0xc1, 0xf0, 0x59, 0x51, 0xc0, 0xac, 0xd0,
|
||||||
|
0xd1, 0x9c, 0xc1, 0x25, 0xac, 0x17, 0xc0, 0x16, 0x15, 0xaf, 0x0f, 0x7d,
|
||||||
|
0x75, 0xb6, 0x24, 0x61, 0x78, 0xe6, 0x1a, 0xe8, 0x8a, 0x93, 0xe6, 0x04,
|
||||||
|
0x26, 0xf7, 0x56, 0x51, 0x31, 0x35, 0x9f, 0xa4, 0xa3, 0x39, 0x18, 0xa8,
|
||||||
|
0xbc, 0x46, 0x56, 0x0a, 0xe0, 0x16, 0x96, 0x96, 0x64, 0x45, 0x59, 0x46,
|
||||||
|
0xda, 0xe9, 0xa0, 0xdd, 0x02, 0xe4, 0x2d, 0x6a, 0x3e, 0x5b, 0x6f, 0xe4,
|
||||||
|
0x8b, 0x52, 0xf4, 0x71, 0x36, 0xbb, 0x17, 0x44, 0xed, 0x55, 0x8c, 0x11,
|
||||||
|
0x0c, 0x2f, 0x5f, 0xed, 0xfb, 0xaa, 0xa8, 0xbd, 0x95, 0x2d, 0x42, 0x2f,
|
||||||
|
0xc0, 0x15, 0x36, 0xd4, 0x57, 0xb2, 0x85, 0x51, 0xfc, 0x7c, 0xe1, 0x41,
|
||||||
|
0xf7, 0x76, 0xc6, 0x30, 0x45, 0xd2, 0x04, 0xfc, 0xf5, 0x8d, 0xe9, 0x29,
|
||||||
|
0x8c, 0xcc, 0x0b, 0x45, 0x37, 0x2e, 0x34, 0x85, 0x47, 0xba, 0xde, 0x43,
|
||||||
|
0x0f, 0x73, 0xa4, 0x1b, 0x09, 0x32, 0x84, 0xed, 0xd1, 0x33, 0x66, 0x12,
|
||||||
|
0xe6, 0x20, 0xce, 0x02, 0xfb, 0xc2, 0xaa, 0x6f, 0x70, 0x06, 0x48, 0x75,
|
||||||
|
0xc2, 0x14, 0x4d, 0x38, 0x07, 0xd2, 0x06, 0xd4, 0x01, 0x66, 0xae, 0x33,
|
||||||
|
0x9f, 0x9f, 0x60, 0xe7, 0x95, 0x64, 0x38, 0x09, 0x69, 0x20, 0x6f, 0xad,
|
||||||
|
0xd7, 0xeb, 0xf4, 0x7e, 0x64, 0x53, 0x5e, 0xa8, 0x14, 0xfb, 0x33, 0xc4,
|
||||||
|
0x5f, 0x29, 0xa7, 0x0d, 0x5d, 0x55, 0x64, 0x1d, 0x0d, 0xd0, 0x92, 0x0e,
|
||||||
|
0x35, 0xe7, 0x83, 0x24, 0xdd, 0x8c, 0x79, 0x9c, 0x0f, 0xf1, 0x3d, 0x80,
|
||||||
|
0x34, 0x06, 0xbc, 0xe9, 0x05, 0x18, 0x6d, 0x82, 0x8c, 0x83, 0x47, 0x3c,
|
||||||
|
0x00, 0x7c, 0xe8, 0x2f, 0xeb, 0x26, 0xd9, 0xa0, 0xab, 0xa3, 0xc4, 0x3c,
|
||||||
|
0x32, 0x9a, 0x3c, 0x42, 0xaf, 0xc8, 0xe0, 0x79, 0x87, 0xed, 0x16, 0x7e,
|
||||||
|
0xb2, 0xb5, 0x76, 0x14, 0x84, 0xcc, 0x2a, 0x32, 0xd1, 0x19, 0x96, 0x14,
|
||||||
|
0xf1, 0x53, 0xc8, 0xa5, 0x83, 0xe6, 0x22, 0xd4, 0x4e, 0xd1, 0x1d, 0xf3,
|
||||||
|
0x81, 0x08, 0x6f, 0x56, 0x05, 0x67, 0x65, 0xb6, 0x56, 0x37, 0x1f, 0x3d,
|
||||||
|
0xed, 0xd8, 0x40, 0x66, 0x9f, 0x27, 0xa8, 0x53, 0x48, 0x33, 0x6a, 0x38,
|
||||||
|
0x37, 0x00, 0x93, 0x60, 0x2f, 0x2e, 0x07, 0x00, 0xc1, 0xe6, 0xb0, 0xbf,
|
||||||
|
0x66, 0x43, 0xe1, 0x74, 0x4c, 0xca, 0x22, 0x0d, 0x10, 0x41, 0x5d, 0xf9,
|
||||||
|
0x2c, 0x16, 0xe4, 0xe4, 0x25, 0x91, 0xbf, 0x67, 0x4e, 0x6c, 0x2d, 0x26,
|
||||||
|
0x90, 0xcf, 0x8c, 0x5c, 0x1d, 0x93, 0x25, 0x69, 0xfd, 0xce, 0x38, 0xc1,
|
||||||
|
0x66, 0xd9, 0x24, 0x98, 0xd2, 0x09, 0x04, 0xaa, 0x49, 0x48, 0x0e, 0x1b,
|
||||||
|
0x73, 0x4d, 0x76, 0xf1, 0x63, 0x76, 0xc4, 0x9a, 0x5e, 0x35, 0xe7, 0x9c,
|
||||||
|
0x2c, 0xf6, 0x28, 0x97, 0x9a, 0x14, 0x0e, 0xf5, 0xe2, 0x1b, 0xf6, 0xaf,
|
||||||
|
0x65, 0x56, 0x42, 0xf2, 0x04, 0x7c, 0xfc, 0x31, 0x53, 0xb0, 0x78, 0xf4,
|
||||||
|
0x77, 0x15, 0xf5, 0x3e, 0x0e, 0x8a, 0x97, 0x14, 0xd4, 0x7a, 0x05, 0xfe,
|
||||||
|
0x9c, 0x08, 0x4c, 0x5a, 0x0c, 0x00, 0x4a, 0x9c, 0x6e, 0x9c, 0x59, 0xc0,
|
||||||
|
0x39, 0x53, 0x3b, 0xf9, 0xb0, 0x86, 0x19, 0xb3, 0x59, 0x8c, 0xa5, 0xcf,
|
||||||
|
0x47, 0xba, 0xa1, 0xc1, 0xe4, 0x9e, 0x80, 0x2d, 0x87, 0x30, 0x32, 0x1e,
|
||||||
|
0xa5, 0xbd, 0x84, 0xab, 0xd8, 0xeb, 0xc1, 0x5e, 0xfc, 0x5e, 0x3c, 0x96,
|
||||||
|
0xda, 0xe8, 0x5c, 0x8b, 0x4d, 0x42, 0x37, 0xf5, 0x46, 0x05, 0xf0, 0x09,
|
||||||
|
0x1b, 0x94, 0xe6, 0xe5, 0xdf, 0x35, 0xcc, 0x48, 0x14, 0x91, 0x66, 0x5c,
|
||||||
|
0xe2, 0xfe, 0x98, 0xff, 0x39, 0xed, 0x32, 0x81, 0x75, 0xe3, 0xaf, 0xd3,
|
||||||
|
0x7f, 0xff, 0x00, 0x24, 0x2d, 0x83, 0xdc, 0x54, 0xda, 0xb7, 0xf5, 0x49,
|
||||||
|
0x84, 0x35, 0x63, 0x48, 0x1a, 0x63, 0xf8, 0xe4, 0x23, 0x91, 0x87, 0x1f,
|
||||||
|
0x1a, 0xdc, 0x34, 0x00, 0xe6, 0x12, 0xdf, 0x1d, 0xfe, 0x94, 0x4d, 0xfc,
|
||||||
|
0xf8, 0x4b, 0xf6, 0xe7, 0x54, 0x32, 0xf9, 0xdd, 0x97, 0xb9, 0x2c, 0x5a,
|
||||||
|
0x22, 0x3e, 0x61, 0x91, 0x4a, 0xfe, 0xb8, 0xfd, 0xb3, 0x1f, 0x11, 0x97,
|
||||||
|
0x13, 0xcc, 0xec, 0x37, 0xc9, 0x9f, 0xb2, 0x04, 0x33, 0x12, 0xcd, 0x11,
|
||||||
|
0x06, 0x07, 0x46, 0xca, 0x98, 0x20, 0xe3, 0x71, 0x44, 0xf2, 0xe5, 0x63,
|
||||||
|
0x58, 0x9d, 0x08, 0xc1, 0xe1, 0x84, 0x61, 0x2c, 0x81, 0xbf, 0x65, 0xf6,
|
||||||
|
0x93, 0x66, 0x8b, 0xe4, 0xcb, 0x3b, 0x62, 0xf6, 0xbd, 0x33, 0x85, 0x5b,
|
||||||
|
0x03, 0x7e, 0x91, 0x5f, 0xc2, 0xd8, 0xc1, 0x4a, 0xd8, 0xc4, 0x0d, 0x80,
|
||||||
|
0x10, 0xb5, 0xb3, 0x78, 0x5b, 0x95, 0x4d, 0x12, 0x14, 0xfa, 0xc4, 0x06,
|
||||||
|
0x67, 0x39, 0x0f, 0xc2, 0x9d, 0x8a, 0x26, 0x26, 0x02, 0x79, 0x9a, 0xb0,
|
||||||
|
0x51, 0xdc, 0x3a, 0x3f, 0x53, 0x0c, 0x78, 0x1a, 0xf8, 0x1f, 0x90, 0xd6,
|
||||||
|
0x70, 0xef, 0x98, 0x2b, 0x6d, 0x29, 0xc7, 0x32, 0xbf, 0xfd, 0xe6, 0x32,
|
||||||
|
0xe2, 0x08, 0x6f, 0xe4, 0x13, 0xce, 0x45, 0x85, 0xd0, 0x48, 0x59, 0x5c,
|
||||||
|
0x78, 0x5a, 0xa6, 0x72, 0x45, 0x63, 0x3a, 0x0f, 0xde, 0xce, 0x59, 0xc7,
|
||||||
|
0x4e, 0x6a, 0x3b, 0x69, 0x37, 0x16, 0x73, 0x09, 0xed, 0x9b, 0xe4, 0x07,
|
||||||
|
0x10, 0x3d, 0x58, 0x81, 0x53, 0xc4, 0x0a, 0xc6, 0x5a, 0x68, 0x9d, 0x44,
|
||||||
|
0x06, 0x5e, 0xac, 0x09, 0xc2, 0x7a, 0x03, 0x40, 0x12, 0x9a, 0xf4, 0x14,
|
||||||
|
0x65, 0xdd, 0x4a, 0x47, 0x10, 0x1f, 0x5d, 0x58, 0x16, 0x06, 0x80, 0x81,
|
||||||
|
0xa8, 0xfa, 0x0f, 0x66, 0xa0, 0xef, 0xce, 0x9a, 0xbc, 0x35, 0x9e, 0xb7,
|
||||||
|
0x28, 0x47, 0x44, 0x82, 0x78, 0x02, 0xad, 0x2a, 0x0b, 0x19, 0x7f, 0x13,
|
||||||
|
0xb3, 0x20, 0x4a, 0xd8, 0xd4, 0xd2, 0x96, 0x60, 0xa2, 0x64, 0x48, 0x66,
|
||||||
|
0x65, 0x2b, 0x99, 0xd5, 0x35, 0xde, 0xec, 0xca, 0x14, 0xfb, 0x9d, 0x55,
|
||||||
|
0x7b, 0x62, 0x68, 0x73, 0xf7, 0x82, 0xed, 0x25, 0x92, 0x85, 0x0b, 0xaa,
|
||||||
|
0xc8, 0xf8, 0x1c, 0xb0, 0xb4, 0xcb, 0x58, 0x68, 0x19, 0x2f, 0x61, 0xb3,
|
||||||
|
0x66, 0xde, 0x12, 0x6b, 0x0d, 0xef, 0x5a, 0xb9, 0x47, 0x8a, 0xd5, 0x91,
|
||||||
|
0x41, 0x48, 0x92, 0xdc, 0x0c, 0x03, 0xf5, 0x06, 0xe2, 0xc7, 0xe2, 0x6c,
|
||||||
|
0xc2, 0x80, 0x80, 0x27, 0xec, 0x56, 0x8a, 0x48, 0xb8, 0xc5, 0x32, 0x84,
|
||||||
|
0xd6, 0x09, 0x3b, 0xe3, 0x96, 0xe6, 0x2e, 0xf6, 0x76, 0x3e, 0xff, 0xd5,
|
||||||
|
0x11, 0x03, 0xcf, 0x66, 0xba, 0x84, 0x16, 0x58, 0xe9, 0x43, 0x6e, 0x6e,
|
||||||
|
0x28, 0x47, 0x76, 0x72, 0x95, 0x26, 0x55, 0x59, 0x26, 0xf7, 0xed, 0xd6,
|
||||||
|
0x06, 0xe5, 0xe0, 0x81, 0x2d, 0xd5, 0x15, 0x09, 0x56, 0xdd, 0x78, 0x4b,
|
||||||
|
0x39, 0x81, 0x93, 0xbb, 0x8e, 0x8e, 0x1c, 0x93, 0xc3, 0xbb, 0xbd, 0xeb,
|
||||||
|
0xcc, 0x6d, 0x2e, 0x79, 0xe7, 0x1b, 0x24, 0x79, 0x8c, 0x04, 0x63, 0x27,
|
||||||
|
0xfd, 0x7e, 0x9a, 0x23, 0x1c, 0xac, 0x21, 0x2a, 0x89, 0x5e, 0xa2, 0x98,
|
||||||
|
0x8a, 0x87, 0x2c, 0xa5, 0x10, 0x20, 0x2c, 0xea, 0x15, 0x9a, 0xd7, 0x5c,
|
||||||
|
0x33, 0xb4, 0x88, 0x90, 0x59, 0x33, 0xff, 0x19, 0x9c, 0x7a, 0x54, 0x59,
|
||||||
|
0x78, 0x0f, 0x63, 0x84, 0x40, 0xd2, 0x37, 0xc3, 0x98, 0x6c, 0x05, 0x7c,
|
||||||
|
0x38, 0x01, 0xf6, 0x58, 0x04, 0x7b, 0x8c, 0x53, 0xea, 0xdf, 0x56, 0x14,
|
||||||
|
0x49, 0xe2, 0x54, 0x1d, 0x1d, 0xe7, 0xc8, 0x23, 0x7b, 0x14, 0x44, 0xdb,
|
||||||
|
0x1c, 0x3b, 0xc1, 0x27, 0x9e, 0x12, 0x02, 0xf9, 0x0d, 0x87, 0x73, 0x1b,
|
||||||
|
0x7f, 0xa4, 0x08, 0x2b, 0x17, 0x11, 0xbd, 0xbc, 0xaa, 0x58, 0xfe, 0x24,
|
||||||
|
0xb1, 0xe5, 0x3a, 0x9a, 0xb0, 0x95, 0xb4, 0xe7, 0x47, 0x1c, 0x0e, 0x78,
|
||||||
|
0xf1, 0x35, 0x34, 0x83, 0xcd, 0x6a, 0x53, 0x51, 0x92, 0x7f, 0x2d, 0x65,
|
||||||
|
0x3d, 0x3a, 0xbd, 0x81, 0xd7, 0x60, 0xfa, 0xf4, 0x15, 0xdd, 0x11, 0xd2,
|
||||||
|
0x21, 0x94, 0x86, 0x0f, 0x8a, 0x16, 0x86, 0x69, 0xbe, 0x47, 0x97, 0x7d,
|
||||||
|
0x8e, 0xe2, 0x83, 0x68, 0xf1, 0x34, 0x4f, 0x86, 0x0e, 0xe2, 0xc6, 0x1b,
|
||||||
|
0x2d, 0x51, 0xe5, 0x34, 0x28, 0xf8, 0x41, 0x11, 0xc2, 0xf4, 0x8f, 0x29,
|
||||||
|
0x64, 0x79, 0x2c, 0x08, 0x00, 0xb8, 0x83, 0x2d, 0x66, 0x27, 0x49, 0xc8,
|
||||||
|
0xbb, 0x75, 0xea, 0x87, 0xfe, 0xb1, 0xf0, 0x73, 0xd2, 0x47, 0x93, 0x44,
|
||||||
|
0xb0, 0x0d, 0x64, 0x10, 0x50, 0x73, 0xc0, 0xff, 0x83, 0xba, 0xdd, 0x9c,
|
||||||
|
0xd2, 0x63, 0x8e, 0x92, 0xda, 0x12, 0xfe, 0x17, 0xfe, 0xb2, 0x31, 0x82,
|
||||||
|
0xa7, 0x9c, 0xa3, 0xff, 0x7b, 0xf9, 0x03, 0x7a, 0xd9, 0xe7, 0x74, 0x49,
|
||||||
|
0xd2, 0xf2, 0x5d, 0x5e, 0x97, 0x52, 0xf0, 0xc0, 0x90, 0xa2, 0x50, 0xb3,
|
||||||
|
0x21, 0xd9, 0x42, 0xdb, 0x6c, 0x02, 0x38, 0xb1, 0xac, 0xc6, 0x4a, 0xd3,
|
||||||
|
0xd6, 0xa4, 0x35, 0x3d, 0xef, 0xce, 0xc6, 0xda, 0x02, 0x38, 0xea, 0xa7,
|
||||||
|
0xf8, 0xa1, 0x8e, 0x03, 0xa2, 0xd5, 0x0b, 0x9a, 0x04, 0xa6, 0x40, 0x34,
|
||||||
|
0x58, 0x0d, 0xe9, 0x42, 0x13, 0x30, 0x18, 0x55, 0x1f, 0x33, 0xdb, 0x49,
|
||||||
|
0x0f, 0xb2, 0x15, 0x43, 0x99, 0x18, 0x3e, 0x5a, 0x64, 0xdc, 0x85, 0xc1,
|
||||||
|
0x3b, 0x81, 0x73, 0x64, 0x5b, 0x49, 0x2f, 0x4d, 0xa7, 0x97, 0xff, 0x2e,
|
||||||
|
0x73, 0x7b, 0x09, 0x24, 0x53, 0x90, 0x84, 0x13, 0x9e, 0xef, 0xb1, 0x30,
|
||||||
|
0x93, 0x84, 0x07, 0xc8, 0x2c, 0x0b, 0xb3, 0xb1, 0x2a, 0x44, 0xcc, 0x86,
|
||||||
|
0x3d, 0x7d, 0xfb, 0x91, 0x62, 0xa5, 0xb7, 0xe8, 0x28, 0xa6, 0x84, 0xcc,
|
||||||
|
0xdc, 0xf9, 0x3f, 0x41, 0xa3, 0x91, 0xc1, 0x24, 0x11, 0xeb, 0xbf, 0x11,
|
||||||
|
0x4a, 0x92, 0x90, 0x0d, 0x67, 0x8b, 0x41, 0x24, 0x53, 0xf7, 0xbe, 0xae,
|
||||||
|
0xa1, 0x48, 0x61, 0x3d, 0x8f, 0xcf, 0x2d, 0xdb, 0xfd, 0x1e, 0xc0, 0x89,
|
||||||
|
0x93, 0xf3, 0x0a, 0x49, 0x42, 0xfe, 0xe3, 0x3c, 0x38, 0xf1, 0x17, 0x54,
|
||||||
|
0x4f, 0x67, 0xf8, 0x30, 0xd9, 0x1b, 0x14, 0x65, 0x2e, 0xcc, 0xde, 0xaf,
|
||||||
|
0x2b, 0xd7, 0x2a, 0xef, 0x9f, 0xa7, 0x28, 0x9f, 0xb9, 0xe2, 0xf5, 0xeb,
|
||||||
|
0x7b, 0x27, 0x3b, 0x8b, 0x86, 0x07, 0xca, 0x2a, 0x0c, 0x75, 0x46, 0x66,
|
||||||
|
0x9d, 0xa5, 0x6a, 0x3f, 0x5e, 0xdc, 0x49, 0xcf, 0xbd, 0xa2, 0xff, 0x07,
|
||||||
|
0x79, 0xa4, 0xff, 0x7d, 0xfc, 0x47, 0x6b, 0x34, 0xdc, 0xc7, 0xeb, 0x53,
|
||||||
|
0x65, 0x51, 0x71, 0xda, 0x49, 0x20, 0xea, 0xe5, 0xd3, 0xb0, 0xea, 0x26,
|
||||||
|
0x1b, 0x82, 0xcf, 0x81, 0x2d, 0x8c, 0x47, 0x0a, 0xfe, 0x8a, 0x6c, 0x15,
|
||||||
|
0xc1, 0xc4, 0x47, 0x82, 0x60, 0x01, 0x3c, 0x50, 0x20, 0x5f, 0xef, 0xe3,
|
||||||
|
0xdf, 0xa9, 0xf9, 0x2e, 0xb2, 0xe6, 0xd0, 0xa9, 0xb1, 0x7e, 0x98, 0xcd,
|
||||||
|
0x39, 0x40, 0xe1, 0x2d, 0xb6, 0xe0, 0x70, 0x44, 0xb0, 0x49, 0xa7, 0xea,
|
||||||
|
0xbb, 0xc8, 0xaa, 0xcd, 0x8d, 0x62, 0x28, 0x7f, 0xab, 0x12, 0x6d, 0x0f,
|
||||||
|
0x65, 0xc1, 0x4c, 0x00, 0x72, 0x08, 0xd9, 0xd5, 0x48, 0x60, 0x7c, 0xe2,
|
||||||
|
0xc3, 0x05, 0x7b, 0x43, 0x60, 0x83, 0xd2, 0x38, 0x5a, 0xf7, 0x66, 0xfc,
|
||||||
|
0x3c, 0x16, 0x12, 0x0e, 0x1f, 0xc8, 0x62, 0x6d, 0x91, 0x6c, 0xd2, 0x7a,
|
||||||
|
0x68, 0x53, 0x04, 0xfc, 0x05, 0x1c, 0x6d, 0xa9, 0xcb, 0xf5, 0xe0, 0x54,
|
||||||
|
0x08, 0xf8, 0xdf, 0x06, 0xf6, 0x18, 0xbb, 0x69, 0x49, 0xde, 0x70, 0xc2,
|
||||||
|
0x21, 0x12, 0x5c, 0xca, 0xd0, 0x79, 0xc8, 0x49, 0x65, 0x6d, 0x46, 0xf0,
|
||||||
|
0xf4, 0xa0, 0x67, 0xf8, 0x3b, 0x68, 0x01, 0x83, 0x24, 0x89, 0x38, 0xe6,
|
||||||
|
0xc4, 0x2d, 0x8f, 0x32, 0x1e, 0xeb, 0xc8, 0xb8, 0xc6, 0x15, 0x7e, 0x68,
|
||||||
|
0x9a, 0xa6, 0x0b, 0x03, 0x3f, 0x25, 0x35, 0x11, 0x1a, 0x52, 0xe4, 0x99,
|
||||||
|
0x02, 0x77, 0x0a, 0xe0, 0x20, 0x6c, 0xd0, 0x61, 0x78, 0xb4, 0xe4, 0xd8,
|
||||||
|
0xcb, 0x31, 0x51, 0x3c, 0xce, 0xb0, 0x3b, 0x65, 0xdf, 0x32, 0x09, 0xda,
|
||||||
|
0x1b, 0x94, 0xeb, 0xa4, 0xbb, 0xf6, 0x06, 0x30, 0x40, 0xf9, 0x9e, 0x22,
|
||||||
|
0x8c, 0x40, 0x3a, 0xc4, 0xe4, 0x1b, 0x66, 0xf0, 0xbf, 0x72, 0xfe, 0xf4,
|
||||||
|
0x69, 0xdd, 0xf9, 0xbc, 0xbc, 0xc6, 0x37, 0x39, 0xa9, 0xf7, 0x16, 0xe2,
|
||||||
|
0xe8, 0xd2, 0x2a, 0x4d, 0x36, 0x5a, 0xd2, 0x0c, 0xbe, 0x1b, 0x15, 0x8c,
|
||||||
|
0x44, 0x01, 0xea, 0x35, 0x53, 0x05, 0x80, 0xd3, 0x13, 0x36, 0x89, 0x04,
|
||||||
|
0x21, 0xce, 0xd0, 0xbd, 0x8d, 0xe4, 0x77, 0x2c, 0x7b, 0x48, 0x4c, 0x2c,
|
||||||
|
0x05, 0x4f, 0x29, 0xb2, 0xc1, 0x04, 0x36, 0xde, 0x52, 0x16, 0x48, 0xab,
|
||||||
|
0xc0, 0xd1, 0xfa, 0x84, 0xdf, 0x92, 0xe8, 0x69, 0xcb, 0x35, 0x2d, 0xe3,
|
||||||
|
0xc9, 0xc4, 0xd3, 0x36, 0xc5, 0xc8, 0x62, 0x05, 0x55, 0xe8, 0xd1, 0x52,
|
||||||
|
0x73, 0x0b, 0xc9, 0xd3, 0x4e, 0x80, 0x5b, 0x8f, 0x65, 0x13, 0x12, 0x01,
|
||||||
|
0x90, 0x38, 0xd3, 0x93, 0x37, 0x12, 0x36, 0xd5, 0x90, 0xdc, 0x10, 0xae,
|
||||||
|
0x5a, 0x70, 0xa4, 0xc5, 0x0d, 0x41, 0xa3, 0x0d, 0xbb, 0x2e, 0xac, 0xb3,
|
||||||
|
0x80, 0xe2, 0x59, 0x88, 0x2d, 0x9d, 0x69, 0x8e, 0xa0, 0xd8, 0xf9, 0x3a,
|
||||||
|
0x19, 0x51, 0x16, 0xe7, 0xe6, 0x41, 0xb1, 0x55, 0x7a, 0xd2, 0xc9, 0x52,
|
||||||
|
0xa6, 0x53, 0xaf, 0xc3, 0xf8, 0x80, 0x2d, 0x5f, 0x95, 0x9b, 0x90, 0x93,
|
||||||
|
0xa4, 0x3e, 0x80, 0xb0, 0x89, 0xd1, 0x64, 0x38, 0x4d, 0x92, 0x46, 0xfe,
|
||||||
|
0x69, 0xd6, 0xbf, 0x69, 0x4d, 0xa0, 0xe3, 0x5b, 0x78, 0x59, 0xe3, 0x60,
|
||||||
|
0x8f, 0xd6, 0x63, 0xe3, 0xd6, 0xcd, 0x92, 0xf7, 0xda, 0x39, 0x46, 0x21,
|
||||||
|
0x09, 0xaf, 0xd7, 0x1c, 0x3f, 0x63, 0x28, 0x8a, 0x7d, 0xc0, 0x8c, 0x3c,
|
||||||
|
0xc1, 0x45, 0x46, 0x36, 0x00, 0xf2, 0xfe, 0x21, 0xe4, 0xec, 0x8f, 0xda,
|
||||||
|
0xb7, 0x77, 0x3e, 0xc7, 0x74, 0xec, 0x5d, 0x52, 0x96, 0xf9, 0xfa, 0x6b,
|
||||||
|
0x47, 0x1d, 0x66, 0xb3, 0xd6, 0x33, 0xe6, 0xce, 0xfa, 0xcd, 0xae, 0x1d,
|
||||||
|
0x31, 0x04, 0xef, 0xd5, 0x83, 0x97, 0xd4, 0x87, 0x8d, 0x5e, 0xd8, 0x77,
|
||||||
|
0x07, 0x34, 0x4b, 0x07, 0x7f, 0xfa, 0xe8, 0x26, 0x0d, 0xc5, 0xd8, 0xc9,
|
||||||
|
0x27, 0xfa, 0xa4, 0xc0, 0xbc, 0xb5, 0x41, 0xf1, 0x97, 0x67, 0x27, 0x49,
|
||||||
|
0xcb, 0xaf, 0x19, 0xdc, 0x58, 0xdc, 0x98, 0xbe, 0xeb, 0xf3, 0xf5, 0xc2,
|
||||||
|
0xd9, 0xb5, 0x4e, 0x86, 0xf7, 0x6f, 0x48, 0xcf, 0x92, 0xf6, 0x23, 0xdd,
|
||||||
|
0xe5, 0x1a, 0x9e, 0x9d, 0x9d, 0x9b, 0xb8, 0xaa, 0xfb, 0xdb, 0xfd, 0xa2,
|
||||||
|
0x25, 0x6b, 0x9a, 0xf0, 0xed, 0xf3, 0x8c, 0x6f, 0x73, 0x8c, 0x70, 0x04,
|
||||||
|
0xb9, 0x05, 0x2b, 0xb9, 0x04, 0xcd, 0xb0, 0xdb, 0x6b, 0x12, 0x03, 0xcd,
|
||||||
|
0xf4, 0xf7, 0x26, 0xa0, 0x28, 0xc9, 0xcd, 0x49, 0x28, 0x09, 0x9c, 0x02,
|
||||||
|
0x69, 0xd1, 0xb2, 0x0d, 0xdf, 0x41, 0x9f, 0x04, 0xd9, 0x9b, 0x04, 0x98,
|
||||||
|
0xfc, 0x11, 0x7c, 0x1d, 0x03, 0x3c, 0x7c, 0xa7, 0x52, 0xc1, 0x9c, 0x32,
|
||||||
|
0x21, 0x62, 0xd1, 0xfa, 0x51, 0xfc, 0xf9, 0x28, 0x14, 0xa0, 0x26, 0x05,
|
||||||
|
0x56, 0x89, 0xb8, 0xd8, 0x74, 0xc0, 0x27, 0xd6, 0x71, 0x66, 0xbf, 0xb9,
|
||||||
|
0x9b, 0xb8, 0x40, 0x3e, 0x34, 0x5a, 0x22, 0x24, 0xb0, 0xeb, 0x31, 0x7f,
|
||||||
|
0xe2, 0xb8, 0x29, 0x9e, 0x49, 0x5a, 0x74, 0x03, 0x73, 0x94, 0x8f, 0x72,
|
||||||
|
0x80, 0xdc, 0xfa, 0x9d, 0x3b, 0x4a, 0x36, 0xc4, 0x44, 0x36, 0x18, 0x84,
|
||||||
|
0x3f, 0x75, 0xf7, 0xfc, 0x9a, 0xe3, 0x45, 0x18, 0x83, 0x9c, 0x11, 0x7a,
|
||||||
|
0xd3, 0xa1, 0x1c, 0x7d, 0x21, 0x1a, 0x20, 0x36, 0x80, 0x05, 0x7d, 0x0d,
|
||||||
|
0x38, 0x72, 0x38, 0x7c, 0x0d, 0x67, 0xaf, 0x0f, 0x43, 0x6a, 0xc8, 0xa9,
|
||||||
|
0x9d, 0xe8, 0x1a, 0x29, 0xa2, 0xea, 0x4e, 0x8f, 0xac, 0x50, 0xe4, 0x88,
|
||||||
|
0x2a, 0x3e, 0xaa, 0x99, 0x28, 0x78, 0x55, 0x8d, 0xaa, 0xd1, 0xa3, 0x9a,
|
||||||
|
0x5f, 0x06, 0x38, 0x76, 0x06, 0x35, 0xf1, 0xb2, 0x71, 0x8e, 0xd1, 0x5a,
|
||||||
|
0x08, 0xa6, 0x8b, 0xdb, 0xd8, 0xeb, 0x24, 0xa6, 0xfc, 0x67, 0x76, 0x3b,
|
||||||
|
0x5c, 0xb5, 0x8d, 0xea, 0x28, 0x35, 0xaa, 0x66, 0x22, 0x8e, 0x23, 0x6a,
|
||||||
|
0x44, 0x5e, 0xf9, 0x8b, 0xb4, 0x6b, 0x4c, 0x45, 0xdd, 0x7d, 0x12, 0xda,
|
||||||
|
0x35, 0x5d, 0x58, 0x4a, 0xf6, 0x6e, 0x69, 0xf9, 0xf7, 0x87, 0xb6, 0x72,
|
||||||
|
0x5b, 0x64, 0x2f, 0xca, 0x7f, 0xbe, 0x8b, 0xd2, 0x82, 0x5a, 0xda, 0xb0,
|
||||||
|
0xff, 0xb0, 0x92, 0x67, 0x42, 0xb5, 0x0a, 0xdd, 0x93, 0x6a, 0x9e, 0x4c,
|
||||||
|
0xaa, 0xc1, 0x29, 0xd5, 0x06, 0x4e, 0x93, 0xd8, 0x72, 0xe3, 0xde, 0x32,
|
||||||
|
0x65, 0x84, 0x7c, 0x05, 0x8e, 0x88, 0x05, 0x25, 0x01, 0x7a, 0x1f, 0xba,
|
||||||
|
0xf9, 0xfb, 0xf1, 0xb1, 0x45, 0xd4, 0xc6, 0x6f, 0xf0, 0x14, 0x5b, 0xe8,
|
||||||
|
0xa1, 0x2d, 0x9c, 0xb9, 0xac, 0x8c, 0xcc, 0xae, 0x0d, 0x98, 0x8a, 0xd3,
|
||||||
|
0xf7, 0xa4, 0xf2, 0x2d, 0x07, 0xfa, 0xa3, 0x8f, 0xf4, 0x07, 0x00, 0x99,
|
||||||
|
0x8f, 0x3a, 0xe3, 0x1f, 0xe8, 0xfa, 0x37, 0x99, 0x6c, 0x94, 0xe1, 0x7e,
|
||||||
|
0x8c, 0xf9, 0xc6, 0x35, 0xe2, 0x50, 0x79, 0x3e, 0xcc, 0xa0, 0x3f, 0xc8,
|
||||||
|
0xac, 0xff, 0x2c, 0xe3, 0x8e, 0x65, 0xe2, 0x96, 0xa1, 0xfb, 0x9e, 0x63,
|
||||||
|
0x78, 0xc4, 0xf0, 0x79, 0xc5, 0x49, 0xd0, 0xdb, 0x67, 0x88, 0xff, 0x8c,
|
||||||
|
0x0b, 0x1c, 0x64, 0xe0, 0x39, 0x2d, 0x7c, 0xcc, 0x91, 0x72, 0xf3, 0xe6,
|
||||||
|
0x86, 0x49, 0x75, 0xdd, 0x01, 0xf2, 0x6a, 0xad, 0x55, 0x1b, 0xd4, 0xde,
|
||||||
|
0x71, 0x84, 0x3c, 0xa8, 0x38, 0x30, 0x99, 0xca, 0xc8, 0x8e, 0xca, 0xff,
|
||||||
|
0x4c, 0x97, 0x92, 0xcb, 0xf1, 0x60, 0x0c, 0x1a, 0xc9, 0x18, 0x81, 0xb5,
|
||||||
|
0x6f, 0x74, 0x38, 0x27, 0xd4, 0xe1, 0x44, 0xac, 0x1c, 0xce, 0xfb, 0x9d,
|
||||||
|
0x1f, 0xb0, 0x69, 0xc3, 0xba, 0x3b, 0xd4, 0xb9, 0xc4, 0xbe, 0x02, 0x14,
|
||||||
|
0x50, 0x89, 0x69, 0xba, 0xde, 0x06, 0xe3, 0x1b, 0x93, 0x1b, 0x2b, 0xbe,
|
||||||
|
0x61, 0x91, 0x6e, 0x88, 0x81, 0x4b, 0xcc, 0xa0, 0x51, 0xa3, 0xd7, 0x08,
|
||||||
|
0x70, 0x2c, 0xfe, 0x1d, 0x5c, 0xde, 0x38, 0x61, 0xc9, 0xb1, 0x54, 0x9a,
|
||||||
|
0xc6, 0x8a, 0xb6, 0x09, 0x79, 0x2e, 0xd1, 0x38, 0xdd, 0xe9, 0x11, 0x60,
|
||||||
|
0x42, 0x33, 0xac, 0x1e, 0xf1, 0xaa, 0x25, 0xae, 0xb7, 0xa3, 0x16, 0x42,
|
||||||
|
0x62, 0x90, 0xa3, 0x0d, 0x67, 0xae, 0xc9, 0xcb, 0xc2, 0xec, 0xdb, 0xa3,
|
||||||
|
0xd4, 0xe2, 0xd3, 0xe4, 0x45, 0x63, 0x69, 0xc0, 0x87, 0x42, 0xf8, 0x5a,
|
||||||
|
0xa9, 0x74, 0xe0, 0x06, 0xcd, 0xb4, 0x05, 0x70, 0x75, 0xb8, 0x83, 0x5d,
|
||||||
|
0xa7, 0xe3, 0xc4, 0x3f, 0xd0, 0x9d, 0x61, 0x48, 0x28, 0x92, 0x7b, 0x92,
|
||||||
|
0x12, 0x27, 0xca, 0xec, 0x87, 0xdc, 0x5b, 0xf8, 0xc0, 0x28, 0x93, 0x2c,
|
||||||
|
0x2e, 0xfc, 0x3c, 0x32, 0x23, 0xd0, 0xd0, 0xfd, 0x51, 0xd4, 0xca, 0xc2,
|
||||||
|
0x46, 0xa0, 0xeb, 0x8c, 0xf5, 0xf0, 0x77, 0xba, 0x0b, 0xfc, 0x8e, 0x7b,
|
||||||
|
0xe4, 0xe8, 0xc5, 0xde, 0xf5, 0x48, 0xbc, 0x0b, 0x87, 0xff, 0x15, 0x56,
|
||||||
|
0x13, 0xeb, 0xc1, 0x01, 0xe0, 0x95, 0x08, 0x91, 0xab, 0x10, 0x3d, 0xba,
|
||||||
|
0x4a, 0x9d, 0xaa, 0x6f, 0x59, 0x6d, 0x29, 0xf2, 0xab, 0x16, 0x3c, 0x54,
|
||||||
|
0x0a, 0xdc, 0xb1, 0x71, 0x7c, 0x86, 0x65, 0xf1, 0x04, 0xcd, 0xe7, 0x5d,
|
||||||
|
0x83, 0xd6, 0x42, 0x2f, 0x82, 0x7a, 0x73, 0x9f, 0x49, 0xb3, 0x14, 0x06,
|
||||||
|
0x12, 0xb9, 0x1d, 0x96, 0xb5, 0xae, 0x82, 0x04, 0xf1, 0x49, 0x23, 0x01,
|
||||||
|
0xfc, 0xe7, 0xcf, 0xfc, 0xcc, 0x47, 0x8e, 0x8f, 0xe4, 0x46, 0x0e, 0xc9,
|
||||||
|
0xc0, 0x0b, 0x34, 0x41, 0x8a, 0xed, 0x8b, 0xc8, 0x33, 0x18, 0xbc, 0x51,
|
||||||
|
0x1c, 0xe2, 0xaf, 0xb5, 0x1c, 0xba, 0x6f, 0x34, 0x43, 0xea, 0xd8, 0x56,
|
||||||
|
0x9b, 0x43, 0xc9, 0x14, 0xd2, 0x36, 0xa4, 0xa4, 0x17, 0x87, 0x0e, 0x91,
|
||||||
|
0x80, 0x20, 0xce, 0x88, 0x76, 0xfc, 0x31, 0x76, 0x71, 0x47, 0xee, 0x3a,
|
||||||
|
0x73, 0xcf, 0x03, 0xaa, 0xe0, 0x8d, 0x0f, 0x59, 0xfc, 0x60, 0xdf, 0x92,
|
||||||
|
0xf0, 0xc8, 0x93, 0xcb, 0xa9, 0x70, 0x61, 0xec, 0x5f, 0x7e, 0x51, 0xd6,
|
||||||
|
0x35, 0xb1, 0x45, 0x4b, 0x62, 0xbb, 0xb8, 0x34, 0x83, 0xef, 0xb2, 0x11,
|
||||||
|
0x97, 0xfb, 0xa7, 0xc4, 0x4a, 0x7f, 0xc1, 0x2d, 0x3c, 0x8c, 0x51, 0x96,
|
||||||
|
0x94, 0x51, 0xe2, 0x47, 0x5c, 0x00, 0xd7, 0xf0, 0x9e, 0x89, 0x34, 0x87,
|
||||||
|
0xd4, 0x7e, 0x5e, 0x92, 0xb1, 0x82, 0xaa, 0x0f, 0xb9, 0x95, 0x97, 0xcb,
|
||||||
|
0xc1, 0x08, 0x8c, 0x0a, 0x25, 0x3e, 0xc8, 0x7a, 0x36, 0xdf, 0x42, 0x8a,
|
||||||
|
0x71, 0x17, 0xe6, 0x4d, 0x37, 0x6a, 0xac, 0x7b, 0x32, 0xf1, 0x02, 0x36,
|
||||||
|
0x4a, 0x07, 0x94, 0x46, 0xdf, 0x46, 0x90, 0xd8, 0x68, 0xb7, 0xf4, 0x7c,
|
||||||
|
0x40, 0x00, 0x8f, 0xf5, 0x2d, 0xaa, 0x2c, 0x00, 0x12, 0x46, 0xf6, 0x61,
|
||||||
|
0x18, 0xd3, 0x90, 0xf4, 0x75, 0x43, 0x80, 0x84, 0x32, 0x53, 0x74, 0xa9,
|
||||||
|
0xd1, 0x23, 0xbd, 0x6f, 0xb1, 0xfa, 0x18, 0x76, 0x1f, 0xe8, 0x73, 0x8c,
|
||||||
|
0xbf, 0x3e, 0x9c, 0xa3, 0x4c, 0xb9, 0x62, 0xb8, 0x78, 0x51, 0x1c, 0x71,
|
||||||
|
0x86, 0x7e, 0x5f, 0xfa, 0xf9, 0x89, 0x1d, 0x59, 0x58, 0xdd, 0x81, 0x7b,
|
||||||
|
0xbb, 0x0f, 0xfc, 0x10, 0x8d, 0x61, 0x1d, 0xb7, 0x15, 0x01, 0x54, 0x0c,
|
||||||
|
0x5e, 0x31, 0x37, 0x83, 0x5f, 0xa6, 0x63, 0x76, 0x08, 0xbb, 0x7a, 0x63,
|
||||||
|
0x00, 0x53, 0x81, 0x09, 0x8a, 0x67, 0x05, 0x0c, 0x4b, 0xbe, 0x83, 0xc0,
|
||||||
|
0x5f, 0x12, 0x43, 0xe9, 0x93, 0x03, 0x2f, 0x22, 0x99, 0x97, 0xce, 0xe8,
|
||||||
|
0x4b, 0x7a, 0x56, 0x36, 0x68, 0x14, 0x3b, 0x97, 0x3a, 0xea, 0x2b, 0x63,
|
||||||
|
0x63, 0x00, 0xef, 0x50, 0x49, 0x10, 0x15, 0x6c, 0xc4, 0x00, 0xd0, 0x3e,
|
||||||
|
0x24, 0xbf, 0x13, 0x85, 0x50, 0xa6, 0x4f, 0xe1, 0x90, 0x84, 0x04, 0xff,
|
||||||
|
0x8c, 0x12, 0x8f, 0xdf, 0x3b, 0xda, 0x82, 0x79, 0xc9, 0xa2, 0x1b, 0x04,
|
||||||
|
0xee, 0xc3, 0x16, 0xc8, 0x05, 0x2c, 0xc1, 0x8d, 0x36, 0xb9, 0xad, 0x95,
|
||||||
|
0xb0, 0x76, 0x3d, 0xfc, 0x86, 0xa7, 0xcc, 0x66, 0x70, 0x95, 0x41, 0xcf,
|
||||||
|
0xc2, 0x92, 0xa4, 0x42, 0x7f, 0x27, 0xbc, 0x46, 0x84, 0x5d, 0xcd, 0x21,
|
||||||
|
0xb3, 0xa5, 0x73, 0x8f, 0xc8, 0x04, 0xd8, 0x4a, 0x7b, 0x00, 0x46, 0x30,
|
||||||
|
0xe3, 0x37, 0x11, 0xbc, 0x5e, 0xeb, 0x79, 0x21, 0xca, 0x00, 0x59, 0x31,
|
||||||
|
0x34, 0x29, 0xd3, 0xdf, 0x4a, 0xe3, 0xf7, 0x4c, 0xf1, 0xf0, 0x6c, 0x62,
|
||||||
|
0x41, 0xd1, 0x8b, 0x17, 0x11, 0x47, 0xa7, 0x87, 0xce, 0x3a, 0xcc, 0xbc,
|
||||||
|
0xb0, 0xe8, 0x4f, 0x2e, 0x78, 0xbd, 0x7c, 0xda, 0x56, 0x9d, 0x35, 0xa4,
|
||||||
|
0x60, 0xf7, 0x96, 0x25, 0x1e, 0xdf, 0x6f, 0x62, 0xbe, 0xd6, 0xb0, 0x59,
|
||||||
|
0x77, 0x64, 0xfc, 0x4a, 0x5a, 0xa2, 0x0a, 0xc7, 0xda, 0xde, 0xa1, 0x14,
|
||||||
|
0x08, 0x0f, 0x94, 0x57, 0x28, 0xe5, 0x36, 0xa8, 0x94, 0xdb, 0x37, 0x2a,
|
||||||
|
0x25, 0xc4, 0x80, 0xf0, 0xc3, 0x25, 0x30, 0xd4, 0xe6, 0x64, 0x48, 0x47,
|
||||||
|
0x6b, 0x50, 0x80, 0xd9, 0x23, 0x1d, 0xff, 0x37, 0xa8, 0x46, 0x43, 0xaf,
|
||||||
|
0x52, 0x4d, 0x7f, 0x2a, 0x8e, 0x8d, 0x10, 0x05, 0xd1, 0x8a, 0x3f, 0x57,
|
||||||
|
0x4d, 0x1a, 0xfa, 0x38, 0x35, 0x99, 0x9e, 0xd2, 0x0a, 0x54, 0xc3, 0x8f,
|
||||||
|
0xa9, 0xb8, 0x92, 0xd9, 0xa1, 0x2b, 0x3e, 0x2b, 0x98, 0xb6, 0xea, 0x8e,
|
||||||
|
0xde, 0x14, 0x1c, 0xc7, 0x0e, 0x53, 0x3f, 0xc2, 0xb5, 0x46, 0x4a, 0xfe,
|
||||||
|
0xe2, 0x5b, 0x55, 0x9b, 0x0d, 0x38, 0xeb, 0x6a, 0xdf, 0x84, 0xa6, 0xc8,
|
||||||
|
0x65, 0x38, 0xa8, 0xd5, 0xc2, 0x07, 0x7d, 0xbd, 0x77, 0x97, 0xf1, 0x3f,
|
||||||
|
0x1d, 0xa4, 0x79, 0x7e, 0xf1, 0xbf, 0xb3, 0x48, 0x33, 0x70, 0x39, 0x18,
|
||||||
|
0x13, 0x1c, 0x29, 0x06, 0x15, 0xf3, 0x64, 0x4b, 0x38, 0x3b, 0xd5, 0x10,
|
||||||
|
0xce, 0xf2, 0xa9, 0x12, 0x30, 0x9d, 0xc8, 0xfd, 0xf8, 0xdd, 0xd7, 0x3f,
|
||||||
|
0xa7, 0x60, 0x69, 0x7c, 0x02, 0x5f, 0xc9, 0x13, 0xf8, 0xf1, 0xf5, 0xcf,
|
||||||
|
0xdf, 0x24, 0x73, 0x13, 0x31, 0xed, 0xf4, 0xc4, 0x2c, 0x0d, 0x6f, 0x55,
|
||||||
|
0x4b, 0xd3, 0x17, 0x1e, 0x30, 0xcf, 0xa4, 0xb9, 0x1f, 0xa1, 0xe4, 0x67,
|
||||||
|
0xa0, 0x4d, 0x0a, 0x8f, 0xcc, 0x8e, 0x0e, 0x06, 0xe2, 0x9e, 0x5c, 0x80,
|
||||||
|
0x1d, 0x74, 0xa4, 0x09, 0x09, 0xf2, 0xc2, 0x01, 0xf3, 0x27, 0xd6, 0x99,
|
||||||
|
0xf9, 0x93, 0xce, 0x36, 0xc1, 0x2b, 0xd6, 0x9e, 0xbd, 0xcc, 0x04, 0x8b,
|
||||||
|
0x8b, 0x58, 0xcb, 0xe7, 0x39, 0xe0, 0x61, 0x2f, 0xb0, 0x62, 0xe7, 0xe6,
|
||||||
|
0x2f, 0x80, 0xc7, 0x68, 0x01, 0x2c, 0x53, 0x6f, 0xc7, 0x39, 0xba, 0x76,
|
||||||
|
0xf6, 0xbc, 0x21, 0x8b, 0x5e, 0x05, 0xc6, 0x5d, 0xa8, 0x1f, 0x42, 0x52,
|
||||||
|
0x4b, 0x90, 0xef, 0x74, 0x88, 0x49, 0x94, 0xb9, 0x30, 0x96, 0x20, 0x7f,
|
||||||
|
0x83, 0x47, 0x7d, 0x8e, 0xbb, 0xe3, 0x96, 0x90, 0x9e, 0x19, 0xe9, 0x39,
|
||||||
|
0x6c, 0x05, 0xdb, 0xd9, 0xed, 0xec, 0x01, 0xfe, 0x95, 0x85, 0xa5, 0xb9,
|
||||||
|
0xfb, 0xc5, 0xe8, 0xae, 0xc5, 0x39, 0xec, 0xb9, 0xe3, 0x64, 0x96, 0x71,
|
||||||
|
0xc2, 0xce, 0x8d, 0x71, 0x66, 0x9f, 0xfd, 0xd6, 0x69, 0x1a, 0xb3, 0x61,
|
||||||
|
0xbd, 0x7f, 0xfd, 0x18, 0x9f, 0xcc, 0x63, 0x14, 0x7a, 0xbb, 0x9a, 0x75,
|
||||||
|
0xf7, 0xff, 0x11, 0x6b, 0x32, 0x09, 0x47, 0xf5, 0x18, 0x11, 0x2a, 0x2d,
|
||||||
|
0x11, 0x31, 0x29, 0x28, 0xf3, 0xd5, 0x62, 0xa9, 0x43, 0x6b, 0xcc, 0x1e,
|
||||||
|
0x09, 0xad, 0xb3, 0x22, 0x4d, 0xfb, 0xfa, 0xb3, 0x75, 0xa1, 0x99, 0xbc,
|
||||||
|
0x28, 0xd8, 0x8b, 0x22, 0x92, 0x9b, 0xe1, 0x18, 0xcb, 0x7b, 0x57, 0xdc,
|
||||||
|
0x44, 0xdd, 0xf2, 0xa0, 0x6e, 0x01, 0x2a, 0x45, 0xa0, 0xe2, 0x62, 0x29,
|
||||||
|
0xe1, 0x45, 0xf4, 0x39, 0xfa, 0x42, 0xfa, 0x3f, 0x00, 0x33, 0xfc, 0x14,
|
||||||
|
0xf6, 0xa1, 0x5e, 0x00, 0x00
|
||||||
|
};
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,92 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Example of adding the example: https://github.com/kitesurfer1404/WS2812FX/blob/master/examples/ws2812fx_custom_FastLED/ws2812fx_custom_FastLED.ino
|
||||||
|
as a custom effect
|
||||||
|
|
||||||
|
More info on how to create custom aniamtions for WS2812FX: https://github.com/kitesurfer1404/WS2812FX/blob/master/extras/WS2812FX%20Users%20Guide.md#custom-effects
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <FastLED.h> //https://github.com/FastLED/FastLED
|
||||||
|
|
||||||
|
/*
|
||||||
|
* paste in the Fire2012 code with a small edit at the end which uses the
|
||||||
|
* setPixelColor() function to copy the color data to the ws2812fx instance.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Fire2012 by Mark Kriegsman, July 2012
|
||||||
|
// as part of "Five Elements" shown here: http://youtu.be/knWiGsmgycY
|
||||||
|
////
|
||||||
|
// This basic one-dimensional 'fire' simulation works roughly as follows:
|
||||||
|
// There's a underlying array of 'heat' cells, that model the temperature
|
||||||
|
// at each point along the line. Every cycle through the simulation,
|
||||||
|
// four steps are performed:
|
||||||
|
// 1) All cells cool down a little bit, losing heat to the air
|
||||||
|
// 2) The heat from each cell drifts 'up' and diffuses a little
|
||||||
|
// 3) Sometimes randomly new 'sparks' of heat are added at the bottom
|
||||||
|
// 4) The heat from each cell is rendered as a color into the leds array
|
||||||
|
// The heat-to-color mapping uses a black-body radiation approximation.
|
||||||
|
//
|
||||||
|
// Temperature is in arbitrary units from 0 (cold black) to 255 (white hot).
|
||||||
|
//
|
||||||
|
// This simulation scales it self a bit depending on NUM_LEDS; it should look
|
||||||
|
// "OK" on anywhere from 20 to 100 LEDs without too much tweaking.
|
||||||
|
//
|
||||||
|
// I recommend running this simulation at anywhere from 30-100 frames per second,
|
||||||
|
// meaning an interframe delay of about 10-35 milliseconds.
|
||||||
|
//
|
||||||
|
// Looks best on a high-density LED setup (60+ pixels/meter).
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// There are two main parameters you can play with to control the look and
|
||||||
|
// feel of your fire: COOLING (used in step 1 above), and SPARKING (used
|
||||||
|
// in step 3 above).
|
||||||
|
//
|
||||||
|
// COOLING: How much does the air cool as it rises?
|
||||||
|
// Less cooling = taller flames. More cooling = shorter flames.
|
||||||
|
// Default 50, suggested range 20-100
|
||||||
|
#define COOLING 70
|
||||||
|
|
||||||
|
// SPARKING: What chance (out of 255) is there that a new spark will be lit?
|
||||||
|
// Higher chance = more roaring fire. Lower chance = more flickery fire.
|
||||||
|
// Default 120, suggested range 50-200.
|
||||||
|
#define SPARKING 120
|
||||||
|
|
||||||
|
bool gReverseDirection = false;
|
||||||
|
|
||||||
|
void Fire2012() {
|
||||||
|
// Array of temperature readings at each simulation cell
|
||||||
|
|
||||||
|
// Step 1. Cool down every cell a little
|
||||||
|
for( uint16_t i = 0; i < WS2812FXStripSettings.stripSize; i++) {
|
||||||
|
ledstates[i] = qsub8( ledstates[i], random8(0, ((COOLING * 10) / WS2812FXStripSettings.stripSize) + 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 2. Heat from each cell drifts 'up' and diffuses a little
|
||||||
|
for( uint16_t k= WS2812FXStripSettings.stripSize - 1; k >= 2; k--) {
|
||||||
|
ledstates[k] = (ledstates[k - 1] + ledstates[k - 2] + ledstates[k - 2]) / 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 3. Randomly ignite new 'sparks' of heat near the bottom
|
||||||
|
if( random8() < SPARKING ) {
|
||||||
|
uint8_t y = random8(7);
|
||||||
|
ledstates[y] = qadd8(ledstates[y], random8(160,255) );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 4. Map from heat cells to LED colors
|
||||||
|
for( uint16_t j = 0; j < WS2812FXStripSettings.stripSize; j++) {
|
||||||
|
CRGB color = HeatColor( ledstates[j]);
|
||||||
|
uint16_t pixelnumber;
|
||||||
|
if( gReverseDirection ) {
|
||||||
|
pixelnumber = (WS2812FXStripSettings.stripSize - 1) - j;
|
||||||
|
} else {
|
||||||
|
pixelnumber = j;
|
||||||
|
}
|
||||||
|
strip->setPixelColor(pixelnumber, color.red, color.green, color.blue, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t myCustomEffect0() {
|
||||||
|
Fire2012();
|
||||||
|
return (strip->getSpeed() / WS2812FXStripSettings.stripSize);
|
||||||
|
}
|
||||||
@@ -2,20 +2,19 @@
|
|||||||
// TV mode
|
// TV mode
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
int dipInterval = 10;
|
uint8_t dipInterval = 10;
|
||||||
int darkTime = 250;
|
uint16_t darkTime = 250;
|
||||||
unsigned long currentDipTime;
|
unsigned long currentDipTime;
|
||||||
unsigned long dipStartTime;
|
unsigned long dipStartTime;
|
||||||
unsigned long currentMillis;
|
unsigned long currentMillis;
|
||||||
int ledState = LOW;
|
uint8_t ledState = LOW;
|
||||||
long previousMillis = 0;
|
long previousMillis = 0;
|
||||||
int led = 5;
|
uint16_t led = 5;
|
||||||
int interval = 2000;
|
uint16_t interv = 2000;
|
||||||
int twitch = 50;
|
uint8_t twitch = 50;
|
||||||
int dipCount = 0;
|
uint8_t dipCount = 0;
|
||||||
int analogLevel = 100;
|
uint8_t analogLevel = 100;
|
||||||
boolean timeToDip = false;
|
boolean timeToDip = false;
|
||||||
int ledStates[NUMLEDS];
|
|
||||||
|
|
||||||
|
|
||||||
void hsb2rgbAN1(uint16_t index, uint8_t sat, uint8_t bright, uint8_t myled) {
|
void hsb2rgbAN1(uint16_t index, uint8_t sat, uint8_t bright, uint8_t myled) {
|
||||||
@@ -24,17 +23,17 @@ void hsb2rgbAN1(uint16_t index, uint8_t sat, uint8_t bright, uint8_t myled) {
|
|||||||
temp[0] = temp[3] = (uint8_t)(( (sat ^ 255) * bright) / 255);
|
temp[0] = temp[3] = (uint8_t)(( (sat ^ 255) * bright) / 255);
|
||||||
temp[1] = temp[4] = (uint8_t)((((( (index & 255) * sat) / 255) + (sat ^ 255)) * bright) / 255);
|
temp[1] = temp[4] = (uint8_t)((((( (index & 255) * sat) / 255) + (sat ^ 255)) * bright) / 255);
|
||||||
temp[2] = (uint8_t)(((((((index & 255) ^ 255) * sat) / 255) + (sat ^ 255)) * bright) / 255);
|
temp[2] = (uint8_t)(((((((index & 255) ^ 255) * sat) / 255) + (sat ^ 255)) * bright) / 255);
|
||||||
strip.setPixelColor(myled, temp[n + 2], temp[n + 1], temp[n], 0);
|
strip->setPixelColor(myled, temp[n + 2], temp[n + 1], temp[n], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void updateLed (int led, int brightness) {
|
void updateLed (uint16_t led, uint8_t brightness) {
|
||||||
ledStates[led] = brightness;
|
ledstates[led] = brightness;
|
||||||
for (int i=0; i<NUMLEDS; i++) {
|
for (uint16_t i=0; i<WS2812FXStripSettings.stripSize; i++) {
|
||||||
uint16_t index = (i%3 == 0) ? 400 : random(0,767);
|
uint16_t index = (i%3 == 0) ? 400 : random(0,767);
|
||||||
hsb2rgbAN1(index, 200, ledStates[i], i);
|
hsb2rgbAN1(index, 200, ledstates[i], i);
|
||||||
}
|
}
|
||||||
strip.show();
|
strip->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -42,15 +41,15 @@ void updateLed (int led, int brightness) {
|
|||||||
void handleTV() {
|
void handleTV() {
|
||||||
if (timeToDip == false) {
|
if (timeToDip == false) {
|
||||||
currentMillis = millis();
|
currentMillis = millis();
|
||||||
if(currentMillis-previousMillis > interval) {
|
if(currentMillis-previousMillis > interv) {
|
||||||
previousMillis = currentMillis;
|
previousMillis = currentMillis;
|
||||||
//interval = random(750,4001);//Adjusts the interval for more/less frequent random light changes
|
//interv = random(750,4001);//Adjusts the interval for more/less frequent random light changes
|
||||||
interval = random(1000-(ws2812fx_speed*2),5001-(ws2812fx_speed*8));
|
interv = random(1000-(ws2812fx_speed*2),5001-(ws2812fx_speed*8));
|
||||||
twitch = random(40,100);// Twitch provides motion effect but can be a bit much if too high
|
twitch = random(40,100);// Twitch provides motion effect but can be a bit much if too high
|
||||||
dipCount = dipCount++;
|
dipCount = dipCount++;
|
||||||
}
|
}
|
||||||
if(currentMillis-previousMillis<twitch) {
|
if(currentMillis-previousMillis<twitch) {
|
||||||
led=random(0, (strip.numPixels()-1));
|
led=random(0, WS2812FXStripSettings.stripSize - 1);
|
||||||
analogLevel=random(50,255);// set the range of the 3 pwm leds
|
analogLevel=random(50,255);// set the range of the 3 pwm leds
|
||||||
ledState = ledState == LOW ? HIGH: LOW; // if the LED is off turn it on and vice-versa:
|
ledState = ledState == LOW ? HIGH: LOW; // if the LED is off turn it on and vice-versa:
|
||||||
updateLed(led, (ledState) ? 255 : 0);
|
updateLed(led, (ledState) ? 255 : 0);
|
||||||
@@ -67,12 +66,12 @@ void handleTV() {
|
|||||||
DBG_OUTPUT_PORT.println("Dip Time");
|
DBG_OUTPUT_PORT.println("Dip Time");
|
||||||
currentDipTime = millis();
|
currentDipTime = millis();
|
||||||
if (currentDipTime - dipStartTime < darkTime) {
|
if (currentDipTime - dipStartTime < darkTime) {
|
||||||
for (int i=3; i<strip.numPixels(); i++) {
|
for (uint16_t i=3; i<WS2812FXStripSettings.stripSize; i++) {
|
||||||
updateLed(i, 0);
|
updateLed(i, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
timeToDip = false;
|
timeToDip = false;
|
||||||
}
|
}
|
||||||
strip.show();
|
//strip->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,449 @@
|
|||||||
|
// ***************************************************************************
|
||||||
|
// Setup: Webserver handler
|
||||||
|
// ***************************************************************************
|
||||||
|
//list directory
|
||||||
|
server.on("/list", HTTP_GET, handleFileList);
|
||||||
|
//create file
|
||||||
|
server.on("/edit", HTTP_PUT, handleFileCreate);
|
||||||
|
//delete file
|
||||||
|
server.on("/edit", HTTP_DELETE, handleFileDelete);
|
||||||
|
//first callback is called after the request has ended with all parsed arguments
|
||||||
|
//second callback handles file uploads at that location
|
||||||
|
server.on("/edit", HTTP_POST, []() {
|
||||||
|
server.sendHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
server.send(200, "text/plain", "");
|
||||||
|
}, handleFileUpload);
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
// Setup: SPIFFS Webserver handler
|
||||||
|
// ***************************************************************************
|
||||||
|
|
||||||
|
server.on("/", HTTP_GET, [&](){
|
||||||
|
#if defined(USE_HTML_MIN_GZ)
|
||||||
|
server.sendHeader("Content-Encoding", "gzip", true);
|
||||||
|
server.send_P(200, PSTR("text/html"), index_htm_gz, index_htm_gz_len);
|
||||||
|
#else
|
||||||
|
if (!handleFileRead(server.uri()))
|
||||||
|
handleNotFound();
|
||||||
|
#endif
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/edit", HTTP_GET, [&](){
|
||||||
|
#if defined(USE_HTML_MIN_GZ)
|
||||||
|
server.sendHeader("Content-Encoding", "gzip", true);
|
||||||
|
server.send_P(200, PSTR("text/html"), edit_htm_gz, edit_htm_gz_len);
|
||||||
|
#else
|
||||||
|
if (!handleFileRead("/edit.htm"))
|
||||||
|
handleNotFound();
|
||||||
|
#endif
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//called when the url is not defined here
|
||||||
|
//use it to load content from SPIFFS
|
||||||
|
server.onNotFound([]() {
|
||||||
|
if (!handleFileRead(server.uri()))
|
||||||
|
handleNotFound();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/upload", handleMinimalUpload);
|
||||||
|
|
||||||
|
server.on("/esp_status", HTTP_GET, []() { //get heap status, analog input value and all GPIO statuses in one json call
|
||||||
|
const size_t bufferSize = JSON_OBJECT_SIZE(31) + 1500;
|
||||||
|
DynamicJsonDocument jsonBuffer(bufferSize);
|
||||||
|
JsonObject root = jsonBuffer.to<JsonObject>();
|
||||||
|
root["HOSTNAME"] = HOSTNAME;
|
||||||
|
root["version"] = SKETCH_VERSION;
|
||||||
|
root["heap"] = ESP.getFreeHeap();
|
||||||
|
root["sketch_size"] = ESP.getSketchSize();
|
||||||
|
root["free_sketch_space"] = ESP.getFreeSketchSpace();
|
||||||
|
root["flash_chip_size"] = ESP.getFlashChipSize();
|
||||||
|
root["flash_chip_real_size"] = ESP.getFlashChipRealSize();
|
||||||
|
root["flash_chip_speed"] = ESP.getFlashChipSpeed();
|
||||||
|
root["sdk_version"] = ESP.getSdkVersion();
|
||||||
|
root["core_version"] = ESP.getCoreVersion();
|
||||||
|
root["cpu_freq"] = ESP.getCpuFreqMHz();
|
||||||
|
root["chip_id"] = ESP.getFlashChipId();
|
||||||
|
#if defined(USE_WS2812FX_DMA)
|
||||||
|
#if USE_WS2812FX_DMA == 0
|
||||||
|
root["animation_lib"] = "WS2812FX_DMA";
|
||||||
|
#endif
|
||||||
|
#if USE_WS2812FX_DMA == 1
|
||||||
|
root["animation_lib"] = "WS2812FX_UART1";
|
||||||
|
#endif
|
||||||
|
#if USE_WS2812FX_DMA == 2
|
||||||
|
root["animation_lib"] = "WS2812FX_UART2";
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
root["animation_lib"] = "WS2812FX";
|
||||||
|
#endif
|
||||||
|
root["ws2812_pin"] = WS2812FXStripSettings.pin;
|
||||||
|
root["led_count"] = WS2812FXStripSettings.stripSize;
|
||||||
|
root["rgb_order"] = WS2812FXStripSettings.RGBOrder;
|
||||||
|
if (strstr(WS2812FXStripSettings.RGBOrder, "W") != NULL) {
|
||||||
|
root["rgbw_mode"] = "ON";
|
||||||
|
} else {
|
||||||
|
root["rgbw_mode"] = "OFF";
|
||||||
|
}
|
||||||
|
#if defined(ENABLE_BUTTON)
|
||||||
|
root["button_mode"] = "ON";
|
||||||
|
root["button_pin"] = ENABLE_BUTTON;
|
||||||
|
#else
|
||||||
|
root["button_mode"] = "OFF";
|
||||||
|
#endif
|
||||||
|
#if defined(ENABLE_BUTTON_GY33)
|
||||||
|
root["button_gy33"] = "ON";
|
||||||
|
root["gy33_pin"] = ENABLE_BUTTON_GY33;
|
||||||
|
#else
|
||||||
|
root["button_gy33"] = "OFF";
|
||||||
|
#endif
|
||||||
|
#if defined(ENABLE_REMOTE)
|
||||||
|
root["ir_remote"] = "ON";
|
||||||
|
root["tsop_ir_pin"] = ENABLE_REMOTE;
|
||||||
|
#else
|
||||||
|
root["ir_remote"] = "OFF";
|
||||||
|
#endif
|
||||||
|
#if defined(ENABLE_MQTT)
|
||||||
|
#if ENABLE_MQTT == 0
|
||||||
|
root["mqtt"] = "MQTT";
|
||||||
|
#endif
|
||||||
|
#if ENABLE_MQTT == 1
|
||||||
|
root["mqtt"] = "AMQTT";
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
root["mqtt"] = "OFF";
|
||||||
|
#endif
|
||||||
|
#if defined(ENABLE_HOMEASSISTANT)
|
||||||
|
root["home_assistant"] = "ON";
|
||||||
|
#else
|
||||||
|
root["home_assistant"] = "OFF";
|
||||||
|
#endif
|
||||||
|
#if defined(ENABLE_LEGACY_ANIMATIONS)
|
||||||
|
root["legacy_animations"] = "ON";
|
||||||
|
#else
|
||||||
|
root["legacy_animations"] = "OFF";
|
||||||
|
#endif
|
||||||
|
#if defined(ENABLE_TV)
|
||||||
|
root["tv_animation"] = "ON";
|
||||||
|
#else
|
||||||
|
root["tv_animation"] = "OFF";
|
||||||
|
#endif
|
||||||
|
#if defined(ENABLE_E131)
|
||||||
|
root["e131_animations"] = "ON";
|
||||||
|
#else
|
||||||
|
root["e131_animations"] = "OFF";
|
||||||
|
#endif
|
||||||
|
#if defined(ENABLE_OTA)
|
||||||
|
#if ENABLE_OTA == 0
|
||||||
|
root["ota"] = "ARDUINO";
|
||||||
|
#endif
|
||||||
|
#if ENABLE_OTA == 1
|
||||||
|
root["ota"] = "HTTP";
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
root["ota"] = "OFF";
|
||||||
|
#endif
|
||||||
|
#if defined(ENABLE_STATE_SAVE)
|
||||||
|
#if ENABLE_STATE_SAVE == 1
|
||||||
|
root["state_save"] = "SPIFFS";
|
||||||
|
#endif
|
||||||
|
#if ENABLE_STATE_SAVE == 0
|
||||||
|
root["state_save"] = "EEPROM";
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
root["state_save"] = "OFF";
|
||||||
|
#endif
|
||||||
|
uint16_t msg_len = measureJson(root) + 1;
|
||||||
|
char * buffer = (char *) malloc(msg_len);
|
||||||
|
serializeJson(root, buffer, msg_len);
|
||||||
|
jsonBuffer.clear();
|
||||||
|
server.sendHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
server.send(200, "application/json", buffer);
|
||||||
|
free (buffer);
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/restart", []() {
|
||||||
|
DBG_OUTPUT_PORT.printf("/restart\r\n");
|
||||||
|
server.sendHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
server.send(200, "text/plain", "restarting..." );
|
||||||
|
ESP.restart();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/reset_wlan", []() {
|
||||||
|
DBG_OUTPUT_PORT.printf("/reset_wlan\r\n");
|
||||||
|
server.sendHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
server.send(200, "text/plain", "Resetting WLAN and restarting..." );
|
||||||
|
WiFiManager wifiManager;
|
||||||
|
wifiManager.resetSettings();
|
||||||
|
ESP.restart();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/start_config_ap", []() {
|
||||||
|
DBG_OUTPUT_PORT.printf("/start_config_ap\r\n");
|
||||||
|
server.sendHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
server.send(200, "text/plain", "Starting config AP ..." );
|
||||||
|
WiFiManager wifiManager;
|
||||||
|
wifiManager.startConfigPortal(HOSTNAME);
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/format_spiffs", []() {
|
||||||
|
DBG_OUTPUT_PORT.printf("/format_spiffs\r\n");
|
||||||
|
server.send(200, "text/plain", "Formatting SPIFFS ..." );
|
||||||
|
SPIFFS.format();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/set_brightness", []() {
|
||||||
|
mode = SET_BRIGHTNESS;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/get_brightness", []() {
|
||||||
|
char str_brightness[4];
|
||||||
|
snprintf(str_brightness, sizeof(str_brightness), "%i", (int) (brightness / 2.55));
|
||||||
|
str_brightness[sizeof(str_brightness) - 1] = 0x00;
|
||||||
|
server.sendHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
server.send(200, "text/plain", str_brightness );
|
||||||
|
DBG_OUTPUT_PORT.printf("/get_brightness: %i\r\n", (int) (brightness / 2.55));
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/set_speed", []() {
|
||||||
|
mode = SET_SPEED;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/get_speed", []() {
|
||||||
|
char str_speed[4];
|
||||||
|
snprintf(str_speed, sizeof(str_speed), "%i", ws2812fx_speed);
|
||||||
|
str_speed[sizeof(str_speed) - 1] = 0x00;
|
||||||
|
server.sendHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
server.send(200, "text/plain", str_speed );
|
||||||
|
DBG_OUTPUT_PORT.printf("/get_speed: %i\r\n", ws2812fx_speed);
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/get_switch", []() {
|
||||||
|
server.sendHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
server.send(200, "text/plain", (mode == OFF) ? "0" : "1" );
|
||||||
|
DBG_OUTPUT_PORT.printf("/get_switch: %s\r\n", (mode == OFF) ? "0" : "1");
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/get_color", []() {
|
||||||
|
char rgbcolor[10];
|
||||||
|
snprintf(rgbcolor, sizeof(rgbcolor), "%02X%02X%02X%02X", main_color.white, main_color.red, main_color.green, main_color.blue);
|
||||||
|
rgbcolor[sizeof(rgbcolor) - 1] = 0x00;
|
||||||
|
server.sendHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
server.send(200, "text/plain", rgbcolor );
|
||||||
|
DBG_OUTPUT_PORT.print("/get_color: ");
|
||||||
|
DBG_OUTPUT_PORT.println(rgbcolor);
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/get_color2", []() {
|
||||||
|
char rgbcolor[10];
|
||||||
|
snprintf(rgbcolor, sizeof(rgbcolor), "%02X%02X%02X%02X", back_color.white, back_color.red, back_color.green, back_color.blue);
|
||||||
|
rgbcolor[sizeof(rgbcolor) - 1] = 0x00;
|
||||||
|
server.sendHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
server.send(200, "text/plain", rgbcolor );
|
||||||
|
DBG_OUTPUT_PORT.print("/get_color2: ");
|
||||||
|
DBG_OUTPUT_PORT.println(rgbcolor);
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/get_color3", []() {
|
||||||
|
char rgbcolor[10];
|
||||||
|
snprintf(rgbcolor, sizeof(rgbcolor), "%02X%02X%02X%02X", xtra_color.white, xtra_color.red, xtra_color.green, xtra_color.blue);
|
||||||
|
rgbcolor[sizeof(rgbcolor) - 1] = 0x00;
|
||||||
|
server.sendHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
server.send(200, "text/plain", rgbcolor );
|
||||||
|
DBG_OUTPUT_PORT.print("/get_color3: ");
|
||||||
|
DBG_OUTPUT_PORT.println(rgbcolor);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
server.on("/status", []() {
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/config", []() {
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
// This will be used later when web-interface is ready and HTTP_GET will not be allowed to update the Strip Settings
|
||||||
|
|
||||||
|
if(server.args() == 0 and server.method() != HTTP_POST)
|
||||||
|
{
|
||||||
|
server.sendHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
server.send(200, "text/plain", "Only HTTP POST method is allowed and check the number of arguments!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
bool updateStrip = false;
|
||||||
|
bool updateConf = false;
|
||||||
|
if(server.hasArg("ws_cnt")){
|
||||||
|
uint16_t pixelCt = server.arg("ws_cnt").toInt();
|
||||||
|
if (pixelCt > 0) {
|
||||||
|
WS2812FXStripSettings.stripSize = constrain(pixelCt, 1, MAXLEDS);
|
||||||
|
updateStrip = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(server.hasArg("ws_rgbo")){
|
||||||
|
char tmp_rgbOrder[5];
|
||||||
|
snprintf(tmp_rgbOrder, sizeof(tmp_rgbOrder), "%s", server.arg("ws_rgbo").c_str());
|
||||||
|
tmp_rgbOrder[sizeof(tmp_rgbOrder) - 1] = 0x00;
|
||||||
|
checkRGBOrder(tmp_rgbOrder);
|
||||||
|
updateStrip = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !defined(USE_WS2812FX_DMA)
|
||||||
|
if(server.hasArg("ws_pin")){
|
||||||
|
if (checkPin(server.arg("ws_pin").toInt())) {
|
||||||
|
updateStrip = true;
|
||||||
|
DBG_OUTPUT_PORT.print("Pin was set to: ");
|
||||||
|
DBG_OUTPUT_PORT.println(WS2812FXStripSettings.pin);
|
||||||
|
} else {
|
||||||
|
DBG_OUTPUT_PORT.println("invalid input!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if(server.hasArg("ws_fxopt")){
|
||||||
|
WS2812FXStripSettings.fxoptions = ((constrain(server.arg("ws_fxopt").toInt(), 0, 255)>>1)<<1);
|
||||||
|
updateStrip = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(updateStrip) {
|
||||||
|
mode = INIT_STRIP;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(server.hasArg("hostname")){
|
||||||
|
snprintf(HOSTNAME, sizeof(HOSTNAME), "%s", server.arg("hostname").c_str());
|
||||||
|
HOSTNAME[sizeof(HOSTNAME) - 1] = 0x00;
|
||||||
|
updateConf = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(ENABLE_MQTT)
|
||||||
|
if(server.hasArg("mqtt_host")){
|
||||||
|
snprintf(mqtt_host, sizeof(mqtt_host), "%s", server.arg("mqtt_host").c_str());
|
||||||
|
mqtt_host[sizeof(mqtt_host) - 1] = 0x00;
|
||||||
|
updateConf = true;
|
||||||
|
}
|
||||||
|
if(server.hasArg("mqtt_port")){
|
||||||
|
if ((server.arg("mqtt_port").toInt() >= 0) && (server.arg("mqtt_port").toInt() <=65535)) {
|
||||||
|
mqtt_port = server.arg("mqttport").toInt();
|
||||||
|
updateConf = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(server.hasArg("mqtt_user")){
|
||||||
|
snprintf(mqtt_user, sizeof(mqtt_user), "%s", server.arg("mqtt_user").c_str());
|
||||||
|
mqtt_user[sizeof(mqtt_user) - 1] = 0x00;
|
||||||
|
updateConf = true;
|
||||||
|
}
|
||||||
|
if(server.hasArg("mqtt_pass")){
|
||||||
|
snprintf(mqtt_pass, sizeof(mqtt_pass), "%s", server.arg("mqtt_pass").c_str());
|
||||||
|
mqtt_pass[sizeof(mqtt_pass) - 1] = 0x00;
|
||||||
|
updateConf = true;
|
||||||
|
}
|
||||||
|
if (updateConf) {
|
||||||
|
initMqtt();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(ENABLE_STATE_SAVE)
|
||||||
|
if (updateStrip || updateConf) {
|
||||||
|
if(!settings_save_conf.active()) settings_save_conf.once(3, tickerSaveConfig);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
updateStrip = false;
|
||||||
|
updateConf = false;
|
||||||
|
getConfigJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/off", []() {
|
||||||
|
mode = OFF;
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/auto", []() {
|
||||||
|
mode = AUTO;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/all", []() {
|
||||||
|
prevmode = HOLD;
|
||||||
|
ws2812fx_mode = FX_MODE_STATIC;
|
||||||
|
mode = SET_ALL;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
#if defined(ENABLE_LEGACY_ANIMATIONS)
|
||||||
|
server.on("/wipe", []() {
|
||||||
|
ws2812fx_mode = FX_MODE_COLOR_WIPE;
|
||||||
|
mode = SET_ALL;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/rainbow", []() {
|
||||||
|
ws2812fx_mode = FX_MODE_RAINBOW;
|
||||||
|
mode = SET_ALL;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/rainbowcycle", []() {
|
||||||
|
ws2812fx_mode = FX_MODE_RAINBOW_CYCLE;
|
||||||
|
mode = SET_ALL;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/theaterchase", []() {
|
||||||
|
ws2812fx_mode = FX_MODE_THEATER_CHASE;
|
||||||
|
mode = SET_ALL;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/twinklerandom", []() {
|
||||||
|
ws2812fx_mode = FX_MODE_TWINKLE_RANDOM;
|
||||||
|
mode = SET_ALL;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/theaterchaserainbow", []() {
|
||||||
|
ws2812fx_mode = FX_MODE_THEATER_CHASE_RAINBOW;
|
||||||
|
mode = SET_ALL;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(ENABLE_E131)
|
||||||
|
server.on("/e131", []() {
|
||||||
|
mode = E131;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(ENABLE_TV)
|
||||||
|
server.on("/tv", []() {
|
||||||
|
mode = TV;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
|
server.on("/get_modes", []() {
|
||||||
|
getModesJSON();
|
||||||
|
});
|
||||||
|
|
||||||
|
server.on("/set_mode", []() {
|
||||||
|
mode = SET_MODE;
|
||||||
|
getArgs();
|
||||||
|
getStatusJSON();
|
||||||
|
});
|
||||||
@@ -1 +1 @@
|
|||||||
#define SKETCH_VERSION "2.2.0.rgbw.3c"
|
#define SKETCH_VERSION "2.2.8.RU1.rgbw.3c"
|
||||||
|
|||||||
@@ -56,13 +56,121 @@
|
|||||||
* 23 Dec 2018 v 2.2.0
|
* 23 Dec 2018 v 2.2.0
|
||||||
* - Add E1.31 mode to getModes(), no need to change McLightingUI
|
* - Add E1.31 mode to getModes(), no need to change McLightingUI
|
||||||
*
|
*
|
||||||
* 6 Jan 2018 v 2.2.0
|
* 6 Jan 2019 v 2.2.0
|
||||||
* - fix webserver not responding when E1.31 is mode is acivated: do a webserver.loop() for every 1.31 packet
|
* - fix webserver not responding when E1.31 is mode is acivated: do a webserver.loop() for every 1.31 packet
|
||||||
* - HA E1.31 mode added
|
* - HA E1.31 mode added
|
||||||
*
|
*
|
||||||
* 15 Feb 2018 v 2.2.0 rgbw 3colors
|
* 15 Feb 2019 v 2.2.0 rgbw 3colors
|
||||||
* - Code cleanup
|
* - Code cleanup
|
||||||
* - Implemented support for back- and xtra-color
|
* - Implemented support for back- and xtra-color
|
||||||
* - Implemented IR remote control
|
* - Implemented IR remote control
|
||||||
* - Remove some string data types (to be continued)
|
* - Remove some string data types (to be continued)
|
||||||
|
*
|
||||||
|
* 08 Mar 2018 v 2.2.1 rgbw 3colors
|
||||||
|
* - checkForRequests() is not needed
|
||||||
|
* - Minor fixes related to NeoPixelBus UART methods
|
||||||
|
* - Modify platformio.ini for future bump to esp8266-arduino v2.5.0 (shamelessly stolen settings from espurna project)
|
||||||
|
* - Gzipped index.htm & edit.htm, convereted to hex format using xxd -i abcd.gz > html_gz.h
|
||||||
|
* - Pointers added for WS2812FX & NeoPixelBus
|
||||||
|
* - new "REST API": /config?ws_cnt=xxx to change length of LED strip
|
||||||
|
* - new "REST API": /config?ws_rgbo=xxx to change RGB order
|
||||||
|
* - new "REST API": /config?ws_pin=GPIO_NO to change PIN# (Allowed GPIO values: 16/5/4/0/2/14/12/13/15/3/1) if not used DMA or UART. Otherwise it is ignored
|
||||||
|
* - added HA 0.87 version support https://github.com/toblum/McLighting/issues/327
|
||||||
|
* - Added alternative way to send large messages using PubSubClient
|
||||||
|
* - Bump PIO core to 2.0.4
|
||||||
|
* - Send HA state on MQTT connect, address https://github.com/toblum/McLighting/issues/349
|
||||||
|
* - Add LWT for MQTT and AMQTT, address https://github.com/toblum/McLighting/issues/340
|
||||||
|
* - Added file for custom WS2812FX animations in custom slots
|
||||||
|
* - Rename variables to be char instead of String
|
||||||
|
* - Added LED pixel count and PIN settings to WiFiManager
|
||||||
|
* - Gamma correction to LEDs via ws_fxopts
|
||||||
|
*
|
||||||
|
* 10 Mar 2019 v 2.2.2 rgbw 3colors
|
||||||
|
* - integraded neoconfig.json into config.json
|
||||||
|
* - Add compiler flag for WS2811 strips #define LED_TYPE_WS2811
|
||||||
|
* - new "REST API": /config?hostname=xxx to change hostname
|
||||||
|
* - new "REST API": /config?mqtt_host=xxx to change mqtt hostname
|
||||||
|
* - new "REST API": /config?mqtt_port=xxx to change mqtt port
|
||||||
|
* - new "REST API": /config?mqtt_user=xxx to change mqtt username
|
||||||
|
* - new "REST API": /config?mqtt_pass=xxx to change mqtt password
|
||||||
|
* - new "REST API": /config?ws_fxopt=xxx to change ws2812fx options
|
||||||
|
* - Pointers added for PubSubClient & AMQTTCLient
|
||||||
|
* - RGBOrder is now stored human readable not as integer
|
||||||
|
* - Bugfix on Fire 2012 animation as one variable was destroyed
|
||||||
|
*
|
||||||
|
* 15 Mar 2019 v 2.2.2 rgbw 3colors
|
||||||
|
* websocket commands
|
||||||
|
* # Set Maincolor
|
||||||
|
* ## Set Back color
|
||||||
|
* ### Set xtra Color
|
||||||
|
* ? Set speed
|
||||||
|
* % Set brightness
|
||||||
|
* * Set all
|
||||||
|
* ! Set single LED
|
||||||
|
* + Set multiple LEDs
|
||||||
|
* R Set Range
|
||||||
|
* = Set named Mode (legacy)
|
||||||
|
* $ Get Status
|
||||||
|
* new from here
|
||||||
|
* C Get Config
|
||||||
|
* Ch Set hostname
|
||||||
|
* Cmh Set mqtt hostname
|
||||||
|
* Cmp Set mqtt port
|
||||||
|
* Cmu Set mqtt username
|
||||||
|
* Cmw Set mqtt password
|
||||||
|
* Csc Set Strip LED count
|
||||||
|
* Csr Set Strip RGB Order
|
||||||
|
* Csp Set Strip pin
|
||||||
|
* Cso Set Strip FX Options
|
||||||
|
* to here
|
||||||
|
* ~ Get Modes
|
||||||
|
* / Set modes
|
||||||
|
*
|
||||||
|
* 17 Mar 2019
|
||||||
|
* adressed issue: #2
|
||||||
|
* adressed issue: #3
|
||||||
|
*
|
||||||
|
* 18 Mar 2019
|
||||||
|
* adressed issue: #6 (possibly affects R[r_start][r_end][hexrgb] [...]; +[numled][hexrgb]+[numled][hexrgb]+[numled][hexrgb] !<numled><hexrgb>)
|
||||||
|
*
|
||||||
|
* 19 Mar 2019
|
||||||
|
* included custom mode in UI
|
||||||
|
* adressed issue #4
|
||||||
|
*
|
||||||
|
* Version Bump to 2.2.3 rgbw 3colors
|
||||||
|
* PubSubClient Bug fixes
|
||||||
|
* Reverted Pointers for MQTT for the moment
|
||||||
|
*
|
||||||
|
* 21 Mar 2019
|
||||||
|
* Bugfixes
|
||||||
|
* added pointer for MQTT again
|
||||||
|
* Removed some String datatype and replaced with char array
|
||||||
|
* better responsiveness in ui for sliders
|
||||||
|
*
|
||||||
|
* 26 Mar 2019
|
||||||
|
* Bugfixes
|
||||||
|
*
|
||||||
|
* 19 May 2019
|
||||||
|
* Bugfixes regarding MQTT Hostname
|
||||||
|
*
|
||||||
|
* 08 September 2019
|
||||||
|
* Version Bump to 2.2.5 rgbw 3colors
|
||||||
|
* adressed issue: #27
|
||||||
|
* adressed issue: #28 (see new REST-API documentation)
|
||||||
|
*
|
||||||
|
* 10 September 2019
|
||||||
|
* Version Bump to 2.2.6 rgbw 3colors
|
||||||
|
* adressed issue: #28 (see new REST-API documentation) again
|
||||||
|
* adressed issue: #26
|
||||||
|
* adressed issue: #31
|
||||||
|
* adressed issue: #32
|
||||||
|
*
|
||||||
|
* 09 Oktober 2019
|
||||||
|
* Version Bump to 2.2.7 rgbw 3colors
|
||||||
|
* added output to control external power supply
|
||||||
|
*
|
||||||
|
* 06 December 2019
|
||||||
|
* Version Bump to 2.2.8 rgbw 3colors
|
||||||
|
* Bugfixes
|
||||||
|
* adressed issue #59
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# McLighting v2 - The ESP8266 based multi-client lighting gadget
|
# McLighting v2 - The ESP8266 based multi-client lighting gadget
|
||||||
|
|
||||||
[](https://gitter.im/mclighting/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [](https://travis-ci.com/toblum/McLighting) [](https://opensource.org/licenses/MIT) [](https://github.com/toblum/McLighting/blob/master/Arduino/McLighting/version.h)
|
[](https://gitter.im/mclighting/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [](https://travis-ci.com/toblum/McLighting) [](https://opensource.org/licenses/MIT) [](https://github.com/toblum/McLighting/blob/master/Arduino/McLighting/version.h)
|
||||||
|
|
||||||
McLighting (the multi-client lighting gadget) is a very cheap internet-controllable lighting solution based on the famous ESP8266 microcontroller and WS2811/2812 led strips. It features among other things a web-interface, a REST-API and a websocket connector.
|
McLighting (the multi-client lighting gadget) is a very cheap internet-controllable lighting solution based on the famous ESP8266 microcontroller and WS2811/2812 led strips. It features among other things a web-interface, a REST-API and a websocket connector.
|
||||||
|
|
||||||
@@ -61,17 +61,18 @@ I hope I didn't miss any sources and mentioned every author. In case I forgot so
|
|||||||
|
|
||||||
## Todos
|
## Todos
|
||||||
- [ ] Support multiple strips and control them separately or together [Issue](https://github.com/toblum/McLighting/issues/118)
|
- [ ] Support multiple strips and control them separately or together [Issue](https://github.com/toblum/McLighting/issues/118)
|
||||||
- [ ] Make number of pixels, MQTT and PIN configurable via front end [Issue](https://github.com/toblum/McLighting/issues/93) and [Issue](https://github.com/toblum/McLighting/issues/93)
|
|
||||||
- [ ] Bundle webpages instead of SPIFFS [Issue](https://github.com/toblum/McLighting/issues/93)
|
|
||||||
- [ ] Remove old / wrong EEPROM settings completely [Issue]
|
- [ ] Remove old / wrong EEPROM settings completely [Issue]
|
||||||
- [ ] Customer profile to define segments of (in)active areas on the strip [Issue](https://github.com/toblum/McLighting/issues/37)
|
- [ ] Customer profile to define segments of (in)active areas on the strip [Issue](https://github.com/toblum/McLighting/issues/37)
|
||||||
- [ ] Additional clients
|
- [ ] Additional clients
|
||||||
- [ ] If no wifi, at least enable button mode.
|
- [ ] If no wifi, at least enable button mode.
|
||||||
- [ ] Also enable McLighting in Wifi AP mode.
|
- [ ] Also enable McLighting in Wifi AP mode.
|
||||||
- [ ] IR remote support [issue](https://github.com/toblum/McLightingUI/issues/3)
|
- [ ] Search an non blocking alternative for WifiManager
|
||||||
- [ ] Multiple buttons/GPIO Inputs. [Issue](https://github.com/toblum/McLighting/issues/119)
|
- [ ] Multiple buttons/GPIO Inputs. [Issue](https://github.com/toblum/McLighting/issues/119)
|
||||||
- [ ] Music visualizer / Bring back ArtNet [Issue](https://github.com/toblum/McLighting/issues/111)
|
- [ ] Music visualizer / Bring back ArtNet [Issue](https://github.com/toblum/McLighting/issues/111)
|
||||||
- [ ] Display version and parameters (Number of LEDs, definition settings, ..) in the web UI [Issue](https://github.com/toblum/McLighting/issues/150)
|
- [ ] Display version and parameters (Number of LEDs, definition settings, ..) in the web UI [Issue](https://github.com/toblum/McLighting/issues/150)
|
||||||
|
- [x] Make number of pixels, MQTT and PIN configurable via front end [Issue](https://github.com/toblum/McLighting/issues/93) and [Issue](https://github.com/toblum/McLighting/issues/93)
|
||||||
|
- [x] Bundle webpages instead of SPIFFS [Issue](https://github.com/toblum/McLighting/issues/93)
|
||||||
|
- [x] IR remote support [issue](https://github.com/toblum/McLightingUI/issues/3)
|
||||||
- [x] MQTT support
|
- [x] MQTT support
|
||||||
- [x] Save favourite effects? [Issue](https://github.com/toblum/McLighting/issues/35)(https://github.com/toblum/McLighting/issues/101)
|
- [x] Save favourite effects? [Issue](https://github.com/toblum/McLighting/issues/35)(https://github.com/toblum/McLighting/issues/101)
|
||||||
- [x] OTA update [Issue](https://github.com/toblum/McLighting/issues/92)
|
- [x] OTA update [Issue](https://github.com/toblum/McLighting/issues/92)
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ light:
|
|||||||
brightness: true
|
brightness: true
|
||||||
color_temp: true
|
color_temp: true
|
||||||
rgb: true
|
rgb: true
|
||||||
|
white_value: true
|
||||||
optimistic: false
|
optimistic: false
|
||||||
qos: 0
|
qos: 0
|
||||||
retain: true
|
retain: true
|
||||||
|
|||||||
@@ -0,0 +1,674 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SPIFFS Editor</title>
|
||||||
|
<style type="text/css" media="screen">
|
||||||
|
.contextMenu {
|
||||||
|
z-index: 300;
|
||||||
|
position: absolute;
|
||||||
|
left: 5px;
|
||||||
|
border: 1px solid #444;
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
display: none;
|
||||||
|
box-shadow: 0 0 10px rgba( 0, 0, 0, .4 );
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
.contextMenu ul {
|
||||||
|
list-style: none;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.contextMenu li {
|
||||||
|
position: relative;
|
||||||
|
min-width: 60px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.contextMenu span {
|
||||||
|
color: #444;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
.contextMenu li:hover { background: #444; }
|
||||||
|
.contextMenu li:hover span { color: #EEE; }
|
||||||
|
|
||||||
|
.css-treeview ul, .css-treeview li {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview input {
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview {
|
||||||
|
font: normal 11px Verdana, Arial, Sans-serif;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview span {
|
||||||
|
color: #00f;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview span:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview input + label + ul {
|
||||||
|
margin: 0 0 0 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview input ~ ul {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview label, .css-treeview label::before {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview input:disabled + label {
|
||||||
|
cursor: default;
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview input:checked:not(:disabled) ~ ul {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview label, .css-treeview label::before {
|
||||||
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAACgCAYAAAAFOewUAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAApxJREFUeNrslM1u00AQgGdthyalFFOK+ClIIKQKyqUVQvTEE3DmAhLwAhU8QZoH4A2Q2gMSFace4MCtJ8SPBFwAkRuiHKpA6sRN/Lu7zG5i14kctaUqRGhGXnu9O/Pt7MzsMiklvF+9t2kWTDvyIrAsA0aKRRi1T0C/hJ4LUbt5/8rNpWVlp8RSr9J40b48fxFaTQ9+ft8EZ6MJYb0Ok+dnYGpmPgXwKIAvLx8vYXc5GdMAQJgQEkpjRTh36TS2U+DWW/D17WuYgm8pwJyY1npZsZKOxImOV1I/h4+O6vEg5GCZBpgmA6hX8wHKUHDRBXQYicQ4rlc3Tf0VMs8DHBS864F2YFspjgUYjKX/Az3gsdQd2eeBHwmdGWXHcgBGSkZXOXohcEXebRoQcAgjqediNY+AVyu3Z3sAKqfKoGMsewBeEIOPgQxxPJIjcGH6qtL/0AdADzKGnuuD+2tLK7Q8DhHHbOBW+KEzcHLuYc82MkEUekLiwuvVH+guQBQzOG4XdAb8EOcRcqQvDkY2iCLuxECJ43JobMXoutqGgDa2T7UqLKwt9KRyuxKVByqVXXqIoCCUCAqhUOioTWC7G4TQEOD0APy2/7G2Xpu1J4+lxeQ4TXBbITDpoVelRN/BVFbwu5oMMJUBhoXy5tmdRcMwymP2OLQaLjx9/vnBo6V3K6izATmSnMa0Dq7ferIohJhr1p01zrlz49rZF4OMs8JkX23vVQzYp+wbYGV/KpXKjvspl8tsIKCrMNAYFxj2GKS5ZWxg4ewKsJfaGMIY5KXqPz8LBBj6+yDvVP79+yDp/9F9oIx3OisHWwe7Oal0HxCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgwD8E/BZgAP0qhKj3rXO7AAAAAElFTkSuQmCC") no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview label, .css-treeview span, .css-treeview label::before {
|
||||||
|
display: inline-block;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 16px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview label {
|
||||||
|
background-position: 18px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview label::before {
|
||||||
|
content: "";
|
||||||
|
width: 16px;
|
||||||
|
margin: 0 22px 0 0;
|
||||||
|
vertical-align: middle;
|
||||||
|
background-position: 0 -32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css-treeview input:checked + label::before {
|
||||||
|
background-position: 0 -16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* webkit adjacent element selector bugfix */
|
||||||
|
@media screen and (-webkit-min-device-pixel-ratio:0)
|
||||||
|
{
|
||||||
|
.css-treeview{
|
||||||
|
-webkit-animation: webkit-adjacent-element-selector-bugfix infinite 1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes webkit-adjacent-element-selector-bugfix
|
||||||
|
{
|
||||||
|
from {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploader {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
height:28px;
|
||||||
|
line-height: 24px;
|
||||||
|
padding-left: 10px;
|
||||||
|
background-color: #444;
|
||||||
|
color:#EEE;
|
||||||
|
}
|
||||||
|
#tree {
|
||||||
|
position: absolute;
|
||||||
|
top: 28px;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width:200px;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
#editor, #preview {
|
||||||
|
position: absolute;
|
||||||
|
top: 28px;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 200px;
|
||||||
|
}
|
||||||
|
#preview {
|
||||||
|
background-color: #EEE;
|
||||||
|
padding:5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
function createFileUploader(element, tree, editor){
|
||||||
|
var xmlHttp;
|
||||||
|
var input = document.createElement("input");
|
||||||
|
input.type = "file";
|
||||||
|
input.multiple = false;
|
||||||
|
input.name = "data";
|
||||||
|
document.getElementById(element).appendChild(input);
|
||||||
|
var path = document.createElement("input");
|
||||||
|
path.id = "upload-path";
|
||||||
|
path.type = "text";
|
||||||
|
path.name = "path";
|
||||||
|
path.defaultValue = "/";
|
||||||
|
document.getElementById(element).appendChild(path);
|
||||||
|
var button = document.createElement("button");
|
||||||
|
button.innerHTML = 'Upload';
|
||||||
|
document.getElementById(element).appendChild(button);
|
||||||
|
var mkdir = document.createElement("button");
|
||||||
|
mkdir.innerHTML = 'MkDir';
|
||||||
|
document.getElementById(element).appendChild(mkdir);
|
||||||
|
var mkfile = document.createElement("button");
|
||||||
|
mkfile.innerHTML = 'MkFile';
|
||||||
|
document.getElementById(element).appendChild(mkfile);
|
||||||
|
|
||||||
|
function httpPostProcessRequest(){
|
||||||
|
if (xmlHttp.readyState == 4){
|
||||||
|
if(xmlHttp.status != 200) alert("ERROR["+xmlHttp.status+"]: "+xmlHttp.responseText);
|
||||||
|
else {
|
||||||
|
tree.refreshPath(path.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function createPath(p){
|
||||||
|
xmlHttp = new XMLHttpRequest();
|
||||||
|
xmlHttp.onreadystatechange = httpPostProcessRequest;
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append("path", p);
|
||||||
|
xmlHttp.open("PUT", "/edit");
|
||||||
|
xmlHttp.send(formData);
|
||||||
|
}
|
||||||
|
|
||||||
|
mkfile.onclick = function(e){
|
||||||
|
if(path.value.indexOf(".") === -1) return;
|
||||||
|
createPath(path.value);
|
||||||
|
editor.loadUrl(path.value);
|
||||||
|
};
|
||||||
|
mkdir.onclick = function(e){
|
||||||
|
if(path.value.length < 2) return;
|
||||||
|
var dir = path.value
|
||||||
|
if(dir.indexOf(".") !== -1){
|
||||||
|
if(dir.lastIndexOf("/") === 0) return;
|
||||||
|
dir = dir.substring(0, dir.lastIndexOf("/"));
|
||||||
|
}
|
||||||
|
createPath(dir);
|
||||||
|
};
|
||||||
|
button.onclick = function(e){
|
||||||
|
if(input.files.length === 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
xmlHttp = new XMLHttpRequest();
|
||||||
|
xmlHttp.onreadystatechange = httpPostProcessRequest;
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append("data", input.files[0], path.value);
|
||||||
|
xmlHttp.open("POST", "/edit");
|
||||||
|
xmlHttp.send(formData);
|
||||||
|
}
|
||||||
|
input.onchange = function(e){
|
||||||
|
if(input.files.length === 0) return;
|
||||||
|
var filename = input.files[0].name;
|
||||||
|
var ext = /(?:\.([^.]+))?$/.exec(filename)[1];
|
||||||
|
var name = /(.*)\.[^.]+$/.exec(filename)[1];
|
||||||
|
if(typeof name !== undefined){
|
||||||
|
if(name.length > 8) name = name.substring(0, 8);
|
||||||
|
filename = name;
|
||||||
|
}
|
||||||
|
if(typeof ext !== undefined){
|
||||||
|
if(ext === "html") ext = "htm";
|
||||||
|
else if(ext === "jpeg") ext = "jpg";
|
||||||
|
filename = filename + "." + ext;
|
||||||
|
}
|
||||||
|
if(path.value === "/" || path.value.lastIndexOf("/") === 0){
|
||||||
|
path.value = "/"+filename;
|
||||||
|
} else {
|
||||||
|
path.value = path.value.substring(0, path.value.lastIndexOf("/")+1)+filename;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTree(element, editor){
|
||||||
|
var preview = document.getElementById("preview");
|
||||||
|
var treeRoot = document.createElement("div");
|
||||||
|
treeRoot.className = "css-treeview";
|
||||||
|
document.getElementById(element).appendChild(treeRoot);
|
||||||
|
|
||||||
|
function loadDownload(path){
|
||||||
|
document.getElementById('download-frame').src = path+"?download=true";
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadPreview(path){
|
||||||
|
document.getElementById("editor").style.display = "none";
|
||||||
|
preview.style.display = "block";
|
||||||
|
preview.innerHTML = '<img src="'+path+'" style="max-width:100%; max-height:100%; margin:auto; display:block;" />';
|
||||||
|
}
|
||||||
|
|
||||||
|
function fillFolderMenu(el, path){
|
||||||
|
var list = document.createElement("ul");
|
||||||
|
el.appendChild(list);
|
||||||
|
var action = document.createElement("li");
|
||||||
|
list.appendChild(action);
|
||||||
|
var isChecked = document.getElementById(path).checked;
|
||||||
|
var expnd = document.createElement("li");
|
||||||
|
list.appendChild(expnd);
|
||||||
|
if(isChecked){
|
||||||
|
expnd.innerHTML = "<span>Collapse</span>";
|
||||||
|
expnd.onclick = function(e){
|
||||||
|
document.getElementById(path).checked = false;
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
var refrsh = document.createElement("li");
|
||||||
|
list.appendChild(refrsh);
|
||||||
|
refrsh.innerHTML = "<span>Refresh</span>";
|
||||||
|
refrsh.onclick = function(e){
|
||||||
|
var leaf = document.getElementById(path).parentNode;
|
||||||
|
if(leaf.childNodes.length == 3) leaf.removeChild(leaf.childNodes[2]);
|
||||||
|
httpGet(leaf, path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
expnd.innerHTML = "<span>Expand</span>";
|
||||||
|
expnd.onclick = function(e){
|
||||||
|
document.getElementById(path).checked = true;
|
||||||
|
var leaf = document.getElementById(path).parentNode;
|
||||||
|
if(leaf.childNodes.length == 3) leaf.removeChild(leaf.childNodes[2]);
|
||||||
|
httpGet(leaf, path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var upload = document.createElement("li");
|
||||||
|
list.appendChild(upload);
|
||||||
|
upload.innerHTML = "<span>Upload</span>";
|
||||||
|
upload.onclick = function(e){
|
||||||
|
var pathEl = document.getElementById("upload-path");
|
||||||
|
if(pathEl){
|
||||||
|
var subPath = pathEl.value;
|
||||||
|
if(subPath.lastIndexOf("/") < 1) pathEl.value = path+subPath;
|
||||||
|
else pathEl.value = path.substring(subPath.lastIndexOf("/"))+subPath;
|
||||||
|
}
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
var delFile = document.createElement("li");
|
||||||
|
list.appendChild(delFile);
|
||||||
|
delFile.innerHTML = "<span>Delete</span>";
|
||||||
|
delFile.onclick = function(e){
|
||||||
|
httpDelete(path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function fillFileMenu(el, path){
|
||||||
|
var list = document.createElement("ul");
|
||||||
|
el.appendChild(list);
|
||||||
|
var action = document.createElement("li");
|
||||||
|
list.appendChild(action);
|
||||||
|
if(isTextFile(path)){
|
||||||
|
action.innerHTML = "<span>Edit</span>";
|
||||||
|
action.onclick = function(e){
|
||||||
|
editor.loadUrl(path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
} else if(isImageFile(path)){
|
||||||
|
action.innerHTML = "<span>Preview</span>";
|
||||||
|
action.onclick = function(e){
|
||||||
|
loadPreview(path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var download = document.createElement("li");
|
||||||
|
list.appendChild(download);
|
||||||
|
download.innerHTML = "<span>Download</span>";
|
||||||
|
download.onclick = function(e){
|
||||||
|
loadDownload(path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
var delFile = document.createElement("li");
|
||||||
|
list.appendChild(delFile);
|
||||||
|
delFile.innerHTML = "<span>Delete</span>";
|
||||||
|
delFile.onclick = function(e){
|
||||||
|
httpDelete(path);
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(el);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function showContextMenu(e, path, isfile){
|
||||||
|
var divContext = document.createElement("div");
|
||||||
|
var scrollTop = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop;
|
||||||
|
var scrollLeft = document.body.scrollLeft ? document.body.scrollLeft : document.documentElement.scrollLeft;
|
||||||
|
var left = e.clientX + scrollLeft;
|
||||||
|
var top = e.clientY + scrollTop;
|
||||||
|
divContext.className = 'contextMenu';
|
||||||
|
divContext.style.display = 'block';
|
||||||
|
divContext.style.left = left + 'px';
|
||||||
|
divContext.style.top = top + 'px';
|
||||||
|
if(isfile) fillFileMenu(divContext, path);
|
||||||
|
else fillFolderMenu(divContext, path);
|
||||||
|
document.body.appendChild(divContext);
|
||||||
|
var width = divContext.offsetWidth;
|
||||||
|
var height = divContext.offsetHeight;
|
||||||
|
divContext.onmouseout = function(e){
|
||||||
|
if(e.clientX < left || e.clientX > (left + width) || e.clientY < top || e.clientY > (top + height)){
|
||||||
|
if(document.body.getElementsByClassName('contextMenu').length > 0) document.body.removeChild(divContext);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTreeLeaf(path, name, size){
|
||||||
|
var leaf = document.createElement("li");
|
||||||
|
leaf.id = (((path == "/")?"":path)+"/"+name).toLowerCase();
|
||||||
|
var label = document.createElement("span");
|
||||||
|
label.textContent = name.toLowerCase();
|
||||||
|
leaf.appendChild(label);
|
||||||
|
leaf.onclick = function(e){
|
||||||
|
if(isTextFile(leaf.id)){
|
||||||
|
editor.loadUrl(leaf.id);
|
||||||
|
} else if(isImageFile(leaf.id)){
|
||||||
|
loadPreview(leaf.id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
leaf.oncontextmenu = function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
showContextMenu(e, leaf.id, true);
|
||||||
|
};
|
||||||
|
return leaf;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTreeBranch(path, name, disabled){
|
||||||
|
var leaf = document.createElement("li");
|
||||||
|
var check = document.createElement("input");
|
||||||
|
check.type = "checkbox";
|
||||||
|
check.id = (((path == "/")?"":path)+"/"+name).toLowerCase();
|
||||||
|
if(typeof disabled !== "undefined" && disabled) check.disabled = "disabled";
|
||||||
|
leaf.appendChild(check);
|
||||||
|
var label = document.createElement("label");
|
||||||
|
label.for = check.id;
|
||||||
|
label.textContent = name.toLowerCase();
|
||||||
|
leaf.appendChild(label);
|
||||||
|
check.onchange = function(e){
|
||||||
|
if(check.checked){
|
||||||
|
if(leaf.childNodes.length == 3) leaf.removeChild(leaf.childNodes[2]);
|
||||||
|
httpGet(leaf, check.id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
label.onclick = function(e){
|
||||||
|
if(!check.checked){
|
||||||
|
check.checked = true;
|
||||||
|
if(leaf.childNodes.length == 3) leaf.removeChild(leaf.childNodes[2]);
|
||||||
|
httpGet(leaf, check.id);
|
||||||
|
} else {
|
||||||
|
check.checked = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
leaf.oncontextmenu = function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
showContextMenu(e, check.id, false);
|
||||||
|
}
|
||||||
|
return leaf;
|
||||||
|
}
|
||||||
|
|
||||||
|
function addList(parent, path, items){
|
||||||
|
var list = document.createElement("ul");
|
||||||
|
parent.appendChild(list);
|
||||||
|
var ll = items.length;
|
||||||
|
for(var i = 0; i < ll; i++){
|
||||||
|
var item = items[i];
|
||||||
|
var itemEl;
|
||||||
|
if(item.type === "file"){
|
||||||
|
itemEl = createTreeLeaf(path, item.name, item.size);
|
||||||
|
} else {
|
||||||
|
itemEl = createTreeBranch(path, item.name);
|
||||||
|
}
|
||||||
|
list.appendChild(itemEl);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function isTextFile(path){
|
||||||
|
var ext = /(?:\.([^.]+))?$/.exec(path)[1];
|
||||||
|
if(typeof ext !== undefined){
|
||||||
|
switch(ext){
|
||||||
|
case "txt":
|
||||||
|
case "htm":
|
||||||
|
case "html":
|
||||||
|
case "js":
|
||||||
|
case "json":
|
||||||
|
case "c":
|
||||||
|
case "h":
|
||||||
|
case "cpp":
|
||||||
|
case "css":
|
||||||
|
case "xml":
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isImageFile(path){
|
||||||
|
var ext = /(?:\.([^.]+))?$/.exec(path)[1];
|
||||||
|
if(typeof ext !== undefined){
|
||||||
|
switch(ext){
|
||||||
|
case "png":
|
||||||
|
case "jpg":
|
||||||
|
case "gif":
|
||||||
|
case "ico":
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.refreshPath = function(path){
|
||||||
|
if(path.lastIndexOf('/') < 1){
|
||||||
|
path = '/';
|
||||||
|
treeRoot.removeChild(treeRoot.childNodes[0]);
|
||||||
|
httpGet(treeRoot, "/");
|
||||||
|
} else {
|
||||||
|
path = path.substring(0, path.lastIndexOf('/'));
|
||||||
|
var leaf = document.getElementById(path).parentNode;
|
||||||
|
if(leaf.childNodes.length == 3) leaf.removeChild(leaf.childNodes[2]);
|
||||||
|
httpGet(leaf, path);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function delCb(path){
|
||||||
|
return function(){
|
||||||
|
if (xmlHttp.readyState == 4){
|
||||||
|
if(xmlHttp.status != 200){
|
||||||
|
alert("ERROR["+xmlHttp.status+"]: "+xmlHttp.responseText);
|
||||||
|
} else {
|
||||||
|
if(path.lastIndexOf('/') < 1){
|
||||||
|
path = '/';
|
||||||
|
treeRoot.removeChild(treeRoot.childNodes[0]);
|
||||||
|
httpGet(treeRoot, "/");
|
||||||
|
} else {
|
||||||
|
path = path.substring(0, path.lastIndexOf('/'));
|
||||||
|
var leaf = document.getElementById(path).parentNode;
|
||||||
|
if(leaf.childNodes.length == 3) leaf.removeChild(leaf.childNodes[2]);
|
||||||
|
httpGet(leaf, path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpDelete(filename){
|
||||||
|
xmlHttp = new XMLHttpRequest();
|
||||||
|
xmlHttp.onreadystatechange = delCb(filename);
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append("path", filename);
|
||||||
|
xmlHttp.open("DELETE", "/edit");
|
||||||
|
xmlHttp.send(formData);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCb(parent, path){
|
||||||
|
return function(){
|
||||||
|
if (xmlHttp.readyState == 4){
|
||||||
|
//clear loading
|
||||||
|
if(xmlHttp.status == 200) addList(parent, path, JSON.parse(xmlHttp.responseText));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function httpGet(parent, path){
|
||||||
|
xmlHttp = new XMLHttpRequest(parent, path);
|
||||||
|
xmlHttp.onreadystatechange = getCb(parent, path);
|
||||||
|
xmlHttp.open("GET", "/list?dir="+path, true);
|
||||||
|
xmlHttp.send(null);
|
||||||
|
//start loading
|
||||||
|
}
|
||||||
|
|
||||||
|
httpGet(treeRoot, "/");
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createEditor(element, file, lang, theme, type){
|
||||||
|
function getLangFromFilename(filename){
|
||||||
|
var lang = "plain";
|
||||||
|
var ext = /(?:\.([^.]+))?$/.exec(filename)[1];
|
||||||
|
if(typeof ext !== undefined){
|
||||||
|
switch(ext){
|
||||||
|
case "txt": lang = "plain"; break;
|
||||||
|
case "htm": lang = "html"; break;
|
||||||
|
case "js": lang = "javascript"; break;
|
||||||
|
case "c": lang = "c_cpp"; break;
|
||||||
|
case "cpp": lang = "c_cpp"; break;
|
||||||
|
case "css":
|
||||||
|
case "scss":
|
||||||
|
case "php":
|
||||||
|
case "html":
|
||||||
|
case "json":
|
||||||
|
case "xml":
|
||||||
|
lang = ext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return lang;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(typeof file === "undefined") file = "/index.htm";
|
||||||
|
|
||||||
|
if(typeof lang === "undefined"){
|
||||||
|
lang = getLangFromFilename(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(typeof theme === "undefined") theme = "textmate";
|
||||||
|
|
||||||
|
if(typeof type === "undefined"){
|
||||||
|
type = "text/"+lang;
|
||||||
|
if(lang === "c_cpp") type = "text/plain";
|
||||||
|
}
|
||||||
|
|
||||||
|
var xmlHttp = null;
|
||||||
|
var editor = ace.edit(element);
|
||||||
|
|
||||||
|
//post
|
||||||
|
function httpPostProcessRequest(){
|
||||||
|
if (xmlHttp.readyState == 4){
|
||||||
|
if(xmlHttp.status != 200) alert("ERROR["+xmlHttp.status+"]: "+xmlHttp.responseText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function httpPost(filename, data, type){
|
||||||
|
xmlHttp = new XMLHttpRequest();
|
||||||
|
xmlHttp.onreadystatechange = httpPostProcessRequest;
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append("data", new Blob([data], { type: type }), filename);
|
||||||
|
xmlHttp.open("POST", "/edit");
|
||||||
|
xmlHttp.send(formData);
|
||||||
|
}
|
||||||
|
//get
|
||||||
|
function httpGetProcessRequest(){
|
||||||
|
if (xmlHttp.readyState == 4){
|
||||||
|
document.getElementById("preview").style.display = "none";
|
||||||
|
document.getElementById("editor").style.display = "block";
|
||||||
|
if(xmlHttp.status == 200) editor.setValue(xmlHttp.responseText);
|
||||||
|
else editor.setValue("");
|
||||||
|
editor.clearSelection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function httpGet(theUrl){
|
||||||
|
xmlHttp = new XMLHttpRequest();
|
||||||
|
xmlHttp.onreadystatechange = httpGetProcessRequest;
|
||||||
|
xmlHttp.open("GET", theUrl, true);
|
||||||
|
xmlHttp.send(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(lang !== "plain") editor.getSession().setMode("ace/mode/"+lang);
|
||||||
|
editor.setTheme("ace/theme/"+theme);
|
||||||
|
editor.$blockScrolling = Infinity;
|
||||||
|
editor.getSession().setUseSoftTabs(true);
|
||||||
|
editor.getSession().setTabSize(2);
|
||||||
|
editor.setHighlightActiveLine(true);
|
||||||
|
editor.setShowPrintMargin(false);
|
||||||
|
editor.commands.addCommand({
|
||||||
|
name: 'saveCommand',
|
||||||
|
bindKey: {win: 'Ctrl-S', mac: 'Command-S'},
|
||||||
|
exec: function(editor) {
|
||||||
|
httpPost(file, editor.getValue()+"", type);
|
||||||
|
},
|
||||||
|
readOnly: false
|
||||||
|
});
|
||||||
|
editor.commands.addCommand({
|
||||||
|
name: 'undoCommand',
|
||||||
|
bindKey: {win: 'Ctrl-Z', mac: 'Command-Z'},
|
||||||
|
exec: function(editor) {
|
||||||
|
editor.getSession().getUndoManager().undo(false);
|
||||||
|
},
|
||||||
|
readOnly: false
|
||||||
|
});
|
||||||
|
editor.commands.addCommand({
|
||||||
|
name: 'redoCommand',
|
||||||
|
bindKey: {win: 'Ctrl-Shift-Z', mac: 'Command-Shift-Z'},
|
||||||
|
exec: function(editor) {
|
||||||
|
editor.getSession().getUndoManager().redo(false);
|
||||||
|
},
|
||||||
|
readOnly: false
|
||||||
|
});
|
||||||
|
httpGet(file);
|
||||||
|
editor.loadUrl = function(filename){
|
||||||
|
file = filename;
|
||||||
|
lang = getLangFromFilename(file);
|
||||||
|
type = "text/"+lang;
|
||||||
|
if(lang !== "plain") editor.getSession().setMode("ace/mode/"+lang);
|
||||||
|
httpGet(file);
|
||||||
|
}
|
||||||
|
return editor;
|
||||||
|
}
|
||||||
|
function onBodyLoad(){
|
||||||
|
var vars = {};
|
||||||
|
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value; });
|
||||||
|
var editor = createEditor("editor", vars.file, vars.lang, vars.theme);
|
||||||
|
var tree = createTree("tree", editor);
|
||||||
|
createFileUploader("uploader", tree, editor);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.9/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||||
|
</head>
|
||||||
|
<body onload="onBodyLoad();">
|
||||||
|
<div id="uploader"></div>
|
||||||
|
<div id="tree"></div>
|
||||||
|
<div id="editor"></div>
|
||||||
|
<div id="preview" style="display:none;"></div>
|
||||||
|
<iframe id=download-frame style='display:none;'></iframe>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
## Retired, use:
|
||||||
|
McLightingHTML from https://github.com/FabLab-Luenen/McLightingHTML
|
||||||
|
|
||||||
|
or set #define USE_HTML_MIN_GZ in definitions.h to use the integrated!
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
## Retired, use:
|
||||||
|
McLightingHTML from https://github.com/FabLab-Luenen/McLightingHTML
|
||||||
|
|
||||||
|
or set #define USE_HTML_MIN_GZ in definitions.h to use the integrated!
|
||||||
+49
-13
@@ -11,39 +11,72 @@
|
|||||||
[platformio]
|
[platformio]
|
||||||
src_dir = ./Arduino/McLighting/
|
src_dir = ./Arduino/McLighting/
|
||||||
data_dir = ./Arduino/McLighting/data/
|
data_dir = ./Arduino/McLighting/data/
|
||||||
env_default = nodemcuv2
|
default_envs = nodemcuv2
|
||||||
description = The ESP8266 based multi-client lighting gadget
|
description = The ESP8266 based multi-client lighting gadget
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# PLATFORM:
|
||||||
|
# !! DO NOT confuse platformio's ESP8266 development platform with Arduino core for ESP8266
|
||||||
|
# We use Arduino Core 2.5.0 (platformIO 2.0.4) as default
|
||||||
|
#
|
||||||
|
# arduino core 2.3.0 = platformIO 1.5.0
|
||||||
|
# arduino core 2.4.0 = platformIO 1.6.0
|
||||||
|
# arduino core 2.4.1 = platformIO 1.7.3
|
||||||
|
# arduino core 2.4.2 = platformIO 1.8.0
|
||||||
|
# arduino core 2.5.0 = platformIO 2.0.4
|
||||||
|
# arduino core 2.5.1 = platformIO 2.1.1
|
||||||
|
# arduino core 2.5.2 = platformIO 2.2.3
|
||||||
|
# arduino core 2.6.1 = platformIO 2.3.0
|
||||||
|
# arduino core 2.6.2 = platformIO 2.3.1
|
||||||
|
# arduino core 2.6.3 = platformIO 2.3.2
|
||||||
|
# arduino core stage = platformIO feature#stage
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
arduino_core_2_3_0 = espressif8266@1.5.0
|
||||||
|
arduino_core_2_4_0 = espressif8266@1.6.0
|
||||||
|
arduino_core_2_4_1 = espressif8266@1.7.3
|
||||||
|
arduino_core_2_4_2 = espressif8266@1.8.0
|
||||||
|
arduino_core_2_5_0 = espressif8266@2.0.4
|
||||||
|
arduino_core_2_5_1 = espressif8266@2.1.1
|
||||||
|
arduino_core_2_5_2 = espressif8266@2.2.3
|
||||||
|
arduino_core_2_6_1 = espressif8266@2.3.0
|
||||||
|
arduino_core_2_6_2 = espressif8266@2.3.1
|
||||||
|
arduino_core_2_6_3 = espressif8266@2.3.2
|
||||||
|
arduino_core_stage = https://github.com/platformio/platform-espressif8266.git#feature/stage
|
||||||
|
|
||||||
framework = arduino
|
framework = arduino
|
||||||
platform = espressif8266@1.8.0
|
;platform = ${common.arduino_core_2_4_2}
|
||||||
; platform = https://github.com/platformio/platform-espressif8266.git
|
platform = ${common.arduino_core_2_5_2}
|
||||||
; platform = https://github.com/platformio/platform-espressif8266.git#feature/stage
|
|
||||||
; platform = https://github.com/platformio/platform-espressif8266.git#develop
|
|
||||||
build_flags =
|
build_flags =
|
||||||
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
|
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
|
||||||
-DMQTT_MAX_PACKET_SIZE=2048 ; PubSubClient Specific flags
|
-DMQTT_MAX_PACKET_SIZE=512 ; PubSubClient Specific flags
|
||||||
-w ; supress all warnings
|
-w ; supress all warnings
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
board_build.flash_mode = dout
|
board_build.flash_mode = dio
|
||||||
upload_speed = 115200
|
upload_speed = 115200
|
||||||
upload_resetmethod = nodemcu
|
upload_resetmethod = nodemcu
|
||||||
lib_deps =
|
lib_deps =
|
||||||
WiFiManager@0.14
|
WiFiManager
|
||||||
AsyncMqttClient
|
AsyncMqttClient
|
||||||
https://github.com/bblanchon/ArduinoJson.git#v6.7.0-beta
|
ArduinoJson
|
||||||
WS2812FX
|
WS2812FX
|
||||||
NeoPixelBus@2.4.1
|
NeoPixelBus
|
||||||
WebSockets
|
WebSockets
|
||||||
ESPAsyncE131
|
ESPAsyncE131
|
||||||
ESPAsyncUDP
|
ESPAsyncUDP
|
||||||
Brzo_I2C
|
https://github.com/FabLab-Luenen/GY33_MCU
|
||||||
|
Brzo I2C
|
||||||
|
IRremoteESP8266
|
||||||
|
FastLED
|
||||||
|
|
||||||
[env:esp01_1m]
|
[env:esp01_1m]
|
||||||
board = esp01_1m
|
board = esp01_1m
|
||||||
framework = ${common.framework}
|
framework = ${common.framework}
|
||||||
platform = ${common.platform}
|
platform = ${common.platform}
|
||||||
build_flags = ${common.build_flags} -D D1=2
|
board_build.f_cpu = 160000000L
|
||||||
|
build_flags =
|
||||||
|
${common.build_flags} -D D1=2
|
||||||
|
-Wl,-Teagle.flash.1m128.ld ; Required for core > v2.5.0 or staging version
|
||||||
monitor_speed = ${common.monitor_speed}
|
monitor_speed = ${common.monitor_speed}
|
||||||
upload_speed = ${common.upload_speed}
|
upload_speed = ${common.upload_speed}
|
||||||
upload_resetmethod = ${common.upload_resetmethod}
|
upload_resetmethod = ${common.upload_resetmethod}
|
||||||
@@ -54,7 +87,10 @@ lib_deps = ${common.lib_deps}
|
|||||||
board = nodemcuv2
|
board = nodemcuv2
|
||||||
framework = ${common.framework}
|
framework = ${common.framework}
|
||||||
platform = ${common.platform}
|
platform = ${common.platform}
|
||||||
build_flags = ${common.build_flags}
|
board_build.f_cpu = 160000000L
|
||||||
|
build_flags =
|
||||||
|
${common.build_flags}
|
||||||
|
-Wl,-Teagle.flash.4m2m.ld ; Required for core > v2.5.0 or staging version
|
||||||
monitor_speed = ${common.monitor_speed}
|
monitor_speed = ${common.monitor_speed}
|
||||||
upload_speed = ${common.upload_speed}
|
upload_speed = ${common.upload_speed}
|
||||||
upload_resetmethod = ${common.upload_resetmethod}
|
upload_resetmethod = ${common.upload_resetmethod}
|
||||||
|
|||||||
Reference in New Issue
Block a user