restore MM functionality to not reset segments if 2D settings change!!!
customeffects.js: - rename downloadCEFile to downloadGHFile - downloadGHFile: add GH ledmaps folder FX_fcn.cpp and set.cpp: - change makeAutoSegments with resetSegments(true)
This commit is contained in:
@@ -98,17 +98,18 @@ function populateCEEditor(name, segID)
|
|||||||
<textarea class="ceTextarea" id="ceProgramArea">${text}</textarea><br>
|
<textarea class="ceTextarea" id="ceProgramArea">${text}</textarea><br>
|
||||||
<button class="btn infobtn" onclick="toggleCEEditor()">Close</button>
|
<button class="btn infobtn" onclick="toggleCEEditor()">Close</button>
|
||||||
<button class="btn infobtn" onclick="saveCE('${name}.wled', ${segID})">Save and Run</button><br>
|
<button class="btn infobtn" onclick="saveCE('${name}.wled', ${segID})">Save and Run</button><br>
|
||||||
<button class="btn infobtn" onclick="downloadCEFile('CE','${name}.wled')">Download ${name}.wled</button>
|
<button class="btn infobtn" onclick="downloadGHFile('CE','${name}.wled')">Download ${name}.wled</button>
|
||||||
<button class="btn infobtn" onclick="loadCETemplate('${name}')">Load template</button><br>
|
<button class="btn infobtn" onclick="loadCETemplate('${name}')">Load template</button><br>
|
||||||
<button class="btn infobtn" onclick="downloadCEFile('CE','wledv033.json')">Download wled json</button>
|
<button class="btn infobtn" onclick="downloadGHFile('CE','wledv033.json',true,true)">Download wled json</button>
|
||||||
<button class="btn infobtn" onclick="downloadCEFile('CE','presets.json')">Download presets.json</button><br>
|
<button class="btn infobtn" onclick="downloadGHFile('CE','presets.json',true,true)">Download presets.json</button><br>
|
||||||
<button class="btn infobtn" onclick="location.href='https://github.com/MoonModules/WLED-Effects/tree/master/CustomEffects/wled'" type="button">Custom Effects Library</button>
|
<button class="btn infobtn" onclick="location.href='https://github.com/MoonModules/WLED-Effects/tree/master/CustomEffects/wled'" type="button">Custom Effects Library</button>
|
||||||
<button class="btn infobtn btn-xs" onclick="location.href='https://mm.kno.wled.ge/moonmodules/custom-effects'" type="button">?</button><br>
|
<button class="btn infobtn btn-xs" onclick="location.href='https://mm.kno.wled.ge/moonmodules/custom-effects'" type="button">?</button><br>
|
||||||
<br><i>Compile and Run Log</i><br>
|
<br><i>Compile and Run Log</i><br>
|
||||||
<textarea class="ceTextarea" id="ceLogArea"></textarea><br>
|
<textarea class="ceTextarea" id="ceLogArea"></textarea><br>
|
||||||
<i>Run log > 3 seconds is send to Serial Ouput.</i><br>
|
<i>Run log > 3 seconds is send to Serial Ouput.</i><br>
|
||||||
<a href="#" onclick="downloadCEFile('HBB','presets.json');return false;" title="Download HBaas Base presets">🥚</a>
|
<a href="#" onclick="downloadGHFile('HBB','presets.json',true,true);return false;" title="Download HBaas Base presets">🥚</a>
|
||||||
<a href="#" onclick="downloadCEFile('HBE','presets.json');return false;" title="Download HBaas Effects presets">🥚</a>`;
|
<a href="#" onclick="downloadGHFile('HBE','presets.json',true,true);return false;" title="Download HBaas Effects presets">🥚</a>
|
||||||
|
<a href="#" onclick="downloadGHFile('LM','presets.json',true,true);return false;" title="Download Ledmap presets">🥚</a>`;
|
||||||
|
|
||||||
d.getElementById('kceEditor').innerHTML = cn;
|
d.getElementById('kceEditor').innerHTML = cn;
|
||||||
|
|
||||||
@@ -122,14 +123,15 @@ function populateCEEditor(name, segID)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadCEFile(url, name) {
|
function downloadGHFile(url, name, save=false, warn=false) { //Githubfile
|
||||||
if (url == "CE") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/CustomEffects/wled/";
|
if (url == "CE") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/CustomEffects/wled/";
|
||||||
if (url == "HBB") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/Presets/HB_PresetPack210808_32x32_16seg/Base%20pack/";
|
if (url == "HBB") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/Presets/HB_PresetPack210808_32x32_16seg/Base%20pack/";
|
||||||
if (url == "HBE") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/Presets/HB_PresetPack210808_32x32_16seg/Effects%20pack/";
|
if (url == "HBE") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/Presets/HB_PresetPack210808_32x32_16seg/Effects%20pack/";
|
||||||
|
if (url == "LM") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/Ledmaps/";
|
||||||
|
|
||||||
fetchAndExecute(url, name, function(text) {
|
fetchAndExecute(url, name, function(text) {
|
||||||
if (name == "wledv033.json" || name == "presets.json") {
|
if (save) {
|
||||||
if (!confirm('Are you sure to download/overwrite ' + name + '?'))
|
if (warn && !confirm('Are you sure to download/overwrite ' + name + '?'))
|
||||||
return;
|
return;
|
||||||
uploadFileWithText("/" + name, text);
|
uploadFileWithText("/" + name, text);
|
||||||
}
|
}
|
||||||
@@ -140,7 +142,7 @@ function downloadCEFile(url, name) {
|
|||||||
}
|
}
|
||||||
}, function(error){
|
}, function(error){
|
||||||
showToast(error);
|
showToast(error);
|
||||||
console.log(error);
|
console.log(url + name,error);
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -2097,7 +2097,7 @@ bool WS2812FX::deserializeMap(uint8_t n) {
|
|||||||
Segment::maxWidth = p.width;
|
Segment::maxWidth = p.width;
|
||||||
Segment::maxHeight = p.height;
|
Segment::maxHeight = p.height;
|
||||||
|
|
||||||
makeAutoSegments();
|
resetSegments(true); //WLEDMM not makeAutoSegments() as we only want to change bounds
|
||||||
}
|
}
|
||||||
|
|
||||||
customMappingSize = map.size();
|
customMappingSize = map.size();
|
||||||
|
|||||||
@@ -1377,6 +1377,7 @@ function drawSegmentView() {
|
|||||||
post();
|
post();
|
||||||
}, function(error) { //error handling
|
}, function(error) { //error handling
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
// downloadGHFile("LM", fileName, true, false); WLEDMM: remove as this has too much impact
|
||||||
post();
|
post();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
1603
wled00/html_ui.h
1603
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
@@ -726,7 +726,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
|||||||
strip.panel.push_back(p);
|
strip.panel.push_back(p);
|
||||||
}
|
}
|
||||||
strip.setUpMatrix(); // will check limits
|
strip.setUpMatrix(); // will check limits
|
||||||
strip.makeAutoSegments(true);
|
strip.resetSegments(true); //WLEDMM not makeAutoSegments(true) as we only want to change bounds
|
||||||
strip.deserializeMap();
|
strip.deserializeMap();
|
||||||
} else {
|
} else {
|
||||||
Segment::maxWidth = strip.getLengthTotal();
|
Segment::maxWidth = strip.getLengthTotal();
|
||||||
|
|||||||
Reference in New Issue
Block a user