feature: limit requested_speed wiht current max_velocity
cleanup StatusPanel.vue Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
@@ -133,7 +133,7 @@
|
|||||||
<v-row class="text-center py-5" align="center">
|
<v-row class="text-center py-5" align="center">
|
||||||
<v-col class="col-3 pa-0">
|
<v-col class="col-3 pa-0">
|
||||||
<strong>{{ $t("Panels.StatusPanel.Speed") }}</strong><br />
|
<strong>{{ $t("Panels.StatusPanel.Speed") }}</strong><br />
|
||||||
<span class="text-no-wrap">{{ (requested_speed / 60 * speed_factor).toFixed(0) }} mm/s</span>
|
<span class="text-no-wrap">{{ requested_speed.toFixed(0) }} mm/s</span>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="col-3 pa-0">
|
<v-col class="col-3 pa-0">
|
||||||
<v-tooltip top>
|
<v-tooltip top>
|
||||||
@@ -271,15 +271,12 @@
|
|||||||
position: state => state.printer.gcode_move.position,
|
position: state => state.printer.gcode_move.position,
|
||||||
gcode_position: state => state.printer.gcode_move.gcode_position,
|
gcode_position: state => state.printer.gcode_move.gcode_position,
|
||||||
|
|
||||||
requested_speed: state => state.printer.gcode_move.speed,
|
|
||||||
speed_factor: state => state.printer.gcode_move.speed_factor,
|
|
||||||
filament_used: state => state.printer.print_stats.filament_used,
|
filament_used: state => state.printer.print_stats.filament_used,
|
||||||
current_file: state => state.printer.current_file,
|
current_file: state => state.printer.current_file,
|
||||||
print_time: state => state.printer.print_stats.print_duration,
|
print_time: state => state.printer.print_stats.print_duration,
|
||||||
print_time_total: state => state.printer.print_stats.total_duration,
|
print_time_total: state => state.printer.print_stats.total_duration,
|
||||||
}),
|
}),
|
||||||
printerStateOutput: {
|
printerStateOutput() {
|
||||||
get() {
|
|
||||||
if (this.$store.state.printer.print_stats.state !== "") {
|
if (this.$store.state.printer.print_stats.state !== "") {
|
||||||
const printer_state = this.$store.state.printer.print_stats.state
|
const printer_state = this.$store.state.printer.print_stats.state
|
||||||
|
|
||||||
@@ -296,10 +293,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return this.$t("Panels.StatusPanel.Unknown")
|
return this.$t("Panels.StatusPanel.Unknown")
|
||||||
}
|
|
||||||
},
|
},
|
||||||
toolbarButtons: {
|
toolbarButtons() {
|
||||||
get() {
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
text: this.$t("Panels.StatusPanel.PausePrint"),
|
text: this.$t("Panels.StatusPanel.PausePrint"),
|
||||||
@@ -338,22 +333,26 @@
|
|||||||
click: this.btnReprintJob
|
click: this.btnReprintJob
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
},
|
},
|
||||||
filteredToolbarButtons: {
|
filteredToolbarButtons() {
|
||||||
get() {
|
|
||||||
return this.toolbarButtons.filter((button) => {
|
return this.toolbarButtons.filter((button) => {
|
||||||
return button.status.includes(this.printer_state)
|
return button.status.includes(this.printer_state)
|
||||||
})
|
})
|
||||||
}
|
|
||||||
},
|
},
|
||||||
printPercent: {
|
printPercent() {
|
||||||
get() {
|
return this.$store.getters["printer/getPrintPercent"]
|
||||||
return this.$store.getters["printer/getPrintPercent"];
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
max_layers: {
|
requested_speed() {
|
||||||
get() {
|
const requested_speed = this.$store.state.printer.gcode_move.speed
|
||||||
|
const speed_factor = this.$store.state.printer.gcode_move.speed_factor
|
||||||
|
const max_velocity = this.$store.state.printer.toolhead.max_velocity
|
||||||
|
|
||||||
|
const speed = requested_speed / 60 * speed_factor
|
||||||
|
if (speed > max_velocity) return max_velocity
|
||||||
|
|
||||||
|
return speed
|
||||||
|
},
|
||||||
|
max_layers() {
|
||||||
if (
|
if (
|
||||||
'first_layer_height' in this.current_file &&
|
'first_layer_height' in this.current_file &&
|
||||||
'layer_height' in this.current_file &&
|
'layer_height' in this.current_file &&
|
||||||
@@ -364,10 +363,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
|
||||||
},
|
},
|
||||||
current_layer: {
|
current_layer() {
|
||||||
get() {
|
|
||||||
if (
|
if (
|
||||||
this.print_time > 0 &&
|
this.print_time > 0 &&
|
||||||
'first_layer_height' in this.current_file &&
|
'first_layer_height' in this.current_file &&
|
||||||
@@ -382,45 +379,29 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
|
||||||
},
|
},
|
||||||
estimated_time_file: {
|
estimated_time_file() {
|
||||||
get() {
|
|
||||||
return this.$store.getters["printer/getEstimatedTimeFile"]
|
return this.$store.getters["printer/getEstimatedTimeFile"]
|
||||||
}
|
|
||||||
},
|
},
|
||||||
estimated_time_filament: {
|
estimated_time_filament() {
|
||||||
get() {
|
|
||||||
return this.$store.getters["printer/getEstimatedTimeFilament"]
|
return this.$store.getters["printer/getEstimatedTimeFilament"]
|
||||||
}
|
|
||||||
},
|
},
|
||||||
estimated_time_slicer: {
|
estimated_time_slicer() {
|
||||||
get() {
|
|
||||||
return this.$store.getters["printer/getEstimatedTimeSlicer"]
|
return this.$store.getters["printer/getEstimatedTimeSlicer"]
|
||||||
}
|
|
||||||
},
|
},
|
||||||
estimated_time_avg: {
|
estimated_time_avg() {
|
||||||
get() {
|
|
||||||
return this.$store.getters["printer/getEstimatedTimeAvg"]
|
return this.$store.getters["printer/getEstimatedTimeAvg"]
|
||||||
}
|
|
||||||
},
|
},
|
||||||
eta: {
|
eta() {
|
||||||
get() {
|
|
||||||
return this.$store.getters["printer/getEstimatedTimeETA"]
|
return this.$store.getters["printer/getEstimatedTimeETA"]
|
||||||
}
|
|
||||||
},
|
},
|
||||||
filament_diameter: {
|
filament_diameter() {
|
||||||
get() {
|
|
||||||
return this.$store.state.printer.configfile.settings.extruder?.filament_diameter || 1.75
|
return this.$store.state.printer.configfile.settings.extruder?.filament_diameter || 1.75
|
||||||
}
|
|
||||||
},
|
},
|
||||||
basicUrl: {
|
basicUrl() {
|
||||||
get() {
|
|
||||||
return this.$store.getters["socket/getUrl"]
|
return this.$store.getters["socket/getUrl"]
|
||||||
}
|
|
||||||
},
|
},
|
||||||
thumbnailSmall: {
|
thumbnailSmall() {
|
||||||
get() {
|
|
||||||
if (
|
if (
|
||||||
"thumbnails" in this.current_file &&
|
"thumbnails" in this.current_file &&
|
||||||
this.current_file.thumbnails.length
|
this.current_file.thumbnails.length
|
||||||
@@ -441,10 +422,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
}
|
|
||||||
},
|
},
|
||||||
thumbnailBig: {
|
thumbnailBig() {
|
||||||
get() {
|
|
||||||
if (
|
if (
|
||||||
"thumbnails" in this.current_file &&
|
"thumbnails" in this.current_file &&
|
||||||
this.current_file.thumbnails.length
|
this.current_file.thumbnails.length
|
||||||
@@ -463,7 +442,6 @@
|
|||||||
|
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
btnPauseJob() {
|
btnPauseJob() {
|
||||||
|
Reference in New Issue
Block a user