diff --git a/config/targets/CNC/GRBL/index.js b/config/targets/CNC/GRBL/index.js index a905a6b16..ed8ed4a3d 100644 --- a/config/targets/CNC/GRBL/index.js +++ b/config/targets/CNC/GRBL/index.js @@ -27,6 +27,7 @@ let lastconnection = Date.now() let logindone = false const sessiontTime = 60000 let countStatus = 0 +let change = false function getLastconnection() { return lastconnection @@ -201,7 +202,13 @@ const commandsQuery = (req, res, SendWS) => { } if (url.indexOf("$G") != -1) { - SendWS("[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0.0 S0]\n") + change = !change + if (change) { + SendWS("[GC:G0 G54 G17 G21 G90 G94 M4 M5 M6 M7 M8 T0 F0.0 S0]\n") + } else { + SendWS("[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0.0 S0]\n") + } + res.send("") return } diff --git a/dist/CNC/GRBL/index.html.gz b/dist/CNC/GRBL/index.html.gz index 9c2f8e43c..a66ff4656 100644 Binary files a/dist/CNC/GRBL/index.html.gz and b/dist/CNC/GRBL/index.html.gz differ diff --git a/dist/CNC/GRBLHal/index.html.gz b/dist/CNC/GRBLHal/index.html.gz index 83ffc33a6..132a521d8 100644 Binary files a/dist/CNC/GRBLHal/index.html.gz and b/dist/CNC/GRBLHal/index.html.gz differ diff --git a/dist/Plotter/HP-GL/index.html.gz b/dist/Plotter/HP-GL/index.html.gz index 20a21e5f3..92c3ff471 100644 Binary files a/dist/Plotter/HP-GL/index.html.gz and b/dist/Plotter/HP-GL/index.html.gz differ diff --git a/dist/Printer3D/Marlin-embedded/index.html.gz b/dist/Printer3D/Marlin-embedded/index.html.gz index 018e8c805..e12ef0793 100644 Binary files a/dist/Printer3D/Marlin-embedded/index.html.gz and b/dist/Printer3D/Marlin-embedded/index.html.gz differ diff --git a/dist/Printer3D/Marlin/index.html.gz b/dist/Printer3D/Marlin/index.html.gz index 06f999ad7..72c1b043e 100644 Binary files a/dist/Printer3D/Marlin/index.html.gz and b/dist/Printer3D/Marlin/index.html.gz differ diff --git a/dist/Printer3D/Repetier/index.html.gz b/dist/Printer3D/Repetier/index.html.gz index e051eeac5..3d44b2fd7 100644 Binary files a/dist/Printer3D/Repetier/index.html.gz and b/dist/Printer3D/Repetier/index.html.gz differ diff --git a/dist/Printer3D/Smoothieware/index.html.gz b/dist/Printer3D/Smoothieware/index.html.gz index 339ec253f..d8f266ce5 100644 Binary files a/dist/Printer3D/Smoothieware/index.html.gz and b/dist/Printer3D/Smoothieware/index.html.gz differ diff --git a/dist/SandTable/GRBL/index.html.gz b/dist/SandTable/GRBL/index.html.gz index da5e31bd8..f779b31f4 100644 Binary files a/dist/SandTable/GRBL/index.html.gz and b/dist/SandTable/GRBL/index.html.gz differ diff --git a/info.json b/info.json index 693347e91..234336754 100644 --- a/info.json +++ b/info.json @@ -1,3 +1,3 @@ { - "version": "3.0.0-a79" + "version": "3.0.0-a81" } diff --git a/server/CNC/GRBL/Flash/preferences.json b/server/CNC/GRBL/Flash/preferences.json index adfc87ee3..c5a93a28c 100644 --- a/server/CNC/GRBL/Flash/preferences.json +++ b/server/CNC/GRBL/Flash/preferences.json @@ -10,7 +10,7 @@ "showinformationpage": true, "showmachinesettings": true, "enableautorepeat": false, - "enableshortcuts": true, + "enableshortcuts": false, "autorepeatdelay": "500", "emergencystop": "#SAFETYDOOR#", "fixedpanels": false, @@ -74,15 +74,15 @@ "openterminalonstart": true, "verbose": true, "autoscroll": true, - "showfilespanel": true, + "showfilespanel": false, "openfilesonstart": true, - "filesfilter": "g;G;gco;GCO;gcode;GCODE;nc;txt", + "filesfilter": "g;G;gco;GCO;gcode;GCODE;nc;txt;cnc;ngc", "flashfs": true, "sort_flashfs_files": true, "directsd": true, - "sort_sd_files": true, - "default_filesystem": "DIRECTSD", - "showjogpanel": true, + "sort_directsd_files": true, + "default_filesystem": "FLASH", + "showjogpanel": false, "openjogonstart": true, "homesingleaxis": false, "homecmd": "$H#", @@ -193,12 +193,12 @@ { "id": "btnaxisSel+", "name": "btnaxisSel+", - "key": "Shift+)" + "key": "Control+0" }, { "id": "btnaxisSel-", "name": "btnaxisSel-", - "key": "Shift+(" + "key": "Control+9" }, { "id": "btndistSel+", @@ -221,43 +221,24 @@ "key": "Delete" } ], - "shownotificationspanel": true, + "shownotificationspanel": false, "opennotificationsonstart": false, "notifautoscroll": true, - "showmacrospanel": true, - "openmacrosonstart": true, + "showmacrospanel": false, + "openmacrosonstart": false, "macros": [], - "showextracontents": true, - "openextrapanelsonstart": true, - "extracontents": [ - { - "id": "xjxkqpm5o", - "name": "Panel xjxkqpm5o", - "icon": "Meh", - "target": "panel", - "source": "capabilities.html", - "type": "extension", - "refreshtime": "0" - }, - { - "id": "ooyeeka4e", - "name": "Kiri", - "icon": "Box", - "target": "page", - "source": "https://grid.space/kiri/", - "type": "content", - "refreshtime": "0" - } - ], + "showextracontents": false, + "openextrapanelsonstart": false, + "extracontents": [], "showstatuspanel": true, "openstatusonstart": true, - "showprobepanel": true, + "showprobepanel": false, "openprobeonstart": true, "probefeedrate": 20, "maxprobe": 15, "probethickness": "1", "probepostcommand": "G10 L20 P1 #selected_axis##probe_thickness#", - "showlaserpanel": true, + "showlaserpanel": false, "openlaseronstart": true, "lasertest": 10, "lasertestprecent": 20, @@ -268,8 +249,8 @@ "showM4ctrls": true, "showCoolantctrls": true, "showMistctrls": true, - "showM7ctrls": false, - "showoverridespanel": true, + "showM7ctrls": true, + "showoverridespanel": false, "openoverridesonstart": true } } \ No newline at end of file diff --git a/src/components/App/version.js b/src/components/App/version.js index 1e4d30d01..cd0e9a757 100644 --- a/src/components/App/version.js +++ b/src/components/App/version.js @@ -17,7 +17,7 @@ */ import { h } from "preact" import { webUIbuild } from "../../targets" -export const webUIversion = "3.0.0-a80" +export const webUIversion = "3.0.0-a81" export const Esp3dVersion = () => ( {webUIversion}.{webUIbuild} diff --git a/src/components/Panels/SpindleCNC.js b/src/components/Panels/SpindleCNC.js index 345b5c8d3..677882837 100644 --- a/src/components/Panels/SpindleCNC.js +++ b/src/components/Panels/SpindleCNC.js @@ -47,6 +47,7 @@ const spindleSpeedValue = {} const SpindleControls = () => { const { states } = useTargetContext() + console.log(states) const { interfaceSettings, connectionSettings } = useSettingsContext() //Add callback to reset event eventsList.on("reset", onReset) @@ -137,6 +138,12 @@ const SpindlePanel = () => { command: "M5", mode: "spindle_mode", }, + { + label: "M6", + tooltip: "CN109", + command: "M6", + mode: "spindle_mode", + }, ], control: { id: "spindlespeedInput", @@ -311,8 +318,14 @@ const SpindlePanel = () => { } } if (states && button.mode && states[button.mode]) { - if (states[button.mode].value == button.label) { - classname += " btn-primary" + if (Array.isArray(states[button.mode])){ + if(states[button.mode].some(item => item.value==button.label)){ + classname += " btn-primary" + } + } else { + if (states[button.mode].value == button.label) { + classname += " btn-primary" + } } } return ( diff --git a/src/components/Panels/StatusCNC.js b/src/components/Panels/StatusCNC.js index de679c115..6e389cbfb 100644 --- a/src/components/Panels/StatusCNC.js +++ b/src/components/Panels/StatusCNC.js @@ -300,6 +300,29 @@ const StatusPanel = () => {
{variablesList.modes.map((element) => { if (states[element.id]) { + if (Array.isArray(states[element.id])) { + return states[element.id].map((item) => { + return( + + ) + }) + } else return (