From: James Haggerty Date: Tue, 22 Jul 2025 10:37:56 +0000 (+1000) Subject: Fix command line in simulator X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=78eb0c0c978997c106fa0aa7c8a350353cd4aa3a;p=sensor-watch.git Fix command line in simulator In the original movement, the 'usb enabled' check was overridden to true for the simulator such that shell_task() would always be executed. In the new 'dummy' device in gossamer used by the simulator, this usb check returns false. Seemed like a slightly cleaner thing to do was to call shell_task() regardless rather than to incorrectly pretend that USB was connected. --- diff --git a/movement.c b/movement.c index 18ec0ac..f932de0 100644 --- a/movement.c +++ b/movement.c @@ -945,10 +945,14 @@ bool app_loop(void) { } } +#if __EMSCRIPTEN__ + shell_task(); +#else // if we are plugged into USB, handle the serial shell if (usb_is_enabled()) { shell_task(); } +#endif event.subsecond = 0;