diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml
new file mode 100644
index 00000000..73b179ae
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug-report.yml
@@ -0,0 +1,84 @@
+name: "ð Bug Report"
+description: Create a new issue for a bug.
+title: "ð [BUG] -
"
+labels: [
+ "bug"
+]
+body:
+ - type: textarea
+ id: description
+ attributes:
+ label: "Description"
+ description: Please enter an explicit description of your issue
+ placeholder: Short and explicit description of your incident...
+ validations:
+ required: true
+ - type: textarea
+ id: reprod
+ attributes:
+ label: "Reproduction steps"
+ description: Please provide steps to reproduce the issue reported
+ placeholder: |
+ 1. Go to '...'
+ 2. Click on '....'
+ 3. Scroll down to '....'
+ 4. See error
+ render: bash
+ validations:
+ required: true
+ - type: textarea
+ id: screenshot
+ attributes:
+ label: "Screenshots"
+ description: If applicable, add screenshots to help explain your problem.
+ placeholder: |
+ ![DESCRIPTION](LINK.png)
+ render: bash
+ validations:
+ required: false
+ - type: textarea
+ id: logs
+ attributes:
+ label: "Logs"
+ description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
+ render: bash
+ validations:
+ required: false
+ - type: dropdown
+ id: printers
+ attributes:
+ label: "Printer"
+ description: What printer are you experiencing the issue with?
+ multiple: true
+ options:
+ - FlashForge Dreamer
+ - FlashForge DreamerNX
+ - FlashForge Inventor
+ - Dremel 3D20
+ - Powerspec Ultra 3D
+ - Monoprice Inventor 1
+ validations:
+ required: true
+ - type: textarea
+ id: fwversion
+ attributes:
+ label: "Marlin Version"
+ description: What version of Marlin Firmware are you experiencing the issue with?
+ placeholder: ex. 2.1.2, v0.15.1, etc.
+ validations:
+ required: true
+
+ - type: dropdown
+ id: fwfeatures
+ attributes:
+ label: "Marlin Features"
+ description: What features are enabled for the build you are experiencing the issue with? (if any)
+ multiple: true
+ options:
+ - swap
+ - dir
+ - la
+ - mks
+ - classic
+ validations:
+ required: false
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 00000000..ec4bb386
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1 @@
+blank_issues_enabled: false
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml
new file mode 100644
index 00000000..1c0c4c67
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature-request.yml
@@ -0,0 +1,31 @@
+name: "ð¡ Feature Request"
+description: Create a new issue for a feature request
+title: "ð¡ [REQUEST] - "
+labels: [
+ "enhancement"
+]
+body:
+ - type: textarea
+ id: reference_issues
+ attributes:
+ label: "Reference Issues"
+ description: Issues that relate to your request (if any)
+ placeholder: "#Issues IDs"
+ validations:
+ required: false
+ - type: textarea
+ id: summary
+ attributes:
+ label: "Summary"
+ description: Provide a brief explanation of the requested feature
+ placeholder: Describe in a few lines your feature request
+ validations:
+ required: true
+ - type: textarea
+ id: basic_example
+ attributes:
+ label: "Basic Example"
+ description: Indicate here some basic examples of your feature.
+ placeholder: A few specific words about your feature request.
+ validations:
+ required: true
\ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 00000000..b7bcc586
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,38 @@
+## What type of PR is this? (check all applicable)
+
+- [ ] Refactor
+- [ ] Feature
+- [ ] Bug Fix
+- [ ] Optimization
+- [ ] Documentation Update
+
+## Description
+
+## Related Tickets & Documents
+
+
+
+- Related Issue #
+- Closes #
+
+## QA Instructions, Screenshots, Recordings
+
+_Please replace this line with instructions on how to test your changes, a note
+on the devices and browsers this has been tested on, as well as any relevant
+images for UI changes._
+
+## Added/updated tests?
+
+- [ ] Yes
+- [ ] No, and this is why: _please replace this line with details on why tests
+ have not been included_
+- [ ] I need help with writing tests
+
+## [optional] Are there any post deployment tasks we need to perform?
\ No newline at end of file
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..cd8e6383
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,467 @@
+name: Build
+
+on:
+ workflow_dispatch:
+ pull_request:
+ types: [opened, reopened]
+
+jobs:
+ build:
+ name: Build Marlin Binaries
+ runs-on: ubuntu-latest
+ steps:
+ - name: Set Timestamp to Current Build Environment Date
+ id: date
+ run: echo "timestamp=$(date +'%m%d%Y')" >> $GITHUB_OUTPUT
+
+ - name: Checkout Code
+ uses: actions/checkout@v3
+ with:
+ submodules: recursive
+
+ - uses: actions/cache@v3
+ with:
+ path: |
+ ~/.cache/pip
+ ~/.platformio/.cache
+ key: ${{ runner.os }}-pio
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '3.9'
+ - name: Install PlatformIO Core
+ run: pip install --upgrade platformio
+
+ - name: Build FlashForge Firmware Tool
+ id: ff_fw_tool
+ run: |
+ gcc $FW_TOOL_SRC_DIR/main.c -o $FW_TOOL_SRC_DIR/ff_fw_tool
+ echo "fw_tool=$FW_TOOL_SRC_DIR/ff_fw_tool" >> $GITHUB_OUTPUT
+ env:
+ FW_TOOL_SRC_DIR: flashforge_firmware_tool
+
+ - name: Set Persistent Firmware Variables
+ id: firmware
+ run: |
+ echo "project_dir=Marlin" >> $GITHUB_OUTPUT
+ echo "build_env=FF_F407ZG" >> $GITHUB_OUTPUT
+ echo "fw_version=$(awk '/fine SHORT_BUILD_VERSION/{ print substr($3,2,length($3)-2) }' Marlin/Marlin/Version.h)" >> $GITHUB_OUTPUT
+ echo "encryption_key=flashforge790315" >> $GITHUB_OUTPUT
+ echo "dremel_key=flashforge123456" >> $GITHUB_OUTPUT
+ echo "target_ui=color_ui" >> $GITHUB_OUTPUT
+
+ - name: Create Build Directory
+ run: mkdir -p build -v
+
+ # Dreamer Builds
+ - name: Build Marlin - dreamer
+ id: dreamer
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: dreamer
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX:
+ PLATFORMIO_BUILD_FLAGS: -DFF_DREAMER_MACHINE
+
+ - name: Build Marlin - dreamer_dir
+ id: dreamer_dir
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: dreamer
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _dir
+ PLATFORMIO_BUILD_FLAGS: -DFF_DREAMER_MACHINE -DFF_DREAMER_OLD_MB
+
+ - name: Build Marlin - dreamer_dir_la
+ id: dreamer_dir_la
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: dreamer
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _dir_la
+ PLATFORMIO_BUILD_FLAGS: -DFF_DREAMER_MACHINE -DFF_DREAMER_OLD_MB -DLIN_ADVANCE
+
+ - name: Build Marlin - dreamer_dir_swap
+ id: dreamer_dir_swap
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: dreamer
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _dir_swap
+ PLATFORMIO_BUILD_FLAGS: -DFF_DREAMER_MACHINE -DFF_DREAMER_OLD_MB -DFF_EXTRUDER_SWAP
+
+ - name: Build Marlin - dreamer_dir_swap_la
+ id: dreamer_dir_swap_la
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: dreamer
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _dir_swap_la
+ PLATFORMIO_BUILD_FLAGS: -DFF_DREAMER_MACHINE -DFF_DREAMER_OLD_MB -DFF_EXTRUDER_SWAP -DLIN_ADVANCE
+
+ - name: Build Marlin - dreamer_la
+ id: dreamer_la
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: dreamer
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _la
+ PLATFORMIO_BUILD_FLAGS: -DFF_DREAMER_MACHINE -DLIN_ADVANCE
+
+ - name: Build Marlin - dreamer_swap
+ id: dreamer_swap
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: dreamer
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _swap
+ PLATFORMIO_BUILD_FLAGS: -DFF_DREAMER_MACHINE -DFF_EXTRUDER_SWAP
+
+ - name: Build Marlin - dreamer_swap_la
+ id: dreamer_swap_la
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: dreamer
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _swap_la
+ PLATFORMIO_BUILD_FLAGS: -DFF_DREAMER_MACHINE -DFF_EXTRUDER_SWAP -DLIN_ADVANCE
+
+ # Dremel Builds
+ - name: Build Marlin - dremel
+ id: dremel
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: dremel
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.dremel_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX:
+ PLATFORMIO_BUILD_FLAGS: -DFF_DREMEL_3D20_MACHINE
+
+ - name: Build Marlin - dremel_la
+ id: dremel_la
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: dremel
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.dremel_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _la
+ PLATFORMIO_BUILD_FLAGS: -DFF_DREMEL_3D20_MACHINE -DLIN_ADVANCE
+
+ # Inventor Builds
+ - name: Build Marlin - inventor
+ id: inventor
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: inventor
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX:
+ PLATFORMIO_BUILD_FLAGS: -DFF_INVENTOR_MACHINE
+
+ - name: Build Marlin - inventor_dir
+ id: inventor_dir
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: inventor
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _dir
+ PLATFORMIO_BUILD_FLAGS: -DFF_INVENTOR_MACHINE -DFF_DREAMER_OLD_MB
+
+ - name: Build Marlin - inventor_dir_la
+ id: inventor_dir_la
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: inventor
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _dir_la
+ PLATFORMIO_BUILD_FLAGS: -DFF_INVENTOR_MACHINE -DFF_DREAMER_OLD_MB -DLIN_ADVANCE
+
+ - name: Build Marlin - inventor_dir_swap
+ id: inventor_dir_swap
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: inventor
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _dir_swap
+ PLATFORMIO_BUILD_FLAGS: -DFF_INVENTOR_MACHINE -DFF_DREAMER_OLD_MB -DFF_EXTRUDER_SWAP
+
+ - name: Build Marlin - inventor_dir_swap_la
+ id: inventor_dir_swap_la
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: inventor
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _dir_swap_la
+ PLATFORMIO_BUILD_FLAGS: -DFF_INVENTOR_MACHINE -DFF_DREAMER_OLD_MB -DFF_EXTRUDER_SWAP -DLIN_ADVANCE
+
+ - name: Build Marlin - inventor_la
+ id: inventor_la
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: inventor
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _la
+ PLATFORMIO_BUILD_FLAGS: -DFF_INVENTOR_MACHINE -DLIN_ADVANCE
+
+ - name: Build Marlin - inventor_swap
+ id: inventor_swap
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: inventor
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _swap
+ PLATFORMIO_BUILD_FLAGS: -DFF_INVENTOR_MACHINE -DFF_EXTRUDER_SWAP
+
+ - name: Build Marlin - inventor_swap_la
+ id: inventor_swap_la
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: inventor
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _swap_la
+ PLATFORMIO_BUILD_FLAGS: -DFF_INVENTOR_MACHINE -DFF_EXTRUDER_SWAP -DLIN_ADVANCE
+
+ # DreamerNX Builds
+ - name: Build Marlin - nx
+ id: nx
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: nx
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX:
+ PLATFORMIO_BUILD_FLAGS: -DFF_DREAMER_NX_MACHINE
+
+ - name: Build Marlin - nx_la
+ id: nx_la
+ run: |
+ echo "Build Environment:" $BUILD_ENV
+ echo "Build Flags:" $PLATFORMIO_BUILD_FLAGS
+ pio run --project-dir $PROJECT_DIR -e $BUILD_ENV --silent
+ ./$FF_FW_TOOL -k $KEY -e -i $FW_PATH/firmware.bin -o build/$MACHINE"_"$VERSION$NAME_POSTFIX"_"$TIMESTAMP".bin"
+ rm -rf $FW_PATH/*
+ env:
+ MACHINE: nx
+ PROJECT_DIR: ${{ steps.firmware.outputs.project_dir }}
+ BUILD_ENV: ${{ steps.firmware.outputs.build_env }}
+ FF_FW_TOOL: ${{ steps.ff_fw_tool.outputs.fw_tool }}
+ KEY: ${{ steps.firmware.outputs.encryption_key }}
+ FW_PATH: ${{ steps.firmware.outputs.project_dir }}/.pio/build/${{ steps.firmware.outputs.build_env }}
+ VERSION: ${{ steps.firmware.outputs.fw_version }}
+ TIMESTAMP: ${{ steps.date.outputs.timestamp }}
+ NAME_POSTFIX: _la
+ PLATFORMIO_BUILD_FLAGS: -DFF_DREAMER_NX_MACHINE -DLIN_ADVANCE
+
+ - name: Display Finished Builds
+ run: find build/ -name "*.bin"
+
+ - name: Upload Binaries Artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: marlin_${{ steps.firmware.outputs.fw_version }}_${{ steps.firmware.outputs.target_ui }}_${{ steps.date.outputs.timestamp }}
+ path: build/*.bin
+ retention-days: 5
diff --git a/Marlin/.devcontainer/Dockerfile b/Marlin/.devcontainer/Dockerfile
new file mode 100644
index 00000000..4f29a100
--- /dev/null
+++ b/Marlin/.devcontainer/Dockerfile
@@ -0,0 +1,29 @@
+# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/python-3/.devcontainer/base.Dockerfile
+
+# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6
+ARG VARIANT="3.9.0-buster"
+FROM python:${VARIANT}
+
+# [Option] Install Node.js
+ARG INSTALL_NODE="true"
+ARG NODE_VERSION="lts/*"
+RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
+
+# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
+# COPY requirements.txt /tmp/pip-tmp/
+# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
+# && rm -rf /tmp/pip-tmp
+
+# [Optional] Uncomment this section to install additional OS packages.
+# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
+# && apt-get -y install --no-install-recommends
+
+# [Optional] Uncomment this line to install global node packages.
+# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1
+
+
+RUN pip install -U https://github.com/platformio/platformio-core/archive/develop.zip
+RUN platformio update
+# To get the test platforms
+RUN pip install PyYaml
+#ENV PATH /code/buildroot/bin/:/code/buildroot/tests/:${PATH}
diff --git a/Marlin/.devcontainer/devcontainer.json b/Marlin/.devcontainer/devcontainer.json
new file mode 100644
index 00000000..54627d46
--- /dev/null
+++ b/Marlin/.devcontainer/devcontainer.json
@@ -0,0 +1,51 @@
+// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
+// https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/python-3
+{
+ "name": "Python 3",
+ "build": {
+ "dockerfile": "Dockerfile",
+ "context": "..",
+ "args": {
+ // Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9
+ "VARIANT": "3.9.0-buster",
+ // Options
+ "INSTALL_NODE": "false",
+ "NODE_VERSION": "lts/*"
+ }
+ },
+
+ // Set *default* container specific settings.json values on container create.
+ "settings": {
+ "python.pythonPath": "/usr/local/bin/python",
+ "python.languageServer": "Pylance",
+ "python.linting.enabled": true,
+ "python.linting.pylintEnabled": true,
+ "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
+ "python.formatting.blackPath": "/usr/local/py-utils/bin/black",
+ "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
+ "python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
+ "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
+ "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
+ "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
+ "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
+ "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
+ },
+
+ // Add the IDs of extensions you want installed when the container is created.
+ "extensions": [
+ "ms-python.python",
+ "ms-python.vscode-pylance",
+ "platformio.platformio-ide",
+ "marlinfirmware.auto-build",
+ "editorconfig.editorconfig"
+ ],
+
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
+ // "forwardPorts": [],
+
+ // Use 'postCreateCommand' to run commands after the container is created.
+ // "postCreateCommand": "pip3 install --user -r requirements.txt",
+
+ // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
+ // "remoteUser": "vscode"
+}
diff --git a/Marlin/.gitignore b/Marlin/.gitignore
index 09db3442..a7f8a091 100644
--- a/Marlin/.gitignore
+++ b/Marlin/.gitignore
@@ -21,35 +21,18 @@
# Generated files
_Version.h
-bdf2u8g
+bdf2u8g.exe
+genpages.exe
marlin_config.json
mczip.h
*.gen
*.sublime-workspace
-#
# OS
-#
applet/
.DS_Store
-#
-# Misc
-#
-*~
-*.orig
-*.rej
-*.bak
-*.idea
-*.i
-*.ii
-*.swp
-tags
-
-#
-# C++
-#
-# Compiled Object files
+# Compiled C++ Object files
*.slo
*.lo
*.o
@@ -80,10 +63,7 @@ tags
*.out
*.app
-#
-# C
-#
-# Object files
+# Compiled C Object files
*.o
*.ko
*.obj
@@ -143,13 +123,13 @@ vc-fileutils.settings
.vscode/*
!.vscode/extensions.json
-#Simulation
+# Simulation files
imgui.ini
eeprom.dat
spi_flash.bin
fs.img
-#cmake
+# CMake
CMakeLists.txt
src/CMakeLists.txt
CMakeListsPrivate.txt
@@ -170,3 +150,16 @@ __pycache__
# IOLogger logs
*_log.csv
+
+# Misc.
+*~
+*.orig
+*.rej
+*.bak
+*.idea
+*.i
+*.ii
+*.swp
+tags
+*.logs
+*.bak
diff --git a/Marlin/Makefile b/Marlin/Makefile
index d0495dc7..2a18c0b4 100644
--- a/Marlin/Makefile
+++ b/Marlin/Makefile
@@ -1,11 +1,16 @@
+SCRIPTS_DIR := buildroot/share/scripts
+CONTAINER_RT_BIN := docker
+CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio
+CONTAINER_IMAGE := marlin-dev
+
help:
@echo "Tasks for local development:"
@echo "* tests-single-ci: Run a single test from inside the CI"
@echo "* tests-single-local: Run a single test locally"
- @echo "* tests-single-local-docker: Run a single test locally, using docker-compose"
+ @echo "* tests-single-local-docker: Run a single test locally, using docker"
@echo "* tests-all-local: Run all tests locally"
- @echo "* tests-all-local-docker: Run all tests locally, using docker-compose"
- @echo "* setup-local-docker: Setup local docker-compose"
+ @echo "* tests-all-local-docker: Run all tests locally, using docker"
+ @echo "* setup-local-docker: Build the local docker image"
@echo ""
@echo "Options for testing:"
@echo " TEST_TARGET Set when running tests-single-*, to select the"
@@ -34,19 +39,21 @@ tests-single-local:
tests-single-local-docker:
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET= or use make tests-all-local-docker" ; return 1; fi
- docker-compose run --rm marlin $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
+ @if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
+ $(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
.PHONY: tests-single-local-docker
tests-all-local:
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
- && for TEST_TARGET in $$(./get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
+ && for TEST_TARGET in $$($(SCRIPTS_DIR)/get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
.PHONY: tests-all-local
tests-all-local-docker:
- docker-compose run --rm marlin $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
+ @if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
+ $(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
.PHONY: tests-all-local-docker
setup-local-docker:
- docker-compose build
+ $(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) -f docker/Dockerfile .
.PHONY: setup-local-docker
diff --git a/Marlin/Marlin/Configuration.h b/Marlin/Marlin/Configuration.h
index c85301ac..6b67ad12 100644
--- a/Marlin/Marlin/Configuration.h
+++ b/Marlin/Marlin/Configuration.h
@@ -73,7 +73,7 @@
*
* Advanced settings can be found in Configuration_adv.h
*/
-#define CONFIGURATION_H_VERSION 02010200
+#define CONFIGURATION_H_VERSION 02010201
//===========================================================================
//============================= Getting Started =============================
@@ -290,24 +290,6 @@
//#define SINGLENOZZLE_STANDBY_FAN
#endif
-// @section multi-material
-
-/**
- * Multi-Material Unit
- * Set to one of these predefined models:
- *
- * PRUSA_MMU1 : Průša MMU1 (The "multiplexer" version)
- * PRUSA_MMU2 : Průša MMU2
- * PRUSA_MMU2S : Průša MMU2S (Requires MK3S extruder with motion sensor, EXTRUDERS = 5)
- * EXTENDABLE_EMU_MMU2 : MMU with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
- * EXTENDABLE_EMU_MMU2S : MMUS with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
- *
- * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
- * See additional options in Configuration_adv.h.
- * :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"]
- */
-//#define MMU_MODEL PRUSA_MMU2
-
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -448,6 +430,24 @@
//#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle
//#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle
+// @section multi-material
+
+/**
+ * Multi-Material Unit
+ * Set to one of these predefined models:
+ *
+ * PRUSA_MMU1 : Průša MMU1 (The "multiplexer" version)
+ * PRUSA_MMU2 : Průša MMU2
+ * PRUSA_MMU2S : Průša MMU2S (Requires MK3S extruder with motion sensor, EXTRUDERS = 5)
+ * EXTENDABLE_EMU_MMU2 : MMU with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
+ * EXTENDABLE_EMU_MMU2S : MMUS with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware)
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * See additional options in Configuration_adv.h.
+ * :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"]
+ */
+//#define MMU_MODEL PRUSA_MMU2
+
// @section psu control
/**
@@ -722,8 +722,13 @@
#if ENABLED(PIDTEMP)
//#define PID_DEBUG // Print PID debug data to the serial port. Use 'M303 D' to toggle activation.
- #define PID_PARAMS_PER_HOTEND // Use separate PID parameters for each extruder (useful for mismatched extruders)
- // Set/get with G-code: M301 E[extruder number, 0-2]
+ #if EXTRUDERS > 1 // We want seperate PID params per hotend, but only if there is more than 1 extruder (obviously!)
+ #define PID_PARAMS_PER_HOTEND // Use separate PID parameters for each extruder (useful for mismatched extruders)
+ #else // Set/get with G-code: M301 E[extruder number, 0-2]
+ #define DEFAULT_Kp 34.22
+ #define DEFAULT_Ki 2.19
+ #define DEFAULT_Kd 133.48
+ #endif
#if ENABLED(PID_PARAMS_PER_HOTEND)
// Specify up to one value per hotend here, according to your setup.
@@ -733,9 +738,9 @@
#define DEFAULT_Kd_LIST { 133.48, 133.48 }
#endif
#else
- #define DEFAULT_Kp 33.00
- #define DEFAULT_Ki 2.25
- #define DEFAULT_Kd 106.70
+ #define DEFAULT_Kp 34.22
+ #define DEFAULT_Ki 2.19
+ #define DEFAULT_Kd 133.48
#endif
/**
@@ -2800,7 +2805,7 @@
//
// Elefu RA Board Control Panel
-// http://www.elefu.com/index.php?route=product/product&product_id=53
+// https://web.archive.org/web/20140823033947/http://www.elefu.com/index.php?route=product/product&product_id=53
//
//#define RA_CONTROL_PANEL
diff --git a/Marlin/Marlin/Configuration_adv.h b/Marlin/Marlin/Configuration_adv.h
index 72c2c0c8..1db368ed 100644
--- a/Marlin/Marlin/Configuration_adv.h
+++ b/Marlin/Marlin/Configuration_adv.h
@@ -30,7 +30,7 @@
*
* Basic settings can be found in Configuration.h
*/
-#define CONFIGURATION_ADV_H_VERSION 02010200
+#define CONFIGURATION_ADV_H_VERSION 02010201
// @section develop
@@ -839,20 +839,20 @@
//#define Z_MULTI_ENDSTOPS // Other Z axes have their own endstops
#if ENABLED(Z_MULTI_ENDSTOPS)
#define Z2_USE_ENDSTOP _XMAX_ // Z2 endstop board plug. Don't forget to enable USE_*_PLUG.
- #define Z2_ENDSTOP_ADJUSTMENT 0 // Z2 offset relative to Y endstop
+ #define Z2_ENDSTOP_ADJUSTMENT 0 // Z2 offset relative to Z endstop
#endif
#ifdef Z3_DRIVER_TYPE
//#define INVERT_Z3_VS_Z_DIR // Z3 direction signal is the opposite of Z
#if ENABLED(Z_MULTI_ENDSTOPS)
#define Z3_USE_ENDSTOP _YMAX_ // Z3 endstop board plug. Don't forget to enable USE_*_PLUG.
- #define Z3_ENDSTOP_ADJUSTMENT 0 // Z3 offset relative to Y endstop
+ #define Z3_ENDSTOP_ADJUSTMENT 0 // Z3 offset relative to Z endstop
#endif
#endif
#ifdef Z4_DRIVER_TYPE
//#define INVERT_Z4_VS_Z_DIR // Z4 direction signal is the opposite of Z
#if ENABLED(Z_MULTI_ENDSTOPS)
#define Z4_USE_ENDSTOP _ZMAX_ // Z4 endstop board plug. Don't forget to enable USE_*_PLUG.
- #define Z4_ENDSTOP_ADJUSTMENT 0 // Z4 offset relative to Y endstop
+ #define Z4_ENDSTOP_ADJUSTMENT 0 // Z4 offset relative to Z endstop
#endif
#endif
#endif
diff --git a/Marlin/Marlin/Version.h b/Marlin/Marlin/Version.h
index 3514add5..8287902b 100644
--- a/Marlin/Marlin/Version.h
+++ b/Marlin/Marlin/Version.h
@@ -28,7 +28,7 @@
/**
* Marlin release version identifier
*/
-//#define SHORT_BUILD_VERSION "2.1.2"
+//#define SHORT_BUILD_VERSION "2.1.2.1"
/**
* Verbose version identifier which should contain a reference to the location
@@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
-//#define STRING_DISTRIBUTION_DATE "2022-12-17"
+//#define STRING_DISTRIBUTION_DATE "2023-05-16"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
diff --git a/Marlin/Marlin/src/HAL/AVR/fast_pwm.cpp b/Marlin/Marlin/src/HAL/AVR/fast_pwm.cpp
index d361aaab..0b2b8fd0 100644
--- a/Marlin/Marlin/src/HAL/AVR/fast_pwm.cpp
+++ b/Marlin/Marlin/src/HAL/AVR/fast_pwm.cpp
@@ -23,6 +23,10 @@
#include "../../inc/MarlinConfig.h"
+//#define DEBUG_AVR_FAST_PWM
+#define DEBUG_OUT ENABLED(DEBUG_AVR_FAST_PWM)
+#include "../../core/debug_out.h"
+
struct Timer {
volatile uint8_t* TCCRnQ[3]; // max 3 TCCR registers per timer
volatile uint16_t* OCRnQ[3]; // max 3 OCR registers per timer
@@ -108,12 +112,15 @@ const Timer get_pwm_timer(const pin_t pin) {
}
void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
+ DEBUG_ECHOLNPGM("set_pwm_frequency(pin=", pin, ", freq=", f_desired, ")");
const Timer timer = get_pwm_timer(pin);
if (timer.isProtected || !timer.isPWM) return; // Don't proceed if protected timer or not recognized
const bool is_timer2 = timer.n == 2;
const uint16_t maxtop = is_timer2 ? 0xFF : 0xFFFF;
+ DEBUG_ECHOLNPGM("maxtop=", maxtop);
+
uint16_t res = 0xFF; // resolution (TOP value)
uint8_t j = CS_NONE; // prescaler index
uint8_t wgm = WGM_PWM_PC_8; // waveform generation mode
@@ -121,23 +128,29 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
// Calculating the prescaler and resolution to use to achieve closest frequency
if (f_desired != 0) {
constexpr uint16_t prescaler[] = { 1, 8, (32), 64, (128), 256, 1024 }; // (*) are Timer 2 only
- uint16_t f = (F_CPU) / (2 * 1024 * maxtop) + 1; // Start with the lowest non-zero frequency achievable (1 or 31)
+ uint16_t f = (F_CPU) / (uint32_t(maxtop) << 11) + 1; // Start with the lowest non-zero frequency achievable (for 16MHz, 1 or 31)
+ DEBUG_ECHOLNPGM("f=", f);
+ DEBUG_ECHOLNPGM("(prescaler loop)");
LOOP_L_N(i, COUNT(prescaler)) { // Loop through all prescaler values
- const uint16_t p = prescaler[i];
+ const uint32_t p = prescaler[i]; // Extend to 32 bits for calculations
+ DEBUG_ECHOLNPGM("prescaler[", i, "]=", p);
uint16_t res_fast_temp, res_pc_temp;
if (is_timer2) {
#if ENABLED(USE_OCR2A_AS_TOP) // No resolution calculation for TIMER2 unless enabled USE_OCR2A_AS_TOP
const uint16_t rft = (F_CPU) / (p * f_desired);
res_fast_temp = rft - 1;
res_pc_temp = rft / 2;
+ DEBUG_ECHOLNPGM("(Timer2) res_fast_temp=", res_fast_temp, " res_pc_temp=", res_pc_temp);
#else
res_fast_temp = res_pc_temp = maxtop;
+ DEBUG_ECHOLNPGM("(Timer2) res_fast_temp=", maxtop, " res_pc_temp=", maxtop);
#endif
}
else {
if (p == 32 || p == 128) continue; // Skip TIMER2 specific prescalers when not TIMER2
const uint16_t rft = (F_CPU) / (p * f_desired);
+ DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=" STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
res_fast_temp = rft - 1;
res_pc_temp = rft / 2;
}
@@ -147,23 +160,27 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
// Calculate frequencies of test prescaler and resolution values
const uint16_t f_fast_temp = (F_CPU) / (p * (1 + res_fast_temp)),
- f_pc_temp = (F_CPU) / (2 * p * res_pc_temp);
- const int f_diff = _MAX(f, f_desired) - _MIN(f, f_desired),
+ f_pc_temp = (F_CPU) / ((p * res_pc_temp) << 1),
+ f_diff = _MAX(f, f_desired) - _MIN(f, f_desired),
f_fast_diff = _MAX(f_fast_temp, f_desired) - _MIN(f_fast_temp, f_desired),
f_pc_diff = _MAX(f_pc_temp, f_desired) - _MIN(f_pc_temp, f_desired);
+ DEBUG_ECHOLNPGM("f_fast_temp=", f_fast_temp, " f_pc_temp=", f_pc_temp, " f_diff=", f_diff, " f_fast_diff=", f_fast_diff, " f_pc_diff=", f_pc_diff);
+
if (f_fast_diff < f_diff && f_fast_diff <= f_pc_diff) { // FAST values are closest to desired f
// Set the Wave Generation Mode to FAST PWM
wgm = is_timer2 ? uint8_t(TERN(USE_OCR2A_AS_TOP, WGM2_FAST_PWM_OCR2A, WGM2_FAST_PWM)) : uint8_t(WGM_FAST_PWM_ICRn);
// Remember this combination
f = f_fast_temp; res = res_fast_temp; j = i + 1;
+ DEBUG_ECHOLNPGM("(FAST) updated f=", f);
}
else if (f_pc_diff < f_diff) { // PHASE CORRECT values are closes to desired f
// Set the Wave Generation Mode to PWM PHASE CORRECT
wgm = is_timer2 ? uint8_t(TERN(USE_OCR2A_AS_TOP, WGM2_PWM_PC_OCR2A, WGM2_PWM_PC)) : uint8_t(WGM_PWM_PC_ICRn);
f = f_pc_temp; res = res_pc_temp; j = i + 1;
+ DEBUG_ECHOLNPGM("(PHASE) updated f=", f);
}
- }
+ } // prescaler loop
}
_SET_WGMnQ(timer, wgm);
diff --git a/Marlin/Marlin/src/HAL/AVR/fastio.h b/Marlin/Marlin/src/HAL/AVR/fastio.h
index 612ab902..8a5e4650 100644
--- a/Marlin/Marlin/src/HAL/AVR/fastio.h
+++ b/Marlin/Marlin/src/HAL/AVR/fastio.h
@@ -293,11 +293,11 @@ enum ClockSource2 : uint8_t {
#if HAS_MOTOR_CURRENT_PWM
#if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
- #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_E0 || P == MOTOR_CURRENT_PWM_E1 || P == MOTOR_CURRENT_PWM_Z || P == MOTOR_CURRENT_PWM_XY)
+ #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E_PIN || P == MOTOR_CURRENT_PWM_E0_PIN || P == MOTOR_CURRENT_PWM_E1_PIN || P == MOTOR_CURRENT_PWM_Z_PIN || P == MOTOR_CURRENT_PWM_XY_PIN)
#elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
- #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_E0 || P == MOTOR_CURRENT_PWM_E1 || P == MOTOR_CURRENT_PWM_Z)
+ #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E_PIN || P == MOTOR_CURRENT_PWM_E0_PIN || P == MOTOR_CURRENT_PWM_E1_PIN || P == MOTOR_CURRENT_PWM_Z_PIN)
#else
- #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_E0 || P == MOTOR_CURRENT_PWM_E1)
+ #define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E_PIN || P == MOTOR_CURRENT_PWM_E0_PIN || P == MOTOR_CURRENT_PWM_E1_PIN)
#endif
#else
#define PWM_CHK_MOTOR_CURRENT(P) false
diff --git a/Marlin/Marlin/src/HAL/AVR/fastio/fastio_1280.h b/Marlin/Marlin/src/HAL/AVR/fastio/fastio_1280.h
index f482f823..e6ecbabb 100644
--- a/Marlin/Marlin/src/HAL/AVR/fastio/fastio_1280.h
+++ b/Marlin/Marlin/src/HAL/AVR/fastio/fastio_1280.h
@@ -27,6 +27,9 @@
* Hardware Pin : 02 03 06 07 01 05 15 16 17 18 23 24 25 26 64 63 13 12 46 45 44 43 78 77 76 75 74 73 72 71 60 59 58 57 56 55 54 53 50 70 52 51 42 41 40 39 38 37 36 35 22 21 20 19 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 | 04 08 09 10 11 14 27 28 29 30 31 32 33 34 47 48 49 61 62 65 66 67 68 69 79 80 81 98 99 100
* Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx
* Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx
+ *
+ * Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
+ * AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
#include "../fastio.h"
diff --git a/Marlin/Marlin/src/HAL/AVR/fastio/fastio_1281.h b/Marlin/Marlin/src/HAL/AVR/fastio/fastio_1281.h
index e0bc5e29..81258622 100644
--- a/Marlin/Marlin/src/HAL/AVR/fastio/fastio_1281.h
+++ b/Marlin/Marlin/src/HAL/AVR/fastio/fastio_1281.h
@@ -26,6 +26,9 @@
*
* Logical Pin: 38 39 40 41 42 43 44 45 16 10 11 12 06 07 08 09 30 31 32 33 34 35 36 37 17 18 19 20 21 22 23 24 00 01 13 05 02 03 14 15 46 47 48 49 50 51 52 53 25 26 27 28 29 04
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
+ *
+ * Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
+ * AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
#include "../fastio.h"
diff --git a/Marlin/Marlin/src/HAL/AVR/fastio/fastio_168.h b/Marlin/Marlin/src/HAL/AVR/fastio/fastio_168.h
index 8cfdd1e8..4f591b37 100644
--- a/Marlin/Marlin/src/HAL/AVR/fastio/fastio_168.h
+++ b/Marlin/Marlin/src/HAL/AVR/fastio/fastio_168.h
@@ -26,6 +26,9 @@
*
* Logical Pin: 08 09 10 11 12 13 14 15 16 17 18 19 20 21 00 01 02 03 04 05 06 07
* Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
+ *
+ * Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
+ * AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
#include "../fastio.h"
diff --git a/Marlin/Marlin/src/HAL/AVR/fastio/fastio_644.h b/Marlin/Marlin/src/HAL/AVR/fastio/fastio_644.h
index f4a9427e..16bdc6a2 100644
--- a/Marlin/Marlin/src/HAL/AVR/fastio/fastio_644.h
+++ b/Marlin/Marlin/src/HAL/AVR/fastio/fastio_644.h
@@ -26,6 +26,9 @@
*
* Logical Pin: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
* Port: B0 B1 B2 B3 B4 B5 B6 B7 D0 D1 D2 D3 D4 D5 D6 D7 C0 C1 C2 C3 C4 C5 C6 C7 A7 A6 A5 A4 A3 A2 A1 A0
+ *
+ * Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
+ * AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
/** ATMega644
diff --git a/Marlin/Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h b/Marlin/Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h
index 51d400b7..d2a8aca6 100644
--- a/Marlin/Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h
+++ b/Marlin/Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h
@@ -27,6 +27,9 @@
* Logical Pin: 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
+ *
+ * Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
+ * AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
#include "../fastio.h"
diff --git a/Marlin/Marlin/src/HAL/AVR/inc/Conditionals_LCD.h b/Marlin/Marlin/src/HAL/AVR/inc/Conditionals_LCD.h
index a611ccd7..5f1c4b16 100644
--- a/Marlin/Marlin/src/HAL/AVR/inc/Conditionals_LCD.h
+++ b/Marlin/Marlin/src/HAL/AVR/inc/Conditionals_LCD.h
@@ -20,7 +20,3 @@
*
*/
#pragma once
-
-#if HAS_SPI_TFT || HAS_FSMC_TFT
- #error "Sorry! TFT displays are not available for HAL/AVR."
-#endif
diff --git a/Marlin/Marlin/src/HAL/AVR/inc/SanityCheck.h b/Marlin/Marlin/src/HAL/AVR/inc/SanityCheck.h
index ff1610f7..e66de960 100644
--- a/Marlin/Marlin/src/HAL/AVR/inc/SanityCheck.h
+++ b/Marlin/Marlin/src/HAL/AVR/inc/SanityCheck.h
@@ -25,6 +25,10 @@
* Test AVR-specific configuration values for errors at compile-time.
*/
+#if HAS_SPI_TFT || HAS_FSMC_TFT
+ #error "Sorry! TFT displays are not available for HAL/AVR."
+#endif
+
/**
* Check for common serial pin conflicts
*/
diff --git a/Marlin/Marlin/src/HAL/AVR/math.h b/Marlin/Marlin/src/HAL/AVR/math.h
index 7dd1018f..34f859fb 100644
--- a/Marlin/Marlin/src/HAL/AVR/math.h
+++ b/Marlin/Marlin/src/HAL/AVR/math.h
@@ -27,13 +27,14 @@
// intRes = longIn1 * longIn2 >> 24
// uses:
-// A[tmp] to store 0
-// B[tmp] to store bits 16-23 of the 48bit result. The top bit is used to round the two byte result.
-// note that the lower two bytes and the upper byte of the 48bit result are not calculated.
-// this can cause the result to be out by one as the lower bytes may cause carries into the upper ones.
-// B A are bits 24-39 and are the returned value
-// C B A is longIn1
-// D C B A is longIn2
+// r1, r0 for the result of mul.
+// [tmp1] to store 0.
+// [tmp2] to store bits 16-23 of the 56 bit result. The top bit of [tmp2] is used for rounding.
+// Note that the lower two bytes and the upper two bytes of the 56 bit result are not calculated.
+// This can cause the result to be out by one as the lower bytes may cause carries into the upper ones.
+// [intRes] (A B) is bits 24-39 and is the returned value.
+// [longIn1] (C B A) is a 24 bit parameter.
+// [longIn2] (D C B A) is a 32 bit parameter.
//
FORCE_INLINE static uint16_t MultiU24X32toH16(uint32_t longIn1, uint32_t longIn2) {
uint8_t tmp1;
@@ -66,11 +67,9 @@ FORCE_INLINE static uint16_t MultiU24X32toH16(uint32_t longIn1, uint32_t longIn2
A("add %[tmp2], r1")
A("adc %A[intRes], %[tmp1]")
A("adc %B[intRes], %[tmp1]")
- A("lsr %[tmp2]")
- A("adc %A[intRes], %[tmp1]")
- A("adc %B[intRes], %[tmp1]")
A("mul %D[longIn2], %A[longIn1]")
- A("add %A[intRes], r0")
+ A("lsl %[tmp2]")
+ A("adc %A[intRes], r0")
A("adc %B[intRes], r1")
A("mul %D[longIn2], %B[longIn1]")
A("add %B[intRes], r0")
@@ -85,11 +84,16 @@ FORCE_INLINE static uint16_t MultiU24X32toH16(uint32_t longIn1, uint32_t longIn2
return intRes;
}
-// intRes = intIn1 * intIn2 >> 16
+// intRes = intIn1 * intIn2 >> 8
// uses:
-// r26 to store 0
-// r27 to store the byte 1 of the 24 bit result
-FORCE_INLINE static uint16_t MultiU16X8toH16(uint8_t charIn1, uint16_t intIn2) {
+// r1, r0 for the result of mul. After the second mul, r0 holds bits 0-7 of the 24 bit result and
+// the top bit of r0 is used for rounding.
+// [tmp] to store 0.
+// [intRes] (A B) is bits 8-15 and is the returned value.
+// [charIn1] is an 8 bit parameter.
+// [intIn2] (B A) is a 16 bit parameter.
+//
+FORCE_INLINE static uint16_t MultiU8X16toH16(uint8_t charIn1, uint16_t intIn2) {
uint8_t tmp;
uint16_t intRes;
__asm__ __volatile__ (
@@ -97,10 +101,8 @@ FORCE_INLINE static uint16_t MultiU16X8toH16(uint8_t charIn1, uint16_t intIn2) {
A("mul %[charIn1], %B[intIn2]")
A("movw %A[intRes], r0")
A("mul %[charIn1], %A[intIn2]")
- A("add %A[intRes], r1")
- A("adc %B[intRes], %[tmp]")
- A("lsr r0")
- A("adc %A[intRes], %[tmp]")
+ A("lsl r0")
+ A("adc %A[intRes], r1")
A("adc %B[intRes], %[tmp]")
A("clr r1")
: [intRes] "=&r" (intRes),
diff --git a/Marlin/Marlin/src/HAL/AVR/pinsDebug.h b/Marlin/Marlin/src/HAL/AVR/pinsDebug.h
index dab4e447..b91bde18 100644
--- a/Marlin/Marlin/src/HAL/AVR/pinsDebug.h
+++ b/Marlin/Marlin/src/HAL/AVR/pinsDebug.h
@@ -64,11 +64,13 @@
#define VALID_PIN(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0)
#if AVR_ATmega1284_FAMILY
- #define DIGITAL_PIN_TO_ANALOG_PIN(P) int(analogInputToDigitalPin(0) - (P))
- #define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(7) && (P) <= analogInputToDigitalPin(0))
+ #define IS_ANALOG(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0))
+ #define DIGITAL_PIN_TO_ANALOG_PIN(P) int(IS_ANALOG(P) ? (P) - analogInputToDigitalPin(7) : -1)
#else
- #define DIGITAL_PIN_TO_ANALOG_PIN(P) int((P) - analogInputToDigitalPin(0))
- #define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(0) && ((P) <= analogInputToDigitalPin(15) || (P) <= analogInputToDigitalPin(7)))
+ #define _ANALOG1(P) WITHIN(P, analogInputToDigitalPin(0), analogInputToDigitalPin(7))
+ #define _ANALOG2(P) WITHIN(P, analogInputToDigitalPin(8), analogInputToDigitalPin(15))
+ #define IS_ANALOG(P) (_ANALOG1(P) || _ANALOG2(P))
+ #define DIGITAL_PIN_TO_ANALOG_PIN(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1)
#endif
#define GET_ARRAY_PIN(p) pgm_read_byte(&pin_array[p].pin)
#define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin
diff --git a/Marlin/Marlin/src/HAL/AVR/timers.h b/Marlin/Marlin/src/HAL/AVR/timers.h
index 33c3880b..d9cdfc4f 100644
--- a/Marlin/Marlin/src/HAL/AVR/timers.h
+++ b/Marlin/Marlin/src/HAL/AVR/timers.h
@@ -44,14 +44,14 @@ typedef uint16_t hal_timer_t;
#define MF_TIMER_TEMP 0
#endif
-#define TEMP_TIMER_FREQUENCY ((F_CPU) / 64.0 / 256.0)
+#define TEMP_TIMER_FREQUENCY (((F_CPU) + 0x2000) / 0x4000)
#define STEPPER_TIMER_RATE HAL_TIMER_RATE
#define STEPPER_TIMER_PRESCALE 8
-#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // Cannot be of type double
+#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000)
-#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer
-#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
+#define PULSE_TIMER_RATE STEPPER_TIMER_RATE
+#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A)
diff --git a/Marlin/Marlin/src/HAL/DUE/inc/Conditionals_LCD.h b/Marlin/Marlin/src/HAL/DUE/inc/Conditionals_LCD.h
index 58674144..5f1c4b16 100644
--- a/Marlin/Marlin/src/HAL/DUE/inc/Conditionals_LCD.h
+++ b/Marlin/Marlin/src/HAL/DUE/inc/Conditionals_LCD.h
@@ -20,7 +20,3 @@
*
*/
#pragma once
-
-#if HAS_SPI_TFT || HAS_FSMC_TFT
- #error "Sorry! TFT displays are not available for HAL/DUE."
-#endif
diff --git a/Marlin/Marlin/src/HAL/DUE/inc/SanityCheck.h b/Marlin/Marlin/src/HAL/DUE/inc/SanityCheck.h
index 1f5acc36..5f0a05ba 100644
--- a/Marlin/Marlin/src/HAL/DUE/inc/SanityCheck.h
+++ b/Marlin/Marlin/src/HAL/DUE/inc/SanityCheck.h
@@ -25,6 +25,10 @@
* Test Arduino Due specific configuration values for errors at compile-time.
*/
+#if HAS_SPI_TFT || HAS_FSMC_TFT
+ #error "Sorry! TFT displays are not available for HAL/DUE."
+#endif
+
/**
* Check for common serial pin conflicts
*/
@@ -77,7 +81,7 @@
#endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
- #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on DUE."
+ #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/DUE."
#endif
#if HAS_TMC_SW_SERIAL
diff --git a/Marlin/Marlin/src/HAL/ESP32/HAL.cpp b/Marlin/Marlin/src/HAL/ESP32/HAL.cpp
index 29f3be3c..46dd4e76 100644
--- a/Marlin/Marlin/src/HAL/ESP32/HAL.cpp
+++ b/Marlin/Marlin/src/HAL/ESP32/HAL.cpp
@@ -342,16 +342,16 @@ void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v
}
else
pindata.pwm_duty_ticks = duty; // PWM duty count = # of 4µs ticks per full PWM cycle
+
+ return;
}
- else
#endif
- {
- const int8_t cid = get_pwm_channel(pin, PWM_FREQUENCY, PWM_RESOLUTION);
- if (cid >= 0) {
- const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, _BV(PWM_RESOLUTION)-1);
- ledcWrite(cid, duty);
- }
- }
+
+ const int8_t cid = get_pwm_channel(pin, PWM_FREQUENCY, PWM_RESOLUTION);
+ if (cid >= 0) {
+ const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, _BV(PWM_RESOLUTION)-1);
+ ledcWrite(cid, duty);
+ }
}
int8_t MarlinHAL::set_pwm_frequency(const pin_t pin, const uint32_t f_desired) {
@@ -360,17 +360,15 @@ int8_t MarlinHAL::set_pwm_frequency(const pin_t pin, const uint32_t f_desired) {
pwm_pin_data[pin & 0x7F].pwm_cycle_ticks = 1000000UL / f_desired / 4; // # of 4µs ticks per full PWM cycle
return 0;
}
- else
#endif
- {
- const int8_t cid = channel_for_pin(pin);
- if (cid >= 0) {
- if (f_desired == ledcReadFreq(cid)) return cid; // no freq change
- ledcDetachPin(chan_pin[cid]);
- chan_pin[cid] = 0; // remove old freq channel
- }
- return get_pwm_channel(pin, f_desired, PWM_RESOLUTION); // try for new one
- }
+
+ const int8_t cid = channel_for_pin(pin);
+ if (cid >= 0) {
+ if (f_desired == ledcReadFreq(cid)) return cid; // no freq change
+ ledcDetachPin(chan_pin[cid]);
+ chan_pin[cid] = 0; // remove old freq channel
+ }
+ return get_pwm_channel(pin, f_desired, PWM_RESOLUTION); // try for new one
}
// use hardware PWM if avail, if not then ISR
diff --git a/Marlin/Marlin/src/HAL/ESP32/HAL.h b/Marlin/Marlin/src/HAL/ESP32/HAL.h
index ddfedf92..5dc9b2cf 100644
--- a/Marlin/Marlin/src/HAL/ESP32/HAL.h
+++ b/Marlin/Marlin/src/HAL/ESP32/HAL.h
@@ -50,14 +50,12 @@
#define MYSERIAL1 flushableSerial
-#if EITHER(WIFISUPPORT, ESP3D_WIFISUPPORT)
- #if ENABLED(ESP3D_WIFISUPPORT)
- typedef ForwardSerial1Class< decltype(Serial2Socket) > DefaultSerial1;
- extern DefaultSerial1 MSerial0;
- #define MYSERIAL2 MSerial0
- #else
- #define MYSERIAL2 webSocketSerial
- #endif
+#if ENABLED(ESP3D_WIFISUPPORT)
+ typedef ForwardSerial1Class< decltype(Serial2Socket) > DefaultSerial1;
+ extern DefaultSerial1 MSerial0;
+ #define MYSERIAL2 MSerial0
+#elif ENABLED(WIFISUPPORT)
+ #define MYSERIAL2 webSocketSerial
#endif
#define CRITICAL_SECTION_START() portENTER_CRITICAL(&hal.spinlock)
diff --git a/Marlin/Marlin/src/HAL/ESP32/i2s.cpp b/Marlin/Marlin/src/HAL/ESP32/i2s.cpp
index d9bad4ec..63ceed4c 100644
--- a/Marlin/Marlin/src/HAL/ESP32/i2s.cpp
+++ b/Marlin/Marlin/src/HAL/ESP32/i2s.cpp
@@ -149,30 +149,28 @@ void stepperTask(void *parameter) {
dma.rw_pos = 0;
while (dma.rw_pos < DMA_SAMPLE_COUNT) {
- // Fill with the port data post pulse_phase until the next step
- if (nextMainISR && TERN1(LIN_ADVANCE, nextAdvanceISR))
- i2s_push_sample();
-
- // i2s_push_sample() is also called from Stepper::pulse_phase_isr() and Stepper::advance_isr()
- // in a rare case where both are called, we need to double decrement the counters
- const uint8_t push_count = 1 + (!nextMainISR && TERN0(LIN_ADVANCE, !nextAdvanceISR));
-
+ if (!nextMainISR) {
+ Stepper::pulse_phase_isr();
+ nextMainISR = Stepper::block_phase_isr();
+ }
#if ENABLED(LIN_ADVANCE)
- if (!nextAdvanceISR) {
+ else if (!nextAdvanceISR) {
Stepper::advance_isr();
nextAdvanceISR = Stepper::la_interval;
}
- else if (nextAdvanceISR == Stepper::LA_ADV_NEVER)
- nextAdvanceISR = Stepper::la_interval;
#endif
+ else
+ i2s_push_sample();
- if (!nextMainISR) {
- Stepper::pulse_phase_isr();
- nextMainISR = Stepper::block_phase_isr();
- }
+ nextMainISR--;
- nextMainISR -= push_count;
- TERN_(LIN_ADVANCE, nextAdvanceISR -= push_count);
+ #if ENABLED(LIN_ADVANCE)
+ if (nextAdvanceISR == Stepper::LA_ADV_NEVER)
+ nextAdvanceISR = Stepper::la_interval;
+
+ if (nextAdvanceISR && nextAdvanceISR != Stepper::LA_ADV_NEVER)
+ nextAdvanceISR--;
+ #endif
}
}
}
diff --git a/Marlin/Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h b/Marlin/Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h
index 4da60017..5f1c4b16 100644
--- a/Marlin/Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h
+++ b/Marlin/Marlin/src/HAL/ESP32/inc/Conditionals_LCD.h
@@ -20,7 +20,3 @@
*
*/
#pragma once
-
-#if HAS_SPI_TFT || HAS_FSMC_TFT
- #error "Sorry! TFT displays are not available for HAL/ESP32."
-#endif
diff --git a/Marlin/Marlin/src/HAL/ESP32/inc/SanityCheck.h b/Marlin/Marlin/src/HAL/ESP32/inc/SanityCheck.h
index 8c5621f1..910918b9 100644
--- a/Marlin/Marlin/src/HAL/ESP32/inc/SanityCheck.h
+++ b/Marlin/Marlin/src/HAL/ESP32/inc/SanityCheck.h
@@ -21,12 +21,19 @@
*/
#pragma once
+#if HAS_SPI_TFT || HAS_FSMC_TFT
+ #error "Sorry! TFT displays are not available for HAL/ESP32."
+#endif
+
#if ENABLED(EMERGENCY_PARSER)
#error "EMERGENCY_PARSER is not yet implemented for ESP32. Disable EMERGENCY_PARSER to continue."
#endif
-#if (ENABLED(SPINDLE_LASER_USE_PWM) && SPINDLE_LASER_FREQUENCY > 78125) || (ENABLED(FAST_PWM_FAN_FREQUENCY) && FAST_PWM_FAN_FREQUENCY > 78125)
- #error "SPINDLE_LASER_FREQUENCY and FAST_PWM_FREQUENCY maximum value is 78125Hz for ESP32."
+#if ENABLED(SPINDLE_LASER_USE_PWM) && SPINDLE_LASER_FREQUENCY > 78125
+ #error "SPINDLE_LASER_FREQUENCY maximum value is 78125Hz for ESP32."
+#endif
+#if ENABLED(FAST_PWM_FAN) && FAST_PWM_FAN_FREQUENCY > 78125
+ #error "FAST_PWM_FREQUENCY maximum value is 78125Hz for ESP32."
#endif
#if HAS_TMC_SW_SERIAL
@@ -56,3 +63,7 @@
#if BOTH(I2S_STEPPER_STREAM, LIN_ADVANCE) && DISABLED(EXPERIMENTAL_I2S_LA)
#error "I2S stream is currently incompatible with LIN_ADVANCE."
#endif
+
+#if BOTH(I2S_STEPPER_STREAM, PRINTCOUNTER) && PRINTCOUNTER_SAVE_INTERVAL > 0 && DISABLED(PRINTCOUNTER_SYNC)
+ #error "PRINTCOUNTER_SAVE_INTERVAL may cause issues on ESP32 with an I2S expander. Define PRINTCOUNTER_SYNC in Configuration.h for an imperfect solution."
+#endif
diff --git a/Marlin/Marlin/src/HAL/ESP32/timers.cpp b/Marlin/Marlin/src/HAL/ESP32/timers.cpp
index c37ad243..a6893150 100644
--- a/Marlin/Marlin/src/HAL/ESP32/timers.cpp
+++ b/Marlin/Marlin/src/HAL/ESP32/timers.cpp
@@ -111,12 +111,12 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
/**
* Set the upper value of the timer, when the timer reaches this upper value the
* interrupt should be triggered and the counter reset
- * @param timer_num timer number to set the count to
- * @param count threshold at which the interrupt is triggered
+ * @param timer_num timer number to set the compare value to
+ * @param compare threshold at which the interrupt is triggered
*/
-void HAL_timer_set_compare(const uint8_t timer_num, hal_timer_t count) {
+void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t compare) {
const tTimerConfig timer = timer_config[timer_num];
- timer_set_alarm_value(timer.group, timer.idx, count);
+ timer_set_alarm_value(timer.group, timer.idx, compare);
}
/**
diff --git a/Marlin/Marlin/src/HAL/HAL.h b/Marlin/Marlin/src/HAL/HAL.h
index 51865780..f3e16cfd 100644
--- a/Marlin/Marlin/src/HAL/HAL.h
+++ b/Marlin/Marlin/src/HAL/HAL.h
@@ -27,7 +27,7 @@
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#endif
-#include HAL_PATH(.,HAL.h)
+#include HAL_PATH(..,HAL.h)
extern MarlinHAL hal;
#define HAL_ADC_RANGE _BV(HAL_ADC_RESOLUTION)
diff --git a/Marlin/Marlin/src/HAL/LINUX/inc/Conditionals_LCD.h b/Marlin/Marlin/src/HAL/LINUX/inc/Conditionals_LCD.h
index 99a6fc27..5f1c4b16 100644
--- a/Marlin/Marlin/src/HAL/LINUX/inc/Conditionals_LCD.h
+++ b/Marlin/Marlin/src/HAL/LINUX/inc/Conditionals_LCD.h
@@ -20,7 +20,3 @@
*
*/
#pragma once
-
-#if HAS_SPI_TFT || HAS_FSMC_TFT
- #error "Sorry! TFT displays are not available for HAL/LINUX."
-#endif
diff --git a/Marlin/Marlin/src/HAL/LINUX/inc/SanityCheck.h b/Marlin/Marlin/src/HAL/LINUX/inc/SanityCheck.h
index 36d3190a..861bade1 100644
--- a/Marlin/Marlin/src/HAL/LINUX/inc/SanityCheck.h
+++ b/Marlin/Marlin/src/HAL/LINUX/inc/SanityCheck.h
@@ -31,13 +31,17 @@
#endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
- #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on LINUX."
+ #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/LINUX."
+#endif
+
+#if HAS_SPI_TFT || HAS_FSMC_TFT
+ #error "Sorry! TFT displays are not available for HAL/LINUX."
#endif
#if HAS_TMC_SW_SERIAL
- #error "TMC220x Software Serial is not supported on LINUX."
+ #error "TMC220x Software Serial is not supported for HAL/LINUX."
#endif
#if ENABLED(POSTMORTEM_DEBUGGING)
- #error "POSTMORTEM_DEBUGGING is not yet supported on LINUX."
+ #error "POSTMORTEM_DEBUGGING is not yet supported for HAL/LINUX."
#endif
diff --git a/Marlin/Marlin/src/HAL/LINUX/spi_pins.h b/Marlin/Marlin/src/HAL/LINUX/spi_pins.h
index 33136ac9..9b406518 100644
--- a/Marlin/Marlin/src/HAL/LINUX/spi_pins.h
+++ b/Marlin/Marlin/src/HAL/LINUX/spi_pins.h
@@ -25,10 +25,10 @@
#include "../../inc/MarlinConfigPre.h"
#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
- #define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
- // needed due to the speed and mode required for communicating with each device being different.
- // This requirement can be removed if the SPI access to these devices is updated to use
- // spiBeginTransaction.
+ #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
+ // needed due to the speed and mode required for communicating with each device being different.
+ // This requirement can be removed if the SPI access to these devices is updated to use
+ // spiBeginTransaction.
#endif
// Onboard SD
diff --git a/Marlin/Marlin/src/HAL/LPC1768/HAL_SPI.cpp b/Marlin/Marlin/src/HAL/LPC1768/HAL_SPI.cpp
index 257d8579..4d6cb55c 100644
--- a/Marlin/Marlin/src/HAL/LPC1768/HAL_SPI.cpp
+++ b/Marlin/Marlin/src/HAL/LPC1768/HAL_SPI.cpp
@@ -60,7 +60,7 @@
// ------------------------
// Public functions
// ------------------------
-#if ENABLED(LPC_SOFTWARE_SPI)
+#if ENABLED(SOFTWARE_SPI)
// Software SPI
@@ -161,7 +161,7 @@
// TODO: Implement this method
}
-#endif // LPC_SOFTWARE_SPI
+#endif // SOFTWARE_SPI
/**
* @brief Wait until TXE (tx empty) flag is set and BSY (busy) flag unset.
diff --git a/Marlin/Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h b/Marlin/Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h
index 32ef908d..5f1c4b16 100644
--- a/Marlin/Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h
+++ b/Marlin/Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h
@@ -20,7 +20,3 @@
*
*/
#pragma once
-
-#if HAS_FSMC_TFT
- #error "Sorry! FSMC TFT displays are not current available for HAL/LPC1768."
-#endif
diff --git a/Marlin/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h b/Marlin/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h
index 35499500..a0bf4215 100644
--- a/Marlin/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h
+++ b/Marlin/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h
@@ -30,5 +30,5 @@
// LPC1768 boards seem to lose steps when saving to EEPROM during print (issue #20785)
// TODO: Which other boards are incompatible?
#if defined(MCU_LPC1768) && ENABLED(FLASH_EEPROM_EMULATION) && PRINTCOUNTER_SAVE_INTERVAL > 0
- #define PRINTCOUNTER_SYNC 1
+ #define PRINTCOUNTER_SYNC
#endif
diff --git a/Marlin/Marlin/src/HAL/LPC1768/inc/SanityCheck.h b/Marlin/Marlin/src/HAL/LPC1768/inc/SanityCheck.h
index 8265d58a..94923e21 100644
--- a/Marlin/Marlin/src/HAL/LPC1768/inc/SanityCheck.h
+++ b/Marlin/Marlin/src/HAL/LPC1768/inc/SanityCheck.h
@@ -77,6 +77,10 @@ static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are in
#endif
#endif
+#if HAS_FSMC_TFT
+ #error "Sorry! FSMC TFT displays are not current available for HAL/LPC1768."
+#endif
+
static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported on LPC176x.");
/**
diff --git a/Marlin/Marlin/src/HAL/LPC1768/pinsDebug.h b/Marlin/Marlin/src/HAL/LPC1768/pinsDebug.h
index a2f5c123..ae8901b0 100644
--- a/Marlin/Marlin/src/HAL/LPC1768/pinsDebug.h
+++ b/Marlin/Marlin/src/HAL/LPC1768/pinsDebug.h
@@ -29,8 +29,8 @@
*/
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
-#define pwm_details(pin) pin = pin // do nothing // print PWM details
-#define pwm_status(pin) false //Print a pin's PWM status. Return true if it's currently a PWM pin.
+#define pwm_details(pin) NOOP // do nothing
+#define pwm_status(pin) false // Print a pin's PWM status. Return true if it's currently a PWM pin.
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
#define digitalRead_mod(p) extDigitalRead(p)
#define PRINT_PORT(p)
diff --git a/Marlin/Marlin/src/HAL/LPC1768/spi_pins.h b/Marlin/Marlin/src/HAL/LPC1768/spi_pins.h
index e7d77474..a82b21dd 100644
--- a/Marlin/Marlin/src/HAL/LPC1768/spi_pins.h
+++ b/Marlin/Marlin/src/HAL/LPC1768/spi_pins.h
@@ -24,10 +24,10 @@
#include "../../core/macros.h"
#if BOTH(SDSUPPORT, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
- #define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
- // needed due to the speed and mode required for communicating with each device being different.
- // This requirement can be removed if the SPI access to these devices is updated to use
- // spiBeginTransaction.
+ #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
+ // needed due to the speed and mode required for communicating with each device being different.
+ // This requirement can be removed if the SPI access to these devices is updated to use
+ // spiBeginTransaction.
#endif
/** onboard SD card */
diff --git a/Marlin/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h b/Marlin/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h
index 2d7bef23..615e5254 100644
--- a/Marlin/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h
+++ b/Marlin/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h
@@ -31,7 +31,7 @@
#endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
- #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on LINUX."
+ #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/LINUX."
#endif
#if HAS_TMC_SW_SERIAL
diff --git a/Marlin/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h b/Marlin/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h
index aa90eb39..af9a651c 100644
--- a/Marlin/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h
+++ b/Marlin/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h
@@ -27,8 +27,8 @@
*/
#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
-#define pwm_details(pin) pin = pin // do nothing // print PWM details
-#define pwm_status(pin) false //Print a pin's PWM status. Return true if it's currently a PWM pin.
+#define pwm_details(pin) NOOP // do nothing
+#define pwm_status(pin) false // Print a pin's PWM status. Return true if it's currently a PWM pin.
#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0)
#define digitalRead_mod(p) digitalRead(p)
#define PRINT_PORT(p)
diff --git a/Marlin/Marlin/src/HAL/NATIVE_SIM/spi_pins.h b/Marlin/Marlin/src/HAL/NATIVE_SIM/spi_pins.h
index a5138e0c..fd3378b3 100644
--- a/Marlin/Marlin/src/HAL/NATIVE_SIM/spi_pins.h
+++ b/Marlin/Marlin/src/HAL/NATIVE_SIM/spi_pins.h
@@ -25,7 +25,7 @@
#include "../../inc/MarlinConfigPre.h"
#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
- #define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
+ #define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use
// spiBeginTransaction.
diff --git a/Marlin/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h b/Marlin/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h
index 6d5f91d3..ec263b6d 100644
--- a/Marlin/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h
+++ b/Marlin/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h
@@ -34,4 +34,3 @@ void u8g_i2c_stop();
#ifdef __cplusplus
}
#endif
-
diff --git a/Marlin/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h b/Marlin/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h
index 44ffbfeb..2a50eddc 100644
--- a/Marlin/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h
+++ b/Marlin/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h
@@ -40,5 +40,3 @@ uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
#define U8G_COM_T6963 u8g_com_null_fn
#define U8G_COM_FAST_PARALLEL u8g_com_null_fn
#define U8G_COM_UC_I2C u8g_com_null_fn
-
-
diff --git a/Marlin/Marlin/src/HAL/SAMD21/HAL_SPI.cpp b/Marlin/Marlin/src/HAL/SAMD21/HAL_SPI.cpp
index 0fc530cd..69c6a43a 100644
--- a/Marlin/Marlin/src/HAL/SAMD21/HAL_SPI.cpp
+++ b/Marlin/Marlin/src/HAL/SAMD21/HAL_SPI.cpp
@@ -64,7 +64,7 @@
}
void spiInit(uint8_t spiRate) {
- // Use datarates Marlin uses
+ // Use Marlin datarates
uint32_t clock;
switch (spiRate) {
case SPI_FULL_SPEED: clock = 8000000; break;
diff --git a/Marlin/Marlin/src/HAL/SAMD21/fastio.h b/Marlin/Marlin/src/HAL/SAMD21/fastio.h
index db64f216..df907ff7 100644
--- a/Marlin/Marlin/src/HAL/SAMD21/fastio.h
+++ b/Marlin/Marlin/src/HAL/SAMD21/fastio.h
@@ -213,4 +213,3 @@
#define DIO53_PIN PIN_PA21
#define DIO54_PIN PIN_PA06
#define DIO55_PIN PIN_PA07
-
diff --git a/Marlin/Marlin/src/HAL/SAMD21/inc/Conditionals_LCD.h b/Marlin/Marlin/src/HAL/SAMD21/inc/Conditionals_LCD.h
index ca467937..9d58e454 100644
--- a/Marlin/Marlin/src/HAL/SAMD21/inc/Conditionals_LCD.h
+++ b/Marlin/Marlin/src/HAL/SAMD21/inc/Conditionals_LCD.h
@@ -20,12 +20,4 @@
*
*/
-/**
- * SAMD21 HAL developed by Bart Meijer (brupje)
- * Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician)
- */
#pragma once
-
-#if HAS_SPI_TFT || HAS_FSMC_TFT
- #error "Sorry! TFT displays are not available for HAL/SAMD21."
-#endif
diff --git a/Marlin/Marlin/src/HAL/SAMD21/inc/SanityCheck.h b/Marlin/Marlin/src/HAL/SAMD21/inc/SanityCheck.h
index 95fa5e59..8bf052e3 100644
--- a/Marlin/Marlin/src/HAL/SAMD21/inc/SanityCheck.h
+++ b/Marlin/Marlin/src/HAL/SAMD21/inc/SanityCheck.h
@@ -29,6 +29,10 @@
* Test SAMD21 specific configuration values for errors at compile-time.
*/
+#if HAS_SPI_TFT || HAS_FSMC_TFT
+ #error "Sorry! TFT displays are not available for HAL/SAMD21."
+#endif
+
#if SERVO_TC == MF_TIMER_RTC
#error "Servos can't use RTC timer"
#endif
@@ -42,7 +46,7 @@
#endif
#if ENABLED(FAST_PWM_FAN)
- #error "Features requiring Hardware PWM (FAST_PWM_FAN) are not yet supported on SAMD21."
+ #error "Features requiring Hardware PWM (FAST_PWM_FAN) are not yet supported for HAL/SAMD21."
#endif
#if ENABLED(POSTMORTEM_DEBUGGING)
diff --git a/Marlin/Marlin/src/HAL/SAMD51/inc/Conditionals_LCD.h b/Marlin/Marlin/src/HAL/SAMD51/inc/Conditionals_LCD.h
index 932348c5..5f1c4b16 100644
--- a/Marlin/Marlin/src/HAL/SAMD51/inc/Conditionals_LCD.h
+++ b/Marlin/Marlin/src/HAL/SAMD51/inc/Conditionals_LCD.h
@@ -20,7 +20,3 @@
*
*/
#pragma once
-
-#if HAS_SPI_TFT || HAS_FSMC_TFT
- #error "Sorry! TFT displays are not available for HAL/SAMD51."
-#endif
diff --git a/Marlin/Marlin/src/HAL/SAMD51/inc/SanityCheck.h b/Marlin/Marlin/src/HAL/SAMD51/inc/SanityCheck.h
index ae1bc2f3..f9ff090f 100644
--- a/Marlin/Marlin/src/HAL/SAMD51/inc/SanityCheck.h
+++ b/Marlin/Marlin/src/HAL/SAMD51/inc/SanityCheck.h
@@ -29,6 +29,10 @@
* Test SAMD51 specific configuration values for errors at compile-time.
*/
+#if HAS_SPI_TFT || HAS_FSMC_TFT
+ #error "Sorry! TFT displays are not available for HAL/SAMD51."
+#endif
+
#if ENABLED(FLASH_EEPROM_EMULATION)
#warning "Did you activate the SmartEEPROM? See https://github.com/GMagician/SAMD51-SmartEEprom-Manager/releases"
#endif
@@ -55,7 +59,7 @@
#endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
- #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on SAMD51."
+ #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for HAL/SAMD51."
#endif
#if ENABLED(POSTMORTEM_DEBUGGING)
diff --git a/Marlin/Marlin/src/HAL/STM32/HAL.h b/Marlin/Marlin/src/HAL/STM32/HAL.h
index 3e85aca2..61569c79 100644
--- a/Marlin/Marlin/src/HAL/STM32/HAL.h
+++ b/Marlin/Marlin/src/HAL/STM32/HAL.h
@@ -138,7 +138,7 @@
typedef double isr_float_t; // FPU ops are used for single-precision, so use double for ISRs.
-#ifdef STM32G0B1xx
+#if defined(STM32G0B1xx) || defined(STM32H7xx)
typedef int32_t pin_t;
#else
typedef int16_t pin_t;
diff --git a/Marlin/Marlin/src/HAL/STM32/HAL_SPI.cpp b/Marlin/Marlin/src/HAL/STM32/HAL_SPI.cpp
index 40d320d5..278d209c 100644
--- a/Marlin/Marlin/src/HAL/STM32/HAL_SPI.cpp
+++ b/Marlin/Marlin/src/HAL/STM32/HAL_SPI.cpp
@@ -78,7 +78,6 @@ static SPISettings spiConfig;
case SPI_SPEED_6: delaySPIFunc = &delaySPI_2000; break; // desired: 250,000 actual: ~210K
default: delaySPIFunc = &delaySPI_4000; break; // desired: 125,000 actual: ~123K
}
- SPI.begin();
}
// Begin SPI transaction, set clock, bit order, data mode
diff --git a/Marlin/Marlin/src/HAL/STM32/eeprom_sdcard.cpp b/Marlin/Marlin/src/HAL/STM32/eeprom_sdcard.cpp
index 473b656f..1b5c0ae5 100644
--- a/Marlin/Marlin/src/HAL/STM32/eeprom_sdcard.cpp
+++ b/Marlin/Marlin/src/HAL/STM32/eeprom_sdcard.cpp
@@ -48,7 +48,7 @@ static char _ALIGN(4) HAL_eeprom_data[MARLIN_EEPROM_SIZE];
bool PersistentStore::access_start() {
if (!card.isMounted()) return false;
- SdFile file, root = card.getroot();
+ MediaFile file, root = card.getroot();
if (!file.open(&root, EEPROM_FILENAME, O_RDONLY))
return true;
@@ -63,7 +63,7 @@ bool PersistentStore::access_start() {
bool PersistentStore::access_finish() {
if (!card.isMounted()) return false;
- SdFile file, root = card.getroot();
+ MediaFile file, root = card.getroot();
int bytes_written = 0;
if (file.open(&root, EEPROM_FILENAME, O_CREAT | O_WRITE | O_TRUNC)) {
bytes_written = file.write(HAL_eeprom_data, MARLIN_EEPROM_SIZE);
diff --git a/Marlin/Marlin/src/HAL/STM32/inc/Conditionals_post.h b/Marlin/Marlin/src/HAL/STM32/inc/Conditionals_post.h
index c5ce66a2..83ce077c 100644
--- a/Marlin/Marlin/src/HAL/STM32/inc/Conditionals_post.h
+++ b/Marlin/Marlin/src/HAL/STM32/inc/Conditionals_post.h
@@ -30,5 +30,5 @@
// Some STM32F4 boards may lose steps when saving to EEPROM during print (PR #17946)
#if defined(STM32F4xx) && ENABLED(FLASH_EEPROM_EMULATION) && PRINTCOUNTER_SAVE_INTERVAL > 0
- #define PRINTCOUNTER_SYNC 1
+ #define PRINTCOUNTER_SYNC
#endif
diff --git a/Marlin/Marlin/src/HAL/STM32/sdio.cpp b/Marlin/Marlin/src/HAL/STM32/sdio.cpp
index 41fe90b8..72518ef1 100644
--- a/Marlin/Marlin/src/HAL/STM32/sdio.cpp
+++ b/Marlin/Marlin/src/HAL/STM32/sdio.cpp
@@ -286,6 +286,9 @@ void HAL_SD_MspInit(SD_HandleTypeDef *hsd) {
go_to_transfer_speed();
+ hsd.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_ENABLE;
+ hsd.Init.ClockDiv = 8;
+
#if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // go to 4 bit wide mode if pins are defined
retry_Cnt = retryCnt;
for (;;) {
@@ -433,7 +436,10 @@ bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) {
#else
uint8_t retries = SDIO_READ_RETRIES;
- while (retries--) if (SDIO_ReadWriteBlock_DMA(block, src, nullptr)) return true;
+ while (retries--) {
+ if (SDIO_ReadWriteBlock_DMA(block, src, nullptr)) return true;
+ delay(10);
+ }
return false;
#endif
diff --git a/Marlin/Marlin/src/HAL/STM32/usb_host.cpp b/Marlin/Marlin/src/HAL/STM32/usb_host.cpp
index d77f0b28..f3784670 100644
--- a/Marlin/Marlin/src/HAL/STM32/usb_host.cpp
+++ b/Marlin/Marlin/src/HAL/STM32/usb_host.cpp
@@ -44,7 +44,7 @@ static void USBH_UserProcess(USBH_HandleTypeDef *phost, uint8_t id) {
break;
case HOST_USER_DISCONNECTION:
//SERIAL_ECHOLNPGM("APPLICATION_DISCONNECT");
- //usb.setUsbTaskState(USB_STATE_RUNNING);
+ usb.setUsbTaskState(USB_STATE_INIT);
break;
case HOST_USER_CLASS_ACTIVE:
//SERIAL_ECHOLNPGM("APPLICATION_READY");
diff --git a/Marlin/Marlin/src/HAL/STM32F1/eeprom_sdcard.cpp b/Marlin/Marlin/src/HAL/STM32F1/eeprom_sdcard.cpp
index d608ccee..9cfa97c1 100644
--- a/Marlin/Marlin/src/HAL/STM32F1/eeprom_sdcard.cpp
+++ b/Marlin/Marlin/src/HAL/STM32F1/eeprom_sdcard.cpp
@@ -47,7 +47,7 @@ static char _ALIGN(4) HAL_eeprom_data[MARLIN_EEPROM_SIZE];
bool PersistentStore::access_start() {
if (!card.isMounted()) return false;
- SdFile file, root = card.getroot();
+ MediaFile file, root = card.getroot();
if (!file.open(&root, EEPROM_FILENAME, O_RDONLY))
return true; // false aborts the save
@@ -62,7 +62,7 @@ bool PersistentStore::access_start() {
bool PersistentStore::access_finish() {
if (!card.isMounted()) return false;
- SdFile file, root = card.getroot();
+ MediaFile file, root = card.getroot();
int bytes_written = 0;
if (file.open(&root, EEPROM_FILENAME, O_CREAT | O_WRITE | O_TRUNC)) {
bytes_written = file.write(HAL_eeprom_data, MARLIN_EEPROM_SIZE);
diff --git a/Marlin/Marlin/src/HAL/STM32F1/fast_pwm.cpp b/Marlin/Marlin/src/HAL/STM32F1/fast_pwm.cpp
index 297804a3..c3f96f0f 100644
--- a/Marlin/Marlin/src/HAL/STM32F1/fast_pwm.cpp
+++ b/Marlin/Marlin/src/HAL/STM32F1/fast_pwm.cpp
@@ -39,7 +39,7 @@ inline uint8_t timer_and_index_for_pin(const pin_t pin, timer_dev **timer_ptr) {
void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
const uint16_t duty = invert ? v_size - v : v;
if (PWM_PIN(pin)) {
- timer_dev *timer; UNUSED(timer);
+ timer_dev *timer;
if (timer_freq[timer_and_index_for_pin(pin, &timer)] == 0)
set_pwm_frequency(pin, PWM_FREQUENCY);
const uint8_t channel = PIN_MAP[pin].timer_channel;
@@ -55,7 +55,7 @@ void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v
void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
if (!PWM_PIN(pin)) return; // Don't proceed if no hardware timer
- timer_dev *timer; UNUSED(timer);
+ timer_dev *timer;
timer_freq[timer_and_index_for_pin(pin, &timer)] = f_desired;
// Protect used timers
diff --git a/Marlin/Marlin/src/HAL/STM32F1/onboard_sd.h b/Marlin/Marlin/src/HAL/STM32F1/onboard_sd.h
index f228d068..f8846e95 100644
--- a/Marlin/Marlin/src/HAL/STM32F1/onboard_sd.h
+++ b/Marlin/Marlin/src/HAL/STM32F1/onboard_sd.h
@@ -1,11 +1,31 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
/*-----------------------------------------------------------------------
-/ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
/ * Copyright (c) 2019 BigTreeTech [https://github.com/bigtreetech]
-/ * Low level disk interface module include file (C)ChaN, 2015
+/ * Low level disk interface module include file (c) ChaN, 2015
/-----------------------------------------------------------------------*/
-#pragma once
-
#define _DISKIO_WRITE 1 /* 1: Enable disk_write function */
#define _DISKIO_IOCTL 1 /* 1: Enable disk_ioctl function */
#define _DISKIO_ISDIO 0 /* 1: Enable iSDIO control function */
diff --git a/Marlin/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_LCD.h b/Marlin/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_LCD.h
index 54ec1666..5f1c4b16 100644
--- a/Marlin/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_LCD.h
+++ b/Marlin/Marlin/src/HAL/TEENSY31_32/inc/Conditionals_LCD.h
@@ -20,7 +20,3 @@
*
*/
#pragma once
-
-#if HAS_SPI_TFT || HAS_FSMC_TFT
- #error "Sorry! TFT displays are not available for HAL/TEENSY31_32."
-#endif
diff --git a/Marlin/Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h b/Marlin/Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h
index dbce1876..c5b25f2c 100644
--- a/Marlin/Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h
+++ b/Marlin/Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h
@@ -25,22 +25,26 @@
* Test TEENSY35_36 specific configuration values for errors at compile-time.
*/
+#if HAS_SPI_TFT || HAS_FSMC_TFT
+ #error "Sorry! TFT displays are not available for Teensy 3.1/3.2."
+#endif
+
#if ENABLED(EMERGENCY_PARSER)
#error "EMERGENCY_PARSER is not yet implemented for Teensy 3.1/3.2. Disable EMERGENCY_PARSER to continue."
#endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
- #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 3.1/3.2."
+ #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for Teensy 3.1/3.2."
#endif
#if HAS_TMC_SW_SERIAL
- #error "TMC220x Software Serial is not supported on Teensy 3.1/3.2."
+ #error "TMC220x Software Serial is not supported for Teensy 3.1/3.2."
#endif
#if ENABLED(POSTMORTEM_DEBUGGING)
- #error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 3.1/3.2."
+ #error "POSTMORTEM_DEBUGGING is not yet supported for Teensy 3.1/3.2."
#endif
#if USING_PULLDOWNS
- #error "PULLDOWN pin mode is not available on Teensy 3.1/3.2 boards."
+ #error "PULLDOWN pin mode is not available for Teensy 3.1/3.2."
#endif
diff --git a/Marlin/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_LCD.h b/Marlin/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_LCD.h
index 632ee533..5f1c4b16 100644
--- a/Marlin/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_LCD.h
+++ b/Marlin/Marlin/src/HAL/TEENSY35_36/inc/Conditionals_LCD.h
@@ -20,7 +20,3 @@
*
*/
#pragma once
-
-#if HAS_SPI_TFT || HAS_FSMC_TFT
- #error "Sorry! TFT displays are not available for HAL/TEENSY35_36."
-#endif
diff --git a/Marlin/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h b/Marlin/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h
index 33087073..843905a8 100644
--- a/Marlin/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h
+++ b/Marlin/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h
@@ -25,22 +25,26 @@
* Test TEENSY35_36 specific configuration values for errors at compile-time.
*/
+#if HAS_SPI_TFT || HAS_FSMC_TFT
+ #error "Sorry! TFT displays are not available for Teensy 3.5/3.6."
+#endif
+
#if ENABLED(EMERGENCY_PARSER)
#error "EMERGENCY_PARSER is not yet implemented for Teensy 3.5/3.6. Disable EMERGENCY_PARSER to continue."
#endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
- #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 3.5/3.6."
+ #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for Teensy 3.5/3.6."
#endif
#if HAS_TMC_SW_SERIAL
- #error "TMC220x Software Serial is not supported on Teensy 3.5/3.6."
+ #error "TMC220x Software Serial is not supported for Teensy 3.5/3.6."
#endif
#if ENABLED(POSTMORTEM_DEBUGGING)
- #error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 3.5/3.6."
+ #error "POSTMORTEM_DEBUGGING is not yet supported for Teensy 3.5/3.6."
#endif
#if USING_PULLDOWNS
- #error "PULLDOWN pin mode is not available on Teensy 3.5/3.6 boards."
+ #error "PULLDOWN pin mode is not available for Teensy 3.5/3.6."
#endif
diff --git a/Marlin/Marlin/src/HAL/TEENSY40_41/inc/Conditionals_LCD.h b/Marlin/Marlin/src/HAL/TEENSY40_41/inc/Conditionals_LCD.h
index 6a854092..5f1c4b16 100644
--- a/Marlin/Marlin/src/HAL/TEENSY40_41/inc/Conditionals_LCD.h
+++ b/Marlin/Marlin/src/HAL/TEENSY40_41/inc/Conditionals_LCD.h
@@ -20,7 +20,3 @@
*
*/
#pragma once
-
-#if HAS_SPI_TFT || HAS_FSMC_TFT
- #error "Sorry! TFT displays are not available for HAL/TEENSY40_41."
-#endif
diff --git a/Marlin/Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h b/Marlin/Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h
index 3d2668d7..731658b4 100644
--- a/Marlin/Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h
+++ b/Marlin/Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h
@@ -25,18 +25,22 @@
* Test TEENSY41 specific configuration values for errors at compile-time.
*/
+#if HAS_SPI_TFT || HAS_FSMC_TFT
+ #error "Sorry! TFT displays are not available for Teensy 4.0/4.1."
+#endif
+
#if ENABLED(EMERGENCY_PARSER)
#error "EMERGENCY_PARSER is not yet implemented for Teensy 4.0/4.1. Disable EMERGENCY_PARSER to continue."
#endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
- #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on Teensy 4.0/4.1."
+ #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported for Teensy 4.0/4.1."
#endif
#if HAS_TMC_SW_SERIAL
- #error "TMC220x Software Serial is not supported on Teensy 4.0/4.1."
+ #error "TMC220x Software Serial is not supported for Teensy 4.0/4.1."
#endif
#if ENABLED(POSTMORTEM_DEBUGGING)
- #error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 4.0/4.1."
+ #error "POSTMORTEM_DEBUGGING is not yet supported for Teensy 4.0/4.1."
#endif
diff --git a/Marlin/Marlin/src/HAL/platforms.h b/Marlin/Marlin/src/HAL/platforms.h
index 488980ce..84ba7087 100644
--- a/Marlin/Marlin/src/HAL/platforms.h
+++ b/Marlin/Marlin/src/HAL/platforms.h
@@ -24,34 +24,34 @@
#define XSTR(V...) #V
#ifdef __AVR__
- #define HAL_PATH(PATH, NAME) XSTR(PATH/AVR/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/AVR/NAME)
#elif defined(ARDUINO_ARCH_SAM)
- #define HAL_PATH(PATH, NAME) XSTR(PATH/DUE/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/DUE/NAME)
#elif defined(__MK20DX256__)
- #define HAL_PATH(PATH, NAME) XSTR(PATH/TEENSY31_32/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/TEENSY31_32/NAME)
#elif defined(__MK64FX512__) || defined(__MK66FX1M0__)
- #define HAL_PATH(PATH, NAME) XSTR(PATH/TEENSY35_36/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/TEENSY35_36/NAME)
#elif defined(__IMXRT1062__)
- #define HAL_PATH(PATH, NAME) XSTR(PATH/TEENSY40_41/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/TEENSY40_41/NAME)
#elif defined(TARGET_LPC1768)
- #define HAL_PATH(PATH, NAME) XSTR(PATH/LPC1768/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/LPC1768/NAME)
#elif defined(__STM32F1__) || defined(TARGET_STM32F1)
- #define HAL_PATH(PATH, NAME) XSTR(PATH/STM32F1/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/STM32F1/NAME)
#elif defined(ARDUINO_ARCH_STM32)
#ifndef HAL_STM32
#define HAL_STM32
#endif
- #define HAL_PATH(PATH, NAME) XSTR(PATH/STM32/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/STM32/NAME)
#elif defined(ARDUINO_ARCH_ESP32)
- #define HAL_PATH(PATH, NAME) XSTR(PATH/ESP32/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/ESP32/NAME)
#elif defined(__PLAT_LINUX__)
- #define HAL_PATH(PATH, NAME) XSTR(PATH/LINUX/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/LINUX/NAME)
#elif defined(__PLAT_NATIVE_SIM__)
- #define HAL_PATH(PATH, NAME) XSTR(PATH/NATIVE_SIM/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/NATIVE_SIM/NAME)
#elif defined(__SAMD51__)
- #define HAL_PATH(PATH, NAME) XSTR(PATH/SAMD51/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/SAMD51/NAME)
#elif defined(__SAMD21__)
- #define HAL_PATH(PATH, NAME) XSTR(PATH/SAMD21/NAME)
+ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/SAMD21/NAME)
#else
#error "Unsupported Platform!"
#endif
diff --git a/Marlin/Marlin/src/HAL/shared/eeprom_if_i2c.cpp b/Marlin/Marlin/src/HAL/shared/eeprom_if_i2c.cpp
index 6b559e23..bba9c626 100644
--- a/Marlin/Marlin/src/HAL/shared/eeprom_if_i2c.cpp
+++ b/Marlin/Marlin/src/HAL/shared/eeprom_if_i2c.cpp
@@ -33,13 +33,14 @@
#if ENABLED(SOFT_I2C_EEPROM)
#include
- SlowSoftWire Wire = SlowSoftWire(I2C_SDA_PIN, I2C_SCL_PIN, true);
+ SlowSoftWire eWire = SlowSoftWire(I2C_SDA_PIN, I2C_SCL_PIN, true);
#else
#include
+ #define eWire Wire
#endif
void eeprom_init() {
- Wire.begin(
+ eWire.begin(
#if PINS_EXIST(I2C_SCL, I2C_SDA) && DISABLED(SOFT_I2C_EEPROM)
uint8_t(I2C_SDA_PIN), uint8_t(I2C_SCL_PIN)
#endif
@@ -75,16 +76,16 @@ static uint8_t _eeprom_calc_device_address(uint8_t * const pos) {
static void _eeprom_begin(uint8_t * const pos) {
const unsigned eeprom_address = (unsigned)pos;
- Wire.beginTransmission(_eeprom_calc_device_address(pos));
+ eWire.beginTransmission(_eeprom_calc_device_address(pos));
if (!SMALL_EEPROM)
- Wire.write(uint8_t((eeprom_address >> 8) & 0xFF)); // Address High, if needed
- Wire.write(uint8_t(eeprom_address & 0xFF)); // Address Low
+ eWire.write(uint8_t((eeprom_address >> 8) & 0xFF)); // Address High, if needed
+ eWire.write(uint8_t(eeprom_address & 0xFF)); // Address Low
}
void eeprom_write_byte(uint8_t *pos, uint8_t value) {
_eeprom_begin(pos);
- Wire.write(value);
- Wire.endTransmission();
+ eWire.write(value);
+ eWire.endTransmission();
// wait for write cycle to complete
// this could be done more efficiently with "acknowledge polling"
@@ -93,9 +94,9 @@ void eeprom_write_byte(uint8_t *pos, uint8_t value) {
uint8_t eeprom_read_byte(uint8_t *pos) {
_eeprom_begin(pos);
- Wire.endTransmission();
- Wire.requestFrom(_eeprom_calc_device_address(pos), (byte)1);
- return Wire.available() ? Wire.read() : 0xFF;
+ eWire.endTransmission();
+ eWire.requestFrom(_eeprom_calc_device_address(pos), (byte)1);
+ return eWire.available() ? eWire.read() : 0xFF;
}
#endif // USE_SHARED_EEPROM
diff --git a/Marlin/Marlin/src/HAL/shared/esp_wifi.cpp b/Marlin/Marlin/src/HAL/shared/esp_wifi.cpp
index a55f5ca3..8a6ac2df 100644
--- a/Marlin/Marlin/src/HAL/shared/esp_wifi.cpp
+++ b/Marlin/Marlin/src/HAL/shared/esp_wifi.cpp
@@ -21,6 +21,9 @@
*/
#include "../../inc/MarlinConfig.h"
+
+#if ENABLED(WIFISUPPORT)
+
#include "Delay.h"
void esp_wifi_init(void) { // init ESP01 WIFI module pins
@@ -41,3 +44,5 @@ void esp_wifi_init(void) { // init ESP01 WIFI module pi
OUT_WRITE(ESP_WIFI_MODULE_ENABLE_PIN, HIGH);
#endif
}
+
+#endif // WIFISUPPORT
diff --git a/Marlin/Marlin/src/MarlinCore.cpp b/Marlin/Marlin/src/MarlinCore.cpp
index ea57e3cc..0ca4199f 100644
--- a/Marlin/Marlin/src/MarlinCore.cpp
+++ b/Marlin/Marlin/src/MarlinCore.cpp
@@ -34,6 +34,10 @@
#include "HAL/shared/esp_wifi.h"
#include "HAL/shared/cpu_exception/exception_hook.h"
+#if ENABLED(WIFISUPPORT)
+ #include "HAL/shared/esp_wifi.h"
+#endif
+
#ifdef ARDUINO
#include
#endif
@@ -518,8 +522,8 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
if (ELAPSED(ms, next_cub_ms_##N)) { \
next_cub_ms_##N = ms + CUB_DEBOUNCE_DELAY_##N; \
CODE; \
- queue.inject(F(BUTTON##N##_GCODE)); \
- TERN_(HAS_MARLINUI_MENU, ui.quick_feedback()); \
+ queue.inject(F(BUTTON##N##_GCODE)); \
+ TERN_(HAS_MARLINUI_MENU, ui.quick_feedback()); \
} \
} \
}while(0)
@@ -773,7 +777,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
* - Update the Průša MMU2
* - Handle Joystick jogging
*/
-void idle(bool no_stepper_sleep/*=false*/) {
+void idle(const bool no_stepper_sleep/*=false*/) {
#ifdef MAX7219_DEBUG_PROFILE
CodeProfiler idle_profiler;
#endif
@@ -1268,7 +1272,9 @@ void setup() {
SETUP_RUN(hal.init_board());
- SETUP_RUN(esp_wifi_init());
+ #if ENABLED(WIFISUPPORT)
+ SETUP_RUN(esp_wifi_init());
+ #endif
// Report Reset Reason
if (mcu & RST_POWER_ON) SERIAL_ECHOLNPGM(STR_POWERUP);
diff --git a/Marlin/Marlin/src/MarlinCore.h b/Marlin/Marlin/src/MarlinCore.h
index f80405a3..e9c63bb3 100644
--- a/Marlin/Marlin/src/MarlinCore.h
+++ b/Marlin/Marlin/src/MarlinCore.h
@@ -30,7 +30,7 @@
void stop();
// Pass true to keep steppers from timing out
-void idle(bool no_stepper_sleep=false);
+void idle(const bool no_stepper_sleep=false);
inline void idle_no_sleep() { idle(true); }
#if ENABLED(G38_PROBE_TARGET)
diff --git a/Marlin/Marlin/src/core/boards.h b/Marlin/Marlin/src/core/boards.h
index 23366725..aad968b2 100644
--- a/Marlin/Marlin/src/core/boards.h
+++ b/Marlin/Marlin/src/core/boards.h
@@ -21,6 +21,11 @@
*/
#pragma once
+/**
+ * Whenever changes are made to this file, please update Marlin/Makefile
+ * and _data/boards.yml in the MarlinDocumentation repo.
+ */
+
#include "macros.h"
#define BOARD_UNKNOWN -1
@@ -221,7 +226,7 @@
#define BOARD_5DPRINT 1707 // 5DPrint D8 Driver Board
//
-// LPC1768 ARM Cortex M3
+// LPC1768 ARM Cortex-M3
//
#define BOARD_RAMPS_14_RE_ARM_EFB 2000 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
@@ -242,7 +247,7 @@
#define BOARD_EMOTRONIC 2015 // eMotion-Tech eMotronic
//
-// LPC1769 ARM Cortex M3
+// LPC1769 ARM Cortex-M3
//
#define BOARD_MKS_SGEN 2500 // MKS-SGen
@@ -259,7 +264,7 @@
#define BOARD_FLY_CDY 2511 // FLYmaker FLY CDY
//
-// SAM3X8E ARM Cortex M3
+// SAM3X8E ARM Cortex-M3
//
#define BOARD_DUE3DOM 3000 // DUE3DOM for Arduino DUE
@@ -292,186 +297,198 @@
#define BOARD_KRATOS32 3027 // K.3D Kratos32 (Arduino Due Shield)
//
-// SAM3X8C ARM Cortex M3
+// SAM3X8C ARM Cortex-M3
//
#define BOARD_PRINTRBOARD_G2 3100 // Printrboard G2
#define BOARD_ADSK 3101 // Arduino DUE Shield Kit (ADSK)
+//
+// STM32 ARM Cortex-M0+
+//
+
+#define BOARD_BTT_EBB42_V1_1 4000 // BigTreeTech EBB42 V1.1 (STM32G0B1CB)
+#define BOARD_BTT_SKR_MINI_E3_V3_0 4001 // BigTreeTech SKR Mini E3 V3.0 (STM32G0B1RE)
+#define BOARD_BTT_MANTA_E3_EZ_V1_0 4002 // BigTreeTech Manta E3 EZ V1.0 (STM32G0B1RE)
+#define BOARD_BTT_MANTA_M4P_V1_0 4003 // BigTreeTech Manta M4P V1.0 (STM32G0B1RE)
+#define BOARD_BTT_MANTA_M5P_V1_0 4004 // BigTreeTech Manta M5P V1.0 (STM32G0B1RE)
+#define BOARD_BTT_MANTA_M8P_V1_0 4005 // BigTreeTech Manta M8P V1.0 (STM32G0B1VE)
+#define BOARD_BTT_MANTA_M8P_V1_1 4006 // BigTreeTech Manta M8P V1.1 (STM32G0B1VE)
+
//
// STM32 ARM Cortex-M3
//
-#define BOARD_MALYAN_M200_V2 4000 // STM32F070CB controller
-#define BOARD_MALYAN_M300 4001 // STM32F070-based delta
-#define BOARD_STM32F103RE 4002 // STM32F103RE Libmaple-based STM32F1 controller
-#define BOARD_MALYAN_M200 4003 // STM32C8 Libmaple-based STM32F1 controller
-#define BOARD_STM3R_MINI 4004 // STM32F103RE Libmaple-based STM32F1 controller
-#define BOARD_GTM32_PRO_VB 4005 // STM32F103VE controller
-#define BOARD_GTM32_MINI 4006 // STM32F103VE controller
-#define BOARD_GTM32_MINI_A30 4007 // STM32F103VE controller
-#define BOARD_GTM32_REV_B 4008 // STM32F103VE controller
-#define BOARD_MORPHEUS 4009 // STM32F103C8 / STM32F103CB Libmaple-based STM32F1 controller
-#define BOARD_CHITU3D 4010 // Chitu3D (STM32F103RE)
-#define BOARD_MKS_ROBIN 4011 // MKS Robin (STM32F103ZE)
-#define BOARD_MKS_ROBIN_MINI 4012 // MKS Robin Mini (STM32F103VE)
-#define BOARD_MKS_ROBIN_NANO 4013 // MKS Robin Nano (STM32F103VE)
-#define BOARD_MKS_ROBIN_NANO_V2 4014 // MKS Robin Nano V2 (STM32F103VE)
-#define BOARD_MKS_ROBIN_LITE 4015 // MKS Robin Lite/Lite2 (STM32F103RC)
-#define BOARD_MKS_ROBIN_LITE3 4016 // MKS Robin Lite3 (STM32F103RC)
-#define BOARD_MKS_ROBIN_PRO 4017 // MKS Robin Pro (STM32F103ZE)
-#define BOARD_MKS_ROBIN_E3 4018 // MKS Robin E3 (STM32F103RC)
-#define BOARD_MKS_ROBIN_E3_V1_1 4019 // MKS Robin E3 V1.1 (STM32F103RC)
-#define BOARD_MKS_ROBIN_E3D 4020 // MKS Robin E3D (STM32F103RC)
-#define BOARD_MKS_ROBIN_E3D_V1_1 4021 // MKS Robin E3D V1.1 (STM32F103RC)
-#define BOARD_MKS_ROBIN_E3P 4022 // MKS Robin E3p (STM32F103VE)
-#define BOARD_BTT_EBB42_V1_1 4023 // BigTreeTech EBB42 V1.1 (STM32G0B1CB)
-#define BOARD_BTT_SKR_MINI_V1_1 4024 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
-#define BOARD_BTT_SKR_MINI_E3_V1_0 4025 // BigTreeTech SKR Mini E3 (STM32F103RC)
-#define BOARD_BTT_SKR_MINI_E3_V1_2 4026 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
-#define BOARD_BTT_SKR_MINI_E3_V2_0 4027 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC / STM32F103RE)
-#define BOARD_BTT_SKR_MINI_E3_V3_0 4028 // BigTreeTech SKR Mini E3 V3.0 (STM32G0B1RE)
-#define BOARD_BTT_SKR_MINI_E3_V3_0_1 4029 // BigTreeTech SKR Mini E3 V3.0.1 (STM32F401RC)
-#define BOARD_BTT_SKR_MINI_MZ_V1_0 4030 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
-#define BOARD_BTT_SKR_E3_DIP 4031 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
-#define BOARD_BTT_SKR_CR6 4032 // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
-#define BOARD_JGAURORA_A5S_A1 4033 // JGAurora A5S A1 (STM32F103ZE)
-#define BOARD_FYSETC_AIO_II 4034 // FYSETC AIO_II (STM32F103RC)
-#define BOARD_FYSETC_CHEETAH 4035 // FYSETC Cheetah (STM32F103RC)
-#define BOARD_FYSETC_CHEETAH_V12 4036 // FYSETC Cheetah V1.2 (STM32F103RC)
-#define BOARD_LONGER3D_LK 4037 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE)
-#define BOARD_CCROBOT_MEEB_3DP 4038 // ccrobot-online.com MEEB_3DP (STM32F103RC)
-#define BOARD_CHITU3D_V5 4039 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE)
-#define BOARD_CHITU3D_V6 4040 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE)
-#define BOARD_CHITU3D_V9 4041 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE)
-#define BOARD_CREALITY_V4 4042 // Creality v4.x (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V422 4043 // Creality v4.2.2 (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V423 4044 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V425 4045 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V427 4046 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V4210 4047 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
-#define BOARD_CREALITY_V431 4048 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V431_A 4049 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V431_B 4050 // Creality v4.3.1b (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V431_C 4051 // Creality v4.3.1c (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V431_D 4052 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V452 4053 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V453 4054 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
-#define BOARD_CREALITY_V521 4055 // Creality v5.2.1 (STM32F103VE) as found in the SV04
-#define BOARD_CREALITY_V24S1 4056 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
-#define BOARD_CREALITY_V24S1_301 4057 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
-#define BOARD_CREALITY_V25S1 4058 // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
-#define BOARD_TRIGORILLA_PRO 4059 // Trigorilla Pro (STM32F103ZE)
-#define BOARD_FLY_MINI 4060 // FLYmaker FLY MINI (STM32F103RC)
-#define BOARD_FLSUN_HISPEED 4061 // FLSUN HiSpeedV1 (STM32F103VE)
-#define BOARD_BEAST 4062 // STM32F103RE Libmaple-based controller
-#define BOARD_MINGDA_MPX_ARM_MINI 4063 // STM32F103ZE Mingda MD-16
-#define BOARD_GTM32_PRO_VD 4064 // STM32F103VE controller
-#define BOARD_ZONESTAR_ZM3E2 4065 // Zonestar ZM3E2 (STM32F103RC)
-#define BOARD_ZONESTAR_ZM3E4 4066 // Zonestar ZM3E4 V1 (STM32F103VC)
-#define BOARD_ZONESTAR_ZM3E4V2 4067 // Zonestar ZM3E4 V2 (STM32F103VC)
-#define BOARD_ERYONE_ERY32_MINI 4068 // Eryone Ery32 mini (STM32F103VE)
-#define BOARD_PANDA_PI_V29 4069 // Panda Pi V2.9 - Standalone (STM32F103RC)
+#define BOARD_MALYAN_M200_V2 5000 // STM32F070CB controller
+#define BOARD_MALYAN_M300 5001 // STM32F070-based delta
+#define BOARD_STM32F103RE 5002 // STM32F103RE Libmaple-based STM32F1 controller
+#define BOARD_MALYAN_M200 5003 // STM32C8 Libmaple-based STM32F1 controller
+#define BOARD_STM3R_MINI 5004 // STM32F103RE Libmaple-based STM32F1 controller
+#define BOARD_GTM32_PRO_VB 5005 // STM32F103VE controller
+#define BOARD_GTM32_MINI 5006 // STM32F103VE controller
+#define BOARD_GTM32_MINI_A30 5007 // STM32F103VE controller
+#define BOARD_GTM32_REV_B 5008 // STM32F103VE controller
+#define BOARD_MORPHEUS 5009 // STM32F103C8 / STM32F103CB Libmaple-based STM32F1 controller
+#define BOARD_CHITU3D 5010 // Chitu3D (STM32F103RE)
+#define BOARD_MKS_ROBIN 5011 // MKS Robin (STM32F103ZE)
+#define BOARD_MKS_ROBIN_MINI 5012 // MKS Robin Mini (STM32F103VE)
+#define BOARD_MKS_ROBIN_NANO 5013 // MKS Robin Nano (STM32F103VE)
+#define BOARD_MKS_ROBIN_NANO_V2 5014 // MKS Robin Nano V2 (STM32F103VE)
+#define BOARD_MKS_ROBIN_LITE 5015 // MKS Robin Lite/Lite2 (STM32F103RC)
+#define BOARD_MKS_ROBIN_LITE3 5016 // MKS Robin Lite3 (STM32F103RC)
+#define BOARD_MKS_ROBIN_PRO 5017 // MKS Robin Pro (STM32F103ZE)
+#define BOARD_MKS_ROBIN_E3 5018 // MKS Robin E3 (STM32F103RC)
+#define BOARD_MKS_ROBIN_E3_V1_1 5019 // MKS Robin E3 V1.1 (STM32F103RC)
+#define BOARD_MKS_ROBIN_E3D 5020 // MKS Robin E3D (STM32F103RC)
+#define BOARD_MKS_ROBIN_E3D_V1_1 5021 // MKS Robin E3D V1.1 (STM32F103RC)
+#define BOARD_MKS_ROBIN_E3P 5022 // MKS Robin E3P (STM32F103VE)
+#define BOARD_BTT_SKR_MINI_V1_1 5023 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
+#define BOARD_BTT_SKR_MINI_E3_V1_0 5024 // BigTreeTech SKR Mini E3 (STM32F103RC)
+#define BOARD_BTT_SKR_MINI_E3_V1_2 5025 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
+#define BOARD_BTT_SKR_MINI_E3_V2_0 5026 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC / STM32F103RE)
+#define BOARD_BTT_SKR_MINI_MZ_V1_0 5027 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
+#define BOARD_BTT_SKR_E3_DIP 5028 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
+#define BOARD_BTT_SKR_CR6 5029 // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
+#define BOARD_JGAURORA_A5S_A1 5030 // JGAurora A5S A1 (STM32F103ZE)
+#define BOARD_FYSETC_AIO_II 5031 // FYSETC AIO_II (STM32F103RC)
+#define BOARD_FYSETC_CHEETAH 5032 // FYSETC Cheetah (STM32F103RC)
+#define BOARD_FYSETC_CHEETAH_V12 5033 // FYSETC Cheetah V1.2 (STM32F103RC)
+#define BOARD_LONGER3D_LK 5034 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE)
+#define BOARD_CCROBOT_MEEB_3DP 5035 // ccrobot-online.com MEEB_3DP (STM32F103RC)
+#define BOARD_CHITU3D_V5 5036 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE)
+#define BOARD_CHITU3D_V6 5037 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE)
+#define BOARD_CHITU3D_V9 5038 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE)
+#define BOARD_CREALITY_V4 5039 // Creality v4.x (STM32F103RC / STM32F103RE)
+#define BOARD_CREALITY_V422 5040 // Creality v4.2.2 (STM32F103RC / STM32F103RE)
+#define BOARD_CREALITY_V423 5041 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
+#define BOARD_CREALITY_V425 5042 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
+#define BOARD_CREALITY_V427 5043 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
+#define BOARD_CREALITY_V4210 5044 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
+#define BOARD_CREALITY_V431 5045 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
+#define BOARD_CREALITY_V431_A 5046 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
+#define BOARD_CREALITY_V431_B 5047 // Creality v4.3.1b (STM32F103RC / STM32F103RE)
+#define BOARD_CREALITY_V431_C 5048 // Creality v4.3.1c (STM32F103RC / STM32F103RE)
+#define BOARD_CREALITY_V431_D 5049 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
+#define BOARD_CREALITY_V452 5050 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
+#define BOARD_CREALITY_V453 5051 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
+#define BOARD_CREALITY_V521 5052 // Creality v5.2.1 (STM32F103VE) as found in the SV04
+#define BOARD_CREALITY_V24S1 5053 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
+#define BOARD_CREALITY_V24S1_301 5054 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
+#define BOARD_CREALITY_V25S1 5055 // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
+#define BOARD_TRIGORILLA_PRO 5056 // Trigorilla Pro (STM32F103ZE)
+#define BOARD_FLY_MINI 5057 // FLYmaker FLY MINI (STM32F103RC)
+#define BOARD_FLSUN_HISPEED 5058 // FLSUN HiSpeedV1 (STM32F103VE)
+#define BOARD_BEAST 5059 // STM32F103RE Libmaple-based controller
+#define BOARD_MINGDA_MPX_ARM_MINI 5060 // STM32F103ZE Mingda MD-16
+#define BOARD_GTM32_PRO_VD 5061 // STM32F103VE controller
+#define BOARD_ZONESTAR_ZM3E2 5062 // Zonestar ZM3E2 (STM32F103RC)
+#define BOARD_ZONESTAR_ZM3E4 5063 // Zonestar ZM3E4 V1 (STM32F103VC)
+#define BOARD_ZONESTAR_ZM3E4V2 5064 // Zonestar ZM3E4 V2 (STM32F103VC)
+#define BOARD_ERYONE_ERY32_MINI 5065 // Eryone Ery32 mini (STM32F103VE)
+#define BOARD_PANDA_PI_V29 5066 // Panda Pi V2.9 - Standalone (STM32F103RC)
+#define BOARD_SOVOL_V131 5067 // Sovol V1.3.1 (GD32F103RET6)
//
// ARM Cortex-M4F
//
-#define BOARD_TEENSY31_32 4100 // Teensy3.1 and Teensy3.2
-#define BOARD_TEENSY35_36 4101 // Teensy3.5 and Teensy3.6
+#define BOARD_TEENSY31_32 5100 // Teensy3.1 and Teensy3.2
+#define BOARD_TEENSY35_36 5101 // Teensy3.5 and Teensy3.6
//
// STM32 ARM Cortex-M4F
//
-#define BOARD_ARMED 4200 // Arm'ed STM32F4-based controller
-#define BOARD_RUMBA32_V1_0 4201 // RUMBA32 STM32F446VE based controller from Aus3D
-#define BOARD_RUMBA32_V1_1 4202 // RUMBA32 STM32F446VE based controller from Aus3D
-#define BOARD_RUMBA32_MKS 4203 // RUMBA32 STM32F446VE based controller from Makerbase
-#define BOARD_RUMBA32_BTT 4204 // RUMBA32 STM32F446VE based controller from BIGTREETECH
-#define BOARD_BLACK_STM32F407VE 4205 // BLACK_STM32F407VE
-#define BOARD_BLACK_STM32F407ZE 4206 // BLACK_STM32F407ZE
-#define BOARD_BTT_SKR_PRO_V1_1 4207 // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
-#define BOARD_BTT_SKR_PRO_V1_2 4208 // BigTreeTech SKR Pro v1.2 (STM32F407ZG)
-#define BOARD_BTT_BTT002_V1_0 4209 // BigTreeTech BTT002 v1.0 (STM32F407VG)
-#define BOARD_BTT_E3_RRF 4210 // BigTreeTech E3 RRF (STM32F407VG)
-#define BOARD_BTT_SKR_V2_0_REV_A 4211 // BigTreeTech SKR v2.0 Rev A (STM32F407VG)
-#define BOARD_BTT_SKR_V2_0_REV_B 4212 // BigTreeTech SKR v2.0 Rev B (STM32F407VG/STM32F429VG)
-#define BOARD_BTT_GTR_V1_0 4213 // BigTreeTech GTR v1.0 (STM32F407IGT)
-#define BOARD_BTT_OCTOPUS_V1_0 4214 // BigTreeTech Octopus v1.0 (STM32F446ZE)
-#define BOARD_BTT_OCTOPUS_V1_1 4215 // BigTreeTech Octopus v1.1 (STM32F446ZE)
-#define BOARD_BTT_OCTOPUS_PRO_V1_0 4216 // BigTreeTech Octopus Pro v1.0 (STM32F446ZE / STM32F429ZG)
-#define BOARD_LERDGE_K 4217 // Lerdge K (STM32F407ZG)
-#define BOARD_LERDGE_S 4218 // Lerdge S (STM32F407VE)
-#define BOARD_LERDGE_X 4219 // Lerdge X (STM32F407VE)
-#define BOARD_VAKE403D 4220 // VAkE 403D (STM32F446VE)
-#define BOARD_FYSETC_S6 4221 // FYSETC S6 (STM32F446VE)
-#define BOARD_FYSETC_S6_V2_0 4222 // FYSETC S6 v2.0 (STM32F446VE)
-#define BOARD_FYSETC_SPIDER 4223 // FYSETC Spider (STM32F446VE)
-#define BOARD_FLYF407ZG 4224 // FLYmaker FLYF407ZG (STM32F407ZG)
-#define BOARD_MKS_ROBIN2 4225 // MKS_ROBIN2 (STM32F407ZE)
-#define BOARD_MKS_ROBIN_PRO_V2 4226 // MKS Robin Pro V2 (STM32F407VE)
-#define BOARD_MKS_ROBIN_NANO_V3 4227 // MKS Robin Nano V3 (STM32F407VG)
-#define BOARD_MKS_ROBIN_NANO_V3_1 4228 // MKS Robin Nano V3.1 (STM32F407VE)
-#define BOARD_MKS_MONSTER8_V1 4229 // MKS Monster8 V1 (STM32F407VE)
-#define BOARD_MKS_MONSTER8_V2 4230 // MKS Monster8 V2 (STM32F407VE)
-#define BOARD_ANET_ET4 4231 // ANET ET4 V1.x (STM32F407VG)
-#define BOARD_ANET_ET4P 4232 // ANET ET4P V1.x (STM32F407VG)
-#define BOARD_FYSETC_CHEETAH_V20 4233 // FYSETC Cheetah V2.0 (STM32F401RC)
-#define BOARD_TH3D_EZBOARD_V2 4234 // TH3D EZBoard v2.0 (STM32F405RG)
-#define BOARD_OPULO_LUMEN_REV3 4235 // Opulo Lumen PnP Controller REV3 (STM32F407VE / STM32F407VG)
-#define BOARD_MKS_ROBIN_NANO_V1_3_F4 4236 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VE)
-#define BOARD_MKS_EAGLE 4237 // MKS Eagle (STM32F407VE)
-#define BOARD_ARTILLERY_RUBY 4238 // Artillery Ruby (STM32F401RC)
-#define BOARD_FYSETC_SPIDER_V2_2 4239 // FYSETC Spider V2.2 (STM32F446VE)
-#define BOARD_CREALITY_V24S1_301F4 4240 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
-#define BOARD_OPULO_LUMEN_REV4 4241 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
-#define BOARD_FYSETC_SPIDER_KING407 4242 // FYSETC Spider King407 (STM32F407ZG)
-#define BOARD_MKS_SKIPR_V1 4243 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
-#define BOARD_TRONXY_V10 4244 // TRONXY V10 (STM32F446ZE)
-#define BOARD_FF_MOTHERBOARD 4250 // FlashForge board (STM32F407ZG)
-
-//
-// ARM Cortex M7
-//
-
-#define BOARD_REMRAM_V1 5000 // RemRam v1
-#define BOARD_TEENSY41 5001 // Teensy 4.1
-#define BOARD_T41U5XBB 5002 // T41U5XBB Teensy 4.1 breakout board
-#define BOARD_NUCLEO_F767ZI 5003 // ST NUCLEO-F767ZI Dev Board
-#define BOARD_BTT_SKR_SE_BX_V2 5004 // BigTreeTech SKR SE BX V2.0 (STM32H743II)
-#define BOARD_BTT_SKR_SE_BX_V3 5005 // BigTreeTech SKR SE BX V3.0 (STM32H743II)
-#define BOARD_BTT_SKR_V3_0 5006 // BigTreeTech SKR V3.0 (STM32H743VG)
-#define BOARD_BTT_SKR_V3_0_EZ 5007 // BigTreeTech SKR V3.0 EZ (STM32H743VG)
+#define BOARD_ARMED 5200 // Arm'ed STM32F4-based controller
+#define BOARD_RUMBA32_V1_0 5201 // RUMBA32 STM32F446VE based controller from Aus3D
+#define BOARD_RUMBA32_V1_1 5202 // RUMBA32 STM32F446VE based controller from Aus3D
+#define BOARD_RUMBA32_MKS 5203 // RUMBA32 STM32F446VE based controller from Makerbase
+#define BOARD_RUMBA32_BTT 5204 // RUMBA32 STM32F446VE based controller from BIGTREETECH
+#define BOARD_BLACK_STM32F407VE 5205 // BLACK_STM32F407VE
+#define BOARD_BLACK_STM32F407ZE 5206 // BLACK_STM32F407ZE
+#define BOARD_BTT_SKR_MINI_E3_V3_0_1 5207 // BigTreeTech SKR Mini E3 V3.0.1 (STM32F401RC)
+#define BOARD_BTT_SKR_PRO_V1_1 5208 // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
+#define BOARD_BTT_SKR_PRO_V1_2 5209 // BigTreeTech SKR Pro v1.2 (STM32F407ZG)
+#define BOARD_BTT_BTT002_V1_0 5210 // BigTreeTech BTT002 v1.0 (STM32F407VG)
+#define BOARD_BTT_E3_RRF 5211 // BigTreeTech E3 RRF (STM32F407VG)
+#define BOARD_BTT_SKR_V2_0_REV_A 5212 // BigTreeTech SKR v2.0 Rev A (STM32F407VG)
+#define BOARD_BTT_SKR_V2_0_REV_B 5213 // BigTreeTech SKR v2.0 Rev B (STM32F407VG/STM32F429VG)
+#define BOARD_BTT_GTR_V1_0 5214 // BigTreeTech GTR v1.0 (STM32F407IGT)
+#define BOARD_BTT_OCTOPUS_V1_0 5215 // BigTreeTech Octopus v1.0 (STM32F446ZE)
+#define BOARD_BTT_OCTOPUS_V1_1 5216 // BigTreeTech Octopus v1.1 (STM32F446ZE)
+#define BOARD_BTT_OCTOPUS_PRO_V1_0 5217 // BigTreeTech Octopus Pro v1.0 (STM32F446ZE / STM32F429ZG)
+#define BOARD_LERDGE_K 5218 // Lerdge K (STM32F407ZG)
+#define BOARD_LERDGE_S 5219 // Lerdge S (STM32F407VE)
+#define BOARD_LERDGE_X 5220 // Lerdge X (STM32F407VE)
+#define BOARD_VAKE403D 5221 // VAkE 403D (STM32F446VE)
+#define BOARD_FYSETC_S6 5222 // FYSETC S6 (STM32F446VE)
+#define BOARD_FYSETC_S6_V2_0 5223 // FYSETC S6 v2.0 (STM32F446VE)
+#define BOARD_FYSETC_SPIDER 5224 // FYSETC Spider (STM32F446VE)
+#define BOARD_FLYF407ZG 5225 // FLYmaker FLYF407ZG (STM32F407ZG)
+#define BOARD_MKS_ROBIN2 5226 // MKS Robin2 V1.0 (STM32F407ZE)
+#define BOARD_MKS_ROBIN_PRO_V2 5227 // MKS Robin Pro V2 (STM32F407VE)
+#define BOARD_MKS_ROBIN_NANO_V3 5228 // MKS Robin Nano V3 (STM32F407VG)
+#define BOARD_MKS_ROBIN_NANO_V3_1 5229 // MKS Robin Nano V3.1 (STM32F407VE)
+#define BOARD_MKS_MONSTER8_V1 5230 // MKS Monster8 V1 (STM32F407VE)
+#define BOARD_MKS_MONSTER8_V2 5231 // MKS Monster8 V2 (STM32F407VE)
+#define BOARD_ANET_ET4 5232 // ANET ET4 V1.x (STM32F407VG)
+#define BOARD_ANET_ET4P 5233 // ANET ET4P V1.x (STM32F407VG)
+#define BOARD_FYSETC_CHEETAH_V20 5234 // FYSETC Cheetah V2.0 (STM32F401RC)
+#define BOARD_TH3D_EZBOARD_V2 5235 // TH3D EZBoard v2.0 (STM32F405RG)
+#define BOARD_OPULO_LUMEN_REV3 5236 // Opulo Lumen PnP Controller REV3 (STM32F407VE / STM32F407VG)
+#define BOARD_MKS_ROBIN_NANO_V1_3_F4 5237 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VE)
+#define BOARD_MKS_EAGLE 5238 // MKS Eagle (STM32F407VE)
+#define BOARD_ARTILLERY_RUBY 5239 // Artillery Ruby (STM32F401RC)
+#define BOARD_FYSETC_SPIDER_V2_2 5240 // FYSETC Spider V2.2 (STM32F446VE)
+#define BOARD_CREALITY_V24S1_301F4 5241 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
+#define BOARD_OPULO_LUMEN_REV4 5242 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
+#define BOARD_FYSETC_SPIDER_KING407 5243 // FYSETC Spider King407 (STM32F407ZG)
+#define BOARD_MKS_SKIPR_V1 5244 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
+#define BOARD_TRONXY_V10 5245 // TRONXY V10 (STM32F446ZE)
+#define BOARD_FF_MOTHERBOARD 5250 // FlashForge board (STM32F407ZG)
+
+//
+// ARM Cortex-M7
+//
+
+#define BOARD_REMRAM_V1 6000 // RemRam v1
+#define BOARD_TEENSY41 6001 // Teensy 4.1
+#define BOARD_T41U5XBB 6002 // T41U5XBB Teensy 4.1 breakout board
+#define BOARD_NUCLEO_F767ZI 6003 // ST NUCLEO-F767ZI Dev Board
+#define BOARD_BTT_SKR_SE_BX_V2 6004 // BigTreeTech SKR SE BX V2.0 (STM32H743II)
+#define BOARD_BTT_SKR_SE_BX_V3 6005 // BigTreeTech SKR SE BX V3.0 (STM32H743II)
+#define BOARD_BTT_SKR_V3_0 6006 // BigTreeTech SKR V3.0 (STM32H743VG)
+#define BOARD_BTT_SKR_V3_0_EZ 6007 // BigTreeTech SKR V3.0 EZ (STM32H743VG)
+#define BOARD_BTT_OCTOPUS_MAX_EZ_V1_0 6008 // BigTreeTech Octopus Max EZ V1.0 (STM32H723VE / STM32H723ZE)
//
// Espressif ESP32 WiFi
//
-#define BOARD_ESPRESSIF_ESP32 6000 // Generic ESP32
-#define BOARD_MRR_ESPA 6001 // MRR ESPA based on ESP32 (native pins only)
-#define BOARD_MRR_ESPE 6002 // MRR ESPE based on ESP32 (with I2S stepper stream)
-#define BOARD_E4D_BOX 6003 // E4d@BOX
-#define BOARD_RESP32_CUSTOM 6004 // Rutilea ESP32 custom board
-#define BOARD_FYSETC_E4 6005 // FYSETC E4
-#define BOARD_PANDA_ZHU 6006 // Panda_ZHU
-#define BOARD_PANDA_M4 6007 // Panda_M4
-#define BOARD_MKS_TINYBEE 6008 // MKS TinyBee based on ESP32 (with I2S stepper stream)
-#define BOARD_ENWI_ESPNP 6009 // enwi ESPNP based on ESP32 (with I2S stepper stream)
+#define BOARD_ESPRESSIF_ESP32 7000 // Generic ESP32
+#define BOARD_MRR_ESPA 7001 // MRR ESPA based on ESP32 (native pins only)
+#define BOARD_MRR_ESPE 7002 // MRR ESPE based on ESP32 (with I2S stepper stream)
+#define BOARD_E4D_BOX 7003 // E4d@BOX
+#define BOARD_RESP32_CUSTOM 7004 // Rutilea ESP32 custom board
+#define BOARD_FYSETC_E4 7005 // FYSETC E4
+#define BOARD_PANDA_ZHU 7006 // Panda_ZHU
+#define BOARD_PANDA_M4 7007 // Panda_M4
+#define BOARD_MKS_TINYBEE 7008 // MKS TinyBee based on ESP32 (with I2S stepper stream)
+#define BOARD_ENWI_ESPNP 7009 // enwi ESPNP based on ESP32 (with I2S stepper stream)
//
-// SAMD51 ARM Cortex M4
+// SAMD51 ARM Cortex-M4
//
-#define BOARD_AGCM4_RAMPS_144 6100 // RAMPS 1.4.4
-#define BOARD_BRICOLEMON_V1_0 6101 // Bricolemon
-#define BOARD_BRICOLEMON_LITE_V1_0 6102 // Bricolemon Lite
+#define BOARD_AGCM4_RAMPS_144 7100 // RAMPS 1.4.4
+#define BOARD_BRICOLEMON_V1_0 7101 // Bricolemon
+#define BOARD_BRICOLEMON_LITE_V1_0 7102 // Bricolemon Lite
//
-// SAMD21 ARM Cortex M4
+// SAMD21 ARM Cortex-M4
//
-#define BOARD_MINITRONICS20 6103 // Minitronics v2.0
+#define BOARD_MINITRONICS20 7103 // Minitronics v2.0
//
// Custom board
@@ -483,7 +500,7 @@
// Simulations
//
-#define BOARD_LINUX_RAMPS 9999
+#define BOARD_SIMULATED 9999
#define _MB_1(B) (defined(BOARD_##B) && MOTHERBOARD==BOARD_##B)
#define MB(V...) DO(MB,||,V)
diff --git a/Marlin/Marlin/src/core/language.h b/Marlin/Marlin/src/core/language.h
index 545f9df6..58d9eb58 100644
--- a/Marlin/Marlin/src/core/language.h
+++ b/Marlin/Marlin/src/core/language.h
@@ -192,6 +192,7 @@
#define STR_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"
#define STR_ERR_HOTEND_TOO_COLD "Hotend too cold"
#define STR_ERR_EEPROM_WRITE "Error writing to EEPROM!"
+#define STR_ERR_EEPROM_CORRUPT "EEPROM Corrupt"
#define STR_FILAMENT_CHANGE_HEAT_LCD "Press button to heat nozzle"
#define STR_FILAMENT_CHANGE_INSERT_LCD "Insert filament and press button"
diff --git a/Marlin/Marlin/src/core/macros.h b/Marlin/Marlin/src/core/macros.h
index 3029009c..fce7d4eb 100644
--- a/Marlin/Marlin/src/core/macros.h
+++ b/Marlin/Marlin/src/core/macros.h
@@ -634,7 +634,9 @@
#define DEFER4(M) M EMPTY EMPTY EMPTY EMPTY()()()()
// Force define expansion
-#define EVAL(V...) EVAL16(V)
+#define EVAL EVAL16
+#define EVAL4096(V...) EVAL2048(EVAL2048(V))
+#define EVAL2048(V...) EVAL1024(EVAL1024(V))
#define EVAL1024(V...) EVAL512(EVAL512(V))
#define EVAL512(V...) EVAL256(EVAL256(V))
#define EVAL256(V...) EVAL128(EVAL128(V))
@@ -712,10 +714,11 @@
( DEFER2(__RREPEAT2)()(ADD1(_RPT_I),SUB1(_RPT_N),_RPT_OP,V) ) \
( /* Do nothing */ )
#define __RREPEAT2() _RREPEAT2
-#define RREPEAT_S(S,N,OP) EVAL1024(_RREPEAT(S,SUB##S(N),OP))
-#define RREPEAT(N,OP) RREPEAT_S(0,N,OP)
-#define RREPEAT2_S(S,N,OP,V...) EVAL1024(_RREPEAT2(S,SUB##S(N),OP,V))
-#define RREPEAT2(N,OP,V...) RREPEAT2_S(0,N,OP,V)
+#define RREPEAT_S(S,N,OP) EVAL1024(_RREPEAT(S,SUB##S(N),OP))
+#define RREPEAT(N,OP) RREPEAT_S(0,N,OP)
+#define RREPEAT_1(N,OP) RREPEAT_S(1,INCREMENT(N),OP)
+#define RREPEAT2_S(S,N,OP,V...) EVAL1024(_RREPEAT2(S,SUB##S(N),OP,V))
+#define RREPEAT2(N,OP,V...) RREPEAT2_S(0,N,OP,V)
// Call OP(A) with each item as an argument
#define _MAP(_MAP_OP,A,V...) \
diff --git a/Marlin/Marlin/src/core/serial.cpp b/Marlin/Marlin/src/core/serial.cpp
index 727b191d..64704c1e 100644
--- a/Marlin/Marlin/src/core/serial.cpp
+++ b/Marlin/Marlin/src/core/serial.cpp
@@ -85,11 +85,6 @@ void serial_offset(const_float_t v, const uint8_t sp/*=0*/) {
SERIAL_DECIMAL(v);
}
-void serial_ternary(const bool onoff, FSTR_P const pre, FSTR_P const on, FSTR_P const off, FSTR_P const post/*=nullptr*/) {
- if (pre) serial_print(pre);
- serial_print(onoff ? on : off);
- if (post) serial_print(post);
-}
void serialprint_onoff(const bool onoff) { serial_print(onoff ? F(STR_ON) : F(STR_OFF)); }
void serialprintln_onoff(const bool onoff) { serialprint_onoff(onoff); SERIAL_EOL(); }
void serialprint_truefalse(const bool tf) { serial_print(tf ? F("true") : F("false")); }
diff --git a/Marlin/Marlin/src/core/serial.h b/Marlin/Marlin/src/core/serial.h
index c19bc087..a741d4b1 100644
--- a/Marlin/Marlin/src/core/serial.h
+++ b/Marlin/Marlin/src/core/serial.h
@@ -327,7 +327,12 @@ inline void serial_echolnpair(FSTR_P const fstr, T v) { serial_echolnpair_P(FTOP
void serial_echo_start();
void serial_error_start();
-void serial_ternary(const bool onoff, FSTR_P const pre, FSTR_P const on, FSTR_P const off, FSTR_P const post=nullptr);
+inline void serial_ternary(const bool onoff, FSTR_P const pre, FSTR_P const on, FSTR_P const off, FSTR_P const post=nullptr) {
+ if (pre) serial_print(pre);
+ if (onoff && on) serial_print(on);
+ if (!onoff && off) serial_print(off);
+ if (post) serial_print(post);
+}
void serialprint_onoff(const bool onoff);
void serialprintln_onoff(const bool onoff);
void serialprint_truefalse(const bool tf);
@@ -337,8 +342,8 @@ void serial_offset(const_float_t v, const uint8_t sp=0); // For v==0 draw space
void print_bin(const uint16_t val);
void print_pos(NUM_AXIS_ARGS(const_float_t), FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr);
-inline void print_pos(const xyz_pos_t &xyz, FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr) {
- print_pos(NUM_AXIS_ELEM(xyz), prefix, suffix);
+inline void print_pos(const xyze_pos_t &xyze, FSTR_P const prefix=nullptr, FSTR_P const suffix=nullptr) {
+ print_pos(NUM_AXIS_ELEM(xyze), prefix, suffix);
}
#define SERIAL_POS(SUFFIX,VAR) do { print_pos(VAR, F(" " STRINGIFY(VAR) "="), F(" : " SUFFIX "\n")); }while(0)
diff --git a/Marlin/Marlin/src/core/types.h b/Marlin/Marlin/src/core/types.h
index 61c18244..f1fae85b 100644
--- a/Marlin/Marlin/src/core/types.h
+++ b/Marlin/Marlin/src/core/types.h
@@ -430,21 +430,24 @@ struct XYval {
FI XYval& operator+=(const XYval &rs) { x += rs.x; y += rs.y; return *this; }
FI XYval& operator-=(const XYval &rs) { x -= rs.x; y -= rs.y; return *this; }
FI XYval& operator*=(const XYval &rs) { x *= rs.x; y *= rs.y; return *this; }
- FI XYval& operator+=(const XYZval &rs) { x += rs.x; y += rs.y; return *this; }
- FI XYval& operator-=(const XYZval &rs) { x -= rs.x; y -= rs.y; return *this; }
- FI XYval& operator*=(const XYZval &rs) { x *= rs.x; y *= rs.y; return *this; }
- FI XYval& operator+=(const XYZEval &rs) { x += rs.x; y += rs.y; return *this; }
- FI XYval& operator-=(const XYZEval &rs) { x -= rs.x; y -= rs.y; return *this; }
- FI XYval& operator*=(const XYZEval &rs) { x *= rs.x; y *= rs.y; return *this; }
+ FI XYval& operator/=(const XYval &rs) { x /= rs.x; y /= rs.y; return *this; }
+ FI XYval& operator+=(const XYZval &rs) { NUM_AXIS_CODE(x += rs.x, y += rs.y,,,,,,, ); return *this; }
+ FI XYval& operator-=(const XYZval &rs) { NUM_AXIS_CODE(x -= rs.x, y -= rs.y,,,,,,, ); return *this; }
+ FI XYval& operator*=(const XYZval &rs) { NUM_AXIS_CODE(x *= rs.x, y *= rs.y,,,,,,, ); return *this; }
+ FI XYval& operator/=(const XYZval &rs) { NUM_AXIS_CODE(x /= rs.x, y /= rs.y,,,,,,, ); return *this; }
+ FI XYval& operator+=(const XYZEval &rs) { NUM_AXIS_CODE(x += rs.x, y += rs.y,,,,,,, ); return *this; }
+ FI XYval& operator-=(const XYZEval &rs) { NUM_AXIS_CODE(x -= rs.x, y -= rs.y,,,,,,, ); return *this; }
+ FI XYval& operator*=(const XYZEval &rs) { NUM_AXIS_CODE(x *= rs.x, y *= rs.y,,,,,,, ); return *this; }
+ FI XYval& operator/=(const XYZEval &rs) { NUM_AXIS_CODE(x /= rs.x, y /= rs.y,,,,,,, ); return *this; }
FI XYval& operator*=(const float &p) { x *= p; y *= p; return *this; }
FI XYval& operator*=(const int &p) { x *= p; y *= p; return *this; }
FI XYval& operator>>=(const int &p) { _RS(x); _RS(y); return *this; }
FI XYval& operator<<=(const int &p) { _LS(x); _LS(y); return *this; }
// Exact comparisons. For floats a "NEAR" operation may be better.
- FI bool operator==(const XYval &rs) const { return x == rs.x && y == rs.y; }
- FI bool operator==(const XYZval &rs) const { return x == rs.x && y == rs.y; }
- FI bool operator==(const XYZEval &rs) const { return x == rs.x && y == rs.y; }
+ FI bool operator==(const XYval &rs) const { return NUM_AXIS_GANG(x == rs.x, && y == rs.y,,,,,,, ); }
+ FI bool operator==(const XYZval &rs) const { return NUM_AXIS_GANG(x == rs.x, && y == rs.y,,,,,,, ); }
+ FI bool operator==(const XYZEval &rs) const { return NUM_AXIS_GANG(x == rs.x, && y == rs.y,,,,,,, ); }
FI bool operator!=(const XYval &rs) const { return !operator==(rs); }
FI bool operator!=(const XYZval &rs) const { return !operator==(rs); }
FI bool operator!=(const XYZEval &rs) const { return !operator==(rs); }
@@ -465,15 +468,9 @@ struct XYZval {
FI void reset() { NUM_AXIS_GANG(x =, y =, z =, i =, j =, k =, u =, v =, w =) 0; }
// Setters taking struct types and arrays
- FI void set(const T px) { x = px; }
- FI void set(const T px, const T py) { x = px; y = py; }
- FI void set(const XYval pxy) { x = pxy.x; y = pxy.y; }
- FI void set(const XYval pxy, const T pz) { NUM_AXIS_CODE(x = pxy.x, y = pxy.y, z = pz, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP); }
- FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; }
- #if HAS_Z_AXIS
- FI void set(const T (&arr)[NUM_AXES]) { NUM_AXIS_CODE(x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5], u = arr[6], v = arr[7], w = arr[8]); }
- FI void set(NUM_AXIS_ARGS(const T)) { NUM_AXIS_CODE(a = x, b = y, c = z, _i = i, _j = j, _k = k, _u = u, _v = v, _w = w ); }
- #endif
+ FI void set(const XYval pxy) { NUM_AXIS_CODE(x = pxy.x, y = pxy.y,,,,,,,); }
+ FI void set(const XYval pxy, const T pz) { NUM_AXIS_CODE(x = pxy.x, y = pxy.y, z = pz,,,,,,); }
+ FI void set(const T (&arr)[NUM_AXES]) { NUM_AXIS_CODE(x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5], u = arr[6], v = arr[7], w = arr[8]); }
#if LOGICAL_AXES > NUM_AXES
FI void set(const T (&arr)[LOGICAL_AXES]) { NUM_AXIS_CODE(x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5], u = arr[6], v = arr[7], w = arr[8]); }
FI void set(LOGICAL_AXIS_ARGS(const T)) { NUM_AXIS_CODE(a = x, b = y, c = z, _i = i, _j = j, _k = k, _u = u, _v = v, _w = w ); }
@@ -481,6 +478,17 @@ struct XYZval {
FI void set(const T (&arr)[DISTINCT_AXES]) { NUM_AXIS_CODE(x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5], u = arr[6], v = arr[7], w = arr[8]); }
#endif
#endif
+
+ // Setter for all individual args
+ FI void set(NUM_AXIS_ARGS(const T)) { NUM_AXIS_CODE(a = x, b = y, c = z, _i = i, _j = j, _k = k, _u = u, _v = v, _w = w); }
+
+ // Setters with fewer elements leave the rest untouched
+ #if HAS_Y_AXIS
+ FI void set(const T px) { x = px; }
+ #endif
+ #if HAS_Z_AXIS
+ FI void set(const T px, const T py) { x = px; y = py; }
+ #endif
#if HAS_I_AXIS
FI void set(const T px, const T py, const T pz) { x = px; y = py; z = pz; }
#endif
@@ -545,14 +553,14 @@ struct XYZval {
FI XYZval& operator= (const XYZEval &rs) { set(NUM_AXIS_ELEM(rs)); return *this; }
// Override other operators to get intuitive behaviors
- FI XYZval operator+ (const XYval &rs) const { XYZval ls = *this; NUM_AXIS_CODE(ls.x += rs.x, ls.y += rs.y, NOOP , NOOP , NOOP , NOOP , NOOP , NOOP , NOOP ); return ls; }
- FI XYZval operator+ (const XYval &rs) { XYZval ls = *this; NUM_AXIS_CODE(ls.x += rs.x, ls.y += rs.y, NOOP , NOOP , NOOP , NOOP , NOOP , NOOP , NOOP ); return ls; }
- FI XYZval operator- (const XYval &rs) const { XYZval ls = *this; NUM_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y, NOOP , NOOP , NOOP , NOOP , NOOP , NOOP , NOOP ); return ls; }
- FI XYZval operator- (const XYval &rs) { XYZval ls = *this; NUM_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y, NOOP , NOOP , NOOP , NOOP , NOOP , NOOP , NOOP ); return ls; }
- FI XYZval operator* (const XYval &rs) const { XYZval ls = *this; NUM_AXIS_CODE(ls.x *= rs.x, ls.y *= rs.y, NOOP , NOOP , NOOP , NOOP , NOOP , NOOP , NOOP ); return ls; }
- FI XYZval operator* (const XYval &rs) { XYZval ls = *this; NUM_AXIS_CODE(ls.x *= rs.x, ls.y *= rs.y, NOOP , NOOP , NOOP , NOOP , NOOP , NOOP , NOOP ); return ls; }
- FI XYZval operator/ (const XYval &rs) const { XYZval ls = *this; NUM_AXIS_CODE(ls.x /= rs.x, ls.y /= rs.y, NOOP , NOOP , NOOP , NOOP , NOOP , NOOP , NOOP ); return ls; }
- FI XYZval operator/ (const XYval &rs) { XYZval ls = *this; NUM_AXIS_CODE(ls.x /= rs.x, ls.y /= rs.y, NOOP , NOOP , NOOP , NOOP , NOOP , NOOP , NOOP ); return ls; }
+ FI XYZval operator+ (const XYval &rs) const { XYZval ls = *this; NUM_AXIS_CODE(ls.x += rs.x, ls.y += rs.y,,,,,,, ); return ls; }
+ FI XYZval operator+ (const XYval &rs) { XYZval ls = *this; NUM_AXIS_CODE(ls.x += rs.x, ls.y += rs.y,,,,,,, ); return ls; }
+ FI XYZval operator- (const XYval &rs) const { XYZval ls = *this; NUM_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y,,,,,,, ); return ls; }
+ FI XYZval operator- (const XYval &rs) { XYZval ls = *this; NUM_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y,,,,,,, ); return ls; }
+ FI XYZval operator* (const XYval &rs) const { XYZval ls = *this; NUM_AXIS_CODE(ls.x *= rs.x, ls.y *= rs.y,,,,,,, ); return ls; }
+ FI XYZval operator* (const XYval &rs) { XYZval ls = *this; NUM_AXIS_CODE(ls.x *= rs.x, ls.y *= rs.y,,,,,,, ); return ls; }
+ FI XYZval operator/ (const XYval &rs) const { XYZval ls = *this; NUM_AXIS_CODE(ls.x /= rs.x, ls.y /= rs.y,,,,,,, ); return ls; }
+ FI XYZval operator/ (const XYval &rs) { XYZval ls = *this; NUM_AXIS_CODE(ls.x /= rs.x, ls.y /= rs.y,,,,,,, ); return ls; }
FI XYZval operator+ (const XYZval &rs) const { XYZval ls = *this; NUM_AXIS_CODE(ls.x += rs.x, ls.y += rs.y, ls.z += rs.z, ls.i += rs.i, ls.j += rs.j, ls.k += rs.k, ls.u += rs.u, ls.v += rs.v, ls.w += rs.w); return ls; }
FI XYZval operator+ (const XYZval &rs) { XYZval ls = *this; NUM_AXIS_CODE(ls.x += rs.x, ls.y += rs.y, ls.z += rs.z, ls.i += rs.i, ls.j += rs.j, ls.k += rs.k, ls.u += rs.u, ls.v += rs.v, ls.w += rs.w); return ls; }
FI XYZval operator- (const XYZval &rs) const { XYZval ls = *this; NUM_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y, ls.z -= rs.z, ls.i -= rs.i, ls.j -= rs.j, ls.k -= rs.k, ls.u -= rs.u, ls.v -= rs.v, ls.w -= rs.w); return ls; }
@@ -585,10 +593,10 @@ struct XYZval {
FI XYZval operator-() { XYZval o = *this; NUM_AXIS_CODE(o.x = -x, o.y = -y, o.z = -z, o.i = -i, o.j = -j, o.k = -k, o.u = -u, o.v = -v, o.w = -w); return o; }
// Modifier operators
- FI XYZval& operator+=(const XYval &rs) { NUM_AXIS_CODE(x += rs.x, y += rs.y, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP ); return *this; }
- FI XYZval& operator-=(const XYval &rs) { NUM_AXIS_CODE(x -= rs.x, y -= rs.y, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP ); return *this; }
- FI XYZval& operator*=(const XYval &rs) { NUM_AXIS_CODE(x *= rs.x, y *= rs.y, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP ); return *this; }
- FI XYZval& operator/=(const XYval &rs) { NUM_AXIS_CODE(x /= rs.x, y /= rs.y, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP, NOOP ); return *this; }
+ FI XYZval& operator+=(const XYval &rs) { NUM_AXIS_CODE(x += rs.x, y += rs.y,,,,,,, ); return *this; }
+ FI XYZval& operator-=(const XYval &rs) { NUM_AXIS_CODE(x -= rs.x, y -= rs.y,,,,,,, ); return *this; }
+ FI XYZval& operator*=(const XYval &rs) { NUM_AXIS_CODE(x *= rs.x, y *= rs.y,,,,,,, ); return *this; }
+ FI XYZval& operator/=(const XYval &rs) { NUM_AXIS_CODE(x /= rs.x, y /= rs.y,,,,,,, ); return *this; }
FI XYZval& operator+=(const XYZval &rs) { NUM_AXIS_CODE(x += rs.x, y += rs.y, z += rs.z, i += rs.i, j += rs.j, k += rs.k, u += rs.u, v += rs.v, w += rs.w); return *this; }
FI XYZval& operator-=(const XYZval &rs) { NUM_AXIS_CODE(x -= rs.x, y -= rs.y, z -= rs.z, i -= rs.i, j -= rs.j, k -= rs.k, u -= rs.u, v -= rs.v, w -= rs.w); return *this; }
FI XYZval& operator*=(const XYZval &rs) { NUM_AXIS_CODE(x *= rs.x, y *= rs.y, z *= rs.z, i *= rs.i, j *= rs.j, k *= rs.k, u *= rs.u, v *= rs.v, w *= rs.w); return *this; }
@@ -620,9 +628,31 @@ struct XYZEval {
// Reset all to 0
FI void reset() { LOGICAL_AXIS_GANG(e =, x =, y =, z =, i =, j =, k =, u =, v =, w =) 0; }
- // Setters for some number of linear axes, not all
- FI void set(const T px) { x = px; }
- FI void set(const T px, const T py) { x = px; y = py; }
+ // Setters taking struct types and arrays
+ FI void set(const XYval pxy) { x = pxy.x; OPTCODE(HAS_Y_AXIS, y = pxy.y) }
+ FI void set(const XYZval pxyz) { set(NUM_AXIS_ELEM(pxyz)); }
+ FI void set(const XYval pxy, const T pz) { set(pxy); TERN_(HAS_Z_AXIS, z = pz); }
+ FI void set(const T (&arr)[NUM_AXES]) { NUM_AXIS_CODE(x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5], u = arr[6], v = arr[7], w = arr[8]); }
+ #if LOGICAL_AXES > NUM_AXES
+ FI void set(const T (&arr)[LOGICAL_AXES]) { LOGICAL_AXIS_CODE(e = arr[LOGICAL_AXES-1], x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5], u = arr[6], v = arr[7], w = arr[8]); }
+ FI void set(const XYval pxy, const T pz, const T pe) { set(pxy, pz); e = pe; }
+ FI void set(const XYZval pxyz, const T pe) { set(pxyz); e = pe; }
+ FI void set(LOGICAL_AXIS_ARGS(const T)) { LOGICAL_AXIS_CODE(_e = e, a = x, b = y, c = z, _i = i, _j = j, _k = k, _u = u, _v = v, _w = w); }
+ #if DISTINCT_AXES > LOGICAL_AXES
+ FI void set(const T (&arr)[DISTINCT_AXES]) { LOGICAL_AXIS_CODE(e = arr[LOGICAL_AXES-1], x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5], u = arr[6], v = arr[7], w = arr[8]); }
+ #endif
+ #endif
+
+ // Setter for all individual args
+ FI void set(NUM_AXIS_ARGS(const T)) { NUM_AXIS_CODE(a = x, b = y, c = z, _i = i, _j = j, _k = k, _u = u, _v = v, _w = w); }
+
+ // Setters with fewer elements leave the rest untouched
+ #if HAS_Y_AXIS
+ FI void set(const T px) { x = px; }
+ #endif
+ #if HAS_Z_AXIS
+ FI void set(const T px, const T py) { x = px; y = py; }
+ #endif
#if HAS_I_AXIS
FI void set(const T px, const T py, const T pz) { x = px; y = py; z = pz; }
#endif
@@ -642,19 +672,6 @@ struct XYZEval {
FI void set(const T px, const T py, const T pz, const T pi, const T pj, const T pk, const T pu, const T pv) { x = px; y = py; z = pz; i = pi; j = pj; k = pk; u = pu; v = pv; }
#endif
- // Setters taking struct types and arrays
- FI void set(const XYval pxy) { x = pxy.x; y = pxy.y; }
- FI void set(const XYZval pxyz) { set(NUM_AXIS_ELEM(pxyz)); }
- #if HAS_Z_AXIS
- FI void set(NUM_AXIS_ARGS(const T)) { NUM_AXIS_CODE(a = x, b = y, c = z, _i = i, _j = j, _k = k, _u = u, _v = v, _w = w); }
- #endif
- FI void set(const XYval pxy, const T pz) { set(pxy); TERN_(HAS_Z_AXIS, z = pz); }
- #if LOGICAL_AXES > NUM_AXES
- FI void set(const XYval pxy, const T pz, const T pe) { set(pxy, pz); e = pe; }
- FI void set(const XYZval pxyz, const T pe) { set(pxyz); e = pe; }
- FI void set(LOGICAL_AXIS_ARGS(const T)) { LOGICAL_AXIS_CODE(_e = e, a = x, b = y, c = z, _i = i, _j = j, _k = k, _u = u, _v = v, _w = w); }
- #endif
-
// Length reduced to one dimension
FI T magnitude() const { return (T)sqrtf(LOGICAL_AXIS_GANG(+ e*e, + x*x, + y*y, + z*z, + i*i, + j*j, + k*k, + u*u, + v*v, + w*w)); }
// Pointer to the data as a simple array
@@ -739,10 +756,10 @@ struct XYZEval {
FI XYZEval operator-() { return LOGICAL_AXIS_ARRAY(-e, -x, -y, -z, -i, -j, -k, -u, -v, -w); }
// Modifier operators
- FI XYZEval& operator+=(const XYval &rs) { x += rs.x; y += rs.y; return *this; }
- FI XYZEval& operator-=(const XYval &rs) { x -= rs.x; y -= rs.y; return *this; }
- FI XYZEval& operator*=(const XYval &rs) { x *= rs.x; y *= rs.y; return *this; }
- FI XYZEval& operator/=(const XYval &rs) { x /= rs.x; y /= rs.y; return *this; }
+ FI XYZEval& operator+=(const XYval &rs) { NUM_AXIS_CODE(x += rs.x, y += rs.y,,,,,,, ); return *this; }
+ FI XYZEval& operator-=(const XYval &rs) { NUM_AXIS_CODE(x -= rs.x, y -= rs.y,,,,,,, ); return *this; }
+ FI XYZEval& operator*=(const XYval &rs) { NUM_AXIS_CODE(x *= rs.x, y *= rs.y,,,,,,, ); return *this; }
+ FI XYZEval& operator/=(const XYval &rs) { NUM_AXIS_CODE(x /= rs.x, y /= rs.y,,,,,,, ); return *this; }
FI XYZEval& operator+=(const XYZval &rs) { NUM_AXIS_CODE(x += rs.x, y += rs.y, z += rs.z, i += rs.i, j += rs.j, k += rs.k, u += rs.u, v += rs.v, w += rs.w); return *this; }
FI XYZEval& operator-=(const XYZval &rs) { NUM_AXIS_CODE(x -= rs.x, y -= rs.y, z -= rs.z, i -= rs.i, j -= rs.j, k -= rs.k, u -= rs.u, v -= rs.v, w -= rs.w); return *this; }
FI XYZEval& operator*=(const XYZval &rs) { NUM_AXIS_CODE(x *= rs.x, y *= rs.y, z *= rs.z, i *= rs.i, j *= rs.j, k *= rs.k, u *= rs.u, v *= rs.v, w *= rs.w); return *this; }
diff --git a/Marlin/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h b/Marlin/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h
index aa97cb57..0193b4f4 100644
--- a/Marlin/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h
+++ b/Marlin/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h
@@ -32,8 +32,8 @@ enum MeshLevelingState : char {
MeshReset // G29 S5
};
-#define MESH_X_DIST (float(MESH_MAX_X - (MESH_MIN_X)) / (GRID_MAX_CELLS_X))
-#define MESH_Y_DIST (float(MESH_MAX_Y - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y))
+#define MESH_X_DIST (float((MESH_MAX_X) - (MESH_MIN_X)) / (GRID_MAX_CELLS_X))
+#define MESH_Y_DIST (float((MESH_MAX_Y) - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y))
class mesh_bed_leveling {
public:
diff --git a/Marlin/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/Marlin/src/feature/bedlevel/ubl/ubl.cpp
index f2af1445..b7ee6aee 100644
--- a/Marlin/Marlin/src/feature/bedlevel/ubl/ubl.cpp
+++ b/Marlin/Marlin/src/feature/bedlevel/ubl/ubl.cpp
@@ -59,7 +59,7 @@ void unified_bed_leveling::report_current_mesh() {
void unified_bed_leveling::report_state() {
echo_name();
- SERIAL_ECHO_TERNARY(planner.leveling_active, " System v" UBL_VERSION " ", "", "in", "active\n");
+ serial_ternary(planner.leveling_active, F(" System v" UBL_VERSION " "), nullptr, F("in"), F("active\n"));
serial_delay(50);
}
diff --git a/Marlin/Marlin/src/feature/bedlevel/ubl/ubl.h b/Marlin/Marlin/src/feature/bedlevel/ubl/ubl.h
index a7103d6e..05a937c9 100644
--- a/Marlin/Marlin/src/feature/bedlevel/ubl/ubl.h
+++ b/Marlin/Marlin/src/feature/bedlevel/ubl/ubl.h
@@ -38,8 +38,8 @@ enum MeshPointType : char { INVALID, REAL, SET_IN_BITMAP, CLOSEST };
struct mesh_index_pair;
-#define MESH_X_DIST (float(MESH_MAX_X - (MESH_MIN_X)) / (GRID_MAX_CELLS_X))
-#define MESH_Y_DIST (float(MESH_MAX_Y - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y))
+#define MESH_X_DIST (float((MESH_MAX_X) - (MESH_MIN_X)) / (GRID_MAX_CELLS_X))
+#define MESH_Y_DIST (float((MESH_MAX_Y) - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y))
#if ENABLED(OPTIMIZED_MESH_STORAGE)
typedef int16_t mesh_store_t[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
@@ -264,9 +264,9 @@ class unified_bed_leveling {
return UBL_Z_RAISE_WHEN_OFF_MESH;
#endif
- const uint8_t mx = _MIN(cx, (GRID_MAX_POINTS_X) - 2) + 1, my = _MIN(cy, (GRID_MAX_POINTS_Y) - 2) + 1,
- x0 = get_mesh_x(cx), x1 = get_mesh_x(cx + 1);
- const float z1 = calc_z0(rx0, x0, z_values[cx][cy], x1, z_values[mx][cy]),
+ const uint8_t mx = _MIN(cx, (GRID_MAX_POINTS_X) - 2) + 1, my = _MIN(cy, (GRID_MAX_POINTS_Y) - 2) + 1;
+ const float x0 = get_mesh_x(cx), x1 = get_mesh_x(cx + 1),
+ z1 = calc_z0(rx0, x0, z_values[cx][cy], x1, z_values[mx][cy]),
z2 = calc_z0(rx0, x0, z_values[cx][my], x1, z_values[mx][my]);
float z0 = calc_z0(ry0, get_mesh_y(cy), z1, get_mesh_y(cy + 1), z2);
diff --git a/Marlin/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
index d6cb0b76..aa69b946 100644
--- a/Marlin/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
+++ b/Marlin/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
@@ -318,9 +318,7 @@ void unified_bed_leveling::G29() {
TERN_(HAS_MULTI_HOTEND, if (active_extruder != 0) tool_change(0, true));
// Position bed horizontally and Z probe vertically.
- #if defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
- || defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
- || defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
+ #if HAS_SAFE_BED_LEVELING
xyze_pos_t safe_position = current_position;
#ifdef SAFE_BED_LEVELING_START_X
safe_position.x = SAFE_BED_LEVELING_START_X;
@@ -351,7 +349,7 @@ void unified_bed_leveling::G29() {
#endif
do_blocking_move_to(safe_position);
- #endif
+ #endif // HAS_SAFE_BED_LEVELING
}
// Invalidate one or more nearby mesh points, possibly all.
@@ -887,8 +885,32 @@ void set_message_with_feedback(FSTR_P const fstr) {
ui.capture();
save_ubl_active_state_and_disable(); // Disable bed level correction for probing
- do_blocking_move_to(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)), MANUAL_PROBE_START_Z);
- //, _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]) * 0.5f);
+ do_blocking_move_to(
+ xyz_pos_t({
+ 0.5f * ((MESH_MAX_X) - (MESH_MIN_X)),
+ 0.5f * ((MESH_MAX_Y) - (MESH_MIN_Y)),
+ MANUAL_PROBE_START_Z
+ #ifdef SAFE_BED_LEVELING_START_I
+ , SAFE_BED_LEVELING_START_I
+ #endif
+ #ifdef SAFE_BED_LEVELING_START_J
+ , SAFE_BED_LEVELING_START_J
+ #endif
+ #ifdef SAFE_BED_LEVELING_START_K
+ , SAFE_BED_LEVELING_START_K
+ #endif
+ #ifdef SAFE_BED_LEVELING_START_U
+ , SAFE_BED_LEVELING_START_U
+ #endif
+ #ifdef SAFE_BED_LEVELING_START_V
+ , SAFE_BED_LEVELING_START_V
+ #endif
+ #ifdef SAFE_BED_LEVELING_START_W
+ , SAFE_BED_LEVELING_START_W
+ #endif
+ })
+ //, _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]) * 0.5f
+ );
planner.synchronize();
SERIAL_ECHOPGM("Place shim under nozzle");
@@ -1467,7 +1489,7 @@ void unified_bed_leveling::smart_fill_mesh() {
float measured_z;
bool abort_flag = false;
- #ifdef VALIDATE_MESH_TILT
+ #if ENABLED(VALIDATE_MESH_TILT)
float z1, z2, z3; // Needed for algorithm validation below
#endif
@@ -1483,9 +1505,7 @@ void unified_bed_leveling::smart_fill_mesh() {
abort_flag = true;
else {
measured_z -= get_z_correction(points[0]);
- #ifdef VALIDATE_MESH_TILT
- z1 = measured_z;
- #endif
+ TERN_(VALIDATE_MESH_TILT, z1 = measured_z);
if (param.V_verbosity > 3) {
serial_spaces(16);
SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
@@ -1498,9 +1518,7 @@ void unified_bed_leveling::smart_fill_mesh() {
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " 2/3"), GET_TEXT(MSG_LCD_TILTING_MESH)));
measured_z = probe.probe_at_point(points[1], PROBE_PT_RAISE, param.V_verbosity);
- #ifdef VALIDATE_MESH_TILT
- z2 = measured_z;
- #endif
+ TERN_(VALIDATE_MESH_TILT, z2 = measured_z);
if (isnan(measured_z))
abort_flag = true;
else {
@@ -1518,9 +1536,7 @@ void unified_bed_leveling::smart_fill_mesh() {
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " 3/3"), GET_TEXT(MSG_LCD_TILTING_MESH)));
measured_z = probe.probe_at_point(points[2], PROBE_PT_LAST_STOW, param.V_verbosity);
- #ifdef VALIDATE_MESH_TILT
- z3 = measured_z;
- #endif
+ TERN_(VALIDATE_MESH_TILT, z3 = measured_z);
if (isnan(measured_z))
abort_flag = true;
else {
@@ -1667,7 +1683,7 @@ void unified_bed_leveling::smart_fill_mesh() {
* The Z error between the probed point locations and the get_z_correction()
* numbers for those locations should be 0.
*/
- #ifdef VALIDATE_MESH_TILT
+ #if ENABLED(VALIDATE_MESH_TILT)
auto d_from = []{ DEBUG_ECHOPGM("D from "); };
auto normed = [&](const xy_pos_t &pos, const_float_t zadd) {
return normal.x * pos.x + normal.y * pos.y + zadd;
diff --git a/Marlin/Marlin/src/feature/bltouch.cpp b/Marlin/Marlin/src/feature/bltouch.cpp
index fe56341a..1c6c1eb4 100644
--- a/Marlin/Marlin/src/feature/bltouch.cpp
+++ b/Marlin/Marlin/src/feature/bltouch.cpp
@@ -42,9 +42,14 @@ bool BLTouch::od_5v_mode; // Initialized by settings.load, 0 = Open Drai
#include "../core/debug_out.h"
bool BLTouch::command(const BLTCommand cmd, const millis_t &ms) {
- if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch Command :", cmd);
- servo[Z_PROBE_SERVO_NR].move(cmd);
- safe_delay(_MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay
+ const BLTCommand current = servo[Z_PROBE_SERVO_NR].read();
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch from ", current, " to ", cmd);
+ // If the new command is the same, skip it (and the delay).
+ // The previous write should've already delayed to detect the alarm.
+ if (cmd != current) {
+ servo[Z_PROBE_SERVO_NR].move(cmd);
+ safe_delay(_MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay
+ }
return triggered();
}
diff --git a/Marlin/Marlin/src/feature/host_actions.h b/Marlin/Marlin/src/feature/host_actions.h
index 3f755623..c030ebad 100644
--- a/Marlin/Marlin/src/feature/host_actions.h
+++ b/Marlin/Marlin/src/feature/host_actions.h
@@ -35,6 +35,8 @@
PROMPT_INFO
};
+ extern const char CONTINUE_STR[], DISMISS_STR[];
+
#endif
class HostUI {
@@ -111,6 +113,9 @@ class HostUI {
static void prompt_do(const PromptReason reason, FSTR_P const pstr, const char extra_char, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr);
static void prompt_do(const PromptReason reason, const char * const cstr, const char extra_char, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr);
+ static void continue_prompt(FSTR_P const fstr) { prompt_do(PROMPT_USER_CONTINUE, fstr, FPSTR(CONTINUE_STR)); }
+ static void continue_prompt(const char * const cstr) { prompt_do(PROMPT_USER_CONTINUE, cstr, FPSTR(CONTINUE_STR)); }
+
static void prompt_open(const PromptReason reason, FSTR_P const pstr, FSTR_P const btn1=nullptr, FSTR_P const btn2=nullptr) {
if (host_prompt_reason == PROMPT_NOT_DEFINED) prompt_do(reason, pstr, btn1, btn2);
}
@@ -124,5 +129,3 @@ class HostUI {
};
extern HostUI hostui;
-
-extern const char CONTINUE_STR[], DISMISS_STR[];
diff --git a/Marlin/Marlin/src/feature/leds/pca9632.cpp b/Marlin/Marlin/src/feature/leds/pca9632.cpp
index 83c1ee60..0791017d 100644
--- a/Marlin/Marlin/src/feature/leds/pca9632.cpp
+++ b/Marlin/Marlin/src/feature/leds/pca9632.cpp
@@ -155,7 +155,7 @@ void PCA9632_set_led_color(const LEDColor &color) {
#if ENABLED(PCA9632_BUZZER)
- void PCA9632_buzz(const long, const uint16_t) {
+ void PCA9632_buzz(const long, const uint16_t=0) {
uint8_t data[] = PCA9632_BUZZER_DATA;
Wire.beginTransmission(I2C_ADDRESS(PCA9632_ADDRESS));
Wire.write(data, sizeof(data));
diff --git a/Marlin/Marlin/src/feature/leds/pca9632.h b/Marlin/Marlin/src/feature/leds/pca9632.h
index fb59a8c1..adef0200 100644
--- a/Marlin/Marlin/src/feature/leds/pca9632.h
+++ b/Marlin/Marlin/src/feature/leds/pca9632.h
@@ -33,5 +33,5 @@ void PCA9632_set_led_color(const LEDColor &color);
#if ENABLED(PCA9632_BUZZER)
#include
- void PCA9632_buzz(const long, const uint16_t);
+ void PCA9632_buzz(const long, const uint16_t=0);
#endif
diff --git a/Marlin/Marlin/src/feature/mixing.cpp b/Marlin/Marlin/src/feature/mixing.cpp
index b1a069e3..cf88b806 100644
--- a/Marlin/Marlin/src/feature/mixing.cpp
+++ b/Marlin/Marlin/src/feature/mixing.cpp
@@ -24,8 +24,6 @@
#if ENABLED(MIXING_EXTRUDER)
-//#define MIXER_NORMALIZER_DEBUG
-
#include "mixing.h"
Mixer mixer;
diff --git a/Marlin/Marlin/src/feature/mixing.h b/Marlin/Marlin/src/feature/mixing.h
index 85d52d69..3a14fdad 100644
--- a/Marlin/Marlin/src/feature/mixing.h
+++ b/Marlin/Marlin/src/feature/mixing.h
@@ -148,8 +148,7 @@ class Mixer {
static void update_mix_from_vtool(const uint8_t j=selected_vtool) {
float ctot = 0;
MIXER_STEPPER_LOOP(i) ctot += color[j][i];
- //MIXER_STEPPER_LOOP(i) mix[i] = 100.0f * color[j][i] / ctot;
- MIXER_STEPPER_LOOP(i) mix[i] = mixer_perc_t(100.0f * color[j][i] / ctot);
+ MIXER_STEPPER_LOOP(i) mix[i] = mixer_perc_t(100.0f * color[j][i] / ctot + 0.5f);
#ifdef MIXER_NORMALIZER_DEBUG
SERIAL_ECHOPGM("V-tool ", j, " [ ");
diff --git a/Marlin/Marlin/src/feature/mmu/mmu2.cpp b/Marlin/Marlin/src/feature/mmu/mmu2.cpp
index 4f86578a..7747a8b1 100644
--- a/Marlin/Marlin/src/feature/mmu/mmu2.cpp
+++ b/Marlin/Marlin/src/feature/mmu/mmu2.cpp
@@ -979,10 +979,10 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) {
manage_response(false, false);
if (recover) {
- LCD_MESSAGE(MSG_MMU2_EJECT_RECOVER);
+ LCD_MESSAGE(MSG_MMU2_REMOVE_AND_CLICK);
mmu2_attn_buzz();
- TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("MMU2 Eject Recover"), FPSTR(CONTINUE_STR)));
- TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("MMU2 Eject Recover")));
+ TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_MMU2_EJECT_RECOVER)));
+ TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_MMU2_EJECT_RECOVER)));
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response());
mmu2_attn_buzz(true);
diff --git a/Marlin/Marlin/src/feature/pause.cpp b/Marlin/Marlin/src/feature/pause.cpp
index 83d149fa..04d206ff 100644
--- a/Marlin/Marlin/src/feature/pause.cpp
+++ b/Marlin/Marlin/src/feature/pause.cpp
@@ -201,7 +201,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = true; // LCD click or M108 will clear this
- TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("Load Filament")));
+ TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENTLOAD)));
#if ENABLED(HOST_PROMPT_SUPPORT)
const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, active_extruder);
@@ -260,7 +260,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_PURGE);
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE)));
- TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE), FPSTR(CONTINUE_STR)));
+ TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE)));
wait_for_user = true; // A click or M108 breaks the purge_length loop
for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
unscaled_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
@@ -460,7 +460,7 @@ bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool
// If axes don't need to home then the nozzle can park
if (do_park) nozzle.park(0, park_point); // Park the nozzle by doing a Minimum Z Raise followed by an XY Move
- TERN_(DWIN_LCD_PROUI, if (!do_park) ui.set_status(GET_TEXT_F(MSG_PARK_FAILED)));
+ if (!do_park) LCD_MESSAGE(MSG_PARK_FAILED);
#if ENABLED(DUAL_X_CARRIAGE)
const int8_t saved_ext = active_extruder;
@@ -525,7 +525,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
// Wait for filament insert by user and press button
KEEPALIVE_STATE(PAUSED_FOR_USER);
- TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_NOZZLE_PARKED), FPSTR(CONTINUE_STR)));
+ TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_NOZZLE_PARKED)));
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_NOZZLE_PARKED)));
wait_for_user = true; // LCD click or M108 will clear this
while (wait_for_user) {
@@ -549,9 +549,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_INFO, GET_TEXT_F(MSG_REHEATING)));
- TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(GET_TEXT_F(MSG_REHEATING)));
-
- TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATING));
+ LCD_MESSAGE(MSG_REHEATING);
// Re-enable the heaters if they timed out
HOTEND_LOOP() thermalManager.reset_hotend_idle_timer(e);
@@ -567,9 +565,12 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
HOTEND_LOOP() thermalManager.heater_idle[e].start(nozzle_timeout);
- TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_REHEATDONE), FPSTR(CONTINUE_STR)));
- TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_REHEATDONE)));
- TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_REHEATDONE));
+ TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_REHEATDONE)));
+ #if ENABLED(EXTENSIBLE_UI)
+ ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_REHEATDONE));
+ #else
+ LCD_MESSAGE(MSG_REHEATDONE);
+ #endif
IF_DISABLED(PAUSE_REHEAT_FAST_RESUME, wait_for_user = true);
diff --git a/Marlin/Marlin/src/feature/powerloss.cpp b/Marlin/Marlin/src/feature/powerloss.cpp
index d4450adc..1037f823 100644
--- a/Marlin/Marlin/src/feature/powerloss.cpp
+++ b/Marlin/Marlin/src/feature/powerloss.cpp
@@ -33,7 +33,7 @@
bool PrintJobRecovery::enabled; // Initialized by settings.load()
-SdFile PrintJobRecovery::file;
+MediaFile PrintJobRecovery::file;
job_recovery_info_t PrintJobRecovery::info;
const char PrintJobRecovery::filename[5] = "/PLR";
uint8_t PrintJobRecovery::queue_index_r;
@@ -78,6 +78,14 @@ PrintJobRecovery recovery;
#define POWER_LOSS_RETRACT_LEN 0
#endif
+// Allow power-loss recovery to be aborted
+#define PLR_CAN_ABORT
+#if ENABLED(PLR_CAN_ABORT)
+ #define PROCESS_SUBCOMMANDS_NOW(cmd) do { if (card.flag.abort_sd_printing) return; gcode.process_subcommands_now(cmd); }while(0)
+#else
+ #define PROCESS_SUBCOMMANDS_NOW(cmd) gcode.process_subcommands_now(cmd)
+#endif
+
/**
* Clear the recovery info
*/
@@ -352,12 +360,23 @@ void PrintJobRecovery::resume() {
// Apply the dry-run flag if enabled
if (info.flag.dryrun) marlin_debug_flags |= MARLIN_DEBUG_DRYRUN;
+ #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
+ struct OnExit {
+ uint8_t old_flags;
+ OnExit() {
+ old_flags = marlin_debug_flags;
+ marlin_debug_flags |= MARLIN_DEBUG_ECHO;
+ }
+ ~OnExit() { marlin_debug_flags = old_flags; }
+ } on_exit;
+ #endif
+
// Restore cold extrusion permission
TERN_(PREVENT_COLD_EXTRUSION, thermalManager.allow_cold_extrude = info.flag.allow_cold_extrusion);
#if HAS_LEVELING
// Make sure leveling is off before any G92 and G28
- gcode.process_subcommands_now(F("M420 S0 Z0"));
+ PROCESS_SUBCOMMANDS_NOW(F("M420S0"));
#endif
#if HAS_HEATED_BED
@@ -365,7 +384,7 @@ void PrintJobRecovery::resume() {
if (bt) {
// Restore the bed temperature
sprintf_P(cmd, PSTR("M190S%i"), bt);
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
}
#endif
@@ -376,10 +395,10 @@ void PrintJobRecovery::resume() {
if (et) {
#if HAS_MULTI_HOTEND
sprintf_P(cmd, PSTR("T%iS"), e);
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
#endif
sprintf_P(cmd, PSTR("M109S%i"), et);
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
}
}
#endif
@@ -393,7 +412,7 @@ void PrintJobRecovery::resume() {
// establish the current position as best we can.
//
- gcode.process_subcommands_now(F("G92.9E0")); // Reset E to 0
+ PROCESS_SUBCOMMANDS_NOW(F("G92.9E0")); // Reset E to 0
#if Z_HOME_TO_MAX
@@ -404,7 +423,7 @@ void PrintJobRecovery::resume() {
"G28R0\n" // Home all axes (no raise)
"G1Z%sF1200" // Move Z down to (raised) height
), dtostrf(z_now, 1, 3, str_1));
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
#elif DISABLED(BELTPRINTER)
@@ -417,18 +436,18 @@ void PrintJobRecovery::resume() {
#if !HOMING_Z_DOWN
// Set Z to the real position
sprintf_P(cmd, PSTR("G92.9Z%s"), dtostrf(z_now, 1, 3, str_1));
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
#endif
// Does Z need to be raised now? It should be raised before homing XY.
if (z_raised > z_now) {
z_now = z_raised;
sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_now, 1, 3, str_1));
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
}
// Home XY with no Z raise
- gcode.process_subcommands_now(F("G28R0XY")); // No raise during G28
+ PROCESS_SUBCOMMANDS_NOW(F("G28R0XY")); // No raise during G28
#endif
@@ -436,7 +455,7 @@ void PrintJobRecovery::resume() {
// Move to a safe XY position and home Z while avoiding the print.
const xy_pos_t p = xy_pos_t(POWER_LOSS_ZHOME_POS) TERN_(HOMING_Z_WITH_PROBE, - probe.offset_xy);
sprintf_P(cmd, PSTR("G1X%sY%sF1000\nG28HZ"), dtostrf(p.x, 1, 3, str_1), dtostrf(p.y, 1, 3, str_2));
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
#endif
// Mark all axes as having been homed (no effect on current_position)
@@ -447,12 +466,12 @@ void PrintJobRecovery::resume() {
// Leveling may already be enabled due to the ENABLE_LEVELING_AFTER_G28 option.
// TODO: Add a G28 parameter to leave leveling disabled.
sprintf_P(cmd, PSTR("M420S%cZ%s"), '0' + (char)info.flag.leveling, dtostrf(info.fade, 1, 1, str_1));
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
#if !HOMING_Z_DOWN
// The physical Z was adjusted at power-off so undo the M420S1 correction to Z with G92.9.
sprintf_P(cmd, PSTR("G92.9Z%s"), dtostrf(z_now, 1, 1, str_1));
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
#endif
#endif
@@ -460,7 +479,7 @@ void PrintJobRecovery::resume() {
// Z was homed down to the bed, so move up to the raised height.
z_now = z_raised;
sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_now, 1, 3, str_1));
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
#endif
// Recover volumetric extrusion state
@@ -468,16 +487,16 @@ void PrintJobRecovery::resume() {
#if HAS_MULTI_EXTRUDER
EXTRUDER_LOOP() {
sprintf_P(cmd, PSTR("M200T%iD%s"), e, dtostrf(info.filament_size[e], 1, 3, str_1));
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
}
if (!info.flag.volumetric_enabled) {
sprintf_P(cmd, PSTR("M200T%iD0"), info.active_extruder);
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
}
#else
if (info.flag.volumetric_enabled) {
sprintf_P(cmd, PSTR("M200D%s"), dtostrf(info.filament_size[0], 1, 3, str_1));
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
}
#endif
#endif
@@ -489,10 +508,10 @@ void PrintJobRecovery::resume() {
if (et) {
#if HAS_MULTI_HOTEND
sprintf_P(cmd, PSTR("T%iS"), e);
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
#endif
sprintf_P(cmd, PSTR("M109S%i"), et);
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
}
}
#endif
@@ -500,7 +519,7 @@ void PrintJobRecovery::resume() {
// Restore the previously active tool (with no_move)
#if HAS_MULTI_EXTRUDER || HAS_MULTI_HOTEND
sprintf_P(cmd, PSTR("T%i S"), info.active_extruder);
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
#endif
// Restore print cooling fan speeds
@@ -509,7 +528,7 @@ void PrintJobRecovery::resume() {
const int f = info.fan_speed[i];
if (f) {
sprintf_P(cmd, PSTR("M106P%iS%i"), i, f);
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
}
}
#endif
@@ -531,17 +550,17 @@ void PrintJobRecovery::resume() {
// Un-retract if there was a retract at outage
#if ENABLED(BACKUP_POWER_SUPPLY) && POWER_LOSS_RETRACT_LEN > 0
- gcode.process_subcommands_now(F("G1F3000E" STRINGIFY(POWER_LOSS_RETRACT_LEN)));
+ PROCESS_SUBCOMMANDS_NOW(F("G1F3000E" STRINGIFY(POWER_LOSS_RETRACT_LEN)));
#endif
// Additional purge on resume if configured
#if POWER_LOSS_PURGE_LEN
sprintf_P(cmd, PSTR("G1F3000E%d"), (POWER_LOSS_PURGE_LEN) + (POWER_LOSS_RETRACT_LEN));
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
#endif
#if ENABLED(NOZZLE_CLEAN_FEATURE)
- gcode.process_subcommands_now(F("G12"));
+ PROCESS_SUBCOMMANDS_NOW(F("G12"));
#endif
// Move back over to the saved XY
@@ -549,19 +568,19 @@ void PrintJobRecovery::resume() {
dtostrf(info.current_position.x, 1, 3, str_1),
dtostrf(info.current_position.y, 1, 3, str_2)
);
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
// Move back down to the saved Z for printing
sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_print, 1, 3, str_1));
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
// Restore the feedrate
sprintf_P(cmd, PSTR("G1F%d"), info.feedrate);
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
// Restore E position with G92.9
sprintf_P(cmd, PSTR("G92.9E%s"), dtostrf(info.current_position.e, 1, 3, str_1));
- gcode.process_subcommands_now(cmd);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
TERN_(GCODE_REPEAT_MARKERS, repeat = info.stored_repeat);
TERN_(HAS_HOME_OFFSET, home_offset = info.home_offset);
@@ -573,22 +592,14 @@ void PrintJobRecovery::resume() {
// Relative axis modes
gcode.axis_relative = info.axis_relative;
- #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
- const uint8_t old_flags = marlin_debug_flags;
- marlin_debug_flags |= MARLIN_DEBUG_ECHO;
- #endif
-
// Continue to apply PLR when a file is resumed!
enable(true);
// Resume the SD file from the last position
- char *fn = info.sd_filename;
- sprintf_P(cmd, M23_STR, fn);
- gcode.process_subcommands_now(cmd);
+ sprintf_P(cmd, M23_STR, &info.sd_filename[0]);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
sprintf_P(cmd, PSTR("M24S%ldT%ld"), resume_sdpos, info.print_job_elapsed);
- gcode.process_subcommands_now(cmd);
-
- TERN_(DEBUG_POWER_LOSS_RECOVERY, marlin_debug_flags = old_flags);
+ PROCESS_SUBCOMMANDS_NOW(cmd);
}
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
diff --git a/Marlin/Marlin/src/feature/powerloss.h b/Marlin/Marlin/src/feature/powerloss.h
index 4bf0c06e..d241fdb7 100644
--- a/Marlin/Marlin/src/feature/powerloss.h
+++ b/Marlin/Marlin/src/feature/powerloss.h
@@ -138,7 +138,7 @@ class PrintJobRecovery {
public:
static const char filename[5];
- static SdFile file;
+ static MediaFile file;
static job_recovery_info_t info;
static uint8_t queue_index_r; //!< Queue index of the active command
diff --git a/Marlin/Marlin/src/feature/spindle_laser.cpp b/Marlin/Marlin/src/feature/spindle_laser.cpp
index e7898268..c0635c72 100644
--- a/Marlin/Marlin/src/feature/spindle_laser.cpp
+++ b/Marlin/Marlin/src/feature/spindle_laser.cpp
@@ -141,7 +141,7 @@ void SpindleLaser::apply_power(const uint8_t opwr) {
else
ocr_off();
#elif ENABLED(SPINDLE_SERVO)
- MOVE_SERVO(SPINDLE_SERVO_NR, power);
+ servo[SPINDLE_SERVO_NR].move(opwr);
#else
WRITE(SPINDLE_LASER_ENA_PIN, enabled() ? SPINDLE_LASER_ACTIVE_STATE : !SPINDLE_LASER_ACTIVE_STATE);
isReadyForUI = true;
diff --git a/Marlin/Marlin/src/feature/spindle_laser.h b/Marlin/Marlin/src/feature/spindle_laser.h
index a49e5611..8908ae6d 100644
--- a/Marlin/Marlin/src/feature/spindle_laser.h
+++ b/Marlin/Marlin/src/feature/spindle_laser.h
@@ -201,8 +201,6 @@ class SpindleLaser {
apply_power(enable ? TERN(SPINDLE_LASER_USE_PWM, (power ?: (unitPower ? upower_to_ocr(cpwr_to_upwr(SPEED_POWER_STARTUP)) : 0)), 255) : 0);
break;
case CUTTER_MODE_CONTINUOUS:
- TERN_(LASER_FEATURE, set_inline_enabled(enable));
- break;
case CUTTER_MODE_DYNAMIC:
TERN_(LASER_FEATURE, set_inline_enabled(enable));
break;
@@ -210,7 +208,7 @@ class SpindleLaser {
enable = false;
apply_power(0);
}
- #if SPINDLE_LASER_ENA_PIN
+ #if PIN_EXISTS(SPINDLE_LASER_ENA)
WRITE(SPINDLE_LASER_ENA_PIN, enable ? SPINDLE_LASER_ACTIVE_STATE : !SPINDLE_LASER_ACTIVE_STATE);
#endif
enable_state = enable;
@@ -281,7 +279,7 @@ class SpindleLaser {
set_enabled(state);
if (state) {
if (!menuPower) menuPower = cpwr_to_upwr(SPEED_POWER_STARTUP);
- power = upower_to_ocr(menuPower);
+ power = TERN(SPINDLE_LASER_USE_PWM, upower_to_ocr(menuPower), 255);
apply_power(power);
} else
apply_power(0);
diff --git a/Marlin/Marlin/src/feature/stepper_driver_safety.cpp b/Marlin/Marlin/src/feature/stepper_driver_safety.cpp
index b8762da9..d3fc1614 100644
--- a/Marlin/Marlin/src/feature/stepper_driver_safety.cpp
+++ b/Marlin/Marlin/src/feature/stepper_driver_safety.cpp
@@ -43,7 +43,7 @@ void stepper_driver_backward_check() {
SET_INPUT(AXIS##_ENABLE_PIN); \
OUT_WRITE(AXIS##_STEP_PIN, false); \
delay(20); \
- if (READ(AXIS##_ENABLE_PIN) == false) { \
+ if (READ(AXIS##_ENABLE_PIN) == LOW) { \
SBI(axis_plug_backward, BIT); \
stepper_driver_backward_error(F(STRINGIFY(AXIS))); \
} \
diff --git a/Marlin/Marlin/src/feature/tmc_util.cpp b/Marlin/Marlin/src/feature/tmc_util.cpp
index 08676863..2e5a5c55 100644
--- a/Marlin/Marlin/src/feature/tmc_util.cpp
+++ b/Marlin/Marlin/src/feature/tmc_util.cpp
@@ -601,8 +601,8 @@
case TMC_STEALTHCHOP: serialprint_truefalse(st.en_pwm_mode()); break;
case TMC_GLOBAL_SCALER:
{
- uint16_t value = st.GLOBAL_SCALER();
- SERIAL_ECHO(value ? value : 256);
+ const uint16_t value = st.GLOBAL_SCALER();
+ SERIAL_ECHO(value ?: 256);
SERIAL_ECHOPGM("/256");
}
break;
diff --git a/Marlin/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/Marlin/src/gcode/bedlevel/G26.cpp
index aa6e0c1f..fe20423b 100644
--- a/Marlin/Marlin/src/gcode/bedlevel/G26.cpp
+++ b/Marlin/Marlin/src/gcode/bedlevel/G26.cpp
@@ -162,8 +162,8 @@ float g26_random_deviation = 0.0;
*/
bool user_canceled() {
if (!ui.button_pressed()) return false; // Return if the button isn't pressed
- ui.set_status(GET_TEXT_F(MSG_G26_CANCELED), 99);
- TERN_(HAS_MARLINUI_MENU, ui.quick_feedback());
+ LCD_MESSAGE_MAX(MSG_G26_CANCELED);
+ ui.quick_feedback();
ui.wait_for_release();
return true;
}
@@ -321,11 +321,9 @@ typedef struct {
#if HAS_HEATED_BED
if (bed_temp > 25) {
- #if HAS_WIRED_LCD
- ui.set_status(GET_TEXT_F(MSG_G26_HEATING_BED), 99);
- ui.quick_feedback();
- TERN_(HAS_MARLINUI_MENU, ui.capture());
- #endif
+ LCD_MESSAGE_MAX(MSG_G26_HEATING_BED);
+ ui.quick_feedback();
+ TERN_(HAS_MARLINUI_MENU, ui.capture());
thermalManager.setTargetBed(bed_temp);
// Wait for the temperature to stabilize
@@ -340,20 +338,16 @@ typedef struct {
#endif // HAS_HEATED_BED
// Start heating the active nozzle
- #if HAS_WIRED_LCD
- ui.set_status(GET_TEXT_F(MSG_G26_HEATING_NOZZLE), 99);
- ui.quick_feedback();
- #endif
+ LCD_MESSAGE_MAX(MSG_G26_HEATING_NOZZLE);
+ ui.quick_feedback();
thermalManager.setTargetHotend(hotend_temp, active_extruder);
// Wait for the temperature to stabilize
if (!thermalManager.wait_for_hotend(active_extruder, true OPTARG(G26_CLICK_CAN_CANCEL, true)))
return G26_ERR;
- #if HAS_WIRED_LCD
- ui.reset_status();
- ui.quick_feedback();
- #endif
+ ui.reset_status();
+ ui.completion_feedback();
return G26_OK;
}
@@ -371,7 +365,7 @@ typedef struct {
if (prime_flag == -1) { // The user wants to control how much filament gets purged
ui.capture();
- ui.set_status(GET_TEXT_F(MSG_G26_MANUAL_PRIME), 99);
+ LCD_MESSAGE_MAX(MSG_G26_MANUAL_PRIME);
ui.chirp();
destination = current_position;
@@ -398,17 +392,15 @@ typedef struct {
ui.wait_for_release();
- ui.set_status(GET_TEXT_F(MSG_G26_PRIME_DONE), 99);
+ LCD_MESSAGE_MAX(MSG_G26_PRIME_DONE);
ui.quick_feedback();
ui.release();
}
else
#endif
{
- #if HAS_WIRED_LCD
- ui.set_status(GET_TEXT_F(MSG_G26_FIXED_LENGTH), 99);
- ui.quick_feedback();
- #endif
+ LCD_MESSAGE_MAX(MSG_G26_FIXED_LENGTH);
+ ui.quick_feedback();
destination = current_position;
destination.e += prime_length;
prepare_internal_move_to_destination(fr_slow_e);
@@ -853,7 +845,7 @@ void GcodeSuite::G26() {
} while (--g26_repeats && location.valid());
LEAVE:
- ui.set_status(GET_TEXT_F(MSG_G26_LEAVING), -1);
+ LCD_MESSAGE_MIN(MSG_G26_LEAVING);
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(location, ExtUI::G26_FINISH));
g26.retract_filament(destination);
diff --git a/Marlin/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/Marlin/src/gcode/bedlevel/abl/G29.cpp
index 0fef5ad6..79f92f74 100644
--- a/Marlin/Marlin/src/gcode/bedlevel/abl/G29.cpp
+++ b/Marlin/Marlin/src/gcode/bedlevel/abl/G29.cpp
@@ -409,7 +409,7 @@ G29_TYPE GcodeSuite::G29() {
if (!probe.good_bounds(abl.probe_position_lf, abl.probe_position_rb)) {
if (DEBUGGING(LEVELING)) {
DEBUG_ECHOLNPGM("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x,
- " F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y);
+ " F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y);
}
SERIAL_ECHOLNPGM("? (L,R,F,B) out of bounds.");
G29_RETURN(false, false);
@@ -417,7 +417,7 @@ G29_TYPE GcodeSuite::G29() {
// Probe at the points of a lattice grid
abl.gridSpacing.set((abl.probe_position_rb.x - abl.probe_position_lf.x) / (abl.grid_points.x - 1),
- (abl.probe_position_rb.y - abl.probe_position_lf.y) / (abl.grid_points.y - 1));
+ (abl.probe_position_rb.y - abl.probe_position_lf.y) / (abl.grid_points.y - 1));
#endif // ABL_USES_GRID
@@ -453,9 +453,7 @@ G29_TYPE GcodeSuite::G29() {
}
// Position bed horizontally and Z probe vertically.
- #if defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
- || defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
- || defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
+ #if HAS_SAFE_BED_LEVELING
xyze_pos_t safe_position = current_position;
#ifdef SAFE_BED_LEVELING_START_X
safe_position.x = SAFE_BED_LEVELING_START_X;
@@ -486,7 +484,7 @@ G29_TYPE GcodeSuite::G29() {
#endif
do_blocking_move_to(safe_position);
- #endif
+ #endif // HAS_SAFE_BED_LEVELING
// Disable auto bed leveling during G29.
// Be formal so G29 can be done successively without G28.
diff --git a/Marlin/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/Marlin/src/gcode/bedlevel/mbl/G29.cpp
index e98f3d5e..e3e96a79 100644
--- a/Marlin/Marlin/src/gcode/bedlevel/mbl/G29.cpp
+++ b/Marlin/Marlin/src/gcode/bedlevel/mbl/G29.cpp
@@ -108,9 +108,7 @@ void GcodeSuite::G29() {
TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart());
// Position bed horizontally and Z probe vertically.
- #if defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
- || defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
- || defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
+ #if HAS_SAFE_BED_LEVELING
xyze_pos_t safe_position = current_position;
#ifdef SAFE_BED_LEVELING_START_X
safe_position.x = SAFE_BED_LEVELING_START_X;
@@ -141,7 +139,7 @@ void GcodeSuite::G29() {
#endif
do_blocking_move_to(safe_position);
- #endif
+ #endif // HAS_SAFE_BED_LEVELING
return;
}
diff --git a/Marlin/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/Marlin/src/gcode/calibrate/G28.cpp
index a6dff2d7..a9f378ad 100644
--- a/Marlin/Marlin/src/gcode/calibrate/G28.cpp
+++ b/Marlin/Marlin/src/gcode/calibrate/G28.cpp
@@ -403,26 +403,44 @@ void GcodeSuite::G28() {
UNUSED(needZ); UNUSED(homeZZ);
#else
constexpr bool doZ = false;
+ #if !HAS_Y_AXIS
+ constexpr bool doY = false;
+ #endif
#endif
+ // Z may home first, e.g., when homing away from the bed
TERN_(HOME_Z_FIRST, if (doZ) homeaxis(Z_AXIS));
+ // 'R' to specify a specific raise. 'R0' indicates no raise, e.g., for recovery.resume
+ // When 'R0' is used, there should already be adequate clearance, e.g., from homing Z to max.
const bool seenR = parser.seenval('R');
- const float z_homing_height = seenR ? parser.value_linear_units() : Z_HOMING_HEIGHT;
- if (z_homing_height && (seenR || NUM_AXIS_GANG(doX, || doY, || TERN0(Z_SAFE_HOMING, doZ), || doI, || doJ, || doK, || doU, || doV, || doW))) {
+ // Use raise given by 'R' or Z_HOMING_HEIGHT (above the probe trigger point)
+ float z_homing_height = seenR ? parser.value_linear_units() : Z_HOMING_HEIGHT;
+
+ // Check for any lateral motion that might require clearance
+ const bool may_skate = seenR || NUM_AXIS_GANG(doX, || doY, || TERN0(Z_SAFE_HOMING, doZ), || doI, || doJ, || doK, || doU, || doV, || doW);
+
+ if (seenR && z_homing_height == 0) {
+ if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("R0 = No Z raise");
+ }
+ else if (z_homing_height && may_skate) {
// Raise Z before homing any other axes and z is not already high enough (never lower z)
- if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Raise Z (before homing) by ", z_homing_height);
+ if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Raise Z before homing:");
do_z_clearance(z_homing_height);
- TERN_(BLTOUCH, bltouch.init());
}
+ // Init BLTouch ahead of any lateral motion, even if not homing with the probe
+ TERN_(BLTOUCH, if (may_skate) bltouch.init());
+
// Diagonal move first if both are homing
TERN_(QUICK_HOME, if (doX && doY) quick_home_xy());
- // Home Y (before X)
- if (ENABLED(HOME_Y_BEFORE_X) && (doY || TERN0(CODEPENDENT_XY_HOMING, doX)))
- homeaxis(Y_AXIS);
+ #if HAS_Y_AXIS
+ // Home Y (before X)
+ if (ENABLED(HOME_Y_BEFORE_X) && (doY || TERN0(CODEPENDENT_XY_HOMING, doX)))
+ homeaxis(Y_AXIS);
+ #endif
// Home X
if (doX || (doY && ENABLED(CODEPENDENT_XY_HOMING) && DISABLED(HOME_Y_BEFORE_X))) {
@@ -455,9 +473,11 @@ void GcodeSuite::G28() {
if (doI) homeaxis(I_AXIS);
#endif
- // Home Y (after X)
- if (DISABLED(HOME_Y_BEFORE_X) && doY)
- homeaxis(Y_AXIS);
+ #if HAS_Y_AXIS
+ // Home Y (after X)
+ if (DISABLED(HOME_Y_BEFORE_X) && doY)
+ homeaxis(Y_AXIS);
+ #endif
#if BOTH(FOAMCUTTER_XYUV, HAS_J_AXIS)
// Home J (after Y)
diff --git a/Marlin/Marlin/src/gcode/calibrate/G34.cpp b/Marlin/Marlin/src/gcode/calibrate/G34.cpp
index 1be3952f..7ae1e776 100644
--- a/Marlin/Marlin/src/gcode/calibrate/G34.cpp
+++ b/Marlin/Marlin/src/gcode/calibrate/G34.cpp
@@ -58,7 +58,7 @@ void GcodeSuite::G34() {
// Move XY to safe position
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Parking XY");
const xy_pos_t safe_pos = GANTRY_CALIBRATION_SAFE_POSITION;
- do_blocking_move_to(safe_pos, MMM_TO_MMS(GANTRY_CALIBRATION_XY_PARK_FEEDRATE));
+ do_blocking_move_to_xy(safe_pos, MMM_TO_MMS(GANTRY_CALIBRATION_XY_PARK_FEEDRATE));
#endif
const float move_distance = parser.intval('Z', GANTRY_CALIBRATION_EXTRA_HEIGHT),
diff --git a/Marlin/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/Marlin/src/gcode/calibrate/M48.cpp
index bfb3b640..6d4117b6 100644
--- a/Marlin/Marlin/src/gcode/calibrate/M48.cpp
+++ b/Marlin/Marlin/src/gcode/calibrate/M48.cpp
@@ -84,7 +84,7 @@ void GcodeSuite::M48() {
};
if (!probe.can_reach(test_position)) {
- ui.set_status(GET_TEXT_F(MSG_M48_OUT_OF_BOUNDS), 99);
+ LCD_MESSAGE_MAX(MSG_M48_OUT_OF_BOUNDS);
SERIAL_ECHOLNPGM("? (X,Y) out of bounds.");
return;
}
diff --git a/Marlin/Marlin/src/gcode/config/M200-M205.cpp b/Marlin/Marlin/src/gcode/config/M200-M205.cpp
index 87c1f2ce..cda3177d 100644
--- a/Marlin/Marlin/src/gcode/config/M200-M205.cpp
+++ b/Marlin/Marlin/src/gcode/config/M200-M205.cpp
@@ -221,9 +221,9 @@ void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
/**
* M204: Set Accelerations in units/sec^2 (M204 P1200 R3000 T3000)
*
- * P = Printing moves
- * R = Retract only (no X, Y, Z) moves
- * T = Travel (non printing) moves
+ * P Printing moves
+ * R Retract only (no X, Y, Z) moves
+ * T Travel (non printing) moves
*/
void GcodeSuite::M204() {
if (!parser.seen("PRST"))
@@ -247,24 +247,37 @@ void GcodeSuite::M204_report(const bool forReplay/*=true*/) {
);
}
+#if AXIS_COLLISION('B')
+ #define M205_MIN_SEG_TIME_PARAM 'D'
+ #define M205_MIN_SEG_TIME_STR "D"
+ #warning "Use 'M205 D' for Minimum Segment Time."
+#else
+ #define M205_MIN_SEG_TIME_PARAM 'B'
+ #define M205_MIN_SEG_TIME_STR "B"
+#endif
+
/**
* M205: Set Advanced Settings
*
- * B = Min Segment Time (µs)
- * S = Min Feed Rate (units/s)
- * T = Min Travel Feed Rate (units/s)
- * X = Max X Jerk (units/sec^2)
- * Y = Max Y Jerk (units/sec^2)
- * Z = Max Z Jerk (units/sec^2)
- * E = Max E Jerk (units/sec^2)
- * J = Junction Deviation (mm) (If not using CLASSIC_JERK)
+ * B<µs> : Min Segment Time
+ * S : Min Feed Rate
+ * T : Min Travel Feed Rate
+ *
+ * With CLASSIC_JERK:
+ * X : Max X Jerk
+ * Y : Max Y Jerk
+ * Z : Max Z Jerk
+ * ... : etc
+ * E : Max E Jerk
+ *
+ * Without CLASSIC_JERK:
+ * J(mm) : Junction Deviation
*/
void GcodeSuite::M205() {
- if (!parser.seen("BST" TERN_(HAS_JUNCTION_DEVIATION, "J") TERN_(HAS_CLASSIC_JERK, "XYZE")))
- return M205_report();
+ if (!parser.seen_any()) return M205_report();
//planner.synchronize();
- if (parser.seenval('B')) planner.settings.min_segment_time_us = parser.value_ulong();
+ if (parser.seenval(M205_MIN_SEG_TIME_PARAM)) planner.settings.min_segment_time_us = parser.value_ulong();
if (parser.seenval('S')) planner.settings.min_feedrate_mm_s = parser.value_linear_units();
if (parser.seenval('T')) planner.settings.min_travel_feedrate_mm_s = parser.value_linear_units();
#if HAS_JUNCTION_DEVIATION
@@ -304,7 +317,7 @@ void GcodeSuite::M205() {
void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, F(
- "Advanced (B S T"
+ "Advanced (" M205_MIN_SEG_TIME_STR " S T"
TERN_(HAS_JUNCTION_DEVIATION, " J")
#if HAS_CLASSIC_JERK
NUM_AXIS_GANG(
@@ -317,7 +330,7 @@ void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
")"
));
SERIAL_ECHOLNPGM_P(
- PSTR(" M205 B"), LINEAR_UNIT(planner.settings.min_segment_time_us)
+ PSTR(" M205 " M205_MIN_SEG_TIME_STR), LINEAR_UNIT(planner.settings.min_segment_time_us)
, PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s)
, SP_T_STR, LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s)
#if HAS_JUNCTION_DEVIATION
diff --git a/Marlin/Marlin/src/gcode/config/M220.cpp b/Marlin/Marlin/src/gcode/config/M220.cpp
index c9070df8..6797df25 100644
--- a/Marlin/Marlin/src/gcode/config/M220.cpp
+++ b/Marlin/Marlin/src/gcode/config/M220.cpp
@@ -36,16 +36,15 @@
* R : Flag to restore the last-saved factor
*/
void GcodeSuite::M220() {
+ if (!parser.seen_any()) {
+ SERIAL_ECHOLNPGM("FR:", feedrate_percentage, "%");
+ return;
+ }
static int16_t backup_feedrate_percentage = 100;
- if (parser.seen('B')) backup_feedrate_percentage = feedrate_percentage;
- if (parser.seen('R')) feedrate_percentage = backup_feedrate_percentage;
-
+ const int16_t now_feedrate_perc = feedrate_percentage;
+ if (parser.seen_test('R')) feedrate_percentage = backup_feedrate_percentage;
+ if (parser.seen_test('B')) backup_feedrate_percentage = now_feedrate_perc;
if (parser.seenval('S')) feedrate_percentage = parser.value_int();
- if (!parser.seen_any()) {
- SERIAL_ECHOPGM("FR:", feedrate_percentage);
- SERIAL_CHAR('%');
- SERIAL_EOL();
- }
}
diff --git a/Marlin/Marlin/src/gcode/config/M43.cpp b/Marlin/Marlin/src/gcode/config/M43.cpp
index 58078440..460e25dd 100644
--- a/Marlin/Marlin/src/gcode/config/M43.cpp
+++ b/Marlin/Marlin/src/gcode/config/M43.cpp
@@ -313,7 +313,7 @@ void GcodeSuite::M43() {
// 'P' Get the range of pins to test or watch
uint8_t first_pin = PARSED_PIN_INDEX('P', 0),
- last_pin = parser.seenval('L') ? PARSED_PIN_INDEX('L', 0) : parser.seenval('P') ? first_pin : (NUMBER_PINS_TOTAL) - 1;
+ last_pin = parser.seenval('L') ? PARSED_PIN_INDEX('L', 0) : (parser.seenval('P') ? first_pin : (NUMBER_PINS_TOTAL) - 1);
NOMORE(first_pin, (NUMBER_PINS_TOTAL) - 1);
NOMORE(last_pin, (NUMBER_PINS_TOTAL) - 1);
@@ -329,15 +329,18 @@ void GcodeSuite::M43() {
// 'W' Watch until click, M108, or reset
if (parser.boolval('W')) {
- SERIAL_ECHOLNPGM("Watching pins");
#ifdef ARDUINO_ARCH_SAM
NOLESS(first_pin, 2); // Don't hijack the UART pins
#endif
- uint8_t pin_state[last_pin - first_pin + 1];
+
+ const uint8_t pin_count = last_pin - first_pin + 1;
+ uint8_t pin_state[pin_count];
+ bool can_watch = false;
LOOP_S_LE_N(i, first_pin, last_pin) {
pin_t pin = GET_PIN_MAP_PIN_M43(i);
if (!VALID_PIN(pin)) continue;
if (M43_NEVER_TOUCH(i) || (!ignore_protection && pin_is_protected(pin))) continue;
+ can_watch = true;
pinMode(pin, INPUT_PULLUP);
delay(1);
/*
@@ -348,16 +351,36 @@ void GcodeSuite::M43() {
pin_state[i - first_pin] = extDigitalRead(pin);
}
+ const bool multipin = (pin_count > 1);
+
+ if (!can_watch) {
+ SERIAL_ECHOPGM("Specified pin");
+ SERIAL_ECHOPGM_P(multipin ? PSTR("s are") : PSTR(" is"));
+ SERIAL_ECHOLNPGM(" protected. Use 'I' to override.");
+ return;
+ }
+
+ // "Watching pin(s) # - #"
+ SERIAL_ECHOPGM("Watching pin");
+ if (multipin) SERIAL_CHAR('s');
+ SERIAL_CHAR(' '); SERIAL_ECHO(first_pin);
+ if (multipin) SERIAL_ECHOPGM(" - ", last_pin);
+ SERIAL_EOL();
+
#if HAS_RESUME_CONTINUE
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = true;
- TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("M43 Wait Called"), FPSTR(CONTINUE_STR)));
- TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("M43 Wait Called")));
+ TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(F("M43 Waiting...")));
+ #if ENABLED(EXTENSIBLE_UI)
+ ExtUI::onUserConfirmRequired(F("M43 Waiting..."));
+ #else
+ LCD_MESSAGE(MSG_USERWAIT);
+ #endif
#endif
for (;;) {
LOOP_S_LE_N(i, first_pin, last_pin) {
- pin_t pin = GET_PIN_MAP_PIN_M43(i);
+ const pin_t pin = GET_PIN_MAP_PIN_M43(i);
if (!VALID_PIN(pin)) continue;
if (M43_NEVER_TOUCH(i) || (!ignore_protection && pin_is_protected(pin))) continue;
const byte val =
@@ -368,7 +391,7 @@ void GcodeSuite::M43() {
//*/
extDigitalRead(pin);
if (val != pin_state[i - first_pin]) {
- report_pin_state_extended(pin, ignore_protection, false);
+ report_pin_state_extended(pin, ignore_protection, true);
pin_state[i - first_pin] = val;
}
}
@@ -380,11 +403,13 @@ void GcodeSuite::M43() {
safe_delay(200);
}
+
+ TERN_(HAS_RESUME_CONTINUE, ui.reset_status());
}
else {
// Report current state of selected pin(s)
LOOP_S_LE_N(i, first_pin, last_pin) {
- pin_t pin = GET_PIN_MAP_PIN_M43(i);
+ const pin_t pin = GET_PIN_MAP_PIN_M43(i);
if (VALID_PIN(pin)) report_pin_state_extended(pin, ignore_protection, true);
}
}
diff --git a/Marlin/Marlin/src/gcode/control/M350_M351.cpp b/Marlin/Marlin/src/gcode/control/M350_M351.cpp
index ac6b5a32..425abad5 100644
--- a/Marlin/Marlin/src/gcode/control/M350_M351.cpp
+++ b/Marlin/Marlin/src/gcode/control/M350_M351.cpp
@@ -29,9 +29,6 @@
#if NUM_AXES == XYZ && EXTRUDERS >= 1
#define HAS_M350_B_PARAM 1 // "5th axis" (after E0) for an original XYZEB setup.
- #if AXIS_COLLISION('B')
- #error "M350 parameter 'B' collision with axis name."
- #endif
#endif
/**
diff --git a/Marlin/Marlin/src/gcode/eeprom/M500-M504.cpp b/Marlin/Marlin/src/gcode/eeprom/M500-M504.cpp
index 412d0033..c3962117 100644
--- a/Marlin/Marlin/src/gcode/eeprom/M500-M504.cpp
+++ b/Marlin/Marlin/src/gcode/eeprom/M500-M504.cpp
@@ -26,7 +26,7 @@
#include "../../inc/MarlinConfig.h"
#if ENABLED(CONFIGURATION_EMBEDDING)
- #include "../../sd/SdBaseFile.h"
+ #include "../../sd/cardreader.h"
#include "../../mczip.h"
#endif
@@ -66,11 +66,19 @@ void GcodeSuite::M502() {
#if ENABLED(CONFIGURATION_EMBEDDING)
if (parser.seen_test('C')) {
- SdBaseFile file;
- const uint16_t size = sizeof(mc_zip);
+ MediaFile file;
// Need to create the config size on the SD card
- if (file.open("mc.zip", O_WRITE|O_CREAT) && file.write(pgm_read_ptr(mc_zip), size) != -1 && file.close())
- SERIAL_ECHO_MSG("Configuration saved as 'mc.zip'");
+ MediaFile root = card.getroot();
+ if (file.open(&root, "mc.zip", O_WRITE|O_CREAT)) {
+ bool success = true;
+ for (uint16_t i = 0; success && i < sizeof(mc_zip); ++i) {
+ const uint8_t c = pgm_read_byte(&mc_zip[i]);
+ success = (file.write(c) == 1);
+ }
+ success = file.close() && success;
+
+ if (success) SERIAL_ECHO_MSG("Configuration saved as 'mc.zip'");
+ }
}
#endif
}
diff --git a/Marlin/Marlin/src/gcode/feature/camera/M240.cpp b/Marlin/Marlin/src/gcode/feature/camera/M240.cpp
index 19051ffd..cf2e47ef 100644
--- a/Marlin/Marlin/src/gcode/feature/camera/M240.cpp
+++ b/Marlin/Marlin/src/gcode/feature/camera/M240.cpp
@@ -128,11 +128,13 @@ void GcodeSuite::M240() {
if (homing_needed_error()) return;
- const xyz_pos_t old_pos = {
+ const xyz_pos_t old_pos = NUM_AXIS_ARRAY(
current_position.x + parser.linearval('A'),
current_position.y + parser.linearval('B'),
- current_position.z
- };
+ current_position.z,
+ current_position.i, current_position.j, current_position.k,
+ current_position.u, current_position.v, current_position.w
+ );
#ifdef PHOTO_RETRACT_MM
const float rval = parser.linearval('R', _PHOTO_RETRACT_MM);
@@ -140,7 +142,7 @@ void GcodeSuite::M240() {
e_move_m240(-rval, sval);
#endif
- feedRate_t fr_mm_s = MMM_TO_MMS(parser.linearval('F'));
+ feedRate_t fr_mm_s = parser.feedrateval('F');
if (fr_mm_s) NOLESS(fr_mm_s, 10.0f);
constexpr xyz_pos_t photo_position = PHOTO_POSITION;
diff --git a/Marlin/Marlin/src/gcode/feature/pause/G61.cpp b/Marlin/Marlin/src/gcode/feature/pause/G61.cpp
index b85487af..889709c0 100644
--- a/Marlin/Marlin/src/gcode/feature/pause/G61.cpp
+++ b/Marlin/Marlin/src/gcode/feature/pause/G61.cpp
@@ -35,11 +35,24 @@
/**
* G61: Return to saved position
*
- * F - Feedrate (optional) for the move back.
- * S - Slot # (0-based) to restore from (default 0).
- * X Y Z E - Axes to restore. At least one is required.
+ * F - Feedrate (optional) for the move back.
+ * S - Slot # (0-based) to restore from (default 0).
+ * X - Restore X axis, applying the given offset (default 0)
+ * Y - Restore Y axis, applying the given offset (default 0)
+ * Z - Restore Z axis, applying the given offset (default 0)
*
- * If XYZE are not given, default restore uses the smart blocking move.
+ * If there is an Extruder:
+ * E - Restore E axis, applying the given offset (default 0)
+ *
+ * With extra axes using default names:
+ * A - Restore 4th axis, applying the given offset (default 0)
+ * B - Restore 5th axis, applying the given offset (default 0)
+ * C - Restore 6th axis, applying the given offset (default 0)
+ * U - Restore 7th axis, applying the given offset (default 0)
+ * V - Restore 8th axis, applying the given offset (default 0)
+ * W - Restore 9th axis, applying the given offset (default 0)
+ *
+ * If no axes are specified then all axes are restored.
*/
void GcodeSuite::G61() {
@@ -71,7 +84,7 @@ void GcodeSuite::G61() {
if (parser.seen(STR_AXES_MAIN)) {
DEBUG_ECHOPGM(STR_RESTORING_POS " S", slot);
LOOP_NUM_AXES(i) {
- destination[i] = parser.seenval(AXIS_CHAR(i))
+ destination[i] = parser.seen(AXIS_CHAR(i))
? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i)
: current_position[i];
DEBUG_CHAR(' ', AXIS_CHAR(i));
diff --git a/Marlin/Marlin/src/gcode/feature/trinamic/M122.cpp b/Marlin/Marlin/src/gcode/feature/trinamic/M122.cpp
index 07fe9e5b..61786d51 100644
--- a/Marlin/Marlin/src/gcode/feature/trinamic/M122.cpp
+++ b/Marlin/Marlin/src/gcode/feature/trinamic/M122.cpp
@@ -47,7 +47,7 @@ void GcodeSuite::M122() {
if (sflag && !sval)
tmc_set_report_interval(0);
else if (parser.seenval('P'))
- tmc_set_report_interval(_MAX(250, parser.value_ushort()));
+ tmc_set_report_interval(_MAX(uint16_t(250), parser.value_ushort()));
else if (sval)
tmc_set_report_interval(MONITOR_DRIVER_STATUS_INTERVAL_MS);
#endif
diff --git a/Marlin/Marlin/src/gcode/feature/trinamic/M569.cpp b/Marlin/Marlin/src/gcode/feature/trinamic/M569.cpp
index db31fe3d..e0aa182b 100644
--- a/Marlin/Marlin/src/gcode/feature/trinamic/M569.cpp
+++ b/Marlin/Marlin/src/gcode/feature/trinamic/M569.cpp
@@ -53,6 +53,8 @@ static void set_stealth_status(const bool enable, const int8_t eindex) {
constexpr int8_t index = -1;
#endif
+ UNUSED(index);
+
LOOP_LOGICAL_AXES(i) if (parser.seen(AXIS_CHAR(i))) {
switch (i) {
case X_AXIS:
diff --git a/Marlin/Marlin/src/gcode/gcode_d.cpp b/Marlin/Marlin/src/gcode/gcode_d.cpp
index aabc6e9d..be431eed 100644
--- a/Marlin/Marlin/src/gcode/gcode_d.cpp
+++ b/Marlin/Marlin/src/gcode/gcode_d.cpp
@@ -156,11 +156,8 @@ void GcodeSuite::D(const int16_t dcode) {
} break;
case 5: { // D5 Read / Write onboard Flash
- #ifdef MARLIN_EEPROM_SIZE
- #define ONBOARD_FLASH_SIZE MARLIN_EEPROM_SIZE
- #else
- #define ONBOARD_FLASH_SIZE 1024 // 0x400
- #endif
+ // This will overwrite program and data, so don't use it.
+ #define ONBOARD_FLASH_SIZE 1024 // 0x400
uint8_t *pointer = parser.hex_adr_val('A');
uint16_t len = parser.ushortval('C', 1);
uintptr_t addr = (uintptr_t)pointer;
@@ -172,8 +169,8 @@ void GcodeSuite::D(const int16_t dcode) {
}
else {
//while (len--) {
- //// TODO: Read bytes from EEPROM
- // print_hex_byte(eeprom_read_byte(adr++));
+ //// TODO: Read bytes from FLASH
+ // print_hex_byte(flash_read_byte(adr++));
//}
SERIAL_EOL();
}
diff --git a/Marlin/Marlin/src/gcode/host/M115.cpp b/Marlin/Marlin/src/gcode/host/M115.cpp
index 6e8c406a..8ffe0d57 100644
--- a/Marlin/Marlin/src/gcode/host/M115.cpp
+++ b/Marlin/Marlin/src/gcode/host/M115.cpp
@@ -223,9 +223,9 @@ void GcodeSuite::M115() {
// Machine Geometry
#if ENABLED(M115_GEOMETRY_REPORT)
constexpr xyz_pos_t bmin{0},
- bmax = ARRAY_N(NUM_AXES, X_BED_SIZE, Y_BED_SIZE, Z_MAX_POS, I_MAX_POS, J_MAX_POS, K_MAX_POS, U_MAX_POS, V_MAX_POS, W_MAX_POS),
- dmin = ARRAY_N(NUM_AXES, X_MIN_POS, Y_MIN_POS, Z_MIN_POS, I_MIN_POS, J_MIN_POS, K_MIN_POS, U_MIN_POS, V_MIN_POS, W_MIN_POS),
- dmax = ARRAY_N(NUM_AXES, X_MAX_POS, Y_MAX_POS, Z_MAX_POS, I_MAX_POS, J_MAX_POS, K_MAX_POS, U_MAX_POS, V_MAX_POS, W_MAX_POS);
+ bmax = NUM_AXIS_ARRAY(X_BED_SIZE, Y_BED_SIZE, Z_MAX_POS, I_MAX_POS, J_MAX_POS, K_MAX_POS, U_MAX_POS, V_MAX_POS, W_MAX_POS),
+ dmin = NUM_AXIS_ARRAY(X_MIN_POS, Y_MIN_POS, Z_MIN_POS, I_MIN_POS, J_MIN_POS, K_MIN_POS, U_MIN_POS, V_MIN_POS, W_MIN_POS),
+ dmax = NUM_AXIS_ARRAY(X_MAX_POS, Y_MAX_POS, Z_MAX_POS, I_MAX_POS, J_MAX_POS, K_MAX_POS, U_MAX_POS, V_MAX_POS, W_MAX_POS);
xyz_pos_t cmin = bmin, cmax = bmax;
apply_motion_limits(cmin);
apply_motion_limits(cmax);
diff --git a/Marlin/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/Marlin/src/gcode/lcd/M0_M1.cpp
index 35afea0f..120a36a5 100644
--- a/Marlin/Marlin/src/gcode/lcd/M0_M1.cpp
+++ b/Marlin/Marlin/src/gcode/lcd/M0_M1.cpp
@@ -87,9 +87,9 @@ void GcodeSuite::M0_M1() {
#if ENABLED(HOST_PROMPT_SUPPORT)
if (parser.string_arg)
- hostui.prompt_do(PROMPT_USER_CONTINUE, parser.string_arg, FPSTR(CONTINUE_STR));
+ hostui.continue_prompt(parser.string_arg);
else
- hostui.prompt_do(PROMPT_USER_CONTINUE, parser.codenum ? F("M1 Stop") : F("M0 Stop"), FPSTR(CONTINUE_STR));
+ hostui.continue_prompt(parser.codenum ? F("M1 Stop") : F("M0 Stop"));
#endif
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(ms));
diff --git a/Marlin/Marlin/src/gcode/motion/G2_G3.cpp b/Marlin/Marlin/src/gcode/motion/G2_G3.cpp
index 1a0a9c8c..14ff7ed6 100644
--- a/Marlin/Marlin/src/gcode/motion/G2_G3.cpp
+++ b/Marlin/Marlin/src/gcode/motion/G2_G3.cpp
@@ -298,7 +298,7 @@ void plan_arc(
// d) allows the print head to stop in the remining length of the curve within all configured maximum accelerations.
// The last has to be calculated every time through the loop.
const float limiting_accel = _MIN(planner.settings.max_acceleration_mm_per_s2[axis_p], planner.settings.max_acceleration_mm_per_s2[axis_q]),
- limiting_speed = _MIN(planner.settings.max_feedrate_mm_s[axis_p], planner.settings.max_acceleration_mm_per_s2[axis_q]),
+ limiting_speed = _MIN(planner.settings.max_feedrate_mm_s[axis_p], planner.settings.max_feedrate_mm_s[axis_q]),
limiting_speed_sqr = _MIN(sq(limiting_speed), limiting_accel * radius, sq(scaled_fr_mm_s));
float arc_mm_remaining = flat_mm;
diff --git a/Marlin/Marlin/src/gcode/probe/G30.cpp b/Marlin/Marlin/src/gcode/probe/G30.cpp
index 6893d4be..42a08196 100644
--- a/Marlin/Marlin/src/gcode/probe/G30.cpp
+++ b/Marlin/Marlin/src/gcode/probe/G30.cpp
@@ -28,6 +28,7 @@
#include "../../module/motion.h"
#include "../../module/probe.h"
#include "../../feature/bedlevel/bedlevel.h"
+#include "../../lcd/marlinui.h"
#if HAS_PTC
#include "../../feature/probe_temp_comp.h"
@@ -37,10 +38,6 @@
#include "../../module/tool_change.h"
#endif
-#if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
- #include "../../lcd/marlinui.h"
-#endif
-
/**
* G30: Do a single Z probe at the current XY
*
@@ -70,9 +67,7 @@ void GcodeSuite::G30() {
remember_feedrate_scaling_off();
- #if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
- process_subcommands_now(F("G28O"));
- #endif
+ TERN_(DWIN_CREALITY_LCD_JYERSUI, process_subcommands_now(F("G28O")));
const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
@@ -100,10 +95,8 @@ void GcodeSuite::G30() {
report_current_position();
}
else {
- #if ENABLED(DWIN_LCD_PROUI)
- SERIAL_ECHOLNF(GET_EN_TEXT_F(MSG_ZPROBE_OUT));
- LCD_MESSAGE(MSG_ZPROBE_OUT);
- #endif
+ SERIAL_ECHOLNF(GET_EN_TEXT_F(MSG_ZPROBE_OUT));
+ LCD_MESSAGE(MSG_ZPROBE_OUT);
}
// Restore the active tool
diff --git a/Marlin/Marlin/src/gcode/probe/G38.cpp b/Marlin/Marlin/src/gcode/probe/G38.cpp
index 1b2da756..5b138fda 100644
--- a/Marlin/Marlin/src/gcode/probe/G38.cpp
+++ b/Marlin/Marlin/src/gcode/probe/G38.cpp
@@ -110,13 +110,7 @@ void GcodeSuite::G38(const int8_t subcode) {
remember_feedrate_scaling_off();
- const bool error_on_fail =
- #if ENABLED(G38_PROBE_AWAY)
- !TEST(subcode, 0)
- #else
- (subcode == 2)
- #endif
- ;
+ const bool error_on_fail = TERN(G38_PROBE_AWAY, !TEST(subcode, 0), subcode == 2);
// If any axis has enough movement, do the move
LOOP_NUM_AXES(i)
diff --git a/Marlin/Marlin/src/gcode/sd/M1001.cpp b/Marlin/Marlin/src/gcode/sd/M1001.cpp
index c7728a5a..1d1d1a4b 100644
--- a/Marlin/Marlin/src/gcode/sd/M1001.cpp
+++ b/Marlin/Marlin/src/gcode/sd/M1001.cpp
@@ -97,7 +97,7 @@ void GcodeSuite::M1001() {
if (long_print) {
printerEventLEDs.onPrintCompleted();
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_PRINT_DONE)));
- TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_PRINT_DONE), FPSTR(CONTINUE_STR)));
+ TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_PRINT_DONE)));
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(SEC_TO_MS(TERN(HAS_MARLINUI_MENU, PE_LEDS_COMPLETED_TIME, 30))));
printerEventLEDs.onResumeAfterWait();
}
diff --git a/Marlin/Marlin/src/inc/Conditionals_LCD.h b/Marlin/Marlin/src/inc/Conditionals_LCD.h
index 6585c8ec..eee877be 100644
--- a/Marlin/Marlin/src/inc/Conditionals_LCD.h
+++ b/Marlin/Marlin/src/inc/Conditionals_LCD.h
@@ -589,12 +589,26 @@
#else
#undef EXTRUDERS
#define EXTRUDERS 0
+ #undef TEMP_SENSOR_0
+ #undef TEMP_SENSOR_1
+ #undef TEMP_SENSOR_2
+ #undef TEMP_SENSOR_3
+ #undef TEMP_SENSOR_4
+ #undef TEMP_SENSOR_5
+ #undef TEMP_SENSOR_6
+ #undef TEMP_SENSOR_7
#undef SINGLENOZZLE
#undef SWITCHING_EXTRUDER
#undef SWITCHING_NOZZLE
#undef MIXING_EXTRUDER
#undef HOTEND_IDLE_TIMEOUT
#undef DISABLE_E
+ #undef THERMAL_PROTECTION_HOTENDS
+ #undef PREVENT_COLD_EXTRUSION
+ #undef PREVENT_LENGTHY_EXTRUDE
+ #undef FILAMENT_RUNOUT_SENSOR
+ #undef FILAMENT_RUNOUT_DISTANCE_MM
+ #undef DISABLE_INACTIVE_EXTRUDER
#endif
#define E_OPTARG(N) OPTARG(HAS_MULTI_EXTRUDER, N)
@@ -668,20 +682,28 @@
#if E_STEPPERS <= 7
#undef INVERT_E7_DIR
+ #undef E7_DRIVER_TYPE
#if E_STEPPERS <= 6
#undef INVERT_E6_DIR
+ #undef E6_DRIVER_TYPE
#if E_STEPPERS <= 5
#undef INVERT_E5_DIR
+ #undef E5_DRIVER_TYPE
#if E_STEPPERS <= 4
#undef INVERT_E4_DIR
+ #undef E4_DRIVER_TYPE
#if E_STEPPERS <= 3
#undef INVERT_E3_DIR
+ #undef E3_DRIVER_TYPE
#if E_STEPPERS <= 2
#undef INVERT_E2_DIR
+ #undef E2_DRIVER_TYPE
#if E_STEPPERS <= 1
#undef INVERT_E1_DIR
+ #undef E1_DRIVER_TYPE
#if E_STEPPERS == 0
#undef INVERT_E0_DIR
+ #undef E0_DRIVER_TYPE
#endif
#endif
#endif
@@ -719,6 +741,7 @@
#else
#define NUM_AXES 1
#endif
+#define HAS_X_AXIS 1
#if NUM_AXES >= XY
#define HAS_Y_AXIS 1
#if NUM_AXES >= XYZ
@@ -753,31 +776,6 @@
#endif
#endif
-#if E_STEPPERS <= 0
- #undef E0_DRIVER_TYPE
-#endif
-#if E_STEPPERS <= 1
- #undef E1_DRIVER_TYPE
-#endif
-#if E_STEPPERS <= 2
- #undef E2_DRIVER_TYPE
-#endif
-#if E_STEPPERS <= 3
- #undef E3_DRIVER_TYPE
-#endif
-#if E_STEPPERS <= 4
- #undef E4_DRIVER_TYPE
-#endif
-#if E_STEPPERS <= 5
- #undef E5_DRIVER_TYPE
-#endif
-#if E_STEPPERS <= 6
- #undef E6_DRIVER_TYPE
-#endif
-#if E_STEPPERS <= 7
- #undef E7_DRIVER_TYPE
-#endif
-
#if !HAS_Y_AXIS
#undef ENDSTOPPULLUP_YMIN
#undef ENDSTOPPULLUP_YMAX
@@ -793,7 +791,6 @@
#undef MANUAL_Y_HOME_POS
#undef MIN_SOFTWARE_ENDSTOP_Y
#undef MAX_SOFTWARE_ENDSTOP_Y
- #undef SAFE_BED_LEVELING_START_Y
#endif
#if !HAS_Z_AXIS
@@ -813,7 +810,6 @@
#undef MANUAL_Z_HOME_POS
#undef MIN_SOFTWARE_ENDSTOP_Z
#undef MAX_SOFTWARE_ENDSTOP_Z
- #undef SAFE_BED_LEVELING_START_Z
#endif
#if !HAS_I_AXIS
@@ -830,7 +826,6 @@
#undef MANUAL_I_HOME_POS
#undef MIN_SOFTWARE_ENDSTOP_I
#undef MAX_SOFTWARE_ENDSTOP_I
- #undef SAFE_BED_LEVELING_START_I
#endif
#if !HAS_J_AXIS
@@ -847,7 +842,6 @@
#undef MANUAL_J_HOME_POS
#undef MIN_SOFTWARE_ENDSTOP_J
#undef MAX_SOFTWARE_ENDSTOP_J
- #undef SAFE_BED_LEVELING_START_J
#endif
#if !HAS_K_AXIS
@@ -864,7 +858,6 @@
#undef MANUAL_K_HOME_POS
#undef MIN_SOFTWARE_ENDSTOP_K
#undef MAX_SOFTWARE_ENDSTOP_K
- #undef SAFE_BED_LEVELING_START_K
#endif
#if !HAS_U_AXIS
@@ -881,7 +874,6 @@
#undef MANUAL_U_HOME_POS
#undef MIN_SOFTWARE_ENDSTOP_U
#undef MAX_SOFTWARE_ENDSTOP_U
- #undef SAFE_BED_LEVELING_START_U
#endif
#if !HAS_V_AXIS
@@ -898,7 +890,6 @@
#undef MANUAL_V_HOME_POS
#undef MIN_SOFTWARE_ENDSTOP_V
#undef MAX_SOFTWARE_ENDSTOP_V
- #undef SAFE_BED_LEVELING_START_V
#endif
#if !HAS_W_AXIS
@@ -915,7 +906,6 @@
#undef MANUAL_W_HOME_POS
#undef MIN_SOFTWARE_ENDSTOP_W
#undef MAX_SOFTWARE_ENDSTOP_W
- #undef SAFE_BED_LEVELING_START_W
#endif
#ifdef X2_DRIVER_TYPE
@@ -929,7 +919,7 @@
/**
* Number of Primary Linear Axes (e.g., XYZ)
- * X, XY, or XYZ axes. Excluding duplicate axes (X2, Y2. Z2. Z3, Z4)
+ * X, XY, or XYZ axes. Excluding duplicate axes (X2, Y2, Z2, Z3, Z4)
*/
#if NUM_AXES >= 3
#define PRIMARY_LINEAR_AXES 3
@@ -1638,7 +1628,9 @@
#endif
#endif
-#if X_HOME_DIR || (HAS_Y_AXIS && Y_HOME_DIR) || (HAS_Z_AXIS && Z_HOME_DIR) || (HAS_I_AXIS && I_HOME_DIR) || (HAS_J_AXIS && J_HOME_DIR) || (HAS_K_AXIS && K_HOME_DIR)
+#if X_HOME_DIR || (HAS_Y_AXIS && Y_HOME_DIR) || (HAS_Z_AXIS && Z_HOME_DIR) \
+ || (HAS_I_AXIS && I_HOME_DIR) || (HAS_J_AXIS && J_HOME_DIR) || (HAS_K_AXIS && K_HOME_DIR) \
+ || (HAS_U_AXIS && U_HOME_DIR) || (HAS_V_AXIS && V_HOME_DIR) || (HAS_W_AXIS && W_HOME_DIR)
#define HAS_ENDSTOPS 1
#define COORDINATE_OKAY(N,L,H) WITHIN(N,L,H)
#else
diff --git a/Marlin/Marlin/src/inc/Conditionals_adv.h b/Marlin/Marlin/src/inc/Conditionals_adv.h
index 46ae6123..57beb096 100644
--- a/Marlin/Marlin/src/inc/Conditionals_adv.h
+++ b/Marlin/Marlin/src/inc/Conditionals_adv.h
@@ -86,31 +86,47 @@
#undef PROBE_DEPLOY_STOW_MENU
#endif
+// Some options are disallowed without required axes
+#if !HAS_Y_AXIS
+ #undef SAFE_BED_LEVELING_START_Y
+ #undef ARC_SUPPORT
+ #undef INPUT_SHAPING_Y
+ #undef SHAPING_FREQ_Y
+ #undef SHAPING_BUFFER_Y
+#endif
+#if !HAS_Z_AXIS
+ #undef SAFE_BED_LEVELING_START_Z
+#endif
+#if !HAS_I_AXIS
+ #undef SAFE_BED_LEVELING_START_I
+#endif
+#if !HAS_J_AXIS
+ #undef SAFE_BED_LEVELING_START_J
+#endif
+#if !HAS_K_AXIS
+ #undef SAFE_BED_LEVELING_START_K
+#endif
+#if !HAS_U_AXIS
+ #undef SAFE_BED_LEVELING_START_U
+#endif
+#if !HAS_V_AXIS
+ #undef SAFE_BED_LEVELING_START_V
+#endif
+#if !HAS_W_AXIS
+ #undef SAFE_BED_LEVELING_START_W
+#endif
+
+// Disallowed with no extruders
#if !HAS_EXTRUDERS
#define NO_VOLUMETRICS
- #undef TEMP_SENSOR_0
- #undef TEMP_SENSOR_1
- #undef TEMP_SENSOR_2
- #undef TEMP_SENSOR_3
- #undef TEMP_SENSOR_4
- #undef TEMP_SENSOR_5
- #undef TEMP_SENSOR_6
- #undef TEMP_SENSOR_7
#undef FWRETRACT
#undef PIDTEMP
#undef AUTOTEMP
#undef PID_EXTRUSION_SCALING
#undef LIN_ADVANCE
- #undef FILAMENT_RUNOUT_SENSOR
#undef ADVANCED_PAUSE_FEATURE
- #undef FILAMENT_RUNOUT_DISTANCE_MM
- #undef FILAMENT_LOAD_UNLOAD_GCODES
- #undef DISABLE_INACTIVE_EXTRUDER
#undef FILAMENT_LOAD_UNLOAD_GCODES
#undef EXTRUDER_RUNOUT_PREVENT
- #undef PREVENT_COLD_EXTRUSION
- #undef PREVENT_LENGTHY_EXTRUDE
- #undef THERMAL_PROTECTION_HOTENDS
#undef THERMAL_PROTECTION_PERIOD
#undef WATCH_TEMP_PERIOD
#undef SHOW_TEMP_ADC_VALUES
@@ -209,13 +225,12 @@
#define TEMP_SENSOR_0_IS_AD595 1
#elif TEMP_SENSOR_0 == -666
#define TEMP_SENSOR_0_IS_ADS1118 1
+#elif TEMP_SENSOR_0 == 1000
+ #define TEMP_SENSOR_0_IS_CUSTOM 1
+#elif TEMP_SENSOR_0 == 998 || TEMP_SENSOR_0 == 999
+ #define TEMP_SENSOR_0_IS_DUMMY 1
#elif TEMP_SENSOR_0 > 0
#define TEMP_SENSOR_0_IS_THERMISTOR 1
- #if TEMP_SENSOR_0 == 1000
- #define TEMP_SENSOR_0_IS_CUSTOM 1
- #elif TEMP_SENSOR_0 == 998 || TEMP_SENSOR_0 == 999
- #define TEMP_SENSOR_0_IS_DUMMY 1
- #endif
#else
#undef HEATER_0_MINTEMP
#undef HEATER_0_MAXTEMP
@@ -257,13 +272,12 @@
#define TEMP_SENSOR_1_IS_AD595 1
#elif TEMP_SENSOR_1 == -666
#define TEMP_SENSOR_1_IS_ADS1118 1
+#elif TEMP_SENSOR_1 == 1000
+ #define TEMP_SENSOR_1_IS_CUSTOM 1
+#elif TEMP_SENSOR_1 == 998 || TEMP_SENSOR_1 == 999
+ #define TEMP_SENSOR_1_IS_DUMMY 1
#elif TEMP_SENSOR_1 > 0
#define TEMP_SENSOR_1_IS_THERMISTOR 1
- #if TEMP_SENSOR_1 == 1000
- #define TEMP_SENSOR_1_IS_CUSTOM 1
- #elif TEMP_SENSOR_1 == 998 || TEMP_SENSOR_1 == 999
- #define TEMP_SENSOR_1_IS_DUMMY 1
- #endif
#else
#undef HEATER_1_MINTEMP
#undef HEATER_1_MAXTEMP
@@ -303,18 +317,72 @@
#define TEMP_SENSOR_2_IS_AD8495 1
#elif TEMP_SENSOR_2 == -1
#define TEMP_SENSOR_2_IS_AD595 1
+#elif TEMP_SENSOR_2 == 1000
+ #define TEMP_SENSOR_2_IS_CUSTOM 1
+#elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999
+ #define TEMP_SENSOR_2_IS_DUMMY 1
#elif TEMP_SENSOR_2 > 0
#define TEMP_SENSOR_2_IS_THERMISTOR 1
- #if TEMP_SENSOR_2 == 1000
- #define TEMP_SENSOR_2_IS_CUSTOM 1
- #elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999
- #define TEMP_SENSOR_2_IS_DUMMY 1
- #endif
#else
#undef HEATER_2_MINTEMP
#undef HEATER_2_MAXTEMP
#endif
+#if TEMP_SENSOR_3 == 1000
+ #define TEMP_SENSOR_3_IS_CUSTOM 1
+#elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999
+ #define TEMP_SENSOR_3_IS_DUMMY 1
+#elif TEMP_SENSOR_3 > 0
+ #define TEMP_SENSOR_3_IS_THERMISTOR 1
+#elif !TEMP_SENSOR_3
+ #undef HEATER_3_MINTEMP
+ #undef HEATER_3_MAXTEMP
+#endif
+
+#if TEMP_SENSOR_4 == 1000
+ #define TEMP_SENSOR_4_IS_CUSTOM 1
+#elif TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999
+ #define TEMP_SENSOR_4_IS_DUMMY 1
+#elif TEMP_SENSOR_4 > 0
+ #define TEMP_SENSOR_4_IS_THERMISTOR 1
+#elif !TEMP_SENSOR_4
+ #undef HEATER_4_MINTEMP
+ #undef HEATER_4_MAXTEMP
+#endif
+
+#if TEMP_SENSOR_5 == 1000
+ #define TEMP_SENSOR_5_IS_CUSTOM 1
+#elif TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999
+ #define TEMP_SENSOR_5_IS_DUMMY 1
+#elif TEMP_SENSOR_5 > 0
+ #define TEMP_SENSOR_5_IS_THERMISTOR 1
+#elif !TEMP_SENSOR_5
+ #undef HEATER_5_MINTEMP
+ #undef HEATER_5_MAXTEMP
+#endif
+
+#if TEMP_SENSOR_6 == 1000
+ #define TEMP_SENSOR_6_IS_CUSTOM 1
+#elif TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999
+ #define TEMP_SENSOR_6_IS_DUMMY 1
+#elif TEMP_SENSOR_6 > 0
+ #define TEMP_SENSOR_6_IS_THERMISTOR 1
+#elif !TEMP_SENSOR_6
+ #undef HEATER_6_MINTEMP
+ #undef HEATER_6_MAXTEMP
+#endif
+
+#if TEMP_SENSOR_7 == 1000
+ #define TEMP_SENSOR_7_IS_CUSTOM 1
+#elif TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999
+ #define TEMP_SENSOR_7_IS_DUMMY 1
+#elif TEMP_SENSOR_7 > 0
+ #define TEMP_SENSOR_7_IS_THERMISTOR 1
+#elif !TEMP_SENSOR_7
+ #undef HEATER_7_MINTEMP
+ #undef HEATER_7_MAXTEMP
+#endif
+
#if TEMP_SENSOR_IS_MAX_TC(REDUNDANT)
#if TEMP_SENSOR_REDUNDANT == -5
#if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) && !REDUNDANT_TEMP_MATCH(SOURCE, E2)
@@ -1044,6 +1112,12 @@
#endif
#endif
+#if defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
+ || defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
+ || defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
+ #define HAS_SAFE_BED_LEVELING 1
+#endif
+
//
// SD Card connection methods
// Defined here so pins and sanity checks can use them
@@ -1149,11 +1223,6 @@
#endif
// Input shaping
-#if !HAS_Y_AXIS
- #undef INPUT_SHAPING_Y
- #undef SHAPING_FREQ_Y
- #undef SHAPING_BUFFER_Y
-#endif
#if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y)
#define HAS_SHAPING 1
#endif
diff --git a/Marlin/Marlin/src/inc/Conditionals_post.h b/Marlin/Marlin/src/inc/Conditionals_post.h
index fee9902a..0640c417 100644
--- a/Marlin/Marlin/src/inc/Conditionals_post.h
+++ b/Marlin/Marlin/src/inc/Conditionals_post.h
@@ -190,22 +190,22 @@
#define XY_CENTER { X_CENTER, Y_CENTER }
#endif
#if HAS_I_AXIS
- #define I_CENTER TERN(BED_CENTER_AT_0_0, 0, _I_HALF_BED)
+ #define I_CENTER _I_HALF_BED
#endif
#if HAS_J_AXIS
- #define J_CENTER TERN(BED_CENTER_AT_0_0, 0, _J_HALF_BED)
+ #define J_CENTER _J_HALF_BED
#endif
#if HAS_K_AXIS
- #define K_CENTER TERN(BED_CENTER_AT_0_0, 0, _K_HALF_BED)
+ #define K_CENTER _K_HALF_BED
#endif
#if HAS_U_AXIS
- #define U_CENTER TERN(BED_CENTER_AT_0_0, 0, _U_HALF_BED)
+ #define U_CENTER _U_HALF_BED
#endif
#if HAS_V_AXIS
- #define V_CENTER TERN(BED_CENTER_AT_0_0, 0, _V_HALF_BED)
+ #define V_CENTER _V_HALF_BED
#endif
#if HAS_W_AXIS
- #define W_CENTER TERN(BED_CENTER_AT_0_0, 0, _W_HALF_BED)
+ #define W_CENTER _W_HALF_BED
#endif
// Get the linear boundaries of the bed
@@ -341,21 +341,21 @@
#ifdef MANUAL_U_HOME_POS
#define U_HOME_POS MANUAL_U_HOME_POS
#else
- #define U_HOME_POS (U_HOME_DIR < 0 ? U_MIN_POS : U_MAX_POS)
+ #define U_HOME_POS TERN(U_HOME_TO_MIN, U_MIN_POS, U_MAX_POS)
#endif
#endif
#if HAS_V_AXIS
#ifdef MANUAL_V_HOME_POS
#define V_HOME_POS MANUAL_V_HOME_POS
#else
- #define V_HOME_POS (V_HOME_DIR < 0 ? V_MIN_POS : V_MAX_POS)
+ #define V_HOME_POS TERN(V_HOME_TO_MIN, V_MIN_POS, V_MAX_POS)
#endif
#endif
#if HAS_W_AXIS
#ifdef MANUAL_W_HOME_POS
#define W_HOME_POS MANUAL_W_HOME_POS
#else
- #define W_HOME_POS (W_HOME_DIR < 0 ? W_MIN_POS : W_MAX_POS)
+ #define W_HOME_POS TERN(W_HOME_TO_MIN, W_MIN_POS, W_MAX_POS)
#endif
#endif
@@ -511,7 +511,7 @@
*/
#if ENABLED(SDSUPPORT)
- #if HAS_SD_HOST_DRIVE && SD_CONNECTION_IS(ONBOARD)
+ #if HAS_SD_HOST_DRIVE && SD_CONNECTION_IS(ONBOARD) && DISABLED(KEEP_SD_DETECT)
//
// The external SD card is not used. Hardware SPI is used to access the card.
// When sharing the SD card with a PC we want the menu options to
@@ -1267,6 +1267,24 @@
#if ENABLED(USE_ZMAX_PLUG)
#define ENDSTOPPULLDOWN_ZMAX
#endif
+ #if ENABLED(USE_IMAX_PLUG)
+ #define ENDSTOPPULLDOWN_IMAX
+ #endif
+ #if ENABLED(USE_JMAX_PLUG)
+ #define ENDSTOPPULLDOWN_JMAX
+ #endif
+ #if ENABLED(USE_KMAX_PLUG)
+ #define ENDSTOPPULLDOWN_KMAX
+ #endif
+ #if ENABLED(USE_UMAX_PLUG)
+ #define ENDSTOPPULLDOWN_UMAX
+ #endif
+ #if ENABLED(USE_VMAX_PLUG)
+ #define ENDSTOPPULLDOWN_VMAX
+ #endif
+ #if ENABLED(USE_WMAX_PLUG)
+ #define ENDSTOPPULLDOWN_WMAX
+ #endif
#if ENABLED(USE_XMIN_PLUG)
#define ENDSTOPPULLDOWN_XMIN
#endif
@@ -1276,6 +1294,24 @@
#if ENABLED(USE_ZMIN_PLUG)
#define ENDSTOPPULLDOWN_ZMIN
#endif
+ #if ENABLED(USE_IMIN_PLUG)
+ #define ENDSTOPPULLDOWN_IMIN
+ #endif
+ #if ENABLED(USE_JMIN_PLUG)
+ #define ENDSTOPPULLDOWN_JMIN
+ #endif
+ #if ENABLED(USE_KMIN_PLUG)
+ #define ENDSTOPPULLDOWN_KMIN
+ #endif
+ #if ENABLED(USE_UMIN_PLUG)
+ #define ENDSTOPPULLDOWN_UMIN
+ #endif
+ #if ENABLED(USE_VMIN_PLUG)
+ #define ENDSTOPPULLDOWN_VMIN
+ #endif
+ #if ENABLED(USE_WMIN_PLUG)
+ #define ENDSTOPPULLDOWN_WMIN
+ #endif
#endif
/**
@@ -2254,7 +2290,7 @@
#define IS_Z3_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3 && Z3_USE_ENDSTOP == _##A##M##_)
#define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_)
-#define _HAS_STOP(A,M) (PIN_EXISTS(A##_##M) && !IS_PROBE_PIN(A,M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_ENDSTOP(A,M) && !IS_Z3_ENDSTOP(A,M) && !IS_Z4_ENDSTOP(A,M))
+#define _HAS_STOP(A,M) (HAS_##A##_AXIS && PIN_EXISTS(A##_##M) && !IS_PROBE_PIN(A,M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_ENDSTOP(A,M) && !IS_Z3_ENDSTOP(A,M) && !IS_Z4_ENDSTOP(A,M))
#if _HAS_STOP(X,MIN)
#define HAS_X_MIN 1
#endif
@@ -2570,10 +2606,21 @@
#if ANY(HAS_AUTO_FAN_0, HAS_AUTO_FAN_1, HAS_AUTO_FAN_2, HAS_AUTO_FAN_3, HAS_AUTO_FAN_4, HAS_AUTO_FAN_5, HAS_AUTO_FAN_6, HAS_AUTO_FAN_7, HAS_AUTO_CHAMBER_FAN, HAS_AUTO_COOLER_FAN)
#define HAS_AUTO_FAN 1
-#endif
-#define _FANOVERLAP(A,B) (A##_AUTO_FAN_PIN == E##B##_AUTO_FAN_PIN)
-#if HAS_AUTO_FAN && (_FANOVERLAP(CHAMBER,0) || _FANOVERLAP(CHAMBER,1) || _FANOVERLAP(CHAMBER,2) || _FANOVERLAP(CHAMBER,3) || _FANOVERLAP(CHAMBER,4) || _FANOVERLAP(CHAMBER,5) || _FANOVERLAP(CHAMBER,6) || _FANOVERLAP(CHAMBER,7))
- #define AUTO_CHAMBER_IS_E 1
+ #define _FANOVERLAP(I,T) (T##_AUTO_FAN_PIN == E##I##_AUTO_FAN_PIN)
+ #if HAS_AUTO_CHAMBER_FAN
+ #define _CHFANOVERLAP(I) || _FANOVERLAP(I,CHAMBER)
+ #if (0 REPEAT(8, _CHFANOVERLAP))
+ #define AUTO_CHAMBER_IS_E 1
+ #endif
+ #undef _CHFANOVERLAP
+ #endif
+ #if HAS_AUTO_COOLER_FAN
+ #define _COFANOVERLAP(I) || _FANOVERLAP(I,COOLER)
+ #if (0 REPEAT(8, _COFANOVERLAP))
+ #define AUTO_COOLER_IS_E 1
+ #endif
+ #undef _COFANOVERLAP
+ #endif
#endif
// Fans check
@@ -2618,6 +2665,9 @@
#if !HAS_AUTO_CHAMBER_FAN || AUTO_CHAMBER_IS_E
#undef AUTO_POWER_CHAMBER_FAN
#endif
+#if !HAS_AUTO_COOLER_FAN || AUTO_COOLER_IS_E
+ #undef AUTO_POWER_COOLER_FAN
+#endif
// Print Cooling fans (limit)
#ifdef NUM_M106_FANS
diff --git a/Marlin/Marlin/src/inc/MarlinConfig.h b/Marlin/Marlin/src/inc/MarlinConfig.h
index 8fdb4b9b..c8584be1 100644
--- a/Marlin/Marlin/src/inc/MarlinConfig.h
+++ b/Marlin/Marlin/src/inc/MarlinConfig.h
@@ -34,20 +34,20 @@
#include "../pins/pins.h"
#ifndef __MARLIN_DEPS__
- #include HAL_PATH(../HAL, timers.h)
- #include HAL_PATH(../HAL, spi_pins.h)
+ #include HAL_PATH(.., timers.h)
+ #include HAL_PATH(.., spi_pins.h)
#endif
#include "Conditionals_post.h"
#ifndef __MARLIN_DEPS__
- #include HAL_PATH(../HAL, inc/Conditionals_post.h)
+ #include HAL_PATH(.., inc/Conditionals_post.h)
#include "../core/types.h" // Ahead of sanity-checks
#include "SanityCheck.h"
- #include HAL_PATH(../HAL, inc/SanityCheck.h)
+ #include HAL_PATH(.., inc/SanityCheck.h)
// Include all core headers
#include "../core/language.h"
diff --git a/Marlin/Marlin/src/inc/MarlinConfigPre.h b/Marlin/Marlin/src/inc/MarlinConfigPre.h
index c090b7e3..c2191ab1 100644
--- a/Marlin/Marlin/src/inc/MarlinConfigPre.h
+++ b/Marlin/Marlin/src/inc/MarlinConfigPre.h
@@ -49,7 +49,7 @@
#include "Conditionals_LCD.h"
#ifndef __MARLIN_DEPS__
- #include HAL_PATH(../HAL, inc/Conditionals_LCD.h)
+ #include HAL_PATH(.., inc/Conditionals_LCD.h)
#endif
#include "../core/drivers.h"
@@ -58,5 +58,5 @@
#include "Conditionals_adv.h"
#ifndef __MARLIN_DEPS__
- #include HAL_PATH(../HAL, inc/Conditionals_adv.h)
+ #include HAL_PATH(.., inc/Conditionals_adv.h)
#endif
diff --git a/Marlin/Marlin/src/inc/SanityCheck.h b/Marlin/Marlin/src/inc/SanityCheck.h
index 970d3252..ca47353f 100644
--- a/Marlin/Marlin/src/inc/SanityCheck.h
+++ b/Marlin/Marlin/src/inc/SanityCheck.h
@@ -88,7 +88,7 @@
* Warnings for old configurations
*/
#ifndef MOTHERBOARD
- #error "MOTHERBOARD is required."
+ #error "MOTHERBOARD is required. You must '#define MOTHERBOARD BOARD_MYNAME' (not just '#define BOARD_MYNAME')."
#elif !defined(X_BED_SIZE) || !defined(Y_BED_SIZE)
#error "X_BED_SIZE and Y_BED_SIZE are now required!"
#elif WATCH_TEMP_PERIOD > 500
@@ -652,6 +652,8 @@
#error "USE_M73_REMAINING_TIME is now SET_REMAINING_TIME."
#elif defined(SHOW_SD_PERCENT)
#error "SHOW_SD_PERCENT is now SHOW_PROGRESS_PERCENT."
+#elif defined(LIN_ADVANCE_K)
+ #error "LIN_ADVANCE_K is now ADVANCE_K."
#elif defined(EXTRA_LIN_ADVANCE_K)
#error "EXTRA_LIN_ADVANCE_K is now ADVANCE_K_EXTRA."
#elif defined(POLAR_SEGMENTS_PER_SECOND) || defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) || defined(TPARA_SEGMENTS_PER_SECOND)
@@ -814,15 +816,13 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
/**
* Multiple Stepper Drivers Per Axis
*/
-#define GOOD_AXIS_PINS(A) (HAS_##A##_ENABLE && HAS_##A##_STEP && HAS_##A##_DIR)
-#if HAS_X2_STEPPER && !GOOD_AXIS_PINS(X)
+#define GOOD_AXIS_PINS(A) PINS_EXIST(A##_ENABLE, A##_STEP, A##_DIR)
+#if HAS_X2_STEPPER && !GOOD_AXIS_PINS(X2)
#error "If X2_DRIVER_TYPE is defined, then X2 ENABLE/STEP/DIR pins are also needed."
#endif
-
-#if HAS_DUAL_Y_STEPPERS && !GOOD_AXIS_PINS(Y)
+#if HAS_DUAL_Y_STEPPERS && !GOOD_AXIS_PINS(Y2)
#error "If Y2_DRIVER_TYPE is defined, then Y2 ENABLE/STEP/DIR pins are also needed."
#endif
-
#if HAS_Z_AXIS
#if NUM_Z_STEPPERS >= 2 && !GOOD_AXIS_PINS(Z2)
#error "If Z2_DRIVER_TYPE is defined, then Z2 ENABLE/STEP/DIR pins are also needed."
@@ -837,7 +837,9 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
* Validate that the bed size fits
*/
static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS) are too narrow to contain X_BED_SIZE.");
-static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS) are too narrow to contain Y_BED_SIZE.");
+#if HAS_Y_AXIS
+ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS) are too narrow to contain Y_BED_SIZE.");
+#endif
/**
* Granular software endstops (Marlin >= 1.1.7)
@@ -978,12 +980,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "SDSORT_LIMIT must be 256 or smaller."
#elif SDSORT_LIMIT < 10
#error "SDSORT_LIMIT should be greater than 9 to be useful."
- #elif DISABLED(SDSORT_USES_RAM)
- #if ENABLED(SDSORT_DYNAMIC_RAM)
- #error "SDSORT_DYNAMIC_RAM requires SDSORT_USES_RAM (which reads the directory into RAM)."
- #elif ENABLED(SDSORT_CACHE_NAMES)
- #error "SDSORT_CACHE_NAMES requires SDSORT_USES_RAM (which reads the directory into RAM)."
- #endif
+ #elif ENABLED(SDSORT_DYNAMIC_RAM) && DISABLED(SDSORT_USES_RAM)
+ #error "SDSORT_DYNAMIC_RAM requires SDSORT_USES_RAM (which reads the directory into RAM)."
+ #elif ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_USES_RAM)
+ #error "SDSORT_CACHE_NAMES requires SDSORT_USES_RAM (which reads the directory into RAM)."
+ #elif ENABLED(SDSORT_DYNAMIC_RAM) && DISABLED(SDSORT_CACHE_NAMES)
+ #error "SDSORT_DYNAMIC_RAM requires SDSORT_CACHE_NAMES."
#endif
#if ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM)
@@ -1550,18 +1552,18 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#endif
/**
- * Features that require a min/max/specific NUM_AXES
+ * Features that require a min/max/specific steppers / axes to be enabled.
*/
#if HAS_LEVELING && !HAS_Z_AXIS
#error "Leveling in Marlin requires three or more axes, with Z as the vertical axis."
#elif ENABLED(CNC_WORKSPACE_PLANES) && !HAS_Z_AXIS
- #error "CNC_WORKSPACE_PLANES currently requires NUM_AXES >= 3"
+ #error "CNC_WORKSPACE_PLANES currently requires a Z axis"
#elif ENABLED(DIRECT_STEPPING) && NUM_AXES > XYZ
- #error "DIRECT_STEPPING currently requires NUM_AXES 3"
-#elif ENABLED(FOAMCUTTER_XYUV) && NUM_AXES < 5
- #error "FOAMCUTTER_XYUV requires NUM_AXES >= 5."
+ #error "DIRECT_STEPPING does not currently support more than 3 axes (i.e., XYZ)."
+#elif ENABLED(FOAMCUTTER_XYUV) && !(HAS_I_AXIS && HAS_J_AXIS)
+ #error "FOAMCUTTER_XYUV requires I and J steppers to be enabled."
#elif ENABLED(LINEAR_ADVANCE) && HAS_I_AXIS
- #error "LINEAR_ADVANCE currently requires NUM_AXES <= 3."
+ #error "LINEAR_ADVANCE does not currently support the inclusion of an I axis."
#endif
/**
@@ -1569,11 +1571,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
*/
#if HAS_I_AXIS
#if !defined(I_MIN_POS) || !defined(I_MAX_POS)
- #error "I_MIN_POS and I_MAX_POS are required with NUM_AXES >= 4."
+ #error "I_MIN_POS and I_MAX_POS are required for the I axis."
#elif !defined(I_HOME_DIR)
- #error "I_HOME_DIR is required with NUM_AXES >= 4."
+ #error "I_HOME_DIR is required for the I axis."
#elif HAS_I_ENABLE && !defined(I_ENABLE_ON)
- #error "I_ENABLE_ON is required for your I driver with NUM_AXES >= 4."
+ #error "I_ENABLE_ON is required for the I stepper."
+ #elif !defined(INVERT_I_DIR)
+ #error "INVERT_I_DIR is required for the I stepper."
#endif
#endif
#if HAS_J_AXIS
@@ -1582,11 +1586,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#elif ENABLED(AXIS5_ROTATES) && DISABLED(AXIS4_ROTATES)
#error "AXIS5_ROTATES requires AXIS4_ROTATES."
#elif !defined(J_MIN_POS) || !defined(J_MAX_POS)
- #error "J_MIN_POS and J_MAX_POS are required with NUM_AXES >= 5."
+ #error "J_MIN_POS and J_MAX_POS are required for the J axis."
#elif !defined(J_HOME_DIR)
- #error "J_HOME_DIR is required with NUM_AXES >= 5."
+ #error "J_HOME_DIR is required for the J axis."
#elif HAS_J_ENABLE && !defined(J_ENABLE_ON)
- #error "J_ENABLE_ON is required for your J driver with NUM_AXES >= 5."
+ #error "J_ENABLE_ON is required for the J stepper."
+ #elif !defined(INVERT_J_DIR)
+ #error "INVERT_J_DIR is required for the J stepper."
#endif
#endif
#if HAS_K_AXIS
@@ -1595,11 +1601,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#elif ENABLED(AXIS6_ROTATES) && DISABLED(AXIS5_ROTATES)
#error "AXIS6_ROTATES requires AXIS5_ROTATES."
#elif !defined(K_MIN_POS) || !defined(K_MAX_POS)
- #error "K_MIN_POS and K_MAX_POS are required with NUM_AXES >= 6."
+ #error "K_MIN_POS and K_MAX_POS are required for the K axis."
#elif !defined(K_HOME_DIR)
- #error "K_HOME_DIR is required with NUM_AXES >= 6."
+ #error "K_HOME_DIR is required for the K axis."
#elif HAS_K_ENABLE && !defined(K_ENABLE_ON)
- #error "K_ENABLE_ON is required for your K driver with NUM_AXES >= 6."
+ #error "K_ENABLE_ON is required for the K stepper."
+ #elif !defined(INVERT_K_DIR)
+ #error "INVERT_K_DIR is required for the K stepper."
#endif
#endif
#if HAS_U_AXIS
@@ -1608,11 +1616,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#elif ENABLED(AXIS7_ROTATES) && DISABLED(AXIS6_ROTATES)
#error "AXIS7_ROTATES requires AXIS6_ROTATES."
#elif !defined(U_MIN_POS) || !defined(U_MAX_POS)
- #error "U_MIN_POS and U_MAX_POS are required with NUM_AXES >= 7."
+ #error "U_MIN_POS and U_MAX_POS are required for the U axis."
#elif !defined(U_HOME_DIR)
- #error "U_HOME_DIR is required with NUM_AXES >= 7."
+ #error "U_HOME_DIR is required for the U axis."
#elif HAS_U_ENABLE && !defined(U_ENABLE_ON)
- #error "U_ENABLE_ON is required for your U driver with NUM_AXES >= 7."
+ #error "U_ENABLE_ON is required for the U stepper."
+ #elif !defined(INVERT_U_DIR)
+ #error "INVERT_U_DIR is required for the U stepper."
#endif
#endif
#if HAS_V_AXIS
@@ -1621,11 +1631,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#elif ENABLED(AXIS8_ROTATES) && DISABLED(AXIS7_ROTATES)
#error "AXIS8_ROTATES requires AXIS7_ROTATES."
#elif !defined(V_MIN_POS) || !defined(V_MAX_POS)
- #error "V_MIN_POS and V_MAX_POS are required with NUM_AXES >= 8."
+ #error "V_MIN_POS and V_MAX_POS are required for the V axis."
#elif !defined(V_HOME_DIR)
- #error "V_HOME_DIR is required with NUM_AXES >= 8."
+ #error "V_HOME_DIR is required for the V axis."
#elif HAS_V_ENABLE && !defined(V_ENABLE_ON)
- #error "V_ENABLE_ON is required for your V driver with NUM_AXES >= 8."
+ #error "V_ENABLE_ON is required for the V stepper."
+ #elif !defined(INVERT_V_DIR)
+ #error "INVERT_V_DIR is required for the V stepper."
#endif
#endif
#if HAS_W_AXIS
@@ -1634,11 +1646,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#elif ENABLED(AXIS9_ROTATES) && DISABLED(AXIS8_ROTATES)
#error "AXIS9_ROTATES requires AXIS8_ROTATES."
#elif !defined(W_MIN_POS) || !defined(W_MAX_POS)
- #error "W_MIN_POS and W_MAX_POS are required with NUM_AXES >= 9."
+ #error "W_MIN_POS and W_MAX_POS are required for the W axis."
#elif !defined(W_HOME_DIR)
- #error "W_HOME_DIR is required with NUM_AXES >= 9."
+ #error "W_HOME_DIR is required for the W axis."
#elif HAS_W_ENABLE && !defined(W_ENABLE_ON)
- #error "W_ENABLE_ON is required for your W driver with NUM_AXES >= 9."
+ #error "W_ENABLE_ON is required for the W stepper."
+ #elif !defined(INVERT_W_DIR)
+ #error "INVERT_W_DIR is required for the W stepper."
#endif
#endif
@@ -1782,7 +1796,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "BLTOUCH requires DEACTIVATE_SERVOS_AFTER_MOVE to be to disabled. Please update your Configuration.h file."
#endif
- #if HAS_INVERTED_PROBE
+ #if ENABLED(INVERTED_PROBE_STATE)
#if !Z_MIN_PROBE_ENDSTOP_INVERTING
#error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_INVERTING set to true."
#endif
@@ -1790,7 +1804,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_INVERTING set to false."
#endif
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
- #if HAS_INVERTED_PROBE
+ #if ENABLED(INVERTED_PROBE_STATE)
#if !Z_MIN_ENDSTOP_INVERTING
#error "BLTOUCH requires Z_MIN_ENDSTOP_INVERTING set to true."
#endif
@@ -1822,7 +1836,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#elif !HAS_RESUME_CONTINUE
#error "TOUCH_MI_PROBE currently requires an LCD controller or EMERGENCY_PARSER."
#endif
- #if HAS_INVERTED_PROBE
+ #if ENABLED(INVERTED_PROBE_STATE)
#if !Z_MIN_PROBE_ENDSTOP_INVERTING
#error "TOUCH_MI_PROBE requires Z_MIN_PROBE_ENDSTOP_INVERTING set to true."
#endif
@@ -1830,7 +1844,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "TOUCH_MI_PROBE requires Z_MIN_PROBE_ENDSTOP_INVERTING set to false."
#endif
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
- #if HAS_INVERTED_PROBE
+ #if ENABLED(INVERTED_PROBE_STATE)
#if !Z_MIN_ENDSTOP_INVERTING
#error "TOUCH_MI_PROBE requires Z_MIN_ENDSTOP_INVERTING set to true."
#endif
@@ -1865,9 +1879,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
*/
#if ENABLED(SENSORLESS_PROBING)
#if ENABLED(DELTA) && !(X_SENSORLESS && Y_SENSORLESS && Z_SENSORLESS)
- #error "SENSORLESS_PROBING requires TMC2130/2160/2209/5130/5160 drivers on X, Y, and Z."
+ #error "SENSORLESS_PROBING requires TMC2130/2160/2209/5130/5160 drivers on X, Y, and Z and {X|Y|Z}_STALL_SENSITIVITY."
#elif !Z_SENSORLESS
- #error "SENSORLESS_PROBING requires a TMC2130/2160/2209/5130/5160 driver on Z."
+ #error "SENSORLESS_PROBING requires a TMC2130/2160/2209/5130/5160 driver on Z and Z_STALL_SENSITIVITY."
#endif
#elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
#if DISABLED(USE_ZMIN_PLUG)
@@ -2153,6 +2167,27 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
static_assert(WITHIN(Z_SAFE_HOMING_Y_POINT, Y_MIN_POS, Y_MAX_POS), "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle.");
#endif
+// Check Safe Bed Leveling settings
+#if HAS_SAFE_BED_LEVELING
+ #if defined(SAFE_BED_LEVELING_START_Y) && !defined(SAFE_BED_LEVELING_START_X)
+ #error "If SAFE_BED_LEVELING_START_Y is defined, SAFE_BED_LEVELING_START_X must also be defined."
+ #elif defined(SAFE_BED_LEVELING_START_Z) && !defined(SAFE_BED_LEVELING_START_Y)
+ #error "If SAFE_BED_LEVELING_START_Z is defined, SAFE_BED_LEVELING_START_Y must also be defined."
+ #elif defined(SAFE_BED_LEVELING_START_I) && !defined(SAFE_BED_LEVELING_START_Z)
+ #error "If SAFE_BED_LEVELING_START_I is defined, SAFE_BED_LEVELING_START_Z must also be defined."
+ #elif defined(SAFE_BED_LEVELING_START_J) && !defined(SAFE_BED_LEVELING_START_I)
+ #error "If SAFE_BED_LEVELING_START_J is defined, SAFE_BED_LEVELING_START_I must also be defined."
+ #elif defined(SAFE_BED_LEVELING_START_K) && !defined(SAFE_BED_LEVELING_START_J)
+ #error "If SAFE_BED_LEVELING_START_K is defined, SAFE_BED_LEVELING_START_J must also be defined."
+ #elif defined(SAFE_BED_LEVELING_START_U) && !defined(SAFE_BED_LEVELING_START_K)
+ #error "If SAFE_BED_LEVELING_START_U is defined, SAFE_BED_LEVELING_START_K must also be defined."
+ #elif defined(SAFE_BED_LEVELING_START_V) && !defined(SAFE_BED_LEVELING_START_U)
+ #error "If SAFE_BED_LEVELING_START_V is defined, SAFE_BED_LEVELING_START_U must also be defined."
+ #elif defined(SAFE_BED_LEVELING_START_W) && !defined(SAFE_BED_LEVELING_START_V)
+ #error "If SAFE_BED_LEVELING_START_W is defined, SAFE_BED_LEVELING_START_V must also be defined."
+ #endif
+#endif
+
/**
* Make sure DISABLE_[XYZ] compatible with selected homing options
*/
@@ -2491,8 +2526,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "TEMP_SENSOR_2 is required with 3 or more HOTENDS."
#elif !HAS_HEATER_2
#error "HEATER_2_PIN not defined for this board."
- #elif !PIN_EXISTS(TEMP_2) && !TEMP_SENSOR_2_IS_DUMMY
- #error "TEMP_2_PIN not defined for this board."
+ #elif !ANY_PIN(TEMP_2, TEMP_2_CS) && !TEMP_SENSOR_2_IS_DUMMY
+ #error "TEMP_2_PIN or TEMP_2_CS_PIN not defined for this board."
#endif
#if HOTENDS > 3
#if TEMP_SENSOR_3 == 0
@@ -2913,24 +2948,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
* Auto Fan check for PWM pins
*/
#if HAS_AUTO_FAN && EXTRUDER_AUTO_FAN_SPEED != 255
- #define AF_ERR_SUFF "_AUTO_FAN_PIN is not a PWM pin. Set EXTRUDER_AUTO_FAN_SPEED to 255."
- #if HAS_AUTO_FAN_0
- static_assert(_TEST_PWM(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF);
- #elif HAS_AUTO_FAN_1
- static_assert(_TEST_PWM(E1_AUTO_FAN_PIN), "E1" AF_ERR_SUFF);
- #elif HAS_AUTO_FAN_2
- static_assert(_TEST_PWM(E2_AUTO_FAN_PIN), "E2" AF_ERR_SUFF);
- #elif HAS_AUTO_FAN_3
- static_assert(_TEST_PWM(E3_AUTO_FAN_PIN), "E3" AF_ERR_SUFF);
- #elif HAS_AUTO_FAN_4
- static_assert(_TEST_PWM(E4_AUTO_FAN_PIN), "E4" AF_ERR_SUFF);
- #elif HAS_AUTO_FAN_5
- static_assert(_TEST_PWM(E5_AUTO_FAN_PIN), "E5" AF_ERR_SUFF);
- #elif HAS_AUTO_FAN_6
- static_assert(_TEST_PWM(E6_AUTO_FAN_PIN), "E6" AF_ERR_SUFF);
- #elif HAS_AUTO_FAN_7
- static_assert(_TEST_PWM(E7_AUTO_FAN_PIN), "E7" AF_ERR_SUFF);
- #endif
+ #define AF_ASSERT(N) OPTCODE(HAS_AUTO_FAN_##N, static_assert(_TEST_PWM(E##N##_AUTO_FAN_PIN), "E" STRINGIFY(N) "_AUTO_FAN_PIN is not a PWM pin. Set EXTRUDER_AUTO_FAN_SPEED to 255."))
+ REPEAT(8, AF_ASSERT)
+ #undef AF_ASSERT
#endif
/**
@@ -3129,7 +3149,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#endif
/**
- * Ender 3 V2 controller has some limitations
+ * Ender-3 V2 controller has some limitations
*/
#if ENABLED(DWIN_CREALITY_LCD)
#if DISABLED(SDSUPPORT)
@@ -4140,16 +4160,20 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
/**
* Touch Screen Calibration
*/
-#if !MB(LINUX_RAMPS) && ENABLED(TFT_TOUCH_DEVICE_XPT2046) && DISABLED(TOUCH_SCREEN_CALIBRATION) \
+#if !MB(SIMULATED) && ENABLED(TFT_TOUCH_DEVICE_XPT2046) && DISABLED(TOUCH_SCREEN_CALIBRATION) \
&& !(defined(TOUCH_CALIBRATION_X) && defined(TOUCH_CALIBRATION_Y) && defined(TOUCH_OFFSET_X) && defined(TOUCH_OFFSET_Y))
#error "TOUCH_CALIBRATION_[XY] and TOUCH_OFFSET_[XY] are required for resistive touch screens with TOUCH_SCREEN_CALIBRATION disabled."
#endif
/**
- * Sanity check for WIFI
+ * Sanity check WiFi options
*/
-#if EITHER(ESP3D_WIFISUPPORT, WIFISUPPORT) && DISABLED(ARDUINO_ARCH_ESP32)
- #error "ESP3D_WIFISUPPORT or WIFISUPPORT requires an ESP32 MOTHERBOARD."
+#if ENABLED(ESP3D_WIFISUPPORT) && DISABLED(ARDUINO_ARCH_ESP32)
+ #error "ESP3D_WIFISUPPORT requires an ESP32 MOTHERBOARD."
+#elif ENABLED(WEBSUPPORT) && NONE(ARDUINO_ARCH_ESP32, WIFISUPPORT)
+ #error "WEBSUPPORT requires WIFISUPPORT and an ESP32 MOTHERBOARD."
+#elif BOTH(ESP3D_WIFISUPPORT, WIFISUPPORT)
+ #error "Enable only one of ESP3D_WIFISUPPORT or WIFISUPPORT."
#endif
/**
@@ -4328,19 +4352,26 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#error "Input Shaping is not compatible with POLARGRAPH kinematics."
#elif ENABLED(DIRECT_STEPPING)
#error "Input Shaping is not compatible with DIRECT_STEPPING."
- #elif ENABLED(INPUT_SHAPING_X) && ANY(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY, MARKFORGED_YX)
- #error "INPUT_SHAPING_X is not supported with COREXY, COREYX, COREXZ, COREZX, or MARKFORGED_*."
- #elif ENABLED(INPUT_SHAPING_Y) && ANY(CORE_IS_XY, CORE_IS_YZ, MARKFORGED_XY, MARKFORGED_YX)
- #error "INPUT_SHAPING_Y is not supported with COREXY, COREYX, COREYZ, COREZY, or MARKFORGED_*."
+ #elif BOTH(INPUT_SHAPING_X, CORE_IS_XZ)
+ #error "INPUT_SHAPING_X is not supported with COREXZ."
+ #elif BOTH(INPUT_SHAPING_Y, CORE_IS_YZ)
+ #error "INPUT_SHAPING_Y is not supported with COREYZ."
+ #elif ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
+ #if !BOTH(INPUT_SHAPING_X, INPUT_SHAPING_Y)
+ #error "INPUT_SHAPING_X and INPUT_SHAPING_Y must both be enabled for COREXY, COREYX, or MARKFORGED_*."
+ #else
+ static_assert(SHAPING_FREQ_X == SHAPING_FREQ_Y, "SHAPING_FREQ_X and SHAPING_FREQ_Y must be the same for COREXY / COREYX / MARKFORGED_*.");
+ static_assert(SHAPING_ZETA_X == SHAPING_ZETA_Y, "SHAPING_ZETA_X and SHAPING_ZETA_Y must be the same for COREXY / COREYX / MARKFORGED_*.");
+ #endif
#endif
+ #ifdef SHAPING_MIN_FREQ
+ static_assert((SHAPING_MIN_FREQ) > 0, "SHAPING_MIN_FREQ must be > 0.");
+ #else
+ TERN_(INPUT_SHAPING_X, static_assert((SHAPING_FREQ_X) > 0, "SHAPING_FREQ_X must be > 0 or SHAPING_MIN_FREQ must be set."));
+ TERN_(INPUT_SHAPING_Y, static_assert((SHAPING_FREQ_Y) > 0, "SHAPING_FREQ_Y must be > 0 or SHAPING_MIN_FREQ must be set."));
+ #endif
#ifdef __AVR__
- #ifdef SHAPING_MIN_FREQ
- static_assert((SHAPING_MIN_FREQ) > 0, "SHAPING_MIN_FREQ must be > 0.");
- #else
- TERN_(INPUT_SHAPING_X, static_assert((SHAPING_FREQ_X) > 0, "SHAPING_FREQ_X must be > 0 or SHAPING_MIN_FREQ must be set."));
- TERN_(INPUT_SHAPING_Y, static_assert((SHAPING_FREQ_Y) > 0, "SHAPING_FREQ_Y must be > 0 or SHAPING_MIN_FREQ must be set."));
- #endif
#if ENABLED(INPUT_SHAPING_X)
#if F_CPU > 16000000
static_assert((SHAPING_FREQ_X) == 0 || (SHAPING_FREQ_X) * 2 * 0x10000 >= (STEPPER_TIMER_RATE), "SHAPING_FREQ_X is below the minimum (20) for AVR 20MHz.");
diff --git a/Marlin/Marlin/src/inc/Version.h b/Marlin/Marlin/src/inc/Version.h
index afe299db..f2aa5471 100644
--- a/Marlin/Marlin/src/inc/Version.h
+++ b/Marlin/Marlin/src/inc/Version.h
@@ -25,7 +25,7 @@
* Release version. Leave the Marlin version or apply a custom scheme.
*/
#ifndef SHORT_BUILD_VERSION
- #define SHORT_BUILD_VERSION "2.1.2"
+ #define SHORT_BUILD_VERSION "2.1.2.1"
#endif
/**
@@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
- #define STRING_DISTRIBUTION_DATE "2022-12-17"
+ #define STRING_DISTRIBUTION_DATE "2023-05-16"
#endif
/**
@@ -52,7 +52,7 @@
* to alert users to major changes.
*/
-#define MARLIN_HEX_VERSION 02010200
+#define MARLIN_HEX_VERSION 02010201
#ifndef REQUIRED_CONFIGURATION_H_VERSION
#define REQUIRED_CONFIGURATION_H_VERSION MARLIN_HEX_VERSION
#endif
diff --git a/Marlin/Marlin/src/inc/Warnings.cpp b/Marlin/Marlin/src/inc/Warnings.cpp
index 24f4d7fb..9b3d6986 100644
--- a/Marlin/Marlin/src/inc/Warnings.cpp
+++ b/Marlin/Marlin/src/inc/Warnings.cpp
@@ -715,7 +715,7 @@
#warning "Creality 4.2.2 boards come with a variety of stepper drivers. Check the board label (typically on SD Card module) and set the correct *_DRIVER_TYPE! (C=HR4988, E=A4988, A=TMC2208, B=TMC2209, H=TMC2225, H8=HR4988). (Define NO_CREALITY_422_DRIVER_WARNING to suppress this warning.)"
#endif
-#if PRINTCOUNTER_SYNC
+#if ENABLED(PRINTCOUNTER_SYNC)
#warning "To prevent step loss, motion will pause for PRINTCOUNTER auto-save."
#endif
@@ -777,9 +777,23 @@
#warning "Define MK3_FAN_PINS to swap hotend and part cooling fan pins. (Define NO_MK3_FAN_PINS_WARNING to suppress this warning.)"
#endif
+/**
+ * GD32 is not exactly like STM32
+ */
+#if MB(SOVOL_V131)
+ #warning "GD32 based controllers may not be fully compatible with Maple Generic STM32F103RE. Please report any issues."
+#endif
+
/**
* BD Sensor should always include BABYSTEPPING
*/
#if ENABLED(BD_SENSOR) && DISABLED(BABYSTEPPING)
#warning "BABYSTEPPING is recommended with BD_SENSOR."
#endif
+
+/**
+ * Input Shaping
+ */
+#if HAS_SHAPING && ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
+ #warning "Input Shaping for CORE / MARKFORGED kinematic axes is still experimental."
+#endif
diff --git a/Marlin/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp
index 9445198a..8817ad74 100644
--- a/Marlin/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp
+++ b/Marlin/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp
@@ -125,7 +125,7 @@ static void createChar_P(const char c, const byte * const ptr) {
#if ENABLED(LCD_USE_I2C_BUZZER)
- void MarlinUI::buzz(const long duration, const uint16_t freq) {
+ void MarlinUI::buzz(const long duration, const uint16_t freq/*=0*/) {
if (sound_on) lcd.buzz(duration, freq);
}
diff --git a/Marlin/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp
index e4f9e4ea..f87d76ce 100644
--- a/Marlin/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp
+++ b/Marlin/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp
@@ -299,7 +299,7 @@ uint8_t MarlinUI::read_slow_buttons() {
}
// Duration in ms, freq in Hz
-void MarlinUI::buzz(const long duration, const uint16_t freq) {
+void MarlinUI::buzz(const long duration, const uint16_t freq/*=0*/) {
if (!PanelDetected) return;
if (!sound_on) return;
#if ENABLED(TFTGLCD_PANEL_SPI)
diff --git a/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_hu.h b/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_hu.h
index 450662a8..c0175be8 100644
--- a/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_hu.h
+++ b/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_hu.h
@@ -7,10 +7,4 @@
#include "langdata.h"
-const u8g_fntpgm_uint8_t fontpage_2_241_241[31] U8G_FONT_SECTION("fontpage_2_241_241") = {
- 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF1,0xF1,0x00,0x08,0x00,0x00,
- 0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x48,0x90,0x00,0x88,0x88,0x88,0x88,0x70};
-
-static const uxg_fontinfo_t g_fontinfo_hu[] PROGMEM = {
- FONTDATA_ITEM(2, 241, 241, fontpage_2_241_241), // 'ű' -- 'ű'
-};
+static const uxg_fontinfo_t g_fontinfo_hu[] PROGMEM = {};
diff --git a/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_pl.h b/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_pl.h
index e89a6c15..e9365a69 100644
--- a/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_pl.h
+++ b/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_pl.h
@@ -27,6 +27,9 @@ const u8g_fntpgm_uint8_t fontpage_2_218_219[47] U8G_FONT_SECTION("fontpage_2_218
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDA,0xDB,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x88,0x80,0x70,0x08,0x88,
0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x78,0x80,0x70,0x08,0xF0};
+const u8g_fntpgm_uint8_t fontpage_2_250_250[31] U8G_FONT_SECTION("fontpage_2_250_250") = {
+ 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFA,0xFA,0x00,0x08,0x00,0x00,
+ 0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8};
const u8g_fntpgm_uint8_t fontpage_2_252_252[30] U8G_FONT_SECTION("fontpage_2_252_252") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8};
@@ -37,5 +40,6 @@ static const uxg_fontinfo_t g_fontinfo_pl[] PROGMEM = {
FONTDATA_ITEM(2, 153, 153, fontpage_2_153_153), // 'Ä' -- 'Ä'
FONTDATA_ITEM(2, 193, 196, fontpage_2_193_196), // 'Å' -- 'Å'
FONTDATA_ITEM(2, 218, 219, fontpage_2_218_219), // 'Å' -- 'Å'
+ FONTDATA_ITEM(2, 250, 250, fontpage_2_250_250), // 'ź' -- 'ź'
FONTDATA_ITEM(2, 252, 252, fontpage_2_252_252), // 'Ō' -- 'Ō'
};
diff --git a/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_sv.h b/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_sv.h
new file mode 100644
index 00000000..cf632876
--- /dev/null
+++ b/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_sv.h
@@ -0,0 +1,10 @@
+/**
+ * Generated automatically by buildroot/share/fonts/uxggenpages.sh
+ * Contents will be REPLACED by future processing!
+ * Use genallfont.sh to generate font data for updated languages.
+ */
+#pragma once
+
+#include "langdata.h"
+
+static const uxg_fontinfo_t g_fontinfo_sv[] PROGMEM = {};
diff --git a/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h b/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h
index 664fa5f4..60316a14 100644
--- a/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h
+++ b/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h
@@ -7,9 +7,6 @@
#include "langdata.h"
-const u8g_fntpgm_uint8_t fontpage_64_157_157[26] U8G_FONT_SECTION("fontpage_64_157_157") = {
- 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9D,0x9D,0x00,0x07,0x00,0x00,
- 0x00,0x05,0x03,0x03,0x06,0x00,0x04,0xD8,0x48,0x90};
const u8g_fntpgm_uint8_t fontpage_69_191_191[28] U8G_FONT_SECTION("fontpage_69_191_191") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBF,0xBF,0x00,0x05,0x00,0x00,
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x08,0x18,0x28,0x48,0xF8};
@@ -382,10 +379,6 @@ const u8g_fntpgm_uint8_t fontpage_172_232_232[45] U8G_FONT_SECTION("fontpage_172
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE8,0xE8,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x7B,0xC0,0x4A,0x40,0x4A,0x40,0x7B,0xC0,0x04,
0x80,0xFF,0xE0,0x11,0x00,0xFB,0xE0,0x4A,0x40,0x4A,0x40,0x7B,0xC0};
-const u8g_fntpgm_uint8_t fontpage_172_244_244[45] U8G_FONT_SECTION("fontpage_172_244_244") = {
- 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF4,0xF4,0x00,0x0A,0xFF,0x00,
- 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x01,0x00,0xEF,0xE0,0xA5,0x40,0xAF,0xE0,0xA4,
- 0x40,0xA7,0xC0,0xE4,0x40,0x07,0xC0,0x04,0x40,0x07,0xC0,0x0C,0x60};
const u8g_fntpgm_uint8_t fontpage_173_222_222[45] U8G_FONT_SECTION("fontpage_173_222_222") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDE,0xDE,0x00,0x0A,0xFF,0x00,
0x00,0x0A,0x0B,0x16,0x0C,0x01,0xFF,0xFF,0xC0,0x80,0x40,0x80,0x40,0x9E,0x40,0x92,
@@ -744,10 +737,6 @@ const u8g_fntpgm_uint8_t fontpage_202_244_244[45] U8G_FONT_SECTION("fontpage_202
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF4,0xF4,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x11,0x00,0xFF,0xE0,0x55,0x40,0x7C,0x80,0x39,
0x40,0x56,0x20,0x7F,0xC0,0x04,0x00,0x27,0x80,0x24,0x00,0xFF,0xE0};
-const u8g_fntpgm_uint8_t fontpage_203_135_135[45] U8G_FONT_SECTION("fontpage_203_135_135") = {
- 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x87,0x87,0x00,0x0A,0xFF,0x00,
- 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x08,0x00,0x04,0x00,0xFF,0xE0,0x11,0x00,0x11,
- 0x00,0x11,0x00,0x0A,0x00,0x0A,0x00,0x04,0x00,0x1B,0x00,0xE0,0xE0};
const u8g_fntpgm_uint8_t fontpage_203_153_153[45] U8G_FONT_SECTION("fontpage_203_153_153") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x99,0x99,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x20,0x80,0xAC,0x80,0x72,0x80,0x20,0x80,0xFC,
@@ -1050,10 +1039,6 @@ const u8g_fntpgm_uint8_t fontpage_246_201_201[45] U8G_FONT_SECTION("fontpage_246
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC9,0xC9,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x42,0x00,0x7B,0xE0,0x94,0x80,0x7F,0xC0,0x04,
0x00,0xFF,0xE0,0x01,0x00,0x7F,0xC0,0x11,0x00,0x09,0x00,0x03,0x00};
-const u8g_fntpgm_uint8_t fontpage_247_128_128[45] U8G_FONT_SECTION("fontpage_247_128_128") = {
- 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x0A,0xFF,0x00,
- 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x42,0x00,0x7B,0xE0,0x94,0x80,0x27,0xC0,0x50,
- 0x40,0x4F,0x40,0x49,0x40,0x4F,0x40,0x49,0x40,0x4F,0x40,0x40,0xC0};
const u8g_fntpgm_uint8_t fontpage_247_177_177[45] U8G_FONT_SECTION("fontpage_247_177_177") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB1,0xB1,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x21,0x00,0x3D,0xE0,0x4A,0x80,0x94,0x40,0x7F,
@@ -1465,7 +1450,6 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510
0x00,0x02,0x07,0x07,0x0C,0x06,0x01,0xC0,0xC0,0x00,0x00,0x00,0xC0,0xC0};
static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = {
- FONTDATA_ITEM(64, 157, 157, fontpage_64_157_157), // 'â' -- 'â'
FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // 'â¿' -- 'â¿'
FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // 'äž' -- 'äž'
FONTDATA_ITEM(156, 137, 139, fontpage_156_137_139), // 'äž' -- 'äž'
@@ -1553,7 +1537,6 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = {
FONTDATA_ITEM(171, 183, 183, fontpage_171_183_183), // 'å·' -- 'å·'
FONTDATA_ITEM(172, 180, 180, fontpage_172_180_180), // 'åŽ' -- 'åŽ'
FONTDATA_ITEM(172, 232, 232, fontpage_172_232_232), // 'åš' -- 'åš'
- FONTDATA_ITEM(172, 244, 244, fontpage_172_244_244), // 'åŽ' -- 'åŽ'
FONTDATA_ITEM(173, 222, 222, fontpage_173_222_222), // 'å' -- 'å'
FONTDATA_ITEM(173, 224, 224, fontpage_173_224_224), // 'å ' -- 'å '
FONTDATA_ITEM(173, 250, 250, fontpage_173_250_250), // 'åº' -- 'åº'
@@ -1642,7 +1625,6 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = {
FONTDATA_ITEM(202, 240, 240, fontpage_202_240_240), // 'æ°' -- 'æ°'
FONTDATA_ITEM(202, 242, 242, fontpage_202_242_242), // 'æ²' -- 'æ²'
FONTDATA_ITEM(202, 244, 244, fontpage_202_244_244), // 'æŽ' -- 'æŽ'
- FONTDATA_ITEM(203, 135, 135, fontpage_203_135_135), // 'æ' -- 'æ'
FONTDATA_ITEM(203, 153, 153, fontpage_203_153_153), // 'æ' -- 'æ'
FONTDATA_ITEM(203, 156, 156, fontpage_203_156_156), // 'æ' -- 'æ'
FONTDATA_ITEM(203, 173, 173, fontpage_203_173_173), // 'æ' -- 'æ'
@@ -1718,7 +1700,6 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = {
FONTDATA_ITEM(245, 239, 239, fontpage_245_239_239), // '端' -- '端'
FONTDATA_ITEM(246, 172, 172, fontpage_246_172_172), // '第' -- '第'
FONTDATA_ITEM(246, 201, 201, fontpage_246_201_201), // 'ç' -- 'ç'
- FONTDATA_ITEM(247, 128, 128, fontpage_247_128_128), // 'ç®' -- 'ç®'
FONTDATA_ITEM(247, 177, 177, fontpage_247_177_177), // 'ç®±' -- 'ç®±'
FONTDATA_ITEM(248, 251, 251, fontpage_248_251_251), // 'ç±»' -- 'ç±»'
FONTDATA_ITEM(250, 162, 162, fontpage_250_162_162), // '玢' -- '玢'
diff --git a/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h b/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h
index 093629cd..c132a0de 100644
--- a/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h
+++ b/Marlin/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h
@@ -343,12 +343,10 @@ const u8g_fntpgm_uint8_t fontpage_178_167_167[45] U8G_FONT_SECTION("fontpage_178
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA7,0xA7,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x04,0x00,0x04,0x00,0x04,0x00,0xFF,0xE0,0x04,
0x00,0x04,0x00,0x0A,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0xC0,0x60};
-const u8g_fntpgm_uint8_t fontpage_178_169_170[73] U8G_FONT_SECTION("fontpage_178_169_170") = {
- 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA9,0xAA,0x00,0x0A,0xFF,0x00,
+const u8g_fntpgm_uint8_t fontpage_178_169_169[45] U8G_FONT_SECTION("fontpage_178_169_169") = {
+ 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA9,0xA9,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x7F,0xC0,0x04,0x00,0x04,0x00,0x04,0x00,0xFF,
- 0xE0,0x04,0x00,0x0A,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0xC0,0x60,0x0B,0x0B,0x16,
- 0x0C,0x00,0xFF,0x04,0x00,0x04,0x00,0x04,0x00,0xFF,0xE0,0x04,0x00,0x0A,0x00,0x0A,
- 0x00,0x11,0x00,0x19,0x00,0x24,0x80,0xC4,0x60};
+ 0xE0,0x04,0x00,0x0A,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0xC0,0x60};
const u8g_fntpgm_uint8_t fontpage_178_177_177[45] U8G_FONT_SECTION("fontpage_178_177_177") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB1,0xB1,0x00,0x0A,0xFF,0x00,
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x24,0x00,0x24,0x00,0x3F,0xC0,0x44,0x00,0x04,
@@ -1302,7 +1300,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_TW[] PROGMEM = {
FONTDATA_ITEM(178, 154, 154, fontpage_178_154_154), // 'å€' -- 'å€'
FONTDATA_ITEM(178, 160, 160, fontpage_178_160_160), // 'å€ ' -- 'å€ '
FONTDATA_ITEM(178, 167, 167, fontpage_178_167_167), // '倧' -- '倧'
- FONTDATA_ITEM(178, 169, 170, fontpage_178_169_170), // '倩' -- '倪'
+ FONTDATA_ITEM(178, 169, 169, fontpage_178_169_169), // '倩' -- '倩'
FONTDATA_ITEM(178, 177, 177, fontpage_178_177_177), // '倱' -- '倱'
FONTDATA_ITEM(179, 203, 203, fontpage_179_203_203), // 'å§' -- 'å§'
FONTDATA_ITEM(181, 146, 146, fontpage_181_146_146), // 'åª' -- 'åª'
diff --git a/Marlin/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp b/Marlin/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp
index 9ed0d8a9..bb5294ea 100644
--- a/Marlin/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp
+++ b/Marlin/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp
@@ -629,14 +629,14 @@ void ST7920_Lite_Status_Screen::draw_position(const xyze_pos_t &pos, const bool
#endif
}
else {
- write_byte(alt_label ? alt_label : 'X');
+ write_byte(alt_label ?: 'X');
write_str(dtostrf(pos.x, -4, 0, str), 4);
- write_byte(alt_label ? alt_label : 'Y');
+ write_byte(alt_label ?: 'Y');
write_str(dtostrf(pos.y, -4, 0, str), 4);
}
- write_byte(alt_label ? alt_label : 'Z');
+ write_byte(alt_label ?: 'Z');
write_str(dtostrf(pos.z, -5, 1, str), 5);
}
diff --git a/Marlin/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp b/Marlin/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp
index f1bf9d03..efc010ca 100644
--- a/Marlin/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp
+++ b/Marlin/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp
@@ -501,26 +501,26 @@ U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT,
void MarlinUI::touch_calibration_screen() {
uint16_t x, y;
- calibrationState calibration_stage = touch_calibration.get_calibration_state();
+ calibrationState stage = touch_calibration.get_calibration_state();
- if (calibration_stage == CALIBRATION_NONE) {
+ if (stage == CALIBRATION_NONE) {
// start and clear screen
defer_status_screen(true);
- calibration_stage = touch_calibration.calibration_start();
+ stage = touch_calibration.calibration_start();
tftio.set_window(0, 0, (TFT_WIDTH) - 1, (TFT_HEIGHT) - 1);
tftio.WriteMultiple(TFT_MARLINBG_COLOR, uint32_t(TFT_WIDTH) * (TFT_HEIGHT));
}
else {
// clear last cross
- x = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].x;
- y = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].y;
+ x = touch_calibration.calibration_points[_MIN(stage - 1, CALIBRATION_BOTTOM_RIGHT)].x;
+ y = touch_calibration.calibration_points[_MIN(stage - 1, CALIBRATION_BOTTOM_RIGHT)].y;
drawCross(x, y, TFT_MARLINBG_COLOR);
}
FSTR_P str = nullptr;
- if (calibration_stage < CALIBRATION_SUCCESS) {
+ if (stage < CALIBRATION_SUCCESS) {
// handle current state
- switch (calibration_stage) {
+ switch (stage) {
case CALIBRATION_TOP_LEFT: str = GET_TEXT_F(MSG_TOP_LEFT); break;
case CALIBRATION_BOTTOM_LEFT: str = GET_TEXT_F(MSG_BOTTOM_LEFT); break;
case CALIBRATION_TOP_RIGHT: str = GET_TEXT_F(MSG_TOP_RIGHT); break;
@@ -528,13 +528,13 @@ U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT,
default: break;
}
- x = touch_calibration.calibration_points[calibration_stage].x;
- y = touch_calibration.calibration_points[calibration_stage].y;
+ x = touch_calibration.calibration_points[stage].x;
+ y = touch_calibration.calibration_points[stage].y;
drawCross(x, y, TFT_MARLINUI_COLOR);
}
else {
// end calibration
- str = calibration_stage == CALIBRATION_SUCCESS ? GET_TEXT_F(MSG_CALIBRATION_COMPLETED) : GET_TEXT_F(MSG_CALIBRATION_FAILED);
+ str = stage == CALIBRATION_SUCCESS ? GET_TEXT_F(MSG_CALIBRATION_COMPLETED) : GET_TEXT_F(MSG_CALIBRATION_FAILED);
defer_status_screen(false);
touch_calibration.calibration_end();
TERN_(HAS_TOUCH_BUTTONS, redrawTouchButtons = true);
@@ -548,7 +548,7 @@ U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT,
} while (u8g.nextPage());
drawing_screen = false;
safe_delay(250);
- if (calibration_stage == CALIBRATION_SUCCESS) {
+ if (stage == CALIBRATION_SUCCESS) {
safe_delay(500);
ui.goto_previous_screen();
}
diff --git a/Marlin/Marlin/src/lcd/e3v2/README.md b/Marlin/Marlin/src/lcd/e3v2/README.md
index 91f25e24..09055d03 100644
--- a/Marlin/Marlin/src/lcd/e3v2/README.md
+++ b/Marlin/Marlin/src/lcd/e3v2/README.md
@@ -1,6 +1,6 @@
-# DWIN for Creality Ender 3 v2
+# DWIN for Creality Ender-3 v2
-Marlin's Ender 3 v2 support requires the `DWIN_SET` included with the Ender 3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x/config/examples/Creality/Ender-3%20V2).
+Marlin's Ender-3 v2 support requires the `DWIN_SET` included with the Ender-3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x/config/examples/Creality/Ender-3%20V2).
## Easy Install
diff --git a/Marlin/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/Marlin/src/lcd/e3v2/creality/dwin.cpp
index 08d92868..8eda8ca4 100644
--- a/Marlin/Marlin/src/lcd/e3v2/creality/dwin.cpp
+++ b/Marlin/Marlin/src/lcd/e3v2/creality/dwin.cpp
@@ -2243,7 +2243,7 @@ void HMI_SelectFile() {
card.openAndPrintFile(card.filename);
#if HAS_FAN
- // All fans on for Ender 3 v2 ?
+ // All fans on for Ender-3 v2 ?
// The slicer should manage this for us.
//for (uint8_t i = 0; i < FAN_COUNT; i++)
// thermalManager.fan_speed[i] = 255;
diff --git a/Marlin/Marlin/src/lcd/e3v2/jyersui/README.md b/Marlin/Marlin/src/lcd/e3v2/jyersui/README.md
index 91f25e24..09055d03 100644
--- a/Marlin/Marlin/src/lcd/e3v2/jyersui/README.md
+++ b/Marlin/Marlin/src/lcd/e3v2/jyersui/README.md
@@ -1,6 +1,6 @@
-# DWIN for Creality Ender 3 v2
+# DWIN for Creality Ender-3 v2
-Marlin's Ender 3 v2 support requires the `DWIN_SET` included with the Ender 3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x/config/examples/Creality/Ender-3%20V2).
+Marlin's Ender-3 v2 support requires the `DWIN_SET` included with the Ender-3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x/config/examples/Creality/Ender-3%20V2).
## Easy Install
diff --git a/Marlin/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/Marlin/src/lcd/e3v2/jyersui/dwin.cpp
index 0f78e58e..34985a54 100644
--- a/Marlin/Marlin/src/lcd/e3v2/jyersui/dwin.cpp
+++ b/Marlin/Marlin/src/lcd/e3v2/jyersui/dwin.cpp
@@ -378,7 +378,7 @@ class TextScroller {
return min;
}
- void Draw_Bed_Mesh(int16_t selected = -1, uint8_t gridline_width = 1, uint16_t padding_x = 8, uint16_t padding_y_top = 40 + 53 - 7) {
+ void Draw_Bed_Mesh(const int16_t selected=-1, const uint8_t gridline_width=1, const uint16_t padding_x=8, const uint16_t padding_y_top=40 + 53 - 7) {
drawing_mesh = true;
const uint16_t total_width_px = DWIN_WIDTH - padding_x - padding_x,
cell_width_px = total_width_px / (GRID_MAX_POINTS_X),
@@ -471,15 +471,15 @@ constexpr const char * const CrealityDWINClass::preheat_modes[3];
// 3=Title bar and Menu area (default)
// 2=Menu area
// 1=Title bar
-void CrealityDWINClass::Clear_Screen(uint8_t e/*=3*/) {
+void CrealityDWINClass::Clear_Screen(const uint8_t e/*=3*/) {
if (e == 1 || e == 3 || e == 4) DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.menu_top_bg, Color_Bg_Blue, false), 0, 0, DWIN_WIDTH, TITLE_HEIGHT); // Clear Title Bar
if (e == 2 || e == 3) DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, STATUS_Y); // Clear Menu Area
if (e == 4) DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, DWIN_HEIGHT); // Clear Popup Area
}
-void CrealityDWINClass::Draw_Float(float value, uint8_t row, bool selected/*=false*/, uint8_t minunit/*=10*/) {
+void CrealityDWINClass::Draw_Float(const_float_t value, const uint8_t row, const bool selected/*=false*/, const uint8_t minunit/*=10*/) {
const uint8_t digits = (uint8_t)floor(log10(abs(value))) + log10(minunit) + (minunit > 1);
- const uint16_t bColor = (selected) ? Select_Color : Color_Bg_Black;
+ const uint16_t bColor = selected ? Select_Color : Color_Bg_Black;
const uint16_t xpos = 240 - (digits * 8);
DWIN_Draw_Rectangle(1, Color_Bg_Black, 194, MBASE(row), 234 - (digits * 8), MBASE(row) + 16);
if (isnan(value))
@@ -490,44 +490,44 @@ void CrealityDWINClass::Draw_Float(float value, uint8_t row, bool selected/*=fal
}
}
-void CrealityDWINClass::Draw_Option(uint8_t value, const char * const * options, uint8_t row, bool selected/*=false*/, bool color/*=false*/) {
- uint16_t bColor = (selected) ? Select_Color : Color_Bg_Black,
- tColor = (color) ? GetColor(value, Color_White, false) : Color_White;
+void CrealityDWINClass::Draw_Option(const uint8_t value, const char * const * options, const uint8_t row, const bool selected/*=false*/, const bool color/*=false*/) {
+ const uint16_t bColor = selected ? Select_Color : Color_Bg_Black,
+ tColor = color ? GetColor(value, Color_White, false) : Color_White;
DWIN_Draw_Rectangle(1, bColor, 202, MBASE(row) + 14, 258, MBASE(row) - 2);
DWIN_Draw_String(false, DWIN_FONT_MENU, tColor, bColor, 202, MBASE(row) - 1, options[value]);
}
-uint16_t CrealityDWINClass::GetColor(uint8_t color, uint16_t original, bool light/*=false*/) {
+uint16_t CrealityDWINClass::GetColor(const uint8_t color, const uint16_t original, const bool light/*=false*/) {
switch (color) {
case Default:
return original;
break;
case White:
- return (light) ? Color_Light_White : Color_White;
+ return light ? Color_Light_White : Color_White;
break;
case Green:
- return (light) ? Color_Light_Green : Color_Green;
+ return light ? Color_Light_Green : Color_Green;
break;
case Cyan:
- return (light) ? Color_Light_Cyan : Color_Cyan;
+ return light ? Color_Light_Cyan : Color_Cyan;
break;
case Blue:
- return (light) ? Color_Light_Blue : Color_Blue;
+ return light ? Color_Light_Blue : Color_Blue;
break;
case Magenta:
- return (light) ? Color_Light_Magenta : Color_Magenta;
+ return light ? Color_Light_Magenta : Color_Magenta;
break;
case Red:
- return (light) ? Color_Light_Red : Color_Red;
+ return light ? Color_Light_Red : Color_Red;
break;
case Orange:
- return (light) ? Color_Light_Orange : Color_Orange;
+ return light ? Color_Light_Orange : Color_Orange;
break;
case Yellow:
- return (light) ? Color_Light_Yellow : Color_Yellow;
+ return light ? Color_Light_Yellow : Color_Yellow;
break;
case Brown:
- return (light) ? Color_Light_Brown : Color_Brown;
+ return light ? Color_Light_Brown : Color_Brown;
break;
case Black:
return Color_Black;
@@ -536,7 +536,7 @@ uint16_t CrealityDWINClass::GetColor(uint8_t color, uint16_t original, bool ligh
return Color_White;
}
-void CrealityDWINClass::Draw_Title(const char * ctitle) {
+void CrealityDWINClass::Draw_Title(const char * const ctitle) {
DWIN_Draw_String(false, DWIN_FONT_HEAD, GetColor(eeprom_settings.menu_top_txt, Color_White, false), Color_Bg_Blue, (DWIN_WIDTH - strlen(ctitle) * STAT_CHR_W) / 2, 5, ctitle);
}
void CrealityDWINClass::Draw_Title(FSTR_P const ftitle) {
@@ -549,7 +549,7 @@ void _Decorate_Menu_Item(uint8_t row, uint8_t icon, bool more) {
DWIN_Draw_Line(CrealityDWIN.GetColor(CrealityDWIN.eeprom_settings.menu_split_line, Line_Color, true), 16, MBASE(row) + 33, 256, MBASE(row) + 33); // Draw Menu Line
}
-void CrealityDWINClass::Draw_Menu_Item(uint8_t row, uint8_t icon/*=0*/, const char * label1, const char * label2, bool more/*=false*/, bool centered/*=false*/) {
+void CrealityDWINClass::Draw_Menu_Item(const uint8_t row, const uint8_t icon/*=0*/, const char * const label1, const char * const label2, const bool more/*=false*/, const bool centered/*=false*/) {
const uint8_t label_offset_y = (label1 || label2) ? MENU_CHR_H * 3 / 5 : 0,
label1_offset_x = !centered ? LBLX : LBLX * 4/5 + _MAX(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (label1 ? strlen(label1) : 0) * MENU_CHR_W) / 2),
label2_offset_x = !centered ? LBLX : LBLX * 4/5 + _MAX(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (label2 ? strlen(label2) : 0) * MENU_CHR_W) / 2);
@@ -558,7 +558,7 @@ void CrealityDWINClass::Draw_Menu_Item(uint8_t row, uint8_t icon/*=0*/, const ch
_Decorate_Menu_Item(row, icon, more);
}
-void CrealityDWINClass::Draw_Menu_Item(uint8_t row, uint8_t icon/*=0*/, FSTR_P const flabel1, FSTR_P const flabel2, bool more/*=false*/, bool centered/*=false*/) {
+void CrealityDWINClass::Draw_Menu_Item(const uint8_t row, const uint8_t icon/*=0*/, FSTR_P const flabel1, FSTR_P const flabel2, const bool more/*=false*/, const bool centered/*=false*/) {
const uint8_t label_offset_y = (flabel1 || flabel2) ? MENU_CHR_H * 3 / 5 : 0,
label1_offset_x = !centered ? LBLX : LBLX * 4/5 + _MAX(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (flabel1 ? strlen_P(FTOP(flabel1)) : 0) * MENU_CHR_W) / 2),
label2_offset_x = !centered ? LBLX : LBLX * 4/5 + _MAX(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (flabel2 ? strlen_P(FTOP(flabel2)) : 0) * MENU_CHR_W) / 2);
@@ -567,7 +567,7 @@ void CrealityDWINClass::Draw_Menu_Item(uint8_t row, uint8_t icon/*=0*/, FSTR_P c
_Decorate_Menu_Item(row, icon, more);
}
-void CrealityDWINClass::Draw_Checkbox(uint8_t row, bool value) {
+void CrealityDWINClass::Draw_Checkbox(const uint8_t row, const bool value) {
#if ENABLED(DWIN_CREALITY_LCD_CUSTOM_ICONS) // Draw appropriate checkbox icon
DWIN_ICON_Show(ICON, (value ? ICON_Checkbox_T : ICON_Checkbox_F), 226, MBASE(row) - 3);
#else // Draw a basic checkbox using rectangles and lines
@@ -584,7 +584,7 @@ void CrealityDWINClass::Draw_Checkbox(uint8_t row, bool value) {
#endif
}
-void CrealityDWINClass::Draw_Menu(uint8_t menu, uint8_t select/*=0*/, uint8_t scroll/*=0*/) {
+void CrealityDWINClass::Draw_Menu(const uint8_t menu, const uint8_t select/*=0*/, const uint8_t scroll/*=0*/) {
if (active_menu != menu) {
last_menu = active_menu;
if (process == Menu) last_selection = selection;
@@ -601,12 +601,12 @@ void CrealityDWINClass::Draw_Menu(uint8_t menu, uint8_t select/*=0*/, uint8_t sc
DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33);
}
-void CrealityDWINClass::Redraw_Menu(bool lastprocess/*=true*/, bool lastselection/*=false*/, bool lastmenu/*=false*/) {
- switch ((lastprocess) ? last_process : process) {
+void CrealityDWINClass::Redraw_Menu(const bool lastproc/*=true*/, const bool lastsel/*=false*/, const bool lastmenu/*=false*/) {
+ switch (lastproc ? last_process : process) {
case Menu:
- Draw_Menu((lastmenu) ? last_menu : active_menu, (lastselection) ? last_selection : selection, (lastmenu) ? 0 : scrollpos);
+ Draw_Menu(lastmenu ? last_menu : active_menu, lastsel ? last_selection : selection, lastmenu ? 0 : scrollpos);
break;
- case Main: Draw_Main_Menu((lastselection) ? last_selection : selection); break;
+ case Main: Draw_Main_Menu(lastsel ? last_selection : selection); break;
case Print: Draw_Print_Screen(); break;
case File: Draw_SD_List(); break;
default: break;
@@ -672,7 +672,7 @@ void CrealityDWINClass::Main_Menu_Icons() {
#endif
}
-void CrealityDWINClass::Draw_Main_Menu(uint8_t select/*=0*/) {
+void CrealityDWINClass::Draw_Main_Menu(const uint8_t select/*=0*/) {
process = Main;
active_menu = MainMenu;
selection = select;
@@ -804,7 +804,7 @@ void CrealityDWINClass::Draw_Print_confirm() {
DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 85, 281, 188, 322);
}
-void CrealityDWINClass::Draw_SD_Item(uint8_t item, uint8_t row) {
+void CrealityDWINClass::Draw_SD_Item(const uint8_t item, const uint8_t row) {
if (item == 0)
Draw_Menu_Item(0, ICON_Back, card.flag.workDirIsRoot ? F("Back") : F(".."));
else {
@@ -825,7 +825,7 @@ void CrealityDWINClass::Draw_SD_Item(uint8_t item, uint8_t row) {
}
}
-void CrealityDWINClass::Draw_SD_List(bool removed/*=false*/) {
+void CrealityDWINClass::Draw_SD_List(const bool removed/*=false*/) {
Clear_Screen();
Draw_Title("Select File");
selection = 0;
@@ -843,7 +843,7 @@ void CrealityDWINClass::Draw_SD_List(bool removed/*=false*/) {
DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(0) - 18, 14, MBASE(0) + 33);
}
-void CrealityDWINClass::Draw_Status_Area(bool icons/*=false*/) {
+void CrealityDWINClass::Draw_Status_Area(const bool icons/*=false*/) {
if (icons) DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, STATUS_Y, DWIN_WIDTH, DWIN_HEIGHT - 1);
@@ -966,7 +966,7 @@ void CrealityDWINClass::Draw_Status_Area(bool icons/*=false*/) {
if ((update_z = axis_should_home(Z_AXIS) && ui.get_blink()))
DWIN_Draw_String(true, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 205, 459, F(" -?- "));
else
- DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 3, 2, 205, 459, (current_position.z>=0) ? current_position.z : 0);
+ DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 3, 2, 205, 459, current_position.z >= 0 ? current_position.z : 0);
}
DWIN_UpdateLCD();
}
@@ -1002,15 +1002,15 @@ void MarlinUI::kill_screen(FSTR_P const error, FSTR_P const) {
}
void CrealityDWINClass::Popup_Select() {
- const uint16_t c1 = (selection == 0) ? GetColor(eeprom_settings.highlight_box, Color_White) : Color_Bg_Window,
- c2 = (selection == 0) ? Color_Bg_Window : GetColor(eeprom_settings.highlight_box, Color_White);
+ const uint16_t c1 = selection ? Color_Bg_Window : GetColor(eeprom_settings.highlight_box, Color_White),
+ c2 = selection ? GetColor(eeprom_settings.highlight_box, Color_White) : Color_Bg_Window;
DWIN_Draw_Rectangle(0, c1, 25, 279, 126, 318);
DWIN_Draw_Rectangle(0, c1, 24, 278, 127, 319);
DWIN_Draw_Rectangle(0, c2, 145, 279, 246, 318);
DWIN_Draw_Rectangle(0, c2, 144, 278, 247, 319);
}
-void CrealityDWINClass::Update_Status_Bar(bool refresh/*=false*/) {
+void CrealityDWINClass::Update_Status_Bar(const bool refresh/*=false*/) {
typedef TextScroller<30> Scroller;
static bool new_msg;
static Scroller scroller;
@@ -1040,7 +1040,7 @@ void CrealityDWINClass::Update_Status_Bar(bool refresh/*=false*/) {
/* Menu Item Config */
-void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/*=true*/) {
+void CrealityDWINClass::Menu_Item_Handler(const uint8_t menu, const uint8_t item, bool draw/*=true*/) {
const uint8_t row = item - scrollpos;
#if HAS_LEVELING
static bool level_state;
@@ -1200,7 +1200,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
#if ENABLED(ADVANCED_PAUSE_FEATURE)
case PREPARE_CHANGEFIL:
if (draw) {
- Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Change Filament")
+ Draw_Menu_Item(row, ICON_ResumeEEPROM, GET_TEXT_F(MSG_FILAMENTCHANGE)
#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
, nullptr, true
#endif
@@ -1738,7 +1738,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
break;
case CHANGEFIL_LOAD:
if (draw)
- Draw_Menu_Item(row, ICON_WriteEEPROM, F("Load Filament"));
+ Draw_Menu_Item(row, ICON_WriteEEPROM, GET_TEXT_F(MSG_FILAMENTLOAD));
else {
if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp)
Popup_Handler(ETemp);
@@ -1756,7 +1756,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
break;
case CHANGEFIL_UNLOAD:
if (draw)
- Draw_Menu_Item(row, ICON_ReadEEPROM, F("Unload Filament"));
+ Draw_Menu_Item(row, ICON_ReadEEPROM, GET_TEXT_F(MSG_FILAMENTUNLOAD));
else {
if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) {
Popup_Handler(ETemp);
@@ -1775,7 +1775,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
break;
case CHANGEFIL_CHANGE:
if (draw)
- Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Change Filament"));
+ Draw_Menu_Item(row, ICON_ResumeEEPROM, GET_TEXT_F(MSG_FILAMENTCHANGE));
else {
if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp)
Popup_Handler(ETemp);
@@ -3806,7 +3806,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
case TUNE_CHANGEFIL:
if (draw)
- Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Change Filament"));
+ Draw_Menu_Item(row, ICON_ResumeEEPROM, GET_TEXT_F(MSG_FILAMENTCHANGE));
else
Popup_Handler(ConfFilChange);
break;
@@ -3862,7 +3862,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
Draw_Menu_Item(row, ICON_Back, F("Cancel"));
else {
thermalManager.setTargetHotend(0, 0);
- thermalManager.set_fan_speed(0, 0);
+ TERN_(HAS_FAN, thermalManager.set_fan_speed(0, 0));
Redraw_Menu(false, true, true);
}
break;
@@ -3932,32 +3932,32 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
}
}
-FSTR_P CrealityDWINClass::Get_Menu_Title(uint8_t menu) {
+FSTR_P CrealityDWINClass::Get_Menu_Title(const uint8_t menu) {
switch (menu) {
- case MainMenu: return F("Main Menu");
- case Prepare: return F("Prepare");
+ case MainMenu: return GET_TEXT_F(MSG_MAIN_MENU);
+ case Prepare: return GET_TEXT_F(MSG_PREPARE);
case HomeMenu: return F("Homing Menu");
- case Move: return F("Move");
- case ManualLevel: return F("Manual Leveling");
+ case Move: return GET_TEXT_F(MSG_MOVE_AXIS);
+ case ManualLevel: return GET_TEXT_F(MSG_BED_TRAMMING_MANUAL);
#if HAS_ZOFFSET_ITEM
- case ZOffset: return F("Z Offset");
+ case ZOffset: return GET_TEXT_F(MSG_ZPROBE_ZOFFSET);
#endif
#if HAS_PREHEAT
case Preheat: return F("Preheat");
#endif
#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
- case ChangeFilament: return F("Change Filament");
+ case ChangeFilament: return GET_TEXT_F(MSG_FILAMENTCHANGE);
#endif
#if HAS_CUSTOM_MENU
case MenuCustom:
#ifdef CUSTOM_MENU_CONFIG_TITLE
return F(CUSTOM_MENU_CONFIG_TITLE);
#else
- return F("Custom Commands");
+ return GET_TEXT_F(MSG_CUSTOM_COMMANDS);
#endif
#endif
- case Control: return F("Control");
- case TempMenu: return F("Temperature");
+ case Control: return GET_TEXT_F(MSG_CONTROL);
+ case TempMenu: return GET_TEXT_F(MSG_TEMPERATURE);
#if HAS_HOTEND || HAS_HEATED_BED
case PID: return F("PID Menu");
#endif
@@ -3978,14 +3978,14 @@ FSTR_P CrealityDWINClass::Get_Menu_Title(uint8_t menu) {
#if HAS_CLASSIC_JERK
case MaxJerk: return F("Max Jerk");
#endif
- case Steps: return F("Steps/mm");
+ case Steps: return GET_TEXT_F(MSG_STEPS_PER_MM);
case Visual: return F("Visual Settings");
- case Advanced: return F("Advanced Settings");
+ case Advanced: return GET_TEXT_F(MSG_ADVANCED_SETTINGS);
#if HAS_BED_PROBE
case ProbeMenu: return F("Bed Probe");
#endif
#if HAS_TRINAMIC_CONFIG
- case TMCMenu: return F("TMC Drivers");
+ case TMCMenu: return GET_TEXT_F(MSG_TMC_DRIVERS);
#endif
case ColorSettings: return F("UI Color Settings");
case Info: return F("Info");
@@ -4001,15 +4001,15 @@ FSTR_P CrealityDWINClass::Get_Menu_Title(uint8_t menu) {
case UBLMesh: return F("UBL Bed Leveling");
#endif
#if ENABLED(PROBE_MANUALLY)
- case ManualMesh: return F("Mesh Bed Leveling");
+ case ManualMesh: return GET_TEXT_F(MSG_MANUAL_LEVELING);
#endif
- case Tune: return F("Tune");
- case PreheatHotend: return F("Preheat Hotend");
+ case Tune: return GET_TEXT_F(MSG_TUNE);
+ case PreheatHotend: return GET_TEXT_F(MSG_PREHEAT_HOTEND);
}
return F("");
}
-uint8_t CrealityDWINClass::Get_Menu_Size(uint8_t menu) {
+uint8_t CrealityDWINClass::Get_Menu_Size(const uint8_t menu) {
switch (menu) {
case Prepare: return PREPARE_TOTAL;
case HomeMenu: return HOME_TOTAL;
@@ -4086,7 +4086,7 @@ uint8_t CrealityDWINClass::Get_Menu_Size(uint8_t menu) {
/* Popup Config */
-void CrealityDWINClass::Popup_Handler(PopupID popupid, bool option/*=false*/) {
+void CrealityDWINClass::Popup_Handler(const PopupID popupid, const bool option/*=false*/) {
popup = last_popup = popupid;
switch (popupid) {
case Pause: Draw_Popup(F("Pause Print"), F(""), F(""), Popup); break;
@@ -4229,8 +4229,7 @@ void CrealityDWINClass::Value_Control() {
if (funcpointer) funcpointer();
return;
}
- NOLESS(tempvalue, (valuemin * valueunit));
- NOMORE(tempvalue, (valuemax * valueunit));
+ LIMIT(tempvalue, valuemin * valueunit, valuemax * valueunit);
Draw_Float(tempvalue / valueunit, selection - scrollpos, true, valueunit);
DWIN_UpdateLCD();
if (active_menu == Move && livemove) {
@@ -4272,8 +4271,7 @@ void CrealityDWINClass::Option_Control() {
DWIN_UpdateLCD();
return;
}
- NOLESS(tempvalue, valuemin);
- NOMORE(tempvalue, valuemax);
+ LIMIT(tempvalue, valuemin, valuemax);
Draw_Option(tempvalue, static_cast(valuepointer), selection - scrollpos, true);
DWIN_UpdateLCD();
}
@@ -4476,7 +4474,7 @@ void CrealityDWINClass::Popup_Control() {
case ETemp:
if (selection == 0) {
thermalManager.setTargetHotend(EXTRUDE_MINTEMP, 0);
- thermalManager.set_fan_speed(0, MAX_FAN_SPEED);
+ TERN_(HAS_FAN, thermalManager.set_fan_speed(0, MAX_FAN_SPEED));
Draw_Menu(PreheatHotend);
}
else
@@ -4525,7 +4523,7 @@ void CrealityDWINClass::Popup_Control() {
else {
pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT;
if (printing) Popup_Handler(Resuming);
- else Redraw_Menu(true, true, (active_menu==PreheatHotend));
+ else Redraw_Menu(true, true, active_menu == PreheatHotend);
}
break;
#endif // ADVANCED_PAUSE_FEATURE
@@ -4584,7 +4582,7 @@ void CrealityDWINClass::Confirm_Control() {
/* In-Menu Value Modification */
-void CrealityDWINClass::Setup_Value(float value, float min, float max, float unit, uint8_t type) {
+void CrealityDWINClass::Setup_Value(const_float_t value, const_float_t min, const_float_t max, const_float_t unit, const uint8_t type) {
if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Ki) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Ki))
tempvalue = unscalePID_i(value) * unit;
else if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Kd) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Kd))
@@ -4600,38 +4598,38 @@ void CrealityDWINClass::Setup_Value(float value, float min, float max, float uni
Draw_Float(tempvalue / unit, selection - scrollpos, true, valueunit);
}
-void CrealityDWINClass::Modify_Value(float &value, float min, float max, float unit, void (*f)()/*=nullptr*/) {
+void CrealityDWINClass::Modify_Value(float &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()/*=nullptr*/) {
valuepointer = &value;
funcpointer = f;
Setup_Value((float)value, min, max, unit, 0);
}
-void CrealityDWINClass::Modify_Value(uint8_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) {
+void CrealityDWINClass::Modify_Value(uint8_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()/*=nullptr*/) {
valuepointer = &value;
funcpointer = f;
Setup_Value((float)value, min, max, unit, 1);
}
-void CrealityDWINClass::Modify_Value(uint16_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) {
+void CrealityDWINClass::Modify_Value(uint16_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()/*=nullptr*/) {
valuepointer = &value;
funcpointer = f;
Setup_Value((float)value, min, max, unit, 2);
}
-void CrealityDWINClass::Modify_Value(int16_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) {
+void CrealityDWINClass::Modify_Value(int16_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()/*=nullptr*/) {
valuepointer = &value;
funcpointer = f;
Setup_Value((float)value, min, max, unit, 3);
}
-void CrealityDWINClass::Modify_Value(uint32_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) {
+void CrealityDWINClass::Modify_Value(uint32_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()/*=nullptr*/) {
valuepointer = &value;
funcpointer = f;
Setup_Value((float)value, min, max, unit, 4);
}
-void CrealityDWINClass::Modify_Value(int8_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) {
+void CrealityDWINClass::Modify_Value(int8_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()/*=nullptr*/) {
valuepointer = &value;
funcpointer = f;
Setup_Value((float)value, min, max, unit, 5);
}
-void CrealityDWINClass::Modify_Option(uint8_t value, const char * const * options, uint8_t max) {
+void CrealityDWINClass::Modify_Option(const uint8_t value, const char * const * options, const uint8_t max) {
tempvalue = value;
valuepointer = const_cast(options);
valuemin = 0;
@@ -4655,7 +4653,7 @@ void CrealityDWINClass::Update_Status(const char * const text) {
}
}
-void CrealityDWINClass::Start_Print(bool sd) {
+void CrealityDWINClass::Start_Print(const bool sd) {
sdprint = sd;
if (!printing) {
printing = true;
@@ -4663,7 +4661,7 @@ void CrealityDWINClass::Start_Print(bool sd) {
if (sd) {
#if ENABLED(POWER_LOSS_RECOVERY)
if (recovery.valid()) {
- SdFile *diveDir = nullptr;
+ MediaFile *diveDir = nullptr;
const char * const fname = card.diveToFile(true, diveDir, recovery.info.sd_filename);
card.selectFileByName(fname);
}
@@ -4726,7 +4724,7 @@ void CrealityDWINClass::State_Update() {
Popup_Handler(FilChange);
else if (pause_menu_response == PAUSE_RESPONSE_RESUME_PRINT) {
if (printing) Popup_Handler(Resuming);
- else Redraw_Menu(true, true, (active_menu==PreheatHotend));
+ else Redraw_Menu(true, true, active_menu == PreheatHotend);
}
}
#endif
@@ -4872,13 +4870,13 @@ void CrealityDWINClass::AudioFeedback(const bool success/*=true*/) {
Update_Status(success ? "Success" : "Failed");
}
-void CrealityDWINClass::Save_Settings(char *buff) {
+void CrealityDWINClass::Save_Settings(char * const buff) {
TERN_(AUTO_BED_LEVELING_UBL, eeprom_settings.tilt_grid_size = mesh_conf.tilt_grid - 1);
eeprom_settings.corner_pos = corner_pos * 10;
memcpy(buff, &eeprom_settings, _MIN(sizeof(eeprom_settings), eeprom_data_size));
}
-void CrealityDWINClass::Load_Settings(const char *buff) {
+void CrealityDWINClass::Load_Settings(const char * const buff) {
memcpy(&eeprom_settings, buff, _MIN(sizeof(eeprom_settings), eeprom_data_size));
TERN_(AUTO_BED_LEVELING_UBL, mesh_conf.tilt_grid = eeprom_settings.tilt_grid_size + 1);
if (eeprom_settings.corner_pos == 0) eeprom_settings.corner_pos = 325;
diff --git a/Marlin/Marlin/src/lcd/e3v2/jyersui/dwin.h b/Marlin/Marlin/src/lcd/e3v2/jyersui/dwin.h
index f360819d..71db445a 100644
--- a/Marlin/Marlin/src/lcd/e3v2/jyersui/dwin.h
+++ b/Marlin/Marlin/src/lcd/e3v2/jyersui/dwin.h
@@ -172,17 +172,17 @@ class CrealityDWINClass {
static constexpr const char * const color_names[11] = { "Default", "White", "Green", "Cyan", "Blue", "Magenta", "Red", "Orange", "Yellow", "Brown", "Black" };
static constexpr const char * const preheat_modes[3] = { "Both", "Hotend", "Bed" };
- static void Clear_Screen(uint8_t e=3);
- static void Draw_Float(float value, uint8_t row, bool selected=false, uint8_t minunit=10);
- static void Draw_Option(uint8_t value, const char * const * options, uint8_t row, bool selected=false, bool color=false);
- static uint16_t GetColor(uint8_t color, uint16_t original, bool light=false);
- static void Draw_Checkbox(uint8_t row, bool value);
- static void Draw_Title(const char * title);
+ static void Clear_Screen(const uint8_t e=3);
+ static void Draw_Float(const_float_t value, const uint8_t row, const bool selected=false, const uint8_t minunit=10);
+ static void Draw_Option(const uint8_t value, const char * const * options, const uint8_t row, const bool selected=false, const bool color=false);
+ static uint16_t GetColor(const uint8_t color, const uint16_t original, const bool light=false);
+ static void Draw_Checkbox(const uint8_t row, const bool value);
+ static void Draw_Title(const char * const title);
static void Draw_Title(FSTR_P const title);
- static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, const char * const label1=nullptr, const char * const label2=nullptr, bool more=false, bool centered=false);
- static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, FSTR_P const flabel1=nullptr, FSTR_P const flabel2=nullptr, bool more=false, bool centered=false);
- static void Draw_Menu(uint8_t menu, uint8_t select=0, uint8_t scroll=0);
- static void Redraw_Menu(bool lastprocess=true, bool lastselection=false, bool lastmenu=false);
+ static void Draw_Menu_Item(const uint8_t row, uint8_t icon=0, const char * const label1=nullptr, const char * const label2=nullptr, const bool more=false, const bool centered=false);
+ static void Draw_Menu_Item(const uint8_t row, uint8_t icon=0, FSTR_P const flabel1=nullptr, FSTR_P const flabel2=nullptr, const bool more=false, const bool centered=false);
+ static void Draw_Menu(const uint8_t menu, const uint8_t select=0, const uint8_t scroll=0);
+ static void Redraw_Menu(const bool lastproc=true, const bool lastsel=false, const bool lastmenu=false);
static void Redraw_Screen();
static void Main_Menu_Icons();
@@ -196,24 +196,23 @@ class CrealityDWINClass {
#endif
static void Draw_Print_ProgressElapsed();
static void Draw_Print_confirm();
- static void Draw_SD_Item(uint8_t item, uint8_t row);
- static void Draw_SD_List(bool removed=false);
- static void Draw_Status_Area(bool icons=false);
+ static void Draw_SD_Item(const uint8_t item, const uint8_t row);
+ static void Draw_SD_List(const bool removed=false);
+ static void Draw_Status_Area(const bool icons=false);
static void Draw_Popup(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, uint8_t mode, uint8_t icon=0);
static void Popup_Select();
- static void Update_Status_Bar(bool refresh=false);
+ static void Update_Status_Bar(const bool refresh=false);
- #if ENABLED(AUTO_BED_LEVELING_UBL)
- static void Draw_Bed_Mesh(int16_t selected = -1, uint8_t gridline_width = 1, uint16_t padding_x = 8, uint16_t padding_y_top = 40 + 53 - 7);
+ #if HAS_MESH
static void Set_Mesh_Viewer_Status();
#endif
- static FSTR_P Get_Menu_Title(uint8_t menu);
- static uint8_t Get_Menu_Size(uint8_t menu);
- static void Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw=true);
+ static FSTR_P Get_Menu_Title(const uint8_t menu);
+ static uint8_t Get_Menu_Size(const uint8_t menu);
+ static void Menu_Item_Handler(const uint8_t menu, const uint8_t item, bool draw=true);
- static void Popup_Handler(PopupID popupid, bool option = false);
- static void Confirm_Handler(PopupID popupid);
+ static void Popup_Handler(const PopupID popupid, bool option=false);
+ static void Confirm_Handler(const PopupID popupid);
static void Main_Menu_Control();
static void Menu_Control();
@@ -224,24 +223,24 @@ class CrealityDWINClass {
static void Popup_Control();
static void Confirm_Control();
- static void Setup_Value(float value, float min, float max, float unit, uint8_t type);
- static void Modify_Value(float &value, float min, float max, float unit, void (*f)()=nullptr);
- static void Modify_Value(uint8_t &value, float min, float max, float unit, void (*f)()=nullptr);
- static void Modify_Value(uint16_t &value, float min, float max, float unit, void (*f)()=nullptr);
- static void Modify_Value(int16_t &value, float min, float max, float unit, void (*f)()=nullptr);
- static void Modify_Value(uint32_t &value, float min, float max, float unit, void (*f)()=nullptr);
- static void Modify_Value(int8_t &value, float min, float max, float unit, void (*f)()=nullptr);
- static void Modify_Option(uint8_t value, const char * const * options, uint8_t max);
+ static void Setup_Value(const_float_t value, const_float_t min, const_float_t max, const_float_t unit, const uint8_t type);
+ static void Modify_Value(float &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()=nullptr);
+ static void Modify_Value(uint8_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()=nullptr);
+ static void Modify_Value(uint16_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()=nullptr);
+ static void Modify_Value(int16_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()=nullptr);
+ static void Modify_Value(uint32_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()=nullptr);
+ static void Modify_Value(int8_t &value, const_float_t min, const_float_t max, const_float_t unit, void (*f)()=nullptr);
+ static void Modify_Option(const uint8_t value, const char * const * options, const uint8_t max);
static void Update_Status(const char * const text);
- static void Start_Print(bool sd);
+ static void Start_Print(const bool sd);
static void Stop_Print();
static void Update();
static void State_Update();
static void Screen_Update();
static void AudioFeedback(const bool success=true);
- static void Save_Settings(char *buff);
- static void Load_Settings(const char *buff);
+ static void Save_Settings(char * const buff);
+ static void Load_Settings(const char * const buff);
static void Reset_Settings();
};
diff --git a/Marlin/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp b/Marlin/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp
index 560b30be..e822371c 100644
--- a/Marlin/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp
+++ b/Marlin/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp
@@ -195,7 +195,7 @@ void MarlinUI::draw_status_message(const bool blink) {
}
const bool hash_changed = hash != old_hash;
old_hash = hash;
- return hash_changed || !ui.did_first_redraw;
+ return hash_changed || !did_first_redraw;
};
#if ENABLED(STATUS_MESSAGE_SCROLLING)
diff --git a/Marlin/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
index 205913ca..5ec94b85 100644
--- a/Marlin/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
+++ b/Marlin/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
@@ -61,77 +61,60 @@
#define STATUS_CHR_WIDTH 14
#define STATUS_CHR_HEIGHT 28
+bool old_is_printing;
+
//
// Before homing, blink '123' <-> '???'.
// Homed but unknown... '123' <-> ' '.
// Homed and known, display constantly.
//
-FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink, const uint16_t x, const uint16_t y) {
-
- #if ENABLED(DWIN_MARLINUI_PORTRAIT)
-
- uint8_t vallen = utf8_strlen(value);
- if (!ui.did_first_redraw) {
- dwin_string.set('X' + axis);
- DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, x + (vallen * 14 - 14) / 2, y + 2, S(dwin_string.string()));
- }
-
- dwin_string.set();
- if (blink)
- dwin_string.add(value);
- else if (!TEST(axes_homed, axis))
- while (const char c = *value++) dwin_string.add(c <= '.' ? c : '?');
- else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !TEST(axes_trusted, axis))
- dwin_string.add(TERN1(DWIN_MARLINUI_PORTRAIT, axis == Z_AXIS) ? PSTR(" ") : PSTR(" "));
- else
- dwin_string.add(value);
-
- // For E_TOTAL there may be some characters to cover up
- if (BOTH(DWIN_MARLINUI_PORTRAIT, LCD_SHOW_E_TOTAL) && axis == X_AXIS)
- dwin_string.add(F(" "));
-
- DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + 32, S(dwin_string.string()));
-
- #else // !DWIN_MARLINUI_PORTRAIT
-
- if (!ui.did_first_redraw || ui.old_is_printing != print_job_timer.isRunning()) {
- dwin_string.set('X' + axis);
- DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, x, y, S(dwin_string.string()));
- }
-
- dwin_string.set();
- if (blink)
- dwin_string.add(value);
- else {
- if (!TEST(axes_homed, axis))
- while (const char c = *value++) dwin_string.add(c <= '.' ? c : '?');
- else {
- #if NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING)
- if (!TEST(axes_trusted, axis))
- dwin_string.add(TERN1(DWIN_MARLINUI_PORTRAIT, axis == Z_AXIS) ? PSTR(" ") : PSTR(" "));
- else
- #endif
- dwin_string.add(value);
- }
- }
-
- // For E_TOTAL there may be some characters to cover up
- if (ENABLED(LCD_SHOW_E_TOTAL) && (!ui.did_first_redraw || ui.old_is_printing != print_job_timer.isRunning()) && axis == X_AXIS)
- dwin_string.add(F(" "));
-
- DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x + 32, y + 4, S(dwin_string.string()));
+void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink, const uint16_t x, const uint16_t y) {
+ const bool x_redraw = !ui.did_first_redraw || old_is_printing != print_job_timer.isRunning();
+ if (x_redraw) {
+ dwin_string.set('X' + axis);
+ DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black,
+ #if ENABLED(DWIN_MARLINUI_PORTRAIT)
+ x + (utf8_strlen(value) * 14 - 14) / 2, y + 2
+ #else
+ x, y
+ #endif
+ , S(dwin_string.string())
+ );
+ }
- #endif // !DWIN_MARLINUI_PORTRAIT
+ dwin_string.set();
+ if (blink)
+ dwin_string.add(value);
+ else if (!TEST(axes_homed, axis))
+ while (const char c = *value++) dwin_string.add(c <= '.' ? c : '?');
+ else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !TEST(axes_trusted, axis))
+ dwin_string.add(TERN1(DWIN_MARLINUI_PORTRAIT, axis == Z_AXIS) ? PSTR(" ") : PSTR(" "));
+ else
+ dwin_string.add(value);
+
+ // For E_TOTAL there may be some characters to cover up
+ if (TERN0(LCD_SHOW_E_TOTAL, x_redraw && axis == X_AXIS))
+ dwin_string.add(F(" "));
+
+ DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black,
+ #if ENABLED(DWIN_MARLINUI_PORTRAIT)
+ x, y + 32
+ #else
+ x + 32, y + 4
+ #endif
+ , S(dwin_string.string())
+ );
}
#if ENABLED(LCD_SHOW_E_TOTAL)
- FORCE_INLINE void _draw_e_value(const_float_t value, const uint16_t x, const uint16_t y) {
+ void _draw_e_value(const_float_t value, const uint16_t x, const uint16_t y) {
const uint8_t scale = value >= 100000.0f ? 10 : 1; // show cm after 99,999mm
+ const bool e_redraw = !ui.did_first_redraw || old_is_printing != print_job_timer.isRunning();
#if ENABLED(DWIN_MARLINUI_PORTRAIT)
- if (!ui.did_first_redraw) {
+ if (e_redraw) {
// Extra spaces to erase previous value
dwin_string.set(F("E "));
DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, x + (4 * 14 / 2) - 7, y + 2, S(dwin_string.string()));
@@ -145,7 +128,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
#else // !DWIN_MARLINUI_PORTRAIT
- if (!ui.did_first_redraw || ui.old_is_printing != print_job_timer.isRunning()) {
+ if (e_redraw) {
dwin_string.set(F("E "));
DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, x, y, S(dwin_string.string()));
}
@@ -160,26 +143,27 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
#endif // LCD_SHOW_E_TOTAL
-//
-// Fan Icon and Percentage
-//
-FORCE_INLINE void _draw_fan_status(const uint16_t x, const uint16_t y) {
- const uint16_t fanx = (4 * STATUS_CHR_WIDTH - STATUS_FAN_WIDTH) / 2;
- const uint8_t fan_pct = thermalManager.scaledFanSpeedPercent(0);
- const bool fan_on = !!fan_pct;
- if (fan_on) {
- DWIN_ICON_Animation(0, fan_on, ICON, ICON_Fan0, ICON_Fan3, x + fanx, y, 25);
- dwin_string.set(i8tostr3rj(fan_pct));
- dwin_string.add('%');
- DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string()));
- }
- else {
- DWIN_ICON_AnimationControl(0x0000); // disable all icon animations (this is the only one)
- DWIN_ICON_Show(ICON, ICON_Fan0, x + fanx, y);
- dwin_string.set(F(" "));
- DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string()));
+#if HAS_FAN
+ //
+ // Fan Icon and Percentage
+ //
+ FORCE_INLINE void _draw_fan_status(const uint16_t x, const uint16_t y) {
+ const uint16_t fanx = (4 * STATUS_CHR_WIDTH - STATUS_FAN_WIDTH) / 2;
+ const bool fan_on = !!thermalManager.scaledFanSpeed(0);
+ if (fan_on) {
+ DWIN_ICON_Animation(0, fan_on, ICON, ICON_Fan0, ICON_Fan3, x + fanx, y, 25);
+ dwin_string.set(i8tostr3rj(thermalManager.scaledFanSpeedPercent(0)));
+ dwin_string.add('%');
+ DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string()));
+ }
+ else {
+ DWIN_ICON_AnimationControl(0x0000); // disable all icon animations (this is the only one)
+ DWIN_ICON_Show(ICON, ICON_Fan0, x + fanx, y);
+ dwin_string.set(F(" "));
+ DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string()));
+ }
}
-}
+#endif
/**
* Draw a single heater icon with current and target temperature, at the given XY
@@ -207,72 +191,56 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x
#endif
#endif
- #if HAS_HOTEND && HAS_HEATED_BED
- float tc, tt;
- bool c_draw, t_draw, i_draw, ta;
- const bool isBed = heater < 0;
- if (isBed) {
+ celsius_float_t tc = 0, tt = 0;
+ bool isBed = (DISABLED(HAS_HOTEND) && ENABLED(HAS_HEATED_BED)) || (BOTH(HAS_HOTEND, HAS_HEATED_BED) && heater < 0),
+ ta = false, c_draw, t_draw, i_draw;
+ c_draw = t_draw = i_draw = !ui.did_first_redraw;
+ if (isBed) {
+ #if HAS_HEATED_BED
tc = thermalManager.degBed();
tt = thermalManager.degTargetBed();
ta = thermalManager.isHeatingBed();
- c_draw = tc != old_bed_temp;
- t_draw = tt != old_bed_target;
- i_draw = ta != old_bed_on;
+ c_draw |= tc != old_bed_temp;
+ t_draw |= tt != old_bed_target;
+ i_draw |= ta != old_bed_on;
old_bed_temp = tc;
old_bed_target = tt;
old_bed_on = ta;
- }
- else {
+ #if HAS_LEVELING
+ i_draw |= planner.leveling_active != old_leveling_on;
+ old_leveling_on = planner.leveling_active;
+ #endif
+ #endif
+ }
+ else {
+ #if HAS_HOTEND
tc = thermalManager.degHotend(heater);
tt = thermalManager.degTargetHotend(heater);
ta = thermalManager.isHeatingHotend(heater);
- c_draw = tc != old_temp[heater];
- t_draw = tt != old_target[heater];
- i_draw = ta != old_on[heater];
+ c_draw |= tc != old_temp[heater];
+ t_draw |= tt != old_target[heater];
+ i_draw |= ta != old_on[heater];
old_temp[heater] = tc;
old_target[heater] = tt;
old_on[heater] = ta;
- }
- #elif HAS_HOTEND
- constexpr bool isBed = false;
- const float tc = thermalManager.degHotend(heater), tt = thermalManager.degTargetHotend(heater);
- const uint8_t ta = thermalManager.isHeatingHotend(heater);
- bool c_draw = tc != old_temp[heater], t_draw = tt != old_target[heater], i_draw = ta != old_on[heater];
- old_temp[heater] = tc; old_target[heater] = tt; old_on[heater] = ta;
- #elif HAS_HEATED_BED
- constexpr bool isBed = true;
- const float tc = thermalManager.degBed(), tt = thermalManager.degTargetBed();
- const uint8_t ta = thermalManager.isHeatingBed();
- bool c_draw = tc != old_bed_temp, t_draw = tt != old_bed_target, i_draw = ta != old_bed_on;
- old_bed_temp = tc; old_bed_target = tt; old_bed_on = ta;
- #else
- bool c_draw = false, t_draw = false, i_draw = false;
- constexpr float tc = 0, tt = 0;
- constexpr uint8_t ta = 0;
- #endif
-
- #if HAS_HEATED_BED && HAS_LEVELING
- if (isBed) {
- i_draw |= (planner.leveling_active != old_leveling_on);
- old_leveling_on = planner.leveling_active;
- }
- #endif
+ #endif
+ }
// Draw target temperature, if needed
- if (!ui.did_first_redraw || t_draw) {
+ if (t_draw) {
dwin_string.set(i16tostr3rj(tt + 0.5));
dwin_string.add(LCD_STR_DEGREE);
DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y, S(dwin_string.string()));
}
// Draw heater icon with on / off / leveled states
- if (!ui.did_first_redraw || i_draw) {
+ if (i_draw) {
const uint8_t ico = isBed ? (TERN0(HAS_LEVELING, planner.leveling_active) ? ICON_BedLevelOff : ICON_BedOff) : ICON_HotendOff;
DWIN_ICON_Show(ICON, ico + ta, x, y + STATUS_CHR_HEIGHT + 2);
}
// Draw current temperature, if needed
- if (!ui.did_first_redraw || c_draw) {
+ if (c_draw) {
dwin_string.set(i16tostr3rj(tc + 0.5));
dwin_string.add(LCD_STR_DEGREE);
DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + 70, S(dwin_string.string()));
@@ -294,7 +262,7 @@ FORCE_INLINE void _draw_feedrate_status(const char *value, uint16_t x, uint16_t
}
/**
- * Draw the MarlinUI Status Screen for Ender 3 V2
+ * Draw the MarlinUI Status Screen for Ender-3 V2
*/
void MarlinUI::draw_status_screen() {
const bool blink = get_blink();
@@ -334,7 +302,6 @@ void MarlinUI::draw_status_screen() {
#if HAS_HEATED_BED
_draw_heater_status(H_BED, hx, STATUS_HEATERS_Y);
#endif
-
#if HAS_FAN
_draw_fan_status(LCD_PIXEL_WIDTH - STATUS_CHR_WIDTH * 5, STATUS_FAN_Y);
#endif
@@ -414,7 +381,7 @@ void MarlinUI::draw_status_screen() {
}
DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, 378, 170, S(dwin_string.string()));
}
- else if (!ui.did_first_redraw || ui.old_is_printing != print_job_timer.isRunning()) {
+ else if (!ui.did_first_redraw || old_is_printing != print_job_timer.isRunning()) {
dwin_string.set(F(" "));
DWIN_Draw_String(true, font14x28, Color_IconBlue, Color_Bg_Black, 336, 170, S(dwin_string.string()));
}
@@ -470,7 +437,7 @@ void MarlinUI::draw_status_screen() {
draw_status_message(blink);
ui.did_first_redraw = true;
- ui.old_is_printing = print_job_timer.isRunning();
+ old_is_printing = print_job_timer.isRunning();
}
#endif // IS_DWIN_MARLINUI
diff --git a/Marlin/Marlin/src/lcd/e3v2/proui/base64.hpp b/Marlin/Marlin/src/lcd/e3v2/proui/base64.hpp
index d82d0b27..a51cca7c 100644
--- a/Marlin/Marlin/src/lcd/e3v2/proui/base64.hpp
+++ b/Marlin/Marlin/src/lcd/e3v2/proui/base64.hpp
@@ -5,7 +5,7 @@
* Author: Densaugeo
* Maintainer: Densaugeo
* Version: 1.2.1.1
- * Changed unsigned int to uint16_t for use in the professional Ender 3V2/S1 firmware
+ * Changed unsigned int to uint16_t for use in the professional Ender-3V2/S1 firmware
* Url: https://www.arduino.cc/reference/en/libraries/base64/
*/
diff --git a/Marlin/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp b/Marlin/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp
index 760582c7..47b104c5 100644
--- a/Marlin/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp
+++ b/Marlin/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp
@@ -183,7 +183,7 @@ void BedLevelToolsClass::MoveToZ() {
}
void BedLevelToolsClass::ProbeXY() {
const uint16_t Clear = Z_CLEARANCE_DEPLOY_PROBE;
- sprintf_P(cmd, PSTR("G0Z%i\nG30X%sY%s"),
+ sprintf_P(cmd, PSTR("G28O\nG0Z%i\nG30X%sY%s"),
Clear,
dtostrf(bedlevel.get_mesh_x(bedLevelTools.mesh_x), 1, 2, str_1),
dtostrf(bedlevel.get_mesh_y(bedLevelTools.mesh_y), 1, 2, str_2)
diff --git a/Marlin/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/Marlin/src/lcd/e3v2/proui/dwin.cpp
index 098db27b..2cf83ecc 100644
--- a/Marlin/Marlin/src/lcd/e3v2/proui/dwin.cpp
+++ b/Marlin/Marlin/src/lcd/e3v2/proui/dwin.cpp
@@ -550,10 +550,10 @@ void DWIN_DrawStatusMessage() {
// If the string fits the status line do not scroll it
if (slen <= LCD_WIDTH) {
- if (hash_changed) {
- DWIN_DrawStatusLine(ui.status_message);
- hash_changed = false;
- }
+ if (hash_changed) {
+ DWIN_DrawStatusLine(ui.status_message);
+ hash_changed = false;
+ }
}
else {
// String is larger than the available line space
@@ -676,14 +676,18 @@ void Draw_PrintDone() {
Title.ShowCaption(GET_TEXT_F(MSG_PRINT_DONE));
DWINUI::ClearMainArea();
DWIN_Print_Header(nullptr);
+
#if HAS_GCODE_PREVIEW
- if (Preview_Valid()) {
+ const bool isvalid = Preview_Valid();
+ if (isvalid) {
DWIN_ICON_Show(0, 0, 1, 21, 100, 0x00);
DWINUI::Draw_Button(BTN_Continue, 86, 300);
}
- else
+ #else
+ constexpr bool isvalid = false;
#endif
- {
+
+ if (!isvalid) {
Draw_Print_ProgressBar();
Draw_Print_Labels();
DWINUI::Draw_Icon(ICON_PrintTime, 15, 173);
@@ -731,11 +735,7 @@ void _update_axis_value(const AxisEnum axis, const uint16_t x, const uint16_t y,
// Check for a position change
static xyz_pos_t oldpos = { -1, -1, -1 };
- #if ENABLED(SHOW_REAL_POS)
- const float p = stepper.position(axis) / planner.settings.axis_steps_per_mm[axis];
- #else
- const float p = current_position[axis];
- #endif
+ const float p = TERN(SHOW_REAL_POS, stepper.position(axis) / planner.settings.axis_steps_per_mm[axis], current_position[axis]);
const bool changed = oldpos[axis] != p;
if (changed) oldpos[axis] = p;
@@ -811,15 +811,9 @@ void update_variable() {
if (IsMenu(TuneMenu) || IsMenu(TemperatureMenu)) {
// Tune page temperature update
- #if HAS_HOTEND
- if (_new_hotend_target) HotendTargetItem->redraw();
- #endif
- #if HAS_HEATED_BED
- if (_new_bed_target) BedTargetItem->redraw();
- #endif
- #if HAS_FAN
- if (_new_fanspeed) FanSpeedItem->redraw();
- #endif
+ TERN_(HAS_HOTEND, if (_new_hotend_target) HotendTargetItem->redraw());
+ TERN_(HAS_HEATED_BED, if (_new_bed_target) BedTargetItem->redraw());
+ TERN_(HAS_FAN, if (_new_fanspeed) FanSpeedItem->redraw());
}
// Bottom temperature update
@@ -874,7 +868,7 @@ void update_variable() {
bool DWIN_lcd_sd_status = false;
void SetMediaAutoMount() {
- Toogle_Chkb_Line(HMI_data.MediaAutoMount);
+ Toggle_Chkb_Line(HMI_data.MediaAutoMount);
}
inline uint16_t nr_sd_menu_items() {
@@ -956,8 +950,7 @@ void onClickSDItem() {
void FileMenuIdle(bool reset=false) {
static bool hasUpDir = false;
static uint8_t last_itemselected = 0;
- static int8_t shift_amt = 0;
- static int8_t shift_len = 0;
+ static int8_t shift_amt = 0, shift_len = 0;
if (reset) {
last_itemselected = 0;
hasUpDir = !card.flag.workDirIsRoot; // is a SubDir
@@ -1382,7 +1375,7 @@ void EachMomentUpdate() {
DWINUI::Draw_Button(BTN_Cancel, 26, 280);
DWINUI::Draw_Button(BTN_Continue, 146, 280);
}
- SdFile *dir = nullptr;
+ MediaFile *dir = nullptr;
const char * const filename = card.diveToFile(true, dir, recovery.info.sd_filename);
card.selectFileByName(filename);
DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 207, card.longest_filename());
@@ -1715,7 +1708,6 @@ void DWIN_CopySettingsFrom(const char * const buff) {
);
leds.update();
#endif
-
}
// Initialize or re-initialize the LCD
@@ -1839,6 +1831,7 @@ void DWIN_RedrawScreen() {
#endif // ADVANCED_PAUSE_FEATURE
#if HAS_MESH
+
void DWIN_MeshViewer() {
if (!leveling_is_valid())
DWIN_Popup_Continue(ICON_BLTouch, GET_TEXT_F(MSG_MESH_VIEWER), GET_TEXT_F(MSG_NO_VALID_MESH));
@@ -1847,8 +1840,8 @@ void DWIN_RedrawScreen() {
MeshViewer.Draw();
}
}
-#endif // HAS_MESH
+#endif // HAS_MESH
#if HAS_LOCKSCREEN
@@ -1874,7 +1867,7 @@ void DWIN_RedrawScreen() {
if (lockScreen.isUnlocked()) DWIN_UnLockScreen();
}
-#endif // HAS_LOCKSCREEN
+#endif // HAS_LOCKSCREEN
#if HAS_GCODE_PREVIEW
@@ -1886,20 +1879,21 @@ void DWIN_RedrawScreen() {
Goto_Main_Menu();
return card.openAndPrintFile(card.filename);
}
- else HMI_ReturnScreen();
+ else
+ HMI_ReturnScreen();
}
- void Goto_ConfirmToPrint() {
- Goto_Popup(Preview_DrawFromSD, onClick_ConfirmToPrint);
- }
+#endif
-#else
- void Goto_ConfirmToPrint() {
+void Goto_ConfirmToPrint() {
+ #if HAS_GCODE_PREVIEW
+ Goto_Popup(Preview_DrawFromSD, onClick_ConfirmToPrint);
+ #else
// Print SD file
HMI_flag.heat_flag = true;
card.openAndPrintFile(card.filename);
- }
-#endif
+ #endif
+}
#if HAS_ESDIAG
void Draw_EndStopDiag() {
@@ -1915,6 +1909,7 @@ void DWIN_RedrawScreen() {
// Tool functions
#if ENABLED(EEPROM_SETTINGS)
+
void WriteEeprom() {
DWIN_DrawStatusLine(GET_TEXT_F(MSG_STORE_EEPROM));
DWIN_UpdateLCD();
@@ -1934,8 +1929,9 @@ void DWIN_RedrawScreen() {
}
#if HAS_MESH
- void SaveMesh() { TERN(AUTO_BED_LEVELING_UBL, UBLSaveMesh(), WriteEeprom()); }
+ void SaveMesh() { TERN(AUTO_BED_LEVELING_UBL, UBLMeshSave(), WriteEeprom()); }
#endif
+
#endif
// Reset Printer
@@ -2036,7 +2032,7 @@ void SetLanguage() {
}
bool EnableLiveMove = false;
-void SetLiveMove() { Toogle_Chkb_Line(EnableLiveMove); }
+void SetLiveMove() { Toggle_Chkb_Line(EnableLiveMove); }
void LiveMove() {
planner.synchronize();
if (!EnableLiveMove) return;
@@ -2082,7 +2078,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
#if ENABLED(POWER_LOSS_RECOVERY)
void SetPwrLossr() {
- Toogle_Chkb_Line(recovery.enabled);
+ Toggle_Chkb_Line(recovery.enabled);
recovery.changed();
}
#endif
@@ -2108,7 +2104,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
#if ENABLED(CASE_LIGHT_MENU)
void SetCaseLight() {
- Toogle_Chkb_Line(caselight.on);
+ Toggle_Chkb_Line(caselight.on);
caselight.update_enabled();
}
#if ENABLED(CASELIGHT_USES_BRIGHTNESS)
@@ -2144,7 +2140,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
#if ENABLED(SOUND_MENU_ITEM)
void SetEnableSound() {
- Toogle_Chkb_Line(ui.sound_on);
+ Toggle_Chkb_Line(ui.sound_on);
}
#endif
@@ -2168,7 +2164,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
#if ENABLED(BLTOUCH_HS_MODE)
void SetHSMode() {
- Toogle_Chkb_Line(bltouch.high_speed_mode);
+ Toggle_Chkb_Line(bltouch.high_speed_mode);
}
#endif
@@ -2177,7 +2173,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
#if HAS_FILAMENT_SENSOR
void SetRunoutEnable() {
runout.reset();
- Toogle_Chkb_Line(runout.enabled);
+ Toggle_Chkb_Line(runout.enabled);
}
#if HAS_FILAMENT_RUNOUT_DISTANCE
void ApplyRunoutDistance() { runout.set_runout_distance(MenuData.Value / MINUNITMULT); }
@@ -2404,9 +2400,9 @@ void TramC () { Tram(4); }
MeshViewer.DrawMesh(zval, 2, 2);
ui.reset_status();
- if (ABS(MeshViewer.max - MeshViewer.min) < 0.05) {
- DWINUI::Draw_CenteredString(140,F("Corners leveled"));
- DWINUI::Draw_CenteredString(160,F("Tolerance achieved!"));
+ if (ABS(MeshViewer.max - MeshViewer.min) < 0.05f) {
+ DWINUI::Draw_CenteredString(140, F("Corners leveled"));
+ DWINUI::Draw_CenteredString(160, F("Tolerance achieved!"));
}
else {
uint8_t p = 0;
@@ -2439,7 +2435,7 @@ void TramC () { Tram(4); }
}
void SetManualTramming() {
- Toogle_Chkb_Line(HMI_data.FullManualTramming);
+ Toggle_Chkb_Line(HMI_data.FullManualTramming);
}
#endif // HAS_BED_PROBE && HAS_MESH
@@ -2698,7 +2694,6 @@ void onDrawGetColorItem(MenuItemClass* menuitem, int8_t line) {
DWIN_Draw_HLine(HMI_data.SplitLine_Color, 16, MYPOS(line + 1), 240);
}
-
#if EITHER(PIDTEMP, PIDTEMPBED)
void onDrawPIDi(MenuItemClass* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, unscalePID_i(*(float*)static_cast(menuitem)->value)); }
void onDrawPIDd(MenuItemClass* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, unscalePID_d(*(float*)static_cast(menuitem)->value)); }
@@ -2891,6 +2886,7 @@ void onDrawMaxAccelZ(MenuItemClass* menuitem, int8_t line) {
}
#if HAS_HOTEND
+
void onDrawMaxJerkE(MenuItemClass* menuitem, int8_t line) {
if (HMI_IsChinese()) {
menuitem->SetFrame(1, 173, 133, 200, 147);
@@ -2900,6 +2896,7 @@ void onDrawMaxAccelZ(MenuItemClass* menuitem, int8_t line) {
}
onDrawPFloatMenu(menuitem, line);
}
+
#endif
#endif // HAS_CLASSIC_JERK
@@ -2929,6 +2926,7 @@ void onDrawStepsZ(MenuItemClass* menuitem, int8_t line) {
}
#if HAS_HOTEND
+
void onDrawStepsE(MenuItemClass* menuitem, int8_t line) {
if (HMI_IsChinese()) {
menuitem->SetFrame(1, 153, 148, 194, 161);
@@ -2936,6 +2934,7 @@ void onDrawStepsZ(MenuItemClass* menuitem, int8_t line) {
}
onDrawPFloatMenu(menuitem, line);
}
+
#endif
#if HAS_ONESTEP_LEVELING
@@ -3106,6 +3105,7 @@ void Draw_Move_Menu() {
}
#if HAS_HOME_OFFSET
+
void Draw_HomeOffset_Menu() {
checkkey = Menu;
if (SET_MENU(HomeOffMenu, MSG_SET_HOME_OFFSETS, 4)) {
@@ -3116,9 +3116,11 @@ void Draw_Move_Menu() {
}
UpdateMenu(HomeOffMenu);
}
+
#endif
#if HAS_BED_PROBE
+
void Draw_ProbeSet_Menu() {
checkkey = Menu;
if (SET_MENU(ProbeSetMenu, MSG_ZPROBE_SETTINGS, 9)) {
@@ -3217,6 +3219,7 @@ void Draw_GetColor_Menu() {
#endif
#if ENABLED(LED_CONTROL_MENU)
+
void Draw_LedControl_Menu() {
checkkey = Menu;
if (SET_MENU(LedControlMenu, MSG_LED_CONTROL, 10)) {
@@ -3246,7 +3249,8 @@ void Draw_GetColor_Menu() {
}
UpdateMenu(LedControlMenu);
}
-#endif
+
+#endif // LED_CONTROL_MENU
void Draw_Tune_Menu() {
checkkey = Menu;
@@ -3309,6 +3313,7 @@ void Draw_Motion_Menu() {
}
#if ENABLED(ADVANCED_PAUSE_FEATURE)
+
void Draw_FilamentMan_Menu() {
checkkey = Menu;
if (SET_MENU(FilamentMenu, MSG_FILAMENT_MAN, 5)) {
@@ -3324,9 +3329,11 @@ void Draw_Motion_Menu() {
}
UpdateMenu(FilamentMenu);
}
+
#endif
#if ENABLED(MESH_BED_LEVELING)
+
void Draw_ManualMesh_Menu() {
checkkey = Menu;
if (SET_MENU(ManualMesh, MSG_UBL_MANUAL_MESH, 6)) {
@@ -3339,7 +3346,8 @@ void Draw_Motion_Menu() {
}
UpdateMenu(ManualMesh);
}
-#endif
+
+#endif // MESH_BED_LEVELING
#if HAS_PREHEAT
@@ -3422,6 +3430,7 @@ void Draw_MaxAccel_Menu() {
}
#if HAS_CLASSIC_JERK
+
void Draw_MaxJerk_Menu() {
checkkey = Menu;
if (SET_MENU_R(MaxJerkMenu, selrect({1, 16, 28, 13}), MSG_JERK, 5)) {
@@ -3435,7 +3444,8 @@ void Draw_MaxAccel_Menu() {
}
UpdateMenu(MaxJerkMenu);
}
-#endif
+
+#endif // HAS_CLASSIC_JERK
void Draw_Steps_Menu() {
checkkey = Menu;
@@ -3452,6 +3462,7 @@ void Draw_Steps_Menu() {
}
#if ENABLED(PIDTEMP)
+
void Draw_HotendPID_Menu() {
checkkey = Menu;
if (SET_MENU_F(HotendPIDMenu, STR_HOTEND_PID " Settings", 8)) {
@@ -3468,9 +3479,11 @@ void Draw_Steps_Menu() {
}
UpdateMenu(HotendPIDMenu);
}
+
#endif
#if ENABLED(PIDTEMPBED)
+
void Draw_BedPID_Menu() {
checkkey = Menu;
if (SET_MENU_F(BedPIDMenu, STR_BED_PID " Settings", 8)) {
@@ -3487,9 +3500,11 @@ void Draw_Steps_Menu() {
}
UpdateMenu(BedPIDMenu);
}
-#endif
+
+#endif // PIDTEMPBED
#if HAS_BED_PROBE
+
void Draw_ZOffsetWiz_Menu() {
checkkey = Menu;
if (SET_MENU(ZOffsetWizMenu, MSG_PROBE_WIZARD, 4)) {
@@ -3501,9 +3516,11 @@ void Draw_Steps_Menu() {
UpdateMenu(ZOffsetWizMenu);
if (!axis_is_trusted(Z_AXIS)) LCD_MESSAGE_F("WARNING: Z position unknown, move Z to home");
}
+
#endif
#if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU)
+
void Draw_Homing_Menu() {
checkkey = Menu;
if (SET_MENU(HomingMenu, MSG_HOMING, 6)) {
@@ -3518,9 +3535,11 @@ void Draw_Steps_Menu() {
}
UpdateMenu(HomingMenu);
}
+
#endif
#if ENABLED(FWRETRACT)
+
void Draw_FWRetract_Menu() {
checkkey = Menu;
if (SET_MENU(FWRetractMenu, MSG_FWRETRACT, 6)) {
@@ -3533,6 +3552,7 @@ void Draw_Steps_Menu() {
}
UpdateMenu(FWRetractMenu);
}
+
#endif
//=============================================================================
@@ -3565,22 +3585,23 @@ void Draw_Steps_Menu() {
void SetEditMeshY() { HMI_value.Select = 1; SetIntOnClick(0, GRID_MAX_POINTS_Y - 1, bedLevelTools.mesh_y, ApplyEditMeshY, LiveEditMesh); }
void SetEditZValue() { SetPFloatOnClick(Z_OFFSET_MIN, Z_OFFSET_MAX, 3); }
#endif
-#endif
+
+#endif // HAS_MESH
#if ENABLED(AUTO_BED_LEVELING_UBL)
void ApplyUBLSlot() { bedlevel.storage_slot = MenuData.Value; }
void SetUBLSlot() { SetIntOnClick(0, settings.calc_num_meshes() - 1, bedlevel.storage_slot, ApplyUBLSlot); }
void onDrawUBLSlot(MenuItemClass* menuitem, int8_t line) {
- if (bedlevel.storage_slot < 0) bedlevel.storage_slot = 0;
+ NOLESS(bedlevel.storage_slot, 0);
onDrawIntMenu(menuitem, line, bedlevel.storage_slot);
}
void ApplyUBLTiltGrid() { bedLevelTools.tilt_grid = MenuData.Value; }
void SetUBLTiltGrid() { SetIntOnClick(1, 3, bedLevelTools.tilt_grid, ApplyUBLTiltGrid); }
- void UBLTiltMesh() {
- if (bedlevel.storage_slot < 0) bedlevel.storage_slot = 0;
+ void UBLMeshTilt() {
+ NOLESS(bedlevel.storage_slot, 0);
char buf[15];
if (bedLevelTools.tilt_grid > 1) {
sprintf_P(buf, PSTR("G28O\nG29 J%i"), bedLevelTools.tilt_grid);
@@ -3596,15 +3617,15 @@ void Draw_Steps_Menu() {
LCD_MESSAGE(MSG_UBL_MESH_FILLED);
}
- void UBLSaveMesh() {
- if (bedlevel.storage_slot < 0) bedlevel.storage_slot = 0;
+ void UBLMeshSave() {
+ NOLESS(bedlevel.storage_slot, 0);
settings.store_mesh(bedlevel.storage_slot);
ui.status_printf(0, GET_TEXT_F(MSG_MESH_SAVED), bedlevel.storage_slot);
DONE_BUZZ(true);
}
- void UBLLoadMesh() {
- if (bedlevel.storage_slot < 0) bedlevel.storage_slot = 0;
+ void UBLMeshLoad() {
+ NOLESS(bedlevel.storage_slot, 0);
settings.load_mesh(bedlevel.storage_slot);
}
@@ -3626,10 +3647,10 @@ void Draw_Steps_Menu() {
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)
EDIT_ITEM(ICON_UBLSlot, MSG_UBL_STORAGE_SLOT, onDrawUBLSlot, SetUBLSlot, &bedlevel.storage_slot);
- MENU_ITEM(ICON_UBLSaveMesh, MSG_UBL_SAVE_MESH, onDrawMenuItem, UBLSaveMesh);
- MENU_ITEM(ICON_UBLLoadMesh, MSG_UBL_LOAD_MESH, onDrawMenuItem, UBLLoadMesh);
+ MENU_ITEM(ICON_UBLMeshSave, MSG_UBL_SAVE_MESH, onDrawMenuItem, UBLMeshSave);
+ MENU_ITEM(ICON_UBLMeshLoad, MSG_UBL_LOAD_MESH, onDrawMenuItem, UBLMeshLoad);
EDIT_ITEM(ICON_UBLTiltGrid, MSG_UBL_TILTING_GRID, onDrawPInt8Menu, SetUBLTiltGrid, &bedLevelTools.tilt_grid);
- MENU_ITEM(ICON_UBLTiltGrid, MSG_UBL_TILT_MESH, onDrawMenuItem, UBLTiltMesh);
+ MENU_ITEM(ICON_UBLTiltGrid, MSG_UBL_TILT_MESH, onDrawMenuItem, UBLMeshTilt);
MENU_ITEM(ICON_UBLSmartFill, MSG_UBL_SMART_FILLIN, onDrawMenuItem, UBLSmartFillMesh);
#endif
#if ENABLED(MESH_EDIT_MENU)
diff --git a/Marlin/Marlin/src/lcd/e3v2/proui/dwin.h b/Marlin/Marlin/src/lcd/e3v2/proui/dwin.h
index 27e1b4eb..5f309dcd 100644
--- a/Marlin/Marlin/src/lcd/e3v2/proui/dwin.h
+++ b/Marlin/Marlin/src/lcd/e3v2/proui/dwin.h
@@ -141,7 +141,9 @@ static constexpr size_t eeprom_data_size = sizeof(HMI_data_t);
typedef struct {
int8_t Color[3]; // Color components
- TERN_(HAS_PID_HEATING, pidresult_t pidresult = PID_DONE);
+ #if HAS_PID_HEATING
+ tempcontrol_t pidresult = PID_DONE;
+ #endif
uint8_t Select = 0; // Auxiliary selector variable
AxisEnum axis = X_AXIS; // Axis Select
} HMI_value_t;
@@ -213,10 +215,15 @@ void ParkHead();
void ApplyLEDColor();
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)
- void UBLTiltMesh();
- bool UBLValidMesh();
- void UBLSaveMesh();
- void UBLLoadMesh();
+ void UBLMeshTilt();
+ void UBLMeshSave();
+ void UBLMeshLoad();
+#endif
+#if ENABLED(HOST_SHUTDOWN_MENU_ITEM) && defined(SHUTDOWN_ACTION)
+ void HostShutDown();
+#endif
+#if !HAS_BED_PROBE
+ void HomeZandDisable();
#endif
#if ENABLED(HOST_SHUTDOWN_MENU_ITEM) && defined(SHUTDOWN_ACTION)
void HostShutDown();
@@ -356,10 +363,13 @@ void Draw_Steps_Menu();
#endif
// PID
-void DWIN_PidTuning(pidresult_t result);
-#if ENABLED(PIDTEMP)
- void Draw_HotendPID_Menu();
+#if HAS_PID_HEATING
+ void DWIN_PidTuning(tempcontrol_t result);
+ #if ENABLED(PIDTEMP)
+ void Draw_HotendPID_Menu();
+ #endif
+ #if ENABLED(PIDTEMPBED)
+ void Draw_BedPID_Menu();
+ #endif
#endif
-#if ENABLED(PIDTEMPBED)
- void Draw_BedPID_Menu();
#endif
diff --git a/Marlin/Marlin/src/lcd/e3v2/proui/dwinui.h b/Marlin/Marlin/src/lcd/e3v2/proui/dwinui.h
index 3dd37f30..55345a78 100644
--- a/Marlin/Marlin/src/lcd/e3v2/proui/dwinui.h
+++ b/Marlin/Marlin/src/lcd/e3v2/proui/dwinui.h
@@ -138,14 +138,12 @@
#define ICON_UBLActive ICON_HotendTemp
#define ICON_UBLActive ICON_HotendTemp
#define ICON_UBLSlot ICON_ResumeEEPROM
-#define ICON_UBLSaveMesh ICON_WriteEEPROM
-#define ICON_UBLLoadMesh ICON_ReadEEPROM
+#define ICON_UBLMeshSave ICON_WriteEEPROM
+#define ICON_UBLMeshLoad ICON_ReadEEPROM
#define ICON_UBLTiltGrid ICON_PrintSize
#define ICON_UBLSmartFill ICON_StockConfiguration
#define ICON_ZAfterHome ICON_SetEndTemp
-
-
#define ICON_CaseLight ICON_Motion
#define ICON_LedControl ICON_Motion
diff --git a/Marlin/Marlin/src/lcd/e3v2/proui/menus.cpp b/Marlin/Marlin/src/lcd/e3v2/proui/menus.cpp
index 3267eec6..540f9e1f 100644
--- a/Marlin/Marlin/src/lcd/e3v2/proui/menus.cpp
+++ b/Marlin/Marlin/src/lcd/e3v2/proui/menus.cpp
@@ -115,7 +115,7 @@ void Show_Chkb_Line(const bool checked) {
DWIN_UpdateLCD();
}
-void Toogle_Chkb_Line(bool &checked) {
+void Toggle_Chkb_Line(bool &checked) {
checked = !checked;
Show_Chkb_Line(checked);
}
diff --git a/Marlin/Marlin/src/lcd/e3v2/proui/menus.h b/Marlin/Marlin/src/lcd/e3v2/proui/menus.h
index 9bc9d702..33712f89 100644
--- a/Marlin/Marlin/src/lcd/e3v2/proui/menus.h
+++ b/Marlin/Marlin/src/lcd/e3v2/proui/menus.h
@@ -145,7 +145,7 @@ void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char * const
void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, FSTR_P label=nullptr, bool more=false, bool selected=false);
void Draw_Chkb_Line(const uint8_t line, const bool checked);
void Show_Chkb_Line(const bool checked);
-void Toogle_Chkb_Line(bool &checked);
+void Toggle_Chkb_Line(bool &checked);
void Draw_Menu_IntValue(uint16_t bcolor, const uint8_t line, uint8_t iNum, const int32_t value=0);
void onDrawMenuItem(MenuItemClass* menuitem, int8_t line);
void onDrawSubMenu(MenuItemClass* menuitem, int8_t line);
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h
index eb76bb9b..9a20c2a0 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h
@@ -32,7 +32,7 @@
class MediaFileReader {
private:
#if ENABLED(SDSUPPORT)
- SdFile root, file;
+ MediaFile root, file;
#endif
public:
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp
index 00cdf763..f607dc10 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp
@@ -58,8 +58,8 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
.enabled(ENABLED(HAS_TRINAMIC_CONFIG))
.tag(3) .button(TMC_CURRENT_POS, GET_TEXT_F(MSG_TMC_CURRENT))
.enabled(ENABLED(LIN_ADVANCE))
- .tag(4) .button(LIN_ADVANCE_POS, GET_TEXT_F(MSG_LINEAR_ADVANCE))
- .tag(5) .button(VELOCITY_POS, GET_TEXT_F(MSG_MAX_SPEED))
+ .tag(4) .button(LIN_ADVANCE_POS, GET_TEXT_F(MSG_LINEAR_ADVANCE))
+ .tag(5) .button(VELOCITY_POS, GET_TEXT_F(MSG_MAX_SPEED_NO_UNITS))
.tag(6) .button(ACCELERATION_POS, GET_TEXT_F(MSG_ACCELERATION))
.tag(7) .button(JERK_POS, GET_TEXT_F(TERN(HAS_JUNCTION_DEVIATION, MSG_JUNCTION_DEVIATION, MSG_JERK)))
.tag(8) .button(ENDSTOPS_POS, GET_TEXT_F(MSG_LCD_ENDSTOPS))
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_ui.h b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_ui.h
index 6a022289..57043711 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_ui.h
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_ui.h
@@ -1,4 +1,3 @@
-
/****************************************************************************
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -28,33 +27,26 @@ constexpr float x_max = 480.000000;
constexpr float y_min = 0.000000;
constexpr float y_max = 272.000000;
-const PROGMEM uint16_t syringe_outline[] = {0xED96, 0x14F0, 0xE65D, 0x10E9, 0xDED2, 0x0F9C, 0xD74B, 0x110E, 0xD01B, 0x1543, 0xCE80, 0x1836, 0xCE0A, 0x1C3A, 0xCE0F, 0x27AD, 0xCF0A, 0x2BD3, 0xD127, 0x2E5B, 0xD2A1, 0x2FF0, 0xD2A2, 0x9FC9, 0xD407, 0xA97A, 0xD7B9, 0xB10C, 0xD7BF, 0xBB58, 0xD978, 0xC2BE, 0xDD55, 0xC6EB, 0xDD58, 0xD159, 0xDE3B, 0xD3A8, 0xDFCF, 0xD3AF, 0xE0B8, 0xD04C, 0xE0B8, 0xC6EB, 0xE4A7, 0xC299, 0xE652, 0xBAF6, 0xE652, 0xB10C, 0xEA2E, 0xA8EA, 0xEB6C, 0x9E86, 0xEB6C, 0x2F58, 0xEF3C, 0x2B4E, 0xF003, 0x2583, 0xEFFD, 0x1AC2, 0xED96, 0x14F0, 0xED96, 0x14F0};
-const PROGMEM uint16_t syringe_fluid[] = {0xDE73, 0x2512, 0xDA0C, 0x261D, 0xD5B8, 0x29A0, 0xD4AE, 0x2D87, 0xD4AE, 0x9F60, 0xD585, 0xA63B, 0xDE44, 0xA9DE, 0xE32A, 0xA942, 0xE7E3, 0xA6A5, 0xE930, 0xA342, 0xE95D, 0x9C1D, 0xE95B, 0x31B8, 0xE955, 0x2B63, 0xE867, 0x2A67, 0xE790, 0x28DE, 0xE342, 0x25CB, 0xDE73, 0x2512};
-const PROGMEM uint16_t syringe[] = {0xED91, 0x1502, 0xE658, 0x10FB, 0xDECE, 0x0FAE, 0xD746, 0x1120, 0xD016, 0x1555, 0xCE7B, 0x1848, 0xCE05, 0x1C4D, 0xCE0A, 0x27BF, 0xCF05, 0x2BE5, 0xD122, 0x2E6E, 0xD29C, 0x3002, 0xD29D, 0x9FDB, 0xD402, 0xA98C, 0xD7B4, 0xB11F, 0xD7BA, 0xBB6A, 0xD973, 0xC2D1, 0xDD50, 0xC6FD, 0xDD53, 0xD16C, 0xDE36, 0xD3BA, 0xDFCA, 0xD3C2, 0xE0B3, 0xD05E, 0xE0B3, 0xC6FD, 0xE4A2, 0xC2AB, 0xE64D, 0xBB09, 0xE64D, 0xB11F, 0xEA29, 0xA8FC, 0xEB67, 0x9E98, 0xEB67, 0x2F6B, 0xEF37, 0x2B60, 0xEFFE, 0x2595, 0xEFF8, 0x1AD5, 0xED91, 0x1502, 0xED91, 0x1502, 0xFFFF, 0xD1CF, 0x1A7E, 0xD84F, 0x16DB, 0xDF19, 0x15A9, 0xE5E0, 0x16EA, 0xEC5B, 0x1AA4, 0xEC9D, 0x1D34, 0xEC9D, 0x20CC, 0xE5F1, 0x1D41, 0xDF02, 0x1C12, 0xD812, 0x1D41, 0xD166, 0x20CC, 0xD16C, 0x1B45, 0xD1CF, 0x1A7E, 0xFFFF, 0xE3BD, 0xACFD, 0xDE8E, 0xAF4F, 0xD988, 0xAC0F, 0xD7CC, 0xA8CD, 0xDD1C, 0xAAA9, 0xE287, 0xAA5B, 0xE655, 0xA8BE, 0xE3BD, 0xACFD, 0xFFFF, 0xE802, 0x2DC5, 0xE809, 0x343C, 0xE808, 0x9FC8, 0xE7E3, 0xA296, 0xE70D, 0xA4B1, 0xE2C9, 0xA70E, 0xDE4E, 0xA790, 0xD6A1, 0xA457, 0xD5FF, 0x9F2B, 0xD5FF, 0x2DFD, 0xD6B2, 0x2B72, 0xDA78, 0x2861, 0xDE9D, 0x276F, 0xE300, 0x2824, 0xE70D, 0x2B13, 0xE7FF, 0x2DB6, 0xE800, 0x2DC5, 0xE802, 0x2DC5, 0xFFFF, 0xE2ED, 0xBA8B, 0xE1CC, 0xBF52, 0xDF1C, 0xC165, 0xDC64, 0xBF99, 0xDB1B, 0xBAFF, 0xDB19, 0xB433, 0xDF04, 0xB552, 0xE2EF, 0xB438, 0xE2ED, 0xBA8B, 0xFFFF, 0xEC09, 0x2893, 0xE925, 0x2A08, 0xE57D, 0x261D, 0xE149, 0x246F, 0xDBDE, 0x24A0, 0xD6BC, 0x2795, 0xD484, 0x2A46, 0xD1C0, 0x2853, 0xD166, 0x251E, 0xD80D, 0x2151, 0xDF02, 0x200C, 0xE5F6, 0x2151, 0xEC9D, 0x251E, 0xEC09, 0x2893};
-const PROGMEM uint16_t park_btn[] = {0x0AAA, 0x0E1E, 0x57FF, 0x0E1E, 0x57FF, 0x33C3, 0x0AAA, 0x33C3, 0x0AAA, 0x0E1E};
-const PROGMEM uint16_t pause_btn[] = {0x47FF, 0xCA58, 0x7FFF, 0xCA58, 0x7FFF, 0xEFFE, 0x47FF, 0xEFFE, 0x47FF, 0xCA58};
-const PROGMEM uint16_t load_chocolate_btn[] = {0x0AAA, 0x3D2C, 0x57FF, 0x3D2C, 0x57FF, 0x62D2, 0x0AAA, 0x62D2, 0x0AAA, 0x3D2C};
-const PROGMEM uint16_t preheat_chocolate_btn[] = {0x0AAA, 0x6C3B, 0x57FF, 0x6C3B, 0x57FF, 0x91E0, 0x0AAA, 0x91E0, 0x0AAA, 0x6C3B};
-const PROGMEM uint16_t menu_btn[] = {0x0AAA, 0x9B4A, 0x57FF, 0x9B4A, 0x57FF, 0xC0EF, 0x0AAA, 0xC0EF, 0x0AAA, 0x9B4A};
-const PROGMEM uint16_t print_btn[] = {0x0AAA, 0xCA58, 0x42AA, 0xCA58, 0x42AA, 0xEFFE, 0x0AAA, 0xEFFE, 0x0AAA, 0xCA58};
-const PROGMEM uint16_t stop_btn[] = {0x8554, 0xCA58, 0xBD53, 0xCA58, 0xBD53, 0xEFFE, 0x8554, 0xEFFE, 0x8554, 0xCA58};
-const PROGMEM uint16_t print_time_hms[] = {0x62A9, 0xA968, 0x8FFE, 0xA968, 0x8FFE, 0xC0EF, 0x62A9, 0xC0EF, 0x62A9, 0xA968};
-const PROGMEM uint16_t print_time_percent[] = {0x8FFE, 0xA968, 0xBD53, 0xA968, 0xBD53, 0xC0EF, 0x8FFE, 0xC0EF, 0x8FFE, 0xA968};
-const PROGMEM uint16_t print_time_label[] = {0x62A9, 0x91E0, 0xBD53, 0x91E0, 0xBD53, 0xA986, 0x62A9, 0xA986, 0x62A9, 0x91E0};
-const PROGMEM uint16_t h3_temp[] = {0x62A9, 0x75A4, 0x8FFE, 0x75A4, 0x8FFE, 0x8D2C, 0x62A9, 0x8D2C, 0x62A9, 0x75A4};
-const PROGMEM uint16_t h3_label[] = {0x62A9, 0x5E1D, 0x8FFE, 0x5E1D, 0x8FFE, 0x75A4, 0x62A9, 0x75A4, 0x62A9, 0x5E1D};
-const PROGMEM uint16_t chocolate_label[] = {0x62A9, 0x12D2, 0xBD53, 0x12D2, 0xBD53, 0x2A5A, 0x62A9, 0x2A5A, 0x62A9, 0x12D2};
-const PROGMEM uint16_t h0_label[] = {0x62A9, 0x2A5A, 0x8FFE, 0x2A5A, 0x8FFE, 0x41E1, 0x62A9, 0x41E1, 0x62A9, 0x2A5A};
-const PROGMEM uint16_t h0_temp[] = {0x62A9, 0x41E1, 0x8FFE, 0x41E1, 0x8FFE, 0x5968, 0x62A9, 0x5968, 0x62A9, 0x41E1};
-const PROGMEM uint16_t h1_label[] = {0x8FFE, 0x2A5A, 0xBD53, 0x2A5A, 0xBD53, 0x41E1, 0x8FFE, 0x41E1, 0x8FFE, 0x2A5A};
-const PROGMEM uint16_t h1_temp[] = {0x8FFE, 0x41E1, 0xBD53, 0x41E1, 0xBD53, 0x5968, 0x8FFE, 0x5968, 0x8FFE, 0x41E1};
-const PROGMEM uint16_t h2_label[] = {0x8FFE, 0x5E1D, 0xBD53, 0x5E1D, 0xBD53, 0x75A4, 0x8FFE, 0x75A4, 0x8FFE, 0x5E1D};
-const PROGMEM uint16_t h2_temp[] = {0x8FFE, 0x75A4, 0xBD53, 0x75A4, 0xBD53, 0x8D2C, 0x8FFE, 0x8D2C, 0x8FFE, 0x75A4};
-const PROGMEM uint16_t extrude_btn[] = {0xC859, 0xDD2B, 0xF5AE, 0xDD2B, 0xF5AE, 0xEFFE, 0xC859, 0xEFFE, 0xC859, 0xDD2B};
-const PROGMEM uint16_t load_screen_extrude[] = {0x25FB, 0x89AE, 0x2F58, 0x89AE, 0x2F58, 0xAAF6, 0x3406, 0xAAF6, 0x2AAA, 0xBB9A, 0x214D, 0xAAF6, 0x25FB, 0xAAF6, 0x25FB, 0x89AE};
-const PROGMEM uint16_t load_screen_retract[] = {0x25FC, 0x790A, 0x2F58, 0x790A, 0x2F58, 0x57C2, 0x3406, 0x57C2, 0x2AAA, 0x471D, 0x214D, 0x57C2, 0x25FC, 0x57C2, 0x25FC, 0x790A};
-const PROGMEM uint16_t load_screen_back_btn[] = {0x1555, 0xCA58, 0xC553, 0xCA58, 0xC553, 0xEFFE, 0x1555, 0xEFFE, 0x1555, 0xCA58};
-const PROGMEM uint16_t load_screen_unload_btn[] = {0x4AAA, 0x8EBD, 0xC553, 0x8EBD, 0xC553, 0xB463, 0x4AAA, 0xB463, 0x4AAA, 0x8EBD};
-const PROGMEM uint16_t load_screen_load_btn[] = {0x4AAA, 0x5322, 0xC553, 0x5322, 0xC553, 0x78C7, 0x4AAA, 0x78C7, 0x4AAA, 0x5322};
-const PROGMEM uint16_t load_sreen_title[] = {0x4AAA, 0x1787, 0xC553, 0x1787, 0xC553, 0x3D2C, 0x4AAA, 0x3D2C, 0x4AAA, 0x1787};
-const PROGMEM uint16_t load_screen_increment[] = {0x1555, 0x2E1D, 0x3FFF, 0x2E1D, 0x3FFF, 0x3D2C, 0x1555, 0x3D2C, 0x1555, 0x2E1D};
+const PROGMEM uint16_t menu_btn[] = {0x0AAA, 0x0E1E, 0x6D54, 0x0E1E, 0x6D54, 0x2F0E, 0x0AAA, 0x2F0E, 0x0AAA, 0x0E1E};
+const PROGMEM uint16_t print_btn[] = {0x47FF, 0xCF0D, 0x7FFF, 0xCF0D, 0x7FFF, 0xEFFE, 0x47FF, 0xEFFE, 0x47FF, 0xCF0D};
+const PROGMEM uint16_t load_chocolate_btn[] = {0x0AAA, 0x3878, 0x6D54, 0x3878, 0x6D54, 0x5968, 0x0AAA, 0x5968, 0x0AAA, 0x3878};
+const PROGMEM uint16_t extrude_btn[] = {0x0AAA, 0x5E1D, 0x6D54, 0x5E1D, 0x6D54, 0x7F0E, 0x0AAA, 0x7F0E, 0x0AAA, 0x5E1D};
+const PROGMEM uint16_t preheat_chocolate_btn[] = {0x0AAA, 0x83C2, 0x6D54, 0x83C2, 0x6D54, 0xA4B3, 0x0AAA, 0xA4B3, 0x0AAA, 0x83C2};
+const PROGMEM uint16_t media_btn[] = {0x0AAA, 0xCF0D, 0x42AA, 0xCF0D, 0x42AA, 0xEFFE, 0x0AAA, 0xEFFE, 0x0AAA, 0xCF0D};
+const PROGMEM uint16_t pause_btn[] = {0x8554, 0xCF0D, 0xBD53, 0xCF0D, 0xBD53, 0xEFFE, 0x8554, 0xEFFE, 0x8554, 0xCF0D};
+const PROGMEM uint16_t print_time_hms[] = {0xC59E, 0xAEA0, 0xF510, 0xAEA0, 0xF510, 0xC52D, 0xC59E, 0xC52D, 0xC59E, 0xAEA0};
+const PROGMEM uint16_t file_name[] = {0x0B0E, 0xAECD, 0xBCEF, 0xAECD, 0xBCEF, 0xC4AB, 0x0B0E, 0xC4AB, 0x0B0E, 0xAECD};
+const PROGMEM uint16_t chocolate_label[] = {0x75C1, 0x1369, 0xF4FE, 0x1369, 0xF4FE, 0x2AB1, 0x75C1, 0x2AB1, 0x75C1, 0x1369};
+const PROGMEM uint16_t h0_label[] = {0x8304, 0x4BEB, 0xB271, 0x4BEB, 0xB271, 0x63B0, 0x8304, 0x63B0, 0x8304, 0x4BEB};
+const PROGMEM uint16_t h0_temp[] = {0x8304, 0x7190, 0xB271, 0x7190, 0xB271, 0x8955, 0x8304, 0x8955, 0x8304, 0x7190};
+const PROGMEM uint16_t h1_label[] = {0xBB04, 0x4BEB, 0xEA71, 0x4BEB, 0xEA71, 0x63B0, 0xBB04, 0x63B0, 0xBB04, 0x4BEB};
+const PROGMEM uint16_t h1_temp[] = {0xBB04, 0x7190, 0xEA71, 0x7190, 0xEA71, 0x8956, 0xBB04, 0x8956, 0xBB04, 0x7190};
+const PROGMEM uint16_t stop_btn[] = {0xC2A9, 0xCF0D, 0xF553, 0xCF0D, 0xF553, 0xEFFE, 0xC2A9, 0xEFFE, 0xC2A9, 0xCF0D};
+const PROGMEM uint16_t load_screen_extrude[] = {0x382C, 0x8B02, 0x4188, 0x8B02, 0x4188, 0xAC4A, 0x4637, 0xAC4A, 0x3CDA, 0xBCEE, 0x337D, 0xAC4A, 0x382C, 0xAC4A, 0x382C, 0x8B02};
+const PROGMEM uint16_t load_screen_retract[] = {0x382C, 0x7A5D, 0x4188, 0x7A5D, 0x4188, 0x5915, 0x4637, 0x5915, 0x3CDA, 0x4871, 0x337E, 0x5915, 0x382C, 0x5915, 0x382C, 0x7A5D};
+const PROGMEM uint16_t load_screen_back_btn[] = {0x1555, 0xCA58, 0xEAA8, 0xCA58, 0xEAA8, 0xEFFE, 0x1555, 0xEFFE, 0x1555, 0xCA58};
+const PROGMEM uint16_t load_screen_unload_btn[] = {0x67FF, 0x70F0, 0xEAA8, 0x70F0, 0xEAA8, 0x9695, 0x67FF, 0x9695, 0x67FF, 0x70F0};
+const PROGMEM uint16_t load_screen_start_stop_btn[] = {0x67FF, 0x9B4A, 0xEAA8, 0x9B4A, 0xEAA8, 0xC0EF, 0x67FF, 0xC0EF, 0x67FF, 0x9B4A};
+const PROGMEM uint16_t load_screen_load_btn[] = {0x67FF, 0x4696, 0xEAA8, 0x4696, 0xEAA8, 0x6C3B, 0x67FF, 0x6C3B, 0x67FF, 0x4696};
+const PROGMEM uint16_t load_screen_continuous[] = {0x67FF, 0x1787, 0xEAA8, 0x1787, 0xEAA8, 0x3D2C, 0x67FF, 0x3D2C, 0x67FF, 0x1787};
+const PROGMEM uint16_t load_screen_increment[] = {0x1555, 0x1787, 0x62A9, 0x1787, 0x62A9, 0x3D2C, 0x1555, 0x3D2C, 0x1555, 0x1787};
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/confirm_start_print_dialog_box.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/confirm_start_print_dialog_box.cpp
new file mode 100644
index 00000000..ca98e7c9
--- /dev/null
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/confirm_start_print_dialog_box.cpp
@@ -0,0 +1,55 @@
+/**************************************
+ * confirm_start_print_dialog_box.cpp *
+ **************************************/
+
+/****************************************************************************
+ * Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
+ * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
+ * *
+ * This program is free software: you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation, either version 3 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * To view a copy of the GNU General Public License, go to the following *
+ * location: . *
+ ****************************************************************************/
+
+#include "../config.h"
+#include "../screens.h"
+
+#ifdef COCOA_CONFIRM_START_PRINT
+
+using namespace FTDI;
+using namespace Theme;
+using namespace ExtUI;
+
+void ConfirmStartPrintDialogBox::onRedraw(draw_mode_t) {
+ FileList files;
+ const char *filename = files.filename();
+ char buffer[strlen_P(GET_TEXT(MSG_START_PRINT_CONFIRMATION)) + strlen(filename) + 1];
+ sprintf_P(buffer, GET_TEXT(MSG_START_PRINT_CONFIRMATION), filename);
+ drawMessage((const char *)buffer);
+ drawYesNoButtons();
+}
+
+bool ConfirmStartPrintDialogBox::onTouchEnd(uint8_t tag) {
+ switch (tag) {
+ case 1: {
+ FileList files;
+ printFile(files.shortFilename());
+ StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PRINT_STARTING));
+ GOTO_SCREEN(StatusScreen);
+ return true;
+ }
+ case 2: GOTO_PREVIOUS(); return true;
+ default: return false;
+ }
+}
+
+#endif // COCOA_CONFIRM_START_PRINT
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/confirm_start_print_dialog_box.h b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/confirm_start_print_dialog_box.h
new file mode 100644
index 00000000..38cb5c27
--- /dev/null
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/confirm_start_print_dialog_box.h
@@ -0,0 +1,32 @@
+/************************************
+ * confirm_start_print_dialog_box.h *
+ ************************************/
+
+/****************************************************************************
+ * Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
+ * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
+ * *
+ * This program is free software: you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation, either version 3 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * To view a copy of the GNU General Public License, go to the following *
+ * location: . *
+ ****************************************************************************/
+
+#pragma once
+
+#define COCOA_CONFIRM_START_PRINT
+#define COCOA_CONFIRM_START_PRINT_CLASS ConfirmStartPrintDialogBox
+
+class ConfirmStartPrintDialogBox : public DialogBoxBaseClass, public UncachedScreen {
+ public:
+ static void onRedraw(draw_mode_t);
+ static bool onTouchEnd(uint8_t);
+};
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/files_screen.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/files_screen.cpp
new file mode 100644
index 00000000..581c3374
--- /dev/null
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/files_screen.cpp
@@ -0,0 +1,289 @@
+/********************
+ * files_screen.cpp *
+ ********************/
+
+/****************************************************************************
+ * Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
+ * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
+ * *
+ * This program is free software: you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation, either version 3 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * To view a copy of the GNU General Public License, go to the following *
+ * location: . *
+ ****************************************************************************/
+
+#include "../config.h"
+#include "../screens.h"
+#include "../screen_data.h"
+
+#ifdef COCOA_FILES_SCREEN
+
+#if ENABLED(TOUCH_UI_PORTRAIT)
+ #define GRID_COLS 6
+ #define GRID_ROWS 15
+ #define FILES_PER_PAGE 11
+ #define PREV_DIR LEFT
+ #define NEXT_DIR RIGHT
+
+ #define PREV_POS BTN_POS(1,1), BTN_SIZE(1,2)
+ #define HEAD_POS BTN_POS(2,1), BTN_SIZE(4,2)
+ #define NEXT_POS BTN_POS(6,1), BTN_SIZE(1,2)
+ #define LIST_POS BTN_POS(1,3), BTN_SIZE(6,FILES_PER_PAGE)
+ #define BTN1_POS BTN_POS(1,14), BTN_SIZE(3,2)
+ #define BTN2_POS BTN_POS(4,14), BTN_SIZE(3,2)
+#else
+ #define GRID_COLS 12
+ #define GRID_ROWS 8
+ #define FILES_PER_PAGE 6
+ #define PREV_DIR UP
+ #define NEXT_DIR DOWN
+
+ #define PREV_POS BTN_POS(12,2), BTN_SIZE(1,3)
+ #define HEAD_POS BTN_POS( 1,1), BTN_SIZE(12,1)
+ #define NEXT_POS BTN_POS(12,5), BTN_SIZE(1,4)
+ #define LIST_POS BTN_POS( 1,2), BTN_SIZE(11,FILES_PER_PAGE)
+ #define BTN1_POS BTN_POS( 1,8), BTN_SIZE(6,1)
+ #define BTN2_POS BTN_POS( 7,8), BTN_SIZE(5,1)
+#endif
+
+using namespace FTDI;
+using namespace ExtUI;
+using namespace Theme;
+
+constexpr static FilesScreenData &mydata = screen_data.FilesScreen;
+
+void FilesScreen::onEntry() {
+ mydata.cur_page = 0;
+ mydata.selected_tag = 0xFF;
+ #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
+ CLCD::mem_write_32(CLCD::REG::MACRO_0,DL::NOP);
+ #endif
+ gotoPage(0);
+ BaseScreen::onEntry();
+}
+
+const char *FilesScreen::getSelectedFilename(bool shortName) {
+ FileList files;
+ files.seek(getSelectedFileIndex(), true);
+ return shortName ? files.shortFilename() : files.filename();
+}
+
+void FilesScreen::drawSelectedFile() {
+ if(mydata.selected_tag == 0xFF) return;
+ FileList files;
+ files.seek(getSelectedFileIndex(), true);
+ mydata.flags.is_dir = files.isDir();
+ drawFileButton(
+ files.filename(),
+ mydata.selected_tag,
+ mydata.flags.is_dir,
+ true
+ );
+}
+
+uint16_t FilesScreen::getSelectedFileIndex() {
+ return getFileForTag(mydata.selected_tag);
+}
+
+uint16_t FilesScreen::getFileForTag(uint8_t tag) {
+ return mydata.cur_page * FILES_PER_PAGE + tag - 2;
+}
+
+void FilesScreen::drawFileButton(int x, int y, int w, int h, const char *filename, uint8_t tag, bool is_dir, bool is_highlighted) {
+ #define SUB_COLS 6
+ #define SUB_ROWS FILES_PER_PAGE
+
+ const int bx = SUB_X(1);
+ const int by = SUB_Y(getLineForTag(tag)+1);
+ const int bw = SUB_W(6);
+ const int bh = SUB_H(1);
+
+ CommandProcessor cmd;
+ cmd.tag(tag);
+ cmd.cmd(COLOR_RGB(is_highlighted ? fg_action : bg_color));
+ cmd.font(font_medium).rectangle(bx, by, bw, bh);
+ cmd.cmd(COLOR_RGB(is_highlighted ? normal_btn.rgb : bg_text_enabled));
+ #if ENABLED(SCROLL_LONG_FILENAMES)
+ if (is_highlighted) {
+ cmd.cmd(SAVE_CONTEXT());
+ cmd.cmd(SCISSOR_XY(x,y));
+ cmd.cmd(SCISSOR_SIZE(w,h));
+ cmd.cmd(MACRO(0));
+ cmd.text(bx, by, bw, bh, filename, OPT_CENTERY | OPT_NOFIT);
+ } else
+ #endif
+ draw_text_with_ellipsis(cmd, bx,by, bw - (is_dir ? 20 : 0), bh, filename, OPT_CENTERY, font_medium);
+ if (is_dir && !is_highlighted) cmd.text(bx, by, bw, bh, F("> "), OPT_CENTERY | OPT_RIGHTX);
+ #if ENABLED(SCROLL_LONG_FILENAMES)
+ if (is_highlighted) cmd.cmd(RESTORE_CONTEXT());
+ #endif
+}
+
+void FilesScreen::drawFileList() {
+ FileList files;
+ mydata.num_page = max(1,ceil(float(files.count()) / FILES_PER_PAGE));
+ mydata.cur_page = min(mydata.cur_page, mydata.num_page-1);
+ mydata.flags.is_root = files.isAtRootDir();
+ mydata.flags.is_empty = true;
+
+ uint16_t fileIndex = mydata.cur_page * FILES_PER_PAGE;
+ for (uint8_t i = 0; i < FILES_PER_PAGE; i++, fileIndex++) {
+ if (files.seek(fileIndex)) {
+ drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false);
+ mydata.flags.is_empty = false;
+ } else
+ break;
+ }
+}
+
+void FilesScreen::drawHeader() {
+ char str[16];
+ sprintf_P(str, PSTR("Page %d of %d"), mydata.cur_page + 1, mydata.num_page);
+
+ CommandProcessor cmd;
+ cmd.colors(normal_btn)
+ .font(font_small)
+ .tag(0).button(HEAD_POS, str, OPT_CENTER | OPT_FLAT);
+}
+
+void FilesScreen::drawArrows() {
+ const bool prev_enabled = mydata.cur_page > 0;
+ const bool next_enabled = mydata.cur_page < (mydata.num_page - 1);
+
+ CommandProcessor cmd;
+ cmd.colors(normal_btn);
+ cmd.tag(242).enabled(prev_enabled).button(PREV_POS, F("")); if (prev_enabled) drawArrow(PREV_POS, PREV_DIR);
+ cmd.tag(243).enabled(next_enabled).button(NEXT_POS, F("")); if (next_enabled) drawArrow(NEXT_POS, NEXT_DIR);
+}
+
+void FilesScreen::drawFooter() {
+ const bool has_selection = mydata.selected_tag != 0xFF;
+
+ CommandProcessor cmd;
+ cmd.colors(normal_btn)
+ .font(font_medium)
+ .colors(normal_btn)
+ .enabled(!mydata.flags.is_root)
+ .tag(245).button(BTN2_POS, F("Up Dir"))
+ .colors(action_btn);
+
+ if (mydata.flags.is_empty)
+ cmd.tag(240).button(BTN1_POS, GET_TEXT_F(MSG_BUTTON_DONE));
+ else if (has_selection && mydata.flags.is_dir)
+ cmd.tag(244).button(BTN1_POS, GET_TEXT_F(MSG_BUTTON_OPEN));
+ else
+ cmd.tag(241).enabled(has_selection).button(BTN1_POS, F("Select"));
+}
+
+void FilesScreen::drawFileButton(const char *filename, uint8_t tag, bool is_dir, bool is_highlighted) {
+ #undef MARGIN_L
+ #undef MARGIN_R
+ #define MARGIN_L 0
+ #define MARGIN_R 0
+ drawFileButton(LIST_POS, filename, tag, is_dir, is_highlighted);
+}
+
+void FilesScreen::onRedraw(draw_mode_t what) {
+ if (what & FOREGROUND) {
+ drawHeader();
+ drawArrows();
+ drawSelectedFile();
+ drawFooter();
+ }
+}
+
+void FilesScreen::gotoPage(uint8_t page) {
+ mydata.selected_tag = 0xFF;
+ mydata.cur_page = page;
+ CommandProcessor cmd;
+ cmd.cmd(CMD_DLSTART)
+ .cmd(CLEAR_COLOR_RGB(bg_color))
+ .cmd(CLEAR(true,true,true))
+ .colors(normal_btn);
+ drawFileList();
+ storeBackground();
+}
+
+bool FilesScreen::onTouchEnd(uint8_t tag) {
+ switch (tag) {
+ case 240: // Done button, always select first file
+ {
+ FileList files;
+ files.seek(0);
+ GOTO_PREVIOUS();
+ }
+ return true;
+ case 241: // Select highlighted file
+ GOTO_PREVIOUS();
+ return true;
+ case 242: // Previous page
+ if (mydata.cur_page > 0) {
+ gotoPage(mydata.cur_page-1);
+ }
+ break;
+ case 243: // Next page
+ if (mydata.cur_page < (mydata.num_page-1)) {
+ gotoPage(mydata.cur_page+1);
+ }
+ break;
+ case 244: // Select directory
+ {
+ FileList files;
+ files.changeDir(getSelectedShortFilename());
+ gotoPage(0);
+ }
+ break;
+ case 245: // Up directory
+ {
+ FileList files;
+ files.upDir();
+ gotoPage(0);
+ }
+ break;
+ default: // File selected
+ if (tag < 240) {
+ mydata.selected_tag = tag;
+ #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
+ mydata.scroll_pos = 0;
+ mydata.scroll_max = 0;
+ if (FTDI::ftdi_chip >= 810) {
+ const char *filename = getSelectedFilename();
+ if (filename[0]) {
+ CommandProcessor cmd;
+ constexpr int dim[4] = {LIST_POS};
+ const uint16_t text_width = cmd.font(font_medium).text_width(filename);
+ if (text_width > dim[2])
+ mydata.scroll_max = text_width - dim[2] + MARGIN_L + MARGIN_R + 10;
+ }
+ }
+ #endif
+ }
+ break;
+ }
+ return true;
+}
+
+void FilesScreen::onIdle() {
+ #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
+ if (FTDI::ftdi_chip >= 810) {
+ CLCD::mem_write_32(CLCD::REG::MACRO_0,
+ VERTEX_TRANSLATE_X(-int32_t(mydata.scroll_pos)));
+ if (mydata.scroll_pos < mydata.scroll_max * 16)
+ mydata.scroll_pos++;
+ }
+ #endif
+}
+
+void FilesScreen::onMediaRemoved() {
+ if (AT_SCREEN(FilesScreen)) GOTO_SCREEN(StatusScreen);
+}
+
+#endif // COCOA_FILES_SCREEN
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/files_screen.h b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/files_screen.h
new file mode 100644
index 00000000..99ea52ff
--- /dev/null
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/files_screen.h
@@ -0,0 +1,68 @@
+/******************
+ * files_screen.h *
+ ******************/
+
+/****************************************************************************
+ * Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
+ * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
+ * *
+ * This program is free software: you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation, either version 3 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * To view a copy of the GNU General Public License, go to the following *
+ * location: . *
+ ****************************************************************************/
+
+#pragma once
+
+#define COCOA_FILES_SCREEN
+#define COCOA_FILES_SCREEN_CLASS FilesScreen
+
+struct FilesScreenData {
+ struct {
+ uint8_t is_dir : 1;
+ uint8_t is_root : 1;
+ uint8_t is_empty : 1;
+ } flags;
+ uint8_t selected_tag;
+ uint8_t num_page;
+ uint8_t cur_page;
+ #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
+ uint16_t scroll_pos;
+ uint16_t scroll_max;
+ #endif
+};
+
+class FilesScreen : public BaseScreen, public CachedScreen {
+ private:
+ static uint8_t getTagForLine(uint8_t line) {return line + 2;}
+ static uint8_t getLineForTag(uint8_t tag) {return tag - 2;}
+ static uint16_t getFileForTag(uint8_t tag);
+ static uint16_t getSelectedFileIndex();
+
+ inline static const char *getSelectedShortFilename() {return getSelectedFilename(true);}
+ static const char *getSelectedFilename(bool shortName = false);
+
+ static void drawFileButton(int x, int y, int w, int h, const char *filename, uint8_t tag, bool is_dir, bool is_highlighted);
+ static void drawFileButton(const char *filename, uint8_t tag, bool is_dir, bool is_highlighted);
+ static void drawFileList();
+ static void drawHeader();
+ static void drawArrows();
+ static void drawFooter();
+ static void drawSelectedFile();
+
+ static void gotoPage(uint8_t);
+ public:
+ static void onEntry();
+ static void onRedraw(draw_mode_t);
+ static bool onTouchEnd(uint8_t tag);
+ static void onIdle();
+ static void onMediaRemoved();
+};
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp
index 5e61bdb1..be18c034 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp
@@ -57,7 +57,9 @@ void LevelingMenu::onRedraw(draw_mode_t what) {
cmd.font(font_large)
.cmd(COLOR_RGB(bg_text_enabled))
.text(BED_MESH_TITLE_POS, GET_TEXT_F(MSG_BED_LEVELING))
+ #if ENABLED(BLTOUCH)
.text(BLTOUCH_TITLE_POS, GET_TEXT_F(MSG_BLTOUCH))
+ #endif
.font(font_medium).colors(normal_btn)
.tag(2).button(PROBE_BED_POS, GET_TEXT_F(MSG_PROBE_BED))
.enabled(ENABLED(HAS_MESH))
@@ -66,8 +68,10 @@ void LevelingMenu::onRedraw(draw_mode_t what) {
.tag(4).button(EDIT_MESH_POS, GET_TEXT_F(MSG_EDIT_MESH))
#undef GRID_COLS
#define GRID_COLS 2
+ #if ENABLED(BLTOUCH)
.tag(5).button(BLTOUCH_RESET_POS, GET_TEXT_F(MSG_BLTOUCH_RESET))
.tag(6).button(BLTOUCH_TEST_POS, GET_TEXT_F(MSG_BLTOUCH_SELFTEST))
+ #endif
#undef GRID_COLS
#define GRID_COLS 3
.colors(action_btn)
@@ -81,8 +85,10 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) {
case 2: BedMeshViewScreen::doProbe(); break;
case 3: BedMeshViewScreen::show(); break;
case 4: BedMeshEditScreen::show(); break;
+ #if ENABLED(BLTOUCH)
case 5: injectCommands(F("M280 P0 S60")); break;
case 6: SpinnerDialogBox::enqueueAndWait(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break;
+ #endif
default: return false;
}
return true;
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp
index d40b3be3..95ddf7d3 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp
@@ -39,42 +39,6 @@ using namespace Theme;
constexpr static LoadChocolateScreenData &mydata = screen_data.LoadChocolateScreen;
-void LoadChocolateScreen::draw_syringe(draw_mode_t what) {
- #if ENABLED(COCOA_PRESS_CHOCOLATE_LEVEL_SENSOR)
- const float fill_level = get_chocolate_fill_level();
- #else
- constexpr float fill_level = 1.0f;
- #endif
-
- CommandProcessor cmd;
- PolyUI ui(cmd, what);
-
- if (what & BACKGROUND) {
- // Paint the shadow for the syringe
- ui.color(shadow_rgb);
- ui.shadow(POLY(syringe_outline), shadow_depth);
- }
-
- if (what & FOREGROUND) {
- int16_t x, y, h, v;
-
- // Paint the syringe icon
- ui.color(syringe_rgb);
- ui.fill(POLY(syringe_outline));
-
- ui.color(fluid_rgb);
- ui.bounds(POLY(syringe_fluid), x, y, h, v);
- cmd.cmd(SAVE_CONTEXT());
- cmd.cmd(SCISSOR_XY(x,y + v * (1.0 - fill_level)));
- cmd.cmd(SCISSOR_SIZE(h, v * fill_level));
- ui.fill(POLY(syringe_fluid), false);
- cmd.cmd(RESTORE_CONTEXT());
-
- ui.color(stroke_rgb);
- ui.fill(POLY(syringe));
- }
-}
-
void LoadChocolateScreen::draw_buttons(draw_mode_t what) {
int16_t x, y, h, v;
@@ -84,10 +48,18 @@ void LoadChocolateScreen::draw_buttons(draw_mode_t what) {
cmd.font(font_medium).colors(normal_btn);
ui.bounds(POLY(load_screen_unload_btn), x, y, h, v);
- cmd.tag(2).button(x, y, h, v, GET_TEXT_F(MSG_FULL_UNLOAD));
+ cmd.tag(2).colors(mydata.repeat_tag == 5 ? action_btn : normal_btn).button(x, y, h, v, GET_TEXT_F(MSG_UNLOAD));
ui.bounds(POLY(load_screen_load_btn), x, y, h, v);
- cmd.tag(3).button(x, y, h, v, GET_TEXT_F(MSG_FULL_LOAD));
+ cmd.tag(3).colors(mydata.repeat_tag == 6 ? action_btn : normal_btn).button(x, y, h, v, GET_TEXT_F(MSG_LOAD));
+
+ ui.bounds(POLY(load_screen_start_stop_btn), x, y, h, v);
+ if(mydata.repeat_tag == 0) {
+ cmd.colors(normal_btn).enabled(false);
+ } else {
+ cmd.colors(mydata.repeating ? action_btn : normal_btn).enabled(true);
+ }
+ cmd.tag(4).button(x, y, h, v, GET_TEXT_F(MSG_START_STOP));
ui.bounds(POLY(load_screen_back_btn), x, y, h, v);
cmd.tag(1).colors(action_btn).button(x, y, h, v, GET_TEXT_F(MSG_BUTTON_DONE));
@@ -102,8 +74,8 @@ void LoadChocolateScreen::draw_text(draw_mode_t what) {
cmd.font(font_medium).cmd(COLOR_RGB(bg_text_enabled));
- ui.bounds(POLY(load_sreen_title), x, y, h, v);
- cmd.tag(2).text(x, y, h, v, GET_TEXT_F(MSG_LOAD_UNLOAD));
+ ui.bounds(POLY(load_screen_continuous), x, y, h, v);
+ cmd.tag(2).text(x, y, h, v, GET_TEXT_F(MSG_CONTINUOUS));
ui.bounds(POLY(load_screen_increment), x, y, h, v);
cmd.tag(3).text(x, y, h, v, GET_TEXT_F(MSG_INCREMENT));
@@ -120,11 +92,12 @@ void LoadChocolateScreen::draw_arrows(draw_mode_t what) {
constexpr uint8_t style = PolyUI::REGULAR;
- ui.button(4, POLY(load_screen_extrude), style);
- ui.button(5, POLY(load_screen_retract), style);
+ ui.button(5, POLY(load_screen_extrude), style);
+ ui.button(6, POLY(load_screen_retract), style);
}
void LoadChocolateScreen::onEntry() {
+ mydata.repeating = false;
mydata.repeat_tag = 0;
}
@@ -136,14 +109,15 @@ void LoadChocolateScreen::onRedraw(draw_mode_t what) {
.tag(0);
}
- draw_syringe(what);
draw_arrows(what);
draw_buttons(what);
draw_text(what);
}
-bool LoadChocolateScreen::onTouchStart(uint8_t) {
- mydata.repeat_tag = 0;
+bool LoadChocolateScreen::onTouchStart(uint8_t tag) {
+ if(tag != 4) {
+ mydata.repeating = false;
+ }
return true;
}
@@ -151,10 +125,13 @@ bool LoadChocolateScreen::onTouchEnd(uint8_t tag) {
using namespace ExtUI;
switch (tag) {
case 2:
- mydata.repeat_tag = (mydata.repeat_tag == 2) ? 0 : 2;
+ mydata.repeat_tag = 5;
break;
case 3:
- mydata.repeat_tag = (mydata.repeat_tag == 3) ? 0 : 3;
+ mydata.repeat_tag = 6;
+ break;
+ case 4:
+ mydata.repeating = !mydata.repeating;
break;
case 1: GOTO_PREVIOUS(); break;
}
@@ -176,26 +153,10 @@ bool LoadChocolateScreen::onTouchHeld(uint8_t tag) {
#define UI_INCREMENT_AXIS(axis) UI_INCREMENT(AxisPosition_mm, axis);
#define UI_DECREMENT_AXIS(axis) UI_DECREMENT(AxisPosition_mm, axis);
switch (tag) {
- case 2: {
- if (get_chocolate_fill_level() < 0.1) {
- mydata.repeat_tag = 0;
- return false;
- }
- UI_INCREMENT_AXIS(E0);
- break;
- }
- case 3: {
- if (get_chocolate_fill_level() > 0.75) {
- mydata.repeat_tag = 0;
- return false;
- }
- UI_DECREMENT_AXIS(E0);
- break;
- }
- case 4:
+ case 5:
UI_INCREMENT_AXIS(E0);
break;
- case 5:
+ case 6:
UI_DECREMENT_AXIS(E0);
break;
default: return false;
@@ -207,7 +168,7 @@ bool LoadChocolateScreen::onTouchHeld(uint8_t tag) {
void LoadChocolateScreen::onIdle() {
reset_menu_timeout();
- if (mydata.repeat_tag) onTouchHeld(mydata.repeat_tag);
+ if (mydata.repeating) onTouchHeld(mydata.repeat_tag);
if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) {
if (!EventLoop::is_touch_held())
onRefresh();
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.h b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.h
index 4a582f02..42666977 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.h
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.h
@@ -28,11 +28,11 @@
struct LoadChocolateScreenData {
uint8_t repeat_tag;
+ bool repeating;
};
class LoadChocolateScreen : public BaseScreen, public CachedScreen {
private:
- static void draw_syringe(draw_mode_t what);
static void draw_arrows(draw_mode_t what);
static void draw_buttons(draw_mode_t what);
static void draw_text(draw_mode_t what);
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp
index b01aa81d..2fabb81e 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp
@@ -32,7 +32,7 @@ using namespace Theme;
#define GRID_ROWS 5
void PreheatMenu::onRedraw(draw_mode_t what) {
- const int16_t w = TERN0(COCOA_PRESS_EXTRA_HEATER, has_extra_heater() ? BTN_W(1) : BTN_W(2));
+ const int16_t w = TERN0(COCOA_PRESS_EXTRA_HEATER, has_extra_heater()) ? BTN_W(1) : BTN_W(2);
const int16_t h = BTN_H(1);
if (what & BACKGROUND) {
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h
index 8481e446..5276f64f 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h
@@ -90,7 +90,6 @@ enum {
#include "../generic/spinner_dialog_box.h"
#include "../generic/restore_failsafe_dialog_box.h"
#include "../generic/save_settings_dialog_box.h"
-#include "../generic/confirm_start_print_dialog_box.h"
#include "../generic/confirm_abort_print_dialog_box.h"
#include "../generic/confirm_user_request_alert_box.h"
#include "../generic/touch_calibration_screen.h"
@@ -114,7 +113,6 @@ enum {
#include "../generic/bed_mesh_edit_screen.h"
#include "../generic/case_light_screen.h"
#include "../generic/linear_advance_screen.h"
-#include "../generic/files_screen.h"
#include "../generic/move_axis_screen.h"
#include "../generic/flow_percent_screen.h"
#if HAS_JUNCTION_DEVIATION
@@ -132,3 +130,5 @@ enum {
#include "leveling_menu.h"
#include "move_xyz_screen.h"
#include "move_e_screen.h"
+#include "files_screen.h"
+#include "confirm_start_print_dialog_box.h"
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp
index 00b2d6a0..eddf3672 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp
@@ -29,6 +29,8 @@
#include "cocoa_press_ui.h"
#define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0]))
+#define ICON_POS(x,y,w,h) x, y, h, h
+#define TEXT_POS(x,y,w,h) x + h, y, w - h, h
const uint8_t shadow_depth = 5;
@@ -38,8 +40,28 @@ using namespace ExtUI;
float StatusScreen::increment;
+void StatusScreen::_format_time(char *outstr, uint32_t time) {
+ const uint8_t hrs = time / 3600,
+ min = (time / 60) % 60,
+ sec = time % 60;
+ if (hrs)
+ sprintf_P(outstr, PSTR("%02d:%02d"), hrs, min);
+ else
+ sprintf_P(outstr, PSTR("%02d:%02ds"), min, sec);
+}
+
void StatusScreen::loadBitmaps() {
+ // Load the bitmaps for the status screen
+ using namespace Theme;
constexpr uint32_t base = ftdi_memory_map::RAM_G;
+ CLCD::mem_write_xbm(base + Light_Bulb_Info.RAMG_offset, Light_Bulb, sizeof(Light_Bulb));
+ CLCD::mem_write_xbm(base + Chamber_Icon_Info.RAMG_offset, Chamber_Icon, sizeof(Chamber_Icon));
+ CLCD::mem_write_xbm(base + Clock_Icon_Info.RAMG_offset, Clock_Icon, sizeof(Clock_Icon));
+ CLCD::mem_write_xbm(base + File_Icon_Info.RAMG_offset, File_Icon, sizeof(File_Icon));
+ CLCD::mem_write_xbm(base + TD_Icon_Info.RAMG_offset, TD_Icon, sizeof(TD_Icon));
+ CLCD::mem_write_xbm(base + Extruder_Icon_Info.RAMG_offset, Extruder_Icon, sizeof(Extruder_Icon));
+ CLCD::mem_write_xbm(base + Bed_Heat_Icon_Info.RAMG_offset, Bed_Heat_Icon, sizeof(Bed_Heat_Icon));
+ CLCD::mem_write_xbm(base + Fan_Icon_Info.RAMG_offset, Fan_Icon, sizeof(Fan_Icon));
// Load fonts for internationalization
#if ENABLED(TOUCH_UI_USE_UTF8)
@@ -47,33 +69,50 @@ void StatusScreen::loadBitmaps() {
#endif
}
-void StatusScreen::draw_progress(draw_mode_t what) {
+void StatusScreen::draw_time(draw_mode_t what) {
CommandProcessor cmd;
PolyUI ui(cmd, what);
- int16_t x, y, h, v;
-
- cmd.cmd(COLOR_RGB(accent_color_1));
- cmd.font(font_medium);
+ int16_t x, y, w, h;
+ ui.bounds(POLY(print_time_hms), x, y, w, h);
if (what & BACKGROUND) {
- ui.bounds(POLY(print_time_label), x, y, h, v);
- cmd.text(x, y, h, v, GET_TEXT_F(MSG_ELAPSED_PRINT));
+ cmd.cmd(COLOR_RGB(bg_text_enabled))
+ .cmd (BITMAP_SOURCE(Clock_Icon_Info))
+ .cmd (BITMAP_LAYOUT(Clock_Icon_Info))
+ .cmd (BITMAP_SIZE (Clock_Icon_Info))
+ .icon(ICON_POS(x, y, w, h), Clock_Icon_Info, icon_scale)
+ .cmd(COLOR_RGB(bg_text_enabled));
}
if (what & FOREGROUND) {
const uint32_t elapsed = getProgress_seconds_elapsed();
- const uint8_t hrs = elapsed/3600;
- const uint8_t min = (elapsed/60)%60;
+ char elapsed_str[10];
+ _format_time(elapsed_str, elapsed);
+
+ cmd.font(font_medium)
+ .cmd(COLOR_RGB(bg_text_enabled))
+ .text(TEXT_POS(x, y, w, h), elapsed_str);
+ }
+}
+
+
+void StatusScreen::draw_progress(draw_mode_t what) {
+ CommandProcessor cmd;
+ PolyUI ui(cmd, what);
- char str[10];
- sprintf_P(str, PSTR(" %02d : %02d"), hrs, min);
- ui.bounds(POLY(print_time_hms), x, y, h, v);
- cmd.text(x, y, h, v, str);
+ int16_t x, y, w, h;
- sprintf_P(str, PSTR("%-3d%%"), getProgress_percent() );
- ui.bounds(POLY(print_time_percent), x, y, h, v);
- cmd.text(x, y, h, v, str);
+ cmd.cmd(COLOR_RGB(accent_color_1));
+ cmd.font(font_medium);
+
+ if (what & FOREGROUND) {
+ // Draw progress bar
+ ui.bounds(POLY(file_name), x, y, w, h);
+ const uint16_t bar_width = w * getProgress_percent() / 100;
+ cmd.tag(8)
+ .cmd(COLOR_RGB(accent_color_5))
+ .rectangle(x, y, bar_width, h);
}
}
@@ -81,30 +120,38 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
CommandProcessor cmd;
PolyUI ui(cmd, what);
- int16_t x, y, h, v;
+ int16_t x, y, w, h;
if (what & BACKGROUND) {
cmd.cmd(COLOR_RGB(fluid_rgb));
cmd.font(font_medium).tag(10);
- ui.bounds(POLY(chocolate_label), x, y, h, v);
- cmd.text(x, y, h, v, GET_TEXT_F(MSG_CHOCOLATE));
+ /*ui.bounds(POLY(temp_lbl), x, y, w, h);
+ cmd.text(x, y, w, h, F("Temp"));
- ui.bounds(POLY(h0_label), x, y, h, v);
- cmd.text(x, y, h, v, GET_TEXT_F(MSG_NOZZLE));
+ ui.bounds(POLY(set_lbl), x, y, w, h);
+ cmd.text(x, y, w, h, F("Set"));*/
- ui.bounds(POLY(h1_label), x, y, h, v);
- cmd.text(x, y, h, v, GET_TEXT_F(MSG_BODY));
+ ui.bounds(POLY(chocolate_label), x, y, w, h);
+ cmd.text(x, y, w, h, F("Cocoa Press"));
+
+ ui.bounds(POLY(h0_label), x, y, w, h);
+ cmd.text(x, y, w, h, GET_TEXT_F(MSG_NOZZLE));
+
+ ui.bounds(POLY(h1_label), x, y, w, h);
+ cmd.text(x, y, w, h, GET_TEXT_F(MSG_BODY));
#if ENABLED(COCOA_PRESS_EXTRA_HEATER)
if (has_extra_heater()) {
- ui.bounds(POLY(h2_label), x, y, h, v);
- cmd.text(x, y, h, v, GET_TEXT_F(MSG_EXTERNAL));
+ ui.bounds(POLY(h2_label), x, y, w, h);
+ cmd.text(x, y, w, h, GET_TEXT_F(MSG_EXTERNAL));
}
#endif
- ui.bounds(POLY(h3_label), x, y, h, v);
- cmd.text(x, y, h, v, GET_TEXT_F(MSG_CHAMBER));
+ #if ENABLED(COCOA_PRESS_CHAMBER_COOLER)
+ ui.bounds(POLY(h3_label), x, y, w, h);
+ cmd.text(x, y, w, h, GET_TEXT_F(MSG_CHAMBER));
+ #endif
#if ENABLED(TOUCH_UI_USE_UTF8)
load_utf8_bitmaps(cmd); // Restore font bitmap handles
@@ -117,68 +164,60 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
cmd.font(font_large).tag(10);
+ // Show the actual temperatures
+
format_temp(str, getActualTemp_celsius(E0));
- ui.bounds(POLY(h0_temp), x, y, h, v);
- cmd.text(x, y, h, v, str);
+ ui.bounds(POLY(h0_temp), x, y, w, h);
+ cmd.text(x, y, w, h, str);
format_temp(str, getActualTemp_celsius(E1));
- ui.bounds(POLY(h1_temp), x, y, h, v);
- cmd.text(x, y, h, v, str);
+ ui.bounds(POLY(h1_temp), x, y, w, h);
+ cmd.text(x, y, w, h, str);
#if ENABLED(COCOA_PRESS_EXTRA_HEATER)
if (has_extra_heater()) {
format_temp(str, getActualTemp_celsius(E2));
- ui.bounds(POLY(h2_temp), x, y, h, v);
- cmd.text(x, y, h, v, str);
+ ui.bounds(POLY(h2_temp), x, y, w, h);
+ cmd.text(x, y, w, h, str);
}
#endif
- format_temp(str, getActualTemp_celsius(CHAMBER));
- ui.bounds(POLY(h3_temp), x, y, h, v);
- cmd.text(x, y, h, v, str);
- }
-}
+ #if ENABLED(COCOA_PRESS_CHAMBER_COOLER)
+ format_temp(str, getActualTemp_celsius(CHAMBER));
+ ui.bounds(POLY(h3_temp), x, y, w, h);
+ cmd.text(x, y, w, h, str);
+ #endif
-void StatusScreen::draw_syringe(draw_mode_t what) {
- #if ENABLED(COCOA_PRESS_CHOCOLATE_LEVEL_SENSOR)
- const float fill_level = get_chocolate_fill_level();
- #else
- constexpr float fill_level = 1.0f;
- #endif
+ /*// Show the set temperatures
+ format_temp(str, getTargetTemp_celsius(E0));
+ ui.bounds(POLY(h0_set), x, y, w, h);
+ cmd.text(x, y, w, h, str);
- CommandProcessor cmd;
- PolyUI ui(cmd, what);
+ format_temp(str, getTargetTemp_celsius(E1));
+ ui.bounds(POLY(h1_set), x, y, w, h);
+ cmd.text(x, y, w, h, str);
- if (what & BACKGROUND) {
- // Paint the shadow for the syringe
- ui.color(shadow_rgb);
- ui.shadow(POLY(syringe_outline), shadow_depth);
- }
+ #if ENABLED(COCOA_PRESS_EXTRA_HEATER)
+ if (has_extra_heater()) {
+ format_temp(str, getTargetTemp_celsius(E2));
+ ui.bounds(POLY(h2_set), x, y, w, h);
+ cmd.text(x, y, w, h, str);
+ }
+ #endif
- if (what & FOREGROUND) {
- int16_t x, y, h, v;
-
- // Paint the syringe icon
- ui.color(syringe_rgb);
- ui.fill(POLY(syringe_outline));
-
- ui.color(fluid_rgb);
- ui.bounds(POLY(syringe_fluid), x, y, h, v);
- cmd.cmd(SAVE_CONTEXT());
- cmd.cmd(SCISSOR_XY(x,y + v * (1.0 - fill_level)));
- cmd.cmd(SCISSOR_SIZE(h, v * fill_level));
- ui.fill(POLY(syringe_fluid), false);
- cmd.cmd(RESTORE_CONTEXT());
-
- ui.color(stroke_rgb);
- ui.fill(POLY(syringe));
+ #if ENABLED(COCOA_PRESS_CHAMBER_COOLER)
+ format_temp(str, getTargetTemp_celsius(CHAMBER));
+ ui.bounds(POLY(h3_set), x, y, w, h);
+ cmd.text(x, y, w, h, str);
+ #endif*/
}
}
void StatusScreen::draw_buttons(draw_mode_t what) {
- int16_t x, y, h, v;
+ int16_t x, y, w, h;
- const bool can_print = isMediaInserted() && !isPrintingFromMedia();
+ const bool can_print = !isPrinting() && isMediaInserted() && isFileSelected();
+ const bool can_select = !isPrinting() && isMediaInserted();
const bool sdOrHostPrinting = ExtUI::isPrinting();
const bool sdOrHostPaused = ExtUI::isPrintingPaused();
@@ -187,29 +226,68 @@ void StatusScreen::draw_buttons(draw_mode_t what) {
cmd.font(font_medium).colors(normal_btn);
- ui.bounds(POLY(park_btn), x, y, h, v);
- cmd.tag(1).button(x, y, h, v, GET_TEXT_F(MSG_FILAMENT_PARK_ENABLED));
+ ui.bounds(POLY(load_chocolate_btn), x, y, w, h);
+ cmd.tag(1).button(x, y, w, h, GET_TEXT_F(MSG_LOAD_UNLOAD));
+
+ ui.bounds(POLY(extrude_btn), x, y, w, h);
+ cmd.tag(2).button(x, y, w, h, GET_TEXT_F(MSG_EXTRUDE));
+
+ ui.bounds(POLY(preheat_chocolate_btn), x, y, w, h);
+ cmd.tag(3).button(x, y, w, h, GET_TEXT_F(MSG_PREHEAT_CHOCOLATE));
+
+ ui.bounds(POLY(menu_btn), x, y, w, h);
+ cmd.tag(4).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_MENU));
+
+ ui.bounds(POLY(media_btn), x, y, w, h);
+ cmd.tag(5).enabled(can_select).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_MEDIA));
+
+ ui.bounds(POLY(print_btn), x, y, w, h);
+ cmd.tag(6).colors(action_btn).enabled(can_print).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_PRINT));
- ui.bounds(POLY(load_chocolate_btn), x, y, h, v);
- cmd.tag(2).button(x, y, h, v, GET_TEXT_F(MSG_LOAD_UNLOAD));
+ ui.bounds(POLY(pause_btn), x, y, w, h);
+ cmd.tag(sdOrHostPaused ? 8 : 7).enabled(sdOrHostPrinting).button(x, y, w, h, sdOrHostPaused ? GET_TEXT_F(MSG_BUTTON_RESUME) : GET_TEXT_F(MSG_BUTTON_PAUSE));
- ui.bounds(POLY(preheat_chocolate_btn), x, y, h, v);
- cmd.tag(3).button(x, y, h, v, GET_TEXT_F(MSG_PREHEAT_CHOCOLATE));
+ ui.bounds(POLY(stop_btn), x, y, w, h);
+ cmd.tag(9).enabled(sdOrHostPrinting).button(x, y, w, h, GET_TEXT_F(MSG_BUTTON_STOP));
+}
- ui.bounds(POLY(menu_btn), x, y, h, v);
- cmd.tag(4).button(x, y, h, v, GET_TEXT_F(MSG_BUTTON_MENU));
+void StatusScreen::draw_file(draw_mode_t what) {
+ int16_t x, y, w, h;
- ui.bounds(POLY(pause_btn), x, y, h, v);
- cmd.tag(sdOrHostPaused ? 6 : 5).enabled(sdOrHostPrinting).button(x, y, h, v, sdOrHostPaused ? GET_TEXT_F(MSG_BUTTON_RESUME) : GET_TEXT_F(MSG_BUTTON_PAUSE));
+ CommandProcessor cmd;
+ PolyUI ui(cmd, what);
- ui.bounds(POLY(stop_btn), x, y, h, v);
- cmd.tag(7).enabled(sdOrHostPrinting).button(x, y, h, v, GET_TEXT_F(MSG_BUTTON_STOP));
+ ui.bounds(POLY(file_name), x, y, w, h);
- ui.bounds(POLY(extrude_btn), x, y, h, v);
- cmd.tag(8).button(x, y, h, v, GET_TEXT_F(MSG_EXTRUDE));
+ if (what & BACKGROUND) {
+ cmd.tag(5)
+ .cmd(COLOR_RGB(bg_text_enabled))
+ .cmd (BITMAP_SOURCE(File_Icon_Info))
+ .cmd (BITMAP_LAYOUT(File_Icon_Info))
+ .cmd (BITMAP_SIZE (File_Icon_Info))
+ .icon(ICON_POS(x, y, w, h), File_Icon_Info, icon_scale);
+ }
- ui.bounds(POLY(print_btn), x, y, h, v);
- cmd.tag(9).colors(action_btn).enabled(can_print).button(x, y, h, v, GET_TEXT_F(MSG_BUTTON_PRINT));
+ if (what & FOREGROUND) {
+ cmd.cmd(COLOR_RGB(bg_text_enabled));
+
+ if(!isMediaInserted())
+ draw_text_with_ellipsis(cmd, TEXT_POS(x, y, w, h), F("No media present"), OPT_CENTERY, font_small);
+ else if(isFileSelected()) {
+ FileList list;
+ draw_text_with_ellipsis(cmd, TEXT_POS(x, y, w, h), list.filename(), OPT_CENTERY, font_small);
+ } else
+ draw_text_with_ellipsis(cmd, TEXT_POS(x, y, w, h), F("No file selected"), OPT_CENTERY, font_small);
+ }
+}
+
+bool StatusScreen::isFileSelected() {
+ if(!isMediaInserted()) return false;
+ FileList list;
+ if(list.isDir()) return false;
+ const char *filename = list.filename();
+ if(filename[0] == '\0') return false;
+ return true;
}
void StatusScreen::onRedraw(draw_mode_t what) {
@@ -220,8 +298,9 @@ void StatusScreen::onRedraw(draw_mode_t what) {
.tag(0);
}
+ draw_file(what);
+ draw_time(what);
draw_progress(what);
- draw_syringe(what);
draw_temperature(what);
draw_buttons(what);
}
@@ -233,11 +312,12 @@ bool StatusScreen::onTouchStart(uint8_t) {
bool StatusScreen::onTouchEnd(uint8_t tag) {
switch (tag) {
- case 1: SpinnerDialogBox::enqueueAndWait(F("G28 O\nG27")); break;
- case 2: GOTO_SCREEN(LoadChocolateScreen); break;
+ case 1: GOTO_SCREEN(LoadChocolateScreen); break;
case 3: GOTO_SCREEN(PreheatMenu); break;
case 4: GOTO_SCREEN(MainMenu); break;
- case 5:
+ case 5: GOTO_SCREEN(FilesScreen); break;
+ case 6: GOTO_SCREEN(ConfirmStartPrintDialogBox); break;
+ case 7:
sound.play(twinkle, PLAY_ASYNCHRONOUS);
if (ExtUI::isPrintingFromMedia())
ExtUI::pausePrint();
@@ -246,7 +326,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
#endif
GOTO_SCREEN(StatusScreen);
break;
- case 6:
+ case 8:
sound.play(twinkle, PLAY_ASYNCHRONOUS);
if (ExtUI::isPrintingFromMedia())
ExtUI::resumePrint();
@@ -255,12 +335,12 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
#endif
GOTO_SCREEN(StatusScreen);
break;
- case 7:
+ case 9:
GOTO_SCREEN(ConfirmAbortPrintDialogBox);
current_screen.forget();
PUSH_SCREEN(StatusScreen);
break;
- case 9: GOTO_SCREEN(FilesScreen); break;
+
case 10: GOTO_SCREEN(TemperatureScreen); break;
default: return false;
}
@@ -271,7 +351,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
}
bool StatusScreen::onTouchHeld(uint8_t tag) {
- if (tag == 8 && !ExtUI::isMoving()) {
+ if (tag == 2 && !ExtUI::isMoving()) {
LoadChocolateScreen::setManualFeedrateAndIncrement(1, increment);
UI_INCREMENT(AxisPosition_mm, E0);
current_screen.onRefresh();
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h
index 08fb6f26..05f99e95 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h
@@ -28,17 +28,19 @@
class StatusScreen : public BaseScreen, public CachedScreen {
private:
+ static void _format_time(char *outstr, uint32_t time);
+
static float increment;
static bool jog_xy;
static bool fine_motion;
+ static void draw_time(draw_mode_t what);
static void draw_progress(draw_mode_t what);
static void draw_temperature(draw_mode_t what);
- static void draw_syringe(draw_mode_t what);
- static void draw_arrows(draw_mode_t what);
- static void draw_overlay_icons(draw_mode_t what);
- static void draw_fine_motion(draw_mode_t what);
static void draw_buttons(draw_mode_t what);
+ static void draw_file(draw_mode_t what);
+
+ static bool isFileSelected();
public:
static void loadBitmaps();
static void unlockMotors();
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h
index 648ed533..fd3e8f92 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h
@@ -125,7 +125,7 @@ class CommandProcessor : public CLCD::CommandFifo {
}
inline CommandProcessor& set_button_style_callback(const btn_style_func_t *func) {
- _btn_style_callback = func ? func : default_button_style_func;
+ _btn_style_callback = func ?: default_button_style_func;
return *this;
}
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp
index 47bf79e4..3d53f2d9 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp
@@ -41,7 +41,7 @@ namespace FTDI {
#endif
// Play the note
- CLCD::mem_write_16(REG::SOUND, (note == REST) ? 0 : (((note ? note : NOTE_C4) << 8) | effect));
+ CLCD::mem_write_16(REG::SOUND, (note == REST) ? 0 : (((note ?: NOTE_C4) << 8) | effect));
CLCD::mem_write_8(REG::PLAY, 1);
}
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp
index a006d309..ea177bfd 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp
@@ -39,7 +39,7 @@ void DialogBoxBaseClass::drawMessage(T message, const int16_t font) {
.cmd(CLEAR(true,true,true))
.cmd(COLOR_RGB(bg_text_enabled))
.tag(0);
- draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,6), message, OPT_CENTER, font ? font : font_large);
+ draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,6), message, OPT_CENTER, font ?: font_large);
cmd.colors(normal_btn);
}
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp
index 499f7415..5d797f44 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp
@@ -56,7 +56,7 @@ void LanguageMenu::onRedraw(draw_mode_t) {
bool LanguageMenu::onTouchEnd(uint8_t tag) {
if (tag > 0 && tag <= NUM_LANGUAGES) {
- lang = tag - 1;
+ ftdi_language = tag - 1;
GOTO_SCREEN(StatusScreen);
return true;
}
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.cpp
index e7fc23ab..666a7542 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.cpp
@@ -34,7 +34,7 @@ void MaxVelocityScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(0);
w.units(GET_TEXT_F(MSG_UNITS_MM_S));
- w.heading( GET_TEXT_F(MSG_MAX_SPEED));
+ w.heading( GET_TEXT_F(MSG_MAX_SPEED_NO_UNITS));
w.color(x_axis) .adjuster( 2, GET_TEXT_F(MSG_VMAX_X), getAxisMaxFeedrate_mm_s(X) );
w.color(y_axis) .adjuster( 4, GET_TEXT_F(MSG_VMAX_Y), getAxisMaxFeedrate_mm_s(Y) );
w.color(z_axis) .adjuster( 6, GET_TEXT_F(MSG_VMAX_Z), getAxisMaxFeedrate_mm_s(Z) );
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp
index e077eb37..c3927c21 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp
@@ -61,9 +61,9 @@ void MoveAxisScreen::onRedraw(draw_mode_t what) {
w.adjuster( 10, GET_TEXT_F(MSG_AXIS_E2), mydata.e_rel[1], canMove(E1));
#if EXTRUDERS > 2
w.adjuster( 12, GET_TEXT_F(MSG_AXIS_E3), mydata.e_rel[2], canMove(E2));
- #endif
- #if EXTRUDERS > 3
- w.adjuster( 14, GET_TEXT_F(MSG_AXIS_E4), mydata.e_rel[3], canMove(E3));
+ #if EXTRUDERS > 3
+ w.adjuster( 14, GET_TEXT_F(MSG_AXIS_E4), mydata.e_rel[3], canMove(E3));
+ #endif
#endif
#endif
#if Z_HOME_TO_MIN
@@ -79,40 +79,44 @@ bool BaseMoveAxisScreen::onTouchHeld(uint8_t tag) {
switch (tag) {
case 2: UI_DECREMENT_AXIS(X); break;
case 3: UI_INCREMENT_AXIS(X); break;
- case 4: UI_DECREMENT_AXIS(Y); break;
- case 5: UI_INCREMENT_AXIS(Y); break;
- case 6: UI_DECREMENT_AXIS(Z); break;
- case 7: UI_INCREMENT_AXIS(Z); break;
- // For extruders, also update relative distances.
- case 8: UI_DECREMENT_AXIS(E0); mydata.e_rel[0] -= increment; break;
- case 9: UI_INCREMENT_AXIS(E0); mydata.e_rel[0] += increment; break;
- #if HAS_MULTI_EXTRUDER
- case 10: UI_DECREMENT_AXIS(E1); mydata.e_rel[1] -= increment; break;
- case 11: UI_INCREMENT_AXIS(E1); mydata.e_rel[1] += increment; break;
- #endif
- #if EXTRUDERS > 2
- case 12: UI_DECREMENT_AXIS(E2); mydata.e_rel[2] -= increment; break;
- case 13: UI_INCREMENT_AXIS(E2); mydata.e_rel[2] += increment; break;
+ #if HAS_EXTRUDERS
+ // For extruders, also update relative distances.
+ case 8: UI_DECREMENT_AXIS(E0); mydata.e_rel[0] -= increment; break;
+ case 9: UI_INCREMENT_AXIS(E0); mydata.e_rel[0] += increment; break;
+ #if HAS_MULTI_EXTRUDER
+ case 10: UI_DECREMENT_AXIS(E1); mydata.e_rel[1] -= increment; break;
+ case 11: UI_INCREMENT_AXIS(E1); mydata.e_rel[1] += increment; break;
+ #if EXTRUDERS > 2
+ case 12: UI_DECREMENT_AXIS(E2); mydata.e_rel[2] -= increment; break;
+ case 13: UI_INCREMENT_AXIS(E2); mydata.e_rel[2] += increment; break;
+ #if EXTRUDERS > 3
+ case 14: UI_DECREMENT_AXIS(E3); mydata.e_rel[3] -= increment; break;
+ case 15: UI_INCREMENT_AXIS(E3); mydata.e_rel[3] += increment; break;
+ #endif
+ #endif
+ #endif
#endif
- #if EXTRUDERS > 3
- case 14: UI_DECREMENT_AXIS(E3); mydata.e_rel[3] -= increment; break;
- case 15: UI_INCREMENT_AXIS(E3); mydata.e_rel[3] += increment; break;
+ #if HAS_Y_AXIS
+ case 4: UI_DECREMENT_AXIS(Y); break;
+ case 5: UI_INCREMENT_AXIS(Y); break;
+ case 20: SpinnerDialogBox::enqueueAndWait(F("G28X")); break;
+ case 21: SpinnerDialogBox::enqueueAndWait(F("G28Y")); break;
+ #if HAS_Z_AXIS
+ case 6: UI_DECREMENT_AXIS(Z); break;
+ case 7: UI_INCREMENT_AXIS(Z); break;
+ case 22: SpinnerDialogBox::enqueueAndWait(F("G28Z")); break;
+ case 24: raiseZtoTop(); break;
+ #endif
#endif
- case 20: SpinnerDialogBox::enqueueAndWait(F("G28X")); break;
- case 21: SpinnerDialogBox::enqueueAndWait(F("G28Y")); break;
- case 22: SpinnerDialogBox::enqueueAndWait(F("G28Z")); break;
case 23: SpinnerDialogBox::enqueueAndWait(F("G28")); break;
- case 24: raiseZtoTop(); break;
default:
return false;
}
- #undef UI_DECREMENT_AXIS
- #undef UI_INCREMENT_AXIS
return true;
}
void BaseMoveAxisScreen::raiseZtoTop() {
- constexpr xyze_feedrate_t homing_feedrate = HOMING_FEEDRATE_MM_M;
+ constexpr xyz_feedrate_t homing_feedrate = HOMING_FEEDRATE_MM_M;
setAxisPosition_mm(Z_MAX_POS - 5, Z, homing_feedrate.z);
}
@@ -128,9 +132,11 @@ void BaseMoveAxisScreen::setManualFeedrate(ExtUI::axis_t axis, float increment_m
ExtUI::setFeedrate_mm_s(getManualFeedrate(X_AXIS + (axis - ExtUI::X), increment_mm));
}
-void BaseMoveAxisScreen::setManualFeedrate(ExtUI::extruder_t, float increment_mm) {
- ExtUI::setFeedrate_mm_s(getManualFeedrate(E_AXIS, increment_mm));
-}
+#if HAS_EXTRUDERS
+ void BaseMoveAxisScreen::setManualFeedrate(ExtUI::extruder_t, float increment_mm) {
+ ExtUI::setFeedrate_mm_s(getManualFeedrate(E_AXIS, increment_mm));
+ }
+#endif
void MoveAxisScreen::onIdle() {
if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) {
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.cpp
index bf684e43..9ff738e4 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.cpp
@@ -23,5 +23,5 @@
#include "../../../../MarlinCore.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "language.h"
- uint8_t lang = 0;
+ uint8_t ftdi_language = 0;
#endif
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h
index 5dbde8a5..05e62584 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h
@@ -146,6 +146,7 @@ namespace Language_en {
LSTR MSG_PROBE_BED = u8"Probe Mesh";
LSTR MSG_PRINT_TEST = u8"Print Test (PLA)";
LSTR MSG_MOVE_Z_TO_TOP = u8"Raise Z to Top";
+ LSTR MSG_MAX_SPEED_NO_UNITS = u8"Max Speed";
#if ENABLED(TOUCH_UI_LULZBOT_BIO)
LSTR MSG_MOVE_TO_HOME = u8"Move to Home";
@@ -163,8 +164,9 @@ namespace Language_en {
LSTR MSG_CHOCOLATE = u8"Chocolate";
LSTR MSG_UNLOAD_CARTRIDGE = u8"Unload Cartridge";
LSTR MSG_LOAD_UNLOAD = u8"Load/Unload";
- LSTR MSG_FULL_LOAD = u8"Full Load";
- LSTR MSG_FULL_UNLOAD = u8"Full Unload";
+ LSTR MSG_START_STOP = u8"Start/Stop";
+ LSTR MSG_LOAD = u8"Load";
+ LSTR MSG_UNLOAD = u8"Unload";
LSTR MSG_PREHEAT_CHOCOLATE = u8"Preheat Chocolate";
LSTR MSG_PREHEAT_FINISHED = u8"Preheat finished";
LSTR MSG_PREHEAT = u8"Preheat";
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h
index 5d715572..48a0c1a9 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h
@@ -64,6 +64,7 @@ union screen_data_t {
DECL_DATA_IF_INCLUDED(FTDI_ALERT_DIALOG_BOX)
DECL_DATA_IF_INCLUDED(COCOA_PREHEAT_SCREEN)
DECL_DATA_IF_INCLUDED(COCOA_LOAD_CHOCOLATE_SCREEN)
+ DECL_DATA_IF_INCLUDED(COCOA_FILES_SCREEN)
};
extern screen_data_t screen_data;
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp
index ec627e31..ed210369 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp
@@ -116,6 +116,8 @@ SCREEN_TABLE {
DECL_SCREEN_IF_INCLUDED(COCOA_LEVELING_MENU)
DECL_SCREEN_IF_INCLUDED(COCOA_MOVE_XYZ_SCREEN)
DECL_SCREEN_IF_INCLUDED(COCOA_MOVE_E_SCREEN)
+ DECL_SCREEN_IF_INCLUDED(COCOA_CONFIRM_START_PRINT)
+ DECL_SCREEN_IF_INCLUDED(COCOA_FILES_SCREEN)
};
SCREEN_TABLE_POST
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h
index 1231d31d..4e706a64 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h
@@ -1,4 +1,3 @@
-
/****************************************************************************
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
diff --git a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h
index c6065af7..ce042392 100644
--- a/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h
+++ b/Marlin/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h
@@ -1,4 +1,3 @@
-
/****************************************************************************
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
diff --git a/Marlin/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp b/Marlin/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp
index 6508f6f0..43149dc6 100644
--- a/Marlin/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp
+++ b/Marlin/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp
@@ -148,7 +148,7 @@ uint32_t SPIFlashStorage::m_startAddress;
#endif // HAS_SPI_FLASH_COMPRESSION
-void SPIFlashStorage::beginWrite(uint32_t startAddress) {
+void SPIFlashStorage::beginWrite(const uint32_t startAddress) {
m_pageDataUsed = 0;
m_currentPage = 0;
m_startAddress = startAddress;
@@ -171,7 +171,7 @@ void SPIFlashStorage::endWrite() {
#endif
}
-void SPIFlashStorage::savePage(uint8_t *buffer) {
+void SPIFlashStorage::savePage(uint8_t * const buffer) {
W25QXX.SPI_FLASH_BufferWrite(buffer, m_startAddress + (SPI_FLASH_PageSize * m_currentPage), SPI_FLASH_PageSize);
// Test env
// char fname[256];
@@ -181,7 +181,7 @@ void SPIFlashStorage::savePage(uint8_t *buffer) {
// fclose(fp);
}
-void SPIFlashStorage::loadPage(uint8_t *buffer) {
+void SPIFlashStorage::loadPage(uint8_t * const buffer) {
W25QXX.SPI_FLASH_BufferRead(buffer, m_startAddress + (SPI_FLASH_PageSize * m_currentPage), SPI_FLASH_PageSize);
// Test env
// char fname[256];
@@ -260,7 +260,7 @@ void SPIFlashStorage::readPage() {
#endif
}
-uint16_t SPIFlashStorage::inData(uint8_t *data, uint16_t size) {
+uint16_t SPIFlashStorage::inData(const uint8_t * const data, uint16_t size) {
// Don't write more than we can
NOMORE(size, pageDataFree());
memcpy(m_pageData + m_pageDataUsed, data, size);
@@ -268,12 +268,12 @@ uint16_t SPIFlashStorage::inData(uint8_t *data, uint16_t size) {
return size;
}
-void SPIFlashStorage::writeData(uint8_t *data, uint16_t size) {
+void SPIFlashStorage::writeData(const uint8_t *data, uint16_t size) {
// Flush a page if needed
if (pageDataFree() == 0) flushPage();
while (size > 0) {
- uint16_t written = inData(data, size);
+ const uint16_t written = inData(data, size);
size -= written;
// Need to write more? Flush page and continue!
if (size > 0) {
@@ -283,7 +283,7 @@ void SPIFlashStorage::writeData(uint8_t *data, uint16_t size) {
}
}
-void SPIFlashStorage::beginRead(uint32_t startAddress) {
+void SPIFlashStorage::beginRead(const uint32_t startAddress) {
m_startAddress = startAddress;
m_currentPage = 0;
// Nothing in memory now
@@ -293,7 +293,7 @@ void SPIFlashStorage::beginRead(uint32_t startAddress) {
#endif
}
-uint16_t SPIFlashStorage::outData(uint8_t *data, uint16_t size) {
+uint16_t SPIFlashStorage::outData(uint8_t * const data, uint16_t size) {
// Don't read more than we have
NOMORE(size, pageDataFree());
memcpy(data, m_pageData + m_pageDataUsed, size);
@@ -306,7 +306,7 @@ void SPIFlashStorage::readData(uint8_t *data, uint16_t size) {
if (pageDataFree() == 0) readPage();
while (size > 0) {
- uint16_t read = outData(data, size);
+ const uint16_t read = outData(data, size);
size -= read;
// Need to write more? Flush page and continue!
if (size > 0) {
diff --git a/Marlin/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h b/Marlin/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h
index 72394286..bd7109b7 100644
--- a/Marlin/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h
+++ b/Marlin/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h
@@ -75,23 +75,23 @@
class SPIFlashStorage {
public:
// Write operation
- static void beginWrite(uint32_t startAddress);
+ static void beginWrite(const uint32_t startAddress);
static void endWrite();
- static void writeData(uint8_t *data, uint16_t size);
+ static void writeData(const uint8_t *data, uint16_t size);
// Read operation
- static void beginRead(uint32_t startAddress);
+ static void beginRead(const uint32_t startAddress);
static void readData(uint8_t *data, uint16_t size);
static uint32_t getCurrentPage() { return m_currentPage; }
private:
static void flushPage();
- static void savePage(uint8_t *buffer);
- static void loadPage(uint8_t *buffer);
+ static void savePage(uint8_t * const buffer);
+ static void loadPage(uint8_t * const buffer);
static void readPage();
- static uint16_t inData(uint8_t *data, uint16_t size);
- static uint16_t outData(uint8_t *data, uint16_t size);
+ static uint16_t inData(const uint8_t * const data, uint16_t size);
+ static uint16_t outData(uint8_t * const data, uint16_t size);
static uint8_t m_pageData[SPI_FLASH_PageSize];
static uint32_t m_currentPage;
diff --git a/Marlin/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp b/Marlin/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp
index a69c54bc..a214e7d1 100644
--- a/Marlin/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp
+++ b/Marlin/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp
@@ -90,7 +90,7 @@ static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) {
char *cur_name;
cur_name = strrchr(list_file.file_name[sel_id], '/');
- SdFile file, *curDir;
+ MediaFile file, *curDir;
card.abortFilePrintNow();
const char * const fname = card.diveToFile(false, curDir, cur_name);
if (!fname) return;
diff --git a/Marlin/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp b/Marlin/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp
index e0c663e2..a9a25db1 100644
--- a/Marlin/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp
+++ b/Marlin/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp
@@ -55,22 +55,22 @@ static void drawCross(uint16_t x, uint16_t y, uint16_t color) {
void lv_update_touch_calibration_screen() {
uint16_t x, y;
- calibrationState calibration_stage = touch_calibration.get_calibration_state();
- if (calibration_stage == CALIBRATION_NONE) {
+ calibrationState stage = touch_calibration.get_calibration_state();
+ if (stage == CALIBRATION_NONE) {
// start and clear screen
- calibration_stage = touch_calibration.calibration_start();
+ stage = touch_calibration.calibration_start();
}
else {
// clear last cross
- x = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].x;
- y = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].y;
+ x = touch_calibration.calibration_points[_MIN(stage - 1, CALIBRATION_BOTTOM_RIGHT)].x;
+ y = touch_calibration.calibration_points[_MIN(stage - 1, CALIBRATION_BOTTOM_RIGHT)].y;
drawCross(x, y, LV_COLOR_BACKGROUND.full);
}
const char *str = nullptr;
- if (calibration_stage < CALIBRATION_SUCCESS) {
+ if (stage < CALIBRATION_SUCCESS) {
// handle current state
- switch (calibration_stage) {
+ switch (stage) {
case CALIBRATION_TOP_LEFT: str = GET_TEXT(MSG_TOP_LEFT); break;
case CALIBRATION_BOTTOM_LEFT: str = GET_TEXT(MSG_BOTTOM_LEFT); break;
case CALIBRATION_TOP_RIGHT: str = GET_TEXT(MSG_TOP_RIGHT); break;
@@ -78,13 +78,13 @@ void lv_update_touch_calibration_screen() {
default: break;
}
- x = touch_calibration.calibration_points[calibration_stage].x;
- y = touch_calibration.calibration_points[calibration_stage].y;
+ x = touch_calibration.calibration_points[stage].x;
+ y = touch_calibration.calibration_points[stage].y;
drawCross(x, y, LV_COLOR_WHITE.full);
}
else {
// end calibration
- str = calibration_stage == CALIBRATION_SUCCESS ? GET_TEXT(MSG_CALIBRATION_COMPLETED) : GET_TEXT(MSG_CALIBRATION_FAILED);
+ str = stage == CALIBRATION_SUCCESS ? GET_TEXT(MSG_CALIBRATION_COMPLETED) : GET_TEXT(MSG_CALIBRATION_FAILED);
touch_calibration.calibration_end();
lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_TC_RETURN);
}
diff --git a/Marlin/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp b/Marlin/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp
index 6a8333fd..b510e3c0 100644
--- a/Marlin/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp
+++ b/Marlin/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp
@@ -647,8 +647,8 @@ char *creat_title_text() {
char *cur_name = strrchr(list_file.file_name[sel_id], '/');
- SdFile file;
- SdFile *curDir;
+ MediaFile file;
+ MediaFile *curDir;
const char * const fname = card.diveToFile(false, curDir, cur_name);
if (!fname) return;
if (file.open(curDir, fname, O_READ)) {
diff --git a/Marlin/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp b/Marlin/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp
index 00bb9833..0c6315d4 100644
--- a/Marlin/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp
+++ b/Marlin/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp
@@ -727,7 +727,7 @@ void disp_assets_update_progress(FSTR_P const fmsg) {
uint8_t mks_test_flag = 0;
const char *MKSTestPath = "MKS_TEST";
void mks_test_get() {
- SdFile dir, root = card.getroot();
+ MediaFile dir, root = card.getroot();
if (dir.open(&root, MKSTestPath, O_RDONLY))
mks_test_flag = 0x1E;
}
diff --git a/Marlin/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp b/Marlin/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp
index c6181279..d642d81f 100644
--- a/Marlin/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp
+++ b/Marlin/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp
@@ -403,8 +403,8 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) {
#define ASSET_TYPE_TITLE_LOGO 2
#define ASSET_TYPE_G_PREVIEW 3
#define ASSET_TYPE_FONT 4
- static void loadAsset(SdFile &dir, dir_t& entry, FSTR_P const fn, int8_t assetType) {
- SdFile file;
+ static void loadAsset(MediaFile &dir, dir_t& entry, FSTR_P const fn, int8_t assetType) {
+ MediaFile file;
char dosFilename[FILENAME_LENGTH];
createFilename(dosFilename, entry);
if (!file.open(&dir, dosFilename, O_READ)) {
@@ -488,7 +488,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) {
void UpdateAssets() {
if (!card.isMounted()) return;
- SdFile dir, root = card.getroot();
+ MediaFile dir, root = card.getroot();
if (dir.open(&root, assetsPath, O_RDONLY)) {
disp_assets_update();
diff --git a/Marlin/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp b/Marlin/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp
index b31977e7..9a899633 100644
--- a/Marlin/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp
+++ b/Marlin/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp
@@ -38,7 +38,7 @@
#include "../../../MarlinCore.h"
#include "../../../inc/MarlinConfig.h"
-#include HAL_PATH(../../../HAL, tft/xpt2046.h)
+#include HAL_PATH(../../.., tft/xpt2046.h)
#include "../../marlinui.h"
XPT2046 touch;
@@ -137,7 +137,10 @@ void tft_lvgl_init() {
uint16_t usb_flash_loop = 1000;
#if ENABLED(MULTI_VOLUME) && !HAS_SD_HOST_DRIVE
SET_INPUT_PULLUP(SD_DETECT_PIN);
- card.changeMedia(IS_SD_INSERTED() ? &card.media_driver_sdcard : &card.media_driver_usbFlash);
+ if (IS_SD_INSERTED())
+ card.changeMedia(&card.media_driver_sdcard);
+ else
+ card.changeMedia(&card.media_driver_usbFlash);
#endif
do {
card.media_driver_usbFlash.idle();
@@ -494,6 +497,7 @@ void lv_encoder_pin_init() {
}
#if 1 // HAS_ENCODER_ACTION
+
void lv_update_encoder() {
static uint32_t encoder_time1;
uint32_t tmpTime, diffTime = 0;
@@ -554,7 +558,7 @@ void lv_encoder_pin_init() {
#endif // HAS_ENCODER_WHEEL
- } // next_button_update_ms
+ } // encoder_time1
}
#endif // HAS_ENCODER_ACTION
diff --git a/Marlin/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp b/Marlin/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp
index 23a39aab..a8d30b44 100644
--- a/Marlin/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp
+++ b/Marlin/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp
@@ -736,7 +736,7 @@ int32_t lastFragment = 0;
char saveFilePath[50];
-static SdFile upload_file, *upload_curDir;
+static MediaFile upload_file, *upload_curDir;
static filepos_t pos;
int write_to_file(char *buf, int len) {
@@ -974,8 +974,8 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
if (!gcode_preview_over) {
char *cur_name = strrchr(list_file.file_name[sel_id], '/');
- SdFile file;
- SdFile *curDir;
+ MediaFile file;
+ MediaFile *curDir;
card.abortFilePrintNow();
const char * const fname = card.diveToFile(false, curDir, cur_name);
if (!fname) return;
@@ -1595,7 +1595,7 @@ static void file_fragment_msg_handle(uint8_t * msg, uint16_t msgLen) {
}
}
upload_file.close();
- SdFile file, *curDir;
+ MediaFile file, *curDir;
const char * const fname = card.diveToFile(false, curDir, saveFilePath);
if (file.open(curDir, fname, O_RDWR)) {
gCfgItems.curFilesize = file.fileSize();
@@ -1969,7 +1969,7 @@ void mks_wifi_firmware_update() {
if (wifi_upload(0) >= 0) {
card.removeFile((char *)ESP_FIRMWARE_FILE_RENAME);
- SdFile file, *curDir;
+ MediaFile file, *curDir;
const char * const fname = card.diveToFile(false, curDir, ESP_FIRMWARE_FILE);
if (file.open(curDir, fname, O_READ)) {
file.rename(curDir, (char *)ESP_FIRMWARE_FILE_RENAME);
diff --git a/Marlin/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp b/Marlin/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp
index c07cc47a..18a31130 100644
--- a/Marlin/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp
+++ b/Marlin/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp
@@ -86,7 +86,7 @@ static const uint32_t defaultTimeout = 500;
static const uint32_t eraseTimeout = 15000;
static const uint32_t blockWriteTimeout = 200;
static const uint32_t blockWriteInterval = 15; // 15ms is long enough, 10ms is mostly too short
-static SdFile update_file, *update_curDir;
+static MediaFile update_file, *update_curDir;
// Messages corresponding to result codes, should make sense when followed by " error"
const char *resultMessages[] = {
diff --git a/Marlin/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/Marlin/src/lcd/extui/ui_api.cpp
index 4422e811..576fc56b 100644
--- a/Marlin/Marlin/src/lcd/extui/ui_api.cpp
+++ b/Marlin/Marlin/src/lcd/extui/ui_api.cpp
@@ -843,11 +843,13 @@ namespace ExtUI {
#endif // BABYSTEPPING
float getZOffset_mm() {
- return (0.0f
+ return (
#if HAS_BED_PROBE
- + probe.offset.z
+ probe.offset.z
#elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
- + planner.mm_per_step[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)]
+ planner.mm_per_step[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)]
+ #else
+ 0.0f
#endif
);
}
diff --git a/Marlin/Marlin/src/lcd/language/language_an.h b/Marlin/Marlin/src/lcd/language/language_an.h
index 8e65f380..1d480127 100644
--- a/Marlin/Marlin/src/lcd/language/language_an.h
+++ b/Marlin/Marlin/src/lcd/language/language_an.h
@@ -103,7 +103,6 @@ namespace Language_an {
LSTR MSG_FLOW_N = _UxGT("Fluxo ~");
LSTR MSG_CONTROL = _UxGT("Control");
LSTR MSG_AUTOTEMP = _UxGT("Temperatura Auto.");
- LSTR MSG_SELECT = _UxGT("Trigar");
LSTR MSG_SELECT_E = _UxGT("Trigar *");
LSTR MSG_ACC = _UxGT("Aceleracion");
LSTR MSG_VTRAV_MIN = _UxGT("Vel. viache min");
diff --git a/Marlin/Marlin/src/lcd/language/language_ca.h b/Marlin/Marlin/src/lcd/language/language_ca.h
index d3a1c2ea..13b5d708 100644
--- a/Marlin/Marlin/src/lcd/language/language_ca.h
+++ b/Marlin/Marlin/src/lcd/language/language_ca.h
@@ -151,7 +151,7 @@ namespace Language_ca {
LSTR MSG_CHANGE_MEDIA = _UxGT("Canvia SD");
LSTR MSG_ZPROBE_OUT = _UxGT("Sonda Z fora");
LSTR MSG_BLTOUCH_RESET = _UxGT("Reinicia BLTouch");
- LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s primer");
+ LSTR MSG_HOME_FIRST = _UxGT("Home %s primer");
LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Decalatge Z");
LSTR MSG_BABYSTEP_X = _UxGT("Micropas X");
LSTR MSG_BABYSTEP_Y = _UxGT("Micropas Y");
diff --git a/Marlin/Marlin/src/lcd/language/language_cz.h b/Marlin/Marlin/src/lcd/language/language_cz.h
index 50d490a6..bb930eb7 100644
--- a/Marlin/Marlin/src/lcd/language/language_cz.h
+++ b/Marlin/Marlin/src/lcd/language/language_cz.h
@@ -264,7 +264,6 @@ namespace Language_cz {
LSTR MSG_LCD_OFF = _UxGT("Vyp");
LSTR MSG_PID_AUTOTUNE = _UxGT("PID automatika");
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID automatika *");
- LSTR MSG_SELECT = _UxGT("Vybrat");
LSTR MSG_SELECT_E = _UxGT("Vybrat *");
LSTR MSG_ACC = _UxGT("Zrychl");
LSTR MSG_JERK = _UxGT("Jerk");
@@ -396,7 +395,7 @@ namespace Language_cz {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("vysunout TouchMI");
LSTR MSG_MANUAL_DEPLOY = _UxGT("Vysunout Z-sondu");
LSTR MSG_MANUAL_STOW = _UxGT("Zasunout Z-sondu");
- LSTR MSG_HOME_FIRST = _UxGT("Domů %s%s%s prvnÃ");
+ LSTR MSG_HOME_FIRST = _UxGT("Domů %s prvnÃ");
LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z ofset");
LSTR MSG_BABYSTEP_X = _UxGT("Babystep X");
LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y");
diff --git a/Marlin/Marlin/src/lcd/language/language_da.h b/Marlin/Marlin/src/lcd/language/language_da.h
index 4078c413..56c53b84 100644
--- a/Marlin/Marlin/src/lcd/language/language_da.h
+++ b/Marlin/Marlin/src/lcd/language/language_da.h
@@ -98,7 +98,6 @@ namespace Language_da {
LSTR MSG_AUTOTEMP = _UxGT("Autotemp");
LSTR MSG_LCD_ON = _UxGT("Til");
LSTR MSG_LCD_OFF = _UxGT("Fra");
- LSTR MSG_SELECT = _UxGT("VÊlg");
LSTR MSG_SELECT_E = _UxGT("VÊlg *");
LSTR MSG_A_RETRACT = _UxGT("A-retract");
LSTR MSG_A_TRAVEL = _UxGT("A-rejse");
@@ -139,7 +138,7 @@ namespace Language_da {
LSTR MSG_CHANGE_MEDIA = _UxGT("Skift SD kort");
LSTR MSG_ZPROBE_OUT = _UxGT("Probe udenfor plade");
LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch Selv-Test");
- LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s fÞrst");
+ LSTR MSG_HOME_FIRST = _UxGT("Home %s fÞrst");
LSTR MSG_HEATING_FAILED_LCD = _UxGT("Opvarmning fejlet");
LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Fejl: reserve temp");
LSTR MSG_THERMAL_RUNAWAY = _UxGT("Temp lÞber lÞbsk");
diff --git a/Marlin/Marlin/src/lcd/language/language_de.h b/Marlin/Marlin/src/lcd/language/language_de.h
index c2af37fc..09b979b5 100644
--- a/Marlin/Marlin/src/lcd/language/language_de.h
+++ b/Marlin/Marlin/src/lcd/language/language_de.h
@@ -357,7 +357,6 @@ namespace Language_de {
LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Sensor res *");
LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("Ambient h *");
LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("Amb. h fan *");
- LSTR MSG_SELECT = _UxGT("AuswÀhlen");
LSTR MSG_SELECT_E = _UxGT("AuswÀhlen *");
LSTR MSG_ACC = _UxGT("Beschleunigung");
LSTR MSG_JERK = _UxGT("Jerk");
@@ -415,7 +414,7 @@ namespace Language_de {
LSTR MSG_RESTORE_DEFAULTS = _UxGT("Standardwerte laden");
LSTR MSG_INIT_EEPROM = _UxGT("Werkseinstellungen");
LSTR MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC Fehler");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Fehler");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("EEPROM GröÃe Fehler");
LSTR MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Fehler");
LSTR MSG_SETTINGS_STORED = _UxGT("Einstell. gespei.");
LSTR MSG_MEDIA_UPDATE = _UxGT("FW Update vom Medium");
@@ -540,7 +539,7 @@ namespace Language_de {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI ausfahren");
LSTR MSG_MANUAL_DEPLOY = _UxGT("Z-Sonde ausfahren");
LSTR MSG_MANUAL_STOW = _UxGT("Z-Sonde einfahren");
- LSTR MSG_HOME_FIRST = _UxGT("Vorher %s%s%s homen");
+ LSTR MSG_HOME_FIRST = _UxGT("Vorher %s homen");
LSTR MSG_ZPROBE_SETTINGS = _UxGT("Sondeneinstellungen");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Sondenversatz");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("Sondenversatz X");
diff --git a/Marlin/Marlin/src/lcd/language/language_en.h b/Marlin/Marlin/src/lcd/language/language_en.h
index fc8b1256..efb857d9 100644
--- a/Marlin/Marlin/src/lcd/language/language_en.h
+++ b/Marlin/Marlin/src/lcd/language/language_en.h
@@ -378,7 +378,6 @@ namespace Language_en {
LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Sensor res *");
LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("Ambient h *");
LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("Amb. h fan *");
- LSTR MSG_SELECT = _UxGT("Select");
LSTR MSG_SELECT_E = _UxGT("Select *");
LSTR MSG_ACC = _UxGT("Accel");
LSTR MSG_JERK = _UxGT("Jerk");
@@ -446,9 +445,10 @@ namespace Language_en {
LSTR MSG_LOAD_EEPROM = _UxGT("Load Settings");
LSTR MSG_RESTORE_DEFAULTS = _UxGT("Restore Defaults");
LSTR MSG_INIT_EEPROM = _UxGT("Initialize EEPROM");
- LSTR MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC Error");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Error");
- LSTR MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Error");
+ LSTR MSG_ERR_EEPROM_CRC = _UxGT("Err: EEPROM CRC");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("Err: EEPROM Size");
+ LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Err: EEPROM Version");
+ LSTR MSG_ERR_EEPROM_CORRUPT = _UxGT("Err: EEPROM Corrupt");
LSTR MSG_SETTINGS_STORED = _UxGT("Settings Stored");
LSTR MSG_MEDIA_UPDATE = MEDIA_TYPE_EN _UxGT(" Update");
LSTR MSG_RESET_PRINTER = _UxGT("Reset Printer");
@@ -553,11 +553,11 @@ namespace Language_en {
LSTR MSG_TOOL_MIGRATION_END = _UxGT("Last Extruder");
LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("Migrate to *");
LSTR MSG_FILAMENTCHANGE = _UxGT("Change Filament");
- LSTR MSG_FILAMENTCHANGE_E = _UxGT("Change Filament *");
+ LSTR MSG_FILAMENTCHANGE_E = _UxGT("Change * Filament");
LSTR MSG_FILAMENTLOAD = _UxGT("Load Filament");
- LSTR MSG_FILAMENTLOAD_E = _UxGT("Load *");
+ LSTR MSG_FILAMENTLOAD_E = _UxGT("Load * Filament");
LSTR MSG_FILAMENTUNLOAD = _UxGT("Unload Filament");
- LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Unload *");
+ LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Unload * Filament");
LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Unload All");
#if ENABLED(MULTI_VOLUME)
LSTR MSG_ATTACH_MEDIA = _UxGT("Attach SD Card");
@@ -590,7 +590,7 @@ namespace Language_en {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Deploy TouchMI");
LSTR MSG_MANUAL_DEPLOY = _UxGT("Deploy Z-Probe");
LSTR MSG_MANUAL_STOW = _UxGT("Stow Z-Probe");
- LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s First");
+ LSTR MSG_HOME_FIRST = _UxGT("Home %s First");
LSTR MSG_ZPROBE_SETTINGS = _UxGT("Probe Settings");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Probe Offsets");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("Probe X Offset");
@@ -630,6 +630,7 @@ namespace Language_en {
LSTR MSG_CHAMBER_COOLING = _UxGT("Chamber Cooling...");
LSTR MSG_LASER_COOLING = _UxGT("Laser Cooling...");
LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Calibration");
+ LSTR MSG_DELTA_CALIBRATION_IN_PROGRESS = _UxGT("Delta Calibration in progress");
LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibrate X");
LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrate Y");
LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrate Z");
@@ -740,7 +741,8 @@ namespace Language_en {
LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filament ~");
LSTR MSG_MMU2_RESET = _UxGT("Reset MMU");
LSTR MSG_MMU2_RESETTING = _UxGT("MMU Resetting...");
- LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Remove, click");
+ LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("MMU2 Eject Recover");
+ LSTR MSG_MMU2_REMOVE_AND_CLICK = _UxGT("Remove and click...");
LSTR MSG_MIX = _UxGT("Mix");
LSTR MSG_MIX_COMPONENT_N = _UxGT("Component =");
@@ -861,11 +863,12 @@ namespace Language_en {
LSTR MSG_HOST_SHUTDOWN = _UxGT("Host Shutdown");
- // These strings can be the same in all languages
- LSTR MSG_MARLIN = _UxGT("Marlin");
LSTR MSG_SHORT_DAY = _UxGT("d"); // One character only
LSTR MSG_SHORT_HOUR = _UxGT("h"); // One character only
LSTR MSG_SHORT_MINUTE = _UxGT("m"); // One character only
+
+ // These strings can be the same in all languages
+ LSTR MSG_MARLIN = _UxGT("Marlin");
LSTR MSG_PID_P = _UxGT("PID-P");
LSTR MSG_PID_P_E = _UxGT("PID-P *");
LSTR MSG_PID_I = _UxGT("PID-I");
@@ -878,11 +881,3 @@ namespace Language_en {
LSTR MSG_PID_F_E = _UxGT("PID-F *");
LSTR MSG_BACKLASH_N = _UxGT("@");
}
-
-#if FAN_COUNT == 1
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED
-#else
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N
-#endif
diff --git a/Marlin/Marlin/src/lcd/language/language_es.h b/Marlin/Marlin/src/lcd/language/language_es.h
index 5422a811..eb39a8a0 100644
--- a/Marlin/Marlin/src/lcd/language/language_es.h
+++ b/Marlin/Marlin/src/lcd/language/language_es.h
@@ -265,7 +265,6 @@ namespace Language_es {
LSTR MSG_LCD_OFF = _UxGT("Apg");
LSTR MSG_PID_AUTOTUNE = _UxGT("PID Auto-ajuste");
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Auto-ajuste *");
- LSTR MSG_SELECT = _UxGT("Seleccionar");
LSTR MSG_SELECT_E = _UxGT("Seleccionar *");
LSTR MSG_ACC = _UxGT("Aceleración");
LSTR MSG_JERK = _UxGT("Jerk");
@@ -316,7 +315,7 @@ namespace Language_es {
LSTR MSG_RESTORE_DEFAULTS = _UxGT("Rest. fábrica");
LSTR MSG_INIT_EEPROM = _UxGT("Inicializar EEPROM");
LSTR MSG_ERR_EEPROM_CRC = _UxGT("Err: EEPROM CRC");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Err: Ãndice EEPROM");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("Err: EEPROM Tamaño");
LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Err: Versión EEPROM");
LSTR MSG_MEDIA_UPDATE = _UxGT("Actualizar SD/FD");
LSTR MSG_RESET_PRINTER = _UxGT("Resetear Impresora");
@@ -399,7 +398,7 @@ namespace Language_es {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Subir TouchMI");
LSTR MSG_MANUAL_DEPLOY = _UxGT("Subir Sonda Z");
LSTR MSG_MANUAL_STOW = _UxGT("Bajar Sonda Z");
- LSTR MSG_HOME_FIRST = _UxGT("Origen %s%s%s Prim.");
+ LSTR MSG_HOME_FIRST = _UxGT("Origen %s Prim.");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Desf. Sonda");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("Desf. Sonda X");
LSTR MSG_ZPROBE_YOFFSET = _UxGT("Desf. Sonda Y");
diff --git a/Marlin/Marlin/src/lcd/language/language_eu.h b/Marlin/Marlin/src/lcd/language/language_eu.h
index 77c8dbe2..0c29cdd2 100644
--- a/Marlin/Marlin/src/lcd/language/language_eu.h
+++ b/Marlin/Marlin/src/lcd/language/language_eu.h
@@ -161,7 +161,6 @@ namespace Language_eu {
LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max");
LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fakt");
LSTR MSG_AUTOTEMP = _UxGT("Auto tenperatura");
- LSTR MSG_SELECT = _UxGT("Aukeratu");
LSTR MSG_SELECT_E = _UxGT("Aukeratu *");
LSTR MSG_ACC = _UxGT("Azelerazioa");
LSTR MSG_JERK = _UxGT("Astindua");
@@ -236,7 +235,7 @@ namespace Language_eu {
LSTR MSG_BLTOUCH_RESET = _UxGT("BLTouch berrabia.");
LSTR MSG_BLTOUCH_DEPLOY = _UxGT("BLTouch jaitsi/luzatu");
LSTR MSG_BLTOUCH_STOW = _UxGT("BLTouch igo/jaso");
- LSTR MSG_HOME_FIRST = _UxGT("Etxera %s%s%s lehenengo");
+ LSTR MSG_HOME_FIRST = _UxGT("Etxera %s lehenengo");
LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Konpentsatu");
LSTR MSG_BABYSTEP_X = _UxGT("Mikro-urratsa X");
LSTR MSG_BABYSTEP_Y = _UxGT("Mikro-urratsa Y");
diff --git a/Marlin/Marlin/src/lcd/language/language_fr.h b/Marlin/Marlin/src/lcd/language/language_fr.h
index bd4796a6..04793d6d 100644
--- a/Marlin/Marlin/src/lcd/language/language_fr.h
+++ b/Marlin/Marlin/src/lcd/language/language_fr.h
@@ -272,7 +272,6 @@ namespace Language_fr {
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Echec Autotune! E incorrect");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Echec Autotune! Temp. trop haute");
LSTR MSG_PID_TIMEOUT = _UxGT("Echec Autotune! Opér. expirée");
- LSTR MSG_SELECT = _UxGT("Sélectionner");
LSTR MSG_SELECT_E = _UxGT("Sélectionner *");
LSTR MSG_ACC = _UxGT("Accélération");
LSTR MSG_JERK = _UxGT("Jerk");
@@ -368,7 +367,7 @@ namespace Language_fr {
LSTR MSG_STOPPED = _UxGT("STOPPÃ");
LSTR MSG_CONTROL_RETRACT = _UxGT("Rétractation mm");
LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Ech. rétr. mm");
- LSTR MSG_CONTROL_RETRACTF = _UxGT("Vit. rétract°");
+ LSTR MSG_CONTROL_RETRACTF = _UxGT("Vit. rétract") LCD_STR_DEGREE;
LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Saut Z mm");
LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Rét.reprise mm");
LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Ech.reprise mm");
@@ -379,7 +378,7 @@ namespace Language_fr {
LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Augmenter Z");
LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Vitesse primaire");
LSTR MSG_SINGLENOZZLE_WIPE_RETRACT = _UxGT("Purge Retract");
- LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Vitesse rétract°");
+ LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Vitesse rétract") LCD_STR_DEGREE;
LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Garer Extrudeur");
LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Vitesse reprise");
LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Vit. ventil.");
@@ -425,7 +424,7 @@ namespace Language_fr {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Déployer TouchMI");
LSTR MSG_MANUAL_DEPLOY = _UxGT("Déployer Sonde Z");
LSTR MSG_MANUAL_STOW = _UxGT("Ranger Sonde Z");
- LSTR MSG_HOME_FIRST = _UxGT("Origine %s%s%s Premier");
+ LSTR MSG_HOME_FIRST = _UxGT("Origine %s Premier");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Position sonde Z");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("Décalage X");
LSTR MSG_ZPROBE_YOFFSET = _UxGT("Décalage Y");
@@ -444,9 +443,6 @@ namespace Language_fr {
LSTR MSG_HALTED = _UxGT("IMPR. STOPPÃE");
LSTR MSG_PLEASE_RESET = _UxGT("Redémarrer SVP");
- LSTR MSG_SHORT_DAY = _UxGT("j"); // One character only
- LSTR MSG_SHORT_HOUR = _UxGT("h"); // One character only
- LSTR MSG_SHORT_MINUTE = _UxGT("m"); // One character only
LSTR MSG_HEATING = _UxGT("en chauffe...");
LSTR MSG_COOLING = _UxGT("Refroidissement");
@@ -636,4 +632,8 @@ namespace Language_fr {
#endif
LSTR MSG_SD_CARD = _UxGT("Carte SD");
LSTR MSG_USB_DISK = _UxGT("Clé USB");
+
+ LSTR MSG_SHORT_DAY = _UxGT("j"); // One character only
+ LSTR MSG_SHORT_HOUR = _UxGT("h"); // One character only
+ LSTR MSG_SHORT_MINUTE = _UxGT("m"); // One character only
}
diff --git a/Marlin/Marlin/src/lcd/language/language_gl.h b/Marlin/Marlin/src/lcd/language/language_gl.h
index 005c6cc5..54ae62ba 100644
--- a/Marlin/Marlin/src/lcd/language/language_gl.h
+++ b/Marlin/Marlin/src/lcd/language/language_gl.h
@@ -266,7 +266,6 @@ namespace Language_gl {
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Auto-Sint. fallida! Extrusor danado.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Auto-Sint. fallida! Temperatura moi alta.");
LSTR MSG_PID_TIMEOUT = _UxGT("Auto-Sint. fallida! Tempo excedido.");
- LSTR MSG_SELECT = _UxGT("Escolla");
LSTR MSG_SELECT_E = _UxGT("Escolla *");
LSTR MSG_ACC = _UxGT("Acel");
LSTR MSG_JERK = _UxGT("Jerk");
@@ -318,7 +317,7 @@ namespace Language_gl {
LSTR MSG_RESTORE_DEFAULTS = _UxGT("Rest. Defecto");
LSTR MSG_INIT_EEPROM = _UxGT("Inicializar EEPROM");
LSTR MSG_ERR_EEPROM_CRC = _UxGT("Erro: CRC EEPROM");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Erro: Ãndice EEPROM");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("Erro: Tamaño EEPROM");
LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Erro: Versión EEPROM");
LSTR MSG_SETTINGS_STORED = _UxGT("Config Gardada");
LSTR MSG_MEDIA_UPDATE = _UxGT("Actualizar SD/FD");
@@ -414,7 +413,7 @@ namespace Language_gl {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Estender TouchMI");
LSTR MSG_MANUAL_DEPLOY = _UxGT("Estender Sonda Z");
LSTR MSG_MANUAL_STOW = _UxGT("Recoller Sonda Z");
- LSTR MSG_HOME_FIRST = _UxGT("Orixe %s%s%s Primeiro");
+ LSTR MSG_HOME_FIRST = _UxGT("Orixe %s Primeiro");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Desfases Sonda");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("Desfase Sonda X");
LSTR MSG_ZPROBE_YOFFSET = _UxGT("Desfase Sonda Y");
diff --git a/Marlin/Marlin/src/lcd/language/language_hr.h b/Marlin/Marlin/src/lcd/language/language_hr.h
index 7ca0f540..36eaf78a 100644
--- a/Marlin/Marlin/src/lcd/language/language_hr.h
+++ b/Marlin/Marlin/src/lcd/language/language_hr.h
@@ -95,7 +95,6 @@ namespace Language_hr {
LSTR MSG_BED = _UxGT("Bed");
LSTR MSG_FAN_SPEED = _UxGT("Brzina ventilatora");
LSTR MSG_FAN_SPEED_N = _UxGT("Brzina ventilatora ~");
- LSTR MSG_SELECT = _UxGT("Odaberi");
LSTR MSG_SELECT_E = _UxGT("Odaberi *");
LSTR MSG_TEMPERATURE = _UxGT("Temperature");
LSTR MSG_MOTION = _UxGT("Gibanje");
diff --git a/Marlin/Marlin/src/lcd/language/language_hu.h b/Marlin/Marlin/src/lcd/language/language_hu.h
index c3066b89..a990be47 100644
--- a/Marlin/Marlin/src/lcd/language/language_hu.h
+++ b/Marlin/Marlin/src/lcd/language/language_hu.h
@@ -309,7 +309,6 @@ namespace Language_hu {
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Hangolási hiba! Rossz adagoló.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Hangolási hiba! Magas hömérséklet.");
LSTR MSG_PID_TIMEOUT = _UxGT("Hangolási hiba! Idötúllépés.");
- LSTR MSG_SELECT = _UxGT("Kiválaszt");
LSTR MSG_SELECT_E = _UxGT("Kiválaszt *");
LSTR MSG_ACC = _UxGT("GyorsÃtás");
LSTR MSG_JERK = _UxGT("Rántás");
@@ -364,7 +363,7 @@ namespace Language_hu {
LSTR MSG_RESTORE_DEFAULTS = _UxGT("Alapértelmezett");
LSTR MSG_INIT_EEPROM = _UxGT("EEPROM inicializálás");
LSTR MSG_ERR_EEPROM_CRC = _UxGT("Hiba: EEPROM CRC");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Hiba: EEPROM index");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("Hiba: EEPROM mérete");
LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Hiba: EEPROM verzió");
LSTR MSG_SETTINGS_STORED = _UxGT("BeállÃtások mentve");
LSTR MSG_MEDIA_UPDATE = _UxGT("Tároló frissÃtés");
@@ -468,7 +467,7 @@ namespace Language_hu {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI használ");
LSTR MSG_MANUAL_DEPLOY = _UxGT("Z-Szonda telepÃtés");
LSTR MSG_MANUAL_STOW = _UxGT("Z-Szonda elhelyezés");
- LSTR MSG_HOME_FIRST = _UxGT("Elöször %s%s%s kell");
+ LSTR MSG_HOME_FIRST = _UxGT("Elöször %s kell");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Szonda eltolások");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("X szonda eltolás");
LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y szonda eltolás");
@@ -491,9 +490,6 @@ namespace Language_hu {
LSTR MSG_ERR_MINTEMP = _UxGT("Hiba: MIN höfok");
LSTR MSG_HALTED = _UxGT("A NYOMTATÃ LEÃLLT");
LSTR MSG_PLEASE_RESET = _UxGT("IndÃtsd újra!");
- LSTR MSG_SHORT_DAY = _UxGT("n"); // Csak egy karakter
- LSTR MSG_SHORT_HOUR = _UxGT("ó"); // Csak egy karakter
- LSTR MSG_SHORT_MINUTE = _UxGT("p"); // Csak egy karakter
LSTR MSG_HEATING = _UxGT("FÌtés...");
LSTR MSG_COOLING = _UxGT("HÌtés...");
LSTR MSG_BED_HEATING = _UxGT("Ãgy fÃŒtés...");
@@ -701,12 +697,8 @@ namespace Language_hu {
#endif
LSTR MSG_SD_CARD = _UxGT("SD Kártya");
LSTR MSG_USB_DISK = _UxGT("USB Lemez");
-}
-#if FAN_COUNT == 1
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED
-#else
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N
-#endif
+ LSTR MSG_SHORT_DAY = _UxGT("n"); // Csak egy karakter
+ LSTR MSG_SHORT_HOUR = _UxGT("ó"); // Csak egy karakter
+ LSTR MSG_SHORT_MINUTE = _UxGT("p"); // Csak egy karakter
+}
diff --git a/Marlin/Marlin/src/lcd/language/language_it.h b/Marlin/Marlin/src/lcd/language/language_it.h
index d694f9bd..f218488c 100644
--- a/Marlin/Marlin/src/lcd/language/language_it.h
+++ b/Marlin/Marlin/src/lcd/language/language_it.h
@@ -77,6 +77,7 @@ namespace Language_it {
LSTR MSG_AUTO_HOME_X = _UxGT("Home X");
LSTR MSG_AUTO_HOME_Y = _UxGT("Home Y");
LSTR MSG_AUTO_HOME_Z = _UxGT("Home Z");
+ LSTR MSG_Z_AFTER_HOME = _UxGT("Z dopo homing");
LSTR MSG_FILAMENT_SET = _UxGT("Impostaz.filamento");
LSTR MSG_FILAMENT_MAN = _UxGT("Gestione filamento");
LSTR MSG_MANUAL_LEVELING = _UxGT("Livel.manuale");
@@ -101,6 +102,7 @@ namespace Language_it {
LSTR MSG_HOME_OFFSET_Y = _UxGT("Offset home Y");
LSTR MSG_HOME_OFFSET_Z = _UxGT("Offset home Z");
LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Offset applicato");
+ LSTR MSG_ERR_M428_TOO_FAR = _UxGT("Err: Troppo lontano!");
LSTR MSG_TRAMMING_WIZARD = _UxGT("Wizard Tramming");
LSTR MSG_SELECT_ORIGIN = _UxGT("Selez. origine");
LSTR MSG_LAST_VALUE_SP = _UxGT("Ultimo valore ");
@@ -128,6 +130,7 @@ namespace Language_it {
LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Preris.$ Piatto");
LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Preris.$ conf");
#endif
+ LSTR MSG_PREHEAT_HOTEND = _UxGT("Prerisc.Hotend");
LSTR MSG_PREHEAT_CUSTOM = _UxGT("Prerisc.personal.");
LSTR MSG_COOLDOWN = _UxGT("Raffredda");
@@ -263,6 +266,7 @@ namespace Language_it {
LSTR MSG_UBL_INVALID_SLOT = _UxGT("Prima selez. uno slot Mesh");
LSTR MSG_MESH_LOADED = _UxGT("Mesh %i caricata");
LSTR MSG_MESH_SAVED = _UxGT("Mesh %i salvata");
+ LSTR MSG_MESH_ACTIVE = _UxGT("Mesh %i attiva");
LSTR MSG_UBL_NO_STORAGE = _UxGT("Nessuna memoria");
LSTR MSG_UBL_SAVE_ERROR = _UxGT("Err: Salvataggio UBL");
LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Err: Ripristino UBL");
@@ -320,6 +324,7 @@ namespace Language_it {
LSTR MSG_MOVE_01IN = _UxGT("Muovi di 0.1\"");
LSTR MSG_MOVE_05IN = _UxGT("Muovi di 0.5\"");
LSTR MSG_MOVE_1IN = _UxGT("Muovi di 1\"");
+ LSTR MSG_LIVE_MOVE = _UxGT("Modalità Live");
LSTR MSG_SPEED = _UxGT("Velocità ");
LSTR MSG_BED_Z = _UxGT("Piatto Z");
LSTR MSG_NOZZLE = _UxGT("Ugello");
@@ -331,6 +336,7 @@ namespace Language_it {
LSTR MSG_COOLER = _UxGT("Raffreddam. laser");
LSTR MSG_COOLER_TOGGLE = _UxGT("Alterna raffreddam.");
LSTR MSG_FLOWMETER_SAFETY = _UxGT("Sicurezza flusso");
+ LSTR MSG_CUTTER = _UxGT("Taglio");
LSTR MSG_LASER = _UxGT("Laser");
LSTR MSG_FAN_SPEED = _UxGT("Vel. ventola"); // Max 15 characters
LSTR MSG_FAN_SPEED_N = _UxGT("Vel. ventola ~"); // Max 15 characters
@@ -362,15 +368,21 @@ namespace Language_it {
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Calibrazione fallita! Estrusore errato.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Calibrazione fallita! Temperatura troppo alta.");
LSTR MSG_PID_TIMEOUT = _UxGT("Calibrazione fallita! Tempo scaduto.");
- LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Testing heat loss");
- LSTR MSG_MPC_AUTOTUNE = _UxGT("MPC Autotune");
+ LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Verif.perdita calore");
+ LSTR MSG_MPC_HEATING_PAST_200 = _UxGT("Riscalda a >200C");
+ LSTR MSG_MPC_COOLING_TO_AMBIENT = _UxGT("Raffredda a amb.");
+ LSTR MSG_MPC_AUTOTUNE = _UxGT("Calibra MPC");
LSTR MSG_MPC_EDIT = _UxGT("Modif.MPC *");
+ LSTR MSG_MPC_POWER = _UxGT("Potenza riscald.");
LSTR MSG_MPC_POWER_E = _UxGT("Potenza *");
- LSTR MSG_MPC_BLOCK_HEAT_CAPACITY_E = _UxGT("C blocco *");
+ LSTR MSG_MPC_BLOCK_HEAT_CAPACITY = _UxGT("Capacità riscald.");
+ LSTR MSG_MPC_BLOCK_HEAT_CAPACITY_E = _UxGT("Capac.riscald. *");
+ LSTR MSG_SENSOR_RESPONSIVENESS = _UxGT("Reattiv.Sens.");
LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Reattiv.Sens. *");
- LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("H ambiente *");
- LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("H Amb. vent. *");
- LSTR MSG_SELECT = _UxGT("Seleziona");
+ LSTR MSG_MPC_AMBIENT_XFER_COEFF = _UxGT("Coeff.ambiente");
+ LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("Coeff.amb. *");
+ LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN = _UxGT("Coeff.ventola");
+ LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("Coeff.ventola *");
LSTR MSG_SELECT_E = _UxGT("Seleziona *");
LSTR MSG_ACC = _UxGT("Accel");
LSTR MSG_JERK = _UxGT("Jerk");
@@ -399,10 +411,10 @@ namespace Language_it {
LSTR MSG_A_RETRACT = _UxGT("A-Ritrazione");
LSTR MSG_A_TRAVEL = _UxGT("A-Spostamento");
LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping");
- LSTR MSG_SHAPING_X_FREQ = _UxGT("Frequenza ") STR_X;
- LSTR MSG_SHAPING_Y_FREQ = _UxGT("Frequenza ") STR_Y;
- LSTR MSG_SHAPING_X_ZETA = _UxGT("Smorzamento ") STR_X;
- LSTR MSG_SHAPING_Y_ZETA = _UxGT("Smorzamento ") STR_Y;
+ LSTR MSG_SHAPING_ENABLE = _UxGT("Abilita shaping @");
+ LSTR MSG_SHAPING_DISABLE = _UxGT("Disabil. shaping @");
+ LSTR MSG_SHAPING_FREQ = _UxGT("Frequenza @");
+ LSTR MSG_SHAPING_ZETA = _UxGT("Smorzamento @");
LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Frequenza max");
LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Feed min");
LSTR MSG_STEPS_PER_MM = _UxGT("Passi/mm");
@@ -439,7 +451,7 @@ namespace Language_it {
LSTR MSG_RESTORE_DEFAULTS = _UxGT("Ripristina imp.");
LSTR MSG_INIT_EEPROM = _UxGT("Inizializza EEPROM");
LSTR MSG_ERR_EEPROM_CRC = _UxGT("Err: CRC EEPROM");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Err: Indice EEPROM");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("Err: Taglia EEPROM");
LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Err: Versione EEPROM");
LSTR MSG_SETTINGS_STORED = _UxGT("Impostazioni mem.");
LSTR MSG_MEDIA_UPDATE = _UxGT("Aggiorna media");
@@ -523,6 +535,7 @@ namespace Language_it {
LSTR MSG_SINGLENOZZLE_WIPE_RETRACT = _UxGT("Ritrazione pulizia");
LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Velocità ritrazione");
LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Parcheggia testa");
+ LSTR MSG_PARK_FAILED = _UxGT("Parcheggio fallito");
LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Veloc. di recupero");
LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Velocità ventola");
LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Tempo ventola");
@@ -540,6 +553,7 @@ namespace Language_it {
LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Rimuovi filam. *");
LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Rimuovi tutto");
LSTR MSG_ATTACH_MEDIA = _UxGT("Collega media");
+ LSTR MSG_ATTACH_USB_MEDIA = _UxGT("Collega penna USB");
LSTR MSG_CHANGE_MEDIA = _UxGT("Cambia media");
LSTR MSG_RELEASE_MEDIA = _UxGT("Rilascia media");
LSTR MSG_ZPROBE_OUT = _UxGT("Z probe fuori piatto");
@@ -563,9 +577,11 @@ namespace Language_it {
LSTR MSG_TOUCHMI_SAVE = _UxGT("Memorizzare");
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Estendi TouchMI");
LSTR MSG_MANUAL_DEPLOY = _UxGT("Estendi Sonda-Z");
+ LSTR MSG_MANUAL_PENUP = _UxGT("Penna su");
+ LSTR MSG_MANUAL_PENDOWN = _UxGT("Penna giù");
LSTR MSG_BLTOUCH_STOW = _UxGT("Ritrai BLTouch");
LSTR MSG_MANUAL_STOW = _UxGT("Ritrai Sonda-Z");
- LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s prima");
+ LSTR MSG_HOME_FIRST = _UxGT("Home %s prima");
LSTR MSG_ZPROBE_SETTINGS = _UxGT("Impostazioni sonda");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Offsets sonda");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("Offset X sonda");
@@ -594,9 +610,9 @@ namespace Language_it {
LSTR MSG_HALTED = _UxGT("STAMPANTE FERMATA");
LSTR MSG_PLEASE_WAIT = _UxGT("Attendere prego...");
LSTR MSG_PLEASE_RESET = _UxGT("Riavviare prego");
- LSTR MSG_PREHEATING = _UxGT("Preriscaldam...");
+ LSTR MSG_PREHEATING = _UxGT("Preriscaldamento...");
LSTR MSG_HEATING = _UxGT("Riscaldamento...");
- LSTR MSG_COOLING = _UxGT("Raffreddamento..");
+ LSTR MSG_COOLING = _UxGT("Raffreddamento...");
LSTR MSG_BED_HEATING = _UxGT("Risc. piatto...");
LSTR MSG_BED_COOLING = _UxGT("Raffr. piatto...");
LSTR MSG_PROBE_HEATING = _UxGT("Risc. sonda...");
@@ -623,6 +639,7 @@ namespace Language_it {
LSTR MSG_MESH_LEVELING = _UxGT("Livel. Mesh");
LSTR MSG_MESH_DONE = _UxGT("Sond.mesh eseguito");
LSTR MSG_INFO_STATS_MENU = _UxGT("Statistiche");
+ LSTR MSG_RESET_STATS = _UxGT("Reset stat.stampa?");
LSTR MSG_INFO_BOARD_MENU = _UxGT("Info. scheda");
LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistori");
LSTR MSG_INFO_EXTRUDERS = _UxGT("Estrusori");
@@ -836,4 +853,28 @@ namespace Language_it {
LSTR MSG_USB_DISK = _UxGT("Disco USB");
LSTR MSG_HOST_SHUTDOWN = _UxGT("Arresta host");
+
+// DGUS-Specific message strings, not used elsewhere
+ LSTR DGUS_MSG_NOT_WHILE_PRINTING = _UxGT("Non ammesso durante la stampa");
+ LSTR DGUS_MSG_NOT_WHILE_IDLE = _UxGT("Non ammesso mentre Ú in riposo");
+ LSTR DGUS_MSG_NO_FILE_SELECTED = _UxGT("Nessun file selezionato");
+ LSTR DGUS_MSG_TEMP_TOO_LOW = _UxGT("Temperatura troppo bassa");
+ LSTR DGUS_MSG_EXECUTING_COMMAND = _UxGT("Esecuzione del comando...");
+ LSTR DGUS_MSG_BED_PID_DISABLED = _UxGT("PID letto disabilitato");
+ LSTR DGUS_MSG_PID_DISABLED = _UxGT("PID disabilitato");
+ LSTR DGUS_MSG_PID_AUTOTUNING = _UxGT("Calibrazione PID...");
+ LSTR DGUS_MSG_INVALID_RECOVERY_DATA = _UxGT("Dati di recupero non validi");
+
+ LSTR DGUS_MSG_HOMING_REQUIRED = _UxGT("Azzeramento richiesto");
+ LSTR DGUS_MSG_BUSY = _UxGT("Occupato");
+ LSTR DGUS_MSG_HOMING = _UxGT("Azzeramento...");
+ LSTR DGUS_MSG_FW_OUTDATED = _UxGT("Richiesto aggiornamento DWIN GUI/OS");
+ LSTR DGUS_MSG_ABL_REQUIRED = _UxGT("Richiesto autolivellamento letto");
+ LSTR DGUS_MSG_PROBING_FAILED = _UxGT("Sondaggio fallito");
+ LSTR DGUS_MSG_PROBING_SUCCESS = _UxGT("Sondaggio effettuato");
+ LSTR DGUS_MSG_RESET_EEPROM = _UxGT("Reset EEPROM");
+ LSTR DGUS_MSG_WRITE_EEPROM_FAILED = _UxGT("Scrittura EEPROM fallita");
+ LSTR DGUS_MSG_READ_EEPROM_FAILED = _UxGT("Lettura EEPROM fallita");
+ LSTR DGUS_MSG_FILAMENT_RUNOUT = _UxGT("Filament runout E%d");
+
}
diff --git a/Marlin/Marlin/src/lcd/language/language_jp_kana.h b/Marlin/Marlin/src/lcd/language/language_jp_kana.h
index 2f75b887..335d4533 100644
--- a/Marlin/Marlin/src/lcd/language/language_jp_kana.h
+++ b/Marlin/Marlin/src/lcd/language/language_jp_kana.h
@@ -114,7 +114,6 @@ namespace Language_jp_kana {
LSTR MSG_AUTOTEMP = _UxGT("ãžããŠãªã³ãã»ã€ã®ã§"); // "Autotemp"
LSTR MSG_LCD_ON = _UxGT("ãªã³"); // "On"
LSTR MSG_LCD_OFF = _UxGT("ãªã"); // "Off"
- LSTR MSG_SELECT = _UxGT("ã»ã³ã¿ã¯"); // "Select"
LSTR MSG_SELECT_E = _UxGT("ã»ã³ã¿ã¯ *");
LSTR MSG_ACC = _UxGT("ã«ãœã¯ã mm/s") SUPERSCRIPT_TWO; // "Accel"
LSTR MSG_JERK = _UxGT("ã€ã¯ã㊠mm/s"); // "Jerk"
@@ -176,7 +175,7 @@ namespace Language_jp_kana {
LSTR MSG_ZPROBE_OUT = _UxGT("ZãããŒã ãããã¬ã€"); // "Z probe out. bed"
LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch ãžã³ã·ã³ãã³"); // "BLTouch Self-Test"
LSTR MSG_BLTOUCH_RESET = _UxGT("BLTouch ãªã»ãã"); // "Reset BLTouch"
- LSTR MSG_HOME_FIRST = _UxGT("ãµãã %s%s%s ã²ããããµã»ãã¯ããµã€"); // "Home ... first"
+ LSTR MSG_HOME_FIRST = _UxGT("ãµãã %s ã²ããããµã»ãã¯ããµã€"); // "Home ... first"
LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Zãªãã»ãã"); // "Z Offset"
LSTR MSG_BABYSTEP_X = _UxGT("Xãžã¯ ãããŠ"); // "Babystep X"
LSTR MSG_BABYSTEP_Y = _UxGT("Yãžã¯ ãããŠ"); // "Babystep Y"
diff --git a/Marlin/Marlin/src/lcd/language/language_nl.h b/Marlin/Marlin/src/lcd/language/language_nl.h
index 8aa74d7e..9ad16bcd 100644
--- a/Marlin/Marlin/src/lcd/language/language_nl.h
+++ b/Marlin/Marlin/src/lcd/language/language_nl.h
@@ -108,7 +108,6 @@ namespace Language_nl {
LSTR MSG_AUTOTEMP = _UxGT("Autotemp");
LSTR MSG_LCD_ON = _UxGT("Aan");
LSTR MSG_LCD_OFF = _UxGT("Uit");
- LSTR MSG_SELECT = _UxGT("Selecteer");
LSTR MSG_SELECT_E = _UxGT("Selecteer *");
LSTR MSG_ACC = _UxGT("Versn");
LSTR MSG_TEMPERATURE = _UxGT("Temperatuur");
@@ -153,7 +152,7 @@ namespace Language_nl {
LSTR MSG_ZPROBE_OUT = _UxGT("Z probe uit. bed");
LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch Zelf-Test");
LSTR MSG_BLTOUCH_RESET = _UxGT("Reset BLTouch");
- LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s Eerst");
+ LSTR MSG_HOME_FIRST = _UxGT("Home %s Eerst");
LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Offset"); // accepted English term in Dutch
LSTR MSG_BABYSTEP_X = _UxGT("Babystap X");
LSTR MSG_BABYSTEP_Y = _UxGT("Babystap Y");
diff --git a/Marlin/Marlin/src/lcd/language/language_pl.h b/Marlin/Marlin/src/lcd/language/language_pl.h
index 635866ba..9273eb10 100644
--- a/Marlin/Marlin/src/lcd/language/language_pl.h
+++ b/Marlin/Marlin/src/lcd/language/language_pl.h
@@ -269,7 +269,6 @@ namespace Language_pl {
LSTR MSG_PID_AUTOTUNE = _UxGT("PID Autostrojenie");
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autostrojenie *");
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Strojenie PID zakoÅczone");
- LSTR MSG_SELECT = _UxGT("Wybierz");
LSTR MSG_SELECT_E = _UxGT("Wybierz *");
LSTR MSG_ACC = _UxGT("Przyspieszenie");
LSTR MSG_JERK = _UxGT("Zryw");
@@ -373,7 +372,7 @@ namespace Language_pl {
LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch Self-Test");
LSTR MSG_BLTOUCH_RESET = _UxGT("Reset BLTouch");
LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("UWAGA: ZÅe ustawienia mogÄ
uszkodziÄ drukarkÄ. KontynuowaÄ?");
- LSTR MSG_HOME_FIRST = _UxGT("Najpierw Home %s%s%s");
+ LSTR MSG_HOME_FIRST = _UxGT("Najpierw Home %s");
LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Offset Z");
LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("PrzesuÅ dyszÄ do stoÅu");
LSTR MSG_BABYSTEP_TOTAL = _UxGT("ÅÄ
cznie");
@@ -539,11 +538,3 @@ namespace Language_pl {
LSTR MSG_CALIBRATION_FAILED = _UxGT("Kalibracja nie powiodÅa siÄ");
}
-
-#if FAN_COUNT == 1
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED
-#else
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N
-#endif
diff --git a/Marlin/Marlin/src/lcd/language/language_pt.h b/Marlin/Marlin/src/lcd/language/language_pt.h
index 55d9c1d7..0672f255 100644
--- a/Marlin/Marlin/src/lcd/language/language_pt.h
+++ b/Marlin/Marlin/src/lcd/language/language_pt.h
@@ -29,7 +29,7 @@
* See also https://marlinfw.org/docs/development/lcd_language.html
*/
- #define DISPLAY_CHARSET_ISO10646_1
+#define DISPLAY_CHARSET_ISO10646_1
namespace Language_pt {
using namespace Language_en; // Inherit undefined strings from English
diff --git a/Marlin/Marlin/src/lcd/language/language_pt_br.h b/Marlin/Marlin/src/lcd/language/language_pt_br.h
index 1d07b2b9..d52728d1 100644
--- a/Marlin/Marlin/src/lcd/language/language_pt_br.h
+++ b/Marlin/Marlin/src/lcd/language/language_pt_br.h
@@ -236,7 +236,6 @@ namespace Language_pt_br {
LSTR MSG_AUTOTEMP = _UxGT("Temp. Automática");
LSTR MSG_LCD_ON = _UxGT("Ligado");
LSTR MSG_LCD_OFF = _UxGT("Desligado");
- LSTR MSG_SELECT = _UxGT("Selecionar");
LSTR MSG_SELECT_E = _UxGT("Selecionar *");
LSTR MSG_ACC = _UxGT("Acel.");
LSTR MSG_JERK = _UxGT("Arrancada");
@@ -341,7 +340,7 @@ namespace Language_pt_br {
LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Estender BLTouch");
LSTR MSG_MANUAL_DEPLOY = _UxGT("Estender Sonda-Z");
LSTR MSG_MANUAL_STOW = _UxGT("Recolher Sonda-Z");
- LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s Primeiro");
+ LSTR MSG_HOME_FIRST = _UxGT("Home %s Primeiro");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Compensar Sonda");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("Compensar Sonda em X");
LSTR MSG_ZPROBE_YOFFSET = _UxGT("Compensar Sonda em Y");
diff --git a/Marlin/Marlin/src/lcd/language/language_ro.h b/Marlin/Marlin/src/lcd/language/language_ro.h
index 2cf6fff2..4eefc11c 100644
--- a/Marlin/Marlin/src/lcd/language/language_ro.h
+++ b/Marlin/Marlin/src/lcd/language/language_ro.h
@@ -264,7 +264,6 @@ namespace Language_ro {
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune failed! Bad extruder.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed! Temperature too high.");
LSTR MSG_PID_TIMEOUT = _UxGT("Autotune failed! Timeout.");
- LSTR MSG_SELECT = _UxGT("Select");
LSTR MSG_SELECT_E = _UxGT("Select *");
LSTR MSG_ACC = _UxGT("Accel");
LSTR MSG_JERK = _UxGT("Jerk");
@@ -318,9 +317,9 @@ namespace Language_ro {
LSTR MSG_LOAD_EEPROM = _UxGT("Load Settings");
LSTR MSG_RESTORE_DEFAULTS = _UxGT("Restore Defaults");
LSTR MSG_INIT_EEPROM = _UxGT("Initialize EEPROM");
- LSTR MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC Error");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Error");
- LSTR MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Error");
+ LSTR MSG_ERR_EEPROM_CRC = _UxGT("Err: EEPROM CRC");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("Err: MÄrimea EEPROM");
+ LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Err: Versiunea EEPROM");
LSTR MSG_SETTINGS_STORED = _UxGT("Settings Stored");
LSTR MSG_MEDIA_UPDATE = _UxGT("Media Update");
LSTR MSG_RESET_PRINTER = _UxGT("Reset Imprimanta");
@@ -420,7 +419,7 @@ namespace Language_ro {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Deploy TouchMI");
LSTR MSG_MANUAL_DEPLOY = _UxGT("Deploy Z-Probe");
LSTR MSG_MANUAL_STOW = _UxGT("Stow Z-Probe");
- LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s First");
+ LSTR MSG_HOME_FIRST = _UxGT("Home %s First");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Probe Offsets");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("Probe X Offset");
LSTR MSG_ZPROBE_YOFFSET = _UxGT("Probe Y Offset");
@@ -607,11 +606,3 @@ namespace Language_ro {
LSTR MSG_REHEAT = _UxGT("Reincalzire");
LSTR MSG_REHEATING = _UxGT("Reincalzire...");
}
-
-#if FAN_COUNT == 1
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED
-#else
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N
-#endif
diff --git a/Marlin/Marlin/src/lcd/language/language_ru.h b/Marlin/Marlin/src/lcd/language/language_ru.h
index 107a0616..89aba009 100644
--- a/Marlin/Marlin/src/lcd/language/language_ru.h
+++ b/Marlin/Marlin/src/lcd/language/language_ru.h
@@ -218,10 +218,10 @@ namespace Language_ru {
LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("ÐПÑÑÑПОÑÑ ÑÐ²ÐŸÑ ÑеÑкÑ");
LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("ÐÑавка ÑеÑкО завеÑÑеМа");
#else
- LSTR MSG_UBL_SET_TEMP_BED = LCD_STR_THERMOMETER _UxGT(" ÑÑПла, ") LCD_STR_DEGREE "C";
- LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Ð¡Ð²ÐŸÑ ") LCD_STR_THERMOMETER _UxGT(" ÑÑПла,") LCD_STR_DEGREE "C";
- LSTR MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" ÑПпла, ") LCD_STR_DEGREE "C";
- LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Ð¡Ð²ÐŸÑ ") LCD_STR_THERMOMETER _UxGT(" ÑПпла,") LCD_STR_DEGREE "C";
+ LSTR MSG_UBL_SET_TEMP_BED = LCD_STR_THERMOMETER _UxGT(" ÑÑПла, ") LCD_STR_DEGREE _UxGT("C");
+ LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Ð¡Ð²ÐŸÑ ") LCD_STR_THERMOMETER _UxGT(" ÑÑПла,") LCD_STR_DEGREE _UxGT("C");
+ LSTR MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" ÑПпла, ") LCD_STR_DEGREE _UxGT("C");
+ LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Ð¡Ð²ÐŸÑ ") LCD_STR_THERMOMETER _UxGT(" ÑПпла,") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("ÐПÑÑÑПОÑÑ ÑвПÑ");
LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("ÐÑавка завеÑÑеМа");
#endif
@@ -343,12 +343,12 @@ namespace Language_ru {
LSTR MSG_MOVE_100MM = _UxGT("ÐвОжеМОе 100mm");
LSTR MSG_SPEED = _UxGT("СкПÑПÑÑÑ");
LSTR MSG_BED_Z = _UxGT("Z ÑÑПла");
- LSTR MSG_NOZZLE = _UxGT("СПплП, ") LCD_STR_DEGREE "C";
+ LSTR MSG_NOZZLE = _UxGT("СПплП, ") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_NOZZLE_N = _UxGT("СПплП ~");
LSTR MSG_NOZZLE_PARKED = _UxGT("СПплП запаÑкПваМП");
LSTR MSG_NOZZLE_STANDBY = _UxGT("СПплП ПжОЎаеÑ");
- LSTR MSG_BED = _UxGT("СÑПл, ") LCD_STR_DEGREE "C";
- LSTR MSG_CHAMBER = _UxGT("ÐаЌеÑа,") LCD_STR_DEGREE "C";
+ LSTR MSG_BED = _UxGT("СÑПл, ") LCD_STR_DEGREE _UxGT("C");
+ LSTR MSG_CHAMBER = _UxGT("ÐаЌеÑа,") LCD_STR_DEGREE _UxGT("C");
#if LCD_WIDTH > 21 || HAS_DWIN_E3V2
LSTR MSG_COOLER = _UxGT("ÐÑ
лажЎеМОе лазеÑа");
LSTR MSG_COOLER_TOGGLE = _UxGT("ÐеÑеклÑÑ. ПÑ
лажЎ.");
@@ -386,7 +386,6 @@ namespace Language_ru {
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("СбПй авÑПпПЎбПÑа! ТеЌпеÑаÑÑÑа пПвÑÑеМа.");
LSTR MSG_PID_TIMEOUT = _UxGT("СбПй авÑПпПЎбПÑа! ÐавеÑÑеМОе вÑеЌеМО.");
- LSTR MSG_SELECT = _UxGT("ÐÑбПÑ");
LSTR MSG_SELECT_E = _UxGT("ÐÑÐ±ÐŸÑ *");
LSTR MSG_ACC = _UxGT("УÑкПÑеМОе");
LSTR MSG_JERK = _UxGT("Ð ÑвПк");
@@ -455,7 +454,7 @@ namespace Language_ru {
LSTR MSG_INIT_EEPROM = _UxGT("ÐМОÑОалОз. EEPROM");
#endif
LSTR MSG_ERR_EEPROM_CRC = _UxGT("СбПй EEPROM: CRC");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("СбПй EEPROM: ОМЎекÑ");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("СбПй EEPROM: ÑазЌеÑ");
LSTR MSG_ERR_EEPROM_VERSION = _UxGT("СбПй EEPROM: веÑÑОÑ");
LSTR MSG_SETTINGS_STORED = _UxGT("ÐаÑаЌеÑÑÑ ÑПÑ
ÑаМеМÑ");
LSTR MSG_MEDIA_UPDATE = _UxGT("ÐбМПвлеМОе пÑПÑОвкО");
@@ -582,7 +581,7 @@ namespace Language_ru {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("УÑÑаМПвОÑÑ TouchMI");
LSTR MSG_MANUAL_DEPLOY = _UxGT("УÑÑаМПвОÑÑ Ð·ÐŸÐœÐŽ");
LSTR MSG_MANUAL_STOW = _UxGT("ÐагÑÑзОÑÑ Ð·ÐŸÐœÐŽ");
- LSTR MSG_HOME_FIRST = _UxGT("СМаÑала паÑкÑй %s%s%s");
+ LSTR MSG_HOME_FIRST = _UxGT("СМаÑала паÑкÑй %s");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("СЌеÑÐµÐœÐžÑ Z-зПМЎа");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("СЌеÑеМОе X");
LSTR MSG_ZPROBE_YOFFSET = _UxGT("СЌеÑеМОе Y");
@@ -609,9 +608,6 @@ namespace Language_ru {
LSTR MSG_ERR_MINTEMP = _UxGT("ÐÑОбка: Т ЌОМ.");
LSTR MSG_HALTED = _UxGT("ÐÐ ÐÐТÐÐ ÐСТÐÐÐÐÐÐÐ");
LSTR MSG_PLEASE_RESET = _UxGT("СЎелайÑе ÑбÑПÑ");
- LSTR MSG_SHORT_DAY = _UxGT("ÐŽ"); // One character only
- LSTR MSG_SHORT_HOUR = _UxGT("Ñ"); // One character only
- LSTR MSG_SHORT_MINUTE = _UxGT("Ќ"); // One character only
LSTR MSG_HEATING = _UxGT("ÐагÑев...");
LSTR MSG_COOLING = _UxGT("ÐÑ
лажЎеМОе...");
LSTR MSG_BED_HEATING = _UxGT("ÐагÑев ÑÑПла...");
@@ -876,12 +872,8 @@ namespace Language_ru {
#endif
LSTR MSG_SD_CARD = _UxGT("SD ÐаÑÑа");
LSTR MSG_USB_DISK = _UxGT("USB ÐОÑк");
-}
-#if FAN_COUNT == 1
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED
-#else
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N
-#endif
+ LSTR MSG_SHORT_DAY = _UxGT("ÐŽ"); // One character only
+ LSTR MSG_SHORT_HOUR = _UxGT("Ñ"); // One character only
+ LSTR MSG_SHORT_MINUTE = _UxGT("Ќ"); // One character only
+}
diff --git a/Marlin/Marlin/src/lcd/language/language_sk.h b/Marlin/Marlin/src/lcd/language/language_sk.h
index fbd46c6b..f11e6aa6 100644
--- a/Marlin/Marlin/src/lcd/language/language_sk.h
+++ b/Marlin/Marlin/src/lcd/language/language_sk.h
@@ -58,7 +58,7 @@ namespace Language_sk {
LSTR MSG_MEDIA_INSERTED = _UxGT("Karta vloşená");
LSTR MSG_MEDIA_REMOVED = _UxGT("Karta vybraná");
LSTR MSG_MEDIA_WAITING = _UxGT("Äakám na kartu");
- LSTR MSG_MEDIA_INIT_FAIL = _UxGT("Inicial. SD zlyhala");
+ LSTR MSG_MEDIA_INIT_FAIL = _UxGT("Inicial.karty zlyhala");
LSTR MSG_MEDIA_READ_ERROR = _UxGT("Chyba ÄÃtania karty");
LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB zaria. odstrán.");
LSTR MSG_MEDIA_USB_FAILED = _UxGT("Chyba spúšťania USB");
@@ -80,6 +80,7 @@ namespace Language_sk {
LSTR MSG_AUTO_HOME_X = _UxGT("Domov os X");
LSTR MSG_AUTO_HOME_Y = _UxGT("Domov os Y");
LSTR MSG_AUTO_HOME_Z = _UxGT("Domov os Z");
+ LSTR MSG_Z_AFTER_HOME = _UxGT("Os Z po domov.poz.");
LSTR MSG_FILAMENT_SET = _UxGT("Nastav. filamentu");
LSTR MSG_FILAMENT_MAN = _UxGT("Správa filamentu");
LSTR MSG_MANUAL_LEVELING = _UxGT("RuÄné rovnanie");
@@ -104,6 +105,7 @@ namespace Language_sk {
LSTR MSG_HOME_OFFSET_Y = _UxGT("Y Ofset");
LSTR MSG_HOME_OFFSET_Z = _UxGT("Z Ofset");
LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Ofsety nastavené");
+ LSTR MSG_ERR_M428_TOO_FAR = _UxGT("Chyba: PrÃliÅ¡ Äaleko!");
LSTR MSG_TRAMMING_WIZARD = _UxGT("Spriev. vyrovn.");
LSTR MSG_SELECT_ORIGIN = _UxGT("Vyberte zaÄiatok");
LSTR MSG_LAST_VALUE_SP = _UxGT("Posl. hodnota ");
@@ -131,6 +133,7 @@ namespace Language_sk {
LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Zahriať $ podloş");
LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Zahriať $ nast.");
#endif
+ LSTR MSG_PREHEAT_HOTEND = _UxGT("Zahriať hotend");
LSTR MSG_PREHEAT_CUSTOM = _UxGT("Vlastná teplota");
LSTR MSG_COOLDOWN = _UxGT("Schladiť");
@@ -252,6 +255,7 @@ namespace Language_sk {
LSTR MSG_UBL_SMART_FILLIN = _UxGT("Chytré vyplnenie");
LSTR MSG_UBL_FILLIN_MESH = _UxGT("Vyplniť mrieşku");
LSTR MSG_UBL_MESH_FILLED = _UxGT("Doplnené chÜb. body");
+ LSTR MSG_UBL_MESH_INVALID = _UxGT("Neplatná sieť");
LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Zrušiť všetko");
LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("ZruÅ¡iÅ¥ najbliÅŸÅ¡Ã");
LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Upraviť všetky");
@@ -263,6 +267,7 @@ namespace Language_sk {
LSTR MSG_UBL_INVALID_SLOT = _UxGT("NajskÃŽr zvol. slot siete");
LSTR MSG_MESH_LOADED = _UxGT("SieÅ¥ %i naÄÃtaná");
LSTR MSG_MESH_SAVED = _UxGT("Sieť %i uloşená");
+ LSTR MSG_MESH_ACTIVE = _UxGT("SieÅ¥ %i aktÃvna");
LSTR MSG_UBL_NO_STORAGE = _UxGT("Nedostatok miesta");
LSTR MSG_UBL_SAVE_ERROR = _UxGT("Chyba: Ukladanie UBL");
LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Chyba: Obnovenie UBL");
@@ -313,11 +318,14 @@ namespace Language_sk {
LSTR MSG_MOVE_01MM = _UxGT("Posunúť o 0,1mm");
LSTR MSG_MOVE_1MM = _UxGT("Posunúť o 1mm");
LSTR MSG_MOVE_10MM = _UxGT("Posunúť o 10mm");
+ LSTR MSG_MOVE_50MM = _UxGT("Posunúť o 50mm");
LSTR MSG_MOVE_100MM = _UxGT("Posunúť o 100mm");
LSTR MSG_MOVE_0001IN = _UxGT("Posunúť o 0,001in");
LSTR MSG_MOVE_001IN = _UxGT("Posunúť o 0,01in");
LSTR MSG_MOVE_01IN = _UxGT("Posunúť o 0,1in");
+ LSTR MSG_MOVE_05IN = _UxGT("Posunúť o 0,5in");
LSTR MSG_MOVE_1IN = _UxGT("Posunúť o 1,0in");
+ LSTR MSG_LIVE_MOVE = _UxGT("ŜivÜ pohyb");
LSTR MSG_SPEED = _UxGT("RÜchlosť");
LSTR MSG_BED_Z = _UxGT("VÜška podl.");
LSTR MSG_NOZZLE = _UxGT("Tryska");
@@ -329,6 +337,7 @@ namespace Language_sk {
LSTR MSG_COOLER = _UxGT("Chladen. lasera");
LSTR MSG_COOLER_TOGGLE = _UxGT("Prepnúť chladenie");
LSTR MSG_FLOWMETER_SAFETY = _UxGT("BezpeÄ. prietok");
+ LSTR MSG_CUTTER = _UxGT("RezaÄka");
LSTR MSG_LASER = _UxGT("Laser");
LSTR MSG_FAN_SPEED = _UxGT("RÜchlosť vent.");
LSTR MSG_FAN_SPEED_N = _UxGT("RÜchlosť vent. ~");
@@ -361,14 +370,20 @@ namespace Language_sk {
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Auto-kal. zlyhala! PrÃliÅ¡ vysoká tepl.");
LSTR MSG_PID_TIMEOUT = _UxGT("Auto-kal. zlyhala! Äas vyprÅ¡al.");
LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Test. tepl. straty");
+ LSTR MSG_MPC_HEATING_PAST_200 = _UxGT("Zahriať na >200C");
+ LSTR MSG_MPC_COOLING_TO_AMBIENT = _UxGT("Schladiť na okolie");
LSTR MSG_MPC_AUTOTUNE = _UxGT("Auto-kal. MPC");
LSTR MSG_MPC_EDIT = _UxGT("Upraviť * MPC");
+ LSTR MSG_MPC_POWER = _UxGT("VÃœkon ohrievaÄa");
LSTR MSG_MPC_POWER_E = _UxGT("VÃœkon *");
- LSTR MSG_MPC_BLOCK_HEAT_CAPACITY_E = _UxGT("Blokovať C *");
- LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Rozliš. senz. *");
- LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("H okolia *");
- LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("H vent. okolia *");
- LSTR MSG_SELECT = _UxGT("Vybrať");
+ LSTR MSG_MPC_BLOCK_HEAT_CAPACITY = _UxGT("Tepelná kapacita");
+ LSTR MSG_MPC_BLOCK_HEAT_CAPACITY_E = _UxGT("Tepelná kap. *");
+ LSTR MSG_SENSOR_RESPONSIVENESS = _UxGT("Reakcia senzoru");
+ LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Reakcia senz. *");
+ LSTR MSG_MPC_AMBIENT_XFER_COEFF = _UxGT("Koef. okolia");
+ LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("Koef. okolia *");
+ LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN = _UxGT("Koef. vent.");
+ LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("Koef. vent. *");
LSTR MSG_SELECT_E = _UxGT("Vybrať *");
LSTR MSG_ACC = _UxGT("ZrÃœchlenie");
LSTR MSG_JERK = _UxGT("Skok");
@@ -396,6 +411,11 @@ namespace Language_sk {
LSTR MSG_AMAX_EN = _UxGT("Amax *");
LSTR MSG_A_RETRACT = _UxGT("A-retrakt");
LSTR MSG_A_TRAVEL = _UxGT("A-prejazd");
+ LSTR MSG_INPUT_SHAPING = _UxGT("Tvarov. vstupu");
+ LSTR MSG_SHAPING_ENABLE = _UxGT("Povol. tvarov. @");
+ LSTR MSG_SHAPING_DISABLE = _UxGT("Zakáz. tvarov. @");
+ LSTR MSG_SHAPING_FREQ = _UxGT("Frekvencia @");
+ LSTR MSG_SHAPING_ZETA = _UxGT("Tlmenie @");
LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Max. frekvencia");
LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min. posun");
LSTR MSG_STEPS_PER_MM = _UxGT("Kroky/mm");
@@ -415,6 +435,12 @@ namespace Language_sk {
LSTR MSG_FILAMENT_DIAM_E = _UxGT("Priem. fil. *");
LSTR MSG_FILAMENT_UNLOAD = _UxGT("Vysunúť mm");
LSTR MSG_FILAMENT_LOAD = _UxGT("Zaviesť mm");
+ LSTR MSG_SEGMENTS_PER_SECOND = _UxGT("Segmentov/sek");
+ LSTR MSG_DRAW_MIN_X = _UxGT("Min. X kresby");
+ LSTR MSG_DRAW_MAX_X = _UxGT("Max. X kresby");
+ LSTR MSG_DRAW_MIN_Y = _UxGT("Min. Y kresby");
+ LSTR MSG_DRAW_MAX_Y = _UxGT("Max. Y kresby");
+ LSTR MSG_MAX_BELT_LEN = _UxGT("Max. dĺşka pásu");
LSTR MSG_ADVANCE_K = _UxGT("K pre posun");
LSTR MSG_ADVANCE_K_E = _UxGT("K pre posun *");
LSTR MSG_CONTRAST = _UxGT("Kontrast LCD");
@@ -426,10 +452,10 @@ namespace Language_sk {
LSTR MSG_RESTORE_DEFAULTS = _UxGT("Obnoviť nastavenie");
LSTR MSG_INIT_EEPROM = _UxGT("Inicializ. EEPROM");
LSTR MSG_ERR_EEPROM_CRC = _UxGT("Chyba: EEPROM CRC");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Chyba: EEPROM Index");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("Chyba: Veğkosť EEPROM");
LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Chyba: Verzia EEPROM");
LSTR MSG_SETTINGS_STORED = _UxGT("Nastavenie uloşené");
- LSTR MSG_MEDIA_UPDATE = _UxGT("Aktualizovať z SD");
+ LSTR MSG_MEDIA_UPDATE = _UxGT("Aktualiz. z karty");
LSTR MSG_RESET_PRINTER = _UxGT("ReÅ¡tart. tlaÄiar.");
LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Obnoviť");
LSTR MSG_INFO_SCREEN = _UxGT("Info. obrazovka");
@@ -468,16 +494,28 @@ namespace Language_sk {
LSTR MSG_PAUSE_PRINT = _UxGT("PozastaviÅ¥ tlaÄ");
LSTR MSG_ADVANCED_PAUSE = _UxGT("PokroÄil. pauza");
LSTR MSG_RESUME_PRINT = _UxGT("ObnoviÅ¥ tlaÄ");
- LSTR MSG_HOST_START_PRINT = _UxGT("Spustiť z hosta");
LSTR MSG_STOP_PRINT = _UxGT("ZastaviÅ¥ tlaÄ");
- LSTR MSG_END_LOOPS = _UxGT("Koniec opak. sluÄ.");
- LSTR MSG_PRINTING_OBJECT = _UxGT("TlaÄÃm objekt");
- LSTR MSG_CANCEL_OBJECT = _UxGT("Zrušiť objekt");
- LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť objekt =");
LSTR MSG_OUTAGE_RECOVERY = _UxGT("Obnova po vÃœp. nap.");
- LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("PokraÄovaÅ¥ v úlohe");
- LSTR MSG_MEDIA_MENU = _UxGT("TlaÄiÅ¥ z SD");
- LSTR MSG_NO_MEDIA = _UxGT("Åœiadna SD karta");
+ #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2
+ LSTR MSG_HOST_START_PRINT = _UxGT("Spustiť z hosta");
+ LSTR MSG_PRINTING_OBJECT = _UxGT("TlaÄÃm objekt");
+ LSTR MSG_CANCEL_OBJECT = _UxGT("Zrušiť objekt");
+ LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť objekt =");
+ LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("PokraÄovaÅ¥ v úlohe");
+ LSTR MSG_MEDIA_MENU = _UxGT("VytlaÄiÅ¥ z karty");
+ LSTR MSG_TURN_OFF = _UxGT("Vypnite tlaÄiareÅ");
+ LSTR MSG_END_LOOPS = _UxGT("UkonÄiÅ¥ opak. sluÄ.");
+ #else
+ LSTR MSG_HOST_START_PRINT = _UxGT("Spustiť z hosta");
+ LSTR MSG_PRINTING_OBJECT = _UxGT("TlaÄÃm obj.");
+ LSTR MSG_CANCEL_OBJECT = _UxGT("Zrušiť obj.");
+ LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť obj. =");
+ LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("PokraÄ. v úlohe");
+ LSTR MSG_MEDIA_MENU = _UxGT("TlaÄ z karty");
+ LSTR MSG_TURN_OFF = _UxGT("Vypnit. teraz");
+ LSTR MSG_END_LOOPS = _UxGT("UkonÄiÅ¥ sluÄ.");
+ #endif
+ LSTR MSG_NO_MEDIA = _UxGT("Åœiadna karta");
LSTR MSG_DWELL = _UxGT("SpÃm...");
LSTR MSG_USERWAIT = _UxGT("PokraÄ. kliknutÃm...");
LSTR MSG_PRINT_PAUSED = _UxGT("TlaÄ pozastavená");
@@ -487,7 +525,6 @@ namespace Language_sk {
LSTR MSG_PRINT_ABORTED = _UxGT("TlaÄ zruÅ¡ená");
LSTR MSG_PRINT_DONE = _UxGT("TlaÄ dokonÄená");
LSTR MSG_PRINTER_KILLED = _UxGT("TlaÄiareÅ zastavená!");
- LSTR MSG_TURN_OFF = _UxGT("Vypnite tlaÄiareÅ");
LSTR MSG_NO_MOVE = _UxGT("Åœiadny pohyb.");
LSTR MSG_KILLED = _UxGT("PRERUÅ ENÃ. ");
LSTR MSG_STOPPED = _UxGT("ZASTAVENÃ. ");
@@ -507,8 +544,10 @@ namespace Language_sk {
LSTR MSG_TOOL_CHANGE = _UxGT("VÜmena nástroja");
LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Zdvihnúť Z");
LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Primárna rÜchl.");
+ LSTR MSG_SINGLENOZZLE_WIPE_RETRACT = _UxGT("OÄist. retrakciou");
LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("RÃœchl. retrakcie");
LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Parkovať hlavu");
+ LSTR MSG_PARK_FAILED = _UxGT("Hlava sa nedá zapark.");
LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("RÃœchl. obnovenia");
LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("RÜchlosť vent.");
LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Doba fúkania");
@@ -525,9 +564,14 @@ namespace Language_sk {
LSTR MSG_FILAMENTUNLOAD = _UxGT("Vysunúť filament");
LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Vysunúť filament *");
LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Vysunúť všetko");
- LSTR MSG_ATTACH_MEDIA = _UxGT("NaÄÃtaÅ¥ SD kartu");
- LSTR MSG_CHANGE_MEDIA = _UxGT("Vymeniť SD kartu");
- LSTR MSG_RELEASE_MEDIA = _UxGT("Odpojiť SD kartu");
+ #if ENABLED(MULTI_VOLUME)
+ LSTR MSG_ATTACH_MEDIA = _UxGT("NaÄÃtaÅ¥ SD kartu");
+ LSTR MSG_ATTACH_USB_MEDIA = _UxGT("NaÄÃtaÅ¥ USB disk");
+ #else
+ LSTR MSG_ATTACH_MEDIA = _UxGT("NaÄÃtaÅ¥ kartu");
+ #endif
+ LSTR MSG_CHANGE_MEDIA = _UxGT("Vymeniť kartu");
+ LSTR MSG_RELEASE_MEDIA = _UxGT("Odpojiť kartu");
LSTR MSG_ZPROBE_OUT = _UxGT("Sonda Z mimo podl.");
LSTR MSG_SKEW_FACTOR = _UxGT("Faktor skosenia");
LSTR MSG_BLTOUCH = _UxGT("BLTouch");
@@ -551,7 +595,7 @@ namespace Language_sk {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Zasunúť TouchMI");
LSTR MSG_MANUAL_DEPLOY = _UxGT("Zasunúť sondu Z");
LSTR MSG_MANUAL_STOW = _UxGT("Vysunúť sondu Z");
- LSTR MSG_HOME_FIRST = _UxGT("NajskÃŽr os %s%s%s domov");
+ LSTR MSG_HOME_FIRST = _UxGT("NajskÃŽr os %s domov");
LSTR MSG_ZPROBE_SETTINGS = _UxGT("Nastav. sondy");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Ofsety sondy Z");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("X ofset");
@@ -609,6 +653,7 @@ namespace Language_sk {
LSTR MSG_MESH_LEVELING = _UxGT("Mrieşkové rovnanie");
LSTR MSG_MESH_DONE = _UxGT("MrieÅŸka dokonÄená");
LSTR MSG_INFO_STATS_MENU = _UxGT("Å tatistika");
+ LSTR MSG_RESET_STATS = _UxGT("Vynulovať štatis.?");
LSTR MSG_INFO_BOARD_MENU = _UxGT("Info. o doske");
LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistory");
LSTR MSG_INFO_EXTRUDERS = _UxGT("Extrudéry");
diff --git a/Marlin/Marlin/src/lcd/language/language_sv.h b/Marlin/Marlin/src/lcd/language/language_sv.h
index 1342ccaa..e66de33c 100644
--- a/Marlin/Marlin/src/lcd/language/language_sv.h
+++ b/Marlin/Marlin/src/lcd/language/language_sv.h
@@ -294,7 +294,6 @@ namespace Language_sv {
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autojustera misslyckad! DÃ¥lig extruder.");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autojustera misslyckad! Temperatur för hög.");
LSTR MSG_PID_TIMEOUT = _UxGT("Autojustera misslyckad! TidsgrÀns.");
- LSTR MSG_SELECT = _UxGT("VÀlj");
LSTR MSG_SELECT_E = _UxGT("VÀlj *");
LSTR MSG_ACC = _UxGT("Accel");
LSTR MSG_JERK = _UxGT("Ryck");
@@ -349,7 +348,7 @@ namespace Language_sv {
LSTR MSG_RESTORE_DEFAULTS = _UxGT("Ã
terstÀll Standard");
LSTR MSG_INIT_EEPROM = _UxGT("Initiera EEPROM");
LSTR MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC Fel");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Fel");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("EEPROM Storlek Fel");
LSTR MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Fel");
LSTR MSG_SETTINGS_STORED = _UxGT("InstÀllningar Lagrad");
LSTR MSG_MEDIA_UPDATE = _UxGT("Media Uppdatera");
@@ -453,7 +452,7 @@ namespace Language_sv {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("FÀllut TouchMI");
LSTR MSG_MANUAL_DEPLOY = _UxGT("FÀllut Z-Sond");
LSTR MSG_MANUAL_STOW = _UxGT("Stuva undan Z-Sond");
- LSTR MSG_HOME_FIRST = _UxGT("Hem %s%s%s Först");
+ LSTR MSG_HOME_FIRST = _UxGT("Hem %s Först");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Sond Offsets");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("Sond X Offset");
LSTR MSG_ZPROBE_YOFFSET = _UxGT("Sond Y Offset");
diff --git a/Marlin/Marlin/src/lcd/language/language_tr.h b/Marlin/Marlin/src/lcd/language/language_tr.h
index cb276630..ca6a3814 100644
--- a/Marlin/Marlin/src/lcd/language/language_tr.h
+++ b/Marlin/Marlin/src/lcd/language/language_tr.h
@@ -26,10 +26,6 @@
*
* LCD Menu Messages
* See also https://marlinfw.org/docs/development/lcd_language.html
- *
- * Bu çeviri dosyasındaki sorunlar ve dÃŒzeltmeler için iletiÅim;
- * Contact for issues and corrections in this translation file;
- * YÃŒcel Temel - (info@elektromanyetix.com) - https://elektromanyetix.com/
*/
#define DISPLAY_CHARSET_ISO10646_TR
@@ -40,38 +36,67 @@ namespace Language_tr {
constexpr uint8_t CHARSIZE = 2;
LSTR LANGUAGE = _UxGT("Turkish");
+ // These strings should be translated
LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" hazır.");
LSTR MSG_YES = _UxGT("EVET");
LSTR MSG_NO = _UxGT("HAYIR");
+ LSTR MSG_HIGH = _UxGT("YÃKSEK");
+ LSTR MSG_LOW = _UxGT("DÃÅÃK");
LSTR MSG_BACK = _UxGT("Geri");
+ LSTR MSG_ERROR = _UxGT("Hata");
LSTR MSG_MEDIA_ABORTING = _UxGT("Durduruluyor...");
LSTR MSG_MEDIA_INSERTED = _UxGT("SD K. YerleÅtirildi.");
LSTR MSG_MEDIA_REMOVED = _UxGT("SD Kart Ãıkarıldı.");
LSTR MSG_MEDIA_WAITING = _UxGT("SD Kart Bekleniyor");
+ LSTR MSG_MEDIA_INIT_FAIL = MEDIA_TYPE_EN _UxGT(" BaÅlatma BaÅarısız");
LSTR MSG_MEDIA_READ_ERROR = _UxGT("Kart Okuma Hatası");
LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB Ãıkarıldı");
LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB BaÅlat. Hatası");
- LSTR MSG_LCD_ENDSTOPS = _UxGT("Enstops"); // Max length 8 characters
+ LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall Overflow");
+ LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters
LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Yazılımsal Endstops");
LSTR MSG_MAIN = _UxGT("Ana");
LSTR MSG_ADVANCED_SETTINGS = _UxGT("GeliÅmiÅ Ayarlar");
+ LSTR MSG_TOOLBAR_SETUP = _UxGT("Araç ÃubuÄu Kurulumu");
+ LSTR MSG_OPTION_DISABLED = _UxGT("Seçenek Devre DıÅı");
LSTR MSG_CONFIGURATION = _UxGT("Yapılandırma");
LSTR MSG_RUN_AUTO_FILES = _UxGT("Oto. BaÅlat");
LSTR MSG_DISABLE_STEPPERS = _UxGT("Motorları Durdur");
LSTR MSG_DEBUG_MENU = _UxGT("Hata Ayıklama");
LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Durum ÃubuÄu Testi");
+ LSTR MSG_HOMING = _UxGT("Sıfırlanıyor");
LSTR MSG_AUTO_HOME = _UxGT("Eksenleri Sıfırla");
+ LSTR MSG_AUTO_HOME_A = _UxGT("@ Sıfırla");
LSTR MSG_AUTO_HOME_X = _UxGT("X Sıfırla");
LSTR MSG_AUTO_HOME_Y = _UxGT("Y Sıfırla");
LSTR MSG_AUTO_HOME_Z = _UxGT("Z Sıfırla");
+ LSTR MSG_FILAMENT_SET = _UxGT("Filament Ayarları");
+ LSTR MSG_FILAMENT_MAN = _UxGT("Filament Yönetimi");
+ LSTR MSG_MANUAL_LEVELING = _UxGT("Manuel Seviyeleme");
+ LSTR MSG_LEVBED_FL = _UxGT("Sol Ãn");
+ LSTR MSG_LEVBED_FR = _UxGT("Ãn SaÄ");
+ LSTR MSG_LEVBED_C = _UxGT("Orta");
+ LSTR MSG_LEVBED_BL = _UxGT("Arka Sol");
+ LSTR MSG_LEVBED_BR = _UxGT("Arka SaÄ");
+ LSTR MSG_MANUAL_MESH = _UxGT("Manuel Mesh");
+ LSTR MSG_AUTO_MESH = _UxGT("Oto Mesh OluÅtur");
LSTR MSG_AUTO_Z_ALIGN = _UxGT("Oto. Z-Hizalama");
+ LSTR MSG_ITERATION = _UxGT("G34 Yinelemesi: %i");
+ LSTR MSG_DECREASING_ACCURACY = _UxGT("DoÄruluk DÃŒÅÃŒyor!");
+ LSTR MSG_ACCURACY_ACHIEVED = _UxGT("DoÄruluk SaÄlandı");
LSTR MSG_LEVEL_BED_HOMING = _UxGT("XYZ Sıfırlanıyor");
LSTR MSG_LEVEL_BED_WAITING = _UxGT("BaÅlatmak için tıkla");
LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Sonraki Nokta");
- LSTR MSG_LEVEL_BED_DONE = _UxGT("Hizalama Tamam!");
+ LSTR MSG_LEVEL_BED_DONE = _UxGT("Seviyeleme Tamam!");
LSTR MSG_Z_FADE_HEIGHT = _UxGT("Kaçınma YÃŒksekliÄi");
LSTR MSG_SET_HOME_OFFSETS = _UxGT("Ofset Ayarla");
+ LSTR MSG_HOME_OFFSET_X = _UxGT("X Ofset Sıfırla");
+ LSTR MSG_HOME_OFFSET_Y = _UxGT("Y Ofset Sıfırla");
+ LSTR MSG_HOME_OFFSET_Z = _UxGT("Z Ofset Sıfırla");
LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Ofset Tamam");
+ LSTR MSG_TRAMMING_WIZARD = _UxGT("Hizalama Sihirbazı");
+ LSTR MSG_SELECT_ORIGIN = _UxGT("BaÅlangıç Seç");
+ LSTR MSG_LAST_VALUE_SP = _UxGT("Son deÄer ");
#if HAS_PREHEAT
LSTR MSG_PREHEAT_1 = _UxGT("Ãn Isınma ") PREHEAT_1_LABEL;
LSTR MSG_PREHEAT_1_H = _UxGT("Ãn Isınma ") PREHEAT_1_LABEL " ~";
@@ -80,7 +105,14 @@ namespace Language_tr {
LSTR MSG_PREHEAT_1_ALL = _UxGT("Ãn Isınma ") PREHEAT_1_LABEL _UxGT(" TÃŒm");
LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Ãn Isınma ") PREHEAT_1_LABEL _UxGT(" Tabla");
LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Ãn Isınma ") PREHEAT_1_LABEL _UxGT(" Ayarlar");
-
+ #ifdef PREHEAT_2_LABEL
+ LSTR MSG_PREHEAT_2 = _UxGT("Ãn Isınma ") PREHEAT_2_LABEL;
+ LSTR MSG_PREHEAT_2_SETTINGS = _UxGT("Ãn Isınma ") PREHEAT_2_LABEL _UxGT(" Conf");
+ #endif
+ #ifdef PREHEAT_3_LABEL
+ LSTR MSG_PREHEAT_3 = _UxGT("Ãn Isınma ") PREHEAT_3_LABEL;
+ LSTR MSG_PREHEAT_3_SETTINGS = _UxGT("Ãn Isınma ") PREHEAT_3_LABEL _UxGT(" Conf");
+ #endif
LSTR MSG_PREHEAT_M = _UxGT("Ãn Isınma $");
LSTR MSG_PREHEAT_M_H = _UxGT("Ãn Isınma $ ~");
LSTR MSG_PREHEAT_M_END = _UxGT("Ãn Isınma $ Nozul");
@@ -91,30 +123,59 @@ namespace Language_tr {
#endif
LSTR MSG_PREHEAT_CUSTOM = _UxGT("Ãzel Ãn Isınma");
LSTR MSG_COOLDOWN = _UxGT("SoÄut/(Durdur)");
+
+ LSTR MSG_CUTTER_FREQUENCY = _UxGT("Frekans");
LSTR MSG_LASER_MENU = _UxGT("Lazer KontrolÌ");
- LSTR MSG_LASER_POWER = _UxGT("Lazer GÌcÌ");
LSTR MSG_SPINDLE_MENU = _UxGT("Spindle KontrolÌ");
+ LSTR MSG_LASER_POWER = _UxGT("Lazer GÌcÌ");
LSTR MSG_SPINDLE_POWER = _UxGT("Spindle GÌcÌ");
- LSTR MSG_SPINDLE_REVERSE = _UxGT("Spindle Ters Yön");
+ LSTR MSG_LASER_TOGGLE = _UxGT("Lazer DeÄiÅtir");
+ LSTR MSG_LASER_EVAC_TOGGLE = _UxGT("Ãfleyici DeÄiÅtir");
+ LSTR MSG_LASER_ASSIST_TOGGLE = _UxGT("Hava DesteÄi");
+ LSTR MSG_LASER_PULSE_MS = _UxGT("Test Pulse ms");
+ LSTR MSG_LASER_FIRE_PULSE = _UxGT("Fire Pulse");
+ LSTR MSG_FLOWMETER_FAULT = _UxGT("SoÄutucu AkıŠHatası");
+ LSTR MSG_SPINDLE_TOGGLE = _UxGT("Spindle DeÄiÅtir");
+ LSTR MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Vakum DeÄiÅtir");
+ LSTR MSG_SPINDLE_FORWARD = _UxGT("Spindle İleri Yön");
+ LSTR MSG_SPINDLE_REVERSE = _UxGT("Spindle Geri Yön");
LSTR MSG_SWITCH_PS_ON = _UxGT("GÌcÌ Aç");
LSTR MSG_SWITCH_PS_OFF = _UxGT("GÌcÌ Kapat");
LSTR MSG_EXTRUDE = _UxGT("EkstrÃŒzyon");
LSTR MSG_RETRACT = _UxGT("Geri Ãek");
LSTR MSG_MOVE_AXIS = _UxGT("Eksen Hareketleri");
- LSTR MSG_BED_LEVELING = _UxGT("Tabla Hizalama");
- LSTR MSG_LEVEL_BED = _UxGT("Tabla Hizası");
- LSTR MSG_BED_TRAMMING = _UxGT("Hizalama KöÅeleri");
+ LSTR MSG_BED_LEVELING = _UxGT("Tabla Seviyeleme");
+ LSTR MSG_LEVEL_BED = _UxGT("Tabla Seviyesi");
+ LSTR MSG_BED_TRAMMING = _UxGT("Tabla Hizalama");
+ LSTR MSG_BED_TRAMMING_MANUAL = _UxGT("Manuel Hizalama");
+ LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Prob tetiklenene kadar tablayı ayarlayın.");
+ LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("KöÅeler tolerans dahilinde. Tabla hizalandı.");
+ LSTR MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Ä°yi Noktalar: ");
+ LSTR MSG_BED_TRAMMING_LAST_Z = _UxGT("Son Z: ");
LSTR MSG_NEXT_CORNER = _UxGT("Sonraki KöÅe");
LSTR MSG_MESH_EDITOR = _UxGT("Mesh EditörÌ");
+ LSTR MSG_MESH_VIEWER = _UxGT("Mesh görÌntÌleyici");
LSTR MSG_EDIT_MESH = _UxGT("Mesh DÃŒzenle");
+ LSTR MSG_MESH_VIEW = _UxGT("Mesh Göster");
LSTR MSG_EDITING_STOPPED = _UxGT("Mesh DÃŒzenleme Durdu");
+ LSTR MSG_NO_VALID_MESH = _UxGT("Geçerli Mesh yok");
+ LSTR MSG_ACTIVATE_MESH = _UxGT("Seviyeleme Aç");
LSTR MSG_PROBING_POINT = _UxGT("Prop Noktası");
LSTR MSG_MESH_X = _UxGT("Ä°ndeks X");
LSTR MSG_MESH_Y = _UxGT("Ä°ndeks Y");
+ LSTR MSG_MESH_INSET = _UxGT("Mesh Inset");
+ LSTR MSG_MESH_MIN_X = _UxGT("Mesh X Minimum");
+ LSTR MSG_MESH_MAX_X = _UxGT("Mesh X Maximum");
+ LSTR MSG_MESH_MIN_Y = _UxGT("Mesh Y Minimum");
+ LSTR MSG_MESH_MAX_Y = _UxGT("Mesh Y Maximum");
+ LSTR MSG_MESH_AMAX = _UxGT("Alanı BÌyÌt");
+ LSTR MSG_MESH_CENTER = _UxGT("Merkez Alan");
LSTR MSG_MESH_EDIT_Z = _UxGT("Z DeÄeri");
+ LSTR MSG_MESH_CANCEL = _UxGT("Mesh iptal edildi");
LSTR MSG_CUSTOM_COMMANDS = _UxGT("Ãzel Komutlar");
LSTR MSG_M48_TEST = _UxGT("M48 Prob Testi");
LSTR MSG_M48_POINT = _UxGT("M48 Nokta");
+ LSTR MSG_M48_OUT_OF_BOUNDS = _UxGT("Sınır dıÅı araÅtırma");
LSTR MSG_M48_DEVIATION = _UxGT("Sapma");
LSTR MSG_IDEX_MENU = _UxGT("IDEX Modu");
LSTR MSG_OFFSETS_MENU = _UxGT("Takım Ofsetleri");
@@ -122,21 +183,26 @@ namespace Language_tr {
LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Kopyala");
LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("YansıtılmıŠkopya");
LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Tam Kontrol");
+ LSTR MSG_IDEX_DUPE_GAP = _UxGT("Yinelenen X-BoÅluÄu");
LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2. nozul Z");
LSTR MSG_HOTEND_OFFSET_A = _UxGT("2. nozul @");
LSTR MSG_UBL_DOING_G29 = _UxGT("G29 ÃalıÅıyor");
LSTR MSG_UBL_TOOLS = _UxGT("UBL Araçları");
- LSTR MSG_UBL_LEVEL_BED = _UxGT("UBL Yatak Hizalama");
+ LSTR MSG_UBL_LEVEL_BED = _UxGT("UBL Tabla Seviyeleme");
LSTR MSG_LCD_TILTING_MESH = _UxGT("EÄim Noktası");
+ LSTR MSG_UBL_TILT_MESH = _UxGT("EÄimli Mesh");
+ LSTR MSG_UBL_TILTING_GRID = _UxGT("EÄimli Izgara Boyutu");
+ LSTR MSG_UBL_MESH_TILTED = _UxGT("Mesh EÄildi");
LSTR MSG_UBL_MANUAL_MESH = _UxGT("Elle Mesh OluÅtur");
+ LSTR MSG_UBL_MESH_WIZARD = _UxGT("UBL Mesh Sihirbazı");
LSTR MSG_UBL_BC_INSERT = _UxGT("Altlık & ÃlçÌ Ver");
- LSTR MSG_UBL_BC_INSERT2 = _UxGT("ÃlçÌ");
- LSTR MSG_UBL_BC_REMOVE = _UxGT("Yataktan ÃlçÌ Kaldır");
+ LSTR MSG_UBL_BC_INSERT2 = _UxGT("ÃlçÌm");
+ LSTR MSG_UBL_BC_REMOVE = _UxGT("Tablayı Kaldır & Ãlç");
LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Sonrakine Git");
LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("UBL'yi EtkinleÅtir");
LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL'yi EtkisizleÅtir");
- LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Yatak SıcaklıÄı");
- LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Yatak SıcaklıÄı");
+ LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Tabla SıcaklıÄı");
+ LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Tabla SıcaklıÄı");
LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Nozul SıcaklıÄı");
LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Nozul SıcaklıÄı");
LSTR MSG_UBL_MESH_EDIT = _UxGT("Mesh DÃŒzenleme");
@@ -145,14 +211,12 @@ namespace Language_tr {
LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Mesh DÃŒzenleme Tamam");
LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Ãzel Mesh OluÅtur");
LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Mesh OluÅtur");
- #if HAS_PREHEAT
- LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Mesh OluÅtur ($)");
- LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("DoÄrulama Mesh ($)");
- #endif
+ LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Mesh OluÅtur ($)");
LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("SoÄuk Mesh OluÅtur");
LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Mesh YÌkseklik Ayarı");
LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("YÌkseklik miktarı");
LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("DoÄrulama Mesh");
+ LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("DoÄrulama Mesh ($)");
LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Ãzel Mesh DoÄrulama");
LSTR MSG_G26_HEATING_BED = _UxGT("G26 Isıtma Tablası");
LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 Isıtma Memesi");
@@ -162,29 +226,32 @@ namespace Language_tr {
LSTR MSG_G26_CANCELED = _UxGT("G26 Ä°ptal edildi");
LSTR MSG_G26_LEAVING = _UxGT("ÃıkıŠG26");
LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Tabla Mesh Devam et");
- LSTR MSG_UBL_MESH_LEVELING = _UxGT("Mesh Hizalama");
- LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Nokta Hizalama");
- LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Kafes Mesh Hizalama");
+ LSTR MSG_UBL_MESH_LEVELING = _UxGT("Mesh Seviyeleme");
+ LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Nokta Seviyeleme");
+ LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Kafes Mesh Seviyeleme");
LSTR MSG_UBL_MESH_LEVEL = _UxGT("Mesh Seviyesi");
LSTR MSG_UBL_SIDE_POINTS = _UxGT("Yan Noktalar");
LSTR MSG_UBL_MAP_TYPE = _UxGT("Haritalama TÌrÌ");
LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Mesh ÃıkıŠHaritası");
LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Host için Ãıktı");
LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("CSV için Ãıktı");
- LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Yazıcıda Yedek Kpalı");
+ LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Yedekleme Kapalı");
LSTR MSG_UBL_INFO_UBL = _UxGT("UBL ÃıkıŠBilgisi");
LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Dolgu Miktarı");
LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Manuel Dolgu");
LSTR MSG_UBL_SMART_FILLIN = _UxGT("Akıllı Dogu");
LSTR MSG_UBL_FILLIN_MESH = _UxGT("Mesh Dolgu");
+ LSTR MSG_UBL_MESH_FILLED = _UxGT("Eksikler Dolduruldu");
+ LSTR MSG_UBL_MESH_INVALID = _UxGT("Geçersiz Mesh");
LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("TÌmÌnÌ Geçersiz Kıl");
LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Yakını Geçersiz Kıl");
LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("TÌmÌnÌ İnce Ayarla");
LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Yakını İnce Ayarla");
LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Mesh Depolama");
LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Bellek Yuvası");
- LSTR MSG_UBL_LOAD_MESH = _UxGT("Yatak Mesh YÃŒkle");
- LSTR MSG_UBL_SAVE_MESH = _UxGT("Yatak Mesh Kayıt Et");
+ LSTR MSG_UBL_LOAD_MESH = _UxGT("Tabla Mesh YÃŒkle");
+ LSTR MSG_UBL_SAVE_MESH = _UxGT("Tabla Mesh Kayıt Et");
+ LSTR MSG_UBL_INVALID_SLOT = _UxGT("Ãnce Mesh Yuvası Seç");
LSTR MSG_MESH_LOADED = _UxGT("Mesh %i yÃŒklendi");
LSTR MSG_MESH_SAVED = _UxGT("Mesh %i kayıtlandı");
LSTR MSG_UBL_NO_STORAGE = _UxGT("Depolama Yok");
@@ -199,7 +266,7 @@ namespace Language_tr {
LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.TÌmÌnÌ İnce Ayarla");
LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.DoÄrulama Mesh");
LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.TÌmÌnÌ İnce Ayarla");
- LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Yatak Mesh Kayıt Et");
+ LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Tabla Mesh Kaydet");
LSTR MSG_LED_CONTROL = _UxGT("LED KontrolÌ");
LSTR MSG_LEDS = _UxGT("LEDler");
@@ -213,6 +280,10 @@ namespace Language_tr {
LSTR MSG_SET_LEDS_VIOLET = _UxGT("MenekÅe");
LSTR MSG_SET_LEDS_WHITE = _UxGT("Beyaz");
LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Varsayılan");
+ LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal =");
+ LSTR MSG_LEDS2 = _UxGT("IÅıklar #2");
+ LSTR MSG_NEO2_PRESETS = _UxGT("IÅık #2 Ãn Ayarları");
+ LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Parlaklık");
LSTR MSG_CUSTOM_LEDS = _UxGT("Ãzel IÅıklar");
LSTR MSG_INTENSITY_R = _UxGT("Kırmızı Åiddeti");
LSTR MSG_INTENSITY_G = _UxGT("YeÅil Åiddeti");
@@ -222,7 +293,7 @@ namespace Language_tr {
LSTR MSG_MOVING = _UxGT("Hareket Ediyor..");
LSTR MSG_FREE_XY = _UxGT("Durdur XY");
- LSTR MSG_MOVE_X = _UxGT("X Hareketi");
+ LSTR MSG_MOVE_X = _UxGT("X Hareketi"); // Used by draw_edit_screen
LSTR MSG_MOVE_Y = _UxGT("Y Hareketi");
LSTR MSG_MOVE_Z = _UxGT("Z Hareketi");
LSTR MSG_MOVE_N = _UxGT("@ Hareketi");
@@ -233,18 +304,36 @@ namespace Language_tr {
LSTR MSG_MOVE_01MM = _UxGT("0.1mm");
LSTR MSG_MOVE_1MM = _UxGT("1mm");
LSTR MSG_MOVE_10MM = _UxGT("10mm");
+ LSTR MSG_MOVE_50MM = _UxGT("50mm");
LSTR MSG_MOVE_100MM = _UxGT("100mm");
+ LSTR MSG_MOVE_0001IN = _UxGT("0.001in");
+ LSTR MSG_MOVE_001IN = _UxGT("0.01in");
+ LSTR MSG_MOVE_01IN = _UxGT("0.1in");
+ LSTR MSG_MOVE_05IN = _UxGT("0.5in");
+ LSTR MSG_MOVE_1IN = _UxGT("1.0in");
LSTR MSG_SPEED = _UxGT("Hız");
LSTR MSG_BED_Z = _UxGT("Z Mesafesi");
LSTR MSG_NOZZLE = _UxGT("Nozul");
LSTR MSG_NOZZLE_N = _UxGT("Nozul ~");
+ LSTR MSG_NOZZLE_PARKED = _UxGT("Nozul Park Edildi");
+ LSTR MSG_NOZZLE_STANDBY = _UxGT("Nozul Beklemede");
LSTR MSG_BED = _UxGT("Tabla");
- LSTR MSG_CHAMBER = _UxGT("Ãevirme");
+ LSTR MSG_CHAMBER = _UxGT("Kabin");
+ LSTR MSG_COOLER = _UxGT("Lazer SoÄutucu");
+ LSTR MSG_COOLER_TOGGLE = _UxGT("SoÄutucuyu DeÄiÅtir");
+ LSTR MSG_FLOWMETER_SAFETY = _UxGT("AkıŠGÃŒvenliÄi");
+ LSTR MSG_CUTTER = _UxGT("Kesici");
+ LSTR MSG_LASER = _UxGT("Lazer");
LSTR MSG_FAN_SPEED = _UxGT("Fan Hızı");
LSTR MSG_FAN_SPEED_N = _UxGT("Fan Hızı ~");
LSTR MSG_STORED_FAN_N = _UxGT("Depolanan Fan ~");
LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Ekstra Fan Hızı");
LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Ekstra Fan Hızı ~");
+ LSTR MSG_CONTROLLER_FAN = _UxGT("Kontrolör Fanı");
+ LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Rölanti Hızı");
+ LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Otomatik Mod");
+ LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Aktif Hız");
+ LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Rölanti Periyodu");
LSTR MSG_FLOW = _UxGT("AkıÅ");
LSTR MSG_FLOW_N = _UxGT("AkıŠ~");
LSTR MSG_CONTROL = _UxGT("Kontrol");
@@ -256,35 +345,58 @@ namespace Language_tr {
LSTR MSG_LCD_OFF = _UxGT("Kapalı");
LSTR MSG_PID_AUTOTUNE = _UxGT("PID Kalibrasyon");
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Kalibrasyon *");
+ LSTR MSG_PID_CYCLE = _UxGT("PID DöngÌleri");
+ LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID ayarı yapıldı");
+ LSTR MSG_PID_AUTOTUNE_FAILED = _UxGT("PID Autotune baÅarısız!");
+ LSTR MSG_BAD_EXTRUDER_NUM = _UxGT("KötÌ ekstruder.");
+ LSTR MSG_TEMP_TOO_HIGH = _UxGT("Sıcaklık çok yÌksek.");
+ LSTR MSG_TIMEOUT = _UxGT("Zaman aÅımı.");
+ LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Otomatik ayar baÅarısız! KötÃŒ ekstruder.");
+ LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Otomatik ayar baÅarısız! Sıcaklık çok yÃŒksek.");
+ LSTR MSG_PID_TIMEOUT = _UxGT("Otomatik ayar baÅarısız! Zaman aÅımı.");
+ LSTR MSG_MPC_MEASURING_AMBIENT = _UxGT("Isı kaybı test ediliyor");
+ LSTR MSG_MPC_AUTOTUNE = _UxGT("MPC Otomatik Ayarı");
+ LSTR MSG_MPC_EDIT = _UxGT("DÃŒzenle * MPC");
+ LSTR MSG_MPC_POWER_E = _UxGT("GÌç *");
+ LSTR MSG_MPC_BLOCK_HEAT_CAPACITY_E = _UxGT("Blok C *");
+ LSTR MSG_SENSOR_RESPONSIVENESS_E = _UxGT("Sensör çözÃŒnÃŒrlÃŒÄÃŒ *");
+ LSTR MSG_MPC_AMBIENT_XFER_COEFF_E = _UxGT("Ortam h *");
+ LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("Amb. h fan *");
LSTR MSG_SELECT = _UxGT("Seç");
LSTR MSG_SELECT_E = _UxGT("Seç *");
LSTR MSG_ACC = _UxGT("Ä°vme");
-
- LSTR MSG_JERK = _UxGT("Sarsım");
- LSTR MSG_VA_JERK = _UxGT("V") STR_A _UxGT("-Sarsım");
- LSTR MSG_VB_JERK = _UxGT("V") STR_B _UxGT("-Sarsım");
- LSTR MSG_VC_JERK = _UxGT("V") STR_C _UxGT("-Sarsım");
- LSTR MSG_VN_JERK = _UxGT("V@-Sarsım");
- LSTR MSG_VE_JERK = _UxGT("Ve-Sarsım");
+ LSTR MSG_JERK = _UxGT("Sarsma");
+ LSTR MSG_VA_JERK = _UxGT("V") STR_A _UxGT(" Sarsma");
+ LSTR MSG_VB_JERK = _UxGT("V") STR_B _UxGT(" Sarsma");
+ LSTR MSG_VC_JERK = _UxGT("V") STR_C _UxGT(" Sarsma");
+ LSTR MSG_VN_JERK = _UxGT("Max @ Sarsma");
+ LSTR MSG_VE_JERK = _UxGT("Max E Sarsma");
LSTR MSG_JUNCTION_DEVIATION = _UxGT("Jonksiyon Sapması");
LSTR MSG_MAX_SPEED = _UxGT("Hız VektörÌ");
- LSTR MSG_VMAX_A = _UxGT("HızVektör.max ") STR_A;
- LSTR MSG_VMAX_B = _UxGT("HızVektör.max ") STR_B;
- LSTR MSG_VMAX_C = _UxGT("HızVektör.max ") STR_C;
- LSTR MSG_VMAX_N = _UxGT("HızVektör.max @");
- LSTR MSG_VMAX_E = _UxGT("HızVektör.max E");
- LSTR MSG_VMAX_EN = _UxGT("HızVektör.max *");
- LSTR MSG_VMIN = _UxGT("HızVektör.min");
- LSTR MSG_VTRAV_MIN = _UxGT("HV.gezinme min");
+ LSTR MSG_VMAX_A = _UxGT("Max ") STR_A _UxGT(" Hız");
+ LSTR MSG_VMAX_B = _UxGT("Max ") STR_B _UxGT(" Hız");
+ LSTR MSG_VMAX_C = _UxGT("Max ") STR_C _UxGT(" Hız");
+ LSTR MSG_VMAX_N = _UxGT("Max @ Hız");
+ LSTR MSG_VMAX_E = _UxGT("Max E Hız");
+ LSTR MSG_VMAX_EN = _UxGT("Max * Hız");
+ LSTR MSG_VMIN = _UxGT("Min Hız");
+ LSTR MSG_VTRAV_MIN = _UxGT("Min Gezme Hızı");
LSTR MSG_ACCELERATION = _UxGT("Ivme");
- LSTR MSG_AMAX_A = _UxGT("Max. ivme ") STR_A;
- LSTR MSG_AMAX_B = _UxGT("Max. ivme ") STR_B;
- LSTR MSG_AMAX_C = _UxGT("Max. ivme ") STR_C;
- LSTR MSG_AMAX_N = _UxGT("Max. ivme @");
- LSTR MSG_AMAX_E = _UxGT("Max. ivme E");
- LSTR MSG_AMAX_EN = _UxGT("Max. ivme *");
- LSTR MSG_A_RETRACT = _UxGT("Ivme-geri çekme");
- LSTR MSG_A_TRAVEL = _UxGT("Ivme-gezinme");
+ LSTR MSG_AMAX_A = _UxGT("Max ") STR_A _UxGT(" Ä°vme");
+ LSTR MSG_AMAX_B = _UxGT("Max ") STR_B _UxGT(" Ä°vme");
+ LSTR MSG_AMAX_C = _UxGT("Max ") STR_C _UxGT(" Ä°vme");
+ LSTR MSG_AMAX_N = _UxGT("Max @ Ä°vme");
+ LSTR MSG_AMAX_E = _UxGT("Max E Ä°vme");
+ LSTR MSG_AMAX_EN = _UxGT("Max * Ä°vme");
+ LSTR MSG_A_RETRACT = _UxGT("G.Ãekme Hızı");
+ LSTR MSG_A_TRAVEL = _UxGT("Gezinme Hızı");
+ LSTR MSG_INPUT_SHAPING = _UxGT("Girdi Åekillendirme");
+ LSTR MSG_SHAPING_ENABLE = _UxGT("Biçimleme @ aktif");
+ LSTR MSG_SHAPING_DISABLE = _UxGT("Biçimleme @ pasif");
+ LSTR MSG_SHAPING_FREQ = _UxGT("@ frekans");
+ LSTR MSG_SHAPING_ZETA = _UxGT("@ sönÌmleme");
+ LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("XY Frek. Sınırı");
+ LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min FR Factor");
LSTR MSG_STEPS_PER_MM = _UxGT("Adım/mm");
LSTR MSG_A_STEPS = STR_A _UxGT(" adım/mm");
LSTR MSG_B_STEPS = STR_B _UxGT(" adım/mm");
@@ -296,69 +408,133 @@ namespace Language_tr {
LSTR MSG_MOTION = _UxGT("Hareket");
LSTR MSG_FILAMENT = _UxGT("Filaman");
LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("EkstrÃŒzyon/mm") SUPERSCRIPT_THREE;
+ LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E Limit in mm") SUPERSCRIPT_THREE;
+ LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Limit *");
LSTR MSG_FILAMENT_DIAM = _UxGT("Filaman Ãapı");
LSTR MSG_FILAMENT_DIAM_E = _UxGT("Filaman Ãapı *");
LSTR MSG_FILAMENT_UNLOAD = _UxGT("Ãıkart mm");
LSTR MSG_FILAMENT_LOAD = _UxGT("YÃŒkle mm");
+ LSTR MSG_SEGMENTS_PER_SECOND = _UxGT("Segment/Sn");
+ LSTR MSG_DRAW_MIN_X = _UxGT("Draw Min X");
+ LSTR MSG_DRAW_MAX_X = _UxGT("Draw Max X");
+ LSTR MSG_DRAW_MIN_Y = _UxGT("Draw Min Y");
+ LSTR MSG_DRAW_MAX_Y = _UxGT("Draw Max Y");
+ LSTR MSG_MAX_BELT_LEN = _UxGT("Max KayıŠBoyu");
LSTR MSG_ADVANCE_K = _UxGT("K Ä°lerlet");
LSTR MSG_ADVANCE_K_E = _UxGT("K Ä°lerlet *");
LSTR MSG_CONTRAST = _UxGT("LCD Kontrast");
+ LSTR MSG_BRIGHTNESS = _UxGT("LCD ParlaklıÄı");
+ LSTR MSG_SCREEN_TIMEOUT = _UxGT("LCD Zaman AÅımı (m)");
+ LSTR MSG_BRIGHTNESS_OFF = _UxGT("Arka IÅık Kapalı");
LSTR MSG_STORE_EEPROM = _UxGT("Hafızaya Al");
LSTR MSG_LOAD_EEPROM = _UxGT("Hafızadan YÌkle");
LSTR MSG_RESTORE_DEFAULTS = _UxGT("Fabrika Ayarları");
LSTR MSG_INIT_EEPROM = _UxGT("EEPROM'u baÅlat");
LSTR MSG_ERR_EEPROM_CRC = _UxGT("Hata: EEPROM CRC");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Hata: EEPROM Indeks");
- LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Hata: EEPROM Versiyonu");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("Hata: EEPROM Boyutu");
+ LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Hata: EEPROM SÌrÌmÌ");
+ LSTR MSG_SETTINGS_STORED = _UxGT("Ayarlar Kaydedildi");
LSTR MSG_MEDIA_UPDATE = _UxGT("SD GÃŒncellemesi");
LSTR MSG_RESET_PRINTER = _UxGT("Yazıcıyı Resetle");
LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Yenile");
LSTR MSG_INFO_SCREEN = _UxGT("Bilgi Ekranı");
+ LSTR MSG_INFO_MACHINENAME = _UxGT("Makine Adı");
+ LSTR MSG_INFO_SIZE = _UxGT("Boyut");
+ LSTR MSG_INFO_FWVERSION = _UxGT("Yazılım SÌrÌmÌ");
+ LSTR MSG_INFO_BUILD = _UxGT("Tarih & Saat OluÅtur");
LSTR MSG_PREPARE = _UxGT("Hazırlık");
LSTR MSG_TUNE = _UxGT("Ayar");
+ LSTR MSG_POWER_MONITOR = _UxGT("GÌç monitörÌ");
+ LSTR MSG_CURRENT = _UxGT("Akım");
+ LSTR MSG_VOLTAGE = _UxGT("Voltaj");
+ LSTR MSG_POWER = _UxGT("GÌç");
LSTR MSG_START_PRINT = _UxGT("Yaz. BaÅlat");
LSTR MSG_BUTTON_NEXT = _UxGT("Ä°leri");
- LSTR MSG_BUTTON_INIT = _UxGT("İçinde");
+ LSTR MSG_BUTTON_INIT = _UxGT("BaÅlat");
LSTR MSG_BUTTON_STOP = _UxGT("Durdur");
LSTR MSG_BUTTON_PRINT = _UxGT("Yazdır");
LSTR MSG_BUTTON_RESET = _UxGT("Resetle");
+ LSTR MSG_BUTTON_IGNORE = _UxGT("Yoksay");
LSTR MSG_BUTTON_CANCEL = _UxGT("Ä°ptal");
+ LSTR MSG_BUTTON_CONFIRM = _UxGT("Onayla");
+ LSTR MSG_BUTTON_CONTINUE = _UxGT("SÃŒrdÃŒr");
LSTR MSG_BUTTON_DONE = _UxGT("Tamamlandı");
LSTR MSG_BUTTON_BACK = _UxGT("Geri");
- LSTR MSG_BUTTON_PROCEED = _UxGT("Devam ediyor");
+ LSTR MSG_BUTTON_PROCEED = _UxGT("Devam Et");
+ LSTR MSG_BUTTON_SKIP = _UxGT("Atla");
+ LSTR MSG_BUTTON_INFO = _UxGT("Bilgi");
+ LSTR MSG_BUTTON_LEVEL = _UxGT("Seviye");
+ LSTR MSG_BUTTON_PAUSE = _UxGT("Duraklat");
+ LSTR MSG_BUTTON_RESUME = _UxGT("Devam Et");
+ LSTR MSG_BUTTON_ADVANCED = _UxGT("GeliÅmiÅ");
+ LSTR MSG_BUTTON_SAVE = _UxGT("Kaydet");
+ LSTR MSG_BUTTON_PURGE = _UxGT("Temizle");
+ LSTR MSG_PAUSING = _UxGT("Duraklatılıyor...");
LSTR MSG_PAUSE_PRINT = _UxGT("Duraklat");
- LSTR MSG_RESUME_PRINT = _UxGT("SÃŒrdÃŒr");
- LSTR MSG_STOP_PRINT = _UxGT("Durdur");
- LSTR MSG_PRINTING_OBJECT = _UxGT("Yazdırma Nesnesi");
- LSTR MSG_CANCEL_OBJECT = _UxGT("Nesneyi Ä°ptal Et");
- LSTR MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi Ä°ptal Et =");
+ LSTR MSG_ADVANCED_PAUSE = _UxGT("GeliÅmiÅ Duraklatma");
+ LSTR MSG_RESUME_PRINT = _UxGT("Baskıyı SÌrdÌr");
+ LSTR MSG_STOP_PRINT = _UxGT("Baskıyı Durdur");
LSTR MSG_OUTAGE_RECOVERY = _UxGT("Kesinti Kurtarma");
- LSTR MSG_MEDIA_MENU = _UxGT("SD Karttan Yazdır");
+ #if LCD_WIDTH >= 20 || HAS_DWIN_E3V2
+ LSTR MSG_HOST_START_PRINT = _UxGT("Host Baskıyı baÅlat");
+ LSTR MSG_PRINTING_OBJECT = _UxGT("Yazdırma Nesnesi");
+ LSTR MSG_CANCEL_OBJECT = _UxGT("Nesneyi Ä°ptal Et");
+ LSTR MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi Ä°ptal Et =");
+ LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Yazdırmaya Devam Et");
+ LSTR MSG_MEDIA_MENU = _UxGT("SD Karttan Yazdır");
+ LSTR MSG_TURN_OFF = _UxGT("Yazıcıyı kapat");
+ LSTR MSG_END_LOOPS = _UxGT("Tekrr DöngÌler Bitir");
+ #else
+ LSTR MSG_HOST_START_PRINT = _UxGT("Host BaÅlatma");
+ LSTR MSG_PRINTING_OBJECT = _UxGT("Nesneyi Yazdır");
+ LSTR MSG_CANCEL_OBJECT = _UxGT("Nesneyi Ä°ptal Et");
+ LSTR MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi Ä°ptal Et =");
+ LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Ä°Åe Devam Et");
+ LSTR MSG_MEDIA_MENU = MEDIA_TYPE_EN _UxGT(" Yazdır");
+ LSTR MSG_TURN_OFF = _UxGT("Åimdi kapat");
+ LSTR MSG_END_LOOPS = _UxGT("Son DöngÌler");
+ #endif
LSTR MSG_NO_MEDIA = _UxGT("SD Kart Yok!");
LSTR MSG_DWELL = _UxGT("Uyku...");
- LSTR MSG_USERWAIT = _UxGT("Operatör bekleniyor.");
+ LSTR MSG_USERWAIT = _UxGT("Devam için tıkla...");
LSTR MSG_PRINT_PAUSED = _UxGT("Baskı Duraklatıldı");
LSTR MSG_PRINTING = _UxGT("Baskı Yapılıyor...");
+ LSTR MSG_STOPPING = _UxGT("Durduruluyor...");
+ LSTR MSG_REMAINING_TIME = _UxGT("Kalan");
LSTR MSG_PRINT_ABORTED = _UxGT("Baskı Durduruldu!");
+ LSTR MSG_PRINT_DONE = _UxGT("Yazdırma Bitti");
+ LSTR MSG_PRINTER_KILLED = _UxGT("Yazıcı çöktÌ!");
LSTR MSG_NO_MOVE = _UxGT("Ä°Ålem yok.");
- LSTR MSG_KILLED = _UxGT("Kilitlendi. ");
- LSTR MSG_STOPPED = _UxGT("Durdu. ");
+ LSTR MSG_KILLED = _UxGT("ÃÃKTÃ. ");
+ LSTR MSG_STOPPED = _UxGT("DURDURULDU. ");
+ LSTR MSG_FWRETRACT = _UxGT("Yazılım Geri Ãekme");
LSTR MSG_CONTROL_RETRACT = _UxGT("Geri Ãek mm");
LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Re.mm");
LSTR MSG_CONTROL_RETRACTF = _UxGT("Geri Ãekme V");
LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Atlama mm");
- LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm");
+ LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Geri Ãek. mm");
LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm");
LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V");
LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V");
LSTR MSG_AUTORETRACT = _UxGT("Oto. Geri Ãekme");
LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("G.Ãekme Boyu");
+ LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Ekstra DeÄiÅtir");
LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Tasfiye uzunluÄu");
LSTR MSG_TOOL_CHANGE = _UxGT("Takım DeÄiÅimi");
LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z YÃŒkselt");
LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Birincil Hız");
+ LSTR MSG_SINGLENOZZLE_WIPE_RETRACT = _UxGT("Geri Ãekme Sil");
LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Geri Ãekme Hızı");
- LSTR MSG_NOZZLE_STANDBY = _UxGT("Nozul Beklemede");
+ LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Kafa Park");
+ LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Kurtarma Hızı");
+ LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Fan Hızı");
+ LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Fan SÃŒresi");
+ LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Otomatik AÃIK");
+ LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("Otomatik KAPALI");
+ LSTR MSG_TOOL_MIGRATION = _UxGT("Takım TaÅıma");
+ LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("Otomatik-taÅıma");
+ LSTR MSG_TOOL_MIGRATION_END = _UxGT("Son Ekstruder");
+ LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("* konumuna taÅı");
LSTR MSG_FILAMENTCHANGE = _UxGT("Filaman DeÄiÅtir");
LSTR MSG_FILAMENTCHANGE_E = _UxGT("Filaman DeÄiÅtir *");
LSTR MSG_FILAMENTLOAD = _UxGT("Filaman YÃŒkle");
@@ -366,36 +542,42 @@ namespace Language_tr {
LSTR MSG_FILAMENTUNLOAD = _UxGT("Filaman Ãıkart");
LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Filaman Ãıkart *");
LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("TÃŒmÃŒnÃŒ Ãıkart");
- LSTR MSG_ATTACH_MEDIA = _UxGT("SD Kart BaÅlatılıyor");
- LSTR MSG_CHANGE_MEDIA = _UxGT("SD Kart DeÄiÅtir");
- LSTR MSG_RELEASE_MEDIA = _UxGT("SD Kart Ãıkart");
- LSTR MSG_ZPROBE_OUT = _UxGT("Z Prob Açık. Tabla");
+ LSTR MSG_ATTACH_MEDIA = _UxGT("Ekle ") MEDIA_TYPE_EN;
+ LSTR MSG_CHANGE_MEDIA = _UxGT("DeÄiÅtir ") MEDIA_TYPE_EN;
+ LSTR MSG_RELEASE_MEDIA = _UxGT("Ãıkart ") MEDIA_TYPE_EN;
+ LSTR MSG_ZPROBE_OUT = _UxGT("Z Prob Tablayı Geçti");
LSTR MSG_SKEW_FACTOR = _UxGT("Ãarpıklık FaktörÃŒ");
LSTR MSG_BLTOUCH = _UxGT("BLTouch");
LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch K. Test");
- LSTR MSG_BLTOUCH_RESET = _UxGT("Reset");
+ LSTR MSG_BLTOUCH_RESET = _UxGT("Sıfırla");
LSTR MSG_BLTOUCH_STOW = _UxGT("Kapat");
LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Aç");
LSTR MSG_BLTOUCH_SW_MODE = _UxGT("SW-Modu");
+ LSTR MSG_BLTOUCH_SPEED_MODE = _UxGT("YÌksek Hız");
LSTR MSG_BLTOUCH_5V_MODE = _UxGT("5V-Modu");
LSTR MSG_BLTOUCH_OD_MODE = _UxGT("OD-Modu");
LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Mode-Store");
LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("BLTouch 5V Ayarla");
LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("BLTouch OD Ayarla");
LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Drenaj Raporu");
- LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("TEHLIKE: KötÌ ayarlar hasara neden olabilir! Yine de devam edilsin mi?");
+ LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("TEHLIKE: KötÌ ayarlar zarar verebilir! Yine de devam edilsin mi?");
LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI");
- LSTR MSG_TOUCHMI_INIT = _UxGT("Init TouchMI");
+ LSTR MSG_TOUCHMI_INIT = _UxGT("TouchMI'yi BaÅlat");
LSTR MSG_TOUCHMI_ZTEST = _UxGT("Z Ofset Testi");
LSTR MSG_TOUCHMI_SAVE = _UxGT("Kaydet");
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI Aç");
LSTR MSG_MANUAL_DEPLOY = _UxGT("Z-Probe Aç");
LSTR MSG_MANUAL_STOW = _UxGT("Z-Probe Kapat");
LSTR MSG_HOME_FIRST = _UxGT("Ãnce %s%s%s Sıfırla");
+ LSTR MSG_ZPROBE_SETTINGS = _UxGT("Prob Ayarları");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Prob Ofsetleri");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("X Prob Ofset");
LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y Prob Ofset");
LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Prob Ofset");
+ LSTR MSG_ZPROBE_MARGIN = _UxGT("Prob Payı");
+ LSTR MSG_Z_FEED_RATE = _UxGT("Z İlerleme Hızı");
+ LSTR MSG_ENABLE_HS_MODE = _UxGT("HS modunu aç");
+ LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("NozÃŒlÃŒ Tablaya TaÅı");
LSTR MSG_BABYSTEP_X = _UxGT("Miniadım X");
LSTR MSG_BABYSTEP_Y = _UxGT("Miniadım Y");
LSTR MSG_BABYSTEP_Z = _UxGT("Miniadım Z");
@@ -403,23 +585,28 @@ namespace Language_tr {
LSTR MSG_BABYSTEP_TOTAL = _UxGT("Toplam");
LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop iptal");
LSTR MSG_HEATING_FAILED_LCD = _UxGT("Isınma baÅarısız");
- LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Hata: Sıcaklık AÅımı");
- LSTR MSG_THERMAL_RUNAWAY = _UxGT("TERMAL PROBLEM");
- LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("TABLA TERMAL PROBLEM");
- LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ODA TERMAL PROBLEM");
+ LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Hata: ISI AÅIMI");
+ LSTR MSG_THERMAL_RUNAWAY = _UxGT("ISI SORUNU");
+ LSTR MSG_TEMP_MALFUNCTION = _UxGT("SICAKLIK ARIZASI");
+ LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("TABLA ISI SORUNU");
+ LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("KABÄ°N ISI SORUNU");
+ LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("SoÄutucu Isı Sorunu");
+ LSTR MSG_COOLING_FAILED = _UxGT("SoÄutma BaÅarısız");
LSTR MSG_ERR_MAXTEMP = _UxGT("Hata: MAX.SICAKLIK");
LSTR MSG_ERR_MINTEMP = _UxGT("Hata: MIN.SICAKLIK");
LSTR MSG_HALTED = _UxGT("YAZICI DURDURULDU");
+ LSTR MSG_PLEASE_WAIT = _UxGT("LÃŒtfen bekleyin...");
LSTR MSG_PLEASE_RESET = _UxGT("LÃŒtfen Resetleyin");
- LSTR MSG_SHORT_DAY = _UxGT("G"); // One character only
- LSTR MSG_SHORT_HOUR = _UxGT("S"); // One character only
- LSTR MSG_SHORT_MINUTE = _UxGT("D"); // One character only
+ LSTR MSG_PREHEATING = _UxGT("ön ısıtma...");
LSTR MSG_HEATING = _UxGT("Isınıyor...");
LSTR MSG_COOLING = _UxGT("SoÄuyor...");
LSTR MSG_BED_HEATING = _UxGT("Tabla Isınıyor...");
LSTR MSG_BED_COOLING = _UxGT("Tabla SoÄuyor...");
- LSTR MSG_CHAMBER_HEATING = _UxGT("Oda Isınıyor...");
- LSTR MSG_CHAMBER_COOLING = _UxGT("Oda SoÄuyor...");
+ LSTR MSG_PROBE_HEATING = _UxGT("Prob ısınıyor...");
+ LSTR MSG_PROBE_COOLING = _UxGT("Prob SoÄuyor...");
+ LSTR MSG_CHAMBER_HEATING = _UxGT("Kabin Isınıyor...");
+ LSTR MSG_CHAMBER_COOLING = _UxGT("Kabin SoÄuyor...");
+ LSTR MSG_LASER_COOLING = _UxGT("Lazer SoÄuyor...");
LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibrasyonu");
LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Ayarla X");
LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Ayarla Y");
@@ -432,35 +619,59 @@ namespace Language_tr {
LSTR MSG_DELTA_RADIUS = _UxGT("Yarıçap");
LSTR MSG_INFO_MENU = _UxGT("Yazıcı Hakkında");
LSTR MSG_INFO_PRINTER_MENU = _UxGT("Yazıcı Bilgisi");
- LSTR MSG_3POINT_LEVELING = _UxGT("3-Nokta Hizalama");
- LSTR MSG_LINEAR_LEVELING = _UxGT("DoÄrusal Hizalama");
+ LSTR MSG_3POINT_LEVELING = _UxGT("3-Nokta Seviyeleme");
+ LSTR MSG_LINEAR_LEVELING = _UxGT("DoÄrusal Seviyeleme");
LSTR MSG_BILINEAR_LEVELING = _UxGT("Ä°ki YönlÃŒ DoÄ. Hiza.");
LSTR MSG_UBL_LEVELING = _UxGT("BirleÅik Tabla Hiza.");
- LSTR MSG_MESH_LEVELING = _UxGT("Mesh Hizalama");
+ LSTR MSG_MESH_LEVELING = _UxGT("Mesh Seviyeleme");
+ LSTR MSG_MESH_DONE = _UxGT("Mesh sondalama tamam");
LSTR MSG_INFO_STATS_MENU = _UxGT("Ä°statistikler");
LSTR MSG_INFO_BOARD_MENU = _UxGT("KontrolcÌ Bilgisi");
LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistörler");
LSTR MSG_INFO_EXTRUDERS = _UxGT("Ekstruderler");
LSTR MSG_INFO_BAUDRATE = _UxGT("Ä°letiÅim Hızı");
LSTR MSG_INFO_PROTOCOL = _UxGT("Protokol");
+ LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Kaçak İzleme: KAPALI");
+ LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Kaçak Ä°zleme: AÃIK");
+ LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hotend BoÅta Zamn AÅ");
+ LSTR MSG_FAN_SPEED_FAULT = _UxGT("Fan hızı hatası");
+
LSTR MSG_CASE_LIGHT = _UxGT("Aydınlatmayı Aç");
- LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Aydınlatma ParlaklÄı");
+ LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("IÅık ParlaklÄı");
LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("YanlıŠYazıcı");
+ LSTR MSG_COLORS_GET = _UxGT("Renk Al");
+ LSTR MSG_COLORS_SELECT = _UxGT("Renkleri Seç");
+ LSTR MSG_COLORS_APPLIED = _UxGT("Uygulanan renkler");
+ LSTR MSG_COLORS_RED = _UxGT("Kırmızı");
+ LSTR MSG_COLORS_GREEN = _UxGT("YeÅil");
+ LSTR MSG_COLORS_BLUE = _UxGT("Mavi");
+ LSTR MSG_COLORS_WHITE = _UxGT("Beyaz");
+ LSTR MSG_UI_LANGUAGE = _UxGT("UI Dili");
+ LSTR MSG_SOUND_ENABLE = _UxGT("Sesi etkinleÅtir");
+ LSTR MSG_LOCKSCREEN = _UxGT("Kilit Ekranı");
+ LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Yazıcı Kilitlendi,");
+ LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Açmak için kaydırın.");
+ LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Y.BaÅlatma bekleyin.");
+
#if LCD_WIDTH >= 20 || HAS_DWIN_E3V2
+ LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("Ortam yerleÅtirilmedi.");
+ LSTR MSG_PLEASE_PREHEAT = _UxGT("LÌtfen önce hotend'i ısıtın.");
+ LSTR MSG_INFO_PRINT_COUNT_RESET = _UxGT("Baskı Sayısını Sıfırla");
LSTR MSG_INFO_PRINT_COUNT = _UxGT("Baskı Sayısı");
- LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Tamamlanan");
LSTR MSG_INFO_PRINT_TIME = _UxGT("Toplam Baskı SÌresi");
LSTR MSG_INFO_PRINT_LONGEST = _UxGT("En Uzun Baskı SÌresi");
LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Toplam Filaman");
#else
+ LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("Medya Yok");
+ LSTR MSG_PLEASE_PREHEAT = _UxGT("Ãn Isıtma LÃŒtfen");
LSTR MSG_INFO_PRINT_COUNT = _UxGT("Baskı");
- LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Tamamlanan");
LSTR MSG_INFO_PRINT_TIME = _UxGT("SÃŒre");
LSTR MSG_INFO_PRINT_LONGEST = _UxGT("En Uzun");
LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Filaman");
#endif
+ LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Tamamlanan");
LSTR MSG_INFO_MIN_TEMP = _UxGT("Min Sıc.");
LSTR MSG_INFO_MAX_TEMP = _UxGT("Max Sıc.");
LSTR MSG_INFO_PSU = _UxGT("GÌç KaynaÄı");
@@ -475,9 +686,15 @@ namespace Language_tr {
LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("Seçenekler:");
LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Daha Fazla Tasviye");
LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Baskıyı sÌrdÌr");
+ LSTR MSG_FILAMENT_CHANGE_PURGE_CONTINUE = _UxGT("Temizle veya Devam?");
LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozul: ");
LSTR MSG_RUNOUT_SENSOR = _UxGT("Runout SensörÌ");
LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("AÅınma Farkı mm");
+ LSTR MSG_RUNOUT_ENABLE = _UxGT("Fil. Sens. Aç");
+ LSTR MSG_RUNOUT_ACTIVE = _UxGT("Fil. Sens. Aktif");
+ LSTR MSG_INVERT_EXTRUDER = _UxGT("Ekstruder Ters Ãevir");
+ LSTR MSG_EXTRUDER_MIN_TEMP = _UxGT("Ekstruder Min Isı");
+ LSTR MSG_FANCHECK = _UxGT("Fan Takosu KontrolÌ");
LSTR MSG_KILL_HOMING_FAILED = _UxGT("Sıfırlama BaÅarısız");
LSTR MSG_LCD_PROBING_FAILED = _UxGT("Probing BaÅarısız");
@@ -527,6 +744,20 @@ namespace Language_tr {
LSTR MSG_SNAKE = _UxGT("Sn4k3");
LSTR MSG_MAZE = _UxGT("Maze");
+ LSTR MSG_BAD_PAGE = _UxGT("Hatalı sayfa dizini");
+ LSTR MSG_BAD_PAGE_SPEED = _UxGT("KötÌ sayfa hızı");
+
+ LSTR MSG_EDIT_PASSWORD = _UxGT("Åifreyi DÃŒzenle");
+ LSTR MSG_LOGIN_REQUIRED = _UxGT("GiriÅ Gerekli");
+ LSTR MSG_PASSWORD_SETTINGS = _UxGT("Åifre Ayarları");
+ LSTR MSG_ENTER_DIGIT = _UxGT("Rakam girin");
+ LSTR MSG_CHANGE_PASSWORD = _UxGT("Åifre Belirle/DÃŒzenle");
+ LSTR MSG_REMOVE_PASSWORD = _UxGT("Åifre Kaldır");
+ LSTR MSG_PASSWORD_SET = _UxGT("Åifre ");
+ LSTR MSG_START_OVER = _UxGT("Yeniden BaÅla");
+ LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Kaydetmeyi Unutma!");
+ LSTR MSG_PASSWORD_REMOVED = _UxGT("Åifre Kaldırıldı");
+
//
// Filament DeÄiÅim ekranları 4 satırlı ekranda 3 satıra kadar gösterilir
// ...veya 3 satırlı ekranda 2 satıra kadar
@@ -568,12 +799,43 @@ namespace Language_tr {
LSTR MSG_BACKLASH = _UxGT("Ters Tepki");
LSTR MSG_BACKLASH_CORRECTION = _UxGT("DÃŒzeltme");
LSTR MSG_BACKLASH_SMOOTHING = _UxGT("YumuÅatma");
-}
-#if FAN_COUNT == 1
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED
-#else
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N
-#endif
+ LSTR MSG_LEVEL_X_AXIS = _UxGT("Seviye X Ekseni");
+ LSTR MSG_AUTO_CALIBRATE = _UxGT("Otomatik Kalibre Et");
+ #if ENABLED(TOUCH_UI_FTDI_EVE)
+ LSTR MSG_HEATER_TIMEOUT = _UxGT("BoÅta kalma zaman aÅımı, sıcaklık dÃŒÅtÃŒ. Yeniden ısıtmak ve tekrar devam etmek için için Tamam'a basın.");
+ #else
+ LSTR MSG_HEATER_TIMEOUT = _UxGT("Isıtıcı Zaman AÅımı");
+ #endif
+ LSTR MSG_REHEAT = _UxGT("Yeniden ısıt");
+ LSTR MSG_REHEATING = _UxGT("Yeniden ısıtılıyor...");
+ LSTR MSG_REHEATDONE = _UxGT("Y. Isıtma Tamam");
+
+ LSTR MSG_PROBE_WIZARD = _UxGT("Z Prob Sihirbazı");
+ LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Z Referansını Tarama");
+ LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Prob Konumuna Geçme");
+
+ LSTR MSG_XATC = _UxGT("X-Twist Sihirbazı");
+ LSTR MSG_XATC_DONE = _UxGT("X-Twist Sihirbazı Bitti!");
+ LSTR MSG_XATC_UPDATE_Z_OFFSET = _UxGT("Prob Z-Offset gÃŒncelle ");
+
+ LSTR MSG_SOUND = _UxGT("Ses");
+
+ LSTR MSG_TOP_LEFT = _UxGT("Ãst Sol");
+ LSTR MSG_BOTTOM_LEFT = _UxGT("Alt Sol");
+ LSTR MSG_TOP_RIGHT = _UxGT("Ãst SaÄ");
+ LSTR MSG_BOTTOM_RIGHT = _UxGT("Alt SaÄ");
+ LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Kalibrasyon Tamamlandı");
+ LSTR MSG_CALIBRATION_FAILED = _UxGT("Kalibrasyon BaÅarısız");
+
+ LSTR MSG_DRIVER_BACKWARD = _UxGT(" driver backward");
+
+ LSTR MSG_SD_CARD = _UxGT("SD Kart");
+ LSTR MSG_USB_DISK = _UxGT("USB Disk");
+
+ LSTR MSG_HOST_SHUTDOWN = _UxGT("Host'u Kapat");
+
+ LSTR MSG_SHORT_DAY = _UxGT("g"); // One character only
+ LSTR MSG_SHORT_HOUR = _UxGT("s"); // One character only
+ LSTR MSG_SHORT_MINUTE = _UxGT("d"); // One character only
+}
diff --git a/Marlin/Marlin/src/lcd/language/language_uk.h b/Marlin/Marlin/src/lcd/language/language_uk.h
index 63dfb3eb..c6ba3d9e 100644
--- a/Marlin/Marlin/src/lcd/language/language_uk.h
+++ b/Marlin/Marlin/src/lcd/language/language_uk.h
@@ -213,10 +213,10 @@ namespace Language_uk {
LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Ð ÑÑ
ЎП МаÑÑÑпМПÑ");
LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("ÐкÑОвÑваÑО UBL");
LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("ÐеакÑОвÑваÑО UBL");
- LSTR MSG_UBL_SET_TEMP_BED = LCD_STR_THERMOMETER _UxGT(" ÑÑПлÑ, ") LCD_STR_DEGREE "C";
- LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Ð¡Ð²ÐŸÑ ") LCD_STR_THERMOMETER _UxGT(" ÑÑПлÑ,") LCD_STR_DEGREE "C";
- LSTR MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" ÑПпла, ") LCD_STR_DEGREE "C";
- LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Ð¡Ð²ÐŸÑ ") LCD_STR_THERMOMETER _UxGT(" ÑПпла,") LCD_STR_DEGREE "C";
+ LSTR MSG_UBL_SET_TEMP_BED = LCD_STR_THERMOMETER _UxGT(" ÑÑПлÑ, ") LCD_STR_DEGREE _UxGT("C");
+ LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Ð¡Ð²ÐŸÑ ") LCD_STR_THERMOMETER _UxGT(" ÑÑПлÑ,") LCD_STR_DEGREE _UxGT("C");
+ LSTR MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" ÑПпла, ") LCD_STR_DEGREE _UxGT("C");
+ LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Ð¡Ð²ÐŸÑ ") LCD_STR_THERMOMETER _UxGT(" ÑПпла,") LCD_STR_DEGREE _UxGT("C");
#if LCD_WIDTH > 21 || HAS_DWIN_E3V2
LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("РеЎагÑваÑО ÑÐ²ÐŸÑ ÑÑÑкÑ");
LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("ТПÑМе ÑеЎагÑÐ²Ð°ÐœÐœÑ ÑÑÑкО");
@@ -344,12 +344,12 @@ namespace Language_uk {
LSTR MSG_MOVE_100MM = _UxGT("Ð ÑÑ
100mm");
LSTR MSG_SPEED = _UxGT("КвОЎкÑÑÑÑ");
LSTR MSG_BED_Z = _UxGT("Z СÑПлÑ");
- LSTR MSG_NOZZLE = _UxGT("СПплП, ") LCD_STR_DEGREE "C";
+ LSTR MSG_NOZZLE = _UxGT("СПплП, ") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_NOZZLE_N = _UxGT("СПплП ~");
LSTR MSG_NOZZLE_PARKED = _UxGT("СПплП запаÑкПваМе");
LSTR MSG_NOZZLE_STANDBY = _UxGT("СПплП ПÑÑкÑÑ");
- LSTR MSG_BED = _UxGT("СÑÑл, ") LCD_STR_DEGREE "C";
- LSTR MSG_CHAMBER = _UxGT("ÐаЌеÑа,") LCD_STR_DEGREE "C";
+ LSTR MSG_BED = _UxGT("СÑÑл, ") LCD_STR_DEGREE _UxGT("C");
+ LSTR MSG_CHAMBER = _UxGT("ÐаЌеÑа,") LCD_STR_DEGREE _UxGT("C");
#if LCD_WIDTH > 21 || HAS_DWIN_E3V2
LSTR MSG_COOLER = _UxGT("ÐÑ
ÐŸÐ»ÐŸÐŽÐ¶ÐµÐœÐœÑ Ð»Ð°Ð·ÐµÑÑ");
LSTR MSG_COOLER_TOGGLE = _UxGT("ÐеÑеЌк. ПÑ
ПлПЎж.");
@@ -391,7 +391,6 @@ namespace Language_uk {
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("ÐбÑй авÑПпÑЎбПÑÑ! ТеЌпеÑаÑÑÑа завОÑеМа.");
LSTR MSG_PID_TIMEOUT = _UxGT("ÐбÑй авÑПпÑЎбПÑÑ! ÐОÑеÑпаМ ÑаÑ.");
- LSTR MSG_SELECT = _UxGT("ÐОбÑаÑО");
LSTR MSG_SELECT_E = _UxGT("ÐОбÑаÑО *");
LSTR MSG_ACC = _UxGT("ÐÑОÑкПÑПÑеММÑ");
LSTR MSG_JERK = _UxGT("РОвПк");
@@ -466,7 +465,7 @@ namespace Language_uk {
LSTR MSG_INIT_EEPROM = _UxGT("ÐÐœÑÑÑалÑз. EEPROM");
#endif
LSTR MSG_ERR_EEPROM_CRC = _UxGT("ÐбÑй EEPROM: CRC");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("ÐбÑй EEPROM: ÑМЎекÑ");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("ÐбÑй EEPROM: ÑПзЌÑÑ");
LSTR MSG_ERR_EEPROM_VERSION = _UxGT("ÐбÑй EEPROM: веÑÑÑÑ");
LSTR MSG_SETTINGS_STORED = _UxGT("ÐаÑаЌеÑÑО збеÑежеМÑ");
LSTR MSG_MEDIA_UPDATE = _UxGT("ÐМПвОÑО SD-каÑÑкÑ");
@@ -599,7 +598,7 @@ namespace Language_uk {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("УÑÑаМПвОÑО TouchMI");
LSTR MSG_MANUAL_DEPLOY = _UxGT("УÑÑаМПвОÑО Z-зПМЎ");
LSTR MSG_MANUAL_STOW = _UxGT("ÐаваМÑажОÑО Z-зПМЎ");
- LSTR MSG_HOME_FIRST = _UxGT("СпПÑаÑÐºÑ ÐŽÑÐŒ %s%s%s");
+ LSTR MSG_HOME_FIRST = _UxGT("СпПÑаÑÐºÑ ÐŽÑÐŒ %s");
LSTR MSG_ZPROBE_OFFSETS = _UxGT("ÐÐŒÑÑÐµÐœÐœÑ Ð·ÐŸÐœÐŽÑ");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("ÐÐŒÑÑÐµÐœÐœÑ Ð¿ÐŸ X");
LSTR MSG_ZPROBE_YOFFSET = _UxGT("ÐÐŒÑÑÐµÐœÐœÑ Ð¿ÐŸ Y");
@@ -626,9 +625,6 @@ namespace Language_uk {
LSTR MSG_ERR_MINTEMP = _UxGT("ÐÐÐÐÐÐÐЬÐРТ") LCD_STR_DEGREE;
LSTR MSG_HALTED = _UxGT("ÐÐ ÐÐТÐÐ ÐУÐÐÐÐÐÐ");
LSTR MSG_PLEASE_RESET = _UxGT("ÐеÑезаваМÑажÑе");
- LSTR MSG_SHORT_DAY = _UxGT("ÐŽ"); // One character only
- LSTR MSG_SHORT_HOUR = _UxGT("г"); // One character only
- LSTR MSG_SHORT_MINUTE = _UxGT("Ñ
"); // One character only
LSTR MSG_HEATING = _UxGT("ÐагÑÑваММÑ...");
LSTR MSG_COOLING = _UxGT("ÐÑ
ПлПЎжеММÑ...");
LSTR MSG_BED_HEATING = _UxGT("ÐагÑÑв ÑÑПлÑ...");
@@ -918,12 +914,8 @@ namespace Language_uk {
#endif
LSTR MSG_SD_CARD = _UxGT("SD ÐаÑÑка");
LSTR MSG_USB_DISK = _UxGT("USB ÐОÑк");
-}
-#if FAN_COUNT == 1
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED
-#else
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N
-#endif
+ LSTR MSG_SHORT_DAY = _UxGT("ÐŽ"); // One character only
+ LSTR MSG_SHORT_HOUR = _UxGT("г"); // One character only
+ LSTR MSG_SHORT_MINUTE = _UxGT("Ñ
"); // One character only
+}
diff --git a/Marlin/Marlin/src/lcd/language/language_vi.h b/Marlin/Marlin/src/lcd/language/language_vi.h
index 27c6ee11..3b833492 100644
--- a/Marlin/Marlin/src/lcd/language/language_vi.h
+++ b/Marlin/Marlin/src/lcd/language/language_vi.h
@@ -224,7 +224,6 @@ namespace Language_vi {
LSTR MSG_AUTOTEMP = _UxGT("Nhiá»t Äá» tá»± Äá»ng"); // Autotemp
LSTR MSG_LCD_ON = _UxGT("Báºt"); // on
LSTR MSG_LCD_OFF = _UxGT("Tắt"); // off
- LSTR MSG_SELECT = _UxGT("Lá»±a"); // Select
LSTR MSG_SELECT_E = _UxGT("Lá»±a *");
LSTR MSG_ACC = _UxGT("TÄng Tá»c");
LSTR MSG_JERK = _UxGT("Giáºt");
@@ -327,7 +326,7 @@ namespace Language_vi {
LSTR MSG_BLTOUCH_STOW = _UxGT("Cất BLTouch"); // Stow BLTouch
LSTR MSG_MANUAL_DEPLOY = _UxGT("Äem Äầu Dò-Z"); // Deploy Z-Probe
LSTR MSG_MANUAL_STOW = _UxGT("Cất Äầu Dò-Z"); // Stow Z-Probe
- LSTR MSG_HOME_FIRST = _UxGT("Vá» nhà %s%s%s TrÆ°Æ¡Íc");
+ LSTR MSG_HOME_FIRST = _UxGT("Vá» nhà %s TrÆ°Æ¡Íc");
LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Äầu Dò Bù Äắp Z"); // Probe Z Offset
LSTR MSG_BABYSTEP_X = _UxGT("NhÃt X"); // Babystep X
LSTR MSG_BABYSTEP_Y = _UxGT("NhÃt Y");
@@ -342,9 +341,6 @@ namespace Language_vi {
LSTR MSG_ERR_MINTEMP = _UxGT("ÄiêÍu sai: nhiá»t Äá» tá»i thiá»u"); // Err: MINTEMP
LSTR MSG_HALTED = _UxGT("MÃY IN Äà DƯÍNG LAÌ£I"); // PRINTER HALTED
LSTR MSG_PLEASE_RESET = _UxGT("Xin bặt lại"); // Please reset
- LSTR MSG_SHORT_DAY = _UxGT("n"); // d - ngà y - One character only
- LSTR MSG_SHORT_HOUR = _UxGT("g"); // h - giá» - One character only
- LSTR MSG_SHORT_MINUTE = _UxGT("p"); // m - phút - One character only
LSTR MSG_HEATING = _UxGT("Äang sÆ°á»i noÍng..."); // heating
LSTR MSG_COOLING = _UxGT("Äang laÍm nguÃŽÌ£i..."); // cooling
LSTR MSG_BED_HEATING = _UxGT("Äang sÆ°á»i nong bà n..."); // bed heating
@@ -438,4 +434,8 @@ namespace Language_vi {
LSTR MSG_TMC_HOMING_THRS = _UxGT("VÎ cảm biến"); // Sensorless homing
LSTR MSG_TMC_STEPPING_MODE = _UxGT("Chế Äá» từng bÆ°á»c"); // Stepping mode
LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("CắtTà ngHình Äược kÃch hoạt"); // StealthChop enabled
+
+ LSTR MSG_SHORT_DAY = _UxGT("n"); // d - ngà y - One character only
+ LSTR MSG_SHORT_HOUR = _UxGT("g"); // h - giá» - One character only
+ LSTR MSG_SHORT_MINUTE = _UxGT("p"); // m - phút - One character only
}
diff --git a/Marlin/Marlin/src/lcd/language/language_zh_CN.h b/Marlin/Marlin/src/lcd/language/language_zh_CN.h
index 4c5a94ed..9dbb61e7 100644
--- a/Marlin/Marlin/src/lcd/language/language_zh_CN.h
+++ b/Marlin/Marlin/src/lcd/language/language_zh_CN.h
@@ -264,7 +264,6 @@ namespace Language_zh_CN {
LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("èªåšè°å€±èŽ¥! åçæ€åºæº");
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("èªåšè°å€±èŽ¥! 枩床倪é«");
LSTR MSG_PID_TIMEOUT = _UxGT("èªåšè°å€±èŽ¥! è¶
æ¶");
- LSTR MSG_SELECT = _UxGT("éæ©"); // "Select"
LSTR MSG_SELECT_E = _UxGT("éæ© *");
LSTR MSG_ACC = _UxGT("å é床"); // "Accel" acceleration
LSTR MSG_JERK = _UxGT("æåšéç"); // "Jerk"
@@ -318,9 +317,9 @@ namespace Language_zh_CN {
LSTR MSG_LOAD_EEPROM = _UxGT("è£
蜜讟眮"); // "Load memory"
LSTR MSG_RESTORE_DEFAULTS = _UxGT("æ¢å€å®å
šåŒ"); // "Restore Defaults"
LSTR MSG_INIT_EEPROM = _UxGT("åå§å讟眮"); // "Initialize EEPROM"
- LSTR MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC é误");
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index é误");
- LSTR MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version é误");
+ LSTR MSG_ERR_EEPROM_CRC = _UxGT("EEPROM æ ¡éªå é误");
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("EEPROM 尺寞 é误");
+ LSTR MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM çæ¬ é误");
LSTR MSG_SETTINGS_STORED = _UxGT("讟眮已ä¿å");
LSTR MSG_MEDIA_UPDATE = _UxGT("ååšåšæŽæ°");
LSTR MSG_RESET_PRINTER = _UxGT("å€äœæå°æº");
@@ -420,7 +419,7 @@ namespace Language_zh_CN {
LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("éšçœ²TouchMI");
LSTR MSG_MANUAL_DEPLOY = _UxGT("éšçœ²Zæ¢é");
LSTR MSG_MANUAL_STOW = _UxGT("æ¶å¥œZæ¢é");
- LSTR MSG_HOME_FIRST = _UxGT("åœäœ %s%s%s å
"); // "Home ... first"
+ LSTR MSG_HOME_FIRST = _UxGT("åœäœ %s å
"); // "Home ... first"
LSTR MSG_ZPROBE_OFFSETS = _UxGT("æ¢éå移é");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("æ¢éXå移");
LSTR MSG_ZPROBE_YOFFSET = _UxGT("æ¢éYå移");
@@ -439,9 +438,6 @@ namespace Language_zh_CN {
LSTR MSG_ERR_MINTEMP = _UxGT("é误ïŒæäœæž©åºŠ"); // "Err: MINTEMP"
LSTR MSG_HALTED = _UxGT("æå°åæº"); // "PRINTER HALTED"
LSTR MSG_PLEASE_RESET = _UxGT("请é眮"); // "Please reset"
- LSTR MSG_SHORT_DAY = _UxGT("倩"); // "d" // One character only
- LSTR MSG_SHORT_HOUR = _UxGT("æ¶"); // "h" // One character only
- LSTR MSG_SHORT_MINUTE = _UxGT("å"); // "m" // One character only
LSTR MSG_HEATING = _UxGT("å çäž ..."); // "Heating..."
LSTR MSG_COOLING = _UxGT("å·åŽäž ...");
LSTR MSG_BED_HEATING = _UxGT("å ççåºäž ..."); // "Bed Heating..."
@@ -609,12 +605,8 @@ namespace Language_zh_CN {
LSTR MSG_HEATER_TIMEOUT = _UxGT("å çåšè¶
æ¶");
LSTR MSG_REHEAT = _UxGT("éæ°å ç");
LSTR MSG_REHEATING = _UxGT("éæ°å çäž...");
-}
-#if FAN_COUNT == 1
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED
-#else
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N
-#endif
+ LSTR MSG_SHORT_DAY = _UxGT("倩"); // "d" // One character only
+ LSTR MSG_SHORT_HOUR = _UxGT("æ¶"); // "h" // One character only
+ LSTR MSG_SHORT_MINUTE = _UxGT("å"); // "m" // One character only
+}
diff --git a/Marlin/Marlin/src/lcd/language/language_zh_TW.h b/Marlin/Marlin/src/lcd/language/language_zh_TW.h
index 2aa3554f..49e57d62 100644
--- a/Marlin/Marlin/src/lcd/language/language_zh_TW.h
+++ b/Marlin/Marlin/src/lcd/language/language_zh_TW.h
@@ -249,7 +249,6 @@ namespace Language_zh_TW {
LSTR MSG_LCD_ON = _UxGT("é "); // "On"
LSTR MSG_LCD_OFF = _UxGT("é "); // "Off"
- LSTR MSG_SELECT = _UxGT("éžæ"); // "Select"
LSTR MSG_SELECT_E = _UxGT("éžæ *");
LSTR MSG_ACC = _UxGT("å é床"); // "Accel" acceleration
LSTR MSG_JERK = _UxGT("æåéç"); // "Jerk"
@@ -300,8 +299,8 @@ namespace Language_zh_TW {
LSTR MSG_RESTORE_DEFAULTS = _UxGT("æ¢åŸ©å®å
šåŒ"); // "Restore failsafe"
LSTR MSG_INIT_EEPROM = _UxGT("åå§åèšçœ®"); // "Initialize EEPROM"
LSTR MSG_ERR_EEPROM_CRC = _UxGT("é¯èª€: EEPROM CRC"); // "Err: EEPROM CRC"
- LSTR MSG_ERR_EEPROM_INDEX = _UxGT("é¯èª€: EEPROM Index"); // "Err: EEPROM Index"
- LSTR MSG_ERR_EEPROM_VERSION = _UxGT("é¯èª€: EEPROM Version"); // "EEPROM Version"
+ LSTR MSG_ERR_EEPROM_SIZE = _UxGT("é¯èª€: EEPROM 尺寞"); // "Err: EEPROM Index"
+ LSTR MSG_ERR_EEPROM_VERSION = _UxGT("é¯èª€: EEPROM çæ¬"); // "EEPROM Version"
LSTR MSG_MEDIA_UPDATE = _UxGT("åªé«æŽæ°"); // "Media Update"
LSTR MSG_RESET_PRINTER = _UxGT("é眮æå°æ©"); // "Reset Printer
LSTR MSG_REFRESH = _UxGT("å·æ°"); // "Refresh"
@@ -370,7 +369,7 @@ namespace Language_zh_TW {
LSTR MSG_BLTOUCH_STOW = _UxGT("è£èŒBLTouch"); // "Stow BLTouch"
LSTR MSG_BLTOUCH_DEPLOY = _UxGT("éšçœ²BLTouch"); // "Deploy BLTouch"
- LSTR MSG_HOME_FIRST = _UxGT("æžäœ %s%s%s å
"); // "Home ... first"
+ LSTR MSG_HOME_FIRST = _UxGT("æžäœ %s å
"); // "Home ... first"
LSTR MSG_ZPROBE_OFFSETS = _UxGT("æ¢éå移"); //Probe Offsets
LSTR MSG_ZPROBE_XOFFSET = _UxGT("æ¢éXå移é"); //Probe X Offset
LSTR MSG_ZPROBE_YOFFSET = _UxGT("æ¢éYå移é"); //Probe Y Offset
@@ -389,9 +388,6 @@ namespace Language_zh_TW {
LSTR MSG_ERR_MINTEMP = _UxGT("é¯èª€ïŒæäœæº«åºŠ"); // "Err: MINTEMP"
LSTR MSG_HALTED = _UxGT("å°è¡šæ©åæ©"); // "PRINTER HALTED"
LSTR MSG_PLEASE_RESET = _UxGT("è«é眮"); // "Please reset"
- LSTR MSG_SHORT_DAY = _UxGT("倩"); // "d" // One character only
- LSTR MSG_SHORT_HOUR = _UxGT("æ"); // "h" // One character only
- LSTR MSG_SHORT_MINUTE = _UxGT("å"); // "m" // One character only
LSTR MSG_HEATING = _UxGT("å ç±äž ..."); // "Heating..."
LSTR MSG_COOLING = _UxGT("å·å»äž ..."); // "Cooling..."
LSTR MSG_BED_HEATING = _UxGT("å ç±ç±åºäž ..."); // "Bed Heating..."
@@ -491,12 +487,8 @@ namespace Language_zh_TW {
LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("æäžå®æ..")); // "Click to finish"
LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("æ¢åŸ©äž ...")); // "Resuming..."
#endif // LCD_HEIGHT < 4
-}
-#if FAN_COUNT == 1
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED
-#else
- #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N
- #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N
-#endif
+ LSTR MSG_SHORT_DAY = _UxGT("倩"); // "d" // One character only
+ LSTR MSG_SHORT_HOUR = _UxGT("æ"); // "h" // One character only
+ LSTR MSG_SHORT_MINUTE = _UxGT("å"); // "m" // One character only
+}
diff --git a/Marlin/Marlin/src/lcd/marlinui.cpp b/Marlin/Marlin/src/lcd/marlinui.cpp
index ff12703c..604e9bb0 100644
--- a/Marlin/Marlin/src/lcd/marlinui.cpp
+++ b/Marlin/Marlin/src/lcd/marlinui.cpp
@@ -127,7 +127,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
#endif
#if ENABLED(PCA9632_BUZZER)
- void MarlinUI::buzz(const long duration, const uint16_t freq) {
+ void MarlinUI::buzz(const long duration, const uint16_t freq/*=0*/) {
if (sound_on) PCA9632_buzz(duration, freq);
}
#endif
@@ -149,7 +149,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
const preheat_t &pre = material_preset[m];
TERN_(HAS_HOTEND, if (TEST(pmask, PT_HOTEND)) thermalManager.setTargetHotend(pre.hotend_temp, e));
TERN_(HAS_HEATED_BED, if (TEST(pmask, PT_BED)) thermalManager.setTargetBed(pre.bed_temp));
- //TERN_(HAS_HEATED_CHAMBER, if (TEST(pmask, PT_CHAMBER)) thermalManager.setTargetBed(pre.chamber_temp));
+ //TERN_(HAS_HEATED_CHAMBER, if (TEST(pmask, PT_CHAMBER)) thermalManager.setTargetChamber(pre.chamber_temp));
TERN_(HAS_FAN, if (TEST(pmask, PT_FAN)) thermalManager.set_fan_speed(0, pre.fan_speed));
}
#endif
@@ -174,7 +174,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
#endif
#if HAS_U8GLIB_I2C_OLED && PINS_EXIST(I2C_SCL, I2C_SDA) && DISABLED(SOFT_I2C_EEPROM)
- #include "Wire.h"
+ #include
#endif
// Encoder Handling
@@ -346,7 +346,6 @@ void MarlinUI::init() {
#if IS_DWIN_MARLINUI
bool MarlinUI::did_first_redraw;
- bool MarlinUI::old_is_printing;
#endif
#if ENABLED(SDSUPPORT)
@@ -667,7 +666,7 @@ void MarlinUI::init() {
#if HAS_MARLINUI_MENU
if (use_click()) {
#if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
- next_filament_display = millis() + 5000UL; // Show status message for 5s
+ pause_filament_display();
#endif
goto_screen(menu_main);
reinit_lcd(); // Revive a noisy shared SPI LCD
@@ -833,7 +832,7 @@ void MarlinUI::init() {
// Apply a linear offset to a single axis
if (axis == ALL_AXES_ENUM)
destination = all_axes_destination;
- else if (axis <= XYZE) {
+ else if (axis <= LOGICAL_AXES) {
destination = current_position;
destination[axis] += offset;
}
@@ -1414,6 +1413,13 @@ void MarlinUI::init() {
#endif // HAS_ENCODER_ACTION
+ #if HAS_SOUND
+ void MarlinUI::completion_feedback(const bool good/*=true*/) {
+ TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); // Wake up on rotary encoder click...
+ if (good) OKAY_BUZZ(); else ERR_BUZZ();
+ }
+ #endif
+
#endif // HAS_WIRED_LCD
#if HAS_STATUS_MESSAGE
@@ -1582,7 +1588,7 @@ void MarlinUI::init() {
#endif
#if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
- next_filament_display = ms + 5000UL; // Show status message for 5s
+ pause_filament_display(ms); // Show status message for 5s
#endif
#endif
@@ -1893,18 +1899,22 @@ void MarlinUI::init() {
#if DISABLED(EEPROM_AUTO_INIT)
- static inline FSTR_P eeprom_err(const uint8_t msgid) {
- switch (msgid) {
- default:
- case 0: return GET_TEXT_F(MSG_ERR_EEPROM_CRC);
- case 1: return GET_TEXT_F(MSG_ERR_EEPROM_INDEX);
- case 2: return GET_TEXT_F(MSG_ERR_EEPROM_VERSION);
+ static inline FSTR_P eeprom_err(const EEPROM_Error err) {
+ switch (err) {
+ case ERR_EEPROM_VERSION: return GET_TEXT_F(MSG_ERR_EEPROM_VERSION);
+ case ERR_EEPROM_SIZE: return GET_TEXT_F(MSG_ERR_EEPROM_SIZE);
+ case ERR_EEPROM_CRC: return GET_TEXT_F(MSG_ERR_EEPROM_CRC);
+ case ERR_EEPROM_CORRUPT: return GET_TEXT_F(MSG_ERR_EEPROM_CORRUPT);
+ default: return nullptr;
}
}
- void MarlinUI::eeprom_alert(const uint8_t msgid) {
+ void MarlinUI::eeprom_alert(const EEPROM_Error err) {
+ FSTR_P const err_msg = eeprom_err(err);
+ set_status(err_msg);
+ TERN_(HOST_PROMPT_SUPPORT, hostui.notify(err_msg));
#if HAS_MARLINUI_MENU
- editable.uint8 = msgid;
+ editable.uint8 = err;
goto_screen([]{
FSTR_P const restore_msg = GET_TEXT_F(MSG_INIT_EEPROM);
char msg[utf8_strlen(restore_msg) + 1];
@@ -1912,11 +1922,9 @@ void MarlinUI::init() {
MenuItem_confirm::select_screen(
GET_TEXT_F(MSG_BUTTON_RESET), GET_TEXT_F(MSG_BUTTON_IGNORE),
init_eeprom, return_to_status,
- eeprom_err(editable.uint8), msg, F("?")
+ eeprom_err((EEPROM_Error)editable.uint8), msg, F("?")
);
});
- #else
- set_status(eeprom_err(msgid));
#endif
}
diff --git a/Marlin/Marlin/src/lcd/marlinui.h b/Marlin/Marlin/src/lcd/marlinui.h
index ec19f8bd..e33eda05 100644
--- a/Marlin/Marlin/src/lcd/marlinui.h
+++ b/Marlin/Marlin/src/lcd/marlinui.h
@@ -27,6 +27,10 @@
#include "../libs/buzzer.h"
#include "buttons.h"
+#if ENABLED(EEPROM_SETTINGS)
+ #include "../module/settings.h"
+#endif
+
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
#include "tft_io/touch_calibration.h"
#endif
@@ -228,7 +232,7 @@ class MarlinUI {
#endif
#if USE_MARLINUI_BUZZER
- static void buzz(const long duration, const uint16_t freq);
+ static void buzz(const long duration, const uint16_t freq=0);
#endif
static void chirp() {
@@ -467,6 +471,7 @@ class MarlinUI {
#if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
static millis_t next_filament_display;
+ static void pause_filament_display(const millis_t ms=millis()) { next_filament_display = ms + 5000UL; }
#endif
#if HAS_TOUCH_SLEEP
@@ -501,7 +506,6 @@ class MarlinUI {
#if IS_DWIN_MARLINUI
static bool did_first_redraw;
- static bool old_is_printing;
#endif
#if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
@@ -522,6 +526,11 @@ class MarlinUI {
#endif
+ #if !HAS_WIRED_LCD
+ static void quick_feedback(const bool=true) {}
+ static void completion_feedback(const bool=true) {}
+ #endif
+
#if ENABLED(SDSUPPORT)
#if BOTH(SCROLL_LONG_FILENAMES, HAS_MARLINUI_MENU)
#define MARLINUI_SCROLL_NAME 1
@@ -667,12 +676,7 @@ class MarlinUI {
static void load_settings();
static void store_settings();
#endif
- #if DISABLED(EEPROM_AUTO_INIT)
- static void eeprom_alert(const uint8_t msgid);
- static void eeprom_alert_crc() { eeprom_alert(0); }
- static void eeprom_alert_index() { eeprom_alert(1); }
- static void eeprom_alert_version() { eeprom_alert(2); }
- #endif
+ static void eeprom_alert(const EEPROM_Error) TERN_(EEPROM_AUTO_INIT, {});
#endif
//
@@ -802,5 +806,7 @@ class MarlinUI {
#define LCD_MESSAGE_F(S) ui.set_status(F(S))
#define LCD_MESSAGE(M) ui.set_status(GET_TEXT_F(M))
+#define LCD_MESSAGE_MIN(M) ui.set_status(GET_TEXT_F(M), -1)
+#define LCD_MESSAGE_MAX(M) ui.set_status(GET_TEXT_F(M), 99)
#define LCD_ALERTMESSAGE_F(S) ui.set_alert_status(F(S))
#define LCD_ALERTMESSAGE(M) ui.set_alert_status(GET_TEXT_F(M))
diff --git a/Marlin/Marlin/src/lcd/menu/game/brickout.cpp b/Marlin/Marlin/src/lcd/menu/game/brickout.cpp
index d738250b..fc4d19b1 100644
--- a/Marlin/Marlin/src/lcd/menu/game/brickout.cpp
+++ b/Marlin/Marlin/src/lcd/menu/game/brickout.cpp
@@ -117,13 +117,11 @@ void BrickoutGame::game_screen() {
}
else if (diff <= 3) {
bdat.ballh += fixed_t(random(-64, 0));
- NOLESS(bdat.ballh, BTOF(-2));
- NOMORE(bdat.ballh, BTOF(2));
+ LIMIT(bdat.ballh, BTOF(-2), BTOF(2));
}
else if (diff >= PADDLE_W-1 - 3) {
bdat.ballh += fixed_t(random( 0, 64));
- NOLESS(bdat.ballh, BTOF(-2));
- NOMORE(bdat.ballh, BTOF(2));
+ LIMIT(bdat.ballh, BTOF(-2), BTOF(2));
}
// Paddle hit after clearing the board? Reset the board.
diff --git a/Marlin/Marlin/src/lcd/menu/menu.cpp b/Marlin/Marlin/src/lcd/menu/menu.cpp
index 6389383d..21546b0c 100644
--- a/Marlin/Marlin/src/lcd/menu/menu.cpp
+++ b/Marlin/Marlin/src/lcd/menu/menu.cpp
@@ -117,8 +117,7 @@ void MenuEditItemBase::edit_screen(strfunc_t strfunc, loadfunc_t loadfunc) {
// Reset repeat_delay for Touch Buttons
TERN_(HAS_TOUCH_BUTTONS, ui.repeat_delay = BUTTON_DELAY_EDIT);
// Constrain ui.encoderPosition to 0 ... maxEditValue (calculated in encoder steps)
- if (int32_t(ui.encoderPosition) < 0) ui.encoderPosition = 0;
- if (int32_t(ui.encoderPosition) > maxEditValue) ui.encoderPosition = maxEditValue;
+ ui.encoderPosition = constrain(int32_t(ui.encoderPosition), 0, maxEditValue);
// If drawing is flagged then redraw the (whole) edit screen
if (ui.should_draw())
draw_edit_screen(strfunc(ui.encoderPosition + minEditValue));
@@ -272,13 +271,6 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
encoderTopLine = encoderLine;
}
-#if HAS_SOUND
- void MarlinUI::completion_feedback(const bool good/*=true*/) {
- TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); // Wake up on rotary encoder click...
- if (good) OKAY_BUZZ(); else ERR_BUZZ();
- }
-#endif
-
#if HAS_LINE_TO_Z
void line_to_z(const_float_t z) {
diff --git a/Marlin/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/Marlin/src/lcd/menu/menu_delta_calibrate.cpp
index ae935e53..04bb8156 100644
--- a/Marlin/Marlin/src/lcd/menu/menu_delta_calibrate.cpp
+++ b/Marlin/Marlin/src/lcd/menu/menu_delta_calibrate.cpp
@@ -68,8 +68,8 @@ void _man_probe_pt(const xy_pos_t &xy) {
float lcd_probe_pt(const xy_pos_t &xy) {
_man_probe_pt(xy);
ui.defer_status_screen();
- TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("Delta Calibration in progress"), FPSTR(CONTINUE_STR)));
- TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("Delta Calibration in progress")));
+ TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_DELTA_CALIBRATION_IN_PROGRESS)));
+ TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_DELTA_CALIBRATION_IN_PROGRESS)));
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response());
ui.goto_previous_screen_no_defer();
return current_position.z;
diff --git a/Marlin/Marlin/src/lcd/menu/menu_item.h b/Marlin/Marlin/src/lcd/menu/menu_item.h
index 5cc5f111..2a6a5680 100644
--- a/Marlin/Marlin/src/lcd/menu/menu_item.h
+++ b/Marlin/Marlin/src/lcd/menu/menu_item.h
@@ -79,10 +79,10 @@ template
class TMenuEditItem : MenuEditItemBase {
private:
typedef typename NAME::type_t type_t;
- static float scale(const_float_t value) { return NAME::scale(value); }
- static float unscale(const_float_t value) { return NAME::unscale(value); }
- static const char* to_string(const int32_t value) { return NAME::strfunc(unscale(value)); }
- static void load(void *ptr, const int32_t value) { *((type_t*)ptr) = unscale(value); }
+ static int32_t scaleToEncoder(const type_t &value) { return NAME::scaleToEncoder(value); }
+ static type_t unscaleEncoder(const int32_t value) { return NAME::unscaleEncoder(value); }
+ static const char* to_string(const int32_t value) { return NAME::strfunc(unscaleEncoder(value)); }
+ static void load(void *ptr, const int32_t value) { *((type_t*)ptr) = unscaleEncoder(value); }
public:
FORCE_INLINE static void draw(const bool sel, const uint8_t row, FSTR_P const fstr, type_t * const data, ...) {
MenuEditItemBase::draw(sel, row, fstr, NAME::strfunc(*(data)));
@@ -101,9 +101,9 @@ class TMenuEditItem : MenuEditItemBase {
const bool live=false // Callback during editing
) {
// Make sure minv and maxv fit within int32_t
- const int32_t minv = _MAX(scale(minValue), INT32_MIN),
- maxv = _MIN(scale(maxValue), INT32_MAX);
- goto_edit_screen(fstr, ptr, minv, maxv - minv, scale(*ptr) - minv,
+ const int32_t minv = _MAX(scaleToEncoder(minValue), INT32_MIN),
+ maxv = _MIN(scaleToEncoder(maxValue), INT32_MAX);
+ goto_edit_screen(fstr, ptr, minv, maxv - minv, scaleToEncoder(*ptr) - minv,
edit_screen, callback, live);
}
};
@@ -119,9 +119,9 @@ class TMenuEditItem : MenuEditItemBase {
*
* struct MenuEditItemInfo_percent {
* typedef uint8_t type_t;
- * static float scale(const_float_t value) { return value * (100.f/255.f) +0.5f; }
- * static float unscale(const_float_t value) { return value / (100.f/255.f) +0.5f; }
- * static const char* strfunc(const_float_t value) { return ui8tostr4pctrj(_DOFIX(uint8_t,value)); }
+ * static int32_t scaleToEncoder(const type_t &value) { return value * (100.f/255.f) +0.5f; }
+ * static type_t unscaleEncoder(const int32_t value) { return type_t(value) / (100.f/255.f) +0.5f; }
+ * static const char* strfunc(const type_t &value) { return ui8tostr4pctrj(_DOFIX(uint8_t,value)); }
* };
* typedef TMenuEditItem MenuItem_percent
*/
@@ -130,36 +130,37 @@ class TMenuEditItem : MenuEditItemBase {
#define DEFINE_MENU_EDIT_ITEM_TYPE(NAME, TYPE, STRFUNC, SCALE, ETC...) \
struct MenuEditItemInfo_##NAME { \
typedef TYPE type_t; \
- static float scale(const_float_t value) { return value * (SCALE) ETC; } \
- static float unscale(const_float_t value) { return value / (SCALE) ETC; } \
- static const char* strfunc(const_float_t value) { return STRFUNC(_DOFIX(TYPE,value)); } \
+ /* scale the given value to the encoder */ \
+ static int32_t scaleToEncoder(const type_t &value) { return value * (SCALE) ETC; } \
+ static type_t unscaleEncoder(const int32_t value) { return type_t(value) / (SCALE) ETC; } \
+ static const char* strfunc(const type_t &value) { return STRFUNC(_DOFIX(TYPE,value)); } \
}; \
typedef TMenuEditItem MenuItem_##NAME
// NAME TYPE STRFUNC SCALE ROUND
-DEFINE_MENU_EDIT_ITEM_TYPE(percent ,uint8_t ,ui8tostr4pctrj , 100.f/255.f, +0.5f); // 100% right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(percent_3 ,uint8_t ,pcttostrpctrj , 1 ); // 100% right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(int3 ,int16_t ,i16tostr3rj , 1 ); // 123, -12 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(int4 ,int16_t ,i16tostr4signrj , 1 ); // 1234, -123 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(int8 ,int8_t ,i8tostr3rj , 1 ); // 123, -12 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(uint8 ,uint8_t ,ui8tostr3rj , 1 ); // 123 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(uint16_3 ,uint16_t ,ui16tostr3rj , 1 ); // 123 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(uint16_4 ,uint16_t ,ui16tostr4rj , 0.1f ); // 1234 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(uint16_5 ,uint16_t ,ui16tostr5rj , 0.01f ); // 12345 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(float3 ,float ,ftostr3 , 1 ); // 123 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(float42_52 ,float ,ftostr42_52 , 100 ); // _2.34, 12.34, -2.34 or 123.45, -23.45
-DEFINE_MENU_EDIT_ITEM_TYPE(float43 ,float ,ftostr43sign ,1000 ); // -1.234, _1.234, +1.234
-DEFINE_MENU_EDIT_ITEM_TYPE(float4 ,float ,ftostr4sign , 1 ); // 1234 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(float5 ,float ,ftostr5rj , 1 ); // 12345 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(float5_25 ,float ,ftostr5rj , 0.04f ); // 12345 right-justified (25 increment)
-DEFINE_MENU_EDIT_ITEM_TYPE(float61 ,float ,ftostr61rj , 10 ); // 12345.6 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(float72 ,float ,ftostr72rj , 100 ); // 12345.67 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(float31sign ,float ,ftostr31sign , 10 ); // +12.3
-DEFINE_MENU_EDIT_ITEM_TYPE(float41sign ,float ,ftostr41sign , 10 ); // +123.4
-DEFINE_MENU_EDIT_ITEM_TYPE(float51sign ,float ,ftostr51sign , 10 ); // +1234.5
-DEFINE_MENU_EDIT_ITEM_TYPE(float52sign ,float ,ftostr52sign , 100 ); // +123.45
-DEFINE_MENU_EDIT_ITEM_TYPE(long5 ,uint32_t ,ftostr5rj , 0.01f ); // 12345 right-justified
-DEFINE_MENU_EDIT_ITEM_TYPE(long5_25 ,uint32_t ,ftostr5rj , 0.04f ); // 12345 right-justified (25 increment)
+DEFINE_MENU_EDIT_ITEM_TYPE(percent ,uint8_t ,ui8tostr4pctrj , 100.f/255.f, + 0.5f ); // 100% right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(percent_3 ,uint8_t ,pcttostrpctrj , 1 ); // 100% right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(int3 ,int16_t ,i16tostr3rj , 1 ); // 123, -12 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(int4 ,int16_t ,i16tostr4signrj , 1 ); // 1234, -123 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(int8 ,int8_t ,i8tostr3rj , 1 ); // 123, -12 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(uint8 ,uint8_t ,ui8tostr3rj , 1 ); // 123 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(uint16_3 ,uint16_t ,ui16tostr3rj , 1 ); // 123 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(uint16_4 ,uint16_t ,ui16tostr4rj , 0.1f ); // 1234 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(uint16_5 ,uint16_t ,ui16tostr5rj , 0.01f ); // 12345 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(float3 ,float ,ftostr3rj , 1 ); // 123 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(float42_52 ,float ,ftostr42_52 , 100 , + 0.001f ); // _2.34, 12.34, -2.34 or 123.45, -23.45
+DEFINE_MENU_EDIT_ITEM_TYPE(float43 ,float ,ftostr43sign ,1000 , + 0.0001f); // -1.234, _1.234, +1.234
+DEFINE_MENU_EDIT_ITEM_TYPE(float4 ,float ,ftostr4sign , 1 ); // 1234 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(float5 ,float ,ftostr5rj , 1 ); // 12345 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(float5_25 ,float ,ftostr5rj , 0.04f ); // 12345 right-justified (25 increment)
+DEFINE_MENU_EDIT_ITEM_TYPE(float61 ,float ,ftostr61rj , 10 , + 0.01f ); // 12345.6 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(float72 ,float ,ftostr72rj , 100 , + 0.001f ); // 12345.67 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(float31sign ,float ,ftostr31sign , 10 , + 0.01f ); // +12.3
+DEFINE_MENU_EDIT_ITEM_TYPE(float41sign ,float ,ftostr41sign , 10 , + 0.01f ); // +123.4
+DEFINE_MENU_EDIT_ITEM_TYPE(float51sign ,float ,ftostr51sign , 10 , + 0.01f ); // +1234.5
+DEFINE_MENU_EDIT_ITEM_TYPE(float52sign ,float ,ftostr52sign , 100 , + 0.001f ); // +123.45
+DEFINE_MENU_EDIT_ITEM_TYPE(long5 ,uint32_t ,ftostr5rj , 0.01f ); // 12345 right-justified
+DEFINE_MENU_EDIT_ITEM_TYPE(long5_25 ,uint32_t ,ftostr5rj , 0.04f ); // 12345 right-justified (25 increment)
#if HAS_BED_PROBE
#if Z_PROBE_OFFSET_RANGE_MIN >= -9 && Z_PROBE_OFFSET_RANGE_MAX <= 9
@@ -555,6 +556,14 @@ class MenuItem_bool : public MenuEditItemBase {
#define EDIT_EXTRA_FAN_SPEED(...)
#endif
+ #if FAN_COUNT == 1
+ #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED
+ #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED
+ #else
+ #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N
+ #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N
+ #endif
+
#define _FAN_EDIT_ITEMS(F,L) do{ \
editable.uint8 = thermalManager.fan_speed[F]; \
EDIT_ITEM_FAST_N(percent, F, MSG_##L, &editable.uint8, 0, 255, on_fan_update); \
diff --git a/Marlin/Marlin/src/lcd/menu/menu_mixer.cpp b/Marlin/Marlin/src/lcd/menu/menu_mixer.cpp
index feb4c59f..f787d47d 100644
--- a/Marlin/Marlin/src/lcd/menu/menu_mixer.cpp
+++ b/Marlin/Marlin/src/lcd/menu/menu_mixer.cpp
@@ -50,8 +50,7 @@
if (ui.encoderPosition) {
zvar += float(int32_t(ui.encoderPosition)) * 0.1;
ui.encoderPosition = 0;
- NOLESS(zvar, 0);
- NOMORE(zvar, Z_MAX_POS);
+ LIMIT(zvar, 0, Z_MAX_POS);
}
if (ui.should_draw()) {
@@ -113,7 +112,7 @@ static uint8_t v_index;
#if HAS_DUAL_MIXING
void _lcd_draw_mix(const uint8_t y) {
char tmp[20]; // "100%_100%"
- sprintf_P(tmp, PSTR("%3d%% %3d%%"), int(mixer.mix[0]), int(mixer.mix[1]));
+ sprintf_P(tmp, PSTR("%3d%% %3d%% "), int(mixer.mix[0]), int(mixer.mix[1]));
SETCURSOR(2, y); lcd_put_u8str(GET_TEXT_F(MSG_MIX));
SETCURSOR_RJ(10, y); lcd_put_u8str(tmp);
}
diff --git a/Marlin/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/Marlin/src/lcd/menu/menu_motion.cpp
index 4d8cc715..81068ae3 100644
--- a/Marlin/Marlin/src/lcd/menu/menu_motion.cpp
+++ b/Marlin/Marlin/src/lcd/menu/menu_motion.cpp
@@ -245,25 +245,15 @@ void menu_move() {
#endif
}
#elif EXTRUDERS == 3
- if (active_extruder < 2) {
- if (active_extruder)
- GCODES_ITEM_N(0, MSG_SELECT_E, F("T0"));
- else
- GCODES_ITEM_N(1, MSG_SELECT_E, F("T1"));
- }
+ if (active_extruder < 2)
+ GCODES_ITEM_N(1 - active_extruder, MSG_SELECT_E, active_extruder ? F("T0") : F("T1"));
#else
- if (active_extruder)
- GCODES_ITEM_N(0, MSG_SELECT_E, F("T0"));
- else
- GCODES_ITEM_N(1, MSG_SELECT_E, F("T1"));
+ GCODES_ITEM_N(1 - active_extruder, MSG_SELECT_E, active_extruder ? F("T0") : F("T1"));
#endif
#elif ENABLED(DUAL_X_CARRIAGE)
- if (active_extruder)
- GCODES_ITEM_N(0, MSG_SELECT_E, F("T0"));
- else
- GCODES_ITEM_N(1, MSG_SELECT_E, F("T1"));
+ GCODES_ITEM_N(1 - active_extruder, MSG_SELECT_E, active_extruder ? F("T0") : F("T1"));
#endif
diff --git a/Marlin/Marlin/src/lcd/menu/menu_tune.cpp b/Marlin/Marlin/src/lcd/menu/menu_tune.cpp
index 423af4e5..a4a30882 100644
--- a/Marlin/Marlin/src/lcd/menu/menu_tune.cpp
+++ b/Marlin/Marlin/src/lcd/menu/menu_tune.cpp
@@ -156,37 +156,37 @@ void menu_tune() {
#if HAS_FAN0
_FAN_EDIT_ITEMS(0,FIRST_FAN_SPEED);
#endif
- #if HAS_FAN1
+ #if HAS_FAN1 && REDUNDANT_PART_COOLING_FAN != 1
FAN_EDIT_ITEMS(1);
#elif SNFAN(1)
singlenozzle_item(1);
#endif
- #if HAS_FAN2
+ #if HAS_FAN2 && REDUNDANT_PART_COOLING_FAN != 2
FAN_EDIT_ITEMS(2);
#elif SNFAN(2)
singlenozzle_item(2);
#endif
- #if HAS_FAN3
+ #if HAS_FAN3 && REDUNDANT_PART_COOLING_FAN != 3
FAN_EDIT_ITEMS(3);
#elif SNFAN(3)
singlenozzle_item(3);
#endif
- #if HAS_FAN4
+ #if HAS_FAN4 && REDUNDANT_PART_COOLING_FAN != 4
FAN_EDIT_ITEMS(4);
#elif SNFAN(4)
singlenozzle_item(4);
#endif
- #if HAS_FAN5
+ #if HAS_FAN5 && REDUNDANT_PART_COOLING_FAN != 5
FAN_EDIT_ITEMS(5);
#elif SNFAN(5)
singlenozzle_item(5);
#endif
- #if HAS_FAN6
+ #if HAS_FAN6 && REDUNDANT_PART_COOLING_FAN != 6
FAN_EDIT_ITEMS(6);
#elif SNFAN(6)
singlenozzle_item(6);
#endif
- #if HAS_FAN7
+ #if HAS_FAN7 && REDUNDANT_PART_COOLING_FAN != 7
FAN_EDIT_ITEMS(7);
#elif SNFAN(7)
singlenozzle_item(7);
diff --git a/Marlin/Marlin/src/lcd/tft/touch.cpp b/Marlin/Marlin/src/lcd/tft/touch.cpp
index 6c81ebef..1665e9ab 100644
--- a/Marlin/Marlin/src/lcd/tft/touch.cpp
+++ b/Marlin/Marlin/src/lcd/tft/touch.cpp
@@ -27,7 +27,7 @@
#include "touch.h"
#include "../marlinui.h" // for ui methods
-#include "../menu/menu_item.h" // for touch_screen_calibration
+#include "../menu/menu_item.h" // for MSG_FIRST_FAN_SPEED
#include "../../module/temperature.h"
#include "../../module/planner.h"
@@ -113,10 +113,8 @@ void Touch::idle() {
if (x != 0 && y != 0) {
if (current_control) {
if (WITHIN(x, current_control->x - FREE_MOVE_RANGE, current_control->x + current_control->width + FREE_MOVE_RANGE) && WITHIN(y, current_control->y - FREE_MOVE_RANGE, current_control->y + current_control->height + FREE_MOVE_RANGE)) {
- NOLESS(x, current_control->x);
- NOMORE(x, current_control->x + current_control->width);
- NOLESS(y, current_control->y);
- NOMORE(y, current_control->y + current_control->height);
+ LIMIT(x, current_control->x, current_control->x + current_control->width);
+ LIMIT(y, current_control->y, current_control->y + current_control->height);
touch(current_control);
}
else
@@ -154,7 +152,7 @@ void Touch::touch(touch_control_t *control) {
case CALIBRATE:
if (touch_calibration.handleTouch(x, y)) ui.refresh();
break;
- #endif // TOUCH_SCREEN_CALIBRATION
+ #endif
case MENU_SCREEN: ui.goto_screen((screenFunc_t)control->data); break;
case BACK: ui.goto_previous_screen(); break;
diff --git a/Marlin/Marlin/src/lcd/tft/touch.h b/Marlin/Marlin/src/lcd/tft/touch.h
index fd5d9fd7..eab85604 100644
--- a/Marlin/Marlin/src/lcd/tft/touch.h
+++ b/Marlin/Marlin/src/lcd/tft/touch.h
@@ -31,10 +31,10 @@
#endif
#if ENABLED(TFT_TOUCH_DEVICE_GT911)
- #include HAL_PATH(../../HAL, tft/gt911.h)
+ #include HAL_PATH(../.., tft/gt911.h)
#define TOUCH_DRIVER_CLASS GT911
#elif ENABLED(TFT_TOUCH_DEVICE_XPT2046)
- #include HAL_PATH(../../HAL, tft/xpt2046.h)
+ #include HAL_PATH(../.., tft/xpt2046.h)
#define TOUCH_DRIVER_CLASS XPT2046
#else
#error "Unknown Touch Screen Type."
diff --git a/Marlin/Marlin/src/lcd/tft/ui_1024x600.cpp b/Marlin/Marlin/src/lcd/tft/ui_1024x600.cpp
index aa266d6b..08d6b51f 100644
--- a/Marlin/Marlin/src/lcd/tft/ui_1024x600.cpp
+++ b/Marlin/Marlin/src/lcd/tft/ui_1024x600.cpp
@@ -228,25 +228,25 @@ void MarlinUI::draw_status_screen() {
for (i = 0 ; i < ITEMS_COUNT; i++) {
x = (TFT_WIDTH / ITEMS_COUNT - 80) / 2 + (TFT_WIDTH * i / ITEMS_COUNT);
switch (i) {
- #ifdef ITEM_E0
+ #if HAS_EXTRUDERS
case ITEM_E0: draw_heater_status(x, y, H_E0); break;
#endif
- #ifdef ITEM_E1
+ #if HAS_MULTI_HOTEND
case ITEM_E1: draw_heater_status(x, y, H_E1); break;
#endif
- #ifdef ITEM_E2
+ #if HOTENDS > 2
case ITEM_E2: draw_heater_status(x, y, H_E2); break;
#endif
- #ifdef ITEM_BED
+ #if HAS_HEATED_BED
case ITEM_BED: draw_heater_status(x, y, H_BED); break;
#endif
- #ifdef ITEM_CHAMBER
+ #if HAS_TEMP_CHAMBER
case ITEM_CHAMBER: draw_heater_status(x, y, H_CHAMBER); break;
#endif
- #ifdef ITEM_COOLER
+ #if HAS_TEMP_COOLER
case ITEM_COOLER: draw_heater_status(x, y, H_COOLER); break;
#endif
- #ifdef ITEM_FAN
+ #if HAS_FAN
case ITEM_FAN: draw_fan_status(x, y, blink); break;
#endif
}
diff --git a/Marlin/Marlin/src/lcd/tft/ui_320x240.cpp b/Marlin/Marlin/src/lcd/tft/ui_320x240.cpp
index bb48b5e1..9014d4ed 100644
--- a/Marlin/Marlin/src/lcd/tft/ui_320x240.cpp
+++ b/Marlin/Marlin/src/lcd/tft/ui_320x240.cpp
@@ -228,25 +228,25 @@ void MarlinUI::draw_status_screen() {
for (i = 0 ; i < ITEMS_COUNT; i++) {
x = (320 / ITEMS_COUNT - 64) / 2 + (320 * i / ITEMS_COUNT);
switch (i) {
- #ifdef ITEM_E0
+ #if HAS_EXTRUDERS
case ITEM_E0: draw_heater_status(x, y, H_E0); break;
#endif
- #ifdef ITEM_E1
+ #if HAS_MULTI_HOTEND
case ITEM_E1: draw_heater_status(x, y, H_E1); break;
#endif
- #ifdef ITEM_E2
+ #if HOTENDS > 2
case ITEM_E2: draw_heater_status(x, y, H_E2); break;
#endif
- #ifdef ITEM_BED
+ #if HAS_HEATED_BED
case ITEM_BED: draw_heater_status(x, y, H_BED); break;
#endif
- #ifdef ITEM_CHAMBER
+ #if HAS_TEMP_CHAMBER
case ITEM_CHAMBER: draw_heater_status(x, y, H_CHAMBER); break;
#endif
- #ifdef ITEM_COOLER
+ #if HAS_TEMP_COOLER
case ITEM_COOLER: draw_heater_status(x, y, H_COOLER); break;
#endif
- #ifdef ITEM_FAN
+ #if HAS_FAN
case ITEM_FAN: draw_fan_status(x, y, blink); break;
#endif
}
diff --git a/Marlin/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/Marlin/src/lcd/tft/ui_480x320.cpp
index c95d8353..eaf10815 100644
--- a/Marlin/Marlin/src/lcd/tft/ui_480x320.cpp
+++ b/Marlin/Marlin/src/lcd/tft/ui_480x320.cpp
@@ -228,25 +228,25 @@ void MarlinUI::draw_status_screen() {
for (i = 0 ; i < ITEMS_COUNT; i++) {
x = (TFT_WIDTH / ITEMS_COUNT - 80) / 2 + (TFT_WIDTH * i / ITEMS_COUNT);
switch (i) {
- #ifdef ITEM_E0
+ #if HAS_EXTRUDERS
case ITEM_E0: draw_heater_status(x, y, H_E0); break;
#endif
- #ifdef ITEM_E1
+ #if HAS_MULTI_HOTEND
case ITEM_E1: draw_heater_status(x, y, H_E1); break;
#endif
- #ifdef ITEM_E2
+ #if HOTENDS > 2
case ITEM_E2: draw_heater_status(x, y, H_E2); break;
#endif
- #ifdef ITEM_BED
+ #if HAS_HEATED_BED
case ITEM_BED: draw_heater_status(x, y, H_BED); break;
#endif
- #ifdef ITEM_CHAMBER
+ #if HAS_TEMP_CHAMBER
case ITEM_CHAMBER: draw_heater_status(x, y, H_CHAMBER); break;
#endif
- #ifdef ITEM_COOLER
+ #if HAS_TEMP_COOLER
case ITEM_COOLER: draw_heater_status(x, y, H_COOLER); break;
#endif
- #ifdef ITEM_FAN
+ #if HAS_FAN
case ITEM_FAN: draw_fan_status(x, y, blink); break;
#endif
}
diff --git a/Marlin/Marlin/src/lcd/tft/ui_common.cpp b/Marlin/Marlin/src/lcd/tft/ui_common.cpp
index ed24bc17..590c2cd6 100644
--- a/Marlin/Marlin/src/lcd/tft/ui_common.cpp
+++ b/Marlin/Marlin/src/lcd/tft/ui_common.cpp
@@ -229,24 +229,24 @@ void MarlinUI::clear_lcd() {
void MarlinUI::touch_calibration_screen() {
uint16_t x, y;
- calibrationState calibration_stage = touch_calibration.get_calibration_state();
+ calibrationState stage = touch_calibration.get_calibration_state();
- if (calibration_stage == CALIBRATION_NONE) {
+ if (stage == CALIBRATION_NONE) {
defer_status_screen(true);
clear_lcd();
- calibration_stage = touch_calibration.calibration_start();
+ stage = touch_calibration.calibration_start();
}
else {
- x = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].x;
- y = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].y;
+ x = touch_calibration.calibration_points[_MIN(stage - 1, CALIBRATION_BOTTOM_RIGHT)].x;
+ y = touch_calibration.calibration_points[_MIN(stage - 1, CALIBRATION_BOTTOM_RIGHT)].y;
tft.canvas(x - 15, y - 15, 31, 31);
tft.set_background(COLOR_BACKGROUND);
}
touch.clear();
- if (calibration_stage < CALIBRATION_SUCCESS) {
- switch (calibration_stage) {
+ if (stage < CALIBRATION_SUCCESS) {
+ switch (stage) {
case CALIBRATION_TOP_LEFT: tft_string.set(GET_TEXT(MSG_TOP_LEFT)); break;
case CALIBRATION_BOTTOM_LEFT: tft_string.set(GET_TEXT(MSG_BOTTOM_LEFT)); break;
case CALIBRATION_TOP_RIGHT: tft_string.set(GET_TEXT(MSG_TOP_RIGHT)); break;
@@ -254,8 +254,8 @@ void MarlinUI::clear_lcd() {
default: break;
}
- x = touch_calibration.calibration_points[calibration_stage].x;
- y = touch_calibration.calibration_points[calibration_stage].y;
+ x = touch_calibration.calibration_points[stage].x;
+ y = touch_calibration.calibration_points[stage].y;
tft.canvas(x - 15, y - 15, 31, 31);
tft.set_background(COLOR_BACKGROUND);
@@ -265,7 +265,7 @@ void MarlinUI::clear_lcd() {
touch.add_control(CALIBRATE, 0, 0, TFT_WIDTH, TFT_HEIGHT, uint32_t(x) << 16 | uint32_t(y));
}
else {
- tft_string.set(calibration_stage == CALIBRATION_SUCCESS ? GET_TEXT(MSG_CALIBRATION_COMPLETED) : GET_TEXT(MSG_CALIBRATION_FAILED));
+ tft_string.set(stage == CALIBRATION_SUCCESS ? GET_TEXT(MSG_CALIBRATION_COMPLETED) : GET_TEXT(MSG_CALIBRATION_FAILED));
defer_status_screen(false);
touch_calibration.calibration_end();
touch.add_control(BACK, 0, 0, TFT_WIDTH, TFT_HEIGHT);
diff --git a/Marlin/Marlin/src/lcd/tft/ui_common.h b/Marlin/Marlin/src/lcd/tft/ui_common.h
index 7329c31a..2a81ee21 100644
--- a/Marlin/Marlin/src/lcd/tft/ui_common.h
+++ b/Marlin/Marlin/src/lcd/tft/ui_common.h
@@ -57,32 +57,15 @@ void menu_item(const uint8_t row, bool sel = false);
#define ABSOLUTE_ZERO -273.15
-#if HAS_TEMP_CHAMBER && HAS_MULTI_HOTEND
- #define ITEM_E0 0
- #define ITEM_E1 1
- #define ITEM_BED 2
- #define ITEM_CHAMBER 3
- #define ITEM_FAN 4
- #define ITEMS_COUNT 5
-#elif HAS_TEMP_CHAMBER
- #define ITEM_E0 0
- #define ITEM_BED 1
- #define ITEM_CHAMBER 2
- #define ITEM_FAN 3
- #define ITEMS_COUNT 4
-#elif HAS_TEMP_COOLER
- #define ITEM_COOLER 0
- #define ITEM_FAN 1
- #define ITEMS_COUNT 2
-#elif HAS_MULTI_HOTEND
- #define ITEM_E0 0
- #define ITEM_E1 1
- #define ITEM_BED 2
- #define ITEM_FAN 3
- #define ITEMS_COUNT 4
-#else
- #define ITEM_E0 0
- #define ITEM_BED 1
- #define ITEM_FAN 2
- #define ITEMS_COUNT 3
-#endif
+enum {
+ OPTITEM(HAS_EXTRUDERS, ITEM_E0)
+ OPTITEM(HAS_MULTI_HOTEND, ITEM_E1)
+ #if HOTENDS > 2
+ ITEM_E2,
+ #endif
+ OPTITEM(HAS_HEATED_BED, ITEM_BED)
+ OPTITEM(HAS_TEMP_CHAMBER, ITEM_CHAMBER)
+ OPTITEM(HAS_TEMP_COOLER, ITEM_COOLER)
+ OPTITEM(HAS_FAN, ITEM_FAN)
+ ITEMS_COUNT
+};
diff --git a/Marlin/Marlin/src/lcd/tft_io/tft_io.h b/Marlin/Marlin/src/lcd/tft_io/tft_io.h
index c1c4a8e3..d6f178a0 100644
--- a/Marlin/Marlin/src/lcd/tft_io/tft_io.h
+++ b/Marlin/Marlin/src/lcd/tft_io/tft_io.h
@@ -24,11 +24,11 @@
#include "../../inc/MarlinConfig.h"
#if HAS_SPI_TFT
- #include HAL_PATH(../../HAL, tft/tft_spi.h)
+ #include HAL_PATH(../.., tft/tft_spi.h)
#elif HAS_FSMC_TFT
- #include HAL_PATH(../../HAL, tft/tft_fsmc.h)
+ #include HAL_PATH(../.., tft/tft_fsmc.h)
#elif HAS_LTDC_TFT
- #include HAL_PATH(../../HAL, tft/tft_ltdc.h)
+ #include HAL_PATH(../.., tft/tft_ltdc.h)
#else
#error "TFT IO only supports SPI, FSMC or LTDC interface."
#endif
diff --git a/Marlin/Marlin/src/lcd/tft_io/touch_calibration.cpp b/Marlin/Marlin/src/lcd/tft_io/touch_calibration.cpp
index 44ebc73d..c239a94b 100644
--- a/Marlin/Marlin/src/lcd/tft_io/touch_calibration.cpp
+++ b/Marlin/Marlin/src/lcd/tft_io/touch_calibration.cpp
@@ -41,6 +41,7 @@ touch_calibration_t TouchCalibration::calibration;
calibrationState TouchCalibration::calibration_state = CALIBRATION_NONE;
touch_calibration_point_t TouchCalibration::calibration_points[4];
uint8_t TouchCalibration::failed_count;
+millis_t TouchCalibration::next_touch_update_ms; // = 0;
void TouchCalibration::validate_calibration() {
#define VALIDATE_PRECISION(XY, A, B) validate_precision_##XY(CALIBRATION_##A, CALIBRATION_##B)
@@ -74,7 +75,7 @@ void TouchCalibration::validate_calibration() {
else {
calibration_state = CALIBRATION_FAIL;
calibration_reset();
- if (need_calibration() && failed_count++ < TOUCH_CALIBRATION_MAX_RETRIES) calibration_state = CALIBRATION_TOP_LEFT;
+ if (need_calibration() && failed_count++ < TOUCH_CALIBRATION_MAX_RETRIES) calibration_state = CALIBRATION_NONE;
}
#undef CAL_PTS
@@ -89,11 +90,11 @@ void TouchCalibration::validate_calibration() {
}
}
-bool TouchCalibration::handleTouch(uint16_t x, uint16_t y) {
- static millis_t next_button_update_ms = 0;
+bool TouchCalibration::handleTouch(const uint16_t x, const uint16_t y) {
const millis_t now = millis();
- if (PENDING(now, next_button_update_ms)) return false;
- next_button_update_ms = now + BUTTON_DELAY_MENU;
+
+ if (next_touch_update_ms && PENDING(now, next_touch_update_ms)) return false;
+ next_touch_update_ms = now + BUTTON_DELAY_MENU;
if (calibration_state < CALIBRATION_SUCCESS) {
calibration_points[calibration_state].raw_x = x;
diff --git a/Marlin/Marlin/src/lcd/tft_io/touch_calibration.h b/Marlin/Marlin/src/lcd/tft_io/touch_calibration.h
index abd56677..030b4977 100644
--- a/Marlin/Marlin/src/lcd/tft_io/touch_calibration.h
+++ b/Marlin/Marlin/src/lcd/tft_io/touch_calibration.h
@@ -57,6 +57,7 @@ class TouchCalibration {
public:
static calibrationState calibration_state;
static touch_calibration_point_t calibration_points[4];
+ static millis_t next_touch_update_ms;
static bool validate_precision(int32_t a, int32_t b) { return (a > b ? (100 * b) / a : (100 * a) / b) > TOUCH_SCREEN_CALIBRATION_PRECISION; }
static bool validate_precision_x(uint8_t a, uint8_t b) { return validate_precision(calibration_points[a].raw_x, calibration_points[b].raw_x); }
@@ -64,11 +65,12 @@ class TouchCalibration {
static void validate_calibration();
static touch_calibration_t calibration;
- static uint8_t failed_count;
+ static uint8_t failed_count;
static void calibration_reset() { calibration = { TOUCH_CALIBRATION_X, TOUCH_CALIBRATION_Y, TOUCH_OFFSET_X, TOUCH_OFFSET_Y, TOUCH_ORIENTATION }; }
static bool need_calibration() { return !calibration.offset_x && !calibration.offset_y && !calibration.x && !calibration.y; }
static calibrationState calibration_start() {
+ next_touch_update_ms = millis() + 750UL;
calibration = { 0, 0, 0, 0, TOUCH_ORIENTATION_NONE };
calibration_state = CALIBRATION_TOP_LEFT;
calibration_points[CALIBRATION_TOP_LEFT].x = 30;
@@ -89,7 +91,7 @@ class TouchCalibration {
return !need_calibration();
}
- static bool handleTouch(uint16_t x, uint16_t y);
+ static bool handleTouch(const uint16_t x, const uint16_t y);
};
extern TouchCalibration touch_calibration;
diff --git a/Marlin/Marlin/src/lcd/touch/touch_buttons.cpp b/Marlin/Marlin/src/lcd/touch/touch_buttons.cpp
index d641dd3b..032015cd 100644
--- a/Marlin/Marlin/src/lcd/touch/touch_buttons.cpp
+++ b/Marlin/Marlin/src/lcd/touch/touch_buttons.cpp
@@ -28,10 +28,10 @@
#include "../scaled_tft.h"
#if ENABLED(TFT_TOUCH_DEVICE_GT911)
- #include HAL_PATH(../../HAL, tft/gt911.h)
+ #include HAL_PATH(../.., tft/gt911.h)
GT911 touchIO;
#elif ENABLED(TFT_TOUCH_DEVICE_XPT2046)
- #include HAL_PATH(../../HAL, tft/xpt2046.h)
+ #include HAL_PATH(../.., tft/xpt2046.h)
XPT2046 touchIO;
#else
#error "Unknown Touch Screen Type."
@@ -91,7 +91,7 @@ uint8_t TouchButtons::read_buttons() {
y = uint16_t((uint32_t(y) * TOUCH_CALIBRATION_Y) >> 16) + TOUCH_OFFSET_Y;
#endif
#elif ENABLED(TFT_TOUCH_DEVICE_GT911)
- bool is_touched = (TOUCH_ORIENTATION == TOUCH_PORTRAIT ? touchIO.getPoint(&y, &x) : touchIO.getPoint(&x, &y));
+ const bool is_touched = (TOUCH_ORIENTATION == TOUCH_PORTRAIT ? touchIO.getPoint(&y, &x) : touchIO.getPoint(&x, &y));
if (!is_touched) return 0;
#endif
diff --git a/Marlin/Marlin/src/libs/BL24CXX.h b/Marlin/Marlin/src/libs/BL24CXX.h
index b069c196..654ceffc 100644
--- a/Marlin/Marlin/src/libs/BL24CXX.h
+++ b/Marlin/Marlin/src/libs/BL24CXX.h
@@ -23,7 +23,7 @@
/********************************************************************************
* @file BL24CXX.h
- * @brief i2c EEPROM for Ender 3 v2 board (4.2.2)
+ * @brief i2c EEPROM for Ender-3 v2 board (4.2.2)
********************************************************************************/
/******************** IIC ********************/
diff --git a/Marlin/Marlin/src/libs/MAX31865.h b/Marlin/Marlin/src/libs/MAX31865.h
index 95bde756..3e9b0c13 100644
--- a/Marlin/Marlin/src/libs/MAX31865.h
+++ b/Marlin/Marlin/src/libs/MAX31865.h
@@ -45,7 +45,7 @@
#include "../inc/MarlinConfig.h"
#include "../HAL/shared/Delay.h"
-#include HAL_PATH(../HAL, MarlinSPI.h)
+#include HAL_PATH(.., MarlinSPI.h)
#define MAX31865_CONFIG_REG 0x00
#define MAX31865_CONFIG_BIAS 0x80
diff --git a/Marlin/Marlin/src/libs/W25Qxx.h b/Marlin/Marlin/src/libs/W25Qxx.h
index 77846347..55490b02 100644
--- a/Marlin/Marlin/src/libs/W25Qxx.h
+++ b/Marlin/Marlin/src/libs/W25Qxx.h
@@ -23,7 +23,7 @@
#include
-#include HAL_PATH(../HAL, MarlinSPI.h)
+#include HAL_PATH(.., MarlinSPI.h)
#define W25X_WriteEnable 0x06
#define W25X_WriteDisable 0x04
diff --git a/Marlin/Marlin/src/libs/buzzer.h b/Marlin/Marlin/src/libs/buzzer.h
index cd8e17d0..cd86e7e7 100644
--- a/Marlin/Marlin/src/libs/buzzer.h
+++ b/Marlin/Marlin/src/libs/buzzer.h
@@ -115,21 +115,20 @@
extern Buzzer buzzer;
// Buzz directly via the BEEPER pin tone queue
- #define BUZZ(d,f) buzzer.tone(d, f)
+ #define BUZZ(V...) buzzer.tone(V)
#elif USE_MARLINUI_BUZZER
// Use MarlinUI for a buzzer on the LCD
- #include "../lcd/marlinui.h"
- #define BUZZ(d,f) ui.buzz(d,f)
+ #define BUZZ(V...) ui.buzz(V)
#else
// No buzz capability
- #define BUZZ(d,f) NOOP
+ #define BUZZ(...) NOOP
#endif
-#define ERR_BUZZ() BUZZ(400, 40);
-#define OKAY_BUZZ() do{ BUZZ(100, 659); BUZZ(10, 0); BUZZ(100, 698); }while(0)
-#define DONE_BUZZ(OK) do{ if (OK) OKAY_BUZZ(); else ERR_BUZZ(); }while(0)
+#define ERR_BUZZ() BUZZ(400, 40)
+#define OKAY_BUZZ() do{ BUZZ(100, 659); BUZZ(10); BUZZ(100, 698); }while(0)
+#define DONE_BUZZ(ok) do{ if (ok) OKAY_BUZZ(); else ERR_BUZZ(); }while(0)
diff --git a/Marlin/Marlin/src/libs/numtostr.h b/Marlin/Marlin/src/libs/numtostr.h
index 047b22cd..84027b44 100644
--- a/Marlin/Marlin/src/libs/numtostr.h
+++ b/Marlin/Marlin/src/libs/numtostr.h
@@ -120,7 +120,7 @@ const char* ftostr61rj(const_float_t x);
const char* ftostr72rj(const_float_t x);
// Convert float to rj string with 123 or -12 format
-FORCE_INLINE const char* ftostr3(const_float_t x) { return i16tostr3rj(int16_t(x + (x < 0 ? -0.5f : 0.5f))); }
+FORCE_INLINE const char* ftostr3rj(const_float_t x) { return i16tostr3rj(int16_t(x + (x < 0 ? -0.5f : 0.5f))); }
#if ENABLED(LCD_DECIMAL_SMALL_XY)
// Convert float to rj string with 1234, _123, 12.3, _1.2, -123, _-12, or -1.2 format
diff --git a/Marlin/Marlin/src/module/endstops.cpp b/Marlin/Marlin/src/module/endstops.cpp
index f4fbda74..a5daf7af 100644
--- a/Marlin/Marlin/src/module/endstops.cpp
+++ b/Marlin/Marlin/src/module/endstops.cpp
@@ -35,7 +35,7 @@
#include "../core/debug_out.h"
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE)
- #include HAL_PATH(../HAL, endstop_interrupts.h)
+ #include HAL_PATH(.., endstop_interrupts.h)
#endif
#if BOTH(SD_ABORT_ON_ENDSTOP_HIT, SDSUPPORT)
@@ -691,15 +691,9 @@ void __O2 Endstops::report_states() {
} // Endstops::report_states
-#if HAS_DELTA_SENSORLESS_PROBING
- #define __ENDSTOP(AXIS, ...) AXIS ##_MAX
- #define _ENDSTOP_PIN(AXIS, ...) AXIS ##_MAX_PIN
- #define _ENDSTOP_INVERTING(AXIS, ...) AXIS ##_MAX_ENDSTOP_INVERTING
-#else
- #define __ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX
- #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
- #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
-#endif
+#define __ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX
+#define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
+#define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
#define _ENDSTOP(AXIS, MINMAX) __ENDSTOP(AXIS, MINMAX)
/**
@@ -717,8 +711,7 @@ void Endstops::update() {
#define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ_ENDSTOP(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)))
#define COPY_LIVE_STATE(SRC_BIT, DST_BIT) SET_BIT_TO(live_state, DST_BIT, TEST(live_state, SRC_BIT))
- #if ENABLED(G38_PROBE_TARGET) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY, MARKFORGED_YX)
- #define HAS_G38_PROBE 1
+ #if ENABLED(G38_PROBE_TARGET)
// For G38 moves check the probe's pin for ALL movement
if (G38_move) UPDATE_ENDSTOP_BIT(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN));
#endif
@@ -1112,18 +1105,14 @@ void Endstops::update() {
#define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_DUAL_ENDSTOP(Z, MINMAX)
#endif
- #if HAS_G38_PROBE // TODO (DerAndere): Add support for HAS_I_AXIS
- #define _G38_OPEN_STATE TERN(G38_PROBE_AWAY, (G38_move >= 4), LOW)
+ #if ENABLED(G38_PROBE_TARGET)
// For G38 moves check the probe's pin for ALL movement
- if (G38_move && TEST_ENDSTOP(_ENDSTOP(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN))) != _G38_OPEN_STATE) {
- if (stepper.axis_is_moving(X_AXIS)) { _ENDSTOP_HIT(X, TERN(X_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(X_AXIS); }
- #if HAS_Y_AXIS
- else if (stepper.axis_is_moving(Y_AXIS)) { _ENDSTOP_HIT(Y, TERN(Y_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(Y_AXIS); }
- #endif
- #if HAS_Z_AXIS
- else if (stepper.axis_is_moving(Z_AXIS)) { _ENDSTOP_HIT(Z, TERN(Z_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(Z_AXIS); }
- #endif
+ if (G38_move && TEST_ENDSTOP(Z_MIN_PROBE) == TERN1(G38_PROBE_AWAY, (G38_move < 4))) {
G38_did_trigger = true;
+ #define _G38_SET(Q) | (stepper.axis_is_moving(_AXIS(Q)) << _AXIS(Q))
+ #define _G38_RESP(Q) if (moving[_AXIS(Q)]) { _ENDSTOP_HIT(Q, ENDSTOP); planner.endstop_triggered(_AXIS(Q)); }
+ const Flags moving = { value_t(NUM_AXES)(0 MAIN_AXIS_MAP(_G38_SET)) };
+ MAIN_AXIS_MAP(_G38_RESP);
}
#endif
@@ -1336,75 +1325,54 @@ void Endstops::update() {
bool hit = false;
#if X_SPI_SENSORLESS
if (tmc_spi_homing.x && (stepperX.test_stall_status()
- #if ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX) && Y_SPI_SENSORLESS
+ #if Y_SPI_SENSORLESS && ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
|| stepperY.test_stall_status()
- #elif CORE_IS_XZ && Z_SPI_SENSORLESS
+ #elif Z_SPI_SENSORLESS && CORE_IS_XZ
|| stepperZ.test_stall_status()
#endif
- )) {
- SBI(live_state, X_ENDSTOP);
- hit = true;
- }
+ )) { SBI(live_state, X_ENDSTOP); hit = true; }
+ #if ENABLED(X_DUAL_ENDSTOPS)
+ if (tmc_spi_homing.x && stepperX2.test_stall_status()) { SBI(live_state, X2_ENDSTOP); hit = true; }
+ #endif
#endif
#if Y_SPI_SENSORLESS
if (tmc_spi_homing.y && (stepperY.test_stall_status()
- #if ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX) && X_SPI_SENSORLESS
+ #if X_SPI_SENSORLESS && ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
|| stepperX.test_stall_status()
- #elif CORE_IS_YZ && Z_SPI_SENSORLESS
+ #elif Z_SPI_SENSORLESS && CORE_IS_YZ
|| stepperZ.test_stall_status()
#endif
- )) {
- SBI(live_state, Y_ENDSTOP);
- hit = true;
- }
+ )) { SBI(live_state, Y_ENDSTOP); hit = true; }
+ #if ENABLED(Y_DUAL_ENDSTOPS)
+ if (tmc_spi_homing.y && stepperY2.test_stall_status()) { SBI(live_state, Y2_ENDSTOP); hit = true; }
+ #endif
#endif
#if Z_SPI_SENSORLESS
if (tmc_spi_homing.z && (stepperZ.test_stall_status()
- #if CORE_IS_XZ && X_SPI_SENSORLESS
+ #if X_SPI_SENSORLESS && CORE_IS_XZ
|| stepperX.test_stall_status()
- #elif CORE_IS_YZ && Y_SPI_SENSORLESS
+ #elif Y_SPI_SENSORLESS && CORE_IS_YZ
|| stepperY.test_stall_status()
#endif
- )) {
- SBI(live_state, Z_ENDSTOP);
- hit = true;
- }
+ )) { SBI(live_state, Z_ENDSTOP); hit = true; }
#endif
#if I_SPI_SENSORLESS
- if (tmc_spi_homing.i && stepperI.test_stall_status()) {
- SBI(live_state, I_ENDSTOP);
- hit = true;
- }
+ if (tmc_spi_homing.i && stepperI.test_stall_status()) { SBI(live_state, I_ENDSTOP); hit = true; }
#endif
#if J_SPI_SENSORLESS
- if (tmc_spi_homing.j && stepperJ.test_stall_status()) {
- SBI(live_state, J_ENDSTOP);
- hit = true;
- }
+ if (tmc_spi_homing.j && stepperJ.test_stall_status()) { SBI(live_state, J_ENDSTOP); hit = true; }
#endif
#if K_SPI_SENSORLESS
- if (tmc_spi_homing.k && stepperK.test_stall_status()) {
- SBI(live_state, K_ENDSTOP);
- hit = true;
- }
+ if (tmc_spi_homing.k && stepperK.test_stall_status()) { SBI(live_state, K_ENDSTOP); hit = true; }
#endif
#if U_SPI_SENSORLESS
- if (tmc_spi_homing.u && stepperU.test_stall_status()) {
- SBI(live_state, U_ENDSTOP);
- hit = true;
- }
+ if (tmc_spi_homing.u && stepperU.test_stall_status()) { SBI(live_state, U_ENDSTOP); hit = true; }
#endif
#if V_SPI_SENSORLESS
- if (tmc_spi_homing.v && stepperV.test_stall_status()) {
- SBI(live_state, V_ENDSTOP);
- hit = true;
- }
+ if (tmc_spi_homing.v && stepperV.test_stall_status()) { SBI(live_state, V_ENDSTOP); hit = true; }
#endif
#if W_SPI_SENSORLESS
- if (tmc_spi_homing.w && stepperW.test_stall_status()) {
- SBI(live_state, W_ENDSTOP);
- hit = true;
- }
+ if (tmc_spi_homing.w && stepperW.test_stall_status()) { SBI(live_state, W_ENDSTOP); hit = true; }
#endif
if (TERN0(ENDSTOP_INTERRUPTS_FEATURE, hit)) update();
@@ -1414,7 +1382,13 @@ void Endstops::update() {
void Endstops::clear_endstop_state() {
TERN_(X_SPI_SENSORLESS, CBI(live_state, X_ENDSTOP));
+ #if BOTH(X_SPI_SENSORLESS, X_DUAL_ENDSTOPS)
+ CBI(live_state, X2_ENDSTOP);
+ #endif
TERN_(Y_SPI_SENSORLESS, CBI(live_state, Y_ENDSTOP));
+ #if BOTH(Y_SPI_SENSORLESS, Y_DUAL_ENDSTOPS)
+ CBI(live_state, Y2_ENDSTOP);
+ #endif
TERN_(Z_SPI_SENSORLESS, CBI(live_state, Z_ENDSTOP));
TERN_(I_SPI_SENSORLESS, CBI(live_state, I_ENDSTOP));
TERN_(J_SPI_SENSORLESS, CBI(live_state, J_ENDSTOP));
diff --git a/Marlin/Marlin/src/module/endstops.h b/Marlin/Marlin/src/module/endstops.h
index bffa7fdc..20e258f6 100644
--- a/Marlin/Marlin/src/module/endstops.h
+++ b/Marlin/Marlin/src/module/endstops.h
@@ -85,12 +85,18 @@ enum EndstopEnum : char {
// Endstops can be either MIN or MAX but not both
#if HAS_X_MIN || HAS_X_MAX
, X_ENDSTOP = TERN(X_HOME_TO_MAX, X_MAX, X_MIN)
+ #if ENABLED(X_DUAL_ENDSTOPS)
+ , X2_ENDSTOP = TERN(X_HOME_TO_MAX, X2_MAX, X2_MIN)
+ #endif
#endif
#if HAS_Y_MIN || HAS_Y_MAX
, Y_ENDSTOP = TERN(Y_HOME_TO_MAX, Y_MAX, Y_MIN)
+ #if ENABLED(Y_DUAL_ENDSTOPS)
+ , Y2_ENDSTOP = TERN(Y_HOME_TO_MAX, Y2_MAX, Y2_MIN)
+ #endif
#endif
#if HAS_Z_MIN || HAS_Z_MAX || HOMING_Z_WITH_PROBE
- , Z_ENDSTOP = TERN(Z_HOME_TO_MAX, Z_MAX, TERN(HOMING_Z_WITH_PROBE, Z_MIN_PROBE, Z_MIN))
+ , Z_ENDSTOP = TERN(HOMING_Z_WITH_PROBE, Z_MIN_PROBE, TERN(Z_HOME_TO_MAX, Z_MAX, Z_MIN))
#endif
#if HAS_I_MIN || HAS_I_MAX
, I_ENDSTOP = TERN(I_HOME_TO_MAX, I_MAX, I_MIN)
diff --git a/Marlin/Marlin/src/module/motion.cpp b/Marlin/Marlin/src/module/motion.cpp
index dadbfab2..51081f51 100644
--- a/Marlin/Marlin/src/module/motion.cpp
+++ b/Marlin/Marlin/src/module/motion.cpp
@@ -128,7 +128,10 @@ xyze_pos_t destination; // {0}
// no other feedrate is specified. Overridden for special moves.
// Set by the last G0 through G5 command's "F" parameter.
// Functions that override this for custom moves *must always* restore it!
-feedRate_t feedrate_mm_s = MMM_TO_MMS(1500);
+#ifndef DEFAULT_FEEDRATE_MM_M
+ #define DEFAULT_FEEDRATE_MM_M 4000
+#endif
+feedRate_t feedrate_mm_s = MMM_TO_MMS(DEFAULT_FEEDRATE_MM_M);
int16_t feedrate_percentage = 100;
// Cartesian conversion result goes here:
@@ -352,7 +355,7 @@ void report_current_position_projected() {
// Return true if the given position is within the machine bounds.
bool position_is_reachable(const_float_t rx, const_float_t ry) {
- if (!COORDINATE_OKAY(ry, Y_MIN_POS - fslop, Y_MAX_POS + fslop)) return false;
+ if (TERN0(HAS_Y_AXIS, !COORDINATE_OKAY(ry, Y_MIN_POS - fslop, Y_MAX_POS + fslop))) return false;
#if ENABLED(DUAL_X_CARRIAGE)
if (active_extruder)
return COORDINATE_OKAY(rx, X2_MIN_POS - fslop, X2_MAX_POS + fslop);
@@ -543,7 +546,7 @@ void _internal_move_to_destination(const_feedRate_t fr_mm_s/*=0.0f*/
* - Delta may lower Z first to get into the free motion zone.
* - Before returning, wait for the planner buffer to empty.
*/
-void do_blocking_move_to(NUM_AXIS_ARGS(const float), const_feedRate_t fr_mm_s/*=0.0f*/) {
+void do_blocking_move_to(NUM_AXIS_ARGS(const_float_t), const_feedRate_t fr_mm_s/*=0.0f*/) {
DEBUG_SECTION(log_move, "do_blocking_move_to", DEBUGGING(LEVELING));
if (DEBUGGING(LEVELING)) DEBUG_XYZ("> ", NUM_AXIS_ARGS());
@@ -618,7 +621,7 @@ void do_blocking_move_to(NUM_AXIS_ARGS(const float), const_feedRate_t fr_mm_s/*=
if (current_position.z < z) { current_position.z = z; line_to_current_position(z_feedrate); }
#endif
- current_position.set(x, y); line_to_current_position(xy_feedrate);
+ current_position.set(x OPTARG(HAS_Y_AXIS, y)); line_to_current_position(xy_feedrate);
#if HAS_I_AXIS
current_position.i = i; line_to_current_position(i_feedrate);
@@ -1471,13 +1474,18 @@ void prepare_line_to_destination() {
}
bool homing_needed_error(main_axes_bits_t axis_bits/*=main_axes_mask*/) {
- if ((axis_bits = axes_should_home(axis_bits))) {
- PGM_P home_first = GET_TEXT(MSG_HOME_FIRST);
+ if ((axis_bits &= axes_should_home(axis_bits))) {
+ char all_axes[] = STR_AXES_MAIN, need[NUM_AXES + 1];
+ uint8_t n = 0;
+ LOOP_NUM_AXES(i) if (TEST(axis_bits, i)) need[n++] = all_axes[i];
+ need[n] = '\0';
+
char msg[30];
- #define _AXIS_CHAR(N) TEST(axis_bits, _AXIS(N)) ? STR_##N : ""
- sprintf_P(msg, home_first, MAPLIST(_AXIS_CHAR, MAIN_AXIS_NAMES));
+ sprintf_P(msg, GET_EN_TEXT(MSG_HOME_FIRST), need);
SERIAL_ECHO_START();
SERIAL_ECHOLN(msg);
+
+ sprintf_P(msg, GET_TEXT(MSG_HOME_FIRST), need);
ui.set_status(msg);
return true;
}
@@ -2258,25 +2266,18 @@ void prepare_line_to_destination() {
#endif
// Put away the Z probe
- #if HOMING_Z_WITH_PROBE
- if (axis == Z_AXIS && probe.stow()) return;
- #endif
+ if (TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS && probe.stow())) return;
#if DISABLED(DELTA) && defined(HOMING_BACKOFF_POST_MM)
const xyz_float_t endstop_backoff = HOMING_BACKOFF_POST_MM;
if (endstop_backoff[axis]) {
current_position[axis] -= ABS(endstop_backoff[axis]) * axis_home_dir;
- line_to_current_position(
- #if HOMING_Z_WITH_PROBE
- (axis == Z_AXIS) ? z_probe_fast_mm_s :
- #endif
- homing_feedrate(axis)
- );
+ line_to_current_position(TERN_(HOMING_Z_WITH_PROBE, (axis == Z_AXIS) ? z_probe_fast_mm_s :) homing_feedrate(axis));
#if ENABLED(SENSORLESS_HOMING)
planner.synchronize();
if (false
- #if ANY(IS_CORE, MARKFORGED_XY, MARKFORGED_YX)
+ #ifdef NORMAL_AXIS
|| axis != NORMAL_AXIS
#endif
) safe_delay(200); // Short delay to allow belts to spring back
@@ -2383,7 +2384,7 @@ void set_axis_is_at_home(const AxisEnum axis) {
* Change the home offset for an axis.
* Also refreshes the workspace offset.
*/
- void set_home_offset(const AxisEnum axis, const float v) {
+ void set_home_offset(const AxisEnum axis, const_float_t v) {
home_offset[axis] = v;
update_workspace_offset(axis);
}
diff --git a/Marlin/Marlin/src/module/motion.h b/Marlin/Marlin/src/module/motion.h
index ce909476..68cadcc4 100644
--- a/Marlin/Marlin/src/module/motion.h
+++ b/Marlin/Marlin/src/module/motion.h
@@ -344,7 +344,7 @@ inline void prepare_internal_move_to_destination(const_feedRate_t fr_mm_s=0.0f)
/**
* Blocking movement and shorthand functions
*/
-void do_blocking_move_to(NUM_AXIS_ARGS(const float), const_feedRate_t fr_mm_s=0.0f);
+void do_blocking_move_to(NUM_AXIS_ARGS(const_float_t), const_feedRate_t fr_mm_s=0.0f);
void do_blocking_move_to(const xy_pos_t &raw, const_feedRate_t fr_mm_s=0.0f);
void do_blocking_move_to(const xyz_pos_t &raw, const_feedRate_t fr_mm_s=0.0f);
void do_blocking_move_to(const xyze_pos_t &raw, const_feedRate_t fr_mm_s=0.0f);
@@ -616,7 +616,7 @@ void home_if_needed(const bool keeplev=false);
#endif
#if HAS_M206_COMMAND
- void set_home_offset(const AxisEnum axis, const float v);
+ void set_home_offset(const AxisEnum axis, const_float_t v);
#endif
#if USE_SENSORLESS
diff --git a/Marlin/Marlin/src/module/planner.cpp b/Marlin/Marlin/src/module/planner.cpp
index ed850450..d4e5be30 100644
--- a/Marlin/Marlin/src/module/planner.cpp
+++ b/Marlin/Marlin/src/module/planner.cpp
@@ -1961,7 +1961,7 @@ bool Planner::_populate_block(
#if ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
if (da < 0) SBI(dm, X_HEAD); // Save the toolhead's true direction in X
if (db < 0) SBI(dm, Y_HEAD); // ...and Y
- if (dc < 0) SBI(dm, Z_AXIS);
+ TERN_(HAS_Z_AXIS, if (dc < 0) SBI(dm, Z_AXIS));
#endif
#if IS_CORE
#if CORE_IS_XY
@@ -2085,7 +2085,7 @@ bool Planner::_populate_block(
#if ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
steps_dist_mm.head.x = da * mm_per_step[A_AXIS];
steps_dist_mm.head.y = db * mm_per_step[B_AXIS];
- steps_dist_mm.z = dc * mm_per_step[Z_AXIS];
+ TERN_(HAS_Z_AXIS, steps_dist_mm.z = dc * mm_per_step[Z_AXIS]);
#endif
#if IS_CORE
#if CORE_IS_XY
@@ -2193,7 +2193,7 @@ bool Planner::_populate_block(
#endif
);
- #if SECONDARY_LINEAR_AXES >= 1 && NONE(FOAMCUTTER_XYUV, ARTICULATED_ROBOT_ARM)
+ #if SECONDARY_LINEAR_AXES && NONE(FOAMCUTTER_XYUV, ARTICULATED_ROBOT_ARM)
if (UNEAR_ZERO(distance_sqr)) {
// Move does not involve any primary linear axes (xyz) but might involve secondary linear axes
distance_sqr = (0.0f
@@ -2270,7 +2270,7 @@ bool Planner::_populate_block(
stepper.enable_axis(X_AXIS);
stepper.enable_axis(Y_AXIS);
}
- #if DISABLED(Z_LATE_ENABLE)
+ #if HAS_Z_AXIS && DISABLED(Z_LATE_ENABLE)
if (block->steps.z) stepper.enable_axis(Z_AXIS);
#endif
#elif CORE_IS_XZ
@@ -3441,8 +3441,7 @@ void Planner::set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS) {
// Doesn't matter because block_buffer_runtime_us is already too small an estimation.
bbru >>= 10;
// limit to about a minute.
- NOMORE(bbru, 0x0000FFFFUL);
- return bbru;
+ return _MIN(bbru, 0x0000FFFFUL);
}
void Planner::clear_block_buffer_runtime() {
diff --git a/Marlin/Marlin/src/module/printcounter.cpp b/Marlin/Marlin/src/module/printcounter.cpp
index 3b6239c6..f3d9ec8a 100644
--- a/Marlin/Marlin/src/module/printcounter.cpp
+++ b/Marlin/Marlin/src/module/printcounter.cpp
@@ -41,7 +41,7 @@ Stopwatch print_job_timer; // Global Print Job Timer instance
#include "../libs/buzzer.h"
#endif
-#if PRINTCOUNTER_SYNC
+#if ENABLED(PRINTCOUNTER_SYNC)
#include "../module/planner.h"
#endif
diff --git a/Marlin/Marlin/src/module/probe.cpp b/Marlin/Marlin/src/module/probe.cpp
index fa92ae1f..d4f25126 100644
--- a/Marlin/Marlin/src/module/probe.cpp
+++ b/Marlin/Marlin/src/module/probe.cpp
@@ -152,7 +152,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
#elif ENABLED(TOUCH_MI_PROBE)
// Move to the magnet to unlock the probe
- inline void run_deploy_moves_script() {
+ inline void run_deploy_moves() {
#ifndef TOUCH_MI_DEPLOY_XPOS
#define TOUCH_MI_DEPLOY_XPOS X_MIN_POS
#elif TOUCH_MI_DEPLOY_XPOS > X_MAX_BED
@@ -168,7 +168,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
LCD_MESSAGE(MSG_MANUAL_DEPLOY_TOUCHMI);
ui.return_to_status();
- TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("Deploy TouchMI"), FPSTR(CONTINUE_STR)));
+ TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(F("Deploy TouchMI")));
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response());
ui.reset_status();
ui.goto_screen(prev_screen);
@@ -183,16 +183,17 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
}
// Move down to the bed to stow the probe
- inline void run_stow_moves_script() {
- const xyz_pos_t oldpos = current_position;
+ // TODO: Handle cases where it would be a bad idea to move down.
+ inline void run_stow_moves() {
+ const float oldz = current_position.z;
endstops.enable_z_probe(false);
do_blocking_move_to_z(TOUCH_MI_RETRACT_Z, homing_feedrate(Z_AXIS));
- do_blocking_move_to(oldpos, homing_feedrate(Z_AXIS));
+ do_blocking_move_to_z(oldz, homing_feedrate(Z_AXIS));
}
#elif ENABLED(Z_PROBE_ALLEN_KEY)
- inline void run_deploy_moves_script() {
+ inline void run_deploy_moves() {
#ifdef Z_PROBE_ALLEN_KEY_DEPLOY_1
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0
@@ -230,7 +231,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
#endif
}
- inline void run_stow_moves_script() {
+ inline void run_stow_moves() {
#ifdef Z_PROBE_ALLEN_KEY_STOW_1
#ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0
@@ -272,7 +273,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
typedef struct { float fr_mm_min; xyz_pos_t where; } mag_probe_move_t;
- inline void run_deploy_moves_script() {
+ inline void run_deploy_moves() {
#ifdef MAG_MOUNTED_DEPLOY_1
constexpr mag_probe_move_t deploy_1 = MAG_MOUNTED_DEPLOY_1;
do_blocking_move_to(deploy_1.where, MMM_TO_MMS(deploy_1.fr_mm_min));
@@ -295,7 +296,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
#endif
}
- inline void run_stow_moves_script() {
+ inline void run_stow_moves() {
#ifdef MAG_MOUNTED_STOW_1
constexpr mag_probe_move_t stow_1 = MAG_MOUNTED_STOW_1;
do_blocking_move_to(stow_1.where, MMM_TO_MMS(stow_1.fr_mm_min));
@@ -360,25 +361,35 @@ void Probe::do_z_raise(const float z_raise) {
FORCE_INLINE void probe_specific_action(const bool deploy) {
#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW)
- do {
- #if ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED)
- if (deploy != PROBE_TRIGGERED()) break;
- #endif
- OKAY_BUZZ();
+ // Start preheating before waiting for user confirmation that the probe is ready.
+ TERN_(PREHEAT_BEFORE_PROBING, if (deploy) probe.preheat_for_probing(0, PROBING_BED_TEMP, true));
+
+ FSTR_P const ds_str = deploy ? GET_TEXT_F(MSG_MANUAL_DEPLOY) : GET_TEXT_F(MSG_MANUAL_STOW);
+ ui.return_to_status(); // To display the new status message
+ ui.set_status(ds_str, 99);
+ SERIAL_ECHOLNF(deploy ? GET_EN_TEXT_F(MSG_MANUAL_DEPLOY) : GET_EN_TEXT_F(MSG_MANUAL_STOW));
+
+ OKAY_BUZZ();
+
+ #if ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED)
+ // Wait for the probe to be attached or detached before asking for explicit user confirmation
+ // Allow the user to interrupt
+ {
+ KEEPALIVE_STATE(PAUSED_FOR_USER);
+ TERN_(HAS_RESUME_CONTINUE, wait_for_user = true);
+ while (deploy == PROBE_TRIGGERED() && TERN1(HAS_RESUME_CONTINUE, wait_for_user)) idle_no_sleep();
+ TERN_(HAS_RESUME_CONTINUE, wait_for_user = false);
+ OKAY_BUZZ();
+ }
+ #endif
- FSTR_P const ds_str = deploy ? GET_TEXT_F(MSG_MANUAL_DEPLOY) : GET_TEXT_F(MSG_MANUAL_STOW);
- ui.return_to_status(); // To display the new status message
- ui.set_status(ds_str, 99);
- SERIAL_ECHOLNF(deploy ? GET_EN_TEXT_F(MSG_MANUAL_DEPLOY) : GET_EN_TEXT_F(MSG_MANUAL_STOW));
+ TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(ds_str));
+ TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(ds_str));
+ TERN_(DWIN_LCD_PROUI, DWIN_Popup_Confirm(ICON_BLTouch, ds_str, FPSTR(CONTINUE_STR)));
+ TERN_(HAS_RESUME_CONTINUE, wait_for_user_response());
- TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, ds_str, FPSTR(CONTINUE_STR)));
- TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(ds_str));
- TERN_(DWIN_LCD_PROUI, DWIN_Popup_Confirm(ICON_BLTouch, ds_str, FPSTR(CONTINUE_STR)));
- TERN_(HAS_RESUME_CONTINUE, wait_for_user_response());
- ui.reset_status();
-
- } while (ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED));
+ ui.reset_status();
#endif // PAUSE_BEFORE_DEPLOY_STOW
@@ -406,7 +417,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
#elif ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, MAG_MOUNTED_PROBE)
- deploy ? run_deploy_moves_script() : run_stow_moves_script();
+ deploy ? run_deploy_moves() : run_stow_moves();
#elif ENABLED(RACK_AND_PINION_PROBE)
@@ -435,7 +446,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
* - If a preheat input is higher than the current target, raise the target temperature.
* - If a preheat input is higher than the current temperature, wait for stabilization.
*/
- void Probe::preheat_for_probing(const celsius_t hotend_temp, const celsius_t bed_temp) {
+ void Probe::preheat_for_probing(const celsius_t hotend_temp, const celsius_t bed_temp, const bool early/*=false*/) {
#if HAS_HOTEND && (PROBING_NOZZLE_TEMP || LEVELING_NOZZLE_TEMP)
#define WAIT_FOR_NOZZLE_HEAT
#endif
@@ -443,7 +454,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
#define WAIT_FOR_BED_HEAT
#endif
- LCD_MESSAGE(MSG_PREHEATING);
+ if (!early) LCD_MESSAGE(MSG_PREHEATING);
DEBUG_ECHOPGM("Preheating ");
@@ -453,14 +464,12 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
DEBUG_ECHOPGM("hotend (", hotendPreheat, ")");
thermalManager.setTargetHotend(hotendPreheat, 0);
}
- #elif ENABLED(WAIT_FOR_BED_HEAT)
- constexpr celsius_t hotendPreheat = 0;
#endif
#if ENABLED(WAIT_FOR_BED_HEAT)
const celsius_t bedPreheat = bed_temp > thermalManager.degTargetBed() ? bed_temp : 0;
if (bedPreheat) {
- if (hotendPreheat) DEBUG_ECHOPGM(" and ");
+ if (TERN0(WAIT_FOR_NOZZLE_HEAT, hotendPreheat)) DEBUG_ECHOPGM(" and ");
DEBUG_ECHOPGM("bed (", bedPreheat, ")");
thermalManager.setTargetBed(bedPreheat);
}
@@ -468,8 +477,10 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
DEBUG_EOL();
- TERN_(WAIT_FOR_NOZZLE_HEAT, if (hotend_temp > thermalManager.wholeDegHotend(0) + (TEMP_WINDOW)) thermalManager.wait_for_hotend(0));
- TERN_(WAIT_FOR_BED_HEAT, if (bed_temp > thermalManager.wholeDegBed() + (TEMP_BED_WINDOW)) thermalManager.wait_for_bed_heating());
+ if (!early) {
+ TERN_(WAIT_FOR_NOZZLE_HEAT, if (hotend_temp > thermalManager.wholeDegHotend(0) + (TEMP_WINDOW)) thermalManager.wait_for_hotend(0));
+ TERN_(WAIT_FOR_BED_HEAT, if (bed_temp > thermalManager.wholeDegBed() + (TEMP_BED_WINDOW)) thermalManager.wait_for_bed_heating());
+ }
}
#endif
diff --git a/Marlin/Marlin/src/module/probe.h b/Marlin/Marlin/src/module/probe.h
index 73b8af00..5b1f7149 100644
--- a/Marlin/Marlin/src/module/probe.h
+++ b/Marlin/Marlin/src/module/probe.h
@@ -50,7 +50,7 @@
#endif
#if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
- #define Z_POST_CLEARANCE HMI_data.z_after_homing;
+ #define Z_POST_CLEARANCE HMI_data.z_after_homing
#elif defined(Z_AFTER_HOMING)
#define Z_POST_CLEARANCE Z_AFTER_HOMING
#elif defined(Z_HOMING_HEIGHT)
@@ -87,7 +87,7 @@ class Probe {
static xyz_pos_t offset;
#if EITHER(PREHEAT_BEFORE_PROBING, PREHEAT_BEFORE_LEVELING)
- static void preheat_for_probing(const celsius_t hotend_temp, const celsius_t bed_temp);
+ static void preheat_for_probing(const celsius_t hotend_temp, const celsius_t bed_temp, const bool early=false);
#endif
static void probe_error_stop();
diff --git a/Marlin/Marlin/src/module/settings.cpp b/Marlin/Marlin/src/module/settings.cpp
index 3d822603..e01bd9ae 100644
--- a/Marlin/Marlin/src/module/settings.cpp
+++ b/Marlin/Marlin/src/module/settings.cpp
@@ -36,12 +36,13 @@
*/
// Change EEPROM version if the structure changes
-#define EEPROM_VERSION "V87"
+#define EEPROM_VERSION "V88"
#define EEPROM_OFFSET 100
// Check the integrity of data offsets.
// Can be disabled for production build.
//#define DEBUG_EEPROM_READWRITE
+//#define DEBUG_EEPROM_OBSERVE
#include "settings.h"
@@ -207,7 +208,8 @@ typedef struct SettingsDataStruct {
#if ENABLED(EEPROM_INIT_NOW)
uint32_t build_hash; // Unique build hash
#endif
- uint16_t crc; // Data Checksum
+ uint16_t crc; // Data Checksum for validation
+ uint16_t data_size; // Data Size for validation
//
// DISTINCT_E_FACTORS
@@ -250,6 +252,7 @@ typedef struct SettingsDataStruct {
//
float mbl_z_offset; // bedlevel.z_offset
uint8_t mesh_num_x, mesh_num_y; // GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y
+ uint16_t mesh_check; // Hash to check against X/Y
float mbl_z_values[TERN(MESH_BED_LEVELING, GRID_MAX_POINTS_X, 3)] // bedlevel.z_values
[TERN(MESH_BED_LEVELING, GRID_MAX_POINTS_Y, 3)];
@@ -268,6 +271,7 @@ typedef struct SettingsDataStruct {
// AUTO_BED_LEVELING_BILINEAR
//
uint8_t grid_max_x, grid_max_y; // GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y
+ uint16_t grid_check; // Hash to check against X/Y
xy_pos_t bilinear_grid_spacing, bilinear_start; // G29 L F
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
bed_mesh_t z_values; // G29
@@ -716,10 +720,13 @@ void MarlinSettings::postprocess() {
#if ENABLED(EEPROM_SETTINGS)
- #define EEPROM_ASSERT(TST,ERR) do{ if (!(TST)) { SERIAL_ERROR_MSG(ERR); eeprom_error = true; } }while(0)
+ #define EEPROM_ASSERT(TST,ERR) do{ if (!(TST)) { SERIAL_ERROR_MSG(ERR); eeprom_error = ERR_EEPROM_SIZE; } }while(0)
+
+ #define TWO_BYTE_HASH(A,B) uint16_t((uint16_t(A ^ 0xC3) << 4) ^ (uint16_t(B ^ 0xC3) << 12))
#if ENABLED(DEBUG_EEPROM_READWRITE)
#define _FIELD_TEST(FIELD) \
+ SERIAL_ECHOLNPGM("Field: " STRINGIFY(FIELD)); \
EEPROM_ASSERT( \
eeprom_error || eeprom_index == offsetof(SettingsData, FIELD) + EEPROM_OFFSET, \
"Field " STRINGIFY(FIELD) " mismatch." \
@@ -728,6 +735,14 @@ void MarlinSettings::postprocess() {
#define _FIELD_TEST(FIELD) NOOP
#endif
+ #if ENABLED(DEBUG_EEPROM_OBSERVE)
+ #define EEPROM_READ(V...) do{ SERIAL_ECHOLNPGM("READ: ", F(STRINGIFY(FIRST(V)))); EEPROM_READ_(V); }while(0)
+ #define EEPROM_READ_ALWAYS(V...) do{ SERIAL_ECHOLNPGM("READ: ", F(STRINGIFY(FIRST(V)))); EEPROM_READ_ALWAYS_(V); }while(0)
+ #else
+ #define EEPROM_READ(V...) EEPROM_READ_(V)
+ #define EEPROM_READ_ALWAYS(V...) EEPROM_READ_ALWAYS_(V)
+ #endif
+
const char version[4] = EEPROM_VERSION;
#if ENABLED(EEPROM_INIT_NOW)
@@ -737,20 +752,20 @@ void MarlinSettings::postprocess() {
constexpr uint32_t build_hash = strhash32(__DATE__ __TIME__);
#endif
- bool MarlinSettings::eeprom_error, MarlinSettings::validating;
+ bool MarlinSettings::validating;
int MarlinSettings::eeprom_index;
uint16_t MarlinSettings::working_crc;
- bool MarlinSettings::size_error(const uint16_t size) {
+ EEPROM_Error MarlinSettings::size_error(const uint16_t size) {
if (size != datasize()) {
DEBUG_ERROR_MSG("EEPROM datasize error."
#if ENABLED(MARLIN_DEV_MODE)
" (Actual:", size, " Expected:", datasize(), ")"
#endif
);
- return true;
+ return ERR_EEPROM_SIZE;
}
- return false;
+ return ERR_EEPROM_NOERR;
}
/**
@@ -762,18 +777,25 @@ void MarlinSettings::postprocess() {
if (!EEPROM_START(EEPROM_OFFSET)) return false;
- eeprom_error = false;
+ EEPROM_Error eeprom_error = ERR_EEPROM_NOERR;
// Write or Skip version. (Flash doesn't allow rewrite without erase.)
TERN(FLASH_EEPROM_EMULATION, EEPROM_SKIP, EEPROM_WRITE)(ver);
#if ENABLED(EEPROM_INIT_NOW)
- EEPROM_SKIP(build_hash); // Skip the hash slot
+ EEPROM_SKIP(build_hash); // Skip the hash slot which will be written later
#endif
EEPROM_SKIP(working_crc); // Skip the checksum slot
- working_crc = 0; // clear before first "real data"
+ //
+ // Clear after skipping CRC and before writing the CRC'ed data
+ //
+ working_crc = 0;
+
+ // Write the size of the data structure for use in validation
+ const uint16_t data_size = datasize();
+ EEPROM_WRITE(data_size);
const uint8_t e_factors = DISTINCT_AXES - (NUM_AXES);
_FIELD_TEST(e_factors);
@@ -875,6 +897,10 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(mesh_num_x);
EEPROM_WRITE(mesh_num_y);
+ // Check value for the X/Y values
+ const uint16_t mesh_check = TWO_BYTE_HASH(mesh_num_x, mesh_num_y);
+ EEPROM_WRITE(mesh_check);
+
#if ENABLED(MESH_BED_LEVELING)
EEPROM_WRITE(bedlevel.z_values);
#else
@@ -922,6 +948,11 @@ void MarlinSettings::postprocess() {
grid_max_y = TERN(AUTO_BED_LEVELING_BILINEAR, GRID_MAX_POINTS_Y, 3);
EEPROM_WRITE(grid_max_x);
EEPROM_WRITE(grid_max_y);
+
+ // Check value for the X/Y values
+ const uint16_t grid_check = TWO_BYTE_HASH(grid_max_x, grid_max_y);
+ EEPROM_WRITE(grid_check);
+
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
EEPROM_WRITE(bedlevel.grid_spacing);
EEPROM_WRITE(bedlevel.grid_start);
@@ -1095,7 +1126,7 @@ void MarlinSettings::postprocess() {
{
_FIELD_TEST(bedPID);
#if ENABLED(PIDTEMPBED)
- const PID_t &pid = thermalManager.temp_bed.pid;
+ const auto &pid = thermalManager.temp_bed.pid;
const raw_pid_t bed_pid = { pid.p(), pid.i(), pid.d() };
#else
const raw_pid_t bed_pid = { NAN, NAN, NAN };
@@ -1109,7 +1140,7 @@ void MarlinSettings::postprocess() {
{
_FIELD_TEST(chamberPID);
#if ENABLED(PIDTEMPCHAMBER)
- const PID_t &pid = thermalManager.temp_chamber.pid;
+ const auto &pid = thermalManager.temp_chamber.pid;
const raw_pid_t chamber_pid = { pid.p(), pid.i(), pid.d() };
#else
const raw_pid_t chamber_pid = { NAN, NAN, NAN };
@@ -1631,7 +1662,7 @@ void MarlinSettings::postprocess() {
//
// Report final CRC and Data Size
//
- if (!eeprom_error) {
+ if (eeprom_error == ERR_EEPROM_NOERR) {
const uint16_t eeprom_size = eeprom_index - (EEPROM_OFFSET),
final_crc = working_crc;
@@ -1647,7 +1678,7 @@ void MarlinSettings::postprocess() {
// Report storage size
DEBUG_ECHO_MSG("Settings Stored (", eeprom_size, " bytes; crc ", (uint32_t)final_crc, ")");
- eeprom_error |= size_error(eeprom_size);
+ eeprom_error = size_error(eeprom_size);
}
EEPROM_FINISH();
@@ -1659,56 +1690,82 @@ void MarlinSettings::postprocess() {
store_mesh(bedlevel.storage_slot);
#endif
- if (!eeprom_error) {
+ const bool success = (eeprom_error == ERR_EEPROM_NOERR);
+ if (success) {
LCD_MESSAGE(MSG_SETTINGS_STORED);
TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_SETTINGS_STORED)));
}
- TERN_(EXTENSIBLE_UI, ExtUI::onSettingsStored(!eeprom_error));
+ TERN_(EXTENSIBLE_UI, ExtUI::onSettingsStored(success));
- return !eeprom_error;
+ return success;
}
/**
* M501 - Retrieve Configuration
*/
- bool MarlinSettings::_load() {
- if (!EEPROM_START(EEPROM_OFFSET)) return false;
+ EEPROM_Error MarlinSettings::_load() {
+ EEPROM_Error eeprom_error = ERR_EEPROM_NOERR;
+
+ if (!EEPROM_START(EEPROM_OFFSET)) return eeprom_error;
char stored_ver[4];
EEPROM_READ_ALWAYS(stored_ver);
- // Version has to match or defaults are used
- if (strncmp(version, stored_ver, 3) != 0) {
- if (stored_ver[3] != '\0') {
- stored_ver[0] = '?';
- stored_ver[1] = '\0';
- }
- DEBUG_ECHO_MSG("EEPROM version mismatch (EEPROM=", stored_ver, " Marlin=" EEPROM_VERSION ")");
- TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_ERR_EEPROM_VERSION));
- TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_ERR_EEPROM_VERSION)));
+ uint16_t stored_crc;
- IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_version());
- eeprom_error = true;
- }
- else {
+ do { // A block to break out of on error
+
+ // Version has to match or defaults are used
+ if (strncmp(version, stored_ver, 3) != 0) {
+ if (stored_ver[3] != '\0') {
+ stored_ver[0] = '?';
+ stored_ver[1] = '\0';
+ }
+ DEBUG_ECHO_MSG("EEPROM version mismatch (EEPROM=", stored_ver, " Marlin=" EEPROM_VERSION ")");
+ eeprom_error = ERR_EEPROM_VERSION;
+ break;
+ }
- // Optionally reset on the first boot after flashing
+ //
+ // Optionally reset on first boot after flashing
+ //
#if ENABLED(EEPROM_INIT_NOW)
uint32_t stored_hash;
EEPROM_READ_ALWAYS(stored_hash);
- if (stored_hash != build_hash) { EEPROM_FINISH(); return false; }
+ if (stored_hash != build_hash) {
+ eeprom_error = ERR_EEPROM_CORRUPT;
+ break;
+ }
#endif
- uint16_t stored_crc;
+ //
+ // Get the stored CRC to compare at the end
+ //
EEPROM_READ_ALWAYS(stored_crc);
+ //
+ // A temporary float for safe storage
+ //
float dummyf = 0;
- working_crc = 0; // Init to 0. Accumulated by EEPROM_READ
- _FIELD_TEST(e_factors);
+ //
+ // Init to 0. Accumulated by EEPROM_READ
+ //
+ working_crc = 0;
+ //
+ // Validate the stored size against the current data structure size
+ //
+ uint16_t stored_size;
+ EEPROM_READ_ALWAYS(stored_size);
+ if ((eeprom_error = size_error(stored_size))) break;
+
+ //
+ // Extruder Parameter Count
// Number of e_factors may change
+ //
+ _FIELD_TEST(e_factors);
uint8_t e_factors;
EEPROM_READ_ALWAYS(e_factors);
@@ -1808,16 +1865,28 @@ void MarlinSettings::postprocess() {
//
{
uint8_t mesh_num_x, mesh_num_y;
+ uint16_t mesh_check;
EEPROM_READ(dummyf);
EEPROM_READ_ALWAYS(mesh_num_x);
EEPROM_READ_ALWAYS(mesh_num_y);
+ // Check value must correspond to the X/Y values
+ EEPROM_READ_ALWAYS(mesh_check);
+ if (mesh_check != TWO_BYTE_HASH(mesh_num_x, mesh_num_y)) {
+ eeprom_error = ERR_EEPROM_CORRUPT;
+ break;
+ }
+
#if ENABLED(MESH_BED_LEVELING)
if (!validating) bedlevel.z_offset = dummyf;
if (mesh_num_x == (GRID_MAX_POINTS_X) && mesh_num_y == (GRID_MAX_POINTS_Y)) {
// EEPROM data fits the current mesh
EEPROM_READ(bedlevel.z_values);
}
+ else if (mesh_num_x > (GRID_MAX_POINTS_X) || mesh_num_y > (GRID_MAX_POINTS_Y)) {
+ eeprom_error = ERR_EEPROM_CORRUPT;
+ break;
+ }
else {
// EEPROM data is stale
if (!validating) bedlevel.reset();
@@ -1860,6 +1929,15 @@ void MarlinSettings::postprocess() {
uint8_t grid_max_x, grid_max_y;
EEPROM_READ_ALWAYS(grid_max_x); // 1 byte
EEPROM_READ_ALWAYS(grid_max_y); // 1 byte
+
+ // Check value must correspond to the X/Y values
+ uint16_t grid_check;
+ EEPROM_READ_ALWAYS(grid_check);
+ if (grid_check != TWO_BYTE_HASH(grid_max_x, grid_max_y)) {
+ eeprom_error = ERR_EEPROM_CORRUPT;
+ break;
+ }
+
xy_pos_t spacing, start;
EEPROM_READ(spacing); // 2 ints
EEPROM_READ(start); // 2 ints
@@ -1869,6 +1947,10 @@ void MarlinSettings::postprocess() {
bedlevel.set_grid(spacing, start);
EEPROM_READ(bedlevel.z_values); // 9 to 256 floats
}
+ else if (grid_max_x > (GRID_MAX_POINTS_X) || grid_max_y > (GRID_MAX_POINTS_Y)) {
+ eeprom_error = ERR_EEPROM_CORRUPT;
+ break;
+ }
else // EEPROM data is stale
#endif // AUTO_BED_LEVELING_BILINEAR
{
@@ -2623,27 +2705,22 @@ void MarlinSettings::postprocess() {
//
// Validate Final Size and CRC
//
- eeprom_error = size_error(eeprom_index - (EEPROM_OFFSET));
- if (eeprom_error) {
- DEBUG_ECHO_MSG("Index: ", eeprom_index - (EEPROM_OFFSET), " Size: ", datasize());
- IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_index());
+ const uint16_t eeprom_total = eeprom_index - (EEPROM_OFFSET);
+ if ((eeprom_error = size_error(eeprom_total))) {
+ // Handle below and on return
+ break;
}
else if (working_crc != stored_crc) {
- eeprom_error = true;
- DEBUG_ERROR_MSG("EEPROM CRC mismatch - (stored) ", stored_crc, " != ", working_crc, " (calculated)!");
- TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_ERR_EEPROM_CRC));
- TERN_(HOST_EEPROM_CHITCHAT, hostui.notify(GET_TEXT_F(MSG_ERR_EEPROM_CRC)));
- IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_crc());
+ eeprom_error = ERR_EEPROM_CRC;
+ break;
}
else if (!validating) {
DEBUG_ECHO_START();
DEBUG_ECHO(version);
- DEBUG_ECHOLNPGM(" stored settings retrieved (", eeprom_index - (EEPROM_OFFSET), " bytes; crc ", (uint32_t)working_crc, ")");
+ DEBUG_ECHOLNPGM(" stored settings retrieved (", eeprom_total, " bytes; crc ", working_crc, ")");
TERN_(HOST_EEPROM_CHITCHAT, hostui.notify(F("Stored settings retrieved")));
}
- if (!validating && !eeprom_error) postprocess();
-
#if ENABLED(AUTO_BED_LEVELING_UBL)
if (!validating) {
bedlevel.report_state();
@@ -2655,7 +2732,7 @@ void MarlinSettings::postprocess() {
#endif
}
else {
- eeprom_error = true;
+ eeprom_error = ERR_EEPROM_CORRUPT;
#if BOTH(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE)
DEBUG_ECHOPGM("?Can't enable ");
bedlevel.echo_name();
@@ -2674,6 +2751,26 @@ void MarlinSettings::postprocess() {
}
}
#endif
+
+ } while(0);
+
+ EEPROM_FINISH();
+
+ switch (eeprom_error) {
+ case ERR_EEPROM_NOERR:
+ if (!validating) postprocess();
+ break;
+ case ERR_EEPROM_SIZE:
+ DEBUG_ECHO_MSG("Index: ", eeprom_index - (EEPROM_OFFSET), " Size: ", datasize());
+ break;
+ case ERR_EEPROM_CORRUPT:
+ DEBUG_ERROR_MSG(STR_ERR_EEPROM_CORRUPT);
+ break;
+ case ERR_EEPROM_CRC:
+ DEBUG_ERROR_MSG("EEPROM CRC mismatch - (stored) ", stored_crc, " != ", working_crc, " (calculated)!");
+ TERN_(HOST_EEPROM_CHITCHAT, hostui.notify(GET_TEXT_F(MSG_ERR_EEPROM_CRC)));
+ break;
+ default: break;
}
#if ENABLED(EEPROM_CHITCHAT) && DISABLED(DISABLE_M503)
@@ -2681,9 +2778,7 @@ void MarlinSettings::postprocess() {
if (!validating && TERN1(EEPROM_BOOT_SILENT, IsRunning())) report();
#endif
- EEPROM_FINISH();
-
- return !eeprom_error;
+ return eeprom_error;
}
#ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
@@ -2693,21 +2788,25 @@ void MarlinSettings::postprocess() {
bool MarlinSettings::validate() {
validating = true;
#ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
- bool success = _load();
- if (!success && restoreEEPROM()) {
+ EEPROM_Error err = _load();
+ if (err != ERR_EEPROM_NOERR && restoreEEPROM()) {
SERIAL_ECHOLNPGM("Recovered backup EEPROM settings from SPI Flash");
- success = _load();
+ err = _load();
}
#else
- const bool success = _load();
+ const EEPROM_Error err = _load();
#endif
validating = false;
- return success;
+
+ if (err) ui.eeprom_alert(err);
+
+ return (err == ERR_EEPROM_NOERR);
}
bool MarlinSettings::load() {
if (validate()) {
- const bool success = _load();
+ const EEPROM_Error err = _load();
+ const bool success = (err == ERR_EEPROM_NOERR);
TERN_(EXTENSIBLE_UI, ExtUI::onSettingsLoaded(success));
return success;
}
diff --git a/Marlin/Marlin/src/module/settings.h b/Marlin/Marlin/src/module/settings.h
index a8fca60b..b7c5210d 100644
--- a/Marlin/Marlin/src/module/settings.h
+++ b/Marlin/Marlin/src/module/settings.h
@@ -29,6 +29,13 @@
#if ENABLED(EEPROM_SETTINGS)
#include "../HAL/shared/eeprom_api.h"
+ enum EEPROM_Error : uint8_t {
+ ERR_EEPROM_NOERR,
+ ERR_EEPROM_VERSION,
+ ERR_EEPROM_SIZE,
+ ERR_EEPROM_CRC,
+ ERR_EEPROM_CORRUPT
+ };
#endif
class MarlinSettings {
@@ -98,7 +105,7 @@ class MarlinSettings {
#if ENABLED(EEPROM_SETTINGS)
- static bool eeprom_error, validating;
+ static bool validating;
#if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
// That can store is enabled
@@ -106,8 +113,8 @@ class MarlinSettings {
// live at the very end of the eeprom
#endif
- static bool _load();
- static bool size_error(const uint16_t size);
+ static EEPROM_Error _load();
+ static EEPROM_Error size_error(const uint16_t size);
static int eeprom_index;
static uint16_t working_crc;
@@ -130,16 +137,16 @@ class MarlinSettings {
}
template
- static void EEPROM_READ(T &VAR) {
+ static void EEPROM_READ_(T &VAR) {
persistentStore.read_data(eeprom_index, (uint8_t *) &VAR, sizeof(VAR), &working_crc, !validating);
}
- static void EEPROM_READ(uint8_t *VAR, size_t sizeof_VAR) {
+ static void EEPROM_READ_(uint8_t *VAR, size_t sizeof_VAR) {
persistentStore.read_data(eeprom_index, VAR, sizeof_VAR, &working_crc, !validating);
}
template
- static void EEPROM_READ_ALWAYS(T &VAR) {
+ static void EEPROM_READ_ALWAYS_(T &VAR) {
persistentStore.read_data(eeprom_index, (uint8_t *) &VAR, sizeof(VAR), &working_crc);
}
diff --git a/Marlin/Marlin/src/module/stepper.cpp b/Marlin/Marlin/src/module/stepper.cpp
index 70a1e25c..1705c60d 100644
--- a/Marlin/Marlin/src/module/stepper.cpp
+++ b/Marlin/Marlin/src/module/stepper.cpp
@@ -1600,8 +1600,11 @@ void Stepper::isr() {
// Set the next ISR to fire at the proper time
HAL_timer_set_compare(MF_TIMER_STEP, hal_timer_t(next_isr_ticks));
- // Don't forget to finally reenable interrupts
- hal.isr_on();
+ // Don't forget to finally reenable interrupts on non-AVR.
+ // AVR automatically calls sei() for us on Return-from-Interrupt.
+ #ifndef __AVR__
+ hal.isr_on();
+ #endif
}
#if MINIMUM_STEPPER_PULSE || MAXIMUM_STEPPER_RATE
@@ -1869,7 +1872,6 @@ void Stepper::pulse_phase_isr() {
// don't actually step here, but do subtract movements steps
// from the linear advance step count
step_needed.e = false;
- count_position.e -= count_direction.e;
la_advance_steps--;
}
#endif
@@ -2062,7 +2064,7 @@ uint32_t Stepper::calc_timer_interval(uint32_t step_rate) {
const uint8_t rate_mod_256 = (step_rate & 0x00FF);
const uintptr_t table_address = uintptr_t(&speed_lookuptable_fast[uint8_t(step_rate >> 8)][0]),
gain = uint16_t(pgm_read_word(table_address + 2));
- return uint16_t(pgm_read_word(table_address)) - MultiU16X8toH16(rate_mod_256, gain);
+ return uint16_t(pgm_read_word(table_address)) - MultiU8X16toH16(rate_mod_256, gain);
}
else { // lower step rates
uintptr_t table_address = uintptr_t(&speed_lookuptable_slow[0][0]);
@@ -2262,6 +2264,8 @@ uint32_t Stepper::block_phase_isr() {
DIR_WAIT_AFTER();
}
}
+ else
+ la_interval = LA_ADV_NEVER;
}
#endif // LIN_ADVANCE
@@ -2776,35 +2780,44 @@ void Stepper::init() {
// Init Enable Pins - steppers default to disabled.
#if HAS_X_ENABLE
+ #ifndef X_ENABLE_INIT_STATE
+ #define X_ENABLE_INIT_STATE !X_ENABLE_ON
+ #endif
X_ENABLE_INIT();
- if (!X_ENABLE_ON) X_ENABLE_WRITE(HIGH);
+ if (X_ENABLE_INIT_STATE) X_ENABLE_WRITE(X_ENABLE_INIT_STATE);
#if BOTH(HAS_X2_STEPPER, HAS_X2_ENABLE)
X2_ENABLE_INIT();
- if (!X_ENABLE_ON) X2_ENABLE_WRITE(HIGH);
+ if (X_ENABLE_INIT_STATE) X2_ENABLE_WRITE(X_ENABLE_INIT_STATE);
#endif
#endif
#if HAS_Y_ENABLE
+ #ifndef Y_ENABLE_INIT_STATE
+ #define Y_ENABLE_INIT_STATE !Y_ENABLE_ON
+ #endif
Y_ENABLE_INIT();
- if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
+ if (Y_ENABLE_INIT_STATE) Y_ENABLE_WRITE(Y_ENABLE_INIT_STATE);
#if BOTH(HAS_DUAL_Y_STEPPERS, HAS_Y2_ENABLE)
Y2_ENABLE_INIT();
- if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
+ if (Y_ENABLE_INIT_STATE) Y2_ENABLE_WRITE(Y_ENABLE_INIT_STATE);
#endif
#endif
#if HAS_Z_ENABLE
+ #ifndef Z_ENABLE_INIT_STATE
+ #define Z_ENABLE_INIT_STATE !Z_ENABLE_ON
+ #endif
Z_ENABLE_INIT();
- if (!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH);
+ if (Z_ENABLE_INIT_STATE) Z_ENABLE_WRITE(Z_ENABLE_INIT_STATE);
#if NUM_Z_STEPPERS >= 2 && HAS_Z2_ENABLE
Z2_ENABLE_INIT();
- if (!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH);
+ if (Z_ENABLE_INIT_STATE) Z2_ENABLE_WRITE(Z_ENABLE_INIT_STATE);
#endif
#if NUM_Z_STEPPERS >= 3 && HAS_Z3_ENABLE
Z3_ENABLE_INIT();
- if (!Z_ENABLE_ON) Z3_ENABLE_WRITE(HIGH);
+ if (Z_ENABLE_INIT_STATE) Z3_ENABLE_WRITE(Z_ENABLE_INIT_STATE);
#endif
#if NUM_Z_STEPPERS >= 4 && HAS_Z4_ENABLE
Z4_ENABLE_INIT();
- if (!Z_ENABLE_ON) Z4_ENABLE_WRITE(HIGH);
+ if (Z_ENABLE_INIT_STATE) Z4_ENABLE_WRITE(Z_ENABLE_INIT_STATE);
#endif
#endif
#if HAS_I_ENABLE
@@ -2832,36 +2845,63 @@ void Stepper::init() {
if (!W_ENABLE_ON) W_ENABLE_WRITE(HIGH);
#endif
#if HAS_E0_ENABLE
+ #ifndef E_ENABLE_INIT_STATE
+ #define E_ENABLE_INIT_STATE !E_ENABLE_ON
+ #endif
+ #ifndef E0_ENABLE_INIT_STATE
+ #define E0_ENABLE_INIT_STATE E_ENABLE_INIT_STATE
+ #endif
E0_ENABLE_INIT();
- if (!E_ENABLE_ON) E0_ENABLE_WRITE(HIGH);
+ if (E0_ENABLE_INIT_STATE) E0_ENABLE_WRITE(E0_ENABLE_INIT_STATE);
#endif
#if HAS_E1_ENABLE
+ #ifndef E1_ENABLE_INIT_STATE
+ #define E1_ENABLE_INIT_STATE E_ENABLE_INIT_STATE
+ #endif
E1_ENABLE_INIT();
- if (!E_ENABLE_ON) E1_ENABLE_WRITE(HIGH);
+ if (E1_ENABLE_INIT_STATE) E1_ENABLE_WRITE(E1_ENABLE_INIT_STATE);
#endif
#if HAS_E2_ENABLE
+ #ifndef E2_ENABLE_INIT_STATE
+ #define E2_ENABLE_INIT_STATE E_ENABLE_INIT_STATE
+ #endif
E2_ENABLE_INIT();
- if (!E_ENABLE_ON) E2_ENABLE_WRITE(HIGH);
+ if (E2_ENABLE_INIT_STATE) E2_ENABLE_WRITE(E2_ENABLE_INIT_STATE);
#endif
#if HAS_E3_ENABLE
+ #ifndef E3_ENABLE_INIT_STATE
+ #define E3_ENABLE_INIT_STATE E_ENABLE_INIT_STATE
+ #endif
E3_ENABLE_INIT();
- if (!E_ENABLE_ON) E3_ENABLE_WRITE(HIGH);
+ if (E3_ENABLE_INIT_STATE) E3_ENABLE_WRITE(E3_ENABLE_INIT_STATE);
#endif
#if HAS_E4_ENABLE
+ #ifndef E4_ENABLE_INIT_STATE
+ #define E4_ENABLE_INIT_STATE E_ENABLE_INIT_STATE
+ #endif
E4_ENABLE_INIT();
- if (!E_ENABLE_ON) E4_ENABLE_WRITE(HIGH);
+ if (E4_ENABLE_INIT_STATE) E4_ENABLE_WRITE(E4_ENABLE_INIT_STATE);
#endif
#if HAS_E5_ENABLE
+ #ifndef E5_ENABLE_INIT_STATE
+ #define E5_ENABLE_INIT_STATE E_ENABLE_INIT_STATE
+ #endif
E5_ENABLE_INIT();
- if (!E_ENABLE_ON) E5_ENABLE_WRITE(HIGH);
+ if (E5_ENABLE_INIT_STATE) E5_ENABLE_WRITE(E5_ENABLE_INIT_STATE);
#endif
#if HAS_E6_ENABLE
+ #ifndef E6_ENABLE_INIT_STATE
+ #define E6_ENABLE_INIT_STATE E_ENABLE_INIT_STATE
+ #endif
E6_ENABLE_INIT();
- if (!E_ENABLE_ON) E6_ENABLE_WRITE(HIGH);
+ if (E6_ENABLE_INIT_STATE) E6_ENABLE_WRITE(E6_ENABLE_INIT_STATE);
#endif
#if HAS_E7_ENABLE
+ #ifndef E7_ENABLE_INIT_STATE
+ #define E7_ENABLE_INIT_STATE E_ENABLE_INIT_STATE
+ #endif
E7_ENABLE_INIT();
- if (!E_ENABLE_ON) E7_ENABLE_WRITE(HIGH);
+ if (E7_ENABLE_INIT_STATE) E7_ENABLE_WRITE(E7_ENABLE_INIT_STATE);
#endif
#define _STEP_INIT(AXIS) AXIS ##_STEP_INIT()
@@ -2984,7 +3024,7 @@ void Stepper::init() {
* Calculate a fixed point factor to apply to the signal and its echo
* when shaping an axis.
*/
- void Stepper::set_shaping_damping_ratio(const AxisEnum axis, const float zeta) {
+ void Stepper::set_shaping_damping_ratio(const AxisEnum axis, const_float_t zeta) {
// from the damping ratio, get a factor that can be applied to advance_dividend for fixed point maths
// for ZV, we use amplitudes 1/(1+K) and K/(1+K) where K = exp(-zeta * M_PI / sqrt(1.0f - zeta * zeta))
// which can be converted to 1:7 fixed point with an excellent fit with a 3rd order polynomial
@@ -2993,9 +3033,9 @@ void Stepper::init() {
else if (zeta >= 1.0f) factor2 = 0.0f;
else {
factor2 = 64.44056192 + -99.02008832 * zeta;
- const float zeta2 = zeta * zeta;
+ const_float_t zeta2 = zeta * zeta;
factor2 += -7.58095488 * zeta2;
- const float zeta3 = zeta2 * zeta;
+ const_float_t zeta3 = zeta2 * zeta;
factor2 += 43.073216 * zeta3;
factor2 = floor(factor2);
}
@@ -3013,7 +3053,7 @@ void Stepper::init() {
return -1;
}
- void Stepper::set_shaping_frequency(const AxisEnum axis, const float freq) {
+ void Stepper::set_shaping_frequency(const AxisEnum axis, const_float_t freq) {
// enabling or disabling shaping whilst moving can result in lost steps
planner.synchronize();
@@ -3072,7 +3112,7 @@ void Stepper::_set_position(const abce_long_t &spos) {
#if CORE_IS_XY
// corexy positioning
// these equations follow the form of the dA and dB equations on https://www.corexy.com/theory.html
- count_position.set(spos.a + spos.b, CORESIGN(spos.a - spos.b), spos.c);
+ count_position.set(spos.a + spos.b, CORESIGN(spos.a - spos.b) OPTARG(HAS_Z_AXIS, spos.c));
#elif CORE_IS_XZ
// corexz planning
count_position.set(spos.a + spos.c, spos.b, CORESIGN(spos.a - spos.c));
@@ -3724,7 +3764,7 @@ void Stepper::report_positions() {
#else // PRINTRBOARD_G2
- #include HAL_PATH(../HAL, fastio/G2_PWM.h)
+ #include HAL_PATH(.., fastio/G2_PWM.h)
#endif
diff --git a/Marlin/Marlin/src/module/stepper.h b/Marlin/Marlin/src/module/stepper.h
index e86498e8..dcb9babd 100644
--- a/Marlin/Marlin/src/module/stepper.h
+++ b/Marlin/Marlin/src/module/stepper.h
@@ -114,11 +114,11 @@
#define TIMER_READ_ADD_AND_STORE_CYCLES 13UL
// The base ISR
- #define ISR_BASE_CYCLES 1000UL
+ #define ISR_BASE_CYCLES 996UL
// Linear advance base time is 32 cycles
#if ENABLED(LIN_ADVANCE)
- #define ISR_LA_BASE_CYCLES 32UL
+ #define ISR_LA_BASE_CYCLES 30UL
#else
#define ISR_LA_BASE_CYCLES 0UL
#endif
@@ -154,38 +154,39 @@
// Add time for each stepper
#if HAS_X_STEP
- #define ISR_X_STEPPER_CYCLES ISR_STEPPER_CYCLES
+ #define ISR_X_STEPPER_CYCLES ISR_STEPPER_CYCLES
#endif
#if HAS_Y_STEP
- #define ISR_Y_STEPPER_CYCLES ISR_STEPPER_CYCLES
+ #define ISR_Y_STEPPER_CYCLES ISR_STEPPER_CYCLES
#endif
#if HAS_Z_STEP
- #define ISR_Z_STEPPER_CYCLES ISR_STEPPER_CYCLES
+ #define ISR_Z_STEPPER_CYCLES ISR_STEPPER_CYCLES
#endif
#if HAS_I_STEP
- #define ISR_I_STEPPER_CYCLES ISR_STEPPER_CYCLES
+ #define ISR_I_STEPPER_CYCLES ISR_STEPPER_CYCLES
#endif
#if HAS_J_STEP
- #define ISR_J_STEPPER_CYCLES ISR_STEPPER_CYCLES
+ #define ISR_J_STEPPER_CYCLES ISR_STEPPER_CYCLES
#endif
#if HAS_K_STEP
- #define ISR_K_STEPPER_CYCLES ISR_STEPPER_CYCLES
+ #define ISR_K_STEPPER_CYCLES ISR_STEPPER_CYCLES
#endif
#if HAS_U_STEP
- #define ISR_U_STEPPER_CYCLES ISR_STEPPER_CYCLES
+ #define ISR_U_STEPPER_CYCLES ISR_STEPPER_CYCLES
#endif
#if HAS_V_STEP
- #define ISR_V_STEPPER_CYCLES ISR_STEPPER_CYCLES
+ #define ISR_V_STEPPER_CYCLES ISR_STEPPER_CYCLES
#endif
#if HAS_W_STEP
- #define ISR_W_STEPPER_CYCLES ISR_STEPPER_CYCLES
+ #define ISR_W_STEPPER_CYCLES ISR_STEPPER_CYCLES
#endif
#if HAS_EXTRUDERS
- #define ISR_E_STEPPER_CYCLES ISR_STEPPER_CYCLES // E is always interpolated, even for mixing extruders
+ #define ISR_E_STEPPER_CYCLES ISR_STEPPER_CYCLES // E is always interpolated, even for mixing extruders
#endif
// And the total minimum loop time, not including the base
-#define MIN_ISR_LOOP_CYCLES (ISR_MIXING_STEPPER_CYCLES LOGICAL_AXIS_GANG(+ ISR_E_STEPPER_CYCLES, + ISR_X_STEPPER_CYCLES, + ISR_Y_STEPPER_CYCLES, + ISR_Z_STEPPER_CYCLES, + ISR_I_STEPPER_CYCLES, + ISR_J_STEPPER_CYCLES, + ISR_K_STEPPER_CYCLES, + ISR_U_STEPPER_CYCLES, + ISR_V_STEPPER_CYCLES, + ISR_W_STEPPER_CYCLES))
+#define _PLUS_AXIS_CYCLES(A) + (ISR_##A##_STEPPER_CYCLES)
+#define MIN_ISR_LOOP_CYCLES (ISR_MIXING_STEPPER_CYCLES LOGICAL_AXIS_MAP(_PLUS_AXIS_CYCLES))
// Calculate the minimum MPU cycles needed per pulse to enforce, limited to the max stepper rate
#define _MIN_STEPPER_PULSE_CYCLES(N) _MAX(uint32_t((F_CPU) / (MAXIMUM_STEPPER_RATE)), ((F_CPU) / 500000UL) * (N))
@@ -219,7 +220,7 @@
#define ISR_LOOP_CYCLES(R) ((ISR_LOOP_BASE_CYCLES + MIN_ISR_LOOP_CYCLES + MIN_STEPPER_PULSE_CYCLES) * (R - 1) + _MAX(MIN_ISR_LOOP_CYCLES, MIN_STEPPER_PULSE_CYCLES))
// Model input shaping as an extra loop call
-#define ISR_SHAPING_LOOP_CYCLES(R) ((TERN0(HAS_SHAPING, ISR_LOOP_BASE_CYCLES) + TERN0(INPUT_SHAPING_X, ISR_X_STEPPER_CYCLES) + TERN0(INPUT_SHAPING_Y, ISR_Y_STEPPER_CYCLES)) * (R) + (MIN_ISR_LOOP_CYCLES) * (R - 1))
+#define ISR_SHAPING_LOOP_CYCLES(R) TERN0(HAS_SHAPING, (R) * ((ISR_LOOP_BASE_CYCLES) + TERN0(INPUT_SHAPING_X, ISR_X_STEPPER_CYCLES) + TERN0(INPUT_SHAPING_Y, ISR_Y_STEPPER_CYCLES)))
// If linear advance is enabled, then it is handled separately
#if ENABLED(LIN_ADVANCE)
@@ -802,9 +803,9 @@ class Stepper {
}
#if HAS_SHAPING
- static void set_shaping_damping_ratio(const AxisEnum axis, const float zeta);
+ static void set_shaping_damping_ratio(const AxisEnum axis, const_float_t zeta);
static float get_shaping_damping_ratio(const AxisEnum axis);
- static void set_shaping_frequency(const AxisEnum axis, const float freq);
+ static void set_shaping_frequency(const AxisEnum axis, const_float_t freq);
static float get_shaping_frequency(const AxisEnum axis);
#endif
diff --git a/Marlin/Marlin/src/module/temperature.cpp b/Marlin/Marlin/src/module/temperature.cpp
index d47dbd1d..ad5f85f3 100644
--- a/Marlin/Marlin/src/module/temperature.cpp
+++ b/Marlin/Marlin/src/module/temperature.cpp
@@ -152,7 +152,7 @@
#endif
#if ENABLED(HAS_ADS1118)
-#include HAL_PATH( ../HAL, hotend/ads1118.h)
+ #include "../HAL/STM32/hotend/ads1118.h"
#endif
#if ENABLED(MPCTEMP)
@@ -321,9 +321,52 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED);
#if HAS_HOTEND
hotend_info_t Temperature::temp_hotend[HOTENDS];
- #define _HMT(N) HEATER_##N##_MAXTEMP,
- const celsius_t Temperature::hotend_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP);
-#endif
+ constexpr celsius_t Temperature::hotend_maxtemp[HOTENDS];
+
+ // Sanity-check max readable temperatures
+ #define CHECK_MAXTEMP_(N,M,S) static_assert( \
+ S >= 998 || M <= _MAX(TT_NAME(S)[0].celsius, TT_NAME(S)[COUNT(TT_NAME(S)) - 1].celsius) - HOTEND_OVERSHOOT, \
+ "HEATER_" STRINGIFY(N) "_MAXTEMP (" STRINGIFY(M) ") is too high for thermistor_" STRINGIFY(S) ".h with HOTEND_OVERSHOOT=" STRINGIFY(HOTEND_OVERSHOOT) ".");
+ #define CHECK_MAXTEMP(N) TERN(TEMP_SENSOR_##N##_IS_THERMISTOR, CHECK_MAXTEMP_, CODE_0)(N, HEATER_##N##_MAXTEMP, TEMP_SENSOR_##N)
+ REPEAT(HOTENDS, CHECK_MAXTEMP)
+
+ #if HAS_PREHEAT
+ #define CHECK_PREHEAT__(N,P,T,M) static_assert(T <= M - HOTEND_OVERSHOOT, "PREHEAT_" STRINGIFY(P) "_TEMP_HOTEND (" STRINGIFY(T) ") must be less than HEATER_" STRINGIFY(N) "_MAXTEMP (" STRINGIFY(M) ") - " STRINGIFY(HOTEND_OVERSHOOT) ".");
+ #define CHECK_PREHEAT_(N,P) CHECK_PREHEAT__(N, P, PREHEAT_##P##_TEMP_HOTEND, HEATER_##N##_MAXTEMP)
+ #define CHECK_PREHEAT(P) REPEAT2(HOTENDS, CHECK_PREHEAT_, P)
+ #if PREHEAT_COUNT >= 1
+ CHECK_PREHEAT(1)
+ #endif
+ #if PREHEAT_COUNT >= 2
+ CHECK_PREHEAT(2)
+ #endif
+ #if PREHEAT_COUNT >= 3
+ CHECK_PREHEAT(3)
+ #endif
+ #if PREHEAT_COUNT >= 4
+ CHECK_PREHEAT(4)
+ #endif
+ #if PREHEAT_COUNT >= 5
+ CHECK_PREHEAT(5)
+ #endif
+ #if PREHEAT_COUNT >= 6
+ CHECK_PREHEAT(6)
+ #endif
+ #if PREHEAT_COUNT >= 7
+ CHECK_PREHEAT(7)
+ #endif
+ #if PREHEAT_COUNT >= 8
+ CHECK_PREHEAT(8)
+ #endif
+ #if PREHEAT_COUNT >= 9
+ CHECK_PREHEAT(9)
+ #endif
+ #if PREHEAT_COUNT >= 10
+ CHECK_PREHEAT(10)
+ #endif
+ #endif // HAS_PREHEAT
+
+#endif // HAS_HOTEND
#if HAS_TEMP_REDUNDANT
redundant_info_t Temperature::temp_redundant;
@@ -469,8 +512,12 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED);
// Init min and max temp with extreme values to prevent false errors during startup
raw_adc_t Temperature::mintemp_raw_BED = TEMP_SENSOR_BED_RAW_LO_TEMP,
Temperature::maxtemp_raw_BED = TEMP_SENSOR_BED_RAW_HI_TEMP;
- TERN_(WATCH_BED, bed_watch_t Temperature::watch_bed); // = { 0 }
- IF_DISABLED(PIDTEMPBED, millis_t Temperature::next_bed_check_ms);
+ #if WATCH_BED
+ bed_watch_t Temperature::watch_bed; // = { 0 }
+ #endif
+ #if DISABLED(PIDTEMPBED)
+ millis_t Temperature::next_bed_check_ms;
+ #endif
#endif
#if HAS_TEMP_CHAMBER
@@ -480,8 +527,12 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED);
celsius_float_t old_temp = 9999;
raw_adc_t Temperature::mintemp_raw_CHAMBER = TEMP_SENSOR_CHAMBER_RAW_LO_TEMP,
Temperature::maxtemp_raw_CHAMBER = TEMP_SENSOR_CHAMBER_RAW_HI_TEMP;
- TERN_(WATCH_CHAMBER, chamber_watch_t Temperature::watch_chamber{0});
- IF_DISABLED(PIDTEMPCHAMBER, millis_t Temperature::next_chamber_check_ms);
+ #if WATCH_CHAMBER
+ chamber_watch_t Temperature::watch_chamber; // = { 0 }
+ #endif
+ #if DISABLED(PIDTEMPCHAMBER)
+ millis_t Temperature::next_chamber_check_ms;
+ #endif
#endif
#endif
@@ -538,10 +589,6 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED);
volatile bool Temperature::raw_temps_ready = false;
-#if ENABLED(PID_EXTRUSION_SCALING)
- int32_t Temperature::pes_e_position, Temperature::lpq[LPQ_MAX_LEN];
- lpq_ptr_t Temperature::lpq_ptr = 0;
-#endif
#if ENABLED(MPCTEMP)
int32_t Temperature::mpc_e_position; // = 0
@@ -1123,44 +1170,55 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) {
}
}
-#define _EFANOVERLAP(A,B) _FANOVERLAP(E##A,B)
-
#if HAS_AUTO_FAN
+ #define _EFANOVERLAP(I,N) ((I != N) && _FANOVERLAP(I,E##N))
+
#if EXTRUDER_AUTO_FAN_SPEED != 255
- #define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0)
+ #define INIT_E_AUTO_FAN_PIN(P) do{ if (PWM_PIN(P)) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0)
#else
#define INIT_E_AUTO_FAN_PIN(P) SET_OUTPUT(P)
#endif
#if CHAMBER_AUTO_FAN_SPEED != 255
- #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0)
+ #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (PWM_PIN(P)) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0)
#else
#define INIT_CHAMBER_AUTO_FAN_PIN(P) SET_OUTPUT(P)
#endif
+ #if COOLER_AUTO_FAN_SPEED != 255
+ #define INIT_COOLER_AUTO_FAN_PIN(P) do{ if (PWM_PIN(P)) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0)
+ #else
+ #define INIT_COOLER_AUTO_FAN_PIN(P) SET_OUTPUT(P)
+ #endif
#ifndef CHAMBER_FAN_INDEX
#define CHAMBER_FAN_INDEX HOTENDS
#endif
void Temperature::update_autofans() {
- #define _EFAN(B,A) _EFANOVERLAP(A,B) ? B :
+ #define _EFAN(I,N) _EFANOVERLAP(I,N) ? I :
static const uint8_t fanBit[] PROGMEM = {
0
#if HAS_MULTI_HOTEND
#define _NEXT_FAN(N) , REPEAT2(N,_EFAN,N) N
RREPEAT_S(1, HOTENDS, _NEXT_FAN)
#endif
+ #define _NFAN HOTENDS
#if HAS_AUTO_CHAMBER_FAN
- #define _CFAN(B) _FANOVERLAP(CHAMBER,B) ? B :
- , REPEAT(HOTENDS,_CFAN) (HOTENDS)
+ #define _CHFAN(I) _FANOVERLAP(I,CHAMBER) ? I :
+ , (REPEAT(HOTENDS,_CHFAN) (_NFAN))
+ #undef _NFAN
+ #define _NFAN INCREMENT(HOTENDS)
+ #endif
+ #if HAS_AUTO_COOLER_FAN
+ #define _COFAN(I) _FANOVERLAP(I,COOLER) ? I :
+ , (REPEAT(HOTENDS,_COFAN) (_NFAN))
#endif
};
uint8_t fanState = 0;
HOTEND_LOOP() {
- if (temp_hotend[e].celsius >= EXTRUDER_AUTO_FAN_TEMPERATURE) {
+ if (temp_hotend[e].celsius >= EXTRUDER_AUTO_FAN_TEMPERATURE)
SBI(fanState, pgm_read_byte(&fanBit[e]));
- }
}
#if HAS_AUTO_CHAMBER_FAN
@@ -1191,6 +1249,11 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) {
chamberfan_speed = fan_on ? CHAMBER_AUTO_FAN_SPEED : 0;
break;
#endif
+ #if ENABLED(AUTO_POWER_COOLER_FAN)
+ case COOLER_FAN_INDEX:
+ coolerfan_speed = fan_on ? COOLER_AUTO_FAN_SPEED : 0;
+ break;
+ #endif
default:
#if EITHER(AUTO_POWER_E_FANS, HAS_FANCHECK)
autofan_speed[realFan] = fan_on ? EXTRUDER_AUTO_FAN_SPEED : 0;
@@ -1203,36 +1266,18 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) {
#else
#define _AUTOFAN_SPEED() EXTRUDER_AUTO_FAN_SPEED
#endif
- #define _AUTOFAN_CASE(N) case N: _UPDATE_AUTO_FAN(E##N, fan_on, _AUTOFAN_SPEED()); break
+ #define _AUTOFAN_CASE(N) case N: _UPDATE_AUTO_FAN(E##N, fan_on, _AUTOFAN_SPEED()); break;
+ #define _AUTOFAN_NOT(N)
+ #define AUTOFAN_CASE(N) TERN(HAS_AUTO_FAN_##N, _AUTOFAN_CASE, _AUTOFAN_NOT)(N)
switch (f) {
- #if HAS_AUTO_FAN_0
- _AUTOFAN_CASE(0);
- #endif
- #if HAS_AUTO_FAN_1
- _AUTOFAN_CASE(1);
- #endif
- #if HAS_AUTO_FAN_2
- _AUTOFAN_CASE(2);
- #endif
- #if HAS_AUTO_FAN_3
- _AUTOFAN_CASE(3);
- #endif
- #if HAS_AUTO_FAN_4
- _AUTOFAN_CASE(4);
- #endif
- #if HAS_AUTO_FAN_5
- _AUTOFAN_CASE(5);
- #endif
- #if HAS_AUTO_FAN_6
- _AUTOFAN_CASE(6);
- #endif
- #if HAS_AUTO_FAN_7
- _AUTOFAN_CASE(7);
- #endif
+ REPEAT(8, AUTOFAN_CASE)
#if HAS_AUTO_CHAMBER_FAN && !AUTO_CHAMBER_IS_E
case CHAMBER_FAN_INDEX: _UPDATE_AUTO_FAN(CHAMBER, fan_on, CHAMBER_AUTO_FAN_SPEED); break;
#endif
+ #if HAS_AUTO_COOLER_FAN && !AUTO_COOLER_IS_E
+ case COOLER_FAN_INDEX: _UPDATE_AUTO_FAN(COOLER, fan_on, COOLER_AUTO_FAN_SPEED); break;
+ #endif
}
SBI(fanDone, realFan);
}
@@ -1342,50 +1387,33 @@ void Temperature::mintemp_error(const heater_id_t heater_id) {
#if HAS_PID_HEATING
- template
+ template
class PIDRunner {
public:
TT &tempinfo;
- __typeof__(TT::pid) work_pid{0};
- float temp_iState = 0, temp_dState = 0;
- bool pid_reset = true;
PIDRunner(TT &t) : tempinfo(t) { }
- float get_pid_output() {
-
+ float get_pid_output(const uint8_t extr=0) {
#if ENABLED(PID_OPENLOOP)
return constrain(tempinfo.target, 0, MAX_POW);
#else // !PID_OPENLOOP
- const float pid_error = tempinfo.target - tempinfo.celsius;
- if (!tempinfo.target || pid_error < -(PID_FUNCTIONAL_RANGE)) {
- pid_reset = true;
- return 0;
- }
- else if (pid_error > PID_FUNCTIONAL_RANGE) {
- pid_reset = true;
- return MAX_POW;
- }
-
- if (pid_reset) {
- pid_reset = false;
- temp_iState = 0.0;
- work_pid.Kd = 0.0;
- }
-
- const float max_power_over_i_gain = float(MAX_POW) / tempinfo.pid.Ki - float(MIN_POW);
- temp_iState = constrain(temp_iState + pid_error, 0, max_power_over_i_gain);
+ float out = tempinfo.pid.get_pid_output(tempinfo.target, tempinfo.celsius);
- work_pid.Kp = tempinfo.pid.Kp * pid_error;
- work_pid.Ki = tempinfo.pid.Ki * temp_iState;
- work_pid.Kd = work_pid.Kd + PID_K2 * (tempinfo.pid.Kd * (temp_dState - tempinfo.celsius) - work_pid.Kd);
+ #if ENABLED(PID_FAN_SCALING)
+ out += tempinfo.pid.get_fan_scale_output(thermalManager.fan_speed[extr]);
+ #endif
- temp_dState = tempinfo.celsius;
+ #if ENABLED(PID_EXTRUSION_SCALING)
+ out += tempinfo.pid.get_extrusion_scale_output(
+ extr == active_extruder, stepper.position(E_AXIS), planner.mm_per_step[E_AXIS], thermalManager.lpq_len
+ );
+ #endif
- return constrain(work_pid.Kp + work_pid.Ki + work_pid.Kd + float(MIN_POW), 0, MAX_POW);
+ return constrain(out, tempinfo.pid.low(), tempinfo.pid.high());
#endif // !PID_OPENLOOP
}
@@ -1399,7 +1427,8 @@ void Temperature::mintemp_error(const heater_id_t heater_id) {
STR_PID_DEBUG_INPUT, c,
STR_PID_DEBUG_OUTPUT, pid_out
#if DISABLED(PID_OPENLOOP)
- , " pTerm ", work_pid.Kp, " iTerm ", work_pid.Ki, " dTerm ", work_pid.Kd
+ , " pTerm ", tempinfo.pid.pTerm(), " iTerm ", tempinfo.pid.iTerm(), " dTerm ", tempinfo.pid.dTerm()
+ , " cTerm ", tempinfo.pid.cTerm(), " fTerm ", tempinfo.pid.fTerm()
#endif
);
}
@@ -1417,14 +1446,14 @@ void Temperature::mintemp_error(const heater_id_t heater_id) {
#if ENABLED(PIDTEMP)
- typedef PIDRunner PIDRunnerHotend;
+ typedef PIDRunner PIDRunnerHotend;
static PIDRunnerHotend hotend_pid[HOTENDS] = {
#define _HOTENDPID(E) temp_hotend[E],
REPEAT(HOTENDS, _HOTENDPID)
};
- const float pid_output = is_idling ? 0 : hotend_pid[ee].get_pid_output();
+ const float pid_output = is_idling ? 0 : hotend_pid[ee].get_pid_output(ee);
#if ENABLED(PID_DEBUG)
if (ee == active_extruder)
@@ -1525,7 +1554,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id) {
#if ENABLED(PIDTEMPBED)
float Temperature::get_pid_output_bed() {
- static PIDRunner bed_pid(temp_bed);
+ static PIDRunner bed_pid(temp_bed);
const float pid_output = bed_pid.get_pid_output();
TERN_(PID_BED_DEBUG, bed_pid.debug(temp_bed.celsius, pid_output, F("(Bed)")));
return pid_output;
@@ -1536,7 +1565,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id) {
#if ENABLED(PIDTEMPCHAMBER)
float Temperature::get_pid_output_chamber() {
- static PIDRunner chamber_pid(temp_chamber);
+ static PIDRunner chamber_pid(temp_chamber);
const float pid_output = chamber_pid.get_pid_output();
TERN_(PID_CHAMBER_DEBUG, chamber_pid.debug(temp_chamber.celsius, pid_output, F("(Chamber)")));
return pid_output;
@@ -2484,9 +2513,6 @@ void Temperature::init() {
TERN_(PROBING_HEATERS_OFF, paused_for_probing = false);
- #if BOTH(PIDTEMP, PID_EXTRUSION_SCALING)
- pes_e_position = 0;
- #endif
// Init (and disable) SPI thermocouples
#if TEMP_SENSOR_IS_ANY_MAX_TC(0) && PIN_EXISTS(TEMP_0_CS)
@@ -2692,33 +2718,39 @@ void Temperature::init() {
HAL_timer_start(MF_TIMER_TEMP, TEMP_TIMER_FREQUENCY);
ENABLE_TEMPERATURE_INTERRUPT();
- #if HAS_AUTO_FAN_0
- INIT_E_AUTO_FAN_PIN(E0_AUTO_FAN_PIN);
- #endif
- #if HAS_AUTO_FAN_1 && !_EFANOVERLAP(1,0)
- INIT_E_AUTO_FAN_PIN(E1_AUTO_FAN_PIN);
- #endif
- #if HAS_AUTO_FAN_2 && !(_EFANOVERLAP(2,0) || _EFANOVERLAP(2,1))
- INIT_E_AUTO_FAN_PIN(E2_AUTO_FAN_PIN);
- #endif
- #if HAS_AUTO_FAN_3 && !(_EFANOVERLAP(3,0) || _EFANOVERLAP(3,1) || _EFANOVERLAP(3,2))
- INIT_E_AUTO_FAN_PIN(E3_AUTO_FAN_PIN);
- #endif
- #if HAS_AUTO_FAN_4 && !(_EFANOVERLAP(4,0) || _EFANOVERLAP(4,1) || _EFANOVERLAP(4,2) || _EFANOVERLAP(4,3))
- INIT_E_AUTO_FAN_PIN(E4_AUTO_FAN_PIN);
- #endif
- #if HAS_AUTO_FAN_5 && !(_EFANOVERLAP(5,0) || _EFANOVERLAP(5,1) || _EFANOVERLAP(5,2) || _EFANOVERLAP(5,3) || _EFANOVERLAP(5,4))
- INIT_E_AUTO_FAN_PIN(E5_AUTO_FAN_PIN);
- #endif
- #if HAS_AUTO_FAN_6 && !(_EFANOVERLAP(6,0) || _EFANOVERLAP(6,1) || _EFANOVERLAP(6,2) || _EFANOVERLAP(6,3) || _EFANOVERLAP(6,4) || _EFANOVERLAP(6,5))
- INIT_E_AUTO_FAN_PIN(E6_AUTO_FAN_PIN);
- #endif
- #if HAS_AUTO_FAN_7 && !(_EFANOVERLAP(7,0) || _EFANOVERLAP(7,1) || _EFANOVERLAP(7,2) || _EFANOVERLAP(7,3) || _EFANOVERLAP(7,4) || _EFANOVERLAP(7,5) || _EFANOVERLAP(7,6))
- INIT_E_AUTO_FAN_PIN(E7_AUTO_FAN_PIN);
- #endif
- #if HAS_AUTO_CHAMBER_FAN && !AUTO_CHAMBER_IS_E
- INIT_CHAMBER_AUTO_FAN_PIN(CHAMBER_AUTO_FAN_PIN);
- #endif
+ #if HAS_AUTO_FAN
+ #define _OREFAN(I,N) || _EFANOVERLAP(I,N)
+ #if HAS_AUTO_FAN_0
+ INIT_E_AUTO_FAN_PIN(E0_AUTO_FAN_PIN);
+ #endif
+ #if HAS_AUTO_FAN_1 && !_EFANOVERLAP(0,1)
+ INIT_E_AUTO_FAN_PIN(E1_AUTO_FAN_PIN);
+ #endif
+ #if HAS_AUTO_FAN_2 && !(0 REPEAT2(2, _OREFAN, 2))
+ INIT_E_AUTO_FAN_PIN(E2_AUTO_FAN_PIN);
+ #endif
+ #if HAS_AUTO_FAN_3 && !(0 REPEAT2(3, _OREFAN, 3))
+ INIT_E_AUTO_FAN_PIN(E3_AUTO_FAN_PIN);
+ #endif
+ #if HAS_AUTO_FAN_4 && !(0 REPEAT2(4, _OREFAN, 4))
+ INIT_E_AUTO_FAN_PIN(E4_AUTO_FAN_PIN);
+ #endif
+ #if HAS_AUTO_FAN_5 && !(0 REPEAT2(5, _OREFAN, 5))
+ INIT_E_AUTO_FAN_PIN(E5_AUTO_FAN_PIN);
+ #endif
+ #if HAS_AUTO_FAN_6 && !(0 REPEAT2(6, _OREFAN, 6))
+ INIT_E_AUTO_FAN_PIN(E6_AUTO_FAN_PIN);
+ #endif
+ #if HAS_AUTO_FAN_7 && !(0 REPEAT2(7, _OREFAN, 7))
+ INIT_E_AUTO_FAN_PIN(E7_AUTO_FAN_PIN);
+ #endif
+ #if HAS_AUTO_CHAMBER_FAN && !AUTO_CHAMBER_IS_E
+ INIT_CHAMBER_AUTO_FAN_PIN(CHAMBER_AUTO_FAN_PIN);
+ #endif
+ #if HAS_AUTO_COOLER_FAN && !AUTO_COOLER_IS_E
+ INIT_COOLER_AUTO_FAN_PIN(COOLER_AUTO_FAN_PIN);
+ #endif
+ #endif // HAS_AUTO_FAN
#if HAS_HOTEND
#define _TEMP_MIN_E(NR) do{ \
@@ -2845,7 +2877,7 @@ void Temperature::init() {
*
* TODO: Embed the last 3 parameters during init, if not less optimal
*/
- void Temperature::tr_state_machine_t::run(const_celsius_float_t current, const_celsius_float_t target, const heater_id_t heater_id, const uint16_t period_seconds, const celsius_t hysteresis_degc) {
+ void Temperature::tr_state_machine_t::run(const_celsius_float_t current, const_celsius_float_t target, const heater_id_t heater_id, const uint16_t period_seconds, const celsius_float_t hysteresis_degc) {
#if HEATER_IDLE_HANDLER
// Convert the given heater_id_t to an idle array index
@@ -2907,21 +2939,26 @@ void Temperature::init() {
// While the temperature is stable watch for a bad temperature
case TRStable: {
+ const celsius_float_t rdiff = running_temp - current;
+
#if ENABLED(ADAPTIVE_FAN_SLOWING)
if (adaptive_fan_slowing && heater_id >= 0) {
- const int fan_index = _MIN(heater_id, FAN_COUNT - 1);
- if (fan_speed[fan_index] == 0 || current >= running_temp - (hysteresis_degc * 0.25f))
- fan_speed_scaler[fan_index] = 128;
- else if (current >= running_temp - (hysteresis_degc * 0.3335f))
- fan_speed_scaler[fan_index] = 96;
- else if (current >= running_temp - (hysteresis_degc * 0.5f))
- fan_speed_scaler[fan_index] = 64;
- else if (current >= running_temp - (hysteresis_degc * 0.8f))
- fan_speed_scaler[fan_index] = 32;
+ const int_fast8_t fan_index = _MIN(heater_id, FAN_COUNT - 1);
+ uint8_t scale;
+ if (fan_speed[fan_index] == 0 || rdiff <= hysteresis_degc * 0.25f)
+ scale = 128;
+ else if (rdiff <= hysteresis_degc * 0.3335f)
+ scale = 96;
+ else if (rdiff <= hysteresis_degc * 0.5f)
+ scale = 64;
+ else if (rdiff <= hysteresis_degc * 0.8f)
+ scale = 32;
else
- fan_speed_scaler[fan_index] = 0;
+ scale = 0;
+
+ fan_speed_scaler[fan_index] = scale;
}
- #endif
+ #endif // ADAPTIVE_FAN_SLOWING
const millis_t now = millis();
@@ -2941,7 +2978,7 @@ void Temperature::init() {
}
#endif
- if (current >= running_temp - hysteresis_degc) {
+ if (rdiff <= hysteresis_degc) {
timer = now + SEC_TO_MS(period_seconds);
break;
}
@@ -3380,6 +3417,10 @@ void Temperature::isr() {
static int8_t temp_count = -1;
static ADCSensorState adc_sensor_state = StartupDelay;
+
+ #ifndef SOFT_PWM_SCALE
+ #define SOFT_PWM_SCALE 0
+ #endif
static uint8_t pwm_count = _BV(SOFT_PWM_SCALE);
// Avoid multiple loads of pwm_count
diff --git a/Marlin/Marlin/src/module/temperature.h b/Marlin/Marlin/src/module/temperature.h
index 17a608ce..bd677853 100644
--- a/Marlin/Marlin/src/module/temperature.h
+++ b/Marlin/Marlin/src/module/temperature.h
@@ -41,15 +41,11 @@
#include "../feature/fancheck.h"
#endif
-#ifndef SOFT_PWM_SCALE
- #define SOFT_PWM_SCALE 0
-#endif
-
#define HOTEND_INDEX TERN(HAS_MULTI_HOTEND, e, 0)
#define E_NAME TERN_(HAS_MULTI_HOTEND, e)
// Element identifiers. Positive values are hotends. Negative values are other heaters or coolers.
-typedef enum : int8_t {
+typedef enum : int_fast8_t {
H_REDUNDANT = HID_REDUNDANT,
H_COOLER = HID_COOLER,
H_PROBE = HID_PROBE,
@@ -159,94 +155,216 @@ typedef struct { float p, i, d, c, f; } raw_pidcf_t;
#define scalePID_d(d) ( float(d) / PID_dT )
#define unscalePID_d(d) ( float(d) * PID_dT )
- typedef struct {
- float Kp, Ki, Kd;
+ /// @brief The default PID class, only has Kp, Ki, Kd, other classes extend this one
+ /// @tparam MIN_POW output when current is above target by functional_range
+ /// @tparam MAX_POW output when current is below target by functional_range
+ /// @details This class has methods for Kc and Kf terms, but returns constant default values
+ /// PID classes that implement these features are expected to override these methods
+ /// Since the finally used PID class is typedef-d, there is no need to use virtual functions
+ template
+ struct PID_t{
+ protected:
+ bool pid_reset = true;
+ float temp_iState = 0.0f, temp_dState = 0.0f;
+ float work_p = 0, work_i = 0, work_d = 0;
+
+ public:
+ float Kp = 0, Ki = 0, Kd = 0;
float p() const { return Kp; }
float i() const { return unscalePID_i(Ki); }
float d() const { return unscalePID_d(Kd); }
float c() const { return 1; }
float f() const { return 0; }
+ float pTerm() const { return work_p; }
+ float iTerm() const { return work_i; }
+ float dTerm() const { return work_d; }
+ float cTerm() const { return 0; }
+ float fTerm() const { return 0; }
void set_Kp(float p) { Kp = p; }
void set_Ki(float i) { Ki = scalePID_i(i); }
void set_Kd(float d) { Kd = scalePID_d(d); }
void set_Kc(float) {}
void set_Kf(float) {}
- void set(float p, float i, float d, float c=1, float f=0) { set_Kp(p); set_Ki(i); set_Kd(d); UNUSED(c); UNUSED(f); }
+ int low() const { return MIN_POW; }
+ int high() const { return MAX_POW; }
+ void reset() { pid_reset = true; }
+ void set(float p, float i, float d, float c=1, float f=0) { set_Kp(p); set_Ki(i); set_Kd(d); set_Kc(c); set_Kf(f); }
void set(const raw_pid_t &raw) { set(raw.p, raw.i, raw.d); }
- void set(const raw_pidcf_t &raw) { set(raw.p, raw.i, raw.d); }
- } PID_t;
+ void set(const raw_pidcf_t &raw) { set(raw.p, raw.i, raw.d, raw.c, raw.f); }
+
+ float get_fan_scale_output(const uint8_t) { return 0; }
+
+ float get_extrusion_scale_output(const bool, const int32_t, const float, const int16_t) { return 0; }
+
+ float get_pid_output(const float target, const float current) {
+ const float pid_error = target - current;
+ if (!target || pid_error < -(PID_FUNCTIONAL_RANGE)) {
+ pid_reset = true;
+ return 0;
+ }
+ else if (pid_error > PID_FUNCTIONAL_RANGE) {
+ pid_reset = true;
+ return MAX_POW;
+ }
+
+ if (pid_reset) {
+ pid_reset = false;
+ temp_iState = 0.0;
+ work_d = 0.0;
+ }
+
+ const float max_power_over_i_gain = float(MAX_POW) / Ki - float(MIN_POW);
+ temp_iState = constrain(temp_iState + pid_error, 0, max_power_over_i_gain);
+
+ work_p = Kp * pid_error;
+ work_i = Ki * temp_iState;
+ work_d = work_d + PID_K2 * (Kd * (temp_dState - current) - work_d);
+
+ temp_dState = current;
+
+ return constrain(work_p + work_i + work_d + float(MIN_POW), 0, MAX_POW);
+ }
+
+ };
#endif
#if ENABLED(PIDTEMP)
- typedef struct {
- float Kp, Ki, Kd, Kc;
- float p() const { return Kp; }
- float i() const { return unscalePID_i(Ki); }
- float d() const { return unscalePID_d(Kd); }
+ /// @brief Extrusion scaled PID class
+ template
+ struct PIDC_t : public PID_t {
+ private:
+ using base = PID_t;
+ float work_c = 0;
+ float prev_e_pos = 0;
+ int32_t lpq[LPQ_ARR_SZ] = {};
+ int16_t lpq_ptr = 0;
+ public:
+ float Kc = 0;
float c() const { return Kc; }
- float f() const { return 0; }
- void set_Kp(float p) { Kp = p; }
- void set_Ki(float i) { Ki = scalePID_i(i); }
- void set_Kd(float d) { Kd = scalePID_d(d); }
void set_Kc(float c) { Kc = c; }
- void set_Kf(float) {}
- void set(float p, float i, float d, float c=1, float f=0) { set_Kp(p); set_Ki(i); set_Kd(d); set_Kc(c); set_Kf(f); }
+ float cTerm() const { return work_c; }
+ void set(float p, float i, float d, float c=1, float f=0) {
+ base::set_Kp(p);
+ base::set_Ki(i);
+ base::set_Kd(d);
+ set_Kc(c);
+ base::set_Kf(f);
+ }
void set(const raw_pid_t &raw) { set(raw.p, raw.i, raw.d); }
- void set(const raw_pidcf_t &raw) { set(raw.p, raw.i, raw.d, raw.c); }
- } PIDC_t;
+ void set(const raw_pidcf_t &raw) { set(raw.p, raw.i, raw.d, raw.c, raw.f); }
+ void reset() {
+ base::reset();
+ prev_e_pos = 0;
+ lpq_ptr = 0;
+ LOOP_L_N(i, LPQ_ARR_SZ) lpq[i] = 0;
+ }
- typedef struct {
- float Kp, Ki, Kd, Kf;
- float p() const { return Kp; }
- float i() const { return unscalePID_i(Ki); }
- float d() const { return unscalePID_d(Kd); }
- float c() const { return 1; }
+ float get_extrusion_scale_output(const bool is_active, const int32_t e_position, const float e_mm_per_step, const int16_t lpq_len) {
+ work_c = 0;
+ if (!is_active) return work_c;
+
+ if (e_position > prev_e_pos) {
+ lpq[lpq_ptr] = e_position - prev_e_pos;
+ prev_e_pos = e_position;
+ }
+ else
+ lpq[lpq_ptr] = 0;
+
+ ++lpq_ptr;
+
+ if (lpq_ptr >= LPQ_ARR_SZ || lpq_ptr >= lpq_len)
+ lpq_ptr = 0;
+
+ work_c = (lpq[lpq_ptr] * e_mm_per_step) * Kc;
+
+ return work_c;
+ }
+ };
+
+ /// @brief Fan scaled PID, this class implements the get_fan_scale_output() method
+ /// @tparam MIN_POW @see PID_t
+ /// @tparam MAX_POW @see PID_t
+ /// @tparam SCALE_MIN_SPEED parameter from Configuration_adv.h
+ /// @tparam SCALE_LIN_FACTOR parameter from Configuration_adv.h
+ template
+ struct PIDF_t : public PID_t {
+ private:
+ using base = PID_t;
+ float work_f = 0;
+ public:
+ float Kf = 0;
float f() const { return Kf; }
- void set_Kp(float p) { Kp = p; }
- void set_Ki(float i) { Ki = scalePID_i(i); }
- void set_Kd(float d) { Kd = scalePID_d(d); }
- void set_Kc(float) {}
void set_Kf(float f) { Kf = f; }
- void set(float p, float i, float d, float c=1, float f=0) { set_Kp(p); set_Ki(i); set_Kd(d); set_Kf(f); }
+ float fTerm() const { return work_f; }
+ void set(float p, float i, float d, float c=1, float f=0) {
+ base::set_Kp(p);
+ base::set_Ki(i);
+ base::set_Kd(d);
+ base::set_Kc(c);
+ set_Kf(f);
+ }
void set(const raw_pid_t &raw) { set(raw.p, raw.i, raw.d); }
- void set(const raw_pidcf_t &raw) { set(raw.p, raw.i, raw.d, raw.f); }
- } PIDF_t;
+ void set(const raw_pidcf_t &raw) { set(raw.p, raw.i, raw.d, raw.c, raw.f); }
- typedef struct {
- float Kp, Ki, Kd, Kc, Kf;
- float p() const { return Kp; }
- float i() const { return unscalePID_i(Ki); }
- float d() const { return unscalePID_d(Kd); }
- float c() const { return Kc; }
+ float get_fan_scale_output(const uint8_t fan_speed) {
+ work_f = 0;
+ if (fan_speed > SCALE_MIN_SPEED)
+ work_f = Kf + (SCALE_LIN_FACTOR) * fan_speed;
+
+ return work_f;
+ }
+ };
+
+ /// @brief Inherits PID and PIDC - can't use proper diamond inheritance w/o virtual
+ template
+ struct PIDCF_t : public PIDC_t {
+ private:
+ using base = PID_t;
+ using cPID = PIDC_t;
+ float work_f = 0;
+ public:
+ float Kf = 0;
+ float c() const { return cPID::c(); }
float f() const { return Kf; }
- void set_Kp(float p) { Kp = p; }
- void set_Ki(float i) { Ki = scalePID_i(i); }
- void set_Kd(float d) { Kd = scalePID_d(d); }
- void set_Kc(float c) { Kc = c; }
+ void set_Kc(float c) { cPID::set_Kc(c); }
void set_Kf(float f) { Kf = f; }
- void set(float p, float i, float d, float c=1, float f=0) { set_Kp(p); set_Ki(i); set_Kd(d); set_Kc(c); set_Kf(f); }
+ float cTerm() const { return cPID::cTerm(); }
+ float fTerm() const { return work_f; }
+ void set(float p, float i, float d, float c=1, float f=0) {
+ base::set_Kp(p);
+ base::set_Ki(i);
+ base::set_Kd(d);
+ cPID::set_Kc(c);
+ set_Kf(f);
+ }
void set(const raw_pid_t &raw) { set(raw.p, raw.i, raw.d); }
void set(const raw_pidcf_t &raw) { set(raw.p, raw.i, raw.d, raw.c, raw.f); }
- } PIDCF_t;
+
+ void reset() { cPID::reset(); }
+
+ float get_fan_scale_output(const uint8_t fan_speed) {
+ work_f = fan_speed > (SCALE_MIN_SPEED) ? Kf + (SCALE_LIN_FACTOR) * fan_speed : 0;
+ return work_f;
+ }
+ float get_extrusion_scale_output(const bool is_active, const int32_t e_position, const float e_mm_per_step, const int16_t lpq_len) {
+ return cPID::get_extrusion_scale_output(is_active, e_position, e_mm_per_step, lpq_len);
+ }
+ };
typedef
#if BOTH(PID_EXTRUSION_SCALING, PID_FAN_SCALING)
- PIDCF_t
+ PIDCF_t<0, PID_MAX, LPQ_MAX_LEN, PID_FAN_SCALING_MIN_SPEED, PID_FAN_SCALING_LIN_FACTOR>
#elif ENABLED(PID_EXTRUSION_SCALING)
- PIDC_t
+ PIDC_t<0, PID_MAX, LPQ_MAX_LEN>
#elif ENABLED(PID_FAN_SCALING)
- PIDF_t
+ PIDF_t<0, PID_MAX, PID_FAN_SCALING_MIN_SPEED, PID_FAN_SCALING_LIN_FACTOR>
#else
- PID_t
+ PID_t<0, PID_MAX>
#endif
hotend_pid_t;
- #if ENABLED(PID_EXTRUSION_SCALING)
- typedef IF<(LPQ_MAX_LEN > 255), uint16_t, uint8_t>::type lpq_ptr_t;
- #endif
-
#if ENABLED(PID_PARAMS_PER_HOTEND)
#define SET_HOTEND_PID(F,H,V) thermalManager.temp_hotend[H].pid.set_##F(V)
#else
@@ -327,14 +445,14 @@ struct PIDHeaterInfo : public HeaterInfo {
#endif
#if HAS_HEATED_BED
#if ENABLED(PIDTEMPBED)
- typedef struct PIDHeaterInfo bed_info_t;
+ typedef struct PIDHeaterInfo> bed_info_t;
#else
typedef heater_info_t bed_info_t;
#endif
#endif
#if HAS_HEATED_CHAMBER
#if ENABLED(PIDTEMPCHAMBER)
- typedef struct PIDHeaterInfo chamber_info_t;
+ typedef struct PIDHeaterInfo> chamber_info_t;
#else
typedef heater_info_t chamber_info_t;
#endif
@@ -458,7 +576,7 @@ class Temperature {
#if HAS_HOTEND
static hotend_info_t temp_hotend[HOTENDS];
- static const celsius_t hotend_maxtemp[HOTENDS];
+ static constexpr celsius_t hotend_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP);
static celsius_t hotend_max_target(const uint8_t e) { return hotend_maxtemp[e] - (HOTEND_OVERSHOOT); }
#endif
@@ -586,11 +704,6 @@ class Temperature {
static hotend_watch_t watch_hotend[HOTENDS];
#endif
- #if ENABLED(PID_EXTRUSION_SCALING)
- static int32_t pes_e_position, lpq[LPQ_MAX_LEN];
- static lpq_ptr_t lpq_ptr;
- #endif
-
#if ENABLED(MPCTEMP)
static int32_t mpc_e_position;
#endif
@@ -600,23 +713,27 @@ class Temperature {
#endif
#if HAS_HEATED_BED
- #if ENABLED(WATCH_BED)
+ #if WATCH_BED
static bed_watch_t watch_bed;
#endif
- IF_DISABLED(PIDTEMPBED, static millis_t next_bed_check_ms);
+ #if DISABLED(PIDTEMPBED)
+ static millis_t next_bed_check_ms;
+ #endif
static raw_adc_t mintemp_raw_BED, maxtemp_raw_BED;
#endif
#if HAS_HEATED_CHAMBER
- #if ENABLED(WATCH_CHAMBER)
+ #if WATCH_CHAMBER
static chamber_watch_t watch_chamber;
#endif
- TERN(PIDTEMPCHAMBER,,static millis_t next_chamber_check_ms);
+ #if DISABLED(PIDTEMPCHAMBER)
+ static millis_t next_chamber_check_ms;
+ #endif
static raw_adc_t mintemp_raw_CHAMBER, maxtemp_raw_CHAMBER;
#endif
#if HAS_COOLER
- #if ENABLED(WATCH_COOLER)
+ #if WATCH_COOLER
static cooler_watch_t watch_cooler;
#endif
static millis_t next_cooler_check_ms, cooler_fan_flush_ms;
@@ -1036,7 +1153,7 @@ class Temperature {
// Update the temp manager when PID values change
#if ENABLED(PIDTEMP)
- static void updatePID() { TERN_(PID_EXTRUSION_SCALING, pes_e_position = 0); }
+ static void updatePID() { HOTEND_LOOP() temp_hotend[e].pid.reset(); }
static void setPID(const uint8_t hotend, const_float_t p, const_float_t i, const_float_t d) {
#if ENABLED(PID_PARAMS_PER_HOTEND)
temp_hotend[hotend].pid.set(p, i, d);
@@ -1172,12 +1289,12 @@ class Temperature {
typedef struct {
millis_t timer = 0;
TRState state = TRInactive;
- float running_temp;
+ celsius_float_t running_temp;
#if ENABLED(THERMAL_PROTECTION_VARIANCE_MONITOR)
millis_t variance_timer = 0;
celsius_float_t last_temp = 0.0, variance = 0.0;
#endif
- void run(const_celsius_float_t current, const_celsius_float_t target, const heater_id_t heater_id, const uint16_t period_seconds, const celsius_t hysteresis_degc);
+ void run(const_celsius_float_t current, const_celsius_float_t target, const heater_id_t heater_id, const uint16_t period_seconds, const celsius_float_t hysteresis_degc);
} tr_state_machine_t;
static tr_state_machine_t tr_state_machine[NR_HEATER_RUNAWAY];
diff --git a/Marlin/Marlin/src/module/thermistor/thermistor_2000.h b/Marlin/Marlin/src/module/thermistor/thermistor_2000.h
index 3815a6f2..6393c980 100644
--- a/Marlin/Marlin/src/module/thermistor/thermistor_2000.h
+++ b/Marlin/Marlin/src/module/thermistor/thermistor_2000.h
@@ -23,12 +23,12 @@
// R25 = 100 KOhm, beta25 = 4550 K, 4.7 kOhm pull-up, TDK NTCG104LH104KT1 https://product.tdk.com/en/search/sensor/ntc/chip-ntc-thermistor/info?part_no=NTCG104LH104KT1
constexpr temp_entry_t temptable_2000[] PROGMEM = {
-{ OV(313), 125 },
-{ OV(347), 120 },
-{ OV(383), 115 },
-{ OV(422), 110 },
-{ OV(463), 105 },
-{ OV(506), 100 },
+{ OV(313), 125 },
+{ OV(347), 120 },
+{ OV(383), 115 },
+{ OV(422), 110 },
+{ OV(463), 105 },
+{ OV(506), 100 },
{ OV(549), 95 },
{ OV(594), 90 },
{ OV(638), 85 },
diff --git a/Marlin/Marlin/src/module/tool_change.cpp b/Marlin/Marlin/src/module/tool_change.cpp
index 7322098c..5c831c74 100644
--- a/Marlin/Marlin/src/module/tool_change.cpp
+++ b/Marlin/Marlin/src/module/tool_change.cpp
@@ -1350,6 +1350,14 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
#else
do_blocking_move_to_xy(destination, planner.settings.max_feedrate_mm_s[X_AXIS]);
do_blocking_move_to_z(destination.z, planner.settings.max_feedrate_mm_s[Z_AXIS]);
+ SECONDARY_AXIS_CODE(
+ do_blocking_move_to_i(destination.i, planner.settings.max_feedrate_mm_s[I_AXIS]),
+ do_blocking_move_to_j(destination.j, planner.settings.max_feedrate_mm_s[J_AXIS]),
+ do_blocking_move_to_k(destination.k, planner.settings.max_feedrate_mm_s[K_AXIS]),
+ do_blocking_move_to_u(destination.u, planner.settings.max_feedrate_mm_s[U_AXIS]),
+ do_blocking_move_to_v(destination.v, planner.settings.max_feedrate_mm_s[V_AXIS]),
+ do_blocking_move_to_w(destination.w, planner.settings.max_feedrate_mm_s[W_AXIS])
+ );
#endif
#endif
diff --git a/Marlin/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h
index 4d1dbecf..657eb8a0 100644
--- a/Marlin/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h
+++ b/Marlin/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h
@@ -23,6 +23,8 @@
/**
* AZSMZ MINI pin assignments
+ * Schematic: http://green-candy.osdn.jp/external/MarlinFW/board_schematics/AZSMZ%20MINI/AZSMZ.svg
+ * Source: https://raw.githubusercontent.com/Rose-Fish/AZSMZ-mini/master/AZSMZ.sch
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h
index 10a610ff..217e270b 100644
--- a/Marlin/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h
+++ b/Marlin/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h
@@ -22,11 +22,7 @@
#pragma once
/**
- * BIQU BQ111-A4
- *
- * Applies to the following boards:
- *
- * BOARD_BIQU_BQ111_A4 (Hotend, Fan, Bed)
+ * BIQU Thunder B300 V1.0
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h b/Marlin/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h
index 92152170..2c0d52ef 100644
--- a/Marlin/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h
+++ b/Marlin/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h
@@ -23,6 +23,10 @@
/**
* BIQU BQ111-A4 pin assignments
+ *
+ * Applies to the following boards:
+ *
+ * BOARD_BIQU_BQ111_A4 (Hotend, Fan, Bed)
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
index d1122431..879e9824 100644
--- a/Marlin/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
+++ b/Marlin/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
@@ -23,6 +23,8 @@
/**
* BigTreeTech SKR 1.1 pin assignments
+ * Schematic: http://green-candy.osdn.jp/external/MarlinFW/board_schematics/BTT%20SKR%20V1.1/SKR-V1.1SchDoc.pdf
+ * Origin: https://github.com/bigtreetech/BIGTREETECH-SKR-V1.1/blob/master/hardware/SKR-V1.1SchDoc.pdf
*/
#define BOARD_INFO_NAME "BTT SKR V1.1"
diff --git a/Marlin/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
index 03994187..6653a94f 100644
--- a/Marlin/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
+++ b/Marlin/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
@@ -23,6 +23,8 @@
/**
* BigTreeTech SKR 1.3 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/BTT%20SKR%20V1.3/SKR-V1.3-SCH.pdf
+ * Origin: https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/BTT%20SKR%20V1.3/hardware/SKR-V1.3-SCH.pdf
*/
#define BOARD_INFO_NAME "BTT SKR V1.3"
diff --git a/Marlin/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
index aac83980..667b0fa9 100644
--- a/Marlin/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
+++ b/Marlin/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
@@ -23,6 +23,8 @@
/**
* BigTreeTech SKR 1.4 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/BTT%20SKR%20V1.4%20+%20Turbo/BTT%20SKR%20V1.4-SCH.pdf
+ * Origin: https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/BTT%20SKR%20V1.4/Hardware/BTT%20SKR%20V1.4-SCH.pdf
*/
#include "env_validate.h"
@@ -358,11 +360,11 @@
#define BEEPER_PIN EXP1_01_PIN
#elif ENABLED(CR10_STOCKDISPLAY)
- #define BTN_ENC EXP1_02_PIN // (58) open-drain
#define LCD_PINS_RS EXP1_07_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
+ #define BTN_ENC EXP1_02_PIN
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
diff --git a/Marlin/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h b/Marlin/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h
index 6e1ea403..9e62be8e 100644
--- a/Marlin/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h
+++ b/Marlin/Marlin/src/pins/lpc1768/pins_EMOTRONIC.h
@@ -23,6 +23,8 @@
/**
* eMotion-Tech eMotronic pin assignments
+ * Schematic: http://green-candy.osdn.jp/external/MarlinFW/board_schematics/eMotion-Tech%20eMotronic/eMotronic_brd_sources_1.0.4/eMotronic_sch.pdf
+ * Origin: https://data.emotion-tech.com/ftp/Datasheets_et_sources/Sources/eMotronic_brd_sources_1.0.4.zip
*
* Board pins<->features assignments are based on the
* Micro-Delta Rework printer default connections.
diff --git a/Marlin/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
index 39ab0bbd..aedbd7be 100644
--- a/Marlin/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
+++ b/Marlin/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
@@ -23,6 +23,8 @@
/**
* GMARSH X6 Rev.1 pin assignments
+ * Schematic: http://green-candy.osdn.jp/external/MarlinFW/board_schematics/GMARSH%20X6%20Rev.1/armprinter_2208_1heater.pdf
+ * Origin: https://github.com/gmarsh/gmarsh_x6/blob/master/armprinter_2208_1heater.pdf
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
index cf12a98a..1c300cbc 100644
--- a/Marlin/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
+++ b/Marlin/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
@@ -23,6 +23,8 @@
/**
* Makerbase MKS SBASE pin assignments
+ * Schematic (V1.3): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/MKS%20SBASE%20V1.3/MKS%20SBASE%20V1.3_002%20SCH.pdf
+ * Origin (V1.3): http://green-candy.osdn.jp/external/MarlinFW/board_schematics/MKS%20SBASE%20V1.3/MKS%20SBASE%20V1.3_002%20SCH.pdf
*/
#include "env_validate.h"
@@ -184,7 +186,7 @@
#define SD_MISO_PIN P1_23 // J8-3 (moved from EXP2 P0.8)
#define SD_MOSI_PIN P2_12 // J8-4 (moved from EXP2 P0.9)
#define SD_SS_PIN P0_28
- #define LPC_SOFTWARE_SPI // With a custom cable we need software SPI because the
+ #define SOFTWARE_SPI // With a custom cable we need software SPI because the
// selected pins are not on a hardware SPI controller
#elif SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD)
#define SD_SCK_PIN P0_07
diff --git a/Marlin/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
index 4e9f98c8..cdbc6d15 100644
--- a/Marlin/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
+++ b/Marlin/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
@@ -23,6 +23,8 @@
/**
* Makerbase MKS SGEN-L pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/MKS_GEN_L_V1_0/MKS%20Gen_L%20V1.0_008%20SCH.pdf
+ * Origin: https://github.com/makerbase-mks/SGEN_L/blob/master/Hardware/MKS%20SGEN_L%20V1.0_001/MKS%20SGEN_L%20V1.0_001%20SCH.pdf
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h
index fe424c80..28d8d3cf 100644
--- a/Marlin/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h
+++ b/Marlin/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h
@@ -23,6 +23,8 @@
/**
* Re-ARM with RAMPS v1.4 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Re-ARM%20RAMPS%201.4/Re_ARM_Schematic.pdf
+ * Origin: https://reprap.org/mediawiki/images/f/fa/Re_ARM_Schematic.pdf
*
* Applies to the following boards:
*
@@ -354,8 +356,8 @@
#if EITHER(VIKI2, miniVIKI)
#define DOGLCD_CS P0_16 // (16)
#define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2
- #define DOGLCD_SCK SD_SCK_PIN
- #define DOGLCD_MOSI SD_MOSI_PIN
+ #define DOGLCD_SCK P0_15 // (52) (SCK) J3-9 & AUX-3
+ #define DOGLCD_MOSI P0_18 // (51) (MOSI) J3-10 & AUX-3
#define STAT_LED_BLUE_PIN P0_26 // (63) may change if cable changes
#define STAT_LED_RED_PIN P1_21 // ( 6) may change if cable changes
diff --git a/Marlin/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h b/Marlin/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h
index 2972ac75..30cd76b9 100644
--- a/Marlin/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h
+++ b/Marlin/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h
@@ -23,6 +23,8 @@
/**
* Selena Compact pin assignments
+ * Pinout: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Selena%20Compact/Compact%20Pinout.pdf
+ * Origin: https://github.com/f61/Selena/blob/master/Compact%20Pinout.pdf
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h
index bc7cada8..a9c61cb8 100644
--- a/Marlin/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h
+++ b/Marlin/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h
@@ -23,6 +23,8 @@
/**
* Azteeg X5 GT pin assignments
+ * Wiring diagram: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Azteeg%20X5%20GT/X5%20GT%20Wiring%20Diagram.pdf
+ * Origin: https://panucattdevices.freshdesk.com/support/solutions/articles/1000244740-support-files
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h
index c33fe6e2..eabb3385 100644
--- a/Marlin/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h
+++ b/Marlin/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h
@@ -23,6 +23,10 @@
/**
* Azteeg X5 MINI pin assignments
+ * Schematic (V1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Azteeg%20X5%20MINI/x5mini_design_files/X5mini_design_files/V1/X5%20Mini%20PUB%20v1.0.pdf
+ * Schematic (V2): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Azteeg%20X5%20MINI/x5mini_design_files/X5mini_design_files/V2/X5%20Mini%20V2%20SCH%20Pub.pdf
+ * Schematic (V3): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Azteeg%20X5%20MINI/x5mini_design_files/X5mini_design_files/V3/X5%20Mini%20V3%20SCH%20Pub.pdf
+ * Origin: http://files.panucatt.com/datasheets/x5mini_design_files.zip
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h b/Marlin/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h
index 086bacba..74439e4f 100644
--- a/Marlin/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h
+++ b/Marlin/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h
@@ -23,6 +23,8 @@
/**
* Azteeg X5 MINI WIFI pin assignments
+ * Wiring diagram: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Azteeg%20X5%20MINI%20WIFI/x5mini_wifi_wiring.pdf
+ * Origin: http://files.panucatt.com/datasheets/x5mini_wifi_wiring.pdf
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h
index dbaafb89..d9f56407 100644
--- a/Marlin/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h
+++ b/Marlin/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h
@@ -23,6 +23,8 @@
/**
* BigTreeTech SKR E3 Turbo pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/BTT%20SKR%20E3%20Turbo/BTT%20SKR%20E3%20Turbo-SCH.pdf
+ * Origin: https://github.com/bigtreetech/BIGTREETECH-SKR-E3-Turbo/blob/master/Hardware/BTT%20SKR%20E3%20Turbo-SCH.pdf
*/
#include "env_validate.h"
@@ -209,7 +211,7 @@
#endif
/**
- * Ender 3 V2 display SKR E3 Turbo (EXP1) Ender 3 V2 display --> SKR E3 Turbo
+ * Ender-3 V2 display SKR E3 Turbo (EXP1) Ender-3 V2 display --> SKR E3 Turbo
* ------ ------ RX 3 --> 5 P0_15
* -- | 1 2 | -- (BEEPER) P2_08 |10 9 | P0_16 (BTN_ENC) TX 4 --> 9 P0_16
* (SKR_TX1) RX | 3 4 | TX (SKR_RX1) (BTN_EN1) P0_19 | 8 7 | RESET BEEPER 6 --> 10 P2_08
diff --git a/Marlin/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h b/Marlin/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h
index 7f428fc9..1bd70d8f 100644
--- a/Marlin/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h
+++ b/Marlin/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h
@@ -23,6 +23,8 @@
/**
* BigTreeTech SKR 1.4 Turbo pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/BTT%20SKR%20V1.4%20+%20Turbo/BTT%20SKR%20V1.4-SCH.pdf
+ * Origin: https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/BTT%20SKR%20V1.4/Hardware/BTT%20SKR%20V1.4-SCH.pdf
*/
#define BOARD_INFO_NAME "BTT SKR V1.4 TURBO"
diff --git a/Marlin/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h
index 237dfaec..03d681d3 100644
--- a/Marlin/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h
+++ b/Marlin/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h
@@ -23,6 +23,8 @@
/**
* Cohesion3D Mini pin assignments
+ * Pinout: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Cohesion3D%20Mini/c3d-pinout.jpg
+ * Origin: https://lasergods.com/cohesion3d-mini-pinout-diagram/
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h
index ea2e0b70..e25a6688 100644
--- a/Marlin/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h
+++ b/Marlin/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h
@@ -23,6 +23,8 @@
/**
* Cohesion3D ReMix pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Cohesion3D%20ReMix/C3D%20ReMix%20rev2.svg
+ * Origin: https://github.com/Cohesion3D/Cohesion3D-ReMix/blob/master/C3D%20ReMix%20rev2.sch
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1769/pins_FLY_CDY.h b/Marlin/Marlin/src/pins/lpc1769/pins_FLY_CDY.h
index ec0b14af..1c0cb058 100644
--- a/Marlin/Marlin/src/pins/lpc1769/pins_FLY_CDY.h
+++ b/Marlin/Marlin/src/pins/lpc1769/pins_FLY_CDY.h
@@ -23,6 +23,8 @@
/**
* FLYmaker FLY-CDY pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/FLYmaker%20FLY-CDY%20V1/FLY_CDY%20SCH.pdf
+ * Origin: https://github.com/Mellow-3D/FLY-CDY/blob/master/Motherboard%20information/FLY_CDY%20SCH.pdf
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h b/Marlin/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h
index 23bcecc7..1e71fccf 100644
--- a/Marlin/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h
+++ b/Marlin/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h
@@ -23,6 +23,8 @@
/**
* MKS SGen pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/MKS%20SGEN/MKS%20SGEN%20V1.0_001%20SCH.pdf
+ * Origin: https://github.com/makerbase-mks/MKS-SGen/blob/master/Hardware/MKS%20SGEN%20V1.0_001/MKS%20SGEN%20V1.0_001%20SCH.pdf
*
* Pins diagram:
* https://github.com/makerbase-mks/MKS-SGen/blob/master/Hardware/MKS%20SGEN%20V1.0_001/MKS%20SGEN%20V1.0_001%20PIN.pdf
diff --git a/Marlin/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h
index 2f25d8b5..cf3b8846 100644
--- a/Marlin/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h
+++ b/Marlin/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h
@@ -23,6 +23,8 @@
/**
* MKS SGen-L V2 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/MKS%20SGEN_L%20V2/MKS%20SGEN_L%20V2.0_003%20SCH.pdf
+ * Origin: https://github.com/makerbase-mks/MKS-SGEN_L-V2/blob/master/Hardware/MKS%20SGEN_L%20V2.0_003/MKS%20SGEN_L%20V2.0_003%20SCH.pdf
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h
index cfaca164..124c8f63 100644
--- a/Marlin/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h
+++ b/Marlin/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h
@@ -23,6 +23,8 @@
/**
* Smoothieware Smoothieboard pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Smoothieware%20Smoothieboard%20V1/http.i.imgur.com.oj4zqs3.png
+ * Origin: http://smoothieware.org/_media///external/http.i.imgur.com.oj4zqs3.png
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h
index 12a7934a..f39b0374 100644
--- a/Marlin/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h
+++ b/Marlin/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h
@@ -138,7 +138,7 @@
#define SDCARD_CONNECTION ONBOARD
-//#define SD_DETECT_PIN P0_25 // SD_CD
+#define SD_DETECT_PIN P0_27 // SD_CD
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
diff --git a/Marlin/Marlin/src/pins/mega/pins_CHEAPTRONIC.h b/Marlin/Marlin/src/pins/mega/pins_CHEAPTRONIC.h
index 8bcb263b..e95f6c4a 100644
--- a/Marlin/Marlin/src/pins/mega/pins_CHEAPTRONIC.h
+++ b/Marlin/Marlin/src/pins/mega/pins_CHEAPTRONIC.h
@@ -23,6 +23,7 @@
/**
* Cheaptronic v1.0 pin assignments
+ * ATmega2560
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h b/Marlin/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h
index 01438975..e81295a6 100644
--- a/Marlin/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h
+++ b/Marlin/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h
@@ -24,7 +24,9 @@
/**
* Cheaptronic v2.0 pin assignments
* Built and sold by Michal Dyntar - RRO
- * www.reprapobchod.cz
+ * www.reprapobchod.cz (DOES NOT EXIST ANYMORE)
+ * https://web.archive.org/web/20190306201523/http://reprapobchod.cz/
+ * ATmega2560
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/mega/pins_CNCONTROLS_11.h b/Marlin/Marlin/src/pins/mega/pins_CNCONTROLS_11.h
index 5f7a534d..d996635c 100644
--- a/Marlin/Marlin/src/pins/mega/pins_CNCONTROLS_11.h
+++ b/Marlin/Marlin/src/pins/mega/pins_CNCONTROLS_11.h
@@ -23,6 +23,9 @@
/**
* CartesioV11 pin assignments
+ * Comes with an Arduino Mega, see
+ * https://web.archive.org/web/20171024190029/http://mauk.cc/mediawiki/index.php/Electronical_assembly
+ * ATmega2560, ATmega1280
*/
#define ALLOW_MEGA1280
diff --git a/Marlin/Marlin/src/pins/mega/pins_CNCONTROLS_12.h b/Marlin/Marlin/src/pins/mega/pins_CNCONTROLS_12.h
index 0aa0b59c..ea82fe42 100644
--- a/Marlin/Marlin/src/pins/mega/pins_CNCONTROLS_12.h
+++ b/Marlin/Marlin/src/pins/mega/pins_CNCONTROLS_12.h
@@ -23,6 +23,9 @@
/**
* CartesioV12 pin assignments
+ * Comes with an Arduino Mega, see
+ * https://web.archive.org/web/20171024190029/http://mauk.cc/mediawiki/index.php/Electronical_assembly
+ * ATmega2560, ATmega1280
*/
#define ALLOW_MEGA1280
diff --git a/Marlin/Marlin/src/pins/mega/pins_CNCONTROLS_15.h b/Marlin/Marlin/src/pins/mega/pins_CNCONTROLS_15.h
index 6de3b717..c77e711f 100644
--- a/Marlin/Marlin/src/pins/mega/pins_CNCONTROLS_15.h
+++ b/Marlin/Marlin/src/pins/mega/pins_CNCONTROLS_15.h
@@ -23,6 +23,7 @@
/**
* CNControls V15 for HMS434 pin assignments
+ * ATmega2560, ATmega1280
*/
#define ALLOW_MEGA1280
diff --git a/Marlin/Marlin/src/pins/mega/pins_EINSTART-S.h b/Marlin/Marlin/src/pins/mega/pins_EINSTART-S.h
index c8cbee67..274684f3 100644
--- a/Marlin/Marlin/src/pins/mega/pins_EINSTART-S.h
+++ b/Marlin/Marlin/src/pins/mega/pins_EINSTART-S.h
@@ -23,6 +23,7 @@
/**
* Einstart-S pin assignments
+ * ATmega2560, ATmega1280
* PCB Silkscreen: 3DPrinterCon_v3.5
*/
diff --git a/Marlin/Marlin/src/pins/mega/pins_ELEFU_3.h b/Marlin/Marlin/src/pins/mega/pins_ELEFU_3.h
index f5e146cf..6cf9e1b4 100644
--- a/Marlin/Marlin/src/pins/mega/pins_ELEFU_3.h
+++ b/Marlin/Marlin/src/pins/mega/pins_ELEFU_3.h
@@ -23,6 +23,9 @@
/**
* Elefu RA Board Pin Assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Elefu%20Ra%20v3/schematic.pdf
+ * Origin: https://github.com/kiyoshigawa/Elefu-RAv3/blob/master/RA_Circuits.zip
+ * ATmega2560
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/mega/pins_GT2560_REV_A.h b/Marlin/Marlin/src/pins/mega/pins_GT2560_REV_A.h
index 99e8704e..bb251dfb 100644
--- a/Marlin/Marlin/src/pins/mega/pins_GT2560_REV_A.h
+++ b/Marlin/Marlin/src/pins/mega/pins_GT2560_REV_A.h
@@ -25,6 +25,9 @@
* Geeetech GT2560 Revision A board pin assignments, based on the work of
* George Robles (https://georges3dprinters.com) and
* Richard Smith
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Geeetech%20GT2560%20Revision%20A/GT2560_sch.pdf
+ * Origin: https://www.geeetech.com/wiki/images/9/90/GT2560_sch.pdf
+ * ATmega2560
*/
#define ALLOW_MEGA1280
diff --git a/Marlin/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h b/Marlin/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h
index 7e2ce20c..a982a0e0 100644
--- a/Marlin/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h
+++ b/Marlin/Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h
@@ -23,6 +23,9 @@
/**
* Geeetech GT2560 Revision A+ board pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Geeetech%20GT2560%20Revision%20A+/Hardware_GT2560_RevA+.pdf
+ * Origin: https://www.geeetech.com/wiki/images/d/d3/Hardware_GT2560_RevA%2B.pdf
+ * ATmega2560
*/
#define BOARD_INFO_NAME "GT2560 Rev.A+"
diff --git a/Marlin/Marlin/src/pins/mega/pins_GT2560_REV_B.h b/Marlin/Marlin/src/pins/mega/pins_GT2560_REV_B.h
index be71ec49..0702d14e 100644
--- a/Marlin/Marlin/src/pins/mega/pins_GT2560_REV_B.h
+++ b/Marlin/Marlin/src/pins/mega/pins_GT2560_REV_B.h
@@ -23,6 +23,9 @@
/**
* Geeetech GT2560 Rev B Pins
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Geeetech%20GT2560%20Rev%20B/GT2560_REVB.pdf
+ * Origin: https://www.geeetech.com/wiki/images/7/72/GT2560_REVB.pdf
+ * ATmega2560
*/
#define BOARD_INFO_NAME "GT2560 Rev B"
diff --git a/Marlin/Marlin/src/pins/mega/pins_GT2560_V3.h b/Marlin/Marlin/src/pins/mega/pins_GT2560_V3.h
index 46b4ebf4..5d2436b6 100644
--- a/Marlin/Marlin/src/pins/mega/pins_GT2560_V3.h
+++ b/Marlin/Marlin/src/pins/mega/pins_GT2560_V3.h
@@ -23,6 +23,9 @@
/**
* Geeetech GT2560 3.0/3.1 pin assignments
+ * Schematic (3.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Geeetech%20GT2560%203.0/GT2560_V3.0_SCH.pdf
+ * Origin (3.0): https://github.com/Geeetech3D/Diagram/blob/master/GT2560_V3.0_SCH.pdf
+ * ATmega2560
*
* Also GT2560 RevB and GT2560 4.0/4.1
*/
diff --git a/Marlin/Marlin/src/pins/mega/pins_GT2560_V3_A20.h b/Marlin/Marlin/src/pins/mega/pins_GT2560_V3_A20.h
index 986dd1cb..b5bf349e 100644
--- a/Marlin/Marlin/src/pins/mega/pins_GT2560_V3_A20.h
+++ b/Marlin/Marlin/src/pins/mega/pins_GT2560_V3_A20.h
@@ -23,6 +23,7 @@
/**
* Geeetech A20M board pin assignments
+ * ATmega2560
*/
#define LCD_PINS_RS 5
diff --git a/Marlin/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h b/Marlin/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h
index e683d4df..70854c57 100644
--- a/Marlin/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h
+++ b/Marlin/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h
@@ -23,6 +23,7 @@
/**
* Geeetech GT2560 V 3.0 board pin assignments (for Mecreator 2)
+ * ATmega2560
*/
#define BOARD_INFO_NAME "GT2560 V3.0 (MC2)"
diff --git a/Marlin/Marlin/src/pins/mega/pins_GT2560_V4.h b/Marlin/Marlin/src/pins/mega/pins_GT2560_V4.h
index 6ac07b70..98f50388 100644
--- a/Marlin/Marlin/src/pins/mega/pins_GT2560_V4.h
+++ b/Marlin/Marlin/src/pins/mega/pins_GT2560_V4.h
@@ -23,6 +23,9 @@
/**
* Geeetech GT2560 V4.X Pins
+ * Schematic (4.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Geeetech%20GT2560%20V4.x%20+%20A20/GT2560V4.0SCHA20T.pdf
+ * Schematic (4.1B): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Geeetech%20GT2560%20V4.x%20+%20A20/GT2560V4.1BSCHA20T.pdf
+ * Origin: https://www.geeetech.com/download.html?spm=a2g0s.imconversation.0.0.22d23e5fXlQBWv&download_id=45
*/
#define BOARD_INFO_NAME "GT2560 4.x"
diff --git a/Marlin/Marlin/src/pins/mega/pins_GT2560_V4_A20.h b/Marlin/Marlin/src/pins/mega/pins_GT2560_V4_A20.h
index 83a612e6..eeba1485 100644
--- a/Marlin/Marlin/src/pins/mega/pins_GT2560_V4_A20.h
+++ b/Marlin/Marlin/src/pins/mega/pins_GT2560_V4_A20.h
@@ -23,6 +23,7 @@
/**
* Geeetech A20 GT2560 V4.x board pin assignments
+ * ATmega2560
*/
#define BOARD_INFO_NAME "GT2560 4.x"
diff --git a/Marlin/Marlin/src/pins/mega/pins_HJC2560C_REV2.h b/Marlin/Marlin/src/pins/mega/pins_HJC2560C_REV2.h
index 5c3b1dc9..1b3b7b29 100644
--- a/Marlin/Marlin/src/pins/mega/pins_HJC2560C_REV2.h
+++ b/Marlin/Marlin/src/pins/mega/pins_HJC2560C_REV2.h
@@ -23,6 +23,7 @@
/**
* Geeetech HJC2560-C Rev 2.x board pin assignments
+ * ATmega2560
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/mega/pins_INTAMSYS40.h b/Marlin/Marlin/src/pins/mega/pins_INTAMSYS40.h
index 2e2a9b85..ec466fb0 100644
--- a/Marlin/Marlin/src/pins/mega/pins_INTAMSYS40.h
+++ b/Marlin/Marlin/src/pins/mega/pins_INTAMSYS40.h
@@ -23,6 +23,7 @@
/**
* Intamsys Funmat HT V4.0 Mainboard
+ * ATmega2560
* 4988 Drivers Tested
* 2208 version exists and may or may not work
*/
diff --git a/Marlin/Marlin/src/pins/mega/pins_LEAPFROG.h b/Marlin/Marlin/src/pins/mega/pins_LEAPFROG.h
index 4700fd67..3762ea98 100644
--- a/Marlin/Marlin/src/pins/mega/pins_LEAPFROG.h
+++ b/Marlin/Marlin/src/pins/mega/pins_LEAPFROG.h
@@ -23,6 +23,7 @@
/**
* Leapfrog Driver board pin assignments
+ * ATmega2560, ATmega1280
*/
#define ALLOW_MEGA1280
diff --git a/Marlin/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h b/Marlin/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h
index 4a324729..7be96c5d 100644
--- a/Marlin/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h
+++ b/Marlin/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h
@@ -23,6 +23,7 @@
/**
* Leapfrog Xeed Driver board pin assignments
+ * ATmega2560
*
* This board is used by other Leapfrog printers in addition to the Xeed,
* such as the Creatr HS and Bolt. The pin assignments vary wildly between
diff --git a/Marlin/Marlin/src/pins/mega/pins_MALYAN_M180.h b/Marlin/Marlin/src/pins/mega/pins_MALYAN_M180.h
index 19095a53..3ef606de 100644
--- a/Marlin/Marlin/src/pins/mega/pins_MALYAN_M180.h
+++ b/Marlin/Marlin/src/pins/mega/pins_MALYAN_M180.h
@@ -24,6 +24,8 @@
/**
* Malyan M180 pin assignments
* Contributed by Timo Birnschein (timo.birnschein@microforge.de)
+ * @Timo: sind diese Pin Definitionen immernoch korrekt? (Antwort an turningtides@outlook.de bitte)
+ * ATmega2560
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/Marlin/src/pins/mega/pins_MEGACONTROLLER.h
index 7ebef6e2..f45da25f 100644
--- a/Marlin/Marlin/src/pins/mega/pins_MEGACONTROLLER.h
+++ b/Marlin/Marlin/src/pins/mega/pins_MEGACONTROLLER.h
@@ -23,6 +23,9 @@
/**
* Mega controller pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Mega%20Controller/Mega_controller.pdf
+ * Origin: https://reprap.org/mediawiki/images/b/ba/Mega_controller.pdf
+ * ATmega2560
*/
#if HOTENDS > 2 || E_STEPPERS > 2
diff --git a/Marlin/Marlin/src/pins/mega/pins_MEGATRONICS.h b/Marlin/Marlin/src/pins/mega/pins_MEGATRONICS.h
index ac0ba4ee..a51615e3 100644
--- a/Marlin/Marlin/src/pins/mega/pins_MEGATRONICS.h
+++ b/Marlin/Marlin/src/pins/mega/pins_MEGATRONICS.h
@@ -23,6 +23,9 @@
/**
* MegaTronics pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/MegaTronics/Megatronics_1_0_sch.pdf
+ * Origin: https://reprap.org/mediawiki/images/a/a3/Megatronics_1_0_sch.pdf
+ * ATmega2560
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/mega/pins_MEGATRONICS_2.h b/Marlin/Marlin/src/pins/mega/pins_MEGATRONICS_2.h
index e5270359..3f7afe56 100644
--- a/Marlin/Marlin/src/pins/mega/pins_MEGATRONICS_2.h
+++ b/Marlin/Marlin/src/pins/mega/pins_MEGATRONICS_2.h
@@ -23,6 +23,9 @@
/**
* MegaTronics v2.0 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Megatronics%20v2.0/megatronics%20-%20Project.pdf
+ * Origin: https://reprap.org/wiki/File:Megatronicsv2PDF.zip
+ * ATmega2560
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/mega/pins_MEGATRONICS_3.h b/Marlin/Marlin/src/pins/mega/pins_MEGATRONICS_3.h
index 86aff16f..b194c31b 100644
--- a/Marlin/Marlin/src/pins/mega/pins_MEGATRONICS_3.h
+++ b/Marlin/Marlin/src/pins/mega/pins_MEGATRONICS_3.h
@@ -23,6 +23,8 @@
/**
* MegaTronics v3.0 / v3.1 / v3.2 pin assignments
+ * Schematic Origin: https://github.com/brupje/Megatronics_3/blob/master/Design%20Files/megatronics.sch
+ * ATmega2560
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h
index cff3a11a..db41ef75 100644
--- a/Marlin/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h
+++ b/Marlin/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h
@@ -23,6 +23,8 @@
/**
* Mightyboard Rev.E pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Mightyboard%20Rev.E/MakerBot%20MightyBoard%20REVE%20Schematic.pdf
+ * Origin: https://github.com/sciguy14/HelioWatcher/blob/master/HelioWatcher%20Circuit/MakerBot%20MightyBoard%20REVE%20Schematic.pdf
* also works for Rev D boards. It's all rev E despite what the silk screen says
*/
diff --git a/Marlin/Marlin/src/pins/mega/pins_MINITRONICS.h b/Marlin/Marlin/src/pins/mega/pins_MINITRONICS.h
index ec712a3b..ddf6d204 100644
--- a/Marlin/Marlin/src/pins/mega/pins_MINITRONICS.h
+++ b/Marlin/Marlin/src/pins/mega/pins_MINITRONICS.h
@@ -23,6 +23,11 @@
/**
* Minitronics v1.0/1.1 pin assignments
+ * Schematic (1.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Minitronics%20v1.0/minitronics%20-%20Project.pdf
+ * Origin (1.0): https://reprap.org/wiki/File:MinitronicsPDF.zip
+ * Datasheet (1.1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Minitronics%20v1.1/datasheet%20minitronics%20v1.1.pdf
+ * Origin (1.1): https://reprapworld.nl/documentation/datasheet%20minitronics%20v1.1.pdf
+ * ATmega1281
*/
/**
diff --git a/Marlin/Marlin/src/pins/mega/pins_OVERLORD.h b/Marlin/Marlin/src/pins/mega/pins_OVERLORD.h
index 49accf9f..01c02daf 100644
--- a/Marlin/Marlin/src/pins/mega/pins_OVERLORD.h
+++ b/Marlin/Marlin/src/pins/mega/pins_OVERLORD.h
@@ -23,6 +23,9 @@
/**
* Dreammaker Overlord v1.1 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Dreammaker%20Overlord%20v1.1/Schematic.pdf
+ * Origin: https://github.com/jdpiercy/Overlord-Pro/blob/master/Motherboard/Schematic.pdf
+ * ATmega2560
*/
#if HOTENDS > 2 || E_STEPPERS > 2
diff --git a/Marlin/Marlin/src/pins/mega/pins_PICA.h b/Marlin/Marlin/src/pins/mega/pins_PICA.h
index 0e29d8df..10985938 100644
--- a/Marlin/Marlin/src/pins/mega/pins_PICA.h
+++ b/Marlin/Marlin/src/pins/mega/pins_PICA.h
@@ -23,6 +23,9 @@
/**
* Arduino Mega with PICA pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/PICA/pica_schematic.pdf
+ * Origin: https://github.com/mjrice/PICA/blob/master/pica_schematic.pdf
+ * ATmega2560
*
* PICA is Power, Interface, and Control Adapter and is open source hardware.
* See https://github.com/mjrice/PICA for schematics etc.
diff --git a/Marlin/Marlin/src/pins/mega/pins_PICAOLD.h b/Marlin/Marlin/src/pins/mega/pins_PICAOLD.h
index e19ea744..961462fc 100644
--- a/Marlin/Marlin/src/pins/mega/pins_PICAOLD.h
+++ b/Marlin/Marlin/src/pins/mega/pins_PICAOLD.h
@@ -21,6 +21,10 @@
*/
#pragma once
+// Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/PICAOLD/pica_schematic.pdf
+// Origin: https://github.com/mjrice/PICA/blob/97ab9e7771a8e5eef97788f3adcc17a9fa9de9b9/pica_schematic.pdf
+// ATmega2560
+
#define HEATER_0_PIN 9 // E0
#define HEATER_1_PIN 10 // E1
#define FAN_PIN 11
diff --git a/Marlin/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h b/Marlin/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h
index f2e4d3da..18e2c0f6 100644
--- a/Marlin/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h
+++ b/Marlin/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h
@@ -23,6 +23,9 @@
/**
* Protoneer v3.00 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Protoneer%20CNC%20Shield%20v3.00/Arduino-CNC-Shield-Scematics-V3.XX_.webp
+ * Origin: https://i0.wp.com/blog.protoneer.co.nz/wp-content/uploads/2013/07/Arduino-CNC-Shield-Scematics-V3.XX_.jpg
+ * ATmega2560
*
* This CNC shield has an UNO pinout and fits all Arduino-compatibles.
*
diff --git a/Marlin/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/Marlin/src/pins/mega/pins_SILVER_GATE.h
index c2ca5b31..18ada3aa 100644
--- a/Marlin/Marlin/src/pins/mega/pins_SILVER_GATE.h
+++ b/Marlin/Marlin/src/pins/mega/pins_SILVER_GATE.h
@@ -21,6 +21,8 @@
*/
#pragma once
+// ATmega2561
+
#if NOT_TARGET(__AVR_ATmega1281__, __AVR_ATmega2561__)
#error "Oops! Select 'Silvergate' in 'Tools > Board.'"
#endif
diff --git a/Marlin/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h b/Marlin/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h
index 503dd9ec..6ab6c4ce 100644
--- a/Marlin/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h
+++ b/Marlin/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h
@@ -23,6 +23,7 @@
/**
* Wanhao 0ne+ pin assignments
+ * ATmega2560
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/mega/pins_WEEDO_62A.h b/Marlin/Marlin/src/pins/mega/pins_WEEDO_62A.h
index 4b3bf6a4..4165d9e2 100644
--- a/Marlin/Marlin/src/pins/mega/pins_WEEDO_62A.h
+++ b/Marlin/Marlin/src/pins/mega/pins_WEEDO_62A.h
@@ -23,6 +23,7 @@
/**
* Based on WEEDO 62A pin configuration
* Copyright (c) 2019 WEEDO3D Perron
+ * ATmega2560
*/
#pragma once
diff --git a/Marlin/Marlin/src/pins/pins.h b/Marlin/Marlin/src/pins/pins.h
index 50c0811f..945abedb 100644
--- a/Marlin/Marlin/src/pins/pins.h
+++ b/Marlin/Marlin/src/pins/pins.h
@@ -545,6 +545,16 @@
#include "stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple env:STM32F103RE_btt_maple env:STM32F103RE_btt_USB_maple
#elif MB(BTT_SKR_MINI_E3_V3_0)
#include "stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer
+#elif MB(BTT_MANTA_M4P_V1_0)
+ #include "stm32g0/pins_BTT_MANTA_M4P_V1_0.h" // STM32G0 env:STM32G0B1RE_manta_btt env:STM32G0B1RE_manta_btt_xfer
+#elif MB(BTT_MANTA_M5P_V1_0)
+ #include "stm32g0/pins_BTT_MANTA_M5P_V1_0.h" // STM32G0 env:STM32G0B1RE_manta_btt env:STM32G0B1RE_manta_btt_xfer
+#elif MB(BTT_MANTA_E3_EZ_V1_0)
+ #include "stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h" // STM32G0 env:STM32G0B1RE_manta_btt env:STM32G0B1RE_manta_btt_xfer
+#elif MB(BTT_MANTA_M8P_V1_0)
+ #include "stm32g0/pins_BTT_MANTA_M8P_V1_0.h" // STM32G0 env:STM32G0B1VE_btt env:STM32G0B1VE_btt_xfer
+#elif MB(BTT_MANTA_M8P_V1_1)
+ #include "stm32g0/pins_BTT_MANTA_M8P_V1_1.h" // STM32G0 env:STM32G0B1VE_btt env:STM32G0B1VE_btt_xfer
#elif MB(BTT_SKR_MINI_E3_V3_0_1)
#include "stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h"// STM32F4 env:STM32F401RC_btt
#elif MB(BTT_SKR_MINI_MZ_V1_0)
@@ -617,6 +627,8 @@
#include "stm32f1/pins_ERYONE_ERY32_MINI.h" // STM32F103VET6 env:ERYONE_ERY32_MINI_maple
#elif MB(PANDA_PI_V29)
#include "stm32f1/pins_PANDA_PI_V29.h" // STM32F103RCT6 env:PANDA_PI_V29
+#elif MB(SOVOL_V131)
+ #include "stm32f1/pins_SOVOL_V131.h" // GD32F1 env:GD32F103RET6_sovol_maple
//
// ARM Cortex-M4F
@@ -658,11 +670,11 @@
#elif MB(BTT_SKR_V2_0_REV_B)
#include "stm32f4/pins_BTT_SKR_V2_0_REV_B.h" // STM32F4 env:BIGTREE_SKR_2 env:BIGTREE_SKR_2_USB env:BIGTREE_SKR_2_USB_debug env:BIGTREE_SKR_2_F429 env:BIGTREE_SKR_2_F429_USB env:BIGTREE_SKR_2_F429_USB_debug
#elif MB(BTT_OCTOPUS_V1_0)
- #include "stm32f4/pins_BTT_OCTOPUS_V1_0.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB
+ #include "stm32f4/pins_BTT_OCTOPUS_V1_0.h" // STM32F4 env:STM32F446ZE_btt env:STM32F446ZE_btt_USB
#elif MB(BTT_OCTOPUS_V1_1)
- #include "stm32f4/pins_BTT_OCTOPUS_V1_1.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB env:BIGTREE_OCTOPUS_V1_F407 env:BIGTREE_OCTOPUS_V1_F407_USB
+ #include "stm32f4/pins_BTT_OCTOPUS_V1_1.h" // STM32F4 env:STM32F446ZE_btt env:STM32F446ZE_btt_USB env:STM32F429ZG_btt env:STM32F429ZG_btt_USB env:STM32F407ZE_btt env:STM32F407ZE_btt_USB
#elif MB(BTT_OCTOPUS_PRO_V1_0)
- #include "stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB env:BIGTREE_OCTOPUS_PRO_V1_F429 env:BIGTREE_OCTOPUS_PRO_V1_F429_USB
+ #include "stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h" // STM32F4 env:STM32F446ZE_btt env:STM32F446ZE_btt_USB env:STM32F429ZG_btt env:STM32F429ZG_btt_USB env:STM32H723Zx_btt
#elif MB(LERDGE_K)
#include "stm32f4/pins_LERDGE_K.h" // STM32F4 env:LERDGEK env:LERDGEK_usb_flash_drive
#elif MB(LERDGE_S)
@@ -682,7 +694,7 @@
#elif MB(FLYF407ZG)
#include "stm32f4/pins_FLYF407ZG.h" // STM32F4 env:FLYF407ZG
#elif MB(MKS_ROBIN2)
- #include "stm32f4/pins_MKS_ROBIN2.h" // STM32F4 env:MKS_ROBIN2
+ #include "stm32f4/pins_MKS_ROBIN2.h" // STM32F4 env:mks_robin2
#elif MB(MKS_ROBIN_PRO_V2)
#include "stm32f4/pins_MKS_ROBIN_PRO_V2.h" // STM32F4 env:mks_robin_pro2
#elif MB(MKS_ROBIN_NANO_V3)
@@ -733,9 +745,11 @@
#elif MB(BTT_SKR_SE_BX_V3)
#include "stm32h7/pins_BTT_SKR_SE_BX_V3.h" // STM32H7 env:BTT_SKR_SE_BX
#elif MB(BTT_SKR_V3_0)
- #include "stm32h7/pins_BTT_SKR_V3_0.h" // STM32H7 env:STM32H743Vx_btt
+ #include "stm32h7/pins_BTT_SKR_V3_0.h" // STM32H7 env:STM32H723Vx_btt env:STM32H743Vx_btt
#elif MB(BTT_SKR_V3_0_EZ)
- #include "stm32h7/pins_BTT_SKR_V3_0_EZ.h" // STM32H7 env:STM32H743Vx_btt
+ #include "stm32h7/pins_BTT_SKR_V3_0_EZ.h" // STM32H7 env:STM32H723Vx_btt env:STM32H743Vx_btt
+#elif MB(BTT_OCTOPUS_MAX_EZ_V1_0)
+ #include "stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h" // STM32H7 env:STM32H723Vx_btt env:STM32H723Zx_btt
#elif MB(TEENSY41)
#include "teensy4/pins_TEENSY41.h" // Teensy-4.x env:teensy41
#elif MB(T41U5XBB)
@@ -795,7 +809,7 @@
// Linux Native Debug board
//
-#elif MB(LINUX_RAMPS)
+#elif MB(SIMULATED)
#include "linux/pins_RAMPS_LINUX.h" // Native or Simulation lin:linux_native mac:simulator_macos_debug mac:simulator_macos_release win:simulator_windows lin:simulator_linux_debug lin:simulator_linux_release
#else
@@ -831,6 +845,7 @@
#define BOARD_TH3D_EZBOARD_LITE_V2 99923
#define BOARD_BTT_SKR_SE_BX 99924
#define BOARD_MKS_MONSTER8 99925
+ #define BOARD_LINUX_RAMPS 99926
#if MB(MKS_13)
#error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
@@ -886,6 +901,8 @@
#error "BOARD_BTT_SKR_SE_BX is now BOARD_BTT_SKR_SE_BX_V2 or BOARD_BTT_SKR_SE_BX_V3. Please update your configuration."
#elif MB(MKS_MONSTER8)
#error "BOARD_MKS_MONSTER8 is now BOARD_MKS_MONSTER8_V1 or BOARD_MKS_MONSTER8_V2. Please update your configuration."
+ #elif MB(LINUX_RAMPS)
+ #error "BOARD_LINUX_RAMPS is now BOARD_SIMULATED. Please update your configuration."
#elif defined(MOTHERBOARD)
#error "Unknown MOTHERBOARD value set in Configuration.h."
#else
@@ -919,6 +936,7 @@
#undef BOARD_TH3D_EZBOARD_LITE_V2
#undef BOARD_BTT_SKR_SE_BX
#undef BOARD_MKS_MONSTER8
+ #undef BOARD_LINUX_RAMPS
#endif
diff --git a/Marlin/Marlin/src/pins/pinsDebug.h b/Marlin/Marlin/src/pins/pinsDebug.h
index 5b19ff1b..56e1039c 100644
--- a/Marlin/Marlin/src/pins/pinsDebug.h
+++ b/Marlin/Marlin/src/pins/pinsDebug.h
@@ -168,18 +168,22 @@ const PinInfo pin_array[] PROGMEM = {
};
-#include HAL_PATH(../HAL, pinsDebug.h) // get the correct support file for this CPU
+#include HAL_PATH(.., pinsDebug.h) // get the correct support file for this CPU
#ifndef M43_NEVER_TOUCH
#define M43_NEVER_TOUCH(Q) false
#endif
static void print_input_or_output(const bool isout) {
- SERIAL_ECHOPGM_P(isout ? PSTR("Output = ") : PSTR("Input = "));
+ SERIAL_ECHOF(isout ? F("Output ") : F("Input "));
+}
+
+static void print_pin_state(const bool state) {
+ SERIAL_ECHOF(state ? F("HIGH") : F("LOW"));
}
// pretty report with PWM info
-inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool extended=false, FSTR_P const start_string=nullptr) {
+inline void report_pin_state_extended(const pin_t pin, const bool ignore, const bool extended=false, FSTR_P const start_string=nullptr) {
char buffer[MAX_NAME_LENGTH + 1]; // for the sprintf statements
bool found = false, multi_name_pin = false;
@@ -188,12 +192,12 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e
// Use FastIO for pins Teensy doesn't expose
if (pin == 46) {
print_input_or_output(IS_OUTPUT(46));
- SERIAL_CHAR('0' + READ(46));
+ print_pin_state(READ(46));
return false;
}
else if (pin == 47) {
print_input_or_output(IS_OUTPUT(47));
- SERIAL_CHAR('0' + READ(47));
+ print_pin_state(READ(47));
return false;
}
#endif
@@ -230,14 +234,14 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e
// because this could interfere with inductive/capacitive
// sensors (high impedance voltage divider) and with Pt100 amplifier
print_input_or_output(false);
- SERIAL_ECHO(digitalRead_mod(pin));
+ print_pin_state(digitalRead_mod(pin));
}
else if (pwm_status(pin)) {
// do nothing
}
else {
print_input_or_output(true);
- SERIAL_ECHO(digitalRead_mod(pin));
+ print_pin_state(digitalRead_mod(pin));
}
}
if (!multi_name_pin && extended) pwm_details(pin); // report PWM capabilities only on the first pass & only if doing an extended report
@@ -267,7 +271,7 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e
else if (GET_PINMODE(pin)) {
SERIAL_ECHO_SP(MAX_NAME_LENGTH - 16);
print_input_or_output(true);
- SERIAL_ECHO(digitalRead_mod(pin));
+ print_pin_state(digitalRead_mod(pin));
}
else {
if (IS_ANALOG(pin)) {
@@ -279,7 +283,7 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e
SERIAL_ECHO_SP(MAX_NAME_LENGTH - 16); // add padding if not an analog pin
print_input_or_output(false);
- SERIAL_ECHO(digitalRead_mod(pin));
+ print_pin_state(digitalRead_mod(pin));
}
//if (!pwm_status(pin)) SERIAL_CHAR(' '); // add padding if it's not a PWM pin
if (extended) {
diff --git a/Marlin/Marlin/src/pins/pins_postprocess.h b/Marlin/Marlin/src/pins/pins_postprocess.h
index 5b5cbcd2..6191532b 100644
--- a/Marlin/Marlin/src/pins/pins_postprocess.h
+++ b/Marlin/Marlin/src/pins/pins_postprocess.h
@@ -487,6 +487,11 @@
#define NUM_SERVO_PLUGS 4
#endif
+// Only used within pins files
+#undef NEEDS_X_MINMAX
+#undef NEEDS_Y_MINMAX
+#undef NEEDS_Z_MINMAX
+
//
// Assign endstop pins for boards with only 3 connectors
//
@@ -1714,6 +1719,24 @@
#if !defined(USE_ZMAX_PLUG) && _STOP_IN_USE(_ZMAX_)
#define USE_ZMAX_PLUG
#endif
+#if !defined(USE_IMAX_PLUG) && _STOP_IN_USE(_IMAX_)
+ #define USE_IMAX_PLUG
+#endif
+#if !defined(USE_JMAX_PLUG) && _STOP_IN_USE(_JMAX_)
+ #define USE_JMAX_PLUG
+#endif
+#if !defined(USE_KMAX_PLUG) && _STOP_IN_USE(_KMAX_)
+ #define USE_KMAX_PLUG
+#endif
+#if !defined(USE_UMAX_PLUG) && _STOP_IN_USE(_UMAX_)
+ #define USE_UMAX_PLUG
+#endif
+#if !defined(USE_VMAX_PLUG) && _STOP_IN_USE(_VMAX_)
+ #define USE_VMAX_PLUG
+#endif
+#if !defined(USE_WMAX_PLUG) && _STOP_IN_USE(_WMAX_)
+ #define USE_WMAX_PLUG
+#endif
#if !defined(USE_XMIN_PLUG) && _STOP_IN_USE(_XMIN_)
#define USE_XMIN_PLUG
#endif
@@ -1723,6 +1746,24 @@
#if !defined(USE_ZMIN_PLUG) && _STOP_IN_USE(_ZMIN_)
#define USE_ZMIN_PLUG
#endif
+#if !defined(USE_IMIN_PLUG) && _STOP_IN_USE(_IMIN_)
+ #define USE_IMIN_PLUG
+#endif
+#if !defined(USE_JMIN_PLUG) && _STOP_IN_USE(_JMIN_)
+ #define USE_JMIN_PLUG
+#endif
+#if !defined(USE_KMIN_PLUG) && _STOP_IN_USE(_KMIN_)
+ #define USE_KMIN_PLUG
+#endif
+#if !defined(USE_UMIN_PLUG) && _STOP_IN_USE(_UMIN_)
+ #define USE_UMIN_PLUG
+#endif
+#if !defined(USE_VMIN_PLUG) && _STOP_IN_USE(_VMIN_)
+ #define USE_VMIN_PLUG
+#endif
+#if !defined(USE_WMIN_PLUG) && _STOP_IN_USE(_WMIN_)
+ #define USE_WMIN_PLUG
+#endif
#undef _STOP_IN_USE
#if !USES_Z_MIN_PROBE_PIN
#undef Z_MIN_PROBE_PIN
diff --git a/Marlin/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h
index c5d5fcef..c28fbd05 100644
--- a/Marlin/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h
+++ b/Marlin/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h
@@ -23,6 +23,8 @@
/**
* Einsy-Rambo pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Einsy-Rambo/Schematic%20Prints_Einsy%20Rambo_1.1a.PDF
+ * Origin: https://github.com/ultimachine/Einsy-Rambo/blob/1.1a/board/Project%20Outputs/Schematic%20Prints_Einsy%20Rambo_1.1a.PDF
*/
#include "env_validate.h"
@@ -35,8 +37,8 @@
//
// TMC2130 Configuration_adv defaults for EinsyRambo
//
-#if !AXIS_DRIVER_TYPE_X(TMC2130) || !AXIS_DRIVER_TYPE_Y(TMC2130) || !AXIS_DRIVER_TYPE_Z(TMC2130) || !AXIS_DRIVER_TYPE_E0(TMC2130)
- #error "You must set ([XYZ]|E0)_DRIVER_TYPE to TMC2130 in Configuration.h for EinsyRambo."
+#if (HAS_X_AXIS && !AXIS_DRIVER_TYPE_X(TMC2130)) || (HAS_Y_AXIS && !AXIS_DRIVER_TYPE_Y(TMC2130)) || (HAS_Z_AXIS && !AXIS_DRIVER_TYPE_Z(TMC2130)) || (HAS_EXTRUDERS && !AXIS_DRIVER_TYPE_E0(TMC2130))
+ #error "For EinsyRambo you must set all *_DRIVER_TYPE to TMC2130 in Configuration.h."
#endif
// TMC2130 Diag Pins (currently just for reference)
diff --git a/Marlin/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/Marlin/src/pins/rambo/pins_EINSY_RETRO.h
index 413eb8c9..dc91c47e 100644
--- a/Marlin/Marlin/src/pins/rambo/pins_EINSY_RETRO.h
+++ b/Marlin/Marlin/src/pins/rambo/pins_EINSY_RETRO.h
@@ -23,6 +23,10 @@
/**
* Einsy-Retro pin assignments
+ * Schematic (1.0b): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Einsy-Retro/Schematic%20Prints_EinsyRetro_1.0b.PDF
+ * Origin (1.0b): https://github.com/ultimachine/EinsyRetro/blob/master/board/Project%20Outputs/Schematic%20Prints_EinsyRetro_1.0b.PDF
+ * Schematic (1.0c): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Einsy-Retro/Schematic%20Prints_EinsyRetro_1.0c.PDF
+ * Origin (1.0c): https://github.com/ultimachine/EinsyRetro/blob/master/board/Project%20Outputs/Schematic%20Prints_EinsyRetro_1.0c.PDF
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/rambo/pins_MINIRAMBO.h b/Marlin/Marlin/src/pins/rambo/pins_MINIRAMBO.h
index 31d44f2b..353fbd66 100644
--- a/Marlin/Marlin/src/pins/rambo/pins_MINIRAMBO.h
+++ b/Marlin/Marlin/src/pins/rambo/pins_MINIRAMBO.h
@@ -23,6 +23,10 @@
/**
* Mini-RAMBo pin assignments
+ * Schematic (1.3a): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Mini%20RAMBo/Mini-Rambo.PDF
+ * Origin (1.3a): https://github.com/ultimachine/Mini-Rambo/blob/1.3a/board/Project%20Outputs%20for%20Mini-Rambo/Mini-Rambo.PDF
+ * Schematic (1.0a): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Mini%20RAMBo%201.0a/Mini-Rambo.PDF
+ * Origin (1.0a): https://github.com/ultimachine/Mini-Rambo/blob/v1.1b/board/Project%20Outputs%20for%20Mini-Rambo/Mini-Rambo.PDF
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/Marlin/src/pins/rambo/pins_RAMBO.h
index cb7a0591..3a268115 100644
--- a/Marlin/Marlin/src/pins/rambo/pins_RAMBO.h
+++ b/Marlin/Marlin/src/pins/rambo/pins_RAMBO.h
@@ -39,6 +39,8 @@
/**
* Rambo pin assignments
+ * Schematic (1.1b): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMBo/Rambo1-1-schematic.png
+ * Origin (1.1b): https://www.reprap.org/wiki/File:Rambo1-1-schematic.png
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h b/Marlin/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h
index 533284a4..ca073f5a 100644
--- a/Marlin/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h
+++ b/Marlin/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h
@@ -25,7 +25,7 @@
* Rambo pin assignments MODIFIED FOR Scoovo X9H
************************************************/
-#include "env_target.h"
+#include "env_validate.h"
#define BOARD_INFO_NAME "Scoovo X9H"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/Marlin/src/pins/ramps/pins_3DRAG.h
index 1e9d53a6..9929fa6e 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_3DRAG.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_3DRAG.h
@@ -23,6 +23,10 @@
/**
* 3DRAG (and K8200 / K8400) Arduino Mega with RAMPS v1.4 pin assignments
+ * This may be compatible with the standalone Controller variant.
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/3DRAG%20+%20Controller/Schema_base.jpg
+ * Origin: https://reprap.org/wiki/File:Schema_base.jpg
+ * ATmega2560, ATmega1280
*/
#ifndef BOARD_INFO_NAME
diff --git a/Marlin/Marlin/src/pins/ramps/pins_AZTEEG_X3.h b/Marlin/Marlin/src/pins/ramps/pins_AZTEEG_X3.h
index 31adea42..4d372265 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_AZTEEG_X3.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_AZTEEG_X3.h
@@ -23,6 +23,9 @@
/**
* AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/AZTEEG_X3/AZTEEG%20X3%20PUB%20v1.12.pdf
+ * Origin: http://files.panucatt.com/datasheets/azteegx3_designfiles.zip
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h b/Marlin/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h
index 24266bb9..2c666a6f 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h
@@ -23,6 +23,9 @@
/**
* AZTEEG_X3_PRO (Arduino Mega) pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/AZTEEG_X3_PRO/AZTEEG%20X3%20PRO%201.0%20PUB.pdf
+ * Origin: http://files.panucatt.com/datasheets/x3pro_sch_v1.0.zip
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h b/Marlin/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h
index fa622ffb..f3439aa6 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h
@@ -23,6 +23,9 @@
/**
* BAM&DICE Due (Arduino Mega) pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/BAM&DICE%20Due/2PRINTBETA-BAM&DICE-DUE-V1.1-sch.pdf
+ * Origin: http://www.2printbeta.de/download/2PRINTBETA-BAM&DICE-DUE-V1.1-sch.pdf
+ * ATmega2560, ATmega1280
*/
#if HOTENDS > 2 || E_STEPPERS > 2
diff --git a/Marlin/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h b/Marlin/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h
index 58a62fb8..6155e984 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_BIQU_KFB_2.h
@@ -23,6 +23,7 @@
/**
* KFB 2.0 â Arduino Mega2560 with RAMPS v1.4 pin assignments
+ * ATmega2560
*/
#if HOTENDS > 2 || E_STEPPERS > 2
diff --git a/Marlin/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
index 4a54b85a..cd3ada25 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h
@@ -23,6 +23,9 @@
/**
* bq ZUM Mega 3D board definition
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/bq%20ZUM%20Mega%203D/Zum%20Mega%203D.PDF
+ * Origin: https://github.com/bq/zum/blob/master/zum-mega3d/Zum%20Mega%203D.PDF
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h b/Marlin/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h
index 02094102..1285d024 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h
@@ -21,6 +21,8 @@
*/
#pragma once
+// ATmega2560
+
#define BOARD_INFO_NAME "Copymaster 3D RAMPS"
#define Z_STEP_PIN 47
diff --git a/Marlin/Marlin/src/pins/ramps/pins_DAGOMA_F5.h b/Marlin/Marlin/src/pins/ramps/pins_DAGOMA_F5.h
index e1bd2ec4..9760ccbe 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_DAGOMA_F5.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_DAGOMA_F5.h
@@ -21,6 +21,8 @@
*/
#pragma once
+// ATmega2560
+
#if HOTENDS > 2 || E_STEPPERS > 2
#error "Dagoma3D F5 supports up to 2 hotends / E steppers."
#endif
diff --git a/Marlin/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h b/Marlin/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h
index 1a4b83f0..7e370a39 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h
@@ -23,6 +23,7 @@
/**
* Wanhao Duplicator i3 Plus pin assignments
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/ramps/pins_FELIX2.h b/Marlin/Marlin/src/pins/ramps/pins_FELIX2.h
index 3e7849d7..48ef896e 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_FELIX2.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_FELIX2.h
@@ -23,6 +23,7 @@
/**
* FELIXprinters v2.0/3.0 (RAMPS v1.4) pin assignments
+ * ATmega2560, ATmega1280
*/
#if HOTENDS > 2 || E_STEPPERS > 2
diff --git a/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h b/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h
index a6791ff7..7bed4c08 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h
@@ -23,6 +23,7 @@
/**
* Formbot Raptor pin assignments
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h b/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h
index 4fb10bfd..f0e86ac4 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR2.h
@@ -23,6 +23,7 @@
/**
* Formbot Raptor 2 pin assignments
+ * ATmega2560
*/
#define BOARD_INFO_NAME "Formbot Raptor2"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h
index 17d3abc7..a5ca7e86 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h
@@ -22,7 +22,8 @@
#pragma once
/**
- * Formbot pin assignments
+ * Formbot T-Rex 2+ pin assignments
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h
index e23a6399..2fa3d60f 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h
@@ -22,7 +22,8 @@
#pragma once
/**
- * Formbot pin assignments
+ * Formbot T-Rex 3 pin assignments
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h
index b8de2609..9f23647c 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h
@@ -23,6 +23,9 @@
//
// FYSETC F6 1.3 (and 1.4) pin assignments
+// Schematic (1.3): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/FYSETC%20F6%201.3/F6_V13.pdf
+// Origin: https://github.com/FYSETC/FYSETC-F6/blob/master/Hardware/V1.3/F6_V13.pdf
+// ATmega2560
//
#if NOT_TARGET(__AVR_ATmega2560__)
diff --git a/Marlin/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h b/Marlin/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h
index 1fc24154..9604d0ec 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h
@@ -23,6 +23,9 @@
//
// FYSETC F6 v1.4 pin assignments
+// Schematic (1.4): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/FYSETC%20F6%20v1.4/F6%20V1.4%20Sch.pdf
+// Origin (1.4): https://github.com/FYSETC/FYSETC-F6/blob/master/Hardware/V1.4/F6%20V1.4%20Sch.pdf
+// ATmega2560
//
#define BOARD_INFO_NAME "FYSETC F6 1.4"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_K8200.h b/Marlin/Marlin/src/pins/ramps/pins_K8200.h
index 395e1ccc..d2557b26 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_K8200.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_K8200.h
@@ -24,6 +24,9 @@
/**
* K8200 Arduino Mega with RAMPS v1.3 pin assignments
* Identical to 3DRAG
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Velleman%20K8200/K8200diagram.jpg
+ * Origin: https://www.velleman.eu/images/tmp/K8200diagram.jpg
+ * ATmega2560
*/
#define BOARD_INFO_NAME "Velleman K8200"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_K8400.h b/Marlin/Marlin/src/pins/ramps/pins_K8400.h
index 686c29b7..56ec6619 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_K8400.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_K8400.h
@@ -24,6 +24,9 @@
/**
* Velleman K8400 (Vertex)
* 3DRAG clone
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Velleman%20K8400/k8400-schema-electronique.jpg
+ * Origin: https://filimprimante3d.fr/documents/k8400-schema-electronique.jpg
+ * ATmega2560, ATmega1280
*
* K8400 has some minor differences over a normal 3Drag:
* - No X/Y max endstops
@@ -51,7 +54,7 @@
#define Y_STOP_PIN 14
#if EITHER(BLTOUCH, TOUCH_MI_PROBE)
- #define HAS_INVERTED_PROBE
+ #define INVERTED_PROBE_STATE
#endif
#include "pins_3DRAG.h" // ... RAMPS
diff --git a/Marlin/Marlin/src/pins/ramps/pins_K8600.h b/Marlin/Marlin/src/pins/ramps/pins_K8600.h
index e4468a60..3081b043 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_K8600.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_K8600.h
@@ -23,6 +23,7 @@
/**
* VERTEX NANO Arduino Mega with RAMPS EFB v1.4 pin assignments.
+ * ATmega2560, ATmega1280
*/
#if HAS_MULTI_HOTEND
diff --git a/Marlin/Marlin/src/pins/ramps/pins_K8800.h b/Marlin/Marlin/src/pins/ramps/pins_K8800.h
index 17bb59fd..a9669764 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_K8800.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_K8800.h
@@ -23,6 +23,9 @@
/**
* Velleman K8800 (Vertex)
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Velleman%20K8800/K8800-schematic-V1.4.pdf
+ * Origin: https://www.velleman.eu/downloads/files/vertex-delta/schematics/K8800-schematic-V1.4.pdf
+ * ATmega2560, ATmega1280
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h b/Marlin/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h
index 51f9cd80..d9759153 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h
@@ -23,6 +23,7 @@
/**
* Longer3D LK1/LK4/LK5 Pro board pin assignments
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h b/Marlin/Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h
index a42dba87..2ab463d6 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_MAKEBOARD_MINI.h
@@ -21,6 +21,8 @@
*/
#pragma once
+// ATmega2560
+
#define BOARD_INFO_NAME "MAKEboard Mini"
//
diff --git a/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_10.h b/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_10.h
index 64efa46c..8d46ac36 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_10.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_10.h
@@ -23,6 +23,12 @@
/**
* MKS BASE 1.0 â Arduino Mega2560 with RAMPS v1.4 pin assignments
+ * Schematics:
+ * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20BASE%201.0/PAGE1.pdf
+ * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20BASE%201.0/PAGE2.pdf
+ * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20BASE%201.0/PAGE3.pdf
+ * Origin: https://reprap.org/wiki/File:MKS_Base_V1.0_source.zip
+ * ATmega2560
*
* Rev B - Override pin definitions for CASE_LIGHT and M3/M4/M5 spindle control
*/
diff --git a/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_14.h b/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_14.h
index 7e2a722c..d302def7 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_14.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_14.h
@@ -23,6 +23,7 @@
/**
* MKS BASE v1.4 with A4982 stepper drivers and digital micro-stepping
+ * ATmega2560
*/
#if HOTENDS > 2 || E_STEPPERS > 2
diff --git a/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_15.h b/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_15.h
index 5fedd3f9..1d93ec5c 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_15.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_15.h
@@ -23,6 +23,7 @@
/**
* MKS BASE v1.5 with A4982 stepper drivers and digital micro-stepping
+ * ATmega2560
*/
#if HOTENDS > 2 || E_STEPPERS > 2
diff --git a/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_16.h b/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_16.h
index 63e0b51d..765a601f 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_16.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_16.h
@@ -23,6 +23,9 @@
/**
* MKS BASE v1.6 with A4982 stepper drivers and digital micro-stepping
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20BASE%201.6/MKS%20Base%20V1.6_004%20SCH.pdf
+ * Origin: https://github.com/makerbase-mks/MKS-BASE/blob/master/hardware/MKS%20Base%20V1.6_004/MKS%20Base%20V1.6_004%20SCH.pdf
+ * ATmega2560
*/
#if HOTENDS > 2 || E_STEPPERS > 2
diff --git a/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h b/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h
index 973f924e..c50f28a4 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h
@@ -23,6 +23,7 @@
/**
* MKS BASE with Heroic HR4982 stepper drivers
+ * ATmega2560
*/
#include "pins_MKS_BASE_15.h" // ... MKS_BASE_common ... RAMPS
diff --git a/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_common.h b/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_common.h
index 9047a4bc..7608745a 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_common.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_MKS_BASE_common.h
@@ -23,6 +23,7 @@
/**
* MKS BASE â Arduino Mega2560 with RAMPS pin assignments
+ * ATmega2560
*/
#ifndef BOARD_INFO_NAME
diff --git a/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_13.h b/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_13.h
index 1e354a10..5c13288f 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_13.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_13.h
@@ -23,6 +23,9 @@
/**
* Arduino Mega with RAMPS v1.4 adjusted pin assignments
+ * Schematic (1.4): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20GEN%20v1.4/MKS%20GEN%20V1.4_004%20SCH.pdf
+ * Origin (1.4): https://github.com/makerbase-mks/MKS-GEN/blob/master/hardware/MKS%20GEN%20V1.4_004/MKS%20GEN%20V1.4_004%20SCH.pdf
+ * ATmega2560, ATmega1280
*
* MKS GEN v1.3 (Extruder, Fan, Bed)
* MKS GEN v1.3 (Extruder, Extruder, Fan, Bed)
diff --git a/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_L.h b/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_L.h
index ca1f1338..9faacf24 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_L.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_L.h
@@ -23,6 +23,9 @@
/**
* MKS GEN L â Arduino Mega2560 with RAMPS v1.4 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20GEN%20L%20v1.0/MKS%20Gen_L%20V1.0_008%20SCH.pdf
+ * Origin: https://github.com/makerbase-mks/MKS-GEN_L/blob/master/hardware/MKS%20Gen_L%20V1.0_008/MKS%20Gen_L%20V1.0_008%20SCH.pdf
+ * ATmega2560, ATmega1280
*/
#if HOTENDS > 2 || E_STEPPERS > 2
diff --git a/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h b/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h
index 0378b166..d82c4353 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_L_V2.h
@@ -23,6 +23,9 @@
/**
* MKS GEN L V2 â Arduino Mega2560 with RAMPS v1.4 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20GEN%20L%20V2.0/MKS%20Gen_L%20V2.0_001%20SCH.pdf
+ * Origin: https://github.com/makerbase-mks/MKS-GEN_L/blob/master/hardware/MKS%20Gen_L%20V2.0_001/MKS%20Gen_L%20V2.0_001%20SCH.pdf
+ * ATmega2560
*/
#if HOTENDS > 2 || E_STEPPERS > 2
diff --git a/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h b/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h
index d508cb45..c2ab34c8 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_MKS_GEN_L_V21.h
@@ -23,6 +23,9 @@
/**
* MKS GEN L V2 â Arduino Mega2560 with RAMPS v1.4 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/MKS%20GEN%20L%20V2.1/MKS%20GEN_L%20V2.1_001%20SCH.pdf
+ * Origin: https://github.com/makerbase-mks/MKS-GEN_L/blob/master/hardware/MKS%20Gen_L%20V2.1_001/MKS%20GEN_L%20V2.1_001%20SCH.pdf
+ * ATmega2560
*/
#if HOTENDS > 2 || E_STEPPERS > 2
diff --git a/Marlin/Marlin/src/pins/ramps/pins_ORTUR_4.h b/Marlin/Marlin/src/pins/ramps/pins_ORTUR_4.h
index e47bae19..7f0fe930 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_ORTUR_4.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_ORTUR_4.h
@@ -23,6 +23,7 @@
/**
* Ortur 4 Arduino Mega based on RAMPS v1.4 pin assignments
+ * ATmega2560
*/
#define BOARD_INFO_NAME "Ortur 4.3"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_PXMALION_CORE_I3.h b/Marlin/Marlin/src/pins/ramps/pins_PXMALION_CORE_I3.h
index 12c40c7d..ee063399 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_PXMALION_CORE_I3.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_PXMALION_CORE_I3.h
@@ -22,6 +22,7 @@
/**
* Pxmalion Core i3 - https://github.com/Pxmalion
+ * ATmega2560
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/Marlin/src/pins/ramps/pins_RAMPS.h
index 4e4ca605..3d4e0426 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_RAMPS.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_RAMPS.h
@@ -23,6 +23,7 @@
/**
* Arduino Mega with RAMPS v1.4 (or v1.3) pin assignments
+ * ATmega2560, ATmega1280
*
* Applies to the following boards:
*
@@ -96,10 +97,10 @@
#define Z_MAX_PIN -1
#endif
#ifndef I_STOP_PIN
- #define I_STOP_PIN 18
+ #define I_STOP_PIN 18 // Z-
#endif
#ifndef J_STOP_PIN
- #define J_STOP_PIN 19
+ #define J_STOP_PIN 19 // Z+
#endif
#endif
@@ -108,26 +109,26 @@
//
#ifndef X_STOP_PIN
#ifndef X_MIN_PIN
- #define X_MIN_PIN 3
+ #define X_MIN_PIN 3 // X-
#endif
#ifndef X_MAX_PIN
- #define X_MAX_PIN 2
+ #define X_MAX_PIN 2 // X+
#endif
#endif
#ifndef Y_STOP_PIN
#ifndef Y_MIN_PIN
- #define Y_MIN_PIN 14
+ #define Y_MIN_PIN 14 // Y-
#endif
#ifndef Y_MAX_PIN
- #define Y_MAX_PIN 15
+ #define Y_MAX_PIN 15 // Y+
#endif
#endif
#ifndef Z_STOP_PIN
#ifndef Z_MIN_PIN
- #define Z_MIN_PIN 18
+ #define Z_MIN_PIN 18 // Z-
#endif
#ifndef Z_MAX_PIN
- #define Z_MAX_PIN 19
+ #define Z_MAX_PIN 19 // Z+
#endif
#endif
@@ -688,8 +689,6 @@
#if IS_RRD_SC
- #define BEEPER_PIN EXP1_01_PIN
-
#if ENABLED(CR10_STOCKDISPLAY)
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
@@ -744,7 +743,9 @@
#define DOGLCD_A0 AUX2_07_PIN
#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
- #define BEEPER_PIN EXP2_05_PIN
+ #ifndef BEEPER_PIN
+ #define BEEPER_PIN EXP2_05_PIN
+ #endif
#define STAT_LED_RED_PIN AUX4_03_PIN
#define STAT_LED_BLUE_PIN EXP1_02_PIN
@@ -762,7 +763,9 @@
#define DOGLCD_CS EXP1_08_PIN
#define DOGLCD_A0 EXP1_07_PIN
- #define BEEPER_PIN EXP1_05_PIN
+ #ifndef BEEPER_PIN
+ #define BEEPER_PIN EXP1_05_PIN
+ #endif
#define LCD_BACKLIGHT_PIN EXP2_05_PIN
#define BTN_EN1 EXP1_02_PIN
@@ -777,7 +780,6 @@
#elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864)
- #define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#ifndef SD_DETECT_PIN
#define SD_DETECT_PIN EXP2_07_PIN
@@ -831,7 +833,9 @@
#elif ENABLED(MINIPANEL)
- #define BEEPER_PIN AUX2_08_PIN
+ #ifndef BEEPER_PIN
+ #define BEEPER_PIN AUX2_08_PIN
+ #endif
#define LCD_BACKLIGHT_PIN AUX2_10_PIN
#define DOGLCD_A0 AUX2_07_PIN
@@ -856,8 +860,6 @@
#elif ENABLED(G3D_PANEL)
- #define BEEPER_PIN EXP1_01_PIN
-
#ifndef SD_DETECT_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#endif
@@ -875,7 +877,9 @@
#else
- #define BEEPER_PIN EXP2_05_PIN
+ #ifndef BEEPER_PIN
+ #define BEEPER_PIN EXP2_05_PIN
+ #endif
#if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2
#define BTN_EN1 AUX2_03_PIN
@@ -890,6 +894,10 @@
#endif
#endif // IS_NEWPANEL
+ #ifndef BEEPER_PIN
+ #define BEEPER_PIN EXP1_01_PIN // Most common mapping
+ #endif
+
#endif // HAS_WIRED_LCD && !LCD_PINS_DEFINED
#if IS_RRW_KEYPAD && !HAS_ADC_BUTTONS
diff --git a/Marlin/Marlin/src/pins/ramps/pins_RAMPS_13.h b/Marlin/Marlin/src/pins/ramps/pins_RAMPS_13.h
index 6e7c8cba..026492e4 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_RAMPS_13.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_RAMPS_13.h
@@ -23,6 +23,7 @@
/**
* Arduino Mega with RAMPS v1.3 pin assignments
+ * ATmega2560, ATmega1280
*
* Applies to the following boards:
*
diff --git a/Marlin/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h b/Marlin/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h
index 3d5f5d6f..5e4366e2 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h
@@ -21,6 +21,8 @@
*/
#pragma once
+// ATmega2560
+
#if HOTENDS > 2 || E_STEPPERS > 2
#error "Creality RAMPS supports up to 2 hotends / E steppers."
#endif
diff --git a/Marlin/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h b/Marlin/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h
index 8f9148b7..3ffa940c 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_RAMPS_ENDER_4.h
@@ -21,6 +21,8 @@
*/
#pragma once
+// ATmega2560
+
#if HAS_MULTI_HOTEND || E_STEPPERS > 1
#error "Ender-4 only supports 1 hotend / E stepper."
#endif
diff --git a/Marlin/Marlin/src/pins/ramps/pins_RAMPS_OLD.h b/Marlin/Marlin/src/pins/ramps/pins_RAMPS_OLD.h
index 97476662..526045c1 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_RAMPS_OLD.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_RAMPS_OLD.h
@@ -23,6 +23,7 @@
/**
* Arduino Mega with RAMPS v1.0, v1.1, v1.2 pin assignments
+ * ATmega2560, ATmega1280
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h b/Marlin/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h
index 8ccb14c8..f93c6919 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h
@@ -23,6 +23,7 @@
/**
* Arduino Mega with RAMPS v1.4Plus, also known as 3DYMY version, pin assignments
+ * ATmega2560, ATmega1280
*
* Applies to the following boards:
*
diff --git a/Marlin/Marlin/src/pins/ramps/pins_RAMPS_S_12.h b/Marlin/Marlin/src/pins/ramps/pins_RAMPS_S_12.h
index f41573b5..4f3de969 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_RAMPS_S_12.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_RAMPS_S_12.h
@@ -24,6 +24,7 @@
/**
* Arduino Mega with RAMPS-S v1.2 by Sakul.cz pin assignments
* Written by Michal Rábek
+ * ATmega2560
*
* Applies to the following boards:
*
diff --git a/Marlin/Marlin/src/pins/ramps/pins_RIGIDBOARD.h b/Marlin/Marlin/src/pins/ramps/pins_RIGIDBOARD.h
index 273e0274..d1824d38 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_RIGIDBOARD.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_RIGIDBOARD.h
@@ -23,6 +23,7 @@
/**
* RIGIDBOARD Arduino Mega with RAMPS v1.4 pin assignments
+ * ATmega2560, ATmega1280
*/
#ifndef BOARD_INFO_NAME
diff --git a/Marlin/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h b/Marlin/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h
index 8242f1a7..dc27378a 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h
@@ -23,6 +23,7 @@
/**
* RIGIDBOARD V2 Arduino Mega with RAMPS v1.4 pin assignments
+ * ATmega2560, ATmega1280
*/
#define BOARD_INFO_NAME "RigidBoard V2"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_RL200.h b/Marlin/Marlin/src/pins/ramps/pins_RL200.h
index 00fb39a4..219a3a52 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_RL200.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_RL200.h
@@ -24,6 +24,7 @@
/**
* Rapide Lite 200 v1 (RUMBA clone) pin assignments. Has slightly different assignment for
* extruder motors due to dual Z motors. Pinout therefore based on pins_RUMBA.h.
+ * ATmega2560
*/
#define BOARD_INFO_NAME "RL200"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/Marlin/src/pins/ramps/pins_RUMBA.h
index eb049c48..6b1f4c56 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_RUMBA.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_RUMBA.h
@@ -23,6 +23,9 @@
/**
* RUMBA pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/RUMBA/RRD-RUMBA_SCHEMATICS.png
+ * Origin: https://reprap.org/wiki/File:RRD-RUMBA_SCHEMATICS.png
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h b/Marlin/Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h
index 39942613..57ee32ab 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_RUMBA_RAISE3D.h
@@ -21,6 +21,8 @@
*/
#pragma once
+// ATmega2560
+
#define BOARD_INFO_NAME "Raise3D Rumba"
#define DEFAULT_MACHINE_NAME "Raise3D N Series"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h b/Marlin/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h
index d25029a7..6354cc76 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_SAINSMART_2IN1.h
@@ -23,13 +23,14 @@
/**
* Sainsmart 2-in-1 pin assignments
+ * ATmega2560, ATmega1280
*/
#if HOTENDS > 2 || E_STEPPERS > 2
#error "Sainsmart 2-in-1 supports up to 2 hotends / E steppers."
#endif
-#define BOARD_INFO_NAME "Sainsmart"
+#define BOARD_INFO_NAME "Sainsmart 2-in-1"
//
// Heaters / Fans
diff --git a/Marlin/Marlin/src/pins/ramps/pins_TANGO.h b/Marlin/Marlin/src/pins/ramps/pins_TANGO.h
index 451d2f87..936751e9 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_TANGO.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_TANGO.h
@@ -23,6 +23,9 @@
/**
* BIQU Tango pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/BIQU%20Tango/schematic.png
+ * Origin: https://github.com/bigtreetech/Tango-3D-Printer-Motherboard/blob/master/Schematic/Tango%20V1.0.SchDoc
+ * ATmega2560
*/
#define BOARD_INFO_NAME "Tango"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h b/Marlin/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h
index b11487b2..dd6fb2fa 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h
@@ -22,7 +22,8 @@
#pragma once
/**
- * Tenlog pin assignments
+ * Tenlog D3 Hero pin assignments
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h b/Marlin/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h
index b3f7d5f2..780ab8da 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_TENLOG_MB1_V23.h
@@ -22,7 +22,8 @@
#pragma once
/**
- * Tenlog pin assignments
+ * Tenlog MB1 V2.3 pin assignments
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h b/Marlin/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h
index 71dfb8c7..a286c13a 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h
@@ -23,6 +23,7 @@
/**
* Arduino Mega with RAMPS v1.3 for Anycubic
+ * ATmega2560
*/
#define BOARD_INFO_NAME "Anycubic RAMPS 1.3"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h b/Marlin/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h
index 96c3fced..ce2a9e4c 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_TRIGORILLA_14.h
@@ -23,6 +23,7 @@
/**
* Arduino Mega with RAMPS v1.4 for Anycubic
+ * ATmega2560
*/
#define BOARD_INFO_NAME "Anycubic RAMPS 1.4"
@@ -52,6 +53,55 @@
#define E0_AUTO_FAN_PIN FAN2_PIN
#endif
+/**
+ * Trigorilla Plugs (oriented with stepper plugs at the top)
+ *
+ * SENSORS : GND GND GND GND
+ * A12 A15 A14 A13
+ * (D66 D69 D68 D67)
+ *
+ * AUX : D42 GND 5V (Chiron Y-STOP)
+ * D43 GND 5V (Chiron Z-STOP)
+ *
+ * UART3 : GND D15 D14 5V
+ * (RX3 TX3)
+ *
+ * IIC : 12V GND D21 D20 GND 5V
+ * (SCL SDA)
+ *
+ * END STOPS : D19 D18 D15 D14 D2 D3
+ * GND GND GND GND GND GND
+ * 5V 5V 5V 5V 5V 5V
+ */
+
+/** Expansion Headers
+ * ------ ------
+ * 37 | 1 2 | 35 (MISO) 50 | 1 2 | 52 (SCK)
+ * 17 | 3 4 | 16 31 | 3 4 | 53
+ * 23 5 6 | 25 33 5 6 | 51 (MOSI)
+ * 27 | 7 8 | 29 49 | 7 8 | 41
+ * (GND) | 9 10 | (5V) (GND) | 9 10 | RESET
+ * ------ ------
+ * EXP1 EXP2
+ */
+#define EXP1_01_PIN 37
+#define EXP1_02_PIN 35
+#define EXP1_03_PIN 17
+#define EXP1_04_PIN 16
+#define EXP1_05_PIN 23
+#define EXP1_06_PIN 25
+#define EXP1_07_PIN 27
+#define EXP1_08_PIN 29
+
+#define EXP2_01_PIN 50 // MISO
+#define EXP2_02_PIN 52 // SCK
+#define EXP2_03_PIN 31
+#define EXP2_04_PIN 53
+#define EXP2_05_PIN 33
+#define EXP2_06_PIN 51 // MOSI
+#define EXP2_07_PIN 49
+#define EXP2_08_PIN 41
+
//
// AnyCubic pin mappings
//
@@ -60,21 +110,18 @@
// - TRIGORILLA_MAPPING_I3MEGA
//
-//
-// Limit Switches
-//
//#define ANYCUBIC_4_MAX_PRO_ENDSTOPS
#if ENABLED(ANYCUBIC_4_MAX_PRO_ENDSTOPS)
- #define X_MAX_PIN 43
- #define Y_STOP_PIN 19
+ #define X_MAX_PIN 43 // AUX (2)
+ #define Y_STOP_PIN 19 // Z+
#elif EITHER(TRIGORILLA_MAPPING_CHIRON, TRIGORILLA_MAPPING_I3MEGA)
// Chiron uses AUX header for Y and Z endstops
- #define Y_STOP_PIN 42 // AUX
- #define Z_STOP_PIN 43 // AUX
+ #define Y_STOP_PIN 42 // AUX (1)
+ #define Z_STOP_PIN 43 // AUX (2)
#define Z2_MIN_PIN 18 // Z-
#ifndef Z_MIN_PROBE_PIN
- #define Z_MIN_PROBE_PIN 2
+ #define Z_MIN_PROBE_PIN 2 // X+
#endif
#define CONTROLLER_FAN_PIN FAN1_PIN
@@ -85,14 +132,14 @@
#endif
#if ENABLED(TRIGORILLA_MAPPING_CHIRON)
- #ifndef FIL_RUNOUT_PIN
- #define FIL_RUNOUT_PIN 33
+ #if ENABLED(ANYCUBIC_LCD_CHIRON) && !defined(FIL_RUNOUT_PIN)
+ #define FIL_RUNOUT_PIN EXP2_05_PIN // Chiron Standard Adapter
#endif
#define HEATER_BED_PIN MOSFET_B_PIN // HEATER1
- #else
- #ifndef FIL_RUNOUT_PIN
- #define FIL_RUNOUT_PIN 19
- #endif
+ #endif
+
+ #ifndef FIL_RUNOUT_PIN
+ #define FIL_RUNOUT_PIN 19 // Z+
#endif
#if EITHER(TRIGORILLA_MAPPING_CHIRON, SWAP_Z_MOTORS)
@@ -110,8 +157,10 @@
#endif
#if EITHER(ANYCUBIC_LCD_CHIRON, ANYCUBIC_LCD_I3MEGA)
- #define BEEPER_PIN 31
- #define SD_DETECT_PIN 49
+ #ifndef BEEPER_PIN
+ #define BEEPER_PIN EXP2_03_PIN // Chiron Standard Adapter
+ #endif
+ #define SD_DETECT_PIN EXP2_07_PIN // Chiron Standard Adapter
#endif
#if HAS_TMC_UART
@@ -130,35 +179,3 @@
#endif
#include "pins_RAMPS.h"
-
-//
-// AnyCubic made the following changes to 1.1.0-RC8
-// If these are appropriate for your LCD let us know.
-//
-#if 0 && HAS_WIRED_LCD
-
- // LCD Display output pins
- #if BOTH(IS_NEWPANEL, PANEL_ONE)
- #undef LCD_PINS_D6
- #define LCD_PINS_D6 57
- #endif
-
- // LCD Display input pins
- #if IS_NEWPANEL
- #if EITHER(VIKI2, miniVIKI)
- #undef DOGLCD_A0
- #define DOGLCD_A0 23
- #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
- #undef BEEPER_PIN
- #define BEEPER_PIN 33
- #undef LCD_BACKLIGHT_PIN
- #define LCD_BACKLIGHT_PIN 67
- #endif
- #elif ENABLED(MINIPANEL)
- #undef BEEPER_PIN
- #define BEEPER_PIN 33
- #undef DOGLCD_A0
- #define DOGLCD_A0 42
- #endif
-
-#endif // HAS_WIRED_LCD
diff --git a/Marlin/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h b/Marlin/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h
index 04c6af67..0104dadf 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h
@@ -23,6 +23,7 @@
/**
* Arduino Mega for Tronxy X5S-2E, etc.
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/Marlin/src/pins/ramps/pins_TT_OSCAR.h
index f81cc603..430d7b3e 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_TT_OSCAR.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_TT_OSCAR.h
@@ -21,10 +21,12 @@
*/
#pragma once
+// ATmega2560
+
#include "env_validate.h"
#if HOTENDS > 5 || E_STEPPERS > 5
- #error "TTOSCAR supports up to 5 hotends / E steppers."
+ #error "TT OSCAR supports up to 5 hotends / E steppers."
#endif
#define BOARD_INFO_NAME "TT OSCAR"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h b/Marlin/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h
index 0b15cd35..4ee0a695 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h
@@ -23,6 +23,25 @@
/**
* Ultiboard v2.0 pin assignments
+ * Schematics (2.1.4):
+ * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%202.1.4/schema1.png
+ * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%202.1.4/schema2.png
+ * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%202.1.4/schema3.png
+ * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%202.1.4/schema4.png
+ * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%202.1.4/schema5.png
+ * Origins (2.1.4):
+ * - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema1.SchDoc
+ * - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema2.SchDoc
+ * - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema3.SchDoc
+ * - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema4.SchDoc
+ * - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema5.SchDoc
+ * Schematics (Original+):
+ * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%20Original+/Ultimainboard%20rev.%202.1.1%20altium/schema1.png
+ * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%20Original+/Ultimainboard%20rev.%202.1.1%20altium/schema2.png
+ * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%20Original+/Ultimainboard%20rev.%202.1.1%20altium/schema3.png
+ * - https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%20Original+/Ultimainboard%20rev.%202.1.1%20altium/schema4.png
+ * Origin (Original+): https://github.com/Ultimaker/Ultimaker-Original-Plus/blob/master/1091_Main_board_v2.1.1_(x1)/Ultimainboard%20rev.%202.1.1%20altium.zip
+ * ATmega2560
*/
/**
diff --git a/Marlin/Marlin/src/pins/ramps/pins_ULTIMAKER.h b/Marlin/Marlin/src/pins/ramps/pins_ULTIMAKER.h
index 0bc04d96..e3e91428 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_ULTIMAKER.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_ULTIMAKER.h
@@ -23,6 +23,7 @@
/**
* Ultimaker pin assignments
+ * ATmega2560, ATmega1280
*/
/**
diff --git a/Marlin/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h b/Marlin/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h
index 146c519f..25cc278a 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h
@@ -23,6 +23,9 @@
/**
* Ultimaker pin assignments (Old electronics)
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%201.0/ultipanel%20rev1.1.sch.pdf
+ * Origin: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/Ultimaker%201.0/ultipanel%20rev1.1.sch.pdf
+ * ATmega2560, ATmega1280
*/
/**
diff --git a/Marlin/Marlin/src/pins/ramps/pins_VORON.h b/Marlin/Marlin/src/pins/ramps/pins_VORON.h
index 93903810..f56b0cb8 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_VORON.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_VORON.h
@@ -24,6 +24,7 @@
/**
* VORON Design v2 pin assignments
* See https://github.com/mzbotreprap/VORON/blob/master/Firmware/Marlin/pins_RAMPS_VORON.h
+ * ATmega2560
*/
#define BOARD_INFO_NAME "VORON Design v2"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_ZRIB_V20.h b/Marlin/Marlin/src/pins/ramps/pins_ZRIB_V20.h
index 3e236e36..127fffa7 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_ZRIB_V20.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_ZRIB_V20.h
@@ -22,8 +22,13 @@
#pragma once
/**
- * ZRIB V2.0 & V3.0 pin assignments
+ * ZONESTAR ZRIB V2.0 & V3.0 pin assignments
* V2 and V3 Boards only differ in USB controller, nothing affecting the pins.
+ * Schematic (2.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/ZONESTAR%20ZRIB%20V2.0/ZRIB_V2_Schematic.pdf
+ * Origin (2.0): https://github.com/ZONESTAR3D/Control-Board/blob/main/8bit/ZRIB/ZRIB_V2/ZRIB_V2_Schematic.pdf
+ * Schematic (3.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/ZONESTAR%20ZRIB%20V3.0/ZRIB_V3_Schematic.pdf
+ * Origin (3.0): https://github.com/ZONESTAR3D/Control-Board/blob/main/8bit/ZRIB/ZRIB_V3/ZRIB_V3_Schematic.pdf
+ * ATmega2560, ATmega1280
*/
#ifndef FILWIDTH_PIN
diff --git a/Marlin/Marlin/src/pins/ramps/pins_ZRIB_V52.h b/Marlin/Marlin/src/pins/ramps/pins_ZRIB_V52.h
index 44e0beaa..34eee07c 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_ZRIB_V52.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_ZRIB_V52.h
@@ -22,7 +22,10 @@
#pragma once
/**
- * ZRIB V5.2 Based on MKS BASE v1.4 with A4982 stepper drivers and digital micro-stepping
+ * ZONESTAR ZRIB V5.2 Based on MKS BASE v1.4 with A4982 stepper drivers and digital micro-stepping
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/RAMPS/ZONESTAR%20ZRIB%20V5.2/ZRIB_V52_Schematic.pdf
+ * Origin: https://github.com/ZONESTAR3D/Control-Board/blob/main/8bit/ZRIB/ZRIB_V5/ZRIB_V52_Schematic.pdf
+ * ATmega2560, ATmega1280
*/
#if HOTENDS > 2 || E_STEPPERS > 2
diff --git a/Marlin/Marlin/src/pins/ramps/pins_ZRIB_V53.h b/Marlin/Marlin/src/pins/ramps/pins_ZRIB_V53.h
index 7a5cf147..05051679 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_ZRIB_V53.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_ZRIB_V53.h
@@ -22,7 +22,8 @@
#pragma once
/**
- * ZRIB V5.3 Based on MKS BASE v1.4 with A4982 stepper drivers and digital micro-stepping
+ * ZONESTAR ZRIB V5.3 Based on MKS BASE v1.4 with A4982 stepper drivers and digital micro-stepping
+ * ATmega2560, ATmega1280
*/
#include "env_validate.h"
diff --git a/Marlin/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h b/Marlin/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h
index b68e3edb..69fa55f0 100644
--- a/Marlin/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h
+++ b/Marlin/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h
@@ -23,6 +23,7 @@
/**
* Z-Bolt X Series board â based on Arduino Mega2560
+ * ATmega2560
*/
#define REQUIRE_MEGA2560
diff --git a/Marlin/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/Marlin/src/pins/sam/pins_RURAMPS4D_11.h
index f8ea65a3..35279bf2 100644
--- a/Marlin/Marlin/src/pins/sam/pins_RURAMPS4D_11.h
+++ b/Marlin/Marlin/src/pins/sam/pins_RURAMPS4D_11.h
@@ -163,11 +163,13 @@
#define TFT_LCD_MODULE_COM 1
#define TFT_LCD_MODULE_BAUDRATE 115600
-// ESP WiFi Use internal USART-2
-#define ESP_WIFI_MODULE_COM 2
-#define ESP_WIFI_MODULE_BAUDRATE 115600
-#define ESP_WIFI_MODULE_RESET_PIN -1
-#define PIGGY_GPIO_PIN -1
+#if ENABLED(WIFISUPPORT)
+ // ESP WiFi Use internal USART-2
+ #define ESP_WIFI_MODULE_COM 2
+ #define ESP_WIFI_MODULE_BAUDRATE 115600
+ #define ESP_WIFI_MODULE_RESET_PIN -1
+ #define PIGGY_GPIO_PIN -1
+#endif
//
// EEPROM
diff --git a/Marlin/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/Marlin/src/pins/sam/pins_RURAMPS4D_13.h
index 58cb3f7a..78cf3f6e 100644
--- a/Marlin/Marlin/src/pins/sam/pins_RURAMPS4D_13.h
+++ b/Marlin/Marlin/src/pins/sam/pins_RURAMPS4D_13.h
@@ -153,11 +153,13 @@
#define TFT_LCD_MODULE_COM 1
#define TFT_LCD_MODULE_BAUDRATE 115200
-// ESP WiFi Use internal USART-2
-#define ESP_WIFI_MODULE_COM 2
-#define ESP_WIFI_MODULE_BAUDRATE 115200
-#define ESP_WIFI_MODULE_RESET_PIN -1
-#define PIGGY_GPIO_PIN -1
+#if ENABLED(WIFISUPPORT)
+ // ESP WiFi Use internal USART-2
+ #define ESP_WIFI_MODULE_COM 2
+ #define ESP_WIFI_MODULE_BAUDRATE 115200
+ #define ESP_WIFI_MODULE_RESET_PIN -1
+ #define PIGGY_GPIO_PIN -1
+#endif
//
// EEPROM
diff --git a/Marlin/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h b/Marlin/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h
index fd30c2b6..616f47f8 100644
--- a/Marlin/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h
+++ b/Marlin/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h
@@ -153,7 +153,7 @@
#define TEMP_0_CS_PIN 65
#define TEMP_1_CS_PIN 52
#define TEMP_2_CS_PIN 50
-#define TEMP_3_CS_PIN 51
+#define TEMP_3_CS_PIN 51 // Not yet supported
#define ENC424_SS 61
diff --git a/Marlin/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h b/Marlin/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h
index a3f98e38..9901b78c 100644
--- a/Marlin/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h
+++ b/Marlin/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h
@@ -203,10 +203,10 @@
* This section starts with the pins_RAMPS_144.h as example, after if you need any new
* display, you could use normal duponts and connect it with with the scheme showed before.
* Tested:
- * - Ender 3 Old display (Character LCD)
- * - Ender 3 New Serial DWING Display
+ * - Ender-3 Old display (Character LCD)
+ * - Ender-3 New Serial DWING Display
* - Reprap Display
- * - Ender 5 New Serial Display
+ * - Ender-5 New Serial Display
* - Any Reprap character display like
*/
diff --git a/Marlin/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h b/Marlin/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h
index 2343dbcf..1c739267 100644
--- a/Marlin/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h
+++ b/Marlin/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h
@@ -255,10 +255,10 @@
* This sections starts with the pins_RAMPS_144.h as example, after if you need any new
* display, you could use normal duponts and connect it with with the scheme showed before.
* Tested:
- * - Ender 3 Old display (Character LCD)
- * - Ender 3 New Serial DWING Display
+ * - Ender-3 Old display (Character LCD)
+ * - Ender-3 New Serial DWING Display
* - Reprap Display
- * - Ender 5 New Serial Display
+ * - Ender-5 New Serial Display
* - Any Reprap character display like
*/
diff --git a/Marlin/Marlin/src/pins/samd/pins_MINITRONICS20.h b/Marlin/Marlin/src/pins/samd/pins_MINITRONICS20.h
index 02d806b3..ed83c835 100644
--- a/Marlin/Marlin/src/pins/samd/pins_MINITRONICS20.h
+++ b/Marlin/Marlin/src/pins/samd/pins_MINITRONICS20.h
@@ -174,10 +174,10 @@
* This sections starts with the pins_RAMPS_144.h as example, after if you need any new
* display, you could use normal duponts and connect it with with the scheme showed before.
* Tested:
- * - Ender 3 Old display (Character LCD)
- * - Ender 3 New Serial DWING Display
+ * - Ender-3 Old display (Character LCD)
+ * - Ender-3 New Serial DWING Display
* - Reprap Display
- * - Ender 5 New Serial Display
+ * - Ender-5 New Serial Display
* - Any Reprap character display like
*/
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/Marlin/src/pins/sanguino/pins_ANET_10.h
index bd69e167..f6816bfb 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_ANET_10.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_ANET_10.h
@@ -23,6 +23,8 @@
/**
* Anet V1.0 board pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Anet%20V1.0/ANET3D_Board_Schematic.pdf
+ * Origin: https://github.com/ralf-e/ANET-3D-Board-V1.0/blob/master/ANET3D_Board_Schematic.pdf
*/
/**
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h b/Marlin/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h
index 4c721da0..76d53c60 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h
@@ -23,6 +23,8 @@
/**
* Azteeg X1 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Azteeg%20X1/Azteeg_X1_schematics.pdf
+ * Origin: https://reprap.org/mediawiki/images/0/07/Azteeg_X1_schematics.pdf
*/
#define BOARD_INFO_NAME "Azteeg X1"
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h b/Marlin/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h
index 1343739a..a5afc301 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h
@@ -23,6 +23,7 @@
/**
* Gen3 Monolithic Electronics pin assignments
+ * https://reprap.org/wiki/Generation_3_Electronics
*/
/**
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_GEN6.h b/Marlin/Marlin/src/pins/sanguino/pins_GEN6.h
index 51e8200b..75138845 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_GEN6.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_GEN6.h
@@ -23,6 +23,8 @@
/**
* Gen6 pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen6/GEN6_Mendel_Circuit.pdf
+ * Origin: https://reprap.org/mediawiki/images/0/0f/GEN6_Mendel_Circuit.pdf
*/
/**
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_GEN7_12.h b/Marlin/Marlin/src/pins/sanguino/pins_GEN7_12.h
index 0834da78..ade59fd8 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_GEN7_12.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_GEN7_12.h
@@ -23,6 +23,14 @@
/**
* Gen7 v1.1, v1.2, v1.3 pin assignments
+ * Schematic (1.1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen7%20v1.1/Gen7Board%20Schematic.pdf
+ * Origin (1.1): https://github.com/Traumflug/Generation_7_Electronics/blob/release-1.1/release%20documents/Gen7Board%20Schematic.pdf
+ * Schematic (1.2): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen7%20v1.2/Gen7Board%20Schematic.pdf
+ * Origin (1.2): https://github.com/Traumflug/Generation_7_Electronics/blob/release-1.2/release%20documents/Gen7Board%20Schematic.pdf
+ * Schematic (1.3): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen7%20v1.3/Gen7Board%20Schematic.pdf
+ * Origin (1.3): https://github.com/Traumflug/Generation_7_Electronics/blob/release-1.3/release%20documents/Gen7Board%20Schematic.pdf
+ * Schematic (1.3.1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen7%20v1.3.1/Gen7Board%20Schematic.pdf
+ * Origin (1.3.1): https://github.com/Traumflug/Generation_7_Electronics/blob/release-1.3.1/release%20documents/Gen7Board%20Schematic.pdf
*/
/**
@@ -54,7 +62,7 @@
#include "env_validate.h"
#ifndef BOARD_INFO_NAME
- #define BOARD_INFO_NAME "Gen7 v1.1 / 1.2"
+ #define BOARD_INFO_NAME "Gen7 v1.1 - v1.3"
#endif
#ifndef GEN7_VERSION
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_GEN7_14.h b/Marlin/Marlin/src/pins/sanguino/pins_GEN7_14.h
index 97bfdd28..698bd066 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_GEN7_14.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_GEN7_14.h
@@ -23,6 +23,10 @@
/**
* Gen7 v1.4 pin assignments
+ * Schematic (1.4): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen7%20v1.4/Gen7Board%201.4%20Schematic.pdf
+ * Origin (1.4): https://github.com/Traumflug/Generation_7_Electronics/blob/Gen7Board-1.4/release%20documents/Gen7Board%201.4%20Schematic.pdf
+ * Schematic (1.4.1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Gen7%20v1.4.1/Gen7Board%201.4.1%20Schematic.pdf
+ * Origin (1.4.1): https://github.com/Traumflug/Generation_7_Electronics/blob/Gen7Board-1.4.1/release%20documents/Gen7Board%201.4.1%20Schematic.pdf
*/
/**
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_MELZI.h b/Marlin/Marlin/src/pins/sanguino/pins_MELZI.h
index d6f9288e..be1b7934 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_MELZI.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_MELZI.h
@@ -23,6 +23,8 @@
/**
* Melzi pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Melzi/schematic.pdf
+ * Origin: https://github.com/mosfet/melzi/blob/master/melzi.sch
*/
#ifndef BOARD_INFO_NAME
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
index f508093c..a61692c9 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
@@ -23,6 +23,9 @@
/**
* Melzi (Creality) pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Melzi%20(Creality)/CR-10%20Schematic.pdf
+ * Origin: https://github.com/Creality3DPrinting/CR10-Melzi-1.1.2/blob/master/Circuit%20diagram/Motherboard/CR-10%20Schematic.pdf
+ * ATmega1284P
*
* The Creality board needs a bootloader installed before Marlin can be uploaded.
* If you don't have a chip programmer you can use a spare Arduino plus a few
@@ -43,13 +46,20 @@
#endif
//
-// For the stock CR-10 enable CR10_STOCKDISPLAY in Configuration.h
+// LCD / Controller
//
-#if ENABLED(CR10_STOCKDISPLAY)
- #define LCD_SDSS 31 // Smart Controller SD card reader (rather than the Melzi)
- #define LCD_PINS_RS 28 // ST9720 CS
- #define LCD_PINS_ENABLE 17 // ST9720 DAT
- #define LCD_PINS_D4 30 // ST9720 CLK
+#if ANY(MKS_MINI_12864, CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY)
+ #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY)
+ #define LCD_PINS_RS 28 // ST9720 CS
+ #define LCD_PINS_ENABLE 17 // ST9720 DAT
+ #define LCD_PINS_D4 30 // ST9720 CLK
+ #endif
+ #if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
+ #define DOGLCD_CS 28
+ #define DOGLCD_A0 30
+ #endif
+
+ #define LCD_SDSS 31 // Controller's SD card
#define BTN_ENC 16
#define BTN_EN1 11
@@ -57,6 +67,7 @@
#define BEEPER_PIN 27
#define LCD_PINS_DEFINED
+
#endif
#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h b/Marlin/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h
index d6f36cc6..00c9db6f 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h
@@ -23,6 +23,7 @@
/**
* Melzi (Malyan M150) pin assignments
+ * ATmega644P, ATmega1284P
*/
#define BOARD_INFO_NAME "Melzi (Malyan)"
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h b/Marlin/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h
index aecad10d..da010ab1 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h
@@ -23,6 +23,7 @@
/**
* Melzi pin assignments
+ * ATmega644P, ATmega1284P
*/
#define BOARD_INFO_NAME "Melzi (Tronxy)"
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_MELZI_V2.h b/Marlin/Marlin/src/pins/sanguino/pins_MELZI_V2.h
index e49eb57b..2cd949e0 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_MELZI_V2.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_MELZI_V2.h
@@ -23,6 +23,8 @@
/**
* Melzi V2.0 as found at https://www.reprap.org/wiki/Melzi
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Melzi%20V2/Melzi-circuit.png
+ * Origin: https://www.reprap.org/mediawiki/images/7/7d/Melzi-circuit.png
*/
#define BOARD_INFO_NAME "Melzi V2"
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h
index 3b6297ba..a9e40b2b 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h
@@ -23,6 +23,16 @@
/**
* Sanguinololu board pin assignments
+ * Schematic (0.1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v0.1/schematic.png
+ * Origin (0.1): https://github.com/mosfet/Sanguinololu/blob/master/rev0.1/sanguinololu.sch
+ * Schematic (0.6): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v0.6/schematic.jpg
+ * Origin (0.6): https://github.com/mosfet/Sanguinololu/blob/master/rev0.6/images/schematic.jpg
+ * Schematic (0.7): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v0.7/schematic.jpg
+ * Origin (0.7): https://github.com/mosfet/Sanguinololu/blob/master/rev0.7/images/schematic.jpg
+ * Schematic (1.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v1.0/Sanguinololu-schematic.jpg
+ * Origin (1.0): https://reprap.org/wiki/File:Sanguinololu-schematic.jpg
+ * Schematic (1.1): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v1.1/schematic.png
+ * Origin (1.1): https://github.com/mosfet/Sanguinololu/blob/master/rev1.1/sanguinololu.sch
*/
/**
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h b/Marlin/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h
index ec7621e2..22095692 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_12.h
@@ -23,6 +23,12 @@
/**
* Sanguinololu V1.2 pin assignments
+ * Schematic (1.2): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v1.2/schematic.png
+ * Origin (1.2): https://github.com/mosfet/Sanguinololu/blob/master/rev1.2/sanguinololu.sch
+ * Schematic (1.3): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v1.3/schematic.png
+ * Origin (1.3): https://github.com/mosfet/Sanguinololu/blob/master/rev1.3/sanguinololu.sch
+ * Schematic (1.3a): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Sanguinololu%20v1.3a/schematic.png
+ * Origin (1.3a): https://github.com/mosfet/Sanguinololu/blob/master/rev1.3a/sanguinololu.sch
*
* Applies to the following boards:
*
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_STB_11.h b/Marlin/Marlin/src/pins/sanguino/pins_STB_11.h
index ad0919e9..1bda25b3 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_STB_11.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_STB_11.h
@@ -22,7 +22,8 @@
#pragma once
/**
- * STB V1.1 pin assignments
+ * STB Electronics V1.1 pin assignments
+ * https://www.reprap.org/wiki/STB_Electronics
*/
#define BOARD_INFO_NAME "STB V1.1"
diff --git a/Marlin/Marlin/src/pins/sanguino/pins_ZMIB_V2.h b/Marlin/Marlin/src/pins/sanguino/pins_ZMIB_V2.h
index aa3ce556..bd9230c3 100644
--- a/Marlin/Marlin/src/pins/sanguino/pins_ZMIB_V2.h
+++ b/Marlin/Marlin/src/pins/sanguino/pins_ZMIB_V2.h
@@ -31,6 +31,8 @@
/**
* ZMIB pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/ZONESTAR%20ZMIB%20V2/ZMIB_V2_Schmatic.pdf
+ * Origin: https://github.com/ZONESTAR3D/Control-Board/blob/main/8bit/ZMIB/ZMIB%20V2/ZMIB_V2_Schmatic.pdf
*
* The ZMIB board needs a bootloader installed before Marlin can be uploaded.
* If you don't have a chip programmer you can use a spare Arduino plus a few
diff --git a/Marlin/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h
index 8ed09417..5770f4a5 100644
--- a/Marlin/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h
+++ b/Marlin/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h
@@ -163,8 +163,8 @@
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN EXP1_01_PIN
- #define BTN_ENC EXP1_02_PIN
+ #define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
@@ -172,6 +172,37 @@
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
+ #elif ENABLED(LCD_FOR_MELZI)
+
+ #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
+ #error "CAUTION! LCD for Melzi v4 display requires a custom cable. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
+ #endif
+
+ /**
+ * LCD for Melzi v4 needs a custom cable with reversed GND/5V pins; plugging in a standard cable may damage the board or LCD!
+ * 1. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
+ * 2. Swap pin 4 on the Melzi LCD to pin 7 on the SKR Mini E3 EXP1 connector (pin 4 on the SKR is a RESET and cannot be used)
+ *
+ * LCD for Melzi V4 SKR Mini E3 V2.0
+ * ------ ------
+ * LCD RS | 1 2 | EN1 LCD RS | 1 2 | EN1
+ * LCD EN | 3 4 | EN2 LCD EN | 3 4 | OPEN (RESET)
+ * LCD D4 | 5 6 | ENC LCD D4 | 5 6 | ENC
+ * E-Stop | 7 8 | BEEP EN2 | 7 8 | BEEP
+ * 5V | 9 10 | GND GND | 9 10 | 5V
+ * ------ ------
+ * EXP1 EXP1
+ */
+ #define BEEPER_PIN EXP1_08_PIN
+
+ #define BTN_ENC EXP1_06_PIN
+ #define BTN_EN1 EXP1_02_PIN
+ #define BTN_EN2 EXP1_07_PIN
+
+ #define LCD_PINS_RS EXP1_01_PIN
+ #define LCD_PINS_ENABLE EXP1_03_PIN
+ #define LCD_PINS_D4 EXP1_05_PIN
+
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
@@ -284,8 +315,8 @@
* EXP1-2 ----------- EXP1-9 ENC
* EXP1-1 ----------- EXP1-7 LCD_A0
*
- * TFT-2 ----------- EXP2-5 SCK
- * TFT-3 ----------- EXP2-9 MOSI
+ * TFT-2 ----------- EXP2-5 MOSI
+ * TFT-3 ----------- EXP2-9 SCK
*
* for backlight configuration see steps 2 (V2.1) and 3 in https://wiki.fysetc.com/Mini12864_Panel/
*/
@@ -306,7 +337,7 @@
#define FORCE_SOFT_SPI
#else
- #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, TFTGLCD_PANEL_(SPI|I2C), FYSETC_MINI_12864_2_1, MKS_MINI_12864_V3, and BTT_MINI_12864_V1 are currently supported on the BIGTREE_SKR_MINI_E3."
+ #error "Only CR10_STOCKDISPLAY, LCD_FOR_MELZI, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, TFTGLCD_PANEL_(SPI|I2C), FYSETC_MINI_12864_2_1, MKS_MINI_12864_V3, and BTT_MINI_12864_V1 are currently supported on the BIGTREE_SKR_MINI_E3."
#endif
#endif // HAS_WIRED_LCD
diff --git a/Marlin/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h b/Marlin/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h
index 89e07d6a..02daab3e 100644
--- a/Marlin/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h
+++ b/Marlin/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h
@@ -33,4 +33,55 @@
#define FIL_RUNOUT2_PIN PF13
#endif
+#ifndef Z_MIN_PROBE_PIN
+ #define Z_MIN_PROBE_PIN PG9
+#endif
+
#include "pins_CHITU3D_common.h"
+
+/*
+ * Circuit diagram https://github.com/MarlinFirmware/Marlin/files/3401484/x5sa-main_board-2.pdf
+ *
+ * Details on the 30 pin ribbon pins. From: https://3dtoday.ru/blogs/artem-sr/tronxy-x5sa-pro-ustanovka-bfp-touch-na-board-chitu3d-v6-cxy-v6-191017
+ *
+ * JP2 Ribbon 30 on CXY-V6-191017
+ * ----------------------------------------------
+ * | 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30|
+ * | 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29|
+ * ---------------------- ----------------------
+ *
+ * --------------------------------------------------------------------------------------
+ * | Pin | Label | Function & Notes |
+ * --------------------------------------------------------------------------------------
+ * | 1 | Hotend | Hotend driver Q6 HY1403 via MCU Pin127 PG12 |
+ * | 2 | Hotend | Hotend driver Q6 HY1403 via MCU Pin127 PG12 |
+ * | 3 | Hotend | Hotend driver Q6 HY1403 via MCU Pin127 PG12 |
+ * | 4 | Hotend | Hotend driver Q6 HY1403 via MCU Pin127 PG12 |
+ * | 5 | +24v | Hotend +24v |
+ * | 6 | +24v | Hotend +24v |
+ * | 7 | +24v | Hotend +24v |
+ * | 8 | +24v | Hotend +24v |
+ * | 9 | F_2 | Extruder Fan2 driver Q8 AO3400A X07S via MCU Pin129 PG14 |
+ * | 10 | +24v | Extruder cooling Fan2 +24v |
+ * | 11 | F_1 | Part Fan1 driver Q7 AO3400A X07S via MCU Pin128 PG13 |
+ * | 12 | +24v | Part cooling Fanl +24v |
+ * | 13 | 1B | X-MOTOR Winding Drive |
+ * | 14 | 1A | X-MOTOR Winding Drive |
+ * | 15 | 2B | X-MOTOR Winding Drive |
+ * | 16 | 2A | X-MOTOR Winding Drive |
+ * | 17 | lA | El-Motor Winding Drive |
+ * | 18 | 1B | El-Motor Winding Drive |
+ * | 19 | 2B | El-Motor Winding Drive |
+ * | 20 | 2A | El-Motor Winding Drive |
+ * | 21 | PROXIMITY | 10kΩ Pullup to +5V and 100nF to GND, then 20kΩ to MCU Pin124 PG9 |
+ * | 22 | +24v | Proximity sensor +24v |
+ * | 23 | +5V | Filament sensor +5V XSTOP sensor +5V |
+ * | 24 | GND | Proximity sensor GND |
+ * | 25 | FILAMENT1 | 10kΩ Pullup to +5V and 100nF to GND, then 47kΩ to MCU Pin110 PA15|
+ * | 26 | GND | Filament Sensor GND |
+ * | 27 | XSTOP | 10kΩ Pullup to +5V and 100nF to GND, then 47kΩ to MCU Pin125 PG10|
+ * | 28 | GND | XSTOP sensor GND |
+ * | 29 | GND | Extruder temperature NTC sensor return GND |
+ * | 30 | ETEMP | 4k7Ω Pullup to +3V3 and 100nF to GND, then 4k7Ω to MCU Pin35 PA1 |
+ * --------------------------------------------------------------------------------------
+ */
diff --git a/Marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h b/Marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h
index 0d2ad835..f7a73de2 100644
--- a/Marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h
+++ b/Marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h
@@ -22,7 +22,7 @@
#pragma once
/**
- * Creality v2.4.S1 (STM32F103RE / STM32F103RC) v101 as found in the Ender 7
+ * Creality v2.4.S1 (STM32F103RE / STM32F103RC) v101 as found in the Ender-7
*/
#define BOARD_INFO_NAME "Creality v2.4.S1 V101"
diff --git a/Marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h b/Marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h
index 53953f9e..b7ea2072 100644
--- a/Marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h
+++ b/Marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h
@@ -22,7 +22,7 @@
#pragma once
/**
- * Creality V24S1_301 (STM32F103RE / STM32F103RC) board pin assignments as found on Ender 3 S1.
+ * Creality V24S1_301 (STM32F103RE / STM32F103RC) board pin assignments as found on Ender-3 S1.
* Also supports the STM32F4 version of the board with identical pin mapping.
*/
@@ -40,7 +40,7 @@
#define BOARD_INFO_NAME "Creality V24S1-301"
#endif
#ifndef DEFAULT_MACHINE_NAME
- #define DEFAULT_MACHINE_NAME "Ender 3 S1"
+ #define DEFAULT_MACHINE_NAME "Ender-3 S1"
#endif
//
diff --git a/Marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
index f633ee09..c5125aaf 100644
--- a/Marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
+++ b/Marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
@@ -35,7 +35,7 @@
#define BOARD_INFO_NAME "Creality V4"
#endif
#ifndef DEFAULT_MACHINE_NAME
- #define DEFAULT_MACHINE_NAME "Ender 3 V2"
+ #define DEFAULT_MACHINE_NAME "Ender-3 V2"
#endif
#define BOARD_NO_NATIVE_USB
@@ -53,6 +53,7 @@
#if NO_EEPROM_SELECTED
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
//#define SDCARD_EEPROM_EMULATION
+ #undef NO_EEPROM_SELECTED
#endif
#if ENABLED(IIC_BL24CXX_EEPROM)
diff --git a/Marlin/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h
index ff588f94..c6b65962 100644
--- a/Marlin/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h
+++ b/Marlin/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h
@@ -138,27 +138,29 @@
#define DEFAULT_PWM_MOTOR_CURRENT { 800, 800, 800 }
#endif
- /**
- * MKS Robin_Wifi or another ESP8266 module
- *
- * __ESP(M1)__ -J1-
- * GND| 15 | | 08 |+3v3 (22) RXD1 (PA10)
- * | 16 | | 07 |MOSI (21) TXD1 (PA9) Active LOW, probably OK to leave floating
- * IO2| 17 | | 06 |MISO (19) IO1 (PC7) Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating)
- * IO0| 18 | | 05 |CLK (18) IO0 (PA8) Must be HIGH (ESP3D software configures this with a pullup so OK to leave as floating)
- * IO1| 19 | | 03 |EN (03) WIFI_EN Must be HIGH for module to run
- * | nc | | nc | (01) WIFI_CTRL (PA5)
- * RX| 21 | | nc |
- * TX| 22 | | 01 |RST
- *  ̄ ̄ AE ̄ ̄
- */
- // Module ESP-WIFI
- #define ESP_WIFI_MODULE_COM 2 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
- #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
- #define ESP_WIFI_MODULE_RESET_PIN PA5 // WIFI CTRL/RST
- #define ESP_WIFI_MODULE_ENABLE_PIN -1
- #define ESP_WIFI_MODULE_TXD_PIN PA9 // MKS or ESP WIFI RX PIN
- #define ESP_WIFI_MODULE_RXD_PIN PA10 // MKS or ESP WIFI TX PIN
+ #if ENABLED(WIFISUPPORT)
+ /**
+ * MKS Robin_Wifi or another ESP8266 module
+ *
+ * __ESP(M1)__ -J1-
+ * GND| 15 | | 08 |+3v3 (22) RXD1 (PA10)
+ * | 16 | | 07 |MOSI (21) TXD1 (PA9) Active LOW, probably OK to leave floating
+ * IO2| 17 | | 06 |MISO (19) IO1 (PC7) Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating)
+ * IO0| 18 | | 05 |CLK (18) IO0 (PA8) Must be HIGH (ESP3D software configures this with a pullup so OK to leave as floating)
+ * IO1| 19 | | 03 |EN (03) WIFI_EN Must be HIGH for module to run
+ * | nc | | nc | (01) WIFI_CTRL (PA5)
+ * RX| 21 | | nc |
+ * TX| 22 | | 01 |RST
+ *  ̄ ̄ AE ̄ ̄
+ */
+ // Module ESP-WIFI
+ #define ESP_WIFI_MODULE_COM 2 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
+ #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
+ #define ESP_WIFI_MODULE_RESET_PIN PA5 // WIFI CTRL/RST
+ #define ESP_WIFI_MODULE_ENABLE_PIN -1
+ #define ESP_WIFI_MODULE_TXD_PIN PA9 // MKS or ESP WIFI RX PIN
+ #define ESP_WIFI_MODULE_RXD_PIN PA10 // MKS or ESP WIFI TX PIN
+ #endif
#endif
//
diff --git a/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h b/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h
index 5515132c..24981cda 100644
--- a/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h
+++ b/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h
@@ -226,10 +226,11 @@
#define SDSS SD_SS_PIN
-//
-// ESP WiFi can be soldered to J9 connector which is wired to USART2.
-// Must define WIFISUPPORT in Configuration.h for the printer.
-//
-#define ESP_WIFI_MODULE_COM 2
-#define ESP_WIFI_MODULE_BAUDRATE 115200
-#define ESP_WIFI_MODULE_RESET_PIN -1
+#if ENABLED(WIFISUPPORT)
+ //
+ // ESP WiFi can be soldered to J9 connector which is wired to USART2.
+ //
+ #define ESP_WIFI_MODULE_COM 2
+ #define ESP_WIFI_MODULE_BAUDRATE 115200
+ #define ESP_WIFI_MODULE_RESET_PIN -1
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h b/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h
index dc23680b..cbe23356 100644
--- a/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h
+++ b/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h
@@ -220,10 +220,11 @@
#define SDSS SD_SS_PIN
-//
-// ESP WiFi can be soldered to J9 connector which is wired to USART2.
-// Must define WIFISUPPORT in Configuration.h for the printer.
-//
-#define ESP_WIFI_MODULE_COM 2
-#define ESP_WIFI_MODULE_BAUDRATE 115200
-#define ESP_WIFI_MODULE_RESET_PIN -1
+#if ENABLED(WIFISUPPORT)
+ //
+ // ESP WiFi can be soldered to J9 connector which is wired to USART2.
+ //
+ #define ESP_WIFI_MODULE_COM 2
+ #define ESP_WIFI_MODULE_BAUDRATE 115200
+ #define ESP_WIFI_MODULE_RESET_PIN -1
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h b/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h
index 646638da..1418340d 100644
--- a/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h
+++ b/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h
@@ -231,10 +231,11 @@
#define SDSS SD_SS_PIN
-//
-// ESP WiFi can be soldered to J9 connector which is wired to USART2.
-// Must define WIFISUPPORT in Configuration.h for the printer.
-//
-#define ESP_WIFI_MODULE_COM 2
-#define ESP_WIFI_MODULE_BAUDRATE 115200
-#define ESP_WIFI_MODULE_RESET_PIN -1
+#if ENABLED(WIFISUPPORT)
+ //
+ // ESP WiFi can be soldered to J9 connector which is wired to USART2.
+ //
+ #define ESP_WIFI_MODULE_COM 2
+ #define ESP_WIFI_MODULE_BAUDRATE 115200
+ #define ESP_WIFI_MODULE_RESET_PIN -1
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h b/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h
index 968d9cb6..22ff91ae 100644
--- a/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h
+++ b/Marlin/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h
@@ -223,10 +223,11 @@
#define SDSS SD_SS_PIN
-//
-// ESP WiFi can be soldered to J9 connector which is wired to USART2.
-// Must define WIFISUPPORT in Configuration.h for the printer.
-//
-#define ESP_WIFI_MODULE_COM 2
-#define ESP_WIFI_MODULE_BAUDRATE 115200
-#define ESP_WIFI_MODULE_RESET_PIN -1
+#if ENABLED(WIFISUPPORT)
+ //
+ // ESP WiFi can be soldered to J9 connector which is wired to USART2.
+ //
+ #define ESP_WIFI_MODULE_COM 2
+ #define ESP_WIFI_MODULE_BAUDRATE 115200
+ #define ESP_WIFI_MODULE_RESET_PIN -1
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h b/Marlin/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h
new file mode 100644
index 00000000..67b2944f
--- /dev/null
+++ b/Marlin/Marlin/src/pins/stm32f1/pins_SOVOL_V131.h
@@ -0,0 +1,236 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Sovol 1.3.1 (GD32F103RET6) board pin assignments
+ */
+
+#include "env_validate.h"
+
+#if HOTENDS > 1 || E_STEPPERS > 1
+ #error "SOVOL V131 only supports 1 hotend / E-stepper."
+#endif
+
+#ifndef BOARD_INFO_NAME
+ #define BOARD_INFO_NAME "Sovol V131"
+#endif
+#ifndef DEFAULT_MACHINE_NAME
+ #define DEFAULT_MACHINE_NAME "Sovol SV06"
+#endif
+
+//#define BOARD_NO_NATIVE_USB
+
+//
+// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
+//
+#ifndef DISABLE_DEBUG
+ #define DISABLE_DEBUG
+#endif
+
+//
+// EEPROM
+//
+#if NO_EEPROM_SELECTED
+ #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
+ //#define SDCARD_EEPROM_EMULATION
+ #undef NO_EEPROM_SELECTED
+#endif
+
+#if ENABLED(IIC_BL24CXX_EEPROM)
+ #define IIC_EEPROM_SDA PA11
+ #define IIC_EEPROM_SCL PA12
+ #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16)
+#elif ENABLED(SDCARD_EEPROM_EMULATION)
+ #define MARLIN_EEPROM_SIZE 0x800 // 2K
+#endif
+
+//
+// Servos
+//
+#ifndef SERVO0_PIN
+ #ifndef HAS_PIN_27_BOARD
+ #define SERVO0_PIN PB0 // BLTouch OUT
+ #else
+ #define SERVO0_PIN PC6
+ #endif
+#endif
+
+//
+// Limit Switches
+//
+#ifndef X_STOP_PIN
+ #define X_STOP_PIN PA5
+#endif
+#ifndef Y_STOP_PIN
+ #define Y_STOP_PIN PA6
+#endif
+#ifndef Z_STOP_PIN
+ #define Z_STOP_PIN PA7
+#endif
+
+#ifndef Z_MIN_PROBE_PIN
+ #define Z_MIN_PROBE_PIN PB1 // BLTouch IN
+#endif
+
+//
+// Filament Runout Sensor
+//
+#ifndef FIL_RUNOUT_PIN
+ #define FIL_RUNOUT_PIN PA4 // "Pulled-high"
+#endif
+
+//
+// Steppers
+//
+#ifndef X_STEP_PIN
+ #define X_STEP_PIN PC2
+#endif
+#ifndef X_DIR_PIN
+ #define X_DIR_PIN PB9
+#endif
+#define X_ENABLE_PIN PC3 // Shared
+
+#ifndef Y_STEP_PIN
+ #define Y_STEP_PIN PB8
+#endif
+#ifndef Y_DIR_PIN
+ #define Y_DIR_PIN PB7
+#endif
+#define Y_ENABLE_PIN X_ENABLE_PIN
+
+#ifndef Z_STEP_PIN
+ #define Z_STEP_PIN PB6
+#endif
+#ifndef Z_DIR_PIN
+ #define Z_DIR_PIN PB5
+#endif
+#define Z_ENABLE_PIN X_ENABLE_PIN
+
+#ifndef E0_STEP_PIN
+ #define E0_STEP_PIN PB4
+#endif
+#ifndef E0_DIR_PIN
+ #define E0_DIR_PIN PB3
+#endif
+#define E0_ENABLE_PIN X_ENABLE_PIN
+
+#if HAS_TMC_UART
+
+ /**
+ * TMC2208/TMC2209 stepper drivers
+ *
+ * Hardware serial communication ports.
+ * If undefined software serial is used according to the pins below
+ */
+
+ #define X_SERIAL_TX_PIN PC1
+ #define X_SERIAL_RX_PIN PC1
+
+ #define Y_SERIAL_TX_PIN PC0
+ #define Y_SERIAL_RX_PIN PC0
+
+ #define Z_SERIAL_TX_PIN PA15
+ #define Z_SERIAL_RX_PIN PA15
+
+ #define E0_SERIAL_TX_PIN PC14
+ #define E0_SERIAL_RX_PIN PC14
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+
+#endif // HAS_TMC_UART
+
+//
+// Temperature Sensors
+//
+#define TEMP_0_PIN PC5 // TH1
+#define TEMP_BED_PIN PC4 // TB1
+
+//
+// Heaters / Fans
+//
+#ifndef HEATER_0_PIN
+ #define HEATER_0_PIN PA1 // HEATER1
+#endif
+#ifndef HEATER_BED_PIN
+ #define HEATER_BED_PIN PA2 // HOT BED
+#endif
+#ifndef FAN_PIN
+ #define FAN_PIN PA0 // FAN
+#endif
+#define FAN_SOFT_PWM_REQUIRED
+
+//
+// SD Card
+//
+#define SD_DETECT_PIN PC7
+#define SDCARD_CONNECTION ONBOARD
+#define ONBOARD_SPI_DEVICE 1
+#define ONBOARD_SD_CS_PIN PA4 // SDSS
+#define SDIO_SUPPORT
+#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
+
+#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
+ /**
+ * RET6 12864 LCD
+ * ------
+ * PC6 | 1 2 | PB2
+ * PB10 | 3 4 | PB11
+ * PB14 5 6 | PB13
+ * PB12 | 7 8 | PB15
+ * GND | 9 10 | 5V
+ * ------
+ */
+ #define EXP3_01_PIN PC6
+ #define EXP3_02_PIN PB2
+ #define EXP3_03_PIN PB10
+ #define EXP3_04_PIN PB11
+ #define EXP3_05_PIN PB14
+ #define EXP3_06_PIN PB13
+ #define EXP3_07_PIN PB12
+ #define EXP3_08_PIN PB15
+#endif
+
+#if ENABLED(CR10_STOCKDISPLAY)
+
+ #if ENABLED(RET6_12864_LCD)
+
+ #define LCD_PINS_RS EXP3_07_PIN
+ #define LCD_PINS_ENABLE EXP3_08_PIN
+ #define LCD_PINS_D4 EXP3_06_PIN
+
+ #define BTN_ENC EXP3_02_PIN
+ #define BTN_EN1 EXP3_03_PIN
+ #define BTN_EN2 EXP3_05_PIN
+
+ #ifndef HAS_PIN_27_BOARD
+ #define BEEPER_PIN EXP3_01_PIN
+ #endif
+
+ #else
+
+ #error "Only the RET6_12864_LCD variant of CR10_STOCKDISPLAY is supported."
+
+ #endif
+
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_ANET_ET4.h b/Marlin/Marlin/src/pins/stm32f4/pins_ANET_ET4.h
index 01ca4560..7c6eaca8 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_ANET_ET4.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_ANET_ET4.h
@@ -206,6 +206,7 @@
#if DISABLED(SDIO_SUPPORT)
#define SOFTWARE_SPI
#define SDSS PC11
+ #define SD_SS_PIN SDSS
#define SD_SCK_PIN PC12
#define SD_MISO_PIN PC8
#define SD_MOSI_PIN PD2
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h
index c29949e8..60e33d9d 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h
@@ -390,15 +390,16 @@
#error "SD CUSTOM_CABLE is not compatible with BTT E3 RRF."
#endif
-//
-// WIFI
-//
-
-#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
-#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
-#define ESP_WIFI_MODULE_RESET_PIN PA4
-#define ESP_WIFI_MODULE_ENABLE_PIN PA5
-#define ESP_WIFI_MODULE_GPIO0_PIN PA6
+#if ENABLED(WIFISUPPORT)
+ //
+ // WIFI
+ //
+ #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
+ #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
+ #define ESP_WIFI_MODULE_RESET_PIN PA4
+ #define ESP_WIFI_MODULE_ENABLE_PIN PA5
+ #define ESP_WIFI_MODULE_GPIO0_PIN PA6
+#endif
#if ENABLED(BTT_E3_RRF_IDEX_BOARD)
#define FPC2_PIN PB11
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
index b3d97ae0..8b061a43 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
@@ -27,13 +27,17 @@
#define USES_DIAG_JUMPERS
// Onboard I2C EEPROM
-#define I2C_EEPROM
-#define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32)
-#define I2C_SCL_PIN PB8
-#define I2C_SDA_PIN PB9
+#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM)
+ #undef NO_EEPROM_SELECTED
+ #define I2C_EEPROM
+ #define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32)
+ #define SOFT_I2C_EEPROM // Force the use of Software I2C
+ #define I2C_SCL_PIN PB8
+ #define I2C_SDA_PIN PB9
+#endif
// Avoid conflict with TIMER_TONE
-#define STEP_TIMER 10
+#define STEP_TIMER 8
//
// Servos
@@ -70,13 +74,13 @@
#if HAS_EXTRA_ENDSTOPS
#define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES
#if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_)
- #define NEEDS_X_MINMAX 1
+ #define NEEDS_X_MINMAX
#endif
#if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_)
- #define NEEDS_Y_MINMAX 1
+ #define NEEDS_Y_MINMAX
#endif
#if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_)
- #define NEEDS_Z_MINMAX 1
+ #define NEEDS_Z_MINMAX
#endif
#undef _ENDSTOP_IS_ANY
#endif
@@ -109,7 +113,7 @@
#else
#define Y_MIN_PIN E1_DIAG_PIN // E1DET
#endif
-#elif NEEDS_Y_MINMAX
+#elif ENABLED(NEEDS_Y_MINMAX)
#ifndef Y_MIN_PIN
#define Y_MIN_PIN Y_DIAG_PIN // Y-STOP
#endif
@@ -127,7 +131,7 @@
#else
#define Z_MIN_PIN E2_DIAG_PIN // PWRDET
#endif
-#elif NEEDS_Z_MINMAX
+#elif ENABLED(NEEDS_Z_MINMAX)
#ifndef Z_MIN_PIN
#define Z_MIN_PIN Z_DIAG_PIN // Z-STOP
#endif
@@ -138,10 +142,6 @@
#define Z_STOP_PIN Z_DIAG_PIN // Z-STOP
#endif
-#undef NEEDS_X_MINMAX
-#undef NEEDS_Y_MINMAX
-#undef NEEDS_Z_MINMAX
-
//
// Filament Runout Sensor
//
@@ -544,26 +544,28 @@
#define NEOPIXEL_PIN PB0
#endif
-//
-// WIFI
-//
+#if ENABLED(WIFISUPPORT)
+ //
+ // WIFI
+ //
-/**
- * -------
- * GND | 9 | | 8 | 3.3V
- * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI)
- * 3.3V | 11 | | 6 | PB14 (ESP-MISO)
- * (ESP-IO0) PD7 | 12 | | 5 | PB13 (ESP-CLK)
- * (ESP-IO4) PD10 | 13 | | 4 | --
- * -- | 14 | | 3 | PE15 (ESP-EN)
- * (ESP-RX) PD8 | 15 | | 2 | --
- * (ESP-TX) PD9 | 16 | | 1 | PE14 (ESP-RST)
- * -------
- * WIFI
- */
-#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
-#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
-#define ESP_WIFI_MODULE_RESET_PIN PG7
-#define ESP_WIFI_MODULE_ENABLE_PIN PG8
-#define ESP_WIFI_MODULE_GPIO0_PIN PD7
-#define ESP_WIFI_MODULE_GPIO4_PIN PD10
+ /**
+ * -------
+ * GND | 9 | | 8 | 3.3V
+ * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI)
+ * 3.3V | 11 | | 6 | PB14 (ESP-MISO)
+ * (ESP-IO0) PD7 | 12 | | 5 | PB13 (ESP-CLK)
+ * (ESP-IO4) PD10 | 13 | | 4 | --
+ * -- | 14 | | 3 | PE15 (ESP-EN)
+ * (ESP-RX) PD8 | 15 | | 2 | --
+ * (ESP-TX) PD9 | 16 | | 1 | PE14 (ESP-RST)
+ * -------
+ * WIFI
+ */
+ #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
+ #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
+ #define ESP_WIFI_MODULE_RESET_PIN PG7
+ #define ESP_WIFI_MODULE_ENABLE_PIN PG8
+ #define ESP_WIFI_MODULE_GPIO0_PIN PD7
+ #define ESP_WIFI_MODULE_GPIO4_PIN PD10
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h
index 78a137b3..f848a181 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h
@@ -547,22 +547,24 @@
#endif
#endif
-//
-// WIFI
-//
+#if ENABLED(WIFISUPPORT)
+ //
+ // WIFI
+ //
-/**
- * ------
- * RX | 8 7 | 3.3V GPIO0 PF14 ... Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating)
- * GPIO0 | 6 5 | Reset GPIO2 PF15 ... must be high (ESP3D software configures this with a pullup so OK to leave as floating)
- * GPIO2 | 4 3 | Enable Reset PG0 ... active low, probably OK to leave floating
- * GND | 2 1 | TX Enable PG1 ... Must be high for module to run
- * ------
- * W1
- */
-#define ESP_WIFI_MODULE_COM 6 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
-#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
-#define ESP_WIFI_MODULE_RESET_PIN PG0
-#define ESP_WIFI_MODULE_ENABLE_PIN PG1
-#define ESP_WIFI_MODULE_GPIO0_PIN PF14
-#define ESP_WIFI_MODULE_GPIO2_PIN PF15
+ /**
+ * ------
+ * RX | 8 7 | 3.3V GPIO0 PF14 ... Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating)
+ * GPIO0 | 6 5 | Reset GPIO2 PF15 ... must be high (ESP3D software configures this with a pullup so OK to leave as floating)
+ * GPIO2 | 4 3 | Enable Reset PG0 ... active low, probably OK to leave floating
+ * GND | 2 1 | TX Enable PG1 ... Must be high for module to run
+ * ------
+ * W1
+ */
+ #define ESP_WIFI_MODULE_COM 6 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
+ #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
+ #define ESP_WIFI_MODULE_RESET_PIN PG0
+ #define ESP_WIFI_MODULE_ENABLE_PIN PG1
+ #define ESP_WIFI_MODULE_GPIO0_PIN PF14
+ #define ESP_WIFI_MODULE_GPIO2_PIN PF15
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h
index 7ac9156f..10105a6c 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h
@@ -556,25 +556,27 @@
#define NEOPIXEL_PIN PE6
#endif
-//
-// WIFI
-//
+#if ENABLED(WIFISUPPORT)
+ //
+ // WIFI
+ //
-/**
- * -------
- * GND | 9 | | 8 | 3.3V
- * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI)
- * 3.3V | 11 | | 6 | PB14 (ESP-MISO)
- * (ESP-IO0) PB10 | 12 | | 5 | PB13 (ESP-CLK)
- * (ESP-IO4) PB11 | 13 | | 4 | --
- * -- | 14 | | 3 | 3.3V (ESP-EN)
- * (ESP-RX) PD8 | 15 | | 2 | --
- * (ESP-TX) PD9 | 16 | | 1 | PC14 (ESP-RST)
- * -------
- * WIFI
- */
-#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
-#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
-#define ESP_WIFI_MODULE_RESET_PIN PC14
-#define ESP_WIFI_MODULE_GPIO0_PIN PB10
-#define ESP_WIFI_MODULE_GPIO4_PIN PB11
+ /**
+ * -------
+ * GND | 9 | | 8 | 3.3V
+ * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI)
+ * 3.3V | 11 | | 6 | PB14 (ESP-MISO)
+ * (ESP-IO0) PB10 | 12 | | 5 | PB13 (ESP-CLK)
+ * (ESP-IO4) PB11 | 13 | | 4 | --
+ * -- | 14 | | 3 | 3.3V (ESP-EN)
+ * (ESP-RX) PD8 | 15 | | 2 | --
+ * (ESP-TX) PD9 | 16 | | 1 | PC14 (ESP-RST)
+ * -------
+ * WIFI
+ */
+ #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
+ #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
+ #define ESP_WIFI_MODULE_RESET_PIN PC14
+ #define ESP_WIFI_MODULE_GPIO0_PIN PB10
+ #define ESP_WIFI_MODULE_GPIO4_PIN PB11
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h b/Marlin/Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h
index 883640d5..32f70a37 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h
@@ -22,7 +22,7 @@
#pragma once
/**
- * Creality V24S1_301F4 (STM32F401RC) board pin assignments as found on Ender 3 S1.
+ * Creality V24S1_301F4 (STM32F401RC) board pin assignments as found on Ender-3 S1.
*/
#ifndef BOARD_INFO_NAME
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h
index 32ec518b..031caa1c 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h
@@ -43,22 +43,24 @@
#define FLASH_ADDRESS_START 0x8004000
#endif
+#define SERVO0_PIN PB1 // BL-TOUCH/PWM
+
//
-// Z Probe
+// Limit Switches
//
-#if ENABLED(BLTOUCH)
- #error "You need to set jumper to 5v for Bltouch, then comment out this line to proceed."
- #define SERVO0_PIN PA0
-#elif !defined(Z_MIN_PROBE_PIN)
- #define Z_MIN_PROBE_PIN PA0
-#endif
+#define X_STOP_PIN PB4 // X-MIN
+#define Y_STOP_PIN PC8 // Y-MIN
+#define Z_STOP_PIN PA0 // Z-MIN
//
-// Limit Switches
+// Z Probe
//
-#define X_STOP_PIN PB4
-#define Y_STOP_PIN PC8
-#define Z_STOP_PIN PB1
+#if ENABLED(BLTOUCH)
+ #error "You need to set jumper to 5V for BLTouch, then comment out this line to proceed."
+#endif
+#ifndef Z_MIN_PROBE_PIN
+ #define Z_MIN_PROBE_PIN PB1 // BL-TOUCH/PWM repurposed
+#endif
//
// Filament runout
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h b/Marlin/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h
index b1031de8..1896cd54 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h
@@ -344,7 +344,7 @@
#else
#define LCD_PINS_D4 EXP1_05_PIN
- #if ENABLED(ULTIPANEL)
+ #if IS_ULTIPANEL
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h b/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h
index 2274d0c0..32273972 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h
@@ -99,3 +99,39 @@
#define SD_DETECT_PIN PF9
#define BEEPER_PIN PG2
+
+//
+// TFT with FSMC interface
+//
+#if HAS_FSMC_TFT
+ /**
+ * Note: MKS Robin TFT screens use various TFT controllers.
+ * If the screen stays white, disable 'LCD_RESET_PIN'
+ * to let the bootloader init the screen.
+ */
+ #define LCD_RESET_PIN PD13
+ #define LCD_BACKLIGHT_PIN PD12
+
+ #define TFT_RESET_PIN LCD_RESET_PIN
+ #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN
+
+ #define FSMC_CS_PIN PG12 // NE4
+ #define FSMC_RS_PIN PF12 // A0
+ #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
+ #define TFT_CS_PIN FSMC_CS_PIN
+ #define TFT_RS_PIN FSMC_RS_PIN
+
+ #define TFT_BUFFER_SIZE 14400
+
+ #define BEEPER_PIN PG2
+
+ #if NEED_TOUCH_PINS
+ #define TOUCH_BUTTONS_HW_SPI
+ #define TOUCH_BUTTONS_HW_SPI_DEVICE 1
+ #define TOUCH_CS_PIN PD11 // SPI1_NSS
+ #define TOUCH_SCK_PIN PB3 // SPI1_SCK
+ #define TOUCH_MISO_PIN PB4 // SPI1_MISO
+ #define TOUCH_MOSI_PIN PB5 // SPI1_MOSI
+ #endif
+
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h b/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h
index 3cba69a7..a0a71164 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h
@@ -40,6 +40,4 @@
//#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation
#endif
-#define LED_PIN PB1
-
#include "../stm32f1/pins_MKS_ROBIN_NANO_common.h"
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h b/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h
index 603da09d..42b252d3 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h
@@ -19,7 +19,6 @@
* along with this program. If not, see .
*
*/
-
#pragma once
//
@@ -362,7 +361,7 @@
#else // !MKS_MINI_12864
#define LCD_PINS_D4 EXP1_05_PIN
- #if ENABLED(ULTIPANEL)
+ #if IS_ULTIPANEL
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h
index 873ba3e9..14b3d661 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h
@@ -363,7 +363,7 @@
#else // !MKS_MINI_12864
#define LCD_PINS_D4 EXP1_05_PIN
- #if ENABLED(ULTIPANEL)
+ #if IS_ULTIPANEL
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h b/Marlin/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h
index d00b21c3..3f0d4e5e 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h
@@ -59,13 +59,13 @@
#if HAS_EXTRA_ENDSTOPS
#define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES
#if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_)
- #define NEEDS_X_MINMAX 1
+ #define NEEDS_X_MINMAX
#endif
#if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_)
- #define NEEDS_Y_MINMAX 1
+ #define NEEDS_Y_MINMAX
#endif
#if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_)
- #define NEEDS_Z_MINMAX 1
+ #define NEEDS_Z_MINMAX
#endif
#undef _ENDSTOP_IS_ANY
#endif
@@ -88,7 +88,7 @@
#ifdef Y_STALL_SENSITIVITY
#define Y_STOP_PIN Y_DIAG_PIN // Y-
-#elif NEEDS_Y_MINMAX
+#elif ENABLED(NEEDS_Y_MINMAX)
#ifndef Y_MIN_PIN
#define Y_MIN_PIN Y_DIAG_PIN // Y-
#endif
@@ -101,7 +101,7 @@
#ifdef Z_STALL_SENSITIVITY
#define Z_STOP_PIN Z_DIAG_PIN // Z-
-#elif NEEDS_Z_MINMAX
+#elif ENABLED(NEEDS_Z_MINMAX)
#ifndef Z_MIN_PIN
#define Z_MIN_PIN Z_DIAG_PIN // Z-
#endif
@@ -118,10 +118,6 @@
#endif
#endif
-#undef NEEDS_X_MINMAX
-#undef NEEDS_Y_MINMAX
-#undef NEEDS_Z_MINMAX
-
//
// Steppers
//
diff --git a/Marlin/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h b/Marlin/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h
index e3b9f7ef..475dc422 100644
--- a/Marlin/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h
+++ b/Marlin/Marlin/src/pins/stm32f4/pins_TRONXY_V10.h
@@ -72,10 +72,10 @@
//#define SPI_FLASH
#if ENABLED(SPI_FLASH)
#define SPI_FLASH_SIZE 0x200000 // 2MB
- #define W25QXX_CS_PIN PG15 // SPI2
- #define W25QXX_MOSI_PIN PB5
- #define W25QXX_MISO_PIN PB4
- #define W25QXX_SCK_PIN PB3
+ #define SPI_FLASH_CS_PIN PG15 // SPI2
+ #define SPI_FLASH_MOSI_PIN PB5
+ #define SPI_FLASH_MISO_PIN PB4
+ #define SPI_FLASH_SCK_PIN PB3
#endif
//
diff --git a/Marlin/Marlin/src/pins/stm32g0/env_validate.h b/Marlin/Marlin/src/pins/stm32g0/env_validate.h
new file mode 100644
index 00000000..a7be76bd
--- /dev/null
+++ b/Marlin/Marlin/src/pins/stm32g0/env_validate.h
@@ -0,0 +1,26 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#if NOT_TARGET(STM32G0xx) || NOT_TARGET(STM32G0B1xx)
+ #error "Oops! Select an STM32G0 board in 'Tools > Board.'"
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h
index fc2be540..3de67ea8 100644
--- a/Marlin/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h
+++ b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h
@@ -21,6 +21,8 @@
*/
#pragma once
+#include "env_validate.h"
+
/** CAUTION **
* This board definition is to facilitate support for a Filament Extrusion
* devices, used to convert waste plastic into 3D printable filament.
@@ -42,7 +44,7 @@
#define FLASH_EEPROM_EMULATION
#endif
#define EEPROM_PAGE_SIZE (0x800UL) // 2K
- #define EEPROM_START_ADDRESS (0x0801F800UL)
+ #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 1UL)
#define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
#endif
diff --git a/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h
new file mode 100644
index 00000000..54c2c4c7
--- /dev/null
+++ b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h
@@ -0,0 +1,340 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#include "env_validate.h"
+
+#ifndef BOARD_INFO_NAME
+ #define BOARD_INFO_NAME "BTT Manta E3 EZ V1.0"
+#endif
+
+#define USES_DIAG_JUMPERS
+
+// Ignore temp readings during development.
+//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
+
+//
+// EEPROM
+//
+#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
+ #undef NO_EEPROM_SELECTED
+ #ifndef FLASH_EEPROM_EMULATION
+ #define FLASH_EEPROM_EMULATION
+ #endif
+ #define EEPROM_PAGE_SIZE (0x800UL) // 2K
+ #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
+ #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
+#endif
+
+//
+// Servos
+//
+#define SERVO0_PIN PA7 // BLTouch
+
+//
+// Probe enable
+//
+#if ENABLED(PROBE_ENABLE_DISABLE)
+ #ifndef PROBE_ENABLE_PIN
+ #define PROBE_ENABLE_PIN SERVO0_PIN
+ #endif
+#endif
+
+//
+// Trinamic StallGuard pins
+//
+#define X_DIAG_PIN PC4 // X-STOP
+#define Y_DIAG_PIN PB0 // Y-STOP
+#define Z_DIAG_PIN PC6 // Z-STOP
+#define E0_DIAG_PIN PC5 // E0-DET
+#define E1_DIAG_PIN PB1 // E1-DET
+
+//
+// Limit Switches
+//
+#define X_STOP_PIN X_DIAG_PIN // X-STOP
+#define Y_STOP_PIN Y_DIAG_PIN // Y-STOP
+#define Z_STOP_PIN Z_DIAG_PIN // Z-STOP
+
+//
+// Z Probe (when not Z_STOP_PIN)
+//
+#define Z_MIN_PROBE_PIN PA6 // BLTouch
+
+//
+// Filament Runout Sensor
+//
+#ifndef FIL_RUNOUT_PIN
+ #define FIL_RUNOUT_PIN E0_DIAG_PIN // E0-DET
+#endif
+#ifndef FIL_RUNOUT2_PIN
+ #define FIL_RUNOUT2_PIN E1_DIAG_PIN // E1-DET
+#endif
+
+//
+// Power Supply Control
+//
+#ifndef PS_ON_PIN
+ #define PS_ON_PIN PA9 // PS-ON
+#endif
+
+//
+// Power Loss Detection
+//
+#ifndef POWER_LOSS_PIN
+ #define POWER_LOSS_PIN PB9 // PWRDET
+#endif
+
+//
+// Steppers
+//
+#define X_STEP_PIN PA14
+#define X_DIR_PIN PA10
+#define X_ENABLE_PIN PA13
+#ifndef X_CS_PIN
+ #define X_CS_PIN PB8
+#endif
+
+#define Y_STEP_PIN PC8
+#define Y_DIR_PIN PA15
+#define Y_ENABLE_PIN PC14
+#ifndef Y_CS_PIN
+ #define Y_CS_PIN PC9
+#endif
+
+#define Z_STEP_PIN PD2
+#define Z_DIR_PIN PD4
+#define Z_ENABLE_PIN PD3
+#ifndef Z_CS_PIN
+ #define Z_CS_PIN PD0
+#endif
+
+#define E0_STEP_PIN PD5
+#define E0_DIR_PIN PD6
+#define E0_ENABLE_PIN PB3
+#ifndef E0_CS_PIN
+ #define E0_CS_PIN PD1
+#endif
+
+#define E1_STEP_PIN PB7
+#define E1_DIR_PIN PB6
+#define E1_ENABLE_PIN PB4
+#ifndef E1_CS_PIN
+ #define E1_CS_PIN PB5
+#endif
+
+//
+// Software SPI pins for TMC2130 stepper drivers
+//
+#if ENABLED(TMC_USE_SW_SPI)
+ #ifndef TMC_SW_MOSI
+ #define TMC_SW_MOSI PC12 // Shared with SPI header, Pin 5 (SPI3)
+ #endif
+ #ifndef TMC_SW_MISO
+ #define TMC_SW_MISO PC11 // Shared with SPI header, Pin 6 (SPI3)
+ #endif
+ #ifndef TMC_SW_SCK
+ #define TMC_SW_SCK PC10 // Shared with SPI header, Pin 4 (SPI3)
+ #endif
+#endif
+
+#if HAS_TMC_UART
+ #define X_SERIAL_TX_PIN PB8 // X_CS_PIN
+ #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
+
+ #define Y_SERIAL_TX_PIN PC9 // Y_CS_PIN
+ #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
+
+ #define Z_SERIAL_TX_PIN PD0 // Z_CS_PIN
+ #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
+
+ #define E0_SERIAL_TX_PIN PD1 // E0_CS_PIN
+ #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
+
+ #define E1_SERIAL_TX_PIN PB5 // E1_CS_PIN
+ #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#endif
+
+//
+// Temperature Sensors
+//
+#define TEMP_0_PIN PA4 // Analog Input "TH0"
+#define TEMP_1_PIN PA5 // Analog Input "TH1"
+#define TEMP_BED_PIN PA3 // Analog Input "TB"
+
+//
+// Heaters / Fans
+//
+#define HEATER_0_PIN PB11 // "HE0"
+#define HEATER_1_PIN PB10 // "HE1"
+#define HEATER_BED_PIN PB2 // "HB"
+
+#define FAN_PIN PA8 // "FAN0"
+#define FAN1_PIN PB15 // "FAN1"
+#define FAN2_PIN PB14 // "FAN2"
+
+//
+// Auto fans
+//
+#if HOTENDS == 2
+ #ifndef E0_AUTO_FAN_PIN
+ #define E0_AUTO_FAN_PIN FAN1_PIN
+ #endif
+ #ifndef E1_AUTO_FAN_PIN
+ #define E1_AUTO_FAN_PIN FAN2_PIN
+ #endif
+#else
+ #ifndef E0_AUTO_FAN_PIN
+ #define E0_AUTO_FAN_PIN FAN1_PIN
+ #endif
+ #ifndef CONTROLLER_FAN_PIN
+ #define CONTROLLER_FAN_PIN FAN2_PIN
+ #endif
+#endif
+
+/**
+ * Manta E3 EZ V1.0
+ * ------
+ * (BEEPER) PC1 | 1 2 | PC2 (BTN_ENC)
+ * (BTN_EN1) PC3 | 3 4 | RESET
+ * (BTN_EN2) PC0 5 6 | PA0 (LCD_D4)
+ * (LCD_RS) PA2 | 7 8 | PA1 (LCD_EN)
+ * GND | 9 10 | 5V
+ * ------
+ * EXP1
+ */
+#define EXP1_01_PIN PC1
+#define EXP1_02_PIN PC2
+#define EXP1_03_PIN PC3
+#define EXP1_04_PIN -1
+#define EXP1_05_PIN PC0
+#define EXP1_06_PIN PA0
+#define EXP1_07_PIN PA2
+#define EXP1_08_PIN PA1
+#define EXP1_09_PIN -1
+#define EXP1_10_PIN -1
+
+#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
+ #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
+ #error "CAUTION! Ender-3 V2 display requires a custom cable with TX = PA0, RX = PC2. See 'pins_BTT_MANTA_E3_EZ_V1_0.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
+ #endif
+
+ /**
+ * Ender-3 V2 display Manta E3 EZ V1.0 Ender-3 V2 display --> Manta E3 EZ V1.0
+ * ------ ------ RX 3 --> 5 P0_15
+ * -- | 1 2 | -- (BEEPER) PC1 | 1 2 | PC2 (BTN_ENC) TX 4 --> 9 P0_16
+ * (MANTA TX1) RX | 3 4 | TX (MANTA RX1) (BTN_EN1) PC3 | 3 4 | RESET BEEPER 6 --> 10 P2_08
+ * (BTN_ENC) ENT 5 6 | BEEPER (BTN_EN2) PC0 5 6 | PA0 (LCD_D4)
+ * (BTN_E2) B | 7 8 | A (BTN_E1) (LCD_RS) PA2 | 7 8 | PA1 (LCD_EN)
+ * GND | 9 10 | 5V GND | 9 10 | 5V
+ * ------ ------
+ */
+
+ #define BEEPER_PIN EXP1_01_PIN
+ #define BTN_EN1 EXP1_08_PIN
+ #define BTN_EN2 EXP1_07_PIN
+ #define BTN_ENC EXP1_05_PIN
+
+#elif HAS_WIRED_LCD
+
+ #if ENABLED(CR10_STOCKDISPLAY)
+
+ #define BEEPER_PIN EXP1_01_PIN
+
+ #define BTN_EN1 EXP1_03_PIN
+ #define BTN_EN2 EXP1_05_PIN
+ #define BTN_ENC EXP1_02_PIN
+
+ #define LCD_PINS_RS EXP1_07_PIN
+ #define LCD_PINS_ENABLE EXP1_08_PIN
+ #define LCD_PINS_D4 EXP1_06_PIN
+
+ #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
+
+ #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
+ #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_MANTA_E3_EZ_V1_0.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
+ #endif
+
+ #define LCD_PINS_RS EXP1_06_PIN
+ #define LCD_PINS_ENABLE EXP1_02_PIN
+ #define LCD_PINS_D4 EXP1_07_PIN
+ #define LCD_PINS_D5 EXP1_05_PIN
+ #define LCD_PINS_D6 EXP1_03_PIN
+ #define LCD_PINS_D7 EXP1_01_PIN
+ #define ADC_KEYPAD_PIN PA7 // Repurpose default SERVO0_PIN for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
+
+ #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
+
+ #define BTN_EN1 EXP1_03_PIN
+ #define BTN_EN2 EXP1_05_PIN
+ #define BTN_ENC EXP1_02_PIN
+
+ #define DOGLCD_CS EXP1_07_PIN
+ #define DOGLCD_A0 EXP1_06_PIN
+ #define DOGLCD_SCK EXP1_01_PIN
+ #define DOGLCD_MOSI EXP1_08_PIN
+ #define FORCE_SOFT_SPI
+ #define LCD_BACKLIGHT_PIN -1
+
+ #else
+
+ #error "Only ZONESTAR_LCD, MKS_MINI_12864, ENDER2_STOCKDISPLAY, and CR10_STOCKDISPLAY are currently supported on the BTT_MANTA_E3_EZ_V1_0."
+
+ #endif
+
+#endif // HAS_WIRED_LCD
+
+//
+// SD Support
+//
+
+#ifndef SDCARD_CONNECTION
+ #define SDCARD_CONNECTION ONBOARD
+#endif
+
+#define SD_DETECT_PIN -1
+
+#if SD_CONNECTION_IS(LCD) && (BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL)
+ #define SD_SS_PIN EXP1_05_PIN
+#elif SD_CONNECTION_IS(CUSTOM_CABLE)
+ #error "SD CUSTOM_CABLE is not compatible with Manta E3 EZ."
+#endif
+
+#define ONBOARD_SPI_DEVICE 3 // SPI3 -> used only by HAL/STM32F1...
+#define ONBOARD_SD_CS_PIN PC13 // Chip select for "System" SD card
+
+#define ENABLE_SPI3
+#define SDSS ONBOARD_SD_CS_PIN
+#define SD_SS_PIN ONBOARD_SD_CS_PIN
+#define SD_SCK_PIN PC10
+#define SD_MISO_PIN PC11
+#define SD_MOSI_PIN PC12
+
+//
+// NeoPixel LED
+//
+#ifndef NEOPIXEL_PIN
+ #define NEOPIXEL_PIN PC7 // RGB
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h
new file mode 100644
index 00000000..876475f8
--- /dev/null
+++ b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h
@@ -0,0 +1,313 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#include "env_validate.h"
+
+//#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4
+
+#ifndef BOARD_INFO_NAME
+ #define BOARD_INFO_NAME "BTT Manta M4P V1.0"
+#endif
+
+#define USES_DIAG_JUMPERS
+
+// Ignore temp readings during development.
+//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
+
+//
+// EEPROM
+//
+#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
+ #undef NO_EEPROM_SELECTED
+ #ifndef FLASH_EEPROM_EMULATION
+ #define FLASH_EEPROM_EMULATION
+ #endif
+ #define EEPROM_PAGE_SIZE (0x800UL) // 2K
+ #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
+ #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
+#endif
+
+//
+// Servos
+//
+#define SERVO0_PIN PA1 // SERVOS
+
+//
+// Probe enable
+//
+#if ENABLED(PROBE_ENABLE_DISABLE)
+ #ifndef PROBE_ENABLE_PIN
+ #define PROBE_ENABLE_PIN SERVO0_PIN
+ #endif
+#endif
+
+//
+// Limit Switches
+//
+#define X_STOP_PIN PC0 // X-STOP
+#define Y_STOP_PIN PC1 // Y-STOP
+#define Z_STOP_PIN PC2 // Z-STOP
+
+//
+// Z Probe must be this pin
+//
+#define Z_MIN_PROBE_PIN PC14 // PROBE
+
+//
+// Filament Runout Sensor
+//
+#ifndef FIL_RUNOUT_PIN
+ #define FIL_RUNOUT_PIN PC15 // E0-STOP
+#endif
+
+//
+// Steppers
+//
+#define X_STEP_PIN PC6
+#define X_DIR_PIN PA14
+#define X_ENABLE_PIN PC7
+#ifndef X_CS_PIN
+ #define X_CS_PIN PB12
+#endif
+
+#define Y_STEP_PIN PB10
+#define Y_DIR_PIN PB2
+#define Y_ENABLE_PIN PB11
+#ifndef Y_CS_PIN
+ #define Y_CS_PIN PC10
+#endif
+
+#define Z_STEP_PIN PB0
+#define Z_DIR_PIN PC5
+#define Z_ENABLE_PIN PB1
+#ifndef Z_CS_PIN
+ #define Z_CS_PIN PC9
+#endif
+
+#define E0_STEP_PIN PB3
+#define E0_DIR_PIN PB4
+#define E0_ENABLE_PIN PD5
+#ifndef E0_CS_PIN
+ #define E0_CS_PIN PA13
+#endif
+
+//
+// Software SPI pins for TMC2130 stepper drivers
+//
+#if ENABLED(TMC_USE_SW_SPI)
+ #ifndef TMC_SW_MOSI
+ #define TMC_SW_MOSI PB15
+ #endif
+ #ifndef TMC_SW_MISO
+ #define TMC_SW_MISO PB14
+ #endif
+ #ifndef TMC_SW_SCK
+ #define TMC_SW_SCK PB13
+ #endif
+#endif
+
+#if HAS_TMC_UART
+ #define X_SERIAL_TX_PIN PB12
+ #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
+
+ #define Y_SERIAL_TX_PIN PC10
+ #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
+
+ #define Z_SERIAL_TX_PIN PC9
+ #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
+
+ #define E0_SERIAL_TX_PIN PA13
+ #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#endif
+
+//
+// Temperature Sensors
+//
+#define TEMP_0_PIN PA0 // Analog Input "TH0"
+#define TEMP_BED_PIN PC4 // Analog Input "TB0"
+
+//
+// Heaters / Fans
+//
+#define HEATER_0_PIN PC8 // "HE"
+#define HEATER_BED_PIN PD8 // "HB"
+
+#define FAN_PIN PD2 // "FAN0"
+#define FAN1_PIN PD3 // "FAN1"
+#define FAN2_PIN PD4 // "FAN2"
+
+/**
+ * ------ ------
+ * (BEEPER) PD6 | 1 2 | PB8 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SCK)
+ * (LCD_EN) PB9 | 3 4 | PC3 (LCD_RS) (BTN_EN1) PC11 | 3 4 | PA8 (SD_SS)
+ * (LCD_D4) PA15 | 5 6 PA10 (LCD_D5) (BTN_EN2) PC12 | 5 6 PB15 (MOSI)
+ * (LCD_D6) PA9 | 7 8 | PB5 (LCD_D7) (SD_DETECT) PC13 | 7 8 | RESET
+ * GND | 9 10 | 5V GND | 9 10 | --
+ * ------ ------
+ * EXP1 EXP2
+ */
+#define EXP1_01_PIN PD6
+#define EXP1_02_PIN PB8
+#define EXP1_03_PIN PB9
+#define EXP1_04_PIN PC3
+#define EXP1_05_PIN PA15
+#define EXP1_06_PIN PA10
+#define EXP1_07_PIN PA9
+#define EXP1_08_PIN PB5
+
+#define EXP2_01_PIN PB14
+#define EXP2_02_PIN PB13
+#define EXP2_03_PIN PC11
+#define EXP2_04_PIN PA8
+#define EXP2_05_PIN PC12
+#define EXP2_06_PIN PB15
+#define EXP2_07_PIN PC13
+#define EXP2_08_PIN -1
+
+//
+// Onboard SD card
+// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
+//
+#if SD_CONNECTION_IS(LCD)
+ #define SDSS EXP2_04_PIN
+ #define SD_SS_PIN SDSS
+ #define SD_SCK_PIN EXP2_02_PIN
+ #define SD_MISO_PIN EXP2_01_PIN
+ #define SD_MOSI_PIN EXP2_06_PIN
+ #define SD_DETECT_PIN EXP2_07_PIN
+#elif SD_CONNECTION_IS(ONBOARD)
+ #define SD_SCK_PIN PA5
+ #define SD_MISO_PIN PA6
+ #define SD_MOSI_PIN PA7
+ #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card
+ #define SD_SS_PIN ONBOARD_SD_CS_PIN
+#elif SD_CONNECTION_IS(CUSTOM_CABLE)
+ #error "No custom SD drive cable defined for this board."
+#endif
+
+//
+// LCDs and Controllers
+//
+#if IS_TFTGLCD_PANEL
+
+ #if ENABLED(TFTGLCD_PANEL_SPI)
+ #define TFTGLCD_CS EXP2_03_PIN
+ #endif
+
+#elif HAS_WIRED_LCD
+
+ #define BEEPER_PIN EXP1_01_PIN
+ #define BTN_ENC EXP1_02_PIN
+
+ #if ENABLED(CR10_STOCKDISPLAY)
+
+ #define LCD_PINS_RS EXP1_07_PIN
+
+ #define BTN_EN1 EXP1_03_PIN
+ #define BTN_EN2 EXP1_05_PIN
+
+ #define LCD_PINS_ENABLE EXP1_08_PIN
+ #define LCD_PINS_D4 EXP1_06_PIN
+
+ #elif ENABLED(MKS_MINI_12864)
+
+ #define DOGLCD_A0 EXP1_07_PIN
+ #define DOGLCD_CS EXP1_06_PIN
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
+
+ #else
+
+ #define LCD_PINS_RS EXP1_04_PIN
+
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
+
+ #define LCD_PINS_ENABLE EXP1_03_PIN
+ #define LCD_PINS_D4 EXP1_05_PIN
+
+ #if ENABLED(FYSETC_MINI_12864)
+ #define DOGLCD_CS EXP1_03_PIN
+ #define DOGLCD_A0 EXP1_04_PIN
+ //#define LCD_BACKLIGHT_PIN -1
+
+ #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
+ // results in LCD soft SPI mode 3, SD soft SPI mode 0
+
+ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
+ #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
+ #ifndef RGB_LED_R_PIN
+ #define RGB_LED_R_PIN EXP1_06_PIN
+ #endif
+ #ifndef RGB_LED_G_PIN
+ #define RGB_LED_G_PIN EXP1_07_PIN
+ #endif
+ #ifndef RGB_LED_B_PIN
+ #define RGB_LED_B_PIN EXP1_08_PIN
+ #endif
+ #elif ENABLED(FYSETC_MINI_12864_2_1)
+ #define NEOPIXEL_PIN EXP1_06_PIN
+ #endif
+ #endif // !FYSETC_MINI_12864
+
+ #if IS_ULTIPANEL
+ #define LCD_PINS_D5 EXP1_06_PIN
+ #define LCD_PINS_D6 EXP1_07_PIN
+ #define LCD_PINS_D7 EXP1_08_PIN
+
+ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
+ #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
+ #endif
+
+ #endif
+
+ #endif
+
+#endif // HAS_WIRED_LCD
+
+// Alter timing for graphical display
+#if IS_U8GLIB_ST7920
+ #ifndef BOARD_ST7920_DELAY_1
+ #define BOARD_ST7920_DELAY_1 120
+ #endif
+ #ifndef BOARD_ST7920_DELAY_2
+ #define BOARD_ST7920_DELAY_2 80
+ #endif
+ #ifndef BOARD_ST7920_DELAY_3
+ #define BOARD_ST7920_DELAY_3 580
+ #endif
+#endif
+
+//
+// NeoPixel LED
+//
+#ifndef NEOPIXEL_PIN
+ #define NEOPIXEL_PIN PD0
+#endif
+
+#ifndef NEOPIXEL2_PIN
+ #define NEOPIXEL2_PIN PD1
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h
new file mode 100644
index 00000000..f4ce5a16
--- /dev/null
+++ b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h
@@ -0,0 +1,341 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#include "env_validate.h"
+
+#ifndef BOARD_INFO_NAME
+ #define BOARD_INFO_NAME "BTT Manta M5P V1.0"
+#endif
+
+#define USES_DIAG_JUMPERS
+
+// Ignore temp readings during development.
+//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
+
+//
+// EEPROM
+//
+#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
+ #undef NO_EEPROM_SELECTED
+ #ifndef FLASH_EEPROM_EMULATION
+ #define FLASH_EEPROM_EMULATION
+ #endif
+ #define EEPROM_PAGE_SIZE (0x800UL) // 2K
+ #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
+ #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
+#endif
+
+//
+// Servos
+//
+#define SERVO0_PIN PC15 // PROBE
+
+//
+// Probe enable
+//
+#if ENABLED(PROBE_ENABLE_DISABLE)
+ #ifndef PROBE_ENABLE_PIN
+ #define PROBE_ENABLE_PIN SERVO0_PIN
+ #endif
+#endif
+
+//
+// Trinamic StallGuard pins
+//
+#define X_DIAG_PIN PD3 // MIN1
+#define Y_DIAG_PIN PD2 // MIN2
+#define Z_DIAG_PIN PC3 // MIN3
+#define E0_DIAG_PIN PC2 // MIN4
+#define E1_DIAG_PIN -1
+
+//
+// Limit Switches
+//
+#define X_STOP_PIN X_DIAG_PIN // MIN1
+#define Y_STOP_PIN Y_DIAG_PIN // MIN1
+#define Z_STOP_PIN Z_DIAG_PIN // MIN3
+
+//
+// Z Probe (when not Z_STOP_PIN)
+//
+#ifndef Z_MIN_PROBE_PIN
+ #define Z_MIN_PROBE_PIN PC13 // PROBE
+ //#define Z_MIN_PROBE_PIN PC15 // IND-DET (with adjustable pullup set via jumper)
+#endif
+
+//
+// Filament Runout Sensor
+//
+#ifndef FIL_RUNOUT_PIN
+ #define FIL_RUNOUT_PIN E0_DIAG_PIN // MIN4
+#endif
+
+//
+// Steppers
+//
+#define X_STEP_PIN PC8
+#define X_DIR_PIN PC9
+#define X_ENABLE_PIN PA15
+#ifndef X_CS_PIN
+ #define X_CS_PIN PD9
+#endif
+
+#define Y_STEP_PIN PA10
+#define Y_DIR_PIN PA14
+#define Y_ENABLE_PIN PA13
+#ifndef Y_CS_PIN
+ #define Y_CS_PIN PD8
+#endif
+
+#define Z_STEP_PIN PC6
+#define Z_DIR_PIN PC7
+#define Z_ENABLE_PIN PA9
+#ifndef Z_CS_PIN
+ #define Z_CS_PIN PB10
+#endif
+
+#define E0_STEP_PIN PB12
+#define E0_DIR_PIN PB11
+#define E0_ENABLE_PIN PA8
+#ifndef E0_CS_PIN
+ #define E0_CS_PIN PB2
+#endif
+
+#define E1_STEP_PIN PB0
+#define E1_DIR_PIN PB1
+#define E1_ENABLE_PIN PC4
+#ifndef E1_CS_PIN
+ #define E1_CS_PIN PA6
+#endif
+
+//
+// Software SPI pins for TMC2130 stepper drivers
+//
+#if ENABLED(TMC_USE_SW_SPI)
+ #ifndef TMC_SW_MOSI
+ #define TMC_SW_MOSI PB15 // Shared with SPI header, Pin 5 (SPI2)
+ #endif
+ #ifndef TMC_SW_MISO
+ #define TMC_SW_MISO PB14 // Shared with SPI header, Pin 6 (SPI2)
+ #endif
+ #ifndef TMC_SW_SCK
+ #define TMC_SW_SCK PB13 // Shared with SPI header, Pin 4 (SPI2)
+ #endif
+#endif
+
+#if HAS_TMC_UART
+ #define X_SERIAL_TX_PIN PD9 // X_CS_PIN
+ #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
+
+ #define Y_SERIAL_TX_PIN PD8 // Y_CS_PIN
+ #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
+
+ #define Z_SERIAL_TX_PIN PB10 // Z_CS_PIN
+ #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
+
+ #define E0_SERIAL_TX_PIN PB2 // E0_CS_PIN
+ #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
+
+ #define E1_SERIAL_TX_PIN PA6 // E1_CS_PIN
+ #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#endif
+
+//
+// Temperature Sensors
+//
+#define TEMP_0_PIN PA1 // Analog Input "TH0"
+#define TEMP_1_PIN PA2 // Analog Input "TH1"
+#define TEMP_BED_PIN PA0 // Analog Input "TB"
+
+//
+// Heaters / Fans
+//
+#define HEATER_0_PIN PC5 // "HE0"
+#define HEATER_1_PIN PA7 // "HE1"
+#define HEATER_BED_PIN PA5 // "HB"
+
+#define FAN_PIN PA4 // "FAN0"
+#define FAN1_PIN PA3 // "FAN1"
+
+//
+// Auto fans
+//
+#ifndef E0_AUTO_FAN_PIN
+ #define E0_AUTO_FAN_PIN FAN1_PIN
+#endif
+
+/**
+ * ------ ------
+ * (BEEPER) PD5 | 1 2 | PD4 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SCK)
+ * (LCD_EN) PB3 | 3 4 | PD6 (LCD_RS) (BTN_EN1) PB8 | 3 4 | PB9 (SD_SS)
+ * (LCD_D4) PB5 | 5 6 PB4 (LCD_D5) (BTN_EN2) PC10 | 5 6 PB15 (MOSI)
+ * (LCD_D6) PB7 | 7 8 | PB6 (LCD_D7) (SD_DETECT) PC12 | 7 8 | PF2
+ * GND | 9 10 | 5V GND | 9 10 | --
+ * ------ ------
+ * EXP1 EXP2
+ */
+#define EXP1_01_PIN PD5
+#define EXP1_02_PIN PD4
+#define EXP1_03_PIN PB3
+#define EXP1_04_PIN PD6
+#define EXP1_05_PIN PB5
+#define EXP1_06_PIN PB4
+#define EXP1_07_PIN PB7
+#define EXP1_08_PIN PB6
+
+#define EXP2_01_PIN PB14
+#define EXP2_02_PIN PB13
+#define EXP2_03_PIN PB8
+#define EXP2_04_PIN PB9
+#define EXP2_05_PIN PC10
+#define EXP2_06_PIN PB15
+#define EXP2_07_PIN PC12
+#define EXP2_08_PIN -1
+
+//
+// Onboard SD card
+// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
+//
+#if SD_CONNECTION_IS(LCD)
+ #define SDSS EXP2_04_PIN
+ #define SD_SS_PIN SDSS
+ #define SD_SCK_PIN EXP2_02_PIN
+ #define SD_MISO_PIN EXP2_01_PIN
+ #define SD_MOSI_PIN EXP2_06_PIN
+ #define SD_DETECT_PIN EXP2_07_PIN
+#elif SD_CONNECTION_IS(ONBOARD)
+ #define SD_SCK_PIN PB13
+ #define SD_MISO_PIN PB14
+ #define SD_MOSI_PIN PB15
+ #define ONBOARD_SD_CS_PIN PC1 // Chip select for "System" SD card
+ #define SD_SS_PIN ONBOARD_SD_CS_PIN
+#elif SD_CONNECTION_IS(CUSTOM_CABLE)
+ #error "No custom SD drive cable defined for this board."
+#endif
+
+//
+// LCDs and Controllers
+//
+#if IS_TFTGLCD_PANEL
+
+ #if ENABLED(TFTGLCD_PANEL_SPI)
+ #define TFTGLCD_CS EXP2_03_PIN
+ #endif
+
+#elif HAS_WIRED_LCD
+
+ #define BEEPER_PIN EXP1_01_PIN
+ #define BTN_ENC EXP1_02_PIN
+
+ #if ENABLED(CR10_STOCKDISPLAY)
+
+ #define LCD_PINS_RS EXP1_07_PIN
+
+ #define BTN_EN1 EXP1_03_PIN
+ #define BTN_EN2 EXP1_05_PIN
+
+ #define LCD_PINS_ENABLE EXP1_08_PIN
+ #define LCD_PINS_D4 EXP1_06_PIN
+
+ #elif ENABLED(MKS_MINI_12864)
+
+ #define DOGLCD_A0 EXP1_07_PIN
+ #define DOGLCD_CS EXP1_06_PIN
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
+
+ #else
+
+ #define LCD_PINS_RS EXP1_04_PIN
+
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
+
+ #define LCD_PINS_ENABLE EXP1_03_PIN
+ #define LCD_PINS_D4 EXP1_05_PIN
+
+ #if ENABLED(FYSETC_MINI_12864)
+ #define DOGLCD_CS EXP1_03_PIN
+ #define DOGLCD_A0 EXP1_04_PIN
+ //#define LCD_BACKLIGHT_PIN -1
+
+ #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
+ // results in LCD soft SPI mode 3, SD soft SPI mode 0
+
+ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
+ #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
+ #ifndef RGB_LED_R_PIN
+ #define RGB_LED_R_PIN EXP1_06_PIN
+ #endif
+ #ifndef RGB_LED_G_PIN
+ #define RGB_LED_G_PIN EXP1_07_PIN
+ #endif
+ #ifndef RGB_LED_B_PIN
+ #define RGB_LED_B_PIN EXP1_08_PIN
+ #endif
+ #elif ENABLED(FYSETC_MINI_12864_2_1)
+ #define NEOPIXEL_PIN EXP1_06_PIN
+ #endif
+ #endif // !FYSETC_MINI_12864
+
+ #if IS_ULTIPANEL
+ #define LCD_PINS_D5 EXP1_06_PIN
+ #define LCD_PINS_D6 EXP1_07_PIN
+ #define LCD_PINS_D7 EXP1_08_PIN
+
+ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
+ #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
+ #endif
+
+ #endif
+
+ #endif
+
+#endif // HAS_WIRED_LCD
+
+// Alter timing for graphical display
+#if IS_U8GLIB_ST7920
+ #ifndef BOARD_ST7920_DELAY_1
+ #define BOARD_ST7920_DELAY_1 120
+ #endif
+ #ifndef BOARD_ST7920_DELAY_2
+ #define BOARD_ST7920_DELAY_2 80
+ #endif
+ #ifndef BOARD_ST7920_DELAY_3
+ #define BOARD_ST7920_DELAY_3 580
+ #endif
+#endif
+
+//
+// NeoPixel LED
+//
+#ifndef NEOPIXEL_PIN
+ #define NEOPIXEL_PIN PC11 // RGB1
+#endif
+
+#ifndef NEOPIXEL2_PIN
+ #define NEOPIXEL2_PIN PC14 // RGB2
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h
new file mode 100644
index 00000000..4f8d30b6
--- /dev/null
+++ b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h
@@ -0,0 +1,79 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+// Include common Manta M8P pins
+#include "pins_BTT_MANTA_M8P_common.h"
+
+#ifndef BOARD_INFO_NAME
+ #define BOARD_INFO_NAME "BTT Manta M8P V1.0"
+#endif
+
+//
+// Steppers
+//
+
+#define E1_STEP_PIN PA10 // M6
+#define E1_DIR_PIN PD15
+#define E1_ENABLE_PIN PA15
+#ifndef E1_CS_PIN
+ #define E1_CS_PIN PF8
+#endif
+
+#define E2_STEP_PIN PD12 // M7
+#define E2_DIR_PIN PD11
+#define E2_ENABLE_PIN PD14
+#ifndef E2_CS_PIN
+ #define E2_CS_PIN PD13
+#endif
+
+#define E3_STEP_PIN PD10 // M8
+#define E3_DIR_PIN PD8
+#define E3_ENABLE_PIN PD9
+#ifndef E3_CS_PIN
+ #define E3_CS_PIN PC7
+#endif
+
+#if HAS_TMC_UART
+ #define E1_SERIAL_TX_PIN PF8
+ #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
+
+ #define E2_SERIAL_TX_PIN PD13
+ #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
+
+ #define E3_SERIAL_TX_PIN PC7
+ #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#endif
+
+//
+// NeoPixel LED
+//
+#ifndef NEOPIXEL_PIN
+ #define NEOPIXEL_PIN PC6
+#endif
+
+#ifndef NEOPIXEL2_PIN
+ #define NEOPIXEL2_PIN PA9
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h
new file mode 100644
index 00000000..a21bb59e
--- /dev/null
+++ b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h
@@ -0,0 +1,78 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+// Include common Manta M8P pins
+#include "pins_BTT_MANTA_M8P_common.h"
+
+#ifndef BOARD_INFO_NAME
+ #define BOARD_INFO_NAME "BTT Manta M8P V1.1"
+#endif
+
+//
+// Steppers
+//
+#define E1_STEP_PIN PA10 // M6
+#define E1_DIR_PIN PA14
+#define E1_ENABLE_PIN PA15
+#ifndef E1_CS_PIN
+ #define E1_CS_PIN PF8
+#endif
+
+#define E2_STEP_PIN PD11 // M7
+#define E2_DIR_PIN PD9
+#define E2_ENABLE_PIN PD15
+#ifndef E2_CS_PIN
+ #define E2_CS_PIN PD14
+#endif
+
+#define E3_STEP_PIN PD8 // M8
+#define E3_DIR_PIN PC6
+#define E3_ENABLE_PIN PC7
+#ifndef E3_CS_PIN
+ #define E3_CS_PIN PD10
+#endif
+
+#if HAS_TMC_UART
+ #define E1_SERIAL_TX_PIN PF8
+ #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
+
+ #define E2_SERIAL_TX_PIN PD14
+ #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
+
+ #define E3_SERIAL_TX_PIN PD10
+ #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#endif
+
+//
+// NeoPixel LED
+//
+#ifndef NEOPIXEL_PIN
+ #define NEOPIXEL_PIN PA9
+#endif
+
+#ifndef NEOPIXEL2_PIN
+ #define NEOPIXEL2_PIN PB15
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h
new file mode 100644
index 00000000..6516538c
--- /dev/null
+++ b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h
@@ -0,0 +1,394 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#include "env_validate.h"
+
+//#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4
+
+#define USES_DIAG_JUMPERS
+
+// Ignore temp readings during development.
+//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
+
+//
+// EEPROM
+//
+#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
+ #undef NO_EEPROM_SELECTED
+ #ifndef FLASH_EEPROM_EMULATION
+ #define FLASH_EEPROM_EMULATION
+ #endif
+ #define EEPROM_PAGE_SIZE (0x800UL) // 2K
+ #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
+ #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
+#endif
+
+//
+// Servos
+//
+#define SERVO0_PIN PB1 // PROBE
+
+//
+// Probe enable
+//
+#if ENABLED(PROBE_ENABLE_DISABLE)
+ #ifndef PROBE_ENABLE_PIN
+ #define PROBE_ENABLE_PIN SERVO0_PIN
+ #endif
+#endif
+
+//
+// Trinamic Stallguard pins
+//
+#define X_DIAG_PIN PF3 // MIN1
+#define Y_DIAG_PIN PF4 // MIN2
+#define Z_DIAG_PIN PF5 // MIN3
+#define Z2_DIAG_PIN PC0 // MIN4
+#define E0_DIAG_PIN PC1 // MIN5
+#define E1_DIAG_PIN PC2 // MIN6
+
+//
+// Z Probe (when not Z_MIN_PIN)
+//
+#ifndef Z_MIN_PROBE_PIN
+ #define Z_MIN_PROBE_PIN PB2 // PROBE
+ //#define Z_MIN_PROBE_PIN PF6 // IND-PROBE (with adjustable voltage & pullup set via jumpers)
+#endif
+
+//
+// Check for additional used endstop pins
+//
+#if HAS_EXTRA_ENDSTOPS
+ #define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES
+ #if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_)
+ #define NEEDS_X_MINMAX
+ #endif
+ #if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_)
+ #define NEEDS_Y_MINMAX
+ #endif
+ #undef _ENDSTOP_IS_ANY
+#endif
+
+//
+// Limit Switches
+//
+#ifdef X_STALL_SENSITIVITY
+ #define X_STOP_PIN X_DIAG_PIN
+ #if X_HOME_TO_MIN
+ #define X_MAX_PIN E0_DIAG_PIN // MIN5
+ #else
+ #define X_MIN_PIN E0_DIAG_PIN // MIN5
+ #endif
+#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX)
+ #ifndef X_MIN_PIN
+ #define X_MIN_PIN X_DIAG_PIN // MIN1
+ #endif
+ #ifndef X_MAX_PIN
+ #define X_MAX_PIN E0_DIAG_PIN // MIN5
+ #endif
+#else
+ #define X_STOP_PIN X_DIAG_PIN // MIN1
+#endif
+
+#ifdef Y_STALL_SENSITIVITY
+ #define Y_STOP_PIN Y_DIAG_PIN
+ #if Y_HOME_TO_MIN
+ #define Y_MAX_PIN E1_DIAG_PIN // MIN6
+ #else
+ #define Y_MIN_PIN E1_DIAG_PIN // MIN6
+ #endif
+#elif ENABLED(NEEDS_Y_MINMAX)
+ #ifndef Y_MIN_PIN
+ #define Y_MIN_PIN Y_DIAG_PIN // MIN2
+ #endif
+ #ifndef Y_MAX_PIN
+ #define Y_MAX_PIN E1_DIAG_PIN // MIN6
+ #endif
+#else
+ #define Y_STOP_PIN Y_DIAG_PIN // MIN2
+#endif
+
+#define Z_STOP_PIN Z_DIAG_PIN // MIN3
+
+//
+// Filament Runout Sensors
+//
+#define FIL_RUNOUT_PIN PC1 // MIN5
+#define FIL_RUNOUT2_PIN PC2 // MIN6
+
+#ifndef PS_ON_PIN
+ #define PS_ON_PIN PC3 // PS-ON
+#endif
+
+//
+// Steppers
+//
+#define X_STEP_PIN PE2 // M1
+#define X_DIR_PIN PB4
+#define X_ENABLE_PIN PC11
+#ifndef X_CS_PIN
+ #define X_CS_PIN PC10
+#endif
+
+#define Y_STEP_PIN PF12 // M2
+#define Y_DIR_PIN PF11
+#define Y_ENABLE_PIN PB3
+#ifndef Y_CS_PIN
+ #define Y_CS_PIN PF13
+#endif
+
+#define Z_STEP_PIN PD7 // M3
+#define Z_DIR_PIN PD6
+#define Z_ENABLE_PIN PF10
+#ifndef Z_CS_PIN
+ #define Z_CS_PIN PF9
+#endif
+
+#define Z2_STEP_PIN PD3 // M4
+#define Z2_DIR_PIN PD2
+#define Z2_ENABLE_PIN PD5
+#ifndef Z2_CS_PIN
+ #define Z2_CS_PIN PD4
+#endif
+
+#define E0_STEP_PIN PC9 // M5
+#define E0_DIR_PIN PC8
+#define E0_ENABLE_PIN PD1
+#ifndef E0_CS_PIN
+ #define E0_CS_PIN PD0
+#endif
+
+//
+// Software SPI pins for TMC2130 stepper drivers
+//
+#if ENABLED(TMC_USE_SW_SPI)
+ #ifndef TMC_SW_MOSI
+ #define TMC_SW_MOSI PA7
+ #endif
+ #ifndef TMC_SW_MISO
+ #define TMC_SW_MISO PA6
+ #endif
+ #ifndef TMC_SW_SCK
+ #define TMC_SW_SCK PA5
+ #endif
+#endif
+
+#if HAS_TMC_UART
+ #define X_SERIAL_TX_PIN PC10
+ #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
+
+ #define Y_SERIAL_TX_PIN PF13
+ #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
+
+ #define Z_SERIAL_TX_PIN PF9
+ #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
+
+ #define Z2_SERIAL_TX_PIN PD4
+ #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN
+
+ #define E0_SERIAL_TX_PIN PD0
+ #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#endif
+
+//
+// Temperature Sensors
+//
+#define TEMP_BED_PIN PA0 // TB
+#define TEMP_0_PIN PA1 // TH0
+#define TEMP_1_PIN PA2 // TH1
+#define TEMP_2_PIN PA3 // TH2
+#define TEMP_3_PIN PA4 // TH3
+
+//
+// Heaters / Fans
+//
+#define HEATER_BED_PIN PB7 // BED-OUT
+#define HEATER_0_PIN PE3 // HE0
+#define HEATER_1_PIN PB5 // HE1
+#define HEATER_2_PIN PB6 // HE2
+#define HEATER_3_PIN PE1 // HE3
+
+#define FAN_PIN PE6 // FAN0
+#define FAN1_PIN PE0 // FAN1
+#define FAN2_PIN PC12 // FAN2
+#define FAN3_PIN PE5 // FAN3
+#define FAN4_PIN PE4 // FAN4
+#define FAN5_PIN PB8 // FAN5
+#define FAN6_PIN PB9 // FAN6
+
+//
+// SD Support
+//
+#ifndef SDCARD_CONNECTION
+ #if HAS_WIRED_LCD
+ #define SDCARD_CONNECTION LCD
+ #else
+ #define SDCARD_CONNECTION ONBOARD
+ #endif
+#endif
+
+/**
+ * ------ ------
+ * (BEEPER) PE9 | 1 2 | PE10 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SCK)
+ * (LCD_EN) PE11 | 3 4 | PE12 (LCD_RS) (BTN_EN1) PF7 | 3 4 | PB12 (SD_SS)
+ * (LCD_D4) PE13 | 5 6 PE14 (LCD_D5) (BTN_EN2) PE7 | 5 6 PB11 (MOSI)
+ * (LCD_D6) PE15 | 7 8 | PB10 (LCD_D7) (SD_DETECT) PE8 | 7 8 | RESET
+ * GND | 9 10 | 5V GND | 9 10 | --
+ * ------ ------
+ * EXP1 EXP2
+ */
+#define EXP1_01_PIN PE9
+#define EXP1_02_PIN PE10
+#define EXP1_03_PIN PE11
+#define EXP1_04_PIN PE12
+#define EXP1_05_PIN PE13
+#define EXP1_06_PIN PE14
+#define EXP1_07_PIN PE15
+#define EXP1_08_PIN PB10
+
+#define EXP2_01_PIN PB14
+#define EXP2_02_PIN PB13
+#define EXP2_03_PIN PF7
+#define EXP2_04_PIN PB12
+#define EXP2_05_PIN PE7
+#define EXP2_06_PIN PB11
+#define EXP2_07_PIN PE8
+#define EXP2_08_PIN -1
+
+//
+// Onboard SD card
+// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
+//
+#if SD_CONNECTION_IS(LCD)
+ #define SDSS EXP2_04_PIN
+ #define SD_SS_PIN SDSS
+ #define SD_SCK_PIN EXP2_02_PIN
+ #define SD_MISO_PIN EXP2_01_PIN
+ #define SD_MOSI_PIN EXP2_06_PIN
+ #define SD_DETECT_PIN EXP2_07_PIN
+#elif SD_CONNECTION_IS(ONBOARD)
+ #define SD_DETECT_PIN PE8
+ #define SD_SCK_PIN PB13
+ #define SD_MISO_PIN PB14
+ #define SD_MOSI_PIN PB11
+ #define ONBOARD_SD_CS_PIN PB14 // Chip select for "System" SD card
+ #define SD_SS_PIN ONBOARD_SD_CS_PIN
+#elif SD_CONNECTION_IS(CUSTOM_CABLE)
+ #error "No custom SD drive cable defined for this board."
+#endif
+
+//
+// LCDs and Controllers
+//
+#if IS_TFTGLCD_PANEL
+
+ #if ENABLED(TFTGLCD_PANEL_SPI)
+ #define TFTGLCD_CS EXP2_03_PIN
+ #endif
+
+#elif HAS_WIRED_LCD
+
+ #define BEEPER_PIN EXP1_01_PIN
+ #define BTN_ENC EXP1_02_PIN
+
+ #if ENABLED(CR10_STOCKDISPLAY)
+
+ #define LCD_PINS_RS EXP1_07_PIN
+
+ #define BTN_EN1 EXP1_03_PIN
+ #define BTN_EN2 EXP1_05_PIN
+
+ #define LCD_PINS_ENABLE EXP1_08_PIN
+ #define LCD_PINS_D4 EXP1_06_PIN
+
+ #elif ENABLED(MKS_MINI_12864)
+
+ #define DOGLCD_A0 EXP1_07_PIN
+ #define DOGLCD_CS EXP1_06_PIN
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
+
+ #else
+
+ #define LCD_PINS_RS EXP1_04_PIN
+
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
+
+ #define LCD_PINS_ENABLE EXP1_03_PIN
+ #define LCD_PINS_D4 EXP1_05_PIN
+
+ #if ENABLED(FYSETC_MINI_12864)
+ #define DOGLCD_CS EXP1_03_PIN
+ #define DOGLCD_A0 EXP1_04_PIN
+ //#define LCD_BACKLIGHT_PIN -1
+
+ #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
+ // results in LCD soft SPI mode 3, SD soft SPI mode 0
+
+ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
+ #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
+ #ifndef RGB_LED_R_PIN
+ #define RGB_LED_R_PIN EXP1_06_PIN
+ #endif
+ #ifndef RGB_LED_G_PIN
+ #define RGB_LED_G_PIN EXP1_07_PIN
+ #endif
+ #ifndef RGB_LED_B_PIN
+ #define RGB_LED_B_PIN EXP1_08_PIN
+ #endif
+ #elif ENABLED(FYSETC_MINI_12864_2_1)
+ #define NEOPIXEL_PIN EXP1_06_PIN
+ #endif
+ #endif // !FYSETC_MINI_12864
+
+ #if IS_ULTIPANEL
+ #define LCD_PINS_D5 EXP1_06_PIN
+ #define LCD_PINS_D6 EXP1_07_PIN
+ #define LCD_PINS_D7 EXP1_08_PIN
+
+ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
+ #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
+ #endif
+
+ #endif
+
+ #endif
+
+#endif // HAS_WIRED_LCD
+
+// Alter timing for graphical display
+#if IS_U8GLIB_ST7920
+ #ifndef BOARD_ST7920_DELAY_1
+ #define BOARD_ST7920_DELAY_1 120
+ #endif
+ #ifndef BOARD_ST7920_DELAY_2
+ #define BOARD_ST7920_DELAY_2 80
+ #endif
+ #ifndef BOARD_ST7920_DELAY_3
+ #define BOARD_ST7920_DELAY_3 580
+ #endif
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h
index f931d992..f71b7b40 100644
--- a/Marlin/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h
+++ b/Marlin/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h
@@ -21,6 +21,8 @@
*/
#pragma once
+#include "env_validate.h"
+
//#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4
#ifndef BOARD_INFO_NAME
diff --git a/Marlin/Marlin/src/pins/stm32h7/env_validate.h b/Marlin/Marlin/src/pins/stm32h7/env_validate.h
new file mode 100644
index 00000000..0c515e5d
--- /dev/null
+++ b/Marlin/Marlin/src/pins/stm32h7/env_validate.h
@@ -0,0 +1,26 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#if NOT_TARGET(STM32H7)
+ #error "Oops! Select an STM32H7 board in 'Tools > Board.'"
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h
new file mode 100644
index 00000000..13e30591
--- /dev/null
+++ b/Marlin/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h
@@ -0,0 +1,547 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#include "env_validate.h"
+
+#define BOARD_INFO_NAME "OCTOPUS MAX EZ V1.0"
+
+#define USES_DIAG_JUMPERS
+
+// Onboard I2C EEPROM
+#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM)
+ #undef NO_EEPROM_SELECTED
+ #define I2C_EEPROM
+ #define SOFT_I2C_EEPROM // Force the use of Software I2C
+ #define I2C_SCL_PIN PB10
+ #define I2C_SDA_PIN PB11
+ #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
+#endif
+
+// Avoid conflict with TIMER_TONE
+#define STEP_TIMER 8
+
+//
+// Servos
+//
+#define SERVO0_PIN PB14
+
+//
+// Misc. Functions
+//
+#define LED_PIN PA14
+
+//
+// Trinamic Stallguard pins
+//
+#define X_DIAG_PIN PF0 // M1-STOP
+#define Y_DIAG_PIN PF2 // M2-STOP
+#define Z_DIAG_PIN PF4 // M3-STOP
+#define Z2_DIAG_PIN PF3 // M4-STOP
+#define E0_DIAG_PIN PF1 // M5-STOP
+#define E1_DIAG_PIN PC15 // M6-STOP
+#define E2_DIAG_PIN PF12 // PWRDET
+
+//
+// Z Probe (when not Z_MIN_PIN)
+//
+#ifndef Z_MIN_PROBE_PIN
+ #define Z_MIN_PROBE_PIN PB15
+#endif
+
+//
+// Check for additional used endstop pins
+//
+#if HAS_EXTRA_ENDSTOPS
+ #define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES
+ #if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_)
+ #define NEEDS_X_MINMAX
+ #endif
+ #if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_)
+ #define NEEDS_Y_MINMAX
+ #endif
+ #if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_)
+ #define NEEDS_Z_MINMAX
+ #endif
+ #undef _ENDSTOP_IS_ANY
+#endif
+
+//
+// Limit Switches
+//
+#ifdef X_STALL_SENSITIVITY
+ #define X_STOP_PIN X_DIAG_PIN
+ #if X_HOME_TO_MIN
+ #define X_MAX_PIN E0_DIAG_PIN // E0DET
+ #else
+ #define X_MIN_PIN E0_DIAG_PIN // E0DET
+ #endif
+#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX)
+ #ifndef X_MIN_PIN
+ #define X_MIN_PIN X_DIAG_PIN // X-STOP
+ #endif
+ #ifndef X_MAX_PIN
+ #define X_MAX_PIN E0_DIAG_PIN // E0DET
+ #endif
+#else
+ #define X_STOP_PIN X_DIAG_PIN // X-STOP
+#endif
+
+#ifdef Y_STALL_SENSITIVITY
+ #define Y_STOP_PIN Y_DIAG_PIN
+ #if Y_HOME_TO_MIN
+ #define Y_MAX_PIN E1_DIAG_PIN // E1DET
+ #else
+ #define Y_MIN_PIN E1_DIAG_PIN // E1DET
+ #endif
+#elif ENABLED(NEEDS_Y_MINMAX)
+ #ifndef Y_MIN_PIN
+ #define Y_MIN_PIN Y_DIAG_PIN // Y-STOP
+ #endif
+ #ifndef Y_MAX_PIN
+ #define Y_MAX_PIN E1_DIAG_PIN // E1DET
+ #endif
+#else
+ #define Y_STOP_PIN Y_DIAG_PIN // Y-STOP
+#endif
+
+#ifdef Z_STALL_SENSITIVITY
+ #define Z_STOP_PIN Z_DIAG_PIN
+ #if Z_HOME_TO_MIN
+ #define Z_MAX_PIN E2_DIAG_PIN // PWRDET
+ #else
+ #define Z_MIN_PIN E2_DIAG_PIN // PWRDET
+ #endif
+#elif ENABLED(NEEDS_Z_MINMAX)
+ #ifndef Z_MIN_PIN
+ #define Z_MIN_PIN Z_DIAG_PIN // Z-STOP
+ #endif
+ #ifndef Z_MAX_PIN
+ #define Z_MAX_PIN E2_DIAG_PIN // PWRDET
+ #endif
+#else
+ #define Z_STOP_PIN Z_DIAG_PIN // Z-STOP
+#endif
+
+//
+// Filament Runout Sensor
+//
+#define FIL_RUNOUT_PIN PF1 // E0DET
+#define FIL_RUNOUT2_PIN PF15 // E1DET
+
+//
+// Power Supply Control
+//
+#ifndef PS_ON_PIN
+ #define PS_ON_PIN PF13 // PS-ON
+#endif
+
+//
+// Power Loss Detection
+//
+#ifndef POWER_LOSS_PIN
+ #define POWER_LOSS_PIN PF12 // PWRDET
+#endif
+
+//
+// Steppers
+//
+#define X_STEP_PIN PC13 // MOTOR 1
+#define X_DIR_PIN PC14
+#define X_ENABLE_PIN PE6
+#ifndef X_CS_PIN
+ #define X_CS_PIN PG14
+#endif
+
+#define Y_STEP_PIN PE4 // MOTOR 2
+#define Y_DIR_PIN PE5
+#define Y_ENABLE_PIN PE3
+#ifndef Y_CS_PIN
+ #define Y_CS_PIN PG13
+#endif
+
+#define Z_STEP_PIN PE1 // MOTOR 3
+#define Z_DIR_PIN PE0
+#define Z_ENABLE_PIN PE2
+#ifndef Z_CS_PIN
+ #define Z_CS_PIN PG12
+#endif
+
+#define Z2_STEP_PIN PB8 // MOTOR 4
+#define Z2_DIR_PIN PB9
+#define Z2_ENABLE_PIN PB7
+#ifndef Z2_CS_PIN
+ #define Z2_CS_PIN PG11
+#endif
+
+#define E0_STEP_PIN PB5 // MOTOR 5
+#define E0_DIR_PIN PB4
+#define E0_ENABLE_PIN PB6
+#ifndef E0_CS_PIN
+ #define E0_CS_PIN PG10
+#endif
+
+#define E1_STEP_PIN PG15 // MOTOR 6
+#define E1_DIR_PIN PB3
+#define E1_ENABLE_PIN PD5
+#ifndef E1_CS_PIN
+ #define E1_CS_PIN PG9
+#endif
+
+#define E2_STEP_PIN PD3 // MOTOR 7
+#define E2_DIR_PIN PD2
+#define E2_ENABLE_PIN PD4
+#ifndef E2_CS_PIN
+ #define E2_CS_PIN PD7
+#endif
+
+#define E3_STEP_PIN PA10 // MOTOR 8
+#define E3_DIR_PIN PA9
+#define E3_ENABLE_PIN PA15
+#ifndef E3_CS_PIN
+ #define E3_CS_PIN PD6
+#endif
+
+#define E4_STEP_PIN PA8 // MOTOR 9
+#define E4_DIR_PIN PC7
+#define E4_ENABLE_PIN PC9
+#ifndef E4_CS_PIN
+ #define E4_CS_PIN PG8
+#endif
+
+#define E5_STEP_PIN PG6 // MOTOR 10
+#define E5_DIR_PIN PC6
+#define E5_ENABLE_PIN PC8
+#ifndef E5_CS_PIN
+ #define E5_CS_PIN PG7
+#endif
+
+//
+// Temperature Sensors
+//
+#define TEMP_BED_PIN PB1 // TB
+#define TEMP_0_PIN PB0 // TH0
+#define TEMP_1_PIN PC5 // TH1
+#define TEMP_2_PIN PC4 // TH2
+#define TEMP_3_PIN PA7 // TH3
+
+//
+// Heaters / Fans
+//
+#define HEATER_BED_PIN PF5 // Hotbed
+#define HEATER_0_PIN PF6 // Heater0
+#define HEATER_1_PIN PA0 // Heater1
+#define HEATER_2_PIN PF9 // Heater2
+#define HEATER_3_PIN PF7 // Heater3
+
+#define FAN_PIN PA6 // Fan0
+#define FAN1_PIN PA5 // Fan1
+#define FAN2_PIN PA4 // Fan2
+#define FAN3_PIN PA3 // Fan3
+#define FAN4_PIN PA1 // 4 wire Fan4
+#define FAN5_PIN PF8 // 4 wire Fan5
+#define FAN6_PIN PA2 // 4 wire Fan6
+
+//
+// SD Support
+//
+#ifndef SDCARD_CONNECTION
+ #if HAS_WIRED_LCD
+ #define SDCARD_CONNECTION LCD
+ #else
+ #define SDCARD_CONNECTION ONBOARD
+ #endif
+#endif
+
+//
+// Software SPI pins for TMC2130 stepper drivers
+//
+#if ENABLED(TMC_USE_SW_SPI)
+ #ifndef TMC_SW_MOSI
+ #define TMC_SW_MOSI PE14
+ #endif
+ #ifndef TMC_SW_MISO
+ #define TMC_SW_MISO PE13
+ #endif
+ #ifndef TMC_SW_SCK
+ #define TMC_SW_SCK PE12
+ #endif
+#endif
+
+#if HAS_TMC_UART
+ /**
+ * TMC2208/TMC2209 stepper drivers
+ *
+ * Hardware serial communication ports.
+ * If undefined software serial is used according to the pins below
+ */
+ //#define X_HARDWARE_SERIAL Serial1
+ //#define X2_HARDWARE_SERIAL Serial1
+ //#define Y_HARDWARE_SERIAL Serial1
+ //#define Y2_HARDWARE_SERIAL Serial1
+ //#define Z_HARDWARE_SERIAL Serial1
+ //#define Z2_HARDWARE_SERIAL Serial1
+ //#define E0_HARDWARE_SERIAL Serial1
+ //#define E1_HARDWARE_SERIAL Serial1
+ //#define E2_HARDWARE_SERIAL Serial1
+ //#define E3_HARDWARE_SERIAL Serial1
+ //#define E4_HARDWARE_SERIAL Serial1
+
+ #define X_SERIAL_TX_PIN PG14
+ #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
+
+ #define Y_SERIAL_TX_PIN PG13
+ #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
+
+ #define Z_SERIAL_TX_PIN PG12
+ #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
+
+ #define Z2_SERIAL_TX_PIN PG11
+ #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN
+
+ #define E0_SERIAL_TX_PIN PG10
+ #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
+
+ #define E1_SERIAL_TX_PIN PG9
+ #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
+
+ #define E2_SERIAL_TX_PIN PD7
+ #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
+
+ #define E3_SERIAL_TX_PIN PD6
+ #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
+
+ #define E4_SERIAL_TX_PIN PG8
+ #define E4_SERIAL_RX_PIN E3_SERIAL_TX_PIN
+
+ #define E5_SERIAL_TX_PIN PG7
+ #define E5_SERIAL_RX_PIN E3_SERIAL_TX_PIN
+
+ // Reduce baud rate to improve software serial reliability
+ #define TMC_BAUD_RATE 19200
+#endif
+
+/**
+ * ----
+ * (MISO) PE13 | 1 |
+ * (SCK) PE12 | 2 |
+ * (BTN_EN1) PG5 | 3 |
+ * (SD_SS) PE11 | 4 |
+ * (BTN_EN2) PG4 | 5 |
+ * (MOSI) PE14 | 6 |
+ * (SD_DETECT) PG3 | 7 |
+ * RESET | 8 |
+ * (BEEPER) PG2 | 9 |
+ * (BTN_ENC) PD15 | 10 |
+ * (LCD_EN) PD14 | 11 |
+ * (LCD_RS) PD13 | 12 |
+ * (LCD_D4) PD12 | 13 |
+ * (LCD_D5) PD11 | 14 |
+ * (LCD_D6) PD10 | 15 |
+ * (LCD_D7) PE15 | 16 |
+ * GND | 17 |
+ * 5V | 18 |
+ * ----
+ * LCD
+ */
+
+#define EXP1_01_PIN PG2
+#define EXP1_02_PIN PD15
+#define EXP1_03_PIN PD14
+#define EXP1_04_PIN PD13
+#define EXP1_05_PIN PD12
+#define EXP1_06_PIN PD11
+#define EXP1_07_PIN PD10
+#define EXP1_08_PIN PE15
+
+#define EXP2_01_PIN PE13
+#define EXP2_02_PIN PE12
+#define EXP2_03_PIN PG5
+#define EXP2_04_PIN PE11
+#define EXP2_05_PIN PG4
+#define EXP2_06_PIN PE14
+#define EXP2_07_PIN PG3
+#define EXP2_08_PIN -1
+
+//
+// Onboard SD card
+// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
+//
+#if SD_CONNECTION_IS(ONBOARD)
+ #ifndef SD_DETECT_STATE
+ #define SD_DETECT_STATE HIGH
+ #elif SD_DETECT_STATE == LOW
+ #error "BOARD_BTT_OCTOPUS_MAX_EZ onboard SD requires SD_DETECT_STATE set to HIGH."
+ #endif
+ #define SDSS PB12
+ #define SD_SS_PIN SDSS
+ #define SD_SCK_PIN PE12
+ #define SD_MISO_PIN PE13
+ #define SD_MOSI_PIN PE14
+ #define SD_DETECT_PIN PB13
+ #define SOFTWARE_SPI
+#elif SD_CONNECTION_IS(LCD)
+ #define SDSS EXP2_04_PIN
+ #define SD_SS_PIN SDSS
+ #define SD_SCK_PIN EXP2_02_PIN
+ #define SD_MISO_PIN EXP2_01_PIN
+ #define SD_MOSI_PIN EXP2_06_PIN
+ #define SD_DETECT_PIN EXP2_07_PIN
+ #define SOFTWARE_SPI
+#elif SD_CONNECTION_IS(CUSTOM_CABLE)
+ #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
+#endif
+
+//
+// LCDs and Controllers
+//
+#if IS_TFTGLCD_PANEL
+
+ #if ENABLED(TFTGLCD_PANEL_SPI)
+ #define TFTGLCD_CS EXP2_03_PIN
+ #endif
+
+#elif HAS_WIRED_LCD
+
+ #define BEEPER_PIN EXP1_01_PIN
+ #define BTN_ENC EXP1_02_PIN
+
+ #if ENABLED(CR10_STOCKDISPLAY)
+
+ #define LCD_PINS_RS EXP1_07_PIN
+
+ #define BTN_EN1 EXP1_03_PIN
+ #define BTN_EN2 EXP1_05_PIN
+
+ #define LCD_PINS_ENABLE EXP1_08_PIN
+ #define LCD_PINS_D4 EXP1_06_PIN
+
+ #else
+
+ #define LCD_PINS_RS EXP1_04_PIN
+
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
+
+ #define LCD_PINS_ENABLE EXP1_03_PIN
+ #define LCD_PINS_D4 EXP1_05_PIN
+
+ #if ENABLED(FYSETC_MINI_12864)
+ #define DOGLCD_CS EXP1_03_PIN
+ #define DOGLCD_A0 EXP1_04_PIN
+ #define DOGLCD_SCK EXP2_02_PIN
+ #define DOGLCD_MOSI EXP2_06_PIN
+
+ #define SOFTWARE_SPI
+ #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
+ // results in LCD soft SPI mode 3, SD soft SPI mode 0
+ //#define LCD_BACKLIGHT_PIN -1
+ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
+ #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
+ #ifndef RGB_LED_R_PIN
+ #define RGB_LED_R_PIN EXP1_06_PIN
+ #endif
+ #ifndef RGB_LED_G_PIN
+ #define RGB_LED_G_PIN EXP1_07_PIN
+ #endif
+ #ifndef RGB_LED_B_PIN
+ #define RGB_LED_B_PIN EXP1_08_PIN
+ #endif
+ #elif ENABLED(FYSETC_MINI_12864_2_1)
+ #define NEOPIXEL_PIN EXP1_06_PIN
+ #endif
+ #endif // !FYSETC_MINI_12864
+
+ #if IS_ULTIPANEL
+ #define LCD_PINS_D5 EXP1_06_PIN
+ #define LCD_PINS_D6 EXP1_07_PIN
+ #define LCD_PINS_D7 EXP1_08_PIN
+
+ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
+ #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
+ #endif
+
+ #endif
+
+ #endif
+#endif // HAS_WIRED_LCD
+
+// Alter timing for graphical display
+#if IS_U8GLIB_ST7920
+ #define BOARD_ST7920_DELAY_1 120
+ #define BOARD_ST7920_DELAY_2 80
+ #define BOARD_ST7920_DELAY_3 580
+#endif
+
+#if HAS_SPI_TFT
+ #define TFT_CS_PIN EXP2_04_PIN
+ #define TFT_A0_PIN EXP2_07_PIN
+ #define TFT_SCK_PIN EXP2_02_PIN
+ #define TFT_MISO_PIN EXP2_01_PIN
+ #define TFT_MOSI_PIN EXP2_06_PIN
+
+ #define TOUCH_INT_PIN EXP1_07_PIN
+ #define TOUCH_MISO_PIN EXP1_06_PIN
+ #define TOUCH_MOSI_PIN EXP1_03_PIN
+ #define TOUCH_SCK_PIN EXP1_05_PIN
+ #define TOUCH_CS_PIN EXP1_04_PIN
+
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
+ #define BTN_ENC EXP1_02_PIN
+#endif
+
+//
+// NeoPixel LED
+//
+#ifndef NEOPIXEL_PIN
+ #define NEOPIXEL_PIN PE10
+#endif
+
+#ifndef NEOPIXEL2_PIN
+ #define NEOPIXEL2_PIN PE9
+#endif
+
+#if ENABLED(WIFISUPPORT)
+ //
+ // WIFI
+ //
+
+ /**
+ * -------
+ * GND | 9 | | 8 | 3.3V
+ * (ESP-CS) PG1 | 10 | | 7 | PB15 (ESP-MOSI)
+ * 3.3V | 11 | | 6 | PB14 (ESP-MISO)
+ * (ESP-IO0) PG0 | 12 | | 5 | PB13 (ESP-CLK)
+ * (ESP-IO4) PF15 | 13 | | 4 | --
+ * -- | 14 | | 3 | 3.3V (ESP-EN)
+ * (ESP-RX) PE7 | 15 | | 2 | --
+ * (ESP-TX) PE8 | 16 | | 1 | PB2 (ESP-RST)
+ * -------
+ * WIFI
+ */
+ #define ESP_WIFI_MODULE_COM 7 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
+ #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
+ #define ESP_WIFI_MODULE_RESET_PIN PB2
+ #define ESP_WIFI_MODULE_GPIO0_PIN PG0
+ #define ESP_WIFI_MODULE_GPIO4_PIN PF15
+#endif
diff --git a/Marlin/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h b/Marlin/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h
index 1ee7846c..d06e27d9 100644
--- a/Marlin/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h
+++ b/Marlin/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h
@@ -21,9 +21,7 @@
*/
#pragma once
-#if NOT_TARGET(STM32H7)
- #error "Oops! Select an STM32H7 board in 'Tools > Board.'"
-#endif
+#include "env_validate.h"
#define DEFAULT_MACHINE_NAME "Biqu BX"
diff --git a/Marlin/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/Marlin/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h
index eaceafe2..b9e1ff10 100644
--- a/Marlin/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h
+++ b/Marlin/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h
@@ -21,9 +21,7 @@
*/
#pragma once
-#if NOT_TARGET(STM32H7)
- #error "Oops! Select an STM32H7 board in 'Tools > Board.'"
-#endif
+#include "env_validate.h"
// If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION
// https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT
@@ -545,25 +543,27 @@
#define NEOPIXEL_PIN PE6
#endif
-//
-// WIFI
-//
+#if ENABLED(WIFISUPPORT)
+ //
+ // WIFI
+ //
-/**
- * -------
- * GND | 9 | | 8 | 3.3V
- * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI)
- * 3.3V | 11 | | 6 | PB14 (ESP-MISO)
- * (ESP-IO0) PB10 | 12 | | 5 | PB13 (ESP-CLK)
- * (ESP-IO4) PB11 | 13 | | 4 | --
- * -- | 14 | | 3 | 3.3V (ESP-EN)
- * (ESP-RX) PD8 | 15 | | 2 | --
- * (ESP-TX) PD9 | 16 | | 1 | PC14 (ESP-RST)
- * -------
- * WIFI
- */
-#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
-#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
-#define ESP_WIFI_MODULE_RESET_PIN PC14
-#define ESP_WIFI_MODULE_GPIO0_PIN PB10
-#define ESP_WIFI_MODULE_GPIO4_PIN PB11
+ /**
+ * -------
+ * GND | 9 | | 8 | 3.3V
+ * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI)
+ * 3.3V | 11 | | 6 | PB14 (ESP-MISO)
+ * (ESP-IO0) PB10 | 12 | | 5 | PB13 (ESP-CLK)
+ * (ESP-IO4) PB11 | 13 | | 4 | --
+ * -- | 14 | | 3 | 3.3V (ESP-EN)
+ * (ESP-RX) PD8 | 15 | | 2 | --
+ * (ESP-TX) PD9 | 16 | | 1 | PC14 (ESP-RST)
+ * -------
+ * WIFI
+ */
+ #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this
+ #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2
+ #define ESP_WIFI_MODULE_RESET_PIN PC14
+ #define ESP_WIFI_MODULE_GPIO0_PIN PB10
+ #define ESP_WIFI_MODULE_GPIO4_PIN PB11
+#endif
diff --git a/Marlin/Marlin/src/pins/teensy2/pins_5DPRINT.h b/Marlin/Marlin/src/pins/teensy2/pins_5DPRINT.h
index 6e1f9c02..9eb1da36 100644
--- a/Marlin/Marlin/src/pins/teensy2/pins_5DPRINT.h
+++ b/Marlin/Marlin/src/pins/teensy2/pins_5DPRINT.h
@@ -64,6 +64,8 @@
/**
* 5DPrint D8 Driver board pin assignments
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/5DPrint%20D8/5DPD8_v1.0_OS_schematics.PDF
+ * Origin: https://bitbucket.org/makible/5dprint-d8-controller-board/src/master/5DPD8_v1.0_OS_schematics.PDF
*
* https://bitbucket.org/makible/5dprint-d8-controller-board
*/
diff --git a/Marlin/Marlin/src/pins/teensy2/pins_BRAINWAVE.h b/Marlin/Marlin/src/pins/teensy2/pins_BRAINWAVE.h
index cdcc249c..bbda3730 100644
--- a/Marlin/Marlin/src/pins/teensy2/pins_BRAINWAVE.h
+++ b/Marlin/Marlin/src/pins/teensy2/pins_BRAINWAVE.h
@@ -23,9 +23,13 @@
/**
* Brainwave 1.0 pin assignments (AT90USB646)
+ * https://www.reprap.org/wiki/Brainwave
*
* Requires hardware bundle for Arduino:
* https://github.com/unrepentantgeek/brainwave-arduino
+ *
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Brainwave/schematic.pdf
+ * Origin: https://github.com/unrepentantgeek/Brainwave/blob/master/brainwave/brainwave.sch
*/
/**
diff --git a/Marlin/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h b/Marlin/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h
index 319130ef..969ec845 100644
--- a/Marlin/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h
+++ b/Marlin/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h
@@ -26,6 +26,8 @@
*
* Requires hardware bundle for Arduino:
* https://github.com/unrepentantgeek/brainwave-arduino
+ *
+ * Not to be confused with the regular Brainwave controller (https://www.reprap.org/wiki/Brainwave)
*/
/**
diff --git a/Marlin/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h b/Marlin/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h
index ddf0d53e..1fb7387d 100644
--- a/Marlin/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h
+++ b/Marlin/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h
@@ -25,6 +25,15 @@
* Rev B 2 JUN 2017
*
* Converted to Arduino pin numbering
+ *
+ * Schematic (RevA): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.A/schematic.png
+ * Origin (RevA): https://raw.githubusercontent.com/lwalkera/printrboard/revA/Printrboard.sch
+ * Schematic (RevB): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.B/schematic.png
+ * Origin (RevB): https://raw.githubusercontent.com/lwalkera/printrboard/revB/Printrboard.sch
+ * Schematic (RevC): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.C/schematic.png
+ * Origin (RevC): https://raw.githubusercontent.com/lwalkera/printrboard/revC/Printrboard.sch
+ * Schematic (RevD): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.D/schematic.png
+ * Origin (RevD): https://raw.githubusercontent.com/lwalkera/printrboard/RevD/Printrboard.sch
*/
/**
diff --git a/Marlin/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h b/Marlin/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h
index 18673980..5ce106b4 100644
--- a/Marlin/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h
+++ b/Marlin/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h
@@ -25,6 +25,19 @@
* Rev B 2 JUN 2017
*
* Converted to Arduino pin numbering
+ *
+ * Schematic (RevF): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.F/schematic.png
+ * Origin (RevF): https://github.com/lwalkera/printrboard/raw/revF/Printrboard.sch
+ * Schematic (RevF2): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.F2/schematic.png
+ * Origin (RevF2): https://raw.githubusercontent.com/lwalkera/printrboard/revF2/Printrboard.sch
+ * Schematic (RevF3): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.F3/schematic.png
+ * Origin (RevF3): https://raw.githubusercontent.com/lwalkera/printrboard/revF3/Printrboard.sch
+ * Schematic (RevF4): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.F4/schematic.png
+ * Origin (RevF4): https://raw.githubusercontent.com/lwalkera/printrboard/revF4/Printrboard.sch
+ * Schematic (RevF5): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.F5/schematic.png
+ * Origin (RevF5): https://raw.githubusercontent.com/lwalkera/printrboard/revF5/Printrboard.sch
+ * Schematic (RevF6): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Printrboard%20Rev.F6/schematic.png
+ * Origin (RevF6): https://raw.githubusercontent.com/lwalkera/printrboard/revF6/Printrboard.sch
*/
/**
diff --git a/Marlin/Marlin/src/pins/teensy2/pins_SAV_MKI.h b/Marlin/Marlin/src/pins/teensy2/pins_SAV_MKI.h
index cdba5350..a469bba5 100644
--- a/Marlin/Marlin/src/pins/teensy2/pins_SAV_MKI.h
+++ b/Marlin/Marlin/src/pins/teensy2/pins_SAV_MKI.h
@@ -25,6 +25,9 @@
* Rev B 2 JUN 2017
*
* Converted to Arduino pin numbering
+ *
+ * Schematic: https://green-candy.osdn.jp/external/MarlinFW/board_schematics/SAV%20MkI/SAV_MK-I.pdf
+ * Origin: https://reprap.org/mediawiki/images/3/3c/SAV_MK-I.pdf
*/
/**
diff --git a/Marlin/Marlin/src/pins/teensy2/pins_TEENSY2.h b/Marlin/Marlin/src/pins/teensy2/pins_TEENSY2.h
index efb409bf..b95e9cae 100644
--- a/Marlin/Marlin/src/pins/teensy2/pins_TEENSY2.h
+++ b/Marlin/Marlin/src/pins/teensy2/pins_TEENSY2.h
@@ -109,6 +109,7 @@
#include "env_validate.h"
+// https://reprap.org/wiki/Teensy_Breadboard
#define BOARD_INFO_NAME "Teensy++2.0"
//
diff --git a/Marlin/Marlin/src/pins/teensy2/pins_TEENSYLU.h b/Marlin/Marlin/src/pins/teensy2/pins_TEENSYLU.h
index ab722478..294a289c 100644
--- a/Marlin/Marlin/src/pins/teensy2/pins_TEENSYLU.h
+++ b/Marlin/Marlin/src/pins/teensy2/pins_TEENSYLU.h
@@ -24,6 +24,10 @@
* Rev C 2 JUN 2017
*
* Converted to Arduino pin numbering
+ *
+ * Schematic (1.0): https://green-candy.osdn.jp/external/MarlinFW/board_schematics/Teensylu%20v1.0/schematic.png
+ * Origin (1.0): https://raw.githubusercontent.com/StephS/Teensylu/master/working/Teensylu-1.0.sch
+ * (*) Other versions are discouraged by creator.
*/
/**
diff --git a/Marlin/Marlin/src/sd/Sd2Card.cpp b/Marlin/Marlin/src/sd/Sd2Card.cpp
index 2d84c95a..81cc0323 100644
--- a/Marlin/Marlin/src/sd/Sd2Card.cpp
+++ b/Marlin/Marlin/src/sd/Sd2Card.cpp
@@ -345,7 +345,7 @@ bool DiskIODriver_SPI_SD::init(const uint8_t sckRateID, const pin_t chipSelectPi
* \param[out] dst Pointer to the location that will receive the data.
* \return true for success, false for failure.
*/
-bool DiskIODriver_SPI_SD::readBlock(uint32_t blockNumber, uint8_t *dst) {
+bool DiskIODriver_SPI_SD::readBlock(uint32_t blockNumber, uint8_t * const dst) {
#if IS_TEENSY_35_36 || IS_TEENSY_40_41
return 0 == SDHC_CardReadBlock(dst, blockNumber);
#endif
@@ -385,7 +385,7 @@ bool DiskIODriver_SPI_SD::readBlock(uint32_t blockNumber, uint8_t *dst) {
*
* \return true for success, false for failure.
*/
-bool DiskIODriver_SPI_SD::readData(uint8_t *dst) {
+bool DiskIODriver_SPI_SD::readData(uint8_t * const dst) {
chipSelect();
return readData(dst, 512);
}
@@ -455,7 +455,7 @@ bool DiskIODriver_SPI_SD::readData(uint8_t *dst) {
#endif // SD_CHECK_AND_RETRY
-bool DiskIODriver_SPI_SD::readData(uint8_t *dst, const uint16_t count) {
+bool DiskIODriver_SPI_SD::readData(uint8_t * const dst, const uint16_t count) {
bool success = false;
const millis_t read_timeout = millis() + SD_READ_TIMEOUT;
@@ -487,8 +487,8 @@ bool DiskIODriver_SPI_SD::readData(uint8_t *dst, const uint16_t count) {
}
/** read CID or CSR register */
-bool DiskIODriver_SPI_SD::readRegister(const uint8_t cmd, void *buf) {
- uint8_t *dst = reinterpret_cast(buf);
+bool DiskIODriver_SPI_SD::readRegister(const uint8_t cmd, void * const buf) {
+ uint8_t * const dst = reinterpret_cast(buf);
if (cardCommand(cmd, 0)) {
error(SD_CARD_ERROR_READ_REG);
chipDeselect();
@@ -567,7 +567,7 @@ void DiskIODriver_SPI_SD::error(const uint8_t code) { errorCode_ = code; }
* \param[in] src Pointer to the location of the data to be written.
* \return true for success, false for failure.
*/
-bool DiskIODriver_SPI_SD::writeBlock(uint32_t blockNumber, const uint8_t *src) {
+bool DiskIODriver_SPI_SD::writeBlock(uint32_t blockNumber, const uint8_t * const src) {
if (ENABLED(SDCARD_READONLY)) return false;
#if IS_TEENSY_35_36 || IS_TEENSY_40_41
@@ -598,7 +598,7 @@ bool DiskIODriver_SPI_SD::writeBlock(uint32_t blockNumber, const uint8_t *src) {
* \param[in] src Pointer to the location of the data to be written.
* \return true for success, false for failure.
*/
-bool DiskIODriver_SPI_SD::writeData(const uint8_t *src) {
+bool DiskIODriver_SPI_SD::writeData(const uint8_t * const src) {
if (ENABLED(SDCARD_READONLY)) return false;
bool success = true;
@@ -613,7 +613,7 @@ bool DiskIODriver_SPI_SD::writeData(const uint8_t *src) {
}
// Send one block of data for write block or write multiple blocks
-bool DiskIODriver_SPI_SD::writeData(const uint8_t token, const uint8_t *src) {
+bool DiskIODriver_SPI_SD::writeData(const uint8_t token, const uint8_t * const src) {
if (ENABLED(SDCARD_READONLY)) return false;
const uint16_t crc = TERN(SD_CHECK_AND_RETRY, CRC_CCITT(src, 512), 0xFFFF);
diff --git a/Marlin/Marlin/src/sd/Sd2Card.h b/Marlin/Marlin/src/sd/Sd2Card.h
index e0dce02a..23677b24 100644
--- a/Marlin/Marlin/src/sd/Sd2Card.h
+++ b/Marlin/Marlin/src/sd/Sd2Card.h
@@ -143,7 +143,7 @@ class DiskIODriver_SPI_SD : public DiskIODriver {
*
* \return true for success or false for failure.
*/
- bool readCID(cid_t *cid) { return readRegister(CMD10, cid); }
+ bool readCID(cid_t * const cid) { return readRegister(CMD10, cid); }
/**
* Read a card's CSD register. The CSD contains Card-Specific Data that
@@ -153,18 +153,18 @@ class DiskIODriver_SPI_SD : public DiskIODriver {
*
* \return true for success or false for failure.
*/
- inline bool readCSD(csd_t *csd) override { return readRegister(CMD9, csd); }
+ inline bool readCSD(csd_t * const csd) override { return readRegister(CMD9, csd); }
- bool readData(uint8_t *dst) override;
+ bool readData(uint8_t * const dst) override;
bool readStart(uint32_t blockNumber) override;
bool readStop() override;
- bool writeData(const uint8_t *src) override;
- bool writeStart(const uint32_t blockNumber, const uint32_t eraseCount) override;
+ bool writeData(const uint8_t * const src) override;
+ bool writeStart(uint32_t blockNumber, const uint32_t eraseCount) override;
bool writeStop() override;
- bool readBlock(uint32_t block, uint8_t *dst) override;
- bool writeBlock(uint32_t blockNumber, const uint8_t *src) override;
+ bool readBlock(uint32_t blockNumber, uint8_t * const dst) override;
+ bool writeBlock(uint32_t blockNumber, const uint8_t * const src) override;
uint32_t cardSize() override;
@@ -187,11 +187,11 @@ class DiskIODriver_SPI_SD : public DiskIODriver {
}
uint8_t cardCommand(const uint8_t cmd, const uint32_t arg);
- bool readData(uint8_t *dst, const uint16_t count);
- bool readRegister(const uint8_t cmd, void *buf);
+ bool readData(uint8_t * const dst, const uint16_t count);
+ bool readRegister(const uint8_t cmd, void * const buf);
void chipDeselect();
void chipSelect();
inline void type(const uint8_t value) { type_ = value; }
bool waitNotBusy(const millis_t timeout_ms);
- bool writeData(const uint8_t token, const uint8_t *src);
+ bool writeData(const uint8_t token, const uint8_t * const src);
};
diff --git a/Marlin/Marlin/src/sd/SdBaseFile.cpp b/Marlin/Marlin/src/sd/SdBaseFile.cpp
index 1c1e0c7d..2dcbb9fa 100644
--- a/Marlin/Marlin/src/sd/SdBaseFile.cpp
+++ b/Marlin/Marlin/src/sd/SdBaseFile.cpp
@@ -91,7 +91,7 @@ bool SdBaseFile::addDirCluster() {
// cache a file's directory entry
// cache the current "dirBlock_" and return the entry at index "dirIndex_"
// return pointer to cached entry or null for failure
-dir_t* SdBaseFile::cacheDirEntry(uint8_t action) {
+dir_t* SdBaseFile::cacheDirEntry(const uint8_t action) {
if (!vol_->cacheRawBlock(dirBlock_, action)) return nullptr;
return vol_->cache()->dir + dirIndex_;
}
@@ -119,7 +119,7 @@ bool SdBaseFile::close() {
* Reasons for failure include file is not contiguous, file has zero length
* or an I/O error occurred.
*/
-bool SdBaseFile::contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock) {
+bool SdBaseFile::contiguousRange(uint32_t * const bgnBlock, uint32_t * const endBlock) {
// error if no blocks
if (firstCluster_ == 0) return false;
@@ -156,7 +156,7 @@ bool SdBaseFile::contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock) {
* a file is already open, the file already exists, the root
* directory is full or an I/O error.
*/
-bool SdBaseFile::createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size) {
+bool SdBaseFile::createContiguous(SdBaseFile * const dirFile, const char * const path, const uint32_t size) {
if (ENABLED(SDCARD_READONLY)) return false;
uint32_t count;
@@ -301,7 +301,7 @@ bool SdBaseFile::getDosName(char * const name) {
return true;
}
-void SdBaseFile::getpos(filepos_t *pos) {
+void SdBaseFile::getpos(filepos_t * const pos) {
pos->position = curPosition_;
pos->cluster = curCluster_;
}
@@ -337,7 +337,7 @@ void SdBaseFile::ls(uint8_t flags, uint8_t indent) {
// saves 32 bytes on stack for ls recursion
// return 0 - EOF, 1 - normal file, or 2 - directory
-int8_t SdBaseFile::lsPrintNext(uint8_t flags, uint8_t indent) {
+int8_t SdBaseFile::lsPrintNext(const uint8_t flags, const uint8_t indent) {
dir_t dir;
uint8_t w = 0;
@@ -400,7 +400,7 @@ uint8_t lfn_checksum(const uint8_t *name) {
}
// Format directory name field from a 8.3 name string
-bool SdBaseFile::make83Name(const char *str, uint8_t *name, const char **ptr) {
+bool SdBaseFile::make83Name(const char *str, uint8_t * const name, const char **ptr) {
uint8_t n = 7, // Max index until a dot is found
i = 11;
while (i) name[--i] = ' '; // Set whole FILENAME.EXT to spaces
@@ -437,13 +437,11 @@ bool SdBaseFile::make83Name(const char *str, uint8_t *name, const char **ptr) {
* Reasons for failure include this file is already open, \a parent is not a
* directory, \a path is invalid or already exists in \a parent.
*/
-bool SdBaseFile::mkdir(SdBaseFile *parent, const char *path, bool pFlag) {
+bool SdBaseFile::mkdir(SdBaseFile *parent, const char *path, const bool pFlag/*=true*/) {
if (ENABLED(SDCARD_READONLY)) return false;
- uint8_t dname[11];
- SdBaseFile dir1, dir2;
- SdBaseFile *sub = &dir1;
- SdBaseFile *start = parent;
+ SdBaseFile dir1, dir2, *sub = &dir1;
+ SdBaseFile * const start = parent;
#if ENABLED(LONG_FILENAME_WRITE_SUPPORT)
uint8_t dlname[LONG_FILENAME_LENGTH];
@@ -459,6 +457,7 @@ bool SdBaseFile::mkdir(SdBaseFile *parent, const char *path, bool pFlag) {
}
}
+ uint8_t dname[11];
for (;;) {
if (!TERN(LONG_FILENAME_WRITE_SUPPORT, parsePath(path, dname, dlname, &path), make83Name(path, dname, &path))) return false;
while (*path == '/') path++;
@@ -474,7 +473,7 @@ bool SdBaseFile::mkdir(SdBaseFile *parent, const char *path, bool pFlag) {
return mkdir(parent, dname OPTARG(LONG_FILENAME_WRITE_SUPPORT, dlname));
}
-bool SdBaseFile::mkdir(SdBaseFile *parent, const uint8_t dname[11]
+bool SdBaseFile::mkdir(SdBaseFile * const parent, const uint8_t dname[11]
OPTARG(LONG_FILENAME_WRITE_SUPPORT, const uint8_t dlname[LONG_FILENAME_LENGTH])
) {
if (ENABLED(SDCARD_READONLY)) return false;
@@ -541,7 +540,7 @@ bool SdBaseFile::mkdir(SdBaseFile *parent, const uint8_t dname[11]
*
* \return true for success, false for failure.
*/
-bool SdBaseFile::open(const char *path, uint8_t oflag) {
+bool SdBaseFile::open(const char * const path, const uint8_t oflag) {
return open(cwd_, path, oflag);
}
@@ -595,7 +594,7 @@ bool SdBaseFile::open(const char *path, uint8_t oflag) {
* a directory, \a path is invalid, the file does not exist
* or can't be opened in the access mode specified by oflag.
*/
-bool SdBaseFile::open(SdBaseFile *dirFile, const char *path, uint8_t oflag) {
+bool SdBaseFile::open(SdBaseFile * const dirFile, const char *path, const uint8_t oflag) {
uint8_t dname[11];
SdBaseFile dir1, dir2;
SdBaseFile *parent = dirFile, *sub = &dir1;
@@ -627,9 +626,9 @@ bool SdBaseFile::open(SdBaseFile *dirFile, const char *path, uint8_t oflag) {
}
// open with filename in dname and long filename in dlname
-bool SdBaseFile::open(SdBaseFile *dirFile, const uint8_t dname[11]
+bool SdBaseFile::open(SdBaseFile * const dirFile, const uint8_t dname[11]
OPTARG(LONG_FILENAME_WRITE_SUPPORT, const uint8_t dlname[LONG_FILENAME_LENGTH])
- , uint8_t oflag
+ , const uint8_t oflag
) {
bool emptyFound = false, fileFound = false;
uint8_t index = 0;
@@ -703,7 +702,10 @@ bool SdBaseFile::open(SdBaseFile *dirFile, const uint8_t dname[11]
// Get VFat dir entry
pvFat = (vfat_t *) p;
// Get checksum from the last entry of the sequence
- if (pvFat->sequenceNumber & 0x40) lfnChecksum = pvFat->checksum;
+ if (pvFat->sequenceNumber & 0x40) {
+ lfnChecksum = pvFat->checksum;
+ ZERO(lfnName);
+ }
// Get LFN sequence number
lfnSequenceNumber = pvFat->sequenceNumber & 0x1F;
if WITHIN(lfnSequenceNumber, 1, reqEntriesNum) {
@@ -711,6 +713,7 @@ bool SdBaseFile::open(SdBaseFile *dirFile, const uint8_t dname[11]
if (lfnChecksum == pvFat->checksum) {
// Set chunk of LFN from VFAT entry into lfnName
getLFNName(pvFat, (char *)lfnName, lfnSequenceNumber);
+ TERN_(UTF_FILENAME_SUPPORT, convertUtf16ToUtf8((char *)lfnName));
// LFN found?
if (!strncasecmp((char*)dlname, (char*)lfnName, lfnNameLength)) lfnFileFound = true;
}
@@ -872,7 +875,7 @@ bool SdBaseFile::open(SdBaseFile *dirFile, const uint8_t dname[11]
* See open() by path for definition of flags.
* \return true for success or false for failure.
*/
-bool SdBaseFile::open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag) {
+bool SdBaseFile::open(SdBaseFile *dirFile, uint16_t index, const uint8_t oflag) {
vol_ = dirFile->vol_;
// error if already open
@@ -898,7 +901,7 @@ bool SdBaseFile::open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag) {
}
// open a cached directory entry. Assumes vol_ is initialized
-bool SdBaseFile::openCachedEntry(uint8_t dirIndex, uint8_t oflag) {
+bool SdBaseFile::openCachedEntry(const uint8_t dirIndex, const uint8_t oflag) {
dir_t *p;
#if ENABLED(SDCARD_READONLY)
@@ -958,7 +961,7 @@ bool SdBaseFile::openCachedEntry(uint8_t dirIndex, uint8_t oflag) {
* See open() by path for definition of flags.
* \return true for success or false for failure.
*/
-bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) {
+bool SdBaseFile::openNext(SdBaseFile *dirFile, const uint8_t oflag) {
if (!dirFile) return false;
// error if already open
@@ -1012,9 +1015,8 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) {
* \return true if the dirname is a long file name (LFN)
* \return false if the dirname is a short file name 8.3 (SFN)
*/
- bool SdBaseFile::isDirNameLFN(const char *dirname) {
- uint8_t length = strlen(dirname);
- uint8_t idx = length;
+ bool SdBaseFile::isDirNameLFN(const char * const dirname) {
+ uint8_t length = strlen(dirname), idx = length;
bool dotFound = false;
if (idx > 12) return true; // LFN due to filename length > 12 ("filename.ext")
// Check dot(s) position
@@ -1044,7 +1046,7 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) {
* The SFN is without dot ("FILENAMEEXT")
* The LFN is complete ("Filename.ext")
*/
- bool SdBaseFile::parsePath(const char *path, uint8_t *name, uint8_t *lname, const char **ptrNextPath) {
+ bool SdBaseFile::parsePath(const char *path, uint8_t * const name, uint8_t * const lname, const char **ptrNextPath) {
// Init randomizer for SFN generation
randomSeed(millis());
// Parse the LFN
@@ -1132,14 +1134,14 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) {
/**
* Get the LFN filename block from a dir. Get the block in lname at startOffset
*/
- void SdBaseFile::getLFNName(vfat_t *pFatDir, char *lname, uint8_t sequenceNumber) {
- uint8_t startOffset = (sequenceNumber - 1) * FILENAME_LENGTH;
+ void SdBaseFile::getLFNName(vfat_t *pFatDir, char *lname, const uint8_t sequenceNumber) {
+ const uint8_t startOffset = (sequenceNumber - 1) * FILENAME_LENGTH;
LOOP_L_N(i, FILENAME_LENGTH) {
const uint16_t utf16_ch = (i >= 11) ? pFatDir->name3[i - 11] : (i >= 5) ? pFatDir->name2[i - 5] : pFatDir->name1[i];
#if ENABLED(UTF_FILENAME_SUPPORT)
// We can't reconvert to UTF-8 here as UTF-8 is variable-size encoding, but joining LFN blocks
// needs static bytes addressing. So here just store full UTF-16LE words to re-convert later.
- uint16_t idx = (startOffset + i) * 2; // This is fixed as FAT LFN always contain UTF-16LE encoding
+ const uint16_t idx = (startOffset + i) * 2; // This is fixed as FAT LFN always contain UTF-16LE encoding
lname[idx] = utf16_ch & 0xFF;
lname[idx + 1] = (utf16_ch >> 8) & 0xFF;
#else
@@ -1152,9 +1154,9 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) {
/**
* Set the LFN filename block lname to a dir. Put the block based on sequence number
*/
- void SdBaseFile::setLFNName(vfat_t *pFatDir, char *lname, uint8_t sequenceNumber) {
- uint8_t startOffset = (sequenceNumber - 1) * FILENAME_LENGTH;
- uint8_t nameLength = strlen(lname);
+ void SdBaseFile::setLFNName(vfat_t *pFatDir, char *lname, const uint8_t sequenceNumber) {
+ const uint8_t startOffset = (sequenceNumber - 1) * FILENAME_LENGTH,
+ nameLength = strlen(lname);
LOOP_L_N(i, FILENAME_LENGTH) {
uint16_t ch = 0;
if ((startOffset + i) < nameLength)
@@ -1301,7 +1303,7 @@ static void print2u(const uint8_t v) {
* \param[in] pr Print stream for output.
* \param[in] fatDate The date field from a directory entry.
*/
-void SdBaseFile::printFatDate(uint16_t fatDate) {
+void SdBaseFile::printFatDate(const uint16_t fatDate) {
SERIAL_ECHO(FAT_YEAR(fatDate));
SERIAL_CHAR('-');
print2u(FAT_MONTH(fatDate));
@@ -1318,7 +1320,7 @@ void SdBaseFile::printFatDate(uint16_t fatDate) {
* \param[in] pr Print stream for output.
* \param[in] fatTime The time field from a directory entry.
*/
-void SdBaseFile::printFatTime(uint16_t fatTime) {
+void SdBaseFile::printFatTime(const uint16_t fatTime) {
print2u(FAT_HOUR(fatTime));
SERIAL_CHAR(':');
print2u(FAT_MINUTE(fatTime));
@@ -1363,7 +1365,7 @@ int16_t SdBaseFile::read() {
* read() called before a file has been opened, corrupt file system
* or an I/O error occurred.
*/
-int16_t SdBaseFile::read(void *buf, uint16_t nbyte) {
+int16_t SdBaseFile::read(void * const buf, uint16_t nbyte) {
uint8_t *dst = reinterpret_cast(buf);
uint16_t offset, toRead;
uint32_t block; // raw device block number
@@ -1425,7 +1427,7 @@ int16_t SdBaseFile::read(void *buf, uint16_t nbyte) {
* readDir() called before a directory has been opened, this is not
* a directory file or an I/O error occurred.
*/
-int8_t SdBaseFile::readDir(dir_t *dir, char *longFilename) {
+int8_t SdBaseFile::readDir(dir_t * const dir, char * const longFilename) {
int16_t n;
// if not a directory file or miss-positioned return an error
if (!isDir() || (0x1F & curPosition_)) return -1;
@@ -1507,44 +1509,55 @@ int8_t SdBaseFile::readDir(dir_t *dir, char *longFilename) {
// Post-process normal file or subdirectory longname, if any
if (DIR_IS_FILE_OR_SUBDIR(dir)) {
#if ENABLED(UTF_FILENAME_SUPPORT)
- #if LONG_FILENAME_CHARSIZE > 2
- // Add warning for developers for currently not supported 3-byte cases (Conversion series of 2-byte
- // codepoints to 3-byte in-place will break the rest of filename)
- #error "Currently filename re-encoding is done in-place. It may break the remaining chars to use 3-byte codepoints."
- #endif
-
// Is there a long filename to decode?
if (longFilename) {
- // Reset n to the start of the long name
- n = 0;
- for (uint16_t idx = 0; idx < (LONG_FILENAME_LENGTH) / 2; idx += 2) { // idx is fixed since FAT LFN always contains UTF-16LE encoding
- const uint16_t utf16_ch = longFilename[idx] | (longFilename[idx + 1] << 8);
- if (0xD800 == (utf16_ch & 0xF800)) // Surrogate pair - encode as '_'
- longFilename[n++] = '_';
- else if (0 == (utf16_ch & 0xFF80)) // Encode as 1-byte UTF-8 char
- longFilename[n++] = utf16_ch & 0x007F;
- else if (0 == (utf16_ch & 0xF800)) { // Encode as 2-byte UTF-8 char
- longFilename[n++] = 0xC0 | ((utf16_ch >> 6) & 0x1F);
- longFilename[n++] = 0x80 | ( utf16_ch & 0x3F);
- }
- else {
- #if LONG_FILENAME_CHARSIZE > 2 // Encode as 3-byte UTF-8 char
- longFilename[n++] = 0xE0 | ((utf16_ch >> 12) & 0x0F);
- longFilename[n++] = 0xC0 | ((utf16_ch >> 6) & 0x3F);
- longFilename[n++] = 0xC0 | ( utf16_ch & 0x3F);
- #else // Encode as '_'
- longFilename[n++] = '_';
- #endif
- }
- if (0 == utf16_ch) break; // End of filename
- } // idx
- } // longFilename
+ n = convertUtf16ToUtf8(longFilename);
+ }
#endif
return n;
} // DIR_IS_FILE_OR_SUBDIR
}
}
+#if ENABLED(UTF_FILENAME_SUPPORT)
+
+ uint8_t SdBaseFile::convertUtf16ToUtf8(char * const longFilename) {
+ #if LONG_FILENAME_CHARSIZE > 2
+ // Add warning for developers for unsupported 3-byte cases.
+ // (Converting 2-byte codepoints to 3-byte in-place would break the rest of filename.)
+ #error "Currently filename re-encoding is done in-place. It may break the remaining chars to use 3-byte codepoints."
+ #endif
+
+ int16_t n;
+ // Reset n to the start of the long name
+ n = 0;
+ for (uint16_t idx = 0; idx < (LONG_FILENAME_LENGTH); idx += 2) { // idx is fixed since FAT LFN always contains UTF-16LE encoding
+ const uint16_t utf16_ch = longFilename[idx] | (longFilename[idx + 1] << 8);
+ if (0xD800 == (utf16_ch & 0xF800)) // Surrogate pair - encode as '_'
+ longFilename[n++] = '_';
+ else if (0 == (utf16_ch & 0xFF80)) // Encode as 1-byte UTF-8 char
+ longFilename[n++] = utf16_ch & 0x007F;
+ else if (0 == (utf16_ch & 0xF800)) { // Encode as 2-byte UTF-8 char
+ longFilename[n++] = 0xC0 | ((utf16_ch >> 6) & 0x1F);
+ longFilename[n++] = 0x80 | ( utf16_ch & 0x3F);
+ }
+ else {
+ #if LONG_FILENAME_CHARSIZE > 2 // Encode as 3-byte UTF-8 char
+ longFilename[n++] = 0xE0 | ((utf16_ch >> 12) & 0x0F);
+ longFilename[n++] = 0xC0 | ((utf16_ch >> 6) & 0x3F);
+ longFilename[n++] = 0xC0 | ( utf16_ch & 0x3F);
+ #else // Encode as '_'
+ longFilename[n++] = '_';
+ #endif
+ }
+ if (0 == utf16_ch) break; // End of filename
+ } // idx
+
+ return n;
+ }
+
+#endif // UTF_FILENAME_SUPPORT
+
// Read next directory entry into the cache
// Assumes file is correctly positioned
dir_t* SdBaseFile::readDirCache() {
@@ -1661,13 +1674,35 @@ bool SdBaseFile::remove() {
* \a dirFile is not a directory, \a path is not found
* or an I/O error occurred.
*/
-bool SdBaseFile::remove(SdBaseFile *dirFile, const char *path) {
+bool SdBaseFile::remove(SdBaseFile * const dirFile, const char * const path) {
if (ENABLED(SDCARD_READONLY)) return false;
SdBaseFile file;
return file.open(dirFile, path, O_WRITE) ? file.remove() : false;
}
+bool SdBaseFile::hide(const bool hidden) {
+ if (ENABLED(SDCARD_READONLY)) return false;
+ // must be an open file or subdirectory
+ if (!(isFile() || isSubDir())) return false;
+ // sync() and cache directory entry
+ sync();
+ dir_t *d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE);
+ if (!d) return false;
+ uint8_t a = d->attributes;
+ if (hidden)
+ a |= DIR_ATT_HIDDEN;
+ else
+ a &= ~DIR_ATT_HIDDEN;
+
+ if (a != d->attributes) {
+ d->attributes = a;
+ return vol_->cacheFlush();
+ }
+
+ return true;
+}
+
/**
* Rename a file or subdirectory.
*
@@ -1678,7 +1713,7 @@ bool SdBaseFile::remove(SdBaseFile *dirFile, const char *path) {
* Reasons for failure include \a dirFile is not open or is not a directory
* file, newPath is invalid or already exists, or an I/O error occurs.
*/
-bool SdBaseFile::rename(SdBaseFile *dirFile, const char *newPath) {
+bool SdBaseFile::rename(SdBaseFile * const dirFile, const char * const newPath) {
if (ENABLED(SDCARD_READONLY)) return false;
uint32_t dirCluster = 0;
@@ -1863,7 +1898,7 @@ bool SdBaseFile::rmRfStar() {
* \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
* OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
*/
-SdBaseFile::SdBaseFile(const char *path, uint8_t oflag) {
+SdBaseFile::SdBaseFile(const char * const path, const uint8_t oflag) {
type_ = FAT_FILE_TYPE_CLOSED;
writeError = false;
open(path, oflag);
@@ -1906,7 +1941,7 @@ bool SdBaseFile::seekSet(const uint32_t pos) {
return true;
}
-void SdBaseFile::setpos(filepos_t *pos) {
+void SdBaseFile::setpos(filepos_t * const pos) {
curPosition_ = pos->position;
curCluster_ = pos->cluster;
}
@@ -1961,7 +1996,7 @@ bool SdBaseFile::sync() {
*
* \return true for success, false for failure.
*/
-bool SdBaseFile::timestamp(SdBaseFile *file) {
+bool SdBaseFile::timestamp(SdBaseFile * const file) {
dir_t dir;
// get timestamps
@@ -2018,8 +2053,8 @@ bool SdBaseFile::timestamp(SdBaseFile *file) {
*
* \return true for success, false for failure.
*/
-bool SdBaseFile::timestamp(uint8_t flags, uint16_t year, uint8_t month,
- uint8_t day, uint8_t hour, uint8_t minute, uint8_t second) {
+bool SdBaseFile::timestamp(const uint8_t flags, const uint16_t year, const uint8_t month,
+ const uint8_t day, const uint8_t hour, const uint8_t minute, const uint8_t second) {
if (ENABLED(SDCARD_READONLY)) return false;
uint16_t dirDate, dirTime;
@@ -2133,7 +2168,7 @@ bool SdBaseFile::truncate(uint32_t length) {
* include write() is called before a file has been opened, write is called
* for a read-only file, device is full, a corrupt file system or an I/O error.
*/
-int16_t SdBaseFile::write(const void *buf, uint16_t nbyte) {
+int16_t SdBaseFile::write(const void *buf, const uint16_t nbyte) {
#if ENABLED(SDCARD_READONLY)
writeError = true; return -1;
#endif
diff --git a/Marlin/Marlin/src/sd/SdBaseFile.h b/Marlin/Marlin/src/sd/SdBaseFile.h
index bda44c6b..3ac23138 100644
--- a/Marlin/Marlin/src/sd/SdBaseFile.h
+++ b/Marlin/Marlin/src/sd/SdBaseFile.h
@@ -89,7 +89,7 @@ uint8_t const FAT_FILE_TYPE_CLOSED = 0, // This file h
*
* \return Packed date for dir_t entry.
*/
-static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) { return (year - 1980) << 9 | month << 5 | day; }
+static inline uint16_t FAT_DATE(const uint16_t year, const uint8_t month, const uint8_t day) { return (year - 1980) << 9 | month << 5 | day; }
/**
* year part of FAT directory date field
@@ -97,7 +97,7 @@ static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) { ret
*
* \return Extracted year [1980,2107]
*/
-static inline uint16_t FAT_YEAR(uint16_t fatDate) { return 1980 + (fatDate >> 9); }
+static inline uint16_t FAT_YEAR(const uint16_t fatDate) { return 1980 + (fatDate >> 9); }
/**
* month part of FAT directory date field
@@ -105,7 +105,7 @@ static inline uint16_t FAT_YEAR(uint16_t fatDate) { return 1980 + (fatDate >> 9)
*
* \return Extracted month [1,12]
*/
-static inline uint8_t FAT_MONTH(uint16_t fatDate) { return (fatDate >> 5) & 0xF; }
+static inline uint8_t FAT_MONTH(const uint16_t fatDate) { return (fatDate >> 5) & 0xF; }
/**
* day part of FAT directory date field
@@ -113,7 +113,7 @@ static inline uint8_t FAT_MONTH(uint16_t fatDate) { return (fatDate >> 5) & 0xF;
*
* \return Extracted day [1,31]
*/
-static inline uint8_t FAT_DAY(uint16_t fatDate) { return fatDate & 0x1F; }
+static inline uint8_t FAT_DAY(const uint16_t fatDate) { return fatDate & 0x1F; }
/**
* time field for FAT directory entry
@@ -123,7 +123,7 @@ static inline uint8_t FAT_DAY(uint16_t fatDate) { return fatDate & 0x1F; }
*
* \return Packed time for dir_t entry.
*/
-static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) { return hour << 11 | minute << 5 | second >> 1; }
+static inline uint16_t FAT_TIME(const uint8_t hour, const uint8_t minute, const uint8_t second) { return hour << 11 | minute << 5 | second >> 1; }
/**
* hour part of FAT directory time field
@@ -131,7 +131,7 @@ static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) {
*
* \return Extracted hour [0,23]
*/
-static inline uint8_t FAT_HOUR(uint16_t fatTime) { return fatTime >> 11; }
+static inline uint8_t FAT_HOUR(const uint16_t fatTime) { return fatTime >> 11; }
/**
* minute part of FAT directory time field
@@ -139,7 +139,7 @@ static inline uint8_t FAT_HOUR(uint16_t fatTime) { return fatTime >> 11; }
*
* \return Extracted minute [0,59]
*/
-static inline uint8_t FAT_MINUTE(uint16_t fatTime) { return (fatTime >> 5) & 0x3F; }
+static inline uint8_t FAT_MINUTE(const uint16_t fatTime) { return (fatTime >> 5) & 0x3F; }
/**
* second part of FAT directory time field
@@ -149,7 +149,7 @@ static inline uint8_t FAT_MINUTE(uint16_t fatTime) { return (fatTime >> 5) & 0x3
*
* \return Extracted second [0,58]
*/
-static inline uint8_t FAT_SECOND(uint16_t fatTime) { return 2 * (fatTime & 0x1F); }
+static inline uint8_t FAT_SECOND(const uint16_t fatTime) { return 2 * (fatTime & 0x1F); }
// Default date for file timestamps is 1 Jan 2000
uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1;
@@ -163,7 +163,7 @@ uint16_t const FAT_DEFAULT_TIME = (1 << 11);
class SdBaseFile {
public:
SdBaseFile() : writeError(false), type_(FAT_FILE_TYPE_CLOSED) {}
- SdBaseFile(const char *path, uint8_t oflag);
+ SdBaseFile(const char * const path, const uint8_t oflag);
~SdBaseFile() { if (isOpen()) close(); }
/**
@@ -179,18 +179,17 @@ class SdBaseFile {
* get position for streams
* \param[out] pos struct to receive position
*/
- void getpos(filepos_t *pos);
+ void getpos(filepos_t * const pos);
/**
* set position for streams
* \param[out] pos struct with value for new position
*/
- void setpos(filepos_t *pos);
+ void setpos(filepos_t * const pos);
bool close();
- bool contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock);
- bool createContiguous(SdBaseFile *dirFile,
- const char *path, uint32_t size);
+ bool contiguousRange(uint32_t * const bgnBlock, uint32_t * const endBlock);
+ bool createContiguous(SdBaseFile * const dirFile, const char * const path, const uint32_t size);
/**
* \return The current cluster number for a file or directory.
*/
@@ -235,7 +234,7 @@ class SdBaseFile {
* See the timestamp() function.
*/
static void dateTimeCallback(
- void (*dateTime)(uint16_t *date, uint16_t *time)) {
+ void (*dateTime)(uint16_t * const date, uint16_t * const time)) {
dateTime_ = dateTime;
}
@@ -246,7 +245,7 @@ class SdBaseFile {
bool dirEntry(dir_t *dir);
static void dirName(const dir_t& dir, char *name);
bool exists(const char *name);
- int16_t fgets(char *str, int16_t num, char *delim = 0);
+ int16_t fgets(char *str, int16_t num, char *delim=0);
/**
* \return The total number of bytes in a file or directory.
@@ -284,32 +283,37 @@ class SdBaseFile {
bool isRoot() const { return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32; }
bool getDosName(char * const name);
- void ls(uint8_t flags = 0, uint8_t indent = 0);
-
- bool mkdir(SdBaseFile *dir, const char *path, bool pFlag = true);
- bool open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag);
- bool open(SdBaseFile *dirFile, const char *path, uint8_t oflag);
- bool open(const char *path, uint8_t oflag = O_READ);
- bool openNext(SdBaseFile *dirFile, uint8_t oflag);
- bool openRoot(SdVolume *vol);
+ void ls(uint8_t flags=0, uint8_t indent=0);
+
+ bool mkdir(SdBaseFile *parent, const char *path, const bool pFlag=true);
+ bool open(SdBaseFile * const dirFile, uint16_t index, const uint8_t oflag);
+ bool open(SdBaseFile * const dirFile, const char *path, const uint8_t oflag);
+ bool open(const char * const path, const uint8_t oflag=O_READ);
+ bool openNext(SdBaseFile * const dirFile, const uint8_t oflag);
+ bool openRoot(SdVolume * const vol);
int peek();
- static void printFatDate(uint16_t fatDate);
- static void printFatTime(uint16_t fatTime);
+ static void printFatDate(const uint16_t fatDate);
+ static void printFatTime(const uint16_t fatTime);
bool printName();
int16_t read();
- int16_t read(void *buf, uint16_t nbyte);
- int8_t readDir(dir_t *dir, char *longFilename);
- static bool remove(SdBaseFile *dirFile, const char *path);
+ int16_t read(void * const buf, uint16_t nbyte);
+ int8_t readDir(dir_t * const dir, char * const longFilename);
+ static bool remove(SdBaseFile * const dirFile, const char * const path);
bool remove();
/**
* Set the file's current position to zero.
*/
void rewind() { seekSet(0); }
- bool rename(SdBaseFile *dirFile, const char *newPath);
+ bool rename(SdBaseFile * const dirFile, const char * const newPath);
bool rmdir();
bool rmRfStar();
+ /**
+ * Set or clear DIR_ATT_HIDDEN attribute for directory entry
+ */
+ bool hide(const bool hidden);
+
/**
* Set the files position to current position + \a pos. See seekSet().
* \param[in] offset The new position in bytes from the current position.
@@ -322,12 +326,12 @@ class SdBaseFile {
* \param[in] offset The new position in bytes from end-of-file.
* \return true for success or false for failure.
*/
- bool seekEnd(const int32_t offset = 0) { return seekSet(fileSize_ + offset); }
+ bool seekEnd(const int32_t offset=0) { return seekSet(fileSize_ + offset); }
bool seekSet(const uint32_t pos);
bool sync();
- bool timestamp(SdBaseFile *file);
- bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day,
- uint8_t hour, uint8_t minute, uint8_t second);
+ bool timestamp(SdBaseFile * const file);
+ bool timestamp(const uint8_t flag, const uint16_t year, const uint8_t month, const uint8_t day,
+ const uint8_t hour, const uint8_t minute, const uint8_t second);
/**
* Type of file. Use isFile() or isDir() instead of type() if possible.
@@ -341,7 +345,7 @@ class SdBaseFile {
* \return SdVolume that contains this file.
*/
SdVolume* volume() const { return vol_; }
- int16_t write(const void *buf, uint16_t nbyte);
+ int16_t write(const void *buf, const uint16_t nbyte);
private:
friend class SdFat; // allow SdFat to set cwd_
@@ -374,29 +378,31 @@ class SdBaseFile {
// private functions
bool addCluster();
bool addDirCluster();
- dir_t* cacheDirEntry(uint8_t action);
- int8_t lsPrintNext(uint8_t flags, uint8_t indent);
- static bool make83Name(const char *str, uint8_t *name, const char **ptr);
- bool mkdir(SdBaseFile *parent, const uint8_t dname[11]
+ dir_t* cacheDirEntry(const uint8_t action);
+ int8_t lsPrintNext(const uint8_t flags, const uint8_t indent);
+ static bool make83Name(const char *str, uint8_t * const name, const char **ptr);
+ bool mkdir(SdBaseFile * const parent, const uint8_t dname[11]
OPTARG(LONG_FILENAME_WRITE_SUPPORT, const uint8_t dlname[LONG_FILENAME_LENGTH])
);
bool open(SdBaseFile *dirFile, const uint8_t dname[11]
OPTARG(LONG_FILENAME_WRITE_SUPPORT, const uint8_t dlname[LONG_FILENAME_LENGTH])
- , uint8_t oflag
+ , const uint8_t oflag
);
- bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags);
+ bool openCachedEntry(const uint8_t dirIndex, const uint8_t oflags);
dir_t* readDirCache();
+ #if ENABLED(UTF_FILENAME_SUPPORT)
+ uint8_t convertUtf16ToUtf8(char * const longFilename);
+ #endif
+
// Long Filename create/write support
#if ENABLED(LONG_FILENAME_WRITE_SUPPORT)
static bool isDirLFN(const dir_t* dir);
- static bool isDirNameLFN(const char *dirname);
- static bool parsePath(const char *str, uint8_t *name, uint8_t *lname, const char **ptr);
- /**
- * Return the number of entries needed in the FAT for this LFN
- */
- static inline uint8_t getLFNEntriesNum(const char *lname) { return (strlen(lname) + 12) / 13; }
- static void getLFNName(vfat_t *vFatDir, char *lname, uint8_t startOffset);
- static void setLFNName(vfat_t *vFatDir, char *lname, uint8_t lfnSequenceNumber);
+ static bool isDirNameLFN(const char * const dirname);
+ static bool parsePath(const char *str, uint8_t * const name, uint8_t * const lname, const char **ptr);
+ // Return the number of entries needed in the FAT for this LFN
+ static uint8_t getLFNEntriesNum(const char * const lname) { return (strlen(lname) + 12) / 13; }
+ static void getLFNName(vfat_t *vFatDir, char *lname, const uint8_t sequenceNumber);
+ static void setLFNName(vfat_t *vFatDir, char *lname, const uint8_t sequenceNumber);
#endif
};
diff --git a/Marlin/Marlin/src/sd/SdFatStructs.h b/Marlin/Marlin/src/sd/SdFatStructs.h
index 03bbc1c1..b3f94b57 100644
--- a/Marlin/Marlin/src/sd/SdFatStructs.h
+++ b/Marlin/Marlin/src/sd/SdFatStructs.h
@@ -66,9 +66,9 @@ struct partitionTable {
* Sector part of Cylinder-head-sector address of the first block in
* the partition. Legal values are 1-63. Only used in old PC BIOS.
*/
- unsigned beginSector : 6;
+ uint8_t beginSector : 6;
/** High bits cylinder for first block in partition. */
- unsigned beginCylinderHigh : 2;
+ uint8_t beginCylinderHigh : 2;
/**
* Combine beginCylinderLow with beginCylinderHigh. Legal values
* are 0-1023. Only used in old PC BIOS.
@@ -88,9 +88,9 @@ struct partitionTable {
* Sector part of cylinder-head-sector address of the last sector in
* the partition. Legal values are 1-63. Only used in old PC BIOS.
*/
- unsigned endSector : 6;
+ uint8_t endSector : 6;
/** High bits of end cylinder */
- unsigned endCylinderHigh : 2;
+ uint8_t endCylinderHigh : 2;
/**
* Combine endCylinderLow with endCylinderHigh. Legal values
* are 0-1023. Only used in old PC BIOS.
diff --git a/Marlin/Marlin/src/sd/SdFile.cpp b/Marlin/Marlin/src/sd/SdFile.cpp
index bce96ef0..a1dd7937 100644
--- a/Marlin/Marlin/src/sd/SdFile.cpp
+++ b/Marlin/Marlin/src/sd/SdFile.cpp
@@ -43,7 +43,7 @@
* \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
* OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
*/
-SdFile::SdFile(const char *path, uint8_t oflag) : SdBaseFile(path, oflag) { }
+SdFile::SdFile(const char * const path, const uint8_t oflag) : SdBaseFile(path, oflag) { }
/**
* Write data to an open file.
@@ -60,25 +60,21 @@ SdFile::SdFile(const char *path, uint8_t oflag) : SdBaseFile(path, oflag) { }
* include write() is called before a file has been opened, write is called
* for a read-only file, device is full, a corrupt file system or an I/O error.
*/
-int16_t SdFile::write(const void *buf, uint16_t nbyte) { return SdBaseFile::write(buf, nbyte); }
+int16_t SdFile::write(const void * const buf, const uint16_t nbyte) { return SdBaseFile::write(buf, nbyte); }
/**
* Write a byte to a file. Required by the Arduino Print class.
* \param[in] b the byte to be written.
* Use writeError to check for errors.
*/
-#if ARDUINO >= 100
- size_t SdFile::write(uint8_t b) { return SdBaseFile::write(&b, 1); }
-#else
- void SdFile::write(uint8_t b) { SdBaseFile::write(&b, 1); }
-#endif
+size_t SdFile::write(const uint8_t b) { return SdBaseFile::write(&b, 1); }
/**
* Write a string to a file. Used by the Arduino Print class.
* \param[in] str Pointer to the string.
* Use writeError to check for errors.
*/
-void SdFile::write(const char *str) { SdBaseFile::write(str, strlen(str)); }
+void SdFile::write(const char * const str) { SdBaseFile::write(str, strlen(str)); }
/**
* Write a PROGMEM string to a file.
@@ -94,7 +90,7 @@ void SdFile::write_P(PGM_P str) {
* \param[in] str Pointer to the PROGMEM string.
* Use writeError to check for errors.
*/
-void SdFile::writeln_P(PGM_P str) {
+void SdFile::writeln_P(PGM_P const str) {
write_P(str);
write_P(PSTR("\r\n"));
}
diff --git a/Marlin/Marlin/src/sd/SdFile.h b/Marlin/Marlin/src/sd/SdFile.h
index 1ff05828..cdce1ffe 100644
--- a/Marlin/Marlin/src/sd/SdFile.h
+++ b/Marlin/Marlin/src/sd/SdFile.h
@@ -41,15 +41,12 @@
class SdFile : public SdBaseFile {
public:
SdFile() {}
- SdFile(const char *name, uint8_t oflag);
- #if ARDUINO >= 100
- size_t write(uint8_t b);
- #else
- void write(uint8_t b);
- #endif
-
- int16_t write(const void *buf, uint16_t nbyte);
- void write(const char *str);
+ SdFile(const char * const name, const uint8_t oflag);
+ size_t write(const uint8_t b);
+ int16_t write(const void * const buf, const uint16_t nbyte);
+ void write(const char * const str);
void write_P(PGM_P str);
- void writeln_P(PGM_P str);
+ void writeln_P(PGM_P const str);
};
+
+using MediaFile = SdFile;
diff --git a/Marlin/Marlin/src/sd/SdVolume.cpp b/Marlin/Marlin/src/sd/SdVolume.cpp
index 1b1fdc5a..8c06c745 100644
--- a/Marlin/Marlin/src/sd/SdVolume.cpp
+++ b/Marlin/Marlin/src/sd/SdVolume.cpp
@@ -47,7 +47,7 @@
#endif
// find a contiguous group of clusters
-bool SdVolume::allocContiguous(uint32_t count, uint32_t *curCluster) {
+bool SdVolume::allocContiguous(const uint32_t count, uint32_t * const curCluster) {
if (ENABLED(SDCARD_READONLY)) return false;
// start of group
@@ -138,7 +138,7 @@ bool SdVolume::cacheFlush() {
return true;
}
-bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) {
+bool SdVolume::cacheRawBlock(const uint32_t blockNumber, const bool dirty) {
if (cacheBlockNumber_ != blockNumber) {
if (!cacheFlush()) return false;
if (!sdCard_->readBlock(blockNumber, cacheBuffer_.data)) return false;
@@ -149,7 +149,7 @@ bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) {
}
// return the size in bytes of a cluster chain
-bool SdVolume::chainSize(uint32_t cluster, uint32_t *size) {
+bool SdVolume::chainSize(uint32_t cluster, uint32_t * const size) {
uint32_t s = 0;
do {
if (!fatGet(cluster, &cluster)) return false;
@@ -160,7 +160,7 @@ bool SdVolume::chainSize(uint32_t cluster, uint32_t *size) {
}
// Fetch a FAT entry
-bool SdVolume::fatGet(uint32_t cluster, uint32_t *value) {
+bool SdVolume::fatGet(const uint32_t cluster, uint32_t * const value) {
uint32_t lba;
if (cluster > (clusterCount_ + 1)) return false;
if (FAT12_SUPPORT && fatType_ == 12) {
@@ -195,7 +195,7 @@ bool SdVolume::fatGet(uint32_t cluster, uint32_t *value) {
}
// Store a FAT entry
-bool SdVolume::fatPut(uint32_t cluster, uint32_t value) {
+bool SdVolume::fatPut(const uint32_t cluster, const uint32_t value) {
if (ENABLED(SDCARD_READONLY)) return false;
uint32_t lba;
@@ -326,7 +326,7 @@ int32_t SdVolume::freeClusterCount() {
* Reasons for failure include not finding a valid partition, not finding a valid
* FAT file system in the specified partition or an I/O error.
*/
-bool SdVolume::init(DiskIODriver* dev, uint8_t part) {
+bool SdVolume::init(DiskIODriver * const dev, const uint8_t part) {
uint32_t totalBlocks, volumeStartBlock = 0;
fat32_boot_t *fbs;
diff --git a/Marlin/Marlin/src/sd/SdVolume.h b/Marlin/Marlin/src/sd/SdVolume.h
index 924c75a9..318661cd 100644
--- a/Marlin/Marlin/src/sd/SdVolume.h
+++ b/Marlin/Marlin/src/sd/SdVolume.h
@@ -99,8 +99,8 @@ class SdVolume {
* Reasons for failure include not finding a valid partition, not finding
* a valid FAT file system or an I/O error.
*/
- bool init(DiskIODriver *dev) { return init(dev, 1) || init(dev, 0); }
- bool init(DiskIODriver *dev, uint8_t part);
+ bool init(DiskIODriver * const dev) { return init(dev, 1) || init(dev, 0); }
+ bool init(DiskIODriver * const dev, const uint8_t part);
// inline functions that return volume info
uint8_t blocksPerCluster() const { return blocksPerCluster_; } //> \return The volume's cluster size in blocks.
@@ -133,7 +133,7 @@ class SdVolume {
* \param[out] v value of entry
* \return true for success or false for failure
*/
- bool dbgFat(uint32_t n, uint32_t *v) { return fatGet(n, v); }
+ bool dbgFat(const uint32_t n, uint32_t * const v) { return fatGet(n, v); }
private:
// Allow SdBaseFile access to SdVolume private data.
@@ -170,20 +170,20 @@ class SdVolume {
uint16_t rootDirEntryCount_; // number of entries in FAT16 root dir
uint32_t rootDirStart_; // root start block for FAT16, cluster for FAT32
- bool allocContiguous(uint32_t count, uint32_t *curCluster);
- uint8_t blockOfCluster(uint32_t position) const { return (position >> 9) & (blocksPerCluster_ - 1); }
- uint32_t clusterStartBlock(uint32_t cluster) const { return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_); }
- uint32_t blockNumber(uint32_t cluster, uint32_t position) const { return clusterStartBlock(cluster) + blockOfCluster(position); }
+ bool allocContiguous(const uint32_t count, uint32_t * const curCluster);
+ uint8_t blockOfCluster(const uint32_t position) const { return (position >> 9) & (blocksPerCluster_ - 1); }
+ uint32_t clusterStartBlock(const uint32_t cluster) const { return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_); }
+ uint32_t blockNumber(const uint32_t cluster, const uint32_t position) const { return clusterStartBlock(cluster) + blockOfCluster(position); }
cache_t* cache() { return &cacheBuffer_; }
uint32_t cacheBlockNumber() const { return cacheBlockNumber_; }
#if USE_MULTIPLE_CARDS
bool cacheFlush();
- bool cacheRawBlock(uint32_t blockNumber, bool dirty);
+ bool cacheRawBlock(const uint32_t blockNumber, const bool dirty);
#else
static bool cacheFlush();
- static bool cacheRawBlock(uint32_t blockNumber, bool dirty);
+ static bool cacheRawBlock(const uint32_t blockNumber, const bool dirty);
#endif
// used by SdBaseFile write to assign cache to SD location
@@ -192,16 +192,18 @@ class SdVolume {
cacheBlockNumber_ = blockNumber;
}
void cacheSetDirty() { cacheDirty_ |= CACHE_FOR_WRITE; }
- bool chainSize(uint32_t beginCluster, uint32_t *size);
- bool fatGet(uint32_t cluster, uint32_t *value);
- bool fatPut(uint32_t cluster, uint32_t value);
- bool fatPutEOC(uint32_t cluster) { return fatPut(cluster, 0x0FFFFFFF); }
+ bool chainSize(uint32_t cluster, uint32_t * const size);
+ bool fatGet(const uint32_t cluster, uint32_t * const value);
+ bool fatPut(const uint32_t cluster, const uint32_t value);
+ bool fatPutEOC(const uint32_t cluster) { return fatPut(cluster, 0x0FFFFFFF); }
bool freeChain(uint32_t cluster);
- bool isEOC(uint32_t cluster) const {
- if (FAT12_SUPPORT && fatType_ == 12) return cluster >= FAT12EOC_MIN;
+ bool isEOC(const uint32_t cluster) const {
+ if (FAT12_SUPPORT && fatType_ == 12) return cluster >= FAT12EOC_MIN;
if (fatType_ == 16) return cluster >= FAT16EOC_MIN;
- return cluster >= FAT32EOC_MIN;
+ return cluster >= FAT32EOC_MIN;
}
- bool readBlock(uint32_t block, uint8_t *dst) { return sdCard_->readBlock(block, dst); }
- bool writeBlock(uint32_t block, const uint8_t *dst) { return sdCard_->writeBlock(block, dst); }
+ bool readBlock(const uint32_t block, uint8_t * const dst) { return sdCard_->readBlock(block, dst); }
+ bool writeBlock(const uint32_t block, const uint8_t * const dst) { return sdCard_->writeBlock(block, dst); }
};
+
+using MarlinVolume = SdVolume;
diff --git a/Marlin/Marlin/src/sd/cardreader.cpp b/Marlin/Marlin/src/sd/cardreader.cpp
index efa39d1b..addc0a47 100644
--- a/Marlin/Marlin/src/sd/cardreader.cpp
+++ b/Marlin/Marlin/src/sd/cardreader.cpp
@@ -79,7 +79,7 @@ IF_DISABLED(NO_SD_AUTOSTART, uint8_t CardReader::autofile_index); // = 0
// private:
-SdFile CardReader::root, CardReader::workDir, CardReader::workDirParents[MAX_DIR_DEPTH];
+MediaFile CardReader::root, CardReader::workDir, CardReader::workDirParents[MAX_DIR_DEPTH];
uint8_t CardReader::workDirDepth;
#if ENABLED(SDCARD_SORT_ALPHA)
@@ -138,8 +138,8 @@ uint8_t CardReader::workDirDepth;
#endif
DiskIODriver* CardReader::driver = nullptr;
-SdVolume CardReader::volume;
-SdFile CardReader::file;
+MarlinVolume CardReader::volume;
+MediaFile CardReader::file;
#if HAS_MEDIA_SUBCALLS
uint8_t CardReader::file_subcall_ctr;
@@ -241,7 +241,7 @@ bool CardReader::is_visible_entity(const dir_t &p OPTARG(CUSTOM_FIRMWARE_UPLOAD,
//
// Get the number of (compliant) items in the folder
//
-int CardReader::countItems(SdFile dir) {
+int CardReader::countItems(MediaFile dir) {
dir_t p;
int c = 0;
while (dir.readDir(&p, longFilename) > 0)
@@ -257,7 +257,7 @@ int CardReader::countItems(SdFile dir) {
//
// Get file/folder info for an item by index
//
-void CardReader::selectByIndex(SdFile dir, const uint8_t index) {
+void CardReader::selectByIndex(MediaFile dir, const uint8_t index) {
dir_t p;
for (uint8_t cnt = 0; dir.readDir(&p, longFilename) > 0;) {
if (is_visible_entity(p)) {
@@ -273,7 +273,7 @@ void CardReader::selectByIndex(SdFile dir, const uint8_t index) {
//
// Get file/folder info for an item by name
//
-void CardReader::selectByName(SdFile dir, const char * const match) {
+void CardReader::selectByName(MediaFile dir, const char * const match) {
dir_t p;
for (uint8_t cnt = 0; dir.readDir(&p, longFilename) > 0; cnt++) {
if (is_visible_entity(p)) {
@@ -293,7 +293,7 @@ void CardReader::selectByName(SdFile dir, const char * const match) {
* this can blow up the stack, so a 'depth' parameter would be a
* good addition.
*/
-void CardReader::printListing(SdFile parent, const char * const prepend, const uint8_t lsflags
+void CardReader::printListing(MediaFile parent, const char * const prepend, const uint8_t lsflags
OPTARG(LONG_FILENAME_HOST_SUPPORT, const char * const prependLong/*=nullptr*/)
) {
const bool includeTime = TERN0(M20_TIMESTAMP_SUPPORT, TEST(lsflags, LS_TIMESTAMP));
@@ -317,7 +317,7 @@ void CardReader::printListing(SdFile parent, const char * const prepend, const
// Get a new directory object using the full path
// and dive recursively into it.
- SdFile child; // child.close() in destructor
+ MediaFile child; // child.close() in destructor
if (child.open(&parent, dosFilename, O_READ)) {
#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
if (includeLong) {
@@ -388,7 +388,7 @@ void CardReader::ls(const uint8_t lsflags) {
// Zero out slashes to make segments
for (i = 0; i < pathLen; i++) if (path[i] == '/') path[i] = '\0';
- SdFile diveDir = root; // start from the root for segment 1
+ MediaFile diveDir = root; // start from the root for segment 1
for (i = 0; i < pathLen;) {
if (path[i] == '\0') i++; // move past a single nul
@@ -417,7 +417,7 @@ void CardReader::ls(const uint8_t lsflags) {
// SERIAL_ECHOPGM("Opening dir: "); SERIAL_ECHOLN(segment);
// Open the sub-item as the new dive parent
- SdFile dir;
+ MediaFile dir;
if (!dir.open(&diveDir, segment, O_READ)) {
SERIAL_EOL();
SERIAL_ECHO_START();
@@ -620,7 +620,7 @@ void CardReader::getAbsFilenameInCWD(char *dst) {
*dst++ = '/';
uint8_t cnt = 1;
- auto appendAtom = [&](SdFile &file) {
+ auto appendAtom = [&](MediaFile &file) {
file.getDosName(dst);
while (*dst && cnt < MAXPATHNAMELENGTH) { dst++; cnt++; }
if (cnt < MAXPATHNAMELENGTH) { *dst = '/'; dst++; cnt++; }
@@ -699,7 +699,7 @@ void CardReader::openFileRead(const char * const path, const uint8_t subcall_typ
abortFilePrintNow();
- SdFile *diveDir;
+ MediaFile *diveDir;
const char * const fname = diveToFile(true, diveDir, path);
if (!fname) return openFailed(path);
@@ -735,7 +735,7 @@ void CardReader::openFileWrite(const char * const path) {
abortFilePrintNow();
- SdFile *diveDir;
+ MediaFile *diveDir;
const char * const fname = diveToFile(false, diveDir, path);
if (!fname) return openFailed(path);
@@ -763,7 +763,7 @@ bool CardReader::fileExists(const char * const path) {
DEBUG_ECHOLNPGM("fileExists: ", path);
// Dive to the file's directory and get the base name
- SdFile *diveDir = nullptr;
+ MediaFile *diveDir = nullptr;
const char * const fname = diveToFile(false, diveDir, path);
if (!fname) return false;
@@ -773,7 +773,7 @@ bool CardReader::fileExists(const char * const path) {
//diveDir->close();
// Try to open the file and return the result
- SdFile tmpFile;
+ MediaFile tmpFile;
const bool success = tmpFile.open(diveDir, fname, O_READ);
if (success) tmpFile.close();
return success;
@@ -787,7 +787,7 @@ void CardReader::removeFile(const char * const name) {
//abortFilePrintNow();
- SdFile *itsDirPtr;
+ MediaFile *itsDirPtr;
const char * const fname = diveToFile(false, itsDirPtr, name);
if (!fname) return;
@@ -935,23 +935,23 @@ uint16_t CardReader::countFilesInWorkDir() {
* - The workDir points to the last-set navigation target by cd, cdup, cdroot, or diveToFile(true, ...)
*
* On exit:
- * - Your curDir pointer contains an SdFile reference to the file's directory.
+ * - Your curDir pointer contains an MediaFile reference to the file's directory.
* - If update_cwd was 'true' the workDir now points to the file's directory.
*
* Returns a pointer to the last segment (filename) of the given DOS 8.3 path.
- * On exit, inDirPtr contains an SdFile reference to the file's directory.
+ * On exit, inDirPtr contains an MediaFile reference to the file's directory.
*
* A nullptr result indicates an unrecoverable error.
*
* NOTE: End the path with a slash to dive to a folder. In this case the
* returned filename will be blank (points to the end of the path).
*/
-const char* CardReader::diveToFile(const bool update_cwd, SdFile* &inDirPtr, const char * const path, const bool echo/*=false*/) {
+const char* CardReader::diveToFile(const bool update_cwd, MediaFile* &inDirPtr, const char * const path, const bool echo/*=false*/) {
DEBUG_SECTION(est, "diveToFile", true);
// Track both parent and subfolder
- static SdFile newDir1, newDir2;
- SdFile *sub = &newDir1, *startDirPtr;
+ static MediaFile newDir1, newDir2;
+ MediaFile *sub = &newDir1, *startDirPtr;
// Parsing the path string
const char *atom_ptr = path;
@@ -1033,7 +1033,7 @@ const char* CardReader::diveToFile(const bool update_cwd, SdFile* &inDirPtr, con
}
void CardReader::cd(const char * relpath) {
- SdFile newDir, *parent = &getWorkDir();
+ MediaFile newDir, *parent = &getWorkDir();
if (newDir.open(parent, relpath, O_READ)) {
workDir = newDir;
diff --git a/Marlin/Marlin/src/sd/cardreader.h b/Marlin/Marlin/src/sd/cardreader.h
index dae60fa3..1f7ba54a 100644
--- a/Marlin/Marlin/src/sd/cardreader.h
+++ b/Marlin/Marlin/src/sd/cardreader.h
@@ -132,7 +132,7 @@ class CardReader {
static void changeMedia(DiskIODriver *_driver) { driver = _driver; }
- static SdFile getroot() { return root; }
+ static MediaFile getroot() { return root; }
static void mount();
static void release();
@@ -206,12 +206,12 @@ class CardReader {
* Relative paths apply to the workDir.
*
* update_cwd: Pass 'true' to update the workDir on success.
- * inDirPtr: On exit your pointer points to the target SdFile.
+ * inDirPtr: On exit your pointer points to the target MediaFile.
* A nullptr indicates failure.
* path: Start with '/' for abs path. End with '/' to get a folder ref.
* echo: Set 'true' to print the path throughout the loop.
*/
- static const char* diveToFile(const bool update_cwd, SdFile* &inDirPtr, const char * const path, const bool echo=false);
+ static const char* diveToFile(const bool update_cwd, MediaFile* &inDirPtr, const char * const path, const bool echo=false);
#if ENABLED(SDCARD_SORT_ALPHA)
static void presort();
@@ -239,7 +239,7 @@ class CardReader {
// Current Working Dir - Set by cd, cdup, cdroot, and diveToFile(true, ...)
static char* getWorkDirName() { workDir.getDosName(filename); return filename; }
- static SdFile& getWorkDir() { return workDir.isOpen() ? workDir : root; }
+ static MediaFile& getWorkDir() { return workDir.isOpen() ? workDir : root; }
// Print File stats
static uint32_t getFileSize() { return filesize; }
@@ -287,7 +287,7 @@ class CardReader {
//
// Working directory and parents
//
- static SdFile root, workDir, workDirParents[MAX_DIR_DEPTH];
+ static MediaFile root, workDir, workDirParents[MAX_DIR_DEPTH];
static uint8_t workDirDepth;
//
@@ -347,8 +347,8 @@ class CardReader {
#endif // SDCARD_SORT_ALPHA
static DiskIODriver *driver;
- static SdVolume volume;
- static SdFile file;
+ static MarlinVolume volume;
+ static MediaFile file;
static uint32_t filesize, // Total size of the current file, in bytes
sdpos; // Index most recently read (one behind file.getPos)
@@ -366,10 +366,11 @@ class CardReader {
// Directory items
//
static bool is_visible_entity(const dir_t &p OPTARG(CUSTOM_FIRMWARE_UPLOAD, const bool onlyBin=false));
- static int countItems(SdFile dir);
- static void selectByIndex(SdFile dir, const uint8_t index);
- static void selectByName(SdFile dir, const char * const match);
- static void printListing(SdFile parent, const char * const prepend, const uint8_t lsflags
+ static int countItems(MediaFile dir);
+ static void selectByIndex(MediaFile dir, const uint8_t index);
+ static void selectByName(MediaFile dir, const char * const match);
+ static void printListing(
+ MediaFile parent, const char * const prepend, const uint8_t lsflags
OPTARG(LONG_FILENAME_HOST_SUPPORT, const char * const prependLong=nullptr)
);
diff --git a/Marlin/Marlin/src/sd/disk_io_driver.h b/Marlin/Marlin/src/sd/disk_io_driver.h
index 02e2b3c7..f1f49cf8 100644
--- a/Marlin/Marlin/src/sd/disk_io_driver.h
+++ b/Marlin/Marlin/src/sd/disk_io_driver.h
@@ -22,6 +22,7 @@
#pragma once
#include
+#include "SdInfo.h"
/**
* DiskIO Interface
@@ -46,18 +47,18 @@ class DiskIODriver {
*
* \return true for success or false for failure.
*/
- virtual bool readCSD(csd_t* csd) = 0;
+ virtual bool readCSD(csd_t * const csd) = 0;
virtual bool readStart(const uint32_t block) = 0;
- virtual bool readData(uint8_t* dst) = 0;
+ virtual bool readData(uint8_t * const dst) = 0;
virtual bool readStop() = 0;
virtual bool writeStart(const uint32_t block, const uint32_t) = 0;
virtual bool writeData(const uint8_t* src) = 0;
virtual bool writeStop() = 0;
- virtual bool readBlock(uint32_t block, uint8_t* dst) = 0;
- virtual bool writeBlock(uint32_t blockNumber, const uint8_t* src) = 0;
+ virtual bool readBlock(const uint32_t block, uint8_t * const dst) = 0;
+ virtual bool writeBlock(const uint32_t blockNumber, const uint8_t * const src) = 0;
virtual uint32_t cardSize() = 0;
diff --git a/Marlin/Marlin/src/sd/storage.h b/Marlin/Marlin/src/sd/storage.h
new file mode 100644
index 00000000..3510e04b
--- /dev/null
+++ b/Marlin/Marlin/src/sd/storage.h
@@ -0,0 +1,74 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Marlin Storage Architecture:
+ *
+ * DiskIODriver:
+ * Do all low level IO with the underline hardware or block device: SPI, SDIO, OTG
+ *
+ * FilesystemDriver:
+ * Handle the filesystem format / implementation. Uses the io driver to read and write data.
+ * Sd2Card is the very first and current filesystem implementation on Marlin, supporting FAT.
+ * FatFS - Work in progress.
+ *
+ *
+ * Marlin Abstractions:
+ *
+ * Using this names allow us to isolate filesystem driver code, keeping all Marlin code agnostic.
+ *
+ * MediaFilesystem:
+ * Abstraction of systemwide filesystem operation.
+ *
+ * MarlinVolume:
+ * Abstraction of a filesystem volume.
+ *
+ * MediaFile:
+ * Abstraction of a generic file. Using this name allow us to isolate filesystem driver code,
+ * keeping all Marlin code agnostic.
+ *
+ * PrintFromStorage:
+ * Class to handle printing from any attached storage.
+ *
+ */
+
+/*
+
+Interface definition. Doesn't need to be compiled, as we use duck typing,
+allowing drivers to just use type alias.
+
+Class MarlinVolume {
+public:
+};
+
+Class MediaFile {
+public:
+};
+
+Class MediaFilesystem {
+public:
+ static void init();
+ static MarlinVolume* openVolume(const char *);
+};
+
+*/
diff --git a/Marlin/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp b/Marlin/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp
index b5968b70..76d69c78 100644
--- a/Marlin/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp
+++ b/Marlin/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp
@@ -84,10 +84,10 @@
#elif ENABLED(USE_OTG_USB_HOST)
#if HAS_SD_HOST_DRIVE
- #include HAL_PATH(../../HAL, msc_sd.h)
+ #include HAL_PATH(../.., msc_sd.h)
#endif
- #include HAL_PATH(../../HAL, usb_host.h)
+ #include HAL_PATH(../.., usb_host.h)
#define UHS_START usb.start()
#define rREVISION 0
diff --git a/Marlin/Marlin/src/sd/usb_flashdrive/lib-uhs2/settings.h b/Marlin/Marlin/src/sd/usb_flashdrive/lib-uhs2/settings.h
index 7ce7b5e6..268c0e1d 100644
--- a/Marlin/Marlin/src/sd/usb_flashdrive/lib-uhs2/settings.h
+++ b/Marlin/Marlin/src/sd/usb_flashdrive/lib-uhs2/settings.h
@@ -65,12 +65,12 @@
* multiple serial ports are available.
* For example Serial3.
*/
-#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
- #define USB_HOST_SERIAL MYSERIAL1
-#endif
-
#ifndef USB_HOST_SERIAL
- #define USB_HOST_SERIAL Serial
+ #if ENABLED(USB_FLASH_DRIVE_SUPPORT)
+ #define USB_HOST_SERIAL MYSERIAL1
+ #else
+ #define USB_HOST_SERIAL Serial
+ #endif
#endif
////////////////////////////////////////////////////////////////////////////////
diff --git a/Marlin/README.md b/Marlin/README.md
index 97244605..7a992115 100644
--- a/Marlin/README.md
+++ b/Marlin/README.md
@@ -31,6 +31,7 @@ To build and upload Marlin you will use one of these tools:
- The free [Visual Studio Code](https://code.visualstudio.com/download) using the [Auto Build Marlin](https://marlinfw.org/docs/basics/auto_build_marlin.html) extension.
- The free [Arduino IDE](https://www.arduino.cc/en/main/software) : See [Building Marlin with Arduino](https://marlinfw.org/docs/basics/install_arduino.html)
+- You can also use VSCode with devcontainer : See [Installing Marlin (VSCode devcontainer)](http://marlinfw.org/docs/basics/install_devcontainer_vscode.html).
Marlin is optimized to build with the **PlatformIO IDE** extension for **Visual Studio Code**. You can still build Marlin with **Arduino IDE**, and we hope to improve the Arduino build experience, but at this time PlatformIO is the better choice.
@@ -38,7 +39,7 @@ Marlin is optimized to build with the **PlatformIO IDE** extension for **Visual
Marlin includes an abstraction layer to provide a common API for all the platforms it targets. This allows Marlin code to address the details of motion and user interface tasks at the lowest and highest levels with no system overhead, tying all events directly to the hardware clock.
-Every new HAL opens up a world of hardware. At this time we need HALs for RP2040 and the Duet3D family of boards. A HAL that wraps an RTOS is an interesting concept we would can explore. Did you know that Marlin includes a Simulator that can run on Windows, macOS, and Linux? Join the Discord to help move these sub-projects forward!
+Every new HAL opens up a world of hardware. At this time we need HALs for RP2040 and the Duet3D family of boards. A HAL that wraps an RTOS is an interesting concept that could be explored. Did you know that Marlin includes a Simulator that can run on Windows, macOS, and Linux? Join the Discord to help move these sub-projects forward!
## 8-Bit AVR Boards
diff --git a/Marlin/buildroot/bin/run_tests b/Marlin/buildroot/bin/run_tests
index 26284fa6..9a03be3c 100644
--- a/Marlin/buildroot/bin/run_tests
+++ b/Marlin/buildroot/bin/run_tests
@@ -67,7 +67,7 @@ else
printf "\033[0;32mMatching test \033[0m#$3\033[0;32m: '\033[0m$test_name\033[0;32m'\n"
fi
fi
- $TESTS/$2 $1 $2 "$test_name"
+ "$TESTS/$2" $1 $2 "$test_name"
if [[ $GIT_RESET_HARD == "true" ]]; then
git reset --hard HEAD
else
diff --git a/Marlin/buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json b/Marlin/buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json
index 65735d43..3ed21e39 100644
--- a/Marlin/buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json
+++ b/Marlin/buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json
@@ -3,7 +3,7 @@
"core": "stm32",
"cpu": "cortex-m7",
"extra_flags": "-DSTM32H743xx",
- "f_cpu": "400000000L",
+ "f_cpu": "480000000L",
"mcu": "stm32h743iit6",
"variant": "MARLIN_BTT_SKR_SE_BX"
},
diff --git a/Marlin/buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json b/Marlin/buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json
index 6c2e093c..7dd7542c 100644
--- a/Marlin/buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json
+++ b/Marlin/buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json
@@ -55,7 +55,7 @@
"dfu",
"jlink"
],
- "offset_address": "0x8008000",
+ "offset_address": "0x8008000",
"require_upload_port": true,
"use_1200bps_touch": false,
"wait_for_upload_port": false
diff --git a/Marlin/buildroot/share/PlatformIO/boards/marlin_MKS_ROBIN2.json b/Marlin/buildroot/share/PlatformIO/boards/marlin_MKS_ROBIN2.json
new file mode 100644
index 00000000..325001df
--- /dev/null
+++ b/Marlin/buildroot/share/PlatformIO/boards/marlin_MKS_ROBIN2.json
@@ -0,0 +1,65 @@
+{
+ "build": {
+ "cpu": "cortex-m4",
+ "extra_flags": "-DSTM32F407xx",
+ "f_cpu": "168000000L",
+ "hwids": [
+ [
+ "0x1EAF",
+ "0x0003"
+ ],
+ [
+ "0x0483",
+ "0x3748"
+ ]
+ ],
+ "ldscript": "ldscript.ld",
+ "mcu": "stm32f407zet6",
+ "variant": "MARLIN_MKS_ROBIN2"
+ },
+ "debug": {
+ "jlink_device": "STM32F407ZE",
+ "openocd_target": "stm32f4x",
+ "svd_path": "STM32F40x.svd",
+ "tools": {
+ "stlink": {
+ "server": {
+ "arguments": [
+ "-f",
+ "scripts/interface/stlink.cfg",
+ "-c",
+ "transport select hla_swd",
+ "-f",
+ "scripts/target/stm32f4x.cfg",
+ "-c",
+ "reset_config none"
+ ],
+ "executable": "bin/openocd",
+ "package": "tool-openocd"
+ }
+ }
+ }
+ },
+ "frameworks": [
+ "arduino",
+ "stm32cube"
+ ],
+ "name": "STM32F407ZE (192k RAM. 512k Flash)",
+ "upload": {
+ "disable_flushing": false,
+ "maximum_ram_size": 131072,
+ "maximum_size": 514288,
+ "protocol": "stlink",
+ "protocols": [
+ "stlink",
+ "dfu",
+ "jlink",
+ "cmsis-dap"
+ ],
+ "require_upload_port": true,
+ "use_1200bps_touch": false,
+ "wait_for_upload_port": false
+ },
+ "url": "http://www.st.com/en/microcontrollers/stm32f407ze.html",
+ "vendor": "Generic"
+}
diff --git a/Marlin/buildroot/share/PlatformIO/boards/marlin_STM32G0B1VE.json b/Marlin/buildroot/share/PlatformIO/boards/marlin_STM32G0B1VE.json
new file mode 100644
index 00000000..a3ac6ea6
--- /dev/null
+++ b/Marlin/buildroot/share/PlatformIO/boards/marlin_STM32G0B1VE.json
@@ -0,0 +1,47 @@
+{
+ "build": {
+ "core": "stm32",
+ "cpu": "cortex-m0plus",
+ "extra_flags": "-DSTM32G0xx -DSTM32G0B1xx",
+ "f_cpu": "64000000L",
+ "framework_extra_flags": {
+ "arduino": "-D__CORTEX_SC=0"
+ },
+ "mcu": "stm32g0b1vet6",
+ "product_line": "STM32G0B1xx",
+ "variant": "MARLIN_G0B1VE"
+ },
+ "debug": {
+ "default_tools": [
+ "stlink"
+ ],
+ "jlink_device": "STM32G0B1VE",
+ "onboard_tools": [
+ "stlink"
+ ],
+ "openocd_target": "stm32g0x",
+ "svd_path": "STM32G0B1.svd"
+ },
+ "frameworks": [
+ "arduino",
+ "cmsis",
+ "libopencm3",
+ "stm32cube",
+ "zephyr"
+ ],
+ "name": "STM32G0B1VE",
+ "upload": {
+ "maximum_ram_size": 147456,
+ "maximum_size": 524288,
+ "protocol": "stlink",
+ "protocols": [
+ "stlink",
+ "jlink",
+ "cmsis-dap",
+ "blackmagic",
+ "mbed"
+ ]
+ },
+ "url": "https://www.st.com/content/st_com/en/products/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus/stm32-mainstream-mcus/stm32g0-series/stm32g0x1.html",
+ "vendor": "ST"
+}
diff --git a/Marlin/buildroot/share/PlatformIO/boards/marlin_STM32H723Vx.json b/Marlin/buildroot/share/PlatformIO/boards/marlin_STM32H723Vx.json
new file mode 100644
index 00000000..a2154d44
--- /dev/null
+++ b/Marlin/buildroot/share/PlatformIO/boards/marlin_STM32H723Vx.json
@@ -0,0 +1,61 @@
+{
+ "build": {
+ "core": "stm32",
+ "cpu": "cortex-m7",
+ "extra_flags": "-DSTM32H7xx -DSTM32H723xx",
+ "f_cpu": "550000000L",
+ "mcu": "stm32h723vet6",
+ "product_line": "STM32H723xx",
+ "variant": "MARLIN_H723Vx"
+ },
+ "connectivity": [
+ "can",
+ "ethernet"
+ ],
+ "debug": {
+ "jlink_device": "STM32H723VE",
+ "openocd_target": "stm32h7x",
+ "svd_path": "STM32H7x3.svd",
+ "tools": {
+ "stlink": {
+ "server": {
+ "arguments": [
+ "-f",
+ "scripts/interface/stlink.cfg",
+ "-c",
+ "transport select hla_swd",
+ "-f",
+ "scripts/target/stm32h7x.cfg",
+ "-c",
+ "reset_config none"
+ ],
+ "executable": "bin/openocd",
+ "package": "tool-openocd"
+ }
+ }
+ }
+ },
+ "frameworks": [
+ "arduino",
+ "stm32cube"
+ ],
+ "name": "STM32H723VE (564k RAM. 512k Flash)",
+ "upload": {
+ "disable_flushing": false,
+ "maximum_ram_size": 577536,
+ "maximum_size": 524288,
+ "protocol": "stlink",
+ "protocols": [
+ "stlink",
+ "dfu",
+ "jlink",
+ "cmsis-dap"
+ ],
+ "offset_address": "0x8020000",
+ "require_upload_port": true,
+ "use_1200bps_touch": false,
+ "wait_for_upload_port": false
+ },
+ "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32h723ze.html",
+ "vendor": "ST"
+}
diff --git a/Marlin/buildroot/share/PlatformIO/boards/marlin_STM32H723Zx.json b/Marlin/buildroot/share/PlatformIO/boards/marlin_STM32H723Zx.json
new file mode 100644
index 00000000..8525793c
--- /dev/null
+++ b/Marlin/buildroot/share/PlatformIO/boards/marlin_STM32H723Zx.json
@@ -0,0 +1,61 @@
+{
+ "build": {
+ "core": "stm32",
+ "cpu": "cortex-m7",
+ "extra_flags": "-DSTM32H7xx -DSTM32H723xx",
+ "f_cpu": "550000000L",
+ "mcu": "stm32h723zet6",
+ "product_line": "STM32H723xx",
+ "variant": "MARLIN_H723Zx"
+ },
+ "connectivity": [
+ "can",
+ "ethernet"
+ ],
+ "debug": {
+ "jlink_device": "STM32H723ZE",
+ "openocd_target": "stm32h7x",
+ "svd_path": "STM32H7x3.svd",
+ "tools": {
+ "stlink": {
+ "server": {
+ "arguments": [
+ "-f",
+ "scripts/interface/stlink.cfg",
+ "-c",
+ "transport select hla_swd",
+ "-f",
+ "scripts/target/stm32h7x.cfg",
+ "-c",
+ "reset_config none"
+ ],
+ "executable": "bin/openocd",
+ "package": "tool-openocd"
+ }
+ }
+ }
+ },
+ "frameworks": [
+ "arduino",
+ "stm32cube"
+ ],
+ "name": "STM32H723ZE (564k RAM. 512k Flash)",
+ "upload": {
+ "disable_flushing": false,
+ "maximum_ram_size": 577536,
+ "maximum_size": 524288,
+ "protocol": "stlink",
+ "protocols": [
+ "stlink",
+ "dfu",
+ "jlink",
+ "cmsis-dap"
+ ],
+ "offset_address": "0x8020000",
+ "require_upload_port": true,
+ "use_1200bps_touch": false,
+ "wait_for_upload_port": false
+ },
+ "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32h723ze.html",
+ "vendor": "ST"
+}
diff --git a/Marlin/buildroot/share/PlatformIO/ldscripts/sovol.ld b/Marlin/buildroot/share/PlatformIO/ldscripts/sovol.ld
new file mode 100644
index 00000000..78534554
--- /dev/null
+++ b/Marlin/buildroot/share/PlatformIO/ldscripts/sovol.ld
@@ -0,0 +1,14 @@
+MEMORY
+{
+ ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K - 40
+ rom (rx) : ORIGIN = 0x08007000, LENGTH = 512K - 28K
+}
+
+/* Provide memory region aliases for common.inc */
+REGION_ALIAS("REGION_TEXT", rom);
+REGION_ALIAS("REGION_DATA", ram);
+REGION_ALIAS("REGION_BSS", ram);
+REGION_ALIAS("REGION_RODATA", rom);
+
+/* Let common.inc handle the real work. */
+INCLUDE common.inc
diff --git a/Marlin/buildroot/share/PlatformIO/scripts/common-dependencies.py b/Marlin/buildroot/share/PlatformIO/scripts/common-dependencies.py
index 91331d8f..c9272685 100644
--- a/Marlin/buildroot/share/PlatformIO/scripts/common-dependencies.py
+++ b/Marlin/buildroot/share/PlatformIO/scripts/common-dependencies.py
@@ -60,13 +60,14 @@ def add_to_feat_cnf(feature, flines):
for line in atoms:
parts = line.split('=')
name = parts.pop(0)
- if name in ['build_flags', 'extra_scripts', 'src_filter', 'lib_ignore']:
+ if name in ['build_flags', 'extra_scripts', 'build_src_filter', 'lib_ignore']:
feat[name] = '='.join(parts)
blab("[%s] %s=%s" % (feature, name, feat[name]), 3)
else:
for dep in re.split(r',\s*', line):
lib_name = re.sub(r'@([~^]|[<>]=?)?[\d.]+', '', dep.strip()).split('=').pop(0)
lib_re = re.compile('(?!^' + lib_name + '\\b)')
+ if not 'lib_deps' in feat: feat['lib_deps'] = {}
feat['lib_deps'] = list(filter(lib_re.match, feat['lib_deps'])) + [dep]
blab("[%s] lib_deps = %s" % (feature, dep), 3)
@@ -171,19 +172,19 @@ def apply_features_config():
blab("Running extra_scripts for %s... " % feature, 2)
env.SConscript(feat['extra_scripts'], exports="env")
- if 'src_filter' in feat:
+ if 'build_src_filter' in feat:
blab("========== Adding build_src_filter for %s... " % feature, 2)
- src_filter = ' '.join(env.GetProjectOption('src_filter'))
+ build_src_filter = ' '.join(env.GetProjectOption('build_src_filter'))
# first we need to remove the references to the same folder
- my_srcs = re.findall(r'[+-](<.*?>)', feat['src_filter'])
- cur_srcs = re.findall(r'[+-](<.*?>)', src_filter)
+ my_srcs = re.findall(r'[+-](<.*?>)', feat['build_src_filter'])
+ cur_srcs = re.findall(r'[+-](<.*?>)', build_src_filter)
for d in my_srcs:
if d in cur_srcs:
- src_filter = re.sub(r'[+-]' + d, '', src_filter)
+ build_src_filter = re.sub(r'[+-]' + d, '', build_src_filter)
- src_filter = feat['src_filter'] + ' ' + src_filter
- set_env_field('build_src_filter', [src_filter])
- env.Replace(SRC_FILTER=src_filter)
+ build_src_filter = feat['build_src_filter'] + ' ' + build_src_filter
+ set_env_field('build_src_filter', [build_src_filter])
+ env.Replace(SRC_FILTER=build_src_filter)
if 'lib_ignore' in feat:
blab("========== Adding lib_ignore for %s... " % feature, 2)
diff --git a/Marlin/buildroot/share/PlatformIO/scripts/configuration.py b/Marlin/buildroot/share/PlatformIO/scripts/configuration.py
index d752ebc2..250d9bbd 100644
--- a/Marlin/buildroot/share/PlatformIO/scripts/configuration.py
+++ b/Marlin/buildroot/share/PlatformIO/scripts/configuration.py
@@ -18,7 +18,16 @@ def apply_opt(name, val, conf=None):
if name == "lcd": name, val = val, "on"
# Create a regex to match the option and capture parts of the line
- regex = re.compile(rf'^(\s*)(//\s*)?(#define\s+)({name}\b)(\s*)(.*?)(\s*)(//.*)?$', re.IGNORECASE)
+ # 1: Indentation
+ # 2: Comment
+ # 3: #define and whitespace
+ # 4: Option name
+ # 5: First space after name
+ # 6: Remaining spaces between name and value
+ # 7: Option value
+ # 8: Whitespace after value
+ # 9: End comment
+ regex = re.compile(rf'^(\s*)(//\s*)?(#define\s+)({name}\b)(\s?)(\s*)(.*?)(\s*)(//.*)?$', re.IGNORECASE)
# Find and enable and/or update all matches
for file in ("Configuration.h", "Configuration_adv.h"):
@@ -37,10 +46,11 @@ def apply_opt(name, val, conf=None):
newline = re.sub(r'^(\s*)(#define)(\s{1,3})?(\s*)', r'\1//\2 \4', line)
else:
# For options with values, enable and set the value
- newline = match[1] + match[3] + match[4] + match[5] + val
- if match[8]:
- sp = match[7] if match[7] else ' '
- newline += sp + match[8]
+ addsp = '' if match[5] else ' '
+ newline = match[1] + match[3] + match[4] + match[5] + addsp + val + match[6]
+ if match[9]:
+ sp = match[8] if match[8] else ' '
+ newline += sp + match[9]
lines[i] = newline
blab(f"Set {name} to {val}")
@@ -85,12 +95,12 @@ def apply_opt(name, val, conf=None):
# Return True if any files were fetched.
def fetch_example(url):
if url.endswith("/"): url = url[:-1]
- if url.startswith('http'):
- url = url.replace("%", "%25").replace(" ", "%20")
- else:
+ if not url.startswith('http'):
brch = "bugfix-2.1.x"
- if '@' in path: path, brch = map(str.strip, path.split('@'))
+ if '@' in url: url, brch = map(str.strip, url.split('@'))
+ if url == 'examples/default': url = 'default'
url = f"https://raw.githubusercontent.com/MarlinFirmware/Configurations/{brch}/config/{url}"
+ url = url.replace("%", "%25").replace(" ", "%20")
# Find a suitable fetch command
if shutil.which("curl") is not None:
@@ -104,7 +114,7 @@ def fetch_example(url):
import os
# Reset configurations to default
- os.system("git reset --hard HEAD")
+ os.system("git checkout HEAD Marlin/*.h")
# Try to fetch the remote files
gotfile = False
@@ -192,7 +202,7 @@ def apply_config_ini(cp):
# For 'examples/' fetch an example set from GitHub.
# For https?:// do a direct fetch of the URL.
- if ckey.startswith('examples/') or ckey.startswith('http:'):
+ if ckey.startswith('examples/') or ckey.startswith('http'):
fetch_example(ckey)
ckey = 'base'
diff --git a/Marlin/buildroot/share/PlatformIO/scripts/marlin.py b/Marlin/buildroot/share/PlatformIO/scripts/marlin.py
index 169dd9d3..8d8dbb5b 100644
--- a/Marlin/buildroot/share/PlatformIO/scripts/marlin.py
+++ b/Marlin/buildroot/share/PlatformIO/scripts/marlin.py
@@ -16,7 +16,8 @@ def copytree(src, dst, symlinks=False, ignore=None):
shutil.copy2(item, dst / item.name)
def replace_define(field, value):
- for define in env['CPPDEFINES']:
+ envdefs = env['CPPDEFINES'].copy()
+ for define in envdefs:
if define[0] == field:
env['CPPDEFINES'].remove(define)
env['CPPDEFINES'].append((field, value))
diff --git a/Marlin/buildroot/share/PlatformIO/scripts/preflight-checks.py b/Marlin/buildroot/share/PlatformIO/scripts/preflight-checks.py
index 08856350..3f7c97af 100644
--- a/Marlin/buildroot/share/PlatformIO/scripts/preflight-checks.py
+++ b/Marlin/buildroot/share/PlatformIO/scripts/preflight-checks.py
@@ -129,8 +129,10 @@ def rm_ofile(subdir, name):
#
if 'FILAMENT_RUNOUT_SENSOR' in env['MARLIN_FEATURES'] and 'NUM_RUNOUT_SENSORS' in env['MARLIN_FEATURES']:
if env['MARLIN_FEATURES']['NUM_RUNOUT_SENSORS'].isdigit() and int(env['MARLIN_FEATURES']['NUM_RUNOUT_SENSORS']) > 1:
- if 'FILAMENT_RUNOUT_SCRIPT' in env['MARLIN_FEATURES'] and "%c" not in env['MARLIN_FEATURES']['FILAMENT_RUNOUT_SCRIPT']:
- err = "ERROR: FILAMENT_RUNOUT_SCRIPT needs a %c parameter when NUM_RUNOUT_SENSORS is > 1"
- raise SystemExit(err)
+ if 'FILAMENT_RUNOUT_SCRIPT' in env['MARLIN_FEATURES']:
+ frs = env['MARLIN_FEATURES']['FILAMENT_RUNOUT_SCRIPT']
+ if "M600" in frs and "%c" not in frs:
+ err = "ERROR: FILAMENT_RUNOUT_SCRIPT needs a %c parameter (e.g., \"M600 T%c\") when NUM_RUNOUT_SENSORS is > 1"
+ raise SystemExit(err)
sanity_check_target()
diff --git a/Marlin/buildroot/share/PlatformIO/scripts/signature.py b/Marlin/buildroot/share/PlatformIO/scripts/signature.py
index 4fc0084e..84312da0 100644
--- a/Marlin/buildroot/share/PlatformIO/scripts/signature.py
+++ b/Marlin/buildroot/share/PlatformIO/scripts/signature.py
@@ -39,9 +39,9 @@ def get_file_sha256sum(filepath):
# Compress a JSON file into a zip file
#
import zipfile
-def compress_file(filepath, outpath):
+def compress_file(filepath, storedname, outpath):
with zipfile.ZipFile(outpath, 'w', compression=zipfile.ZIP_BZIP2, compresslevel=9) as zipf:
- zipf.write(filepath, compress_type=zipfile.ZIP_BZIP2, compresslevel=9)
+ zipf.write(filepath, arcname=storedname, compress_type=zipfile.ZIP_BZIP2, compresslevel=9)
#
# Compute the build signature. The idea is to extract all defines in the configuration headers
@@ -71,7 +71,7 @@ def compute_build_signature(env):
conf = json.load(infile)
if conf['__INITIAL_HASH'] == hashes:
# Same configuration, skip recomputing the building signature
- compress_file(marlin_json, marlin_zip)
+ compress_file(marlin_json, 'marlin_config.json', marlin_zip)
return
except:
pass
@@ -255,7 +255,7 @@ def tryint(key):
return
# Compress the JSON file as much as we can
- compress_file(marlin_json, marlin_zip)
+ compress_file(marlin_json, 'marlin_config.json', marlin_zip)
# Generate a C source file for storing this array
with open('Marlin/src/mczip.h','wb') as result_file:
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.h
index 11f8f63b..c073e9bb 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.h
@@ -24,10 +24,10 @@
*----------------------------------------------------------------------------*/
/** Frequency of the board main oscillator */
-#define VARIANT_MAINOSC 12000000
+#define VARIANT_MAINOSC 12000000
/** Master clock frequency */
-#define VARIANT_MCK 84000000
+#define VARIANT_MCK 84000000
/*----------------------------------------------------------------------------
* Headers
@@ -119,13 +119,13 @@ extern "C"{
#define BOARD_SPI_DEFAULT_SS BOARD_SPI_SS3
#define BOARD_PIN_TO_SPI_PIN(x) \
- (x==BOARD_SPI_SS0 ? PIN_SPI_SS0 : \
- (x==BOARD_SPI_SS1 ? PIN_SPI_SS1 : \
- (x==BOARD_SPI_SS2 ? PIN_SPI_SS2 : PIN_SPI_SS3 )))
+ (x==BOARD_SPI_SS0 ? PIN_SPI_SS0 : \
+ (x==BOARD_SPI_SS1 ? PIN_SPI_SS1 : \
+ (x==BOARD_SPI_SS2 ? PIN_SPI_SS2 : PIN_SPI_SS3 )))
#define BOARD_PIN_TO_SPI_CHANNEL(x) \
- (x==BOARD_SPI_SS0 ? 0 : \
- (x==BOARD_SPI_SS1 ? 1 : \
- (x==BOARD_SPI_SS2 ? 2 : 3)))
+ (x==BOARD_SPI_SS0 ? 0 : \
+ (x==BOARD_SPI_SS1 ? 1 : \
+ (x==BOARD_SPI_SS2 ? 2 : 3)))
static const uint8_t SS = BOARD_SPI_SS0;
static const uint8_t SS1 = BOARD_SPI_SS1;
@@ -195,7 +195,7 @@ static const uint8_t DAC0 = 66;
static const uint8_t DAC1 = 67;
static const uint8_t CANRX = 68;
static const uint8_t CANTX = 69;
-#define ADC_RESOLUTION 12
+#define ADC_RESOLUTION 12
/*
* Complementary CAN pins
@@ -212,21 +212,21 @@ static const uint8_t CAN1TX = 89;
/*
* DACC
*/
-#define DACC_INTERFACE DACC
-#define DACC_INTERFACE_ID ID_DACC
-#define DACC_RESOLUTION 12
+#define DACC_INTERFACE DACC
+#define DACC_INTERFACE_ID ID_DACC
+#define DACC_RESOLUTION 12
#define DACC_ISR_HANDLER DACC_Handler
#define DACC_ISR_ID DACC_IRQn
/*
* PWM
*/
-#define PWM_INTERFACE PWM
-#define PWM_INTERFACE_ID ID_PWM
-#define PWM_FREQUENCY 31000
-#define PWM_MAX_DUTY_CYCLE 255
-#define PWM_MIN_DUTY_CYCLE 0
-#define PWM_RESOLUTION 8
+#define PWM_INTERFACE PWM
+#define PWM_INTERFACE_ID ID_PWM
+#define PWM_FREQUENCY 31000
+#define PWM_MAX_DUTY_CYCLE 255
+#define PWM_MIN_DUTY_CYCLE 0
+#define PWM_RESOLUTION 8
/*
* TC
@@ -236,7 +236,7 @@ static const uint8_t CAN1TX = 89;
#define TC_FREQUENCY 100000
#define TC_MAX_DUTY_CYCLE 255
#define TC_MIN_DUTY_CYCLE 0
-#define TC_RESOLUTION 8
+#define TC_RESOLUTION 8
#ifdef __cplusplus
}
@@ -281,4 +281,3 @@ extern USARTClass Serial3;
#define SERIAL_PORT_HARDWARE3 Serial3
#endif /* _VARIANT_ARDUINO_DUE_X_ */
-
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/variant.h
index ca7a53d7..f32ff3c2 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/variant.h
@@ -121,6 +121,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h
index 068d0b9e..88b6e452 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h
@@ -272,6 +272,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h
index edc1c91c..90e9998d 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h
@@ -267,6 +267,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h
index 2c706939..01f19a79 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h
@@ -280,7 +280,7 @@ extern "C" {
#define PIN_SERIAL_TX PA9
// Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number
-// Used when user instantiate a hardware Serial using its peripheral name.
+// Used when the user instantiates a hardware Serial using its peripheral name.
// Example: HardwareSerial mySerial(USART3);
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
#define PIN_SERIAL1_RX PA10
@@ -295,6 +295,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h
index b5cf0bad..56bc3bdd 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h
@@ -280,7 +280,7 @@ extern "C" {
#define PIN_SERIAL_TX PA9
// Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number
-// Used when user instantiate a hardware Serial using its peripheral name.
+// Used when the user instantiates a hardware Serial using its peripheral name.
// Example: HardwareSerial mySerial(USART3);
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
#define PIN_SERIAL1_RX PA10
@@ -295,6 +295,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BTT_EBB42_V1_1/variant_MARLIN_BTT_EBB42_V1_1.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BTT_EBB42_V1_1/variant_MARLIN_BTT_EBB42_V1_1.h
index ff75bc1e..9373e2fa 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BTT_EBB42_V1_1/variant_MARLIN_BTT_EBB42_V1_1.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BTT_EBB42_V1_1/variant_MARLIN_BTT_EBB42_V1_1.h
@@ -155,6 +155,8 @@
#define SERIAL_UART_INSTANCE 4
#endif
+#define FLASH_BANK_NUMBER FLASH_BANK_1
+
// Default pin used for generic 'Serial' instance
// Mandatory for Firmata
#ifndef PIN_SERIAL_RX
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h
index 285ad662..f03ba326 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h
@@ -195,6 +195,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h
index b5a4e5ef..722a29d0 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h
@@ -112,7 +112,7 @@ extern "C" {
#define PIN_SERIAL_RX PA10
#define PIN_SERIAL_TX PA9
-// Used when user instanciate a hardware Serial using its peripheral name.
+// Used when the user instantiates a hardware Serial using its peripheral name.
// Example: HardwareSerial mySerial(USART3);
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
#define PIN_SERIAL1_RX PA10
@@ -123,6 +123,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
@@ -148,4 +149,4 @@ extern "C" {
#define SERIAL_PORT_HARDWARE_OPEN Serial2
#endif
-#endif /* _VARIANT_ARDUINO_STM32_ */
\ No newline at end of file
+#endif /* _VARIANT_ARDUINO_STM32_ */
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h
index 8f17d052..4a0245e7 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h
@@ -148,6 +148,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h
index 8e4f248c..3fac6495 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h
@@ -148,6 +148,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld
index 3013b096..ac7ac2e9 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld
@@ -4,7 +4,7 @@
** File : LinkerScript.ld
**
-** Author : Auto-generated by STM32CubeIDE
+** Author : Auto-generated by STM32CubeIDE
**
** Abstract : Linker script for STM32F103V(8/B/C/E/F/GTx Device from STM32F1 series
** 64/128/256/512/768/1024Kbytes FLASH
@@ -54,15 +54,15 @@
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
-_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of "RAM" Ram type memory */
+_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of "RAM" Ram type memory */
_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */
/* Memories definition */
MEMORY
{
- RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
- FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
+ FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
}
/* Sections */
@@ -103,9 +103,9 @@ SECTIONS
} >FLASH
.ARM.extab : {
- . = ALIGN(4);
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
+ . = ALIGN(4);
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ . = ALIGN(4);
} >FLASH
.ARM : {
. = ALIGN(4);
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h
index e01d67fd..4061db4e 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h
@@ -158,6 +158,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld
index cac12da5..d995458f 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld
@@ -1,10 +1,9 @@
/*
******************************************************************************
**
-
** File : LinkerScript.ld
**
-** Author : Auto-generated by STM32CubeIDE
+** Author : Auto-generated by STM32CubeIDE
**
** Abstract : Linker script for STM32F103Z(C/D/E/G/GTx Device from STM32F1 series
** 256/386/512K/786/1024bytes FLASH
@@ -54,7 +53,7 @@
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
-_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of "RAM" Ram type memory */
+_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of "RAM" Ram type memory */
_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */
@@ -62,7 +61,7 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
- FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
+ FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
}
/* Sections */
@@ -103,9 +102,9 @@ SECTIONS
} >FLASH
.ARM.extab : {
- . = ALIGN(4);
- *(.ARM.extab* .gnu.linkonce.armextab.*)
- . = ALIGN(4);
+ . = ALIGN(4);
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+ . = ALIGN(4);
} >FLASH
.ARM : {
. = ALIGN(4);
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h
index 330a7efb..8de1e062 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h
@@ -205,6 +205,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F401RC/ldscript.ld b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F401RC/ldscript.ld
index c7e67d31..d028dfc0 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F401RC/ldscript.ld
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F401RC/ldscript.ld
@@ -28,10 +28,10 @@
ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
-_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
+_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
-_Min_Heap_Size = 0x200; /* required amount of heap */
-_Min_Stack_Size = 0x400; /* required amount of stack */
+_Min_Heap_Size = 0x200; /* required amount of heap */
+_Min_Stack_Size = 0x400; /* required amount of stack */
/* Memories definition */
MEMORY
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h
index df8bf064..df45a5db 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h
@@ -326,6 +326,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h
index 855616f6..b2111d04 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h
@@ -159,6 +159,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/variant.cpp b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/variant.cpp
index 2d94ee76..7e18e33f 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/variant.cpp
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/variant.cpp
@@ -173,15 +173,15 @@ uint32_t myvar[] = {1,2,3,4,5,6,7,8};
void myshow(int fre, int times) // YSZ-WORK
{
uint32_t index = 10;
- RCC->AHB1ENR |= 1 << 6; // port G clock
- GPIOG->MODER &= ~(3UL << 2 * index); // clear old mode
- GPIOG->MODER |= 1 << 2 * index; // mode is output
- GPIOG->OSPEEDR &= ~(3UL << 2 * index) // Clear old output speed
- GPIOG->OSPEEDR |= 2 << 2 * index; // Set output speed
- GPIOG->OTYPER &= ~(1UL << index) // clear old output
- GPIOG->OTYPER |= 0 << index; // Set the output mode to push-pull
- GPIOG->PUPDR &= ~(3 << 2 * index) // Clear the original settings first
- GPIOG->PUPDR |= 1 << 2 * index; // Set new up and down
+ RCC->AHB1ENR |= 1 << 6; // port G clock
+ GPIOG->MODER &= ~(3UL << 2 * index); // clear old mode
+ GPIOG->MODER |= 1 << 2 * index; // mode is output
+ GPIOG->OSPEEDR &= ~(3UL << 2 * index); // Clear old output speed
+ GPIOG->OSPEEDR |= 2 << 2 * index; // Set output speed
+ GPIOG->OTYPER &= ~(1UL << index); // clear old output
+ GPIOG->OTYPER |= 0 << index; // Set the output mode to push-pull
+ GPIOG->PUPDR &= ~(3 << 2 * index); // Clear the original settings first
+ GPIOG->PUPDR |= 1 << 2 * index; // Set new up and down
while (times != 0) {
GPIOG->BSRR = 1UL << index;
for (int i = 0; i < fre; i++)
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h
index 0b78be62..d6f8e9fe 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h
@@ -176,6 +176,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h
index 2bfce85e..80d5d3e0 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h
@@ -37,121 +37,120 @@ extern "C" {
* Pins
*----------------------------------------------------------------------------*/
-
-#define PA1 0
-#define PA2 1
-#define PA3 2
-#define PA4 3
-#define PA5 4
-#define PA6 5
-#define PA7 6
-#define PA8 7
-#define PA9 8
-#define PA10 9
-#define PA11 10
-#define PA12 11
-#define PA13 12
-#define PA14 13
-#define PA15 14
-#define PB0 15
-#define PB1 16
-#define PB2 17
-#define PB3 18
-#define PB4 19
-#define PB5 20
-#define PB6 21
-#define PB7 22
-#define PB8 23
-#define PB9 24
-#define PB10 25
-#define PB11 26
-#define PB12 27
-#define PB13 28
-#define PB14 29
-#define PB15 30
-#define PC2 31
-#define PC3 32
-#define PC4 33
-#define PC5 34
-#define PC6 35
-#define PC7 36
-#define PC8 37
-#define PC9 38
-#define PC10 39
-#define PC11 40
-#define PC12 41
-#define PC13 42
-#define PC14 43
-#define PC15 44
-#define PD0 45
-#define PD1 46
-#define PD2 47
-#define PD3 48
-#define PD4 49
-#define PD5 50
-#define PD6 51
-#define PD7 52
-#define PD8 53
-#define PD9 54
-#define PD10 55
-#define PD11 56
-#define PD12 57
-#define PD13 58
-#define PD14 59
-#define PD15 60
-#define PE0 61
-#define PE1 62
-#define PE11 63
-#define PE3 64
-#define PE4 65
-#define PE5 66
-#define PE6 67
-#define PE7 68
-#define PE8 69
-#define PE9 70
-#define PE10 71
+#define PA1 0
+#define PA2 1
+#define PA3 2
+#define PA4 3
+#define PA5 4
+#define PA6 5
+#define PA7 6
+#define PA8 7
+#define PA9 8
+#define PA10 9
+#define PA11 10
+#define PA12 11
+#define PA13 12
+#define PA14 13
+#define PA15 14
+#define PB0 15
+#define PB1 16
+#define PB2 17
+#define PB3 18
+#define PB4 19
+#define PB5 20
+#define PB6 21
+#define PB7 22
+#define PB8 23
+#define PB9 24
+#define PB10 25
+#define PB11 26
+#define PB12 27
+#define PB13 28
+#define PB14 29
+#define PB15 30
+#define PC2 31
+#define PC3 32
+#define PC4 33
+#define PC5 34
+#define PC6 35
+#define PC7 36
+#define PC8 37
+#define PC9 38
+#define PC10 39
+#define PC11 40
+#define PC12 41
+#define PC13 42
+#define PC14 43
+#define PC15 44
+#define PD0 45
+#define PD1 46
+#define PD2 47
+#define PD3 48
+#define PD4 49
+#define PD5 50
+#define PD6 51
+#define PD7 52
+#define PD8 53
+#define PD9 54
+#define PD10 55
+#define PD11 56
+#define PD12 57
+#define PD13 58
+#define PD14 59
+#define PD15 60
+#define PE0 61
+#define PE1 62
+#define PE11 63
+#define PE3 64
+#define PE4 65
+#define PE5 66
+#define PE6 67
+#define PE7 68
+#define PE8 69
+#define PE9 70
+#define PE10 71
#define PE2 72
-#define PE12 73
-#define PE13 74
-#define PE14 75
-#define PE15 76
-#define PF0 77
-#define PF1 78
-#define PF2 79
-#define PF6 80
-#define PF7 81
-#define PF8 82
-#define PF9 83
-#define PF11 84
-#define PF12 85
-#define PF13 86
-#define PF14 87
-#define PF15 88
-#define PG0 89
-#define PG1 90
-#define PG2 91
-#define PG3 92
-#define PG4 93
-#define PG5 94
-#define PG6 95
-#define PG7 96
-#define PG8 97
-#define PG9 98
-#define PG10 99
-#define PG11 100
-#define PG12 101
-#define PG13 102
-#define PG14 103
-#define PG15 104
-#define PH0 105
-#define PH1 106
-#define PA0 107
-#define PC1 108
-#define PC0 109
-#define PF10 110
-#define PF5 111
-#define PF4 112
-#define PF3 113
+#define PE12 73
+#define PE13 74
+#define PE14 75
+#define PE15 76
+#define PF0 77
+#define PF1 78
+#define PF2 79
+#define PF6 80
+#define PF7 81
+#define PF8 82
+#define PF9 83
+#define PF11 84
+#define PF12 85
+#define PF13 86
+#define PF14 87
+#define PF15 88
+#define PG0 89
+#define PG1 90
+#define PG2 91
+#define PG3 92
+#define PG4 93
+#define PG5 94
+#define PG6 95
+#define PG7 96
+#define PG8 97
+#define PG9 98
+#define PG10 99
+#define PG11 100
+#define PG12 101
+#define PG13 102
+#define PG14 103
+#define PG15 104
+#define PH0 105
+#define PH1 106
+#define PA0 107
+#define PC1 108
+#define PC0 109
+#define PF10 110
+#define PF5 111
+#define PF4 112
+#define PF3 113
// This must be a literal
#define NUM_DIGITAL_PINS 114
@@ -212,6 +211,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
@@ -234,5 +234,5 @@ extern "C" {
// pins are NOT connected to anything by default.
#define SERIAL_PORT_MONITOR Serial
#define SERIAL_PORT_HARDWARE Serial1
-#endif
+#endif
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h
index d4982113..ca3664da 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h
@@ -95,7 +95,7 @@ extern "C" {
// Timer Definitions
#define TIMER_TONE TIM2 // TIMER_TONE must be defined in this file
-#define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file
+#define TIMER_SERVO TIM3 // TIMER_SERVO must be defined in this file
#define TIMER_SERIAL TIM11 // TIMER_SERIAL must be defined in this file
// UART Definitions
@@ -110,7 +110,7 @@ extern "C" {
#define PIN_SERIAL_RX PA10
#define PIN_SERIAL_TX PA9
-// Used when user instantiate a hardware Serial using its peripheral name.
+// Used when the user instantiates a hardware Serial using its peripheral name.
// Example: HardwareSerial mySerial(USART3);
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
#define PIN_SERIAL1_RX PA10
@@ -121,6 +121,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/PeripheralPins.c b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/PeripheralPins.c
index 5c7c301f..4411065d 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/PeripheralPins.c
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/PeripheralPins.c
@@ -47,10 +47,10 @@ WEAK const PinMap PinMap_ADC[] = {
//{PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1
//{PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1
//{PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1
- {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 LCD RX
+ {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 LCD RX
//{PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2
//{PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2
- {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 LCD TX
+ {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 LCD TX
//{PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3
//{PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3
//{PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/variant.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/variant.h
index 727c0d07..abcbba85 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/variant.h
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_SPIDER_KING407/variant.h
@@ -37,121 +37,120 @@ extern "C" {
* Pins
*----------------------------------------------------------------------------*/
-
-#define PA1 0
-#define PA2 1
-#define PA3 2
-#define PA4 3
-#define PA5 4
-#define PA6 5
-#define PA7 6
-#define PA8 7
-#define PA9 8
-#define PA10 9
-#define PA11 10
-#define PA12 11
-#define PA13 12
-#define PA14 13
-#define PA15 14
-#define PB0 15
-#define PB1 16
-#define PB2 17
-#define PB3 18
-#define PB4 19
-#define PB5 20
-#define PB6 21
-#define PB7 22
-#define PB8 23
-#define PB9 24
-#define PB10 25
-#define PB11 26
-#define PB12 27
-#define PB13 28
-#define PB14 29
-#define PB15 30
-#define PC2 31
-#define PC3 32
-#define PC4 33
-#define PC5 34
-#define PC6 35
-#define PC7 36
-#define PC8 37
-#define PC9 38
-#define PC10 39
-#define PC11 40
-#define PC12 41
-#define PC13 42
-#define PC14 43
-#define PC15 44
-#define PD0 45
-#define PD1 46
-#define PD2 47
-#define PD3 48
-#define PD4 49
-#define PD5 50
-#define PD6 51
-#define PD7 52
-#define PD8 53
-#define PD9 54
-#define PD10 55
-#define PD11 56
-#define PD12 57
-#define PD13 58
-#define PD14 59
-#define PD15 60
-#define PE0 61
-#define PE1 62
-#define PE11 63
-#define PE3 64
-#define PE4 65
-#define PE5 66
-#define PE6 67
-#define PE7 68
-#define PE8 69
-#define PE9 70
-#define PE10 71
+#define PA1 0
+#define PA2 1
+#define PA3 2
+#define PA4 3
+#define PA5 4
+#define PA6 5
+#define PA7 6
+#define PA8 7
+#define PA9 8
+#define PA10 9
+#define PA11 10
+#define PA12 11
+#define PA13 12
+#define PA14 13
+#define PA15 14
+#define PB0 15
+#define PB1 16
+#define PB2 17
+#define PB3 18
+#define PB4 19
+#define PB5 20
+#define PB6 21
+#define PB7 22
+#define PB8 23
+#define PB9 24
+#define PB10 25
+#define PB11 26
+#define PB12 27
+#define PB13 28
+#define PB14 29
+#define PB15 30
+#define PC2 31
+#define PC3 32
+#define PC4 33
+#define PC5 34
+#define PC6 35
+#define PC7 36
+#define PC8 37
+#define PC9 38
+#define PC10 39
+#define PC11 40
+#define PC12 41
+#define PC13 42
+#define PC14 43
+#define PC15 44
+#define PD0 45
+#define PD1 46
+#define PD2 47
+#define PD3 48
+#define PD4 49
+#define PD5 50
+#define PD6 51
+#define PD7 52
+#define PD8 53
+#define PD9 54
+#define PD10 55
+#define PD11 56
+#define PD12 57
+#define PD13 58
+#define PD14 59
+#define PD15 60
+#define PE0 61
+#define PE1 62
+#define PE11 63
+#define PE3 64
+#define PE4 65
+#define PE5 66
+#define PE6 67
+#define PE7 68
+#define PE8 69
+#define PE9 70
+#define PE10 71
#define PE2 72
-#define PE12 73
-#define PE13 74
-#define PE14 75
-#define PE15 76
-#define PF0 77
-#define PF1 78
-#define PF2 79
-#define PF6 80
-#define PF7 81
-#define PF8 82
-#define PF9 83
-#define PF11 84
-#define PF12 85
-#define PF13 86
-#define PF14 87
-#define PF15 88
-#define PG0 89
-#define PG1 90
-#define PG2 91
-#define PG3 92
-#define PG4 93
-#define PG5 94
-#define PG6 95
-#define PG7 96
-#define PG8 97
-#define PG9 98
-#define PG10 99
-#define PG11 100
-#define PG12 101
-#define PG13 102
-#define PG14 103
-#define PG15 104
-#define PH0 105
-#define PH1 106
-#define PA0 107
-#define PC1 108
-#define PC0 109
-#define PF10 110
-#define PF5 111
-#define PF4 112
-#define PF3 113
+#define PE12 73
+#define PE13 74
+#define PE14 75
+#define PE15 76
+#define PF0 77
+#define PF1 78
+#define PF2 79
+#define PF6 80
+#define PF7 81
+#define PF8 82
+#define PF9 83
+#define PF11 84
+#define PF12 85
+#define PF13 86
+#define PF14 87
+#define PF15 88
+#define PG0 89
+#define PG1 90
+#define PG2 91
+#define PG3 92
+#define PG4 93
+#define PG5 94
+#define PG6 95
+#define PG7 96
+#define PG8 97
+#define PG9 98
+#define PG10 99
+#define PG11 100
+#define PG12 101
+#define PG13 102
+#define PG14 103
+#define PG15 104
+#define PH0 105
+#define PH1 106
+#define PA0 107
+#define PC1 108
+#define PC0 109
+#define PF10 110
+#define PF5 111
+#define PF4 112
+#define PF3 113
// This must be a literal
#define NUM_DIGITAL_PINS 114
@@ -196,7 +195,7 @@ extern "C" {
#define PIN_SERIAL_TX PA9
// Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number
-// Used when user instantiate a hardware Serial using its peripheral name.
+// Used when the user instantiates a hardware Serial using its peripheral name.
// Example: HardwareSerial mySerial(USART3);
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
#define PIN_SERIAL1_RX PA10
@@ -210,6 +209,7 @@ extern "C" {
#ifdef __cplusplus
} // extern "C"
#endif
+
/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
@@ -230,8 +230,7 @@ extern "C" {
//
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
// pins are NOT connected to anything by default.
-#define SERIAL_PORT_MONITOR Serial
-#define SERIAL_PORT_HARDWARE Serial1
+#define SERIAL_PORT_MONITOR Serial
+#define SERIAL_PORT_HARDWARE Serial1
#define SERIAL_PORT_HARDWARE_OPEN Serial2
#endif
-
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1RE/PeripheralPins.c b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1RE/PeripheralPins.c
index eb95de14..3187367a 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1RE/PeripheralPins.c
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1RE/PeripheralPins.c
@@ -218,6 +218,7 @@ WEAK const PinMap PinMap_UART_TX[] = {
{PC_12, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
{PD_3, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
{PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART2)},
+ {PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
{PF_2, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART2)},
{NC, NP, 0}
};
@@ -252,6 +253,7 @@ WEAK const PinMap PinMap_UART_RX[] = {
{PC_11_ALT1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART4)},
{PD_2, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
{PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART2)},
+ {PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
{NC, NP, 0}
};
#endif
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1RE/variant_MARLIN_STM32G0B1RE.cpp b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1RE/variant_MARLIN_STM32G0B1RE.cpp
index d18509f3..fa4ebfa7 100644
--- a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1RE/variant_MARLIN_STM32G0B1RE.cpp
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1RE/variant_MARLIN_STM32G0B1RE.cpp
@@ -130,14 +130,7 @@ WEAK void SystemClock_Config(void)
RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};
// Reset clock registers (in case bootloader has changed them)
- RCC->CR |= RCC_CR_HSION;
- while (!(RCC->CR & RCC_CR_HSIRDY))
- ;
- RCC->CFGR = 0x00000000;
- RCC->CR = RCC_CR_HSION;
- while (RCC->CR & RCC_CR_PLLRDY)
- ;
- RCC->PLLCFGR = 0x00001000;
+ SystemInit();
/** Configure the main internal regulator output voltage
*/
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/PeripheralPins.c b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/PeripheralPins.c
new file mode 100644
index 00000000..a6b1e442
--- /dev/null
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/PeripheralPins.c
@@ -0,0 +1,480 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2020-2021, STMicroelectronics
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ *******************************************************************************
+ */
+/*
+ * Automatically generated from STM32G0B1V(B-C-E)Ix.xml, STM32G0B1V(B-C-E)Tx.xml
+ * STM32G0B1V(C-E)Ix.xml, STM32G0B1V(C-E)Tx.xml
+ * STM32G0C1V(C-E)Ix.xml, STM32G0C1V(C-E)Tx.xml
+ * CubeMX DB release 6.0.30
+ */
+#if !defined(CUSTOM_PERIPHERAL_PINS)
+#include "Arduino.h"
+#include "PeripheralPins.h"
+
+/* =====
+ * Notes:
+ * - The pins mentioned Px_y_ALTz are alternative possibilities which use other
+ * HW peripheral instances. You can use them the same way as any other "normal"
+ * pin (i.e. analogWrite(PA7_ALT1, 128);).
+ *
+ * - Commented lines are alternative possibilities which are not used per default.
+ * If you change them, you will have to know what you do
+ * =====
+ */
+
+//*** ADC ***
+
+#ifdef HAL_ADC_MODULE_ENABLED
+WEAK const PinMap PinMap_ADC[] = {
+ {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0
+ {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1
+ {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2
+ {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3
+ {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4
+ {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5
+ {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6
+ {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7
+ {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8
+ {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9
+ {PB_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10
+ {PB_10, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11
+ {PB_11, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15
+ {PB_12, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 16, 0)}, // ADC1_IN16
+ {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 17, 0)}, // ADC1_IN17
+ {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC1_IN18
+ {NC, NP, 0}
+};
+#endif
+
+//*** DAC ***
+
+#ifdef HAL_DAC_MODULE_ENABLED
+WEAK const PinMap PinMap_DAC[] = {
+ {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC1_OUT1
+ {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC1_OUT2
+ {NC, NP, 0}
+};
+#endif
+
+//*** I2C ***
+
+#ifdef HAL_I2C_MODULE_ENABLED
+WEAK const PinMap PinMap_I2C_SDA[] = {
+ {PA_6, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF8_I2C2)},
+ {PA_6_ALT1, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C3)},
+ {PA_10, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C1)},
+ {PA_10_ALT1, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF8_I2C2)},
+ {PA_10_R, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C1)},
+ {PA_10_R_ALT1, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF8_I2C2)},
+ {PA_12, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C2)},
+ {PB_4, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF8_I2C2)},
+ {PB_4_ALT1, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C3)},
+ {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C1)},
+ {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C1)},
+ {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C2)},
+ {PB_14, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C2)},
+ {PC_1, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C3)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_I2C_MODULE_ENABLED
+WEAK const PinMap PinMap_I2C_SCL[] = {
+ {PA_7, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF8_I2C2)},
+ {PA_7_ALT1, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C3)},
+ {PA_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C1)},
+ {PA_9_ALT1, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF8_I2C2)},
+ {PA_9_R, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C1)},
+ {PA_9_R_ALT1, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF8_I2C2)},
+ {PA_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C2)},
+ {PB_3, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF8_I2C2)},
+ {PB_3_ALT1, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C3)},
+ {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C1)},
+ {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C1)},
+ {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C2)},
+ {PB_13, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C2)},
+ {PC_0, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C3)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** TIM ***
+
+#ifdef HAL_TIM_MODULE_ENABLED
+WEAK const PinMap PinMap_TIM[] = {
+ {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
+ {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
+ {PA_1_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 1)}, // TIM15_CH1N
+ {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
+ {PA_2_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 0)}, // TIM15_CH1
+ {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
+ {PA_3_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 2, 0)}, // TIM15_CH2
+ {PA_4, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
+ {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
+ {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
+ {PA_6_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM16, 1, 0)}, // TIM16_CH1
+ {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
+ {PA_7_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
+ {PA_7_ALT2, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM14, 1, 0)}, // TIM14_CH1
+ {PA_7_ALT3, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM17, 1, 0)}, // TIM17_CH1
+ {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
+ {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
+ {PA_9_R, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
+ {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
+ {PA_10_R, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
+ {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
+ {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
+ {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
+ {PB_0_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
+ {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
+ {PB_1_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
+ {PB_1_ALT2, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM14, 1, 0)}, // TIM14_CH1
+ {PB_3, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2
+ {PB_3_ALT1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
+ {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
+ {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
+ {PB_6, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3
+ {PB_6_ALT1, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM4, 1, 0)}, // TIM4_CH1
+ {PB_6_ALT2, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 1)}, // TIM16_CH1N
+ {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM4, 2, 0)}, // TIM4_CH2
+ {PB_7_ALT1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 1)}, // TIM17_CH1N
+ {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM4, 3, 0)}, // TIM4_CH3
+ {PB_8_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
+ {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM4, 4, 0)}, // TIM4_CH4
+ {PB_9_ALT1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
+ {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
+ {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
+ {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
+ {PB_13_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 1)}, // TIM15_CH1N
+ {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
+ {PB_14_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 1, 0)}, // TIM15_CH1
+ {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
+ {PB_15_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 1)}, // TIM15_CH1N
+ {PB_15_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_TIM15, 2, 0)}, // TIM15_CH2
+ {PC_1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM15, 1, 0)}, // TIM15_CH1
+ {PC_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM15, 2, 0)}, // TIM15_CH2
+ {PC_4, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 1, 0)}, // TIM2_CH1
+ {PC_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 2, 0)}, // TIM2_CH2
+ {PC_6, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 3, 0)}, // TIM2_CH3
+ {PC_6_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
+ {PC_7, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM2, 4, 0)}, // TIM2_CH4
+ {PC_7_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
+ {PC_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 0)}, // TIM1_CH1
+ {PC_8_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
+ {PC_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 0)}, // TIM1_CH2
+ {PC_9_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
+ {PC_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 0)}, // TIM1_CH3
+ {PC_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 4, 0)}, // TIM1_CH4
+ {PC_12, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM14, 1, 0)}, // TIM14_CH1
+ {PD_0, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM16, 1, 0)}, // TIM16_CH1
+ {PD_1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM17, 1, 0)}, // TIM17_CH1
+ {PD_2, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 1, 1)}, // TIM1_CH1N
+ {PD_3, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 2, 1)}, // TIM1_CH2N
+ {PD_4, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM1, 3, 1)}, // TIM1_CH3N
+ {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1
+ {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2
+ {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3
+ {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4
+ {PE_0, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM16, 1, 0)}, // TIM16_CH1
+ {PE_1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM17, 1, 0)}, // TIM17_CH1
+ {PE_3, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, // TIM3_CH1
+ {PE_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, // TIM3_CH2
+ {PE_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 3, 0)}, // TIM3_CH3
+ {PE_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 4, 0)}, // TIM3_CH4
+ {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
+ {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1
+ {PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
+ {PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2
+ {PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N
+ {PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3
+ {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4
+ {PF_0, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM14, 1, 0)}, // TIM14_CH1
+ {PF_1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM15, 1, 1)}, // TIM15_CH1N
+ {PF_12, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 1, 0)}, // TIM15_CH1
+ {PF_13, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_TIM15, 2, 0)}, // TIM15_CH2
+ {NC, NP, 0}
+};
+#endif
+
+//*** UART ***
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_TX[] = {
+ {PA_0, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
+ {PA_2, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_LPUART1)},
+ {PA_2_ALT1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PA_4, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART6)},
+ {PA_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_9_R, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_14, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_LPUART2)},
+ {PA_14_ALT1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PB_0, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART5)},
+ {PB_2, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PB_3, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
+ {PB_6, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_LPUART2)},
+ {PB_6_ALT1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
+ {PB_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PB_8_ALT1, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)},
+ {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PB_11, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
+ {PC_0, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART2)},
+ {PC_0_ALT1, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART6)},
+ {PC_1, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
+ {PC_4, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PC_4_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART3)},
+ {PC_6, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART2)},
+ {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART3)},
+ {PC_10_ALT1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART4)},
+ {PC_12, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
+ {PD_3, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
+ {PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART2)},
+ {PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART3)},
+ {PE_8, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART4)},
+ {PE_10, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
+ {PF_2, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART2)},
+ {PF_4, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
+ {PF_9, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART6)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_RX[] = {
+ {PA_1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
+ {PA_3, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_LPUART1)},
+ {PA_3_ALT1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PA_5, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART6)},
+ {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_10_R, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_13, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_LPUART2)},
+ {PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PB_0, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PB_1, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART5)},
+ {PB_4, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
+ {PB_7, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_LPUART2)},
+ {PB_7_ALT1, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART1)},
+ {PB_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PB_9_ALT1, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)},
+ {PB_10, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
+ {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PC_0, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
+ {PC_1, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART2)},
+ {PC_1_ALT1, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART6)},
+ {PC_5, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PC_5_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART3)},
+ {PC_7, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART2)},
+ {PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART3)},
+ {PC_11_ALT1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART4)},
+ {PD_2, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
+ {PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART2)},
+ {PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART3)},
+ {PE_9, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART4)},
+ {PE_11, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
+ {PF_3, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART2)},
+ {PF_5, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
+ {PF_10, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART6)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_RTS[] = {
+ {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PA_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART6)},
+ {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PA_15, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_USART3)},
+ {PA_15_ALT1, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
+ {PB_1, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_LPUART1)},
+ {PB_1_ALT1, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_LPUART2)},
+ {PB_1_ALT2, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PB_3, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART1)},
+ {PB_5, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART5)},
+ {PB_12, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
+ {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PB_14_ALT1, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)},
+ {PC_9, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART2)},
+ {PD_2, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART3)},
+ {PD_4, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART2)},
+ {PD_4_ALT1, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
+ {PD_12, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART3)},
+ {PD_15, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART2)},
+ {PE_7, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
+ {PF_2, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART2)},
+ {PF_3, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART6)},
+ {PF_6, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
+ {PF_11, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART6)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_UART_MODULE_ENABLED
+WEAK const PinMap PinMap_UART_CTS[] = {
+ {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART2)},
+ {PA_6, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_LPUART1)},
+ {PA_6_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PA_6_ALT2, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART6)},
+ {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_USART1)},
+ {PB_0, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_LPUART2)},
+ {PB_4, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART1)},
+ {PB_6, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART5)},
+ {PB_7, USART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART4)},
+ {PB_13, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
+ {PB_13_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART3)},
+ {PB_15, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)},
+ {PC_8, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART2)},
+ {PD_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART2)},
+ {PD_5, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
+ {PD_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_USART3)},
+ {PD_14, LPUART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART2)},
+ {PF_7, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_LPUART1)},
+ {PF_7_ALT1, USART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART5)},
+ {PF_12, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART6)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** SPI ***
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_MOSI[] = {
+ {PA_2, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PA_4, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PA_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {PA_10_R, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {PA_12, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_5_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SPI3)},
+ {PB_7, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {PB_11, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_SPI3)},
+ {PD_4, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {PD_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI1)},
+ {PE_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_MISO[] = {
+ {PA_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_SPI2)},
+ {PA_9_R, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_SPI2)},
+ {PA_11, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_4_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SPI3)},
+ {PB_6, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_SPI2)},
+ {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_SPI3)},
+ {PD_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {PD_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI1)},
+ {PE_14, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_SCLK[] = {
+ {PA_0, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {PA_1, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_3_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SPI3)},
+ {PB_8, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
+ {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_SPI3)},
+ {PD_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {PD_8, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI1)},
+ {PE_13, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_SPI_MODULE_ENABLED
+WEAK const PinMap PinMap_SPI_SSEL[] = {
+ {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PA_4_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SPI3)},
+ {PA_8, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PA_15_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_SPI3)},
+ {PB_0, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
+ {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI2)},
+ {PD_0, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI2)},
+ {PD_9, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_SPI1)},
+ {PE_12, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF0_SPI1)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** FDCAN ***
+
+#ifdef HAL_FDCAN_MODULE_ENABLED
+WEAK const PinMap PinMap_CAN_RD[] = {
+ {PA_11, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN1)},
+ {PB_0, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN2)},
+ {PB_5, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN2)},
+ {PB_8, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN1)},
+ {PB_12, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN2)},
+ {PC_2, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN2)},
+ {PC_4, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN1)},
+ {PD_0, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN1)},
+ {PD_12, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN1)},
+ {PD_14, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN2)},
+ {NC, NP, 0}
+};
+#endif
+
+#ifdef HAL_FDCAN_MODULE_ENABLED
+WEAK const PinMap PinMap_CAN_TD[] = {
+ {PA_12, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN1)},
+ {PB_1, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN2)},
+ {PB_6, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN2)},
+ {PB_9, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN1)},
+ {PB_13, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN2)},
+ {PC_3, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN2)},
+ {PC_5, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN1)},
+ {PD_1, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN1)},
+ {PD_13, FDCAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN1)},
+ {PD_15, FDCAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF3_FDCAN2)},
+ {NC, NP, 0}
+};
+#endif
+
+//*** No ETHERNET ***
+
+//*** No QUADSPI ***
+
+//*** USB ***
+
+#if defined(HAL_PCD_MODULE_ENABLED) || defined(HAL_HCD_MODULE_ENABLED)
+WEAK const PinMap PinMap_USB_DRD_FS[] = {
+ {PA_4, USB_DRD_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
+ {PA_11, USB_DRD_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
+ {PA_12, USB_DRD_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
+ {PA_13, USB_DRD_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_USB)}, // USB_NOE
+ {PA_15, USB_DRD_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_USB)}, // USB_NOE
+ {PC_9, USB_DRD_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_USB)}, // USB_NOE
+ {NC, NP, 0}
+};
+#endif
+
+//*** No SD ***
+
+#endif /* !CUSTOM_PERIPHERAL_PINS */
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/PinNamesVar.h b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/PinNamesVar.h
new file mode 100644
index 00000000..7d35869f
--- /dev/null
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/PinNamesVar.h
@@ -0,0 +1,91 @@
+/* Remap pin name */
+PA_9_R = PA_9 | PREMAP,
+PA_10_R = PA_10 | PREMAP,
+
+/* Alternate pin name */
+PA_1_ALT1 = PA_1 | ALT1,
+PA_2_ALT1 = PA_2 | ALT1,
+PA_3_ALT1 = PA_3 | ALT1,
+PA_4_ALT1 = PA_4 | ALT1,
+PA_6_ALT1 = PA_6 | ALT1,
+PA_6_ALT2 = PA_6 | ALT2,
+PA_7_ALT1 = PA_7 | ALT1,
+PA_7_ALT2 = PA_7 | ALT2,
+PA_7_ALT3 = PA_7 | ALT3,
+PA_9_ALT1 = PA_9 | ALT1,
+PA_9_R_ALT1 = PA_9_R | ALT1,
+PA_10_ALT1 = PA_10 | ALT1,
+PA_10_R_ALT1 = PA_10_R | ALT1,
+PA_14_ALT1 = PA_14 | ALT1,
+PA_15_ALT1 = PA_15 | ALT1,
+PB_0_ALT1 = PB_0 | ALT1,
+PB_1_ALT1 = PB_1 | ALT1,
+PB_1_ALT2 = PB_1 | ALT2,
+PB_3_ALT1 = PB_3 | ALT1,
+PB_4_ALT1 = PB_4 | ALT1,
+PB_5_ALT1 = PB_5 | ALT1,
+PB_6_ALT1 = PB_6 | ALT1,
+PB_6_ALT2 = PB_6 | ALT2,
+PB_7_ALT1 = PB_7 | ALT1,
+PB_8_ALT1 = PB_8 | ALT1,
+PB_9_ALT1 = PB_9 | ALT1,
+PB_13_ALT1 = PB_13 | ALT1,
+PB_14_ALT1 = PB_14 | ALT1,
+PB_15_ALT1 = PB_15 | ALT1,
+PB_15_ALT2 = PB_15 | ALT2,
+PC_0_ALT1 = PC_0 | ALT1,
+PC_1_ALT1 = PC_1 | ALT1,
+PC_4_ALT1 = PC_4 | ALT1,
+PC_5_ALT1 = PC_5 | ALT1,
+PC_6_ALT1 = PC_6 | ALT1,
+PC_7_ALT1 = PC_7 | ALT1,
+PC_8_ALT1 = PC_8 | ALT1,
+PC_9_ALT1 = PC_9 | ALT1,
+PC_10_ALT1 = PC_10 | ALT1,
+PC_11_ALT1 = PC_11 | ALT1,
+PD_4_ALT1 = PD_4 | ALT1,
+PF_7_ALT1 = PF_7 | ALT1,
+
+/* SYS_WKUP */
+#ifdef PWR_WAKEUP_PIN1
+ SYS_WKUP1 = PA_0,
+#endif
+#ifdef PWR_WAKEUP_PIN2
+ SYS_WKUP2 = PC_13,
+#endif
+#ifdef PWR_WAKEUP_PIN3
+ SYS_WKUP3 = PE_6,
+#endif
+#ifdef PWR_WAKEUP_PIN4
+ SYS_WKUP4 = PA_2,
+#endif
+#ifdef PWR_WAKEUP_PIN5
+ SYS_WKUP5 = PC_5,
+#endif
+#ifdef PWR_WAKEUP_PIN6
+ SYS_WKUP6 = PB_5,
+#endif
+#ifdef PWR_WAKEUP_PIN7
+ SYS_WKUP7 = NC,
+#endif
+#ifdef PWR_WAKEUP_PIN8
+ SYS_WKUP8 = NC,
+#endif
+
+/* USB */
+#ifdef USBCON
+ USB_DM = PA_11,
+ USB_DP = PA_12,
+ #ifdef USB_NOE_PA_4
+ USB_NOE = PA_4,
+ #endif
+ #ifdef USB_NOE_PA_13
+ USB_NOE = PA_13,
+ #endif
+ #ifdef USB_NOE_PA_15
+ USB_NOE = PA_15,
+ #endif
+ #ifdef USB_NOE_PC_9
+ USB_NOE = PC_9,
+ #endif
+#endif
diff --git a/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/ldscript.ld b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/ldscript.ld
new file mode 100644
index 00000000..db07355f
--- /dev/null
+++ b/Marlin/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/ldscript.ld
@@ -0,0 +1,177 @@
+/**
+ ******************************************************************************
+ * @file LinkerScript.ld
+ * @author Auto-generated by STM32CubeIDE
+ * @brief Linker script for STM32G0B1VETx Device from STM32G0 series
+ * 512Kbytes FLASH
+ * 144Kbytes RAM
+ *
+ * Set heap size, stack size and stack location according
+ * to application requirements.
+ *
+ * Set memory bank area and size if external memory is used
+ ******************************************************************************
+ * @attention
+ *
+ *