bugfix: only allow positiv values in control and extruder settings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
parent
767a9403fd
commit
d891ec0800
@ -148,8 +148,8 @@
|
|||||||
get() {
|
get() {
|
||||||
return this.$store.state.gui.dashboard.control.feedrateXY
|
return this.$store.state.gui.dashboard.control.feedrateXY
|
||||||
},
|
},
|
||||||
set(value) {
|
set(feedrate) {
|
||||||
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { feedrateXY: value } } })
|
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { feedrateXY: feedrate } } })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stepsXY: {
|
stepsXY: {
|
||||||
@ -157,8 +157,10 @@
|
|||||||
const steps = this.$store.state.gui.dashboard.control.stepsXY
|
const steps = this.$store.state.gui.dashboard.control.stepsXY
|
||||||
return steps.sort(function (a,b) { return b-a })
|
return steps.sort(function (a,b) { return b-a })
|
||||||
},
|
},
|
||||||
set(value) {
|
set(steps) {
|
||||||
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { stepsXY: value } } })
|
const absSteps = []
|
||||||
|
for(const value of steps) absSteps.push(Math.abs(value))
|
||||||
|
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { stepsXY: absSteps } } })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
feedrateZ: {
|
feedrateZ: {
|
||||||
@ -174,8 +176,10 @@
|
|||||||
const steps = this.$store.state.gui.dashboard.control.stepsZ
|
const steps = this.$store.state.gui.dashboard.control.stepsZ
|
||||||
return steps.sort(function (a,b) { return b-a })
|
return steps.sort(function (a,b) { return b-a })
|
||||||
},
|
},
|
||||||
set(value) {
|
set(steps) {
|
||||||
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { stepsZ: value } } })
|
const absSteps = []
|
||||||
|
for(const value of steps) absSteps.push(Math.abs(value))
|
||||||
|
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { stepsZ: absSteps } } })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
feedamountsE: {
|
feedamountsE: {
|
||||||
@ -183,8 +187,10 @@
|
|||||||
const steps = this.$store.state.gui.dashboard.extruder.feedamounts
|
const steps = this.$store.state.gui.dashboard.extruder.feedamounts
|
||||||
return steps.sort(function (a,b) { return b-a })
|
return steps.sort(function (a,b) { return b-a })
|
||||||
},
|
},
|
||||||
set(value) {
|
set(amounts) {
|
||||||
return this.$store.dispatch('gui/setSettings', { dashboard: { extruder: { feedamounts: value } } })
|
const absAmounts = []
|
||||||
|
for(const value of amounts) absAmounts.push(Math.abs(value))
|
||||||
|
return this.$store.dispatch('gui/setSettings', { dashboard: { extruder: { feedamounts: absAmounts } } })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
feedratesE: {
|
feedratesE: {
|
||||||
@ -192,8 +198,10 @@
|
|||||||
const steps = this.$store.state.gui.dashboard.extruder.feedrates
|
const steps = this.$store.state.gui.dashboard.extruder.feedrates
|
||||||
return steps.sort(function (a,b) { return b-a })
|
return steps.sort(function (a,b) { return b-a })
|
||||||
},
|
},
|
||||||
set(value) {
|
set(rates) {
|
||||||
return this.$store.dispatch('gui/setSettings', { dashboard: { extruder: { feedrates: value } } })
|
const absRates = []
|
||||||
|
for(const value of rates) absRates.push(Math.abs(value))
|
||||||
|
return this.$store.dispatch('gui/setSettings', { dashboard: { extruder: { feedrates: absRates } } })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user