Fixed
improve HTTP client configuration and clear update documents after API calls (Manuel Weiser)
6cc4efc - Fixes memory leak in HTTPClient by disabling connection reuse (Jan Philipp Ecker)
update reload logic after removing and saving Bambu credentials for better cache handling (Manuel Weiser)
Changed
docs: update changelog and header for version v1.4.8 (Manuel Weiser)
docs: update platformio.ini for version v1.4.8 (Manuel Weiser)
Merge pull request #30 from janecker/main (ManuelW)
Merge branch 'testing' into main (ManuelW)
This commit is contained in:
2025-03-30 14:32:11 +02:00
parent 0302725bc7
commit 3590187cbe
2 changed files with 11 additions and 6 deletions
+4 -4
View File
@@ -70,8 +70,8 @@
document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials removed!';
// Reload with forced cache refresh after short delay
setTimeout(() => {
window.location.replace('/');
location.reload(true);
window.location.reload(true);
window.location.href = '/';
}, 1500);
} else {
document.getElementById('bambuStatusMessage').innerText = 'Error while removing Bambu Credentials.';
@@ -116,8 +116,8 @@
document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials saved!';
// Reload with forced cache refresh after short delay
setTimeout(() => {
window.location.replace('/');
location.reload(true);
window.location.reload(true);
window.location.href = '/';
}, 1500);
} else {
document.getElementById('bambuStatusMessage').innerText = 'Error while saving Bambu Credentials.';
+5
View File
@@ -94,6 +94,7 @@ void sendToApi(void *parameter) {
String octoToken = params->octoToken;
HTTPClient http;
http.setReuse(false);
http.begin(spoolsUrl);
http.addHeader("Content-Type", "application/json");
if (octoEnabled && octoToken != "") http.addHeader("X-Api-Key", octoToken);
@@ -111,6 +112,7 @@ void sendToApi(void *parameter) {
}
http.end();
vTaskDelay(50 / portTICK_PERIOD_MS);
// Speicher freigeben
delete params;
@@ -164,6 +166,7 @@ bool updateSpoolTagId(String uidString, const char* payload) {
0, // Priorität
NULL // Task-Handle (nicht benötigt)
);
updateDoc.clear();
return true;
}
@@ -200,6 +203,7 @@ uint8_t updateSpoolWeight(String spoolId, uint16_t weight) {
0, // Priorität
NULL // Task-Handle (nicht benötigt)
);
updateDoc.clear();
return 1;
}
@@ -237,6 +241,7 @@ bool updateSpoolOcto(int spoolId) {
0, // Priorität
NULL // Task-Handle (nicht benötigt)
);
updateDoc.clear();
return true;
}