Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/components/widgets/afc/AfcCardUnitLaneActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<v-tooltip top>
<template #activator="{ on, attrs }">
<v-btn
:disabled="toolLoaded || (!laneRunout && toolLoaded)"
:disabled="ejectDisabled"
dense
class="flex-grow-1 px-0 last-btn"
v-bind="attrs"
Expand Down Expand Up @@ -100,6 +100,12 @@ export default class AfcCardUnitLaneActions extends Mixins(StateMixin, AfcMixin,
return this.lane?.tool_loaded === true
}

get ejectDisabled (): boolean {
const mounted = this.lane?.mounted
if (mounted !== undefined) return !mounted
return this.toolLoaded || (!this.laneRunout && this.toolLoaded)
}

loadLane () {
this.sendGcode(`CHANGE_TOOL LANE=${encodeGcodeParamValue(this.name)}`)
}
Expand Down
1 change: 1 addition & 0 deletions src/typings/klipper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@ declare namespace Klipper {
color: string | null;
weight: number;
filament_name?: string;
mounted?: boolean;
extruder_temp: number | null;
runout_lane: string | null;
filament_status: 'In Tool' | 'Ready' | 'Prep' | 'Not Ready';
Expand Down