Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ var screen_utils = {
},

_init: function() {
this._arrow_images.left = this._create_image('../assets/im_arrow_left.png?v=' + this._version);
this._arrow_images.right = this._create_image('../assets/im_arrow_right.png?v=' + this._version);
this._arrow_images.ahead = this._create_image('../assets/im_arrow_up.png?v=' + this._version);
this._arrow_images.none = this._create_image('../assets/im_arrow_none.png?v=' + this._version);
this._wheel_images.black = this._create_image('../assets/im_wheel_black.png?v=' + this._version);
this._wheel_images.blue = this._create_image('../assets/im_wheel_blue.png?v=' + this._version);
this._wheel_images.red = this._create_image('../assets/im_wheel_red.png?v=' + this._version);
this._navigation_icons.play = this._create_image('../assets/icon_play.png?v=' + this._version);
this._navigation_icons.pause = this._create_image('../assets/icon_pause.png?v=' + this._version);
this._arrow_images.left = this._create_image('../static/assets/im_arrow_left.png?v=' + this._version);
this._arrow_images.right = this._create_image('../static/assets/im_arrow_right.png?v=' + this._version);
this._arrow_images.ahead = this._create_image('../static/assets/im_arrow_up.png?v=' + this._version);
this._arrow_images.none = this._create_image('../static/assets/im_arrow_none.png?v=' + this._version);
this._wheel_images.black = this._create_image('../static/assets/im_wheel_black.png?v=' + this._version);
this._wheel_images.blue = this._create_image('../static/assets/im_wheel_blue.png?v=' + this._version);
this._wheel_images.red = this._create_image('../static/assets/im_wheel_red.png?v=' + this._version);
this._navigation_icons.play = this._create_image('../static/assets/icon_play.png?v=' + this._version);
this._navigation_icons.pause = this._create_image('../static/assets/icon_pause.png?v=' + this._version);
},

