diff --git a/css/style.css b/css/style.css index 73d6a12..6a93cd6 100644 --- a/css/style.css +++ b/css/style.css @@ -5,15 +5,15 @@ body { /* SVG fallback for IE 9 (could be data URI, or could use filter) */ /* background-image: url(fallback-gradient.svg); */ /* Safari 4, Chrome 1-9, iOS 3.2-4.3, Android 2.1-3.0 */ - background-image: -webkit-gradient(linear, left top, right top, from(grey), to(#f06b06c9)); + background-image: -webkit-gradient(linear, left top, right top, from(grey), to(#ac4c03c9)); /* Safari 5.1, iOS 5.0-6.1, Chrome 10-25, Android 4.0-4.3 */ - background-image: -webkit-linear-gradient(left, grey, #f06d06c9); + background-image: -webkit-linear-gradient(left, grey, #ac4c03c9); /* Firefox 3.6 - 15 */ - background-image: -moz-linear-gradient(left, grey, #f06d06c9); + background-image: -moz-linear-gradient(left, grey, #ac4c03c9); /* Opera 11.1 - 12 */ - background-image: -o-linear-gradient(left, grey, #f06d06c9); + background-image: -o-linear-gradient(left, grey, #ac4c03c9); /* Opera 15+, Chrome 25+, IE 10+, Firefox 16+, Safari 6.1+, iOS 7+, Android 4.4+ */ - background-image: linear-gradient(to right, grey, #f06d06c9); + background-image: linear-gradient(to right, grey, #ac4c03c9); margin: 0px; /* background-color: rgb(235,136,55); @@ -30,7 +30,7 @@ body.noScroll body.dialogShowing { /* ...or body.dialogShowing */ */ #inputs, #outputs { - margin-left: 12%; + margin-left: 10%; } a.dinput { @@ -66,9 +66,9 @@ a.doutput { border:none; background-color: transparent; /* background-color: rgb(235,136,55); */ - color: #FFE105; + color: rgb(255, 247, 189); line-height:100%; - text-shadow: 0 0 0.1em #fff, 0 0 0.2em #fff, 0 0 0.3em #f00; + text-shadow: 0 0 0.1em rgb(253, 255, 105), 0 0 0.2em #fff, 0 0 0.3em #f00; /*, 0 0 0.4em #77f; , 0 0 0.6em #00f, 0 0 0.8em #00f, 0 0 1.0em #00f, 0 0 1.2em #00f; */ } diff --git a/index.html b/index.html index 8e2690e..8489580 100644 --- a/index.html +++ b/index.html @@ -30,7 +30,7 @@

 

- +

Useful Commands and Macros

@@ -52,7 +52,7 @@
- +

Useful Commands and Macros

diff --git a/js/initialize_ready.js b/js/initialize_ready.js index 8da18d8..144cabc 100644 --- a/js/initialize_ready.js +++ b/js/initialize_ready.js @@ -3,6 +3,17 @@ * Most Event Handling */ +// Global true position tracking +window.globals = { + TOol_x: 0, // REAL LOCATIONS OF TOOL from G2 + TOol_y: 0, // ... had to set as windows.globals to get for paperjs + TOol_z: 0, // ... best way for 3js? + TOol_a: 0, + TOol_b: 0, + TOol_c: 0, + G2_state: "" +} + let cmds = []; $(document).ready(function() { @@ -240,6 +251,21 @@ $(document).ready(function() { // ** STATUS: Report Ongoing and Clear Command Line after a status report is recieved ## Need a clear after esc too fabmo.on('status', function(status) { console.log(status.state); + + globals.TOol_x = status.posx; // get LOCATION GLOBALS + console.log(globals.TOol_x) + globals.TOol_y = status.posy; + globals.TOol_z = status.posz; + globals.TOol_a = status.posa; + globals.TOol_b = status.posb; + globals.G2_state = status.state; + // and display them + document.getElementById("tool-display-x").innerHTML = (globals.TOol_x<0?"X ":"X +") + globals.TOol_x.toFixed(3); + document.getElementById("tool-display-y").innerHTML = (globals.TOol_y<0?"Y ":"Y +") + globals.TOol_y.toFixed(3); + document.getElementById("tool-display-z").innerHTML = (globals.TOol_z<0?"Z ":"Z +") + globals.TOol_z.toFixed(3); + document.getElementById("tool-display-a").innerHTML = (globals.TOol_a<0?"A ":"A +") + globals.TOol_a.toFixed(2); + document.getElementById("tool-display-b").innerHTML = (globals.TOol_b<0?"B ":"B +") + globals.TOol_b.toFixed(2); + let lineDisplay = ""; if (status.nb_lines > 0) { // If we're running a file ... lineDisplay = "Running: " + curFilename + '\n' @@ -310,5 +336,8 @@ $(document).ready(function() { //console.log("Speed is: " + speed_XY.toFixed(2)); //console.log("Twice the speed is: " + (2*speed_XY).toFixed(2)); + + fabmo.requestStatus(); // Trigger first report from tool + }); \ No newline at end of file