refactor: also allow FILAMENT_LOAD and FILAMENT_UNLOAD macros (#1639)

This commit is contained in:
Stefan Dej authored and GitHub committed 2023-11-03 23:44:54 +01:00
1 parent 049997a01b
commit af547b35fe
1 file changed
+6 -2
@@ -99,11 +99,15 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ControlMixin
}
get loadFilamentMacro(): PrinterStateMacro | undefined {
return this.macros.find((macro: PrinterStateMacro) => macro.name.toUpperCase() === 'LOAD_FILAMENT')
const macros = ['LOAD_FILAMENT', 'FILAMENT_LOAD']
return this.macros.find((macro: PrinterStateMacro) => macros.includes(macro.name.toUpperCase()))
}
get unloadFilamentMacro(): PrinterStateMacro | undefined {
return this.macros.find((macro: PrinterStateMacro) => macro.name.toUpperCase() === 'UNLOAD_FILAMENT')
const macros = ['UNLOAD_FILAMENT', 'FILAMENT_UNLOAD']
return this.macros.find((macro: PrinterStateMacro) => macros.includes(macro.name.toUpperCase()))
}
/**