_decorate_server_message: function(message) {
Expand Down
10 changes: 5 additions & 5 deletions teleop/htm/static/JS/mobileController/mobileController_a_app.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { topTriangle, bottomTriangle } from "/JS/mobileController/mobileController_b_shape_triangle.js"
import { Dot } from "/JS/mobileController/mobileController_b_shape_dot.js"
import { topTriangle, bottomTriangle } from "./mobileController_b_shape_triangle.js"
import { Dot } from "./mobileController_b_shape_dot.js"
import { handleDotMove, detectTriangle, handleTriangleMove, initializeWS, sendJSONCommand }
from "/JS/mobileController/mobileController_c_logic.js"
from "./mobileController_c_logic.js"

import CTRL_STAT from '/JS/mobileController/mobileController_z_state.js'; // Stands for control state
import { redraw, app } from "/JS/mobileController/mobileController_d_pixi.js";
import CTRL_STAT from './mobileController_z_state.js'; // Stands for control state
import { redraw, app } from "./mobileController_d_pixi.js";


window.addEventListener('load', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import { topTriangle, bottomTriangle } from "/JS/mobileController/mobileController_b_shape_triangle.js"
import CTRL_STAT from '/JS/mobileController/mobileController_z_state.js';
import { redraw } from '/JS/mobileController/mobileController_d_pixi.js';
import { topTriangle, bottomTriangle } from "./mobileController_b_shape_triangle.js"
import CTRL_STAT from './mobileController_z_state.js';
import { redraw } from './mobileController_d_pixi.js';

function initializeWS() {
let WSprotocol = document.location.protocol === 'https:' ? 'wss://' : 'ws://';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { topTriangle, bottomTriangle } from "/JS/mobileController/mobileController_b_shape_triangle.js"
import CTRL_STAT from '/JS/mobileController/mobileController_z_state.js';
import { topTriangle, bottomTriangle } from "./mobileController_b_shape_triangle.js"
import CTRL_STAT from './mobileController_z_state.js';

const app = new PIXI.Application({
width: window.innerWidth,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//Shared State variables that goes between the files/modules used

import { Dot } from "/JS/mobileController/mobileController_b_shape_dot.js"
import { topTriangle, bottomTriangle } from "/JS/mobileController/mobileController_b_shape_triangle.js"
import { Dot } from "./mobileController_b_shape_dot.js"
import { topTriangle, bottomTriangle } from "./mobileController_b_shape_triangle.js"

class MobileControllerState {
//The starting y coord when the triangles are relocated ()
Expand Down
42 changes: 21 additions & 21 deletions teleop/htm/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>teleop</title>
<link rel="stylesheet" type="text/css" href="CSS/style.css" />
<script src="external/jquery-3.4.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="../static/CSS/style.css" />
<script src="../static/external/jquery-3.4.1.min.js"></script>
<link rel="shortcut icon" href="#" />
</head>

Expand Down Expand Up @@ -41,7 +41,7 @@
<div id="horizontal_bar">
<div id="home_menu" title="Settings">
<a title="navigate to user menu page" href="/user_menu">
<img id="home_menu_icon" src="assets/index-menu.png" />
<img id="home_menu_icon" src="../static/assets/index-menu.png" />
</a>
</div>
<div id="stream_links">
Expand All @@ -52,16 +52,16 @@
</div>
<div id="mjpeg_stream_controls">
<span id="mjpeg_quality_val">0</span>
<img id="caret_down" src="assets/caret.png" class="caret_img" title="Decrease motion jpeg quality" />
<img id="caret_up" src="assets/caret.png" class="caret_img" title="Increase motion jpeg quality" />
<img id="caret_down" src="../static/assets/caret.png" class="caret_img" title="Decrease motion jpeg quality" />
<img id="caret_up" src="../static/assets/caret.png" class="caret_img" title="Increase motion jpeg quality" />
</div>
<div id="preview_container" title="Show this camera on the main display">
<img id="mjpeg_camera_preview_image" class="preview_img" />
</div>
<div id="overlay_control_container">
<img src="assets/expand-collapse-icon-8.jpg" id="expand_camera_icon"
<img src="../static/assets/expand-collapse-icon-8.jpg" id="expand_camera_icon"
title="Expand or collapse the camera overlay" />
<a id="open_training_sessions_list" href="#"><img src="assets/gps_icon.jpg"
<a id="open_training_sessions_list" href="#"><img src="../static/assets/gps_icon.jpg"
title="Show training sessions" /></a>
</div>
<div id="dashboard">
Expand Down Expand Up @@ -89,11 +89,11 @@
<div id="navigation_route_container" title="Navigation points and their images will be displayed when matched">
<p>
<span id="navigation_route_sel_prev" title="Select the previous route, if any">
<img src="assets/caret.png" class="caret_img" />
<img src="../static/assets/caret.png" class="caret_img" />
</span>
<span id="navigation_route_name"></span>
<span id="navigation_route_sel_next" title="Select the next route, if any">
<img src="assets/caret.png" class="caret_img" />
<img src="../static/assets/caret.png" class="caret_img" />
</span>
</p>
<p>
Expand Down Expand Up @@ -122,18 +122,18 @@ <h2>Training sessions</h2>
</div>
</div>

<!-- The script is moved here to give the HTML time to load before any of the JavaScript loads, which can prevent errors, and speed up website response time. -->
<script src="JS/index.js"></script>
<script src="JS/index_a_utils.js"></script>
<script src="JS/index_b_gamepad.js"></script>
<script src="JS/index_c_screen.js"></script>
<script src="JS/index_d_navigator.js"></script>
<script src="JS/index_e_teleop.js"></script>
<script src="JS/index_f_trainingSessions.js"></script>
<script src="JS/http-live-player.js"></script>
<script src="JS/performance-polyfill.js"></script>
<script src="JS/index_video_hlp.js"></script>
<script src="JS/index_video_mjpeg.js"></script>
<!-- The script is moved here to give the HTML time to load before any of the JavaScript loads -->
<script src="../static/JS/Index/index.js"></script>
<script src="../static/JS/Index/index_a_utils.js"></script>
<script src="../static/JS/Index/index_b_gamepad.js"></script>
<script src="../static/JS/Index/index_c_screen.js"></script>
<script src="../static/JS/Index/index_d_navigator.js"></script>
<script src="../static/JS/Index/index_e_teleop.js"></script>
<script src="../static/JS/Index/index_f_trainingSessions.js"></script>
<script src="../static/JS/Index/index_video_hlp.js"></script>
<script src="../static/JS/Index/index_video_mjpeg.js"></script>
<script src="../static/JS/http-live-player.js"></script>
<script src="../static/JS/performance-polyfill.js"></script>
</body>

</html>
22 changes: 3 additions & 19 deletions teleop/htm/templates/mobile_controller_ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,14 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="../static/CSS/mobileController.css">
<link rel="shortcut icon" href="#" />
<title>Mobile controller</title>
</head>

<body>
<style>
body,
html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
/* This will prevent scrollbar from appearing */
}

canvas {
display: block;
}
</style>

<script src="external/pixi-v7.3.0-rc.2.min.js"></script>
<!-- File/folder names cannot be capital -->
<script type="module" src="JS/mobileController/mobileController_a_app.js"></script>
<script src="../static/external/pixi-v7.3.0-rc.2.min.js"></script>
<script type="module" src="../static/JS/mobileController/mobileController_a_app.js"></script>
</body>

</html>
28 changes: 14 additions & 14 deletions teleop/htm/templates/user_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Menu</title>
<link rel="stylesheet" href="external/jquery-ui-1.12.1.min.css" />
<link rel="stylesheet" href="external/radioslider-1.0.0_b1.min.css" />
<link rel="stylesheet" href="external/datatables/datatables-1.11.5.min.css" />
<link rel="stylesheet" href="external/datatables/fixedheader-3.2.2.min.css" />
<link rel="shortcut icon" href="#">
<link rel="stylesheet" href="../static/external/jquery-ui-1.12.1.min.css" />
<link rel="stylesheet" href="../static/external/radioslider-1.0.0_b1.min.css" />
<link rel="stylesheet" href="../static/external/datatables/datatables-1.11.5.min.css" />
<link rel="stylesheet" href="../static/external/datatables/fixedheader-3.2.2.min.css" />
<link rel="shortcut icon" href="#" />
<style type="text/css">
.application {
display: flex;
Expand Down Expand Up @@ -76,15 +76,15 @@
</main>
</div>
<footer></footer>
<script src="external/jquery-3.4.1.min.js"></script>
<script src="external/jquery-ui-1.12.1.min.js"></script>
<script src="external/jquery.radioslider-1.0.0_b1.min.js"></script>
<script src="external/datatables/datatables-1.11.5.min.js"></script>
<script src="external/datatables/fixedheader-3.2.2.min.js"></script>
<script src="JS/index_a_utils.js"></script>
<script src="JS/menu_settings.js"></script>
<script src="JS/menu_controls.js"></script>
<script src="JS/menu_logbox.js"></script>
<script src="../static/external/jquery-3.4.1.min.js"></script>
<script src="../static/external/jquery-ui-1.12.1.min.js"></script>
<script src="../static/external/jquery.radioslider-1.0.0_b1.min.js"></script>
<script src="../static/external/datatables/datatables-1.11.5.min.js"></script>
<script src="../static/external/datatables/fixedheader-3.2.2.min.js"></script>
<script src="../static/JS/Index/index_a_utils.js"></script>
<script src="../static/JS/userMenu/menu_settings.js"></script>
<script src="../static/JS/userMenu/menu_controls.js"></script>
<script src="../static/JS/userMenu/menu_logbox.js"></script>
</body>
</html>
<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion teleop/teleop/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def teleop_publish(cmd):
# Path to where the static files are stored (JS,CSS, images)
r"/(.*)",
web.StaticFileHandler,
{"path": os.path.join(os.path.sep, "app", "htm", "static")},
{"path": os.path.join(os.path.sep, "app", "htm")},
),
]
)
Expand Down