-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
369 lines (309 loc) · 18.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>DESKTOP</title>
<!-- Foundation 5.5.3 -->
<script src="js/lib/modernizr.js"></script>
<link rel="stylesheet" href="css/foundation.min.css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/tips.css">
<!-- Can't use standard dashboard.css because of conflicts with foundation here -->
<!-- <link rel="stylesheet" href="../../css/dashboard.css"> -->
<!-- <link rel="stylesheet" href="css/stylejogdial.css"> -->
<script src="js/lib/jquery.js"></script>
<script src="js/lib/foundation.min.js"></script>
<script src="js/lib/foundation.dropdown.js"></script>
<!-- <script src="js/lib/modernizr.js"></script> seems to fix mordernizr issue -->
<script src="js/lib/fastclick.js" async></script>
<script src="js/lib/haptics.js"></script>
<script src="js/lib/fabmo.js"></script>
<!--Note that paperjs is not ES6; mo_pad is run in paperscript, not javascript-->
<script src="js/lib/paper-full.min.js" defer></script>
<script type="text/paperscript" src="js/mo_pad.js" canvas="rmanCanvas" defer></script>
<script src="js/tool_config.js"></script>
<script src="js/sb_app.js"></script>
<script src="js/init_setActions.js"></script>
<script src="js/motion.js" defer></script>
<script src="js/message_g2.js" defer></script>
<!-- <script src="js/video.js"></script> --> <!-- for video streaming -->
<script> let fabmo = new FabMoDashboard(); </script>
</head>
<body id="sb4app" style="background-color:rgb(151, 150, 150)">
<nav class="top-bar" data-topbar role="navigation" style="background-color:rgb(92, 90, 90)">
<ul class="title-area">
<li class="name"></li>
<li class="toggle-topbar menu-icon"><a href="#"><span>menu</span></a></li>
</ul>
<section class="top-bar-section">
<ul class="left">
<li class="divider"></li>
<li class="has-dropdown">
<a style="background-color:rgb(92, 90, 90)" title="CUT, Edit, or Preview PART FILES"><strong>F</strong>iles</a>
<ul class="dropdown" id="menu_files">
<li></li>
</ul>
</li>
<li class="divider"></li>
<li class="has-dropdown">
<a style="background-color:rgb(92, 90, 90)" title="Basic Movement Commands"><strong>M</strong>oves</a>
<ul class="dropdown" id="menu_moves">
<li></li>
</ul>
</li>
<li class="divider"></li>
<li class="has-dropdown">
<a style="background-color:rgb(92, 90, 90)" title="Jog or Rapid Motion Commands"><strong>J</strong>ogs</a>
<ul class="dropdown" id="menu_jogs">
<li></li>
</ul>
</li>
<li class="divider"></li>
<li class="has-dropdown">
<a style="background-color:rgb(92, 90, 90)" title="Simple Cut Commands and Custom Macros"><strong>C</strong>uts</a>
<ul class="dropdown" id="menu_cuts">
<li></li>
</ul>
</li>
<li class="divider"></li>
<li class="has-dropdown">
<a style="background-color:rgb(92, 90, 90)" title="Zero an Axis or Axes at its Current Location"><strong>Z</strong>ero</a>
<ul class="dropdown" id="menu_zero">
<li></li>
</ul>
</li>
<li class="divider hide-for-large-down"></li>
<li class="has-dropdown hide-for-large-down">
<a style="background-color:rgb(92, 90, 90)" class="hide-for-large-down" title="Input or Change a Setting"><strong>S</strong>ettings</a>
<ul class="dropdown" id="menu_settings">
<li></li>
</ul>
</li>
<li class="divider hide-for-large-down"></li>
<li class="has-dropdown hide-for-large-down">
<a style="background-color:rgb(92, 90, 90)" class="hide-for-large-down" title="Set or Change Current Configuration Values"><strong>V</strong>alues</a>
<ul class="dropdown" id="menu_values">
<li></li>
</ul>
</li>
<li class="divider"></li>
<li class="has-dropdown">
<a style="background-color:rgb(92, 90, 90)" title="Tools for Special Purposes"><strong>T</strong>ools</a>
<ul class="dropdown" id="menu_tools">
<li></li>
</ul>
</li>
<li class="divider"></li>
<li class="has-dropdown">
<a style="background-color:rgb(92, 90, 90)" title="Use a web-based CAD/CAM Design program"><strong>D</strong>esign</a>
<ul class="dropdown" id="menu_design">
<li></li>
</ul>
</li>
<li class="divider"></li>
<li class="has-dropdown">
<a style="background-color:rgb(92, 90, 90)" title="Get Help for ShopBot"><strong>H</strong>elp</a>
<ul class="dropdown" id="menu_help">
<li></li>
</ul>
</li>
<li class="divider"></li>
</ul>
</section>
<span class="spindle-display">spindle-RPM <input type="number" placeholder="0" id="spindle-speed" class="text-right" readonly></span>
</nav>
<form style="display:none;" id="fileform">
<input name="uploadFile" type="file" id="file">
<button onclick="loadFileAsText()"></button>
</form>
<!-- Grid Layout -->
<div class="row">
<!-- <p> </p> -->
<div class="small-12 medium-12 large-12 columns">
<div class="row main-row small-collapse medium-collapse large-uncollapse">
<!-- LEFT SIDE -->
<!-- Macro Button Panel -->
<div class="small-5 medium-3 large-3 columns">
<div class="callout panel" id="macro-panel">
<!-- Buttons (actions) -->
<div class="macros">
<h9 class="panel-label" id="macro-panel-label"><strong>Standard Workflow</strong><span class="tooltip tooltip-below">i<span class="tooltiptext">
This panel accesses the normal steps for starting-up your tool and Cutting or Managing your Part Files.<br><br>
Click to download a detailed workflow checklist.</span></span>
</h9>
<button type="button" class="macro-button secondary button small medium-expanded" id="first_macro_button">
1 - Home X & Y [C3]
<span class="tog-homed" id="tog-xy-homed" style="color: grey;">⦸</span>
</button>
<button type="button" class="macro-button secondary button small medium-expanded" id="second_macro_button">
2 - Set Z Zero [C2]
<span class="tog-homed" id="tog-z-homed" style="color: grey;">⦸</span>
</button>
<button type="button" class="macro-button success button small medium-expanded" id="cut_part_call" title="Pick a Single Part to Cut">
<strong>3 - CUT PART [FP]</strong>
</button>
<button type="button" class="macro-button success button small medium-expanded" id="to_job_manager" title="Select and Order Parts in Job Manager">
<span class="icon"></span>
<strong>(3) MANAGE PARTS</strong>
</button>
</div>
<div class="other-macros">
<!-- <label class="panel-label show-for-medium-up" title="Access other helpful macros and quick command calls; User configurable in ..."><strong>Other Helpful Macros</strong></label> -->
<label class="panel-label show-for-medium-up"><strong>Other Helpful Macros</strong></label>
<button type="button" class="cmd-button secondary button small medium-expanded" id="cmd_button1" title="Jog Home (X and Y; Z Safe Height)">JH</button>
<button type="button" class="cmd-button secondary button small medium-expanded" id="cmd_button2" title="zero Z axis">ZZ</button>
<button type="button" class="cmd-button secondary button small medium-expanded" id="cmd_button3" title="Move to Park location">Park (C79)</button>
<button type="button" class="macro-button secondary button small medium-expanded" id="third_macro_button">Square Gantry (C10)</button>
<!-- <button type="button" class="macro-button secondary button small medium-expanded" id="fourth_macro_button">Test Cut (C210)</button> -->
<button type="button" class="macro-button secondary button small medium-expanded" id="fifth_macro_button">First Project - Bit Holder (C211)</button>
</div>
</div>
</div>
<!-- RIGHT SIDE -->
<div class="small-7 medium-9 large-9 columns">
<!-- Command Input and File Display Panel -->
<div class="callout panel" id="cmd-panel">
<form>
<div class="row">
<div class="small-11 medium-11 large-11 columns">
<label class="show-for-small-only"><strong>Cmd</strong></label>
<h9 class="panel-label show-for-medium-up cmds"><strong>Individual Command Input</strong><span class="tooltip tooltip-below">i<span class="tooltiptext">
Run specific OpenSBP Commands. Select from menu above or type directly here.<br><br> See: Help > Command Reference.<br><br></span></span>
</h9>
<img class="right" id="vid-button" "vid-button-off" title="Toggle Video" style="height:20px; width:20px; position:absolute; top:5px; right:-40px" src="./assets/icon_video.png">
<form><strong>
<input class="cmds" type="text" autocomplete="off" autocorrect="off" autofill="off" spellcheck ="false" id="cmd-input" font-weight="bold" placeholder="2-Letter OpenSBP Command, {followed by parameters ...}" value="" />
<!-- <input class="show-for-medium-up cmds" type="text" autocomplete="off" autocorrect="off" autofill="off" spellcheck ="false" id="cmd-input" placeholder="2-Letter OpenSBP Command, {followed by parameters ...}" value="" />
<input class="show-for-small-only cmds" type="text" autocomplete="off" autocorrect="off" autofill="off" spellcheck ="false" id="cmd-input" placeholder="{2-Letters...}" value="" /> -->
</strong></form>
</div>
<div class="medium-1 large-1 columns">
<button type="button" class="secondary button small hide-for-small-only medium-expanded" title="Get Command Help in OpenSBP Reference." id="cmd-help">?--</button>
</div>
</div>
<!-- display panel -->
<div class="row">
<div class="large-12 columns">
<div id="sbp-container" class="video-container show-for-medium-up running" rows="6" cols="50" no-scroll no-wrap>
<img src="" id="video" alt="Video"/><img src="" id="video1" alt="Video1"/>
<div class="content">
<textarea class="show-for-medium-up running" name="textarea_filedisplay" id="file_txt_area" readonly no-scroll no-wrap style="font-family:'Courier New', Courier, monospace"></textarea>
</div>
</div>
<!-- Load your video.js script -->
<script src="js/video.js"></script>
</div>
</div>
</form>
</div>
<!-- Speed and Copyright Panel -->
<div class="callout panel" id="speed-panel">
<form>
<div class="row">
<div class="large-12 columns">
<div class="logo-box small-6 medium-4 large-4 columns">
<span class="tooltip tooltip-logo">i<span class="tooltiptext">
This app is ShopBot's CNC interface for setting up your tool and
cutting Part Files (left panel). You can also send individual Commands in the OpenSBP language (top right panel). See HELP >
Command Reference for info on OpenSBP language.</span></span>
<img panel-label class="top" tabindex="1" id="sb-logo" src="./assets/image6b_transparent.png">
<p class="small show-for-medium-up text-left at-foot">[ ESC backs out; 'K' opens Keypad; F11 (or right-click) exits fullscreen ]</p>
</div>
<div class="move-speed-box small-11 medium-8 large-8 columns">
<div class="row">
<div class="large-6 medium-6 columns">
<label class="right speed-labels show-for-medium-up">Default Move Speed X / Y</label>
<label class="right speed-labels show-for-small-only">Move Speed X/Y</label>
<input type="text" placeholder="0.00" id="formatted_movexy_speed" class=" text-right opensbp_input_formattedspeeds" />
</div>
<div class="large-6 medium-6 columns">
<label class="right speed-labels show-for-medium-up"> Default Move Speed Z </label>
<label class="right speed-labels show-for-small-only">Move Speed Z</label>
<input type="text" placeholder="0.00" id="formatted_movez_speed" class="text-right opensbp_input_formattedspeeds" />
</div>
</div>
<div class="row">
<div class="large-6 medium-6 columns">
<label class="right speed-labels show-for-medium-up"> Default Jog Speed X / Y</label>
<label class="right speed-labels show-for-small-only">Jog Speed X/Y</label>
<input type="text" placeholder="0.00" id="formatted_jogxy_speed" class="text-right opensbp_input_formattedspeeds" />
</div>
<div class="large-6 medium-6 columns">
<label class="right speed-labels show-for-medium-up"> Default Jog Speed Z </label>
<label class="right speed-labels show-for-small-only">Jog Speed Z</label>
<input type="text" placeholder="0.00" id="formatted_jogz_speed" class="text-right opensbp_input_formattedspeeds" />
</div>
</div>
<div>
<p class="small text-left at-foot show-for-medium-up" id="copyright">© Copyright ShopBot Tools 2024.</p>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<a href="#" data-reveal-id="moPad">beta MOtion-PAD</a><br>
<a href="#" data-reveal-id="insertStream">beta INSERT</a>
<!-- needed this setting here to prevent closing; left in later for redundancy -->
<script>Foundation.libs.reveal.settings.close_on_background_click = false;</script>
<script>Foundation.libs.reveal.settings.close_on_esc = true;</script>
<!-- Fill-In Sheet -->
<div id="fi-modal" class="reveal-modal" data-reveal role="dialog">
<form autocomplete="off">
<h3 class="fi-title" id="fi_modal_title">File Ready to Run</h3>
<p class="fi-title" id="fi_cur_info"></p>
<div id="fi_container">
<div id="fill_in_table"><table>
<tbody class="fi-params fi-listing"></tbody>
</table></div>
</div>
<ul class="button-group">
<li><a class="secondary button fi-button" role="button" id="btn_ok_run" tabindex="0" style="background-color:green; color:white">OK-RUN</a></li>
<li><a class="secondary button fi-button" role="button" id="btn_adv_file" title="handle in Job Manager; Queue, Preview, Edit, Scale, etc..">Advanced Functions</a></li>
<li><a class="secondary button fi-button" role="button" id="btn_cmd_quit">Close</a></li>
</ul>
</form>
</div>
<!-- Provide Info Sheets in Help -->
<div id="helpModal" class="reveal-modal" data-reveal role="dialog">
<h2>Config Values and Persistent Variables ('esc' to close)</h2>
<p> <pre id="full-config">No configuration loaded yet.</pre> </p>
</div>
<!-- INSERT BETA -->
<div id="insertStream" class="reveal-modal" data-reveal role="dialog">
<h2 id="fi_modal_title">Insert Command Into G2 Stream:</h2>
<input class="inserts" autocomplete="off" autocorrect="off" autofill="off" spellcheck ="false" id="insert-input" font-weight="bold" placeholder="RAW: g2 json OR g-code (& = end-line; ^ = kill; # = reset-G2)" value="" />
</div>
<!-- MOTION PAD BETA -->
<div class="row">
<div id="moPad" class="reveal-modal-bg full" data-reveal
data-options="close_on_background_click:true;close_on_esc:true;" style="display: none" role="dialog">
<div class="small-2 medium-2 large-2 columns">
<!--<img id="pad_icon_1" src="./assets/pad_icon_01.png">-->
<div>
<p>
<img id="infoIcon" src="./assets/info_icon.png" height="50" width="50">
<img id="settingsIcon" src="./assets/settings_icon.png" height="50" width="50">
</p>
</div>
<img id="pad_icon_2" src="./assets/pad_icon_02.png">
<img id="pad_icon_3" src="./assets/pad_icon_03.png">
</div>
<div class="small-9 medium-9 large-9 columns">
<div class="panel" id="canvasArea">
<canvas id="rmanCanvas" resize="true" keepalive="true" resize></canvas>
</div>
</div>
<div class="small-1 medium-1 large-1 columns">
<a id="padCloseX" class="close-reveal-modal" aria-label="Close" style="z-index:999">×</a>
</div>
</div>
</div>
</body>
</html>