Files
mainsail/src/components/panels/Machine/LimitsPanel.vue
T
Stefan Dej 3dae42edb0 feature: collapsable and normalize panels (#372)
* feature: add panel component to normalize all panels
* feature: add expand function to panel component
* chore: remove not used computed value
* feature: add slot for override the icon in the panel
* chore: remove unused package (vue2-collapse)
* feature: change StatusPanel.vue to panel component
* feature: add prop to change toolbar color
* feature: change MinSettingsPanel.vue to panel component
* feature: change MoonrakerStatePanel.vue to panel component
* feature: change KlippyStatePanel.vue to panel component
* feature: change KlipperWarningsPanel.vue to panel component
* feature: change ControlPanel.vue to panel component
* feature: change PrintsettingsPanel.vue to panel component
* feature: change MiscellaneousPanel.vue to panel component
* feature: change ToolsPanel.vue to panel component
* feature: change MacrosPanel.vue to panel component
* feature: change MiniconsolePanel.vue to panel component
* feature: change FarmPrinterPanel.vue to panel component
* bugfix: add toolbar zindex to fix panel hover overlay
* bugfix: remove toolbar zindex and modify hover effect
* bugfix: farmprinter loading state (remove debug output)
* feature: add prop to disable margin botton of panel component
* feature: change HistoryListPanel.vue to panel component
* feature: move history statistics in HistoryStatisticsPanel.vue and use panel component
* feature: change ZoffsetPanel.vue to panel component
* feature: add slot after toolbar title in panel component
* feature: change Heightmap.vue to panel component
* feature: change Files.vue to panel component
* feature: change Viewer.vue to panel component
* feature: add buttons before toolbar in panel component
* feature: change ConfigFilesPanel.vue to panel component
* feature: change EndstopPanel.vue to panel component
* chore: fix typo in card class from ConfigFilesPanel.vue
* feature: change LimitsPanel.vue to panel component
* feature: change LogfilesPanel.vue to panel component
* feature: change SystemPanel.vue to panel component
* feature: change UpdatePanel.vue to panel component
2021-10-09 23:39:06 +02:00

92 lines
3.6 KiB
Vue

<template>
<panel :title="$t('Machine.LimitsPanel.MachineLimits')" v-if="klipperReadyForGui" icon="mdi-speedometer" card-class="machine-machinelimits-panel" :collapsible="true">
<v-card-text>
<v-row>
<v-col class="col-6">
<machine-limits-input
:label="$t('Machine.LimitsPanel.Velocity')"
:target="current_velocity"
:max="max_velocity"
:default-value="max_velocity"
unit="mm/s"
attribute-name="VELOCITY"
></machine-limits-input>
</v-col>
<v-col class="col-6">
<machine-limits-input
:label="$t('Machine.LimitsPanel.SquareCornerVelocity')"
:target="current_square_corner_velocity"
:max="max_square_corner_velocity"
:default-value="max_square_corner_velocity"
unit="mm/s"
attribute-name="SQUARE_CORNER_VELOCITY"
></machine-limits-input>
</v-col>
</v-row>
<v-row>
<v-col class="col-6">
<machine-limits-input
:label="$t('Machine.LimitsPanel.Acceleration')"
:target="current_accel"
:max="max_accel"
:default-value="max_accel"
unit="mm/s²"
attribute-name="ACCEL"
></machine-limits-input>
</v-col>
<v-col class="col-6">
<machine-limits-input
:label="$t('Machine.LimitsPanel.Deceleration')"
:target="current_accel_to_decel"
:max="max_accel_to_decel"
:default-value="max_accel_to_decel"
unit="mm/s²"
attribute-name="ACCEL_TO_DECEL"
></machine-limits-input>
</v-col>
</v-row>
</v-card-text>
</panel>
</template>
<script>
import { Component, Mixins } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base.ts'
import ToolSlider from '@/components/inputs/ToolSlider'
import MachineLimitsInput from '@/components/inputs/MachineLimitsInput'
import Panel from '@/components/ui/Panel'
@Component({
components: {Panel, MachineLimitsInput, ToolSlider}
})
export default class LimitsPanel extends Mixins(BaseMixin) {
get current_velocity() {
return this.$store.state.printer?.toolhead?.max_velocity ?? 300
}
get current_accel() {
return this.$store.state.printer?.toolhead?.max_accel ?? 3000
}
get current_accel_to_decel() {
return this.$store.state.printer?.toolhead?.max_accel_to_decel ?? 1500
}
get current_square_corner_velocity() {
return this.$store.state.printer?.toolhead?.square_corner_velocity ?? 8
}
get max_velocity() {
return this.$store.state.printer?.configfile?.settings?.printer?.max_velocity ?? 300
}
get max_accel() {
return this.$store.state.printer?.configfile?.settings?.printer?.max_accel ?? 3000
}
get max_accel_to_decel() {
return this.$store.state.printer?.configfile?.settings?.printer?.max_accel_to_decel ?? 1500
}
get max_square_corner_velocity() {
return this.$store.state.printer?.configfile?.settings?.printer?.square_corner_velocity ?? 8
}
}
</script>