Skip to content

Commit 6ce1f35

Browse files
committed
Add sc example files
1 parent c024c2f commit 6ce1f35

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

docs/general/pull-requests.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Below lists are ordered in terms of likelyhood to be accepted:
1313
* ⚠️ [compile-warnings](https://github.com/theelims/ESP32-sveltekit/commit/8a4dc4171c37d04754744f76513c2d2a08b0662d): role and tab index
1414
* 💡 [service-name-string](https://github.com/theelims/ESP32-sveltekit/commit/05a7bd9a12999e087d0b05a62859d263679cc76a): Allow service names to be non string literals (e.g. done in MoonBase-Modules)
1515
* ⚠️ [EventSocket emitEvent: use String type](https://github.com/theelims/ESP32-sveltekit/commit/54c4a44eb95be2fe344bb78f022c8afcbbd8c731)
16+
* ⚠️ [no-emit-no-clients](https://github.com/ewowi/MoonBase/commit/c024c2ff656511c67625b3dce3642d6560724482)
1617
* 💡 [system-status-metrics](https://github.com/theelims/ESP32-sveltekit/commit/352cfe3e376b25f7470ad4f764cdf54f7069c645): use max instead of first
1718
* 💡 [help-to-docs](https://github.com/theelims/ESP32-sveltekit/commit/2c2d2fae5c37b220bc61dfb1ba6655485de6547f): Help link to github.io docs e.g. [animations](https://ewowi.github.io/MoonBase/moonbase/module/animations)
1819
* 💡 [System metrics](https://ewowi.github.io/MoonBase/system/metrics/)

misc/livescripts/effect.sc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
void setup() {
2+
printf("Run Live Script good morning\n");
3+
}
4+
void loop() {
5+
leds[random16(255)] = CRGB(0, 0, 255);
6+
}
7+
void main() {
8+
setup();
9+
while (true) {
10+
loop();
11+
sync();
12+
}
13+
}

misc/livescripts/fix.sc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
void main() {
2+
for (int x = 0; x<16; x++)
3+
for (int y=0; y<16; y++)
4+
addPixel(x,y,0);
5+
}

src/custom/ModuleAnimations.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ class ModuleAnimations : public Module
360360
runningPrograms.setFunctionToSync(show);
361361

362362
//run the recompile not in httpd but in main loopTask (otherwise we run out of stack space)
363-
// runInLoopTask.push_back([&, animation] {
363+
// runInLoopTask.push_back([&, animation, type, error] {
364364
ESP_LOGD(TAG, "compileAndRun %s %s", animation, type);
365365
File file = ESPFS.open(animation);
366366
if (file) {
@@ -396,8 +396,8 @@ class ModuleAnimations : public Module
396396
}
397397
// ... send to client
398398
//send also error to client
399-
// error.set(executable.error.error_message); //String(executable.error.error_message.c_str());
400-
_state.data["nodes"][2]["error"] = executable.error.error_message;
399+
error.set(executable.error.error_message); //String(executable.error.error_message.c_str());
400+
// _state.data["nodes"][2]["error"] = executable.error.error_message;
401401

402402
}
403403
// });

0 commit comments

Comments
 (0)