Skip to content

Commit

Permalink
fix: fix output of minimum_cruise_ratio
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou committed Dec 5, 2023
1 parent 4219711 commit ee5f2b5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/panels/MachineSettings/MotionSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ export default class MotionSettings extends Mixins(BaseMixin) {
return Math.trunc(this.$store.state.printer?.toolhead?.max_accel_to_decel ?? this.accel / 2)
}
get minimumCruiseRatio(): number {
return this.$store.state.printer?.toolhead?.minimum_cruise_ratio ?? null
get minimumCruiseRatio(): number | null {
const value = this.$store.state.printer?.toolhead?.minimum_cruise_ratio ?? null
if (value === null) return null
return Math.round(value * 100) / 100
}
get squareCornerVelocity(): number {
Expand Down

0 comments on commit ee5f2b5

Please sign in to comment.