]> git.earman.xyz Git - sensor-watch.git/commitdiff
Fix command line in simulator
authorJames Haggerty <james@gruemail.com>
Tue, 22 Jul 2025 10:37:56 +0000 (20:37 +1000)
committerJoey Castillo <joeycastillo@utexas.edu>
Mon, 28 Jul 2025 13:23:54 +0000 (09:23 -0400)
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.

movement.c

index 18ec0ac2188fdc589b9746c7ff52ed3db105c056..f932de0aa8f2c57ab2570659e3b78f6bc31aa107 100644 (file)
@@ -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;