ARTI-FX change .wled.log to .log
This commit is contained in:
@@ -2457,7 +2457,7 @@ public:
|
||||
#if ARTI_PLATFORM == ARTI_ARDUINO
|
||||
strcpy(logFileName, "/");
|
||||
#endif
|
||||
strcpy(logFileName, programName);
|
||||
strcat(logFileName, programName);
|
||||
strcat(logFileName, ".log");
|
||||
|
||||
#if ARTI_PLATFORM == ARTI_ARDUINO
|
||||
@@ -2526,17 +2526,24 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
char programFileName[fileNameLength];
|
||||
#if ARTI_PLATFORM == ARTI_ARDUINO
|
||||
strcpy(programFileName, "/");
|
||||
#endif
|
||||
strcat(programFileName, programName);
|
||||
strcat(programFileName, ".wled");
|
||||
|
||||
#if ARTI_PLATFORM == ARTI_ARDUINO
|
||||
File programFile;
|
||||
programFile = WLED_FS.open(programName, "r");
|
||||
programFile = WLED_FS.open(programFileName, "r");
|
||||
#else
|
||||
std::fstream programFile;
|
||||
programFile.open(programName, std::ios::in);
|
||||
programFile.open(programFileName, std::ios::in);
|
||||
#endif
|
||||
MEMORY_ARTI("open %s %u ✓\n", programName, FREE_SIZE);
|
||||
MEMORY_ARTI("open %s %u ✓\n", programFileName, FREE_SIZE);
|
||||
if (!programFile)
|
||||
{
|
||||
ERROR_ARTI("Program file %s not found\n", programName);
|
||||
ERROR_ARTI("Program file %s not found\n", programFileName);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2557,11 +2564,6 @@ public:
|
||||
#endif
|
||||
programFile.close();
|
||||
|
||||
char parseTreeName[fileNameLength];
|
||||
strcpy(parseTreeName, programName);
|
||||
// if (loadParseTreeFile)
|
||||
// strcpy(parseTreeName, "Gen");
|
||||
strcat(parseTreeName, ".json");
|
||||
#if ARTI_PLATFORM == ARTI_ARDUINO
|
||||
parseTreeJsonDoc = new PSRAMDynamicJsonDocument(32768); //less memory on arduino: 32 vs 64 bit?
|
||||
#else
|
||||
@@ -2573,6 +2575,15 @@ public:
|
||||
//parse
|
||||
|
||||
#ifdef ARTI_DEBUG // only read write file if debug is on
|
||||
char parseTreeName[fileNameLength];
|
||||
#if ARTI_PLATFORM == ARTI_ARDUINO
|
||||
strcpy(parseTreeName, "/");
|
||||
#endif
|
||||
strcat(parseTreeName, programName);
|
||||
// if (loadParseTreeFile)
|
||||
// strcpy(parseTreeName, "Gen");
|
||||
strcat(parseTreeName, ".json");
|
||||
|
||||
#if ARTI_PLATFORM == ARTI_ARDUINO
|
||||
File parseTreeFile;
|
||||
parseTreeFile = WLED_FS.open(parseTreeName, loadParseTreeFile?"r":"w");
|
||||
|
||||
@@ -72,11 +72,11 @@ function uploadFileWithText(name, text)
|
||||
}
|
||||
|
||||
function saveCE(name, segID) {
|
||||
showToast("Saving " + name);
|
||||
showToast("Saving " + name + ".wled");
|
||||
|
||||
var ceProgramArea = d.getElementById("ceProgramArea");
|
||||
|
||||
uploadFileWithText("/" + name, ceProgramArea.value);
|
||||
uploadFileWithText("/" + name + ".wled", ceProgramArea.value);
|
||||
|
||||
var obj = {"seg": {"id": segID, "reset": true}};
|
||||
requestJson(obj);
|
||||
@@ -97,7 +97,7 @@ function populateCEEditor(name, segID)
|
||||
<i>${name}.wled</i><br>
|
||||
<textarea class="ceTextarea" id="ceProgramArea">${text}</textarea><br>
|
||||
<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}', ${segID})">Save and Run</button><br>
|
||||
<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="downloadGHFile('CE','wledv033.json',true,true)">Download wled json</button>
|
||||
@@ -115,7 +115,7 @@ function populateCEEditor(name, segID)
|
||||
|
||||
var ceLogArea = d.getElementById("ceLogArea");
|
||||
ceLogArea.value = ".";
|
||||
loadLogFile(name + ".wled.log", 1);
|
||||
loadLogFile(name + ".log", 1);
|
||||
|
||||
}, function(error){
|
||||
showToast(error);
|
||||
|
||||
@@ -46,12 +46,7 @@ uint16_t mode_ARTIFX(void) {
|
||||
// artiWrapper = reinterpret_cast<ArtiWrapper*>(SEGENV.data);
|
||||
arti = new ARTI();
|
||||
|
||||
char programFileName[fileNameLength];
|
||||
strcpy(programFileName, "/");
|
||||
strcat(programFileName, currentEffect);
|
||||
strcat(programFileName, ".wled");
|
||||
|
||||
succesful = arti->setup("/wledv033.json", programFileName);
|
||||
succesful = arti->setup("/wledv033.json", currentEffect);
|
||||
|
||||
if (!succesful)
|
||||
ERROR_ARTI("Setup not succesful\n");
|
||||
|
||||
Reference in New Issue
Block a user