MCPcopy Create free account
hub / github.com/BruceDevices/firmware / runNavigation

Function runNavigation

embedded_resources/web_interface/index.js:512–525  ·  view source on GitHub ↗
(direction)

Source from the content-addressed store, hash-verified

510
511let SCREEN_NAVIGATING = false;
512async function runNavigation(direction) {
513 if (SCREEN_NAVIGATING) return;
514 SCREEN_NAVIGATING = true;
515 try {
516 drawCanvasLoading();
517 await requestPost("/cm", { cmnd: `nav ${direction.toLowerCase()}` });
518 await reloadScreen();
519 } catch (error) {
520 alert("Failed to run command: " + error.message);
521 console.error(error);
522 } finally {
523 SCREEN_NAVIGATING = false;
524 }
525}
526
527const btnForceReload = $("#force-reload");
528let SCREEN_RELOAD = false;

Callers 1

index.jsFile · 0.85

Calls 3

drawCanvasLoadingFunction · 0.85
requestPostFunction · 0.85
reloadScreenFunction · 0.85

Tested by

no test coverage detected