config help fix

This commit is contained in:
saifullah-N
2022-12-23 00:41:02 +05:30
parent 20360b983b
commit fde5ed3ac7
2 changed files with 78 additions and 33 deletions

View File

@@ -6,8 +6,7 @@
"default": "METRIC" "default": "METRIC"
}, },
"max-deviation": { "max-deviation": {
"help": "help": "Default allowed deviation from programmed path. Also see G64 & G61.",
"Default allowed deviation from programmed path. Also see G64 & G61.",
"type": "float", "type": "float",
"min": 0.05, "min": 0.05,
"max": 100, "max": 100,
@@ -15,8 +14,7 @@
"default": 0.1 "default": 0.1
}, },
"junction-accel": { "junction-accel": {
"help": "help": "Higher values will increasing cornering speed but may cause stalls.",
"Higher values will increasing cornering speed but may cause stalls.",
"type": "float", "type": "float",
"min": 10000, "min": 10000,
"max": 100000000, "max": 100000000,
@@ -34,10 +32,10 @@
"type": "list", "type": "list",
"index": "0123", "index": "0123",
"default": [ "default": [
{"axis": "X"}, { "axis": "X" },
{"axis": "Y"}, { "axis": "Y" },
{"axis": "Z"}, { "axis": "Z" },
{"axis": "A"} { "axis": "A" }
], ],
"template": { "template": {
"general": { "general": {
@@ -168,7 +166,13 @@
"homing": { "homing": {
"homing-mode": { "homing-mode": {
"type": "enum", "type": "enum",
"values": ["manual", "switch-min", "switch-max","stall-min","stall-max"], "values": [
"manual",
"switch-min",
"switch-max",
"stall-min",
"stall-max"
],
"default": "manual", "default": "manual",
"code": "ho" "code": "ho"
}, },
@@ -178,7 +182,7 @@
"unit": "per full step", "unit": "per full step",
"default": 8, "default": 8,
"code": "lm", "code": "lm",
"hmodes": ["stall-min","stall-max"] "hmodes": ["stall-min", "stall-max"]
}, },
"search-velocity": { "search-velocity": {
"type": "float", "type": "float",
@@ -188,7 +192,7 @@
"scale": 0.0254, "scale": 0.0254,
"default": 0.5, "default": 0.5,
"code": "sv", "code": "sv",
"hmodes": ["switch-min", "switch-max", "stall-min","stall-max"] "hmodes": ["switch-min", "switch-max", "stall-min", "stall-max"]
}, },
"latch-velocity": { "latch-velocity": {
"type": "float", "type": "float",
@@ -216,7 +220,7 @@
"unit": "v", "unit": "v",
"default": 6, "default": 6,
"code": "tv", "code": "tv",
"hmodes": ["stall-min","stall-max"] "hmodes": ["stall-min", "stall-max"]
}, },
"stall-sample-time": { "stall-sample-time": {
"type": "int", "type": "int",
@@ -224,7 +228,7 @@
"default": 50, "default": 50,
"unit": "µsec", "unit": "µsec",
"code": "sp", "code": "sp",
"hmodes": ["stall-min","stall-max"] "hmodes": ["stall-min", "stall-max"]
}, },
"stall-current": { "stall-current": {
"type": "float", "type": "float",
@@ -232,7 +236,7 @@
"unit": "amps", "unit": "amps",
"default": 1.5, "default": 1.5,
"code": "tc", "code": "tc",
"hmodes": ["stall-min","stall-max"] "hmodes": ["stall-min", "stall-max"]
}, },
"zero-backoff": { "zero-backoff": {
"type": "float", "type": "float",
@@ -242,7 +246,7 @@
"scale": 25.4, "scale": 25.4,
"default": 5, "default": 5,
"code": "zb", "code": "zb",
"hmodes": ["switch-min", "switch-max", "stall-min","stall-max"] "hmodes": ["switch-min", "switch-max", "stall-min", "stall-max"]
} }
} }
} }
@@ -292,16 +296,30 @@
}, },
"tool-enable-mode": { "tool-enable-mode": {
"type": "enum", "type": "enum",
"values": ["disabled", "lo-hi", "hi-lo", "tri-lo", "tri-hi", "lo-tri", "values": [
"hi-tri"], "disabled",
"lo-hi",
"hi-lo",
"tri-lo",
"tri-hi",
"lo-tri",
"hi-tri"
],
"default": "lo-hi", "default": "lo-hi",
"code": "eom", "code": "eom",
"pin": 15 "pin": 15
}, },
"tool-direction-mode": { "tool-direction-mode": {
"type": "enum", "type": "enum",
"values": ["disabled", "lo-hi", "hi-lo", "tri-lo", "tri-hi", "lo-tri", "values": [
"hi-tri"], "disabled",
"lo-hi",
"hi-lo",
"tri-lo",
"tri-hi",
"lo-tri",
"hi-tri"
],
"default": "lo-hi", "default": "lo-hi",
"code": "dom", "code": "dom",
"pin": 16 "pin": 16
@@ -342,12 +360,19 @@
"values": [ "values": [
"disabled", "disabled",
"connect-write", "connect-write",
"max-freq-read", "max-freq-fixed", "max-freq-read",
"freq-set", "freq-signed-set", "max-freq-fixed",
"stop-write", "forward-write", "reverse-write", "freq-set",
"freq-read", "freq-signed-read", "freq-actech-read", "freq-signed-set",
"stop-write",
"forward-write",
"reverse-write",
"freq-read",
"freq-signed-read",
"freq-actech-read",
"status-read", "status-read",
"disconnect-write"], "disconnect-write"
],
"default": "disabled", "default": "disabled",
"code": "vt" "code": "vt"
}, },
@@ -406,8 +431,7 @@
"default": false "default": false
}, },
"dynamic-power": { "dynamic-power": {
"help": "help": "Adjust tool power based on velocity and feed rate. Useful for LASERs.",
"Adjust tool power based on velocity and feed rate. Useful for LASERs.",
"type": "bool", "type": "bool",
"default": false, "default": false,
"code": "dp" "code": "dp"
@@ -452,24 +476,45 @@
"outputs": { "outputs": {
"load-1": { "load-1": {
"type": "enum", "type": "enum",
"values": ["disabled", "lo-hi", "hi-lo", "tri-lo", "tri-hi", "lo-tri", "values": [
"hi-tri"], "disabled",
"lo-hi",
"hi-lo",
"tri-lo",
"tri-hi",
"lo-tri",
"hi-tri"
],
"default": "lo-hi", "default": "lo-hi",
"code": "1om", "code": "1om",
"pin": 2 "pin": 2
}, },
"load-2": { "load-2": {
"type": "enum", "type": "enum",
"values": ["disabled", "lo-hi", "hi-lo", "tri-lo", "tri-hi", "lo-tri", "values": [
"hi-tri"], "disabled",
"lo-hi",
"hi-lo",
"tri-lo",
"tri-hi",
"lo-tri",
"hi-tri"
],
"default": "lo-hi", "default": "lo-hi",
"code": "2om", "code": "2om",
"pin": 1 "pin": 1
}, },
"fault": { "fault": {
"type": "enum", "type": "enum",
"values": ["disabled", "lo-hi", "hi-lo", "tri-lo", "tri-hi", "lo-tri", "values": [
"hi-tri"], "disabled",
"lo-hi",
"hi-lo",
"tri-lo",
"tri-hi",
"lo-tri",
"hi-tri"
],
"default": "lo-hi", "default": "lo-hi",
"code": "fom", "code": "fom",
"pin": 21 "pin": 21

View File

@@ -70,7 +70,7 @@
} }
function getTitle(): string { function getTitle(): string {
const help = !!template.help ? `${template.help}\n` : ""; const help = template.help ? `${template.help}\n` : "";
return `${help}Default: ${template.default} ${template.unit || ""}`; return `${help}Default: ${template.default} ${template.unit || ""}`;
} }