Skip to content

Commit 6fae7a3

Browse files
committed
Cache control no cache 😇, board presets robustness
Back end ======== - ESP32SvelteKit: experiment with "Cache-Control", "no-cache" - main / Module: comment runInAppTask_mutexChecker - Module IO: add pin_I2S / I2C / SDIO /Serial / Reserved / Ethernet, define TroyP4Nano, pinFunction -> usage - Physical layer: move requestmapping to loopDrivers (so done in drivers task) - Module drivers: readPins: only valid pins and lengths - FastLED: remove GPIO_IS_VALID_OUTPUT_GPIO as done in module drivers
1 parent 0e007fe commit 6fae7a3

File tree

14 files changed

+15543
-15487
lines changed

14 files changed

+15543
-15487
lines changed

interface/src/lib/components/moonbase/MultiRow.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
136136
// Update the default value reactively so we don't capture the initial derived value only once
137137
$effect(() => {
138-
propertyFilter.default = findItemInDefinition?.filter ?? '!none';
138+
propertyFilter.default = findItemInDefinition?.filter ?? '!Unused';
139139
});
140140
</script>
141141

lib/framework/ESP32SvelteKit.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ void ESP32SvelteKit::begin()
9797
response.setCode(200);
9898
response.setContentType(contentType.c_str());
9999
response.addHeader("Content-Encoding", "gzip");
100-
response.addHeader("Cache-Control", "public, immutable, max-age=31536000"); // 🌙 this is original, still tweaking for best results...
100+
response.addHeader("Cache-Control", "no-cache"); // 🌙 modified after a user got annoyed ;-)
101+
// response.addHeader("Cache-Control", "public, immutable, max-age=31536000"); // 🌙 this is original
101102
response.setContent(content, len);
102103
return response.send();
103104
};

lib/framework/WWWData.h

Lines changed: 14920 additions & 14913 deletions
Large diffs are not rendered by default.

src/MoonBase/Module.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ bool ModuleState::checkReOrderSwap(JsonString parent, JsonVariant stateData, Jso
104104
newStateIndex = parkedAtIndex; // e.g. 1 is stored in 0
105105

106106
if (newStateIndex != newIndex && onReOrderSwap) {
107-
runInAppTask_mutexChecker++;
108-
if (runInAppTask_mutexChecker > 1) EXT_LOGE(MB_TAG, "runInAppTask_mutexChecker %d", runInAppTask_mutexChecker);
107+
// runInAppTask_mutexChecker++;
108+
// if (runInAppTask_mutexChecker > 1) EXT_LOGE(MB_TAG, "runInAppTask_mutexChecker %d", runInAppTask_mutexChecker);
109109
std::lock_guard<std::mutex> lock(runInAppTask_mutex);
110110
runInAppTask.push_back([&, stateIndex, newIndex]() { onReOrderSwap(stateIndex, newIndex); });
111-
runInAppTask_mutexChecker--;
111+
// runInAppTask_mutexChecker--;
112112
}
113113

114114
if (parkedFromIndex == UINT8_MAX) parkedFromIndex = newIndex; // the index of value in the array stored in the parking spot
@@ -131,13 +131,13 @@ void Module::execOnUpdate(UpdatedItem& updatedItem) {
131131
}
132132

133133
// EXT_LOGD(ML_TAG, "%s[%d]%s[%d].%s = %s -> %s", updatedItem.parent[0].c_str(), updatedItem.index[0], updatedItem.parent[1].c_str(), updatedItem.index[1], updatedItem.name.c_str(), updatedItem.oldValue.c_str(), updatedItem.value.as<String>().c_str());
134-
runInAppTask_mutexChecker++;
135-
if (runInAppTask_mutexChecker > 1) EXT_LOGE(MB_TAG, "runInAppTask_mutexChecker %d", runInAppTask_mutexChecker);
134+
// runInAppTask_mutexChecker++;
135+
// if (runInAppTask_mutexChecker > 1) EXT_LOGE(MB_TAG, "runInAppTask_mutexChecker %d", runInAppTask_mutexChecker);
136136
std::lock_guard<std::mutex> lock(runInAppTask_mutex);
137137
runInAppTask.push_back([&, updatedItem]() mutable { // mutable as updatedItem is called by reference (&)
138138
onUpdate(updatedItem);
139139
});
140-
runInAppTask_mutexChecker--;
140+
// runInAppTask_mutexChecker--;
141141
}
142142

143143
bool ModuleState::compareRecursive(JsonString parent, JsonVariant stateData, JsonVariant newData, UpdatedItem& updatedItem, uint8_t depth, uint8_t index) {

0 commit comments

Comments
 (0)