From 3136dfc0ec1d6dcef35825573f5a888e1119bfbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20J=C3=A4ger?= Date: Fri, 9 Aug 2024 18:13:01 +0200 Subject: [PATCH 1/5] Process M82 and M83 command for Marlin flavoured GCode too --- plugins/GCodeReader/FlavorParser.py | 10 ++++++++-- plugins/GCodeReader/RepRapFlavorParser.py | 8 -------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index 372ee83135..74dbeadec0 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -298,8 +298,14 @@ class FlavorParser: position.e.extend([0] * (self._extruder_number - len(position.e) + 1)) return position - def processMCode(self, M: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> Position: - pass + def processMCode(self, M: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> None: + # Set extrusion mode + if M == 82: + # Set absolute extrusion mode + self._is_absolute_extrusion = True + elif M == 83: + # Set relative extrusion mode + self._is_absolute_extrusion = False _type_keyword = ";TYPE:" _layer_keyword = ";LAYER:" diff --git a/plugins/GCodeReader/RepRapFlavorParser.py b/plugins/GCodeReader/RepRapFlavorParser.py index 10b7b78587..1a80412238 100644 --- a/plugins/GCodeReader/RepRapFlavorParser.py +++ b/plugins/GCodeReader/RepRapFlavorParser.py @@ -11,14 +11,6 @@ class RepRapFlavorParser(FlavorParser.FlavorParser): def __init__(self): super().__init__() - def processMCode(self, M, line, position, path): - if M == 82: - # Set absolute extrusion mode - self._is_absolute_extrusion = True - elif M == 83: - # Set relative extrusion mode - self._is_absolute_extrusion = False - def _gCode90(self, position, params, path): """Set the absolute positioning From 0efa90a2c394765f5eba9167eb34b067829fca6a Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 17 Dec 2024 09:58:03 +0100 Subject: [PATCH 2/5] Fix release-notes file path --- .github/workflows/nightly.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 88352a6452..500e82c7db 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -66,11 +66,10 @@ jobs: )) - name: Update nightly release description and binaries - working-directory: installers run: | gh release edit ${{ inputs.release_tag }} --title "${{ steps.rename-installers.outputs.cura_version }}" --notes-file release-notes.md - for file in "*"; do + for file in "installers/*"; do gh release upload ${{ inputs.release_tag }} $file --clobber done env: From f95d073b1bfc5aef03e095727c7e03cf597fff5b Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 17 Dec 2024 16:21:42 +0100 Subject: [PATCH 3/5] Use common linter workflow --- .github/workflows/printer-linter-format.yml | 43 +++++++-------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/.github/workflows/printer-linter-format.yml b/.github/workflows/printer-linter-format.yml index 9e208f46a4..2b9c592816 100644 --- a/.github/workflows/printer-linter-format.yml +++ b/.github/workflows/printer-linter-format.yml @@ -1,34 +1,19 @@ name: printer-linter-format on: - push: - paths: - - 'resources/definitions/**' - - 'resources/extruders/**' - - 'resources/intent/**' - - 'resources/quality/**' - - 'resources/variants/**' + push: + paths: + - 'resources/definitions/**' + - 'resources/extruders/**' + - 'resources/intent/**' + - 'resources/quality/**' + - 'resources/variants/**' jobs: - printer-linter-format: - name: Printer linter auto format - - runs-on: ubuntu-latest - steps: - - name: Setup the build environment - uses: ultimaker/cura-workflows/.github/actions/setup-build-environment@main - - - uses: greguintow/get-diff-action@v7 - with: - PATTERNS: | - resources/+(definitions|extruders)/*.def.json - resources/+(intent|quality|variants)/**/*.inst.cfg - - - name: Format file - if: env.GIT_DIFF && !env.MATCHED_FILES - run: python printer-linter/src/terminal.py --format ${{ env.GIT_DIFF_FILTERED }} - - - uses: stefanzweifel/git-auto-commit-action@v4 - if: env.GIT_DIFF && !env.MATCHED_FILES - with: - commit_message: "Applied printer-linter format" + printer-linter-format: + name: Printer linter auto format + uses: ultimaker/cura-workflows/.github/workflows/lint-formatter.yml@main + with: + file_patterns: resources/+(definitions|extruders)/*.def.json resources/+(intent|quality|variants)/**/*.inst.cfg + command: python printer-linter/src/terminal.py --format + commit_message: "Apply printer-linter format" From d1932b5bdb81d49da0231574095250758b9fa8a5 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 17 Dec 2024 16:32:24 +0100 Subject: [PATCH 4/5] Fix file patterns syntax, maybe --- .github/workflows/printer-linter-format.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/printer-linter-format.yml b/.github/workflows/printer-linter-format.yml index 2b9c592816..246170c1e4 100644 --- a/.github/workflows/printer-linter-format.yml +++ b/.github/workflows/printer-linter-format.yml @@ -14,6 +14,8 @@ jobs: name: Printer linter auto format uses: ultimaker/cura-workflows/.github/workflows/lint-formatter.yml@main with: - file_patterns: resources/+(definitions|extruders)/*.def.json resources/+(intent|quality|variants)/**/*.inst.cfg + file_patterns: | + resources/+(definitions|extruders)/*.def.json + resources/+(intent|quality|variants)/**/*.inst.cfg command: python printer-linter/src/terminal.py --format commit_message: "Apply printer-linter format" From 5ccb96e07bb9d97663f8be48d9a7224e11c82629 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 18 Dec 2024 09:10:56 +0100 Subject: [PATCH 5/5] Adjust nightly builds tags --- .github/workflows/nightly-stable.yml | 2 +- .github/workflows/nightly-testing.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-stable.yml b/.github/workflows/nightly-stable.yml index f548b81875..e166027dd8 100644 --- a/.github/workflows/nightly-stable.yml +++ b/.github/workflows/nightly-stable.yml @@ -11,6 +11,6 @@ jobs: uses: ./.github/workflows/nightly.yml with: cura_conan_version: "cura/[*]@ultimaker/stable" - release_tag: "nightly" + release_tag: "nightly-stable" caller_workflow: "nightly-stable.yml" secrets: inherit diff --git a/.github/workflows/nightly-testing.yml b/.github/workflows/nightly-testing.yml index 160ad5c46d..c1ccb67f1c 100644 --- a/.github/workflows/nightly-testing.yml +++ b/.github/workflows/nightly-testing.yml @@ -11,6 +11,6 @@ jobs: uses: ./.github/workflows/nightly.yml with: cura_conan_version: "cura/[*]@ultimaker/testing" - release_tag: "nightly-stable" # Fixed version, we reuse the same tag forever + release_tag: "nightly-testing" # Fixed version, we reuse the same tag forever caller_workflow: "nightly-testing.yml" secrets: inherit