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) {
|
uint16_t WS2812FX::mode_custom(void) {
|
||||||
if (SEGENV.call == 0) wasmfx.init();
|
if (SEGENV.call == 0) wasmfx.init();
|
||||||
wasmfx.run();
|
wasmfx.run();
|
||||||
return FRAMETIME;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ uint16_t WS2812FX::mode_benchmark(void) {
|
|||||||
i=(i+SEGMENT.speed/16+1);
|
i=(i+SEGMENT.speed/16+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FRAMETIME;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LED_SKIP_AMOUNT 1
|
#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 NUM_COLORS 3 /* number of colors per segment */
|
||||||
#define SEGMENT _segments[_segment_index]
|
#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",
|
"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",
|
"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",
|
"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",
|
"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",
|
"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",
|
"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",
|
"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;
|
runtime->memoryLimit = WASM_MEMORY_LIMIT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (wasm_buffer) { //from websockets
|
if (!wasm_buffer) { //from filesystem (fx.wasm)
|
||||||
//app_wasm_len = wasm_buffer_len;
|
|
||||||
} else { //from filesystem (fx.wasm)
|
|
||||||
wasm_buffer_len = MAX_WASM_BIN_SIZE;
|
wasm_buffer_len = MAX_WASM_BIN_SIZE;
|
||||||
if (!readToBuffer("/fx.wasm", &wasm_buffer, &wasm_buffer_len)) {
|
if (!readToBuffer("/fx.wasm", &wasm_buffer, &wasm_buffer_len)) {
|
||||||
result = "fload";
|
result = "fload";
|
||||||
@ -269,10 +267,8 @@ void wasmRun() {
|
|||||||
|
|
||||||
if (wasm_state != WASM_STATE_READY) return;
|
if (wasm_state != WASM_STATE_READY) return;
|
||||||
if (result) {
|
if (result) {
|
||||||
//Serial.println(F("You fucked up... Majorly..."));
|
Serial.print("WASM run error");
|
||||||
Serial.print("If only... ");
|
|
||||||
Serial.println(result);
|
Serial.println(result);
|
||||||
//Serial.println("That could save us🥺");
|
|
||||||
wasm_state = WASM_STATE_ERROR;
|
wasm_state = WASM_STATE_ERROR;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user