From 69942f73403f073d67d5063172f97d0ede961ba1 Mon Sep 17 00:00:00 2001 From: BarbourSmith Date: Tue, 9 Jul 2024 13:15:56 -0700 Subject: [PATCH 1/6] Kinda sorta working --- www/css/tablet.css | 2 +- www/js/tablet.js | 3 --- www/sub/tablettab.html | 25 ++++++++++++++++++++++--- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/www/css/tablet.css b/www/css/tablet.css index b0cde4ee2..1ec596b61 100644 --- a/www/css/tablet.css +++ b/www/css/tablet.css @@ -75,7 +75,7 @@ html { color: #7a7a7a; margin: 0 auto; display: grid; - grid-template-columns: 75% 25%; + grid-template-columns: 70% 30%; } .maslow-grid-container { diff --git a/www/js/tablet.js b/www/js/tablet.js index c70d69912..2357c838d 100644 --- a/www/js/tablet.js +++ b/www/js/tablet.js @@ -218,9 +218,6 @@ sendMove = function (cmd) { } var distance = Number(id('disM').innerText) || 0 - if (cmd.includes('Z')) { - distance = Number(id('disZ').innerText) || 0 - } var fn = { G28: function () { diff --git a/www/sub/tablettab.html b/www/sub/tablettab.html index 95fcf1103..ec2cf0f22 100644 --- a/www/sub/tablettab.html +++ b/www/sub/tablettab.html @@ -7,10 +7,16 @@
-
-
- +
+
+ + + + + Z
+
Upload GCode
+
+ + + + + + + Z +
@@ -35,6 +51,8 @@ Setup
+
Define Home
@@ -48,6 +66,7 @@ Z
+
Dist To Move:
100
Date: Tue, 9 Jul 2024 13:59:14 -0700 Subject: [PATCH 2/6] More aranging --- www/sub/tablettab.html | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/www/sub/tablettab.html b/www/sub/tablettab.html index ec2cf0f22..a2731c7be 100644 --- a/www/sub/tablettab.html +++ b/www/sub/tablettab.html @@ -19,20 +19,10 @@
-
- - - - - - Upload GCode -
+
+ onclick="onclick=sendMove('Z-');" id="zBtn3"> - - @@ -52,7 +42,7 @@ Setup
Define Home
+ onmousedown="zeroAxis('Z');" onmouseup="refreshGcode();">Define Z Home
@@ -72,12 +62,21 @@
mm
Define Home
+ onmousedown="zeroAxis('X');zeroAxis('Y');" onmouseup="refreshGcode();">Define XY Home
-
+
+
+ + + + + + Upload GCode +
From 5b4153f54f6945dbf32aec4e0b4bccfdba5c1ee0 Mon Sep 17 00:00:00 2001 From: BarbourSmith Date: Tue, 9 Jul 2024 15:20:48 -0700 Subject: [PATCH 3/6] Working --- www/js/app.js | 3 ++- www/js/tablet.js | 5 +++++ www/sub/tablettab.html | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/www/js/app.js b/www/js/app.js index 58cea53bf..bd2d38e10 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -395,7 +395,6 @@ function initUI() { if (typeof id('FW_VERSION') != 'undefined') id('FW_VERSION').innerHTML = fw_version // Get the element with id="defaultOpen" and click on it id('tablettablink').click() - onReportType({ value: 'auto' }) if (typeof id('grblcontroltablink') !== 'undefined') { id('grblcontroltablink').click() @@ -405,6 +404,8 @@ function initUI() { console.log(JSON.stringify(translated_list)) //endRemoveIf(production) initUI_2() + + setTimeout(tryAutoReport, 500); //Not sure why this needs a delay but it seems like a hack } function initUI_2() { diff --git a/www/js/tablet.js b/www/js/tablet.js index 2357c838d..f0d398789 100644 --- a/www/js/tablet.js +++ b/www/js/tablet.js @@ -192,6 +192,7 @@ checkHomed = function () { } sendMove = function (cmd) { + console.log("Send move called"); tabletClick() var jog = function (params) { params = params || {} @@ -219,6 +220,10 @@ sendMove = function (cmd) { var distance = Number(id('disM').innerText) || 0 + if (cmd.includes('Z') && distance > 75) { + alert("Can't move the z-axis that far"); + } + var fn = { G28: function () { sendCommand('G28') diff --git a/www/sub/tablettab.html b/www/sub/tablettab.html index a2731c7be..af712c60c 100644 --- a/www/sub/tablettab.html +++ b/www/sub/tablettab.html @@ -9,7 +9,7 @@
+ onclick="sendMove('Z+');" id="zUp"> @@ -21,7 +21,7 @@
+ onclick="sendMove('Z-');" id="zDown"> From 00b48ef18111606a17150fe7b4f6331ceffedcba Mon Sep 17 00:00:00 2001 From: BarbourSmith Date: Tue, 9 Jul 2024 15:37:40 -0700 Subject: [PATCH 4/6] Working --- www/sub/tablettab.html | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/www/sub/tablettab.html b/www/sub/tablettab.html index af712c60c..8ae59f7b4 100644 --- a/www/sub/tablettab.html +++ b/www/sub/tablettab.html @@ -46,23 +46,15 @@
-
- - - - - - - Z -
+
Dist To Move:
100
mm
Define XY Home
+