diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jsLinters/jshint.xml b/.idea/jsLinters/jshint.xml
new file mode 100644
index 0000000..cf1260d
--- /dev/null
+++ b/.idea/jsLinters/jshint.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..99f3acd
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..3875508
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/onefinity-firmware.iml b/.idea/onefinity-firmware.iml
new file mode 100644
index 0000000..95276d7
--- /dev/null
+++ b/.idea/onefinity-firmware.iml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/package.json b/package.json
index d2e7249..bf41cfd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "bbctrl",
- "version": "1.3.2",
+ "version": "1.4.0 Alpha 1",
"homepage": "https://onefinitycnc.com/",
"repository": "https://github.com/OneFinityCNC/onefinity",
"license": "GPL-3.0+",
diff --git a/src/js/app.js b/src/js/app.js
index b05ff75..a458dd5 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -109,7 +109,7 @@ module.exports = new Vue({
template: require("../resources/config-template.json"),
config: {
settings: { units: "METRIC" },
- motors: [{}, {}, {}, {}],
+ motors: [{}, {}, {}, {},{}, {}, {}, {}],
version: "",
full_version: "",
ip: "<>",
diff --git a/src/js/macros.js b/src/js/macros.js
index 4369426..2296919 100644
--- a/src/js/macros.js
+++ b/src/js/macros.js
@@ -14,8 +14,6 @@ module.exports = {
};
},
components: {
- "axis-control": require("./axis-control"),
- "path-viewer": require("./path-viewer"),
"gcode-viewer": require("./gcode-viewer"),
},
computed: {
@@ -93,44 +91,56 @@ module.exports = {
cancelMacros: function (id) {
document.getElementById(`macros-name-${id}`).value = "";
document.getElementById(`macros-color-${id}`).value = "#ffffff";
- document.getElementById(`gcodeSelect-${id}`).value="default";
+ document.getElementById(`gcodeSelect-${id}`).value = "default";
this.$broadcast("gcode-clear");
},
resetConfig: async function () {
this.config.macros = [
{
- name: " ",
- color: "#efefef",
+ name: "FireLaser",
+ color: "#e6e6e6",
gcode_file_name: " ",
gcode_file_time: 0,
},
{
- name: " ",
- color: "#efefef",
+ name: "Home",
+ color: "#e6e6e6",
gcode_file_name: " ",
gcode_file_time: 0,
},
{
- name: " ",
- color: "#efefef",
+ name: "Park",
+ color: "#e6e6e6",
gcode_file_name: " ",
gcode_file_time: 0,
},
{
- name: " ",
- color: "#efefef",
+ name: "Spindle WarmUp",
+ color: "#e6e6e6",
gcode_file_name: " ",
gcode_file_time: 0,
},
{
- name: " ",
- color: "#efefef",
+ name: "Spindle ON",
+ color: "#e6e6e6",
gcode_file_name: " ",
gcode_file_time: 0,
},
{
- name: " ",
- color: "#efefef",
+ name: "Spindle OFF",
+ color: "#e6e6e6",
+ gcode_file_name: " ",
+ gcode_file_time: 0,
+ },
+ {
+ name: "Vacuum ON",
+ color: "#e6e6e6",
+ gcode_file_name: " ",
+ gcode_file_time: 0,
+ },
+ {
+ name: "Vacuum OFF",
+ color: "#e6e6e6",
gcode_file_name: " ",
gcode_file_time: 0,
},
diff --git a/src/pug/index.pug b/src/pug/index.pug
index 7dd3d7b..0ad1326 100644
--- a/src/pug/index.pug
+++ b/src/pug/index.pug
@@ -35,6 +35,9 @@ html(lang="en")
li.pure-menu-heading
a.pure-menu-link(href="#control") Control
+ li.pure-menu-heading
+ a.pure-menu-link(href="#macros") Macros
+
li.pure-menu-heading
a.pure-menu-link(href="#settings") Settings
@@ -62,9 +65,6 @@ html(lang="en")
li.pure-menu-heading
a.pure-menu-link(href="#cheat-sheet") Cheat Sheet
- li.pure-menu-heading
- a.pure-menu-link(href="#macros") Macros
-
li.pure-menu-heading
a.pure-menu-link(href="#help") Help
diff --git a/src/pug/templates/control-view.pug b/src/pug/templates/control-view.pug
index 12d4103..b8552ab 100644
--- a/src/pug/templates/control-view.pug
+++ b/src/pug/templates/control-view.pug
@@ -220,6 +220,10 @@ script#control-view-template(type="text/x-template")
:disabled="!true",v-bind:style="{ backgroundColor: config.macros[4].color }") {{config.macros[4].name}}
button.macros-buttons(title="Click to run Macros 6", @click="runMacros(5)",
:disabled="!true",v-bind:style="{ backgroundColor: config.macros[5].color }") {{config.macros[5].name}}
+ button.macros-buttons(title="Click to run Macros 7", @click="runMacros(6)",
+ :disabled="!true",v-bind:style="{ backgroundColor: config.macros[6].color }") {{config.macros[6].name}}
+ button.macros-buttons(title="Click to run Macros 8", @click="runMacros(7)",
+ :disabled="!true",v-bind:style="{ backgroundColor: config.macros[7].color }") {{config.macros[7].name}}
.tabs
diff --git a/src/pug/templates/macros.pug b/src/pug/templates/macros.pug
index 7dc90cb..e21ce21 100644
--- a/src/pug/templates/macros.pug
+++ b/src/pug/templates/macros.pug
@@ -36,6 +36,12 @@ script#macros-template(type="text/x-template")
input#tab6(type="radio", name="tabs", @click="tab = '6'")
label(for="tab6",style="height:50px;width:100px") Macros 6
+ input#tab7(type="radio", name="tabs", @click="tab = '7'")
+ label(for="tab7",style="height:50px;width:100px") Macros 7
+
+ input#tab8(type="radio", name="tabs", @click="tab = '8'")
+ label(for="tab8",style="height:50px;width:100px") Macros 8
+
section#content1.tab-content
.macros-form
p.title Name
@@ -203,3 +209,59 @@ script#macros-template(type="text/x-template")
style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border:0;margin-top:30px") Save
button.submit-macros(title="Cancel Macros",@click="cancelMacros(5)",
style="height:50px;width:140px;font-weight:normal;margin-left:5px;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel
+
+ section#content7.tab-content
+ .macros-form
+ p.title Name
+ .input-container
+ input.input-color(type="color",id="macros-color-6",value="#ffffff")
+ input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-6")
+ p.title G-Code
+ .select-upload-gcode
+ select#gcodeSelect-6(title="Select previously uploaded GCode programs.",selected
+ v-model="state.selected",@change="load", :disabled="!is_ready",
+ style="max-width:100%;height:40px;border-radius:5px")
+ option(disabled='' selected='' value='default') Select an option
+ option(v-for="file in state.files", :value="file") {{file}}
+
+ button.pure-button(title="Upload a new GCode program.", @click="open",
+ :disabled="!is_ready",style="height:40px;width:130px;font-weight:normal;border-radius:5px;margin-left:4px;background-color:#5a9ad7;color:#fff;display:flex;align-items:center;justify-content:space-around") Upload
+ .fa.fa-upload
+
+ form.gcode-file-input.file-upload
+ input(type="file", @change="upload", :disabled="!is_ready",
+ accept=".nc,.ngc,.gcode,.gc")
+ br
+ gcode-viewer
+ button.submit-macros(title="Save Macros",@click="saveMacros(6)",
+ style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border:0;margin-top:30px") Save
+ button.submit-macros(title="Cancel Macros",@click="cancelMacros(6)",
+ style="height:50px;width:140px;font-weight:normal;margin-left:5px;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel
+
+ section#content8.tab-content
+ .macros-form
+ p.title Name
+ .input-container
+ input.input-color(type="color",id="macros-color-7",value="#ffffff")
+ input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-7")
+ p.title G-Code
+ .select-upload-gcode
+ select#gcodeSelect-7(title="Select previously uploaded GCode programs.",selected
+ v-model="state.selected",@change="load", :disabled="!is_ready",
+ style="max-width:100%;height:40px;border-radius:5px")
+ option(disabled='' selected='' value='default') Select an option
+ option(v-for="file in state.files", :value="file") {{file}}
+
+ button.pure-button(title="Upload a new GCode program.", @click="open",
+ :disabled="!is_ready",style="height:40px;width:130px;font-weight:normal;border-radius:5px;margin-left:4px;background-color:#5a9ad7;color:#fff;display:flex;align-items:center;justify-content:space-around") Upload
+ .fa.fa-upload
+
+ form.gcode-file-input.file-upload
+ input(type="file", @change="upload", :disabled="!is_ready",
+ accept=".nc,.ngc,.gcode,.gc")
+ br
+ gcode-viewer
+ button.submit-macros(title="Save Macros",@click="saveMacros(7)",
+ style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border:0;margin-top:30px") Save
+ button.submit-macros(title="Cancel Macros",@click="cancelMacros(7)",
+ style="height:50px;width:140px;font-weight:normal;margin-left:5px;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel
diff --git a/src/py/bbctrl/Config.py b/src/py/bbctrl/Config.py
index cf9443e..18e148f 100644
--- a/src/py/bbctrl/Config.py
+++ b/src/py/bbctrl/Config.py
@@ -43,7 +43,7 @@ class Config(object):
self.values = {}
try:
- self.version = "1.3.2"
+ self.version = "1.4.0 Alpha 1"
# Load config template
with open(get_resource('http/config-template.json'), 'r',
diff --git a/src/resources/config-template.json b/src/resources/config-template.json
index 55f807e..44e19d8 100644
--- a/src/resources/config-template.json
+++ b/src/resources/config-template.json
@@ -585,54 +585,66 @@
},
"macros": {
- "type":"list",
- "index":"123456",
- "default":[
+ "type": "list",
+ "index": "12345678",
+ "default": [
{
- "name":"Macros 1",
- "color": "",
- "gcode_file_name": "",
- "gcode_file_time": 0
+ "name": "FireLaser",
+ "color": "#e6e6e6",
+ "gcode_file_name": "",
+ "gcode_file_time": 0
},
{
- "name":"Macros 2",
- "color": "",
- "gcode_file_name": "",
- "gcode_file_time": 0
+ "name": "Home",
+ "color": "#e6e6e6",
+ "gcode_file_name": "",
+ "gcode_file_time": 0
},
{
- "name":"Macros 3",
- "color": "",
- "gcode_file_name": "",
- "gcode_file_time": 0
+ "name": "Perk",
+ "color": "#e6e6e6",
+ "gcode_file_name": "",
+ "gcode_file_time": 0
},
{
- "name":"Macros 4",
- "color": "",
- "gcode_file_name": "",
- "gcode_file_time": 0
+ "name": "Spindle Warmup",
+ "color": "#e6e6e6",
+ "gcode_file_name": "",
+ "gcode_file_time": 0
},
{
- "name":"Macros 5",
- "color": "",
- "gcode_file_name": "",
- "gcode_file_time": 0
+ "name": "Spindle ON",
+ "color": "#e6e6e6",
+ "gcode_file_name": "",
+ "gcode_file_time": 0
},
{
- "name":"Macros 6",
- "color": "",
- "gcode_file_name": "",
- "gcode_file_time": 0
+ "name": "Spindle OFF",
+ "color": "#e6e6e6",
+ "gcode_file_name": "",
+ "gcode_file_time": 0
+ },
+ {
+ "name": "Vacuum ON",
+ "color": "#e6e6e6",
+ "gcode_file_name": " ",
+ "gcode_file_time": 0
+ },
+ {
+ "name": "Vacuum OFF",
+ "color": "#e6e6e6",
+ "gcode_file_name": " ",
+ "gcode_file_time": 0
}
],
"template": {
"name": {
"type": "text",
- "default": "Default Name"
+ "default": " "
},
"color": {
"type": "text",
- "default": "#efefef"
+ "default": "#e6e6e6"
},
"gcode_file_name": {
"type": "text",
diff --git a/src/resources/onefinity_defaults.json b/src/resources/onefinity_defaults.json
index 29c6047..ef67c8e 100644
--- a/src/resources/onefinity_defaults.json
+++ b/src/resources/onefinity_defaults.json
@@ -1,5 +1,5 @@
{
- "version": "1.3.2",
+ "version": "1.4.0 Alpha 1",
"settings": {
"junction-accel": 200000,
"max-deviation": 0.05,
diff --git a/src/stylus/style.styl b/src/stylus/style.styl
index 6435b60..f3eabb4 100644
--- a/src/stylus/style.styl
+++ b/src/stylus/style.styl
@@ -215,6 +215,9 @@ span.unit
.save
display block
margin 0.25em 0.6em
+ height 3.5em
+ width 8em
+
.pure-menu-heading
background inherit