Benchmark mode, allow arbitrary frame rate
This commit is contained in:
parent
7c3b96c0e1
commit
214d4364f1
@ -44,7 +44,7 @@ uint16_t WS2812FX::mode_static(void) {
|
||||
uint16_t WS2812FX::mode_custom(void) {
|
||||
if (SEGENV.call == 0) wasmfx.init();
|
||||
wasmfx.run();
|
||||
return FRAMETIME;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ uint16_t WS2812FX::mode_benchmark(void) {
|
||||
i=(i+SEGMENT.speed/16+1);
|
||||
}
|
||||
|
||||
return FRAMETIME;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -69,7 +69,7 @@
|
||||
#endif
|
||||
|
||||
#define LED_SKIP_AMOUNT 1
|
||||
#define MIN_SHOW_DELAY 15
|
||||
#define MIN_SHOW_DELAY 1
|
||||
|
||||
#define NUM_COLORS 3 /* number of colors per segment */
|
||||
#define SEGMENT _segments[_segment_index]
|
||||
@ -914,9 +914,9 @@ const char JSON_mode_names[] PROGMEM = R"=====([
|
||||
"Solid","Blink","Breathe","Wipe","Wipe Random","Random Colors","Sweep","Dynamic","Colorloop","Rainbow",
|
||||
"Scan","Scan Dual","Fade","Theater","Theater Rainbow","Running","Saw","Twinkle","Dissolve","Dissolve Rnd",
|
||||
"Sparkle","Sparkle Dark","Sparkle+","Strobe","Strobe Rainbow","Strobe Mega","Blink Rainbow","Android","Chase","Chase Random",
|
||||
"Chase Rainbow","Chase Flash","Chase Flash Rnd","Rainbow Runner","Colorful","Traffic Light","Sweep Random","Running 2","Aurora","Stream",
|
||||
"Chase Rainbow","Chase Flash","Chase Flash Rnd","Rainbow Runner","Colorful","Traffic Light","Sweep Random","Chase 2","Aurora","Stream",
|
||||
"Scanner","Lighthouse","Fireworks","Rain","Tetrix","Fire Flicker","Gradient","Loading","Police","Police All",
|
||||
"Two Dots","Two Areas","Running Dual","Halloween","Tri Chase","Tri Wipe","Tri Fade","Lightning","ICU","Multi Comet",
|
||||
"Two Dots","Two Areas","Running Dual","Halloween","Chase 3","Tri Wipe","Tri Fade","Lightning","ICU","Multi Comet",
|
||||
"Scanner Dual","Stream 2","Oscillate","Pride 2015","Juggle","Palette","Fire 2012","Colorwaves","Bpm","Fill Noise",
|
||||
"Noise 1","Noise 2","Noise 3","Noise 4","Colortwinkles","Lake","Meteor","Meteor Smooth","Railway","Ripple",
|
||||
"Twinklefox","Twinklecat","Halloween Eyes","Solid Pattern","Solid Pattern Tri","Spots","Spots Fade","Glitter","Candle","Fireworks Starburst",
|
||||
|
@ -212,9 +212,7 @@ void wasm_task(void*)
|
||||
runtime->memoryLimit = WASM_MEMORY_LIMIT;
|
||||
#endif
|
||||
|
||||
if (wasm_buffer) { //from websockets
|
||||
//app_wasm_len = wasm_buffer_len;
|
||||
} else { //from filesystem (fx.wasm)
|
||||
if (!wasm_buffer) { //from filesystem (fx.wasm)
|
||||
wasm_buffer_len = MAX_WASM_BIN_SIZE;
|
||||
if (!readToBuffer("/fx.wasm", &wasm_buffer, &wasm_buffer_len)) {
|
||||
result = "fload";
|
||||
@ -269,10 +267,8 @@ void wasmRun() {
|
||||
|
||||
if (wasm_state != WASM_STATE_READY) return;
|
||||
if (result) {
|
||||
//Serial.println(F("You fucked up... Majorly..."));
|
||||
Serial.print("If only... ");
|
||||
Serial.print("WASM run error");
|
||||
Serial.println(result);
|
||||
//Serial.println("That could save us🥺");
|
||||
wasm_state = WASM_STATE_ERROR;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user