bugfix: toolSlider extend only by machine limits
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
parent
bec378d2a0
commit
f6873bda85
@ -10,10 +10,10 @@
|
|||||||
<v-card-text class="px-0 pt-0 pb-2 content">
|
<v-card-text class="px-0 pt-0 pb-2 content">
|
||||||
<v-row class="px-6" >
|
<v-row class="px-6" >
|
||||||
<v-col sm-12>
|
<v-col sm-12>
|
||||||
<toolSlider label="VELOCITY" v-bind:target="max_velocity" :max="200" :extender-steps="100" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" class="mt-5" ></toolSlider>
|
<toolSlider label="VELOCITY" v-bind:target="max_velocity" :max="200" :extender="true" :extender-steps="100" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" class="mt-5" ></toolSlider>
|
||||||
<toolSlider label="ACCEL" v-bind:target="max_accel" :max="5000" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" class="mt-5" ></toolSlider>
|
<toolSlider label="ACCEL" v-bind:target="max_accel" :max="5000" :extender="true" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" class="mt-5" ></toolSlider>
|
||||||
<toolSlider label="DECEL" v-bind:target="max_accel_to_decel" :max="5000" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" class="mt-5" ></toolSlider>
|
<toolSlider label="DECEL" v-bind:target="max_accel_to_decel" :max="5000" :extender="true" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" class="mt-5" ></toolSlider>
|
||||||
<toolSlider label="SCV" v-bind:target="square_corner_velocity" :max="10" :extender-steps="5" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" class="mt-5" ></toolSlider>
|
<toolSlider label="SCV" v-bind:target="square_corner_velocity" :max="10" :extender="true" :extender-steps="5" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" class="mt-5" ></toolSlider>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
@ -58,6 +58,11 @@
|
|||||||
required: false,
|
required: false,
|
||||||
default: 100
|
default: 100
|
||||||
},
|
},
|
||||||
|
extender: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
multi: {
|
multi: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
@ -95,13 +100,16 @@
|
|||||||
this.value = this.target * this.multi;
|
this.value = this.target * this.multi;
|
||||||
},
|
},
|
||||||
value: function() {
|
value: function() {
|
||||||
|
if (this.extender) {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.checkExpand();
|
this.checkExpand();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created: function() {
|
created: function() {
|
||||||
if (this.value > this.variableMax) {
|
if (this.extender && this.value > this.variableMax) {
|
||||||
let tmpMulti = Math.ceil((this.value - this.variableMax) / this.extenderSteps);
|
let tmpMulti = Math.ceil((this.value - this.variableMax) / this.extenderSteps);
|
||||||
this.variableMax += tmpMulti * this.extenderSteps;
|
this.variableMax += tmpMulti * this.extenderSteps;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user