ARTI-FX change .wled.log to .log

This commit is contained in:
Ewoud
2023-04-08 15:32:58 +02:00
parent 79c67122dd
commit 822fcf272b
6 changed files with 833 additions and 827 deletions

View File

@@ -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");

View File

@@ -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);

View File

@@ -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");

View File

@@ -66,7 +66,7 @@ const uint8_t PAGE_update[] PROGMEM = {
0x39, 0x25, 0x1c, 0x67, 0x9a, 0x5e, 0x91, 0x2f, 0x2c, 0x03, 0x72, 0x70, 0x3f, 0x52, 0x38, 0xc3,
0x64, 0x50, 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x13, 0x5b, 0x07, 0xa1, 0xec, 0x03, 0x00, 0x00
};

View File

@@ -1678,7 +1678,7 @@ const uint8_t PAGE_settings_sec[] PROGMEM = {
0xd4, 0xba, 0xc4, 0x6c, 0x58, 0xa3, 0xd3, 0x0d, 0x69, 0x20, 0x1c, 0xa2, 0x75, 0x0b, 0xb3, 0xa0,
0x1f, 0x53, 0xde, 0xcd, 0x72, 0xf4, 0x4b, 0x3e, 0xa6, 0xd7, 0x97, 0x97, 0x94, 0x0d, 0x3d, 0x76,
0x23, 0x0d, 0xf1, 0x0d, 0xdb, 0x8f, 0x0e, 0x1e, 0x45, 0xfb, 0x7b, 0xb3, 0x83, 0x1f, 0xa3, 0xc3,
0x03, 0xf6, 0xdf, 0x7f, 0xff, 0x87, 0x30, 0x18, 0x24, 0x01, 0x3b, 0xdc, 0x3f, 0x7c, 0xc8, 0xbe,
0x43, 0xf6, 0xdf, 0x7f, 0xff, 0x87, 0x30, 0x18, 0x24, 0x01, 0x3b, 0xdc, 0x3f, 0x7c, 0xc8, 0xbe,
0xa8, 0xf1, 0x58, 0x99, 0x44, 0x6b, 0xbd, 0x54, 0xb2, 0x51, 0x48, 0x77, 0x57, 0xb8, 0x31, 0x2c,
0x84, 0x2a, 0xa3, 0x28, 0xda, 0x31, 0xe8, 0x88, 0xd6, 0x8f, 0x0a, 0xb4, 0x0c, 0xe4, 0xc7, 0x5d,
0xab, 0x7e, 0xf6, 0x12, 0xd9, 0xce, 0xf6, 0x66, 0xa0, 0x7d, 0xae, 0x0b, 0x0c, 0x56, 0xec, 0xb8,
@@ -1696,7 +1696,7 @@ const uint8_t PAGE_settings_sec[] PROGMEM = {
0xc1, 0x0d, 0x6b, 0x31, 0x26, 0xa0, 0xa1, 0xe0, 0xae, 0x5a, 0x76, 0x4c, 0x68, 0x55, 0xc5, 0x89,
0xb3, 0xfc, 0x3d, 0x9e, 0xf9, 0xab, 0x39, 0xb5, 0x3a, 0xda, 0xd2, 0xf4, 0x15, 0xe2, 0x09, 0x62,
0xc9, 0xe6, 0xb7, 0x8f, 0x2f, 0x0e, 0xf5, 0x9f, 0xce, 0xf4, 0xbd, 0x6f, 0x1a, 0xea, 0x87, 0xd4,
0x6d, 0xf1, 0x41, 0x77, 0x19, 0xba, 0xd8, 0xd0, 0xcf, 0xab, 0xff, 0x03, 0x77, 0xd3, 0x48, 0xa2,
0x6d, 0xf1, 0x41, 0x77, 0x19, 0xba, 0xd8, 0xd0, 0xcf, 0xab, 0xff, 0x03, 0x33, 0x62, 0x5d, 0xed,
0x6e, 0x15, 0x00, 0x00
};

File diff suppressed because it is too large Load Diff