-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
724 lines (704 loc) · 41.8 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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
<!DOCTYPE html>
<html>
<head>
<title>G-Code Visualizer</title>
<link rel="stylesheet" href="/src/style.css">
<script type="module" src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.32.3/ace.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200" />
</head>
<body>
<div id="mainContainer" class="main-container">
<div class="menu">
<ul>
<li id="simulationTab">Simulation</li>
<li id="controlTab">Control</li>
<li id="macroTab">Macros</li>
<li id="plannerTab">Planner</li>
<li id="threadingTab">Threading</li>
</ul>
</div>
<div id="simulationContainer" class="main-container">
<div id="simulationContent" class="controls-container">
<div id="gcodeContainer" style="position: relative;">
<div id="gcodeEditor" style="height: 200px; width: 100%;"></div>
</div>
<div class="innerContainer">
<input type="file" id="fileInput" accept=".txt,.gcode">
</div>
<div class="innerContainer">
<button id="simulateButton">Simulate</button>
<button id="clearButton">Clear</button>
<button id="helpButton">How to use</button>
</div>
<div class="innerContainer" id="loadAndSave">
<hr>
<div class="innerContainer toolbar">
<input type="text" class="saveGCodeNameInput" placeholder="name of save"></input>
<button class="saveGCodeButton" title="Save GCode to local browser storage">Save local</button>
</div>
<div class="innerContainer toolbar">
<select class="loadGCodeSelect"></select>
<button class="loadGCodeButton" title="Load GCode from local browser storage">Load</button>
<button class="deleteGCodeButton" title="Delete GCode from local browser storage">Delete</button>
</div>
<hr>
</div>
</div>
<div class="canvas-container">
<canvas id="gcodeCanvas" width="785" height="600"></canvas>
<div id="sliderContainer" class="innerContainer" style="display: none; width: 400px;">
<input type="range" id="progressSlider" min="0" max="100" value="0" style="width: 100%;">
<div id="sliderLabel" style="text-align: center;"><br>Drag to see moves</div>
</div>
<div id="displayOptionsContainer" class="innerContainer" style="display: none;">
<input type="checkbox" id="showCuts" checked> Show Cut Moves
</label>
<label>
<input type="checkbox" id="showNonCuts" checked>
Show Non-Cut Moves
</label>
</div>
<div id="sliderContainer" class="innerContainer" style="display: none; width: 400px;">
<input type="range" id="progressSlider" min="0" max="100" value="0" style="width: 100%;">
<div id="sliderLabel" style="text-align: center;"><br>Drag to see moves</div>
</div>
<div class="innerContainer"><button id="zoomButton" title="Zoom in">Zoom In</button></div>
</div>
</div>
<div id="controlsContainer" class="main-container" style="display: none;">
<div id="controlsContent" class="controls-container">
<div id="gcodeSenderContainer" class="innerContainer">
<span>Send GCode to Nano ELS H4</span>
<div class="innerContainer">
<button id="connectButton" title="Connect to Nano ELS H4">Connect</button>
</div>
</div>
<div id="latheControls">
<div id="jogControls">
<span id="fastText">Fast</span>
<span id="slowText">Slow</span>
<span id="toolText">Tool</span>
<!-- Tools -->
<button class="tool-btn tool-selected" id="tool0">T0</button>
<button class="tool-btn" id="tool1">T1</button>
<button class="tool-btn" id="tool2">T2</button>
<button class="tool-btn" id="tool3">T3</button>
<button class="tool-btn" id="tool4">T4</button>
<button class="tool-btn" id="tool5">T5</button>
<button class="tool-btn" id="tool6">T6</button>
<button class="tool-btn" id="tool7">T7</button>
<button class="tool-btn" id="tool8">T8</button>
<button class="tool-btn" id="tool9">T9</button>
<span id="jogText">Move</span>
<!-- Fast arrows -->
<button class="arrow fast jog-btn" id="fastForward"><i class="fas fa-arrow-up"></i></button>
<button class="arrow fast jog-btn" id="fastBackward"><i class="fas fa-arrow-down"></i></button>
<button class="arrow fast jog-btn" id="fastLeft"><i class="fas fa-arrow-left"></i></button>
<button class="arrow fast jog-btn" id="fastRight"><i class="fas fa-arrow-right"></i></button>
<!-- Slow arrows -->
<button class="arrow slow jog-btn" id="slowForward"><i class="fas fa-arrow-up"></i></button>
<button class="arrow slow jog-btn" id="slowBackward"><i class="fas fa-arrow-down"></i></button>
<button class="arrow slow jog-btn" id="slowLeft"><i class="fas fa-arrow-left"></i></button>
<button class="arrow slow jog-btn" id="slowRight"><i class="fas fa-arrow-right"></i></button>
</div>
<div id="incrementControls">
<button class="increment-btn" data-increment="0.01">0.01</button>
<button class="increment-btn" data-increment="0.1">0.1</button>
<button class="increment-btn active" data-increment="1">1</button>
<button class="increment-btn" data-increment="10">10</button>
</div>
<div id="feedrateControls" class="innerContentCentre control-inputs">
<label for="fastFeedrate">Fast Feedrate:</label>
<input type="text" id="fastFeedrate" name="fastFeedrate" value="200">
<label for="slowFeedrate">Slow Feedrate:</label>
<input type="text" id="slowFeedrate" name="slowFeedrate" value="50">
</div>
<div id="distanceControl" class="innerContentCentre control-inputs">
<label for="moveDistance">Move Distance (mm):</label>
<input type="text" id="moveDistance" name="moveDistance" value="1">
</div>
</div>
<div id="gcodeResponseContainer" style="display: none;">
<div id="gcodeResponseHeader">GCode Responses</div>
<div id="gcodeResponseEditor" style="height: 200px; width: 100%;"></div>
<div class="senderError" style="display: none;"></div>
<div id="senderProgressContainer">
<span id="senderProgressLabel" style="display: none;">Progress...</span>
<progress id="senderProgress" max="1" style="display: none;"></progress>
</div>
</div>
</div>
<div class="controls-container">
<div class="innerContainer control-inputs">
<div class="innerContentCentre control-inputs">
<span>Send single command</span>
</div>
<div class="innerContentCentre sender-inputs">
<input id="singleCommandSender" type="text" name="singleCommandSender"></input>
</div>
<div class="innerContentCentre control-inputs">
<button id="gcodeSendSingleCommandButton" title="Send GCode to CNC">Send</button>
</div>
</div>
</div>
<div class="controls-container">
<div id="gcodeSenderContainer" style="position: relative;">
<span>Send multi line commands</span>
<div id="gcodeSenderEditor" style="height: 200px; width: 100%;"></div>
</div>
<div class="innerContainer">
<button id="gcodeSenderButton" title="Send GCode to CNC">Send</button>
<button id="stopButton" style="display: none;">Stop</button>
</div>
</div>
<script type="module" src="/src/main.ts"></script>
</div>
<div id="macroContainer" class="main-container" style="display: none;">
<div id="macroContent" class="controls-container">
<div class="innerContainer">
<h1>Macros</h1>
<div>Coming soon. Use macros to define commmon tasks. For example profile 10mm from current position</div>
</div>
</div>
</div>
<div id="plannerContainer" class="main-container" style="display: none;">
<div id="plannerContent" class="planner-container">
<div class="innerContainer">
<h1>Planner</h1>
<div class="planner-guidance">
<span>Use this tool to create a job of tasks to execute. This can be manual, gcode, button press
emulation or a
combination
of them.
When you click execute the job wizard will execute the tasks one after another. Each task
with require confirmation to start.</span>
</div>
</div>
<div class="innerContainer">
<h1>Device status</h1>
<button id="plannerConnectButton">Connect</button>
</div>
<div id="taskContainer">
<div class="container-wrapper-outer">
<div class="container-wrapper">
<h2>Current Job</h2>
<span>Drag an available task to below</span>
<div id="tasksToExecute" class="task-container">
</div>
</div>
<div class="container-wrapper">
<button id="executeJobButton">Execute Job</button>
</div>
<hr>
<div class="container-wrapper">
<div class="innerContainer" id="loadAndSaveJob">
<div class="innerContainer toolbar">
<button id="saveJobButton" class="planner-save-button" title="Save Job to local browser storage">Save
Job</button>
</div>
<div class="innerContainer toolbar">
<button id="loadJobButton" class="planner-load-delete-buttons" title="Load Job from local browser storage">Load</button>
<button id="deleteJobButton" class="planner-load-delete-buttons" title="Delete Job from local browser storage">Delete</button>
</div>
<div class="innerContainer toolbar">
<select id="jobLoadSelect" class="planner-load-select">
</select>
</div>
<div class="container-wrapper-inner">
<hr>
</div>
<span class="planner-saving-label">Import and export Job to JSON</span>
<div class="innerContainer toolbar">
<button id="importJobButton" class="planner-load-delete-buttons" title="Import Job from JSON file">Import</button>
<button id="exportJobButton" class="planner-load-delete-buttons" title="Export Job to JSON">Export</button>
</div>
</div>
</div>
</div>
<div class="container-wrapper-outer">
<div class="container-wrapper">
<h2>Available Tasks</h2>
<div id="availableTasks" class="task-container">
</div>
</div>
<div class="container-wrapper">
<div class="container-wrapper-inner">
<span>Drag here to delete</span>
</div>
<div id="deleteTasks" class="container-wrapper-delete">
</div>
</div>
<div class="container-wrapper">
<button id="addNewTaskButton">Add New Task</button>
</div>
<div class="container-wrapper-inner">
<hr class="no-marge">
</div>
<div class="container-wrapper">
<div class="innerContainer" id="loadAndSaveAvailableTasks">
<div><span>Task Collections</span></div>
<div class="innerContainer toolbar">
<button id='saveAvailableTaskCollection' class="planner-save-button" title="Save Task to local browser storage">Save tasks to a collection
<i class="far fa-save show-info icon-tooltip"
data-tooltip="Save to local machine"></i>
</button>
</div>
<div class="innerContainer toolbar">
<select id="availableTaskCollections" class="planner-load-select">
<option value="" disabled>Select your option</option>
</select>
</div>
<div class="innerContainer toolbar">
<button id="loadTaskCollection" class="planner-load-delete-buttons" title="Load selected collection">Load collection</button>
<button id="deleteTaskCollection" class="planner-load-delete-buttons" title="Delete selected collection">Delete collection</button>
</div>
<div class="container-wrapper-inner">
<hr>
</div>
<span class="planner-saving-label">Import and export tasks via JSON</span>
<div class="innerContainer toolbar">
<button id="importAvailableTasks" class="planner-load-delete-buttons" title="Import tasks from JSON file">Import</button>
<button id="exportAvailableTasks" class="planner-load-delete-buttons" title="Export tasks to JSON">Export</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="threadingContainer" class="main-container" style="display: none;">
<div id="threadingContent" class="threading-container">Coming soon.</div>
</div>
<!-- Not Connected warning -->
<div id="notConnectedModal" class="task-modal">
<div class="task-modal-content center-modal">
<h2>Not Connected</h2>
<div class="modal-pad-bottom">
<span>Please connect to the controller before executing jobs</span>
</div>
<div class="modal-pad">
<button id="notConnectedCloseButton">Close</button>
</div>
</div>
</div>
<!-- Manual Task Modal -->
<div id="manualTaskModal" class="task-modal">
<div class="task-modal-content">
<h2>Manual Task Instructions</h2>
<hr>
<div>
<span id="manualTaskName"></span>
</div>
<div class="modal-pad">
<textarea id="manualTaskInstructions" name="manualTaskInstructions" rows="4" cols="50" disabled></textarea>
</div>
<div class="modal-pad">
<button id="cancelManualTask">Cancel</button>
<button id="completeManualTask">Next Task --></button>
</div>
</div>
</div>
<!-- Gcode Task Modal -->
<div id="cncTaskModal" class="task-modal">
<div class="task-modal-content">
<h2>CNC Task Gcode</h2>
<hr>
<div>
<span id="cncTaskName"></span>
</div>
<div class="modal-pad">
<textarea id="cncTaskGcode" name="cncTaskGcode" rows="4" cols="50" disabled></textarea>
</div>
<div class="modal-pad">
<button id="cancelCncTask">Cancel</button>
<button id="executeGcode">Execute Gcode</button>
</div>
<div class="modal-pad">
<button id="completeCncTask" disabled>Next Task --></button>
</div>
<div id="currentGcodeLineContainer" class="modal-pad">
<span id="currentGcodeLineLabel">Current Gcode Line:</span>
<span id="currentGcodeLine"></span>
</div>
<div id="currentFeedrateContainer" class="modal-pad">
<span id="currentFeedrateLabel">Current Feedrate:</span>
<span id="currentFeedrate"></span>
</div>
<div id="cncTaskSenderProgressContainer" class="modal-pad">
<span id="cncTaskSenderProgressLabel">Execution in progress...</span>
<progress id="cncTaskSenderProgress" max="1"></progress>
</div>
</div>
</div>
<!-- key Emulation Task Modal -->
<div id="emulationTaskModal" class="task-modal">
<div class="task-modal-content">
<h2>Key Emulation Task</h2>
<hr>
<div>
<span id="emulationTaskName"></span>
</div>
<div class="modal-pad">
<ul id="emulationExecutionTasks">
<!-- List items will be added here -->
</ul>
<div class="modal-pad">
<button id="completeEmulationTask" disabled>Mark Complete</button>
</div>
<div id="emulationTaskSenderProgressContainer" class="modal-pad">
<span id="emulationTaskSenderProgressLabel">Execution in progress...</span>
<progress id="emulationTaskSenderProgress" max="1"></progress>
</div>
</div>
</div>
</div>
<!-- All tasks Complete Modal -->
<div id="completeTaskModal" class="task-modal">
<div class="task-modal-content center-modal">
<h2>All Tasks Complete</h2>
<div class="modal-pad">
<button id="completeTaskCloseButton">Close</button>
</div>
</div>
</div>
<!-- Job Cancelled Modal -->
<div id="jobCancelledModal" class="task-modal">
<div class="task-modal-content center-modal">
<h2>Job Cancelled</h2>
<div>
<button id="jobCancelledCloseButton">Close</button>
</div>
</div>
</div>
<!-- Save Job Modal -->
<div id="saveJobModal" class="task-modal">
<div class="task-modal-content">
<span id="saveJobModalClose" class="close-modal">×</span>
<h2>Save Job</h2>
<hr>
<div class="modal-pad">Pick a name:</div>
<div>
<select id="saveJobNameSelect">
</select>
</div>
<div id="newJobNameContainer" style="display: none;">
<div class="modal-pad">New Job name:</div>
<div>
<input id="saveJobNameInput" type="text" class="planner-save-text" placeholder="Name of Job"></input>
</div>
</div>
<div class="modal-pad">
<button id="saveJobSaveButton">Save</button>
</div>
</div>
</div>
<!-- export Job Modal -->
<div id="exportJobModal" class="task-modal">
<div class="task-modal-content">
<span id="exportJobModalClose" class="close-modal">×</span>
<h2>Export Job</h2>
<hr>
<div class="modal-pad">Select Job To Export:</div>
<div>
<select id="exportJobNameSelect">
</select>
</div>
<div class="modal-pad">
<button id="exportJobSaveButton">Save</button>
</div>
</div>
</div>
<!-- Save Collection -->
<div id="saveCollectionModal" class="task-modal">
<div class="task-modal-content">
<span id="saveCollectionModalClose" class="close-modal">×</span>
<div>
<div>Which collection would you like to save the tasks to?</div>
<div class="modal-pad">
<select id="saveCollectionModalToSaveTo" name="collectionToSaveToModal">
</select>
</div>
<div id="newCollectionNameContainerModal" style="display: none;">
<div class="modal-pad">New Collection Name:</div>
<div>
<input type="text" id="newCollectionNameModal" name="newCollectionNameModal" placeholder="Enter collection name...">
</div>
</div>
<div class="modal-pad">
<button id="saveAvailableTaskCollectionButtonModal">Save</button>
</div>
</div>
</div>
</div>
<!-- new task modal-->
<div id="newTaskModal" class="task-modal">
<div class="task-modal-content">
<span id="closeNewTaskModal" class="close-modal">×</span>
<div id="newTaskHelpText">
<h2 id="taskTextTitle">Add a new task</h2>
<hr>
<div class="modal-pad">Task Name:</div>
<div>
<input type="text" id="newTaskName" name="newTaskName" placeholder="Enter task name...">
</div>
<div class="modal-pad">Task Type:</div>
<div>
<select id="newTaskType" name="newTaskType">
<option value="manual">Manual</option>
<option value="gcode">GCode</option>
<option value="emulation" disabled>Key Emulation</option>
</select>
</div>
<div class="modal-pad">Task Description:</div>
<div>
<textarea id="newTaskDescription" name="newTaskDescription" rows="4" cols="50" placeholder="Enter Description..."></textarea>
</div>
<div id="gcodeTaskContainer" style="display:none">
<div class="modal-pad">Task GCode:</div>
<div>
<textarea id="newTaskGcode" name="newTaskGcode" rows="4" cols="50" placeholder="Disabled for manual tasks" disabled></textarea>
</div>
</div>
<div id="emulationOuterContainer" class="emulate-noselect" style="display:none">
<div>
<span>Use built in controller functions by emulating button presses
Simply click the buttons you want to emulate to build up a sequence which will be
displayed at the bottom. Each emulated press will have a 500ms delay between them.
<br>
<br>
<i>Tip: Hover over the buttons for a description.</i>
</span>
</div>
<div id="emulationInnerContainer">
<div class="flexCol outerCol">
<div id="numberContainer">
<div id="emulationNewTasksNumbers">
<button id="emulateKey9" data-button-key="B_9" class="standard-font material-symbols-outlined">
9
</button>
<button id="emulateKey8" data-button-key="B_8" class="standard-font material-symbols-outlined">
8
</button>
<button id="emulateKey7" data-button-key="B_7" class="standard-font material-symbols-outlined">
7
</button>
<button id="emulateKey6" data-button-key="B_6" class="standard-font material-symbols-outlined">
6
</button>
<button id="emulateKey5" data-button-key="B_5" class="standard-font material-symbols-outlined">
5
</button>
<button id="emulateKey4" data-button-key="B_4" class="standard-font material-symbols-outlined">
4
</button>
<button id="emulateKey3" data-button-key="B_3" class="standard-font material-symbols-outlined">
3
</button>
<button id="emulateKey2" data-button-key="B_2" class="standard-font material-symbols-outlined">
2
</button>
<button id="emulateKey1" data-button-key="B_1" class="standard-font material-symbols-outlined">
1
</button>
<button id="emulateKey0" data-button-key="B_0" class="standard-font material-symbols-outlined">
0
</button>
</div>
</div>
</div>
<div class="flexCol middleCol">
<div id="modeContainer">
<div id="emulationNewTasksMode">
<button id="emulateKeyBack" data-button-key="B_BACKSPACE" class="material-symbols-outlined">
backspace
</button>
<button id="emulateKeyGearbox" data-button-key="B_MODE_GEARS" class="material-symbols-outlined">
manufacturing
</button>
<button id="emulateKeyTurning" data-button-key="B_MODE_TURN" class="material-symbols-outlined">
reply
</button>
<button id="emulateKeyFacing" data-button-key="B_MODE_FACE" class="material-symbols-outlined">
turn_slight_left
</button>
<button id="emulateKeyCone" data-button-key="B_MODE_CONE" class="material-symbols-outlined">
arrow_forward_ios
</button>
<button id="emulateKeyParting" data-button-key="B_MODE_CUT" class="material-symbols-outlined">
publish
</button>
<button id="emulateKeyThreading" data-button-key="B_MODE_THREAD" class="material-symbols-outlined">
home_improvement_and_tools
</button>
<button id="emulateKeyMode" data-button-key="B_MODE_OTHER" class="standard-font material-symbols-outlined">
M
</button>
</div>
</div>
<div id="movementContainer">
<div id="emulationNewTasksMovement">
<button id="emulateKeyLeft" data-button-key="B_LEFT" class="material-symbols-outlined">
arrow_left_alt
</button>
<button id="emulateKeyRight" data-button-key="B_RIGHT" class="material-symbols-outlined">
arrow_right_alt
</button>
<button id="emulateKeyUp" data-button-key="B_UP" class="material-symbols-outlined">
arrow_upward_alt
</button>
<button id="emulateKeyDown" data-button-key="B_DOWN" class="material-symbols-outlined">
arrow_downward_alt
</button>
<button id="emulateKeyPlay" data-button-key="B_ON" class="material-symbols-outlined">
play_arrow
</button>
<button id="emulateKeyStop" data-button-key="B_OFF" class="material-symbols-outlined">
crop_square
</button>
<button id="emulateKeyStopLeft" data-button-key="B_STOPL" class="material-symbols-outlined">
keyboard_tab_rtl
</button>
<button id="emulateKeyStopRight" data-button-key="B_STOPR" class="material-symbols-outlined">
keyboard_tab
</button>
<button id="emulateKeyStopUp" data-button-key="B_STOPU" class="material-symbols-outlined">
vertical_align_top
</button>
<button id="emulateKeyStopDown" data-button-key="B_STOPD" class="material-symbols-outlined">
vertical_align_bottom
</button>
</div>
</div>
</div>
<div class="flexCol outerCol">
<div id="otherContainer">
<div id="emulationNewTasksOther">
<button id="emulateKeyZ" data-button-key="B_Z" class="standard-font material-symbols-outlined">
Z
</button>
<button id="emulateKeyX" data-button-key="B_X" class="standard-font material-symbols-outlined">
X
</button>
<button id="emulateKeyB" data-button-key="B_B" class="standard-font material-symbols-outlined">
B
</button>
<button id="emulateKeyA" data-button-key="B_A" class="standard-font material-symbols-outlined">
A
</button>
<button id="emulateKeyAngle" data-button-key="B_DISPL" class="material-symbols-outlined" title="Angle/Taco">
rotate_left
</button>
<button id="emulateKeySteps" data-button-key="B_STEPZ" class="material-symbols-outlined">
signal_cellular_alt
</button>
<button id="emulateKeySettings" data-button-key="B_SETTINGS" class="material-symbols-outlined">
settings
</button>
<button id="emulateKeyReverse" data-button-key="B_REVERSE" class="material-symbols-outlined">
sync_alt
</button>
<button id="emulateKeyMeasure" data-button-key="B_MEASURE" class="material-symbols-outlined">
space_bar
</button>
<button id="emulateKeyPlus" data-button-key="B_PLUS" class="standard-font material-symbols-outlined">
+
</button>
<button id="emulateKeyMinus" data-button-key="B_MINUS" class="standard-font material-symbols-outlined">
-
</button>
</div>
</div>
</div>
</div>
<div>
<span>
Emulated sequence: <i>Tip: Drag to reorder or delete</i>
</span>
</div>
<div class="emulation-modal-pad-border">
<div id="emulationNewTasks">
</div>
</div>
<div class="modal-pad-bottom">
<div id="emulatedTasksDelete" class="container-wrapper-inner">
<span>
Drag here to delete
</span>
</div>
<div id="emulatedButtonListDelete" class="container-wrapper-delete">
</div>
</div>
</div>
<div class="modal-pad">Collection to save to:</div>
<div>
<select id="collectionToSaveTo" name="collectionToSaveTo">
</select>
</div>
<div id="newCollectionNameContainer" style="display: none;">
<div class="modal-pad">New Collection Name:</div>
<div>
<input type="text" id="newCollectionName" name="newCollectionName" placeholder="Enter collection name...">
</div>
</div>
<div class="modal-pad">
<button id="saveNewTaskButton">Save</button>
</div>
</div>
</div>
</div>
<div id="helpModal" class="help-modal">
<div class="help-modal-content">
<span id="closeHelpModal" class="close-modal">×</span>
<div id="helpText">
<div>This tool is designed to be used in conjunction with LatheCode:</div>
<div><a href="https://kachurovskiy.github.io/lathecode/ " target="_blank ">https://kachurovskiy.github.io/lathecode/</a></div>
<div><strong>Please note that this tool is to be used at your own risk and I cannot gaurentee that
it will work. This tool targets my custom fork of the H4 firmware which you can find
here:</strong> <a href="https://github.com/Festivejelly/nanoels" target="_blank ">https://github.com/Festivejelly/nanoels</a></div>
<hr>
<div>How to use:</div>
<ul style="list-style-type: disc; padding-left: 20px; ">
<li>Use LatheCode to generate the G-code, then paste it into this tool.</li>
<li>You can also write the G-code by hand for simple operations such as boring or grooving.
<a href="# " id="exampleCode">Click here</a> to load an example.
</li>
<li>Click "Simulate" to plot the moves onto the canvas.</li>
<li>movement lines marked with "; cut" will show in <span class="line red-line"></span><span class="text-red">red</span>.</li>
<li>movement lines marked with "; travel" will show in <span class="line green-line"></span><span class="text-green">green</span>.</li>
<li>movement lines marked with "; retract" will show in <span class="line orange-line"></span><span class="text-orange">orange</span>.</li>
<li>movement lines not marked will default to <span class="line green-line"></span><span class="text-green">green</span>.</li>
<li>All other moves will be considered travel moves and will show in green.</li>
<li>Any G-code you paste or write can be saved into the browser's local storage. This is useful for saving common operations.</li>
<li>When you're ready, you can send the G-code to the Nano ELS H4 by clicking "Send."
</li>
<li>More functionality to come soon! Version 0.2</li>
<li>Please provide feedback, raise issues or make suggestions here: <a href="https://github.com/Festivejelly/LatheGcodeVisualiser " target="_blank ">https://github.com/Festivejelly/LatheGcodeVisualiser</a></li>
</ul>
</div>
</div>
</div>
<div id="zoomModal" class="zoom-modal">
<div class="zoom-modal-content" style="background-color: #242424;">
<span id="closeZoomModal" class="close-modal">×</span>
<canvas id="zoomCanvas" width="1600 " height="1200 "></canvas>
<div id="sliderAndButtonContainer">
<div id="zoomSliderContainer" class="innerContainer" style="width: 400px;">
<input type="range" id="zoomProgressSlider" min="0" max="100" value="0" style="width: 100%;">
<div id="zoomSliderLabel" style="text-align: center;"><br>Drag to see moves</div>
</div>
<div id="displayOptionsContainerZoom" class="innerContainer">
<input type="checkbox" id="showCutsZoom" checked> Show Cut Moves
</label>
<label>
<input type="checkbox" id="showNonCutsZoom" checked>
Show Non-Cut Moves
</label>
</div>
<button id="zoomCloseButton">Close</button>
</div>
</div>
</div>
</div>
</body>
</html>