From e462a15fb8b1f5ff505153f1a3e1097a4fbf0e80 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 2 May 2022 03:29:51 -0700 Subject: web: split opts and prompt handlers into separate files Currently using a bunch of forward declarations in prompt.c that should be cleaned up later. --- web/web_opts.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 web/web_opts.c (limited to 'web/web_opts.c') diff --git a/web/web_opts.c b/web/web_opts.c new file mode 100644 index 0000000..1188232 --- /dev/null +++ b/web/web_opts.c @@ -0,0 +1,22 @@ +#include "web_opts.h" + +#include "comp.h" + +#include + +#include + +int delay_ms = 1000; + +EMSCRIPTEN_KEEPALIVE +void set_delay(int delay) +{ + delay_ms = delay; +} + +EMSCRIPTEN_KEEPALIVE +void set_stdev(float stdev) +{ + if (!isnan(stdev)) + horizontal_stdev = vertical_stdev = stdev; +} -- cgit v1.2.3-70-g09d2