* feat: pressure advance settings on dashboard Signed-off-by: Dominik Willner <th33xitus@gmail.com> * refactor: move pressure advance settings * move pressure advance settings from PrintsettingsPanel to MachineSettingsPanel Signed-off-by: Dominik Willner <th33xitus@gmail.com> * feat: custom number input spin buttons * this feature adds custom spin buttons to the number inputs of the motion, pressure advance and firmware retraction settings Signed-off-by: Dominik Willner <th33xitus@gmail.com>
106 lines
4.0 KiB
Vue
106 lines
4.0 KiB
Vue
<template>
|
|
<v-card-text>
|
|
<v-row>
|
|
<v-col class="col-12 col-md-6">
|
|
<firmware-retraction-settings-input
|
|
:label="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.RetractLength')"
|
|
:target="current_retract_length"
|
|
:default-value="config_retract_length"
|
|
:step="0.01"
|
|
:min="0"
|
|
:max="-1"
|
|
:dec="2"
|
|
unit="mm"
|
|
attribute-name="RETRACT_LENGTH"
|
|
></firmware-retraction-settings-input>
|
|
</v-col>
|
|
<v-col class="col-12 col-md-6">
|
|
<firmware-retraction-settings-input
|
|
:label="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.RetractSpeed')"
|
|
:target="current_retract_speed"
|
|
:default-value="config_retract_speed"
|
|
:step="1"
|
|
:min="1"
|
|
:max="-1"
|
|
:dec="0"
|
|
unit="mm/s"
|
|
attribute-name="RETRACT_SPEED"
|
|
></firmware-retraction-settings-input>
|
|
</v-col>
|
|
</v-row>
|
|
<v-row>
|
|
<v-col class="col-12 col-md-6">
|
|
<firmware-retraction-settings-input
|
|
:label="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.UnretractExtraLength')"
|
|
:target="current_unretract_extra_length"
|
|
:default-value="config_unretract_extra_length"
|
|
:step="0.01"
|
|
:min="0"
|
|
:max="-1"
|
|
:dec="2"
|
|
unit="mm"
|
|
attribute-name="UNRETRACT_EXTRA_LENGTH"
|
|
></firmware-retraction-settings-input>
|
|
</v-col>
|
|
<v-col class="col-12 col-md-6">
|
|
<firmware-retraction-settings-input
|
|
:label="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.UnretractSpeed')"
|
|
:target="current_unretract_speed"
|
|
:default-value="config_unretract_speed"
|
|
:step="1"
|
|
:min="1"
|
|
:max="-1"
|
|
:dec="0"
|
|
unit="mm/s"
|
|
attribute-name="UNRETRACT_SPEED"
|
|
></firmware-retraction-settings-input>
|
|
</v-col>
|
|
</v-row>
|
|
</v-card-text>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { Component, Mixins } from 'vue-property-decorator'
|
|
import BaseMixin from '@/components/mixins/base'
|
|
import Panel from '@/components/ui/Panel.vue'
|
|
import FirmwareRetractionSettingsInput from '@/components/inputs/FirmwareRetractionSettingsInput.vue'
|
|
|
|
@Component({
|
|
components: {Panel, FirmwareRetractionSettingsInput}
|
|
})
|
|
export default class FirmwareRetractionSettings extends Mixins(BaseMixin) {
|
|
|
|
get current_retract_length(): number {
|
|
return this.$store.state.printer?.firmware_retraction?.retract_length ?? 0
|
|
}
|
|
|
|
get current_retract_speed(): number {
|
|
return this.$store.state.printer?.firmware_retraction?.retract_speed ?? 20
|
|
}
|
|
|
|
get current_unretract_extra_length(): number {
|
|
return this.$store.state.printer?.firmware_retraction?.unretract_extra_length ?? 0
|
|
}
|
|
|
|
get current_unretract_speed(): number {
|
|
return this.$store.state.printer?.firmware_retraction?.unretract_speed ?? 10
|
|
}
|
|
|
|
get config_retract_length(): number {
|
|
return this.$store.state.printer?.configfile?.settings?.firmware_retraction?.retract_length ?? 0
|
|
}
|
|
|
|
get config_retract_speed(): number {
|
|
return this.$store.state.printer?.configfile?.settings?.firmware_retraction?.retract_speed ?? 20
|
|
}
|
|
|
|
get config_unretract_extra_length(): number {
|
|
return this.$store.state.printer?.configfile?.settings?.firmware_retraction?.unretract_extra_length ?? 0
|
|
}
|
|
|
|
get config_unretract_speed(): number {
|
|
return this.$store.state.printer?.configfile?.settings?.firmware_retraction?.unretract_speed ?? 10
|
|
}
|
|
}
|
|
</script>
|