Skip to content
Merged
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
19 changes: 19 additions & 0 deletions src/components/widgets/toolhead/ToolheadCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ export default class ToolheadCard extends Mixins(StateMixin, ToolheadMixin) {
this.printerSettings.probe != null ||
this.printerSettings.bltouch != null ||
this.printerSettings.smart_effector != null ||
this.printerSettings.cartographer != null ||
(
this.printerSettings.scanner != null &&
'sensor' in this.printerSettings.scanner &&
Expand All @@ -233,6 +234,10 @@ export default class ToolheadCard extends Mixins(StateMixin, ToolheadMixin) {
)
}

get printerSupportsCartographerCalibrate (): boolean {
return this.printerSettings.cartographer != null
}

get printerSupportsZEndstopCalibrate (): boolean {
return (
this.printerSettings.stepper_z?.position_endstop != null
Expand Down Expand Up @@ -345,6 +350,20 @@ export default class ToolheadCard extends Mixins(StateMixin, ToolheadMixin) {
})
}

if (this.printerSupportsCartographerCalibrate) {
tools.push({
name: 'CARTOGRAPHER_SCAN_CALIBRATE',
disabled: !this.allHomed || this.isManualProbeActive,
wait: this.$waits.onCartographerScanCalibrate
})

tools.push({
name: 'CARTOGRAPHER_TOUCH_CALIBRATE',
disabled: !this.allHomed || this.isManualProbeActive,
wait: this.$waits.onCartographerTouchCalibrate
})
}

if (this.printerSupportsDeltaCalibrate) {
tools.push({
name: 'DELTA_CALIBRATE',
Expand Down
2 changes: 2 additions & 0 deletions src/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,8 @@ export const Waits = Object.freeze({
onDatabaseDeleteBackup: 'onDatabaseDeleteBackup',
onBedScrewsCalculate: 'onBedScrewsCalculate',
onBedTiltCalibrate: 'onBedTiltCalibrate',
onCartographerScanCalibrate: 'onCartographerScanCalibrate',
onCartographerTouchCalibrate: 'onCartographerTouchCalibrate',
onDeltaCalibrate: 'onDeltaCalibrate',
onPrintPause: 'onPrintPause',
onPrintCancel: 'onPrintCancel',
Expand Down
2 changes: 2 additions & 0 deletions src/store/printer/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,8 @@ type KlipperPrinterSettingsBaseType =

beacon: KlipperPrinterBeaconSettings;

cartographer: KlipperPrinterCartographerScannerSettings;

scanner: KlipperPrinterCartographerScannerSettings;

[key: `beacon model ${Lowercase<string>}`]: KlipperPrinterBeaconModelSettings;
Expand Down
Loading