diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c37e64b --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +# Pascal err out logs + +*.err +*.out + +~$*.SLDPRT +~$*.SLDASM + +# For PCBs designed using KiCad: http://www.kicad-pcb.org/ +# Format documentation: http://kicad-pcb.org/help/file-formats/ + +# Temporary files +*-backups/ +*.000 +*.bak +*.bck +*.kicad_sch.lck +*.kicad_pcb-bak +*.kicad_pcb.lck +*#auto_saved_files# + +*~ +_autosave-* +*.tmp +*-cache.lib +*-rescue.lib +*-save.pro +*-save.kicad_pcb +*.sch-bak +fp-info-cache + +# Netlist files (exported from Eeschema) +*.net + +# Autorouter files (exported from Pcbnew) +*.dsn +*.ses + +# Visual Studio Code +*.vscode/ +# Platformio .pio +.pio/ +# JetBrains CLion +.idea/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 7acdc90..257da4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [v5-rc2] Намотчик - 2025-01-05 + +### Добавлено +- Начата работа над программой-генератором g-code. Эта программа необходима для автоматического расчета траекторий движения конца иголки, в процессе намотки. +- Детали чтобы использовать трубочку диаметром 0.9мм, вместо иглы. +- Добавлена кнопка аварийного останова. +- Экспериментальная система, подтягивающая проволку назад, призванная сохранять натяжение во время провисания провода. + +### Изменено +- Изменен дизайн системы натяжения +- Дизайн каретки, чтобы при стягивании деталей, держащих иголку, резьба вкручивалась в металлическую гайку, а не в пластик. +- Также изменена высота каретки, чтобы можно было менять высоту иглы. +- Небольшие изменения в раме станка. (Удалил лишние построения, для старого держателя катушки) + +### Исправлено + + ## [v5-rc1] Намотчик - 2024-11-11 ### Добавлено - - Тормоз для катушки - Проставки под плату вместо металлических стоек - Отверстия для крепления RAMPS @@ -16,18 +32,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Сделана спецификация с временем печати и расходом пластика для каждой детали ### Изменено - - Отредактирована крышка. Добавлены прорези под провода - Рельсы заменены с MGN12 на MGN9 - Удалены все мелкие скругления -- Увеличил пространство для гайки М8, которая одевается шпильку +- Увеличено пространство для гайки М8, которая одевается шпильку - Перепроектирован стенд для дисплея - Упрощена деталь Organizer - Увеличена глубина борозды под провод на колесе - Оптимизированы детали для печати. Там где это возможно, печатаются без поддержек. -### Исправлено - +### Исправлено - Удалены все лишние плоскости, которые очень мешают, если включить их отображение. Кроме того, в некоторых эскизах были привязки не к плоскостям или граням, а к этим самым плоскостям. То есть, удаление или смещение плоскости, привело бы к непредсказуемому изменению модели. - Исправены ошибки и "костыли". В некоторых деталях встречались случаи, когда, например, была сделана вытяжка, а потом эта вытяжка удалялась вырезом. Или наоборот, делался вырез, который потом заполнялся вытяжкой. Что перегружало дерево. Некоторые детали были сделаны из "заготовок", что лишало возможности редактировать геометрию. Этот инструмент хорош для быстрой прикидки, но не стоит его оставлять в конечной версии проекта. diff --git a/firmware/.aiderignore b/firmware/.aiderignore new file mode 100644 index 0000000..b80c459 --- /dev/null +++ b/firmware/.aiderignore @@ -0,0 +1,21 @@ +# Build artifacts +buildroot/ +*.o +*.a +*.so +*.dylib +*.dll +*.exe + +# Web assets +*.min.js +*.min.css + +# Generated files +__pycache__/ +*.pyc +.DS_Store + +# IDE files +.vscode/ +.idea/ diff --git a/firmware/.devcontainer/Dockerfile b/firmware/.devcontainer/Dockerfile new file mode 100644 index 0000000..4f29a10 --- /dev/null +++ b/firmware/.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/firmware/.devcontainer/devcontainer.json b/firmware/.devcontainer/devcontainer.json new file mode 100644 index 0000000..54627d4 --- /dev/null +++ b/firmware/.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/firmware/.github/FUNDING.yml b/firmware/.github/FUNDING.yml new file mode 100644 index 0000000..a973242 --- /dev/null +++ b/firmware/.github/FUNDING.yml @@ -0,0 +1,3 @@ +github: [thinkyhead] +patreon: thinkyhead +custom: ["https://www.thinkyhead.com/donate-to-marlin"] diff --git a/firmware/.github/ISSUE_TEMPLATE/bug_report.yml b/firmware/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..e0ee13a --- /dev/null +++ b/firmware/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,184 @@ +name: 🪲 Report a bug +description: Create a bug report to help improve Marlin Firmware +title: "[BUG] (bug summary)" +labels: ["Bug: Potential ?"] +body: + - type: markdown + attributes: + value: > + Do you want to ask a question? Are you looking for support? Please use one of the [support links](https://github.com/MarlinFirmware/Marlin/issues/new/choose). + + - type: markdown + attributes: + value: | + **Thank you for reporting a bug in Marlin Firmware!** + + ## Before Reporting a Bug + + - Read and understand Marlin's [Code of Conduct](https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.1.x/.github/code_of_conduct.md). You are expected to comply with it, including treating everyone with respect. + + - Test with the [`bugfix-2.1.x` branch](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.1.x.zip) to see whether the issue still exists. + + ## Instructions + + Please follow the instructions below. Failure to do so may result in your issue being closed. See [Contributing to Marlin](https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.1.x/.github/contributing.md) for additional guidelines. + + 1. Provide a good title starting with [BUG]. + 2. Fill out all sections of this bug report form. + 3. Always attach configuration files so we can build and test your setup. + + - type: dropdown + attributes: + label: Did you test the latest `bugfix-2.1.x` code? + description: >- + Always try the latest code to make sure the issue you are reporting is not already fixed. To download + the latest code just [click this link](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.1.x.zip). + options: + - Yes, and the problem still exists. + - No, but I will test it now! + validations: + required: true + + - type: markdown + attributes: + value: | + # Bug Details + + - type: textarea + attributes: + label: Bug Description + description: >- + Describe the bug in this section. Tell us what you were trying to do and what + happened that you did not expect. Provide a clear and concise description of the + problem and include as many details as possible. + + When pasting formatted text don't forget to put ` ``` ` (on its own line) before and after to make it readable. + placeholder: | + Marlin doesn't work. + validations: + required: true + + - type: input + attributes: + label: Bug Timeline + description: Is this a new bug or an old issue? When did it first start? + + - type: textarea + attributes: + label: Expected behavior + description: >- + What did you expect to happen? + placeholder: I expected it to move left. + + - type: textarea + attributes: + label: Actual behavior + description: What actually happened instead? + placeholder: It moved right instead of left. + + - type: textarea + attributes: + label: Steps to Reproduce + description: >- + Please describe the steps needed to reproduce the issue. + placeholder: | + 1. [First Step] ... + 2. [Second Step] ... + 3. [and so on] ... + + - type: markdown + attributes: + value: | + # Your Setup + + - type: input + attributes: + label: Version of Marlin Firmware + description: "See the About Menu on the LCD or the output of `M115`. NOTE: For older releases we only patch critical bugs." + validations: + required: true + + - type: input + attributes: + label: Printer model + description: Creality Ender-3, Prusa mini, or Kossel Delta? + + - type: input + attributes: + label: Electronics + description: Stock electronics, upgrade board, or something else? + + - type: input + attributes: + label: LCD/Controller + description: Some Marlin behaviors are determined by the controller. Describe your LCD/Controller model and version. + + - type: input + attributes: + label: Other add-ons + description: Please list any other hardware add-ons that could be involved. + + - type: dropdown + attributes: + label: Bed Leveling + description: What kind of bed leveling compensation are you using? + options: + - UBL Bilinear mesh + - ABL Bilinear mesh + - ABL Linear grid + - ABL 3-point + - MBL Manual Bed Leveling + - No Bed Leveling + + - type: dropdown + attributes: + label: Your Slicer + description: Do you use Slic3r, Prusa Slicer, Simplify3D, IdeaMaker...? + options: + - Slic3r + - Simplify3D + - Prusa Slicer + - IdeaMaker + - Cura + - Other (explain below) + + - type: dropdown + attributes: + label: Host Software + description: Do you use OctoPrint, Repetier Host, Pronterface...? + options: + - SD Card (headless) + - Repetier Host + - OctoPrint + - Pronterface + - Cura + - Same as my slicer + - Other (explain below) + + - type: markdown + attributes: + value: | + # Attachments + + - type: checkboxes + attributes: + label: Don't forget to include + options: + - label: A ZIP file containing your `Configuration.h` and `Configuration_adv.h`. + required: true + + - type: markdown + attributes: + value: | + ### Optional items to include: + - 'Log output from the host. (`M111 S247` for maximum logging.)' + - Images or videos demonstrating the problem, if it helps to make it clear. + - A G-Code file that exposes the problem, if not affecting _all_ G-code. + + - type: textarea + attributes: + label: Additional information & file uploads + description: >- + If you've made any other modifications to the firmware, please describe them in detail. + + When pasting formatted text don't forget to put ` ``` ` (on its own line) before and after to make it readable. diff --git a/firmware/.github/ISSUE_TEMPLATE/config.yml b/firmware/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..a22a1bb --- /dev/null +++ b/firmware/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,20 @@ +blank_issues_enabled: false +contact_links: + - name: 📖 Marlin Documentation + url: https://marlinfw.org/ + about: Lots of documentation on installing and using Marlin. + - name: 👤 MarlinFirmware Facebook group + url: https://www.facebook.com/groups/1049718498464482 + about: Please ask and answer questions here. + - name: 🕹 Marlin on Discord + url: https://discord.com/servers/marlin-firmware-461605380783472640 + about: Join the Discord server for support and discussion. + - name: 🔗 Marlin Discussion Forum + url: https://reprap.org/forum/list.php?415 + about: A searchable web forum hosted by RepRap dot org. + - name: 📺 Marlin Videos on YouTube + url: https://www.youtube.com/results?search_query=marlin+firmware + about: Tutorials and more from Marlin users all around the world. Great for new users! + - name: 💸 Want to donate? + url: https://www.thinkyhead.com/donate-to-marlin + about: Please take a look at the various options to support Marlin Firmware's development financially! diff --git a/firmware/.github/ISSUE_TEMPLATE/feature_request.yml b/firmware/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..2e86071 --- /dev/null +++ b/firmware/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,44 @@ +name: ✨ Request a feature +description: Request a new Marlin Firmware feature +title: "[FR] (feature summary)" +labels: ["T: Feature Request"] +body: + - type: markdown + attributes: + value: > + Do you want to ask a question? Are you looking for support? Please use one of the [support links](https://github.com/MarlinFirmware/Marlin/issues/new/choose). + + - type: markdown + attributes: + value: > + **Thank you for requesting a new Marlin Firmware feature!** + + ## Before Requesting a Feature + + - Read and understand Marlin's [Code of Conduct](https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md). You are expected to comply with it, including treating everyone with respect. + + - Check the latest [`bugfix-2.1.x` branch](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.1.x.zip) to see if the feature already exists. + + - Before you proceed with your request, please consider if it is necessary to make it into a firmware feature, or if it may be better suited for a slicer or host feature. + + - type: textarea + attributes: + label: Is your feature request related to a problem? Please describe. + description: A clear description of the problem (e.g., "I need X but Marlin can't do it [...]"). + + - type: textarea + attributes: + label: Are you looking for hardware support? + description: Tell us the printer, board, or peripheral that needs support. + + - type: textarea + attributes: + label: Describe the feature you want + description: A clear description of the feature and how you think it should work. + validations: + required: true + + - type: textarea + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request here. diff --git a/firmware/.github/code_of_conduct.md b/firmware/.github/code_of_conduct.md new file mode 100644 index 0000000..5fd9e0c --- /dev/null +++ b/firmware/.github/code_of_conduct.md @@ -0,0 +1,40 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by following GitHub's [reporting abuse or spam article](https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version] + +[homepage]: https://contributor-covenant.org +[version]: https://contributor-covenant.org/version/1/4/ diff --git a/firmware/.github/contributing.md b/firmware/.github/contributing.md new file mode 100644 index 0000000..9455977 --- /dev/null +++ b/firmware/.github/contributing.md @@ -0,0 +1,148 @@ +# Contributing to Marlin + +Thanks for your interest in contributing to Marlin Firmware! + +The following is a set of guidelines for contributing to Marlin, hosted by the [MarlinFirmware Organization](https://github.com/MarlinFirmware) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a Pull Request. + +#### Table Of Contents + +[Code of Conduct](#code-of-conduct) + +[I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question) + +[How Can I Contribute?](#how-can-i-contribute) + * [Reporting Bugs](#reporting-bugs) + * [Suggesting Features or Changes](#suggesting-features-or-changes) + * [Your First Code Contribution](#your-first-code-contribution) + * [Pull Requests](#pull-requests) + +[Styleguides](#styleguides) + * [Git Commit Messages](#git-commit-messages) + * [C++ Coding Standards](#c++-coding-standards) + * [Documentation Styleguide](#documentation) + +[Additional Notes](#additional-notes) + * [Issue and Pull Request Labels](#issue-and-pull-request-labels) + +## Code of Conduct + +This project and everyone participating in it is governed by the [Marlin Code of Conduct](code_of_conduct.md). By participating, you are expected to uphold this code. Please report unacceptable behavior by following GitHub's [reporting abuse or spam article](https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam). + +## I don't want to read this whole thing I just have a question!!! + +> [!NOTE] +> Please don't file an issue to ask a question. You'll get faster results by using the resources below. + +We have a Message Board and a Facebook group where our knowledgable user community can provide helpful advice if you have questions. + +- [Marlin Documentation](https://marlinfw.org) - Official Marlin documentation +- Facebook Group ["Marlin Firmware"](https://www.facebook.com/groups/1049718498464482/) +- RepRap.org [Marlin Forum](https://forums.reprap.org/list.php?415) +- Facebook Group ["Marlin Firmware for 3D Printers"](https://www.facebook.com/groups/3Dtechtalk/) +- [Marlin Configuration](https://www.youtube.com/results?search_query=marlin+configuration) on YouTube + +If chat is more your speed, you can join the MarlinFirmware Discord server: + +* Use the link https://discord.com/servers/marlin-firmware-461605380783472640 to join up as a General User. +* Even though our Discord is pretty active, it may take a while for community members to respond — please be patient! +* Use the `#general` channel for general questions or discussion about Marlin. +* Other channels exist for certain topics or are limited to Patrons. Check the channel list. + +## How Can I Contribute? + +### Reporting Bugs + +This section guides you through submitting a Bug Report for Marlin. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports. + +Before creating a Bug Report, please test the "nightly" development branch, as you might find out that you don't need to create one. When you are creating a Bug Report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](ISSUE_TEMPLATE/bug_report.yml), the information it asks for helps us resolve issues faster. + +> [!NOTE] +> Regressions can happen. If you find a **Closed** issue that seems like your issue, go ahead and open a new issue and include a link to the original issue in the body of your new one. All you need to create a link is the issue number, preceded by #. For example, #8888. + +#### How Do I Submit A (Good) Bug Report? + +Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Use the New Issue button to create an issue and provide the following information by filling in [the template](ISSUE_TEMPLATE/bug_report.yml). + +Explain the problem and include additional details to help maintainers reproduce the problem: + +* **Use a clear and descriptive title** for the issue to identify the problem. +* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started Marlin, e.g. which command exactly you used in the terminal, or how you started Marlin otherwise. When listing steps, **don't just say what you did, but explain how you did it**. For example, if you moved the cursor to the end of a line, explain if you used the mouse, or a keyboard shortcut or an Marlin command, and if so which one? +* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets or log output in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines). +* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior. +* **Explain which behavior you expected to see instead and why.** +* **Include detailed log output** especially for probing and leveling. See below for usage of `DEBUG_LEVELING_FEATURE`. +* **Include screenshots, links to videos, etc.** which clearly demonstrate the problem. +* **Include G-code** (if relevant) that reliably causes the problem to show itself. +* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below. + +Provide more context: + +* **Can you reproduce the problem with a minimum of options enabled?** +* **Did the problem start happening recently** (e.g. after updating to a new version of Marlin) or was this always a problem? +* If the problem started happening recently, **can you reproduce the problem in an older version of Marlin?** What's the most recent version in which the problem doesn't happen? You can download older versions of Marlin from [the releases page](https://github.com/MarlinFirmware/Marlin/releases). +* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens. + +Include details about your configuration and environment: + +* **Which version of Marlin are you using?** Marlin's exact version and build date can be seen in the startup message when a host connects to Marlin, or in the LCD Info menu (if enabled). +* **What kind of 3D Printer and electronics are you using**? +* **What kind of add-ons (probe, filament sensor) do you have**? +* **Include your Configuration files.** Make a ZIP file containing `Configuration.h` and `Configuration_adv.h` and drop it on your reply. + +### Suggesting Features or Changes + +This section guides you through submitting a suggestion for Marlin, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions. + +Before creating a suggestion, please check [this list](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aopen+is%3Aissue+label%3A%22T%3A+Feature+Request%22) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-feature-request). Fill in [the template](ISSUE_TEMPLATE/feature_request.yml), including the steps that you imagine you would take if the feature you're requesting existed. + +#### Before Submitting a Feature Request + +* **Check the [Marlin website](https://marlinfw.org/)** for tips — you might discover that the feature is already included. Most importantly, check if you're using [the latest version of Marlin](https://github.com/MarlinFirmware/Marlin/releases) and if you can get the desired behavior by changing [Marlin's config settings](https://marlinfw.org/docs/configuration/configuration.html). +* **Perform a [cursory search](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aopen+is%3Aissue+label%3A%22T%3A+Feature+Request%22)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. + +#### How Do I Submit A (Good) Feature Request? + +Feature Requests are tracked as [GitHub issues](https://guides.github.com/features/issues/). Please follow these guidelines in your request: + +* **Use a clear and descriptive title** for the issue to identify the suggestion. +* **Provide a step-by-step description of the requested feature** in as much detail as possible. +* **Provide specific examples to demonstrate the steps**. +* **Describe the current behavior** and **explain which behavior you expected to see instead** and why. +* **Include screenshots and links to videos** which demonstrate the feature or point out the part of Marlin to which the request is related. +* **Explain why this feature would be useful** to most Marlin users. +* **Name other firmwares that have this feature, if any.** + +### Your First Code Contribution + +Unsure where to begin contributing to Marlin? You can start by looking through these `good-first-issue` and `help-wanted` issues: + +* [Beginner issues][good-first-issue] - issues which should only require a few lines of code, and a test or two. +* [Help Wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues. + +### Pull Requests + +Pull Requests should always be targeted to working branches (e.g., `bugfix-2.1.x` and/or `bugfix-1.1.x`) and never to release branches (e.g., `2.0.x` and/or `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](https://marlinfw.org/docs/development/getting_started_pull_requests.html) and Github's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation. + +* Fill in [the required template](pull_request_template.md). +* Don't include issue numbers in the PR title. +* Include pictures, diagrams, and links to videos in your Pull Request to demonstrate your changes, if needed. +* Follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) posted on our website. +* Document new code with clear and concise comments. +* End all files with a newline. + +## Styleguides + +### Git Commit Messages + +* Use the present tense ("Add feature" not "Added feature"). +* Use the imperative mood ("Move cursor to..." not "Moves cursor to..."). +* Limit the first line to 72 characters or fewer. +* Reference issues and Pull Requests liberally after the first line. + +### C++ Coding Standards + +* Please read and follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) posted on our website. Failure to follow these guidelines will delay evaluation and acceptance of Pull Requests. + +### Documentation + +* Guidelines for documentation are still under development. In-general, be clear, concise, and to-the-point. diff --git a/firmware/.github/pull_request_template.md b/firmware/.github/pull_request_template.md new file mode 100644 index 0000000..cd5158b --- /dev/null +++ b/firmware/.github/pull_request_template.md @@ -0,0 +1,33 @@ + + +### Description + + + +### Requirements + + + +### Benefits + + + +### Configurations + + + +### Related Issues + + diff --git a/firmware/.github/workflows/auto-label.yml b/firmware/.github/workflows/auto-label.yml new file mode 100644 index 0000000..3cbf110 --- /dev/null +++ b/firmware/.github/workflows/auto-label.yml @@ -0,0 +1,41 @@ +# +# auto-label.yml +# - Find all open issues without a label and a title containing "[BUG]". +# - Apply the label "Bug: Potential ?" to these issues. +# + +name: Label Old Bugs + +on: + schedule: + - cron: "30 8 * * *" + +jobs: + autolabel: + name: Auto Label + if: github.repository == 'MarlinFirmware/Marlin' + runs-on: ubuntu-22.04 + steps: + - name: Auto Label for [BUG] + uses: actions/github-script@v7 + with: + script: | + // Get all open issues in this repository + const issueList = await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open' + }); + // Filter issues without labels that have a title containing '[BUG]'. + const matchingIssues = issueList.data.filter( + issue => issue.title.includes('[BUG]') && issue.labels.length === 0 + ); + // Process the first 50 + for (const issue of matchingIssues.slice(0, 50)) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + labels: ['Bug: Potential ?'] + }); + } diff --git a/firmware/.github/workflows/bump-date.yml b/firmware/.github/workflows/bump-date.yml new file mode 100644 index 0000000..cb27ef1 --- /dev/null +++ b/firmware/.github/workflows/bump-date.yml @@ -0,0 +1,59 @@ +# +# bump-date.yml +# Bump the distribution date once per day +# + +name: Bump Distribution Date + +on: + schedule: + - cron: '0 */6 * * *' + +jobs: + bump_date: + name: Bump Distribution Date + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-22.04 + + steps: + + - name: Check out bugfix-2.0.x + uses: actions/checkout@v4 + with: + ref: bugfix-2.0.x + + - name: Bump Date (bugfix-2.0.x) + run: | + # Inline Bump Script + if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then + DIST=$( date +"%Y-%m-%d" ) + eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \ + eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/Version.h" && \ + git config user.name "${GITHUB_ACTOR}" && \ + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \ + git add . && \ + git commit -m "[cron] Bump distribution date ($DIST)" && \ + git push + fi + exit 0 + + - name: Check out bugfix-2.1.x + uses: actions/checkout@v4 + with: + ref: bugfix-2.1.x + + - name: Bump Date (bugfix-2.1.x) + run: | + # Inline Bump Script + if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then + DIST=$( date +"%Y-%m-%d" ) + eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \ + eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/Version.h" && \ + git config user.name "${GITHUB_ACTOR}" && \ + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \ + git add . && \ + git commit -m "[cron] Bump distribution date ($DIST)" && \ + git push + fi + exit 0 diff --git a/firmware/.github/workflows/check-pr.yml b/firmware/.github/workflows/check-pr.yml new file mode 100644 index 0000000..a28b7fd --- /dev/null +++ b/firmware/.github/workflows/check-pr.yml @@ -0,0 +1,33 @@ +# +# check-pr.yml +# Close PRs directed at release branches +# + +name: PR Bad Target + +on: + pull_request_target: + types: [opened] + branches: + - 1.0.x + - 1.1.x + - 2.0.x + +jobs: + bad_target: + name: PR Bad Target + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-22.04 + + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: > + Thanks for your contribution! Unfortunately we can't accept PRs directed at release branches. We make patches to the bugfix branches and only later do we push them out as releases. + + Please redo this PR starting with the `bugfix-2.1.x` branch and be careful to target `bugfix-2.1.x` when resubmitting the PR. Patches may also target `bugfix-2.0.x` if they are specifically for 2.0.9.x. + + It may help to set your fork's default branch to `bugfix-2.1.x`. + + See [this page](https://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions. diff --git a/firmware/.github/workflows/ci-build-tests.yml b/firmware/.github/workflows/ci-build-tests.yml new file mode 100644 index 0000000..afe9292 --- /dev/null +++ b/firmware/.github/workflows/ci-build-tests.yml @@ -0,0 +1,198 @@ +# +# ci-build-tests.yml +# Do test builds to catch compile errors +# + +name: CI - Build Tests + +on: + pull_request: + branches: + - bugfix-2.1.x + - 2.1.x + paths-ignore: + - config/** + - data/** + - docs/** + - test/** + - Marlin/tests/** + - '**/*.md' + push: + branches: + - bugfix-2.1.x + - 2.1.x + paths-ignore: + - config/** + - data/** + - docs/** + - test/** + - Marlin/tests/** + - '**/*.md' + +jobs: + test_builds: + name: Build Test + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-22.04 + + strategy: + fail-fast: true + matrix: + test-platform: + + # RP2040 + - SKR_Pico + + # Native + - linux_native + - simulator_linux_release + + # AVR + - mega2560 + - mega1280 + - at90usb1286_dfu + + # AVR Extended + - FYSETC_F6 + - melzi_optiboot + - rambo + - sanguino1284p + - sanguino644p + + # SAM3X8E + - DUE + - DUE_archim + + # SAMD21 + - SAMD51_grandcentral_m4 + - SAMD21_minitronics20 + + # ESP32 + - esp32 + - mks_tinybee + + # Teensy 2 + #- at90usb1286_cdc + + # Teensy MK20DX256 + - teensy31 + + # Teensy MK64FX512, MK66FX1M0 + - teensy35 + + # Teensy IMXRT1062DVx6A + - teensy41 + + # STM32F0 + - malyan_M300 + - STM32F070CB_malyan + - STM32F070RB_malyan + + # STM32F1 + - chitu_f103 + - mks_robin + - mks_robin_nano_v1v2 + - PANDA_PI_V29 + - STM32F103RC_btt + - STM32F103RC_fysetc + - STM32F103RE_btt + - STM32F103RE_btt_USB + - STM32F103RE_creality + - STM32F103VE_longer + #- mks_robin_mini + #- mks_robin_nano_v1_3_f4_usbmod + #- mks_robin_nano_v1v2_usbmod + #- STM32F103CB_malyan + #- STM32F103RC_btt_USB + #- STM32F103RE + + # STM32F4 + - ARMED + - BTT_BTT002 + - BTT_GTR_V1_0 + - BTT_SKR_PRO + - FLYF407ZG + - FYSETC_S6 + - LERDGEK + - LERDGEX + - mks_robin_pro2 + - Opulo_Lumen_REV3 + - rumba32 + - STM32F401RC_creality + - STM32F407VE_black + - I3DBEEZ9_V1 + + # STM32F7 + - NUCLEO_F767ZI + - REMRAM_V1 + + # STM32H7 + - BTT_SKR_SE_BX + - STM32H743VI_btt + + # STM32F1 (Maple) + - jgaurora_a5s_a1_maple + - mks_robin_lite_maple + - mks_robin_pro_maple + - STM32F103RC_btt_USB_maple + - STM32F103RC_fysetc_maple + - STM32F103RC_meeb_maple + - STM32F103VE_longer_maple + - STM32F103VE_ZM3E4V2_USB_maple + #- mks_robin_maple + #- mks_robin_nano_v1v2_maple + #- STM32F103RC_btt_maple + #- STM32F103RE_creality_maple + + # STM32G0 + - STM32G0B1RE_btt + + # HC32 + - HC32F460C_aquila_101 + + # LPC176x - Lengthy tests + - LPC1768 + - LPC1769 + + steps: + + - name: Check out the PR + uses: actions/checkout@v4 + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Cache PlatformIO + uses: actions/cache@v4 + with: + path: ~/.platformio + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + + - name: Select Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: '3.9' + architecture: 'x64' + + - name: Install PlatformIO + run: | + pip install -U platformio + pio upgrade --dev + pio pkg update --global + + - name: Install Simulator dependencies + run: | + sudo apt-get install build-essential + sudo apt-get install libsdl2-dev + sudo apt-get install libsdl2-net-dev + sudo apt-get install libglm-dev + + - name: Run ${{ matrix.test-platform }} Tests + run: | + make tests-single-ci TEST_TARGET=${{ matrix.test-platform }} diff --git a/firmware/.github/workflows/ci-unit-tests.yml b/firmware/.github/workflows/ci-unit-tests.yml new file mode 100644 index 0000000..9a311aa --- /dev/null +++ b/firmware/.github/workflows/ci-unit-tests.yml @@ -0,0 +1,73 @@ +# +# ci-unit-tests.yml +# Build and execute unit tests to catch functional issues in code +# + +name: CI - Unit Tests + +on: + pull_request: + branches: + - bugfix-2.1.x + # Cannot be enabled on 2.1.x until it contains the unit test framework + #- 2.1.x + paths-ignore: + - config/** + - data/** + - docs/** + - '**/*.md' + push: + branches: + - bugfix-2.1.x + # Cannot be enabled on 2.1.x until it contains the unit test framework + #- 2.1.x + paths-ignore: + - config/** + - data/** + - docs/** + - '**/*.md' + +jobs: + # This runs all unit tests as a single job. While it should be possible to break this up into + # multiple jobs, they currently run quickly and finish long before the compilation tests. + run_unit_tests: + name: Unit Test + # These tests will only be able to run on the bugfix-2.1.x branch, until the next release + # pulls them into additional branches. + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-22.04 + + steps: + - name: Check out the PR + uses: actions/checkout@v4 + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Cache PlatformIO + uses: actions/cache@v4 + with: + path: ~/.platformio + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + + - name: Select Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: '3.9' + architecture: 'x64' + + - name: Install PlatformIO + run: | + pip install -U platformio + pio upgrade --dev + pio pkg update --global + + - name: Run All Unit Tests + run: | + make unit-test-all-local diff --git a/firmware/.github/workflows/ci-validate-boards.yml b/firmware/.github/workflows/ci-validate-boards.yml new file mode 100644 index 0000000..baa7b8b --- /dev/null +++ b/firmware/.github/workflows/ci-validate-boards.yml @@ -0,0 +1,48 @@ +# +# ci-validate-boards.yml +# Validate boards.h to make sure it's all set up correctly +# + +name: CI - Validate boards.h + +# We can do the on: section as two items, one for pull requests and one for pushes... +on: + pull_request: + branches: + - bugfix-2.1.x + paths: + - 'Marlin/src/core/boards.h' + push: + branches: + - bugfix-2.1.x + paths: + - 'Marlin/src/core/boards.h' + +jobs: + validate_pins_files: + name: Validate boards.h + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-22.04 + + steps: + - name: Check out the PR + uses: actions/checkout@v4 + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Select Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: '3.9' + architecture: 'x64' + + - name: Validate core/boards.h + run: | + make validate-boards -j diff --git a/firmware/.github/workflows/ci-validate-pins.yml b/firmware/.github/workflows/ci-validate-pins.yml new file mode 100644 index 0000000..695f8ef --- /dev/null +++ b/firmware/.github/workflows/ci-validate-pins.yml @@ -0,0 +1,51 @@ +# +# ci-validate-pins.yml +# Validate that all of the pins files are unchanged by pinsformat.py +# + +name: CI - Validate Pins Files + +on: + pull_request: + branches: + - bugfix-2.1.x + # Cannot be enabled on 2.1.x until it contains the unit test framework + #- 2.1.x + paths: + - 'Marlin/src/pins/*/**' + push: + branches: + - bugfix-2.1.x + # Cannot be enabled on 2.1.x until it contains the unit test framework + #- 2.1.x + paths: + - 'Marlin/src/pins/*/**' + +jobs: + validate_pins_files: + name: Validate Pins Files + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-22.04 + + steps: + - name: Check out the PR + uses: actions/checkout@v4 + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Select Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: '3.9' + architecture: 'x64' + + - name: Validate all pins files + run: | + make validate-pins -j diff --git a/firmware/.github/workflows/clean-closed.yml b/firmware/.github/workflows/clean-closed.yml new file mode 100644 index 0000000..ad0ee8e --- /dev/null +++ b/firmware/.github/workflows/clean-closed.yml @@ -0,0 +1,40 @@ +# +# clean-closed.yml +# Remove obsolete labels when an Issue or PR is closed +# + +name: Clean Closed + +on: + pull_request: + types: [closed] + issues: + types: [closed] + +jobs: + remove_label: + runs-on: ubuntu-22.04 + + strategy: + matrix: + label: + - "S: Don't Merge" + - "S: Hold for 2.1" + - "S: Please Merge" + - "S: Please Test" + - "help wanted" + - "Bug: Potential ?" + - "Needs: Discussion" + - "Needs: Documentation" + - "Needs: More Data" + - "Needs: Patch" + - "Needs: Testing" + - "Needs: Work" + + steps: + - uses: actions/checkout@v4 + - name: Remove Labels + uses: actions-ecosystem/action-remove-labels@v1 + with: + github_token: ${{ github.token }} + labels: ${{ matrix.label }} diff --git a/firmware/.github/workflows/close-stale.yml b/firmware/.github/workflows/close-stale.yml new file mode 100644 index 0000000..4bb488c --- /dev/null +++ b/firmware/.github/workflows/close-stale.yml @@ -0,0 +1,40 @@ +# +# close-stale.yml +# Close open issues after a period of inactivity +# + +name: Close Stale Issues + +on: + schedule: + - cron: "22 1 * * *" + +jobs: + stale: + name: Close Stale Issues + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-22.04 + + steps: + - uses: actions/stale@v9 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: | + Greetings from the Marlin AutoBot! + This issue has had no activity for the last 90 days. + Do you still see this issue with the latest `bugfix-2.1.x` code? + Please add a reply within 14 days or this issue will be automatically closed. + To keep a confirmed issue open we can also add a "Bug: Confirmed" tag. + + Disclaimer: This is an open community project with lots of activity and limited + resources. The main project contributors will do a bug sweep ahead of the next + release, but any skilled member of the community may jump in at any time to fix + this issue. That can take a while depending on our busy lives so please be patient, + and take advantage of other resources such as the MarlinFirmware Discord to help + solve the issue. + days-before-stale: 90 + days-before-close: 14 + stale-issue-label: 'stale-closing-soon' + exempt-all-assignees: true + exempt-issue-labels: 'Bug: Confirmed !,T: Feature Request,Needs: More Data,Needs: Discussion,Needs: Documentation,Needs: Patch,Needs: Work,Needs: Testing,help wanted,no-locking' diff --git a/firmware/.github/workflows/lock-closed.yml b/firmware/.github/workflows/lock-closed.yml new file mode 100644 index 0000000..1435a3e --- /dev/null +++ b/firmware/.github/workflows/lock-closed.yml @@ -0,0 +1,32 @@ +# +# lock-closed.yml +# Lock closed issues after a period of inactivity +# + +name: Lock Closed Issues + +on: + schedule: + - cron: '0 1/13 * * *' + +jobs: + lock: + name: Lock Closed Issues + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-22.04 + + steps: + - uses: dessant/lock-threads@v5 + with: + github-token: ${{ github.token }} + process-only: 'issues' + issue-inactive-days: '60' + exclude-issue-created-before: '' + exclude-any-issue-labels: 'no-locking' + add-issue-labels: '' + issue-comment: > + This issue has been automatically locked since there + has not been any recent activity after it was closed. + Please open a new issue for related bugs. + issue-lock-reason: '' diff --git a/firmware/.github/workflows/unlock-reopened.yml b/firmware/.github/workflows/unlock-reopened.yml new file mode 100644 index 0000000..f88e07c --- /dev/null +++ b/firmware/.github/workflows/unlock-reopened.yml @@ -0,0 +1,22 @@ +# +# unlock-reopened.yml +# Unlock an issue whenever it is re-opened +# + +name: "Unlock reopened issue" + +on: + issues: + types: [reopened] + +jobs: + unlock: + name: Unlock Reopened + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-22.04 + + steps: + - uses: OSDKDev/unlock-issues@v1.1 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/firmware/.gitignore b/firmware/.gitignore old mode 100755 new mode 100644 index 50a34f9..daa5c5c --- a/firmware/.gitignore +++ b/firmware/.gitignore @@ -169,3 +169,6 @@ __pycache__ tags *.logs *.bak +.aider* +!.aiderignore +.env diff --git a/firmware/.vscode/extensions.json b/firmware/.vscode/extensions.json new file mode 100644 index 0000000..52fe2a0 --- /dev/null +++ b/firmware/.vscode/extensions.json @@ -0,0 +1,12 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "marlinfirmware.auto-build", + "platformio.platformio-ide" + ], + "unwantedRecommendations": [ + "ms-vscode-remote.remote-containers", + "ms-vscode.cpptools-extension-pack" + ] +} diff --git a/firmware/.zed/settings.json b/firmware/.zed/settings.json new file mode 100644 index 0000000..70bb149 --- /dev/null +++ b/firmware/.zed/settings.json @@ -0,0 +1,16 @@ +/** + * Marlin-specific settings for Zed + * + * For a full list of overridable settings, and general information on folder-specific settings, + * see the documentation: https://zed.dev/docs/configuring-zed#settings-files + */ +{ + "languages": { + "C": { + "enable_language_server": false + }, + "C++": { + "enable_language_server": false + } + } +} diff --git a/firmware/Makefile b/firmware/Makefile index 02722b9..83b27e5 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -6,9 +6,10 @@ UNIT_TEST_CONFIG ?= default help: @echo "Tasks for local development:" - @echo "make marlin : Build marlin for the configured board" + @echo "make marlin : Build Marlin for the configured board" @echo "make format-pins -j : Reformat all pins files (-j for parallel execution)" @echo "make validate-pins -j : Validate all pins files, fails if any require reformatting" + @echo "make validate-boards -j : Validate boards.h and pins.h for standards compliance" @echo "make tests-single-ci : Run a single test from inside the CI" @echo "make tests-single-local : Run a single test locally" @echo "make tests-single-local-docker : Run a single test locally, using docker" @@ -102,3 +103,11 @@ format-pins: $(PINS) validate-pins: format-pins @echo "Validating pins files" @git diff --exit-code || (git status && echo "\nError: Pins files are not formatted correctly. Run \"make format-pins\" to fix.\n" && exit 1) + +BOARDS_FILE := Marlin/src/core/boards.h + +.PHONY: validate-boards + +validate-boards: + @echo "Validating boards.h file" + @python $(SCRIPTS_DIR)/validate_boards.py $(BOARDS_FILE) || (echo "\nError: boards.h file is not valid. Please check and correct it.\n" && exit 1) diff --git a/firmware/Marlin/Configuration.h b/firmware/Marlin/Configuration.h index df06ce6..0a00fc9 100644 --- a/firmware/Marlin/Configuration.h +++ b/firmware/Marlin/Configuration.h @@ -21,8 +21,6 @@ */ #pragma once -#define CONFIG_EXAMPLES_DIR "Creality/Ender-5 Pro/CrealityV427" - /** * Configuration.h * @@ -63,16 +61,18 @@ // @section info // Author info of this build printed to the host during boot and M115 -#define STRING_CONFIG_H_AUTHOR "(Dust, Ender-5 Pro)" // Who made the changes. +#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Original author or contributor. //#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes) // @section machine // Choose the name from boards.h that matches your setup #ifndef MOTHERBOARD - #define MOTHERBOARD BOARD_CREALITY_V427 + #define MOTHERBOARD BOARD_RAMPS_14_SF #endif +// @section serial + /** * Select the serial port on the board to use for communication with the host. * This allows the connection of wireless adapters (for instance) to non-default port pins. @@ -81,7 +81,7 @@ * * :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] */ -#define SERIAL_PORT 1 +#define SERIAL_PORT 0 /** * Serial Port Baud Rate @@ -94,7 +94,7 @@ * * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] */ -#define BAUDRATE 115200 +#define BAUDRATE 250000 //#define BAUD_RATE_GCODE // Enable G-code M575 to set the baud rate @@ -128,7 +128,7 @@ //#define BLUETOOTH // Name displayed in the LCD "Ready" message and Info menu -#define CUSTOM_MACHINE_NAME "Motor-Winder 1.0" +//#define CUSTOM_MACHINE_NAME "3D Printer" // Printer's unique ID, used by some programs to differentiate between machines. // Choose your own or use a service like https://www.uuidgenerator.net/version4 @@ -151,9 +151,9 @@ * TMC5160, TMC5160_STANDALONE * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] */ -#define X_DRIVER_TYPE TMC2208_STANDALONE -#define Y_DRIVER_TYPE TMC2208_STANDALONE -#define Z_DRIVER_TYPE TMC2208_STANDALONE +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 //#define X2_DRIVER_TYPE A4988 //#define Y2_DRIVER_TYPE A4988 //#define Z2_DRIVER_TYPE A4988 @@ -165,7 +165,7 @@ //#define U_DRIVER_TYPE A4988 //#define V_DRIVER_TYPE A4988 //#define W_DRIVER_TYPE A4988 -#define E0_DRIVER_TYPE TMC2208_STANDALONE +//#define E0_DRIVER_TYPE A4988 //#define E1_DRIVER_TYPE A4988 //#define E2_DRIVER_TYPE A4988 //#define E3_DRIVER_TYPE A4988 @@ -220,7 +220,7 @@ // This defines the number of extruders // :[0, 1, 2, 3, 4, 5, 6, 7, 8] -#define EXTRUDERS 1 +#define EXTRUDERS 0 // Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. #define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 @@ -566,7 +566,7 @@ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. */ -#define TEMP_SENSOR_0 1 +#define TEMP_SENSOR_0 0 #define TEMP_SENSOR_1 0 #define TEMP_SENSOR_2 0 #define TEMP_SENSOR_3 0 @@ -574,7 +574,7 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_6 0 #define TEMP_SENSOR_7 0 -#define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_PROBE 0 #define TEMP_SENSOR_CHAMBER 0 #define TEMP_SENSOR_COOLER 0 @@ -658,7 +658,7 @@ #define HEATER_5_MAXTEMP 275 #define HEATER_6_MAXTEMP 275 #define HEATER_7_MAXTEMP 275 -#define BED_MAXTEMP 125 +#define BED_MAXTEMP 150 #define CHAMBER_MAXTEMP 60 /** @@ -684,7 +684,7 @@ * PIDTEMP : PID temperature control (~4.1K) * MPCTEMP : Predictive Model temperature control. (~1.8K without auto-tune) */ -#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning +//#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning //#define MPCTEMP // See https://marlinfw.org/docs/features/model_predictive_control.html #define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current @@ -695,17 +695,16 @@ //#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] - // Creality Ender-5 Pro #if ENABLED(PID_PARAMS_PER_HOTEND) // Specify up to one value per hotend here, according to your setup. // If there are fewer values, the last one applies to the remaining hotends. - #define DEFAULT_Kp_LIST { 21.73, 21.73 } - #define DEFAULT_Ki_LIST { 1.54, 1.54 } - #define DEFAULT_Kd_LIST { 76.55, 76.55 } + #define DEFAULT_Kp_LIST { 22.20, 22.20 } + #define DEFAULT_Ki_LIST { 1.08, 1.08 } + #define DEFAULT_Kd_LIST { 114.00, 114.00 } #else - #define DEFAULT_Kp 21.73 - #define DEFAULT_Ki 1.54 - #define DEFAULT_Kd 76.55 + #define DEFAULT_Kp 22.20 + #define DEFAULT_Ki 1.08 + #define DEFAULT_Kd 114.00 #endif #else #define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current @@ -805,6 +804,40 @@ //#define BED_LIMIT_SWITCHING // Keep the bed temperature within BED_HYSTERESIS of the target #endif +/** + * Peltier Bed - Heating and Cooling + * + * A Peltier device transfers heat from one side to the other in proportion to the amount of + * current flowing through the device and the direction of current flow. So the same device + * can both heat and cool. + * + * When "cooling" in addition to rejecting the heat transferred from the hot side to the cold + * side, the dissipated power (voltage * current) must also be rejected. Be sure to set up a + * fan that can be powered in sync with the Peltier unit. + * + * This feature is only set up to run in bang-bang mode because Peltiers don't handle PWM + * well without filter circuitry. + * + * Since existing 3D printers are made to handle relatively high current for the heated bed, + * we can use the heated bed power pins to control the Peltier power using the same G-codes + * as the heated bed (M140, M190, etc.). + * + * A second GPIO pin is required to control current direction. + * Two configurations are possible: Relay and H-Bridge + * + * (At this time only relay is supported. H-bridge requires 4 MOS switches configured in H-Bridge.) + * + * Power is handled by the bang-bang control loop: 0 or 255. + * Cooling applications are more common than heating, so the pin states are commonly: + * LOW = Heating = Relay Energized + * HIGH = Cooling = Relay in "Normal" state + */ +//#define PELTIER_BED +#if ENABLED(PELTIER_BED) + #define PELTIER_DIR_PIN -1 // Relay control pin for Peltier + #define PELTIER_DIR_HEAT_STATE LOW // The relay pin state that causes the Peltier to heat +#endif + // Add 'M190 R T' for more gradual M190 R bed cooling. //#define BED_ANNEALING_GCODE @@ -861,8 +894,8 @@ #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. - #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash) - #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash) + #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of flash) + #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash) #endif // @section safety @@ -874,8 +907,8 @@ * * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! *** */ -// #define PREVENT_COLD_EXTRUSION -// #define EXTRUDE_MINTEMP 170 +//#define PREVENT_COLD_EXTRUSION +//#define EXTRUDE_MINTEMP 170 /** * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH. @@ -901,16 +934,16 @@ * details can be tuned in Configuration_adv.h */ -#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders -#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed -#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber -#define THERMAL_PROTECTION_COOLER // Enable thermal protection for the laser cooling +//#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +//#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed +//#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber +//#define THERMAL_PROTECTION_COOLER // Enable thermal protection for the laser cooling //=========================================================================== //============================= Mechanical Settings ========================= //=========================================================================== -// @section machine +// @section kinematics // Enable one of the options below for CoreXY, CoreXZ, or CoreYZ kinematics, // either in the usual order or reversed @@ -934,6 +967,15 @@ // Enable for a belt style printer with endless "Z" motion //#define BELTPRINTER +// Articulated robot (arm). Joints are directly mapped to axes with no kinematics. +//#define ARTICULATED_ROBOT_ARM + +// For a hot wire cutter with parallel horizontal axes (X, I) where the heights of the two wire +// ends are controlled by parallel axes (Y, J). Joints are directly mapped to axes (no kinematics). +//#define FOAMCUTTER_XYUV + +// @section polargraph + // Enable for Polargraph Kinematics //#define POLARGRAPH #if ENABLED(POLARGRAPH) @@ -1120,15 +1162,6 @@ #define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly #endif -// @section machine - -// Articulated robot (arm). Joints are directly mapped to axes with no kinematics. -//#define ARTICULATED_ROBOT_ARM - -// For a hot wire cutter with parallel horizontal axes (X, I) where the heights of the two wire -// ends are controlled by parallel axes (Y, J). Joints are directly mapped to axes (no kinematics). -//#define FOAMCUTTER_XYUV - //=========================================================================== //============================== Endstop Settings =========================== //=========================================================================== @@ -1189,25 +1222,25 @@ * Endstop "Hit" State * Set to the state (HIGH or LOW) that applies to each endstop. */ -#define X_MIN_ENDSTOP_HIT_STATE HIGH -#define X_MAX_ENDSTOP_HIT_STATE HIGH -#define Y_MIN_ENDSTOP_HIT_STATE HIGH -#define Y_MAX_ENDSTOP_HIT_STATE HIGH -#define Z_MIN_ENDSTOP_HIT_STATE HIGH -#define Z_MAX_ENDSTOP_HIT_STATE HIGH -#define I_MIN_ENDSTOP_HIT_STATE HIGH -#define I_MAX_ENDSTOP_HIT_STATE HIGH -#define J_MIN_ENDSTOP_HIT_STATE HIGH -#define J_MAX_ENDSTOP_HIT_STATE HIGH -#define K_MIN_ENDSTOP_HIT_STATE HIGH -#define K_MAX_ENDSTOP_HIT_STATE HIGH -#define U_MIN_ENDSTOP_HIT_STATE HIGH -#define U_MAX_ENDSTOP_HIT_STATE HIGH -#define V_MIN_ENDSTOP_HIT_STATE HIGH -#define V_MAX_ENDSTOP_HIT_STATE HIGH -#define W_MIN_ENDSTOP_HIT_STATE HIGH -#define W_MAX_ENDSTOP_HIT_STATE HIGH -#define Z_MIN_PROBE_ENDSTOP_HIT_STATE HIGH +#define X_MIN_ENDSTOP_HIT_STATE LOW //! +#define X_MAX_ENDSTOP_HIT_STATE LOW +#define Y_MIN_ENDSTOP_HIT_STATE LOW +#define Y_MAX_ENDSTOP_HIT_STATE HIGH //! +#define Z_MIN_ENDSTOP_HIT_STATE HIGH +#define Z_MAX_ENDSTOP_HIT_STATE LOW //! +//#define I_MIN_ENDSTOP_HIT_STATE HIGH +//#define I_MAX_ENDSTOP_HIT_STATE HIGH +//#define J_MIN_ENDSTOP_HIT_STATE HIGH +//#define J_MAX_ENDSTOP_HIT_STATE HIGH +//#define K_MIN_ENDSTOP_HIT_STATE HIGH +//#define K_MAX_ENDSTOP_HIT_STATE HIGH +//#define U_MIN_ENDSTOP_HIT_STATE HIGH +//#define U_MAX_ENDSTOP_HIT_STATE HIGH +//#define V_MIN_ENDSTOP_HIT_STATE HIGH +//#define V_MAX_ENDSTOP_HIT_STATE HIGH +//#define W_MIN_ENDSTOP_HIT_STATE HIGH +//#define W_MAX_ENDSTOP_HIT_STATE HIGH +//#define Z_MIN_PROBE_ENDSTOP_HIT_STATE HIGH // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. @@ -1255,7 +1288,8 @@ * Override with M92 (when enabled below) * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 2572, 80, 800, 93 } +//#define DEFAULT_AXIS_STEPS_PER_UNIT { 1280, 80, 8.89 } +#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 8.89, 1280 } /** * Enable support for M92. Disable to save at least ~530 bytes of flash. @@ -1267,7 +1301,7 @@ * Override with M203 * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] */ -#define DEFAULT_MAX_FEEDRATE { 5, 150, 5, 25 } +#define DEFAULT_MAX_FEEDRATE { 300, 5000, 5} //#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2 #if ENABLED(LIMITED_MAX_FR_EDITING) @@ -1280,7 +1314,7 @@ * Override with M201 * X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]] */ -#define DEFAULT_MAX_ACCELERATION { 1500, 700, 100, 5000 } +#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 3000} //#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2 #if ENABLED(LIMITED_MAX_ACCEL_EDITING) @@ -1294,16 +1328,10 @@ * M204 P Acceleration * M204 R Retract Acceleration * M204 T Travel Acceleration - * M204 I Angular Acceleration - * M204 J Angular Travel Acceleration */ -#define DEFAULT_ACCELERATION 500 // X, Y, Z ... and E acceleration for printing moves -#define DEFAULT_RETRACT_ACCELERATION 500 // E acceleration for retracts -#define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z ... acceleration for travel (non printing) moves -#if ENABLED(AXIS4_ROTATES) - #define DEFAULT_ANGULAR_ACCELERATION 3000 // I, J, K acceleration for rotational-only printing moves - #define DEFAULT_ANGULAR_TRAVEL_ACCELERATION 3000 // I, J, K acceleration for rotational-only travel (non printing) moves -#endif +#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves /** * Default Jerk limits (mm/s) @@ -1342,7 +1370,7 @@ * https://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html */ #if DISABLED(CLASSIC_JERK) - #define JUNCTION_DEVIATION_MM 0.08 // (mm) Distance from real junction edge + #define JUNCTION_DEVIATION_MM 0.013 // (mm) Distance from real junction edge #define JD_HANDLE_SMALL_SEGMENTS // Use curvature estimation instead of just the junction angle // for small segments (< 1mm) with large junction angles (> 135°). #endif @@ -1371,7 +1399,7 @@ * The probe replaces the Z-MIN endstop and is used for Z homing. * (Automatically enables USE_PROBE_FOR_Z_HOMING.) */ -// #define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN +#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN // Force the use of the probe for Z-axis homing //#define USE_PROBE_FOR_Z_HOMING @@ -1619,7 +1647,8 @@ // with NOZZLE_AS_PROBE this can be negative for a wider probing area. #define PROBING_MARGIN 10 -// X and Y axis travel speed (mm/min) between probes +// X and Y axis travel speed (mm/min) between probes. +// Leave undefined to use the average of the current XY homing feedrate. #define XY_PROBE_FEEDRATE (133*60) // Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2) @@ -1743,17 +1772,17 @@ // @section stepper drivers // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -// :{ 0:'Low', 1:'High' } -#define X_ENABLE_ON 0 -#define Y_ENABLE_ON 0 -#define Z_ENABLE_ON 0 -#define E_ENABLE_ON 0 // For all extruders -//#define I_ENABLE_ON 0 -//#define J_ENABLE_ON 0 -//#define K_ENABLE_ON 0 -//#define U_ENABLE_ON 0 -//#define V_ENABLE_ON 0 -//#define W_ENABLE_ON 0 +// :['LOW', 'HIGH'] +#define X_ENABLE_ON LOW +#define Y_ENABLE_ON LOW +#define Z_ENABLE_ON LOW +#define E_ENABLE_ON LOW // For all extruders +//#define I_ENABLE_ON LOW +//#define J_ENABLE_ON LOW +//#define K_ENABLE_ON LOW +//#define U_ENABLE_ON LOW +//#define V_ENABLE_ON LOW +//#define W_ENABLE_ON LOW // Disable axis steppers immediately when they're not being stepped. // WARNING: When motors turn off there is a chance of losing position accuracy! @@ -1773,14 +1802,14 @@ // @section extruder //#define DISABLE_E // Disable the extruder when not stepping -//#define DISABLE_OTHER_EXTRUDERS // Keep only the active extruder enabled +//#define DISABLE_OTHER_EXTRUDERS // Keep only the active extruder enabled // @section motion // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false +#define INVERT_X_DIR true #define INVERT_Y_DIR false -#define INVERT_Z_DIR false +#define INVERT_Z_DIR true //#define INVERT_I_DIR false //#define INVERT_J_DIR false //#define INVERT_K_DIR false @@ -1812,7 +1841,7 @@ */ //#define Z_IDLE_HEIGHT Z_HOME_POS -//#define Z_CLEARANCE_FOR_HOMING 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... +#define Z_CLEARANCE_FOR_HOMING 0 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... // You'll need this much clearance above Z_MAX_POS to avoid grinding. //#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing (if Z was homed) @@ -1823,8 +1852,8 @@ // Direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1] #define X_HOME_DIR -1 -#define Y_HOME_DIR -1 -#define Z_HOME_DIR -1 +#define Y_HOME_DIR 1 +#define Z_HOME_DIR 1 //#define I_HOME_DIR -1 //#define J_HOME_DIR -1 //#define K_HOME_DIR -1 @@ -1850,8 +1879,8 @@ // @section geometry // The size of the printable area -#define X_BED_SIZE 26 -#define Y_BED_SIZE 44 +#define X_BED_SIZE (38+26+16) +#define Y_BED_SIZE 360 // Travel limits (linear=mm, rotational=°) after homing, corresponding to endstop positions. #define X_MIN_POS 0 @@ -1859,7 +1888,7 @@ #define Z_MIN_POS 0 #define X_MAX_POS X_BED_SIZE #define Y_MAX_POS Y_BED_SIZE -#define Z_MAX_POS 3000 +#define Z_MAX_POS 41 //#define I_MIN_POS 0 //#define I_MAX_POS 50 //#define J_MIN_POS 0 @@ -1883,7 +1912,7 @@ */ // Min software endstops constrain movement within minimum coordinate bounds -#define MIN_SOFTWARE_ENDSTOPS +//#define MIN_SOFTWARE_ENDSTOPS #if ENABLED(MIN_SOFTWARE_ENDSTOPS) #define MIN_SOFTWARE_ENDSTOP_X #define MIN_SOFTWARE_ENDSTOP_Y @@ -1897,7 +1926,7 @@ #endif // Max software endstops constrain movement within maximum coordinate bounds -#define MAX_SOFTWARE_ENDSTOPS +//#define MAX_SOFTWARE_ENDSTOPS #if ENABLED(MAX_SOFTWARE_ENDSTOPS) #define MAX_SOFTWARE_ENDSTOP_X #define MAX_SOFTWARE_ENDSTOP_Y @@ -2028,9 +2057,9 @@ //#define FIL_MOTION8_PULLUP //#define FIL_MOTION8_PULLDOWN #endif - #endif - #endif -#endif + #endif // FILAMENT_MOTION_SENSOR + #endif // FILAMENT_RUNOUT_DISTANCE_MM +#endif // FILAMENT_RUNOUT_SENSOR //=========================================================================== //=============================== Bed Leveling ============================== @@ -2122,12 +2151,6 @@ #define DEFAULT_LEVELING_FADE_HEIGHT 10.0 // (mm) Default fade height. #endif - /** - * Add Z offset (M424 Z) that applies to all moves at the planner level. - * This Z offset will be automatically set to the middle value with G29. - */ - //#define GLOBAL_MESH_Z_OFFSET - /** * For Cartesian machines, instead of dividing moves on mesh boundaries, * split up moves into short segments like a Delta. This follows the @@ -2291,8 +2314,8 @@ // Manually set the home position. Leave these undefined for automatic settings. // For DELTA this is the top-center of the Cartesian print volume. -#define MANUAL_X_HOME_POS 0 -#define MANUAL_Y_HOME_POS 0 +//#define MANUAL_X_HOME_POS 0 +//#define MANUAL_Y_HOME_POS 0 //#define MANUAL_Z_HOME_POS 0 //#define MANUAL_I_HOME_POS 0 //#define MANUAL_J_HOME_POS 0 @@ -2317,7 +2340,10 @@ #endif // Homing speeds (linear=mm/min, rotational=°/min) -#define HOMING_FEEDRATE_MM_M { (20*60), (20*60), (4*60) } +#define HOMING_FEEDRATE_MM_M { 3000, 3000, 3000} + +// Edit homing feedrates with M210 and MarlinUI menu items +#define EDITABLE_HOMING_FEEDRATE // Validate that endstops are triggered on homing moves #define VALIDATE_HOMING_ENDSTOPS @@ -2395,7 +2421,7 @@ * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) */ -#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 //#define DISABLE_M503 // Saves ~2700 bytes of flash. Disable for release! #define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save flash. #define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load @@ -2433,17 +2459,17 @@ // // Preheat Constants - Up to 10 are supported without changes // -#define PREHEAT_1_LABEL "PLA" -#define PREHEAT_1_TEMP_HOTEND 185 -#define PREHEAT_1_TEMP_BED 45 -#define PREHEAT_1_TEMP_CHAMBER 35 -#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255 +//#define PREHEAT_1_LABEL "PLA" +//#define PREHEAT_1_TEMP_HOTEND 180 +//#define PREHEAT_1_TEMP_BED 70 +//#define PREHEAT_1_TEMP_CHAMBER 35 +//#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 -#define PREHEAT_2_LABEL "ABS" -#define PREHEAT_2_TEMP_HOTEND 240 -#define PREHEAT_2_TEMP_BED 70 -#define PREHEAT_2_TEMP_CHAMBER 35 -#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255 +//#define PREHEAT_2_LABEL "ABS" +//#define PREHEAT_2_TEMP_HOTEND 240 +//#define PREHEAT_2_TEMP_BED 110 +//#define PREHEAT_2_TEMP_CHAMBER 35 +//#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 /** * @section nozzle park @@ -2694,7 +2720,7 @@ * * :[0:'Classic', 1:'Průša', 2:'CNC'] */ -#define LCD_INFO_SCREEN_STYLE 0 +#define LCD_INFO_SCREEN_STYLE 2 /** * LCD Menu Items @@ -2734,7 +2760,7 @@ // // Set this option if CLOCKWISE causes values to DECREASE // -//#define REVERSE_ENCODER_DIRECTION +#define REVERSE_ENCODER_DIRECTION // // This option reverses the encoder direction for navigating LCD menus. @@ -2757,7 +2783,7 @@ // // This option increases encoder samples to filter out phantom encoder clicks caused by EMI noise. // -#define ENCODER_NOISE_FILTER +//#define ENCODER_NOISE_FILTER #if ENABLED(ENCODER_NOISE_FILTER) #define ENCODER_SAMPLES 10 #endif @@ -2970,7 +2996,7 @@ // RepRapDiscount FULL GRAPHIC Smart Controller // https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller // -//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER // // K.3D Full Graphic Smart Controller @@ -3082,10 +3108,7 @@ // // Connect to EXP1 on RAMPS and compatible boards. // -#define CR10_STOCKDISPLAY -#if ENABLED(CR10_STOCKDISPLAY) - #define RET6_12864_LCD // Specific to the SoC (can either be RET / VET) -#endif +//#define CR10_STOCKDISPLAY // // Ender-2 OEM display, a variant of the MKS_MINI_12864 @@ -3217,16 +3240,13 @@ * - Download https://github.com/CrealityOfficial/Ender-3S1/archive/3S1_Plus_Screen.zip * - Copy the downloaded DWIN_SET folder to the SD card. * - * CREALITY_TOUCH - * - CR-6 OEM touch screen. A DWIN display with touch. - * * Flash display with DGUS Displays for Marlin: * - Format the SD card to FAT32 with an allocation size of 4kb. * - Download files as specified for your type of display. * - Plug the microSD card into the back of the display. * - Boot the display and wait for the update to complete. * - * :[ 'ORIGIN', 'FYSETC', 'HYPRECY', 'MKS', 'RELOADED', 'IA_CREALITY', 'E3S1PRO', 'CREALITY_TOUCH' ] + * :[ 'ORIGIN', 'FYSETC', 'HYPRECY', 'MKS', 'RELOADED', 'IA_CREALITY', 'E3S1PRO' ] */ //#define DGUS_LCD_UI ORIGIN #if DGUS_UI_IS(MKS) @@ -3265,17 +3285,16 @@ // //#define ANYCUBIC_LCD_VYPER +// +// Sovol SV-06 Resistive Touch Screen +// +//#define SOVOL_SV06_RTS + // // 320x240 Nextion 2.8" serial TFT Resistive Touch Screen NX3224T028 // //#define NEXTION_TFT -// -// PanelDue touch controller by Escher3D -// http://escher3d.com/pages/order/products/product2.php -// -//#define PANELDUE - // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extui'. @@ -3442,6 +3461,8 @@ * TFT_ROTATE_180, TFT_ROTATE_180_MIRROR_X, TFT_ROTATE_180_MIRROR_Y, * TFT_ROTATE_270, TFT_ROTATE_270_MIRROR_X, TFT_ROTATE_270_MIRROR_Y, * TFT_MIRROR_X, TFT_MIRROR_Y, TFT_NO_ROTATION + * + * :{ 'TFT_NO_ROTATION':'None', 'TFT_ROTATE_90':'90°', 'TFT_ROTATE_90_MIRROR_X':'90° (Mirror X)', 'TFT_ROTATE_90_MIRROR_Y':'90° (Mirror Y)', 'TFT_ROTATE_180':'180°', 'TFT_ROTATE_180_MIRROR_X':'180° (Mirror X)', 'TFT_ROTATE_180_MIRROR_Y':'180° (Mirror Y)', 'TFT_ROTATE_270':'270°', 'TFT_ROTATE_270_MIRROR_X':'270° (Mirror X)', 'TFT_ROTATE_270_MIRROR_Y':'270° (Mirror Y)', 'TFT_MIRROR_X':'Mirror X', 'TFT_MIRROR_Y':'Mirror Y' } */ //#define TFT_ROTATION TFT_NO_ROTATION @@ -3512,7 +3533,7 @@ // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency // which is not as annoying as with the hardware PWM. On the other hand, if this frequency // is too low, you should also increment SOFT_PWM_SCALE. -#define FAN_SOFT_PWM +//#define FAN_SOFT_PWM // Incrementing this by 1 will double the software PWM frequency, // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. @@ -3659,4 +3680,4 @@ //#define EDITABLE_SERVO_ANGLES // Disable servo with M282 to reduce power consumption, noise, and heat when not in use -//#define SERVO_DETACH_GCODE \ No newline at end of file +//#define SERVO_DETACH_GCODE diff --git a/firmware/Marlin/Configuration_adv.h b/firmware/Marlin/Configuration_adv.h index 7c94ad0..2d7aa47 100644 --- a/firmware/Marlin/Configuration_adv.h +++ b/firmware/Marlin/Configuration_adv.h @@ -21,8 +21,6 @@ */ #pragma once -#define CONFIG_EXAMPLES_DIR "Creality/Ender-5 Pro/CrealityV427" - /** * Configuration_adv.h * @@ -205,7 +203,7 @@ // #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // (ms) Interval between checks in bang-bang control - #if ENABLED(BED_LIMIT_SWITCHING) + #if ANY(BED_LIMIT_SWITCHING, PELTIER_BED) #define BED_HYSTERESIS 2 // (°C) Only set the relevant heater state when ABS(T-target) > BED_HYSTERESIS #endif #endif @@ -213,18 +211,19 @@ // // Heated Chamber options // -#if DISABLED(PIDTEMPCHAMBER) - #define CHAMBER_CHECK_INTERVAL 5000 // (ms) Interval between checks in bang-bang control - #if ENABLED(CHAMBER_LIMIT_SWITCHING) - #define CHAMBER_HYSTERESIS 2 // (°C) Only set the relevant heater state when ABS(T-target) > CHAMBER_HYSTERESIS - #endif -#endif #if TEMP_SENSOR_CHAMBER //#define HEATER_CHAMBER_PIN P2_04 // Required heater on/off pin (example: SKR 1.4 Turbo HE1 plug) //#define HEATER_CHAMBER_INVERTING false //#define FAN1_PIN -1 // Remove the fan signal on pin P2_04 (example: SKR 1.4 Turbo HE1 plug) + #if DISABLED(PIDTEMPCHAMBER) + #define CHAMBER_CHECK_INTERVAL 5000 // (ms) Interval between checks in bang-bang control + #if ENABLED(CHAMBER_LIMIT_SWITCHING) + #define CHAMBER_HYSTERESIS 2 // (°C) Only set the relevant heater state when ABS(T-target) > CHAMBER_HYSTERESIS + #endif + #endif + //#define CHAMBER_FAN // Enable a fan on the chamber #if ENABLED(CHAMBER_FAN) //#define CHAMBER_FAN_INDEX 2 // Index of a fan to repurpose as the chamber fan. (Default: first unused fan) @@ -593,6 +592,8 @@ // Use TEMP_SENSOR_SOC as a trigger for enabling the controller fan //#define CONTROLLER_FAN_MIN_SOC_TEMP 40 // (°C) Turn on the fan if the SoC reaches this temperature + #define CONTROLLER_FAN_BED_HEATING // Turn on the fan when heating the bed + //#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings #if ENABLED(CONTROLLER_FAN_EDITABLE) #define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu @@ -930,13 +931,13 @@ //#define SENSORLESS_BACKOFF_MM { 2, 2, 0 } // (linear=mm, rotational=°) Backoff from endstops before sensorless homing -#define HOMING_BUMP_MM { 5, 5, 2 } // (linear=mm, rotational=°) Backoff from endstops after first bump -#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) +#define HOMING_BUMP_MM { 5, 5, 5 } // (linear=mm, rotational=°) Backoff from endstops after first bump +#define HOMING_BUMP_DIVISOR { 10, 10, 10 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (linear=mm, rotational=°) Backoff from endstops after homing //#define XY_COUNTERPART_BACKOFF_MM 0 // (mm) Backoff X after homing Y, and vice-versa -#define QUICK_HOME // If G28 contains XY do a diagonal move first +//#define QUICK_HOME // If G28 contains XY do a diagonal move first //#define HOME_Y_BEFORE_X // If G28 contains XY home Y before X //#define HOME_Z_FIRST // Home Z first. Requires a real endstop (not a probe). //#define CODEPENDENT_XY_HOMING // If X/Y can't home without homing Y/X first @@ -1033,7 +1034,7 @@ * If not defined, probe limits will be used. * Override with 'M422 S X Y'. */ - //#define Z_STEPPER_ALIGN_XY { { 10, 290 }, { 150, 10 }, { 290, 290 } } + //#define Z_STEPPER_ALIGN_XY { { 10, 190 }, { 100, 10 }, { 190, 190 } } /** * Orientation for the automatically-calculated probe positions. @@ -1076,7 +1077,7 @@ // On a 300mm bed a 5% grade would give a misalignment of ~1.5cm #define G34_MAX_GRADE 5 // (%) Maximum incline that G34 will handle - #define Z_STEPPER_ALIGN_ITERATIONS 3 // Number of iterations to apply during alignment + #define Z_STEPPER_ALIGN_ITERATIONS 5 // Number of iterations to apply during alignment #define Z_STEPPER_ALIGN_ACC 0.02 // Stop iterating early if the accuracy is better than this #define RESTORE_LEVELING_AFTER_G34 // Restore leveling after G34 is done? // After G34, re-home Z (G28 Z) or just calculate it from the last probe heights? @@ -1112,8 +1113,8 @@ * Screw Thread. Use one of the following defines: * * M3_CW = M3 Clockwise, M3_CCW = M3 Counter-Clockwise - * M4_CW = M3 Clockwise, M4_CCW = M4 Counter-Clockwise - * M5_CW = M3 Clockwise, M5_CCW = M5 Counter-Clockwise + * M4_CW = M4 Clockwise, M4_CCW = M4 Counter-Clockwise + * M5_CW = M5 Clockwise, M5_CCW = M5 Counter-Clockwise * * :{'M3_CW':'M3 Clockwise','M3_CCW':'M3 Counter-Clockwise','M4_CW':'M4 Clockwise','M4_CCW':'M4 Counter-Clockwise','M5_CW':'M5 Clockwise','M5_CCW':'M5 Counter-Clockwise'} */ @@ -1137,7 +1138,7 @@ #define FTM_SHAPING_DEFAULT_FREQ_X 37.0f // (Hz) Default peak frequency used by input shapers #define FTM_SHAPING_DEFAULT_FREQ_Y 37.0f // (Hz) Default peak frequency used by input shapers #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false) - #define FTM_LINEAR_ADV_DEFAULT_K 0 // Default linear advance gain, integer value. (Acceleration-based scaling factor.) + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. (Acceleration-based scaling factor.) #define FTM_SHAPING_ZETA_X 0.1f // Zeta used by input shapers for X axis #define FTM_SHAPING_ZETA_Y 0.1f // Zeta used by input shapers for Y axis @@ -1225,7 +1226,7 @@ // @section motion -#define AXIS_RELATIVE_MODES { false, false, false, false } +#define AXIS_RELATIVE_MODES { false, false, false} // Add a Duplicate option for well-separated conjoined nozzles //#define MULTI_NOZZLE_DUPLICATION @@ -1250,7 +1251,7 @@ #define DEFAULT_STEPPER_TIMEOUT_SEC 120 #define DISABLE_IDLE_X #define DISABLE_IDLE_Y -//#define DISABLE_IDLE_Z // Disable if the nozzle could fall onto your printed part! +#define DISABLE_IDLE_Z // Disable if the nozzle could fall onto your printed part! //#define DISABLE_IDLE_I //#define DISABLE_IDLE_J //#define DISABLE_IDLE_K @@ -1260,12 +1261,8 @@ #define DISABLE_IDLE_E // Shut down all idle extruders // Default Minimum Feedrates for printing and travel moves -#define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s) Minimum feedrate. Set with M205 S. -#define DEFAULT_MINTRAVELFEEDRATE 0.0 // (mm/s) Minimum travel feedrate. Set with M205 T. -#if HAS_ROTATIONAL_AXES - #define DEFAULT_ANGULAR_MINIMUMFEEDRATE 0.0 // (°/s) Minimum feedrate for rotational-only moves. Set with M205 P. - #define DEFAULT_ANGULAR_MINTRAVELFEEDRATE 0.0 // (°/s) Minimum travel feedrate for rotational-only moves. Set with M205 Q. -#endif +#define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s) Minimum feedrate. Set with M205 S. +#define DEFAULT_MINTRAVELFEEDRATE 0.0 // (mm/s) Minimum travel feedrate. Set with M205 T. // Minimum time that a segment needs to take as the buffer gets emptied #define DEFAULT_MINSEGMENTTIME 20000 // (µs) Set with M205 B. @@ -1478,7 +1475,7 @@ // @section lcd #if HAS_MANUAL_MOVE_MENU - #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 2*60 } // (mm/min) Feedrates for manual moves along X, Y, Z, E from panel + #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60} // (mm/min) Feedrates for manual moves along X, Y, Z, E from panel #define FINE_MANUAL_MOVE 0.025 // (mm) Smallest manual move (< 0.1mm) applying to Z on most machines #if IS_ULTIPANEL #define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position" @@ -1549,7 +1546,7 @@ #endif // Include a page of printer information in the LCD Main Menu - #define LCD_INFO_MENU + //#define LCD_INFO_MENU #if ENABLED(LCD_INFO_MENU) //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages #endif @@ -1608,12 +1605,12 @@ //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of flash. #endif #if ANY(HAS_MARLINUI_U8GLIB, TOUCH_UI_FTDI_EVE, HAS_MARLINUI_HD44780) - #define SHOW_CUSTOM_BOOTSCREEN // Show the bitmap in Marlin/_Bootscreen.h on startup. + //#define SHOW_CUSTOM_BOOTSCREEN // Show the bitmap in Marlin/_Bootscreen.h on startup. #endif #endif #if HAS_MARLINUI_U8GLIB - #define CUSTOM_STATUS_SCREEN_IMAGE // Show the bitmap in Marlin/_Statusscreen.h on the status screen. + //#define CUSTOM_STATUS_SCREEN_IMAGE // Show the bitmap in Marlin/_Statusscreen.h on the status screen. #endif //#define SOUND_MENU_ITEM // Add a mute option to the LCD menu @@ -1627,7 +1624,7 @@ //#define LCD_TIMEOUT_TO_STATUS 15000 // (ms) // Scroll a longer status message into view - #define STATUS_MESSAGE_SCROLLING + //#define STATUS_MESSAGE_SCROLLING // Apply a timeout to low-priority status messages //#define STATUS_MESSAGE_TIMEOUT_SEC 30 // (seconds) @@ -1731,7 +1728,7 @@ //#define SD_IGNORE_AT_STARTUP // Don't mount the SD card when starting up //#define SDCARD_READONLY // Read-only SD card (to save over 2K of flash) - #define GCODE_REPEAT_MARKERS // Enable G-code M808 to set repeat markers and do looping + //#define GCODE_REPEAT_MARKERS // Enable G-code M808 to set repeat markers and do looping #define SD_PROCEDURE_DEPTH 1 // Increase if you need more nested M32 calls @@ -1842,7 +1839,7 @@ //#define LONG_FILENAME_WRITE_SUPPORT // Create / delete files with long filenames via M28, M30, and Binary Transfer Protocol //#define M20_TIMESTAMP_SUPPORT // Include timestamps by adding the 'T' flag to M20 commands - #define SCROLL_LONG_FILENAMES // Scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES // Scroll long filenames in the SD card menu //#define SD_ABORT_NO_COOLDOWN // Leave the heaters on after Stop Print (not recommended!) @@ -2289,7 +2286,7 @@ * * Warning: Does not respect endstops! */ -#define BABYSTEPPING +//#define BABYSTEPPING #if ENABLED(BABYSTEPPING) //#define EP_BABYSTEPPING // M293/M294 babystepping with EMERGENCY_PARSER support //#define BABYSTEP_WITHOUT_HOMING @@ -2300,7 +2297,7 @@ #define BABYSTEP_MULTIPLICATOR_Z 1 // (steps or mm) Steps or millimeter distance for each Z babystep #define BABYSTEP_MULTIPLICATOR_XY 1 // (steps or mm) Steps or millimeter distance for each XY babystep - #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. + //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. @@ -2313,12 +2310,8 @@ //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping - //#define BABYSTEP_GLOBAL_Z // Combine M424 Z and Babystepping - - #if ANY(BABYSTEP_ZPROBE_OFFSET, BABYSTEP_GLOBAL_Z) - #if ENABLED(BABYSTEP_ZPROBE_OFFSET) - //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets - #endif + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets //#define BABYSTEP_GFX_OVERLAY // Enable graphical overlay on Z-offset editor #endif #endif @@ -2998,7 +2991,7 @@ #define INTERPOLATE true #if AXIS_IS_TMC_CONFIG(X) - #define X_CURRENT 580 // (mA) RMS current. Multiply by 1.414 for peak current. + #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. #define X_CURRENT_HOME X_CURRENT // (mA) RMS current for homing. (Typically lower than *_CURRENT.) #define X_MICROSTEPS 16 // 0..256 #define X_RSENSE 0.11 @@ -3018,7 +3011,7 @@ #endif #if AXIS_IS_TMC_CONFIG(Y) - #define Y_CURRENT 650 + #define Y_CURRENT 800 #define Y_CURRENT_HOME Y_CURRENT #define Y_MICROSTEPS 16 #define Y_RSENSE 0.11 @@ -3038,7 +3031,7 @@ #endif #if AXIS_IS_TMC_CONFIG(Z) - #define Z_CURRENT 580 + #define Z_CURRENT 800 #define Z_CURRENT_HOME Z_CURRENT #define Z_MICROSTEPS 16 #define Z_RSENSE 0.11 @@ -3138,7 +3131,7 @@ #endif #if AXIS_IS_TMC_CONFIG(E0) - #define E0_CURRENT 650 + #define E0_CURRENT 800 #define E0_MICROSTEPS 16 #define E0_RSENSE 0.11 #define E0_CHAIN_POS -1 @@ -3336,7 +3329,7 @@ * Define your own with: * { , , hysteresis_start[1..8] } */ - #define CHOPPER_TIMING CHOPPER_DEFAULT_24V // All axes (override below) + #define CHOPPER_TIMING CHOPPER_DEFAULT_12V // All axes (override below) //#define CHOPPER_TIMING_X CHOPPER_TIMING // For X Axes (override below) //#define CHOPPER_TIMING_X2 CHOPPER_TIMING_X //#define CHOPPER_TIMING_Y CHOPPER_TIMING // For Y Axes (override below) @@ -3872,14 +3865,6 @@ */ //#define CNC_COORDINATE_SYSTEMS -/** - * CNC Drilling Cycle - UNDER DEVELOPMENT - * - * Enables G81 to perform a drilling cycle. - * Currently only supports a single cycle, no G-code chaining. - */ -//#define CNC_DRILLING_CYCLE - // @section security /** @@ -3977,15 +3962,6 @@ //#define GCODE_QUOTED_STRINGS // Support for quoted string parameters #endif -/** - * Variables - * - * Define a variable from 100-115 with G-code like '#101=19.6'. - * A variable can then be used in a G-code expression like 'G0 X[#101+3]'. - * See https://gcodetutor.com/cnc-macro-programming/cnc-variables.html - */ -//#define GCODE_VARIABLES - /** * Support for MeatPack G-code compression (https://github.com/scottmudge/OctoPrint-MeatPack) */ @@ -4028,7 +4004,6 @@ #ifdef G0_FEEDRATE //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode #endif -//#define G0_ANGULAR_FEEDRATE 2700 // (°/min) /** * Startup commands @@ -4043,7 +4018,7 @@ * Add G-codes M810-M819 to define and run G-code macros. * Macros are not saved to EEPROM. */ -#define GCODE_MACROS +//#define GCODE_MACROS #if ENABLED(GCODE_MACROS) #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro @@ -4433,93 +4408,56 @@ //#define E_MUX0_PIN 40 // Always Required //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs + #elif HAS_PRUSA_MMU2 || HAS_PRUSA_MMU3 // Common settings for MMU2/MMU2S/MMU3 // Serial port used for communication with MMU2/MMU2S/MMU3. - #define MMU2_SERIAL_PORT 2 + #define MMU_SERIAL_PORT 2 #define MMU_BAUD 115200 - // Use hardware reset for MMU if a pin is defined for it - //#define MMU2_RST_PIN 23 + //#define MMU_RST_PIN 23 // Define this pin to use Hardware Reset for MMU2/MMU2S/MMU3 + //#define MMU_MENUS // Add an LCD menu for MMU2/MMU2S/MMU3 + + //#define MMU_DEBUG // Write debug info to serial output + + // Options pertaining to MMU2 and MMU2S #if HAS_PRUSA_MMU2 // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up) //#define MMU2_MODE_12V + // Settings for filament load / unload from the LCD menu. + // This is for Průša MK3-style extruders. Customize for your hardware. + #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0 + // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600" - #endif - // Add an LCD menu for MMU2/MMU2S/MMU3 - //#define MMU_MENUS + // MMU2 sequences use mm/min. Not compatible with MMU3, which use mm/sec. + #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \ + { 4.4, 871 }, \ + { 10.0, 1393 }, \ + { 4.4, 871 }, \ + { 10.0, 198 } - // Settings for filament load / unload from the LCD menu. - // This is for Průša MK3-style extruders. Customize for your hardware. - #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0 + #define MMU2_RAMMING_SEQUENCE \ + { 1.0, 1000 }, \ + { 1.0, 1500 }, \ + { 2.0, 2000 }, \ + { 1.5, 3000 }, \ + { 2.5, 4000 }, \ + { -15.0, 5000 }, \ + { -14.0, 1200 }, \ + { -6.0, 600 }, \ + { 10.0, 700 }, \ + { -10.0, 400 }, \ + { -50.0, 2000 } + + #endif // HAS_PRUSA_MMU2 /** - * ------------ - * MMU2 / MMU2S - * ------------ - * MMU2 sequences use mm/min. Not compatible with MMU3 (see below). - * #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \ - * { 4.4, 871 }, \ - * { 10.0, 1393 }, \ - * { 4.4, 871 }, \ - * { 10.0, 198 } - */ - - /* #define MMU2_RAMMING_SEQUENCE \ - * { 1.0, 1000 }, \ - * { 1.0, 1500 }, \ - * { 2.0, 2000 }, \ - * { 1.5, 3000 }, \ - * { 2.5, 4000 }, \ - * { -15.0, 5000 }, \ - * { -14.0, 1200 }, \ - * { -6.0, 600 }, \ - * { 10.0, 700 }, \ - * { -10.0, 400 }, \ - * { -50.0, 2000 } - */ - - /** - * ---- - * MMU3 - * ---- - * These values are compatible with MMU3 as they are defined in mm/s - */ - - #define MMU2_EXTRUDER_PTFE_LENGTH 42.3 // (mm) - #define MMU2_EXTRUDER_HEATBREAK_LENGTH 17.7 // (mm) - - #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \ - { MMU2_EXTRUDER_PTFE_LENGTH, MMM_TO_MMS(810) }, /* (13.5 mm/s) Fast load ahead of heatbreak */ \ - { MMU2_EXTRUDER_HEATBREAK_LENGTH, MMM_TO_MMS(198) } // ( 3.3 mm/s) Slow load after heatbreak - - #define MMU2_RAMMING_SEQUENCE \ - { 0.2816, MMM_TO_MMS(1339.0) }, \ - { 0.3051, MMM_TO_MMS(1451.0) }, \ - { 0.3453, MMM_TO_MMS(1642.0) }, \ - { 0.3990, MMM_TO_MMS(1897.0) }, \ - { 0.4761, MMM_TO_MMS(2264.0) }, \ - { 0.5767, MMM_TO_MMS(2742.0) }, \ - { 0.5691, MMM_TO_MMS(3220.0) }, \ - { 0.1081, MMM_TO_MMS(3220.0) }, \ - { 0.7644, MMM_TO_MMS(3635.0) }, \ - { 0.8248, MMM_TO_MMS(3921.0) }, \ - { 0.8483, MMM_TO_MMS(4033.0) }, \ - { -15.0, MMM_TO_MMS(6000.0) }, \ - { -24.5, MMM_TO_MMS(1200.0) }, \ - { -7.0, MMM_TO_MMS( 600.0) }, \ - { -3.5, MMM_TO_MMS( 360.0) }, \ - { 20.0, MMM_TO_MMS( 454.0) }, \ - { -20.0, MMM_TO_MMS( 303.0) }, \ - { -35.0, MMM_TO_MMS(2000.0) } - - /** - * Using a sensor like the MMU2S - * This mode requires a MK3S extruder with a sensor at the extruder idler, like the MMU2S. + * Options pertaining to MMU2S devices + * Requires the MK3S extruder with a sensor at the extruder idler, like the MMU2S. * See https://help.prusa3d.com/guide/3b-mk3s-mk2-5s-extruder-upgrade_41560#42048, step 11 */ #if HAS_PRUSA_MMU2S @@ -4560,14 +4498,9 @@ // MMU3 settings - #define MMU2_MAX_RETRIES 3 // Number of retries (total time = timeout*retries) + #define MMU3_HAS_CUTTER // Enable cutter related functionality - // Nominal distance from the extruder gear to the nozzle tip is 87mm - // However, some slipping may occur and we need separate distances for - // LoadToNozzle and ToolChange. - // - +5mm seemed good for LoadToNozzle, - // - but too much (made blobs) for a ToolChange - #define MMU2_LOAD_TO_NOZZLE_LENGTH 87.0 + 5.0 + #define MMU3_MAX_RETRIES 3 // Number of retries (total time = timeout*retries) // As discussed with our PrusaSlicer profile specialist // - ToolChange shall not try to push filament into the very tip of the nozzle @@ -4576,28 +4509,26 @@ // Beware - this value is used to initialize the MMU logic layer - it will be sent to the MMU upon line up (written into its 8bit register 0x0b) // However - in the G-code we can get a request to set the extra load distance at runtime to something else (M708 A0xb Xsomething). // The printer intercepts such a call and sets its extra load distance to match the new value as well. - #define MMU2_FILAMENT_SENSOR_POSITION 0 // (mm) - #define MMU2_LOAD_DISTANCE_PAST_GEARS 5 // (mm) - #define MMU2_TOOL_CHANGE_LOAD_LENGTH MMU2_FILAMENT_SENSOR_POSITION + MMU2_LOAD_DISTANCE_PAST_GEARS // (mm) + #define MMU3_FILAMENT_SENSOR_E_POSITION 0 // (mm) + #define _MMU3_LOAD_DISTANCE_PAST_GEARS 5 // (mm) + #define MMU3_TOOL_CHANGE_LOAD_LENGTH (MMU3_FILAMENT_SENSOR_E_POSITION + _MMU3_LOAD_DISTANCE_PAST_GEARS) // (mm) - #define MMU2_LOAD_TO_NOZZLE_FEED_RATE 20.0 // (mm/s) - #define MMU2_UNLOAD_TO_FINDA_FEED_RATE 120.0 // (mm/s) + #define MMU3_LOAD_TO_NOZZLE_FEED_RATE 20.0 // (mm/s) - #define MMU2_VERIFY_LOAD_TO_NOZZLE_FEED_RATE 50.0 // (mm/s) - #define MMU2_VERIFY_LOAD_TO_NOZZLE_TWEAK -5.0 // (mm) Amount to adjust the length for verifying load-to-nozzle + #define MMU3_VERIFY_LOAD_TO_NOZZLE_FEED_RATE 50.0 // (mm/s) + #define _MMU3_VERIFY_LOAD_TO_NOZZLE_TWEAK -5.0 // (mm) Amount to adjust the length for verifying load-to-nozzle // The first thing the MMU does is initialize its axis. // Meanwhile the E-motor will unload 20mm of filament in about 1 second. - #define MMU2_RETRY_UNLOAD_TO_FINDA_LENGTH 80.0 // (mm) - #define MMU2_RETRY_UNLOAD_TO_FINDA_FEED_RATE 80.0 // (mm/s) + #define MMU3_RETRY_UNLOAD_TO_FINDA_LENGTH 80.0 // (mm) + #define MMU3_RETRY_UNLOAD_TO_FINDA_FEED_RATE 80.0 // (mm/s) // After loading a new filament, the printer will extrude this length of filament // then retract to the original position. This is used to check if the filament sensor // reading flickers or filament is jammed. - #define MMU2_CHECK_FILAMENT_PRESENCE_EXTRUSION_LENGTH (MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH + MMU2_VERIFY_LOAD_TO_NOZZLE_TWEAK + MMU2_FILAMENT_SENSOR_POSITION) // (mm) - - #define MMU_HAS_CUTTER // Enable cutter related functionalities - //#define MMU_FORCE_STEALTH_MODE // Force stealth mode and disable menu item + #define _MMU_EXTRUDER_PTFE_LENGTH 42.3 // (mm) + #define _MMU_EXTRUDER_HEATBREAK_LENGTH 17.7 // (mm) + #define MMU3_CHECK_FILAMENT_PRESENCE_EXTRUSION_LENGTH (MMU3_FILAMENT_SENSOR_E_POSITION + _MMU_EXTRUDER_PTFE_LENGTH + _MMU_EXTRUDER_HEATBREAK_LENGTH + _MMU3_VERIFY_LOAD_TO_NOZZLE_TWEAK) // (mm) /** * SpoolJoin Consumes All Filament -- EXPERIMENTAL @@ -4615,12 +4546,37 @@ * sensor is triggered through the gears) and the end of the PTFE tube and * can cause filament load issues. */ - //#define MMU_SPOOL_JOIN_CONSUMES_ALL_FILAMENT + //#define MMU3_SPOOL_JOIN_CONSUMES_ALL_FILAMENT - #else + // MMU3 sequences use mm/sec. Not compatible with MMU2 which use mm/min. + #define MMU3_LOAD_TO_NOZZLE_SEQUENCE \ + { _MMU_EXTRUDER_PTFE_LENGTH, MMM_TO_MMS(810) }, /* (13.5 mm/s) Fast load ahead of heatbreak */ \ + { _MMU_EXTRUDER_HEATBREAK_LENGTH, MMM_TO_MMS(198) } /* ( 3.3 mm/s) Slow load after heatbreak */ + + #define MMU3_RAMMING_SEQUENCE \ + { 0.2816, MMM_TO_MMS(1339.0) }, \ + { 0.3051, MMM_TO_MMS(1451.0) }, \ + { 0.3453, MMM_TO_MMS(1642.0) }, \ + { 0.3990, MMM_TO_MMS(1897.0) }, \ + { 0.4761, MMM_TO_MMS(2264.0) }, \ + { 0.5767, MMM_TO_MMS(2742.0) }, \ + { 0.5691, MMM_TO_MMS(3220.0) }, \ + { 0.1081, MMM_TO_MMS(3220.0) }, \ + { 0.7644, MMM_TO_MMS(3635.0) }, \ + { 0.8248, MMM_TO_MMS(3921.0) }, \ + { 0.8483, MMM_TO_MMS(4033.0) }, \ + { -15.0, MMM_TO_MMS(6000.0) }, \ + { -24.5, MMM_TO_MMS(1200.0) }, \ + { -7.0, MMM_TO_MMS( 600.0) }, \ + { -3.5, MMM_TO_MMS( 360.0) }, \ + { 20.0, MMM_TO_MMS( 454.0) }, \ + { -20.0, MMM_TO_MMS( 303.0) }, \ + { -35.0, MMM_TO_MMS(2000.0) } + + #else // MMU2 (not MMU2S) /** - * MMU1 Extruder Sensor + * MMU2 Extruder Sensor * * Support for a Průša (or other) IR Sensor to detect filament near the extruder * and make loading more reliable. Suitable for an extruder equipped with a filament @@ -4630,15 +4586,13 @@ * move up to the gears. If no filament is detected, the MMU2 can make some more attempts. * If all attempts fail, a filament runout will be triggered. */ - //#define MMU_EXTRUDER_SENSOR - #if ENABLED(MMU_EXTRUDER_SENSOR) - #define MMU_LOADING_ATTEMPTS_NR 5 // max. number of attempts to load filament if first load fail + //#define MMU2_EXTRUDER_SENSOR + #if ENABLED(MMU2_EXTRUDER_SENSOR) + #define MMU2_LOADING_ATTEMPTS_NR 5 // Number of times to try loading filament before failure #endif #endif - //#define MMU2_DEBUG // Write debug info to serial output - #endif // HAS_PRUSA_MMU2 || HAS_PRUSA_MMU3 /** @@ -4704,4 +4658,4 @@ //#define OPTIBOOT_RESET_REASON // Shrink the build for smaller boards by sacrificing some serial feedback -//#define MARLIN_SMALL_BUILD \ No newline at end of file +//#define MARLIN_SMALL_BUILD diff --git a/firmware/Marlin/Makefile b/firmware/Marlin/Makefile index e5ba9cb..63b1029 100644 --- a/firmware/Marlin/Makefile +++ b/firmware/Marlin/Makefile @@ -187,6 +187,17 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1033) # RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan) else ifeq ($(HARDWARE_MOTHERBOARD),1034) +# RAMPS 1.6+ (Power outputs: Hotend, Fan, Bed) +else ifeq ($(HARDWARE_MOTHERBOARD),1035) +# RAMPS 1.6+ (Power outputs: Hotend0, Hotend1, Bed) +else ifeq ($(HARDWARE_MOTHERBOARD),1036) +# RAMPS 1.6+ (Power outputs: Hotend, Fan0, Fan1) +else ifeq ($(HARDWARE_MOTHERBOARD),1037) +# RAMPS 1.6+ (Power outputs: Hotend0, Hotend1, Fan) +else ifeq ($(HARDWARE_MOTHERBOARD),1038) +# RAMPS 1.6+ (Power outputs: Spindle, Controller Fan) +else ifeq ($(HARDWARE_MOTHERBOARD),1039) + # # RAMPS Derivatives - ATmega1280, ATmega2560 # @@ -221,108 +232,113 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1112) else ifeq ($(HARDWARE_MOTHERBOARD),1113) # BigTreeTech or BIQU KFB2.0 else ifeq ($(HARDWARE_MOTHERBOARD),1114) -# zrib V2.0 (Chinese RAMPS replica) +# Zonestar zrib V2.0 (Chinese RAMPS replica) else ifeq ($(HARDWARE_MOTHERBOARD),1115) -# zrib V5.2 (Chinese RAMPS replica) +# Zonestar zrib V5.2 (Chinese RAMPS replica) else ifeq ($(HARDWARE_MOTHERBOARD),1116) -# Felix 2.0+ Electronics Board (RAMPS like) +# Zonestar zrib V5.3 (Chinese RAMPS replica) else ifeq ($(HARDWARE_MOTHERBOARD),1117) -# Invent-A-Part RigidBoard +# Felix 2.0+ Electronics Board (RAMPS like) else ifeq ($(HARDWARE_MOTHERBOARD),1118) -# Invent-A-Part RigidBoard V2 +# Invent-A-Part RigidBoard else ifeq ($(HARDWARE_MOTHERBOARD),1119) -# Sainsmart 2-in-1 board +# Invent-A-Part RigidBoard V2 else ifeq ($(HARDWARE_MOTHERBOARD),1120) -# Ultimaker +# Sainsmart 2-in-1 board else ifeq ($(HARDWARE_MOTHERBOARD),1121) -# Ultimaker (Older electronics. Pre 1.5.4. This is rare) +# Ultimaker else ifeq ($(HARDWARE_MOTHERBOARD),1122) +# Ultimaker (Older electronics. Pre 1.5.4. This is rare) +else ifeq ($(HARDWARE_MOTHERBOARD),1123) MCU ?= atmega1280 PROG_MCU ?= m1280 # Azteeg X3 -else ifeq ($(HARDWARE_MOTHERBOARD),1123) -# Azteeg X3 Pro else ifeq ($(HARDWARE_MOTHERBOARD),1124) -# Ultimainboard 2.x (Uses TEMP_SENSOR 20) +# Azteeg X3 Pro else ifeq ($(HARDWARE_MOTHERBOARD),1125) -# Rumba +# Ultimainboard 2.x (Uses TEMP_SENSOR 20) else ifeq ($(HARDWARE_MOTHERBOARD),1126) -# Raise3D N series Rumba derivative +# Rumba else ifeq ($(HARDWARE_MOTHERBOARD),1127) -# Rapide Lite 200 (v1, low-cost RUMBA clone with drv) +# Raise3D N series Rumba derivative else ifeq ($(HARDWARE_MOTHERBOARD),1128) -# Formbot T-Rex 2 Plus +# Rapide Lite 200 (v1, low-cost RUMBA clone with drv) else ifeq ($(HARDWARE_MOTHERBOARD),1129) -# Formbot T-Rex 3 +# Formbot T-Rex 2 Plus else ifeq ($(HARDWARE_MOTHERBOARD),1130) -# Formbot Raptor +# Formbot T-Rex 3 else ifeq ($(HARDWARE_MOTHERBOARD),1131) -# Formbot Raptor 2 +# Formbot Raptor else ifeq ($(HARDWARE_MOTHERBOARD),1132) -# bq ZUM Mega 3D +# Formbot Raptor 2 else ifeq ($(HARDWARE_MOTHERBOARD),1133) -# MakeBoard Mini v2.1.2 by MicroMake +# bq ZUM Mega 3D else ifeq ($(HARDWARE_MOTHERBOARD),1134) -# TriGorilla Anycubic version 1.3-based on RAMPS EFB +# MakeBoard Mini v2.1.2 by MicroMake else ifeq ($(HARDWARE_MOTHERBOARD),1135) -# ... Ver 1.4 +# TriGorilla Anycubic version 1.3-based on RAMPS EFB else ifeq ($(HARDWARE_MOTHERBOARD),1136) -# ... Rev 1.1 (new servo pin order) +# ... Ver 1.4 else ifeq ($(HARDWARE_MOTHERBOARD),1137) -# Creality: Ender-4, CR-8 +# ... Rev 1.1 (new servo pin order) else ifeq ($(HARDWARE_MOTHERBOARD),1138) -# Creality: CR10S, CR20, CR-X +# Creality: Ender-4, CR-8 else ifeq ($(HARDWARE_MOTHERBOARD),1139) -# Dagoma F5 +# Creality: CR10S, CR20, CR-X else ifeq ($(HARDWARE_MOTHERBOARD),1140) -# FYSETC F6 1.3 +# Dagoma F5 else ifeq ($(HARDWARE_MOTHERBOARD),1141) -# FYSETC F6 1.4 +# Dagoma D6 (as found in the Dagoma DiscoUltimate V2 TMC) else ifeq ($(HARDWARE_MOTHERBOARD),1142) -# Wanhao Duplicator i3 Plus +# FYSETC F6 1.3 else ifeq ($(HARDWARE_MOTHERBOARD),1143) -# VORON Design +# FYSETC F6 1.4 else ifeq ($(HARDWARE_MOTHERBOARD),1144) -# Tronxy TRONXY-V3-1.0 +# Wanhao Duplicator i3 Plus else ifeq ($(HARDWARE_MOTHERBOARD),1145) -# Z-Bolt X Series +# VORON Design else ifeq ($(HARDWARE_MOTHERBOARD),1146) -# TT OSCAR +# Tronxy TRONXY-V3-1.0 else ifeq ($(HARDWARE_MOTHERBOARD),1147) -# Overlord/Overlord Pro +# Z-Bolt X Series else ifeq ($(HARDWARE_MOTHERBOARD),1148) -# ADIMLab Gantry v1 +# TT OSCAR else ifeq ($(HARDWARE_MOTHERBOARD),1149) -# ADIMLab Gantry v2 -else ifeq ($(HARDWARE_MOTHERBOARD),1150) # BIQU Tango V1 -else ifeq ($(HARDWARE_MOTHERBOARD),1151) +else ifeq ($(HARDWARE_MOTHERBOARD),1150) # MKS GEN L V2 -else ifeq ($(HARDWARE_MOTHERBOARD),1152) +else ifeq ($(HARDWARE_MOTHERBOARD),1151) # MKS GEN L V2.1 -else ifeq ($(HARDWARE_MOTHERBOARD),1153) +else ifeq ($(HARDWARE_MOTHERBOARD),1152) # Copymaster 3D -else ifeq ($(HARDWARE_MOTHERBOARD),1154) +else ifeq ($(HARDWARE_MOTHERBOARD),1153) # Ortur 4 -else ifeq ($(HARDWARE_MOTHERBOARD),1155) +else ifeq ($(HARDWARE_MOTHERBOARD),1154) # Tenlog D3 Hero IDEX printer +else ifeq ($(HARDWARE_MOTHERBOARD),1155) +# Tenlog D3, D5, D6 IDEX Printer else ifeq ($(HARDWARE_MOTHERBOARD),1156) -# Tenlog D3,5,6 Pro IDEX printers -else ifeq ($(HARDWARE_MOTHERBOARD),1157) # Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed) -else ifeq ($(HARDWARE_MOTHERBOARD),1158) +else ifeq ($(HARDWARE_MOTHERBOARD),1157) # Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed) -else ifeq ($(HARDWARE_MOTHERBOARD),1159) +else ifeq ($(HARDWARE_MOTHERBOARD),1158) # Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed) -else ifeq ($(HARDWARE_MOTHERBOARD),1160) +else ifeq ($(HARDWARE_MOTHERBOARD),1159) # Longer LK1 PRO / Alfawise U20 Pro (PRO version) -else ifeq ($(HARDWARE_MOTHERBOARD),1161) +else ifeq ($(HARDWARE_MOTHERBOARD),1160) # Longer LKx PRO / Alfawise Uxx Pro (PRO version) -else ifeq ($(HARDWARE_MOTHERBOARD),1162) -# Zonestar zrib V5.3 (Chinese RAMPS replica) -else ifeq ($(HARDWARE_MOTHERBOARD),1163) +else ifeq ($(HARDWARE_MOTHERBOARD),1161) # Pxmalion Core I3 +else ifeq ($(HARDWARE_MOTHERBOARD),1162) +# Panowin Cutlass (as found in the Panowin F1) +else ifeq ($(HARDWARE_MOTHERBOARD),1163) +# Kodama Bardo V1.x (as found in the Kodama Trinus) else ifeq ($(HARDWARE_MOTHERBOARD),1164) +# XTLW MFF V1.0 +else ifeq ($(HARDWARE_MOTHERBOARD),1165) +# XTLW MFF V2.0 +else ifeq ($(HARDWARE_MOTHERBOARD),1166) + # # RAMBo and derivatives @@ -340,7 +356,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1203) else ifeq ($(HARDWARE_MOTHERBOARD),1204) # abee Scoovo X9H else ifeq ($(HARDWARE_MOTHERBOARD),1205) -# Rambo ThinkerV2 +# ThinkerV2 else ifeq ($(HARDWARE_MOTHERBOARD),1206) # @@ -383,30 +399,40 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1315) else ifeq ($(HARDWARE_MOTHERBOARD),1316) # Geeetech GT2560 Rev B for A10(M/T/D) else ifeq ($(HARDWARE_MOTHERBOARD),1317) -# Geeetech GT2560 Rev B for A10(M/T/D) -else ifeq ($(HARDWARE_MOTHERBOARD),1318) # Geeetech GT2560 Rev B for Mecreator2 +else ifeq ($(HARDWARE_MOTHERBOARD),1318) +# Geeetech GT2560 Rev B for A20(M/T/D) else ifeq ($(HARDWARE_MOTHERBOARD),1319) -# Geeetech GT2560 Rev B for A20(M/T/D) +# Geeetech GT2560 Rev B for A10(M/T/D) else ifeq ($(HARDWARE_MOTHERBOARD),1320) -# Einstart retrofit -else ifeq ($(HARDWARE_MOTHERBOARD),1321) -# Wanhao 0ne+ i3 Mini -else ifeq ($(HARDWARE_MOTHERBOARD),1322) -# Leapfrog Xeed 2015 -else ifeq ($(HARDWARE_MOTHERBOARD),1323) -# PICA Shield (original version) -else ifeq ($(HARDWARE_MOTHERBOARD),1324) -# PICA Shield (rev C or later) -else ifeq ($(HARDWARE_MOTHERBOARD),1325) -# Intamsys 4.0 (Funmat HT) -else ifeq ($(HARDWARE_MOTHERBOARD),1326) -# Malyan M180 Mainboard Version 2 (no display function, direct G-code only) -else ifeq ($(HARDWARE_MOTHERBOARD),1327) # Geeetech GT2560 Rev B for A20(M/T/D) +else ifeq ($(HARDWARE_MOTHERBOARD),1321) +# Einstart retrofit +else ifeq ($(HARDWARE_MOTHERBOARD),1322) +# Wanhao 0ne+ i3 Mini +else ifeq ($(HARDWARE_MOTHERBOARD),1323) +# Overlord/Overlord Pro +else ifeq ($(HARDWARE_MOTHERBOARD),1324) +# ADIMLab Gantry v1 +else ifeq ($(HARDWARE_MOTHERBOARD),1325) +# ADIMLab Gantry v2 +else ifeq ($(HARDWARE_MOTHERBOARD),1326) +# Leapfrog Xeed 2015 +else ifeq ($(HARDWARE_MOTHERBOARD),1327) +# PICA Shield (original version) else ifeq ($(HARDWARE_MOTHERBOARD),1328) -# Mega controller & Protoneer CNC Shield V3.00 +# PICA Shield (rev C or later) else ifeq ($(HARDWARE_MOTHERBOARD),1329) +# Intamsys 4.0 (Funmat HT) +else ifeq ($(HARDWARE_MOTHERBOARD),1330) +# Malyan M180 Mainboard Version 2 (no display function, direct G-code only) +else ifeq ($(HARDWARE_MOTHERBOARD),1331) +# Mega controller & Protoneer CNC Shield V3.00 +else ifeq ($(HARDWARE_MOTHERBOARD),1332) +# WEEDO 62A board (TINA2, Monoprice Cadet, etc.) +else ifeq ($(HARDWARE_MOTHERBOARD),1333) +# Geeetech GT2560 V4.1B for A10(M/T/D) +else ifeq ($(HARDWARE_MOTHERBOARD),1334) # # ATmega1281, ATmega2561 @@ -440,7 +466,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1502) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega644p PROG_MCU ?= m644p -# Melzi V2.0 +# Melzi V2 else ifeq ($(HARDWARE_MOTHERBOARD),1503) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p @@ -450,36 +476,41 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1504) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p PROG_MCU ?= m1284p -# Melzi Creality3D board (for CR-10 etc) +# Melzi Creality3D (for CR-10 etc) else ifeq ($(HARDWARE_MOTHERBOARD),1505) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p PROG_MCU ?= m1284p -# Melzi Malyan M150 board +# Melzi Creality3D (for Ender-2) else ifeq ($(HARDWARE_MOTHERBOARD),1506) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p PROG_MCU ?= m1284p -# Tronxy X5S +# Melzi Malyan M150 else ifeq ($(HARDWARE_MOTHERBOARD),1507) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p PROG_MCU ?= m1284p -# STB V1.1 +# Tronxy X5S else ifeq ($(HARDWARE_MOTHERBOARD),1508) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p PROG_MCU ?= m1284p -# Azteeg X1 +# STB V1.1 else ifeq ($(HARDWARE_MOTHERBOARD),1509) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p PROG_MCU ?= m1284p -# Anet 1.0 (Melzi clone) +# Azteeg X1 else ifeq ($(HARDWARE_MOTHERBOARD),1510) HARDWARE_VARIANT ?= Sanguino MCU ?= atmega1284p PROG_MCU ?= m1284p +# Anet 1.0 (Melzi clone) +else ifeq ($(HARDWARE_MOTHERBOARD),1511) + HARDWARE_VARIANT ?= Sanguino + MCU ?= atmega1284p + PROG_MCU ?= m1284p # ZoneStar ZMIB V2 else ifeq ($(HARDWARE_MOTHERBOARD),1511) HARDWARE_VARIANT ?= Sanguino @@ -995,7 +1026,7 @@ extcoff: $(TARGET).elf $(NM) -n $< > $@ # Link: create ELF output file from library. - +LDFLAGS+= -Wl,-V $(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h $(Pecho) " CXX $@" $P $(CXX) $(LD_PREFIX) $(ALL_CXXFLAGS) -o $@ -L. $(OBJ) $(LDFLAGS) $(LD_SUFFIX) diff --git a/firmware/Marlin/Version.h b/firmware/Marlin/Version.h index 07fc8b1..41a645e 100644 --- a/firmware/Marlin/Version.h +++ b/firmware/Marlin/Version.h @@ -41,7 +41,14 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2024-09-09" +//#define STRING_DISTRIBUTION_DATE "2024-12-06" + +/** + * The protocol for communication to the host. Protocol indicates communication + * standards such as the use of ASCII, "echo:" and "error:" line prefixes, etc. + * (Other behaviors are given by the firmware version and capabilities report.) + */ +//#define PROTOCOL_VERSION "1.0" /** * Defines a generic printer name to be output to the LCD after booting Marlin. @@ -68,8 +75,8 @@ //#define WEBSITE_URL "marlinfw.org" /** - * Set the vendor info the serial USB interface, if changable - * Currently only supported by DUE platform + * Set the vendor info the serial USB interface, if changeable. + * Currently only supported by DUE platform. */ //#define USB_DEVICE_VENDOR_ID 0x0000 //#define USB_DEVICE_PRODUCT_ID 0x0000 diff --git a/firmware/Marlin/_Bootscreen.h b/firmware/Marlin/_Bootscreen.h deleted file mode 100644 index fc0cfa6..0000000 --- a/firmware/Marlin/_Bootscreen.h +++ /dev/null @@ -1,92 +0,0 @@ -#pragma once - -#define CUSTOM_BOOTSCREEN_BMPWIDTH 88 - -const unsigned char custom_start_bmp[] PROGMEM = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x1F,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x40,0x80,0x00, - 0x11,0x80,0x20,0x00,0x00,0x00,0x00,0x00,0x40,0x80,0x00, - 0x10,0x8E,0x3E,0x1C,0x38,0xF1,0xC5,0x9C,0x78,0x87,0x16, - 0x11,0x93,0x33,0x26,0x41,0x02,0x26,0x64,0x64,0x88,0x98, - 0x1F,0x11,0x21,0x22,0x41,0x06,0x24,0x46,0x44,0x90,0x90, - 0x19,0x31,0x21,0x62,0x38,0xE7,0xE4,0x42,0x46,0x9F,0x90, - 0x11,0x91,0x21,0x22,0x0C,0x34,0x04,0x42,0x44,0x90,0x10, - 0x10,0x91,0x33,0x22,0x04,0x12,0x04,0x42,0x44,0x88,0x10, - 0x10,0xCE,0x3E,0x1C,0x79,0xE3,0xE4,0x42,0x78,0x8F,0x90, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x41,0x04,0x18,0x61,0xE3,0xFB,0x11,0x0C,0x86,0x00, - 0x00,0x41,0x0E,0x18,0x62,0x30,0x43,0x11,0x1C,0x8C,0x00, - 0x00,0x41,0x0A,0x18,0xE6,0x18,0x43,0x11,0x1C,0x98,0x00, - 0x00,0x61,0x1A,0x14,0xA4,0x08,0x43,0x11,0x2C,0xB0,0x00, - 0x00,0x7F,0x11,0x15,0xA4,0x08,0x41,0xF1,0x2C,0xF0,0x00, - 0x00,0x41,0x11,0x13,0x24,0x08,0x40,0x11,0x4C,0xC8,0x00, - 0x00,0x41,0x3F,0x93,0x26,0x18,0x40,0x11,0x4C,0x8C,0x00, - 0x00,0x41,0x20,0x90,0x22,0x10,0x40,0x11,0x8C,0x84,0x00, - 0x00,0x41,0x60,0x90,0x21,0xE0,0x40,0x11,0x8C,0x82,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x0C,0xFE,0xE0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x1F,0xFF,0xF0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x1F,0xFF,0xF0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x1F,0xFF,0xF0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x1F,0xC7,0xF0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x1F,0x03,0xF0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x3F,0x01,0xF8,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x7E,0x01,0xFC,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x1F,0x01,0xF0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x1F,0x83,0xF0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x1F,0xFF,0xF0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x1F,0xFF,0xF0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x3F,0xFF,0xF0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x1F,0xFF,0xF0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x08,0x7C,0x60,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; - -// Saves 283 bytes -#define COMPACT_CUSTOM_BOOTSCREEN_EXT -const unsigned char custom_start_bmp_rle[355] PROGMEM = { - 0x0F, 0xFB, 0xB4, 0x90, 0xF1, 0xE0, 0x50, 0xF0, 0x20, 0x21, 0x80, 0xF1, 0xE0, 0x50, 0xF0, 0x20, - 0x30, 0x22, 0x24, 0x32, 0x32, 0x23, 0x22, 0x20, 0x01, 0x12, 0x23, 0x20, 0x32, 0x20, 0x01, 0x30, - 0x21, 0x10, 0x11, 0x11, 0x11, 0x10, 0x11, 0x10, 0x40, 0x50, 0x20, 0x11, 0x11, 0x10, 0x21, 0x10, - 0x10, 0x20, 0x20, 0x11, 0x54, 0x20, 0x20, 0x10, 0x30, 0x10, 0x20, 0x10, 0x40, 0x41, 0x20, 0x10, - 0x20, 0x21, 0x10, 0x20, 0x10, 0x10, 0x30, 0x10, 0x61, 0x10, 0x11, 0x20, 0x10, 0x30, 0x01, 0x20, - 0x22, 0x22, 0x15, 0x10, 0x20, 0x30, 0x10, 0x21, 0x00, 0x15, 0x10, 0x60, 0x21, 0x10, 0x20, 0x10, - 0x30, 0x10, 0x20, 0x41, 0x31, 0x00, 0x60, 0x20, 0x30, 0x10, 0x20, 0x10, 0x10, 0x60, 0x60, 0x30, - 0x10, 0x20, 0x11, 0x11, 0x10, 0x20, 0x50, 0x40, 0x10, 0x50, 0x20, 0x30, 0x10, 0x20, 0x10, 0x20, - 0x50, 0x60, 0x31, 0x12, 0x24, 0x32, 0x23, 0x13, 0x24, 0x10, 0x20, 0x30, 0x13, 0x20, 0x24, 0x10, - 0xFF, 0xC5, 0x04, 0x04, 0x04, 0x13, 0x13, 0x32, 0x60, 0x12, 0x02, 0x03, 0x11, 0x03, 0x1F, 0x02, - 0x04, 0x03, 0x23, 0x13, 0x12, 0x02, 0x14, 0x03, 0x12, 0x02, 0x02, 0x21, 0x02, 0x1F, 0x03, 0x04, - 0x03, 0x00, 0x03, 0x12, 0x21, 0x13, 0x13, 0x03, 0x12, 0x02, 0x02, 0x21, 0x01, 0x1F, 0x04, 0x13, - 0x02, 0x10, 0x03, 0x00, 0x01, 0x00, 0x01, 0x05, 0x03, 0x03, 0x12, 0x02, 0x01, 0x00, 0x11, 0x00, - 0x1F, 0x05, 0x62, 0x02, 0x02, 0x00, 0x00, 0x10, 0x01, 0x05, 0x03, 0x04, 0x42, 0x01, 0x00, 0x11, - 0x3F, 0x05, 0x04, 0x02, 0x02, 0x02, 0x01, 0x11, 0x01, 0x05, 0x03, 0x08, 0x02, 0x00, 0x01, 0x11, - 0x11, 0x0F, 0x04, 0x04, 0x01, 0x61, 0x01, 0x11, 0x01, 0x13, 0x13, 0x08, 0x02, 0x00, 0x01, 0x11, - 0x02, 0x1F, 0x03, 0x04, 0x01, 0x04, 0x01, 0x05, 0x02, 0x03, 0x04, 0x08, 0x02, 0x12, 0x11, 0x03, - 0x0F, 0x03, 0x04, 0x00, 0x14, 0x01, 0x05, 0x03, 0x35, 0x08, 0x02, 0x12, 0x11, 0x04, 0x0F, 0xF9, - 0x32, 0xF4, 0x43, 0xF4, 0x44, 0xF3, 0xE1, 0x16, 0x02, 0xF3, 0x8F, 0x01, 0xF3, 0x7F, 0x01, 0xF3, - 0x7F, 0x01, 0xF3, 0x76, 0x26, 0xF3, 0x74, 0x55, 0xF3, 0x65, 0x65, 0xF3, 0x36, 0x86, 0xF3, 0x16, - 0x86, 0xF3, 0x16, 0x86, 0xF3, 0x25, 0x76, 0xF3, 0x54, 0x64, 0xF3, 0x75, 0x45, 0xF3, 0x7F, 0x01, - 0xF3, 0x7F, 0x01, 0xF3, 0x6F, 0x02, 0xF3, 0x7F, 0x01, 0xF3, 0x80, 0x34, 0x21, 0xF3, 0xE3, 0xF4, - 0x52, 0xFF, 0x33 -}; diff --git a/firmware/Marlin/_Statusscreen.h b/firmware/Marlin/_Statusscreen.h deleted file mode 100644 index 408b250..0000000 --- a/firmware/Marlin/_Statusscreen.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * 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 . - * - */ - -/** - * Custom Status Screen bitmap - * - * Place this file in the root with your configuration files - * and enable CUSTOM_STATUS_SCREEN_IMAGE in Configuration.h. - * - * Use the Marlin Bitmap Converter to make your own: - * https://marlinfw.org/tools/u8glib/converter.html - */ - -// -// Status Screen Logo bitmap -// -#define STATUS_LOGO_Y 6 -#define STATUS_LOGO_WIDTH 40 - -const unsigned char status_logo_bmp[] PROGMEM = { - 0xFF,0xFF,0xFF,0xFF,0x7F, - 0xB6,0x6E,0x88,0xCD,0x5D, - 0xB5,0xA4,0xAD,0xB5,0xD9, - 0xB5,0xAA,0xAD,0xB5,0xDD, - 0xB5,0xAA,0xAD,0xB5,0xDD, - 0xB5,0xAA,0xAD,0xB5,0xD8, - 0xB5,0xAA,0xAD,0xB5,0xDF, - 0x84,0x2E,0xAD,0x85,0xDD, - 0xB5,0xAE,0xAD,0xB5,0x9F, - 0xB5,0xAE,0xAD,0xB5,0x58, - 0xB5,0xAE,0xAD,0xB4,0xDA, - 0xB5,0xAE,0xAD,0xB4,0xDA, - 0xB5,0xAE,0xAD,0xB4,0xD8, - 0xB5,0xAE,0x8D,0xB5,0xDF, - 0xFF,0xFF,0xFF,0xFF,0xFF -}; - -// -// Use default bitmaps -// -#define STATUS_HOTEND_ANIM -#define STATUS_BED_ANIM -#define STATUS_HEATERS_XSPACE 20 -#if HOTENDS < 2 - #define STATUS_HEATERS_X 48 - #define STATUS_BED_X 73 -#else - #define STATUS_HEATERS_X 40 - #define STATUS_BED_X 81 -#endif \ No newline at end of file diff --git a/firmware/Marlin/config.ini b/firmware/Marlin/config.ini index fed2a5c..d6d2395 100644 --- a/firmware/Marlin/config.ini +++ b/firmware/Marlin/config.ini @@ -62,6 +62,11 @@ motherboard = BOARD_RAMPS_14_EFB serial_port = 0 baudrate = 250000 +string_config_h_author = "(default from config.ini)" + +capabilities_report = on +extended_capabilities_report = on + use_watchdog = on thermal_protection_hotends = on thermal_protection_hysteresis = 4 @@ -77,9 +82,7 @@ temp_sensor_0 = 1 temp_hysteresis = 3 heater_0_mintemp = 5 heater_0_maxtemp = 275 -preheat_1_temp_hotend = 180 -bang_max = 255 pidtemp = on pid_k1 = 0.95 pid_max = 255 @@ -89,6 +92,14 @@ default_kp = 22.20 default_ki = 1.08 default_kd = 114.00 +temp_sensor_bed = 1 +bed_mintemp = 5 +bed_maxtemp = 150 + +thermal_protection_bed = on +thermal_protection_bed_hysteresis = 2 +thermal_protection_bed_period = 20 + x_driver_type = A4988 y_driver_type = A4988 z_driver_type = A4988 @@ -121,10 +132,10 @@ default_max_acceleration = { 3000, 3000, 100, 10000 } homing_feedrate_mm_m = { (50*60), (50*60), (4*60) } homing_bump_divisor = { 2, 2, 4 } -x_enable_on = 0 -y_enable_on = 0 -z_enable_on = 0 -e_enable_on = 0 +x_enable_on = LOW +y_enable_on = LOW +z_enable_on = LOW +e_enable_on = LOW invert_x_dir = false invert_y_dir = true @@ -136,11 +147,6 @@ step_state_x = HIGH step_state_y = HIGH step_state_z = HIGH -disable_x = off -disable_y = off -disable_z = off -disable_e = off - proportional_font_ratio = 1.0 default_nominal_filament_dia = 1.75 @@ -153,18 +159,13 @@ default_retract_acceleration = 3000 default_minimumfeedrate = 0.0 default_mintravelfeedrate = 0.0 -minimum_planner_speed = 0.05 min_steps_per_segment = 6 default_minsegmenttime = 20000 [config:basic] bed_overshoot = 10 busy_while_heating = on -default_ejerk = 5.0 default_keepalive_interval = 2 -default_leveling_fade_height = 0.0 -disable_other_extruders = on -display_charset_hd44780 = JAPANESE eeprom_boot_silent = on eeprom_chitchat = on endstoppullups = on @@ -173,10 +174,8 @@ extrude_mintemp = 170 host_keepalive_feature = on hotend_overshoot = 15 jd_handle_small_segments = on -lcd_info_screen_style = 0 -lcd_language = en max_bed_power = 255 -mesh_inset = 0 + min_software_endstops = on max_software_endstops = on min_software_endstop_x = on @@ -185,50 +184,48 @@ min_software_endstop_z = on max_software_endstop_x = on max_software_endstop_y = on max_software_endstop_z = on -preheat_1_fan_speed = 0 + preheat_1_label = "PLA" +preheat_1_temp_hotend = 180 preheat_1_temp_bed = 70 +preheat_1_fan_speed = 0 + +preheat_2_label = "ABS" +preheat_2_temp_hotend = 240 +preheat_2_temp_bed = 110 +preheat_2_fan_speed = 0 + prevent_cold_extrusion = on prevent_lengthy_extrude = on printjob_timer_autostart = on -probing_margin = 10 -show_bootscreen = on -soft_pwm_scale = 0 -string_config_h_author = "(none, default config)" + temp_bed_hysteresis = 3 temp_bed_residency_time = 10 temp_bed_window = 1 temp_residency_time = 10 temp_window = 1 validate_homing_endstops = on -xy_probe_feedrate = (133*60) -z_clearance_between_probes = 5 -z_clearance_deploy_probe = 10 -z_clearance_multi_probe = 5 + +editable_steps_per_unit = on [config:advanced] arc_support = on auto_report_temperatures = on + autotemp = on +autotemp_min = 210 +autotemp_max = 250 +autotemp_factor = 0.1f autotemp_oldweight = 0.98 -bed_check_interval = 5000 + default_stepper_timeout_sec = 120 -default_volumetric_extruder_limit = 0.00 disable_idle_x = on disable_idle_y = on disable_idle_z = on disable_idle_e = on e0_auto_fan_pin = -1 -encoder_100x_steps_per_sec = 80 -encoder_10x_steps_per_sec = 30 -encoder_rate_multiplier = on -extended_capabilities_report = on -extruder_auto_fan_speed = 255 -extruder_auto_fan_temperature = 50 -fanmux0_pin = -1 -fanmux1_pin = -1 -fanmux2_pin = -1 faster_gcode_parser = on +debug_flags_gcode = on homing_bump_mm = { 5, 5, 2 } max_arc_segment_mm = 1.0 min_arc_segment_mm = 0.1 @@ -237,11 +234,11 @@ n_arc_correction = 25 serial_overrun_protection = on slowdown = on slowdown_divisor = 2 -temp_sensor_bed = 0 -thermal_protection_bed_hysteresis = 2 -thermocouple_max_errors = 15 tx_buffer_size = 0 + +bed_check_interval = 5000 watch_bed_temp_increase = 2 watch_bed_temp_period = 60 + watch_temp_increase = 2 -watch_temp_period = 20 +watch_temp_period = 40 diff --git a/firmware/Marlin/src/HAL/AVR/HAL.h b/firmware/Marlin/src/HAL/AVR/HAL.h index 717bc7e..b420236 100644 --- a/firmware/Marlin/src/HAL/AVR/HAL.h +++ b/firmware/Marlin/src/HAL/AVR/HAL.h @@ -129,11 +129,11 @@ typedef Servo hal_servo_t; #endif #endif -#ifdef MMU2_SERIAL_PORT - #if !WITHIN(MMU2_SERIAL_PORT, 0, 3) - #error "MMU2_SERIAL_PORT must be from 0 to 3" +#ifdef MMU_SERIAL_PORT + #if !WITHIN(MMU_SERIAL_PORT, 0, 3) + #error "MMU_SERIAL_PORT must be from 0 to 3" #endif - #define MMU2_SERIAL mmuSerial + #define MMU_SERIAL mmuSerial #endif #ifdef LCD_SERIAL_PORT diff --git a/firmware/Marlin/src/HAL/AVR/MarlinSerial.cpp b/firmware/Marlin/src/HAL/AVR/MarlinSerial.cpp index dabcfb5..d070731 100644 --- a/firmware/Marlin/src/HAL/AVR/MarlinSerial.cpp +++ b/firmware/Marlin/src/HAL/AVR/MarlinSerial.cpp @@ -601,20 +601,20 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser); #endif // SERIAL_PORT_3 -#ifdef MMU2_SERIAL_PORT +#ifdef MMU_SERIAL_PORT - ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _RX_vect)) { - MarlinSerial>::store_rxd_char(); + ISR(SERIAL_REGNAME(USART, MMU_SERIAL_PORT, _RX_vect)) { + MarlinSerial>::store_rxd_char(); } - ISR(SERIAL_REGNAME(USART, MMU2_SERIAL_PORT, _UDRE_vect)) { - MarlinSerial>::_tx_udr_empty_irq(); + ISR(SERIAL_REGNAME(USART, MMU_SERIAL_PORT, _UDRE_vect)) { + MarlinSerial>::_tx_udr_empty_irq(); } - template class MarlinSerial< MMU2SerialCfg >; + template class MarlinSerial< MMU2SerialCfg >; MSerialMMU2 mmuSerial(MSerialMMU2::HasEmergencyParser); -#endif // MMU2_SERIAL_PORT +#endif // MMU_SERIAL_PORT #ifdef LCD_SERIAL_PORT diff --git a/firmware/Marlin/src/HAL/AVR/MarlinSerial.h b/firmware/Marlin/src/HAL/AVR/MarlinSerial.h index 609aac5..9ecf3bd 100644 --- a/firmware/Marlin/src/HAL/AVR/MarlinSerial.h +++ b/firmware/Marlin/src/HAL/AVR/MarlinSerial.h @@ -246,7 +246,7 @@ #endif // !USBCON -#ifdef MMU2_SERIAL_PORT +#ifdef MMU_SERIAL_PORT template struct MMU2SerialCfg { static constexpr int PORT = serial; @@ -260,7 +260,7 @@ static constexpr bool RX_OVERRUNS = false; }; - typedef Serial1Class< MarlinSerial< MMU2SerialCfg > > MSerialMMU2; + typedef Serial1Class< MarlinSerial< MMU2SerialCfg > > MSerialMMU2; extern MSerialMMU2 mmuSerial; #endif diff --git a/firmware/Marlin/src/HAL/AVR/pinsDebug.h b/firmware/Marlin/src/HAL/AVR/pinsDebug.h index b4352fd..e9bc09a 100644 --- a/firmware/Marlin/src/HAL/AVR/pinsDebug.h +++ b/firmware/Marlin/src/HAL/AVR/pinsDebug.h @@ -22,7 +22,23 @@ #pragma once /** - * PWM print routines for Atmel 8 bit AVR CPUs + * Pins Debugging for Atmel 8 bit AVR CPUs + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) */ #include "../../inc/MarlinConfig.h" @@ -39,30 +55,30 @@ #include "pinsDebug_Teensyduino.h" // Can't use the "digitalPinToPort" function from the Teensyduino type IDEs // portModeRegister takes a different argument - #define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p) - #define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p) - #define digitalPinToPort_DEBUG(p) digitalPinToPort(p) - #define getValidPinMode(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin)) + #define digitalPinToTimer_DEBUG(P) digitalPinToTimer(P) + #define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask(P) + #define digitalPinToPort_DEBUG(P) digitalPinToPort(P) + #define getValidPinMode(P) (*portModeRegister(P) & digitalPinToBitMask_DEBUG(P)) #elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70 #include "pinsDebug_plus_70.h" - #define digitalPinToTimer_DEBUG(p) digitalPinToTimer_plus_70(p) - #define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask_plus_70(p) - #define digitalPinToPort_DEBUG(p) digitalPinToPort_plus_70(p) + #define digitalPinToTimer_DEBUG(P) digitalPinToTimer_plus_70(P) + #define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask_plus_70(P) + #define digitalPinToPort_DEBUG(P) digitalPinToPort_plus_70(P) bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); } #else - #define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p) - #define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p) - #define digitalPinToPort_DEBUG(p) digitalPinToPort(p) + #define digitalPinToTimer_DEBUG(P) digitalPinToTimer(P) + #define digitalPinToBitMask_DEBUG(P) digitalPinToBitMask(P) + #define digitalPinToPort_DEBUG(P) digitalPinToPort(P) bool getValidPinMode(pin_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask_DEBUG(pin); } - #define getPinByIndex(p) pgm_read_byte(&pin_array[p].pin) + #define getPinByIndex(x) pgm_read_byte(&pin_array[x].pin) #endif -#define isValidPin(pin) (pin >= 0 && pin < NUM_DIGITAL_PINS ? 1 : 0) +#define isValidPin(P) (P >= 0 && P < NUMBER_PINS_TOTAL) #if AVR_ATmega1284_FAMILY #define isAnalogPin(P) WITHIN(P, analogInputToDigitalPin(7), analogInputToDigitalPin(0)) #define digitalPinToAnalogIndex(P) int(isAnalogPin(P) ? (P) - analogInputToDigitalPin(7) : -1) @@ -72,11 +88,11 @@ #define isAnalogPin(P) (_ANALOG1(P) || _ANALOG2(P)) #define digitalPinToAnalogIndex(P) int(_ANALOG1(P) ? (P) - analogInputToDigitalPin(0) : _ANALOG2(P) ? (P) - analogInputToDigitalPin(8) + 8 : -1) #endif -#define getPinByIndex(p) pgm_read_byte(&pin_array[p].pin) +#define getPinByIndex(x) pgm_read_byte(&pin_array[x].pin) #define MULTI_NAME_PAD 26 // space needed to be pretty if not first name assigned to a pin -void printPinNameByIndex(uint8_t x) { - PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[x].name); +void printPinNameByIndex(const uint8_t index) { + PGM_P const name_mem_pointer = (PGM_P)pgm_read_ptr(&pin_array[index].name); for (uint8_t y = 0; y < MAX_NAME_LENGTH; ++y) { char temp_char = pgm_read_byte(name_mem_pointer + y); if (temp_char != 0) @@ -109,7 +125,7 @@ void printPinNameByIndex(uint8_t x) { * Print a pin's PWM status. * Return true if it's currently a PWM pin. */ -bool pwm_status(uint8_t pin) { +bool pwm_status(const uint8_t pin) { char buffer[20]; // for the sprintf statements switch (digitalPinToTimer_DEBUG(pin)) { @@ -276,7 +292,7 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N - if (TEST(*TMSK, TOIE)) err_prob_interrupt(); } -void printPinPWM(uint8_t pin) { +void printPinPWM(const uint8_t pin) { switch (digitalPinToTimer_DEBUG(pin)) { #if ABTEST(0) @@ -386,7 +402,7 @@ void printPinPort(const pin_t pin) { // print port number #endif } -#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) -#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0) +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0) +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) #undef ABTEST diff --git a/firmware/Marlin/src/HAL/AVR/pinsDebug_Teensyduino.h b/firmware/Marlin/src/HAL/AVR/pinsDebug_Teensyduino.h index c812d4f..463a77e 100644 --- a/firmware/Marlin/src/HAL/AVR/pinsDebug_Teensyduino.h +++ b/firmware/Marlin/src/HAL/AVR/pinsDebug_Teensyduino.h @@ -102,7 +102,7 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = { // digitalPinToBitMask(pin) is OK -#define digitalRead_mod(p) extDigitalRead(p) // Teensyduino's version of digitalRead doesn't +#define digitalRead_mod(P) extDigitalRead(P) // Teensyduino's version of digitalRead doesn't // disable the PWMs so we can use it as is // portModeRegister(pin) is OK diff --git a/firmware/Marlin/src/HAL/DUE/HAL.h b/firmware/Marlin/src/HAL/DUE/HAL.h index fde235e..9d00d9d 100644 --- a/firmware/Marlin/src/HAL/DUE/HAL.h +++ b/firmware/Marlin/src/HAL/DUE/HAL.h @@ -81,11 +81,11 @@ extern DefaultSerial4 MSerial3; #endif #endif -#ifdef MMU2_SERIAL_PORT - #if WITHIN(MMU2_SERIAL_PORT, 0, 3) - #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) +#ifdef MMU_SERIAL_PORT + #if WITHIN(MMU_SERIAL_PORT, 0, 3) + #define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT) #else - #error "MMU2_SERIAL_PORT must be from 0 to 3." + #error "MMU_SERIAL_PORT must be from 0 to 3." #endif #endif diff --git a/firmware/Marlin/src/HAL/DUE/eeprom_flash.cpp b/firmware/Marlin/src/HAL/DUE/eeprom_flash.cpp index a5c7ab8..55206a0 100644 --- a/firmware/Marlin/src/HAL/DUE/eeprom_flash.cpp +++ b/firmware/Marlin/src/HAL/DUE/eeprom_flash.cpp @@ -291,7 +291,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) { uint32_t *p1 = (uint32_t*)addrflash; uint32_t *p2 = (uint32_t*)data; int count = 0; - for (i =0; i> 2; i++) { + for (i = 0; i < PageSize >> 2; i++) { if (p1[i] != p2[i]) { uint32_t delta = p1[i] ^ p2[i]; while (delta) { diff --git a/firmware/Marlin/src/HAL/DUE/pinsDebug.h b/firmware/Marlin/src/HAL/DUE/pinsDebug.h index e320189..e9e364d 100644 --- a/firmware/Marlin/src/HAL/DUE/pinsDebug.h +++ b/firmware/Marlin/src/HAL/DUE/pinsDebug.h @@ -19,13 +19,26 @@ * along with this program. If not, see . * */ +#pragma once /** - * Support routines for Due - */ - -/** - * Translation of routines & variables used by pinsDebug.h + * Pins Debugging for DUE + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) */ #include "../shared/Marduino.h" @@ -63,20 +76,20 @@ #define NUMBER_PINS_TOTAL PINS_COUNT -#define digitalRead_mod(p) extDigitalRead(p) // AVR digitalRead disabled PWM before it read the pin +#define digitalRead_mod(P) extDigitalRead(P) // AVR digitalRead disabled PWM before it read the pin #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) -#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0) -#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0) -#define getPinByIndex(p) pin_array[p].pin -#define getPinIsDigitalByIndex(p) pin_array[p].is_digital -#define isValidPin(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL)) -#define digitalPinToAnalogIndex(p) int(p - analogInputToDigitalPin(0)) +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%02d"), P); SERIAL_ECHO(buffer); }while(0) +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) +#define getPinByIndex(x) pin_array[x].pin +#define getPinIsDigitalByIndex(x) pin_array[x].is_digital +#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL)) +#define digitalPinToAnalogIndex(P) int(P - analogInputToDigitalPin(0)) #define isAnalogPin(P) WITHIN(P, pin_t(analogInputToDigitalPin(0)), pin_t(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1))) -#define pwm_status(pin) (((g_pinStatus[pin] & 0xF) == PIN_STATUS_PWM) && \ - ((g_APinDescription[pin].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM)) +#define pwm_status(P) (((g_pinStatus[P] & 0xF) == PIN_STATUS_PWM) && \ + ((g_APinDescription[P].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM)) #define MULTI_NAME_PAD 14 // space needed to be pretty if not first name assigned to a pin -bool getValidPinMode(int8_t pin) { // 1: output, 0: input +bool getValidPinMode(const pin_t pin) { // 1: output, 0: input volatile Pio* port = g_APinDescription[pin].pPort; uint32_t mask = g_APinDescription[pin].ulPin; uint8_t pin_status = g_pinStatus[pin] & 0xF; @@ -85,7 +98,7 @@ bool getValidPinMode(int8_t pin) { // 1: output, 0: input || pwm_status(pin)); } -void printPinPWM(int32_t pin) { +void printPinPWM(const int32_t pin) { if (pwm_status(pin)) { uint32_t chan = g_APinDescription[pin].ulPWMChannel; SERIAL_ECHOPGM("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY); diff --git a/firmware/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp b/firmware/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp index a7789c5..cf6739c 100644 --- a/firmware/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp +++ b/firmware/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp @@ -19,9 +19,7 @@ void sd_mmc_spi_mem_init() { } inline bool media_ready() { - return DISABLED(DISABLE_DUE_SD_MMC) - && IS_SD_MOUNTED() && IS_SD_INSERTED() - && !IS_SD_FILE_OPEN() && !IS_SD_PRINTING(); + return IS_SD_MOUNTED() && IS_SD_INSERTED() && !IS_SD_FILE_OPEN() && !IS_SD_PRINTING(); } bool sd_mmc_spi_unload(bool) { return true; } @@ -31,6 +29,9 @@ bool sd_mmc_spi_wr_protect() { return false; } bool sd_mmc_spi_removal() { return !media_ready(); } Ctrl_status sd_mmc_spi_test_unit_ready() { + #ifdef DISABLE_DUE_SD_MMC + return CTRL_NO_PRESENT; + #endif if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT; return CTRL_GOOD; } @@ -57,6 +58,9 @@ uint8_t sector_buf[SD_MMC_BLOCK_SIZE]; // #define DEBUG_MMC Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) { + #ifdef DISABLE_DUE_SD_MMC + return CTRL_NO_PRESENT; + #endif if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT; #ifdef DEBUG_MMC @@ -93,6 +97,9 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) { } Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) { + #ifdef DISABLE_DUE_SD_MMC + return CTRL_NO_PRESENT; + #endif if (sd_mmc_spi_removal()) return CTRL_NO_PRESENT; #ifdef DEBUG_MMC diff --git a/firmware/Marlin/src/HAL/ESP32/HAL.cpp b/firmware/Marlin/src/HAL/ESP32/HAL.cpp index 4890972..415e251 100644 --- a/firmware/Marlin/src/HAL/ESP32/HAL.cpp +++ b/firmware/Marlin/src/HAL/ESP32/HAL.cpp @@ -209,16 +209,17 @@ int MarlinHAL::freeMemory() { return ESP.getFreeHeap(); } // ADC // ------------------------ -#define ADC1_CHANNEL(pin) ADC1_GPIO ## pin ## _CHANNEL - +// https://docs.espressif.com/projects/esp-idf/en/release-v4.4/esp32/api-reference/peripherals/adc.html adc1_channel_t get_channel(int pin) { switch (pin) { - case 39: return ADC1_CHANNEL(39); - case 36: return ADC1_CHANNEL(36); - case 35: return ADC1_CHANNEL(35); - case 34: return ADC1_CHANNEL(34); - case 33: return ADC1_CHANNEL(33); - case 32: return ADC1_CHANNEL(32); + case 39: return ADC1_CHANNEL_3; + case 36: return ADC1_CHANNEL_0; + case 35: return ADC1_CHANNEL_7; + case 34: return ADC1_CHANNEL_6; + case 33: return ADC1_CHANNEL_5; + case 32: return ADC1_CHANNEL_4; + case 37: return ADC1_CHANNEL_1; + case 38: return ADC1_CHANNEL_2; } return ADC1_CHANNEL_MAX; } diff --git a/firmware/Marlin/src/HAL/ESP32/fastio.h b/firmware/Marlin/src/HAL/ESP32/fastio.h index c8e3f7e..a85423d 100644 --- a/firmware/Marlin/src/HAL/ESP32/fastio.h +++ b/firmware/Marlin/src/HAL/ESP32/fastio.h @@ -37,6 +37,10 @@ // Set pin as output #define _SET_OUTPUT(IO) pinMode(IO, OUTPUT) +// TODO: Store set modes in an array and use those to get the mode +#define _IS_OUTPUT(IO) true +#define _IS_INPUT(IO) true + // Set pin as input with pullup mode #define _PULLUP(IO, v) pinMode(IO, v ? INPUT_PULLUP : INPUT) @@ -70,6 +74,9 @@ // Set pin as output and init #define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0) +#define IS_OUTPUT(IO) _IS_OUTPUT(IO) +#define IS_INPUT(IO) _IS_INPUT(IO) + // digitalRead/Write wrappers #define extDigitalRead(IO) digitalRead(IO) #define extDigitalWrite(IO,V) digitalWrite(IO,V) diff --git a/firmware/Marlin/src/HAL/ESP32/ota.cpp b/firmware/Marlin/src/HAL/ESP32/ota.cpp index 01f5924..be5847b 100644 --- a/firmware/Marlin/src/HAL/ESP32/ota.cpp +++ b/firmware/Marlin/src/HAL/ESP32/ota.cpp @@ -22,11 +22,15 @@ #ifdef ARDUINO_ARCH_ESP32 +#include + +#undef ENABLED +#undef DISABLED + #include "../../inc/MarlinConfigPre.h" #if ALL(WIFISUPPORT, OTASUPPORT) -#include #include #include #include diff --git a/firmware/Marlin/src/HAL/ESP32/pinsDebug.h b/firmware/Marlin/src/HAL/ESP32/pinsDebug.h new file mode 100644 index 0000000..42304b2 --- /dev/null +++ b/firmware/Marlin/src/HAL/ESP32/pinsDebug.h @@ -0,0 +1,71 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 + +#error "PINS_DEBUGGING is not yet supported for ESP32!" + +/** + * Pins Debugging for ESP32 + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) + */ + +#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS +#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin + +#define digitalRead_mod(P) extDigitalRead(P) +#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%02d"), P); SERIAL_ECHO(buffer); }while(0) +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) +#define getPinByIndex(x) pin_array[x].pin +#define getPinIsDigitalByIndex(x) pin_array[x].is_digital +#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL)) +#define digitalPinToAnalogIndex(P) int(P - analogInputToDigitalPin(0)) +#define isAnalogPin(P) WITHIN(P, pin_t(analogInputToDigitalPin(0)), pin_t(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1))) +bool pwm_status(const pin_t) { return false; } + +void printPinPort(const pin_t) {} + +static bool getValidPinMode(const pin_t pin) { + return isValidPin(pin) && !IS_INPUT(pin); +} + +void printPinPWM(const int32_t pin) { + if (pwm_status(pin)) { + //uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative; + //SERIAL_ECHOPGM("PWM = ", duty); + } +} diff --git a/firmware/Marlin/src/HAL/ESP32/timers.cpp b/firmware/Marlin/src/HAL/ESP32/timers.cpp index a689315..743ed65 100644 --- a/firmware/Marlin/src/HAL/ESP32/timers.cpp +++ b/firmware/Marlin/src/HAL/ESP32/timers.cpp @@ -90,7 +90,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) { config.counter_en = TIMER_PAUSE; config.alarm_en = TIMER_ALARM_EN; config.intr_type = TIMER_INTR_LEVEL; - config.auto_reload = true; + config.auto_reload = TIMER_AUTORELOAD_EN; // Select and initialize the timer timer_init(timer.group, timer.idx, &config); diff --git a/firmware/Marlin/src/HAL/ESP32/wifi.cpp b/firmware/Marlin/src/HAL/ESP32/wifi.cpp index 060f3bd..aa2796a 100644 --- a/firmware/Marlin/src/HAL/ESP32/wifi.cpp +++ b/firmware/Marlin/src/HAL/ESP32/wifi.cpp @@ -21,11 +21,12 @@ */ #ifdef ARDUINO_ARCH_ESP32 -#include "../../core/serial.h" #include "../../inc/MarlinConfigPre.h" #if ENABLED(WIFISUPPORT) +#include "../../core/serial.h" + #include #include #include diff --git a/firmware/Marlin/src/HAL/HC32/HAL.h b/firmware/Marlin/src/HAL/HC32/HAL.h index 8111e1b..3f4ba14 100644 --- a/firmware/Marlin/src/HAL/HC32/HAL.h +++ b/firmware/Marlin/src/HAL/HC32/HAL.h @@ -30,7 +30,6 @@ #include "../../inc/MarlinConfig.h" -#include "../../core/macros.h" #include "../shared/Marduino.h" #include "../shared/math_32bit.h" #include "../shared/HAL_SPI.h" @@ -39,8 +38,6 @@ #include "timers.h" #include "MarlinSerial.h" -#include - // // Serial Ports // diff --git a/firmware/Marlin/src/HAL/HC32/README.md b/firmware/Marlin/src/HAL/HC32/README.md index c9ae8a9..ed11c40 100644 --- a/firmware/Marlin/src/HAL/HC32/README.md +++ b/firmware/Marlin/src/HAL/HC32/README.md @@ -11,7 +11,7 @@ The HC32F460 HAL is designed to be generic enough for any HC32F460-based board. - Examine the board's main processor. (Refer the naming key in `hc32.ini`.) - Extend the `HC32F460C_common` base env for 256K, or `HC32F460E_common` for 512K. 3. Determine your board's application start address (see [below](#finding-the-application-start-address)) -4. Set `board_build.ld_args.flash_start` to the app start address once you've found it. If your board doesn't use a bootloader, you may be able to use the "ICSP" header or DFU. This document will be updated once we have more information about flashing without a bootloader. +4. Set `board_upload.offset_address` to the app start address once you've found it. If your board doesn't use a bootloader, you may be able to use the "ICSP" header or DFU. This document will be updated once we have more information about flashing without a bootloader. ### Finding the application start address diff --git a/firmware/Marlin/src/HAL/HC32/app_config.h b/firmware/Marlin/src/HAL/HC32/app_config.h index fb29141..b971903 100644 --- a/firmware/Marlin/src/HAL/HC32/app_config.h +++ b/firmware/Marlin/src/HAL/HC32/app_config.h @@ -8,6 +8,7 @@ #define _HC32_APP_CONFIG_H_ #include "../../inc/MarlinConfigPre.h" +#include "sysclock.h" // // dev mode @@ -64,12 +65,8 @@ // redirect printf to host serial #define REDIRECT_PRINTF_TO_SERIAL 1 -// F_CPU must be known at compile time, but on HC32F460 it's not. -// Thus we assume HCLK to be 200MHz, as that's what is configured in -// 'core_hook_sysclock_init' in 'sysclock.cpp'. -// If you face issues with this assumption, please double-check with the values -// printed by 'MarlinHAL::HAL_clock_frequencies_dump'. -// see also: HAL_TIMER_RATE in timers.h -#define F_CPU 200000000 // 200MHz HCLK +// F_CPU is F_HCLK, as that's the main CPU core's clock. +// see 'sysclock.h' for more information. +#define F_CPU F_HCLK #endif // _HC32_APP_CONFIG_H_ diff --git a/firmware/Marlin/src/HAL/HC32/docs/HC32F460 series Datasheet Rev1.3.pdf b/firmware/Marlin/src/HAL/HC32/docs/HC32F460 series Datasheet Rev1.3.pdf new file mode 100644 index 0000000..a8943c8 Binary files /dev/null and b/firmware/Marlin/src/HAL/HC32/docs/HC32F460 series Datasheet Rev1.3.pdf differ diff --git a/firmware/Marlin/src/HAL/HC32/inc/SanityCheck.h b/firmware/Marlin/src/HAL/HC32/inc/SanityCheck.h index 6b12e4d..e38bce9 100644 --- a/firmware/Marlin/src/HAL/HC32/inc/SanityCheck.h +++ b/firmware/Marlin/src/HAL/HC32/inc/SanityCheck.h @@ -94,8 +94,10 @@ #error "SERIAL_DMA requires USART_RX_DMA_SUPPORT to be enabled in the arduino core." #endif - // USART_RX_DMA_SUPPORT does not implement core_hook_usart_rx_irq, which is required for the emergency parser - #if ENABLED(EMERGENCY_PARSER) + // Before arduino core version 1.2.0, USART_RX_DMA_SUPPORT did not implement + // core_hook_usart_rx_irq, which is required for the emergency parser. + // With 1.2.0, this was fixed (see https://github.com/shadow578/framework-arduino-hc32f46x/pull/25). + #if ENABLED(EMERGENCY_PARSER) && ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 2, 0) #error "EMERGENCY_PARSER is not supported with SERIAL_DMA. Please disable either SERIAL_DMA or EMERGENCY_PARSER." #endif diff --git a/firmware/Marlin/src/HAL/HC32/pinsDebug.h b/firmware/Marlin/src/HAL/HC32/pinsDebug.h index c00ddf3..e80b5a0 100644 --- a/firmware/Marlin/src/HAL/HC32/pinsDebug.h +++ b/firmware/Marlin/src/HAL/HC32/pinsDebug.h @@ -18,41 +18,47 @@ */ #pragma once +/** + * Pins Debugging for HC32 + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) + */ + #include "../../inc/MarlinConfig.h" #include "fastio.h" #include -// -// Translation of routines & variables used by pinsDebug.h -// #ifndef BOARD_NR_GPIO_PINS #error "Expected BOARD_NR_GPIO_PINS not found." #endif #define NUM_DIGITAL_PINS BOARD_NR_GPIO_PINS #define NUMBER_PINS_TOTAL BOARD_NR_GPIO_PINS -#define isValidPin(pin) IS_GPIO_PIN(pin) +#define isValidPin(P) IS_GPIO_PIN(P) // Note: pin_array is defined in `Marlin/src/pins/pinsDebug.h`, and since this file is included // after it, it is available in this file as well. -#define getPinByIndex(p) pin_t(pin_array[p].pin) -#define digitalRead_mod(p) extDigitalRead(p) -#define printPinNumber(p) \ - do { \ - sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); \ - SERIAL_ECHO(buffer); \ - } while (0) -#define printPinAnalog(p) \ - do { \ - sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); \ - SERIAL_ECHO(buffer); \ - } while (0) -#define PRINT_PORT(p) printPinPort(p) -#define printPinNameByIndex(x) \ - do { \ - sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); \ - SERIAL_ECHO(buffer); \ - } while (0) +#define getPinByIndex(x) pin_t(pin_array[x].pin) +#define digitalRead_mod(P) extDigitalRead(P) + +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(P)); SERIAL_ECHO(buffer); }while(0) +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) + +#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 21 // Space needed to be pretty if not first name assigned to a pin @@ -71,13 +77,13 @@ #define M43_NEVER_TOUCH(Q) (IS_HOST_USART_PIN(Q) || IS_OSC_PIN(Q)) #endif -static int8_t digitalPinToAnalogIndex(pin_t pin) { +int8_t digitalPinToAnalogIndex(const pin_t pin) { if (!isValidPin(pin)) return -1; const int8_t adc_channel = int8_t(PIN_MAP[pin].adc_info.channel); return pin_t(adc_channel); } -static bool isAnalogPin(pin_t pin) { +bool isAnalogPin(pin_t pin) { if (!isValidPin(pin)) return false; if (PIN_MAP[pin].adc_info.channel != ADC_PIN_INVALID) @@ -86,12 +92,12 @@ static bool isAnalogPin(pin_t pin) { return false; } -static bool getValidPinMode(const pin_t pin) { +bool getValidPinMode(const pin_t pin) { return isValidPin(pin) && !IS_INPUT(pin); } -static bool getPinIsDigitalByIndex(const int16_t array_pin) { - const pin_t pin = getPinByIndex(array_pin); +bool getPinIsDigitalByIndex(const int16_t index) { + const pin_t pin = getPinByIndex(index); return (!isAnalogPin(pin)); } diff --git a/firmware/Marlin/src/HAL/HC32/sysclock.cpp b/firmware/Marlin/src/HAL/HC32/sysclock.cpp index 475be3b..493515b 100644 --- a/firmware/Marlin/src/HAL/HC32/sysclock.cpp +++ b/firmware/Marlin/src/HAL/HC32/sysclock.cpp @@ -26,64 +26,144 @@ #ifdef ARDUINO_ARCH_HC32 -// Get BOARD_XTAL_FREQUENCY from configuration / pins #include "../../inc/MarlinConfig.h" +#include "sysclock.h" #include #include +/*** + * @brief Automatically calculate M, N, P values for the MPLL to reach a target frequency. + * @param input_frequency The input frequency. + * @param target_frequency The target frequency. + * @return The MPLL configuration structure. Q and R are not set. + * + * @note + * Simplified MPLL block diagram, with intermediary clocks (1) = VCO_in, (2) = VCO_out: + * + * INPUT -> [/ M] -(1)-> [* N] -(2)-|-> [/ P] -> MPLL-P + */ +constexpr stc_clk_mpll_cfg_t get_mpll_config(double input_frequency, double target_frequency) { + // PLL input clock divider: M in [1, 24] + for (uint32_t M = 1; M <= 24; M++) { + double f_vco_in = input_frequency / M; + + // 1 <= VCO_in <= 25 MHz + if (f_vco_in < 1e6 || f_vco_in > 25e6) continue; + + // VCO multiplier: N in [20, 480] + for (uint32_t N = 20; N <= 480; N++) { + double f_vco_out = f_vco_in * N; + + // 240 <= VCO_out <= 480 MHz + if (f_vco_out < 240e6 || f_vco_out > 480e6) continue; + + // Output "P" divider: P in [2, 16] + for (uint32_t P = 2; P <= 16; P++) { + double f_calculated_out = f_vco_out / P; + if (f_calculated_out == target_frequency) { + // Found a match, return it + return { + .PllpDiv = P, + .PllqDiv = P, // Don't care for Q and R + .PllrDiv = P, // " + .plln = N, + .pllmDiv = M + }; + } + } + } + } + + // If no valid M, N, P found, return invalid config + return { 0, 0, 0, 0, 0 }; +} + +/** + * @brief Get the division factor required to get the target frequency from the input frequency. + * @tparam input_freq The input frequency. + * @tparam target_freq The target frequency. + * @return The division factor. + */ +template +constexpr en_clk_sysclk_div_factor_t get_division_factor() { + // Calculate the divider to get the target frequency + constexpr float fdivider = static_cast(input_freq) / static_cast(target_freq); + constexpr int divider = static_cast(fdivider); + + // divider must be an integer + static_assert(fdivider == divider, "Target frequency not achievable, divider must be an integer"); + + // divider must be between 1 and 64 (enum range), and must be a power of 2 + static_assert(divider >= 1 && divider <= 64, "Invalid divider, out of range"); + static_assert((divider & (divider - 1)) == 0, "Invalid divider, not a power of 2"); + + // return the divider + switch (divider) { + case 1: return ClkSysclkDiv1; + case 2: return ClkSysclkDiv2; + case 4: return ClkSysclkDiv4; + case 8: return ClkSysclkDiv8; + case 16: return ClkSysclkDiv16; + case 32: return ClkSysclkDiv32; + case 64: return ClkSysclkDiv64; + } +} + +/** + * @brief Validate the runtime clocks match the expected values. + */ +void validate_system_clocks() { + #define CLOCK_ASSERT(expected, actual) \ + if (expected != actual) { \ + SERIAL_ECHOPGM( \ + "Clock Mismatch for " #expected ": " \ + "expected ", expected, \ + ", got ", actual \ + ); \ + CORE_ASSERT_FAIL("Clock Mismatch: " #expected); \ + } + + update_system_clock_frequencies(); + + CLOCK_ASSERT(F_SYSTEM_CLOCK, SYSTEM_CLOCK_FREQUENCIES.system); + CLOCK_ASSERT(F_HCLK, SYSTEM_CLOCK_FREQUENCIES.hclk); + CLOCK_ASSERT(F_EXCLK, SYSTEM_CLOCK_FREQUENCIES.exclk); + CLOCK_ASSERT(F_PCLK0, SYSTEM_CLOCK_FREQUENCIES.pclk0); + CLOCK_ASSERT(F_PCLK1, SYSTEM_CLOCK_FREQUENCIES.pclk1); + CLOCK_ASSERT(F_PCLK2, SYSTEM_CLOCK_FREQUENCIES.pclk2); + CLOCK_ASSERT(F_PCLK3, SYSTEM_CLOCK_FREQUENCIES.pclk3); + CLOCK_ASSERT(F_PCLK4, SYSTEM_CLOCK_FREQUENCIES.pclk4); +} + +/** + * @brief Configure HC32 system clocks. + * + * This function is called by the Arduino core early in the startup process, before setup() is called. + * It is used to configure the system clocks to the desired state. + * + * See https://github.com/MarlinFirmware/Marlin/pull/27099 for more information. + */ void core_hook_sysclock_init() { // Set wait cycles, as we are about to switch to 200 MHz HCLK sysclock_configure_flash_wait_cycles(); sysclock_configure_sram_wait_cycles(); - // Configure MPLLp to 200 MHz output, with different settings depending on XTAL availability - #if BOARD_XTAL_FREQUENCY == 8000000 // 8 MHz XTAL - // - M = 1 => 8 MHz / 1 = 8 MHz - // - N = 50 => 8 MHz * 50 = 400 MHz - // - P = 2 => 400 MHz / 2 = 200 MHz (sysclk) - // - Q,R = 4 => 400 MHz / 4 = 100 MHz (dont care) - stc_clk_mpll_cfg_t pllConf = { - .PllpDiv = 2u, // P - .PllqDiv = 4u, // Q - .PllrDiv = 4u, // R - .plln = 50u, // N - .pllmDiv = 1u, // M - }; - sysclock_configure_xtal(); - sysclock_configure_mpll(ClkPllSrcXTAL, &pllConf); + // Select MPLL input frequency based on clock availability + #if BOARD_XTAL_FREQUENCY == 8000000 || BOARD_XTAL_FREQUENCY == 16000000 // 8 MHz or 16 MHz XTAL + constexpr uint32_t mpll_input_clock = BOARD_XTAL_FREQUENCY; - #elif BOARD_XTAL_FREQUENCY == 16000000 // 16 MHz XTAL - // - M = 1 => 16 MHz / 1 = 16 MHz - // - N = 50 => 16 MHz * 25 = 400 MHz - // - P = 2 => 400 MHz / 2 = 200 MHz (sysclk) - // - Q,R = 4 => 400 MHz / 4 = 100 MHz (dont care) - stc_clk_mpll_cfg_t pllConf = { - .PllpDiv = 2u, // P - .PllqDiv = 4u, // Q - .PllrDiv = 4u, // R - .plln = 50u, // N - .pllmDiv = 1u, // M - }; sysclock_configure_xtal(); - sysclock_configure_mpll(ClkPllSrcXTAL, &pllConf); - #warning "HC32F460 with 16 MHz XTAL has not been tested." + #if BOARD_XTAL_FREQUENCY == 16000000 + #warning "HC32F460 with 16 MHz XTAL has not been tested." + #endif #else // HRC (16 MHz) - // - M = 1 => 16 MHz / 1 = 16 MHz - // - N = 25 => 16 MHz * 25 = 400 MHz - // - P = 2 => 400 MHz / 2 = 200 MHz (sysclk) - // - Q,R = 4 => 400 MHz / 4 = 100 MHz (dont care) - stc_clk_mpll_cfg_t pllConf = { - .PllpDiv = 2u, // P - .PllqDiv = 4u, // Q - .PllrDiv = 4u, // R - .plln = 25u, // N - .pllmDiv = 1u, // M - }; + + constexpr uint32_t mpll_input_clock = 16000000; + sysclock_configure_hrc(); - sysclock_configure_mpll(ClkPllSrcHRC, &pllConf); // HRC could have been configured by ICG to 20 MHz // TODO: handle gracefully if HRC is not 16 MHz @@ -91,29 +171,56 @@ void core_hook_sysclock_init() { panic("HRC is not 16 MHz"); } - #ifdef BOARD_XTAL_FREQUENCY + #if defined(BOARD_XTAL_FREQUENCY) #warning "No valid XTAL frequency defined, falling back to HRC." #endif + #endif - // sysclk is now configured according to F_CPU (i.e., 200MHz PLL output) - const uint32_t sysclock = F_CPU; + // Automagically calculate MPLL configuration + constexpr stc_clk_mpll_cfg_t pllConf = get_mpll_config(mpll_input_clock, F_SYSTEM_CLOCK); + static_assert(pllConf.pllmDiv != 0 && pllConf.plln != 0 && pllConf.PllpDiv != 0, "MPLL auto-configuration failed"); + sysclock_configure_mpll(ClkPllSrcXTAL, &pllConf); - // Setup clock divisors for sysclk = 200 MHz - // Note: PCLK1 is used for step+temp timers, and need to be kept at 50 MHz (until there is a better solution) + // Setup clock divisors constexpr stc_clk_sysclk_cfg_t sysClkConf = { - .enHclkDiv = ClkSysclkDiv1, // HCLK = 200 MHz (CPU) - .enExclkDiv = ClkSysclkDiv2, // EXCLK = 100 MHz (SDIO) - .enPclk0Div = ClkSysclkDiv2, // PCLK0 = 100 MHz (Timer6 (not used)) - .enPclk1Div = ClkSysclkDiv4, // PCLK1 = 50 MHz (USART, SPI, I2S, Timer0 (step+temp), TimerA (Servo)) - .enPclk2Div = ClkSysclkDiv8, // PCLK2 = 25 MHz (ADC) - .enPclk3Div = ClkSysclkDiv8, // PCLK3 = 25 MHz (I2C, WDT) - .enPclk4Div = ClkSysclkDiv2, // PCLK4 = 100 MHz (ADC ctl) + .enHclkDiv = get_division_factor(), + .enExclkDiv = get_division_factor(), + .enPclk0Div = get_division_factor(), + .enPclk1Div = get_division_factor(), + .enPclk2Div = get_division_factor(), + .enPclk3Div = get_division_factor(), + .enPclk4Div = get_division_factor(), }; + sysclock_set_clock_dividers(&sysClkConf); + // Set power mode, before switch + power_mode_update_pre(F_SYSTEM_CLOCK); + + // Switch to MPLL-P as system clock source + CLK_SetSysClkSource(CLKSysSrcMPLL); + + // Set power mode, after switch + power_mode_update_post(F_SYSTEM_CLOCK); + + // Verify clocks match expected values (at runtime) + #if ENABLED(MARLIN_DEV_MODE) || ENABLED(ALWAYS_VALIDATE_CLOCKS) + validate_system_clocks(); + #endif + + // Verify clock configuration (at compile time) #if ARDUINO_CORE_VERSION_INT >= GET_VERSION_INT(1, 2, 0) + assert_mpll_config_valid< + mpll_input_clock, + pllConf.pllmDiv, + pllConf.plln, + pllConf.PllpDiv, + pllConf.PllqDiv, + pllConf.PllrDiv + >(); + assert_system_clocks_valid< - sysclock, + F_SYSTEM_CLOCK, sysClkConf.enHclkDiv, sysClkConf.enPclk0Div, sysClkConf.enPclk1Div, @@ -122,18 +229,14 @@ void core_hook_sysclock_init() { sysClkConf.enPclk4Div, sysClkConf.enExclkDiv >(); + + static_assert(get_mpll_output_clock( + mpll_input_clock, + pllConf.pllmDiv, + pllConf.plln, + pllConf.PllpDiv + ) == F_SYSTEM_CLOCK, "actual MPLL output clock does not match F_SYSTEM_CLOCK"); #endif - - sysclock_set_clock_dividers(&sysClkConf); - - // Set power mode - power_mode_update_pre(sysclock); - - // Switch to MPLL as sysclk source - CLK_SetSysClkSource(CLKSysSrcMPLL); - - // Set power mode - power_mode_update_post(sysclock); } #endif // ARDUINO_ARCH_HC32 diff --git a/firmware/Marlin/src/HAL/HC32/sysclock.h b/firmware/Marlin/src/HAL/HC32/sysclock.h new file mode 100644 index 0000000..783d567 --- /dev/null +++ b/firmware/Marlin/src/HAL/HC32/sysclock.h @@ -0,0 +1,65 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 + +/** + * HC32F460 system clock configuration. + * + * With the HC32 HAL, the various peripheral clocks (including the CPU clock) are derived + * from the main PLL (MPLL-P) output (referred to at F_SYSTEM_CLOCK). + * + * F_SYSTEM_CLOCK is the target frequency of the main PLL, and the PLL is automatically configured + * to achieve this frequency. + * + * The peripheral clocks are the result of integer division of F_SYSTEM_CLOCK. + * Their target frequencies are defined here, and the required division factors are calculated automatically. + * Note that the division factor must be a power of 2 between 1 and 64. + * If the target frequency is not achievable, a compile-time error will be generated. + * + * Additionally, there are interdependencies between the peripheral clocks, which are described in + * Section 4.4 "Working Clock Specifications" of the HC32F460 Reference Manual. + * With Arduino core >= 1.2.0, these interdependencies are checked at compile time. + * On earlier versions, you are on your own. + * + * For all clock frequencies, they can be checked at runtime by enabling the 'ALWAYS_VALIDATE_CLOCKS' define. + * In MARLIN_DEV_MODE, they will also be printed to the serial console by 'MarlinHAL::HAL_clock_frequencies_dump'. + * + * See https://github.com/MarlinFirmware/Marlin/pull/27099 for more information. + */ + +// Target peripheral clock frequencies, must be integer divisors of F_SYSTEM_CLOCK. +// Changing the frequency here will automagically update everything else. +#define F_HCLK 200000000UL // 200 MHz; CPU +#define F_EXCLK (F_HCLK / 2) // 100 MHz; SDIO +#define F_PCLK0 (F_HCLK / 2) // 100 MHz; Timer6 (unused) +#define F_PCLK1 (F_HCLK / 4) // 50 MHz; USART, SPI, Timer0 (step + temp), TimerA (Servo) +#define F_PCLK2 (F_HCLK / 8) // 25 MHz; ADC Sampling +#define F_PCLK3 (F_HCLK / 8) // 25 MHz; I2C, WDT +#define F_PCLK4 (F_HCLK / 2) // 100 MHz; ADC Control + +// MPLL-P clock target frequency. This must be >= the highest peripheral clock frequency. +// PLL config is automatically calculated based on this value. +#define F_SYSTEM_CLOCK F_HCLK + +// The Peripheral clocks are only checked at runtime if this is enabled OR MARLIN_DEV_MODE is enabled. +// Compile time checks are always performed with Arduino core version >= 1.2.0. +#define ALWAYS_VALIDATE_CLOCKS 1 diff --git a/firmware/Marlin/src/HAL/HC32/timers.h b/firmware/Marlin/src/HAL/HC32/timers.h index f5a590d..c0014df 100644 --- a/firmware/Marlin/src/HAL/HC32/timers.h +++ b/firmware/Marlin/src/HAL/HC32/timers.h @@ -20,6 +20,7 @@ #pragma once #include #include +#include "sysclock.h" // // Timer Types @@ -42,17 +43,15 @@ extern Timer0 step_timer; * HAL_TIMER_RATE must be known at compile time since it's used to calculate * STEPPER_TIMER_RATE, which is used in 'constexpr' calculations. * On the HC32F460 the timer rate depends on PCLK1, which is derived from the - * system clock configured at runtime. As a workaround, we use the existing - * assumption of a 200MHz clock, defining F_CPU as 200000000, then configure PCLK1 - * as F_CPU with a divider of 4 in 'sysclock.cpp::core_hook_sysclock_init'. + * system clock configured at runtime. + * Thus we use the 'F_PCLK1' constant defined in 'sysclock.h'. * - * If you face issues with this assumption, please double-check with the values - * printed by 'MarlinHAL::HAL_clock_frequencies_dump'. + * See https://github.com/MarlinFirmware/Marlin/pull/27099 for more information. * - * TODO: If the 'constexpr' requirement is ever lifted, use TIMER0_BASE_FREQUENCY instead + * NOTE: If the 'constexpr' requirement is ever lifted, TIMER0_BASE_FREQUENCY could + * be used instead. Tho this would probably not make any noticable difference. */ -#define HAL_TIMER_RATE (F_CPU / 4) // i.e., 50MHz -//#define HAL_TIMER_RATE TIMER0_BASE_FREQUENCY +#define HAL_TIMER_RATE F_PCLK1 // Temperature timer #define TEMP_TIMER_NUM (&temp_timer) diff --git a/firmware/Marlin/src/HAL/LINUX/include/pinmapping.h b/firmware/Marlin/src/HAL/LINUX/include/pinmapping.h index b766f30..9147ef8 100644 --- a/firmware/Marlin/src/HAL/LINUX/include/pinmapping.h +++ b/firmware/Marlin/src/HAL/LINUX/include/pinmapping.h @@ -37,29 +37,29 @@ constexpr uint8_t NUM_ANALOG_INPUTS = 16; constexpr uint8_t analog_offset = NUM_DIGITAL_PINS - NUM_ANALOG_INPUTS; // Get the digital pin for an analog index -constexpr pin_t analogInputToDigitalPin(const int8_t p) { - return (WITHIN(p, 0, NUM_ANALOG_INPUTS) ? analog_offset + p : P_NC); +constexpr pin_t analogInputToDigitalPin(const int8_t a) { + return (WITHIN(a, 0, NUM_ANALOG_INPUTS - 1) ? analog_offset + a : P_NC); } // Get the analog index for a digital pin -constexpr int8_t digitalPinToAnalogIndex(const pin_t p) { - return (WITHIN(p, analog_offset, NUM_DIGITAL_PINS) ? p - analog_offset : P_NC); +constexpr int8_t digitalPinToAnalogIndex(const pin_t pin) { + return (WITHIN(pin, analog_offset, NUM_DIGITAL_PINS - 1) ? pin - analog_offset : P_NC); } // Return the index of a pin number constexpr int16_t GET_PIN_MAP_INDEX(const pin_t pin) { return pin; } // Test whether the pin is valid -constexpr bool isValidPin(const pin_t p) { return WITHIN(p, 0, NUM_DIGITAL_PINS); } +constexpr bool isValidPin(const pin_t pin) { return WITHIN(pin, 0, NUM_DIGITAL_PINS - 1); } // Test whether the pin is PWM -constexpr bool PWM_PIN(const pin_t p) { return false; } +constexpr bool PWM_PIN(const pin_t) { return false; } // Test whether the pin is interruptible -constexpr bool INTERRUPT_PIN(const pin_t p) { return false; } +constexpr bool INTERRUPT_PIN(const pin_t) { return false; } // Get the pin number at the given index -constexpr pin_t GET_PIN_MAP_PIN(const int16_t ind) { return ind; } +constexpr pin_t GET_PIN_MAP_PIN(const int16_t index) { return pin_t(index); } // Parse a G-code word into a pin index int16_t PARSED_PIN_INDEX(const char code, const int16_t dval); diff --git a/firmware/Marlin/src/HAL/LINUX/pinsDebug.h b/firmware/Marlin/src/HAL/LINUX/pinsDebug.h index 59290df..aacb626 100644 --- a/firmware/Marlin/src/HAL/LINUX/pinsDebug.h +++ b/firmware/Marlin/src/HAL/LINUX/pinsDebug.h @@ -19,26 +19,46 @@ * along with this program. If not, see . * */ +#pragma once /** - * Support routines for X86_64 - */ - -/** - * Translation of routines & variables used by pinsDebug.h + * Pins Debugging for Linux Native + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) */ #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS -#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0 ? 1 : 0) -#define digitalRead_mod(p) digitalRead(p) -#define getPinByIndex(p) pin_array[p].pin -#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) -#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) -#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin +#define getPinByIndex(x) pin_array[x].pin + +#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) + // active ADC function/mode/code values for PINSEL registers -constexpr int8_t ADC_pin_mode(pin_t pin) { return -1; } +constexpr int8_t ADC_pin_mode(const pin_t) { return -1; } + +// The pin and index are the same on this platform +bool getPinIsDigitalByIndex(const pin_t pin) { + return (!isAnalogPin(pin) || get_pin_mode(pin) != ADC_pin_mode(pin)); +} + +#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0) + +#define digitalRead_mod(P) digitalRead(P) int8_t get_pin_mode(const pin_t pin) { return isValidPin(pin) ? 0 : -1; } @@ -50,11 +70,11 @@ bool getValidPinMode(const pin_t pin) { return (Gpio::getMode(pin) != 0); // Input/output state } -bool getPinIsDigitalByIndex(const pin_t pin) { - return (!isAnalogPin(pin) || get_pin_mode(pin) != ADC_pin_mode(pin)); -} - -void printPinPWM(const pin_t pin) {} +void printPinPWM(const pin_t) {} bool pwm_status(const pin_t) { return false; } void printPinPort(const pin_t) {} + +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0) + +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) diff --git a/firmware/Marlin/src/HAL/LPC1768/HAL.h b/firmware/Marlin/src/HAL/LPC1768/HAL.h index 55fffa9..6e0c9cf 100644 --- a/firmware/Marlin/src/HAL/LPC1768/HAL.h +++ b/firmware/Marlin/src/HAL/LPC1768/HAL.h @@ -82,13 +82,13 @@ extern DefaultSerial1 USBSerial; #endif #endif -#ifdef MMU2_SERIAL_PORT - #if MMU2_SERIAL_PORT == -1 - #define MMU2_SERIAL USBSerial - #elif WITHIN(MMU2_SERIAL_PORT, 0, 3) - #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) +#ifdef MMU_SERIAL_PORT + #if MMU_SERIAL_PORT == -1 + #define MMU_SERIAL USBSerial + #elif WITHIN(MMU_SERIAL_PORT, 0, 3) + #define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT) #else - #error "MMU2_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." + #error "MMU_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." #endif #endif diff --git a/firmware/Marlin/src/HAL/LPC1768/pinsDebug.h b/firmware/Marlin/src/HAL/LPC1768/pinsDebug.h index a520874..5baeadd 100644 --- a/firmware/Marlin/src/HAL/LPC1768/pinsDebug.h +++ b/firmware/Marlin/src/HAL/LPC1768/pinsDebug.h @@ -19,22 +19,35 @@ * along with this program. If not, see . * */ +#pragma once /** - * Support routines for LPC1768 - */ - -/** - * Translation of routines & variables used by pinsDebug.h + * Pins Debugging for LPC1768/9 + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) */ #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS -#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0 ? 1 : 0) -#define digitalRead_mod(p) extDigitalRead(p) -#define getPinByIndex(p) pin_array[p].pin +#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0) +#define digitalRead_mod(P) extDigitalRead(P) +#define getPinByIndex(x) pin_array[x].pin #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) -#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0) -#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(pin)); SERIAL_ECHO(buffer); }while(0) +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(P), LPC176x::pin_bit(P)); SERIAL_ECHO(buffer); }while(0) +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(P)); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 17 // space needed to be pretty if not first name assigned to a pin // pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities diff --git a/firmware/Marlin/src/HAL/LPC1768/upload_extra_script.py b/firmware/Marlin/src/HAL/LPC1768/upload_extra_script.py old mode 100755 new mode 100644 index b788a2b..ce241c4 --- a/firmware/Marlin/src/HAL/LPC1768/upload_extra_script.py +++ b/firmware/Marlin/src/HAL/LPC1768/upload_extra_script.py @@ -37,7 +37,7 @@ if pioutil.is_pio_build(): # # platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:' # Windows - doesn't care about the disk's name, only cares about the drive letter - import subprocess,string + import subprocess, string from ctypes import windll from pathlib import PureWindowsPath diff --git a/firmware/Marlin/src/HAL/NATIVE_SIM/HAL.h b/firmware/Marlin/src/HAL/NATIVE_SIM/HAL.h index f57e065..020299f 100644 --- a/firmware/Marlin/src/HAL/NATIVE_SIM/HAL.h +++ b/firmware/Marlin/src/HAL/NATIVE_SIM/HAL.h @@ -87,11 +87,11 @@ extern MSerialT serial_stream_3; #endif #endif -#ifdef MMU2_SERIAL_PORT - #if WITHIN(MMU2_SERIAL_PORT, 0, 3) - #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) +#ifdef MMU_SERIAL_PORT + #if WITHIN(MMU_SERIAL_PORT, 0, 3) + #define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT) #else - #error "MMU2_SERIAL_PORT must be from 0 to 3. Please update your configuration." + #error "MMU_SERIAL_PORT must be from 0 to 3. Please update your configuration." #endif #endif diff --git a/firmware/Marlin/src/HAL/NATIVE_SIM/pinsDebug.cpp b/firmware/Marlin/src/HAL/NATIVE_SIM/pinsDebug.cpp index 6c74821..1354c79 100644 --- a/firmware/Marlin/src/HAL/NATIVE_SIM/pinsDebug.cpp +++ b/firmware/Marlin/src/HAL/NATIVE_SIM/pinsDebug.cpp @@ -25,7 +25,7 @@ #include "../../inc/MarlinConfig.h" #include "pinsDebug.h" -int8_t ADC_pin_mode(pin_t pin) { return -1; } +int8_t ADC_pin_mode(const pin_t) { return -1; } int8_t get_pin_mode(const pin_t pin) { return isValidPin(pin) ? 0 : -1; } @@ -37,6 +37,7 @@ bool getValidPinMode(const pin_t pin) { return (Gpio::getMode(pin) != 0); // Input/output state } +// The pin and index are the same on this platform bool getPinIsDigitalByIndex(const pin_t pin) { return !isAnalogPin(pin) || get_pin_mode(pin) != ADC_pin_mode(pin); } diff --git a/firmware/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h b/firmware/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h index 8fea576..752802d 100644 --- a/firmware/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h +++ b/firmware/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h @@ -19,30 +19,43 @@ * along with this program. If not, see . * */ - -/** - * Support routines for X86_64 - */ #pragma once /** - * Translation of routines & variables used by pinsDebug.h + * Pins Debugging for x86_64 + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) */ #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS -#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0 ? 1 : 0) -#define digitalRead_mod(p) digitalRead(p) -#define getPinByIndex(p) pin_array[p].pin +#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL)) +#define isAnalogPin(P) (digitalPinToAnalogIndex(P) >= 0) +#define digitalRead_mod(P) digitalRead(P) +#define getPinByIndex(x) pin_array[x].pin #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) -#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) -#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0) +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0) +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin // Active ADC function/mode/code values for PINSEL registers -int8_t ADC_pin_mode(pin_t pin); -int8_t get_pin_mode(const pin_t pin); -bool getValidPinMode(const pin_t pin); -bool getPinIsDigitalByIndex(const pin_t pin); +int8_t ADC_pin_mode(const pin_t); +int8_t get_pin_mode(const pin_t); +bool getValidPinMode(const pin_t); +bool getPinIsDigitalByIndex(const pin_t); void printPinPort(const pin_t); void printPinPWM(const pin_t); bool pwm_status(const pin_t); diff --git a/firmware/Marlin/src/HAL/RP2040/HAL.cpp b/firmware/Marlin/src/HAL/RP2040/HAL.cpp new file mode 100644 index 0000000..d1af25a --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/HAL.cpp @@ -0,0 +1,188 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#include "../platforms.h" + +#ifdef __PLAT_RP2040__ + +#include "HAL.h" +//#include "usb_serial.h" + +#include "../../inc/MarlinConfig.h" +#include "../shared/Delay.h" + +extern "C" { + #include "pico/bootrom.h" + #include "hardware/watchdog.h" +} + +#if HAS_SD_HOST_DRIVE + #include "msc_sd.h" + #include "usbd_cdc_if.h" +#endif + +// ------------------------ +// Public Variables +// ------------------------ + +volatile uint16_t adc_result; + +// ------------------------ +// Public functions +// ------------------------ + +TERN_(POSTMORTEM_DEBUGGING, extern void install_min_serial()); + +// HAL initialization task +void MarlinHAL::init() { + // Ensure F_CPU is a constant expression. + // If the compiler breaks here, it means that delay code that should compute at compile time will not work. + // So better safe than sorry here. + constexpr int cpuFreq = F_CPU; + UNUSED(cpuFreq); + + #undef SDSS + #define SDSS 2 + #define PIN_EXISTS_(P1,P2) (defined(P1##P2) && P1##P2 >= 0) + #if HAS_MEDIA && DISABLED(SDIO_SUPPORT) && PIN_EXISTS_(SDSS,) + OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up + #endif + + #if PIN_EXISTS(LED) + OUT_WRITE(LED_PIN, LOW); + #endif + + #if ENABLED(SRAM_EEPROM_EMULATION) + // __HAL_RCC_PWR_CLK_ENABLE(); + // HAL_PWR_EnableBkUpAccess(); // Enable access to backup SRAM + // __HAL_RCC_BKPSRAM_CLK_ENABLE(); + // LL_PWR_EnableBkUpRegulator(); // Enable backup regulator + // while (!LL_PWR_IsActiveFlag_BRR()); // Wait until backup regulator is initialized + #endif + + HAL_timer_init(); + + #if ENABLED(EMERGENCY_PARSER) && USBD_USE_CDC + USB_Hook_init(); + #endif + + TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler + + TERN_(HAS_SD_HOST_DRIVE, MSC_SD_init()); // Enable USB SD card access + + #if PIN_EXISTS(USB_CONNECT) + OUT_WRITE(USB_CONNECT_PIN, !USB_CONNECT_INVERTING); // USB clear connection + delay_ms(1000); // Give OS time to notice + WRITE(USB_CONNECT_PIN, USB_CONNECT_INVERTING); + #endif +} + +uint8_t MarlinHAL::get_reset_source() { + return watchdog_enable_caused_reboot() ? RST_WATCHDOG : 0; +} + +void MarlinHAL::reboot() { watchdog_reboot(0, 0, 1); } + +// ------------------------ +// Watchdog Timer +// ------------------------ + +#if ENABLED(USE_WATCHDOG) + + #define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout + + extern "C" { + #include "hardware/watchdog.h" + } + + void MarlinHAL::watchdog_init() { + #if DISABLED(DISABLE_WATCHDOG_INIT) + static_assert(WDT_TIMEOUT_US > 1000, "WDT Timout is too small, aborting"); + watchdog_enable(WDT_TIMEOUT_US/1000, true); + #endif + } + + void MarlinHAL::watchdog_refresh() { + watchdog_update(); + #if DISABLED(PINS_DEBUGGING) && PIN_EXISTS(LED) + TOGGLE(LED_PIN); // heartbeat indicator + #endif + } + +#endif + +// ------------------------ +// ADC +// ------------------------ + +volatile bool MarlinHAL::adc_has_result = false; + +void MarlinHAL::adc_init() { + analogReadResolution(HAL_ADC_RESOLUTION); + ::adc_init(); + adc_fifo_setup(true, false, 1, false, false); + irq_set_exclusive_handler(ADC_IRQ_FIFO, adc_exclusive_handler); + irq_set_enabled(ADC_IRQ_FIFO, true); + adc_irq_set_enabled(true); +} + +void MarlinHAL::adc_enable(const pin_t pin) { + if (pin >= A0 && pin <= A3) + adc_gpio_init(pin); + else if (pin == HAL_ADC_MCU_TEMP_DUMMY_PIN) + adc_set_temp_sensor_enabled(true); +} + +void MarlinHAL::adc_start(const pin_t pin) { + adc_has_result = false; + // Select an ADC input. 0...3 are GPIOs 26...29 respectively. + adc_select_input(pin == HAL_ADC_MCU_TEMP_DUMMY_PIN ? 4 : pin - A0); + adc_run(true); +} + +void MarlinHAL::adc_exclusive_handler() { + adc_run(false); // Disable since we only want one result + irq_clear(ADC_IRQ_FIFO); // Clear the IRQ + + if (adc_fifo_get_level() >= 1) { + adc_result = adc_fifo_get(); // Pop the result + adc_fifo_drain(); + adc_has_result = true; // Signal the end of the conversion + } +} + +uint16_t MarlinHAL::adc_value() { return adc_result; } + +// Reset the system to initiate a firmware flash +void flashFirmware(const int16_t) { hal.reboot(); } + +extern "C" { + void * _sbrk(int incr); + extern unsigned int __bss_end__; // end of bss section +} + +// Return free memory between end of heap (or end bss) and whatever is current +int freeMemory() { + int free_memory, heap_end = (int)_sbrk(0); + return (int)&free_memory - (heap_end ?: (int)&__bss_end__); +} + +#endif // __PLAT_RP2040__ diff --git a/firmware/Marlin/src/HAL/RP2040/HAL.h b/firmware/Marlin/src/HAL/RP2040/HAL.h new file mode 100644 index 0000000..fa1a356 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/HAL.h @@ -0,0 +1,250 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 + +#define CPU_32_BIT + +#ifndef F_CPU + #define F_CPU (XOSC_MHZ * 1000000UL) +#endif + +#include "arduino_extras.h" +#include "../../core/macros.h" +#include "../shared/Marduino.h" +#include "../shared/math_32bit.h" +#include "../shared/HAL_SPI.h" +#include "fastio.h" +//#include "Servo.h" +#include "watchdog.h" +#include "MarlinSerial.h" + +#include "../../inc/MarlinConfigPre.h" + +#include + +// ------------------------ +// Serial ports +// ------------------------ + +#include "../../core/serial_hook.h" +typedef ForwardSerial1Class< decltype(Serial) > DefaultSerial1; +extern DefaultSerial1 MSerial0; + +#define _MSERIAL(X) MSerial##X +#define MSERIAL(X) _MSERIAL(X) + +#if SERIAL_PORT == -1 + #define MYSERIAL1 MSerial0 +#elif WITHIN(SERIAL_PORT, 0, 6) + #define MYSERIAL1 MSERIAL(SERIAL_PORT) +#else + #error "SERIAL_PORT must be from 0 to 6. You can also use -1 if the board supports Native USB." +#endif + +#ifdef SERIAL_PORT_2 + #if SERIAL_PORT_2 == -1 + #define MYSERIAL2 MSerial0 + #elif WITHIN(SERIAL_PORT_2, 0, 6) + #define MYSERIAL2 MSERIAL(SERIAL_PORT_2) + #else + #error "SERIAL_PORT_2 must be from 0 to 6. You can also use -1 if the board supports Native USB." + #endif +#endif + +#ifdef SERIAL_PORT_3 + #if SERIAL_PORT_3 == -1 + #define MYSERIAL3 MSerial0 + #elif WITHIN(SERIAL_PORT_3, 0, 6) + #define MYSERIAL3 MSERIAL(SERIAL_PORT_3) + #else + #error "SERIAL_PORT_3 must be from 0 to 6. You can also use -1 if the board supports Native USB." + #endif +#endif + +#ifdef MMU2_SERIAL_PORT + #if MMU2_SERIAL_PORT == -1 + #define MMU2_SERIAL MSerial0 + #elif WITHIN(MMU2_SERIAL_PORT, 0, 6) + #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) + #else + #error "MMU2_SERIAL_PORT must be from 0 to 6. You can also use -1 if the board supports Native USB." + #endif +#endif + +#ifdef LCD_SERIAL_PORT + #if LCD_SERIAL_PORT == -1 + #define LCD_SERIAL MSerial0 + #elif WITHIN(LCD_SERIAL_PORT, 0, 6) + #define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT) + #else + #error "LCD_SERIAL_PORT must be from 0 to 6. You can also use -1 if the board supports Native USB." + #endif + #if HAS_DGUS_LCD + #define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite() + #endif +#endif + +// ------------------------ +// Defines +// ------------------------ + +/** + * TODO: review this to return 1 for pins that are not analog input + */ +#ifndef analogInputToDigitalPin + #define analogInputToDigitalPin(p) (p) +#endif + +#define CRITICAL_SECTION_START() uint32_t primask = __get_PRIMASK(); __disable_irq() +#define CRITICAL_SECTION_END() if (!primask) __enable_irq() +#define cli() __disable_irq() +#define sei() __enable_irq() + +// ------------------------ +// Types +// ------------------------ + +template struct IFPIN { typedef R type; }; +template struct IFPIN { typedef L type; }; +typedef IFPIN::type pin_t; + +class libServo; +typedef libServo hal_servo_t; +#define PAUSE_SERVO_OUTPUT() libServo::pause_all_servos() +#define RESUME_SERVO_OUTPUT() libServo::resume_all_servos() + +// ------------------------ +// ADC +// ------------------------ + +#define HAL_ADC_VREF 3.3 +#ifdef ADC_RESOLUTION + #define HAL_ADC_RESOLUTION ADC_RESOLUTION +#else + #define HAL_ADC_RESOLUTION 12 +#endif +// ADC index 4 is the MCU temperature +#define HAL_ADC_MCU_TEMP_DUMMY_PIN 127 + +// +// Pin Mapping for M42, M43, M226 +// +#define GET_PIN_MAP_PIN(index) index +#define GET_PIN_MAP_INDEX(pin) pin +#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval) + +#ifndef PLATFORM_M997_SUPPORT + #define PLATFORM_M997_SUPPORT +#endif +void flashFirmware(const int16_t); + +// Maple Compatibility +typedef void (*systickCallback_t)(void); +void systick_attach_callback(systickCallback_t cb); +void HAL_SYSTICK_Callback(); + +extern volatile uint32_t systick_uptime_millis; + +#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment +#define PWM_FREQUENCY 1000 // Default PWM frequency when set_pwm_duty() is called without set_pwm_frequency() + +// ------------------------ +// Class Utilities +// ------------------------ + +int freeMemory(); + +// ------------------------ +// MarlinHAL Class +// ------------------------ + +class MarlinHAL { +public: + + // Earliest possible init, before setup() + MarlinHAL() {} + + // Watchdog + static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {}); + static void watchdog_refresh() IF_DISABLED(USE_WATCHDOG, {}); + + static void init(); // Called early in setup() + static void init_board() {} // Called less early in setup() + static void reboot(); // Restart the firmware from 0x0 + + // Interrupts + static bool isr_state() { return !__get_PRIMASK(); } + static void isr_on() { __enable_irq(); } + static void isr_off() { __disable_irq(); } + + static void delay_ms(const int ms) { ::delay(ms); } + + // Tasks, called from idle() + static void idletask() {} + + // Reset + static uint8_t get_reset_source(); + static void clear_reset_source() {} + + // Free SRAM + static int freeMemory() { return ::freeMemory(); } + + // + // ADC Methods + // + + // Called by Temperature::init once at startup + static void adc_init(); + + // Called by Temperature::init for each sensor at startup + static void adc_enable(const pin_t pin); + + // Begin ADC sampling on the given pin. Called from Temperature::isr! + static void adc_start(const pin_t pin); + + // This ADC runs a periodic task + static void adc_exclusive_handler(); + + // Is the ADC ready for reading? + static volatile bool adc_has_result; + static bool adc_ready() { return adc_has_result; } + + // The current value of the ADC register + static uint16_t adc_value(); + + /** + * Set the PWM duty cycle for the pin to the given value. + * Optionally invert the duty cycle [default = false] + * Optionally change the scale of the provided value to enable finer PWM duty control [default = 255] + */ + static void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size=255, const bool invert=false); + + /** + * Set the frequency of the timer for the given pin as close as + * possible to the provided desired frequency. Internally calculate + * the required waveform generation mode, prescaler, and resolution + * values and set timer registers accordingly. + * NOTE that the frequency is applied to all pins on the timer (Ex OC3A, OC3B and OC3B) + * NOTE that there are limitations, particularly if using TIMER2. (see Configuration_adv.h -> FAST_PWM_FAN Settings) + */ + static void set_pwm_frequency(const pin_t pin, const uint16_t f_desired); +}; diff --git a/firmware/Marlin/src/HAL/RP2040/HAL_MinSerial.cpp b/firmware/Marlin/src/HAL/RP2040/HAL_MinSerial.cpp new file mode 100644 index 0000000..5a65163 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/HAL_MinSerial.cpp @@ -0,0 +1,69 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#include "../platforms.h" + +#ifdef __PLAT_RP2040__ + +#include "../../inc/MarlinConfigPre.h" + +#if ENABLED(POSTMORTEM_DEBUGGING) + +#include "../shared/HAL_MinSerial.h" + + +static void TXBegin() { + #if !WITHIN(SERIAL_PORT, -1, 2) + #warning "Using POSTMORTEM_DEBUGGING requires a physical U(S)ART hardware in case of severe error." + #warning "Disabling the severe error reporting feature currently because the used serial port is not a HW port." + #else + #if SERIAL_PORT == -1 + USBSerial.begin(BAUDRATE); + #elif SERIAL_PORT == 0 + USBSerial.begin(BAUDRATE); + #elif SERIAL_PORT == 1 + Serial1.begin(BAUDRATE); + #endif + #endif +} + +static void TX(char b){ + #if SERIAL_PORT == -1 + USBSerial + #elif SERIAL_PORT == 0 + USBSerial + #elif SERIAL_PORT == 1 + Serial1 + #endif + .write(b); +} + +// A SW memory barrier, to ensure GCC does not overoptimize loops +#define sw_barrier() __asm__ volatile("": : :"memory"); + + +void install_min_serial() { + HAL_min_serial_init = &TXBegin; + HAL_min_serial_out = &TX; +} + +#endif // POSTMORTEM_DEBUGGING +#endif // __PLAT_RP2040__ diff --git a/firmware/Marlin/src/HAL/RP2040/HAL_SPI.cpp b/firmware/Marlin/src/HAL/RP2040/HAL_SPI.cpp new file mode 100644 index 0000000..c88b6d1 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/HAL_SPI.cpp @@ -0,0 +1,228 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#include "../platforms.h" + +#ifdef __PLAT_RP2040__ + +#include "../../inc/MarlinConfig.h" + +#include + +// ------------------------ +// Public Variables +// ------------------------ + +static SPISettings spiConfig; + +// ------------------------ +// Public functions +// ------------------------ + +#if ENABLED(SOFTWARE_SPI) + + // ------------------------ + // Software SPI + // ------------------------ + + #include "../shared/Delay.h" + + void spiBegin(void) { + OUT_WRITE(SD_SS_PIN, HIGH); + OUT_WRITE(SD_SCK_PIN, HIGH); + SET_INPUT(SD_MISO_PIN); + OUT_WRITE(SD_MOSI_PIN, HIGH); + } + + // Use function with compile-time value so we can actually reach the desired frequency + // Need to adjust this a little bit: on a 72MHz clock, we have 14ns/clock + // and we'll use ~3 cycles to jump to the method and going back, so it'll take ~40ns from the given clock here + #define CALLING_COST_NS (3U * 1000000000U) / (F_CPU) + void (*delaySPIFunc)(); + void delaySPI_125() { DELAY_NS(125 - CALLING_COST_NS); } + void delaySPI_250() { DELAY_NS(250 - CALLING_COST_NS); } + void delaySPI_500() { DELAY_NS(500 - CALLING_COST_NS); } + void delaySPI_1000() { DELAY_NS(1000 - CALLING_COST_NS); } + void delaySPI_2000() { DELAY_NS(2000 - CALLING_COST_NS); } + void delaySPI_4000() { DELAY_NS(4000 - CALLING_COST_NS); } + + void spiInit(uint8_t spiRate) { + // Use datarates Marlin uses + switch (spiRate) { + case SPI_FULL_SPEED: delaySPIFunc = &delaySPI_125; break; // desired: 8,000,000 actual: ~1.1M + case SPI_HALF_SPEED: delaySPIFunc = &delaySPI_125; break; // desired: 4,000,000 actual: ~1.1M + case SPI_QUARTER_SPEED:delaySPIFunc = &delaySPI_250; break; // desired: 2,000,000 actual: ~890K + case SPI_EIGHTH_SPEED: delaySPIFunc = &delaySPI_500; break; // desired: 1,000,000 actual: ~590K + case SPI_SPEED_5: delaySPIFunc = &delaySPI_1000; break; // desired: 500,000 actual: ~360K + 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 + void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) { /* do nothing */ } + + uint8_t HAL_SPI_RP2040_SpiTransfer_Mode_3(uint8_t b) { // using Mode 3 + for (uint8_t bits = 8; bits--;) { + WRITE(SD_SCK_PIN, LOW); + WRITE(SD_MOSI_PIN, b & 0x80); + + delaySPIFunc(); + WRITE(SD_SCK_PIN, HIGH); + delaySPIFunc(); + + b <<= 1; // little setup time + b |= (READ(SD_MISO_PIN) != 0); + } + DELAY_NS(125); + return b; + } + + // Soft SPI receive byte + uint8_t spiRec() { + hal.isr_off(); // No interrupts during byte receive + const uint8_t data = HAL_SPI_RP2040_SpiTransfer_Mode_3(0xFF); + hal.isr_on(); // Enable interrupts + return data; + } + + // Soft SPI read data + void spiRead(uint8_t *buf, uint16_t nbyte) { + for (uint16_t i = 0; i < nbyte; i++) + buf[i] = spiRec(); + } + + // Soft SPI send byte + void spiSend(uint8_t data) { + hal.isr_off(); // No interrupts during byte send + HAL_SPI_RP2040_SpiTransfer_Mode_3(data); // Don't care what is received + hal.isr_on(); // Enable interrupts + } + + // Soft SPI send block + void spiSendBlock(uint8_t token, const uint8_t *buf) { + spiSend(token); + for (uint16_t i = 0; i < 512; i++) + spiSend(buf[i]); + } + +#else + + // ------------------------ + // Hardware SPI + // ------------------------ + + /** + * VGPV SPI speed start and PCLK2/2, by default 108/2 = 54Mhz + */ + + /** + * @brief Begin SPI port setup + * + * @return Nothing + * + * @details Only configures SS pin since stm32duino creates and initialize the SPI object + */ + void spiBegin() { + #if PIN_EXISTS(SD_SS) + OUT_WRITE(SD_SS_PIN, HIGH); + #endif + } + + // Configure SPI for specified SPI speed + void spiInit(uint8_t spiRate) { + // Use datarates Marlin uses + uint32_t clock; + switch (spiRate) { + case SPI_FULL_SPEED: clock = 20000000; break; // 13.9mhz=20000000 6.75mhz=10000000 3.38mhz=5000000 .833mhz=1000000 + case SPI_HALF_SPEED: clock = 5000000; break; + case SPI_QUARTER_SPEED: clock = 2500000; break; + case SPI_EIGHTH_SPEED: clock = 1250000; break; + case SPI_SPEED_5: clock = 625000; break; + case SPI_SPEED_6: clock = 300000; break; + default: + clock = 4000000; // Default from the SPI library + } + spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0); + + //SPI.setMISO(SD_MISO_PIN); //todo: implement? bad interface + //SPI.setMOSI(SD_MOSI_PIN); + //SPI.setSCLK(SD_SCK_PIN); + + SPI.begin(); + } + + /** + * @brief Receives a single byte from the SPI port. + * + * @return Byte received + * + * @details + */ + uint8_t spiRec() { + uint8_t returnByte = SPI.transfer(0xFF); + return returnByte; + } + + /** + * @brief Receive a number of bytes from the SPI port to a buffer + * + * @param buf Pointer to starting address of buffer to write to. + * @param nbyte Number of bytes to receive. + * @return Nothing + * + * @details Uses DMA + */ + void spiRead(uint8_t *buf, uint16_t nbyte) { + if (nbyte == 0) return; + memset(buf, 0xFF, nbyte); + SPI.transfer(buf, nbyte); + } + + /** + * @brief Send a single byte on SPI port + * + * @param b Byte to send + * + * @details + */ + void spiSend(uint8_t b) { + SPI.transfer(b); + } + + /** + * @brief Write token and then write from 512 byte buffer to SPI (for SD card) + * + * @param buf Pointer with buffer start address + * @return Nothing + * + * @details Use DMA + */ + void spiSendBlock(uint8_t token, const uint8_t *buf) { + //uint8_t rxBuf[512]; + //SPI.transfer(token); + SPI.transfer((uint8_t*)buf, 512); //implement? bad interface + } + +#endif // SOFTWARE_SPI + +#endif // __PLAT_RP2040__ diff --git a/firmware/Marlin/src/HAL/RP2040/MarlinSerial.cpp b/firmware/Marlin/src/HAL/RP2040/MarlinSerial.cpp new file mode 100644 index 0000000..dd01edd --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/MarlinSerial.cpp @@ -0,0 +1,39 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#include "../platforms.h" + +#ifdef __PLAT_RP2040__ + +#include "../../inc/MarlinConfig.h" +#include "MarlinSerial.h" + +#if ENABLED(EMERGENCY_PARSER) + #include "../../feature/e_parser.h" +#endif + +#define _IMPLEMENT_SERIAL(X) DefaultSerial##X MSerial##X(false, Serial##X) +#define IMPLEMENT_SERIAL(X) _IMPLEMENT_SERIAL(X) +#if WITHIN(SERIAL_PORT, 0, 3) + IMPLEMENT_SERIAL(SERIAL_PORT); +#endif + +#endif // __PLAT_RP2040__ diff --git a/firmware/Marlin/src/HAL/RP2040/MarlinSerial.h b/firmware/Marlin/src/HAL/RP2040/MarlinSerial.h new file mode 100644 index 0000000..c5924c9 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/MarlinSerial.h @@ -0,0 +1,52 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 "../../inc/MarlinConfigPre.h" + +#if ENABLED(EMERGENCY_PARSER) + #include "../../feature/e_parser.h" +#endif + +#include "../../core/serial_hook.h" + +#define Serial0 Serial +#define _DECLARE_SERIAL(X) \ + typedef ForwardSerial1Class DefaultSerial##X; \ + extern DefaultSerial##X MSerial##X +#define DECLARE_SERIAL(X) _DECLARE_SERIAL(X) + +typedef ForwardSerial1Class USBSerialType; +extern USBSerialType USBSerial; + +#define _MSERIAL(X) MSerial##X +#define MSERIAL(X) _MSERIAL(X) + +#if SERIAL_PORT == -1 + // #define MYSERIAL1 USBSerial this is already done in the HAL +#elif WITHIN(SERIAL_PORT, 0, 3) + #define MYSERIAL1 MSERIAL(SERIAL_PORT) + DECLARE_SERIAL(SERIAL_PORT); +#else + #error "SERIAL_PORT must be from 0 to 3, or -1 for Native USB." +#endif + diff --git a/firmware/Marlin/src/HAL/RP2040/README.md b/firmware/Marlin/src/HAL/RP2040/README.md new file mode 100644 index 0000000..4f9f70b --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/README.md @@ -0,0 +1 @@ +# RP2040 Hardware Interface diff --git a/firmware/Marlin/src/HAL/RP2040/Servo.cpp b/firmware/Marlin/src/HAL/RP2040/Servo.cpp new file mode 100644 index 0000000..2b1b2a1 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/Servo.cpp @@ -0,0 +1,93 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#include "../platforms.h" + +#ifdef __PLAT_RP2040__ + +#include "../../inc/MarlinConfig.h" + +#if HAS_SERVOS + +#include "Servo.h" + +static uint_fast8_t servoCount = 0; +static libServo *servos[NUM_SERVOS] = {0}; +constexpr millis_t servoDelay[] = SERVO_DELAY; +static_assert(COUNT(servoDelay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long."); + +libServo::libServo() +: delay(servoDelay[servoCount]), + was_attached_before_pause(false), + value_before_pause(0) +{ + servos[servoCount++] = this; +} + +int8_t libServo::attach(const int pin) { + if (servoCount >= MAX_SERVOS) return -1; + if (pin > 0) servo_pin = pin; + auto result = pico_servo.attach(servo_pin); + return result; +} + +int8_t libServo::attach(const int pin, const int min, const int max) { + if (servoCount >= MAX_SERVOS) return -1; + if (pin > 0) servo_pin = pin; + auto result = pico_servo.attach(servo_pin, min, max); + return result; +} + +void libServo::move(const int value) { + if (attach(0) >= 0) { + pico_servo.write(value); + safe_delay(delay); + TERN_(DEACTIVATE_SERVOS_AFTER_MOVE, detach()); + } +} + +void libServo::pause() { + was_attached_before_pause = pico_servo.attached(); + if (was_attached_before_pause) { + value_before_pause = pico_servo.read(); + pico_servo.detach(); + } +} + +void libServo::resume() { + if (was_attached_before_pause) { + attach(); + move(value_before_pause); + } +} + +void libServo::pause_all_servos() { + for (auto& servo : servos) + if (servo) servo->pause(); +} + +void libServo::resume_all_servos() { + for (auto& servo : servos) + if (servo) servo->resume(); +} + +#endif // HAS_SERVOS +#endif // __PLAT_RP2040__ diff --git a/firmware/Marlin/src/HAL/RP2040/Servo.h b/firmware/Marlin/src/HAL/RP2040/Servo.h new file mode 100644 index 0000000..031610f --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/Servo.h @@ -0,0 +1,77 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 + +#if 1 + +#include "../../core/millis_t.h" + +// Inherit and expand on the official library +class libServo { + public: + libServo(); + int8_t attach(const int pin = 0); // pin == 0 uses value from previous call + int8_t attach(const int pin, const int min, const int max); + void detach() { pico_servo.detach(); } + int read() { return pico_servo.read(); } + void move(const int value); + + void pause(); + void resume(); + + static void pause_all_servos(); + static void resume_all_servos(); + static void setInterruptPriority(uint32_t preemptPriority, uint32_t subPriority); + + private: + Servo pico_servo; + + int servo_pin = 0; + millis_t delay = 0; + + bool was_attached_before_pause; + int value_before_pause; +}; + +#else + +class libServo: public Servo { + public: + void move(const int value) { + constexpr uint16_t servo_delay[] = SERVO_DELAY; + static_assert(COUNT(servo_delay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM_SERVOS long."); + + if (attach(servo_info[servoIndex].Pin.nbr) >= 0) { // try to reattach + write(value); + safe_delay(servo_delay[servoIndex]); // delay to allow servo to reach position + TERN_(DEACTIVATE_SERVOS_AFTER_MOVE, detach()); + } + + } +}; + +class libServo; +typedef libServo hal_servo_t; + +#endif diff --git a/firmware/Marlin/src/HAL/RP2040/arduino_extras.cpp b/firmware/Marlin/src/HAL/RP2040/arduino_extras.cpp new file mode 100644 index 0000000..cdc0a0a --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/arduino_extras.cpp @@ -0,0 +1,33 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#ifdef __PLAT_RP2040__ + +#include + +char *dtostrf(double __val, signed char __width, unsigned char __prec, char *__s) { + char format_string[20]; + snprintf(format_string, 20, "%%%d.%df", __width, __prec); + sprintf(__s, format_string, __val); + return __s; +} + +#endif // __PLAT_RP2040__ diff --git a/firmware/Marlin/src/HAL/RP2040/arduino_extras.h b/firmware/Marlin/src/HAL/RP2040/arduino_extras.h new file mode 100644 index 0000000..9794140 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/arduino_extras.h @@ -0,0 +1,29 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 +// #include +// #include +// #include + +char *dtostrf(double __val, signed char __width, unsigned char __prec, char *__s); diff --git a/firmware/Marlin/src/HAL/RP2040/docs/rp2040-datasheet.pdf b/firmware/Marlin/src/HAL/RP2040/docs/rp2040-datasheet.pdf new file mode 100644 index 0000000..4c5c9db Binary files /dev/null and b/firmware/Marlin/src/HAL/RP2040/docs/rp2040-datasheet.pdf differ diff --git a/firmware/Marlin/src/HAL/RP2040/eeprom_flash.cpp b/firmware/Marlin/src/HAL/RP2040/eeprom_flash.cpp new file mode 100644 index 0000000..5b1131e --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/eeprom_flash.cpp @@ -0,0 +1,88 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#include "../platforms.h" + +#ifdef __PLAT_RP2040__ + +#include "../../inc/MarlinConfig.h" + +#if ENABLED(FLASH_EEPROM_EMULATION) + +#include "../shared/eeprom_api.h" + +// NOTE: The Bigtreetech SKR Pico has an onboard W25Q16 flash module + +// Use EEPROM.h for compatibility, for now. +#include + +static bool eeprom_data_written = false; + +#ifndef MARLIN_EEPROM_SIZE + #define MARLIN_EEPROM_SIZE size_t(E2END + 1) +#endif +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } + +bool PersistentStore::access_start() { + EEPROM.begin(); // Avoid EEPROM.h warning (do nothing) + eeprom_buffer_fill(); + return true; +} + +bool PersistentStore::access_finish() { + if (eeprom_data_written) { + TERN_(HAS_PAUSE_SERVO_OUTPUT, PAUSE_SERVO_OUTPUT()); + hal.isr_off(); + eeprom_buffer_flush(); + hal.isr_on(); + TERN_(HAS_PAUSE_SERVO_OUTPUT, RESUME_SERVO_OUTPUT()); + eeprom_data_written = false; + } + return true; +} + +bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + while (size--) { + uint8_t v = *value; + if (v != eeprom_buffered_read_byte(pos)) { + eeprom_buffered_write_byte(pos, v); + eeprom_data_written = true; + } + crc16(crc, &v, 1); + pos++; + value++; + } + return false; +} + +bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { + do { + const uint8_t c = eeprom_buffered_read_byte(pos); + if (writing) *value = c; + crc16(crc, &c, 1); + pos++; + value++; + } while (--size); + return false; +} + +#endif // FLASH_EEPROM_EMULATION +#endif // __PLAT_RP2040__ diff --git a/firmware/Marlin/src/HAL/RP2040/eeprom_wired.cpp b/firmware/Marlin/src/HAL/RP2040/eeprom_wired.cpp new file mode 100644 index 0000000..974f6f8 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/eeprom_wired.cpp @@ -0,0 +1,79 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#include "../platforms.h" + +#ifdef __PLAT_RP2040__ + +#include "../../inc/MarlinConfig.h" + +#if USE_WIRED_EEPROM + +/** + * PersistentStore for Arduino-style EEPROM interface + * with simple implementations supplied by Marlin. + */ + +#include "../shared/eeprom_if.h" +#include "../shared/eeprom_api.h" + +#ifndef MARLIN_EEPROM_SIZE + #define MARLIN_EEPROM_SIZE size_t(E2END + 1) +#endif +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } + +bool PersistentStore::access_start() { eeprom_init(); return true; } +bool PersistentStore::access_finish() { return true; } + +bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + uint16_t written = 0; + while (size--) { + uint8_t v = *value; + uint8_t * const p = (uint8_t * const)pos; + if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! + eeprom_write_byte(p, v); + if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes + if (eeprom_read_byte(p) != v) { + SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); + return true; + } + } + crc16(crc, &v, 1); + pos++; + value++; + } + return false; +} + +bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { + do { + // Read from either external EEPROM, program flash or Backup SRAM + const uint8_t c = eeprom_read_byte((uint8_t*)pos); + if (writing) *value = c; + crc16(crc, &c, 1); + pos++; + value++; + } while (--size); + return false; +} + +#endif // USE_WIRED_EEPROM +#endif // __PLAT_RP2040__ diff --git a/firmware/Marlin/src/HAL/RP2040/endstop_interrupts.h b/firmware/Marlin/src/HAL/RP2040/endstop_interrupts.h new file mode 100644 index 0000000..af53840 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/endstop_interrupts.h @@ -0,0 +1,60 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 "../../module/endstops.h" + +// One ISR for all EXT-Interrupts +void endstop_ISR() { endstops.update(); } + +void setup_endstop_interrupts() { + #define _ATTACH(P) attachInterrupt(digitalPinToInterrupt(P), endstop_ISR, CHANGE) + TERN_(USE_X_MAX, _ATTACH(X_MAX_PIN)); + TERN_(USE_X_MIN, _ATTACH(X_MIN_PIN)); + TERN_(USE_Y_MAX, _ATTACH(Y_MAX_PIN)); + TERN_(USE_Y_MIN, _ATTACH(Y_MIN_PIN)); + TERN_(USE_Z_MAX, _ATTACH(Z_MAX_PIN)); + TERN_(HAS_Z_MIN_PIN, _ATTACH(Z_MIN_PIN)); + TERN_(USE_X2_MAX, _ATTACH(X2_MAX_PIN)); + TERN_(USE_X2_MIN, _ATTACH(X2_MIN_PIN)); + TERN_(USE_Y2_MAX, _ATTACH(Y2_MAX_PIN)); + TERN_(USE_Y2_MIN, _ATTACH(Y2_MIN_PIN)); + TERN_(USE_Z2_MAX, _ATTACH(Z2_MAX_PIN)); + TERN_(USE_Z2_MIN, _ATTACH(Z2_MIN_PIN)); + TERN_(USE_Z3_MAX, _ATTACH(Z3_MAX_PIN)); + TERN_(USE_Z3_MIN, _ATTACH(Z3_MIN_PIN)); + TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN)); + TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN)); + TERN_(USE_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); + TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(USE_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(USE_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(USE_K_MIN, _ATTACH(K_MIN_PIN)); + TERN_(USE_U_MAX, _ATTACH(U_MAX_PIN)); + TERN_(USE_U_MIN, _ATTACH(U_MIN_PIN)); + TERN_(USE_V_MAX, _ATTACH(V_MAX_PIN)); + TERN_(USE_V_MIN, _ATTACH(V_MIN_PIN)); + TERN_(USE_W_MAX, _ATTACH(W_MAX_PIN)); + TERN_(USE_W_MIN, _ATTACH(W_MIN_PIN)); +} diff --git a/firmware/Marlin/src/HAL/RP2040/fast_pwm.cpp b/firmware/Marlin/src/HAL/RP2040/fast_pwm.cpp new file mode 100644 index 0000000..1349a1d --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/fast_pwm.cpp @@ -0,0 +1,43 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#include "../platforms.h" + +#ifdef __PLAT_RP2040__ + +#include "../../inc/MarlinConfigPre.h" + +#include "HAL.h" +#include "pinDefinitions.h" + +void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) { + analogWrite(pin, v); +} + +void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) { + mbed::PwmOut* pwm = digitalPinToPwm(pin); + if (pwm != NULL) delete pwm; + pwm = new mbed::PwmOut(digitalPinToPinName(pin)); + digitalPinToPwm(pin) = pwm; + pwm->period_ms(1000 / f_desired); +} + +#endif // __PLAT_RP2040__ diff --git a/firmware/Marlin/src/HAL/RP2040/fastio.cpp b/firmware/Marlin/src/HAL/RP2040/fastio.cpp new file mode 100644 index 0000000..fa77106 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/fastio.cpp @@ -0,0 +1,32 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#include "../platforms.h" + +#ifdef __PLAT_RP2040__ + +#include "../../inc/MarlinConfig.h" + +void FastIO_init() { + +} + +#endif // __PLAT_RP2040__ diff --git a/firmware/Marlin/src/HAL/RP2040/fastio.h b/firmware/Marlin/src/HAL/RP2040/fastio.h new file mode 100644 index 0000000..e84d2e7 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/fastio.h @@ -0,0 +1,87 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 + +/** + * Fast I/O interfaces for RP2040 + * These use GPIO register access for fast port manipulation. + */ + +// ------------------------ +// Public Variables +// ------------------------ + + +// ------------------------ +// Public functions +// ------------------------ + +void FastIO_init(); // Must be called before using fast io macros +#define FASTIO_INIT() FastIO_init() + +// ------------------------ +// Defines +// ------------------------ + +#define _BV32(b) (1UL << (b)) + +#ifndef PWM + #define PWM OUTPUT +#endif + +#define _WRITE(IO, V) digitalWrite((IO), (V)) + +#define _READ(IO) digitalRead(IO) +#define _TOGGLE(IO) digitalWrite(IO, !digitalRead(IO)) + +#define _GET_MODE(IO) +#define _SET_MODE(IO,M) pinMode(IO, M) +#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT) //!< Output Push Pull Mode & GPIO_NOPULL +#define _SET_OUTPUT_OD(IO) pinMode(IO, OUTPUT_OPEN_DRAIN) + +#define WRITE(IO,V) _WRITE(IO,V) +#define READ(IO) _READ(IO) +#define TOGGLE(IO) _TOGGLE(IO) + +#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0) +#define OUT_WRITE_OD(IO,V) do{ _SET_OUTPUT_OD(IO); WRITE(IO,V); }while(0) + +#define SET_INPUT(IO) _SET_MODE(IO, INPUT) //!< Input Floating Mode +#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, INPUT_PULLUP) //!< Input with Pull-up activation +#define SET_INPUT_PULLDOWN(IO) _SET_MODE(IO, INPUT_PULLDOWN) //!< Input with Pull-down activation +#define SET_OUTPUT(IO) OUT_WRITE(IO, LOW) +#define SET_PWM(IO) _SET_MODE(IO, PWM) + +#define IS_INPUT(IO) +#define IS_OUTPUT(IO) + +#define PWM_PIN(P) true //digitalPinHasPWM(P) +#define NO_COMPILE_TIME_PWM + +// digitalRead/Write wrappers +#define extDigitalRead(IO) digitalRead(IO) +#define extDigitalWrite(IO,V) digitalWrite(IO,V) + +#undef I2C_SDA +#define I2C_SDA_PIN PIN_WIRE_SDA +#undef I2C_SCL +#define I2C_SCL_PIN PIN_WIRE_SCL diff --git a/firmware/Marlin/src/HAL/RP2040/inc/Conditionals_LCD.h b/firmware/Marlin/src/HAL/RP2040/inc/Conditionals_LCD.h new file mode 100644 index 0000000..82f95a1 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/inc/Conditionals_LCD.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/firmware/Marlin/src/HAL/RP2040/inc/Conditionals_adv.h b/firmware/Marlin/src/HAL/RP2040/inc/Conditionals_adv.h new file mode 100644 index 0000000..442639e --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/inc/Conditionals_adv.h @@ -0,0 +1,35 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 ALL(SDSUPPORT, USBD_USE_CDC_MSC) && DISABLED(NO_SD_HOST_DRIVE) + #define HAS_SD_HOST_DRIVE 1 +#endif + +// Fix F_CPU not being a compile-time constant in RP2040 framework +#ifdef BOARD_F_CPU + #undef F_CPU + #define F_CPU BOARD_F_CPU +#endif + +// The Sensitive Pins array is not optimizable +#define RUNTIME_ONLY_ANALOG_TO_DIGITAL diff --git a/firmware/Marlin/src/HAL/RP2040/inc/Conditionals_post.h b/firmware/Marlin/src/HAL/RP2040/inc/Conditionals_post.h new file mode 100644 index 0000000..ef7853b --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/inc/Conditionals_post.h @@ -0,0 +1,29 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 no real or emulated EEPROM selected, fall back to SD emulation +#if USE_FALLBACK_EEPROM + #define SDCARD_EEPROM_EMULATION +#elif ANY(I2C_EEPROM, SPI_EEPROM) + #define USE_SHARED_EEPROM 1 +#endif diff --git a/firmware/Marlin/src/HAL/RP2040/inc/Conditionals_type.h b/firmware/Marlin/src/HAL/RP2040/inc/Conditionals_type.h new file mode 100644 index 0000000..82f95a1 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/inc/Conditionals_type.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 diff --git a/firmware/Marlin/src/HAL/RP2040/inc/SanityCheck.h b/firmware/Marlin/src/HAL/RP2040/inc/SanityCheck.h new file mode 100644 index 0000000..29175f8 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/inc/SanityCheck.h @@ -0,0 +1,60 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 + +/** + * Test RP2040-specific configuration values for errors at compile-time. + */ +//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) +// #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" +//#endif + +#if ENABLED(SDCARD_EEPROM_EMULATION) && DISABLED(SDSUPPORT) + #undef SDCARD_EEPROM_EMULATION // Avoid additional error noise + #if USE_FALLBACK_EEPROM + #warning "EEPROM type not specified. Fallback is SDCARD_EEPROM_EMULATION." + #endif + #error "SDCARD_EEPROM_EMULATION requires SDSUPPORT. Enable SDSUPPORT or choose another EEPROM emulation." +#endif + +#if ENABLED(SRAM_EEPROM_EMULATION) + #error "SRAM_EEPROM_EMULATION is not supported for RP2040." +#endif + +#if ALL(PRINTCOUNTER, FLASH_EEPROM_EMULATION) + #warning "FLASH_EEPROM_EMULATION may cause long delays when writing and should not be used while printing." + #error "Disable PRINTCOUNTER or choose another EEPROM emulation." +#endif + +#if ENABLED(FLASH_EEPROM_LEVELING) + #error "FLASH_EEPROM_LEVELING is not supported for RP2040." +#endif + +#if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) + #error "SERIAL_STATS_MAX_RX_QUEUED is not supported on RP2040." +#elif ENABLED(SERIAL_STATS_DROPPED_RX) + #error "SERIAL_STATS_DROPPED_RX is not supported on RP2040." +#endif + +#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) + #error "TFT_COLOR_UI, TFT_LVGL_UI and TFT_CLASSIC_UI are not supported for RP2040." +#endif diff --git a/firmware/Marlin/src/HAL/RP2040/msc_sd.cpp b/firmware/Marlin/src/HAL/RP2040/msc_sd.cpp new file mode 100644 index 0000000..bc945c1 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/msc_sd.cpp @@ -0,0 +1,136 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#include "../platforms.h" + +#ifdef __PLAT_RP2040__ + +#include "../../inc/MarlinConfigPre.h" + +#if HAS_SD_HOST_DRIVE + +#include "../shared/Marduino.h" +#include "msc_sd.h" +#include "usbd_core.h" + +#include "../../sd/cardreader.h" + +#include +#include + +#define BLOCK_SIZE 512 +#define PRODUCT_ID 0x29 + +class Sd2CardUSBMscHandler : public USBMscHandler { +public: + DiskIODriver* diskIODriver() { + #if ENABLED(MULTI_VOLUME) + #if SHARED_VOLUME_IS(SD_ONBOARD) + return &card.media_driver_sdcard; + #elif SHARED_VOLUME_IS(USB_FLASH_DRIVE) + return &card.media_driver_usbFlash; + #endif + #else + return card.diskIODriver(); + #endif + } + + bool GetCapacity(uint32_t *pBlockNum, uint16_t *pBlockSize) { + *pBlockNum = diskIODriver()->cardSize(); + *pBlockSize = BLOCK_SIZE; + return true; + } + + bool Write(uint8_t *pBuf, uint32_t blkAddr, uint16_t blkLen) { + auto sd2card = diskIODriver(); + // single block + if (blkLen == 1) { + watchdog_refresh(); + sd2card->writeBlock(blkAddr, pBuf); + return true; + } + + // multi block optimization + sd2card->writeStart(blkAddr, blkLen); + while (blkLen--) { + watchdog_refresh(); + sd2card->writeData(pBuf); + pBuf += BLOCK_SIZE; + } + sd2card->writeStop(); + return true; + } + + bool Read(uint8_t *pBuf, uint32_t blkAddr, uint16_t blkLen) { + auto sd2card = diskIODriver(); + // single block + if (blkLen == 1) { + watchdog_refresh(); + sd2card->readBlock(blkAddr, pBuf); + return true; + } + + // multi block optimization + sd2card->readStart(blkAddr); + while (blkLen--) { + watchdog_refresh(); + sd2card->readData(pBuf); + pBuf += BLOCK_SIZE; + } + sd2card->readStop(); + return true; + } + + bool IsReady() { + return diskIODriver()->isReady(); + } +}; + +Sd2CardUSBMscHandler usbMscHandler; + +/* USB Mass storage Standard Inquiry Data */ +uint8_t Marlin_STORAGE_Inquirydata[] = { /* 36 */ + /* LUN 0 */ + 0x00, + 0x80, + 0x02, + 0x02, + (STANDARD_INQUIRY_DATA_LEN - 5), + 0x00, + 0x00, + 0x00, + 'M', 'A', 'R', 'L', 'I', 'N', ' ', ' ', /* Manufacturer : 8 bytes */ + 'P', 'r', 'o', 'd', 'u', 'c', 't', ' ', /* Product : 16 Bytes */ + ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', + '0', '.', '0', '1', /* Version : 4 Bytes */ +}; + +USBMscHandler *pSingleMscHandler = &usbMscHandler; + +void MSC_SD_init() { + USBDevice.end(); + delay(200); + USBDevice.registerMscHandlers(1, &pSingleMscHandler, Marlin_STORAGE_Inquirydata); + USBDevice.begin(); +} + +#endif // HAS_SD_HOST_DRIVE +#endif // __PLAT_RP2040__ diff --git a/firmware/Marlin/src/HAL/RP2040/msc_sd.h b/firmware/Marlin/src/HAL/RP2040/msc_sd.h new file mode 100644 index 0000000..1c13f55 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/msc_sd.h @@ -0,0 +1,24 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 + +void MSC_SD_init(); diff --git a/firmware/Marlin/src/HAL/RP2040/pinsDebug.h b/firmware/Marlin/src/HAL/RP2040/pinsDebug.h new file mode 100644 index 0000000..964fb71 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/pinsDebug.h @@ -0,0 +1,146 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 +#include "HAL.h" + +#ifndef NUM_DIGITAL_PINS + #error "Expected NUM_DIGITAL_PINS not found" +#endif + +/** + * Life gets complicated if you want an easy to use 'M43 I' output (in port/pin order) + * because the variants in this platform do not always define all the I/O port/pins + * that a CPU has. + * + * VARIABLES: + * Ard_num - Arduino pin number - defined by the platform. It is used by digitalRead and + * digitalWrite commands and by M42. + * - does not contain port/pin info + * - is not in port/pin order + * - typically a variant will only assign Ard_num to port/pins that are actually used + * Index - M43 counter - only used to get Ard_num + * x - a parameter/argument used to search the pin_array to try to find a signal name + * associated with a Ard_num + * Port_pin - port number and pin number for use with CPU registers and printing reports + * + * Since M43 uses digitalRead and digitalWrite commands, only the Port_pins with an Ard_num + * are accessed and/or displayed. + * + * Three arrays are used. + * + * digitalPin[] is provided by the platform. It consists of the Port_pin numbers in + * Arduino pin number order. + * + * pin_array is a structure generated by the pins/pinsDebug.h header file. It is generated by + * the preprocessor. Only the signals associated with enabled options are in this table. + * It contains: + * - name of the signal + * - the Ard_num assigned by the pins_YOUR_BOARD.h file using the platform defines. + * EXAMPLE: "#define KILL_PIN PB1" results in Ard_num of 57. 57 is then used as the + * argument to digitalPinToPinName(IO) to get the Port_pin number + * - if it is a digital or analog signal. PWMs are considered digital here. + * + * pin_xref is a structure generated by this header file. It is generated by the + * preprocessor. It is in port/pin order. It contains just the port/pin numbers defined by the + * platform for this variant. + * - Ard_num + * - printable version of Port_pin + * + * Routines with an "x" as a parameter/argument are used to search the pin_array to try to + * find a signal name associated with a port/pin. + * + * NOTE - the Arduino pin number is what is used by the M42 command, NOT the port/pin for that + * signal. The Arduino pin number is listed by the M43 I command. + */ + +#define NUM_ANALOG_FIRST A0 + +#define MODE_PIN_INPUT 0 // Input mode (reset state) +#define MODE_PIN_OUTPUT 1 // General purpose output mode +#define MODE_PIN_ALT 2 // Alternate function mode +#define MODE_PIN_ANALOG 3 // Analog mode + +#define PIN_NUM(P) (P & 0x000F) +#define PIN_NUM_ALPHA_LEFT(P) (((P & 0x000F) < 10) ? ('0' + (P & 0x000F)) : '1') +#define PIN_NUM_ALPHA_RIGHT(P) (((P & 0x000F) > 9) ? ('0' + (P & 0x000F) - 10) : 0 ) +#define PORT_NUM(P) ((P >> 4) & 0x0007) +#define PORT_ALPHA(P) ('A' + (P >> 4)) + +/** + * Translation of routines & variables used by pinsDebug.h + */ +#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS +#define VALID_PIN(ANUM) (pin_t(ANUM) >= 0 && pin_t(ANUM) < NUMBER_PINS_TOTAL) +#define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads +#define PRINT_PIN(Q) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) +#define DIGITAL_PIN_TO_ANALOG_PIN(ANUM) -1 // will report analog pin number in the print port routine + +// x is a variable used to search pin_array +#define GET_ARRAY_IS_DIGITAL(x) ((bool) pin_array[x].is_digital) +#define GET_ARRAY_PIN(x) ((pin_t) pin_array[x].pin) +#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) +#define MULTI_NAME_PAD 33 // space needed to be pretty if not first name assigned to a pin + +uint8_t get_pin_mode(const pin_t Ard_num) { + + uint dir = gpio_get_dir( Ard_num); + + if(dir) return MODE_PIN_OUTPUT; + else return MODE_PIN_INPUT; + +} + +bool getValidPinMode(const pin_t Ard_num) { + const uint8_t pin_mode = get_pin_mode(Ard_num); + return pin_mode == MODE_PIN_OUTPUT || pin_mode == MODE_PIN_ALT; // assume all alt definitions are PWM +} + +int8_t digital_pin_to_analog_pin(pin_t Ard_num) { + Ard_num -= NUM_ANALOG_FIRST; + return (Ard_num >= 0 && Ard_num < NUM_ANALOG_INPUTS) ? Ard_num : -1; +} + +bool isAnalogPin(const pin_t Ard_num) { + return digital_pin_to_analog_pin(Ard_num) != -1; +} + +bool is_digital(const pin_t x) { + const uint8_t pin_mode = get_pin_mode(x); + return pin_mode == MODE_PIN_INPUT || pin_mode == MODE_PIN_OUTPUT; +} + +void printPinPort(const pin_t Ard_num) { + SERIAL_ECHOPGM("Pin: "); + SERIAL_ECHO(Ard_num); +} + +bool pwm_status(const pin_t Ard_num) { + return get_pin_mode(Ard_num) == MODE_PIN_ALT; +} + +void printPinPWM(const pin_t Ard_num) { + if (PWM_PIN(Ard_num)) { + } +} diff --git a/firmware/Marlin/src/HAL/RP2040/spi_pins.h b/firmware/Marlin/src/HAL/RP2040/spi_pins.h new file mode 100644 index 0000000..e6ee840 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/spi_pins.h @@ -0,0 +1,38 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 + +/** + * Define SPI Pins: SCK, MISO, MOSI, SS + */ +#ifndef SD_SCK_PIN + #define SD_SCK_PIN PIN_SPI_SCK +#endif +#ifndef SD_MISO_PIN + #define SD_MISO_PIN PIN_SPI_MISO +#endif +#ifndef SD_MOSI_PIN + #define SD_MOSI_PIN PIN_SPI_MOSI +#endif +#ifndef SD_SS_PIN + #define SD_SS_PIN PIN_SPI_SS +#endif diff --git a/firmware/Marlin/src/HAL/RP2040/timers.cpp b/firmware/Marlin/src/HAL/RP2040/timers.cpp new file mode 100644 index 0000000..88d5af2 --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/timers.cpp @@ -0,0 +1,126 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#include "../platforms.h" + +#ifdef __PLAT_RP2040__ + +#include "../../inc/MarlinConfig.h" + +alarm_pool_t* HAL_timer_pool_0; +alarm_pool_t* HAL_timer_pool_1; +alarm_pool_t* HAL_timer_pool_2; +alarm_pool_t* HAL_timer_pool_3; + +struct repeating_timer HAL_timer_0; +struct repeating_timer HAL_timer_1; +struct repeating_timer HAL_timer_2; +struct repeating_timer HAL_timer_3; + +volatile bool HAL_timer_irq_en[4] = { false, false, false, false }; + +void HAL_timer_init() { + //reserve all the available alarm pools to use as "pseudo" hardware timers + //HAL_timer_pool_0 = alarm_pool_create(0,2); + HAL_timer_pool_1 = alarm_pool_create(1, 6); + HAL_timer_pool_0 = HAL_timer_pool_1; + HAL_timer_pool_2 = alarm_pool_create(2, 6); + HAL_timer_pool_3 = HAL_timer_pool_2; + //HAL_timer_pool_3 = alarm_pool_create(3, 6); + + irq_set_priority(TIMER_IRQ_0, 0xC0); + irq_set_priority(TIMER_IRQ_1, 0x80); + irq_set_priority(TIMER_IRQ_2, 0x40); + irq_set_priority(TIMER_IRQ_3, 0x00); + + //alarm_pool_init_default(); +} + +void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) { + const int64_t freq = (int64_t)frequency, + us = (1000000ll / freq) * -1ll; + bool result; + switch (timer_num) { + case 0: + result = alarm_pool_add_repeating_timer_us(HAL_timer_pool_0, us, HAL_timer_repeating_0_callback, NULL, &HAL_timer_0); + break; + case 1: + result = alarm_pool_add_repeating_timer_us(HAL_timer_pool_1, us, HAL_timer_repeating_1_callback, NULL, &HAL_timer_1); + break; + case 2: + result = alarm_pool_add_repeating_timer_us(HAL_timer_pool_2, us, HAL_timer_repeating_2_callback, NULL, &HAL_timer_2); + break; + case 3: + result = alarm_pool_add_repeating_timer_us(HAL_timer_pool_3, us, HAL_timer_repeating_3_callback, NULL, &HAL_timer_3); + break; + } + UNUSED(result); +} + +void HAL_timer_stop(const uint8_t timer_num) { + switch (timer_num) { + case 0: cancel_repeating_timer(&HAL_timer_0); break; + case 1: cancel_repeating_timer(&HAL_timer_1); break; + case 2: cancel_repeating_timer(&HAL_timer_2); break; + case 3: cancel_repeating_timer(&HAL_timer_3); break; + } +} + +int64_t HAL_timer_alarm_pool_0_callback(long int, void*) { + if (HAL_timer_irq_en[0]) HAL_timer_0_callback(); + return 0; +} +int64_t HAL_timer_alarm_pool_1_callback(long int, void*) { + if (HAL_timer_irq_en[1]) HAL_timer_1_callback(); + return 0; +} +int64_t HAL_timer_alarm_pool_2_callback(long int, void*) { + if (HAL_timer_irq_en[2]) HAL_timer_2_callback(); + return 0; +} +int64_t HAL_timer_alarm_pool_3_callback(long int, void*) { + if (HAL_timer_irq_en[3]) HAL_timer_3_callback(); + return 0; +} + +bool HAL_timer_repeating_0_callback(repeating_timer* timer) { + if (HAL_timer_irq_en[0]) HAL_timer_0_callback(); + return true; +} +bool HAL_timer_repeating_1_callback(repeating_timer* timer) { + if (HAL_timer_irq_en[1]) HAL_timer_1_callback(); + return true; +} +bool HAL_timer_repeating_2_callback(repeating_timer* timer) { + if (HAL_timer_irq_en[2]) HAL_timer_2_callback(); + return true; +} +bool HAL_timer_repeating_3_callback(repeating_timer* timer) { + if (HAL_timer_irq_en[3]) HAL_timer_3_callback(); + return true; +} + +void __attribute__((weak)) HAL_timer_0_callback() {} +void __attribute__((weak)) HAL_timer_1_callback() {} +void __attribute__((weak)) HAL_timer_2_callback() {} +void __attribute__((weak)) HAL_timer_3_callback() {} + +#endif // __PLAT_RP2040__ diff --git a/firmware/Marlin/src/HAL/RP2040/timers.h b/firmware/Marlin/src/HAL/RP2040/timers.h new file mode 100644 index 0000000..83fdc0a --- /dev/null +++ b/firmware/Marlin/src/HAL/RP2040/timers.h @@ -0,0 +1,177 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ +#include + +#include "../../core/macros.h" + +#ifdef PICO_TIME_DEFAULT_ALARM_POOL_DISABLED + #undef PICO_TIME_DEFAULT_ALARM_POOL_DISABLED + #define PICO_TIME_DEFAULT_ALARM_POOL_DISABLED 0 +#else + #define PICO_TIME_DEFAULT_ALARM_POOL_DISABLED 0 +#endif + +// ------------------------ +// Defines +// ------------------------ + +//#define _HAL_TIMER(T) _CAT(LPC_TIM, T) +//#define _HAL_TIMER_IRQ(T) TIMER##T##_IRQn +//#define __HAL_TIMER_ISR(T) extern "C" alarm_callback_t HAL_timer_alarm_pool_##T##_callback() +#define __HAL_TIMER_ISR(T) extern void HAL_timer_##T##_callback() +#define _HAL_TIMER_ISR(T) __HAL_TIMER_ISR(T) + +typedef uint64_t hal_timer_t; +#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFFFFFFFFF + +#define HAL_TIMER_RATE (1000000ull) // fixed value as we use a microsecond timesource +#ifndef MF_TIMER_STEP + #define MF_TIMER_STEP 0 // Timer Index for Stepper +#endif +#ifndef MF_TIMER_PULSE + #define MF_TIMER_PULSE MF_TIMER_STEP +#endif +#ifndef MF_TIMER_TEMP + #define MF_TIMER_TEMP 1 // Timer Index for Temperature +#endif +#ifndef MF_TIMER_PWM + #define MF_TIMER_PWM 3 // Timer Index for PWM +#endif + +#define TEMP_TIMER_RATE HAL_TIMER_RATE +#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency + +#define STEPPER_TIMER_RATE HAL_TIMER_RATE / 10 // 100khz roughly +#define STEPPER_TIMER_TICKS_PER_US (0.1) // fixed value as we use a microsecond timesource +#define STEPPER_TIMER_PRESCALE (10) + +#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer +#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE +#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US + +#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_STEP) +#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_STEP) +#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(MF_TIMER_STEP) + +#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(MF_TIMER_TEMP) +#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(MF_TIMER_TEMP) + +#ifndef HAL_STEP_TIMER_ISR + #define HAL_STEP_TIMER_ISR() _HAL_TIMER_ISR(MF_TIMER_STEP) +#endif +#ifndef HAL_TEMP_TIMER_ISR + #define HAL_TEMP_TIMER_ISR() _HAL_TIMER_ISR(MF_TIMER_TEMP) +#endif + +// Timer references by index +//#define STEP_TIMER_PTR _HAL_TIMER(MF_TIMER_STEP) +//#define TEMP_TIMER_PTR _HAL_TIMER(MF_TIMER_TEMP) + +extern alarm_pool_t* HAL_timer_pool_0; +extern alarm_pool_t* HAL_timer_pool_1; +extern alarm_pool_t* HAL_timer_pool_2; +extern alarm_pool_t* HAL_timer_pool_3; + +extern struct repeating_timer HAL_timer_0; + +void HAL_timer_0_callback(); +void HAL_timer_1_callback(); +void HAL_timer_2_callback(); +void HAL_timer_3_callback(); + +int64_t HAL_timer_alarm_pool_0_callback(long int, void*); +int64_t HAL_timer_alarm_pool_1_callback(long int, void*); +int64_t HAL_timer_alarm_pool_2_callback(long int, void*); +int64_t HAL_timer_alarm_pool_3_callback(long int, void*); + +bool HAL_timer_repeating_0_callback(repeating_timer* timer); +bool HAL_timer_repeating_1_callback(repeating_timer* timer); +bool HAL_timer_repeating_2_callback(repeating_timer* timer); +bool HAL_timer_repeating_3_callback(repeating_timer* timer); + +extern volatile bool HAL_timer_irq_en[4]; + +// ------------------------ +// Public functions +// ------------------------ + +void HAL_timer_init(); +void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency); +void HAL_timer_stop(const uint8_t timer_num); + +FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, hal_timer_t compare) { + + if (timer_num == MF_TIMER_STEP){ + if (compare == HAL_TIMER_TYPE_MAX){ + HAL_timer_stop(timer_num); + return; + } + } + + compare = compare *10; //Dirty fix, figure out a proper way + + switch (timer_num) { + case 0: + alarm_pool_add_alarm_in_us(HAL_timer_pool_0 ,compare , HAL_timer_alarm_pool_0_callback ,0 ,false ); + break; + + case 1: + alarm_pool_add_alarm_in_us(HAL_timer_pool_1 ,compare , HAL_timer_alarm_pool_1_callback ,0 ,false ); + break; + + case 2: + alarm_pool_add_alarm_in_us(HAL_timer_pool_2 ,compare , HAL_timer_alarm_pool_2_callback ,0 ,false ); + break; + + case 3: + alarm_pool_add_alarm_in_us(HAL_timer_pool_3 ,compare , HAL_timer_alarm_pool_3_callback ,0 ,false ); + break; + } +} + +FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) { + return 0; +} + +FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) { + if (timer_num == MF_TIMER_STEP) return 0ull; + return time_us_64(); +} + + +FORCE_INLINE static void HAL_timer_enable_interrupt(const uint8_t timer_num) { + HAL_timer_irq_en[timer_num] = 1; +} + +FORCE_INLINE static void HAL_timer_disable_interrupt(const uint8_t timer_num) { + HAL_timer_irq_en[timer_num] = 0; +} + +FORCE_INLINE static bool HAL_timer_interrupt_enabled(const uint8_t timer_num) { + return HAL_timer_irq_en[timer_num]; //lucky coincidence that timer_num and rp2040 irq num matches +} + +FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) { + return; +} + +#define HAL_timer_isr_epilogue(T) NOOP diff --git a/firmware/Marlin/src/HAL/SAMD21/HAL.h b/firmware/Marlin/src/HAL/SAMD21/HAL.h index 95f391f..63beb29 100644 --- a/firmware/Marlin/src/HAL/SAMD21/HAL.h +++ b/firmware/Marlin/src/HAL/SAMD21/HAL.h @@ -69,13 +69,13 @@ extern DefaultSerial3 MSerial1; #endif #endif -#ifdef MMU2_SERIAL_PORT - #if WITHIN(MMU2_SERIAL_PORT, 0, 1) - #define MMU2_SERIAL MSERIAL(SERIAL_PORT) - #elif MMU2_SERIAL_PORT == -1 - #define MMU2_SERIAL MSerialUSB +#ifdef MMU_SERIAL_PORT + #if WITHIN(MMU_SERIAL_PORT, 0, 1) + #define MMU_SERIAL MSERIAL(SERIAL_PORT) + #elif MMU_SERIAL_PORT == -1 + #define MMU_SERIAL MSerialUSB #else - #error "MMU2_SERIAL_PORT must be -1 (Native USB only)." + #error "MMU_SERIAL_PORT must be -1 (Native USB only)." #endif #endif diff --git a/firmware/Marlin/src/HAL/SAMD21/HAL_SPI.cpp b/firmware/Marlin/src/HAL/SAMD21/HAL_SPI.cpp index e01f540..d41f868 100644 --- a/firmware/Marlin/src/HAL/SAMD21/HAL_SPI.cpp +++ b/firmware/Marlin/src/HAL/SAMD21/HAL_SPI.cpp @@ -108,7 +108,6 @@ SPI.beginTransaction(spiConfig); SPI.transfer(buf, nbyte); SPI.endTransaction(); - } /** diff --git a/firmware/Marlin/src/HAL/SAMD21/pinsDebug.h b/firmware/Marlin/src/HAL/SAMD21/pinsDebug.h index cc20f28..387516a 100644 --- a/firmware/Marlin/src/HAL/SAMD21/pinsDebug.h +++ b/firmware/Marlin/src/HAL/SAMD21/pinsDebug.h @@ -22,41 +22,57 @@ #pragma once /** - * SAMD21 HAL developed by Bart Meijer (brupje) - * Based on SAMD51 HAL by Giuliano Zaro (AKA GMagician) + * Pins Debugging for SAMD21 + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) */ #define NUMBER_PINS_TOTAL PINS_COUNT -#define digitalRead_mod(p) extDigitalRead(p) -#define PRINT_PORT(p) do{ SERIAL_ECHOPGM(" Port: "); sprintf_P(buffer, PSTR("%c%02ld"), 'A' + g_APinDescription[p].ulPort, g_APinDescription[p].ulPin); SERIAL_ECHO(buffer); }while (0) +#define digitalRead_mod(P) extDigitalRead(P) #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) -#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) -#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0) -#define getPinByIndex(p) pin_array[p].pin -#define getPinIsDigitalByIndex(p) pin_array[p].is_digital -#define isValidPin(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL) -#define isAnalogPin(P) (digitalPinToAnalogIndex(P)!=-1) -#define pwm_status(pin) digitalPinHasPWM(pin) +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0) +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) +#define getPinByIndex(x) pin_array[x].pin +#define getPinIsDigitalByIndex(x) pin_array[x].is_digital +#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL)) +#define isAnalogPin(P) (digitalPinToAnalogIndex(P) != -1) +#define pwm_status(P) digitalPinHasPWM(P) #define MULTI_NAME_PAD 27 // space needed to be pretty if not first name assigned to a pin // pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities // uses pin index #define M43_NEVER_TOUCH(Q) ((Q) >= 75) -bool getValidPinMode(int8_t pin) { // 1: output, 0: input +bool getValidPinMode(const int8_t pin) { // 1: output, 0: input const EPortType samdport = g_APinDescription[pin].ulPort; const uint32_t samdpin = g_APinDescription[pin].ulPin; return PORT->Group[samdport].DIR.reg & MASK(samdpin) || (PORT->Group[samdport].PINCFG[samdpin].reg & (PORT_PINCFG_INEN | PORT_PINCFG_PULLEN)) == PORT_PINCFG_PULLEN; } -void printPinPWM(int32_t pin) { +void printPinPWM(const int32_t pin) { if (pwm_status(pin)) { //uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative; //SERIAL_ECHOPGM("PWM = ", duty); } } +void printPinPort(const pin_t) {} + /** * SAMD21 Board pin| PORT | Label * ----------------+--------+------- diff --git a/firmware/Marlin/src/HAL/SAMD51/HAL.h b/firmware/Marlin/src/HAL/SAMD51/HAL.h index c43d1b5..7655f82 100644 --- a/firmware/Marlin/src/HAL/SAMD51/HAL.h +++ b/firmware/Marlin/src/HAL/SAMD51/HAL.h @@ -79,13 +79,13 @@ #endif #endif - #ifdef MMU2_SERIAL_PORT - #if MMU2_SERIAL_PORT == -1 - #define MMU2_SERIAL MSerial0 - #elif WITHIN(MMU2_SERIAL_PORT, 0, 3) - #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) + #ifdef MMU_SERIAL_PORT + #if MMU_SERIAL_PORT == -1 + #define MMU_SERIAL MSerial0 + #elif WITHIN(MMU_SERIAL_PORT, 0, 3) + #define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT) #else - #error "MMU2_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." + #error "MMU_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." #endif #endif diff --git a/firmware/Marlin/src/HAL/SAMD51/pinsDebug.h b/firmware/Marlin/src/HAL/SAMD51/pinsDebug.h index 00f246f..1518c61 100644 --- a/firmware/Marlin/src/HAL/SAMD51/pinsDebug.h +++ b/firmware/Marlin/src/HAL/SAMD51/pinsDebug.h @@ -22,40 +22,57 @@ #pragma once /** - * SAMD51 HAL developed by Giuliano Zaro (AKA GMagician) + * Pins Debugging for SAMD51 + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) */ #define NUMBER_PINS_TOTAL PINS_COUNT -#define digitalRead_mod(p) extDigitalRead(p) -#define PRINT_PORT(p) do{ SERIAL_ECHOPGM(" Port: "); sprintf_P(buffer, PSTR("%c%02ld"), 'A' + g_APinDescription[p].ulPort, g_APinDescription[p].ulPin); SERIAL_ECHO(buffer); }while (0) +#define digitalRead_mod(P) extDigitalRead(P) #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) -#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) -#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0) -#define getPinByIndex(p) pin_array[p].pin -#define getPinIsDigitalByIndex(p) pin_array[p].is_digital -#define isValidPin(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL)) -#define isAnalogPin(P) (digitalPinToAnalogIndex(P)!=-1) -#define pwm_status(pin) digitalPinHasPWM(pin) +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3d "), P); SERIAL_ECHO(buffer); }while(0) +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) +#define getPinByIndex(x) pin_array[x].pin +#define getPinIsDigitalByIndex(x) pin_array[x].is_digital +#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL)) +#define isAnalogPin(P) (digitalPinToAnalogIndex(P) != -1) +#define pwm_status(P) digitalPinHasPWM(P) #define MULTI_NAME_PAD 27 // space needed to be pretty if not first name assigned to a pin // pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities // uses pin index #define M43_NEVER_TOUCH(Q) ((Q) >= 75) -bool getValidPinMode(int8_t pin) { // 1: output, 0: input +bool getValidPinMode(const int8_t pin) { // 1: output, 0: input const EPortType samdport = g_APinDescription[pin].ulPort; const uint32_t samdpin = g_APinDescription[pin].ulPin; return PORT->Group[samdport].DIR.reg & MASK(samdpin) || (PORT->Group[samdport].PINCFG[samdpin].reg & (PORT_PINCFG_INEN | PORT_PINCFG_PULLEN)) == PORT_PINCFG_PULLEN; } -void printPinPWM(int32_t pin) { +void printPinPWM(const int32_t pin) { if (pwm_status(pin)) { //uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative; //SERIAL_ECHOPGM("PWM = ", duty); } } +void printPinPort(const pin_t) {} + /** * AGCM4 Board pin | PORT | Label * ----------------+--------+------- diff --git a/firmware/Marlin/src/HAL/STM32/HAL.h b/firmware/Marlin/src/HAL/STM32/HAL.h index 9a43b5d..eab31be 100644 --- a/firmware/Marlin/src/HAL/STM32/HAL.h +++ b/firmware/Marlin/src/HAL/STM32/HAL.h @@ -90,15 +90,15 @@ #endif #endif -#ifdef MMU2_SERIAL_PORT - #if WITHIN(MMU2_SERIAL_PORT, 1, 9) - #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) +#ifdef MMU_SERIAL_PORT + #if WITHIN(MMU_SERIAL_PORT, 1, 9) + #define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT) #elif !defined(USBCON) - #error "MMU2_SERIAL_PORT must be from 1 to 9." - #elif MMU2_SERIAL_PORT == -1 - #define MMU2_SERIAL MSerialUSB + #error "MMU_SERIAL_PORT must be from 1 to 9." + #elif MMU_SERIAL_PORT == -1 + #define MMU_SERIAL MSerialUSB #else - #error "MMU2_SERIAL_PORT must be from 1 to 9, or -1 for Native USB." + #error "MMU_SERIAL_PORT must be from 1 to 9, or -1 for Native USB." #endif #endif diff --git a/firmware/Marlin/src/HAL/STM32/pinsDebug.h b/firmware/Marlin/src/HAL/STM32/pinsDebug.h index cce7054..21cd2de 100644 --- a/firmware/Marlin/src/HAL/STM32/pinsDebug.h +++ b/firmware/Marlin/src/HAL/STM32/pinsDebug.h @@ -21,6 +21,26 @@ */ #pragma once +/** + * Pins Debugging for STM32 + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) + */ + #include #ifndef NUM_DIGITAL_PINS @@ -34,11 +54,11 @@ * that a CPU has. * * VARIABLES: - * Ard_num - Arduino pin number - defined by the platform. It is used by digitalRead and - * digitalWrite commands and by M42. - * - does not contain port/pin info - * - is not in port/pin order - * - typically a variant will only assign Ard_num to port/pins that are actually used + * A - Arduino pin number - defined by the platform. It is used by digitalRead and + * digitalWrite commands and by M42. + * - does not contain port/pin info + * - is not in port/pin order + * - typically a variant will only assign Ard_num to port/pins that are actually used * Index - M43 counter - only used to get Ard_num * x - a parameter/argument used to search the pin_array to try to find a signal name * associated with a Ard_num @@ -98,15 +118,11 @@ const XrefInfo pin_xref[] PROGMEM = { #define MODE_PIN_ALT 2 // Alternate function mode #define MODE_PIN_ANALOG 3 // Analog mode -#define PIN_NUM(P) (P & 0x000F) -#define PIN_NUM_ALPHA_LEFT(P) (((P & 0x000F) < 10) ? ('0' + (P & 0x000F)) : '1') -#define PIN_NUM_ALPHA_RIGHT(P) (((P & 0x000F) > 9) ? ('0' + (P & 0x000F) - 10) : 0 ) -#define PORT_NUM(P) ((P >> 4) & 0x0007) -#define PORT_ALPHA(P) ('A' + (P >> 4)) - -/** - * Translation of routines & variables used by pinsDebug.h - */ +#define PIN_NUM(P) ((P) & 0x000F) +#define PIN_NUM_ALPHA_LEFT(P) ((((P) & 0x000F) < 10) ? ('0' + ((P) & 0x000F)) : '1') +#define PIN_NUM_ALPHA_RIGHT(P) ((((P) & 0x000F) > 9) ? ('0' + ((P) & 0x000F) - 10) : 0 ) +#define PORT_NUM(P) (((P) >> 4) & 0x0007) +#define PORT_ALPHA(P) ('A' + ((P) >> 4)) #if NUM_ANALOG_FIRST >= NUM_DIGITAL_PINS #define HAS_HIGH_ANALOG_PINS 1 @@ -116,10 +132,10 @@ const XrefInfo pin_xref[] PROGMEM = { #endif #define NUMBER_PINS_TOTAL ((NUM_DIGITAL_PINS) + TERN0(HAS_HIGH_ANALOG_PINS, NUM_ANALOG_INPUTS)) #define isValidPin(P) (WITHIN(P, 0, (NUM_DIGITAL_PINS) - 1) || TERN0(HAS_HIGH_ANALOG_PINS, WITHIN(P, NUM_ANALOG_FIRST, NUM_ANALOG_LAST))) -#define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads +#define digitalRead_mod(A) extDigitalRead(A) // must use Arduino pin numbers when doing reads #define printPinNumber(Q) -#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0) -#define digitalPinToAnalogIndex(ANUM) -1 // will report analog pin number in the print port routine +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) +#define digitalPinToAnalogIndex(P) -1 // will report analog pin number in the print port routine // x is a variable used to search pin_array #define getPinIsDigitalByIndex(x) ((bool) pin_array[x].is_digital) @@ -130,27 +146,27 @@ const XrefInfo pin_xref[] PROGMEM = { // // Pin Mapping for M43 // -#define GET_PIN_MAP_PIN_M43(Index) pin_xref[Index].Ard_num +#define GET_PIN_MAP_PIN_M43(x) pin_xref[x].Ard_num #ifndef M43_NEVER_TOUCH - #define _M43_NEVER_TOUCH(Index) (Index >= 9 && Index <= 12) // SERIAL/USB pins: PA9(TX) PA10(RX) PA11(USB_DM) PA12(USB_DP) + #define _M43_NEVER_TOUCH(x) WITHIN(x, 9, 12) // SERIAL/USB pins: PA9(TX) PA10(RX) PA11(USB_DM) PA12(USB_DP) #ifdef KILL_PIN - #define M43_NEVER_TOUCH(Index) m43_never_touch(Index) + #define M43_NEVER_TOUCH(x) m43_never_touch(x) - bool m43_never_touch(const pin_t Index) { + bool m43_never_touch(const pin_t index) { static pin_t M43_kill_index = -1; if (M43_kill_index < 0) for (M43_kill_index = 0; M43_kill_index < NUMBER_PINS_TOTAL; M43_kill_index++) if (KILL_PIN == GET_PIN_MAP_PIN_M43(M43_kill_index)) break; - return _M43_NEVER_TOUCH(Index) || Index == M43_kill_index; // KILL_PIN and SERIAL/USB + return _M43_NEVER_TOUCH(index) || index == M43_kill_index; // KILL_PIN and SERIAL/USB } #else - #define M43_NEVER_TOUCH(Index) _M43_NEVER_TOUCH(Index) + #define M43_NEVER_TOUCH(index) _M43_NEVER_TOUCH(index) #endif #endif -uint8_t get_pin_mode(const pin_t Ard_num) { - const PinName dp = digitalPinToPinName(Ard_num); +uint8_t get_pin_mode(const pin_t pin) { + const PinName dp = digitalPinToPinName(pin); uint32_t ll_pin = STM_LL_GPIO_PIN(dp); GPIO_TypeDef *port = get_GPIO_Port(STM_PORT(dp)); uint32_t mode = LL_GPIO_GetPinMode(port, ll_pin); @@ -164,41 +180,41 @@ uint8_t get_pin_mode(const pin_t Ard_num) { } } -bool getValidPinMode(const pin_t Ard_num) { - const uint8_t pin_mode = get_pin_mode(Ard_num); +bool getValidPinMode(const pin_t pin) { + const uint8_t pin_mode = get_pin_mode(pin); return pin_mode == MODE_PIN_OUTPUT || pin_mode == MODE_PIN_ALT; // assume all alt definitions are PWM } -int8_t digital_pin_to_analog_pin(const pin_t Ard_num) { - if (WITHIN(Ard_num, NUM_ANALOG_FIRST, NUM_ANALOG_LAST)) - return Ard_num - NUM_ANALOG_FIRST; +int8_t digital_pin_to_analog_pin(const pin_t pin) { + if (WITHIN(pin, NUM_ANALOG_FIRST, NUM_ANALOG_LAST)) + return pin - NUM_ANALOG_FIRST; - const int8_t ind = digitalPinToAnalogIndex(Ard_num); + const int8_t ind = digitalPinToAnalogIndex(pin); return (ind < NUM_ANALOG_INPUTS) ? ind : -1; } -bool isAnalogPin(const pin_t Ard_num) { - return get_pin_mode(Ard_num) == MODE_PIN_ANALOG; +bool isAnalogPin(const pin_t pin) { + return get_pin_mode(pin) == MODE_PIN_ANALOG; } -bool is_digital(const pin_t Ard_num) { - const uint8_t pin_mode = get_pin_mode(pin_array[Ard_num].pin); +bool is_digital(const pin_t pin) { + const uint8_t pin_mode = get_pin_mode(pin_array[pin].pin); return pin_mode == MODE_PIN_INPUT || pin_mode == MODE_PIN_OUTPUT; } -void printPinPort(const pin_t Ard_num) { +void printPinPort(const pin_t pin) { char buffer[16]; - pin_t Index; - for (Index = 0; Index < NUMBER_PINS_TOTAL; Index++) - if (Ard_num == GET_PIN_MAP_PIN_M43(Index)) break; + pin_t index; + for (index = 0; index < NUMBER_PINS_TOTAL; index++) + if (pin == GET_PIN_MAP_PIN_M43(index)) break; - const char * ppa = pin_xref[Index].Port_pin_alpha; + const char * ppa = pin_xref[index].Port_pin_alpha; sprintf_P(buffer, PSTR("%s"), ppa); SERIAL_ECHO(buffer); if (ppa[3] == '\0') SERIAL_CHAR(' '); // print analog pin number - const int8_t Port_pin = digital_pin_to_analog_pin(Ard_num); + const int8_t Port_pin = digital_pin_to_analog_pin(pin); if (Port_pin >= 0) { sprintf_P(buffer, PSTR(" (A%d) "), Port_pin); SERIAL_ECHO(buffer); @@ -208,8 +224,8 @@ void printPinPort(const pin_t Ard_num) { SERIAL_ECHO_SP(7); // Print number to be used with M42 - int calc_p = Ard_num; - if (Ard_num > NUM_DIGITAL_PINS) { + int calc_p = pin; + if (pin > NUM_DIGITAL_PINS) { calc_p -= NUM_ANALOG_FIRST; if (calc_p > 7) calc_p += 8; } @@ -222,15 +238,15 @@ void printPinPort(const pin_t Ard_num) { } } -bool pwm_status(const pin_t Ard_num) { - return get_pin_mode(Ard_num) == MODE_PIN_ALT; +bool pwm_status(const pin_t pin) { + return get_pin_mode(pin) == MODE_PIN_ALT; } -void printPinPWM(const pin_t Ard_num) { +void printPinPWM(const pin_t pin) { #ifndef STM32F1xx - if (pwm_status(Ard_num)) { + if (pwm_status(pin)) { uint32_t alt_all = 0; - const PinName dp = digitalPinToPinName(Ard_num); + const PinName dp = digitalPinToPinName(pin); pin_t pin_number = uint8_t(PIN_NUM(dp)); const bool over_7 = pin_number >= 8; const uint8_t ind = over_7 ? 1 : 0; diff --git a/firmware/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp b/firmware/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp index e508f90..bb011ec 100644 --- a/firmware/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp +++ b/firmware/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp @@ -111,11 +111,11 @@ void TFT_FSMC::init() { HAL_SRAM_Init(&SRAMx, &timing, &extTiming); + __HAL_RCC_DMA2_CLK_ENABLE(); + #ifdef STM32F1xx - __HAL_RCC_DMA1_CLK_ENABLE(); - DMAtx.Instance = DMA1_Channel1; + DMAtx.Instance = DMA2_Channel1; #elif defined(STM32F4xx) - __HAL_RCC_DMA2_CLK_ENABLE(); DMAtx.Instance = DMA2_Stream0; DMAtx.Init.Channel = DMA_CHANNEL_0; DMAtx.Init.FIFOMode = DMA_FIFOMODE_ENABLE; diff --git a/firmware/Marlin/src/HAL/STM32F1/HAL.h b/firmware/Marlin/src/HAL/STM32F1/HAL.h index 0266b79..e80ced8 100644 --- a/firmware/Marlin/src/HAL/STM32F1/HAL.h +++ b/firmware/Marlin/src/HAL/STM32F1/HAL.h @@ -118,14 +118,14 @@ #endif #endif -#ifdef MMU2_SERIAL_PORT - #if MMU2_SERIAL_PORT == -1 - #define MMU2_SERIAL UsbSerial - #elif WITHIN(MMU2_SERIAL_PORT, 1, NUM_UARTS) - #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) +#ifdef MMU_SERIAL_PORT + #if MMU_SERIAL_PORT == -1 + #define MMU_SERIAL UsbSerial + #elif WITHIN(MMU_SERIAL_PORT, 1, NUM_UARTS) + #define MMU_SERIAL MSERIAL(MMU_SERIAL_PORT) #else - #define MMU2_SERIAL MSERIAL(1) // dummy port - static_assert(false, "MMU2_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") + #define MMU_SERIAL MSERIAL(1) // dummy port + static_assert(false, "MMU_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") #endif #endif diff --git a/firmware/Marlin/src/HAL/STM32F1/pinsDebug.h b/firmware/Marlin/src/HAL/STM32F1/pinsDebug.h index ab8bc88..9191614 100644 --- a/firmware/Marlin/src/HAL/STM32F1/pinsDebug.h +++ b/firmware/Marlin/src/HAL/STM32F1/pinsDebug.h @@ -22,11 +22,23 @@ #pragma once /** - * Support routines for MAPLE_STM32F1 - */ - -/** - * Translation of routines & variables used by pinsDebug.h + * Pins Debugging for Maple STM32F1 + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) */ #ifndef BOARD_NR_GPIO_PINS // Only in MAPLE_STM32F1 @@ -39,11 +51,11 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS]; #define NUM_DIGITAL_PINS BOARD_NR_GPIO_PINS #define NUMBER_PINS_TOTAL BOARD_NR_GPIO_PINS -#define isValidPin(pin) (pin >= 0 && pin < BOARD_NR_GPIO_PINS) -#define getPinByIndex(p) pin_t(pin_array[p].pin) -#define digitalRead_mod(p) extDigitalRead(p) -#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); SERIAL_ECHO(buffer); }while(0) -#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0) +#define isValidPin(P) (P >= 0 && P < BOARD_NR_GPIO_PINS) +#define getPinByIndex(x) pin_t(pin_array[x].pin) +#define digitalRead_mod(P) extDigitalRead(P) +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(P)); SERIAL_ECHO(buffer); }while(0) +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 21 // space needed to be pretty if not first name assigned to a pin @@ -78,8 +90,8 @@ bool getValidPinMode(const pin_t pin) { return isValidPin(pin) && !IS_INPUT(pin); } -bool getPinIsDigitalByIndex(const int16_t array_pin) { - const pin_t pin = getPinByIndex(array_pin); +bool getPinIsDigitalByIndex(const int16_t index) { + const pin_t pin = getPinByIndex(index); return (!isAnalogPin(pin) #ifdef NUM_ANALOG_INPUTS || PIN_MAP[pin].adc_channel >= NUM_ANALOG_INPUTS diff --git a/firmware/Marlin/src/HAL/TEENSY31_32/pinsDebug.h b/firmware/Marlin/src/HAL/TEENSY31_32/pinsDebug.h index d4a91ce..741909b 100644 --- a/firmware/Marlin/src/HAL/TEENSY31_32/pinsDebug.h +++ b/firmware/Marlin/src/HAL/TEENSY31_32/pinsDebug.h @@ -1 +1,71 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 + #error "PINS_DEBUGGING is not yet supported for Teensy 3.1 / 3.2!" + +/** + * Pins Debugging for ESP32 + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) + */ + +#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS +#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin + +#define digitalRead_mod(P) extDigitalRead(P) +#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%02d"), P); SERIAL_ECHO(buffer); }while(0) +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) +#define getPinByIndex(x) pin_array[x].pin +#define getPinIsDigitalByIndex(x) pin_array[x].is_digital +#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL)) +#define digitalPinToAnalogIndex(P) int(P - analogInputToDigitalPin(0)) +#define isAnalogPin(P) WITHIN(P, pin_t(analogInputToDigitalPin(0)), pin_t(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1))) +bool pwm_status(const pin_t) { return false; } + +void printPinPort(const pin_t) {} + +static bool getValidPinMode(const pin_t pin) { + return isValidPin(pin) /* && !IS_INPUT(pin) */ ; +} + +void printPinPWM(const int32_t pin) { + if (pwm_status(pin)) { + //uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative; + //SERIAL_ECHOPGM("PWM = ", duty); + } +} diff --git a/firmware/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h b/firmware/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h index 843905a..8f2651d 100644 --- a/firmware/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h +++ b/firmware/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h @@ -48,3 +48,7 @@ #if USING_PULLDOWNS #error "PULLDOWN pin mode is not available for Teensy 3.5/3.6." #endif + +#if ENABLED(PINS_DEBUGGING) + #error "PINS_DEBUGGING is not yet supported for Teensy 3.5/3.6. Needs is_output(pin), etc." +#endif diff --git a/firmware/Marlin/src/HAL/TEENSY35_36/pinsDebug.h b/firmware/Marlin/src/HAL/TEENSY35_36/pinsDebug.h index 34efc18..f0f61b8 100644 --- a/firmware/Marlin/src/HAL/TEENSY35_36/pinsDebug.h +++ b/firmware/Marlin/src/HAL/TEENSY35_36/pinsDebug.h @@ -22,7 +22,23 @@ #pragma once /** - * HAL Pins Debugging for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0) + * Pins Debugging for Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0) + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) */ #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS @@ -53,6 +69,15 @@ #define TPM1_CH1_PIN 17 #endif +#define getPinByIndex(x) pin_array[x].pin +#define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) +#define getPinIsDigitalByIndex(x) pin_array[x].is_digital +#define digitalPinToAnalogIndex(P) int(P - analogInputToDigitalPin(0)) +#define getValidPinMode(P) (isValidPin(P) && IS_OUTPUT(P)) +#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL)) +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%02d"), P); SERIAL_ECHO(buffer); }while(0) +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) + #define isAnalogPin(P) ((P) >= analogInputToDigitalPin(0) && (P) <= analogInputToDigitalPin(9)) || ((P) >= analogInputToDigitalPin(12) && (P) <= analogInputToDigitalPin(20)) void printAnalogPin(char buffer[], int8_t pin) { @@ -77,7 +102,7 @@ void analog_pin_state(char buffer[], int8_t pin) { * Print a pin's PWM status. * Return true if it's currently a PWM pin. */ -bool pwm_status(int8_t pin) { +bool pwm_status(const int8_t pin) { char buffer[20]; // for the sprintf statements switch (pin) { FTM_CASE(0,0); @@ -108,4 +133,6 @@ bool pwm_status(int8_t pin) { SERIAL_ECHOPGM(" "); } -void printPinPWM(uint8_t pin) { /* TODO */ } +void printPinPWM(const pin_t) { /* TODO */ } + +void printPinPort(const pin_t) {} diff --git a/firmware/Marlin/src/HAL/TEENSY40_41/pinsDebug.h b/firmware/Marlin/src/HAL/TEENSY40_41/pinsDebug.h index 4056549..3307b3f 100644 --- a/firmware/Marlin/src/HAL/TEENSY40_41/pinsDebug.h +++ b/firmware/Marlin/src/HAL/TEENSY40_41/pinsDebug.h @@ -22,25 +22,40 @@ #pragma once /** - * HAL Pins Debugging for Teensy 4.0 (IMXRT1062DVL6A) / 4.1 (IMXRT1062DVJ6A) + * Pins Debugging for Teensy 4.0 (IMXRT1062DVL6A) / 4.1 (IMXRT1062DVJ6A) + * + * - NUMBER_PINS_TOTAL + * - MULTI_NAME_PAD + * - getPinByIndex(index) + * - printPinNameByIndex(index) + * - getPinIsDigitalByIndex(index) + * - digitalPinToAnalogIndex(pin) + * - getValidPinMode(pin) + * - isValidPin(pin) + * - isAnalogPin(pin) + * - digitalRead_mod(pin) + * - pwm_status(pin) + * - printPinPWM(pin) + * - printPinPort(pin) + * - printPinNumber(pin) + * - printPinAnalog(pin) */ #warning "PINS_DEBUGGING is not fully supported for Teensy 4.0 / 4.1 so 'M43' may cause hangs." #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS -#define digitalRead_mod(p) extDigitalRead(p) // AVR digitalRead disabled PWM before it read the pin +#define getPinByIndex(x) pin_array[x].pin #define printPinNameByIndex(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) -#define printPinNumber(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0) -#define printPinAnalog(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(pin)); SERIAL_ECHO(buffer); }while(0) -#define getPinByIndex(p) pin_array[p].pin -#define getPinIsDigitalByIndex(p) pin_array[p].is_digital -#define isValidPin(pin) (pin >= 0 && pin < int8_t(NUMBER_PINS_TOTAL)) -#define digitalPinToAnalogIndex(p) int(p - analogInputToDigitalPin(0)) -#define getValidPinMode(PIN) (isValidPin(pin) && IS_OUTPUT(pin)) -#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin - +#define getPinIsDigitalByIndex(x) pin_array[x].is_digital +#define digitalPinToAnalogIndex(P) int(P - analogInputToDigitalPin(0)) +#define getValidPinMode(P) (isValidPin(P) && IS_OUTPUT(P)) +#define isValidPin(P) (P >= 0 && P < pin_t(NUMBER_PINS_TOTAL)) #define isAnalogPin(P) (pin_t(P) >= analogInputToDigitalPin(0) && pin_t(P) <= analogInputToDigitalPin(13)) || (pin_t(P) >= analogInputToDigitalPin(14) && pin_t(P) <= analogInputToDigitalPin(17)) +#define digitalRead_mod(P) extDigitalRead(P) // AVR digitalRead disabled PWM before it read the pin +#define printPinNumber(P) do{ sprintf_P(buffer, PSTR("%02d"), P); SERIAL_ECHO(buffer); }while(0) +#define printPinAnalog(P) do{ sprintf_P(buffer, PSTR(" (A%2d) "), digitalPinToAnalogIndex(P)); SERIAL_ECHO(buffer); }while(0) +#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin struct pwm_pin_info_struct { uint8_t type; // 0=no pwm, 1=flexpwm, 2=quad diff --git a/firmware/Marlin/src/HAL/platforms.h b/firmware/Marlin/src/HAL/platforms.h index 9eaf7ce..36fb792 100644 --- a/firmware/Marlin/src/HAL/platforms.h +++ b/firmware/Marlin/src/HAL/platforms.h @@ -54,6 +54,8 @@ #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/SAMD51/NAME) #elif defined(__SAMD21__) #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/SAMD21/NAME) +#elif defined(__PLAT_RP2040__) + #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/RP2040/NAME) #else #error "Unsupported Platform!" #endif diff --git a/firmware/Marlin/src/HAL/shared/servo.h b/firmware/Marlin/src/HAL/shared/servo.h index 786c1e6..fa75445 100644 --- a/firmware/Marlin/src/HAL/shared/servo.h +++ b/firmware/Marlin/src/HAL/shared/servo.h @@ -82,13 +82,15 @@ #include "../STM32/Servo.h" #elif defined(ARDUINO_ARCH_ESP32) #include "../ESP32/Servo.h" +#elif defined(__PLAT_RP2040__) + #include "../RP2040/Servo.h" #else #include - #if defined(__AVR__) || defined(ARDUINO_ARCH_SAM) || defined(__SAMD51__) || defined(__SAMD21__) + #if defined(__AVR__) || defined(ARDUINO_ARCH_SAM) || defined(__SAMD51__) || defined(__SAMD21__) || defined(__PLAT_RP2040__) // we're good to go #else - #error "This library only supports boards with an AVR, SAM3X, SAMD21 or SAMD51 processor." + #error "This library only supports boards with an AVR, SAM3X, SAMD21, SAMD51, or RP2040 processor." #endif #define Servo_VERSION 2 // software version of this library diff --git a/firmware/Marlin/src/MarlinCore.cpp b/firmware/Marlin/src/MarlinCore.cpp index 740e053..140423f 100644 --- a/firmware/Marlin/src/MarlinCore.cpp +++ b/firmware/Marlin/src/MarlinCore.cpp @@ -79,6 +79,8 @@ #include "lcd/e3v2/creality/dwin.h" #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) #include "lcd/e3v2/jyersui/dwin.h" + #elif ENABLED(SOVOL_SV06_RTS) + #include "lcd/sovol_rts/sovol_rts.h" #endif #endif @@ -230,8 +232,8 @@ #endif #if HAS_PRUSA_MMU3 - #include "feature/mmu3/mmu2.h" - #include "feature/mmu3/mmu2_reporting.h" + #include "feature/mmu3/mmu3.h" + #include "feature/mmu3/mmu3_reporting.h" #include "feature/mmu3/SpoolJoin.h" #elif HAS_PRUSA_MMU2 #include "feature/mmu/mmu2.h" @@ -825,7 +827,11 @@ void idle(const bool no_stepper_sleep/*=false*/) { TERN_(HAS_BEEPER, buzzer.tick()); // Handle UI input / draw events - ui.update(); + #if ENABLED(SOVOL_SV06_RTS) + RTS_Update(); + #else + ui.update(); + #endif // Run i2c Position Encoders #if ENABLED(I2C_POSITION_ENCODERS) @@ -1162,6 +1168,12 @@ void setup() { millis_t serial_connect_timeout = millis() + 1000UL; while (!MYSERIAL1.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + #if ENABLED(SOVOL_SV06_RTS) + LCD_SERIAL.begin(BAUDRATE); + serial_connect_timeout = millis() + 1000UL; + while (!LCD_SERIAL.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + #endif + #if HAS_MULTI_SERIAL && !HAS_ETHERNET #ifndef BAUDRATE_2 #define BAUDRATE_2 BAUDRATE @@ -1246,7 +1258,7 @@ void setup() { SETUP_RUN(runout.setup()); #endif - #if HAS_TMC220x + #if HAS_TMC_UART SETUP_RUN(tmc_serial_begin()); #endif @@ -1319,8 +1331,11 @@ void setup() { // UI must be initialized before EEPROM // (because EEPROM code calls the UI). - - SETUP_RUN(ui.init()); + #if ENABLED(SOVOL_SV06_RTS) + SETUP_RUN(RTS_Update()); + #else + SETUP_RUN(ui.init()); + #endif #if PIN_EXISTS(SAFE_POWER) #if HAS_DRIVER_SAFE_POWER_PROTECT @@ -1609,6 +1624,8 @@ void setup() { #if ENABLED(DWIN_CREALITY_LCD) SETUP_RUN(dwinInitScreen()); + #elif ENABLED(SOVOL_SV06_RTS) + SETUP_RUN(rts.init()); #endif #if HAS_SERVICE_INTERVALS && DISABLED(DWIN_CREALITY_LCD) diff --git a/firmware/Marlin/src/core/boards.h b/firmware/Marlin/src/core/boards.h index 710cb8d..f08d69e 100644 --- a/firmware/Marlin/src/core/boards.h +++ b/firmware/Marlin/src/core/boards.h @@ -79,61 +79,58 @@ #define BOARD_MKS_GEN_13 1112 // MKS GEN v1.3 or 1.4 #define BOARD_MKS_GEN_L 1113 // MKS GEN L #define BOARD_KFB_2 1114 // BigTreeTech or BIQU KFB2.0 -#define BOARD_ZRIB_V20 1115 // zrib V2.0 (Chinese RAMPS replica) -#define BOARD_ZRIB_V52 1116 // zrib V5.2 (Chinese RAMPS replica) -#define BOARD_FELIX2 1117 // Felix 2.0+ Electronics Board (RAMPS like) -#define BOARD_RIGIDBOARD 1118 // Invent-A-Part RigidBoard -#define BOARD_RIGIDBOARD_V2 1119 // Invent-A-Part RigidBoard V2 -#define BOARD_SAINSMART_2IN1 1120 // Sainsmart 2-in-1 board -#define BOARD_ULTIMAKER 1121 // Ultimaker -#define BOARD_ULTIMAKER_OLD 1122 // Ultimaker (Older electronics. Pre 1.5.4. This is rare) -#define BOARD_AZTEEG_X3 1123 // Azteeg X3 -#define BOARD_AZTEEG_X3_PRO 1124 // Azteeg X3 Pro -#define BOARD_ULTIMAIN_2 1125 // Ultimainboard 2.x (Uses TEMP_SENSOR 20) -#define BOARD_RUMBA 1126 // Rumba -#define BOARD_RUMBA_RAISE3D 1127 // Raise3D N series Rumba derivative -#define BOARD_RL200 1128 // Rapide Lite 200 (v1, low-cost RUMBA clone with drv) -#define BOARD_FORMBOT_TREX2PLUS 1129 // Formbot T-Rex 2 Plus -#define BOARD_FORMBOT_TREX3 1130 // Formbot T-Rex 3 -#define BOARD_FORMBOT_RAPTOR 1131 // Formbot Raptor -#define BOARD_FORMBOT_RAPTOR2 1132 // Formbot Raptor 2 -#define BOARD_BQ_ZUM_MEGA_3D 1133 // bq ZUM Mega 3D -#define BOARD_MAKEBOARD_MINI 1134 // MakeBoard Mini v2.1.2 by MicroMake -#define BOARD_TRIGORILLA_13 1135 // TriGorilla Anycubic version 1.3-based on RAMPS EFB -#define BOARD_TRIGORILLA_14 1136 // ... Ver 1.4 -#define BOARD_TRIGORILLA_14_11 1137 // ... Rev 1.1 (new servo pin order) -#define BOARD_RAMPS_ENDER_4 1138 // Creality: Ender-4, CR-8 -#define BOARD_RAMPS_CREALITY 1139 // Creality: CR10S, CR20, CR-X -#define BOARD_DAGOMA_F5 1140 // Dagoma F5 -#define BOARD_FYSETC_F6_13 1141 // FYSETC F6 1.3 -#define BOARD_FYSETC_F6_14 1142 // FYSETC F6 1.4 -#define BOARD_DUPLICATOR_I3_PLUS 1143 // Wanhao Duplicator i3 Plus -#define BOARD_VORON 1144 // VORON Design -#define BOARD_TRONXY_V3_1_0 1145 // Tronxy TRONXY-V3-1.0 -#define BOARD_Z_BOLT_X_SERIES 1146 // Z-Bolt X Series -#define BOARD_TT_OSCAR 1147 // TT OSCAR -#define BOARD_OVERLORD 1148 // Overlord/Overlord Pro -#define BOARD_HJC2560C_REV1 1149 // ADIMLab Gantry v1 -#define BOARD_HJC2560C_REV2 1150 // ADIMLab Gantry v2 -#define BOARD_TANGO 1151 // BIQU Tango V1 -#define BOARD_MKS_GEN_L_V2 1152 // MKS GEN L V2 -#define BOARD_MKS_GEN_L_V21 1153 // MKS GEN L V2.1 -#define BOARD_COPYMASTER_3D 1154 // Copymaster 3D -#define BOARD_ORTUR_4 1155 // Ortur 4 -#define BOARD_TENLOG_D3_HERO 1156 // Tenlog D3 Hero IDEX printer -#define BOARD_TENLOG_MB1_V23 1157 // Tenlog D3, D5, D6 IDEX Printer -#define BOARD_RAMPS_S_12_EEFB 1158 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed) -#define BOARD_RAMPS_S_12_EEEB 1159 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed) -#define BOARD_RAMPS_S_12_EFFB 1160 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed) -#define BOARD_LONGER3D_LK1_PRO 1161 // Longer LK1 PRO / Alfawise U20 Pro (PRO version) -#define BOARD_LONGER3D_LKx_PRO 1162 // Longer LKx PRO / Alfawise Uxx Pro (PRO version) -#define BOARD_ZRIB_V53 1163 // Zonestar zrib V5.3 (Chinese RAMPS replica) -#define BOARD_PXMALION_CORE_I3 1164 // Pxmalion Core I3 -#define BOARD_PANOWIN_CUTLASS 1165 // Panowin Cutlass (as found in the Panowin F1) -#define BOARD_KODAMA_BARDO 1166 // Kodama Bardo V1.x (as found in the Kodama Trinus) -#define BOARD_DAGOMA_D6 1167 // Dagoma D6 (as found in the Dagoma DiscoUltimate V2 TMC) -#define BOARD_XTLW_MFF_V1 1168 // XTLW MFF V1.0 -#define BOARD_XTLW_MFF_V2 1169 // XTLW MFF V2.0 +#define BOARD_ZRIB_V20 1115 // Zonestar zrib V2.0 (Chinese RAMPS replica) +#define BOARD_ZRIB_V52 1116 // Zonestar zrib V5.2 (Chinese RAMPS replica) +#define BOARD_ZRIB_V53 1117 // Zonestar zrib V5.3 (Chinese RAMPS replica) +#define BOARD_FELIX2 1118 // Felix 2.0+ Electronics Board (RAMPS like) +#define BOARD_RIGIDBOARD 1119 // Invent-A-Part RigidBoard +#define BOARD_RIGIDBOARD_V2 1120 // Invent-A-Part RigidBoard V2 +#define BOARD_SAINSMART_2IN1 1121 // Sainsmart 2-in-1 board +#define BOARD_ULTIMAKER 1122 // Ultimaker +#define BOARD_ULTIMAKER_OLD 1123 // Ultimaker (Older electronics. Pre 1.5.4. This is rare) +#define BOARD_AZTEEG_X3 1124 // Azteeg X3 +#define BOARD_AZTEEG_X3_PRO 1125 // Azteeg X3 Pro +#define BOARD_ULTIMAIN_2 1126 // Ultimainboard 2.x (Uses TEMP_SENSOR 20) +#define BOARD_RUMBA 1127 // Rumba +#define BOARD_RUMBA_RAISE3D 1128 // Raise3D N series Rumba derivative +#define BOARD_RL200 1129 // Rapide Lite 200 (v1, low-cost RUMBA clone with drv) +#define BOARD_FORMBOT_TREX2PLUS 1130 // Formbot T-Rex 2 Plus +#define BOARD_FORMBOT_TREX3 1131 // Formbot T-Rex 3 +#define BOARD_FORMBOT_RAPTOR 1132 // Formbot Raptor +#define BOARD_FORMBOT_RAPTOR2 1133 // Formbot Raptor 2 +#define BOARD_BQ_ZUM_MEGA_3D 1134 // bq ZUM Mega 3D +#define BOARD_MAKEBOARD_MINI 1135 // MakeBoard Mini v2.1.2 by MicroMake +#define BOARD_TRIGORILLA_13 1136 // TriGorilla Anycubic version 1.3-based on RAMPS EFB +#define BOARD_TRIGORILLA_14 1137 // ... Ver 1.4 +#define BOARD_TRIGORILLA_14_11 1138 // ... Rev 1.1 (new servo pin order) +#define BOARD_RAMPS_ENDER_4 1139 // Creality: Ender-4, CR-8 +#define BOARD_RAMPS_CREALITY 1140 // Creality: CR10S, CR20, CR-X +#define BOARD_DAGOMA_F5 1141 // Dagoma F5 +#define BOARD_DAGOMA_D6 1142 // Dagoma D6 (as found in the Dagoma DiscoUltimate V2 TMC) +#define BOARD_FYSETC_F6_13 1143 // FYSETC F6 1.3 +#define BOARD_FYSETC_F6_14 1144 // FYSETC F6 1.4 +#define BOARD_DUPLICATOR_I3_PLUS 1145 // Wanhao Duplicator i3 Plus +#define BOARD_VORON 1146 // VORON Design +#define BOARD_TRONXY_V3_1_0 1147 // Tronxy TRONXY-V3-1.0 +#define BOARD_Z_BOLT_X_SERIES 1148 // Z-Bolt X Series +#define BOARD_TT_OSCAR 1149 // TT OSCAR +#define BOARD_TANGO 1150 // BIQU Tango V1 +#define BOARD_MKS_GEN_L_V2 1151 // MKS GEN L V2 +#define BOARD_MKS_GEN_L_V21 1152 // MKS GEN L V2.1 +#define BOARD_COPYMASTER_3D 1153 // Copymaster 3D +#define BOARD_ORTUR_4 1154 // Ortur 4 +#define BOARD_TENLOG_D3_HERO 1155 // Tenlog D3 Hero IDEX printer +#define BOARD_TENLOG_MB1_V23 1156 // Tenlog D3, D5, D6 IDEX Printer +#define BOARD_RAMPS_S_12_EEFB 1157 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed) +#define BOARD_RAMPS_S_12_EEEB 1158 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed) +#define BOARD_RAMPS_S_12_EFFB 1159 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed) +#define BOARD_LONGER3D_LK1_PRO 1160 // Longer LK1 PRO / Alfawise U20 Pro (PRO version) +#define BOARD_LONGER3D_LKx_PRO 1161 // Longer LKx PRO / Alfawise Uxx Pro (PRO version) +#define BOARD_PXMALION_CORE_I3 1162 // Pxmalion Core I3 +#define BOARD_PANOWIN_CUTLASS 1163 // Panowin Cutlass (as found in the Panowin F1) +#define BOARD_KODAMA_BARDO 1164 // Kodama Bardo V1.x (as found in the Kodama Trinus) +#define BOARD_XTLW_MFF_V1 1165 // XTLW MFF V1.0 +#define BOARD_XTLW_MFF_V2 1166 // XTLW MFF V2.0 // // RAMBo and derivatives @@ -169,20 +166,23 @@ #define BOARD_GT2560_REV_A_PLUS 1315 // Geeetech GT2560 Rev A+ (with auto level probe) #define BOARD_GT2560_REV_B 1316 // Geeetech GT2560 Rev B #define BOARD_GT2560_V3 1317 // Geeetech GT2560 Rev B for A10(M/T/D) -#define BOARD_GT2560_V4 1318 // Geeetech GT2560 Rev B for A10(M/T/D) -#define BOARD_GT2560_V3_MC2 1319 // Geeetech GT2560 Rev B for Mecreator2 -#define BOARD_GT2560_V3_A20 1320 // Geeetech GT2560 Rev B for A20(M/T/D) -#define BOARD_EINSTART_S 1321 // Einstart retrofit -#define BOARD_WANHAO_ONEPLUS 1322 // Wanhao 0ne+ i3 Mini -#define BOARD_LEAPFROG_XEED2015 1323 // Leapfrog Xeed 2015 -#define BOARD_PICA_REVB 1324 // PICA Shield (original version) -#define BOARD_PICA 1325 // PICA Shield (rev C or later) -#define BOARD_INTAMSYS40 1326 // Intamsys 4.0 (Funmat HT) -#define BOARD_MALYAN_M180 1327 // Malyan M180 Mainboard Version 2 (no display function, direct G-code only) -#define BOARD_GT2560_V4_A20 1328 // Geeetech GT2560 Rev B for A20(M/T/D) -#define BOARD_PROTONEER_CNC_SHIELD_V3 1329 // Mega controller & Protoneer CNC Shield V3.00 -#define BOARD_WEEDO_62A 1330 // WEEDO 62A board (TINA2, Monoprice Cadet, etc.) -#define BOARD_GT2560_V41B 1331 // Geeetech GT2560 V4.1B for A10(M/T/D) +#define BOARD_GT2560_V3_MC2 1318 // Geeetech GT2560 Rev B for Mecreator2 +#define BOARD_GT2560_V3_A20 1319 // Geeetech GT2560 Rev B for A20(M/T/D) +#define BOARD_GT2560_V4 1320 // Geeetech GT2560 Rev B for A10(M/T/D) +#define BOARD_GT2560_V4_A20 1321 // Geeetech GT2560 Rev B for A20(M/T/D) +#define BOARD_GT2560_V41B 1322 // Geeetech GT2560 V4.1B for A10(M/T/D) +#define BOARD_EINSTART_S 1323 // Einstart retrofit +#define BOARD_WANHAO_ONEPLUS 1324 // Wanhao 0ne+ i3 Mini +#define BOARD_OVERLORD 1325 // Overlord/Overlord Pro +#define BOARD_HJC2560C_REV1 1326 // ADIMLab Gantry v1 +#define BOARD_HJC2560C_REV2 1327 // ADIMLab Gantry v2 +#define BOARD_LEAPFROG_XEED2015 1328 // Leapfrog Xeed 2015 +#define BOARD_PICA_REVB 1329 // PICA Shield (original version) +#define BOARD_PICA 1330 // PICA Shield (rev C or later) +#define BOARD_INTAMSYS40 1331 // Intamsys 4.0 (Funmat HT) +#define BOARD_MALYAN_M180 1332 // Malyan M180 Mainboard Version 2 (no display function, direct G-code only) +#define BOARD_PROTONEER_CNC_SHIELD_V3 1333 // Mega controller & Protoneer CNC Shield V3.00 +#define BOARD_WEEDO_62A 1334 // WEEDO 62A board (TINA2, Monoprice Cadet, etc.) // // ATmega1281, ATmega2561 @@ -328,6 +328,7 @@ #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) +#define BOARD_BTT_SKRAT_V1_0 4007 // BigTreeTech SKRat V1.0 (STM32G0B1VE) // // STM32 ARM Cortex-M3 @@ -339,62 +340,62 @@ #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) CR-FDM-v2.4.S1_v101 as found in the Ender-7 -#define BOARD_CREALITY_V24S1_301 5054 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) CR-FDM-v24S1_301 as found in the Ender-3 S1 -#define BOARD_CREALITY_V25S1 5055 // Creality v2.5.S1 (STM32F103RE) CR-FDM-v2.5.S1_100 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_GTM32_PRO_VD 5006 // STM32F103VE controller +#define BOARD_GTM32_MINI 5007 // STM32F103VE controller +#define BOARD_GTM32_MINI_A30 5008 // STM32F103VE controller +#define BOARD_GTM32_REV_B 5009 // STM32F103VE controller +#define BOARD_MORPHEUS 5010 // STM32F103C8 / STM32F103CB Libmaple-based STM32F1 controller +#define BOARD_CHITU3D 5011 // Chitu3D (STM32F103RE) +#define BOARD_MKS_ROBIN 5012 // MKS Robin (STM32F103ZE) +#define BOARD_MKS_ROBIN_MINI 5013 // MKS Robin Mini (STM32F103VE) +#define BOARD_MKS_ROBIN_NANO 5014 // MKS Robin Nano (STM32F103VE) +#define BOARD_MKS_ROBIN_NANO_V2 5015 // MKS Robin Nano V2 (STM32F103VE) +#define BOARD_MKS_ROBIN_LITE 5016 // MKS Robin Lite/Lite2 (STM32F103RC) +#define BOARD_MKS_ROBIN_LITE3 5017 // MKS Robin Lite3 (STM32F103RC) +#define BOARD_MKS_ROBIN_PRO 5018 // MKS Robin Pro (STM32F103ZE) +#define BOARD_MKS_ROBIN_E3 5019 // MKS Robin E3 (STM32F103RC) +#define BOARD_MKS_ROBIN_E3_V1_1 5020 // MKS Robin E3 V1.1 (STM32F103RC) +#define BOARD_MKS_ROBIN_E3D 5021 // MKS Robin E3D (STM32F103RC) +#define BOARD_MKS_ROBIN_E3D_V1_1 5022 // MKS Robin E3D V1.1 (STM32F103RC) +#define BOARD_MKS_ROBIN_E3P 5023 // MKS Robin E3P (STM32F103VE) +#define BOARD_BTT_SKR_MINI_V1_1 5024 // BigTreeTech SKR Mini v1.1 (STM32F103RC) +#define BOARD_BTT_SKR_MINI_E3_V1_0 5025 // BigTreeTech SKR Mini E3 (STM32F103RC) +#define BOARD_BTT_SKR_MINI_E3_V1_2 5026 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC) +#define BOARD_BTT_SKR_MINI_E3_V2_0 5027 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC / STM32F103RE) +#define BOARD_BTT_SKR_MINI_MZ_V1_0 5028 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC) +#define BOARD_BTT_SKR_E3_DIP 5029 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE) +#define BOARD_BTT_SKR_CR6 5030 // BigTreeTech SKR CR6 v1.0 (STM32F103RE) +#define BOARD_JGAURORA_A5S_A1 5031 // JGAurora A5S A1 (STM32F103ZE) +#define BOARD_FYSETC_AIO_II 5032 // FYSETC AIO_II (STM32F103RC) +#define BOARD_FYSETC_CHEETAH 5033 // FYSETC Cheetah (STM32F103RC) +#define BOARD_FYSETC_CHEETAH_V12 5034 // FYSETC Cheetah V1.2 (STM32F103RC) +#define BOARD_LONGER3D_LK 5035 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE) +#define BOARD_CCROBOT_MEEB_3DP 5036 // ccrobot-online.com MEEB_3DP (STM32F103RC) +#define BOARD_CHITU3D_V5 5037 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE) +#define BOARD_CHITU3D_V6 5038 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE) +#define BOARD_CHITU3D_V9 5039 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE) +#define BOARD_CREALITY_V4 5040 // Creality v4.x (STM32F103RC / STM32F103RE) +#define BOARD_CREALITY_V422 5041 // Creality v4.2.2 (STM32F103RC / STM32F103RE) +#define BOARD_CREALITY_V423 5042 // Creality v4.2.3 (STM32F103RC / STM32F103RE) +#define BOARD_CREALITY_V425 5043 // Creality v4.2.5 (STM32F103RC / STM32F103RE) +#define BOARD_CREALITY_V427 5044 // Creality v4.2.7 (STM32F103RC / STM32F103RE) +#define BOARD_CREALITY_V4210 5045 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30 +#define BOARD_CREALITY_V431 5046 // Creality v4.3.1 (STM32F103RC / STM32F103RE) +#define BOARD_CREALITY_V431_A 5047 // Creality v4.3.1a (STM32F103RC / STM32F103RE) +#define BOARD_CREALITY_V431_B 5048 // Creality v4.3.1b (STM32F103RC / STM32F103RE) +#define BOARD_CREALITY_V431_C 5049 // Creality v4.3.1c (STM32F103RC / STM32F103RE) +#define BOARD_CREALITY_V431_D 5050 // Creality v4.3.1d (STM32F103RC / STM32F103RE) +#define BOARD_CREALITY_V452 5051 // Creality v4.5.2 (STM32F103RC / STM32F103RE) +#define BOARD_CREALITY_V453 5052 // Creality v4.5.3 (STM32F103RC / STM32F103RE) +#define BOARD_CREALITY_V521 5053 // Creality v5.2.1 (STM32F103VE) as found in the SV04 +#define BOARD_CREALITY_V24S1 5054 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) CR-FDM-v2.4.S1_v101 as found in the Ender-7 +#define BOARD_CREALITY_V24S1_301 5055 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) CR-FDM-v24S1_301 as found in the Ender-3 S1 +#define BOARD_CREALITY_V25S1 5056 // Creality v2.5.S1 (STM32F103RE) CR-FDM-v2.5.S1_100 as found in the CR-10 Smart Pro +#define BOARD_TRIGORILLA_PRO 5057 // Trigorilla Pro (STM32F103ZE) +#define BOARD_FLY_MINI 5058 // FLYmaker FLY MINI (STM32F103RC) +#define BOARD_FLSUN_HISPEED 5059 // FLSUN HiSpeedV1 (STM32F103VE) +#define BOARD_BEAST 5060 // STM32F103RE Libmaple-based controller +#define BOARD_MINGDA_MPX_ARM_MINI 5061 // STM32F103ZE Mingda MD-16 #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) @@ -423,8 +424,8 @@ #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_BLACK_STM32F407VE 5205 // Black STM32F407VE development board +#define BOARD_BLACK_STM32F407ZE 5206 // Black STM32F407ZE development board #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) @@ -442,35 +443,36 @@ #define BOARD_FYSETC_S6 5221 // FYSETC S6 (STM32F446VE) #define BOARD_FYSETC_S6_V2_0 5222 // FYSETC S6 v2.0 (STM32F446VE) #define BOARD_FYSETC_SPIDER 5223 // FYSETC Spider (STM32F446VE) -#define BOARD_FLYF407ZG 5224 // FLYmaker FLYF407ZG (STM32F407ZG) -#define BOARD_MKS_ROBIN2 5225 // MKS Robin2 V1.0 (STM32F407ZE) -#define BOARD_MKS_ROBIN_PRO_V2 5226 // MKS Robin Pro V2 (STM32F407VE) -#define BOARD_MKS_ROBIN_NANO_V3 5227 // MKS Robin Nano V3 (STM32F407VG) -#define BOARD_MKS_ROBIN_NANO_V3_1 5228 // MKS Robin Nano V3.1 (STM32F407VE) -#define BOARD_MKS_MONSTER8_V1 5229 // MKS Monster8 V1 (STM32F407VE) -#define BOARD_MKS_MONSTER8_V2 5230 // MKS Monster8 V2 (STM32F407VE) -#define BOARD_ANET_ET4 5231 // ANET ET4 V1.x (STM32F407VG) -#define BOARD_ANET_ET4P 5232 // ANET ET4P V1.x (STM32F407VG) -#define BOARD_FYSETC_CHEETAH_V20 5233 // FYSETC Cheetah V2.0 (STM32F401RC) -#define BOARD_TH3D_EZBOARD_V2 5234 // TH3D EZBoard v2.0 (STM32F405RG) -#define BOARD_OPULO_LUMEN_REV3 5235 // Opulo Lumen PnP Controller REV3 (STM32F407VE / STM32F407VG) -#define BOARD_MKS_ROBIN_NANO_V1_3_F4 5236 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VE) -#define BOARD_MKS_EAGLE 5237 // MKS Eagle (STM32F407VE) -#define BOARD_ARTILLERY_RUBY 5238 // Artillery Ruby (STM32F401RC) -#define BOARD_FYSETC_SPIDER_V2_2 5239 // FYSETC Spider V2.2 (STM32F446VE) -#define BOARD_CREALITY_V24S1_301F4 5240 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4 -#define BOARD_CREALITY_CR4NTXXC10 5241 // Creality E3 Free-runs Silent Motherboard (STM32F401RET6) -#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_CXY_446_V10 5245 // TRONXY CXY-446-V10-220413/CXY-V6-191121 (STM32F446ZE) -#define BOARD_CREALITY_F401RE 5246 // Creality CR4NS200141C13 (STM32F401RE) as found in the Ender-5 S1 -#define BOARD_BLACKPILL_CUSTOM 5247 // Custom board based on STM32F401CDU6. -#define BOARD_I3DBEEZ9_V1 5248 // I3DBEEZ9 V1 (STM32F407ZG) -#define BOARD_MELLOW_FLY_E3_V2 5249 // Mellow Fly E3 V2 (STM32F407VG) -#define BOARD_FYSETC_CHEETAH_V30 5250 // FYSETC Cheetah V3.0 (STM32F446RC) +#define BOARD_FYSETC_SPIDER_V2_2 5224 // FYSETC Spider V2.2 (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_FYSETC_CHEETAH_V30 5235 // FYSETC Cheetah V3.0 (STM32F446RC) +#define BOARD_TH3D_EZBOARD_V2 5236 // TH3D EZBoard v2.0 (STM32F405RG) +#define BOARD_OPULO_LUMEN_REV3 5237 // Opulo Lumen PnP Controller REV3 (STM32F407VE / STM32F407VG) +#define BOARD_MKS_ROBIN_NANO_V1_3_F4 5238 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VE) +#define BOARD_MKS_EAGLE 5239 // MKS Eagle (STM32F407VE) +#define BOARD_ARTILLERY_RUBY 5240 // Artillery Ruby (STM32F401RC) +#define BOARD_CREALITY_V24S1_301F4 5241 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4 +#define BOARD_CREALITY_CR4NTXXC10 5242 // Creality E3 Free-runs Silent Motherboard (STM32F401RET6) +#define BOARD_OPULO_LUMEN_REV4 5243 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG) +#define BOARD_FYSETC_SPIDER_KING407 5244 // FYSETC Spider King407 (STM32F407ZG) +#define BOARD_MKS_SKIPR_V1 5245 // MKS SKIPR v1.0 all-in-one board (STM32F407VE) +#define BOARD_TRONXY_CXY_446_V10 5246 // TRONXY CXY-446-V10-220413/CXY-V6-191121 (STM32F446ZE) +#define BOARD_CREALITY_F401RE 5247 // Creality CR4NS200141C13 (STM32F401RE) as found in the Ender-5 S1 +#define BOARD_BLACKPILL_CUSTOM 5248 // Custom board based on STM32F401CDU6. +#define BOARD_I3DBEEZ9_V1 5249 // I3DBEEZ9 V1 (STM32F407ZG) +#define BOARD_MELLOW_FLY_E3_V2 5250 // Mellow Fly E3 V2 (STM32F407VG) #define BOARD_BLACKBEEZMINI_V1 5251 // BlackBeezMini V1 (STM32F401CCU6) #define BOARD_XTLW_CLIMBER_8TH 5252 // XTLW Climber-8th (STM32F407VGT6) +#define BOARD_FLY_RRF_E3_V1 5253 // Fly RRF E3 V1.0 (STM32F407VG) // // Other ARM Cortex-M4 @@ -482,18 +484,18 @@ // #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 (STM32H743VI / STM32H723VG) -#define BOARD_BTT_SKR_V3_0_EZ 6007 // BigTreeTech SKR V3.0 EZ (STM32H743VI / STM32H723VG) -#define BOARD_BTT_OCTOPUS_MAX_EZ_V1_0 6008 // BigTreeTech Octopus Max EZ V1.0 (STM32H723ZE) -#define BOARD_BTT_OCTOPUS_PRO_V1_0_1 6009 // BigTreeTech Octopus Pro v1.0.1 (STM32H723ZE) -#define BOARD_BTT_OCTOPUS_PRO_V1_1 6010 // BigTreeTech Octopus Pro v1.1 (STM32H723ZE) -#define BOARD_BTT_MANTA_M8P_V2_0 6011 // BigTreeTech Manta M8P V2.0 (STM32H723ZE) -#define BOARD_BTT_KRAKEN_V1_0 6012 // BigTreeTech Kraken v1.0 (STM32H723ZG) +#define BOARD_NUCLEO_F767ZI 6001 // ST NUCLEO-F767ZI Dev Board +#define BOARD_BTT_SKR_SE_BX_V2 6002 // BigTreeTech SKR SE BX V2.0 (STM32H743II) +#define BOARD_BTT_SKR_SE_BX_V3 6003 // BigTreeTech SKR SE BX V3.0 (STM32H743II) +#define BOARD_BTT_SKR_V3_0 6004 // BigTreeTech SKR V3.0 (STM32H743VI / STM32H723VG) +#define BOARD_BTT_SKR_V3_0_EZ 6005 // BigTreeTech SKR V3.0 EZ (STM32H743VI / STM32H723VG) +#define BOARD_BTT_OCTOPUS_MAX_EZ_V1_0 6006 // BigTreeTech Octopus Max EZ V1.0 (STM32H723ZE) +#define BOARD_BTT_OCTOPUS_PRO_V1_0_1 6007 // BigTreeTech Octopus Pro v1.0.1 (STM32H723ZE) +#define BOARD_BTT_OCTOPUS_PRO_V1_1 6008 // BigTreeTech Octopus Pro v1.1 (STM32H723ZE) +#define BOARD_BTT_MANTA_M8P_V2_0 6009 // BigTreeTech Manta M8P V2.0 (STM32H723ZE) +#define BOARD_BTT_KRAKEN_V1_0 6010 // BigTreeTech Kraken v1.0 (STM32H723ZG) +#define BOARD_TEENSY41 6011 // Teensy 4.1 +#define BOARD_T41U5XBB 6012 // T41U5XBB Teensy 4.1 breakout board // // Espressif ESP32 WiFi @@ -533,6 +535,13 @@ #define BOARD_AQUILA_V101 7200 // Voxelab Aquila V1.0.0/V1.0.1/V1.0.2/V1.0.3 as found in the Voxelab Aquila X2 and C2 #define BOARD_CREALITY_ENDER2P_V24S4 7201 // Creality Ender 2 Pro v2.4.S4_170 (HC32f460kcta) +// +// Raspberry Pi +// + +#define BOARD_RP2040 6200 // Generic RP2040 Test board +#define BOARD_BTT_SKR_PICO 6201 // BigTreeTech SKR Pico 1.x + // // Custom board // @@ -543,7 +552,7 @@ // Simulations // -#define BOARD_SIMULATED 9999 +#define BOARD_SIMULATED 9999 // Simulated 3D Printer with LCD / TFT for development #define _MB_1(B) (defined(BOARD_##B) && MOTHERBOARD==BOARD_##B) #define MB(V...) DO(MB,||,V) diff --git a/firmware/Marlin/src/core/drivers.h b/firmware/Marlin/src/core/drivers.h index c4417aa..c54e42c 100644 --- a/firmware/Marlin/src/core/drivers.h +++ b/firmware/Marlin/src/core/drivers.h @@ -188,3 +188,16 @@ || HAS_DRIVER(TMC5130_STANDALONE) || HAS_DRIVER(TMC5160_STANDALONE) #define HAS_DIAG_PINS 1 #endif + +// Hybrid Threshold ranges +#define THRS_TMC2100 65535 +#define THRS_TMC2130 65535 +#define THRS_TMC2160 255 +#define THRS_TMC2208 255 +#define THRS_TMC2209 255 +#define THRS_TMC2660 65535 +#define THRS_TMC5130 65535 +#define THRS_TMC5160 65535 + +#define _DRIVER_THRS(V) CAT(THRS_, V) +#define STEPPER_MAX_THRS(S) _DRIVER_THRS(S##_DRIVER_TYPE) diff --git a/firmware/Marlin/src/core/language.h b/firmware/Marlin/src/core/language.h index 2736a78..f64c751 100644 --- a/firmware/Marlin/src/core/language.h +++ b/firmware/Marlin/src/core/language.h @@ -191,6 +191,7 @@ #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_EEPROM_INITIALIZED "EEPROM Initialized" #define STR_FILAMENT_CHANGE_HEAT_LCD "Press button to heat nozzle" #define STR_FILAMENT_CHANGE_INSERT_LCD "Insert filament and press button" @@ -290,6 +291,7 @@ #define STR_MAX_ACCELERATION "Max Acceleration (units/s2)" #define STR_MAX_FEEDRATES "Max feedrates (units/s)" #define STR_ACCELERATION_P_R_T "Acceleration (units/s2) (P R T)" +#define STR_HOMING_FEEDRATE "Homing Feedrate" #define STR_TOOL_CHANGING "Tool-changing" #define STR_HOTEND_OFFSETS "Hotend offsets" #define STR_SERVO_ANGLES "Servo Angles" @@ -322,6 +324,38 @@ #define STR_TEMPERATURE_UNITS "Temperature Units" #define STR_USER_THERMISTORS "User thermistors" #define STR_DELAYED_POWEROFF "Delayed poweroff" +#define STR_STORED_MACROS "Stored macros" + +// +// General axis names +// +#if HAS_X_AXIS + #define AXIS1_NAME 'X' +#endif +#if HAS_Y_AXIS + #define AXIS2_NAME 'Y' +#endif +#if HAS_Z_AXIS + #define AXIS3_NAME 'Z' +#endif +#define STR_X "X" +#define STR_Y "Y" +#define STR_Z "Z" +#define STR_E "E" +#if IS_KINEMATIC + #define STR_A "A" + #define STR_B "B" + #define STR_C "C" +#else + #define STR_A STR_X + #define STR_B STR_Y + #define STR_C STR_Z +#endif +#define STR_X2 STR_A "2" +#define STR_Y2 STR_B "2" +#define STR_Z2 STR_C "2" +#define STR_Z3 STR_C "3" +#define STR_Z4 STR_C "4" // // Endstop Names used by Endstops::report_states @@ -354,29 +388,8 @@ #define STR_Z_PROBE "z_probe" #define STR_PROBE_EN "probe_en" #define STR_FILAMENT "filament" - #define STR_CALIBRATION "calibration" -// General axis names -#define STR_X "X" -#define STR_Y "Y" -#define STR_Z "Z" -#define STR_E "E" -#if IS_KINEMATIC - #define STR_A "A" - #define STR_B "B" - #define STR_C "C" -#else - #define STR_A "X" - #define STR_B "Y" - #define STR_C "Z" -#endif -#define STR_X2 "X2" -#define STR_Y2 "Y2" -#define STR_Z2 "Z2" -#define STR_Z3 "Z3" -#define STR_Z4 "Z4" - // Extra Axis and Endstop Names #if HAS_I_AXIS #if AXIS4_NAME == 'A' diff --git a/firmware/Marlin/src/core/multi_language.h b/firmware/Marlin/src/core/multi_language.h index 2c0eb7a..81a1754 100644 --- a/firmware/Marlin/src/core/multi_language.h +++ b/firmware/Marlin/src/core/multi_language.h @@ -91,6 +91,7 @@ typedef const char Language_Str[]; #define LANG_CHARSIZE GET_TEXT(CHARSIZE) #define USE_WIDE_GLYPH (LANG_CHARSIZE > 2) +// The final "\0" is added invisibly by the compiler #define MSG_1_LINE(A) A "\0" "\0" #define MSG_2_LINE(A,B) A "\0" B "\0" #define MSG_3_LINE(A,B,C) A "\0" B "\0" C diff --git a/firmware/Marlin/src/core/serial.cpp b/firmware/Marlin/src/core/serial.cpp index 5373f5e..8a83783 100644 --- a/firmware/Marlin/src/core/serial.cpp +++ b/firmware/Marlin/src/core/serial.cpp @@ -27,6 +27,8 @@ #include "../feature/ethernet.h" #endif +#include // dtostrf + // Echo commands to the terminal by default in dev mode uint8_t marlin_debug_flags = TERN(MARLIN_DEV_MODE, MARLIN_DEBUG_ECHO, MARLIN_DEBUG_NONE); diff --git a/firmware/Marlin/src/core/utility.cpp b/firmware/Marlin/src/core/utility.cpp index b555d9f..6a8452b 100644 --- a/firmware/Marlin/src/core/utility.cpp +++ b/firmware/Marlin/src/core/utility.cpp @@ -60,29 +60,38 @@ void safe_delay(millis_t ms) { #include "../feature/bedlevel/bedlevel.h" void log_machine_info() { - SERIAL_ECHOLNPGM("Machine Type: " - TERN_(DELTA, "Delta") - TERN_(IS_SCARA, "SCARA") - TERN_(IS_CORE, "Core") - TERN_(MARKFORGED_XY, "MarkForgedXY") - TERN_(MARKFORGED_YX, "MarkForgedYX") - TERN_(IS_CARTESIAN, "Cartesian") + SERIAL_ECHOLNPGM("Machine Type:" + TERN_(DELTA, " Delta") + TERN_(IS_SCARA, " SCARA") + TERN_(AXEL_TPARA, " TPARA") + TERN_(IS_CORE, " Core") + TERN_(BELTPRINTER, " Belt Printer") + TERN_(MARKFORGED_XY, " MarkForgedXY") + TERN_(MARKFORGED_YX, " MarkForgedYX") + TERN_(POLAR, " Polar") + TERN_(POLARGRAPH, " Polargraph") + TERN_(ARTICULATED_ROBOT_ARM, " Robot Arm") + TERN_(FOAMCUTTER_XYUV, " Foam Cutter") + TERN_(IS_CARTESIAN, " Cartesian") ); SERIAL_ECHOLNPGM("Probe: " - TERN_(PROBE_MANUALLY, "PROBE_MANUALLY") - TERN_(NOZZLE_AS_PROBE, "NOZZLE_AS_PROBE") - TERN_(FIX_MOUNTED_PROBE, "FIX_MOUNTED_PROBE") - TERN_(HAS_Z_SERVO_PROBE, TERN(BLTOUCH, "BLTOUCH", "SERVO PROBE")) - TERN_(BD_SENSOR, "BD_SENSOR") - TERN_(TOUCH_MI_PROBE, "TOUCH_MI_PROBE") - TERN_(Z_PROBE_SLED, "Z_PROBE_SLED") - TERN_(Z_PROBE_ALLEN_KEY, "Z_PROBE_ALLEN_KEY") - TERN_(SOLENOID_PROBE, "SOLENOID_PROBE") - TERN_(MAGLEV4, "MAGLEV4") - TERN_(BIQU_MICROPROBE_V1, "BIQU_MICROPROBE_V1") - TERN_(BIQU_MICROPROBE_V2, "BIQU_MICROPROBE_V2") - IF_DISABLED(PROBE_SELECTED, "NONE") + TERN_(PROBE_MANUALLY, "PROBE_MANUALLY") + TERN_(NOZZLE_AS_PROBE, "NOZZLE_AS_PROBE") + TERN_(FIX_MOUNTED_PROBE, "FIX_MOUNTED_PROBE") + TERN_(HAS_Z_SERVO_PROBE, TERN(BLTOUCH, "BLTOUCH", "SERVO PROBE")) + TERN_(BD_SENSOR, "BD_SENSOR") + TERN_(TOUCH_MI_PROBE, "TOUCH_MI_PROBE") + TERN_(Z_PROBE_ALLEN_KEY, "Z_PROBE_ALLEN_KEY") + TERN_(Z_PROBE_SLED, "Z_PROBE_SLED") + TERN_(RACK_AND_PINION_PROBE, "RACK_AND_PINION_PROBE") + TERN_(SOLENOID_PROBE, "SOLENOID_PROBE") + TERN_(SENSORLESS_PROBING, "SENSORLESS_PROBING") + TERN_(MAGLEV4, "MAGLEV4") + TERN_(MAG_MOUNTED_PROBE, "MAG_MOUNTED_PROBE") + TERN_(BIQU_MICROPROBE_V1, "BIQU_MICROPROBE_V1") + TERN_(BIQU_MICROPROBE_V2, "BIQU_MICROPROBE_V2") + IF_DISABLED(PROBE_SELECTED, "NONE") ); #if HAS_BED_PROBE diff --git a/firmware/Marlin/src/feature/babystep.cpp b/firmware/Marlin/src/feature/babystep.cpp index c671726..014ccea 100644 --- a/firmware/Marlin/src/feature/babystep.cpp +++ b/firmware/Marlin/src/feature/babystep.cpp @@ -60,7 +60,7 @@ void Babystep::add_mm(const AxisEnum axis, const_float_t mm) { #if ENABLED(BD_SENSOR) void Babystep::set_mm(const AxisEnum axis, const_float_t mm) { - //if (DISABLED(BABYSTEP_WITHOUT_HOMING) && axes_should_home(_BV(axis))) return; + //if (DISABLED(BABYSTEP_WITHOUT_HOMING) && axis_should_home(axis)) return; const int16_t distance = mm * planner.settings.axis_steps_per_mm[axis]; accum = distance; // Count up babysteps for the UI steps[BS_AXIS_IND(axis)] = distance; @@ -70,8 +70,12 @@ void Babystep::add_mm(const AxisEnum axis, const_float_t mm) { } #endif +bool Babystep::can_babystep(const AxisEnum axis) { + return (ENABLED(BABYSTEP_WITHOUT_HOMING) || !axis_should_home(axis)); +} + void Babystep::add_steps(const AxisEnum axis, const int16_t distance) { - if (DISABLED(BABYSTEP_WITHOUT_HOMING) && axes_should_home(_BV(axis))) return; + if (!can_babystep(axis)) return; accum += distance; // Count up babysteps for the UI steps[BS_AXIS_IND(axis)] += distance; diff --git a/firmware/Marlin/src/feature/babystep.h b/firmware/Marlin/src/feature/babystep.h index 38a19a3..666a0ee 100644 --- a/firmware/Marlin/src/feature/babystep.h +++ b/firmware/Marlin/src/feature/babystep.h @@ -59,6 +59,7 @@ public: } #endif + static bool can_babystep(const AxisEnum axis); static void add_steps(const AxisEnum axis, const int16_t distance); static void add_mm(const AxisEnum axis, const_float_t mm); diff --git a/firmware/Marlin/src/feature/cancel_object.cpp b/firmware/Marlin/src/feature/cancel_object.cpp index 0040f6e..818661b 100644 --- a/firmware/Marlin/src/feature/cancel_object.cpp +++ b/firmware/Marlin/src/feature/cancel_object.cpp @@ -30,23 +30,20 @@ CancelObject cancelable; -int8_t CancelObject::object_count, // = 0 - CancelObject::active_object = -1; -uint32_t CancelObject::canceled; // = 0x0000 -bool CancelObject::skipping; // = false +cancel_state_t CancelObject::state; void CancelObject::set_active_object(const int8_t obj) { - active_object = obj; + state.active_object = obj; if (WITHIN(obj, 0, 31)) { - if (obj >= object_count) object_count = obj + 1; - skipping = TEST(canceled, obj); + if (obj >= state.object_count) state.object_count = obj + 1; + state.skipping = TEST(state.canceled, obj); } else - skipping = false; + state.skipping = false; #if ALL(HAS_STATUS_MESSAGE, CANCEL_OBJECTS_REPORTING) - if (active_object >= 0) - ui.set_status(MString<30>(GET_TEXT_F(MSG_PRINTING_OBJECT), ' ', active_object)); + if (state.active_object >= 0) + ui.set_status(MString<30>(GET_TEXT_F(MSG_PRINTING_OBJECT), ' ', state.active_object)); else ui.reset_status(); #endif @@ -54,29 +51,29 @@ void CancelObject::set_active_object(const int8_t obj) { void CancelObject::cancel_object(const int8_t obj) { if (WITHIN(obj, 0, 31)) { - SBI(canceled, obj); - if (obj == active_object) skipping = true; + SBI(state.canceled, obj); + if (obj == state.active_object) state.skipping = true; } } void CancelObject::uncancel_object(const int8_t obj) { if (WITHIN(obj, 0, 31)) { - CBI(canceled, obj); - if (obj == active_object) skipping = false; + CBI(state.canceled, obj); + if (obj == state.active_object) state.skipping = false; } } void CancelObject::report() { - if (active_object >= 0) - SERIAL_ECHO_MSG("Active Object: ", active_object); + if (state.active_object >= 0) + SERIAL_ECHO_MSG("Active Object: ", state.active_object); - if (canceled) { - SERIAL_ECHO_START(); - SERIAL_ECHOPGM("Canceled:"); - for (int i = 0; i < object_count; i++) - if (TEST(canceled, i)) { SERIAL_CHAR(' '); SERIAL_ECHO(i); } - SERIAL_EOL(); - } + if (state.canceled == 0x0000) return; + + SERIAL_ECHO_START(); + SERIAL_ECHOPGM("Canceled:"); + for (int i = 0; i < state.object_count; i++) + if (TEST(state.canceled, i)) { SERIAL_CHAR(' '); SERIAL_ECHO(i); } + SERIAL_EOL(); } #endif // CANCEL_OBJECTS diff --git a/firmware/Marlin/src/feature/cancel_object.h b/firmware/Marlin/src/feature/cancel_object.h index 62548a3..7f04612 100644 --- a/firmware/Marlin/src/feature/cancel_object.h +++ b/firmware/Marlin/src/feature/cancel_object.h @@ -23,19 +23,23 @@ #include +typedef struct CancelState { + bool skipping = false; + int8_t object_count = 0, active_object = 0; + uint32_t canceled = 0x0000; +} cancel_state_t; + class CancelObject { public: - static bool skipping; - static int8_t object_count, active_object; - static uint32_t canceled; - static void set_active_object(const int8_t obj); + static cancel_state_t state; + static void set_active_object(const int8_t obj=state.active_object); static void cancel_object(const int8_t obj); static void uncancel_object(const int8_t obj); static void report(); - static bool is_canceled(const int8_t obj) { return TEST(canceled, obj); } + static bool is_canceled(const int8_t obj) { return TEST(state.canceled, obj); } static void clear_active_object() { set_active_object(-1); } - static void cancel_active_object() { cancel_object(active_object); } - static void reset() { canceled = 0x0000; object_count = 0; clear_active_object(); } + static void cancel_active_object() { cancel_object(state.active_object); } + static void reset() { state.canceled = 0x0000; state.object_count = 0; clear_active_object(); } }; extern CancelObject cancelable; diff --git a/firmware/Marlin/src/feature/controllerfan.cpp b/firmware/Marlin/src/feature/controllerfan.cpp index acbae45..323d988 100644 --- a/firmware/Marlin/src/feature/controllerfan.cpp +++ b/firmware/Marlin/src/feature/controllerfan.cpp @@ -70,7 +70,9 @@ void ControllerFan::update() { */ const ena_mask_t axis_mask = TERN(CONTROLLER_FAN_USE_Z_ONLY, _BV(Z_AXIS), (ena_mask_t)~TERN0(CONTROLLER_FAN_IGNORE_Z, _BV(Z_AXIS))); if ( (stepper.axis_enabled.bits & axis_mask) - || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0) + #if ALL(HAS_HEATED_BED, CONTROLLER_FAN_BED_HEATING) + || thermalManager.temp_bed.soft_pwm_amount > 0 + #endif #ifdef CONTROLLER_FAN_MIN_BOARD_TEMP || thermalManager.wholeDegBoard() >= CONTROLLER_FAN_MIN_BOARD_TEMP #endif diff --git a/firmware/Marlin/src/feature/e_parser.cpp b/firmware/Marlin/src/feature/e_parser.cpp index da193ed..e249d81 100644 --- a/firmware/Marlin/src/feature/e_parser.cpp +++ b/firmware/Marlin/src/feature/e_parser.cpp @@ -61,9 +61,13 @@ extern bool wait_for_user, wait_for_heatup; #endif void EmergencyParser::update(EmergencyParser::State &state, const uint8_t c) { + auto uppercase = [](char c) { + return TERN0(GCODE_CASE_INSENSITIVE, WITHIN(c, 'a', 'z')) ? c + 'A' - 'a' : c; + }; + switch (state) { case EP_RESET: - switch (c) { + switch (uppercase(c)) { case ' ': case '\n': case '\r': break; case 'N': state = EP_N; break; case 'M': state = EP_M; break; @@ -81,7 +85,7 @@ void EmergencyParser::update(EmergencyParser::State &state, const uint8_t c) { break; case EP_N: - switch (c) { + switch (uppercase(c)) { case '0' ... '9': case '-': case ' ': break; case 'M': state = EP_M; break; @@ -152,20 +156,8 @@ void EmergencyParser::update(EmergencyParser::State &state, const uint8_t c) { #endif #if ENABLED(EP_BABYSTEPPING) - case EP_M2: - switch (c) { - case '9': state = EP_M29; break; - default: state = EP_IGNORE; - } - break; - - case EP_M29: - switch (c) { - case '3': state = EP_M293; break; - case '4': state = EP_M294; break; - default: state = EP_IGNORE; - } - break; + case EP_M2: state = (c == '9') ? EP_M29 : EP_IGNORE; break; + case EP_M29: state = (c == '3') ? EP_M293 : (c == '4') ? EP_M294 : EP_IGNORE; break; #endif #if ENABLED(HOST_PROMPT_SUPPORT) @@ -174,7 +166,7 @@ void EmergencyParser::update(EmergencyParser::State &state, const uint8_t c) { case EP_M87: state = (c == '6') ? EP_M876 : EP_IGNORE; break; case EP_M876: - switch (c) { + switch (uppercase(c)) { case ' ': break; case 'S': state = EP_M876S; break; default: state = EP_IGNORE; break; diff --git a/firmware/Marlin/src/feature/easythreed_ui.cpp b/firmware/Marlin/src/feature/easythreed_ui.cpp index 39248bf..9617c62 100644 --- a/firmware/Marlin/src/feature/easythreed_ui.cpp +++ b/firmware/Marlin/src/feature/easythreed_ui.cpp @@ -189,7 +189,7 @@ void EasythreedUI::printButton() { blink_interval_ms = LED_BLINK_2; // Blink the indicator LED at 1 second intervals print_key_flag = PF_PAUSE; // The "Print" button now pauses the print card.mount(); // Force SD card to mount - now! - if (!card.isMounted) { // Failed to mount? + if (!card.isMounted()) { // Failed to mount? blink_interval_ms = LED_OFF; // Turn off LED print_key_flag = PF_START; return; // Bail out diff --git a/firmware/Marlin/src/feature/encoder_i2c.cpp b/firmware/Marlin/src/feature/encoder_i2c.cpp index 1351784..55bde4c 100644 --- a/firmware/Marlin/src/feature/encoder_i2c.cpp +++ b/firmware/Marlin/src/feature/encoder_i2c.cpp @@ -36,7 +36,7 @@ #include "../module/stepper.h" #include "../gcode/parser.h" -#include "../feature/babystep.h" +#include "babystep.h" #include diff --git a/firmware/Marlin/src/feature/hotend_idle.cpp b/firmware/Marlin/src/feature/hotend_idle.cpp index 050898e..eb16781 100644 --- a/firmware/Marlin/src/feature/hotend_idle.cpp +++ b/firmware/Marlin/src/feature/hotend_idle.cpp @@ -40,7 +40,7 @@ HotendIdleProtection hotend_idle; millis_t HotendIdleProtection::next_protect_ms = 0; -hotend_idle_settings_t HotendIdleProtection::cfg; // Initialized by settings.load() +hotend_idle_settings_t HotendIdleProtection::cfg; // Initialized by settings.load void HotendIdleProtection::check_hotends(const millis_t &ms) { const bool busy = (TERN0(HAS_RESUME_CONTINUE, wait_for_user) || planner.has_blocks_queued()); diff --git a/firmware/Marlin/src/feature/leds/leds.cpp b/firmware/Marlin/src/feature/leds/leds.cpp index 2f0e5d9..0c70253 100644 --- a/firmware/Marlin/src/feature/leds/leds.cpp +++ b/firmware/Marlin/src/feature/leds/leds.cpp @@ -31,7 +31,7 @@ #include "leds.h" #if ANY(CASE_LIGHT_USE_RGB_LED, CASE_LIGHT_USE_NEOPIXEL) - #include "../../feature/caselight.h" + #include "../caselight.h" #endif #if ENABLED(LED_COLOR_PRESETS) diff --git a/firmware/Marlin/src/feature/max7219.cpp b/firmware/Marlin/src/feature/max7219.cpp index 64960f1..a98248c 100644 --- a/firmware/Marlin/src/feature/max7219.cpp +++ b/firmware/Marlin/src/feature/max7219.cpp @@ -744,7 +744,6 @@ void Max7219::idle_tasks() { #endif #ifdef MAX7219_DEBUG_PLANNER_QUEUE - static int16_t last_depth = 0; const int16_t current_depth = BLOCK_MOD(head - tail + (BLOCK_BUFFER_SIZE)) & 0xF; if (current_depth != last_depth) { quantity16(MAX7219_DEBUG_PLANNER_QUEUE, last_depth, current_depth, &row_change_mask); diff --git a/firmware/Marlin/src/feature/mixing.cpp b/firmware/Marlin/src/feature/mixing.cpp index 4021393..f3fb2d0 100644 --- a/firmware/Marlin/src/feature/mixing.cpp +++ b/firmware/Marlin/src/feature/mixing.cpp @@ -28,10 +28,6 @@ Mixer mixer; -#ifdef MIXER_NORMALIZER_DEBUG - #include "../core/serial.h" -#endif - // Used up to Planner level uint_fast8_t Mixer::selected_vtool = 0; float Mixer::collector[MIXING_STEPPERS]; // mix proportion. 0.0 = off, otherwise <= COLOR_A_MASK. diff --git a/firmware/Marlin/src/feature/mmu/mmu2.cpp b/firmware/Marlin/src/feature/mmu/mmu2.cpp index 562cc33..d5f115e 100644 --- a/firmware/Marlin/src/feature/mmu/mmu2.cpp +++ b/firmware/Marlin/src/feature/mmu/mmu2.cpp @@ -24,6 +24,10 @@ #if HAS_PRUSA_MMU2 +/** + * mmu2.cpp - Support for Průša MMU2 and MMU2S + */ + #include "mmu2.h" #include "../../lcd/menu/menu_mmu2.h" @@ -39,14 +43,14 @@ MMU2 mmu2; #include "../../MarlinCore.h" #if ENABLED(HOST_PROMPT_SUPPORT) - #include "../../feature/host_actions.h" + #include "../host_actions.h" #endif #if ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" #endif -#define DEBUG_OUT ENABLED(MMU2_DEBUG) +#define DEBUG_OUT ENABLED(MMU_DEBUG) #include "../../core/debug_out.h" #define MMU_TODELAY 100 @@ -57,7 +61,7 @@ MMU2 mmu2; #define MMU2_SEND(S) tx_str(F(S "\n")) #define MMU2_RECV(S) rx_str(F(S "\n")) -#if ENABLED(MMU_EXTRUDER_SENSOR) +#if ENABLED(MMU2_EXTRUDER_SENSOR) uint8_t mmu_idl_sens = 0; static bool mmu_loading_flag = false; #endif @@ -106,12 +110,12 @@ void MMU2::init() { set_runout_valid(false); - #if PIN_EXISTS(MMU2_RST) - WRITE(MMU2_RST_PIN, HIGH); - SET_OUTPUT(MMU2_RST_PIN); + #if PIN_EXISTS(MMU_RST) + WRITE(MMU_RST_PIN, HIGH); + SET_OUTPUT(MMU_RST_PIN); #endif - MMU2_SERIAL.begin(MMU_BAUD); + MMU_SERIAL.begin(MMU_BAUD); extruder = MMU2_NO_TOOL; safe_delay(10); @@ -123,10 +127,10 @@ void MMU2::init() { void MMU2::reset() { DEBUG_ECHOLNPGM("MMU <= reset"); - #if PIN_EXISTS(MMU2_RST) - WRITE(MMU2_RST_PIN, LOW); + #if PIN_EXISTS(MMU_RST) + WRITE(MMU_RST_PIN, LOW); safe_delay(20); - WRITE(MMU2_RST_PIN, HIGH); + WRITE(MMU_RST_PIN, HIGH); #else MMU2_SEND("X0"); // Send soft reset #endif @@ -134,7 +138,7 @@ void MMU2::reset() { int8_t MMU2::get_current_tool() { return extruder == MMU2_NO_TOOL ? -1 : extruder; } -#if ANY(HAS_PRUSA_MMU2S, MMU_EXTRUDER_SENSOR) +#if ANY(HAS_PRUSA_MMU2S, MMU2_EXTRUDER_SENSOR) #define FILAMENT_PRESENT() (READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE) #else #define FILAMENT_PRESENT() true @@ -226,7 +230,7 @@ void MMU2::mmu_loop() { const int filament = cmd - MMU_CMD_T0; DEBUG_ECHOLNPGM("MMU <= T", filament); tx_printf(F("T%d\n"), filament); - TERN_(MMU_EXTRUDER_SENSOR, mmu_idl_sens = 1); // enable idler sensor, if any + TERN_(MMU2_EXTRUDER_SENSOR, mmu_idl_sens = 1); // enable idler sensor, if any state = 3; // wait for response } else if (WITHIN(cmd, MMU_CMD_L0, MMU_CMD_L0 + EXTRUDERS - 1)) { @@ -299,7 +303,7 @@ void MMU2::mmu_loop() { break; case 3: // response to mmu commands - #if ENABLED(MMU_EXTRUDER_SENSOR) + #if ENABLED(MMU2_EXTRUDER_SENSOR) if (mmu_idl_sens) { if (FILAMENT_PRESENT() && mmu_loading_flag) { DEBUG_ECHOLNPGM("MMU <= 'A'"); @@ -361,8 +365,8 @@ bool MMU2::rx_str(FSTR_P fstr) { uint8_t i = strlen(rx_buffer); - while (MMU2_SERIAL.available()) { - rx_buffer[i++] = MMU2_SERIAL.read(); + while (MMU_SERIAL.available()) { + rx_buffer[i++] = MMU_SERIAL.read(); if (i == sizeof(rx_buffer) - 1) { DEBUG_ECHOLNPGM("rx buffer overrun"); @@ -393,7 +397,7 @@ bool MMU2::rx_str(FSTR_P fstr) { void MMU2::tx_str(FSTR_P fstr) { clear_rx_buffer(); PGM_P pstr = FTOP(fstr); - while (const char c = pgm_read_byte(pstr)) { MMU2_SERIAL.write(c); pstr++; } + while (const char c = pgm_read_byte(pstr)) { MMU_SERIAL.write(c); pstr++; } prev_request = millis(); } @@ -403,7 +407,7 @@ void MMU2::tx_str(FSTR_P fstr) { void MMU2::tx_printf(FSTR_P format, int argument = -1) { clear_rx_buffer(); const uint8_t len = sprintf_P(tx_buffer, FTOP(format), argument); - for (uint8_t i = 0; i < len; ++i) MMU2_SERIAL.write(tx_buffer[i]); + for (uint8_t i = 0; i < len; ++i) MMU_SERIAL.write(tx_buffer[i]); prev_request = millis(); } @@ -413,7 +417,7 @@ void MMU2::tx_printf(FSTR_P format, int argument = -1) { void MMU2::tx_printf(FSTR_P format, int argument1, int argument2) { clear_rx_buffer(); const uint8_t len = sprintf_P(tx_buffer, FTOP(format), argument1, argument2); - for (uint8_t i = 0; i < len; ++i) MMU2_SERIAL.write(tx_buffer[i]); + for (uint8_t i = 0; i < len; ++i) MMU_SERIAL.write(tx_buffer[i]); prev_request = millis(); } @@ -421,7 +425,7 @@ void MMU2::tx_printf(FSTR_P format, int argument1, int argument2) { * Empty the rx buffer */ void MMU2::clear_rx_buffer() { - while (MMU2_SERIAL.available()) MMU2_SERIAL.read(); + while (MMU_SERIAL.available()) MMU_SERIAL.read(); rx_buffer[0] = '\0'; } @@ -563,7 +567,7 @@ inline void beep_bad_cmd() { BUZZ(400, 40); } set_runout_valid(true); } -#elif ENABLED(MMU_EXTRUDER_SENSOR) +#elif ENABLED(MMU2_EXTRUDER_SENSOR) /** * Handle tool change @@ -656,7 +660,7 @@ inline void beep_bad_cmd() { BUZZ(400, 40); } void MMU2::mmu_continue_loading() { // Try to load the filament a limited number of times bool fil_present = 0; - for (uint8_t i = 0; i < MMU_LOADING_ATTEMPTS_NR; i++) { + for (uint8_t i = 0; i < MMU2_LOADING_ATTEMPTS_NR; i++) { DEBUG_ECHOLNPGM("Load attempt #", i + 1); // Done as soon as filament is present @@ -688,7 +692,7 @@ inline void beep_bad_cmd() { BUZZ(400, 40); } mmu_idl_sens = 0; } -#else // !HAS_PRUSA_MMU2S && !MMU_EXTRUDER_SENSOR +#else // !HAS_PRUSA_MMU2S && !MMU2_EXTRUDER_SENSOR /** * Handle tool change @@ -891,8 +895,8 @@ void MMU2::filament_runout() { } bool MMU2::can_load() { - static const E_Step can_load_sequence[] PROGMEM = { MMU2_CAN_LOAD_SEQUENCE }, - can_load_increment_sequence[] PROGMEM = { MMU2_CAN_LOAD_INCREMENT_SEQUENCE }; + static constexpr E_Step can_load_sequence[] PROGMEM = { MMU2_CAN_LOAD_SEQUENCE }, + can_load_increment_sequence[] PROGMEM = { MMU2_CAN_LOAD_INCREMENT_SEQUENCE }; execute_extruder_sequence(can_load_sequence, COUNT(can_load_sequence)); @@ -1041,7 +1045,8 @@ void MMU2::load_to_nozzle_sequence() { execute_extruder_sequence(sequence, COUNT(sequence)); } -void MMU2::execute_extruder_sequence(const E_Step * sequence, int steps) { +void MMU2::execute_extruder_sequence(const E_Step * const sequence, const uint8_t steps) { + planner.synchronize(); const E_Step *step = sequence; diff --git a/firmware/Marlin/src/feature/mmu/mmu2.h b/firmware/Marlin/src/feature/mmu/mmu2.h index 2c9fd33..117b3a6 100644 --- a/firmware/Marlin/src/feature/mmu/mmu2.h +++ b/firmware/Marlin/src/feature/mmu/mmu2.h @@ -21,6 +21,10 @@ */ #pragma once +/** + * mmu2.h - Support for Průša MMU2 and MMU2S + */ + #include "../../inc/MarlinConfig.h" #if HAS_FILAMENT_SENSOR @@ -70,7 +74,7 @@ private: static bool get_response(); static void manage_response(const bool move_axes, const bool turn_off_nozzle); - static void execute_extruder_sequence(const E_Step * sequence, int steps); + static void execute_extruder_sequence(const E_Step * const sequence, const uint8_t steps); static void ramming_sequence(); static void load_to_nozzle_sequence(); @@ -85,7 +89,7 @@ private: FORCE_INLINE static bool load_to_gears() { return true; } #endif - #if ENABLED(MMU_EXTRUDER_SENSOR) + #if ENABLED(MMU2_EXTRUDER_SENSOR) #define MMU_LOAD_FEEDRATE 19.02f // (mm/s) static void mmu_continue_loading(); #endif diff --git a/firmware/Marlin/src/feature/mmu3/mmu2.cpp b/firmware/Marlin/src/feature/mmu3/mmu3.cpp similarity index 97% rename from firmware/Marlin/src/feature/mmu3/mmu2.cpp rename to firmware/Marlin/src/feature/mmu3/mmu3.cpp index ed4a04f..b4d4c76 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2.cpp +++ b/firmware/Marlin/src/feature/mmu3/mmu3.cpp @@ -28,15 +28,15 @@ #if HAS_PRUSA_MMU3 -#include "mmu2.h" -#include "mmu2_error_converter.h" -#include "mmu2_fsensor.h" -#include "mmu2_log.h" -#include "mmu2_marlin.h" -#include "mmu2_marlin_macros.h" -#include "mmu2_power.h" -#include "mmu2_progress_converter.h" -#include "mmu2_reporting.h" +#include "mmu3.h" +#include "mmu3_error_converter.h" +#include "mmu3_fsensor.h" +#include "mmu3_log.h" +#include "mmu3_marlin.h" +#include "mmu3_marlin_macros.h" +#include "mmu3_power.h" +#include "mmu3_progress_converter.h" +#include "mmu3_reporting.h" #include "strlen_cx.h" #include "SpoolJoin.h" @@ -91,7 +91,7 @@ namespace MMU3 { int MMU3::mmu_hw_enabled_addr; // Initialized by settings.load MMU3::MMU3() - : logic(MMU2_TOOL_CHANGE_LOAD_LENGTH, MMU2_LOAD_TO_NOZZLE_FEED_RATE) + : logic(MMU3_TOOL_CHANGE_LOAD_LENGTH, MMU3_LOAD_TO_NOZZLE_FEED_RATE) , extruder(MMU2_NO_TOOL) , tool_change_extruder(MMU2_NO_TOOL) , resume_position() @@ -121,10 +121,10 @@ namespace MMU3 { settings.save(); #endif - MMU2_SERIAL.begin(MMU_BAUD); + MMU_SERIAL.begin(MMU_BAUD); powerOn(); - MMU2_SERIAL.flush(); // Make sure the UART buffer is clear before starting communication + MMU_SERIAL.flush(); // Make sure the UART buffer is clear before starting communication setCurrentTool(MMU2_NO_TOOL); _state = xState::Connecting; @@ -153,7 +153,7 @@ namespace MMU3 { _state = xState::Stopped; logic.stop(); - MMU2_SERIAL.end(); + MMU_SERIAL.end(); } void MMU3::tune() { @@ -279,14 +279,14 @@ namespace MMU3 { && TERN1(HAS_LEVELING, planner.leveling_active) && xy_are_trusted() && e_active() - #if ENABLED(MMU_SPOOL_JOIN_CONSUMES_ALL_FILAMENT) + #if ENABLED(MMU3_SPOOL_JOIN_CONSUMES_ALL_FILAMENT) && runout.enabled // to prevent M600 to be triggered during M600 AUTO && !FILAMENT_PRESENT() // so the filament is totally consumed #endif ) { SERIAL_ECHOLN_P("FINDA filament runout!"); if (spooljoin.isEnabled() && get_current_tool() != (uint8_t)FILAMENT_UNKNOWN) { // Can't auto if F=? - #if ENABLED(MMU_SPOOL_JOIN_CONSUMES_ALL_FILAMENT) + #if ENABLED(MMU3_SPOOL_JOIN_CONSUMES_ALL_FILAMENT) // set the current tool to FILAMENT_UNKNOWN so that we don't try to unload it extruder = MMU2_NO_TOOL; // disable the filament runout sensor (this is going to be re-enabled after the filament is loaded) @@ -294,7 +294,7 @@ namespace MMU3 { runout.filament_ran_out = false; // trying to disable the purge more / continue message runout.enabled = false; #endif - queue.enqueue_now(F("M600A")); // Save print and run M600 command + queue.enqueue_now(F("M600A")); // Save print and run M600 A (automatic) command } else { marlin_stop_and_save_print_to_ram(); @@ -349,7 +349,7 @@ namespace MMU3 { // MMU has finished its load, push the filament further by some defined constant length // If the filament sensor reads 0 at any moment, then report FAILURE - const float tryload_length = MMU2_CHECK_FILAMENT_PRESENCE_EXTRUSION_LENGTH - logic.ExtraLoadDistance(); + const float tryload_length = MMU3_CHECK_FILAMENT_PRESENCE_EXTRUSION_LENGTH - logic.ExtraLoadDistance(); TryLoadUnloadReporter tlur(tryload_length); /** @@ -378,7 +378,7 @@ namespace MMU3 { // Pixel index will go from 0 to 10, then back from 10 to 0. // A change in this value indicates a new pixel should be drawn on the display. for (uint8_t move = 0; move < 2; move++) { - extruder_move(move == 0 ? tryload_length : -tryload_length, MMU2_VERIFY_LOAD_TO_NOZZLE_FEED_RATE); + extruder_move(move == 0 ? tryload_length : -tryload_length, MMU3_VERIFY_LOAD_TO_NOZZLE_FEED_RATE); while (planner_any_moves()) { filament_inserted = filament_inserted && (WhereIsFilament() == FilamentState::AT_FSENSOR); tlur.Progress(filament_inserted); @@ -392,7 +392,7 @@ namespace MMU3 { } bool MMU3::toolChangeCommonOnce(uint8_t slot) { - static_assert(MMU2_MAX_RETRIES > 1); // Need >1 retries to do the cut in the last attempt + static_assert(MMU3_MAX_RETRIES > 1); // Need >1 retries to do the cut in the last attempt uint8_t retries = 0; for (;;) { for (;;) { @@ -419,9 +419,9 @@ namespace MMU3 { // Prepare a retry attempt unloadInner(); - if (retries == (MMU2_MAX_RETRIES) - 1 && cutter_enabled()) { + if (retries == (MMU3_MAX_RETRIES) - 1 && cutter_enabled()) { cutFilamentInner(slot); // try cutting filament tip at the last attempt - retries = 0; // reset retries every MMU2_MAX_RETRIES + retries = 0; // reset retries every MMU3_MAX_RETRIES } ++retries; @@ -1013,7 +1013,7 @@ namespace MMU3 { void MMU3::execute_load_to_nozzle_sequence() { planner_synchronize(); // Compensate for configurable Extra Loading Distance - planner_set_current_position_E(planner_get_current_position_E() - (logic.ExtraLoadDistance() - MMU2_FILAMENT_SENSOR_POSITION)); + planner_set_current_position_E(planner_get_current_position_E() - (logic.ExtraLoadDistance() - MMU3_FILAMENT_SENSOR_E_POSITION)); execute_extruder_sequence(load_to_nozzle_sequence, sizeof(load_to_nozzle_sequence) / sizeof(load_to_nozzle_sequence[0])); } @@ -1120,7 +1120,7 @@ namespace MMU3 { } void __attribute__((noinline)) MMU3::helpUnloadToFinda() { - extruder_move(-MMU2_RETRY_UNLOAD_TO_FINDA_LENGTH, MMU2_RETRY_UNLOAD_TO_FINDA_FEED_RATE); + extruder_move(-MMU3_RETRY_UNLOAD_TO_FINDA_LENGTH, MMU3_RETRY_UNLOAD_TO_FINDA_FEED_RATE); } void MMU3::onMMUProgressMsgSame(ProgressCode pc) { diff --git a/firmware/Marlin/src/feature/mmu3/mmu2.h b/firmware/Marlin/src/feature/mmu3/mmu3.h similarity index 98% rename from firmware/Marlin/src/feature/mmu3/mmu2.h rename to firmware/Marlin/src/feature/mmu3/mmu3.h index f69e6ac..3c1088f 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2.h +++ b/firmware/Marlin/src/feature/mmu3/mmu3.h @@ -25,10 +25,10 @@ * mmu2.h */ -#include "mmu2_state.h" -#include "mmu2_marlin.h" +#include "mmu3_state.h" +#include "mmu3_marlin.h" -#include "mmu2_protocol_logic.h" +#include "mmu3_protocol_logic.h" #include "../../MarlinCore.h" @@ -43,8 +43,8 @@ float feedRate; //!< feed rate in mm/s }; - static constexpr E_Step ramming_sequence[] PROGMEM = { MMU2_RAMMING_SEQUENCE }; - static constexpr E_Step load_to_nozzle_sequence[] PROGMEM = { MMU2_LOAD_TO_NOZZLE_SEQUENCE }; + static constexpr E_Step ramming_sequence[] PROGMEM = { MMU3_RAMMING_SEQUENCE }; + static constexpr E_Step load_to_nozzle_sequence[] PROGMEM = { MMU3_LOAD_TO_NOZZLE_SEQUENCE }; namespace MMU3 { diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_crc.cpp b/firmware/Marlin/src/feature/mmu3/mmu3_crc.cpp similarity index 98% rename from firmware/Marlin/src/feature/mmu3/mmu2_crc.cpp rename to firmware/Marlin/src/feature/mmu3/mmu3_crc.cpp index d94e2d9..2e752c4 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2_crc.cpp +++ b/firmware/Marlin/src/feature/mmu3/mmu3_crc.cpp @@ -28,7 +28,7 @@ #if HAS_PRUSA_MMU3 -#include "mmu2_crc.h" +#include "mmu3_crc.h" #ifdef __AVR__ #include diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_crc.h b/firmware/Marlin/src/feature/mmu3/mmu3_crc.h similarity index 100% rename from firmware/Marlin/src/feature/mmu3/mmu2_crc.h rename to firmware/Marlin/src/feature/mmu3/mmu3_crc.h diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_error_converter.cpp b/firmware/Marlin/src/feature/mmu3/mmu3_error_converter.cpp similarity index 99% rename from firmware/Marlin/src/feature/mmu3/mmu2_error_converter.cpp rename to firmware/Marlin/src/feature/mmu3/mmu3_error_converter.cpp index b370798..d5d1244 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2_error_converter.cpp +++ b/firmware/Marlin/src/feature/mmu3/mmu3_error_converter.cpp @@ -29,7 +29,7 @@ #if HAS_PRUSA_MMU3 #include "../../core/language.h" -#include "mmu2_error_converter.h" +#include "mmu3_error_converter.h" #include "mmu_hw/error_codes.h" #include "mmu_hw/errors_list.h" diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_error_converter.h b/firmware/Marlin/src/feature/mmu3/mmu3_error_converter.h similarity index 100% rename from firmware/Marlin/src/feature/mmu3/mmu2_error_converter.h rename to firmware/Marlin/src/feature/mmu3/mmu3_error_converter.h diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_fsensor.cpp b/firmware/Marlin/src/feature/mmu3/mmu3_fsensor.cpp similarity index 96% rename from firmware/Marlin/src/feature/mmu3/mmu2_fsensor.cpp rename to firmware/Marlin/src/feature/mmu3/mmu3_fsensor.cpp index 4252fb5..32d2fac 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2_fsensor.cpp +++ b/firmware/Marlin/src/feature/mmu3/mmu3_fsensor.cpp @@ -28,8 +28,8 @@ #if HAS_PRUSA_MMU3 -#include "../../feature/runout.h" -#include "mmu2_fsensor.h" +#include "../runout.h" +#include "mmu3_fsensor.h" namespace MMU3 { diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_fsensor.h b/firmware/Marlin/src/feature/mmu3/mmu3_fsensor.h similarity index 100% rename from firmware/Marlin/src/feature/mmu3/mmu2_fsensor.h rename to firmware/Marlin/src/feature/mmu3/mmu3_fsensor.h diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_log.cpp b/firmware/Marlin/src/feature/mmu3/mmu3_log.cpp similarity index 98% rename from firmware/Marlin/src/feature/mmu3/mmu2_log.cpp rename to firmware/Marlin/src/feature/mmu3/mmu3_log.cpp index 4dd0d79..af2c92e 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2_log.cpp +++ b/firmware/Marlin/src/feature/mmu3/mmu3_log.cpp @@ -28,7 +28,7 @@ #if HAS_PRUSA_MMU3 -#include "mmu2_log.h" +#include "mmu3_log.h" namespace MMU3 { diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_log.h b/firmware/Marlin/src/feature/mmu3/mmu3_log.h similarity index 100% rename from firmware/Marlin/src/feature/mmu3/mmu2_log.h rename to firmware/Marlin/src/feature/mmu3/mmu3_log.h diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_marlin.h b/firmware/Marlin/src/feature/mmu3/mmu3_marlin.h similarity index 100% rename from firmware/Marlin/src/feature/mmu3/mmu2_marlin.h rename to firmware/Marlin/src/feature/mmu3/mmu3_marlin.h diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_marlin1.cpp b/firmware/Marlin/src/feature/mmu3/mmu3_marlin1.cpp similarity index 98% rename from firmware/Marlin/src/feature/mmu3/mmu2_marlin1.cpp rename to firmware/Marlin/src/feature/mmu3/mmu3_marlin1.cpp index 3fae1c3..be54695 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2_marlin1.cpp +++ b/firmware/Marlin/src/feature/mmu3/mmu3_marlin1.cpp @@ -34,9 +34,9 @@ #include "../../module/planner.h" #include "../../module/temperature.h" -#include "../../feature/pause.h" +#include "../pause.h" #include "../../libs/nozzle.h" -#include "mmu2_marlin.h" +#include "mmu3_marlin.h" namespace MMU3 { diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_marlin_macros.h b/firmware/Marlin/src/feature/mmu3/mmu3_marlin_macros.h similarity index 100% rename from firmware/Marlin/src/feature/mmu3/mmu2_marlin_macros.h rename to firmware/Marlin/src/feature/mmu3/mmu3_marlin_macros.h diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_power.cpp b/firmware/Marlin/src/feature/mmu3/mmu3_power.cpp similarity index 87% rename from firmware/Marlin/src/feature/mmu3/mmu2_power.cpp rename to firmware/Marlin/src/feature/mmu3/mmu3_power.cpp index 418f32a..da905c6 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2_power.cpp +++ b/firmware/Marlin/src/feature/mmu3/mmu3_power.cpp @@ -28,8 +28,8 @@ #if HAS_PRUSA_MMU3 -#include "mmu2.h" -#include "mmu2_power.h" +#include "mmu3.h" +#include "mmu3_power.h" #include "../../MarlinCore.h" @@ -41,8 +41,8 @@ namespace MMU3 { // On MK3 we cannot do actual power cycle on HW. Instead trigger a hardware reset. void power_on() { - #if PIN_EXISTS(MMU2_RST) - OUT_WRITE(MMU2_RST_PIN, HIGH); + #if PIN_EXISTS(MMU_RST) + OUT_WRITE(MMU_RST_PIN, HIGH); #endif power_reset(); } @@ -50,10 +50,10 @@ void power_on() { void power_off() {} void power_reset() { - #if PIN_EXISTS(MMU2_RST) // HW - pulse reset pin - WRITE(MMU2_RST_PIN, LOW); + #if PIN_EXISTS(MMU_RST) // HW - pulse reset pin + WRITE(MMU_RST_PIN, LOW); safe_delay(100); - WRITE(MMU2_RST_PIN, HIGH); + WRITE(MMU_RST_PIN, HIGH); #else mmu3.reset(MMU3::Software); // TODO: Needs redesign. This power implementation shouldn't know anything about the MMU itself #endif diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_power.h b/firmware/Marlin/src/feature/mmu3/mmu3_power.h similarity index 100% rename from firmware/Marlin/src/feature/mmu3/mmu2_power.h rename to firmware/Marlin/src/feature/mmu3/mmu3_power.h diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_progress_converter.cpp b/firmware/Marlin/src/feature/mmu3/mmu3_progress_converter.cpp similarity index 85% rename from firmware/Marlin/src/feature/mmu3/mmu2_progress_converter.cpp rename to firmware/Marlin/src/feature/mmu3/mmu3_progress_converter.cpp index 0e8e258..8933f2d 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2_progress_converter.cpp +++ b/firmware/Marlin/src/feature/mmu3/mmu3_progress_converter.cpp @@ -29,34 +29,31 @@ #if HAS_PRUSA_MMU3 #include "../../core/language.h" -#include "mmu2_progress_converter.h" -#ifdef __AVR__ - #include -#endif +#include "mmu3_progress_converter.h" #include "mmu_hw/progress_codes.h" #include "mmu_hw/errors_list.h" namespace MMU3 { FSTR_P const progressTexts[] PROGMEM = { - GET_TEXT_F(MSG_PROGRESS_OK), - GET_TEXT_F(MSG_PROGRESS_ENGAGE_IDLER), - GET_TEXT_F(MSG_PROGRESS_DISENGAGE_IDLER), + GET_TEXT_F(MSG_PROGRESS_OK), // TODO: Generic messages for Marlin + GET_TEXT_F(MSG_PROGRESS_ENGAGE_IDLER), // reused below + GET_TEXT_F(MSG_PROGRESS_DISENGAGE_IDLER), // reused below GET_TEXT_F(MSG_PROGRESS_UNLOAD_FINDA), GET_TEXT_F(MSG_PROGRESS_UNLOAD_PULLEY), GET_TEXT_F(MSG_PROGRESS_FEED_FINDA), GET_TEXT_F(MSG_PROGRESS_FEED_EXTRUDER), GET_TEXT_F(MSG_PROGRESS_FEED_NOZZLE), GET_TEXT_F(MSG_PROGRESS_AVOID_GRIND), - GET_TEXT_F(MSG_FINISHING_MOVEMENTS), // reuse from messages.cpp + GET_TEXT_F(MSG_FINISHING_MOVEMENTS), GET_TEXT_F(MSG_PROGRESS_DISENGAGE_IDLER), // err disengaging idler is the same text GET_TEXT_F(MSG_PROGRESS_ENGAGE_IDLER), // engage dtto. GET_TEXT_F(MSG_PROGRESS_WAIT_USER), GET_TEXT_F(MSG_PROGRESS_ERR_INTERNAL), GET_TEXT_F(MSG_PROGRESS_ERR_HELP_FIL), GET_TEXT_F(MSG_PROGRESS_ERR_TMC), - GET_TEXT_F(MSG_UNLOADING_FILAMENT), // reuse from messages.cpp - GET_TEXT_F(MSG_LOADING_FILAMENT), // reuse from messages.cpp + GET_TEXT_F(MSG_UNLOADING_FILAMENT), + GET_TEXT_F(MSG_LOADING_FILAMENT), GET_TEXT_F(MSG_PROGRESS_SELECT_SLOT), GET_TEXT_F(MSG_PROGRESS_PREPARE_BLADE), GET_TEXT_F(MSG_PROGRESS_PUSH_FILAMENT), diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_progress_converter.h b/firmware/Marlin/src/feature/mmu3/mmu3_progress_converter.h similarity index 100% rename from firmware/Marlin/src/feature/mmu3/mmu2_progress_converter.h rename to firmware/Marlin/src/feature/mmu3/mmu3_progress_converter.h diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_protocol.cpp b/firmware/Marlin/src/feature/mmu3/mmu3_protocol.cpp similarity index 99% rename from firmware/Marlin/src/feature/mmu3/mmu2_protocol.cpp rename to firmware/Marlin/src/feature/mmu3/mmu3_protocol.cpp index 6cc5423..739599f 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2_protocol.cpp +++ b/firmware/Marlin/src/feature/mmu3/mmu3_protocol.cpp @@ -28,7 +28,7 @@ #if HAS_PRUSA_MMU3 -#include "mmu2_protocol.h" +#include "mmu3_protocol.h" // protocol definition // command: Q0 diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_protocol.h b/firmware/Marlin/src/feature/mmu3/mmu3_protocol.h similarity index 99% rename from firmware/Marlin/src/feature/mmu3/mmu2_protocol.h rename to firmware/Marlin/src/feature/mmu3/mmu3_protocol.h index 712ba17..7ec47fd 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2_protocol.h +++ b/firmware/Marlin/src/feature/mmu3/mmu3_protocol.h @@ -28,7 +28,7 @@ #include "../../MarlinCore.h" #include -#include "mmu2_crc.h" +#include "mmu3_crc.h" // prevent ARM HAL macros from breaking our code #undef CRC diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_protocol_logic.cpp b/firmware/Marlin/src/feature/mmu3/mmu3_protocol_logic.cpp similarity index 98% rename from firmware/Marlin/src/feature/mmu3/mmu2_protocol_logic.cpp rename to firmware/Marlin/src/feature/mmu3/mmu3_protocol_logic.cpp index 9453e67..cf74e66 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2_protocol_logic.cpp +++ b/firmware/Marlin/src/feature/mmu3/mmu3_protocol_logic.cpp @@ -28,9 +28,9 @@ #if HAS_PRUSA_MMU3 -#include "mmu2_protocol_logic.h" -#include "mmu2_log.h" -#include "mmu2_fsensor.h" +#include "mmu3_protocol_logic.h" +#include "mmu3_log.h" +#include "mmu3_fsensor.h" #ifdef __AVR__ // on MK3/S/+ we shuffle the timers a bit, thus "_millis" may not equal "millis" @@ -48,7 +48,7 @@ #endif #include - #include "mmu2_supported_version.h" + #include "mmu3_supported_version.h" namespace MMU3 { @@ -186,7 +186,7 @@ namespace MMU3 { OldMMUFWDetector oldMMUh4x0r; // old MMU FW hacker ;) // try to consume as many rx bytes as possible (until a message has been completed) - while ((c = MMU2_SERIAL.read()) >= 0) { + while ((c = MMU_SERIAL.read()) >= 0) { ++bytesConsumed; RecordReceivedByte(c); switch (protocol.DecodeResponse(c)) { @@ -234,10 +234,10 @@ namespace MMU3 { #if defined(__AVR__) || defined(TARGET_LPC1768) // TODO: I'm not sure if this is the correct approach with AVR for ( uint8_t i = 0; i < len; i++) { - MMU2_SERIAL.write(txbuff[i]); + MMU_SERIAL.write(txbuff[i]); } #else - MMU2_SERIAL.write(txbuff, len); + MMU_SERIAL.write(txbuff, len); #endif LogRequestMsg(txbuff, len); RecordUARTActivity(); @@ -254,10 +254,10 @@ namespace MMU3 { #if defined(__AVR__) || defined(TARGET_LPC1768) // TODO: I'm not sure if this is the correct approach with AVR for ( uint8_t i = 0; i < len; i++) { - MMU2_SERIAL.write(txbuff[i]); + MMU_SERIAL.write(txbuff[i]); } #else - MMU2_SERIAL.write(txbuff, len); + MMU_SERIAL.write(txbuff, len); #endif LogRequestMsg(txbuff, len); RecordUARTActivity(); @@ -373,7 +373,7 @@ namespace MMU3 { StepStatus ProtocolLogic::DelayedRestartWait() { if (Elapsed(heartBeatPeriod)) { // this basically means, that we are waiting until there is some traffic on - while (MMU2_SERIAL.read() != -1); // clear the input buffer + while (MMU_SERIAL.read() != -1); // clear the input buffer // switch to StartSeq start(); } @@ -587,7 +587,7 @@ namespace MMU3 { , buttonCode(Buttons::NoButton) , lastFSensor((uint8_t)WhereIsFilament()) , regIndex(0) - , retryAttempts(MMU2_MAX_RETRIES) + , retryAttempts(MMU3_MAX_RETRIES) , inAutoRetry(false) { // @@TODO currently, I don't see a way of writing the initialization better :( // I'd like to write something like: initRegs8 { extraLoadDistance, pulleySlowFeedrate } @@ -803,14 +803,14 @@ namespace MMU3 { } StepStatus ProtocolLogic::HandleCommunicationTimeout() { - MMU2_SERIAL.flush(); // clear the output buffer + MMU_SERIAL.flush(); // clear the output buffer protocol.ResetResponseDecoder(); start(); return SuppressShortDropOuts(PSTR("Communication timeout"), CommunicationTimeout); } StepStatus ProtocolLogic::HandleProtocolError() { - MMU2_SERIAL.flush(); // clear the output buffer + MMU_SERIAL.flush(); // clear the output buffer state = State::InitSequence; currentScope = Scope::DelayedRestart; DelayedRestartRestart(); @@ -880,7 +880,7 @@ namespace MMU3 { void ProtocolLogic::ResetRetryAttempts() { SERIAL_ECHOLNPGM("ResetRetryAttempts"); - retryAttempts = MMU2_MAX_RETRIES; + retryAttempts = MMU3_MAX_RETRIES; } void __attribute__((noinline)) ProtocolLogic::ResetCommunicationTimeoutAttempts() { diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_protocol_logic.h b/firmware/Marlin/src/feature/mmu3/mmu3_protocol_logic.h similarity index 99% rename from firmware/Marlin/src/feature/mmu3/mmu2_protocol_logic.h rename to firmware/Marlin/src/feature/mmu3/mmu3_protocol_logic.h index 6b24099..2fef77c 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2_protocol_logic.h +++ b/firmware/Marlin/src/feature/mmu3/mmu3_protocol_logic.h @@ -35,7 +35,7 @@ #include "mmu_hw/progress_codes.h" #include "mmu_hw/buttons.h" #include "mmu_hw/registers.h" - #include "mmu2_protocol.h" + #include "mmu3_protocol.h" // #include std array is not available on AVR ... we need to "fake" it namespace std { @@ -59,7 +59,7 @@ // Prevent ARM HAL macros from breaking our code #undef CRC - #include "mmu2_protocol.h" + #include "mmu3_protocol.h" #include "mmu_hw/buttons.h" #include "registers.h" diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_reporting.cpp b/firmware/Marlin/src/feature/mmu3/mmu3_reporting.cpp similarity index 99% rename from firmware/Marlin/src/feature/mmu3/mmu2_reporting.cpp rename to firmware/Marlin/src/feature/mmu3/mmu3_reporting.cpp index a51fa1b..4bf2088 100644 --- a/firmware/Marlin/src/feature/mmu3/mmu2_reporting.cpp +++ b/firmware/Marlin/src/feature/mmu3/mmu3_reporting.cpp @@ -28,13 +28,13 @@ #if HAS_PRUSA_MMU3 -#include "mmu2.h" -#include "mmu2_log.h" -#include "mmu2_fsensor.h" -#include "mmu2_reporting.h" -#include "mmu2_error_converter.h" -#include "mmu2_marlin_macros.h" -#include "mmu2_progress_converter.h" +#include "mmu3.h" +#include "mmu3_log.h" +#include "mmu3_fsensor.h" +#include "mmu3_reporting.h" +#include "mmu3_error_converter.h" +#include "mmu3_marlin_macros.h" +#include "mmu3_progress_converter.h" #include "mmu_hw/buttons.h" #include "mmu_hw/error_codes.h" #include "mmu_hw/errors_list.h" @@ -43,7 +43,7 @@ #include "../../core/language.h" #include "../../gcode/gcode.h" -#include "../../feature/host_actions.h" +#include "../host_actions.h" #include "../../lcd/marlinui.h" #include "../../lcd/menu/menu.h" #include "../../lcd/menu/menu_item.h" diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_reporting.h b/firmware/Marlin/src/feature/mmu3/mmu3_reporting.h similarity index 100% rename from firmware/Marlin/src/feature/mmu3/mmu2_reporting.h rename to firmware/Marlin/src/feature/mmu3/mmu3_reporting.h diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_state.h b/firmware/Marlin/src/feature/mmu3/mmu3_state.h similarity index 100% rename from firmware/Marlin/src/feature/mmu3/mmu2_state.h rename to firmware/Marlin/src/feature/mmu3/mmu3_state.h diff --git a/firmware/Marlin/src/feature/mmu3/mmu2_supported_version.h b/firmware/Marlin/src/feature/mmu3/mmu3_supported_version.h similarity index 100% rename from firmware/Marlin/src/feature/mmu3/mmu2_supported_version.h rename to firmware/Marlin/src/feature/mmu3/mmu3_supported_version.h diff --git a/firmware/Marlin/src/feature/mmu3/mmu_hw/check-pce.sh b/firmware/Marlin/src/feature/mmu3/mmu_hw/check-pce.sh old mode 100755 new mode 100644 diff --git a/firmware/Marlin/src/feature/mmu3/ultralcd.cpp b/firmware/Marlin/src/feature/mmu3/ultralcd.cpp index fdf4367..96e0197 100644 --- a/firmware/Marlin/src/feature/mmu3/ultralcd.cpp +++ b/firmware/Marlin/src/feature/mmu3/ultralcd.cpp @@ -28,8 +28,8 @@ #if HAS_PRUSA_MMU3 -#include "mmu2.h" -#include "mmu2_marlin_macros.h" +#include "mmu3.h" +#include "mmu3_marlin_macros.h" #include "mmu_hw/errors_list.h" #include "ultralcd.h" diff --git a/firmware/Marlin/src/feature/pause.cpp b/firmware/Marlin/src/feature/pause.cpp index 38ba0d6..3589847 100644 --- a/firmware/Marlin/src/feature/pause.cpp +++ b/firmware/Marlin/src/feature/pause.cpp @@ -62,6 +62,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" +#elif ENABLED(SOVOL_SV06_RTS) + #include "../lcd/sovol_rts/sovol_rts.h" #endif #include "../lcd/marlinui.h" @@ -150,6 +152,11 @@ static bool ensure_safe_temperature(const bool wait=true, const PauseMode mode=P ui.pause_show_message(PAUSE_MESSAGE_HEATING, mode); + #if ENABLED(SOVOL_SV06_RTS) + rts.gotoPage(ID_Cold_L, ID_Cold_D); + rts.updateTempE0(); + #endif + if (wait) return thermalManager.wait_for_hotend(active_extruder); // Allow interruption by Emergency Parser M108 @@ -212,14 +219,14 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load while (wait_for_user) { impatient_beep(max_beep_count); - #if ALL(FILAMENT_CHANGE_RESUME_ON_INSERT, FILAMENT_RUNOUT_SENSOR) + #if ALL(HAS_FILAMENT_SENSOR, FILAMENT_CHANGE_RESUME_ON_INSERT) #if MULTI_FILAMENT_SENSOR #define _CASE_INSERTED(N) case N-1: if (READ(FIL_RUNOUT##N##_PIN) != FIL_RUNOUT##N##_STATE) wait_for_user = false; break; switch (active_extruder) { REPEAT_1(NUM_RUNOUT_SENSORS, _CASE_INSERTED) } #else - if (READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE) wait_for_user = false; + if (!FILAMENT_IS_OUT()) wait_for_user = false; #endif #endif idle_no_sleep(); @@ -277,6 +284,11 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load // "Wait for filament purge" if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_PURGE); + #if ENABLED(SOVOL_SV06_RTS) + rts.updateTempE0(); + rts.gotoPage(ID_Purge_L, ID_Purge_D); + #endif + // Extrude filament to get into hotend unscaled_e_move(purge_length, ADVANCED_PAUSE_PURGE_FEEDRATE); } @@ -292,6 +304,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load ui.pause_show_message(PAUSE_MESSAGE_OPTION); // MarlinUI and MKS UI also set PAUSE_RESPONSE_WAIT_FOR #else pause_menu_response = PAUSE_RESPONSE_WAIT_FOR; + TERN_(SOVOL_SV06_RTS, rts.gotoPage(ID_PurgeMore_L, ID_PurgeMore_D)); #endif while (pause_menu_response == PAUSE_RESPONSE_WAIT_FOR) idle_no_sleep(); } @@ -355,6 +368,11 @@ bool unload_filament(const_float_t unload_length, const bool show_lcd/*=false*/, if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_UNLOAD, mode); + #if ENABLED(SOVOL_SV06_RTS) + rts.updateTempE0(); + rts.gotoPage(ID_Unload_L, ID_Unload_D); + #endif + // Retract filament unscaled_e_move(-(FILAMENT_UNLOAD_PURGE_RETRACT) * mix_multiplier, (PAUSE_PARK_RETRACT_FEEDRATE) * mix_multiplier); @@ -503,6 +521,11 @@ void show_continue_prompt(const bool is_reload) { DEBUG_ECHOLNPGM("... is_reload:", is_reload); ui.pause_show_message(is_reload ? PAUSE_MESSAGE_INSERT : PAUSE_MESSAGE_WAITING); + #if ENABLED(SOVOL_SV06_RTS) + rts.updateTempE0(); + rts.gotoPage(ID_Insert_L, ID_Insert_D); + rts.sendData(Beep, SoundAddr); + #endif SERIAL_ECHO_START(); SERIAL_ECHO(is_reload ? F(_PMSG(STR_FILAMENT_CHANGE_INSERT) "\n") : F(_PMSG(STR_FILAMENT_CHANGE_WAIT) "\n")); } @@ -544,6 +567,10 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep // re-heat the nozzle, re-show the continue prompt, restart idle timers, start over if (nozzle_timed_out) { ui.pause_show_message(PAUSE_MESSAGE_HEAT); + #if ENABLED(SOVOL_SV06_RTS) + rts.updateTempE0(); + rts.gotoPage(ID_HeatNozzle_L, ID_HeatNozzle_D); + #endif SERIAL_ECHO_MSG(_PMSG(STR_FILAMENT_CHANGE_HEAT)); TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_HEATER_TIMEOUT), GET_TEXT_F(MSG_REHEAT))); @@ -709,6 +736,12 @@ void resume_print( planner.set_e_position_mm((destination.e = current_position.e = resume_position.e)); ui.pause_show_message(PAUSE_MESSAGE_STATUS); + #if ENABLED(SOVOL_SV06_RTS) + if (pause_flag) + rts.gotoPage(ID_PrintResume_L, ID_PrintResume_D); + else + rts.refreshTime(); + #endif #ifdef ACTION_ON_RESUMED hostui.resumed(); diff --git a/firmware/Marlin/src/feature/powerloss.cpp b/firmware/Marlin/src/feature/powerloss.cpp index cd5fc13..3cd96e1 100644 --- a/firmware/Marlin/src/feature/powerloss.cpp +++ b/firmware/Marlin/src/feature/powerloss.cpp @@ -28,17 +28,18 @@ #if ENABLED(POWER_LOSS_RECOVERY) +#include "../inc/MarlinConfig.h" + #include "powerloss.h" -#include "../core/macros.h" #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" #endif -bool PrintJobRecovery::enabled; // Initialized by settings.load() +bool PrintJobRecovery::enabled; // Initialized by settings.load #if HAS_PLR_BED_THRESHOLD - celsius_t PrintJobRecovery::bed_temp_threshold; // Initialized by settings.load() + celsius_t PrintJobRecovery::bed_temp_threshold; // Initialized by settings.load #endif MediaFile PrintJobRecovery::file; @@ -60,12 +61,15 @@ uint32_t PrintJobRecovery::cmd_sdpos, // = 0 #include "../module/planner.h" #include "../module/printcounter.h" #include "../module/temperature.h" -#include "../core/serial.h" #if HOMING_Z_WITH_PROBE #include "../module/probe.h" #endif +#if ENABLED(SOVOL_SV06_RTS) + #include "../lcd/sovol_rts/sovol_rts.h" +#endif + #if ENABLED(FWRETRACT) #include "fwretract.h" #endif @@ -95,7 +99,7 @@ PrintJobRecovery recovery; /** * Clear the recovery info */ -void PrintJobRecovery::init() { memset(&info, 0, sizeof(info)); } +void PrintJobRecovery::init() { info = {}; } /** * Enable or disable then call changed() @@ -211,6 +215,7 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=POW info.zraise = zraise; info.flag.raised = raised; // Was Z raised before power-off? + TERN_(CANCEL_OBJECTS, info.cancel_state = cancelable.state); TERN_(GCODE_REPEAT_MARKERS, info.stored_repeat = repeat); TERN_(HAS_HOME_OFFSET, info.home_offset = home_offset); TERN_(HAS_WORKSPACE_OFFSET, info.workspace_offset = workspace_offset); @@ -571,6 +576,11 @@ void PrintJobRecovery::resume() { // Restore E position with G92.9 PROCESS_SUBCOMMANDS_NOW(TS(F("G92.9E"), p_float_t(resume_pos.e, 3))); + #if ENABLED(CANCEL_OBJECTS) + cancelable.state = info.cancel_state; + cancelable.set_active_object(); // Sets the status message + #endif + TERN_(GCODE_REPEAT_MARKERS, repeat = info.stored_repeat); TERN_(HAS_HOME_OFFSET, home_offset = info.home_offset); TERN_(HAS_WORKSPACE_OFFSET, workspace_offset = info.workspace_offset); @@ -584,6 +594,11 @@ void PrintJobRecovery::resume() { // Resume the SD file from the last position PROCESS_SUBCOMMANDS_NOW(MString(F("M23 "), info.sd_filename)); PROCESS_SUBCOMMANDS_NOW(TS(F("M24S"), resume_sdpos, 'T', info.print_job_elapsed)); + + #if ENABLED(SOVOL_SV06_RTS) + if (rts.print_state) rts.refreshTime(); + rts.start_print_flag = false; + #endif } #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) @@ -604,6 +619,14 @@ void PrintJobRecovery::resume() { DEBUG_ECHOLNPGM("zraise: ", info.zraise, " ", info.flag.raised ? "(before)" : ""); + #if ENABLED(CANCEL_OBJECTS) + const cancel_state_t cs = info.cancel_state; + DEBUG_ECHOPGM("Canceled:"); + for (int i = 0; i < cs.object_count; i++) + if (TEST(cs.canceled, i)) { DEBUG_CHAR(' '); DEBUG_ECHO(i); } + DEBUG_EOL(); + #endif + #if ENABLED(GCODE_REPEAT_MARKERS) const uint8_t ind = info.stored_repeat.count(); DEBUG_ECHOLNPGM("repeat markers: ", ind); diff --git a/firmware/Marlin/src/feature/powerloss.h b/firmware/Marlin/src/feature/powerloss.h index 238f276..8e1e299 100644 --- a/firmware/Marlin/src/feature/powerloss.h +++ b/firmware/Marlin/src/feature/powerloss.h @@ -30,12 +30,16 @@ #include "../inc/MarlinConfig.h" +#if ENABLED(CANCEL_OBJECTS) + #include "cancel_object.h" +#endif + #if ENABLED(GCODE_REPEAT_MARKERS) - #include "../feature/repeat.h" + #include "repeat.h" #endif #if ENABLED(MIXING_EXTRUDER) - #include "../feature/mixing.h" + #include "mixing.h" #endif #if !defined(POWER_LOSS_STATE) && PIN_EXISTS(POWER_LOSS) @@ -64,6 +68,11 @@ typedef struct { float zraise; + // Canceled objects + #if ENABLED(CANCEL_OBJECTS) + cancel_state_t cancel_state; + #endif + // Repeat information #if ENABLED(GCODE_REPEAT_MARKERS) Repeat stored_repeat; diff --git a/firmware/Marlin/src/feature/runout.cpp b/firmware/Marlin/src/feature/runout.cpp index 2bcb47e..cb7c627 100644 --- a/firmware/Marlin/src/feature/runout.cpp +++ b/firmware/Marlin/src/feature/runout.cpp @@ -59,7 +59,7 @@ bool FilamentMonitorBase::enabled = true, // Filament Runout event handler // #include "../MarlinCore.h" -#include "../feature/pause.h" +#include "pause.h" #include "../gcode/queue.h" #if ENABLED(HOST_ACTION_COMMANDS) diff --git a/firmware/Marlin/src/feature/runout.h b/firmware/Marlin/src/feature/runout.h index c95c39f..52a9020 100644 --- a/firmware/Marlin/src/feature/runout.h +++ b/firmware/Marlin/src/feature/runout.h @@ -30,7 +30,7 @@ #include "../module/planner.h" #include "../module/stepper.h" // for block_t #include "../gcode/queue.h" -#include "../feature/pause.h" // for did_pause_print +#include "pause.h" // for did_pause_print #include "../MarlinCore.h" // for printingIsActive() #include "../inc/MarlinConfig.h" @@ -51,6 +51,8 @@ #define HAS_FILAMENT_SWITCH 1 #endif +#define FILAMENT_IS_OUT() (READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_STATE) + typedef Flags< #if NUM_MOTION_SENSORS > NUM_RUNOUT_SENSORS NUM_MOTION_SENSORS diff --git a/firmware/Marlin/src/feature/spindle_laser.cpp b/firmware/Marlin/src/feature/spindle_laser.cpp index c0635c7..b83c1c1 100644 --- a/firmware/Marlin/src/feature/spindle_laser.cpp +++ b/firmware/Marlin/src/feature/spindle_laser.cpp @@ -35,7 +35,7 @@ #endif #if ENABLED(I2C_AMMETER) - #include "../feature/ammeter.h" + #include "ammeter.h" #endif SpindleLaser cutter; diff --git a/firmware/Marlin/src/feature/tmc_util.cpp b/firmware/Marlin/src/feature/tmc_util.cpp index a2c1207..6afbf4a 100644 --- a/firmware/Marlin/src/feature/tmc_util.cpp +++ b/firmware/Marlin/src/feature/tmc_util.cpp @@ -32,6 +32,10 @@ #include "../libs/duration_t.h" #include "../gcode/gcode.h" +#if ENABLED(SOVOL_SV06_RTS) + #include "../lcd/sovol_rts/sovol_rts.h" +#endif + #if ENABLED(TMC_DEBUG) #include "../libs/hex_print.h" #if ENABLED(MONITOR_DRIVER_STATUS) @@ -207,6 +211,7 @@ if (data.is_ot) SERIAL_ECHOLNPGM("overtemperature"); if (data.is_s2g) SERIAL_ECHOLNPGM("coil short circuit"); TERN_(TMC_DEBUG, tmc_report_all()); + TERN_(SOVOL_SV06_RTS, rts.gotoPage(ID_DriverError_L, ID_DriverError_D)); kill(F("Driver error")); } #endif @@ -609,9 +614,10 @@ default: break; } } - #endif + #endif // TMC2160 || TMC5160 #if HAS_TMC220x + static void _tmc_status(TMC2208Stepper &st, const TMC_debug_enum i) { switch (i) { case TMC_PWM_SCALE_SUM: SERIAL_ECHO(st.pwm_scale_sum()); break; @@ -659,7 +665,8 @@ } } #endif - #endif + + #endif // HAS_TMC220x #if HAS_DRIVER(TMC2660) static void _tmc_parse_drv_status(TMC2660Stepper, const TMC_drv_status_enum) { } diff --git a/firmware/Marlin/src/feature/tmc_util.h b/firmware/Marlin/src/feature/tmc_util.h index 12f3a38..27aae23 100644 --- a/firmware/Marlin/src/feature/tmc_util.h +++ b/firmware/Marlin/src/feature/tmc_util.h @@ -29,7 +29,7 @@ #include #include "../module/planner.h" -#define CHOPPER_DEFAULT_12V { 3, -1, 1 } +#define CHOPPER_DEFAULT_12V { 3, -1, 1 } // { toff, hend, hstrt } #define CHOPPER_DEFAULT_19V { 4, 1, 1 } #define CHOPPER_DEFAULT_24V { 4, 2, 1 } #define CHOPPER_DEFAULT_36V { 5, 2, 4 } @@ -77,8 +77,8 @@ class TMCStorage { struct { OPTCODE(HAS_STEALTHCHOP, bool stealthChop_enabled = false) - OPTCODE(HYBRID_THRESHOLD, uint8_t hybrid_thrs = 0) - OPTCODE(USE_SENSORLESS, int16_t homing_thrs = 0) + OPTCODE(HYBRID_THRESHOLD, uint16_t hybrid_thrs = 0) + OPTCODE(USE_SENSORLESS, int16_t homing_thrs = 0) } stored; }; diff --git a/firmware/Marlin/src/feature/x_twist.cpp b/firmware/Marlin/src/feature/x_twist.cpp index b8f7e52..2b79247 100644 --- a/firmware/Marlin/src/feature/x_twist.cpp +++ b/firmware/Marlin/src/feature/x_twist.cpp @@ -30,7 +30,7 @@ XATC xatc; bool XATC::enabled; float XATC::spacing, XATC::start; -xatc_array_t XATC::z_offset; // Initialized by settings.load() +xatc_array_t XATC::z_offset; // Initialized by settings.load void XATC::reset() { constexpr float xzo[] = XATC_Z_OFFSETS; diff --git a/firmware/Marlin/src/gcode/bedlevel/G26.cpp b/firmware/Marlin/src/gcode/bedlevel/G26.cpp index e4272c1..8c26ca4 100644 --- a/firmware/Marlin/src/gcode/bedlevel/G26.cpp +++ b/firmware/Marlin/src/gcode/bedlevel/G26.cpp @@ -102,7 +102,7 @@ #define G26_OK false #define G26_ERR true -#include "../../gcode/gcode.h" +#include "../gcode.h" #include "../../feature/bedlevel/bedlevel.h" #include "../../MarlinCore.h" diff --git a/firmware/Marlin/src/gcode/bedlevel/G35.cpp b/firmware/Marlin/src/gcode/bedlevel/G35.cpp index c1a329f..b3c56b4 100644 --- a/firmware/Marlin/src/gcode/bedlevel/G35.cpp +++ b/firmware/Marlin/src/gcode/bedlevel/G35.cpp @@ -53,7 +53,7 @@ * 41 - Counter-Clockwise M4 * 50 - Clockwise M5 * 51 - Counter-Clockwise M5 - **/ + */ void GcodeSuite::G35() { DEBUG_SECTION(log_G35, "G35", DEBUGGING(LEVELING)); diff --git a/firmware/Marlin/src/gcode/bedlevel/G42.cpp b/firmware/Marlin/src/gcode/bedlevel/G42.cpp index f55f149..44f5cea 100644 --- a/firmware/Marlin/src/gcode/bedlevel/G42.cpp +++ b/firmware/Marlin/src/gcode/bedlevel/G42.cpp @@ -43,40 +43,40 @@ * P : Flag to put the probe at the given point */ void GcodeSuite::G42() { - if (MOTION_CONDITIONS) { - const bool hasI = parser.seenval('I'); - const int8_t ix = hasI ? parser.value_int() : 0; - const bool hasJ = parser.seenval('J'); - const int8_t iy = hasJ ? parser.value_int() : 0; + if (!MOTION_CONDITIONS) return; - if ((hasI && !WITHIN(ix, 0, GRID_MAX_POINTS_X - 1)) || (hasJ && !WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1))) { - SERIAL_ECHOLNPGM(STR_ERR_MESH_XY); - return; - } + const bool hasI = parser.seenval('I'); + const int8_t ix = hasI ? parser.value_int() : 0; + const bool hasJ = parser.seenval('J'); + const int8_t iy = hasJ ? parser.value_int() : 0; - // Move to current_position, as modified by I, J, P parameters - destination = current_position; - - if (hasI) destination.x = bedlevel.get_mesh_x(ix); - if (hasJ) destination.y = bedlevel.get_mesh_y(iy); - - #if HAS_PROBE_XY_OFFSET - if (parser.seen_test('P')) { - if (hasI) destination.x -= probe.offset_xy.x; - if (hasJ) destination.y -= probe.offset_xy.y; - } - #endif - - const feedRate_t fval = parser.linearval('F'), - fr_mm_s = MMM_TO_MMS(fval > 0 ? fval : 0.0f); - - // SCARA kinematic has "safe" XY raw moves - #if IS_SCARA - prepare_internal_fast_move_to_destination(fr_mm_s); - #else - prepare_internal_move_to_destination(fr_mm_s); - #endif + if ((hasI && !WITHIN(ix, 0, GRID_MAX_POINTS_X - 1)) || (hasJ && !WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1))) { + SERIAL_ECHOLNPGM(STR_ERR_MESH_XY); + return; } + + // Move to current_position, as modified by I, J, P parameters + destination = current_position; + + if (hasI) destination.x = bedlevel.get_mesh_x(ix); + if (hasJ) destination.y = bedlevel.get_mesh_y(iy); + + #if HAS_PROBE_XY_OFFSET + if (parser.seen_test('P')) { + if (hasI) destination.x -= probe.offset_xy.x; + if (hasJ) destination.y -= probe.offset_xy.y; + } + #endif + + const feedRate_t fval = parser.linearval('F'), + fr_mm_s = MMM_TO_MMS(fval > 0 ? fval : 0.0f); + + // SCARA kinematic has "safe" XY raw moves + #if IS_SCARA + prepare_internal_fast_move_to_destination(fr_mm_s); + #else + prepare_internal_move_to_destination(fr_mm_s); + #endif } #endif // HAS_MESH diff --git a/firmware/Marlin/src/gcode/bedlevel/abl/G29.cpp b/firmware/Marlin/src/gcode/bedlevel/abl/G29.cpp index 9e85b73..7c8289b 100644 --- a/firmware/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/firmware/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -33,6 +33,7 @@ #include "../../../module/motion.h" #include "../../../module/planner.h" #include "../../../module/probe.h" +#include "../../../module/temperature.h" #include "../../queue.h" #if ENABLED(AUTO_BED_LEVELING_LINEAR) @@ -51,6 +52,8 @@ #include "../../../lcd/extui/ui_api.h" #elif ENABLED(DWIN_CREALITY_LCD) #include "../../../lcd/e3v2/creality/dwin.h" +#elif ENABLED(SOVOL_SV06_RTS) + #include "../../../lcd/sovol_rts/sovol_rts.h" #endif #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) @@ -438,6 +441,12 @@ G29_TYPE GcodeSuite::G29() { remember_feedrate_scaling_off(); #if ENABLED(PREHEAT_BEFORE_LEVELING) + #if ENABLED(SOVOL_SV06_RTS) + rts.updateTempE0(); + rts.updateTempBed(); + rts.sendData(1, Wait_VP); + rts.gotoPage(ID_ABL_HeatWait_L, ID_ABL_HeatWait_D); + #endif if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP, TERN(EXTENSIBLE_UI, ExtUI::getLevelingBedTemp(), LEVELING_BED_TEMP) ); @@ -775,6 +784,12 @@ G29_TYPE GcodeSuite::G29() { abl.z_values[abl.meshCount.x][abl.meshCount.y] = z; TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(abl.meshCount, z)); + #if ENABLED(SOVOL_SV06_RTS) + if (pt_index <= GRID_MAX_POINTS) rts.sendData(pt_index, AUTO_BED_LEVEL_ICON_VP); + rts.sendData(z * 100.0f, AUTO_BED_LEVEL_1POINT_VP + (pt_index - 1) * 2); + rts.gotoPage(ID_ABL_Wait_L, ID_ABL_Wait_D); + #endif + #endif abl.reenable = false; // Don't re-enable after modifying the mesh @@ -992,6 +1007,8 @@ G29_TYPE GcodeSuite::G29() { process_subcommands_now(F(EVENT_GCODE_AFTER_G29)); #endif + TERN_(SOVOL_SV06_RTS, RTS_AutoBedLevelPage()); + probe.use_probing_tool(false); report_current_position(); diff --git a/firmware/Marlin/src/gcode/calibrate/G28.cpp b/firmware/Marlin/src/gcode/calibrate/G28.cpp index 56b4761..ac90756 100644 --- a/firmware/Marlin/src/gcode/calibrate/G28.cpp +++ b/firmware/Marlin/src/gcode/calibrate/G28.cpp @@ -58,6 +58,8 @@ #include "../../lcd/extui/ui_api.h" #elif ENABLED(DWIN_CREALITY_LCD) #include "../../lcd/e3v2/creality/dwin.h" +#elif ENABLED(SOVOL_SV06_RTS) + #include "../../lcd/sovol_rts/sovol_rts.h" #endif #if ENABLED(LASER_FEATURE) @@ -203,6 +205,11 @@ * L Force leveling state ON (if possible) or OFF after homing (Requires RESTORE_LEVELING_AFTER_G28 or ENABLE_LEVELING_AFTER_G28) * O Home only if the position is not known and trusted * R Raise by n mm/inches before homing + * H Hold the current X/Y position when executing a home Z, or if + * multiple axes are homed, the position when Z home is executed. + * When using a probe for Z Home, positions close to the edge may + * fail with position unreachable due to probe/nozzle offset. This + * can be used to avoid a model. * * Cartesian/SCARA parameters * @@ -315,9 +322,9 @@ void GcodeSuite::G28() { #else // !DELTA && !AXEL_TPARA - #define _UNSAFE(A) (homeZ && TERN0(Z_SAFE_HOMING, axes_should_home(_BV(A##_AXIS)))) + #define _UNSAFE(A) TERN0(Z_SAFE_HOMING, homeZZ && axis_should_home(_AXIS(A))) - const bool homeZ = TERN0(HAS_Z_AXIS, parser.seen_test('Z')), + const bool homeZZ = TERN0(HAS_Z_AXIS, parser.seen_test('Z')), NUM_AXIS_LIST_( // Other axes should be homed before Z safe-homing needX = _UNSAFE(X), needY = _UNSAFE(Y), needZ = false, // UNUSED needI = _UNSAFE(I), needJ = _UNSAFE(J), needK = _UNSAFE(K), @@ -326,7 +333,7 @@ void GcodeSuite::G28() { NUM_AXIS_LIST_( // Home each axis if needed or flagged homeX = needX || parser.seen_test('X'), homeY = needY || parser.seen_test('Y'), - homeZZ = homeZ, + homeZ = homeZZ, homeI = needI || parser.seen_test(AXIS4_NAME), homeJ = needJ || parser.seen_test(AXIS5_NAME), homeK = needK || parser.seen_test(AXIS6_NAME), homeU = needU || parser.seen_test(AXIS7_NAME), homeV = needV || parser.seen_test(AXIS8_NAME), homeW = needW || parser.seen_test(AXIS9_NAME) @@ -348,7 +355,7 @@ void GcodeSuite::G28() { #if HAS_Z_AXIS - UNUSED(needZ); UNUSED(homeZZ); + UNUSED(needZ); // Z may home first, e.g., when homing away from the bed. // This is also permitted when homing with a Z endstop. @@ -432,8 +439,7 @@ void GcodeSuite::G28() { #if HAS_Y_AXIS // Home Y (after X) - if (DISABLED(HOME_Y_BEFORE_X) && doY) - homeaxis(Y_AXIS); + if (DISABLED(HOME_Y_BEFORE_X) && doY) homeaxis(Y_AXIS); #endif #if ALL(FOAMCUTTER_XYUV, HAS_J_AXIS) @@ -459,7 +465,12 @@ void GcodeSuite::G28() { #endif #if ENABLED(Z_SAFE_HOMING) - if (TERN1(POWER_LOSS_RECOVERY, !parser.seen_test('H'))) home_z_safely(); else homeaxis(Z_AXIS); + // H means hold the current X/Y position when probing. + // Otherwise move to the define safe X/Y position before homing Z. + if (!parser.seen_test('H')) + home_z_safely(); + else + homeaxis(Z_AXIS); #else homeaxis(Z_AXIS); #endif @@ -555,6 +566,7 @@ void GcodeSuite::G28() { ui.refresh(); + TERN_(SOVOL_SV06_RTS, RTS_MoveAxisHoming()); TERN_(DWIN_CREALITY_LCD, dwinHomingDone()); TERN_(EXTENSIBLE_UI, ExtUI::onHomingDone()); diff --git a/firmware/Marlin/src/gcode/calibrate/G34_M422.cpp b/firmware/Marlin/src/gcode/calibrate/G34_M422.cpp index 7a27a61..17d5766 100644 --- a/firmware/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/firmware/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -212,7 +212,28 @@ void GcodeSuite::G34() { // Probe a Z height for each stepper. // Probing sanity check is disabled, as it would trigger even in normal cases because // current_position.z has been manually altered in the "dirty trick" above. - const float z_probed_height = probe.probe_at_point(DIFF_TERN(HAS_HOME_OFFSET, ppos, xy_pos_t(home_offset)), raise_after, 0, true, false, (Z_PROBE_LOW_POINT) - z_probe * 0.5f, z_probe * 0.5f); + + if (DEBUGGING(LEVELING)) + DEBUG_ECHOLNPGM( + "Z_PROBE_LOW_POINT: ", p_float_t(Z_PROBE_LOW_POINT, 2), + "z_probe: ", p_float_t(z_probe, 2), + "Probe Tgt: ", p_float_t((Z_PROBE_LOW_POINT) - z_probe * 0.5f, 2) + ); + + const float z_probed_height = probe.probe_at_point( + DIFF_TERN(HAS_HOME_OFFSET, ppos, xy_pos_t(home_offset)), // xy + raise_after, // raise_after + (DEBUGGING(LEVELING) || DEBUGGING(INFO)) ? 3 : 0, // verbose_level + true, false, // probe_relative, sanity_check + (Z_PROBE_LOW_POINT) - (z_probe * 0.5f), // z_min_point + Z_TWEEN_SAFE_CLEARANCE // z_clearance + ); + + if (DEBUGGING(LEVELING)) { + DEBUG_ECHOLNPGM_P(PSTR("Probing X"), ppos.x, SP_Y_STR, ppos.y); + DEBUG_ECHOLNPGM("Height = ", z_probed_height); + } + if (isnan(z_probed_height)) { SERIAL_ECHOLNPGM(STR_ERR_PROBING_FAILED); LCD_MESSAGE(MSG_LCD_PROBING_FAILED); @@ -236,7 +257,12 @@ void GcodeSuite::G34() { // Adapt the next probe clearance height based on the new measurements. // Safe_height = lowest distance to bed (= highest measurement) plus highest measured misalignment. z_maxdiff = z_measured_max - z_measured_min; - z_probe = (Z_TWEEN_SAFE_CLEARANCE + zoffs) + z_measured_max + z_maxdiff; //Not sure we need z_maxdiff, but leaving it in for safety. + + // The intent of the line below seems to be to clamp the probe depth on successive iterations of G34, but in reality if the amplification + // factor is not completely accurate, this was causing probing to fail as the probe stopped fractions of a mm from the trigger point + // on the second iteration very reliably. This may be restored with an uncertainty factor at some point, however its usefulness after + // all probe points have seen a successful probe is questionable. + //z_probe = (Z_TWEEN_SAFE_CLEARANCE + zoffs) + z_measured_max + z_maxdiff; // Not sure we need z_maxdiff, but leaving it in for safety. #if HAS_Z_STEPPER_ALIGN_STEPPER_XY // Replace the initial values in z_measured with calculated heights at @@ -401,7 +427,15 @@ void GcodeSuite::G34() { // Use the probed height from the last iteration to determine the Z height. // z_measured_min is used, because all steppers are aligned to z_measured_min. // Ideally, this would be equal to the 'z_probe * 0.5f' which was added earlier. - current_position.z -= z_measured_min - (Z_TWEEN_SAFE_CLEARANCE + zoffs); //we shouldn't want to subtract the clearance from here right? (Depends if we added it further up) + if (DEBUGGING(LEVELING)) + DEBUG_ECHOLNPGM( + "z_measured_min: ", p_float_t(z_measured_min, 2), + "Z_TWEEN_SAFE_CLEARANCE: ", p_float_t(Z_TWEEN_SAFE_CLEARANCE, 2), + "zoffs: ", p_float_t(zoffs, 2) + ); + + if (!err_break) + current_position.z -= z_measured_min - (Z_TWEEN_SAFE_CLEARANCE + zoffs); // We shouldn't want to subtract the clearance from here right? (Depends if we added it further up) sync_plan_position(); #endif diff --git a/firmware/Marlin/src/gcode/calibrate/G425.cpp b/firmware/Marlin/src/gcode/calibrate/G425.cpp index ad17b2e..6338873 100644 --- a/firmware/Marlin/src/gcode/calibrate/G425.cpp +++ b/firmware/Marlin/src/gcode/calibrate/G425.cpp @@ -332,10 +332,22 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { probe_side(m, uncertainty, TOP); #endif - TERN_(CALIBRATION_MEASURE_RIGHT, probe_side(m, uncertainty, RIGHT, probe_top_at_edge)); + /** + * Allow Y axis to probe and compute values before X axis (or remaining arbitrary axes) + * to assist with centering in calibration object. Lulzbot saw issues with higher uncertainty + * values where the nozzle was catching on the edges of the cube, and this was intended to help + * ensure the probe object remained centered. + */ TERN_(CALIBRATION_MEASURE_FRONT, probe_side(m, uncertainty, FRONT, probe_top_at_edge)); - TERN_(CALIBRATION_MEASURE_LEFT, probe_side(m, uncertainty, LEFT, probe_top_at_edge)); TERN_(CALIBRATION_MEASURE_BACK, probe_side(m, uncertainty, BACK, probe_top_at_edge)); + + #if HAS_Y_CENTER + m.obj_center.y = (m.obj_side[FRONT] + m.obj_side[BACK]) / 2; + m.nozzle_outer_dimension.y = m.obj_side[BACK] - m.obj_side[FRONT] - dimensions.y; + #endif + + TERN_(CALIBRATION_MEASURE_LEFT, probe_side(m, uncertainty, LEFT, probe_top_at_edge)); + TERN_(CALIBRATION_MEASURE_RIGHT, probe_side(m, uncertainty, RIGHT, probe_top_at_edge)); TERN_(CALIBRATION_MEASURE_IMIN, probe_side(m, uncertainty, IMINIMUM, probe_top_at_edge)); TERN_(CALIBRATION_MEASURE_IMAX, probe_side(m, uncertainty, IMAXIMUM, probe_top_at_edge)); TERN_(CALIBRATION_MEASURE_JMIN, probe_side(m, uncertainty, JMINIMUM, probe_top_at_edge)); @@ -351,7 +363,6 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { // Compute the measured center of the calibration object. TERN_(HAS_X_CENTER, m.obj_center.x = (m.obj_side[LEFT] + m.obj_side[RIGHT]) / 2); - TERN_(HAS_Y_CENTER, m.obj_center.y = (m.obj_side[FRONT] + m.obj_side[BACK]) / 2); TERN_(HAS_I_CENTER, m.obj_center.i = (m.obj_side[IMINIMUM] + m.obj_side[IMAXIMUM]) / 2); TERN_(HAS_J_CENTER, m.obj_center.j = (m.obj_side[JMINIMUM] + m.obj_side[JMAXIMUM]) / 2); TERN_(HAS_K_CENTER, m.obj_center.k = (m.obj_side[KMINIMUM] + m.obj_side[KMAXIMUM]) / 2); @@ -362,7 +373,6 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { // Compute the outside diameter of the nozzle at the height // at which it makes contact with the calibration object TERN_(HAS_X_CENTER, m.nozzle_outer_dimension.x = m.obj_side[RIGHT] - m.obj_side[LEFT] - dimensions.x); - TERN_(HAS_Y_CENTER, m.nozzle_outer_dimension.y = m.obj_side[BACK] - m.obj_side[FRONT] - dimensions.y); park_above_object(m, uncertainty); diff --git a/firmware/Marlin/src/gcode/config/M210.cpp b/firmware/Marlin/src/gcode/config/M210.cpp new file mode 100644 index 0000000..99c750b --- /dev/null +++ b/firmware/Marlin/src/gcode/config/M210.cpp @@ -0,0 +1,100 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 . + * + */ + +#include "../../inc/MarlinConfigPre.h" + +#if ENABLED(EDITABLE_HOMING_FEEDRATE) + +#include "../gcode.h" +#include "../../module/motion.h" + +/** + * M210 - Set homing feedrate for one or more axes + * in current units (in/mm) per minute + * + * X[feedrate] Set X axis homing feedrate + * Y[feedrate] Set Y axis homing feedrate + * Z[feedrate] Set Z axis homing feedrate + * A[feedrate] Set I axis homing feedrate (configured axis name applies) + * B[feedrate] Set J axis homing feedrate (configured axis name applies) + * C[feedrate] Set K axis homing feedrate (configured axis name applies) + * U[feedrate] Set U axis homing feedrate (configured axis name applies) + * V[feedrate] Set V axis homing feedrate (configured axis name applies) + * W[feedrate] Set W axis homing feedrate (configured axis name applies) + * + * With no arguments, report the current offsets. + */ +void GcodeSuite::M210() { + if (!parser.seen_any()) + return M210_report(); + + #if HAS_X_AXIS + if (parser.floatval('X') > 0) homing_feedrate_mm_m.x = parser.value_axis_units(X_AXIS); + #endif + #if HAS_Y_AXIS + if (parser.floatval('Y') > 0) homing_feedrate_mm_m.y = parser.value_axis_units(Y_AXIS); + #endif + #if HAS_Z_AXIS + if (parser.floatval('Z') > 0) homing_feedrate_mm_m.z = parser.value_axis_units(Z_AXIS); + #endif + #if HAS_I_AXIS + if (parser.floatval(AXIS4_NAME) > 0) homing_feedrate_mm_m.i = parser.value_axis_units(I_AXIS); + #endif + #if HAS_J_AXIS + if (parser.floatval(AXIS5_NAME) > 0) homing_feedrate_mm_m.j = parser.value_axis_units(J_AXIS); + #endif + #if HAS_K_AXIS + if (parser.floatval(AXIS6_NAME) > 0) homing_feedrate_mm_m.k = parser.value_axis_units(K_AXIS); + #endif + #if HAS_U_AXIS + if (parser.floatval(AXIS7_NAME) > 0) homing_feedrate_mm_m.u = parser.value_axis_units(U_AXIS); + #endif + #if HAS_V_AXIS + if (parser.floatval(AXIS8_NAME) > 0) homing_feedrate_mm_m.v = parser.value_axis_units(V_AXIS); + #endif + #if HAS_W_AXIS + if (parser.floatval(AXIS9_NAME) > 0) homing_feedrate_mm_m.w = parser.value_axis_units(W_AXIS); + #endif +} + +void GcodeSuite::M210_report(const bool forReplay/*=true*/) { + TERN_(MARLIN_SMALL_BUILD, return); + + report_heading_etc(forReplay, F(STR_HOMING_FEEDRATE)); + + SERIAL_ECHOPGM(" M210"); + SERIAL_ECHOLNPGM_P( + LIST_N(DOUBLE(NUM_AXES) + , SP_X_STR, X_AXIS_UNIT(homing_feedrate_mm_m.x) + , SP_Y_STR, Y_AXIS_UNIT(homing_feedrate_mm_m.y) + , SP_Z_STR, Z_AXIS_UNIT(homing_feedrate_mm_m.z) + , SP_I_STR, I_AXIS_UNIT(homing_feedrate_mm_m.i) + , SP_J_STR, J_AXIS_UNIT(homing_feedrate_mm_m.j) + , SP_K_STR, K_AXIS_UNIT(homing_feedrate_mm_m.k) + , SP_U_STR, U_AXIS_UNIT(homing_feedrate_mm_m.u) + , SP_V_STR, V_AXIS_UNIT(homing_feedrate_mm_m.v) + , SP_W_STR, W_AXIS_UNIT(homing_feedrate_mm_m.w) + ) + ); +} + +#endif // EDITABLE_HOMING_FEEDRATE diff --git a/firmware/Marlin/src/gcode/config/M43.cpp b/firmware/Marlin/src/gcode/config/M43.cpp index c695cd3..8936077 100644 --- a/firmware/Marlin/src/gcode/config/M43.cpp +++ b/firmware/Marlin/src/gcode/config/M43.cpp @@ -71,11 +71,13 @@ inline void toggle_pins() { else { hal.watchdog_refresh(); printPinStateExt(pin, ignore_protection, true, F("Pulsing ")); - #ifdef __STM32F1__ - const auto prior_mode = _GET_MODE(i); - #else - const bool prior_mode = getValidPinMode(pin); - #endif + const auto prior_mode = ( + #ifdef __STM32F1__ + _GET_MODE(i) + #else + getValidPinMode(pin) + #endif + ); #if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO if (pin == TEENSY_E2) { SET_OUTPUT(TEENSY_E2); diff --git a/firmware/Marlin/src/gcode/control/T.cpp b/firmware/Marlin/src/gcode/control/T.cpp index 3b0c173..9f6fb2b 100644 --- a/firmware/Marlin/src/gcode/control/T.cpp +++ b/firmware/Marlin/src/gcode/control/T.cpp @@ -32,7 +32,7 @@ #endif #if HAS_PRUSA_MMU3 - #include "../../feature/mmu3/mmu2.h" + #include "../../feature/mmu3/mmu3.h" #elif HAS_PRUSA_MMU2 #include "../../feature/mmu/mmu2.h" #endif diff --git a/firmware/Marlin/src/gcode/eeprom/M500-M504.cpp b/firmware/Marlin/src/gcode/eeprom/M500-M504.cpp index c396211..ffa6d5c 100644 --- a/firmware/Marlin/src/gcode/eeprom/M500-M504.cpp +++ b/firmware/Marlin/src/gcode/eeprom/M500-M504.cpp @@ -22,7 +22,6 @@ #include "../gcode.h" #include "../../module/settings.h" -#include "../../core/serial.h" #include "../../inc/MarlinConfig.h" #if ENABLED(CONFIGURATION_EMBEDDING) diff --git a/firmware/Marlin/src/gcode/feature/cancel/M486.cpp b/firmware/Marlin/src/gcode/feature/cancel/M486.cpp index c1e90d1..37347e9 100644 --- a/firmware/Marlin/src/gcode/feature/cancel/M486.cpp +++ b/firmware/Marlin/src/gcode/feature/cancel/M486.cpp @@ -41,7 +41,7 @@ void GcodeSuite::M486() { if (parser.seen('T')) { cancelable.reset(); - cancelable.object_count = parser.intval('T', 1); + cancelable.state.object_count = parser.intval('T', 1); } if (parser.seenval('S')) diff --git a/firmware/Marlin/src/gcode/feature/macro/M820.cpp b/firmware/Marlin/src/gcode/feature/macro/M820.cpp new file mode 100644 index 0000000..9759f48 --- /dev/null +++ b/firmware/Marlin/src/gcode/feature/macro/M820.cpp @@ -0,0 +1,52 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ + +#include "../../../inc/MarlinConfig.h" + +#if ENABLED(GCODE_MACROS) + +#include "../../gcode.h" +#include "../../queue.h" +#include "../../parser.h" + +extern char gcode_macros[GCODE_MACROS_SLOTS][GCODE_MACROS_SLOT_SIZE + 1]; + +/** + * M820: List defined M810 - M819 macros + */ +void GcodeSuite::M820() { + SERIAL_ECHOLNPGM(STR_STORED_MACROS); + bool some = false; + for (uint8_t i = 0; i < GCODE_MACROS_SLOTS; ++i) { + const char *cmd = gcode_macros[i]; + if (*cmd) { + SERIAL_ECHO(F("M81"), i, C(' ')); + char c; + while ((c = *cmd++)) SERIAL_CHAR(c == '\n' ? '|' : c); + SERIAL_EOL(); + some = true; + } + } + if (!some) SERIAL_ECHOLNPGM("None"); +} + +#endif // GCODE_MACROS diff --git a/firmware/Marlin/src/gcode/feature/pause/G27.cpp b/firmware/Marlin/src/gcode/feature/pause/G27.cpp index 229b22a..99159cf 100644 --- a/firmware/Marlin/src/gcode/feature/pause/G27.cpp +++ b/firmware/Marlin/src/gcode/feature/pause/G27.cpp @@ -27,6 +27,9 @@ #include "../../gcode.h" #include "../../../libs/nozzle.h" #include "../../../module/motion.h" +#if ENABLED(SOVOL_SV06_RTS) + #include "../../../lcd/sovol_rts/sovol_rts.h" +#endif /** * G27: Park the nozzle according with the given style @@ -42,6 +45,7 @@ void GcodeSuite::G27() { // Don't allow nozzle parking without homing first if (homing_needed_error()) return; nozzle.park(parser.ushortval('P')); + TERN_(SOVOL_SV06_RTS, RTS_MoveAxisHoming()); } #endif // NOZZLE_PARK_FEATURE diff --git a/firmware/Marlin/src/gcode/feature/pause/G61.cpp b/firmware/Marlin/src/gcode/feature/pause/G61.cpp index 08b4a99..7f2a45b 100644 --- a/firmware/Marlin/src/gcode/feature/pause/G61.cpp +++ b/firmware/Marlin/src/gcode/feature/pause/G61.cpp @@ -75,7 +75,9 @@ void GcodeSuite::G61(int8_t slot/*=-1*/) { // No XYZ...E parameters, move to stored position - float epos = stored_position[slot].e; + #if HAS_EXTRUDERS + float epos = stored_position[slot].e; + #endif if (!parser.seen_axis()) { DEBUG_ECHOLNPGM(STR_RESTORING_POSITION, slot, " (all axes)"); // Move to the saved position, all axes except E diff --git a/firmware/Marlin/src/gcode/feature/pause/M600.cpp b/firmware/Marlin/src/gcode/feature/pause/M600.cpp index a87f14c..294836f 100644 --- a/firmware/Marlin/src/gcode/feature/pause/M600.cpp +++ b/firmware/Marlin/src/gcode/feature/pause/M600.cpp @@ -28,14 +28,18 @@ #include "../../../feature/pause.h" #include "../../../module/motion.h" #include "../../../module/printcounter.h" + #include "../../../lcd/marlinui.h" +#if ENABLED(SOVOL_SV06_RTS) + #include "../../../lcd/sovol_rts/sovol_rts.h" +#endif #if HAS_MULTI_EXTRUDER #include "../../../module/tool_change.h" #endif #if HAS_PRUSA_MMU3 - #include "../../../feature/mmu3/mmu2.h" + #include "../../../feature/mmu3/mmu3.h" #if ENABLED(MMU_MENUS) #include "../../../lcd/menu/menu_mmu2.h" #endif @@ -115,6 +119,8 @@ void GcodeSuite::M600() { if (standardM600) ui.pause_show_message(PAUSE_MESSAGE_CHANGING, PAUSE_MODE_PAUSE_PRINT, target_extruder); + TERN_(SOVOL_SV06_RTS, rts.gotoPage(ID_ChangeWait_L, ID_ChangeWait_D)); //given the context it seems this likely should have been pages 6 & 61 + // If needed, home before parking for filament change TERN_(HOME_BEFORE_FILAMENT_CHANGE, home_if_needed(true)); diff --git a/firmware/Marlin/src/gcode/feature/pause/M701_M702.cpp b/firmware/Marlin/src/gcode/feature/pause/M701_M702.cpp index 29c8fe9..7e76828 100644 --- a/firmware/Marlin/src/gcode/feature/pause/M701_M702.cpp +++ b/firmware/Marlin/src/gcode/feature/pause/M701_M702.cpp @@ -36,7 +36,7 @@ #endif #if HAS_PRUSA_MMU3 - #include "../../../feature/mmu3/mmu2.h" + #include "../../../feature/mmu3/mmu3.h" #elif HAS_PRUSA_MMU2 #include "../../../feature/mmu/mmu2.h" #endif diff --git a/firmware/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp b/firmware/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp index 23665ac..538583d 100644 --- a/firmware/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp +++ b/firmware/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp @@ -27,7 +27,7 @@ #include "../../gcode.h" #if HAS_PRUSA_MMU3 - #include "../../../feature/mmu3/mmu2.h" + #include "../../../feature/mmu3/mmu3.h" #elif HAS_PRUSA_MMU2 #include "../../../feature/mmu/mmu2.h" #endif diff --git a/firmware/Marlin/src/gcode/feature/prusa_MMU2/M704-M709.cpp b/firmware/Marlin/src/gcode/feature/prusa_MMU2/M704-M709.cpp index 8229959..f6af70b 100644 --- a/firmware/Marlin/src/gcode/feature/prusa_MMU2/M704-M709.cpp +++ b/firmware/Marlin/src/gcode/feature/prusa_MMU2/M704-M709.cpp @@ -26,8 +26,8 @@ #include "../../gcode.h" #include "../../../module/settings.h" -#include "../../../feature/mmu3/mmu2.h" -#include "../../../feature/mmu3/mmu2_reporting.h" +#include "../../../feature/mmu3/mmu3.h" +#include "../../../feature/mmu3/mmu3_reporting.h" #include "../../../feature/mmu3/SpoolJoin.h" // Shared by the G-codes below to save flash memory. @@ -39,7 +39,7 @@ static void gcodes_M704_M705_M706(uint16_t gcode) { case 704: mmu3.load_to_feeder(mmuSlotIndex); break; case 705: mmu3.eject_filament(mmuSlotIndex, false); break; case 706: - #if ENABLED(MMU_HAS_CUTTER) + #if ENABLED(MMU3_HAS_CUTTER) if (mmu3.cutter_mode > 0) mmu3.cut_filament(mmuSlotIndex); #endif break; @@ -187,7 +187,7 @@ void GcodeSuite::MMU3_report(const bool forReplay/*=true*/) { report_heading(forReplay, F("MMU3 Operational Stats")); SERIAL_ECHOPGM(" MMU "); serialprintln_onoff(mmu3.mmu_hw_enabled); SERIAL_ECHOPGM(" Stealth Mode "); serialprintln_onoff(mmu3.stealth_mode); - #if ENABLED(MMU_HAS_CUTTER) + #if ENABLED(MMU3_HAS_CUTTER) SERIAL_ECHOPGM(" Cutter "); serialprintln_onoff(mmu3.cutter_mode != 0); #endif diff --git a/firmware/Marlin/src/gcode/gcode.cpp b/firmware/Marlin/src/gcode/gcode.cpp index 1ccb107..9fed4dc 100644 --- a/firmware/Marlin/src/gcode/gcode.cpp +++ b/firmware/Marlin/src/gcode/gcode.cpp @@ -165,7 +165,7 @@ void GcodeSuite::get_destination_from_command() { xyze_bool_t seen{false}; #if ENABLED(CANCEL_OBJECTS) - const bool &skip_move = cancelable.skipping; + const bool &skip_move = cancelable.state.skipping; #else constexpr bool skip_move = false; #endif @@ -200,9 +200,10 @@ void GcodeSuite::get_destination_from_command() { #endif if (parser.floatval('F') > 0) { - feedrate_mm_s = parser.value_feedrate(); + const float fr_mm_min = parser.value_linear_units(); + feedrate_mm_s = MMM_TO_MMS(fr_mm_min); // Update the cutter feed rate for use by M4 I set inline moves. - TERN_(LASER_FEATURE, cutter.feedrate_mm_m = MMS_TO_MMM(feedrate_mm_s)); + TERN_(LASER_FEATURE, cutter.feedrate_mm_m = fr_mm_min); } #if ALL(PRINTCOUNTER, HAS_EXTRUDERS) @@ -742,6 +743,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { #endif #endif + #if ENABLED(EDITABLE_HOMING_FEEDRATE) + case 210: M210(); break; // M210: Set the homing feedrate + #endif + #if HAS_SOFTWARE_ENDSTOPS case 211: M211(); break; // M211: Enable, Disable, and/or Report software endstops #endif @@ -1005,6 +1010,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 810: case 811: case 812: case 813: case 814: case 815: case 816: case 817: case 818: case 819: M810_819(); break; // M810-M819: Define/execute G-code macro + case 820: M820(); break; // M820: Report macros to serial output #endif #if HAS_BED_PROBE diff --git a/firmware/Marlin/src/gcode/gcode.h b/firmware/Marlin/src/gcode/gcode.h index 421dda9..589cd2b 100644 --- a/firmware/Marlin/src/gcode/gcode.h +++ b/firmware/Marlin/src/gcode/gcode.h @@ -128,6 +128,8 @@ * M84 - Disable steppers until next move, or use S to specify an idle * duration after which steppers should turn off. S0 disables the timeout. * M85 - Set inactivity shutdown timer with parameter S. To disable set zero (default) + * M86 - Set / Report Hotend Idle Timeout. (Requires HOTEND_IDLE_TIMEOUT) + * M87 - Cancel Hotend Idle Timeout (by setting the timeout period to 0). (Requires HOTEND_IDLE_TIMEOUT) * M92 - Set planner.settings.axis_steps_per_mm for one or more axes. (Requires EDITABLE_STEPS_PER_UNIT) * * M100 - Watch Free Memory (for debugging) (Requires M100_FREE_MEMORY_WATCHER) @@ -195,6 +197,7 @@ * M208 - Set Recover (unretract) Additional (!) Length: S and Feedrate: F. (Requires FWRETRACT) * M209 - Turn Automatic Retract Detection on/off: S<0|1> (For slicers that don't support G10/11). (Requires FWRETRACT_AUTORETRACT) Every normal extrude-only move will be classified as retract depending on the direction. + * M210 - Set or Report the homing feedrate (Requires EDITABLE_HOMING_FEEDRATE) * M211 - Enable, Disable, and/or Report software endstops: S<0|1> (Requires MIN_SOFTWARE_ENDSTOPS or MAX_SOFTWARE_ENDSTOPS) * M217 - Set filament swap parameters: "M217 S P R". (Requires SINGLENOZZLE) * M218 - Set/get a tool offset: "M218 T X Y". (Requires 2 or more extruders) @@ -212,6 +215,8 @@ * M281 - Set servo min|max position: "M281 P L U". (Requires EDITABLE_SERVO_ANGLES) * M282 - Detach servo: "M282 P". (Requires SERVO_DETACH_GCODE) * M290 - Babystepping (Requires BABYSTEPPING) + * M293 - Babystep Z UP (Requires EP_BABYSTEPPING) + * M294 - Babystep Z DOWN (Requires EP_BABYSTEPPING) * M300 - Play beep sound S P * M301 - Set PID parameters P I and D. (Requires PIDTEMP) * M302 - Allow cold extrudes, or set the minimum extrude S. (Requires PREVENT_COLD_EXTRUSION) @@ -245,6 +250,7 @@ * M430 - Read the system current, voltage, and power (Requires POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE, or POWER_MONITOR_FIXED_VOLTAGE) * M485 - Send RS485 packets (Requires RS485_SERIAL_PORT) * M486 - Identify and cancel objects. (Requires CANCEL_OBJECTS) + * M493 - Get or set input FT Motion / Shaping parameters. (Requires FT_MOTION) * M500 - Store parameters in EEPROM. (Requires EEPROM_SETTINGS) * M501 - Restore parameters from EEPROM. (Requires EEPROM_SETTINGS) * M502 - Revert to the default "factory settings". ** Does not write them to EEPROM! ** @@ -260,7 +266,7 @@ * M554 - Get or set IP gateway. (Requires enabled Ethernet port) * M569 - Enable stealthChop on an axis. (Requires at least one _DRIVER_TYPE to be TMC2130/2160/2208/2209/5130/5160) * M575 - Change the serial baud rate. (Requires BAUD_RATE_GCODE) - * M592 - Get or set nonlinear extrusion parameters. (Requires NONLINEAR_EXTRUSION) + * M592 - Get or set Nonlinear Extrusion parameters. (Requires NONLINEAR_EXTRUSION) * M593 - Get or set input shaping parameters. (Requires INPUT_SHAPING_[XY]) * M600 - Pause for filament change: "M600 X Y Z E L". (Requires ADVANCED_PAUSE_FEATURE) * M603 - Configure filament change: "M603 T U L". (Requires ADVANCED_PAUSE_FEATURE) @@ -273,15 +279,17 @@ * M701 - Load filament (Requires FILAMENT_LOAD_UNLOAD_GCODES) * M702 - Unload filament (Requires FILAMENT_LOAD_UNLOAD_GCODES) * - * M704 - Preload to MMU (Requires PRUSA_MMU3) - * M705 - Eject filament (Requires PRUSA_MMU3) - * M706 - Cut filament (Requires PRUSA_MMU3) - * M707 - Read from MMU register (Requires PRUSA_MMU3) - * M708 - Write to MMU register (Requires PRUSA_MMU3) - * M709 - MMU power & reset (Requires PRUSA_MMU3) + *** PRUSA_MMU3 *** + * M704 - Preload to MMU + * M705 - Eject filament + * M706 - Cut filament + * M707 - Read from MMU register + * M708 - Write to MMU register + * M709 - MMU power & reset * * M808 - Set or Goto a Repeat Marker (Requires GCODE_REPEAT_MARKERS) * M810-M819 - Define/execute a G-code macro (Requires GCODE_MACROS) + * M820 - Report all defined M810-M819 G-code macros (Requires GCODE_MACROS) * M851 - Set Z probe's XYZ offsets in current units. (Negative values: X=left, Y=front, Z=below) * M852 - Set skew factors: "M852 [I] [J] [K]". (Requires SKEW_CORRECTION_GCODE, plus SKEW_CORRECTION_FOR_Z for IJ) * @@ -897,8 +905,15 @@ private: #endif #endif - static void M211(); - static void M211_report(const bool forReplay=true); + #if ENABLED(EDITABLE_HOMING_FEEDRATE) + static void M210(); + static void M210_report(const bool forReplay=true); + #endif + + #if HAS_SOFTWARE_ENDSTOPS + static void M211(); + static void M211_report(const bool forReplay=true); + #endif #if HAS_MULTI_EXTRUDER static void M217(); @@ -1186,6 +1201,7 @@ private: #if ENABLED(GCODE_MACROS) static void M810_819(); + static void M820(); #endif #if HAS_BED_PROBE diff --git a/firmware/Marlin/src/gcode/host/M115.cpp b/firmware/Marlin/src/gcode/host/M115.cpp index 0d38d31..a4a2ac4 100644 --- a/firmware/Marlin/src/gcode/host/M115.cpp +++ b/firmware/Marlin/src/gcode/host/M115.cpp @@ -109,7 +109,7 @@ void GcodeSuite::M115() { SERIAL_ECHO(F("CEDE2A2F-")); for (uint8_t i = 1; i <= 6; i++) { print_hex_word(UID[(i % 2) ? i : i - 2]); // 1111-0000-3333-222255554444 - if (i <= 3) SERIAL_ECHO(C('-')); + if (i <= 3) SERIAL_CHAR('-'); } #endif #endif @@ -155,7 +155,7 @@ void GcodeSuite::M115() { cap_line(F("AUTOLEVEL"), ENABLED(HAS_AUTOLEVEL)); // RUNOUT (M412, M600) - cap_line(F("RUNOUT"), ENABLED(FILAMENT_RUNOUT_SENSOR)); + cap_line(F("RUNOUT"), ENABLED(HAS_FILAMENT_SENSOR)); // Z_PROBE (G30) cap_line(F("Z_PROBE"), ENABLED(HAS_BED_PROBE)); diff --git a/firmware/Marlin/src/gcode/host/M360.cpp b/firmware/Marlin/src/gcode/host/M360.cpp index 8d6bb47..535ed48 100644 --- a/firmware/Marlin/src/gcode/host/M360.cpp +++ b/firmware/Marlin/src/gcode/host/M360.cpp @@ -61,7 +61,9 @@ void GcodeSuite::M360() { PGMSTR(X_STR, "X"); PGMSTR(Y_STR, "Y"); PGMSTR(Z_STR, "Z"); - PGMSTR(JERK_STR, "Jerk"); + #if ANY(CLASSIC_JERK, HAS_LINEAR_E_JERK) + PGMSTR(JERK_STR, "Jerk"); + #endif // // Basics and Enabled items diff --git a/firmware/Marlin/src/gcode/motion/G0_G1.cpp b/firmware/Marlin/src/gcode/motion/G0_G1.cpp index 957541a..c6c1833 100644 --- a/firmware/Marlin/src/gcode/motion/G0_G1.cpp +++ b/firmware/Marlin/src/gcode/motion/G0_G1.cpp @@ -35,6 +35,10 @@ #include "../../module/planner.h" #endif +#if ENABLED(SOVOL_SV06_RTS) + #include "../../lcd/sovol_rts/sovol_rts.h" +#endif + extern xyze_pos_t destination; #if ENABLED(VARIABLE_G0_FEEDRATE) @@ -116,4 +120,6 @@ void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) { #else TERN_(FULL_REPORT_TO_HOST_FEATURE, report_current_grblstate_moving()); #endif + + TERN_(SOVOL_SV06_RTS, RTS_PauseMoveAxisPage()); } diff --git a/firmware/Marlin/src/gcode/motion/G5.cpp b/firmware/Marlin/src/gcode/motion/G5.cpp index c47f443..fe1e664 100644 --- a/firmware/Marlin/src/gcode/motion/G5.cpp +++ b/firmware/Marlin/src/gcode/motion/G5.cpp @@ -45,25 +45,24 @@ * G5: Cubic B-spline */ void GcodeSuite::G5() { - if (MOTION_CONDITIONS) { + if (!MOTION_CONDITIONS) return; - #if ENABLED(CNC_WORKSPACE_PLANES) - if (workspace_plane != PLANE_XY) { - SERIAL_ERROR_MSG(STR_ERR_BAD_PLANE_MODE); - return; - } - #endif + #if ENABLED(CNC_WORKSPACE_PLANES) + if (workspace_plane != PLANE_XY) { + SERIAL_ERROR_MSG(STR_ERR_BAD_PLANE_MODE); + return; + } + #endif - get_destination_from_command(); + get_destination_from_command(); - const xy_pos_t offsets[2] = { - { parser.linearval('I'), parser.linearval('J') }, - { parser.linearval('P'), parser.linearval('Q') } - }; + const xy_pos_t offsets[2] = { + { parser.linearval('I'), parser.linearval('J') }, + { parser.linearval('P'), parser.linearval('Q') } + }; - cubic_b_spline(current_position, destination, offsets, MMS_SCALED(feedrate_mm_s), active_extruder); - current_position = destination; - } + cubic_b_spline(current_position, destination, offsets, MMS_SCALED(feedrate_mm_s), active_extruder); + current_position = destination; } #endif // BEZIER_CURVE_SUPPORT diff --git a/firmware/Marlin/src/gcode/motion/M290.cpp b/firmware/Marlin/src/gcode/motion/M290.cpp index d10f9ee..192efe7 100644 --- a/firmware/Marlin/src/gcode/motion/M290.cpp +++ b/firmware/Marlin/src/gcode/motion/M290.cpp @@ -29,10 +29,6 @@ #include "../../module/probe.h" #include "../../module/planner.h" -#if ENABLED(BABYSTEP_ZPROBE_OFFSET) - #include "../../core/serial.h" -#endif - #if ENABLED(MESH_BED_LEVELING) #include "../../feature/bedlevel/bedlevel.h" #endif diff --git a/firmware/Marlin/src/gcode/ota/M936.cpp b/firmware/Marlin/src/gcode/ota/M936.cpp index 6324b3d..f42d197 100644 --- a/firmware/Marlin/src/gcode/ota/M936.cpp +++ b/firmware/Marlin/src/gcode/ota/M936.cpp @@ -26,10 +26,6 @@ #include "../gcode.h" #include "../../libs/BL24CXX.h" -#if ENABLED(CREALITY_RTS) - #include "../../lcd/rts/lcd_rts.h" -#endif - #define OTA_FLAG_EEPROM 90 //#define DEBUG_OUT 1 @@ -48,21 +44,11 @@ void GcodeSuite::M936() { // Set the OTA board firmware upgrade flag ahead of reboot. ota_update_flag = 0x01; DEBUG_ECHOLNPGM("Motherboard upgrade flag set"); - TERN_(CREALITY_RTS, RTS_Error(Error_205)); break; - - #if ENABLED(CREALITY_RTS) - case 3: - // Set the OTA screen firmware upgrade flag ahead of reboot. - ota_update_flag = 0x02; - DEBUG_ECHOLNPGM("DWIN upgrade flag set"); - TERN_(CREALITY_RTS, RTS_Error(Error_206)); - break; - #endif } switch (ota) { - case 2: TERN_(CREALITY_RTS, case 3:) + case 2: BL24CXX::write(OTA_FLAG_EEPROM, &ota_update_flag, sizeof(ota_update_flag)); safe_delay(100); hal.reboot(); diff --git a/firmware/Marlin/src/gcode/parser.cpp b/firmware/Marlin/src/gcode/parser.cpp index 3975cea..54ae802 100644 --- a/firmware/Marlin/src/gcode/parser.cpp +++ b/firmware/Marlin/src/gcode/parser.cpp @@ -115,9 +115,7 @@ void GCodeParser::parse(char *p) { reset(); // No codes to report auto uppercase = [](char c) { - if (TERN0(GCODE_CASE_INSENSITIVE, WITHIN(c, 'a', 'z'))) - c += 'A' - 'a'; - return c; + return TERN0(GCODE_CASE_INSENSITIVE, WITHIN(c, 'a', 'z')) ? c + 'A' - 'a' : c; }; // Skip spaces diff --git a/firmware/Marlin/src/gcode/parser.h b/firmware/Marlin/src/gcode/parser.h index 94c5b28..9423b23 100644 --- a/firmware/Marlin/src/gcode/parser.h +++ b/firmware/Marlin/src/gcode/parser.h @@ -192,7 +192,7 @@ public: #if ENABLED(GCODE_CASE_INSENSITIVE) FORCE_INLINE static char* strgchr(char *p, char g) { auto uppercase = [](char c) { - return c + (WITHIN(c, 'a', 'z') ? 'A' - 'a' : 0); + return TERN0(GCODE_CASE_INSENSITIVE, WITHIN(c, 'a', 'z')) ? c + 'A' - 'a' : c; }; const char d = uppercase(g); for (char cc; (cc = uppercase(*p)); p++) if (cc == d) return p; @@ -347,6 +347,9 @@ public: #define LINEAR_UNIT(V) parser.mm_to_linear_unit(V) #define VOLUMETRIC_UNIT(V) parser.mm_to_volumetric_unit(V) + #define X_AXIS_UNIT LINEAR_UNIT + #define Y_AXIS_UNIT LINEAR_UNIT + #define Z_AXIS_UNIT LINEAR_UNIT #define I_AXIS_UNIT(V) TERN(AXIS4_ROTATES, (V), LINEAR_UNIT(V)) #define J_AXIS_UNIT(V) TERN(AXIS5_ROTATES, (V), LINEAR_UNIT(V)) #define K_AXIS_UNIT(V) TERN(AXIS6_ROTATES, (V), LINEAR_UNIT(V)) diff --git a/firmware/Marlin/src/gcode/sd/M1001.cpp b/firmware/Marlin/src/gcode/sd/M1001.cpp index a00ca61..a8213f3 100644 --- a/firmware/Marlin/src/gcode/sd/M1001.cpp +++ b/firmware/Marlin/src/gcode/sd/M1001.cpp @@ -59,6 +59,10 @@ #define PE_LEDS_COMPLETED_TIME (30*60) #endif +#if ENABLED(SOVOL_SV06_RTS) + #include "../../lcd/sovol_rts/sovol_rts.h" +#endif + /** * M1001: Execute actions for SD print completion */ @@ -110,6 +114,14 @@ void GcodeSuite::M1001() { // Re-select the last printed file in the UI TERN_(SD_REPRINT_LAST_SELECTED_FILE, ui.reselect_last_file()); + + #if ENABLED(SOVOL_SV06_RTS) + rts.sendData(100, PRINT_PROCESS_VP); delay(1); + rts.sendData(100, PRINT_PROCESS_ICON_VP); delay(1); + rts.sendData(0, PRINT_SURPLUS_TIME_HOUR_VP); delay(1); + rts.sendData(0, PRINT_SURPLUS_TIME_MIN_VP); delay(1); + rts.gotoPage(ID_Finish_L, ID_Finish_D); + #endif } #endif // HAS_MEDIA diff --git a/firmware/Marlin/src/gcode/stats/M31.cpp b/firmware/Marlin/src/gcode/stats/M31.cpp index ad48eae..a826f9f 100644 --- a/firmware/Marlin/src/gcode/stats/M31.cpp +++ b/firmware/Marlin/src/gcode/stats/M31.cpp @@ -21,7 +21,6 @@ */ #include "../gcode.h" -#include "../../core/serial.h" #include "../../module/printcounter.h" #include "../../libs/duration_t.h" #include "../../lcd/marlinui.h" diff --git a/firmware/Marlin/src/inc/Changes.h b/firmware/Marlin/src/inc/Changes.h index 4d81b22..8e7a71e 100644 --- a/firmware/Marlin/src/inc/Changes.h +++ b/firmware/Marlin/src/inc/Changes.h @@ -468,7 +468,7 @@ #elif defined(ANYCUBIC_LCD_SERIAL_PORT) #error "ANYCUBIC_LCD_SERIAL_PORT is now LCD_SERIAL_PORT." #elif defined(INTERNAL_SERIAL_PORT) - #error "INTERNAL_SERIAL_PORT is now MMU2_SERIAL_PORT." + #error "INTERNAL_SERIAL_PORT is now MMU_SERIAL_PORT." #elif defined(X_DUAL_ENDSTOPS_ADJUSTMENT) || defined(Y_DUAL_ENDSTOPS_ADJUSTMENT) || defined(Z_DUAL_ENDSTOPS_ADJUSTMENT) #error "[XYZ]_DUAL_ENDSTOPS_ADJUSTMENT is now [XYZ]2_ENDSTOP_ADJUSTMENT." #elif defined(Z_TRIPLE_ENDSTOPS_ADJUSTMENT2) || defined(Z_TRIPLE_ENDSTOPS_ADJUSTMENT3) @@ -676,7 +676,7 @@ #elif defined(Z2_USE_ENDSTOP) #error "Z2_USE_ENDSTOP is obsolete. Instead set Z2_STOP_PIN directly. (e.g., 'Z2_USE_ENDSTOP _ZMAX_' becomes 'Z2_STOP_PIN Z_MAX_PIN')" #elif defined(Z3_USE_ENDSTOP) - #error "Z3_USE_ENDSTOP is obsolete. Instead set Z2_STOP_PIN directly. (e.g., 'Z3_USE_ENDSTOP _ZMAX_' becomes 'Z3_STOP_PIN Z_MAX_PIN')" + #error "Z3_USE_ENDSTOP is obsolete. Instead set Z3_STOP_PIN directly. (e.g., 'Z3_USE_ENDSTOP _ZMAX_' becomes 'Z3_STOP_PIN Z_MAX_PIN')" #elif defined(Z4_USE_ENDSTOP) #error "Z4_USE_ENDSTOP is obsolete. Instead set Z4_STOP_PIN directly. (e.g., 'Z4_USE_ENDSTOP _ZMAX_' becomes 'Z4_STOP_PIN Z_MAX_PIN')" #elif defined(INTEGRATED_BABYSTEPPING) @@ -701,6 +701,46 @@ #error "CALIBRATION_MEASUREMENT_RESOLUTION is no longer needed and should be removed." #elif defined(MMU2_MENUS) #error "MMU2_MENUS is now MMU_MENUS." +#elif defined(MMU2_SERIAL_PORT) + #error "MMU2_SERIAL_PORT is now MMU_SERIAL_PORT." +#elif defined(MMU2_RST_PIN) + #error "MMU2_RST_PIN is now MMU_RST_PIN." +#elif defined(MMU2_MAX_RETRIES) + #error "MMU2_MAX_RETRIES is now MMU3_MAX_RETRIES." +#elif defined(MMU2_FILAMENT_SENSOR_POSITION) + #error "MMU2_FILAMENT_SENSOR_POSITION is now MMU3_FILAMENT_SENSOR_POSITION." +#elif defined(MMU2_TOOL_CHANGE_LOAD_LENGTH) + #error "MMU2_TOOL_CHANGE_LOAD_LENGTH is now MMU3_TOOL_CHANGE_LOAD_LENGTH." +#elif defined(MMU2_LOAD_TO_NOZZLE_FEED_RATE) + #error "MMU2_LOAD_TO_NOZZLE_FEED_RATE is now MMU3_LOAD_TO_NOZZLE_FEED_RATE." +#elif defined(MMU2_UNLOAD_TO_FINDA_FEED_RATE) + #error "MMU2_UNLOAD_TO_FINDA_FEED_RATE is no longer needed and should be removed." +#elif defined(MMU2_VERIFY_LOAD_TO_NOZZLE_FEED_RATE) + #error "MMU2_VERIFY_LOAD_TO_NOZZLE_FEED_RATE is now MMU3_VERIFY_LOAD_TO_NOZZLE_FEED_RATE." +#elif defined(MMU2_RETRY_UNLOAD_TO_FINDA_LENGTH) + #error "MMU2_RETRY_UNLOAD_TO_FINDA_LENGTH is now MMU3_RETRY_UNLOAD_TO_FINDA_LENGTH." +#elif defined(MMU2_RETRY_UNLOAD_TO_FINDA_FEED_RATE) + #error "MMU2_RETRY_UNLOAD_TO_FINDA_FEED_RATE is now MMU3_RETRY_UNLOAD_TO_FINDA_FEED_RATE." +#elif defined(MMU2_FILAMENT_SENSOR_POSITION) + #error "MMU2_FILAMENT_SENSOR_POSITION is now MMU3_FILAMENT_SENSOR_E_POSITION." +#elif defined(MMU2_CHECK_FILAMENT_PRESENCE_EXTRUSION_LENGTH) + #error "MMU2_CHECK_FILAMENT_PRESENCE_EXTRUSION_LENGTH is now MMU3_CHECK_FILAMENT_PRESENCE_EXTRUSION_LENGTH." +#elif defined(MMU_HAS_CUTTER) + #error "MMU_HAS_CUTTER is now MMU3_HAS_CUTTER." +#elif defined(MMU_FORCE_STEALTH_MODE) + #error "MMU_FORCE_STEALTH_MODE is obsolete and should be removed." +#elif defined(MMU_SPOOL_JOIN_CONSUMES_ALL_FILAMENT) + #error "MMU_SPOOL_JOIN_CONSUMES_ALL_FILAMENT is now MMU3_SPOOL_JOIN_CONSUMES_ALL_FILAMENT." +#elif HAS_PRUSA_MMU3 && defined(MMU2_LOAD_TO_NOZZLE_SEQUENCE) + #error "MMU2_LOAD_TO_NOZZLE_SEQUENCE is now MMU3_LOAD_TO_NOZZLE_SEQUENCE for MMU_MODEL MMU3." +#elif HAS_PRUSA_MMU3 && defined(MMU2_RAMMING_SEQUENCE) + #error "MMU2_RAMMING_SEQUENCE is now MMU3_RAMMING_SEQUENCE for MMU_MODEL MMU3." +#elif defined(MMU_EXTRUDER_SENSOR) + #error "MMU_EXTRUDER_SENSOR is now MMU2_EXTRUDER_SENSOR." +#elif defined(MMU_LOADING_ATTEMPTS_NR) + #error "MMU_LOADING_ATTEMPTS_NR is now MMU2_LOADING_ATTEMPTS_NR." +#elif defined(MMU2_DEBUG) + #error "MMU2_DEBUG is now MMU_DEBUG." #elif defined(FTM_SHAPING_DEFAULT_X_FREQ) || defined(FTM_SHAPING_DEFAULT_Y_FREQ) #error "FTM_SHAPING_DEFAULT_[XY]_FREQ is now FTM_SHAPING_DEFAULT_FREQ_[XY]." #endif diff --git a/firmware/Marlin/src/inc/Conditionals-1-axes.h b/firmware/Marlin/src/inc/Conditionals-1-axes.h index 1ea88ce..5f8dad3 100644 --- a/firmware/Marlin/src/inc/Conditionals-1-axes.h +++ b/firmware/Marlin/src/inc/Conditionals-1-axes.h @@ -67,6 +67,7 @@ #undef MECHANICAL_SWITCHING_NOZZLE #undef MIXING_EXTRUDER #undef HOTEND_IDLE_TIMEOUT + #undef HOTEND_OVERSHOOT #undef DISABLE_E #undef PREVENT_LENGTHY_EXTRUDE #undef FILAMENT_RUNOUT_SENSOR diff --git a/firmware/Marlin/src/inc/Conditionals-2-LCD.h b/firmware/Marlin/src/inc/Conditionals-2-LCD.h index cc01e93..e7ea7bd 100644 --- a/firmware/Marlin/src/inc/Conditionals-2-LCD.h +++ b/firmware/Marlin/src/inc/Conditionals-2-LCD.h @@ -483,7 +483,7 @@ #if ANY(DWIN_CREALITY_LCD, DWIN_LCD_PROUI) #define HAS_DWIN_E3V2_BASIC 1 #endif -#if ANY(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI) +#if ANY(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI, SOVOL_SV06_RTS) #define HAS_DWIN_E3V2 1 #define STD_ENCODER_PULSES_PER_STEP 4 #endif @@ -555,7 +555,7 @@ #endif // E3V2 extras -#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI +#if ANY(HAS_DWIN_E3V2, IS_DWIN_MARLINUI, SOVOL_SV06_RTS) #define SERIAL_CATCHALL 0 #define HAS_LCD_BRIGHTNESS 1 #define LCD_BRIGHTNESS_MAX 250 @@ -568,7 +568,7 @@ #endif // Serial Controllers require LCD_SERIAL_PORT -#if ANY(IS_DWIN_MARLINUI, HAS_DWIN_E3V2, HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT) +#if ANY(IS_DWIN_MARLINUI, HAS_DWIN_E3V2, HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT, SOVOL_SV06_RTS) #define LCD_IS_SERIAL_HOST 1 #endif @@ -649,7 +649,7 @@ #if !HAS_MARLINUI_HD44780 #undef LCD_INFO_SCREEN_STYLE #endif -#if NONE(HAS_MARLINUI_U8GLIB, HAS_TFT_LVGL_UI, DGUS_LCD_UI_E3S1PRO) +#if NONE(HAS_MARLINUI_U8GLIB, HAS_TFT_LVGL_UI, TFT_COLOR_UI, DGUS_LCD_UI_E3S1PRO) #undef LCD_LANGUAGE #endif #if DISABLED(MPC_AUTOTUNE) diff --git a/firmware/Marlin/src/inc/Conditionals-3-etc.h b/firmware/Marlin/src/inc/Conditionals-3-etc.h index 3c685ad..6a1b3b7 100644 --- a/firmware/Marlin/src/inc/Conditionals-3-etc.h +++ b/firmware/Marlin/src/inc/Conditionals-3-etc.h @@ -71,17 +71,19 @@ #undef TEMP_SENSOR_BED #undef THERMAL_PROTECTION_BED #undef MAX_BED_POWER + #undef PREHEAT_1_TEMP_BED + #undef PREHEAT_2_TEMP_BED #endif #if !TEMP_SENSOR_CHAMBER #undef TEMP_SENSOR_CHAMBER #undef THERMAL_PROTECTION_CHAMBER - #undef CHAMBER_AUTO_FAN_PIN #undef MAX_CHAMBER_POWER + #undef PREHEAT_1_TEMP_CHAMBER + #undef PREHEAT_2_TEMP_CHAMBER #endif #if !TEMP_SENSOR_COOLER #undef TEMP_SENSOR_COOLER #undef THERMAL_PROTECTION_COOLER - #undef COOLER_AUTO_FAN_PIN #endif #if !TEMP_SENSOR_PROBE #undef TEMP_SENSOR_PROBE @@ -442,6 +444,7 @@ #else // Clear probe pin settings when no probe is selected #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + #undef Z_MIN_PROBE_ENDSTOP_HIT_STATE #undef USE_PROBE_FOR_Z_HOMING #undef Z_MIN_PROBE_REPEATABILITY_TEST #undef HOMING_Z_WITH_PROBE diff --git a/firmware/Marlin/src/inc/Conditionals-4-adv.h b/firmware/Marlin/src/inc/Conditionals-4-adv.h index 1401dab..be65120 100644 --- a/firmware/Marlin/src/inc/Conditionals-4-adv.h +++ b/firmware/Marlin/src/inc/Conditionals-4-adv.h @@ -51,39 +51,39 @@ #define NUM_SERVOS 0 #if HAS_Z_SERVO_PROBE && NUM_SERVOS <= Z_PROBE_SERVO_NR #undef NUM_SERVOS - #define NUM_SERVOS (Z_PROBE_SERVO_NR + 1) + #define NUM_SERVOS INCREMENT(Z_PROBE_SERVO_NR) #endif #if ENABLED(CHAMBER_VENT) && NUM_SERVOS <= CHAMBER_VENT_SERVO_NR #undef NUM_SERVOS - #define NUM_SERVOS (CHAMBER_VENT_SERVO_NR + 1) + #define NUM_SERVOS INCREMENT(CHAMBER_VENT_SERVO_NR) #endif #if ENABLED(SWITCHING_TOOLHEAD) && NUM_SERVOS <= SWITCHING_TOOLHEAD_SERVO_NR #undef NUM_SERVOS - #define NUM_SERVOS (SWITCHING_TOOLHEAD_SERVO_NR + 1) + #define NUM_SERVOS INCREMENT(SWITCHING_TOOLHEAD_SERVO_NR) #endif #if ENABLED(SWITCHING_NOZZLE) #if NUM_SERVOS <= SWITCHING_NOZZLE_SERVO_NR #undef NUM_SERVOS - #define NUM_SERVOS (SWITCHING_NOZZLE_SERVO_NR + 1) + #define NUM_SERVOS INCREMENT(SWITCHING_NOZZLE_SERVO_NR) #endif #if NUM_SERVOS <= SWITCHING_NOZZLE_E1_SERVO_NR #undef NUM_SERVOS - #define NUM_SERVOS (SWITCHING_NOZZLE_E1_SERVO_NR + 1) + #define NUM_SERVOS INCREMENT(SWITCHING_NOZZLE_E1_SERVO_NR) #endif #endif #if ENABLED(SWITCHING_EXTRUDER) #if NUM_SERVOS <= SWITCHING_EXTRUDER_SERVO_NR #undef NUM_SERVOS - #define NUM_SERVOS (SWITCHING_EXTRUDER_SERVO_NR + 1) + #define NUM_SERVOS INCREMENT(SWITCHING_EXTRUDER_SERVO_NR) #endif #if NUM_SERVOS <= SWITCHING_EXTRUDER_E23_SERVO_NR #undef NUM_SERVOS - #define NUM_SERVOS (SWITCHING_EXTRUDER_E23_SERVO_NR + 1) + #define NUM_SERVOS INCREMENT(SWITCHING_EXTRUDER_E23_SERVO_NR) #endif #endif #if ENABLED(SPINDLE_SERVO) && NUM_SERVOS <= SPINDLE_SERVO_NR #undef NUM_SERVOS - #define NUM_SERVOS (SPINDLE_SERVO_NR + 1) + #define NUM_SERVOS INCREMENT(SPINDLE_SERVO_NR) #endif #endif // !defined(NUM_SERVOS) @@ -233,6 +233,14 @@ #undef STEALTHCHOP_E #endif +#if !TEMP_SENSOR_CHAMBER + #undef CHAMBER_CHECK_INTERVAL + #undef CHAMBER_AUTO_FAN_PIN +#endif +#if !TEMP_SENSOR_COOLER + #undef COOLER_AUTO_FAN_PIN +#endif + #if ENABLED(DISABLE_X) && !defined(DISABLE_IDLE_X) #define DISABLE_IDLE_X #endif @@ -610,23 +618,6 @@ #endif #endif -#if TEMP_SENSOR_IS_MAX_TC(0) || TEMP_SENSOR_IS_MAX_TC(1) || TEMP_SENSOR_IS_MAX_TC(2) || TEMP_SENSOR_IS_MAX_TC(BED) || TEMP_SENSOR_IS_MAX_TC(REDUNDANT) - #define HAS_MAX_TC 1 -#endif -#if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_2_IS_MAX6675 || TEMP_SENSOR_BED_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675 - #define HAS_MAX6675 1 -#endif -#if TEMP_SENSOR_0_IS_MAX31855 || TEMP_SENSOR_1_IS_MAX31855 || TEMP_SENSOR_2_IS_MAX31855 || TEMP_SENSOR_BED_IS_MAX31855 || TEMP_SENSOR_REDUNDANT_IS_MAX31855 - #define HAS_MAX31855 1 -#endif -#if TEMP_SENSOR_0_IS_MAX31865 || TEMP_SENSOR_1_IS_MAX31865 || TEMP_SENSOR_2_IS_MAX31865 || TEMP_SENSOR_BED_IS_MAX31865 || TEMP_SENSOR_REDUNDANT_IS_MAX31865 - #define HAS_MAX31865 1 -#endif - -#if !HAS_MAX_TC - #undef THERMOCOUPLE_MAX_ERRORS -#endif - #if TEMP_SENSOR_3 == -4 #define TEMP_SENSOR_3_IS_AD8495 1 #elif TEMP_SENSOR_3 == -3 @@ -745,6 +736,23 @@ #endif #endif +#if TEMP_SENSOR_IS_MAX_TC(0) || TEMP_SENSOR_IS_MAX_TC(1) || TEMP_SENSOR_IS_MAX_TC(2) || TEMP_SENSOR_IS_MAX_TC(BED) || TEMP_SENSOR_IS_MAX_TC(REDUNDANT) + #define HAS_MAX_TC 1 +#endif +#if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_2_IS_MAX6675 || TEMP_SENSOR_BED_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675 + #define HAS_MAX6675 1 +#endif +#if TEMP_SENSOR_0_IS_MAX31855 || TEMP_SENSOR_1_IS_MAX31855 || TEMP_SENSOR_2_IS_MAX31855 || TEMP_SENSOR_BED_IS_MAX31855 || TEMP_SENSOR_REDUNDANT_IS_MAX31855 + #define HAS_MAX31855 1 +#endif +#if TEMP_SENSOR_0_IS_MAX31865 || TEMP_SENSOR_1_IS_MAX31865 || TEMP_SENSOR_2_IS_MAX31865 || TEMP_SENSOR_BED_IS_MAX31865 || TEMP_SENSOR_REDUNDANT_IS_MAX31865 + #define HAS_MAX31865 1 +#endif + +#if !HAS_MAX_TC + #undef THERMOCOUPLE_MAX_ERRORS +#endif + #if TEMP_SENSOR_CHAMBER == -4 #define TEMP_SENSOR_CHAMBER_IS_AD8495 1 #elif TEMP_SENSOR_CHAMBER == -3 @@ -821,7 +829,12 @@ #undef TEMP_SENSOR_AD8495_GAIN #undef TEMP_SENSOR_AD8495_OFFSET #endif - +#if !ANY_THERMISTOR_IS(998) + #undef DUMMY_THERMISTOR_998_VALUE +#endif +#if !ANY_THERMISTOR_IS(999) + #undef DUMMY_THERMISTOR_999_VALUE +#endif #if !ALL(HAS_X_AXIS, HAS_HOTEND) #undef AUTOTEMP #endif @@ -838,6 +851,8 @@ #if !TEMP_SENSOR_BED #undef BED_MINTEMP #undef BED_MAXTEMP + #undef BED_OVERSHOOT + #undef CONTROLLER_FAN_BED_HEATING #endif #if DISABLED(THERMAL_PROTECTION_BED) #undef THERMAL_PROTECTION_BED_PERIOD @@ -860,6 +875,7 @@ #if !TEMP_SENSOR_COOLER #undef COOLER_MINTEMP #undef COOLER_MAXTEMP + #undef COOLER_OVERSHOOT #endif #if DISABLED(THERMAL_PROTECTION_COOLER) #undef THERMAL_PROTECTION_COOLER_PERIOD @@ -1370,7 +1386,7 @@ #if MB(MKS_MONSTER8_V1, BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_MINI_E3_V3_0_1, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1, BTT_SKR_V3_0, BTT_SKR_V3_0_EZ, AQUILA_V101) #define LCD_SERIAL_PORT 1 - #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_F401RE, CREALITY_V423, CREALITY_CR4NTXXC10, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO) + #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_F401RE, CREALITY_V423, CREALITY_CR4NTXXC10, CREALITY_CR4NS, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO) #define LCD_SERIAL_PORT 2 #else #define LCD_SERIAL_PORT 3 diff --git a/firmware/Marlin/src/inc/Conditionals-5-post.h b/firmware/Marlin/src/inc/Conditionals-5-post.h index df6efb1..55d91c4 100644 --- a/firmware/Marlin/src/inc/Conditionals-5-post.h +++ b/firmware/Marlin/src/inc/Conditionals-5-post.h @@ -1851,7 +1851,7 @@ #define SERIAL_IN_USE(N) ( (defined(SERIAL_PORT) && N == SERIAL_PORT) \ || (defined(SERIAL_PORT_2) && N == SERIAL_PORT_2) \ || (defined(SERIAL_PORT_3) && N == SERIAL_PORT_3) \ - || (defined(MMU2_SERIAL_PORT) && N == MMU2_SERIAL_PORT) \ + || (defined(MMU_SERIAL_PORT) && N == MMU_SERIAL_PORT) \ || (defined(LCD_SERIAL_PORT) && N == LCD_SERIAL_PORT) \ || (defined(RS485_SERIAL_PORT) && N == RS485_SERIAL_PORT) ) @@ -3039,7 +3039,7 @@ #endif /** - * Heated bed requires settings + * Heated Bed required settings */ #if HAS_HEATED_BED #ifndef MIN_BED_POWER @@ -3049,6 +3049,14 @@ #define MAX_BED_POWER 255 #endif #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, (v) ^ ENABLED(HEATER_BED_INVERTING)) + #if ENABLED(PELTIER_BED) + /** + * A "Heated Bed" Peltier device needs a direction (heat/cool) to be + * implemented by a relay (single pin) or H-bridge (2 or 4 pin). + * H-Bridge can also perform PWM. (Not recommended for Peltier devices). + */ + #define WRITE_PELTIER_DIR(v) WRITE(PELTIER_DIR_PIN, (v) ? PELTIER_DIR_HEAT_STATE : !PELTIER_DIR_HEAT_STATE) + #endif #endif /** @@ -3225,7 +3233,7 @@ * Advanced Pause - Filament Change */ #if ENABLED(ADVANCED_PAUSE_FEATURE) - #if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) || ALL(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) + #if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI, SOVOL_SV06_RTS) || ALL(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) #define M600_PURGE_MORE_RESUMABLE 1 // UI provides some way to Purge More / Resume #endif #ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH diff --git a/firmware/Marlin/src/inc/MarlinConfig.h b/firmware/Marlin/src/inc/MarlinConfig.h index b0a0434..0164b7c 100644 --- a/firmware/Marlin/src/inc/MarlinConfig.h +++ b/firmware/Marlin/src/inc/MarlinConfig.h @@ -26,10 +26,10 @@ // #include "MarlinConfigPre-6-type.h" // Include even with __MARLIN_DEPS__ +#include "Conditionals-6-type.h" #ifndef __MARLIN_DEPS__ - #include "Conditionals-6-type.h" #include HAL_PATH(.., inc/Conditionals_type.h) #include "Changes.h" diff --git a/firmware/Marlin/src/inc/MarlinConfigPre-1-axes.h b/firmware/Marlin/src/inc/MarlinConfigPre-1-axes.h index 4bc16e4..4ddf3bf 100644 --- a/firmware/Marlin/src/inc/MarlinConfigPre-1-axes.h +++ b/firmware/Marlin/src/inc/MarlinConfigPre-1-axes.h @@ -25,7 +25,7 @@ #define __MARLIN_FIRMWARE__ #endif -#if __has_include("../../Config.h") +#if __has_include("../../../Marlin/Config.h") #include "../../Config.h" #else #define USE_STD_CONFIGS 1 diff --git a/firmware/Marlin/src/inc/MarlinConfigPre-6-type.h b/firmware/Marlin/src/inc/MarlinConfigPre-6-type.h index 358e34a..31597c6 100644 --- a/firmware/Marlin/src/inc/MarlinConfigPre-6-type.h +++ b/firmware/Marlin/src/inc/MarlinConfigPre-6-type.h @@ -26,5 +26,6 @@ #ifndef __MARLIN_DEPS__ #include HAL_PATH(.., inc/Conditionals_post.h) - #include "../core/types.h" // Ahead of sanity-checks #endif + +#include "../core/types.h" // Ahead of sanity-checks diff --git a/firmware/Marlin/src/inc/SanityCheck.h b/firmware/Marlin/src/inc/SanityCheck.h index 42d63ee..6e9e635 100644 --- a/firmware/Marlin/src/inc/SanityCheck.h +++ b/firmware/Marlin/src/inc/SanityCheck.h @@ -500,10 +500,12 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #elif ENABLED(BABYSTEP_XY) && !defined(BABYSTEP_MULTIPLICATOR_XY) #error "BABYSTEP_XY requires BABYSTEP_MULTIPLICATOR_XY." #elif ENABLED(BABYSTEP_MILLIMETER_UNITS) - static_assert(BABYSTEP_MULTIPLICATOR_Z <= 0.1f, "BABYSTEP_MULTIPLICATOR_Z must be less or equal to 0.1mm."); + static_assert(BABYSTEP_MULTIPLICATOR_Z <= 0.1f, "BABYSTEP_MULTIPLICATOR_Z with BABYSTEP_MILLIMETER_UNITS must be less or equal to 0.1mm."); #if ENABLED(BABYSTEP_XY) static_assert(BABYSTEP_MULTIPLICATOR_XY <= 0.25f, "BABYSTEP_MULTIPLICATOR_XY must be less than or equal to 0.25mm."); #endif + #else + static_assert(BABYSTEP_MULTIPLICATOR_Z && BABYSTEP_MULTIPLICATOR_Z == int(BABYSTEP_MULTIPLICATOR_Z), "BABYSTEP_MULTIPLICATOR_Z must be a non-zero integer."); #endif #endif @@ -615,10 +617,10 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #error "PRUSA_MMU2(S) requires NOZZLE_PARK_FEATURE. Enable it to continue." #elif (HAS_PRUSA_MMU2S || HAS_PRUSA_MMU3) && DISABLED(FILAMENT_RUNOUT_SENSOR) #error "PRUSA_MMU2S and HAS_PRUSA_MMU3 requires FILAMENT_RUNOUT_SENSOR. Enable it to continue." - #elif ENABLED(MMU_EXTRUDER_SENSOR) && DISABLED(FILAMENT_RUNOUT_SENSOR) - #error "MMU_EXTRUDER_SENSOR requires FILAMENT_RUNOUT_SENSOR. Enable it to continue." - #elif ENABLED(MMU_EXTRUDER_SENSOR) && !HAS_MARLINUI_MENU - #error "MMU_EXTRUDER_SENSOR requires an LCD supporting MarlinUI." + #elif ENABLED(MMU2_EXTRUDER_SENSOR) && DISABLED(FILAMENT_RUNOUT_SENSOR) + #error "MMU2_EXTRUDER_SENSOR requires FILAMENT_RUNOUT_SENSOR. Enable it to continue." + #elif ENABLED(MMU2_EXTRUDER_SENSOR) && !HAS_MARLINUI_MENU + #error "MMU2_EXTRUDER_SENSOR requires an LCD supporting MarlinUI." #elif ENABLED(MMU_MENUS) && !HAS_MARLINUI_MENU #error "MMU_MENUS requires an LCD supporting MarlinUI." #elif HAS_PRUSA_MMU3 && !HAS_MARLINUI_MENU @@ -628,7 +630,7 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L #elif HAS_PRUSA_MMU3 && DISABLED(EEPROM_SETTINGS) #error "MMU3 requires EEPROM_SETTINGS." #elif DISABLED(ADVANCED_PAUSE_FEATURE) - static_assert(nullptr == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "MMU2_FILAMENT_RUNOUT_SCRIPT cannot make use of M600 unless ADVANCED_PAUSE_FEATURE is enabled"); + static_assert(nullptr == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required for MMU2_FILAMENT_RUNOUT_SCRIPT to use M600."); #endif #endif @@ -1073,8 +1075,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #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 does not currently support the inclusion of an I axis." +#elif ENABLED(LIN_ADVANCE) && HAS_I_AXIS + #error "LIN_ADVANCE does not currently support the inclusion of an I axis." #endif /** @@ -1223,7 +1225,54 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #if 1 < 0 \ + (DISABLED(BLTOUCH) && HAS_Z_SERVO_PROBE) \ + COUNT_ENABLED(PROBE_MANUALLY, BLTOUCH, BD_SENSOR, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE, BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2) - #error "Please enable only one probe option: PROBE_MANUALLY, SENSORLESS_PROBING, BLTOUCH, BD_SENSOR, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, MAGLEV4, MAG_MOUNTED_PROBE, BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2, or Z Servo." + #error "Please enable only one probe option. See the following errors:" + #if DISABLED(BLTOUCH) && HAS_Z_SERVO_PROBE + #error "(Z_SERVO_PROBE is enabled.)" + #elif ENABLED(BLTOUCH) && !HAS_Z_SERVO_PROBE + #error "(BLTOUCH is enabled.)" + #endif + #if ENABLED(PROBE_MANUALLY) + #error "(PROBE_MANUALLY is enabled.)" + #endif + #if ENABLED(BD_SENSOR) + #error "(BD_SENSOR is enabled.)" + #endif + #if ENABLED(FIX_MOUNTED_PROBE) + #error "(FIX_MOUNTED_PROBE is enabled.)" + #endif + #if ENABLED(NOZZLE_AS_PROBE) + #error "(NOZZLE_AS_PROBE is enabled.)" + #endif + #if ENABLED(TOUCH_MI_PROBE) + #error "(TOUCH_MI_PROBE is enabled.)" + #endif + #if ENABLED(SOLENOID_PROBE) + #error "(SOLENOID_PROBE is enabled.)" + #endif + #if ENABLED(Z_PROBE_ALLEN_KEY) + #error "(Z_PROBE_ALLEN_KEY is enabled.)" + #endif + #if ENABLED(Z_PROBE_SLED) + #error "(Z_PROBE_SLED is enabled.)" + #endif + #if ENABLED(RACK_AND_PINION_PROBE) + #error "(RACK_AND_PINION_PROBE is enabled.)" + #endif + #if ENABLED(SENSORLESS_PROBING) + #error "(SENSORLESS_PROBING is enabled.)" + #endif + #if ENABLED(MAGLEV4) + #error "(MAGLEV4 is enabled.)" + #endif + #if ENABLED(MAG_MOUNTED_PROBE) + #error "(MAG_MOUNTED_PROBE is enabled.)" + #endif + #if ENABLED(BIQU_MICROPROBE_V1) + #error "(BIQU_MICROPROBE_V1 is enabled.)" + #endif + #if ENABLED(BIQU_MICROPROBE_V2) + #error "(BIQU_MICROPROBE_V2 is enabled.)" + #endif #endif #if HAS_BED_PROBE @@ -2736,7 +2785,7 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35, ANYCUBIC_LCD_VYPER) \ + DGUS_UI_IS(ORIGIN) + DGUS_UI_IS(FYSETC) + DGUS_UI_IS(HIPRECY) + DGUS_UI_IS(MKS) + DGUS_UI_IS(RELOADED) + DGUS_UI_IS(IA_CREALITY) \ + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \ - + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ + + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE, SOVOL_SV06_RTS) \ + COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_GENERIC_12864_1_1) \ + COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \ + COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \ @@ -2944,8 +2993,8 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #error "SERIAL_PORT is set to -1, but the MOTHERBOARD has no native USB support. Set SERIAL_PORT to a valid value for your board." #elif SERIAL_PORT_2 == -1 #error "SERIAL_PORT_2 is set to -1, but the MOTHERBOARD has no native USB support. Set SERIAL_PORT_2 to a valid value for your board." - #elif MMU2_SERIAL_PORT == -1 - #error "MMU2_SERIAL_PORT is set to -1, but the MOTHERBOARD has no native USB support. Set MMU2_SERIAL_PORT to a valid value for your board." + #elif MMU_SERIAL_PORT == -1 + #error "MMU_SERIAL_PORT is set to -1, but the MOTHERBOARD has no native USB support. Set MMU_SERIAL_PORT to a valid value for your board." #elif LCD_SERIAL_PORT == -1 #error "LCD_SERIAL_PORT is set to -1, but the MOTHERBOARD has no native USB support. Set LCD_SERIAL_PORT to a valid value for your board." #endif @@ -2954,15 +3003,15 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i /** * MMU2 require a dedicated serial port */ -#ifdef MMU2_SERIAL_PORT - #if MMU2_SERIAL_PORT == SERIAL_PORT - #error "MMU2_SERIAL_PORT cannot be the same as SERIAL_PORT." - #elif defined(SERIAL_PORT_2) && MMU2_SERIAL_PORT == SERIAL_PORT_2 - #error "MMU2_SERIAL_PORT cannot be the same as SERIAL_PORT_2." - #elif defined(LCD_SERIAL_PORT) && MMU2_SERIAL_PORT == LCD_SERIAL_PORT - #error "MMU2_SERIAL_PORT cannot be the same as LCD_SERIAL_PORT." - #elif defined(RS485_SERIAL_PORT) && MMU2_SERIAL_PORT == RS485_SERIAL_PORT - #error "MMU2_SERIAL_PORT cannot be the same as RS485_SERIAL_PORT." +#ifdef MMU_SERIAL_PORT + #if MMU_SERIAL_PORT == SERIAL_PORT + #error "MMU_SERIAL_PORT cannot be the same as SERIAL_PORT." + #elif defined(SERIAL_PORT_2) && MMU_SERIAL_PORT == SERIAL_PORT_2 + #error "MMU_SERIAL_PORT cannot be the same as SERIAL_PORT_2." + #elif defined(LCD_SERIAL_PORT) && MMU_SERIAL_PORT == LCD_SERIAL_PORT + #error "MMU_SERIAL_PORT cannot be the same as LCD_SERIAL_PORT." + #elif defined(RS485_SERIAL_PORT) && MMU_SERIAL_PORT == RS485_SERIAL_PORT + #error "MMU_SERIAL_PORT cannot be the same as RS485_SERIAL_PORT." #endif #endif @@ -3057,49 +3106,69 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i #define INVALID_TMC_UART(ST) (AXIS_HAS_UART(ST) && !(defined(ST##_HARDWARE_SERIAL) || (PINS_EXIST(ST##_SERIAL_RX, ST##_SERIAL_TX)))) #if INVALID_TMC_UART(X) #error "TMC2208 or TMC2209 on X requires X_HARDWARE_SERIAL or X_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(X2) +#endif +#if INVALID_TMC_UART(X2) #error "TMC2208 or TMC2209 on X2 requires X2_HARDWARE_SERIAL or X2_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(Y) +#endif +#if INVALID_TMC_UART(Y) #error "TMC2208 or TMC2209 on Y requires Y_HARDWARE_SERIAL or Y_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(Y2) +#endif +#if INVALID_TMC_UART(Y2) #error "TMC2208 or TMC2209 on Y2 requires Y2_HARDWARE_SERIAL or Y2_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(Z) +#endif +#if INVALID_TMC_UART(Z) #error "TMC2208 or TMC2209 on Z requires Z_HARDWARE_SERIAL or Z_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(Z2) +#endif +#if INVALID_TMC_UART(Z2) #error "TMC2208 or TMC2209 on Z2 requires Z2_HARDWARE_SERIAL or Z2_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(Z3) +#endif +#if INVALID_TMC_UART(Z3) #error "TMC2208 or TMC2209 on Z3 requires Z3_HARDWARE_SERIAL or Z3_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(Z4) +#endif +#if INVALID_TMC_UART(Z4) #error "TMC2208 or TMC2209 on Z4 requires Z4_HARDWARE_SERIAL or Z4_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(E0) +#endif +#if INVALID_TMC_UART(E0) #error "TMC2208 or TMC2209 on E0 requires E0_HARDWARE_SERIAL or E0_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(E1) +#endif +#if INVALID_TMC_UART(E1) #error "TMC2208 or TMC2209 on E1 requires E1_HARDWARE_SERIAL or E1_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(E2) +#endif +#if INVALID_TMC_UART(E2) #error "TMC2208 or TMC2209 on E2 requires E2_HARDWARE_SERIAL or E2_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(E3) +#endif +#if INVALID_TMC_UART(E3) #error "TMC2208 or TMC2209 on E3 requires E3_HARDWARE_SERIAL or E3_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(E4) +#endif +#if INVALID_TMC_UART(E4) #error "TMC2208 or TMC2209 on E4 requires E4_HARDWARE_SERIAL or E4_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(E5) +#endif +#if INVALID_TMC_UART(E5) #error "TMC2208 or TMC2209 on E5 requires E5_HARDWARE_SERIAL or E5_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(E6) +#endif +#if INVALID_TMC_UART(E6) #error "TMC2208 or TMC2209 on E6 requires E6_HARDWARE_SERIAL or E6_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(E7) +#endif +#if INVALID_TMC_UART(E7) #error "TMC2208 or TMC2209 on E7 requires E7_HARDWARE_SERIAL or E7_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(I) +#endif +#if INVALID_TMC_UART(I) #error "TMC2208 or TMC2209 on I requires I_HARDWARE_SERIAL or I_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(J) +#endif +#if INVALID_TMC_UART(J) #error "TMC2208 or TMC2209 on J requires J_HARDWARE_SERIAL or J_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(K) +#endif +#if INVALID_TMC_UART(K) #error "TMC2208 or TMC2209 on K requires K_HARDWARE_SERIAL or K_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(U) +#endif +#if INVALID_TMC_UART(U) #error "TMC2208 or TMC2209 on U requires U_HARDWARE_SERIAL or U_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(V) +#endif +#if INVALID_TMC_UART(V) #error "TMC2208 or TMC2209 on V requires V_HARDWARE_SERIAL or V_SERIAL_(RX|TX)_PIN." -#elif INVALID_TMC_UART(W) +#endif +#if INVALID_TMC_UART(W) #error "TMC2208 or TMC2209 on W requires W_HARDWARE_SERIAL or W_SERIAL_(RX|TX)_PIN." - #endif #undef INVALID_TMC_UART @@ -4307,6 +4376,17 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive." #error "SDSUPPORT, BINARY_FILE_TRANSFER, and CUSTOM_FIRMWARE_UPLOAD are required for custom upload." #endif +/** + * Direct Stepping requirements + */ +#if ENABLED(DIRECT_STEPPING) + #if ENABLED(CPU_32_BIT) + #error "Direct Stepping is not supported on 32-bit boards." + #elif !IS_FULL_CARTESIAN + #error "Direct Stepping is incompatible with enabled kinematics." + #endif +#endif + /** * Input Shaping requirements */ diff --git a/firmware/Marlin/src/inc/Version.h b/firmware/Marlin/src/inc/Version.h index c060a15..e0cd061 100644 --- a/firmware/Marlin/src/inc/Version.h +++ b/firmware/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2024-09-09" + #define STRING_DISTRIBUTION_DATE "2024-12-06" #endif /** @@ -101,8 +101,8 @@ #endif /** - * Set the vendor info the serial USB interface, if changable - * Currently only supported by DUE platform + * Set the vendor info the serial USB interface, if changeable. + * Currently only supported by DUE platform. */ #ifndef USB_DEVICE_VENDOR_ID #define USB_DEVICE_VENDOR_ID 0x03EB /* ATMEL VID */ diff --git a/firmware/Marlin/src/inc/Warnings.cpp b/firmware/Marlin/src/inc/Warnings.cpp index f10408d..a6ea570 100644 --- a/firmware/Marlin/src/inc/Warnings.cpp +++ b/firmware/Marlin/src/inc/Warnings.cpp @@ -729,8 +729,12 @@ #endif #endif -#if ENABLED(QUICK_HOME) && (X_SPI_SENSORLESS || Y_SPI_SENSORLESS) - #warning "SPI_ENDSTOPS may be unreliable with QUICK_HOME. Adjust SENSORLESS_BACKOFF_MM for better results." +#if ENABLED(QUICK_HOME) + #if X_SPI_SENSORLESS || Y_SPI_SENSORLESS + #warning "If SPI_ENDSTOPS are unreliable with QUICK_HOME try adjusting SENSORLESS_BACKOFF_MM, Travel Acceleration (M204 T), Homing Feedrate (M210 XY), or disable QUICK_HOME." + #elif X_SENSORLESS || Y_SENSORLESS + #warning "If SENSORLESS_HOMING is unreliable with QUICK_HOME try adjusting SENSORLESS_BACKOFF_MM, Travel Acceleration (M204 T), Homing Feedrate (M210 XY), or disable QUICK_HOME." + #endif #endif #if HIGHER_CURRENT_HOME_WARNING @@ -916,8 +920,8 @@ #endif /** - * HC32 clock speed is hard-coded in Marlin + * Peltier with PIDTEMPBED */ -#if defined(ARDUINO_ARCH_HC32) && F_CPU == 200000000 - #warning "HC32 clock is assumed to be 200MHz. If this isn't the case for your board please submit a report so we can add support." +#if ALL(PELTIER_BED, PIDTEMPBED) + #warning "PELTIER_BED with PIDTEMPBED requires extra circuitry. Use with caution." #endif diff --git a/firmware/Marlin/src/lcd/dogm/fontdata/langdata_el.h b/firmware/Marlin/src/lcd/dogm/fontdata/langdata_el.h index 6fefab9..9faacfb 100644 --- a/firmware/Marlin/src/lcd/dogm/fontdata/langdata_el.h +++ b/firmware/Marlin/src/lcd/dogm/fontdata/langdata_el.h @@ -11,19 +11,21 @@ const u8g_fntpgm_uint8_t fontpage_7_136_136[33] U8G_FONT_SECTION("fontpage_7_136 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x0A,0x00,0x00, 0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x40,0x80,0x00,0xF8,0x80,0x80,0xF0,0x80,0x80, 0xF8}; -const u8g_fntpgm_uint8_t fontpage_7_145_157[186] U8G_FONT_SECTION("fontpage_7_145_157") = { - 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x91,0x9D,0x00,0x07,0x00,0x00, +const u8g_fntpgm_uint8_t fontpage_7_145_149[82] U8G_FONT_SECTION("fontpage_7_145_149") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x91,0x95,0x00,0x07,0x00,0x00, 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07, 0x07,0x06,0x00,0x00,0xF0,0x88,0x88,0xF0,0x88,0x88,0xF0,0x05,0x07,0x07,0x06,0x00, 0x00,0xF8,0x80,0x80,0x80,0x80,0x80,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20, 0x50,0x50,0x88,0x88,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,0x80,0xF0,0x80, - 0x80,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x08,0x10,0x20,0x40,0x80,0xF8,0x05, - 0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07,0x07,0x06, - 0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x70,0x03,0x07,0x07,0x06,0x01,0x00,0xE0, - 0x40,0x40,0x40,0x40,0x40,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x90,0xA0,0xC0, - 0xA0,0x90,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,0x50,0x50,0x88,0x88,0x88, - 0x05,0x07,0x07,0x06,0x00,0x00,0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x05,0x07,0x07, - 0x06,0x00,0x00,0x88,0x88,0xC8,0xA8,0x98,0x88,0x88}; + 0x80,0xF8}; +const u8g_fntpgm_uint8_t fontpage_7_151_157[108] U8G_FONT_SECTION("fontpage_7_151_157") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x97,0x9D,0x00,0x07,0x00,0x00, + 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07, + 0x07,0x06,0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x70,0x03,0x07,0x07,0x06,0x01, + 0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x90, + 0xA0,0xC0,0xA0,0x90,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,0x50,0x50,0x88, + 0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x05, + 0x07,0x07,0x06,0x00,0x00,0x88,0x88,0xC8,0xA8,0x98,0x88,0x88}; const u8g_fntpgm_uint8_t fontpage_7_159_161[56] U8G_FONT_SECTION("fontpage_7_159_161") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9F,0xA1,0x00,0x07,0x00,0x00, 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x07, @@ -79,7 +81,8 @@ const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_1 static const uxg_fontinfo_t g_fontinfo_el[] PROGMEM = { FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ' - FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν' + FONTDATA_ITEM(7, 145, 149, fontpage_7_145_149), // 'Α' -- 'Ε' + FONTDATA_ITEM(7, 151, 157, fontpage_7_151_157), // 'Η' -- 'Ν' FONTDATA_ITEM(7, 159, 161, fontpage_7_159_161), // 'Ο' -- 'Ρ' FONTDATA_ITEM(7, 163, 167, fontpage_7_163_167), // 'Σ' -- 'Χ' FONTDATA_ITEM(7, 172, 175, fontpage_7_172_175), // 'ά' -- 'ί' diff --git a/firmware/Marlin/src/lcd/dogm/fontdata/langdata_el_CY.h b/firmware/Marlin/src/lcd/dogm/fontdata/langdata_el_CY.h index c3a2264..6ad34eb 100644 --- a/firmware/Marlin/src/lcd/dogm/fontdata/langdata_el_CY.h +++ b/firmware/Marlin/src/lcd/dogm/fontdata/langdata_el_CY.h @@ -11,19 +11,21 @@ const u8g_fntpgm_uint8_t fontpage_7_136_136[33] U8G_FONT_SECTION("fontpage_7_136 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x0A,0x00,0x00, 0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x40,0x80,0x00,0xF8,0x80,0x80,0xF0,0x80,0x80, 0xF8}; -const u8g_fntpgm_uint8_t fontpage_7_145_157[186] U8G_FONT_SECTION("fontpage_7_145_157") = { - 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x91,0x9D,0x00,0x07,0x00,0x00, +const u8g_fntpgm_uint8_t fontpage_7_145_149[82] U8G_FONT_SECTION("fontpage_7_145_149") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x91,0x95,0x00,0x07,0x00,0x00, 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07, 0x07,0x06,0x00,0x00,0xF0,0x88,0x88,0xF0,0x88,0x88,0xF0,0x05,0x07,0x07,0x06,0x00, 0x00,0xF8,0x80,0x80,0x80,0x80,0x80,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20, 0x50,0x50,0x88,0x88,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,0x80,0xF0,0x80, - 0x80,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x08,0x10,0x20,0x40,0x80,0xF8,0x05, - 0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07,0x07,0x06, - 0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x70,0x03,0x07,0x07,0x06,0x01,0x00,0xE0, - 0x40,0x40,0x40,0x40,0x40,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x90,0xA0,0xC0, - 0xA0,0x90,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,0x50,0x50,0x88,0x88,0x88, - 0x05,0x07,0x07,0x06,0x00,0x00,0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x05,0x07,0x07, - 0x06,0x00,0x00,0x88,0x88,0xC8,0xA8,0x98,0x88,0x88}; + 0x80,0xF8}; +const u8g_fntpgm_uint8_t fontpage_7_151_157[108] U8G_FONT_SECTION("fontpage_7_151_157") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x97,0x9D,0x00,0x07,0x00,0x00, + 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07, + 0x07,0x06,0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x70,0x03,0x07,0x07,0x06,0x01, + 0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x90, + 0xA0,0xC0,0xA0,0x90,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,0x50,0x50,0x88, + 0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x05, + 0x07,0x07,0x06,0x00,0x00,0x88,0x88,0xC8,0xA8,0x98,0x88,0x88}; const u8g_fntpgm_uint8_t fontpage_7_159_161[56] U8G_FONT_SECTION("fontpage_7_159_161") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9F,0xA1,0x00,0x07,0x00,0x00, 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x07, @@ -79,7 +81,8 @@ const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_1 static const uxg_fontinfo_t g_fontinfo_el_CY[] PROGMEM = { FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ' - FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν' + FONTDATA_ITEM(7, 145, 149, fontpage_7_145_149), // 'Α' -- 'Ε' + FONTDATA_ITEM(7, 151, 157, fontpage_7_151_157), // 'Η' -- 'Ν' FONTDATA_ITEM(7, 159, 161, fontpage_7_159_161), // 'Ο' -- 'Ρ' FONTDATA_ITEM(7, 163, 167, fontpage_7_163_167), // 'Σ' -- 'Χ' FONTDATA_ITEM(7, 172, 175, fontpage_7_172_175), // 'ά' -- 'ί' diff --git a/firmware/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h b/firmware/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h index 31cc0bc..78aa07b 100644 --- a/firmware/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h +++ b/firmware/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h @@ -7,6 +7,10 @@ #include "langdata.h" +const u8g_fntpgm_uint8_t fontpage_344_146_146[45] U8G_FONT_SECTION("fontpage_344_146_146") = { + 0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x92,0x92,0x00,0x09,0xFE,0x00, + 0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0xF9,0x00,0x09,0x00,0x11,0x80,0x11,0x00,0x61, + 0x00,0x80,0x00,0x4A,0x00,0x4A,0x00,0x72,0x00,0x4D,0x00,0x74,0x80}; const u8g_fntpgm_uint8_t fontpage_344_240_240[34] U8G_FONT_SECTION("fontpage_344_240_240") = { 0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x09,0xFE,0x00, 0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0x09,0x11,0x17,0x21,0x41,0x81,0x01, @@ -191,6 +195,10 @@ const u8g_fntpgm_uint8_t fontpage_377_248_248[45] U8G_FONT_SECTION("fontpage_377 0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0x00,0x09,0xFE,0x00, 0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x20,0x80,0x20,0x80,0x3F,0x00,0x20,0x80,0x3F, 0x00,0x04,0x00,0xFF,0xC0,0x00,0x00,0x20,0x00,0x20,0x00,0x3F,0x80}; +const u8g_fntpgm_uint8_t fontpage_380_140_140[41] U8G_FONT_SECTION("fontpage_380_140_140") = { + 0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x8C,0x8C,0x00,0x09,0x00,0x00, + 0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x20,0x80,0x20,0x80,0x3F,0x80,0x20,0x80,0x20, + 0x80,0x3F,0x80,0x00,0x00,0x00,0x00,0xFF,0xC0}; const u8g_fntpgm_uint8_t fontpage_380_196_196[34] U8G_FONT_SECTION("fontpage_380_196_196") = { 0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC4,0xC4,0x00,0x09,0xFE,0x00, 0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x89,0x89,0x89,0xF9,0x89,0x89,0x89,0xF9,0x01, @@ -329,6 +337,10 @@ const u8g_fntpgm_uint8_t fontpage_400_156_156[45] U8G_FONT_SECTION("fontpage_400 0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x9C,0x9C,0x00,0x09,0xFE,0x00, 0x00,0x09,0x0B,0x16,0x0A,0x00,0xFE,0x7A,0x80,0x0A,0x80,0x0A,0x80,0x16,0x80,0x12, 0x80,0x2A,0x80,0x4A,0x80,0x86,0x80,0x02,0x80,0x02,0x80,0x02,0x80}; +const u8g_fntpgm_uint8_t fontpage_400_240_240[41] U8G_FONT_SECTION("fontpage_400_240_240") = { + 0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x09,0x00,0x00, + 0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x3F,0x00,0x01,0x00,0x02,0x00,0x0C,0x00,0x33, + 0x00,0x64,0x80,0x04,0x00,0x04,0x00,0xFF,0xC0}; const u8g_fntpgm_uint8_t fontpage_401_253_253[45] U8G_FONT_SECTION("fontpage_401_253_253") = { 0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xFD,0xFD,0x00,0x09,0xFE,0x00, 0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x3F,0x00,0x01,0x00,0x0E,0x00,0x71,0x80,0x00, @@ -439,6 +451,7 @@ const u8g_fntpgm_uint8_t fontpage_431_136_136[34] U8G_FONT_SECTION("fontpage_431 0x01,0x01}; static const uxg_fontinfo_t g_fontinfo_ko_KR[] PROGMEM = { + FONTDATA_ITEM(344, 146, 146, fontpage_344_146_146), // '값' -- '값' FONTDATA_ITEM(344, 240, 240, fontpage_344_240_240), // '거' -- '거' FONTDATA_ITEM(345, 224, 224, fontpage_345_224_224), // '고' -- '고' FONTDATA_ITEM(347, 248, 248, fontpage_347_248_248), // '그' -- '그' @@ -485,6 +498,7 @@ static const uxg_fontinfo_t g_fontinfo_ko_KR[] PROGMEM = { FONTDATA_ITEM(377, 160, 160, fontpage_377_160_160), // '베' -- '베' FONTDATA_ITEM(377, 168, 168, fontpage_377_168_168), // '벨' -- '벨' FONTDATA_ITEM(377, 248, 248, fontpage_377_248_248), // '본' -- '본' + FONTDATA_ITEM(380, 140, 140, fontpage_380_140_140), // '브' -- '브' FONTDATA_ITEM(380, 196, 196, fontpage_380_196_196), // '비' -- '비' FONTDATA_ITEM(385, 172, 172, fontpage_385_172_172), // '사' -- '사' FONTDATA_ITEM(385, 189, 189, fontpage_385_189_189), // '삽' -- '삽' @@ -518,6 +532,7 @@ static const uxg_fontinfo_t g_fontinfo_ko_KR[] PROGMEM = { FONTDATA_ITEM(400, 132, 132, fontpage_400_132_132), // '전' -- '전' FONTDATA_ITEM(400, 149, 149, fontpage_400_149_149), // '정' -- '정' FONTDATA_ITEM(400, 156, 156, fontpage_400_156_156), // '제' -- '제' + FONTDATA_ITEM(400, 240, 240, fontpage_400_240_240), // '조' -- '조' FONTDATA_ITEM(401, 253, 253, fontpage_401_253_253), // '죽' -- '죽' FONTDATA_ITEM(402, 128, 128, fontpage_402_128_128), // '준' -- '준' FONTDATA_ITEM(402, 145, 145, fontpage_402_145_145), // '중' -- '중' diff --git a/firmware/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h b/firmware/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h index 60316a1..ab2ccd0 100644 --- a/firmware/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h +++ b/firmware/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h @@ -493,10 +493,12 @@ const u8g_fntpgm_uint8_t fontpage_183_171_171[45] U8G_FONT_SECTION("fontpage_183 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAB,0xAB,0x00,0x0A,0xFF,0x00, 0x00,0x0A,0x0B,0x16,0x0C,0x01,0xFF,0x08,0x00,0xFF,0xC0,0x80,0x40,0x3F,0x00,0x21, 0x00,0x3F,0x00,0x00,0x00,0x7F,0x80,0x40,0x80,0x7F,0x80,0x40,0x80}; -const u8g_fntpgm_uint8_t fontpage_183_249_249[45] U8G_FONT_SECTION("fontpage_183_249_249") = { - 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF9,0xF9,0x00,0x0A,0xFF,0x00, - 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x00,0x80,0xF0,0x80,0x1F,0xE0,0x90,0x80,0x50, - 0x80,0x24,0x80,0x22,0x80,0x50,0x80,0x50,0x80,0x82,0x80,0x01,0x00}; +const u8g_fntpgm_uint8_t fontpage_183_248_249[73] U8G_FONT_SECTION("fontpage_183_248_249") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF8,0xF9,0x00,0x0A,0xFF,0x00, + 0x00,0x0A,0x0B,0x16,0x0C,0x01,0xFF,0x02,0x00,0x02,0x00,0x02,0x00,0xFF,0xC0,0x02, + 0x00,0x22,0x00,0x12,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x0E,0x00,0x0B,0x0B,0x16, + 0x0C,0x00,0xFF,0x00,0x80,0xF0,0x80,0x1F,0xE0,0x90,0x80,0x50,0x80,0x24,0x80,0x22, + 0x80,0x50,0x80,0x50,0x80,0x82,0x80,0x01,0x00}; const u8g_fntpgm_uint8_t fontpage_184_134_134[45] U8G_FONT_SECTION("fontpage_184_134_134") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x86,0x86,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x22,0x00,0x27,0xC0,0xA4,0x80,0x6B,0x00,0x22, @@ -509,6 +511,10 @@ const u8g_fntpgm_uint8_t fontpage_184_177_177[45] U8G_FONT_SECTION("fontpage_184 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB1,0xB1,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x11,0x00,0xFD,0x40,0x01,0x20,0x7F,0xE0,0x4A, 0x80,0x7A,0x80,0x12,0x80,0x5A,0xA0,0x56,0xA0,0x92,0xA0,0x34,0x60}; +const u8g_fntpgm_uint8_t fontpage_184_186_186[45] U8G_FONT_SECTION("fontpage_184_186_186") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBA,0xBA,0x00,0x0A,0xFF,0x00, + 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x3F,0xC0,0x20,0x40,0x20,0x40,0x20,0x40,0x3F, + 0xC0,0x24,0x00,0x24,0x00,0x22,0x00,0x21,0x00,0x40,0x80,0x80,0x60}; const u8g_fntpgm_uint8_t fontpage_184_207_207[45] U8G_FONT_SECTION("fontpage_184_207_207") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xCF,0xCF,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x3F,0xE0,0x20,0x20,0x3F,0xE0,0x28,0x40,0x24, @@ -553,10 +559,6 @@ const u8g_fntpgm_uint8_t fontpage_190_128_128[45] U8G_FONT_SECTION("fontpage_190 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x7F,0xC0,0x11,0x00,0x11,0x00,0x11,0x00,0x11, 0x00,0xFF,0xE0,0x11,0x00,0x21,0x00,0x21,0x00,0x41,0x00,0x81,0x00}; -const u8g_fntpgm_uint8_t fontpage_190_131_131[45] U8G_FONT_SECTION("fontpage_190_131_131") = { - 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x83,0x83,0x00,0x0A,0xFF,0x00, - 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x04,0x00,0xFF,0xE0,0x08,0x00,0x10,0x80,0x3F, - 0xC0,0x11,0x00,0xFF,0xE0,0x11,0x00,0x11,0x00,0x21,0x00,0x41,0x00}; const u8g_fntpgm_uint8_t fontpage_190_143_143[45] U8G_FONT_SECTION("fontpage_190_143_143") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8F,0x8F,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x02,0x80,0x02,0x40,0x02,0x00,0xFF,0xE0,0x02, @@ -797,6 +799,10 @@ const u8g_fntpgm_uint8_t fontpage_206_159_159[45] U8G_FONT_SECTION("fontpage_206 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9F,0x9F,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x49,0xE0,0xFD,0x20,0x49,0x20,0x79,0xE0,0x49, 0x20,0x79,0x20,0x49,0xE0,0xFD,0x20,0x01,0x20,0x49,0x20,0x86,0x60}; +const u8g_fntpgm_uint8_t fontpage_206_172_172[45] U8G_FONT_SECTION("fontpage_206_172_172") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAC,0xAC,0x00,0x0A,0xFF,0x00, + 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x04,0x00,0x04,0x00,0xFF,0xE0,0x0E,0x00,0x15, + 0x00,0x15,0x00,0x24,0x80,0x44,0x40,0x9F,0x20,0x04,0x00,0x04,0x00}; const u8g_fntpgm_uint8_t fontpage_206_186_186[45] U8G_FONT_SECTION("fontpage_206_186_186") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBA,0xBA,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x20,0x00,0x27,0x80,0x24,0x80,0xFC,0x80,0x24, @@ -947,6 +953,10 @@ const u8g_fntpgm_uint8_t fontpage_224_239_239[45] U8G_FONT_SECTION("fontpage_224 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xEF,0xEF,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x10,0x00,0x17,0xE0,0x54,0x80,0x58,0x80,0x50, 0x80,0x90,0x80,0x10,0x80,0x10,0x80,0x28,0x80,0x44,0x80,0x81,0x80}; +const u8g_fntpgm_uint8_t fontpage_224_245_245[45] U8G_FONT_SECTION("fontpage_224_245_245") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF5,0xF5,0x00,0x0A,0xFF,0x00, + 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x3F,0x80,0x00,0x80,0x3F,0x80,0x00,0x80,0x3F, + 0x80,0x04,0x00,0x14,0x40,0x24,0x80,0x0A,0x00,0x11,0x00,0xE0,0xE0}; const u8g_fntpgm_uint8_t fontpage_225_185_185[45] U8G_FONT_SECTION("fontpage_225_185_185") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB9,0xB9,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x04,0x00,0x04,0x00,0x07,0xC0,0x04,0x00,0x3F, @@ -955,10 +965,12 @@ const u8g_fntpgm_uint8_t fontpage_225_237_237[45] U8G_FONT_SECTION("fontpage_225 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xED,0xED,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x22,0x00,0xF7,0x80,0x22,0x80,0x32,0x80,0x66, 0x80,0xA3,0x80,0x24,0xA0,0x68,0x60,0x00,0x00,0x52,0x40,0x89,0x20}; -const u8g_fntpgm_uint8_t fontpage_228_199_199[45] U8G_FONT_SECTION("fontpage_228_199_199") = { - 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC7,0xC7,0x00,0x0A,0xFF,0x00, +const u8g_fntpgm_uint8_t fontpage_228_199_200[73] U8G_FONT_SECTION("fontpage_228_199_200") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC7,0xC8,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x21,0x00,0x21,0x00,0x21,0x00,0x3F,0xE0,0x20, - 0x00,0x20,0x00,0x3F,0x80,0x20,0x80,0x20,0x80,0x40,0x80,0x80,0x80}; + 0x00,0x20,0x00,0x3F,0x80,0x20,0x80,0x20,0x80,0x40,0x80,0x80,0x80,0x0B,0x0B,0x16, + 0x0C,0x00,0xFF,0x10,0xC0,0x57,0x00,0x54,0x00,0x7F,0xE0,0x46,0x40,0x45,0x40,0x75, + 0x40,0x54,0x80,0x54,0x80,0x95,0x40,0x9A,0x20}; const u8g_fntpgm_uint8_t fontpage_228_233_233[45] U8G_FONT_SECTION("fontpage_228_233_233") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE9,0xE9,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x22,0x00,0xA2,0x00,0xA7,0xE0,0xFA,0xA0,0xA2, @@ -983,6 +995,10 @@ const u8g_fntpgm_uint8_t fontpage_234_181_181[45] U8G_FONT_SECTION("fontpage_234 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB5,0xB5,0x00,0x0A,0xFF,0x00, 0x00,0x0A,0x0B,0x16,0x0C,0x01,0xFF,0x08,0x00,0x08,0x00,0xFF,0x80,0x88,0x80,0xFF, 0x80,0x88,0x80,0x88,0x80,0xFF,0x80,0x08,0x40,0x08,0x40,0x07,0xC0}; +const u8g_fntpgm_uint8_t fontpage_234_204_204[45] U8G_FONT_SECTION("fontpage_234_204_204") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0x00,0x0A,0xFF,0x00, + 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x7F,0xC0,0x44,0x40,0x7F,0xC0,0x44,0x40,0x7F, + 0xC0,0x0A,0x00,0x31,0x80,0xD1,0x60,0x11,0x00,0x21,0x00,0x41,0x00}; const u8g_fntpgm_uint8_t fontpage_234_229_229[45] U8G_FONT_SECTION("fontpage_234_229_229") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE5,0xE5,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x02,0x00,0xFB,0xC0,0xAE,0x40,0xA9,0x80,0xFA, @@ -1047,6 +1063,10 @@ const u8g_fntpgm_uint8_t fontpage_248_251_251[45] U8G_FONT_SECTION("fontpage_248 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFB,0xFB,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x24,0x80,0x15,0x00,0xFF,0xE0,0x15,0x00,0x24, 0x80,0x40,0x40,0x04,0x00,0xFF,0xE0,0x0A,0x00,0x11,0x00,0xE0,0xE0}; +const u8g_fntpgm_uint8_t fontpage_249_190_190[45] U8G_FONT_SECTION("fontpage_249_190_190") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBE,0xBE,0x00,0x0A,0xFF,0x00, + 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x21,0x00,0xAF,0xE0,0x71,0x00,0x27,0xC0,0xF1, + 0x00,0x2F,0xE0,0x74,0x40,0x6F,0xC0,0xA4,0x40,0x27,0xC0,0x24,0x40}; const u8g_fntpgm_uint8_t fontpage_250_162_162[45] U8G_FONT_SECTION("fontpage_250_162_162") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA2,0xA2,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x04,0x00,0x7F,0xC0,0x04,0x00,0xFF,0xE0,0x91, @@ -1223,6 +1243,10 @@ const u8g_fntpgm_uint8_t fontpage_283_133_133[45] U8G_FONT_SECTION("fontpage_283 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x85,0x85,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x17,0xC0,0x11,0x40,0x7D,0x40,0x12,0xC0,0xFC, 0x00,0x13,0xC0,0x5E,0x40,0x52,0x40,0x73,0xC0,0x98,0x00,0x87,0xE0}; +const u8g_fntpgm_uint8_t fontpage_283_138_138[45] U8G_FONT_SECTION("fontpage_283_138_138") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8A,0x8A,0x00,0x0A,0xFF,0x00, + 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x10,0xC0,0x10,0xA0,0x7F,0xE0,0x12,0x80,0xFE, + 0xA0,0x12,0xA0,0x5E,0x40,0x52,0xA0,0x71,0x20,0x9A,0x00,0x87,0xE0}; const u8g_fntpgm_uint8_t fontpage_283_221_221[45] U8G_FONT_SECTION("fontpage_283_221_221") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDD,0xDD,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x7B,0xE0,0x4A,0x00,0x4A,0x00,0x7B,0xE0,0x12, @@ -1293,6 +1317,10 @@ const u8g_fntpgm_uint8_t fontpage_288_137_137[45] U8G_FONT_SECTION("fontpage_288 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x89,0x89,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x45,0x00,0x25,0x00,0x27,0xC0,0x09,0x00,0xEF, 0xE0,0x22,0x80,0x22,0xA0,0x24,0xA0,0x28,0x60,0x50,0x00,0x8F,0xE0}; +const u8g_fntpgm_uint8_t fontpage_288_144_144[45] U8G_FONT_SECTION("fontpage_288_144_144") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x90,0x90,0x00,0x0A,0xFF,0x00, + 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x4F,0xE0,0x21,0x00,0x22,0x00,0x0D,0x20,0xE2, + 0xC0,0x2D,0x80,0x22,0xC0,0x2C,0xA0,0x23,0x00,0x50,0x00,0x8F,0xE0}; const u8g_fntpgm_uint8_t fontpage_288_159_159[45] U8G_FONT_SECTION("fontpage_288_159_159") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9F,0x9F,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x41,0x00,0x3F,0xE0,0x21,0x00,0x0F,0xE0,0xE9, @@ -1421,6 +1449,10 @@ const u8g_fntpgm_uint8_t fontpage_306_241_241[45] U8G_FONT_SECTION("fontpage_306 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF1,0xF1,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x44,0x00,0x47,0xC0,0x7C,0x40,0x97,0x40,0xAD, 0x40,0x25,0x40,0x27,0x40,0x24,0xC0,0x2C,0x20,0x34,0x20,0x23,0xE0}; +const u8g_fntpgm_uint8_t fontpage_307_150_150[45] U8G_FONT_SECTION("fontpage_307_150_150") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x96,0x96,0x00,0x0A,0xFF,0x00, + 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x20,0x80,0x11,0x00,0xFF,0xE0,0x08,0x00,0x3F, + 0x80,0x20,0x80,0x3F,0x80,0x20,0x80,0x3F,0x80,0x20,0x80,0x3F,0x80}; const u8g_fntpgm_uint8_t fontpage_308_236_236[45] U8G_FONT_SECTION("fontpage_308_236_236") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xEC,0xEC,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x7F,0x80,0x00,0x80,0x10,0x80,0x11,0x00,0x21, @@ -1429,6 +1461,10 @@ const u8g_fntpgm_uint8_t fontpage_308_241_241[45] U8G_FONT_SECTION("fontpage_308 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF1,0xF1,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0xF3,0xE0,0x12,0x00,0x52,0x20,0x53,0x20,0x52, 0xA0,0x7A,0x40,0x0A,0x40,0xEA,0xA0,0x0B,0x20,0x0A,0x00,0x33,0xE0}; +const u8g_fntpgm_uint8_t fontpage_309_140_140[45] U8G_FONT_SECTION("fontpage_309_140_140") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8C,0x8C,0x00,0x0A,0xFF,0x00, + 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0xF1,0x00,0x11,0x00,0x52,0x80,0x5C,0x60,0x53, + 0x80,0x78,0x00,0x0A,0x40,0x3D,0x40,0xCA,0x80,0x09,0x00,0x37,0xE0}; const u8g_fntpgm_uint8_t fontpage_309_216_216[45] U8G_FONT_SECTION("fontpage_309_216_216") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD8,0xD8,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x04,0x00,0xFF,0xE0,0x00,0x00,0x1F,0x00,0x11, @@ -1565,10 +1601,11 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = { FONTDATA_ITEM(183, 154, 154, fontpage_183_154_154), // '定' -- '定' FONTDATA_ITEM(183, 162, 162, fontpage_183_162_162), // '客' -- '客' FONTDATA_ITEM(183, 171, 171, fontpage_183_171_171), // '宫' -- '宫' - FONTDATA_ITEM(183, 249, 249, fontpage_183_249_249), // '对' -- '对' + FONTDATA_ITEM(183, 248, 249, fontpage_183_248_249), // '寸' -- '对' FONTDATA_ITEM(184, 134, 134, fontpage_184_134_134), // '将' -- '将' FONTDATA_ITEM(184, 143, 143, fontpage_184_143_143), // '小' -- '小' FONTDATA_ITEM(184, 177, 177, fontpage_184_177_177), // '就' -- '就' + FONTDATA_ITEM(184, 186, 186, fontpage_184_186_186), // '尺' -- '尺' FONTDATA_ITEM(184, 207, 207, fontpage_184_207_207), // '屏' -- '屏' FONTDATA_ITEM(187, 229, 229, fontpage_187_229_229), // '工' -- '工' FONTDATA_ITEM(187, 238, 238, fontpage_187_238_238), // '差' -- '差' @@ -1580,7 +1617,6 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = { FONTDATA_ITEM(189, 159, 159, fontpage_189_159_159), // '废' -- '废' FONTDATA_ITEM(189, 166, 166, fontpage_189_166_166), // '度' -- '度' FONTDATA_ITEM(190, 128, 128, fontpage_190_128_128), // '开' -- '开' - FONTDATA_ITEM(190, 131, 131, fontpage_190_131_131), // '弃' -- '弃' FONTDATA_ITEM(190, 143, 143, fontpage_190_143_143), // '式' -- '式' FONTDATA_ITEM(190, 149, 149, fontpage_190_149_149), // '引' -- '引' FONTDATA_ITEM(190, 185, 185, fontpage_190_185_185), // '弹' -- '弹' @@ -1640,6 +1676,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = { FONTDATA_ITEM(206, 128, 128, fontpage_206_128_128), // '最' -- '最' FONTDATA_ITEM(206, 137, 137, fontpage_206_137_137), // '有' -- '有' FONTDATA_ITEM(206, 159, 159, fontpage_206_159_159), // '期' -- '期' + FONTDATA_ITEM(206, 172, 172, fontpage_206_172_172), // '本' -- '本' FONTDATA_ITEM(206, 186, 186, fontpage_206_186_186), // '机' -- '机' FONTDATA_ITEM(206, 192, 192, fontpage_206_192_192), // '杀' -- '杀' FONTDATA_ITEM(206, 223, 223, fontpage_206_223_223), // '束' -- '束' @@ -1677,15 +1714,17 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = { FONTDATA_ITEM(222, 143, 143, fontpage_222_143_143), // '漏' -- '漏' FONTDATA_ITEM(223, 192, 192, fontpage_223_192_192), // '激' -- '激' FONTDATA_ITEM(224, 239, 239, fontpage_224_239_239), // '灯' -- '灯' + FONTDATA_ITEM(224, 245, 245, fontpage_224_245_245), // '灵' -- '灵' FONTDATA_ITEM(225, 185, 185, fontpage_225_185_185), // '点' -- '点' FONTDATA_ITEM(225, 237, 237, fontpage_225_237_237), // '热' -- '热' - FONTDATA_ITEM(228, 199, 199, fontpage_228_199_199), // '片' -- '片' + FONTDATA_ITEM(228, 199, 200, fontpage_228_199_200), // '片' -- '版' FONTDATA_ITEM(228, 233, 233, fontpage_228_233_233), // '物' -- '物' FONTDATA_ITEM(228, 249, 249, fontpage_228_249_249), // '特' -- '特' FONTDATA_ITEM(231, 135, 135, fontpage_231_135_135), // '率' -- '率' FONTDATA_ITEM(231, 175, 175, fontpage_231_175_175), // '环' -- '环' FONTDATA_ITEM(234, 168, 168, fontpage_234_168_168), // '用' -- '用' FONTDATA_ITEM(234, 181, 181, fontpage_234_181_181), // '电' -- '电' + FONTDATA_ITEM(234, 204, 204, fontpage_234_204_204), // '界' -- '界' FONTDATA_ITEM(234, 229, 229, fontpage_234_229_229), // '略' -- '略' FONTDATA_ITEM(236, 253, 253, fontpage_236_253_253), // '白' -- '白' FONTDATA_ITEM(237, 132, 132, fontpage_237_132_132), // '的' -- '的' @@ -1702,6 +1741,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = { FONTDATA_ITEM(246, 201, 201, fontpage_246_201_201), // '等' -- '等' FONTDATA_ITEM(247, 177, 177, fontpage_247_177_177), // '箱' -- '箱' FONTDATA_ITEM(248, 251, 251, fontpage_248_251_251), // '类' -- '类' + FONTDATA_ITEM(249, 190, 190, fontpage_249_190_190), // '精' -- '精' FONTDATA_ITEM(250, 162, 162, fontpage_250_162_162), // '索' -- '索' FONTDATA_ITEM(250, 171, 171, fontpage_250_171_171), // '紫' -- '紫' FONTDATA_ITEM(253, 162, 162, fontpage_253_162_162), // '红' -- '红' @@ -1746,6 +1786,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = { FONTDATA_ITEM(282, 170, 170, fontpage_282_170_170), // '贪' -- '贪' FONTDATA_ITEM(282, 247, 247, fontpage_282_247_247), // '起' -- '起' FONTDATA_ITEM(283, 133, 133, fontpage_283_133_133), // '超' -- '超' + FONTDATA_ITEM(283, 138, 138, fontpage_283_138_138), // '越' -- '越' FONTDATA_ITEM(283, 221, 221, fontpage_283_221_221), // '距' -- '距' FONTDATA_ITEM(286, 236, 236, fontpage_286_236_236), // '转' -- '转' FONTDATA_ITEM(286, 239, 239, fontpage_286_239_239), // '软' -- '软' @@ -1763,6 +1804,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = { FONTDATA_ITEM(287, 247, 247, fontpage_287_247_247), // '迷' -- '迷' FONTDATA_ITEM(288, 128, 128, fontpage_288_128_128), // '退' -- '退' FONTDATA_ITEM(288, 137, 137, fontpage_288_137_137), // '选' -- '选' + FONTDATA_ITEM(288, 144, 144, fontpage_288_144_144), // '逐' -- '逐' FONTDATA_ITEM(288, 159, 159, fontpage_288_159_159), // '速' -- '速' FONTDATA_ITEM(289, 232, 232, fontpage_289_232_232), // '部' -- '部' FONTDATA_ITEM(290, 205, 205, fontpage_290_205_205), // '配' -- '配' @@ -1795,8 +1837,10 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = { FONTDATA_ITEM(305, 157, 157, fontpage_305_157_157), // '额' -- '额' FONTDATA_ITEM(305, 206, 206, fontpage_305_206_206), // '风' -- '风' FONTDATA_ITEM(306, 241, 241, fontpage_306_241_241), // '饱' -- '饱' + FONTDATA_ITEM(307, 150, 150, fontpage_307_150_150), // '首' -- '首' FONTDATA_ITEM(308, 236, 236, fontpage_308_236_236), // '马' -- '马' FONTDATA_ITEM(308, 241, 241, fontpage_308_241_241), // '驱' -- '驱' + FONTDATA_ITEM(309, 140, 140, fontpage_309_140_140), // '验' -- '验' FONTDATA_ITEM(309, 216, 216, fontpage_309_216_216), // '高' -- '高' FONTDATA_ITEM(317, 196, 196, fontpage_317_196_196), // '黄' -- '黄' FONTDATA_ITEM(317, 222, 222, fontpage_317_222_222), // '點' -- '點' diff --git a/firmware/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h b/firmware/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h index c132a0d..65ef7bf 100644 --- a/firmware/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h +++ b/firmware/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h @@ -387,6 +387,10 @@ const u8g_fntpgm_uint8_t fontpage_183_185_185[45] U8G_FONT_SECTION("fontpage_183 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB9,0xB9,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x04,0x00,0xFF,0xE0,0x91,0x20,0x24,0x80,0x4A, 0x40,0x11,0x00,0x20,0x80,0xDF,0x60,0x11,0x00,0x11,0x00,0x1F,0x00}; +const u8g_fntpgm_uint8_t fontpage_183_248_248[45] U8G_FONT_SECTION("fontpage_183_248_248") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0x00,0x0A,0xFF,0x00, + 0x00,0x0A,0x0B,0x16,0x0C,0x01,0xFF,0x02,0x00,0x02,0x00,0x02,0x00,0xFF,0xC0,0x02, + 0x00,0x22,0x00,0x12,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x0E,0x00}; const u8g_fntpgm_uint8_t fontpage_184_141_141[45] U8G_FONT_SECTION("fontpage_184_141_141") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8D,0x8D,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x28,0x40,0xAA,0x40,0x6C,0x40,0xFF,0xE0,0x28, @@ -399,6 +403,10 @@ const u8g_fntpgm_uint8_t fontpage_184_177_177[45] U8G_FONT_SECTION("fontpage_184 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB1,0xB1,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x11,0x00,0xFD,0x40,0x01,0x20,0x7F,0xE0,0x4A, 0x80,0x7A,0x80,0x12,0x80,0x5A,0xA0,0x56,0xA0,0x92,0xA0,0x34,0x60}; +const u8g_fntpgm_uint8_t fontpage_184_186_186[45] U8G_FONT_SECTION("fontpage_184_186_186") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBA,0xBA,0x00,0x0A,0xFF,0x00, + 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x3F,0xC0,0x20,0x40,0x20,0x40,0x20,0x40,0x3F, + 0xC0,0x24,0x00,0x24,0x00,0x22,0x00,0x21,0x00,0x40,0x80,0x80,0x60}; const u8g_fntpgm_uint8_t fontpage_187_229_229[41] U8G_FONT_SECTION("fontpage_187_229_229") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE5,0xE5,0x00,0x09,0x00,0x00, 0x00,0x0B,0x09,0x12,0x0C,0x00,0x00,0x7F,0xC0,0x04,0x00,0x04,0x00,0x04,0x00,0x04, @@ -641,6 +649,10 @@ const u8g_fntpgm_uint8_t fontpage_206_137_137[45] U8G_FONT_SECTION("fontpage_206 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x89,0x89,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x08,0x00,0xFF,0xE0,0x10,0x00,0x1F,0x80,0x30, 0x80,0x5F,0x80,0x90,0x80,0x1F,0x80,0x10,0x80,0x10,0x80,0x11,0x80}; +const u8g_fntpgm_uint8_t fontpage_206_172_172[45] U8G_FONT_SECTION("fontpage_206_172_172") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAC,0xAC,0x00,0x0A,0xFF,0x00, + 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x04,0x00,0x04,0x00,0xFF,0xE0,0x0E,0x00,0x15, + 0x00,0x15,0x00,0x24,0x80,0x44,0x40,0x9F,0x20,0x04,0x00,0x04,0x00}; const u8g_fntpgm_uint8_t fontpage_206_255_255[45] U8G_FONT_SECTION("fontpage_206_255_255") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x20,0xC0,0x27,0x00,0xFC,0x00,0x24,0x00,0x27, @@ -751,10 +763,12 @@ const u8g_fntpgm_uint8_t fontpage_227_200_200[45] U8G_FONT_SECTION("fontpage_227 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC8,0xC8,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x2F,0xA0,0x2B,0x40,0xAC,0x80,0xB7,0xC0,0xA8, 0x20,0x37,0xC0,0x24,0x40,0x27,0xC0,0x52,0x80,0x49,0x00,0x8F,0xE0}; -const u8g_fntpgm_uint8_t fontpage_228_199_199[45] U8G_FONT_SECTION("fontpage_228_199_199") = { - 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC7,0xC7,0x00,0x0A,0xFF,0x00, +const u8g_fntpgm_uint8_t fontpage_228_199_200[73] U8G_FONT_SECTION("fontpage_228_199_200") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC7,0xC8,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x21,0x00,0x21,0x00,0x21,0x00,0x3F,0xE0,0x20, - 0x00,0x20,0x00,0x3F,0x80,0x20,0x80,0x20,0x80,0x40,0x80,0x80,0x80}; + 0x00,0x20,0x00,0x3F,0x80,0x20,0x80,0x20,0x80,0x40,0x80,0x80,0x80,0x0B,0x0B,0x16, + 0x0C,0x00,0xFF,0x10,0xC0,0x57,0x00,0x54,0x00,0x7F,0xE0,0x46,0x40,0x45,0x40,0x75, + 0x40,0x54,0x80,0x54,0x80,0x95,0x40,0x9A,0x20}; const u8g_fntpgm_uint8_t fontpage_228_233_233[45] U8G_FONT_SECTION("fontpage_228_233_233") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE9,0xE9,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x22,0x00,0xA2,0x00,0xA7,0xE0,0xFA,0xA0,0xA2, @@ -1037,6 +1051,10 @@ const u8g_fntpgm_uint8_t fontpage_288_128_128[45] U8G_FONT_SECTION("fontpage_288 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x8F,0xC0,0x48,0x40,0x4F,0xC0,0x08,0x40,0xCF, 0xC0,0x48,0x00,0x4B,0x40,0x48,0x80,0x4E,0x40,0xB0,0x00,0x8F,0xE0}; +const u8g_fntpgm_uint8_t fontpage_288_144_144[45] U8G_FONT_SECTION("fontpage_288_144_144") = { + 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x90,0x90,0x00,0x0A,0xFF,0x00, + 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x4F,0xE0,0x21,0x00,0x22,0x00,0x0D,0x20,0xE2, + 0xC0,0x2D,0x80,0x22,0xC0,0x2C,0xA0,0x23,0x00,0x50,0x00,0x8F,0xE0}; const u8g_fntpgm_uint8_t fontpage_288_159_159[45] U8G_FONT_SECTION("fontpage_288_159_159") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9F,0x9F,0x00,0x0A,0xFF,0x00, 0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x41,0x00,0x3F,0xE0,0x21,0x00,0x0F,0xE0,0xE9, @@ -1311,9 +1329,11 @@ static const uxg_fontinfo_t g_fontinfo_zh_TW[] PROGMEM = { FONTDATA_ITEM(183, 154, 154, fontpage_183_154_154), // '定' -- '定' FONTDATA_ITEM(183, 162, 162, fontpage_183_162_162), // '客' -- '客' FONTDATA_ITEM(183, 185, 185, fontpage_183_185_185), // '容' -- '容' + FONTDATA_ITEM(183, 248, 248, fontpage_183_248_248), // '寸' -- '寸' FONTDATA_ITEM(184, 141, 141, fontpage_184_141_141), // '對' -- '對' FONTDATA_ITEM(184, 143, 143, fontpage_184_143_143), // '小' -- '小' FONTDATA_ITEM(184, 177, 177, fontpage_184_177_177), // '就' -- '就' + FONTDATA_ITEM(184, 186, 186, fontpage_184_186_186), // '尺' -- '尺' FONTDATA_ITEM(187, 229, 229, fontpage_187_229_229), // '工' -- '工' FONTDATA_ITEM(187, 238, 238, fontpage_187_238_238), // '差' -- '差' FONTDATA_ITEM(187, 242, 242, fontpage_187_242_242), // '已' -- '已' @@ -1374,6 +1394,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_TW[] PROGMEM = { FONTDATA_ITEM(205, 244, 244, fontpage_205_244_244), // '更' -- '更' FONTDATA_ITEM(206, 128, 128, fontpage_206_128_128), // '最' -- '最' FONTDATA_ITEM(206, 137, 137, fontpage_206_137_137), // '有' -- '有' + FONTDATA_ITEM(206, 172, 172, fontpage_206_172_172), // '本' -- '本' FONTDATA_ITEM(206, 255, 255, fontpage_206_255_255), // '板' -- '板' FONTDATA_ITEM(207, 241, 241, fontpage_207_241_241), // '柱' -- '柱' FONTDATA_ITEM(208, 161, 161, fontpage_208_161_161), // '校' -- '校' @@ -1401,7 +1422,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_TW[] PROGMEM = { FONTDATA_ITEM(226, 161, 161, fontpage_226_161_161), // '無' -- '無' FONTDATA_ITEM(227, 177, 177, fontpage_227_177_177), // '熱' -- '熱' FONTDATA_ITEM(227, 200, 200, fontpage_227_200_200), // '燈' -- '燈' - FONTDATA_ITEM(228, 199, 199, fontpage_228_199_199), // '片' -- '片' + FONTDATA_ITEM(228, 199, 200, fontpage_228_199_200), // '片' -- '版' FONTDATA_ITEM(228, 233, 233, fontpage_228_233_233), // '物' -- '物' FONTDATA_ITEM(231, 135, 135, fontpage_231_135_135), // '率' -- '率' FONTDATA_ITEM(234, 168, 168, fontpage_234_168_168), // '用' -- '用' @@ -1472,6 +1493,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_TW[] PROGMEM = { FONTDATA_ITEM(287, 209, 209, fontpage_287_209_209), // '近' -- '近' FONTDATA_ITEM(287, 212, 212, fontpage_287_212_212), // '返' -- '返' FONTDATA_ITEM(288, 128, 128, fontpage_288_128_128), // '退' -- '退' + FONTDATA_ITEM(288, 144, 144, fontpage_288_144_144), // '逐' -- '逐' FONTDATA_ITEM(288, 159, 159, fontpage_288_159_159), // '速' -- '速' FONTDATA_ITEM(288, 163, 163, fontpage_288_163_163), // '連' -- '連' FONTDATA_ITEM(288, 178, 178, fontpage_288_178_178), // '進' -- '進' diff --git a/firmware/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/firmware/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index c215afb..29316c5 100644 --- a/firmware/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/firmware/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -390,8 +390,9 @@ void MarlinUI::clear_for_drawing() { } #if HAS_DISPLAY_SLEEP + static bool asleep = false; + bool MarlinUI::display_is_asleep() { return asleep; } void MarlinUI::sleep_display(const bool sleep/*=true*/) { - static bool asleep = false; if (asleep != sleep) { sleep ? u8g.sleepOn() : u8g.sleepOff(); asleep = sleep; diff --git a/firmware/Marlin/src/lcd/e3v2/common/dwin_api.cpp b/firmware/Marlin/src/lcd/e3v2/common/dwin_api.cpp index 1688b24..4a93d30 100644 --- a/firmware/Marlin/src/lcd/e3v2/common/dwin_api.cpp +++ b/firmware/Marlin/src/lcd/e3v2/common/dwin_api.cpp @@ -93,16 +93,18 @@ bool dwinHandshake() { // Get font character width uint8_t fontWidth(uint8_t cfont) { switch (cfont) { - case font6x12 : return 6; + #if DISABLED(TJC_DISPLAY) + case font6x12 : return 6; + case font20x40: return 20; + case font24x48: return 24; + case font28x56: return 28; + case font32x64: return 32; + #endif case font8x16 : return 8; case font10x20: return 10; case font12x24: return 12; case font14x28: return 14; case font16x32: return 16; - case font20x40: return 20; - case font24x48: return 24; - case font28x56: return 28; - case font32x64: return 32; default: return 0; } } @@ -110,16 +112,18 @@ uint8_t fontWidth(uint8_t cfont) { // Get font character height uint8_t fontHeight(uint8_t cfont) { switch (cfont) { - case font6x12 : return 12; + #if DISABLED(TJC_DISPLAY) + case font6x12 : return 12; + case font20x40: return 40; + case font24x48: return 48; + case font28x56: return 56; + case font32x64: return 64; + #endif case font8x16 : return 16; case font10x20: return 20; case font12x24: return 24; case font14x28: return 28; case font16x32: return 32; - case font20x40: return 40; - case font24x48: return 48; - case font28x56: return 56; - case font32x64: return 64; default: return 0; } } diff --git a/firmware/Marlin/src/lcd/e3v2/common/limits.h b/firmware/Marlin/src/lcd/e3v2/common/limits.h index 5debc3f..560c873 100644 --- a/firmware/Marlin/src/lcd/e3v2/common/limits.h +++ b/firmware/Marlin/src/lcd/e3v2/common/limits.h @@ -36,13 +36,15 @@ // #define MIN_FEEDRATE_EDIT_VALUE 1 -constexpr xyze_float_t min_feedrate_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_FEEDRATE_EDIT_VALUE), - default_max_feedrate = DEFAULT_MAX_FEEDRATE, - max_feedrate_edit_values = +constexpr xyze_feedrate_t min_feedrate_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_FEEDRATE_EDIT_VALUE); +#if !defined(MAX_FEEDRATE_EDIT_VALUES) && defined(DEFAULT_MAX_MULTIPLIER) + constexpr xyze_feedrate_t default_max_feedrate = DEFAULT_MAX_FEEDRATE; +#endif +constexpr xyze_feedrate_t max_feedrate_edit_values = #ifdef MAX_FEEDRATE_EDIT_VALUES MAX_FEEDRATE_EDIT_VALUES #else - default_max_feedrate * float(DEFAULT_MAX_MULTIPLIER) + default_max_feedrate * DEFAULT_MAX_MULTIPLIER #endif ; @@ -51,35 +53,39 @@ constexpr xyze_float_t min_feedrate_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_FEEDR // #define MIN_ACCELERATION_EDIT_VALUE 1 -constexpr xyze_float_t min_acceleration_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_ACCELERATION_EDIT_VALUE), - default_max_acceleration = DEFAULT_MAX_ACCELERATION, - max_acceleration_edit_values = - #ifdef MAX_ACCEL_EDIT_VALUES - MAX_ACCEL_EDIT_VALUES - #else - default_max_acceleration * float(DEFAULT_MAX_MULTIPLIER) - #endif - ; +constexpr xyze_float_t min_acceleration_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_ACCELERATION_EDIT_VALUE); +#if !defined(MAX_ACCEL_EDIT_VALUES) && defined(DEFAULT_MAX_MULTIPLIER) + constexpr xyze_float_t default_max_acceleration = DEFAULT_MAX_ACCELERATION; +#endif +constexpr xyze_float_t max_acceleration_edit_values = + #ifdef MAX_ACCEL_EDIT_VALUES + MAX_ACCEL_EDIT_VALUES + #else + default_max_acceleration * DEFAULT_MAX_MULTIPLIER + #endif + ; // -// Max jerk limits +// Max Jerk limits // -#define MIN_JERK_EDIT_VALUE 0.1 -#define DEFAULT_MAX_JERK_MULTIPLIER 2 - #if ENABLED(CLASSIC_JERK) - constexpr xyze_float_t min_jerk_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_JERK_EDIT_VALUE), - default_jerk = LOGICAL_AXIS_ARRAY( - DEFAULT_EJERK, - DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, - DEFAULT_IJERK, DEFAULT_JJERK, DEFAULT_KJERK, - DEFAULT_UJERK, DEFAULT_VJERK, DEFAULT_WJERK - ), - max_jerk_edit_values = + #define MIN_JERK_EDIT_VALUE 0.1 + + constexpr xyze_float_t min_jerk_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_JERK_EDIT_VALUE); + #if !defined(MAX_JERK_EDIT_VALUES) && defined(DEFAULT_MAX_MULTIPLIER) + #define DEFAULT_MAX_JERK_MULTIPLIER 2 + constexpr xyze_float_t default_jerk = LOGICAL_AXIS_ARRAY( + DEFAULT_EJERK, + DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, + DEFAULT_IJERK, DEFAULT_JJERK, DEFAULT_KJERK, + DEFAULT_UJERK, DEFAULT_VJERK, DEFAULT_WJERK + ); + #endif + constexpr xyze_float_t max_jerk_edit_values = #ifdef MAX_JERK_EDIT_VALUES MAX_JERK_EDIT_VALUES #else - default_jerk * float(DEFAULT_MAX_JERK_MULTIPLIER) + default_jerk * DEFAULT_MAX_JERK_MULTIPLIER #endif ; #endif @@ -89,12 +95,33 @@ constexpr xyze_float_t min_acceleration_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_A // #define MIN_STEPS_EDIT_VALUE 1 -constexpr xyze_float_t min_steps_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_STEPS_EDIT_VALUE), - default_steps = DEFAULT_AXIS_STEPS_PER_UNIT, - max_steps_edit_values = +constexpr xyze_float_t min_steps_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_STEPS_EDIT_VALUE); +#if !defined(MAX_STEPS_EDIT_VALUES) && defined(DEFAULT_MAX_MULTIPLIER) + constexpr xyze_float_t default_steps = DEFAULT_AXIS_STEPS_PER_UNIT; +#endif +constexpr xyze_float_t max_steps_edit_values = #ifdef MAX_STEPS_EDIT_VALUES MAX_STEPS_EDIT_VALUES #else - default_steps * float(DEFAULT_MAX_MULTIPLIER) + default_steps * DEFAULT_MAX_MULTIPLIER #endif ; + +// +// Homing Feedrate limits +// +#if ENABLED(EDITABLE_HOMING_FEEDRATE) + #define MIN_HOMING_EDIT_VALUE 1 + + constexpr xyz_uint_t min_homing_edit_values = NUM_AXIS_ARRAY_1(MIN_HOMING_EDIT_VALUE); + #ifdef DEFAULT_MAX_MULTIPLIER + constexpr xyz_long_t default_homing = HOMING_FEEDRATE_MM_M; + #endif + constexpr xyz_long_t max_homing_edit_values = + #ifdef DEFAULT_MAX_MULTIPLIER + default_homing * DEFAULT_MAX_MULTIPLIER + #else + { 10000, 10000, 3000 } + #endif + ; +#endif diff --git a/firmware/Marlin/src/lcd/e3v2/creality/dwin.cpp b/firmware/Marlin/src/lcd/e3v2/creality/dwin.cpp index 34bdd29..04135ff 100644 --- a/firmware/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/firmware/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -51,8 +51,6 @@ #include "../../../sd/cardreader.h" #include "../../../MarlinCore.h" -#include "../../../core/serial.h" -#include "../../../core/macros.h" #include "../../../gcode/queue.h" #include "../../../module/temperature.h" diff --git a/firmware/Marlin/src/lcd/e3v2/jyersui/README.md b/firmware/Marlin/src/lcd/e3v2/jyersui/README.md deleted file mode 100644 index 09055d0..0000000 --- a/firmware/Marlin/src/lcd/e3v2/jyersui/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# 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). - -## Easy Install - -Copy the `DWIN_SET` folder onto a Micro-SD card and insert the card into the slot on the DWIN screen. Cycle the machine and wait for the screen to go from blue to orange. Turn the machine off and remove the SD card. When you turn on the machine the screen will display a "Creality" loading screen. diff --git a/firmware/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/firmware/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index 8e71da8..115987b 100644 --- a/firmware/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/firmware/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -46,7 +46,7 @@ #include "../../../feature/pause.h" #endif -#if ENABLED(FILAMENT_RUNOUT_SENSOR) +#if HAS_FILAMENT_SENSOR #include "../../../feature/runout.h" #endif @@ -2857,7 +2857,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra #define ADVANCED_LOAD (ADVANCED_LA + ENABLED(ADVANCED_PAUSE_FEATURE)) #define ADVANCED_UNLOAD (ADVANCED_LOAD + ENABLED(ADVANCED_PAUSE_FEATURE)) #define ADVANCED_COLD_EXTRUDE (ADVANCED_UNLOAD + ENABLED(PREVENT_COLD_EXTRUSION)) - #define ADVANCED_FILSENSORENABLED (ADVANCED_COLD_EXTRUDE + ENABLED(FILAMENT_RUNOUT_SENSOR)) + #define ADVANCED_FILSENSORENABLED (ADVANCED_COLD_EXTRUDE + ENABLED(HAS_FILAMENT_SENSOR)) #define ADVANCED_FILSENSORDISTANCE (ADVANCED_FILSENSORENABLED + ENABLED(HAS_FILAMENT_RUNOUT_DISTANCE)) #define ADVANCED_POWER_LOSS (ADVANCED_FILSENSORDISTANCE + ENABLED(POWER_LOSS_RECOVERY)) #define ADVANCED_TOTAL ADVANCED_POWER_LOSS @@ -2953,7 +2953,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra break; #endif - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR case ADVANCED_FILSENSORENABLED: if (draw) { drawMenuItem(row, ICON_Extruder, GET_TEXT_F(MSG_RUNOUT_SENSOR)); @@ -2975,7 +2975,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra modifyValue(runout.runout_distance(), 0, 999, 10); break; #endif - #endif // FILAMENT_RUNOUT_SENSOR + #endif // HAS_FILAMENT_SENSOR #if ENABLED(POWER_LOSS_RECOVERY) case ADVANCED_POWER_LOSS: @@ -3830,7 +3830,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra #define TUNE_LA (TUNE_ZDOWN + ENABLED(LIN_ADVANCE)) #define TUNE_CHANGEFIL (TUNE_LA + ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)) #define TUNE_FWRETRACT (TUNE_CHANGEFIL + ENABLED(FWRETRACT)) - #define TUNE_FILSENSORENABLED (TUNE_FWRETRACT + ENABLED(FILAMENT_RUNOUT_SENSOR)) + #define TUNE_FILSENSORENABLED (TUNE_FWRETRACT + ENABLED(HAS_FILAMENT_SENSOR)) #define TUNE_BACKLIGHT_OFF (TUNE_FILSENSORENABLED + 1) #define TUNE_BACKLIGHT (TUNE_BACKLIGHT_OFF + 1) #define TUNE_TOTAL TUNE_BACKLIGHT @@ -3950,7 +3950,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra break; #endif - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR case TUNE_FILSENSORENABLED: if (draw) { drawMenuItem(row, ICON_Extruder, GET_TEXT_F(MSG_RUNOUT_SENSOR)); @@ -4140,7 +4140,7 @@ FSTR_P JyersDWIN::getMenuTitle(const uint8_t menu) { case ID_Move: return GET_TEXT_F(MSG_MOVE_AXIS); case ID_ManualLevel: return GET_TEXT_F(MSG_BED_TRAMMING_MANUAL); #if HAS_ZOFFSET_ITEM - case ID_ZOffset: return GET_TEXT_F(MSG_ZPROBE_ZOFFSET); + case ID_ZOffset: return liveadjust ? GET_TEXT_F(MSG_BABYSTEP_PROBE_Z) : GET_TEXT_F(MSG_ZPROBE_ZOFFSET); #endif #if HAS_PREHEAT case ID_Preheat: return F("Preheat"); @@ -4326,7 +4326,7 @@ void JyersDWIN::popupHandler(const PopupID popupid, const bool option/*=false*/) case Popup_FilLoad: drawPopup(option ? F("Unloading Filament") : F("Loading Filament"), PWID, F(""), Proc_Wait, ICON_BLTouch); break; case Popup_FilChange: drawPopup(F("Filament Change"), F("Please wait for prompt."), F(""), Proc_Wait, ICON_BLTouch); break; case Popup_TempWarn: drawPopup(option ? F("Nozzle temp too low!") : F("Nozzle temp too high!"), F(""), F(""), Proc_Wait, option ? ICON_TempTooLow : ICON_TempTooHigh); break; - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR case Popup_Runout: drawPopup(F("Filament Runout"), F(""), F(""), Proc_Wait, ICON_BLTouch); break; #endif #if ANY(PIDTEMP, PIDTEMPBED) @@ -4953,7 +4953,7 @@ void JyersDWIN::stateUpdate() { } } #endif - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR static bool ranout = false; if (runout.filament_ran_out != ranout) { ranout = runout.filament_ran_out; diff --git a/firmware/Marlin/src/lcd/e3v2/proui/dwin.cpp b/firmware/Marlin/src/lcd/e3v2/proui/dwin.cpp index 633f756..c4d94d6 100644 --- a/firmware/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/firmware/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -40,8 +40,6 @@ #include "../../marlinui.h" #include "../../extui/ui_api.h" #include "../../../MarlinCore.h" -#include "../../../core/serial.h" -#include "../../../core/macros.h" #include "../../../module/temperature.h" #include "../../../module/printcounter.h" #include "../../../module/motion.h" @@ -270,6 +268,9 @@ Menu *stepsMenu = nullptr; #if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU) Menu *homingMenu = nullptr; #endif +#if ENABLED(EDITABLE_HOMING_FEEDRATE) + Menu *homingFRMenu = nullptr; +#endif #if ENABLED(FWRETRACT) Menu *fwRetractMenu = nullptr; #endif @@ -2206,6 +2207,13 @@ void setMoveX() { hmiValue.axis = X_AXIS; setPFloatOnClick(X_MIN_POS, X_MAX_POS, void setMoveY() { hmiValue.axis = Y_AXIS; setPFloatOnClick(Y_MIN_POS, Y_MAX_POS, UNITFDIGITS, applyMove, liveMove); } void setMoveZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick(Z_MIN_POS, Z_MAX_POS, UNITFDIGITS, applyMove, liveMove); } +#if ENABLED(Z_STEPPER_AUTO_ALIGN) + void autoZAlign() { + LCD_MESSAGE(MSG_AUTO_Z_ALIGN); + queue.inject(F("G34")); + } +#endif + #if HAS_HOTEND void setMoveE() { const float e_min = current_position.e - (EXTRUDE_MAXLENGTH), @@ -2598,13 +2606,13 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres void applyMaxSpeed() { planner.set_max_feedrate(hmiValue.axis, menuData.value / MINUNITMULT); } #if HAS_X_AXIS - void setMaxSpeedX() { hmiValue.axis = X_AXIS, setFloatOnClick(min_feedrate_edit_values.x, max_feedrate_edit_values.x, UNITFDIGITS, planner.settings.max_feedrate_mm_s[X_AXIS], applyMaxSpeed); } + void setMaxSpeedX() { hmiValue.axis = X_AXIS; setFloatOnClick(min_feedrate_edit_values.x, max_feedrate_edit_values.x, UNITFDIGITS, planner.settings.max_feedrate_mm_s[X_AXIS], applyMaxSpeed); } #endif #if HAS_Y_AXIS - void setMaxSpeedY() { hmiValue.axis = Y_AXIS, setFloatOnClick(min_feedrate_edit_values.y, max_feedrate_edit_values.y, UNITFDIGITS, planner.settings.max_feedrate_mm_s[Y_AXIS], applyMaxSpeed); } + void setMaxSpeedY() { hmiValue.axis = Y_AXIS; setFloatOnClick(min_feedrate_edit_values.y, max_feedrate_edit_values.y, UNITFDIGITS, planner.settings.max_feedrate_mm_s[Y_AXIS], applyMaxSpeed); } #endif #if HAS_Z_AXIS - void setMaxSpeedZ() { hmiValue.axis = Z_AXIS, setFloatOnClick(min_feedrate_edit_values.z, max_feedrate_edit_values.z, UNITFDIGITS, planner.settings.max_feedrate_mm_s[Z_AXIS], applyMaxSpeed); } + void setMaxSpeedZ() { hmiValue.axis = Z_AXIS; setFloatOnClick(min_feedrate_edit_values.z, max_feedrate_edit_values.z, UNITFDIGITS, planner.settings.max_feedrate_mm_s[Z_AXIS], applyMaxSpeed); } #endif #if HAS_HOTEND void setMaxSpeedE() { hmiValue.axis = E_AXIS; setFloatOnClick(min_feedrate_edit_values.e, max_feedrate_edit_values.e, UNITFDIGITS, planner.settings.max_feedrate_mm_s[E_AXIS], applyMaxSpeed); } @@ -2612,13 +2620,13 @@ void applyMaxSpeed() { planner.set_max_feedrate(hmiValue.axis, menuData.value / void applyMaxAccel() { planner.set_max_acceleration(hmiValue.axis, menuData.value); } #if HAS_X_AXIS - void setMaxAccelX() { hmiValue.axis = X_AXIS, setIntOnClick(min_acceleration_edit_values.x, max_acceleration_edit_values.x, planner.settings.max_acceleration_mm_per_s2[X_AXIS], applyMaxAccel); } + void setMaxAccelX() { hmiValue.axis = X_AXIS; setIntOnClick(min_acceleration_edit_values.x, max_acceleration_edit_values.x, planner.settings.max_acceleration_mm_per_s2[X_AXIS], applyMaxAccel); } #endif #if HAS_Y_AXIS - void setMaxAccelY() { hmiValue.axis = Y_AXIS, setIntOnClick(min_acceleration_edit_values.y, max_acceleration_edit_values.y, planner.settings.max_acceleration_mm_per_s2[Y_AXIS], applyMaxAccel); } + void setMaxAccelY() { hmiValue.axis = Y_AXIS; setIntOnClick(min_acceleration_edit_values.y, max_acceleration_edit_values.y, planner.settings.max_acceleration_mm_per_s2[Y_AXIS], applyMaxAccel); } #endif #if HAS_Z_AXIS - void setMaxAccelZ() { hmiValue.axis = Z_AXIS, setIntOnClick(min_acceleration_edit_values.z, max_acceleration_edit_values.z, planner.settings.max_acceleration_mm_per_s2[Z_AXIS], applyMaxAccel); } + void setMaxAccelZ() { hmiValue.axis = Z_AXIS; setIntOnClick(min_acceleration_edit_values.z, max_acceleration_edit_values.z, planner.settings.max_acceleration_mm_per_s2[Z_AXIS], applyMaxAccel); } #endif #if HAS_HOTEND void setMaxAccelE() { hmiValue.axis = E_AXIS; setIntOnClick(min_acceleration_edit_values.e, max_acceleration_edit_values.e, planner.settings.max_acceleration_mm_per_s2[E_AXIS], applyMaxAccel); } @@ -2627,13 +2635,13 @@ void applyMaxAccel() { planner.set_max_acceleration(hmiValue.axis, menuData.valu #if ENABLED(CLASSIC_JERK) void applyMaxJerk() { planner.set_max_jerk(hmiValue.axis, menuData.value / MINUNITMULT); } #if HAS_X_AXIS - void setMaxJerkX() { hmiValue.axis = X_AXIS, setFloatOnClick(min_jerk_edit_values.x, max_jerk_edit_values.x, UNITFDIGITS, planner.max_jerk.x, applyMaxJerk); } + void setMaxJerkX() { hmiValue.axis = X_AXIS; setFloatOnClick(min_jerk_edit_values.x, max_jerk_edit_values.x, UNITFDIGITS, planner.max_jerk.x, applyMaxJerk); } #endif #if HAS_Y_AXIS - void setMaxJerkY() { hmiValue.axis = Y_AXIS, setFloatOnClick(min_jerk_edit_values.y, max_jerk_edit_values.y, UNITFDIGITS, planner.max_jerk.y, applyMaxJerk); } + void setMaxJerkY() { hmiValue.axis = Y_AXIS; setFloatOnClick(min_jerk_edit_values.y, max_jerk_edit_values.y, UNITFDIGITS, planner.max_jerk.y, applyMaxJerk); } #endif #if HAS_Z_AXIS - void setMaxJerkZ() { hmiValue.axis = Z_AXIS, setFloatOnClick(min_jerk_edit_values.z, max_jerk_edit_values.z, UNITFDIGITS, planner.max_jerk.z, applyMaxJerk); } + void setMaxJerkZ() { hmiValue.axis = Z_AXIS; setFloatOnClick(min_jerk_edit_values.z, max_jerk_edit_values.z, UNITFDIGITS, planner.max_jerk.z, applyMaxJerk); } #endif #if HAS_HOTEND void setMaxJerkE() { hmiValue.axis = E_AXIS; setFloatOnClick(min_jerk_edit_values.e, max_jerk_edit_values.e, UNITFDIGITS, planner.max_jerk.e, applyMaxJerk); } @@ -2648,17 +2656,39 @@ void applyMaxAccel() { planner.set_max_acceleration(hmiValue.axis, menuData.valu #endif #if HAS_X_AXIS - void setStepsX() { hmiValue.axis = X_AXIS, setPFloatOnClick( min_steps_edit_values.x, max_steps_edit_values.x, UNITFDIGITS); } + void setStepsX() { hmiValue.axis = X_AXIS; setPFloatOnClick( min_steps_edit_values.x, max_steps_edit_values.x, UNITFDIGITS); } #endif #if HAS_Y_AXIS - void setStepsY() { hmiValue.axis = Y_AXIS, setPFloatOnClick( min_steps_edit_values.y, max_steps_edit_values.y, UNITFDIGITS); } + void setStepsY() { hmiValue.axis = Y_AXIS; setPFloatOnClick( min_steps_edit_values.y, max_steps_edit_values.y, UNITFDIGITS); } #endif #if HAS_Z_AXIS - void setStepsZ() { hmiValue.axis = Z_AXIS, setPFloatOnClick( min_steps_edit_values.z, max_steps_edit_values.z, UNITFDIGITS); } + void setStepsZ() { hmiValue.axis = Z_AXIS; setPFloatOnClick( min_steps_edit_values.z, max_steps_edit_values.z, UNITFDIGITS); } #endif #if HAS_HOTEND void setStepsE() { hmiValue.axis = E_AXIS; setPFloatOnClick( min_steps_edit_values.e, max_steps_edit_values.e, UNITFDIGITS); } #endif + +#if ENABLED(EDITABLE_HOMING_FEEDRATE) + void updateHomingFR(AxisEnum axis, feedRate_t value) { + switch (axis) { + case X_AXIS: homing_feedrate_mm_m.x = value; break; + case Y_AXIS: homing_feedrate_mm_m.y = value; break; + case Z_AXIS: homing_feedrate_mm_m.z = value; break; + default: break; + } + } + void applyHomingFR() { updateHomingFR(hmiValue.axis, menuData.value); } + #if HAS_X_AXIS + void setHomingX() { hmiValue.axis = X_AXIS; setIntOnClick(min_homing_edit_values.x, max_homing_edit_values.x, homing_feedrate_mm_m.x, applyHomingFR); } + #endif + #if HAS_Y_AXIS + void setHomingY() { hmiValue.axis = Y_AXIS; setIntOnClick(min_homing_edit_values.y, max_homing_edit_values.y, homing_feedrate_mm_m.x, applyHomingFR); } + #endif + #if HAS_Z_AXIS + void setHomingZ() { hmiValue.axis = Z_AXIS; setIntOnClick(min_homing_edit_values.z, max_homing_edit_values.z, homing_feedrate_mm_m.x, applyHomingFR); } + #endif +#endif + #if ENABLED(FWRETRACT) void returnFWRetractMenu() { (previousMenu == filSetMenu) ? drawFilSetMenu() : drawTuneMenu(); } void setRetractLength() { setPFloatOnClick( 0, 10, UNITFDIGITS); } @@ -3358,7 +3388,7 @@ void drawFilSetMenu() { if (SET_MENU(ledControlMenu, MSG_LED_CONTROL, 10)) { BACK_ITEM((currentMenu == tuneMenu) ? drawTuneMenu : drawControlMenu); #if !ALL(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL) - EDIT_ITEM(ICON_LedControl, MSG_LEDS, onDrawChkbMenu, setLedStatus, &leds.lights_on); + EDIT_ITEM(ICON_LedControl, MSG_LIGHTS, onDrawChkbMenu, setLedStatus, &leds.lights_on); #endif #if HAS_COLOR_LEDS #if ENABLED(LED_COLOR_PRESETS) @@ -3400,7 +3430,7 @@ void drawTuneMenu() { fanSpeedItem = EDIT_ITEM(ICON_FanSpeed, MSG_FAN_SPEED, onDrawFanSpeed, setFanSpeed, &thermalManager.fan_speed[0]); #endif #if ALL(HAS_ZOFFSET_ITEM, HAS_BED_PROBE, BABYSTEP_ZPROBE_OFFSET, BABYSTEPPING) - EDIT_ITEM(ICON_Zoffset, MSG_ZPROBE_ZOFFSET, onDrawZOffset, setZOffset, &BABY_Z_VAR); + EDIT_ITEM(ICON_Zoffset, MSG_BABYSTEP_PROBE_Z, onDrawZOffset, setZOffset, &BABY_Z_VAR); #elif ALL(HAS_ZOFFSET_ITEM, MESH_BED_LEVELING, BABYSTEPPING) EDIT_ITEM(ICON_Zoffset, MSG_HOME_OFFSET_Z, onDrawPFloat2Menu, setZOffset, &BABY_Z_VAR); #endif @@ -3450,7 +3480,7 @@ void drawTuneMenu() { MENU_ITEM(ICON_LedControl, MSG_LED_CONTROL, onDrawSubMenu, drawLedControlMenu); #endif #elif ENABLED(LED_CONTROL_MENU) && DISABLED(CASE_LIGHT_USE_NEOPIXEL) - EDIT_ITEM(ICON_LedControl, MSG_LEDS, onDrawChkbMenu, setLedStatus, &leds.lights_on); + EDIT_ITEM(ICON_LedControl, MSG_LIGHTS, onDrawChkbMenu, setLedStatus, &leds.lights_on); #endif } updateMenu(tuneMenu); @@ -3545,7 +3575,7 @@ void drawTuneMenu() { void drawMotionMenu() { checkkey = ID_Menu; - if (SET_MENU_R(motionMenu, selrect({1, 16, 28, 13}), MSG_MOTION, 10)) { + if (SET_MENU_R(motionMenu, selrect({1, 16, 28, 13}), MSG_MOTION, 11)) { BACK_ITEM(drawControlMenu); MENU_ITEM(ICON_MaxSpeed, MSG_SPEED, onDrawSpeed, drawMaxSpeedMenu); MENU_ITEM(ICON_MaxAccelerated, MSG_ACCELERATION, onDrawAcc, drawMaxAccelMenu); @@ -3554,6 +3584,12 @@ void drawMotionMenu() { #elif HAS_JUNCTION_DEVIATION EDIT_ITEM(ICON_JDmm, MSG_JUNCTION_DEVIATION, onDrawPFloat3Menu, setJDmm, &planner.junction_deviation_mm); #endif + #if ENABLED(EDITABLE_STEPS_PER_UNIT) + MENU_ITEM(ICON_Step, MSG_STEPS_PER_MM, onDrawSteps, drawStepsMenu); + #endif + #if ENABLED(EDITABLE_HOMING_FEEDRATE) + MENU_ITEM(ICON_Homing, MSG_HOMING_FEEDRATE, onDrawSubMenu, drawHomingFRMenu); + #endif #if ENABLED(LIN_ADVANCE) EDIT_ITEM(ICON_MaxAccelerated, MSG_ADVANCE_K, onDrawPFloat3Menu, setLA_K, &planner.extruder_advance_K[0]); #endif @@ -3563,9 +3599,6 @@ void drawMotionMenu() { #if ENABLED(ADAPTIVE_STEP_SMOOTHING_TOGGLE) EDIT_ITEM(ICON_UBLActive, MSG_STEP_SMOOTHING, onDrawChkbMenu, setAdaptiveStepSmoothing, &stepper.adaptive_step_smoothing_enabled); #endif - #if ENABLED(EDITABLE_STEPS_PER_UNIT) - MENU_ITEM(ICON_Step, MSG_STEPS_PER_MM, onDrawSteps, drawStepsMenu); - #endif EDIT_ITEM(ICON_Flow, MSG_FLOW, onDrawPIntMenu, setFlow, &planner.flow_percentage[0]); EDIT_ITEM(ICON_Speed, MSG_SPEED, onDrawPIntMenu, setSpeed, &feedrate_percentage); } @@ -3764,6 +3797,30 @@ void drawMaxAccelMenu() { #endif +#if ENABLED(EDITABLE_HOMING_FEEDRATE) + + void drawHomingFRMenu() { + checkkey = ID_Menu; + if (SET_MENU(homingFRMenu, MSG_HOMING_FEEDRATE, 4)) { + BACK_ITEM(drawMotionMenu); + #if HAS_X_AXIS + uint16_t xhome = static_cast(homing_feedrate_mm_m.x); + EDIT_ITEM(ICON_MaxSpeedJerkX, MSG_HOMING_FEEDRATE_X, onDrawPIntMenu, setHomingX, &xhome); + #endif + #if HAS_Y_AXIS + uint16_t yhome = static_cast(homing_feedrate_mm_m.y); + EDIT_ITEM(ICON_MaxSpeedJerkY, MSG_HOMING_FEEDRATE_Y, onDrawPIntMenu, setHomingY, &yhome); + #endif + #if HAS_Z_AXIS + uint16_t zhome = static_cast(homing_feedrate_mm_m.z); + EDIT_ITEM(ICON_MaxSpeedJerkZ, MSG_HOMING_FEEDRATE_Z, onDrawPIntMenu, setHomingZ, &zhome); + #endif + } + updateMenu(homingFRMenu); + } + +#endif + //============================================================================= // UI editable custom colors //============================================================================= @@ -4028,7 +4085,7 @@ void drawMaxAccelMenu() { BACK_ITEM(drawPrepareMenu); MENU_ITEM(ICON_Homing, MSG_AUTO_HOME, onDrawMenuItem, autoHome); MENU_ITEM(ICON_AxisD, MSG_MOVE_NOZZLE_TO_BED, onDrawMenuItem, setMoveZto0); - EDIT_ITEM(ICON_Zoffset, MSG_ZPROBE_ZOFFSET, onDrawPFloat2Menu, setZOffset, &BABY_Z_VAR); + EDIT_ITEM(ICON_Zoffset, MSG_BABYSTEP_PROBE_Z, onDrawPFloat2Menu, setZOffset, &BABY_Z_VAR); } updateMenu(zOffsetWizMenu); if (!axis_is_trusted(Z_AXIS)) LCD_MESSAGE_F("WARNING: Z position unknown, move Z to home"); @@ -4052,6 +4109,9 @@ void drawMaxAccelMenu() { #if HAS_Z_AXIS MENU_ITEM(ICON_HomeZ, MSG_AUTO_HOME_Z, onDrawMenuItem, homeZ); #endif + #if ENABLED(Z_STEPPER_AUTO_ALIGN) + MENU_ITEM(ICON_HomeZ, MSG_AUTO_Z_ALIGN, onDrawMenuItem, autoZAlign); + #endif #if ENABLED(MESH_BED_LEVELING) EDIT_ITEM(ICON_ZAfterHome, MSG_Z_AFTER_HOME, onDrawPInt8Menu, setZAfterHoming, &hmiData.zAfterHoming); #endif diff --git a/firmware/Marlin/src/lcd/e3v2/proui/dwin.h b/firmware/Marlin/src/lcd/e3v2/proui/dwin.h index b424c8d..b6534a6 100644 --- a/firmware/Marlin/src/lcd/e3v2/proui/dwin.h +++ b/firmware/Marlin/src/lcd/e3v2/proui/dwin.h @@ -372,6 +372,9 @@ void drawMaxAccelMenu(); #if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU) void drawHomingMenu(); #endif +#if ENABLED(EDITABLE_HOMING_FEEDRATE) + void drawHomingFRMenu(); +#endif #if ENABLED(FWRETRACT) void drawFWRetractMenu(); #endif diff --git a/firmware/Marlin/src/lcd/e3v2/proui/menus.cpp b/firmware/Marlin/src/lcd/e3v2/proui/menus.cpp index 88fbf60..0f0005e 100644 --- a/firmware/Marlin/src/lcd/e3v2/proui/menus.cpp +++ b/firmware/Marlin/src/lcd/e3v2/proui/menus.cpp @@ -390,14 +390,14 @@ CustomMenuItem** Menu::items() { int8_t Menu::count() { return MenuItemCount; -}; +} /* MenuItem Class ===========================================================*/ void CustomMenuItem::draw(int8_t line) { if (line < 0 || line >= TROWS) return; if (onDraw != nullptr) (*onDraw)(static_cast(this), line); -}; +} void CustomMenuItem::redraw(bool erase/*=false*/) { const int8_t line = currentMenu->line(this->pos); @@ -436,7 +436,7 @@ void MenuItem::setFrame(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint1 MenuItemPtr::MenuItemPtr(uint8_t cicon, const char * const text, OnDrawItem ondraw, OnClickItem onclick, void* val) : MenuItem(cicon, text, ondraw, onclick) { value = val; -}; +} // Menu auxiliary functions =================================================== diff --git a/firmware/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp b/firmware/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp index 66792ce..8930cc3 100644 --- a/firmware/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp +++ b/firmware/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp @@ -89,7 +89,7 @@ void AnycubicTFT::onSetup() { delay_ms(10); // Init the state of the key pins running on the TFT - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR SET_INPUT_PULLUP(FIL_RUNOUT1_PIN); #endif @@ -894,7 +894,7 @@ void AnycubicTFT::doSDCardStateCheck() { } void AnycubicTFT::doFilamentRunoutCheck() { - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR // NOTE: getFilamentRunoutState() only returns the runout state if the job is printing // we want to actually check the status of the pin here, regardless of printstate if (READ(FIL_RUNOUT1_PIN) == FIL_RUNOUT1_STATE) { @@ -909,7 +909,7 @@ void AnycubicTFT::doFilamentRunoutCheck() { SENDLINE_DBG_PGM("J15", "TFT Serial Debug: Non blocking filament runout... J15"); } } - #endif // FILAMENT_RUNOUT_SENSOR + #endif // HAS_FILAMENT_SENSOR } void AnycubicTFT::startPrint() { @@ -939,7 +939,7 @@ void AnycubicTFT::pausePrint() { void AnycubicTFT::resumePrint() { #if HAS_MEDIA - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR if (READ(FIL_RUNOUT1_PIN) == FIL_RUNOUT1_STATE) { DEBUG_ECHOLNPGM("TFT Serial Debug: Resume Print with filament sensor still tripped... "); diff --git a/firmware/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp b/firmware/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp index ef9452a..f67b093 100644 --- a/firmware/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp +++ b/firmware/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp @@ -45,6 +45,10 @@ #include "../../../feature/powerloss.h" #endif +#if HAS_FILAMENT_SENSOR + #include "../../../feature/runout.h" +#endif + #define DEBUG_OUT ACDEBUGLEVEL #include "../../../core/debug_out.h" @@ -438,7 +442,7 @@ namespace Anycubic { } } - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR void DgusTFT::filamentRunout() { #if ACDEBUG(AC_MARLIN) @@ -453,7 +457,7 @@ namespace Anycubic { pop_up_index = 15; // show filament lack. - if (READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_STATE) { + if (FILAMENT_IS_OUT()) { playTune(FilamentOut); feedrate_back = getFeedrate_percent(); @@ -466,7 +470,7 @@ namespace Anycubic { } } - #endif // FILAMENT_RUNOUT_SENSOR + #endif // HAS_FILAMENT_SENSOR void DgusTFT::confirmationRequest(const char * const msg) { // M108 continue @@ -598,7 +602,7 @@ namespace Anycubic { printer_state = AC_printer_stopping_from_media_remove; } else { - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR #if ACDEBUG(AC_MARLIN) DEBUG_ECHOLNPGM("setFilamentRunoutState: ", __LINE__); #endif diff --git a/firmware/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp b/firmware/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp index 8e2b1bb..6429ac0 100644 --- a/firmware/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp +++ b/firmware/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp @@ -59,9 +59,9 @@ float Z_distance = 0.1; // // Persistent settings // -xy_int_t mks_corner_offsets[5]; // Initialized by settings.load() -xyz_int_t mks_park_pos; // Initialized by settings.load() -celsius_t mks_min_extrusion_temp; // Initialized by settings.load() +xy_int_t mks_corner_offsets[5]; // Initialized by settings.load +xyz_int_t mks_park_pos; // Initialized by settings.load +celsius_t mks_min_extrusion_temp; // Initialized by settings.load void MKS_reset_settings() { constexpr xy_int_t init_dgus_level_offsets[5] = { diff --git a/firmware/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/firmware/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index 4af2719..edaff3b 100644 --- a/firmware/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/firmware/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -52,7 +52,7 @@ #endif bool DGUSAutoTurnOff = false; -MKS_Language mks_language_index; // Initialized by settings.load() +MKS_Language mks_language_index; // Initialized by settings.load #if 0 void DGUSScreenHandlerMKS::sendinfoscreen_ch(const uint16_t *line1, const uint16_t *line2, const uint16_t *line3, const uint16_t *line4) { diff --git a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_screen.cpp b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_screen.cpp index c192860..b59406c 100644 --- a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_screen.cpp +++ b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/z_offset_screen.cpp @@ -36,7 +36,7 @@ void ZOffsetScreen::onRedraw(draw_mode_t what) { widgets_t w(what); w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(GET_TEXT_F(MSG_UNITS_MM)); - w.heading( GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); + w.heading( GET_TEXT_F(MSG_BABYSTEP_PROBE_Z)); w.color(z_axis).adjuster(4, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), getZOffset_mm()); w.increments(); w.button(2, GET_TEXT_F(MSG_PROBE_WIZARD), !isPrinting()); diff --git a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py old mode 100755 new mode 100644 index 1b84f17..92c1a52 --- a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py +++ b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py @@ -16,10 +16,7 @@ # location: . from __future__ import print_function -import argparse -import textwrap -import os -import zlib +import argparse, textwrap, os, zlib def deflate(data): return zlib.compress(data) diff --git a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py old mode 100755 new mode 100644 index 1d11b93..98a2420 --- a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py +++ b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py @@ -17,8 +17,7 @@ from __future__ import print_function from PIL import Image -import argparse -import textwrap +import argparse, textwrap def pack_rle(data): """Use run-length encoding to pack the bytes""" diff --git a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py old mode 100755 new mode 100644 index 1311410..b55b125 --- a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py +++ b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py @@ -17,11 +17,7 @@ from __future__ import print_function from PIL import Image -import argparse -import textwrap -import os -import sys -import zlib +import argparse, textwrap, os, sys, zlib class WriteSource: def __init__(self, mode): diff --git a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py old mode 100755 new mode 100644 index 0f39932..f505636 --- a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py +++ b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py @@ -16,7 +16,7 @@ # location: . from __future__ import print_function -import argparse,re,sys +import argparse, re, sys from html.parser import HTMLParser diff --git a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp index e4cf0b3..ab7d385 100644 --- a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp +++ b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp @@ -102,7 +102,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { #endif .enabled(ENABLED(HAS_MULTI_HOTEND)) .tag(4) .button(OFFSETS_POS, GET_TEXT_F(MSG_OFFSETS_MENU)) - .enabled(ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)) + .enabled(ANY(LIN_ADVANCE, HAS_FILAMENT_SENSOR)) .tag(11).button(FILAMENT_POS, GET_TEXT_F(MSG_FILAMENT)) .tag(12).button(ENDSTOPS_POS, GET_TEXT_F(MSG_LCD_ENDSTOPS)) .tag(15).button(DISPLAY_POS, GET_TEXT_F(MSG_DISPLAY_MENU)) @@ -122,29 +122,29 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; #if HAS_BED_PROBE - case 2: GOTO_SCREEN(ZOffsetScreen); break; + case 2: GOTO_SCREEN(ZOffsetScreen); break; #endif case 3: GOTO_SCREEN(StepsScreen); break; #if HAS_MULTI_HOTEND - case 4: GOTO_SCREEN(NozzleOffsetScreen); break; + case 4: GOTO_SCREEN(NozzleOffsetScreen); break; #endif case 5: GOTO_SCREEN(MaxVelocityScreen); break; case 6: GOTO_SCREEN(DefaultAccelerationScreen); break; case 7: GOTO_SCREEN(TERN(HAS_JUNCTION_DEVIATION, JunctionDeviationScreen, JerkScreen)); break; #if ENABLED(BACKLASH_GCODE) - case 8: GOTO_SCREEN(BacklashCompensationScreen); break; + case 8: GOTO_SCREEN(BacklashCompensationScreen); break; #endif case 9: GOTO_SCREEN(InterfaceSettingsScreen); LockScreen::check_passcode(); break; case 10: GOTO_SCREEN(RestoreFailsafeDialogBox); LockScreen::check_passcode(); break; - #if ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) - case 11: GOTO_SCREEN(FilamentMenu); break; + #if ANY(LIN_ADVANCE, HAS_FILAMENT_SENSOR) + case 11: GOTO_SCREEN(FilamentMenu); break; #endif case 12: GOTO_SCREEN(EndstopStatesScreen); break; #if HAS_TRINAMIC_CONFIG - case 13: GOTO_SCREEN(StepperCurrentScreen); break; + case 13: GOTO_SCREEN(StepperCurrentScreen); break; #endif #if ENABLED(SENSORLESS_HOMING) - case 14: GOTO_SCREEN(StepperBumpSensitivityScreen); break; + case 14: GOTO_SCREEN(StepperBumpSensitivityScreen); break; #endif case 15: GOTO_SCREEN(DisplayTuningScreen); break; case 16: GOTO_SCREEN(FlowPercentScreen); break; diff --git a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/case_light_screen.cpp b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/case_light_screen.cpp index 8fbb400..23140ea 100644 --- a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/case_light_screen.cpp +++ b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/case_light_screen.cpp @@ -31,7 +31,7 @@ using namespace Theme; void CaseLightScreen::onRedraw(draw_mode_t what) { widgets_t w(what); w.heading( GET_TEXT_F(MSG_CASE_LIGHT)); - w.toggle( 2, GET_TEXT_F(MSG_LEDS), getCaseLightState()); + w.toggle( 2, GET_TEXT_F(MSG_LIGHTS), getCaseLightState()); #if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) w.precision(0).units(GET_TEXT_F(MSG_UNITS_PERCENT)) .adjuster(10, GET_TEXT_F(MSG_CASE_LIGHT_BRIGHTNESS), getCaseLightBrightness_percent()); diff --git a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp index 6105591..8a93531 100644 --- a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp +++ b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp @@ -84,12 +84,12 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) { #else PIN_DISABLED(5, 3, PSTR(STR_Z_MIN), Z_MIN) #endif - #if ENABLED(FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT) + #if HAS_FILAMENT_SENSOR && PIN_EXISTS(FIL_RUNOUT) PIN_ENABLED (1, 4, GET_TEXT_F(MSG_RUNOUT_1), FIL_RUNOUT, FIL_RUNOUT1_STATE) #else PIN_DISABLED(1, 4, GET_TEXT_F(MSG_RUNOUT_1), FIL_RUNOUT) #endif - #if ALL(HAS_MULTI_EXTRUDER, FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT2) + #if ALL(HAS_MULTI_EXTRUDER, HAS_FILAMENT_SENSOR) && PIN_EXISTS(FIL_RUNOUT2) PIN_ENABLED (3, 4, GET_TEXT_F(MSG_RUNOUT_2), FIL_RUNOUT2, FIL_RUNOUT2_STATE) #else PIN_DISABLED(3, 4, GET_TEXT_F(MSG_RUNOUT_2), FIL_RUNOUT2) diff --git a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp index 777698c..7883ff7 100644 --- a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp +++ b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp @@ -58,7 +58,7 @@ void FilamentMenu::onRedraw(draw_mode_t what) { cmd.font(font_large) .text(TITLE_POS, GET_TEXT_F(MSG_FILAMENT)) .font(font_medium).colors(normal_btn) - .enabled(ENABLED(FILAMENT_RUNOUT_SENSOR)) + .enabled(ENABLED(HAS_FILAMENT_SENSOR)) .tag(2).button(RUNOUT_SENSOR_POS, GET_TEXT_F(MSG_RUNOUT_SENSOR)) .enabled(ENABLED(LIN_ADVANCE)) .tag(3).button(LIN_ADVANCE_POS, GET_TEXT_F(MSG_LINEAR_ADVANCE)) @@ -69,12 +69,12 @@ void FilamentMenu::onRedraw(draw_mode_t what) { bool FilamentMenu::onTouchEnd(uint8_t tag) { switch (tag) { - case 1: GOTO_PREVIOUS(); break; - #if ENABLED(FILAMENT_RUNOUT_SENSOR) - case 2: GOTO_SCREEN(FilamentRunoutScreen); break; + case 1: GOTO_PREVIOUS(); break; + #if HAS_FILAMENT_SENSOR + case 2: GOTO_SCREEN(FilamentRunoutScreen); break; #endif #if ENABLED(LIN_ADVANCE) - case 3: GOTO_SCREEN(LinearAdvanceScreen); break; + case 3: GOTO_SCREEN(LinearAdvanceScreen); break; #endif default: return false; } diff --git a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h index a95932a..dcfaa5f 100644 --- a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h +++ b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h @@ -75,13 +75,13 @@ enum { #if ENABLED(CASE_LIGHT_ENABLE) CASE_LIGHT_SCREEN_CACHE, #endif - #if ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) + #if ANY(LIN_ADVANCE, HAS_FILAMENT_SENSOR) FILAMENT_MENU_CACHE, #endif #if ENABLED(LIN_ADVANCE) LINEAR_ADVANCE_SCREEN_CACHE, #endif - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR FILAMENT_RUNOUT_SCREEN_CACHE, #endif #if HAS_MEDIA @@ -197,11 +197,11 @@ enum { #include "case_light_screen.h" #endif -#if ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) +#if ANY(LIN_ADVANCE, HAS_FILAMENT_SENSOR) #include "filament_menu.h" #endif -#if ENABLED(FILAMENT_RUNOUT_SENSOR) +#if HAS_FILAMENT_SENSOR #include "filament_runout_screen.h" #endif diff --git a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp index 6d5ef85..420758c 100644 --- a/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp +++ b/firmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp @@ -374,9 +374,9 @@ void StatusScreen::draw_interaction_buttons(draw_mode_t what) { .button(TOOL_HEAD_POS, !ExtUI::isPrintingPaused() ? GET_TEXT_F(MSG_BUTTON_PAUSE) : GET_TEXT_F(MSG_BUTTON_RESUME)) .tag(!ExtUI::isPrintingPaused() ? 7 : 14) .button(CHANGE_FILAMENT_POS, !ExtUI::isPrintingPaused() ? GET_TEXT_F(MSG_SPEED) : F("")); - #if ENABLED(FILAMENT_RUNOUT_SENSOR) - cmd.tag(8).button(PREHEAT_POS, GET_TEXT_F(MSG_SENSOR)); - #endif + #if HAS_FILAMENT_SENSOR + cmd.tag(8).button(PREHEAT_POS, GET_TEXT_F(MSG_SENSOR)); + #endif if (ExtUI::isPrintingPaused()) draw_text_box(cmd, CHANGE_FILAMENT_POS, F("Change\nFilament"), OPT_CENTER, font_medium); } @@ -536,7 +536,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) { } break; case 7: GOTO_SCREEN(FeedratePercentScreen); break; - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR case 8: GOTO_SCREEN(FilamentRunoutScreen); break; #endif case 9: injectCommands(F("G28")); break; diff --git a/firmware/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp b/firmware/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp index 4fb974d..0a1c3f6 100644 --- a/firmware/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp +++ b/firmware/Marlin/src/lcd/extui/ia_creality/ia_creality_extui.cpp @@ -171,7 +171,7 @@ void onUserConfirmRequired(const char *const msg) { case PAUSE_MESSAGE_PURGE: { rts.sendData(ExchangePageBase + 78, ExchangepageAddr); char newMsg[40] = "Yes to "; - strcat_P(newMsg, TERN1(FILAMENT_RUNOUT_SENSOR, !ExtUI::getFilamentRunoutState() && getFilamentRunoutEnabled()) ? PSTR("Continue") : PSTR("Disable ")); + strcat_P(newMsg, TERN1(HAS_FILAMENT_SENSOR, !ExtUI::getFilamentRunoutState() && getFilamentRunoutEnabled()) ? PSTR("Continue") : PSTR("Disable ")); strcat_P(newMsg, PSTR(" No to Purge")); onStatusChanged(newMsg); break; @@ -181,7 +181,7 @@ void onUserConfirmRequired(const char *const msg) { case PAUSE_MESSAGE_OPTION: { rts.sendData(ExchangePageBase + 78, ExchangepageAddr); char newMsg[40] = "Yes to "; - strcat_P(newMsg, TERN1(FILAMENT_RUNOUT_SENSOR, !ExtUI::getFilamentRunoutState() && getFilamentRunoutEnabled()) ? PSTR("Continue") : PSTR("Disable ")); + strcat_P(newMsg, TERN1(HAS_FILAMENT_SENSOR, !ExtUI::getFilamentRunoutState() && getFilamentRunoutEnabled()) ? PSTR("Continue") : PSTR("Disable ")); strcat_P(newMsg, PSTR(" No to Purge")); onStatusChanged(newMsg); break; diff --git a/firmware/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp b/firmware/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp index 00249ff..0c9f8a2 100644 --- a/firmware/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp +++ b/firmware/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp @@ -1435,7 +1435,7 @@ void RTS::handleData() { // pause_resume_selected = true; } else { - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR bool runouton = false; if (getFilamentRunoutState()) { #if NUM_RUNOUT_SENSORS > 1 diff --git a/firmware/Marlin/src/lcd/extui/mks_ui/draw_print_file.h b/firmware/Marlin/src/lcd/extui/mks_ui/draw_print_file.h index 01b0db8..7cd4e52 100644 --- a/firmware/Marlin/src/lcd/extui/mks_ui/draw_print_file.h +++ b/firmware/Marlin/src/lcd/extui/mks_ui/draw_print_file.h @@ -19,6 +19,8 @@ * along with this program. If not, see . * */ +#include "../../../sd/SdFatConfig.h" + #pragma once #ifdef __cplusplus @@ -33,15 +35,15 @@ typedef struct { extern DIR_OFFSET dir_offset[10]; #define FILE_NUM 6 -#define SHORT_NAME_LEN 13 + #define NAME_CUT_LEN 23 #define MAX_DIR_LEVEL 10 typedef struct { - char file_name[FILE_NUM][SHORT_NAME_LEN * MAX_DIR_LEVEL + 1]; - char curDirPath[SHORT_NAME_LEN * MAX_DIR_LEVEL + 1]; - char long_name[FILE_NUM][SHORT_NAME_LEN * 2 + 1]; + char file_name[FILE_NUM][FILENAME_LENGTH * MAX_DIR_LEVEL + 1]; + char long_name[FILE_NUM][TERN(LONG_FILENAME_WRITE_SUPPORT, LONG_FILENAME_LENGTH, FILENAME_LENGTH * 2) + 1]; + char curDirPath[FILENAME_LENGTH * MAX_DIR_LEVEL + 1]; bool IsFolder[FILE_NUM]; char Sd_file_cnt; char sd_file_index; diff --git a/firmware/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp b/firmware/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp index e3f748b..1bc1e04 100644 --- a/firmware/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp +++ b/firmware/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp @@ -142,38 +142,97 @@ void mount_file_sys(const uint8_t disk_type) { } } -#define ILLEGAL_CHAR_REPLACE 0x5F // '_' +#define ILLEGAL_CHAR_REPLACE '_' // 0x5F -static bool longName2DosName(const char *longName, char *dosName) { - uint8_t i = FILENAME_LENGTH; - while (i) dosName[--i] = '\0'; +#if ENABLED(LONG_FILENAME_WRITE_SUPPORT) - while (*longName) { - uint8_t c = *longName++; - if (c == '.') { // For a dot... - if (i == 0) return false; - strcat_P(dosName, PSTR(".GCO")); - return dosName[0] != '\0'; + static bool removeIllegalChars(const char *unsanitizedName, char *sanitizedName) { + const size_t maxLength = LONG_FILENAME_LENGTH; + uint8_t i = 0; + const char *fileExtension = NULL; + + const char *dot = strrchr(unsanitizedName, '.'); + if (dot && dot != unsanitizedName) { + fileExtension = dot; } - // Fail for illegal characters - if (c < 0x21 || c == 0x7F) // Check size, non-printable characters - c = ILLEGAL_CHAR_REPLACE; // replace non-printable chars with underscore '_' + size_t extensionLength = fileExtension ? strlen(fileExtension) : 0; + size_t nameMaxLength = maxLength - extensionLength - 3; + + while (*unsanitizedName && unsanitizedName != fileExtension && i < nameMaxLength) { + uint8_t c = *unsanitizedName++; + if (c < 0x21 || c == 0x7F) { + c = ILLEGAL_CHAR_REPLACE; + } + else { + PGM_P illegalChars = PSTR("|<>^+=?/[];,*\"\\"); + while (const uint8_t illegalChar = pgm_read_byte(illegalChars++)) { + if (c == illegalChar) { + c = ILLEGAL_CHAR_REPLACE; + break; + } + } + } + sanitizedName[i++] = c; + } + + if (i >= nameMaxLength) { + snprintf(sanitizedName + nameMaxLength, 4, "~1"); + i = strlen(sanitizedName); + } + + if (fileExtension) { + strncpy(sanitizedName + i, fileExtension, maxLength - i - 1); + sanitizedName[maxLength - 1] = '\0'; + } else { - PGM_P p = PSTR("|<>^+=?/[];,*\"\\"); - while (const uint8_t b = pgm_read_byte(p++)) - if (b == c) c = ILLEGAL_CHAR_REPLACE; // replace illegal chars with underscore '_' + sanitizedName[i] = '\0'; } - dosName[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a')); // Uppercase required for 8.3 name + return sanitizedName[0] != '\0'; +} - if (i >= 5) { - strcat_P(dosName, PSTR("~1.GCO")); - return dosName[0] != '\0'; +#else // !LONG_FILENAME_WRITE_SUPPORT + + static bool longName2DosName(const char *longName, char *dosName) { + uint8_t i = FILENAME_LENGTH; + while (i) dosName[--i] = '\0'; + + while (*longName) { + uint8_t c = *longName++; + if (c == '.') { // For a dot... + if (i == 0) return false; + strcat_P(dosName, PSTR(".GCO")); + return dosName[0] != '\0'; + } + + // Fail for illegal characters + if (c < 0x21 || c == 0x7F) // Check size, non-printable characters + c = ILLEGAL_CHAR_REPLACE; // replace non-printable chars + else { + PGM_P p = PSTR("|<>^+=?/[];,*\"\\"); + while (const uint8_t b = pgm_read_byte(p++)) + if (b == c) c = ILLEGAL_CHAR_REPLACE; // replace illegal chars + } + + dosName[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a')); // Uppercase required for 8.3 name + + if (i >= 5) { + strcat_P(dosName, PSTR("~1.GCO")); + return dosName[0] != '\0'; + } } - } - return dosName[0] != '\0'; // Return true if any name was set + return dosName[0] != '\0'; // Return true if any name was set +} +#endif // !LONG_FILENAME_WRITE_SUPPORT + +static bool sanitizeName(const char * const unsanitizedName, char * const sanitizedName) { + #if ENABLED(LONG_FILENAME_WRITE_SUPPORT) + return removeIllegalChars(unsanitizedName, sanitizedName); + #else + return longName2DosName((const char *)unsanitizedName, sanitizedName); + #endif } #ifdef __STM32F1__ @@ -947,7 +1006,7 @@ static void wifi_gcode_exec(uint8_t * const cmd_line) { strcat_P((char *)list_file.file_name[sel_id], PSTR("/")); if (file_writer.fileTransfer == 1) { - char dosName[FILENAME_LENGTH]; + char dosName[TERN(LONG_FILENAME_WRITE_SUPPORT, LONG_FILENAME_LENGTH, FILENAME_LENGTH)]; uint8_t fileName[sizeof(list_file.file_name[sel_id])]; fileName[0] = '\0'; if (has_path_selected == 1) { @@ -955,7 +1014,7 @@ static void wifi_gcode_exec(uint8_t * const cmd_line) { strcat_P((char *)list_file.file_name[sel_id], PSTR("/")); } else strcat((char *)fileName, &mStr[index]); - if (!longName2DosName((const char *)fileName, dosName)) + if (!sanitizeName((const char *)fileName, dosName)) strcpy_P(list_file.file_name[sel_id], PSTR("notValid")); strcat((char *)list_file.file_name[sel_id], dosName); strcat((char *)list_file.long_name[sel_id], (const char *)fileName); @@ -1542,10 +1601,9 @@ static void file_first_msg_handle(const uint8_t * const msg, const uint16_t msgL wifi_delay(1000); #if HAS_MEDIA + char dosName[TERN(LONG_FILENAME_WRITE_SUPPORT, LONG_FILENAME_LENGTH, FILENAME_LENGTH)]; - char dosName[FILENAME_LENGTH]; - - if (!longName2DosName((const char *)file_writer.saveFileName, dosName)) { + if (!sanitizeName((const char *)file_writer.saveFileName, dosName)) { clear_cur_ui(); upload_result = 2; wifiTransError.flag = 1; diff --git a/firmware/Marlin/src/lcd/extui/ui_api.cpp b/firmware/Marlin/src/lcd/extui/ui_api.cpp index a38d45f..6744643 100644 --- a/firmware/Marlin/src/lcd/extui/ui_api.cpp +++ b/firmware/Marlin/src/lcd/extui/ui_api.cpp @@ -293,7 +293,7 @@ namespace ExtUI { return GET_TEMP_ADJUSTMENT(thermalManager.degHotend(extruder - E0)); } - celsius_float_t getTargetTemp_celsius(const heater_t heater) { + celsius_t getTargetTemp_celsius(const heater_t heater) { switch (heater) { #if HAS_HEATED_BED case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetBed()); @@ -305,19 +305,19 @@ namespace ExtUI { } } - celsius_float_t getTargetTemp_celsius(const extruder_t extruder) { + celsius_t getTargetTemp_celsius(const extruder_t extruder) { return GET_TEMP_ADJUSTMENT(thermalManager.degTargetHotend(extruder - E0)); } // // Fan target/actual speed // - float getTargetFan_percent(const fan_t fan) { + uint8_t getTargetFan_percent(const fan_t fan) { UNUSED(fan); return TERN0(HAS_FAN, thermalManager.fanSpeedPercent(fan - FAN0)); } - float getActualFan_percent(const fan_t fan) { + uint8_t getActualFan_percent(const fan_t fan) { UNUSED(fan); return TERN0(HAS_FAN, thermalManager.scaledFanSpeedPercent(fan - FAN0)); } diff --git a/firmware/Marlin/src/lcd/extui/ui_api.h b/firmware/Marlin/src/lcd/extui/ui_api.h index 6a775fa..8404033 100644 --- a/firmware/Marlin/src/lcd/extui/ui_api.h +++ b/firmware/Marlin/src/lcd/extui/ui_api.h @@ -172,10 +172,10 @@ namespace ExtUI { bool isHeaterIdle(const extruder_t); celsius_float_t getActualTemp_celsius(const heater_t); celsius_float_t getActualTemp_celsius(const extruder_t); - celsius_float_t getTargetTemp_celsius(const heater_t); - celsius_float_t getTargetTemp_celsius(const extruder_t); - float getActualFan_percent(const fan_t); - float getTargetFan_percent(const fan_t); + celsius_t getTargetTemp_celsius(const heater_t); + celsius_t getTargetTemp_celsius(const extruder_t); + uint8_t getActualFan_percent(const fan_t); + uint8_t getTargetFan_percent(const fan_t); // High level positions, by Axis ID, Extruder ID float getAxisPosition_mm(const axis_t); diff --git a/firmware/Marlin/src/lcd/language/language_an.h b/firmware/Marlin/src/lcd/language/language_an.h index 5e7d81d..bd54a48 100644 --- a/firmware/Marlin/src/lcd/language/language_an.h +++ b/firmware/Marlin/src/lcd/language/language_an.h @@ -78,6 +78,7 @@ namespace LanguageNarrow_an { LSTR MSG_EXTRUDE = _UxGT("Extruir"); LSTR MSG_RETRACT = _UxGT("Retraer"); LSTR MSG_MOVE_AXIS = _UxGT("Mover Eixes"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Sondar y Nivelar"); LSTR MSG_BED_LEVELING = _UxGT("Nivelar base"); LSTR MSG_LEVEL_BED = _UxGT("Nivelar base"); LSTR MSG_MOVE_X = _UxGT("Mover X"); @@ -158,7 +159,11 @@ namespace LanguageNarrow_an { LSTR MSG_CHANGE_MEDIA = _UxGT("Cambiar tarcheta"); LSTR MSG_ZPROBE_OUT = _UxGT("Sonda Z fuera"); LSTR MSG_BLTOUCH_RESET = _UxGT("Reset BLTouch"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Desfase X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Desfase Y"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Desfase Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Desfase @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Probe Z con pas"); LSTR MSG_BABYSTEP_X = _UxGT("Micropaso X"); LSTR MSG_BABYSTEP_Y = _UxGT("Micropaso Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Micropaso Z"); diff --git a/firmware/Marlin/src/lcd/language/language_bg.h b/firmware/Marlin/src/lcd/language/language_bg.h index 11df9ce..7b58b26 100644 --- a/firmware/Marlin/src/lcd/language/language_bg.h +++ b/firmware/Marlin/src/lcd/language/language_bg.h @@ -67,6 +67,7 @@ namespace LanguageNarrow_bg { LSTR MSG_EXTRUDE = _UxGT("Екструзия"); LSTR MSG_RETRACT = _UxGT("Откат"); LSTR MSG_MOVE_AXIS = _UxGT("Движение по ос"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Нивелиране"); LSTR MSG_BED_LEVELING = _UxGT("Нивелиране"); LSTR MSG_LEVEL_BED = _UxGT("Нивелиране"); LSTR MSG_MOVE_X = _UxGT("Движение по X"); @@ -141,7 +142,11 @@ namespace LanguageNarrow_bg { LSTR MSG_ATTACH_MEDIA = _UxGT("Иниц. SD-Карта"); LSTR MSG_CHANGE_MEDIA = _UxGT("Смяна SD-Карта"); LSTR MSG_ZPROBE_OUT = _UxGT("Z-сондата е извадена"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("X Отстояние"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y Отстояние"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Отстояние"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("@ Отстояние"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Промяна на Z"); LSTR MSG_BABYSTEP_X = _UxGT("Министъпка X"); LSTR MSG_BABYSTEP_Y = _UxGT("Министъпка Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Министъпка Z"); diff --git a/firmware/Marlin/src/lcd/language/language_ca.h b/firmware/Marlin/src/lcd/language/language_ca.h index 65ad232..3c753de 100644 --- a/firmware/Marlin/src/lcd/language/language_ca.h +++ b/firmware/Marlin/src/lcd/language/language_ca.h @@ -75,6 +75,7 @@ namespace LanguageNarrow_ca { LSTR MSG_EXTRUDE = _UxGT("Extrudeix"); LSTR MSG_RETRACT = _UxGT("Retreu"); LSTR MSG_MOVE_AXIS = _UxGT("Mou eixos"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Sonda i anivella"); LSTR MSG_BED_LEVELING = _UxGT("Anivella llit"); LSTR MSG_LEVEL_BED = _UxGT("Anivella llit"); @@ -149,7 +150,11 @@ namespace LanguageNarrow_ca { LSTR MSG_ZPROBE_OUT = _UxGT("Sonda Z fora"); LSTR MSG_BLTOUCH_RESET = _UxGT("Reinicia BLTouch"); LSTR MSG_HOME_FIRST = _UxGT("Home %s primer"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Decalatge X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Decalatge Y"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Decalatge Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Decalatge @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Pas a pas el Z"); LSTR MSG_BABYSTEP_X = _UxGT("Micropas X"); LSTR MSG_BABYSTEP_Y = _UxGT("Micropas Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Micropas Z"); diff --git a/firmware/Marlin/src/lcd/language/language_cz.h b/firmware/Marlin/src/lcd/language/language_cz.h index 89f1a4a..2217ee5 100644 --- a/firmware/Marlin/src/lcd/language/language_cz.h +++ b/firmware/Marlin/src/lcd/language/language_cz.h @@ -102,6 +102,7 @@ namespace LanguageNarrow_cz { LSTR MSG_EXTRUDE = _UxGT("Vytlačit (extr.)"); LSTR MSG_RETRACT = _UxGT("Zatlačit (retr.)"); LSTR MSG_MOVE_AXIS = _UxGT("Posunout osy"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Měření a vyrovnání"); LSTR MSG_BED_LEVELING = _UxGT("Vyrovnat podložku"); LSTR MSG_LEVEL_BED = _UxGT("Vyrovnat podložku"); LSTR MSG_BED_TRAMMING = _UxGT("Vyrovnat rohy"); @@ -125,7 +126,7 @@ namespace LanguageNarrow_cz { LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Zrcadlení"); LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Plná kontrola"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2. tryska Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2. tryska @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2. tryska @"); LSTR MSG_UBL_DOING_G29 = _UxGT("Provádím G29"); LSTR MSG_UBL_TOOLS = _UxGT("UBL nástroje"); @@ -135,13 +136,10 @@ namespace LanguageNarrow_cz { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Změřte"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Odstraňte a změřte"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Přesun na další"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Aktivovat UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Deaktivovat UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Teplota podložky"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Teplota podložky"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Teplota hotendu"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Teplota hotendu"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Úprava sítě bodů"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Upravit vlastní síť"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Doladit síť bodů"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Konec úprav sítě"); @@ -202,7 +200,8 @@ namespace LanguageNarrow_cz { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Uložit síť bodů"); LSTR MSG_LED_CONTROL = _UxGT("Nastavení LED"); - LSTR MSG_LEDS = _UxGT("Světla"); + LSTR MSG_LIGHTS = _UxGT("Světla"); + LSTR MSG_LIGHT_N = _UxGT("Světla #{"); LSTR MSG_LED_PRESETS = _UxGT("Světla Předvolby"); LSTR MSG_SET_LEDS_RED = _UxGT("Červená"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Oranžová"); @@ -386,7 +385,11 @@ namespace LanguageNarrow_cz { LSTR MSG_MANUAL_DEPLOY = _UxGT("Vysunout Z-sondu"); LSTR MSG_MANUAL_STOW = _UxGT("Zasunout Z-sondu"); LSTR MSG_HOME_FIRST = _UxGT("Domů %s první"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("X ofset"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y ofset"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z ofset"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("@ ofset"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Krok a Z offset"); LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Babystep Z"); diff --git a/firmware/Marlin/src/lcd/language/language_da.h b/firmware/Marlin/src/lcd/language/language_da.h index 78806c7..c348db0 100644 --- a/firmware/Marlin/src/lcd/language/language_da.h +++ b/firmware/Marlin/src/lcd/language/language_da.h @@ -69,6 +69,7 @@ namespace LanguageNarrow_da { LSTR MSG_SWITCH_PS_OFF = _UxGT("Slå strøm fra"); LSTR MSG_EXTRUDE = _UxGT("Extruder"); LSTR MSG_MOVE_AXIS = _UxGT("Flyt akser"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Probe og nivellér"); LSTR MSG_BED_LEVELING = _UxGT("Juster bed"); LSTR MSG_LEVEL_BED = _UxGT("Juster bed"); LSTR MSG_MOVE_X = _UxGT("Flyt X"); @@ -136,6 +137,7 @@ namespace LanguageNarrow_da { LSTR MSG_ZPROBE_OUT = _UxGT("Probe udenfor plade"); LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch Selv-Test"); LSTR MSG_HOME_FIRST = _UxGT("Home %s først"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Justér Z trin"); LSTR MSG_ERR_HEATING_FAILED = _UxGT("Opvarmning fejlet"); LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Fejl: reserve temp"); LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("Temp løber løbsk"); diff --git a/firmware/Marlin/src/lcd/language/language_de.h b/firmware/Marlin/src/lcd/language/language_de.h index 828a44b..afabace 100644 --- a/firmware/Marlin/src/lcd/language/language_de.h +++ b/firmware/Marlin/src/lcd/language/language_de.h @@ -61,7 +61,7 @@ namespace LanguageNarrow_de { LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Statusbalken-Test"); LSTR MSG_HOMING = _UxGT("Homing"); LSTR MSG_AUTO_HOME = _UxGT("Auto Home"); - LSTR MSG_AUTO_HOME_A = _UxGT("Home @"); + LSTR MSG_AUTO_HOME_N = _UxGT("Home @"); LSTR MSG_AUTO_HOME_X = _UxGT("Home X"); LSTR MSG_AUTO_HOME_Y = _UxGT("Home Y"); LSTR MSG_AUTO_HOME_Z = _UxGT("Home Z"); @@ -132,6 +132,7 @@ namespace LanguageNarrow_de { LSTR MSG_EXTRUDE = _UxGT("Extrudieren"); LSTR MSG_RETRACT = _UxGT("Einzug"); LSTR MSG_MOVE_AXIS = _UxGT("Achsen bewegen"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Sonden nivellieren"); LSTR MSG_BED_LEVELING = _UxGT("Bett-Nivellierung"); LSTR MSG_LEVEL_BED = _UxGT("Bett nivellieren"); LSTR MSG_BED_TRAMMING = _UxGT("Bett ausrichten"); @@ -173,7 +174,7 @@ namespace LanguageNarrow_de { LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("vollstä. Kontrolle"); LSTR MSG_IDEX_DUPE_GAP = _UxGT("X-Lücke duplizieren"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2. Düse Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2. Düse @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2. Düse @"); LSTR MSG_UBL_DOING_G29 = _UxGT("G29 ausführen"); LSTR MSG_UBL_TOOLS = _UxGT("UBL-Werkzeuge"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Berührungspunkt"); @@ -186,13 +187,10 @@ namespace LanguageNarrow_de { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Messen"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Entfernen & messen"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Nächster Punkt..."); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("UBL aktivieren"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL deaktivieren"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Betttemperatur"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Betttemperatur"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Hotend-Temp."); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend-Temp."); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Netz bearbeiten"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Eigenes Netz bearb."); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Feineinstellung..."); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Bearbeitung beendet"); @@ -256,7 +254,8 @@ namespace LanguageNarrow_de { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Bettnetz speichern"); LSTR MSG_LED_CONTROL = _UxGT("Licht-Steuerung"); - LSTR MSG_LEDS = _UxGT("Licht"); + LSTR MSG_LIGHTS = _UxGT("Licht"); + LSTR MSG_LIGHT_N = _UxGT("Lichter #{"); LSTR MSG_LED_PRESETS = _UxGT("Licht-Einstellung"); LSTR MSG_SET_LEDS_RED = _UxGT("Rot"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange"); @@ -268,7 +267,6 @@ namespace LanguageNarrow_de { LSTR MSG_SET_LEDS_WHITE = _UxGT("Weiß"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Standard"); LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal {"); - LSTR MSG_LEDS2 = _UxGT("Lichter #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Licht #2 Voreinst."); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Helligkeit"); LSTR MSG_CUSTOM_LEDS = _UxGT("Benutzerdefiniert"); @@ -527,6 +525,8 @@ namespace LanguageNarrow_de { LSTR MSG_ZPROBE_XOFFSET = _UxGT("Sondenversatz X"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Sondenversatz Y"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Sondenversatz Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Sondenversatz @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Z Offset mit Pas"); LSTR MSG_ZPROBE_MARGIN = _UxGT("Sondenrand"); LSTR MSG_Z_FEED_RATE = _UxGT("Z-Vorschub"); LSTR MSG_ENABLE_HS_MODE = _UxGT("HS-Modus aktivieren"); diff --git a/firmware/Marlin/src/lcd/language/language_el.h b/firmware/Marlin/src/lcd/language/language_el.h index 428cfce..e971af3 100644 --- a/firmware/Marlin/src/lcd/language/language_el.h +++ b/firmware/Marlin/src/lcd/language/language_el.h @@ -87,6 +87,7 @@ namespace LanguageNarrow_el { LSTR MSG_EXTRUDE = _UxGT("Εξώθηση"); LSTR MSG_RETRACT = _UxGT("Ανάσυρση"); LSTR MSG_MOVE_AXIS = _UxGT("Μετακίνηση άξονα"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Ανιχνευτής/ισοπέδωση"); LSTR MSG_BED_LEVELING = _UxGT("Επιπεδοποίηση κλίνης"); LSTR MSG_LEVEL_BED = _UxGT("Επιπεδοποίηση κλίνης"); LSTR MSG_MOVE_X = _UxGT("Μετακίνηση X"); @@ -183,14 +184,18 @@ namespace LanguageNarrow_el { LSTR MSG_CHANGE_MEDIA = _UxGT("Αλλαγή κάρτας SD"); LSTR MSG_ZPROBE_OUT = _UxGT("Διερεύνηση Z εκτός Επ.Εκτύπωσης"); // SHORTEN LSTR MSG_YX_UNHOMED = _UxGT("Επαναφορά Χ/Υ πρώτα"); - LSTR MSG_XYZ_UNHOMED = _UxGT("Επαναφορά ΧΥΖ πρώτα"); - LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Μετατόπιση Ζ"); + LSTR MSG_XYZ_UNHOMED = _UxGT("Επαναφορά ΧΥZ πρώτα"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Μετατόπιση X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Μετατόπιση Y"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Μετατόπιση Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Μετατόπιση @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Βήμα Z ρύθμιση"); LSTR MSG_BABYSTEP_X = _UxGT("Μικρό βήμα Χ"); LSTR MSG_BABYSTEP_Y = _UxGT("Μικρό βήμα Υ"); - LSTR MSG_BABYSTEP_Z = _UxGT("Μικρό βήμα Ζ"); + LSTR MSG_BABYSTEP_Z = _UxGT("Μικρό βήμα Z"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Ακύρωση endstop"); LSTR MSG_ERR_HEATING_FAILED = _UxGT("Αποτυχία θέρμανσης"); - LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("ΠΛΕΟΝΑΖΟΥΣΑ ΘΕΡΜΟΤΗΤΑ"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("ΠΛΕΟΝΑZΟΥΣΑ ΘΕΡΜΟΤΗΤΑ"); LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("ΘΕΡΜΙΚΗ ΔΙΑΦΥΓΗ"); LSTR MSG_ERR_TEMP_MALFUNCTION = _UxGT("ΘΕΡΜΙΚΗ ΔΥΣΛΕΙΤΟΥΡΓΙΑ"); LSTR MSG_ERR_MAXTEMP = _UxGT("ΠΕΡΙΤΤΗ ΘΕΡΜΟΚΡΑΣΙΑ"); diff --git a/firmware/Marlin/src/lcd/language/language_el_gr.h b/firmware/Marlin/src/lcd/language/language_el_gr.h index af8274b..e2a3476 100644 --- a/firmware/Marlin/src/lcd/language/language_el_gr.h +++ b/firmware/Marlin/src/lcd/language/language_el_gr.h @@ -47,7 +47,7 @@ namespace LanguageNarrow_el_gr { LSTR MSG_AUTO_HOME_X = _UxGT("Αρχικό σημείο X"); LSTR MSG_AUTO_HOME_Y = _UxGT("Αρχικό σημείο Y"); LSTR MSG_AUTO_HOME_Z = _UxGT("Αρχικό σημείο Z"); - LSTR MSG_LEVEL_BED_HOMING = _UxGT("Επαναφορά στο αρχικό σημείο ΧΥΖ"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Επαναφορά στο αρχικό σημείο ΧΥZ"); LSTR MSG_LEVEL_BED_WAITING = _UxGT("Κάντε κλικ για να ξεκινήσετε"); LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Επόμενο σημείο"); LSTR MSG_LEVEL_BED_DONE = _UxGT("Ολοκλήρωση επιπεδοποίησης!"); @@ -76,6 +76,7 @@ namespace LanguageNarrow_el_gr { LSTR MSG_EXTRUDE = _UxGT("Εξώθηση"); LSTR MSG_RETRACT = _UxGT("Ανάσυρση"); LSTR MSG_MOVE_AXIS = _UxGT("Μετακίνηση άξονα"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Ανιχνευτής/ισοπέδωση"); LSTR MSG_BED_LEVELING = _UxGT("Επιπεδοποίηση κλίνης"); LSTR MSG_LEVEL_BED = _UxGT("Επιπεδοποίηση κλίνης"); LSTR MSG_MOVE_X = _UxGT("Μετακίνηση X"); @@ -172,15 +173,19 @@ namespace LanguageNarrow_el_gr { LSTR MSG_ATTACH_MEDIA = _UxGT("Προετοιμασία κάρτας SD"); LSTR MSG_CHANGE_MEDIA = _UxGT("Αλλαγή κάρτας SD"); LSTR MSG_ZPROBE_OUT = _UxGT("Διερεύνηση Z εκτός κλίνης"); - LSTR MSG_YX_UNHOMED = _UxGT("Επαναφορά Χ/Υ πριν από Ζ"); - LSTR MSG_XYZ_UNHOMED = _UxGT("Επαναφορά ΧΥΖ πρώτα"); - LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Μετατόπιση Ζ"); + LSTR MSG_YX_UNHOMED = _UxGT("Επαναφορά Χ/Υ πριν από Z"); + LSTR MSG_XYZ_UNHOMED = _UxGT("Επαναφορά ΧΥZ πρώτα"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Μετατόπιση X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Μετατόπιση Y"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Μετατόπιση Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Μετατόπιση @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Βήμα Z ρύθμιση"); LSTR MSG_BABYSTEP_X = _UxGT("Μικρό βήμα Χ"); LSTR MSG_BABYSTEP_Y = _UxGT("Μικρό βήμα Υ"); - LSTR MSG_BABYSTEP_Z = _UxGT("Μικρό βήμα Ζ"); + LSTR MSG_BABYSTEP_Z = _UxGT("Μικρό βήμα Z"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Ματαίωση endstop "); LSTR MSG_ERR_HEATING_FAILED = _UxGT("Ανεπιτυχής θέρμανση"); - LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Λάθος: ΠΛΕΟΝΑΖΟΥΣΑ ΘΕΡΜΟΤΗΤΑ"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Λάθος: ΠΛΕΟΝΑZΟΥΣΑ ΘΕΡΜΟΤΗΤΑ"); LSTR MSG_ERR_THERMAL_RUNAWAY = _UxGT("ΔΙΑΦΥΓΗ ΘΕΡΜΟΤΗΤΑΣ"); LSTR MSG_ERR_MAXTEMP = _UxGT("Λάθος: ΜΕΓΙΣΤΗ ΘΕΡΜΟΤΗΤΑ"); LSTR MSG_ERR_MINTEMP = _UxGT("Λάθος: ΕΛΑΧΙΣΤΗ ΘΕΡΜΟΤΗΤΑ"); diff --git a/firmware/Marlin/src/lcd/language/language_en.h b/firmware/Marlin/src/lcd/language/language_en.h index 286c386..71a7a68 100644 --- a/firmware/Marlin/src/lcd/language/language_en.h +++ b/firmware/Marlin/src/lcd/language/language_en.h @@ -99,9 +99,11 @@ namespace LanguageNarrow_en { LSTR MSG_ENDSTOP_TEST = _UxGT("Endstop Test"); LSTR MSG_Z_PROBE = _UxGT("Z Probe"); LSTR MSG_HOMING = _UxGT("Homing"); + LSTR MSG_HOMING_FEEDRATE = _UxGT("Homing Feedrate"); + LSTR MSG_HOMING_FEEDRATE_N = _UxGT("@ Homing FR"); LSTR MSG_AUTO_HOME = _UxGT("Auto Home"); LSTR MSG_HOME_ALL = _UxGT("Home All"); - LSTR MSG_AUTO_HOME_A = _UxGT("Home @"); + LSTR MSG_AUTO_HOME_N = _UxGT("Home @"); LSTR MSG_AUTO_HOME_X = _UxGT("Home X"); LSTR MSG_AUTO_HOME_Y = _UxGT("Home Y"); LSTR MSG_AUTO_HOME_Z = _UxGT("Home Z"); @@ -181,6 +183,7 @@ namespace LanguageNarrow_en { LSTR MSG_EXTRUDE = _UxGT("Extrude"); LSTR MSG_RETRACT = _UxGT("Retract"); LSTR MSG_MOVE_AXIS = _UxGT("Move Axis"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Probe and Level"); LSTR MSG_BED_LEVELING = _UxGT("Bed Leveling"); LSTR MSG_LEVEL_BED = _UxGT("Level Bed"); LSTR MSG_BED_TRAMMING = _UxGT("Bed Tramming"); @@ -226,7 +229,7 @@ namespace LanguageNarrow_en { LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Full Control"); LSTR MSG_IDEX_DUPE_GAP = _UxGT("Duplicate X-Gap"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2nd Nozzle Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2nd Nozzle @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2nd Nozzle @"); LSTR MSG_UBL_DOING_G29 = _UxGT("Doing G29"); LSTR MSG_UBL_TOOLS = _UxGT("UBL Tools"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Tilting Point"); @@ -239,13 +242,10 @@ namespace LanguageNarrow_en { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Measure"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Remove & Measure Bed"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Moving to next"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Activate UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Deactivate UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Bed Temp"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bed Temp"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Hotend Temp"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend Temp"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Mesh Edit"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edit Custom Mesh"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Fine Tuning Mesh"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Done Editing Mesh"); @@ -310,7 +310,8 @@ namespace LanguageNarrow_en { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Save Bed Mesh"); LSTR MSG_LED_CONTROL = _UxGT("LED Control"); - LSTR MSG_LEDS = _UxGT("Lights"); + LSTR MSG_LIGHTS = _UxGT("Lights"); + LSTR MSG_LIGHT_N = _UxGT("Light #{"); LSTR MSG_LED_PRESETS = _UxGT("Light Presets"); LSTR MSG_SET_LEDS_RED = _UxGT("Red"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange"); @@ -322,7 +323,6 @@ namespace LanguageNarrow_en { LSTR MSG_SET_LEDS_WHITE = _UxGT("White"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Default"); LSTR MSG_LED_CHANNEL_N = _UxGT("Channel {"); - LSTR MSG_LEDS2 = _UxGT("Lights #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Light #2 Presets"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Brightness"); LSTR MSG_CUSTOM_LEDS = _UxGT("Custom Lights"); @@ -331,6 +331,8 @@ namespace LanguageNarrow_en { LSTR MSG_INTENSITY_B = _UxGT("Blue Intensity"); LSTR MSG_INTENSITY_W = _UxGT("White Intensity"); LSTR MSG_LED_BRIGHTNESS = _UxGT("Brightness"); + LSTR MSG_LIGHT_ENCODER = _UxGT("Encoder Light"); + LSTR MSG_LIGHT_ENCODER_PRESETS = _UxGT("Encoder Light Presets"); LSTR MSG_MOVING = _UxGT("Moving..."); LSTR MSG_FREE_XY = _UxGT("Free XY"); @@ -447,10 +449,10 @@ namespace LanguageNarrow_en { LSTR MSG_A_RETRACT = _UxGT("Retract Accel"); LSTR MSG_A_TRAVEL = _UxGT("Travel Accel"); LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping"); - LSTR MSG_SHAPING_ENABLE = _UxGT("Enable @ shaping"); - LSTR MSG_SHAPING_DISABLE = _UxGT("Disable @ shaping"); - LSTR MSG_SHAPING_FREQ = _UxGT("@ frequency"); - LSTR MSG_SHAPING_ZETA = _UxGT("@ damping"); + LSTR MSG_SHAPING_ENABLE_N = _UxGT("Enable @ shaping"); + LSTR MSG_SHAPING_DISABLE_N = _UxGT("Disable @ shaping"); + LSTR MSG_SHAPING_FREQ_N = _UxGT("@ frequency"); + LSTR MSG_SHAPING_ZETA_N = _UxGT("@ damping"); LSTR MSG_SHAPING_A_FREQ = STR_A _UxGT(" frequency"); // ProUI LSTR MSG_SHAPING_B_FREQ = STR_B _UxGT(" frequency"); // ProUI LSTR MSG_SHAPING_C_FREQ = STR_C _UxGT(" frequency"); // ProUI @@ -496,6 +498,7 @@ namespace LanguageNarrow_en { LSTR MSG_LOAD_EEPROM = _UxGT("Load Settings"); LSTR MSG_RESTORE_DEFAULTS = _UxGT("Restore Defaults"); LSTR MSG_INIT_EEPROM = _UxGT("Initialize EEPROM"); + LSTR MSG_EEPROM_INITIALIZED = _UxGT("EEPROM Initialized"); 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"); @@ -639,9 +642,11 @@ namespace LanguageNarrow_en { LSTR MSG_ZPROBE_XOFFSET = _UxGT("Probe X Offset"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Probe Y Offset"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Probe Z Offset"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Probe @ Offset"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Babystep Probe Z"); LSTR MSG_ZPROBE_MARGIN = _UxGT("Probe Margin"); LSTR MSG_ZOFFSET = _UxGT("Z Offset"); - LSTR MSG_Z_FEED_RATE = _UxGT("Z Feed Rate"); + LSTR MSG_Z_FEED_RATE = _UxGT("Z Feedrate"); LSTR MSG_ENABLE_HS_MODE = _UxGT("Enable HS mode"); LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Move Nozzle to Bed"); LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); @@ -711,22 +716,6 @@ namespace LanguageNarrow_en { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Light Brightness"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("INCORRECT PRINTER"); - LSTR MSG_COLORS_GET = _UxGT("Get Color"); // ProUI - LSTR MSG_COLORS_SELECT = _UxGT("Select Colors"); // ProUI - LSTR MSG_COLORS_APPLIED = _UxGT("Colors applied"); // ProUI - LSTR MSG_COLORS_RED = _UxGT("Red"); // ProUI / JyersUI - LSTR MSG_COLORS_GREEN = _UxGT("Green"); // ProUI / JyersUI - LSTR MSG_COLORS_BLUE = _UxGT("Blue"); // ProUI / JyersUI - LSTR MSG_COLORS_WHITE = _UxGT("White"); // ProUI - LSTR MSG_UI_LANGUAGE = _UxGT("UI Language"); // ProUI - LSTR MSG_SOUND_ENABLE = _UxGT("Enable sound"); // ProUI - LSTR MSG_LOCKSCREEN = _UxGT("Lock Screen"); // ProUI - LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Printer is Locked,"); // ProUI - LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Scroll to unlock."); // ProUI - LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Please wait for reboot."); // ProUI - LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No Media"); // ProUI - LSTR MSG_PLEASE_PREHEAT = _UxGT("Please Preheat"); // ProUI - LSTR MSG_INFO_PRINT_COUNT = _UxGT("Prints"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Total"); LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Longest"); @@ -757,6 +746,24 @@ namespace LanguageNarrow_en { LSTR MSG_KILL_HOMING_FAILED = _UxGT("Homing Failed"); LSTR MSG_LCD_PROBING_FAILED = _UxGT("Probing Failed"); + // Ender-3 V2 DWIN - ProUI / JyersUI + LSTR MSG_COLORS_GET = _UxGT("Get Color"); // ProUI + LSTR MSG_COLORS_SELECT = _UxGT("Select Colors"); // ProUI + LSTR MSG_COLORS_APPLIED = _UxGT("Colors applied"); // ProUI + LSTR MSG_COLORS_RED = _UxGT("Red"); // ProUI / JyersUI + LSTR MSG_COLORS_GREEN = _UxGT("Green"); // ProUI / JyersUI + LSTR MSG_COLORS_BLUE = _UxGT("Blue"); // ProUI / JyersUI + LSTR MSG_COLORS_WHITE = _UxGT("White"); // ProUI + LSTR MSG_UI_LANGUAGE = _UxGT("UI Language"); // ProUI + LSTR MSG_SOUND_ENABLE = _UxGT("Enable sound"); // ProUI + LSTR MSG_LOCKSCREEN = _UxGT("Lock Screen"); // ProUI + LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Printer is Locked,"); // ProUI + LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Scroll to unlock."); // ProUI + LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Please wait for reboot."); // ProUI + LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No Media"); // ProUI + LSTR MSG_PLEASE_PREHEAT = _UxGT("Please Preheat"); // ProUI + + // Prusa MMU 2 LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("CHOOSE FILAMENT"); LSTR MSG_MMU2_MENU = _UxGT("MMU"); LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Update MMU Firmware!"); @@ -788,9 +795,7 @@ namespace LanguageNarrow_en { LSTR MSG_MMU_CUTTER_MODE_ENABLE = _UxGT("Enable"); LSTR MSG_MMU_CUTTER_MODE_ALWAYS = _UxGT("Always"); LSTR MSG_MMU_SPOOL_JOIN = _UxGT("Spool Join"); - LSTR MSG_MMU_STEALTH = _UxGT("Stealth Mode"); - LSTR MSG_MMU_FAIL_STATS = _UxGT("Fail stats"); LSTR MSG_MMU_STATISTICS = _UxGT("Statistics"); LSTR MSG_MMU_RESET_FAIL_STATS = _UxGT("Reset Fail Stats"); LSTR MSG_MMU_RESET_STATS = _UxGT("Reset All Stats"); @@ -807,6 +812,7 @@ namespace LanguageNarrow_en { LSTR MSG_MMU_POWER_FAILS = _UxGT("MMU power fails"); LSTR MSG_MMU_MATERIAL_CHANGES = _UxGT("Material changes"); + // Mixing Extruder (e.g., Geeetech A10M / A20M) LSTR MSG_MIX = _UxGT("Mix"); LSTR MSG_MIX_COMPONENT_N = _UxGT("Component {"); LSTR MSG_MIXER = _UxGT("Mixer"); @@ -826,15 +832,18 @@ namespace LanguageNarrow_en { LSTR MSG_START_Z = _UxGT("Start Z:"); LSTR MSG_END_Z = _UxGT(" End Z:"); + // Games Menu LSTR MSG_GAMES = _UxGT("Games"); LSTR MSG_BRICKOUT = _UxGT("Brickout"); LSTR MSG_INVADERS = _UxGT("Invaders"); LSTR MSG_SNAKE = _UxGT("Sn4k3"); LSTR MSG_MAZE = _UxGT("Maze"); + // Direct Stepping LSTR MSG_BAD_PAGE = _UxGT("Bad page index"); LSTR MSG_BAD_PAGE_SPEED = _UxGT("Bad page speed"); + // Password Lock LSTR MSG_EDIT_PASSWORD = _UxGT("Edit Password"); LSTR MSG_LOGIN_REQUIRED = _UxGT("Login Required"); LSTR MSG_PASSWORD_SETTINGS = _UxGT("Password Settings"); @@ -1036,156 +1045,16 @@ namespace LanguageNarrow_en { LSTR MSG_BTN_DISABLE_MMU = _UxGT("Disable"); LSTR MSG_BTN_MORE = _UxGT("More Info"); - LSTR MSG_ALWAYS = _UxGT("Always"); - LSTR MSG_BABYSTEP_Z_NOT_SET = _UxGT("Distance between tip of the nozzle and the bed surface has not been set yet. Please follow the manual, chapter First steps, section First layer calibration."); - LSTR MSG_BED_DONE = _UxGT("Bed done"); - LSTR MSG_BED_LEVELING_FAILED_POINT_LOW = _UxGT("Bed leveling failed. Sensor didn't trigger. Debris on nozzle? Waiting for reset."); - LSTR MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED = _UxGT("XYZ calibration failed. Please consult the manual."); - LSTR MSG_BELT_STATUS = _UxGT("Belt status"); - LSTR MSG_CANCEL = _UxGT(">Cancel"); - LSTR MSG_CALIBRATE_Z_AUTO = _UxGT("Calibrating Z"); - LSTR MSG_CARD_MENU = _UxGT("Print from SD"); - LSTR MSG_CHECKING_X = _UxGT("Checking X axis"); - LSTR MSG_CHECKING_Y = _UxGT("Checking Y axis"); - LSTR MSG_COMMUNITY_MADE = _UxGT("Community made"); - LSTR MSG_CONFIRM_NOZZLE_CLEAN = _UxGT("Please clean the nozzle for calibration. Click when done."); - LSTR MSG_CRASH = _UxGT("Crash"); - LSTR MSG_CRASH_DETECTED = _UxGT("Crash detected."); - LSTR MSG_CRASHDETECT = _UxGT("Crash det."); + // Prusa MMU LSTR MSG_DONE = _UxGT("Done"); - LSTR MSG_EXTRUDER = _UxGT("Extruder"); - LSTR MSG_FANS_CHECK = _UxGT("Fans check"); - LSTR MSG_FIL_RUNOUTS = _UxGT("Fil. runouts"); - LSTR MSG_HOTEND_FAN_SPEED = _UxGT("Hotend fan:"); - LSTR MSG_PRINT_FAN_SPEED = _UxGT("Print fan:"); - LSTR MSG_FILAMENT_CLEAN = _UxGT("Filament extruding & with correct color?"); - LSTR MSG_FILAMENT_LOADED = _UxGT("Is filament loaded?"); - LSTR MSG_FIND_BED_OFFSET_AND_SKEW_LINE1 = _UxGT("Searching bed calibration point"); LSTR MSG_FINISHING_MOVEMENTS = _UxGT("Finishing movements"); - LSTR MSG_FOLLOW_CALIBRATION_FLOW = _UxGT("Printer has not been calibrated yet. Please follow the manual, chapter First steps, section Calibration flow."); - LSTR MSG_FOLLOW_Z_CALIBRATION_FLOW = _UxGT("There is still a need to make Z calibration. Please follow the manual, chapter First steps, section Calibration flow."); - LSTR MSG_FSENSOR_RUNOUT = _UxGT("F. runout"); - LSTR MSG_FSENSOR_AUTOLOAD = _UxGT("F. autoload"); - LSTR MSG_FSENSOR_JAM_DETECTION = _UxGT("F. jam detect"); - LSTR MSG_FSENSOR = _UxGT("Fil. sensor"); - LSTR MSG_HEATING_COMPLETE = _UxGT("Heating done."); - LSTR MSG_HOMEYZ = _UxGT("Calibrate Z"); - LSTR MSG_SELECT_FILAMENT = _UxGT("Select filament:"); - LSTR MSG_LAST_PRINT = _UxGT("Last print"); - LSTR MSG_LAST_PRINT_FAILURES = _UxGT("Last print failures"); - LSTR MSG_PRELOAD_TO_MMU = _UxGT("Preload to MMU"); - LSTR MSG_LOAD_FILAMENT = _UxGT("Load filament"); - LSTR MSG_LOADING_TEST = _UxGT("Loading Test"); LSTR MSG_LOADING_FILAMENT = _UxGT("Loading filament"); + LSTR MSG_UNLOADING_FILAMENT = _UxGT("Unloading filament"); LSTR MSG_TESTING_FILAMENT = _UxGT("Testing filament"); LSTR MSG_EJECT_FROM_MMU = _UxGT("Eject from MMU"); LSTR MSG_CUT_FILAMENT = _UxGT("Cut filament"); - LSTR MSG_SHEET = _UxGT("Sheet"); - LSTR MSG_STEEL_SHEETS = _UxGT("Steel sheets"); - LSTR MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE1 = _UxGT("Measuring reference height of calibration point"); - LSTR MSG_CALIBRATION = _UxGT("Calibration"); - LSTR MSG_PAPER = _UxGT("Place a sheet of paper under the nozzle during the calibration of first 4 points. If the nozzle catches the paper, power off the printer immediately."); - LSTR MSG_PLACE_STEEL_SHEET = _UxGT("Please place steel sheet on heatbed."); - LSTR MSG_POWER_FAILURES = _UxGT("Power failures"); - LSTR MSG_PREHEAT_NOZZLE = _UxGT("Preheat the nozzle!"); - LSTR MSG_PRESS_TO_UNLOAD = _UxGT("Please press the knob to unload filament"); - LSTR MSG_PULL_OUT_FILAMENT = _UxGT("Please pull out filament immediately"); - LSTR MSG_RECOVER_PRINT = _UxGT("Blackout occurred. Recover print?"); - LSTR MSG_REMOVE_STEEL_SHEET = _UxGT("Please remove steel sheet from heatbed."); - LSTR MSG_RESET = _UxGT("Reset"); - LSTR MSG_RESUMING_PRINT = _UxGT("Resuming print"); - LSTR MSG_SELFTEST_PART_FAN = _UxGT("Front print fan?"); - LSTR MSG_SELFTEST_HOTEND_FAN = _UxGT("Left hotend fan?"); - LSTR MSG_SELFTEST_FAILED = _UxGT("Selftest failed"); - LSTR MSG_SELFTEST_FAN = _UxGT("Fan test"); - LSTR MSG_SELFTEST_FAN_NO = _UxGT("Not spinning"); - LSTR MSG_SELFTEST_FAN_YES = _UxGT("Spinning"); - LSTR MSG_SELFTEST_CHECK_BED = _UxGT("Checking bed"); - LSTR MSG_SELFTEST_CHECK_FSENSOR = _UxGT("Checking sensors"); - LSTR MSG_SELFTEST_MOTOR = _UxGT("Motor"); - LSTR MSG_SELFTEST_FILAMENT_SENSOR = _UxGT("Filament sensor"); - LSTR MSG_SELFTEST_WIRINGERROR = _UxGT("Wiring error"); - LSTR MSG_SETTINGS = _UxGT("Settings"); - LSTR MSG_SET_READY = _UxGT("Set Ready"); - LSTR MSG_SET_NOT_READY = _UxGT("Set not Ready"); - LSTR MSG_SELECT_LANGUAGE = _UxGT("Select language"); - LSTR MSG_SORTING_FILES = _UxGT("Sorting files"); - LSTR MSG_TOTAL = _UxGT("Total"); - LSTR MSG_MATERIAL_CHANGES = _UxGT("Material changes"); - LSTR MSG_TOTAL_FAILURES = _UxGT("Total failures"); - LSTR MSG_HW_SETUP = _UxGT("HW Setup"); - LSTR MSG_MODE = _UxGT("Mode"); - LSTR MSG_HIGH_POWER = _UxGT("High power"); - LSTR MSG_AUTO_POWER = _UxGT("Auto power"); - LSTR MSG_SILENT = _UxGT("Silent"); - LSTR MSG_NORMAL = _UxGT("Normal"); - LSTR MSG_STEALTH = _UxGT("Stealth"); - LSTR MSG_STEEL_SHEET_CHECK = _UxGT("Is steel sheet on heatbed?"); - LSTR MSG_PINDA_CALIBRATION = _UxGT("PINDA cal."); - LSTR MSG_PINDA_CALIBRATION_DONE = _UxGT("PINDA calibration is finished and active. It can be disabled in menu Settings->PINDA cal."); - LSTR MSG_UNLOAD_FILAMENT = _UxGT("Unload filament"); - LSTR MSG_UNLOADING_FILAMENT = _UxGT("Unloading filament"); - LSTR MSG_WIZARD_CALIBRATION_FAILED = _UxGT("Please check our handbook and fix the problem. Then resume the Wizard by rebooting the printer."); - LSTR MSG_WIZARD_DONE = _UxGT("All done. Happy printing!"); - LSTR MSG_WIZARD_HEATING = _UxGT("Preheating nozzle. Please wait."); - LSTR MSG_WIZARD_QUIT = _UxGT("You can always resume the Wizard from Calibration -> Wizard."); - LSTR MSG_WIZARD_WELCOME = _UxGT("Hi, I am your Original Prusa i3 printer. Would you like me to guide you through the setup process?"); - LSTR MSG_WIZARD_WELCOME_SHIPPING = _UxGT("Hi, I am your Original Prusa i3 printer. I will guide you through a short setup process, in which the Z-axis will be calibrated. Then, you will be ready to print."); - LSTR MSG_V2_CALIBRATION = _UxGT("First layer cal."); LSTR MSG_OFF = _UxGT("Off"); LSTR MSG_ON = _UxGT("On"); - LSTR MSG_NA = _UxGT("N/A"); - LSTR MSG_NONE = _UxGT("None"); - LSTR MSG_WARN = _UxGT("Warn"); - LSTR MSG_STRICT = _UxGT("Strict"); - LSTR MSG_MODEL = _UxGT("Model"); - LSTR MSG_GCODE_DIFF_PRINTER_CONTINUE = _UxGT("G-code sliced for a different printer type. Continue?"); - LSTR MSG_GCODE_DIFF_PRINTER_CANCELLED = _UxGT("G-code sliced for a different printer type. Please re-slice the model again. Print cancelled."); - LSTR MSG_GCODE_NEWER_FIRMWARE_CONTINUE = _UxGT("G-code sliced for a newer firmware. Continue?"); - LSTR MSG_GCODE_NEWER_FIRMWARE_CANCELLED = _UxGT("G-code sliced for a newer firmware. Please update the firmware. Print cancelled."); - LSTR MSG_GCODE_DIFF_CONTINUE = _UxGT("G-code sliced for a different level. Continue?"); - LSTR MSG_GCODE_DIFF_CANCELLED = _UxGT("G-code sliced for a different level. Please re-slice the model again. Print cancelled."); - LSTR MSG_NOZZLE_DIFFERS_CONTINUE = _UxGT("Nozzle diameter differs from the G-code. Continue?"); - LSTR MSG_NOZZLE_DIFFERS_CANCELLED = _UxGT("Nozzle diameter differs from the G-code. Please check the value in settings. Print cancelled."); - LSTR MSG_NOZZLE_DIAMETER = _UxGT("Nozzle d."); - LSTR MSG_MMU_MODE = _UxGT("MMU Mode"); - LSTR MSG_SORT = _UxGT("Sort"); - LSTR MSG_SORT_TIME = _UxGT("Time"); - LSTR MSG_SORT_ALPHA = _UxGT("Alphabet"); - LSTR MSG_RPI_PORT = _UxGT("RPi port"); - LSTR MSG_SOUND_LOUD = _UxGT("Loud"); - LSTR MSG_SOUND_ONCE = _UxGT("Once"); - LSTR MSG_SOUND_BLIND = _UxGT("Assist"); - LSTR MSG_MESH = _UxGT("Mesh"); - LSTR MSG_MESH_BED_LEVELING = _UxGT("Mesh Bed Leveling"); - LSTR MSG_Z_PROBE_NR = _UxGT("Z-probe nr."); - LSTR MSG_MAGNETS_COMP = _UxGT("Magnets comp."); - LSTR MSG_FS_ACTION = _UxGT("FS Action"); - LSTR MSG_CONTINUE_SHORT = _UxGT("Cont."); - LSTR MSG_PAUSE = _UxGT("Pause"); - LSTR MSG_BL_HIGH = _UxGT("Level Bright"); - LSTR MSG_BL_LOW = _UxGT("Level Dimmed"); - LSTR MSG_BRIGHT = _UxGT("Bright"); - LSTR MSG_DIM = _UxGT("Dim"); - LSTR MSG_AUTO = _UxGT("Auto"); - #if FILAMENT_SENSOR_TYPE == FSENSOR_IR_ANALOG - // Beware - The space at the beginning is necessary since it is reused in LCD menu items which are to be with a space - LSTR MSG_IR_04_OR_NEWER = _UxGT(" 0.4 or newer"); - LSTR MSG_IR_03_OR_OLDER = _UxGT(" 0.3 or older"); - LSTR MSG_IR_UNKNOWN = _UxGT("unknown state"); - #endif - LSTR MSG_PAUSED_THERMAL_ERROR = _UxGT("PAUSED THERMAL ERROR"); - #if ENABLED(THERMAL_MODEL) - LSTR MSG_THERMAL_ANOMALY = _UxGT("THERMAL ANOMALY"); - LSTR MSG_TM_NOT_CAL = _UxGT("Thermal model not calibrated yet."); - LSTR MSG_TM_ACK_ERROR = _UxGT("Clear TM error"); - #endif - LSTR MSG_LOAD_ALL = _UxGT("Load All"); - LSTR MSG_NOZZLE_CNG_MENU = _UxGT("Nozzle change"); - LSTR MSG_NOZZLE_CNG_READ_HELP = _UxGT("For a Nozzle change please read\nprusa.io/nozzle-mk3s"); - LSTR MSG_NOZZLE_CNG_CHANGED = _UxGT("Hotend at 280C! Nozzle changed and tightened to specs?"); - LSTR MSG_REPRINT = _UxGT("Reprint"); - LSTR MSG_PROGRESS_OK = _UxGT("OK"); LSTR MSG_PROGRESS_ENGAGE_IDLER = _UxGT("Engaging idler"); LSTR MSG_PROGRESS_DISENGAGE_IDLER = _UxGT("Disengaging idler"); @@ -1231,6 +1100,11 @@ namespace LanguageWide_en { LSTR MSG_INFO_PRINT_TIME = _UxGT("Print Time"); LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Longest Job Time"); LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruded Total"); + LSTR MSG_HOMING_FEEDRATE_N = _UxGT("@ Homing Feedrate"); + LSTR MSG_HOMING_FEEDRATE_X = _UxGT("X Homing Feedrate"); + LSTR MSG_HOMING_FEEDRATE_Y = _UxGT("Y Homing Feedrate"); + LSTR MSG_HOMING_FEEDRATE_Z = _UxGT("Z Homing Feedrate"); + LSTR MSG_EEPROM_INITIALIZED = _UxGT("Default Settings Restored"); #endif } diff --git a/firmware/Marlin/src/lcd/language/language_es.h b/firmware/Marlin/src/lcd/language/language_es.h index 5bee09b..5863b63 100644 --- a/firmware/Marlin/src/lcd/language/language_es.h +++ b/firmware/Marlin/src/lcd/language/language_es.h @@ -102,6 +102,7 @@ namespace LanguageNarrow_es { LSTR MSG_EXTRUDE = _UxGT("Extruir"); LSTR MSG_RETRACT = _UxGT("Retraer"); LSTR MSG_MOVE_AXIS = _UxGT("Mover ejes"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Sondear y Nivelar"); LSTR MSG_BED_LEVELING = _UxGT("Nivelando Cama"); LSTR MSG_LEVEL_BED = _UxGT("Nivelar Cama"); LSTR MSG_BED_TRAMMING = _UxGT("Recorrido Cama"); @@ -124,7 +125,7 @@ namespace LanguageNarrow_es { LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Copia Reflejada"); LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Control Total"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2ª Fusor Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2ª Fusor @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2ª Fusor @"); LSTR MSG_UBL_DOING_G29 = _UxGT("Hacer G29"); LSTR MSG_UBL_TOOLS = _UxGT("Herramientas UBL"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Punto de inclinación"); @@ -133,13 +134,10 @@ namespace LanguageNarrow_es { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Medir"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Retirar y Medir Cama"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Mover al Siguente"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Activar UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Desactivar UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temp. Cama"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp. Cama perso."); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp. Fusor"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp. Fusor perso."); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Editar Mallado"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edit. Mallado perso."); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Ajuste fino Mallado"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Term. edici. Mallado"); @@ -200,7 +198,8 @@ namespace LanguageNarrow_es { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Guardar Mall. cama"); LSTR MSG_LED_CONTROL = _UxGT("Control LED"); - LSTR MSG_LEDS = _UxGT("LEDS"); + LSTR MSG_LIGHTS = _UxGT("Luces"); + LSTR MSG_LIGHT_N = _UxGT("Luce #{"); LSTR MSG_LED_PRESETS = _UxGT("Color predefinido"); LSTR MSG_SET_LEDS_RED = _UxGT("Rojo"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Naranja"); @@ -397,6 +396,8 @@ namespace LanguageNarrow_es { LSTR MSG_ZPROBE_XOFFSET = _UxGT("Desf. Sonda X"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Desf. Sonda Y"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Desf. Sonda Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Desf. Sonda @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Ajuste Z al paso"); LSTR MSG_BABYSTEP_X = _UxGT("Micropaso X"); LSTR MSG_BABYSTEP_Y = _UxGT("Micropaso Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Micropaso Z"); diff --git a/firmware/Marlin/src/lcd/language/language_eu.h b/firmware/Marlin/src/lcd/language/language_eu.h index 1c2cf8f..2e49cf5 100644 --- a/firmware/Marlin/src/lcd/language/language_eu.h +++ b/firmware/Marlin/src/lcd/language/language_eu.h @@ -79,6 +79,7 @@ namespace LanguageNarrow_eu { LSTR MSG_EXTRUDE = _UxGT("Estruitu"); LSTR MSG_RETRACT = _UxGT("Atzera eragin"); LSTR MSG_MOVE_AXIS = _UxGT("Ardatzak mugitu"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Proba eta Berdindu"); LSTR MSG_BED_LEVELING = _UxGT("Ohe berdinketa"); LSTR MSG_LEVEL_BED = _UxGT("Ohea berdindu"); LSTR MSG_BED_TRAMMING = _UxGT("Ertzak berdindu"); @@ -89,13 +90,10 @@ namespace LanguageNarrow_eu { LSTR MSG_UBL_TOOLS = _UxGT("UBL Tresnak"); LSTR MSG_UBL_MANUAL_MESH = _UxGT("Sarea eskuz sortu"); LSTR MSG_UBL_BC_INSERT2 = _UxGT("Neurtu"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("UBL aktibatu"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL desaktibatu"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Ohearen tenperatura"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bed Temp"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Mutur beroaren tenp."); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend Temp"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Sarea editatu"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Sarea editatzea eginda"); LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Sarea sortu"); LSTR MSG_UBL_BUILD_MESH_M = _UxGT("$ sarea sortu"); @@ -110,7 +108,8 @@ namespace LanguageNarrow_eu { LSTR MSG_UBL_MESH_LEVEL = _UxGT("Sarea berdindu"); LSTR MSG_UBL_MAP_TYPE = _UxGT("Mapa mota"); LSTR MSG_LED_CONTROL = _UxGT("LED ezarpenak"); - LSTR MSG_LEDS = _UxGT("Argiak"); + LSTR MSG_LIGHTS = _UxGT("Argiak"); + LSTR MSG_LIGHT_N = _UxGT("Argi #{"); LSTR MSG_LED_PRESETS = _UxGT("Argi aurrehautaketak"); LSTR MSG_SET_LEDS_RED = _UxGT("Gorria"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Laranja"); @@ -230,7 +229,11 @@ namespace LanguageNarrow_eu { LSTR MSG_BLTOUCH_DEPLOY = _UxGT("BLTouch jaitsi/luzatu"); LSTR MSG_BLTOUCH_STOW = _UxGT("BLTouch igo/jaso"); LSTR MSG_HOME_FIRST = _UxGT("Etxera %s lehenengo"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("X Konpentsatu"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y Konpentsatu"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Konpentsatu"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("@ Konpentsatu"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Z pausoz egokitu"); LSTR MSG_BABYSTEP_X = _UxGT("Mikro-urratsa X"); LSTR MSG_BABYSTEP_Y = _UxGT("Mikro-urratsa Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Mikro-urratsa Z"); diff --git a/firmware/Marlin/src/lcd/language/language_fi.h b/firmware/Marlin/src/lcd/language/language_fi.h index 75afc82..e6de936 100644 --- a/firmware/Marlin/src/lcd/language/language_fi.h +++ b/firmware/Marlin/src/lcd/language/language_fi.h @@ -66,6 +66,8 @@ namespace LanguageNarrow_fi { LSTR MSG_EXTRUDE = _UxGT("Pursota"); LSTR MSG_RETRACT = _UxGT("Vedä takaisin"); LSTR MSG_MOVE_AXIS = _UxGT("Liikuta akseleita"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Tutki ja tasoita"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Säädä Z askeltamalla"); LSTR MSG_MOVE_X = _UxGT("Liikuta X"); LSTR MSG_MOVE_Y = _UxGT("Liikuta Y"); LSTR MSG_MOVE_Z = _UxGT("Liikuta Z"); diff --git a/firmware/Marlin/src/lcd/language/language_fr.h b/firmware/Marlin/src/lcd/language/language_fr.h index 029e974..1693633 100644 --- a/firmware/Marlin/src/lcd/language/language_fr.h +++ b/firmware/Marlin/src/lcd/language/language_fr.h @@ -58,7 +58,7 @@ namespace LanguageNarrow_fr { LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test barre progress."); LSTR MSG_HOMING = _UxGT("Origine"); LSTR MSG_AUTO_HOME = _UxGT("Origine auto"); - LSTR MSG_AUTO_HOME_A = _UxGT("Origine @ auto"); + LSTR MSG_AUTO_HOME_N = _UxGT("Origine @ auto"); LSTR MSG_AUTO_HOME_X = _UxGT("Origine X auto"); LSTR MSG_AUTO_HOME_Y = _UxGT("Origine Y auto"); LSTR MSG_AUTO_HOME_Z = _UxGT("Origine Z auto"); @@ -103,6 +103,7 @@ namespace LanguageNarrow_fr { LSTR MSG_EXTRUDE = _UxGT("Extrusion"); LSTR MSG_RETRACT = _UxGT("Rétractation"); LSTR MSG_MOVE_AXIS = _UxGT("Déplacer un axe"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Mesure et Niv."); LSTR MSG_BED_LEVELING = _UxGT("Régler Niv. lit"); LSTR MSG_LEVEL_BED = _UxGT("Niveau du lit"); LSTR MSG_BED_TRAMMING = _UxGT("Niveau des coins"); @@ -129,7 +130,7 @@ namespace LanguageNarrow_fr { LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Contrôle complet"); LSTR MSG_OFFSETS_MENU = _UxGT("Offsets Outil"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("Buse 2 Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("Buse 2 @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("Buse 2 @"); LSTR MSG_G26_HEATING_BED = _UxGT("G26: Chauffage du lit"); LSTR MSG_G26_HEATING_NOZZLE = _UxGT("Buse en chauffe..."); LSTR MSG_G26_MANUAL_PRIME = _UxGT("Amorce manuelle..."); @@ -144,13 +145,10 @@ namespace LanguageNarrow_fr { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Mesure"); LSTR MSG_UBL_BC_REMOVE = _UxGT("ôter et mesurer lit"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Aller au suivant"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Activer l'UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Désactiver l'UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Température lit"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Température lit"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Température buse"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Température buse"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Modifier grille"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Modif. grille perso"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Réglage fin"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Terminer"); @@ -204,7 +202,8 @@ namespace LanguageNarrow_fr { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Stocker grille"); LSTR MSG_LED_CONTROL = _UxGT("Contrôle LED"); - LSTR MSG_LEDS = _UxGT("Lumière"); + LSTR MSG_LIGHTS = _UxGT("Lumière"); + LSTR MSG_LIGHT_N = _UxGT("Lumière #{"); LSTR MSG_LED_PRESETS = _UxGT("Préregl. LED"); LSTR MSG_SET_LEDS_RED = _UxGT("Rouge"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange"); @@ -422,6 +421,8 @@ namespace LanguageNarrow_fr { LSTR MSG_ZPROBE_XOFFSET = _UxGT("Décalage X"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Décalage Y"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Décalage Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Décalage @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Babystep sonde Z"); LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Babystep Z"); diff --git a/firmware/Marlin/src/lcd/language/language_fr_na.h b/firmware/Marlin/src/lcd/language/language_fr_na.h index 8fb7b68..a2c5f02 100644 --- a/firmware/Marlin/src/lcd/language/language_fr_na.h +++ b/firmware/Marlin/src/lcd/language/language_fr_na.h @@ -58,7 +58,7 @@ namespace LanguageNarrow_fr_na { LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test barre progress."); LSTR MSG_HOMING = _UxGT("Origine"); LSTR MSG_AUTO_HOME = _UxGT("Origine auto"); - LSTR MSG_AUTO_HOME_A = _UxGT("Origine @ auto"); + LSTR MSG_AUTO_HOME_N = _UxGT("Origine @ auto"); LSTR MSG_AUTO_HOME_X = _UxGT("Origine X auto"); LSTR MSG_AUTO_HOME_Y = _UxGT("Origine Y auto"); LSTR MSG_AUTO_HOME_Z = _UxGT("Origine Z auto"); @@ -103,6 +103,7 @@ namespace LanguageNarrow_fr_na { LSTR MSG_EXTRUDE = _UxGT("Extrusion"); LSTR MSG_RETRACT = _UxGT("Retractation"); LSTR MSG_MOVE_AXIS = _UxGT("Deplacer un axe"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Calibrage auto"); LSTR MSG_BED_LEVELING = _UxGT("Regler Niv. lit"); LSTR MSG_LEVEL_BED = _UxGT("Niveau du lit"); LSTR MSG_BED_TRAMMING = _UxGT("Niveau des coins"); @@ -129,7 +130,7 @@ namespace LanguageNarrow_fr_na { LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Controle complet"); LSTR MSG_OFFSETS_MENU = _UxGT("Offsets Outil"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("Buse 2 Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("Buse 2 @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("Buse 2 @"); LSTR MSG_G26_HEATING_BED = _UxGT("G26: Chauffage du lit"); LSTR MSG_G26_HEATING_NOZZLE = _UxGT("Buse en chauffe..."); LSTR MSG_G26_MANUAL_PRIME = _UxGT("Amorce manuelle..."); @@ -144,13 +145,10 @@ namespace LanguageNarrow_fr_na { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Mesure"); LSTR MSG_UBL_BC_REMOVE = _UxGT("oter et mesurer lit"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Aller au suivant"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Activer l'UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Desactiver l'UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temperature lit"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temperature lit"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temperature buse"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temperature buse"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Modifier grille"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Modif. grille perso"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Reglage fin"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Terminer"); @@ -204,7 +202,8 @@ namespace LanguageNarrow_fr_na { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Stocker grille"); LSTR MSG_LED_CONTROL = _UxGT("Controle LED"); - LSTR MSG_LEDS = _UxGT("Lumiere"); + LSTR MSG_LIGHTS = _UxGT("Lumiere"); + LSTR MSG_LIGHT_N = _UxGT("Lumiere #{"); LSTR MSG_LED_PRESETS = _UxGT("Preregl. LED"); LSTR MSG_SET_LEDS_RED = _UxGT("Rouge"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange"); @@ -422,6 +421,8 @@ namespace LanguageNarrow_fr_na { LSTR MSG_ZPROBE_XOFFSET = _UxGT("Decalage X"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Decalage Y"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Decalage Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Decalage @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Babystep sonde Z"); LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Babystep Z"); diff --git a/firmware/Marlin/src/lcd/language/language_gl.h b/firmware/Marlin/src/lcd/language/language_gl.h index ebcf384..dc04f48 100644 --- a/firmware/Marlin/src/lcd/language/language_gl.h +++ b/firmware/Marlin/src/lcd/language/language_gl.h @@ -99,6 +99,7 @@ namespace LanguageNarrow_gl { LSTR MSG_EXTRUDE = _UxGT("Extruír"); LSTR MSG_RETRACT = _UxGT("Retraer"); LSTR MSG_MOVE_AXIS = _UxGT("Mover eixe"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Probar e Nivelar"); LSTR MSG_BED_LEVELING = _UxGT("Nivelando Cama"); LSTR MSG_LEVEL_BED = _UxGT("Nivelar Cama"); LSTR MSG_BED_TRAMMING = _UxGT("Nivelar Cantos"); @@ -121,7 +122,7 @@ namespace LanguageNarrow_gl { LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Copia Espello"); LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Control Total"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2º Bico Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2º Bico @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2º Bico @"); LSTR MSG_UBL_DOING_G29 = _UxGT("Executando G29"); LSTR MSG_UBL_TOOLS = _UxGT("Ferramentas UBL"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Punto de inclinación"); @@ -130,13 +131,10 @@ namespace LanguageNarrow_gl { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Medir"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Quitar e Medir Cama"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Mover ao Seguinte"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Activar UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Desactivar UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temp Cama"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp Cama"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp Bico"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp Bico"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Editar Malla"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edit. Malla Person."); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Axuste Fino da Malla"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Fin Edición da Malla"); @@ -197,7 +195,8 @@ namespace LanguageNarrow_gl { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Gardar Malla Cama"); LSTR MSG_LED_CONTROL = _UxGT("Control LED"); - LSTR MSG_LEDS = _UxGT("Luces"); + LSTR MSG_LIGHTS = _UxGT("Luces"); + LSTR MSG_LIGHT_N = _UxGT("Luce #{"); LSTR MSG_LED_PRESETS = _UxGT("Axustes Luz"); LSTR MSG_SET_LEDS_RED = _UxGT("Vermello"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Laranxa"); @@ -411,7 +410,9 @@ namespace LanguageNarrow_gl { LSTR MSG_ZPROBE_OFFSETS = _UxGT("Desfases Sonda"); LSTR MSG_ZPROBE_XOFFSET = _UxGT("Desfase Sonda X"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Desfase Sonda Y"); - LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Desfase Z"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Desfase Sonda Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Desfase Sonda @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Micropaso Sonda-Z"); LSTR MSG_BABYSTEP_X = _UxGT("Micropaso X"); LSTR MSG_BABYSTEP_Y = _UxGT("Micropaso Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Micropaso Z"); diff --git a/firmware/Marlin/src/lcd/language/language_hr.h b/firmware/Marlin/src/lcd/language/language_hr.h index 68fb062..ced6d3f 100644 --- a/firmware/Marlin/src/lcd/language/language_hr.h +++ b/firmware/Marlin/src/lcd/language/language_hr.h @@ -74,8 +74,10 @@ namespace LanguageNarrow_hr { LSTR MSG_SWITCH_PS_ON = _UxGT("Uključi napajanje"); LSTR MSG_SWITCH_PS_OFF = _UxGT("Isključi napajanje"); LSTR MSG_MOVE_AXIS = _UxGT("Miči os"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Probe i Nivelacija"); LSTR MSG_BED_LEVELING = _UxGT("Niveliraj bed"); LSTR MSG_LEVEL_BED = _UxGT("Niveliraj bed"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Korak Z offset"); LSTR MSG_MOVE_X = _UxGT("Miči X"); LSTR MSG_MOVE_Y = _UxGT("Miči Y"); LSTR MSG_MOVE_Z = _UxGT("Miči Z"); diff --git a/firmware/Marlin/src/lcd/language/language_hu.h b/firmware/Marlin/src/lcd/language/language_hu.h index f7e98ff..fd81dc6 100644 --- a/firmware/Marlin/src/lcd/language/language_hu.h +++ b/firmware/Marlin/src/lcd/language/language_hu.h @@ -62,7 +62,7 @@ namespace LanguageNarrow_hu { LSTR MSG_DEBUG_MENU = _UxGT("Hiba Menü"); LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Haladás sáv teszt"); LSTR MSG_AUTO_HOME = _UxGT("X-Y-Z auto kezdöpont"); - LSTR MSG_AUTO_HOME_A = _UxGT("Kezdö @"); + LSTR MSG_AUTO_HOME_N = _UxGT("Kezdö @"); LSTR MSG_AUTO_HOME_X = _UxGT("X kezdöpont"); LSTR MSG_AUTO_HOME_Y = _UxGT("Y kezdöpont"); LSTR MSG_AUTO_HOME_Z = _UxGT("Z kezdöpont"); @@ -123,6 +123,7 @@ namespace LanguageNarrow_hu { LSTR MSG_EXTRUDE = _UxGT("Adagol"); LSTR MSG_RETRACT = _UxGT("Visszahúz"); LSTR MSG_MOVE_AXIS = _UxGT("Tengelyek mozgatása"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Érintés/szintezés"); LSTR MSG_BED_LEVELING = _UxGT("Ágy szintezés"); LSTR MSG_LEVEL_BED = _UxGT("Ágy szintezése"); LSTR MSG_BED_TRAMMING = _UxGT("Sarok szint"); @@ -151,7 +152,7 @@ namespace LanguageNarrow_hu { LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Teljes felügyelet"); LSTR MSG_IDEX_DUPE_GAP = _UxGT("X-hézag másolása"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2. fej Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2. fej @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2. fej @"); LSTR MSG_UBL_DOING_G29 = _UxGT("Szintezz! G29"); LSTR MSG_UBL_TOOLS = _UxGT("UBL eszköz"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Döntési pont"); @@ -161,13 +162,10 @@ namespace LanguageNarrow_hu { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Mérés"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Üres ágyat mérj"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Továbblépés"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("UBL aktívál"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL deaktívál"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Ágy höfok"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Egyéni ágy höfok"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Fejhöfok"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Egyéni fejhöfok"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Háló szerkesztés"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Egyéni háló szerkesztés"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Finomított háló"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Háló kész"); @@ -228,7 +226,8 @@ namespace LanguageNarrow_hu { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Ágy háló mentése"); LSTR MSG_LED_CONTROL = _UxGT("LED vezérlés"); - LSTR MSG_LEDS = _UxGT("Világítás"); + LSTR MSG_LIGHTS = _UxGT("Világítás"); + LSTR MSG_LIGHT_N = _UxGT("Világítás #{"); LSTR MSG_LED_PRESETS = _UxGT("Beállított színek"); LSTR MSG_SET_LEDS_RED = _UxGT("Piros"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Narancs"); @@ -240,7 +239,6 @@ namespace LanguageNarrow_hu { LSTR MSG_SET_LEDS_WHITE = _UxGT("Fehér"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Alapérték"); LSTR MSG_LED_CHANNEL_N = _UxGT("Csatorna {"); - LSTR MSG_LEDS2 = _UxGT("LED-ek #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Fény #2 megadott"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Fényerö"); LSTR MSG_CUSTOM_LEDS = _UxGT("Egyéni szín"); @@ -463,6 +461,8 @@ namespace LanguageNarrow_hu { LSTR MSG_ZPROBE_XOFFSET = _UxGT("X szonda eltolás"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y szonda eltolás"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z szonda eltolás"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("@ szonda eltolás"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Z lépés állítás"); LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Fej az ágyhoz"); LSTR MSG_BABYSTEP_X = _UxGT("Mikrolépés X"); LSTR MSG_BABYSTEP_Y = _UxGT("Mikrolépés Y"); diff --git a/firmware/Marlin/src/lcd/language/language_it.h b/firmware/Marlin/src/lcd/language/language_it.h index 4d7f1fd..005f0b4 100644 --- a/firmware/Marlin/src/lcd/language/language_it.h +++ b/firmware/Marlin/src/lcd/language/language_it.h @@ -76,12 +76,15 @@ namespace LanguageNarrow_it { LSTR MSG_ENDSTOP_TEST = _UxGT("Test finecorsa"); LSTR MSG_Z_PROBE = _UxGT("Sonda Z"); LSTR MSG_HOMING = _UxGT("Azzeramento"); + LSTR MSG_HOMING_FEEDRATE = _UxGT("Velocità azzeramento"); + LSTR MSG_HOMING_FEEDRATE_N = _UxGT("Vel.azzeram. @"); LSTR MSG_AUTO_HOME = _UxGT("Auto home"); - LSTR MSG_AUTO_HOME_A = _UxGT("Home @"); - 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_HOME_ALL = _UxGT("Azzera tutti"); + LSTR MSG_AUTO_HOME_N = _UxGT("Azzera @"); + LSTR MSG_AUTO_HOME_X = _UxGT("Azzera X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Azzera Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Azzera Z"); + LSTR MSG_Z_AFTER_HOME = _UxGT("Z dopo azzeramento"); LSTR MSG_FILAMENT_SET = _UxGT("Impostaz.filamento"); LSTR MSG_FILAMENT_MAN = _UxGT("Gestione filamento"); LSTR MSG_MANUAL_LEVELING = _UxGT("Livel.manuale"); @@ -119,6 +122,10 @@ namespace LanguageNarrow_it { LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" piatto"); LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" conf"); + LSTR MSG_PREHEAT_2 = _UxGT("Preriscalda ") PREHEAT_2_LABEL; + LSTR MSG_PREHEAT_3 = _UxGT("Preriscalda ") PREHEAT_3_LABEL; + LSTR MSG_PREHEAT_4 = PREHEAT_4_LABEL; + LSTR MSG_PREHEAT_M = _UxGT("Preriscalda $"); LSTR MSG_PREHEAT_M_H = _UxGT("Preriscalda $ ~"); LSTR MSG_PREHEAT_M_END = _UxGT("Preris.$ ugello"); @@ -129,6 +136,7 @@ namespace LanguageNarrow_it { LSTR MSG_PREHEAT_HOTEND = _UxGT("Prerisc.ugello"); LSTR MSG_PREHEAT_CUSTOM = _UxGT("Prerisc.personal."); + LSTR MSG_PREHEAT = _UxGT("Preriscalda"); LSTR MSG_COOLDOWN = _UxGT("Raffredda"); LSTR MSG_CUTTER_FREQUENCY = _UxGT("Frequenza"); @@ -151,6 +159,7 @@ namespace LanguageNarrow_it { LSTR MSG_EXTRUDE = _UxGT("Estrudi"); LSTR MSG_RETRACT = _UxGT("Ritrai"); LSTR MSG_MOVE_AXIS = _UxGT("Muovi asse"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Sonda e livella"); LSTR MSG_BED_LEVELING = _UxGT("Livellamento piatto"); LSTR MSG_LEVEL_BED = _UxGT("Livella piatto"); LSTR MSG_BED_TRAMMING = _UxGT("Tarat.fine piatto"); @@ -181,6 +190,9 @@ namespace LanguageNarrow_it { LSTR MSG_MESH_CANCEL = _UxGT("Mesh cancellata"); LSTR MSG_MESH_RESET = _UxGT("Resetta mesh"); LSTR MSG_CUSTOM_COMMANDS = _UxGT("Comandi personaliz."); + LSTR MSG_CUSTOM_MENU_MAIN_TITLE = _UxGT(CUSTOM_MENU_MAIN_TITLE); + LSTR MSG_TOOL_HEAD_TH = _UxGT(CUSTOM_MENU_MAIN_TITLE" (TH)"); + LSTR MSG_PRESENT_BED = _UxGT("Piatto presente"); LSTR MSG_M48_TEST = _UxGT("Test sonda M48"); LSTR MSG_M48_POINT = _UxGT("Punto M48"); LSTR MSG_M48_OUT_OF_BOUNDS = _UxGT("Sonda oltre i limiti"); @@ -193,7 +205,7 @@ namespace LanguageNarrow_it { LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Pieno controllo"); LSTR MSG_IDEX_DUPE_GAP = _UxGT("X-Gap-X duplicato"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2° ugello Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2° ugello @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2° ugello @"); LSTR MSG_UBL_DOING_G29 = _UxGT("G29 in corso"); LSTR MSG_UBL_TOOLS = _UxGT("Strumenti UBL"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Punto inclinaz."); @@ -206,13 +218,10 @@ namespace LanguageNarrow_it { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Misura"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Rimuovi e mis.piatto"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Spostamento succes."); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Attiva UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Disattiva UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temp. piatto"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp. piatto"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp. ugello"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp. ugello"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Modifica mesh"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Modif.mesh personal."); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Ritocca mesh"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Modif.mesh fatta"); @@ -277,7 +286,8 @@ namespace LanguageNarrow_it { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Salva mesh piatto"); LSTR MSG_LED_CONTROL = _UxGT("Controllo LED"); - LSTR MSG_LEDS = _UxGT("Luci"); + LSTR MSG_LIGHTS = _UxGT("Luci"); + LSTR MSG_LIGHT_N = _UxGT("Luce #{"); LSTR MSG_LED_PRESETS = _UxGT("Presets luce"); LSTR MSG_SET_LEDS_RED = _UxGT("Rosso"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Arancione"); @@ -289,7 +299,6 @@ namespace LanguageNarrow_it { LSTR MSG_SET_LEDS_WHITE = _UxGT("Bianco"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Predefinito"); LSTR MSG_LED_CHANNEL_N = _UxGT("Canale {"); - LSTR MSG_LEDS2 = _UxGT("Luci #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Presets luce #2"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Luminosità"); LSTR MSG_CUSTOM_LEDS = _UxGT("Luci personalizzate"); @@ -298,6 +307,8 @@ namespace LanguageNarrow_it { LSTR MSG_INTENSITY_B = _UxGT("Intensità blu"); LSTR MSG_INTENSITY_W = _UxGT("Intensità bianco"); LSTR MSG_LED_BRIGHTNESS = _UxGT("Luminosità"); + LSTR MSG_LIGHT_ENCODER = _UxGT("Luci encoder"); + LSTR MSG_LIGHT_ENCODER_PRESETS = _UxGT("Preset luci encoder"); LSTR MSG_MOVING = _UxGT("In movimento..."); LSTR MSG_FREE_XY = _UxGT("XY liberi"); @@ -335,6 +346,7 @@ namespace LanguageNarrow_it { LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Modo autom."); LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Vel. attivo"); LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Tempo inattivo"); + LSTR MSG_FLOW_PERCENTAGE = _UxGT("Imposta perc.flusso"); LSTR MSG_FLOW = _UxGT("Flusso"); LSTR MSG_FLOW_N = _UxGT("Flusso ~"); LSTR MSG_CONTROL = _UxGT("Controllo"); @@ -345,16 +357,29 @@ namespace LanguageNarrow_it { LSTR MSG_TIMEOUT = _UxGT("Tempo scaduto"); LSTR MSG_LCD_ON = _UxGT("On"); LSTR MSG_LCD_OFF = _UxGT("Off"); + LSTR MSG_PID_AUTOTUNE = _UxGT("Calibrazione PID"); LSTR MSG_PID_AUTOTUNE_E = _UxGT("Calib.PID *"); LSTR MSG_PID_CYCLE = _UxGT("Ciclo PID"); LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Calibr.PID eseguita"); LSTR MSG_PID_AUTOTUNE_FAILED = _UxGT("Calibr.PID fallito!"); + + LSTR MSG_PID_FOR_NOZZLE = _UxGT("per ugello in esecuzione."); + LSTR MSG_PID_FOR_BED = _UxGT("per piatto BED in esecuzione."); + LSTR MSG_PID_FOR_CHAMBER = _UxGT("per camera in esecuzione."); + + LSTR MSG_TEMP_NOZZLE = _UxGT("Temperatura ugello"); + LSTR MSG_TEMP_BED = _UxGT("Temperatura piatto"); + LSTR MSG_TEMP_CHAMBER = _UxGT("Temperature camera"); + LSTR MSG_BAD_HEATER_ID = _UxGT("Estrusore invalido."); LSTR MSG_TEMP_TOO_HIGH = _UxGT("Temp.troppo alta."); + LSTR MSG_TEMP_TOO_LOW = _UxGT("Temp. troppo bassa"); + LSTR MSG_PID_BAD_HEATER_ID = _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("Verif.perdita calore"); LSTR MSG_MPC_HEATING_PAST_200 = _UxGT("Riscalda a >200C"); LSTR MSG_MPC_COOLING_TO_AMBIENT = _UxGT("Raffredda a amb."); @@ -399,10 +424,10 @@ namespace LanguageNarrow_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_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_SHAPING_ENABLE_N = _UxGT("Abilita shaping @"); + LSTR MSG_SHAPING_DISABLE_N = _UxGT("Disabil. shaping @"); + LSTR MSG_SHAPING_FREQ_N = _UxGT("Frequenza @"); + LSTR MSG_SHAPING_ZETA_N = _UxGT("Smorzamento @"); LSTR MSG_SHAPING_A_FREQ = _UxGT("Frequenza ") STR_A; // ProUI LSTR MSG_SHAPING_B_FREQ = _UxGT("Frequenza ") STR_B; // ProUI LSTR MSG_SHAPING_C_FREQ = _UxGT("Frequenza ") STR_C; // ProUI @@ -448,6 +473,7 @@ namespace LanguageNarrow_it { LSTR MSG_LOAD_EEPROM = _UxGT("Carica impostazioni"); LSTR MSG_RESTORE_DEFAULTS = _UxGT("Ripristina imp."); LSTR MSG_INIT_EEPROM = _UxGT("Inizializza EEPROM"); + LSTR MSG_EEPROM_INITIALIZED = _UxGT("EEPROM inizializzata"); LSTR MSG_ERR_EEPROM_CRC = _UxGT("Err: CRC EEPROM"); LSTR MSG_ERR_EEPROM_SIZE = _UxGT("Err: Dimens.EEPROM"); LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Err: Versione EEPROM"); @@ -492,16 +518,18 @@ namespace LanguageNarrow_it { LSTR MSG_PAUSE_PRINT = _UxGT("Pausa stampa"); LSTR MSG_ADVANCED_PAUSE = _UxGT("Pausa avanzata"); LSTR MSG_RESUME_PRINT = _UxGT("Riprendi stampa"); - LSTR MSG_HOST_START_PRINT = _UxGT("Host avvio"); LSTR MSG_STOP_PRINT = _UxGT("Arresta stampa"); - LSTR MSG_END_LOOPS = _UxGT("Fine cicli di rip."); + LSTR MSG_CANCEL_PRINT = _UxGT("Annulla stampa"); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Ripresa da interruz."); + LSTR MSG_RESUME_BED_TEMP = _UxGT("Riprendi temp.piatto"); + LSTR MSG_HOST_START_PRINT = _UxGT("Host avvio"); LSTR MSG_PRINTING_OBJECT = _UxGT("Stampa oggetto"); LSTR MSG_CANCEL_OBJECT = _UxGT("Cancella oggetto"); LSTR MSG_CANCEL_OBJECT_N = _UxGT("Canc. oggetto {"); - LSTR MSG_OUTAGE_RECOVERY = _UxGT("Ripresa da interruz."); - LSTR MSG_RESUME_BED_TEMP = _UxGT("Riprendi temp.piatto"); LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Cont.proc.stampa"); LSTR MSG_MEDIA_MENU = _UxGT("Stampa da ") MEDIA_TYPE_IT; + LSTR MSG_TURN_OFF = _UxGT("Spegni stampante"); + LSTR MSG_END_LOOPS = _UxGT("Fine cicli di rip."); LSTR MSG_NO_MEDIA = MEDIA_TYPE_IT _UxGT(" non presente"); LSTR MSG_DWELL = _UxGT("Sospensione..."); LSTR MSG_USERWAIT = _UxGT("Premi tasto.."); @@ -512,7 +540,6 @@ namespace LanguageNarrow_it { LSTR MSG_PRINT_ABORTED = _UxGT("Stampa annullata"); LSTR MSG_PRINT_DONE = _UxGT("Stampa eseguita"); LSTR MSG_PRINTER_KILLED = _UxGT("Stampante uccisa!"); - LSTR MSG_TURN_OFF = _UxGT("Spegni stampante"); LSTR MSG_NO_MOVE = _UxGT("Nessun movimento"); LSTR MSG_KILLED = _UxGT("UCCISO. "); LSTR MSG_STOPPED = _UxGT("ARRESTATO. "); @@ -530,6 +557,8 @@ namespace LanguageNarrow_it { LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Extra scambio"); LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Lunghezza spurgo"); LSTR MSG_TOOL_CHANGE = _UxGT("Cambio utensile"); + LSTR MSG_TOOL_HEAD_SWAP = _UxGT("Parcheggia per scambio testa"); + LSTR MSG_FILAMENT_SWAP = _UxGT("Parcheggia per cambio filemento"); LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Risalita Z"); LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Velocità innesco"); LSTR MSG_SINGLENOZZLE_WIPE_RETRACT = _UxGT("Ritrazione pulizia"); @@ -588,7 +617,10 @@ namespace LanguageNarrow_it { LSTR MSG_ZPROBE_XOFFSET = _UxGT("Offset X sonda"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Offset Y sonda"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Offset Z sonda"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Offset @ sonda"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Babystep sonda Z"); LSTR MSG_ZPROBE_MARGIN = _UxGT("Margine sonda"); + LSTR MSG_ZOFFSET = _UxGT("Offset Z"); LSTR MSG_Z_FEED_RATE = _UxGT("Velocità Z"); LSTR MSG_ENABLE_HS_MODE = _UxGT("Abilita modo HS"); LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Muovi ugel.su piatto"); @@ -638,6 +670,7 @@ namespace LanguageNarrow_it { LSTR MSG_UBL_LEVELING = _UxGT("Livel.piatto unific."); LSTR MSG_MESH_LEVELING = _UxGT("Livel. mesh"); LSTR MSG_MESH_DONE = _UxGT("Sond.mesh eseguito"); + LSTR MSG_INFO_PRINTER_STATS_MENU = _UxGT("Statistiche stampante"); LSTR MSG_INFO_STATS_MENU = _UxGT("Statistiche"); LSTR MSG_RESET_STATS = _UxGT("Reset stat.stampa?"); LSTR MSG_INFO_BOARD_MENU = _UxGT("Info. scheda"); @@ -648,6 +681,7 @@ namespace LanguageNarrow_it { LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Controllo fuga: OFF"); LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Controllo fuga: ON"); LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Timeout inatt.ugello"); + LSTR MSG_BED_IDLE_TIMEOUT = _UxGT("Timeout inatt.piatto"); LSTR MSG_HOTEND_IDLE_DISABLE = _UxGT("Disabilita timeout"); LSTR MSG_HOTEND_IDLE_NOZZLE_TARGET = _UxGT("Temp.inatt.ugello"); LSTR MSG_HOTEND_IDLE_BED_TARGET = _UxGT("Temp.inatt.piatto"); @@ -657,22 +691,6 @@ namespace LanguageNarrow_it { LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Luminosità Luci"); LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("STAMPANTE ERRATA"); - LSTR MSG_COLORS_GET = _UxGT("Ottieni colori"); // ProUI - LSTR MSG_COLORS_SELECT = _UxGT("Selez.colori"); // ProUI - LSTR MSG_COLORS_APPLIED = _UxGT("Colori applicati"); // ProUI - LSTR MSG_COLORS_RED = _UxGT("Rosso"); // ProUI / JyersUI - LSTR MSG_COLORS_GREEN = _UxGT("Verde"); // ProUI / JyersUI - LSTR MSG_COLORS_BLUE = _UxGT("Blu"); // ProUI / JyersUI - LSTR MSG_COLORS_WHITE = _UxGT("Bianco"); // ProUI - LSTR MSG_UI_LANGUAGE = _UxGT("Lingua UI"); // ProUI - LSTR MSG_SOUND_ENABLE = _UxGT("Abilita suono"); // ProUI - LSTR MSG_LOCKSCREEN = _UxGT("Blocca schermo"); // ProUI - LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Stamp. bloccata,"); // ProUI - LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Scroll x sbloccare."); // ProUI - LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Attendere fino al riavvio."); // ProUI - LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No supporto"); // ProUI - LSTR MSG_PLEASE_PREHEAT = _UxGT("Prerisc. ugello."); // ProUI - LSTR MSG_INFO_PRINT_COUNT = _UxGT("Stampe"); LSTR MSG_INFO_PRINT_TIME = _UxGT("Durata"); LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Più lungo"); @@ -695,27 +713,47 @@ namespace LanguageNarrow_it { LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Riprendi stampa"); LSTR MSG_FILAMENT_CHANGE_PURGE_CONTINUE = _UxGT("Spurga o continua?"); // ProUI LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Ugello: "); - LSTR MSG_RUNOUT_SENSOR = _UxGT("Sens.filo termin."); // Max 17 characters + LSTR MSG_SENSOR = _UxGT("Sensore"); LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Dist mm filo term."); LSTR MSG_EXTRUDER_MIN_TEMP = _UxGT("Temp.min estrusore"); // ProUI LSTR MSG_FANCHECK = _UxGT("Verif.tacho vent."); // Max 17 characters LSTR MSG_KILL_HOMING_FAILED = _UxGT("Home fallito"); LSTR MSG_LCD_PROBING_FAILED = _UxGT("Sondaggio fallito"); + // Ender-3 V2 DWIN - ProUI / JyersUI + LSTR MSG_COLORS_GET = _UxGT("Ottieni colori"); // ProUI + LSTR MSG_COLORS_SELECT = _UxGT("Selez.colori"); // ProUI + LSTR MSG_COLORS_APPLIED = _UxGT("Colori applicati"); // ProUI + LSTR MSG_COLORS_RED = _UxGT("Rosso"); // ProUI / JyersUI + LSTR MSG_COLORS_GREEN = _UxGT("Verde"); // ProUI / JyersUI + LSTR MSG_COLORS_BLUE = _UxGT("Blu"); // ProUI / JyersUI + LSTR MSG_COLORS_WHITE = _UxGT("Bianco"); // ProUI + LSTR MSG_UI_LANGUAGE = _UxGT("Lingua UI"); // ProUI + LSTR MSG_SOUND_ENABLE = _UxGT("Abilita suono"); // ProUI + LSTR MSG_LOCKSCREEN = _UxGT("Blocca schermo"); // ProUI + LSTR MSG_LOCKSCREEN_LOCKED = _UxGT("Stamp. bloccata,"); // ProUI + LSTR MSG_LOCKSCREEN_UNLOCK = _UxGT("Scroll x sbloccare."); // ProUI + LSTR MSG_PLEASE_WAIT_REBOOT = _UxGT("Attendere fino al riavvio."); // ProUI + LSTR MSG_MEDIA_NOT_INSERTED = _UxGT("No supporto"); // ProUI + LSTR MSG_PLEASE_PREHEAT = _UxGT("Prerisc. ugello."); // ProUI + + // Prusa MMU 2 LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("SCELTA FILAMENTO"); LSTR MSG_MMU2_MENU = _UxGT("MMU"); LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Agg.firmware MMU!"); LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU chiede attenz."); - LSTR MSG_MMU2_RESUME = _UxGT("MMU riprendi"); - LSTR MSG_MMU2_RESUMING = _UxGT("MMU ripresa..."); - LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU carica"); - LSTR MSG_MMU2_LOAD_ALL = _UxGT("MMU carica tutto"); + LSTR MSG_MMU2_RESUME = _UxGT("Riprendi"); + LSTR MSG_MMU2_RESUMING = _UxGT("Ripresa..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("Carica"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("Carica tutto"); LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Carica fino ugello"); - LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU espelli"); - LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU espelli ~"); - LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU scarica"); + LSTR MSG_MMU2_CUT_FILAMENT = _UxGT("Taglia"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Espelli"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Espelli ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Scarica"); LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Caric.fil. %i..."); + LSTR MSG_MMU2_CUTTING_FILAMENT = _UxGT("Taglia fil. %i..."); LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Esplus.filam. ..."); LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Scaric.filam. ..."); LSTR MSG_MMU2_ALL = _UxGT("Tutto"); @@ -725,6 +763,31 @@ namespace LanguageNarrow_it { LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Espelli, click"); LSTR MSG_MMU2_REMOVE_AND_CLICK = _UxGT("Rimuovi e click..."); + LSTR MSG_MMU_SENSITIVITY = _UxGT("Sensibilità"); + LSTR MSG_MMU_CUTTER = _UxGT("Taglierina"); + LSTR MSG_MMU_CUTTER_MODE = _UxGT("Modalità taglierina"); + LSTR MSG_MMU_CUTTER_MODE_DISABLE = _UxGT("Disabilita"); + LSTR MSG_MMU_CUTTER_MODE_ENABLE = _UxGT("Abilita"); + LSTR MSG_MMU_CUTTER_MODE_ALWAYS = _UxGT("Sempre"); + LSTR MSG_MMU_SPOOL_JOIN = _UxGT("Spool Join"); + + LSTR MSG_MMU_STATISTICS = _UxGT("Statistiche"); + LSTR MSG_MMU_RESET_FAIL_STATS = _UxGT("Azzera stat.fallimenti"); + LSTR MSG_MMU_RESET_STATS = _UxGT("Azzera tutte stat,"); + LSTR MSG_MMU_CURRENT_PRINT = _UxGT("Stampa attuale"); + LSTR MSG_MMU_CURRENT_PRINT_FAILURES = _UxGT("Fallimenti stampa attuale"); + LSTR MSG_MMU_LAST_PRINT = _UxGT("Ultima stampa"); + LSTR MSG_MMU_LAST_PRINT_FAILURES = _UxGT("Fallimenti ultima stampa"); + LSTR MSG_MMU_TOTAL = _UxGT("Totali"); + LSTR MSG_MMU_TOTAL_FAILURES = _UxGT("Fallimenti totali"); + LSTR MSG_MMU_DEV_INCREMENT_FAILS = _UxGT("Incrementa fallimenti"); + LSTR MSG_MMU_DEV_INCREMENT_LOAD_FAILS = _UxGT("Incrementa fallimenti caric."); + LSTR MSG_MMU_FAILS = _UxGT("MMU fallimenti"); + LSTR MSG_MMU_LOAD_FAILS = _UxGT("MMU caric. falliti"); + LSTR MSG_MMU_POWER_FAILS = _UxGT("MMU fallimenti potenza"); + LSTR MSG_MMU_MATERIAL_CHANGES = _UxGT("Cambi materiale"); + + // Mixing Extruder (e.g., Geeetech A10M / A20M) LSTR MSG_MIX = _UxGT("Miscela"); LSTR MSG_MIX_COMPONENT_N = _UxGT("Componente {"); LSTR MSG_MIXER = _UxGT("Miscelatore"); @@ -857,6 +920,16 @@ namespace LanguageNarrow_it { LSTR DGUS_MSG_READ_EEPROM_FAILED = _UxGT("Lettura EEPROM fallita"); LSTR DGUS_MSG_FILAMENT_RUNOUT = _UxGT("Filament runout E%d"); + LSTR MSG_DESC_FW_UPDATE_NEEDED = _UxGT("LA versione di FW della MMU non è supportato. Aggiornare alla versione " STRINGIFY(mmuVersionMajor) "." STRINGIFY(mmuVersionMinor) "." STRINGIFY(mmuVersionPatch) "."); + + LSTR MSG_BTN_RETRY = _UxGT("Riprova"); + LSTR MSG_BTN_RESET_MMU = _UxGT("Resetta MMU"); + LSTR MSG_BTN_UNLOAD = _UxGT("Scarica"); + LSTR MSG_BTN_LOAD = _UxGT("Carica"); + LSTR MSG_BTN_EJECT = _UxGT("Espelli"); + LSTR MSG_BTN_STOP = _UxGT("Stop"); + LSTR MSG_BTN_DISABLE_MMU = _UxGT("Disabilita"); + LSTR MSG_BTN_MORE = _UxGT("Più info"); } namespace LanguageWide_it { diff --git a/firmware/Marlin/src/lcd/language/language_jp_kana.h b/firmware/Marlin/src/lcd/language/language_jp_kana.h index 3ea82d6..f7c37ba 100644 --- a/firmware/Marlin/src/lcd/language/language_jp_kana.h +++ b/firmware/Marlin/src/lcd/language/language_jp_kana.h @@ -84,6 +84,7 @@ namespace LanguageNarrow_jp_kana { LSTR MSG_EXTRUDE = _UxGT("オシダシ"); // "Extrude" LSTR MSG_RETRACT = _UxGT("ヒキコミセッテイ"); // "Retract" LSTR MSG_MOVE_AXIS = _UxGT("ジクイドウ"); // "Move axis" + LSTR MSG_PROBE_AND_LEVEL = _UxGT("プローブ アンド レベリング"); // "Probe and Level" LSTR MSG_BED_LEVELING = _UxGT("ベッドレベリング"); // "Bed leveling" LSTR MSG_LEVEL_BED = _UxGT("ベッドレベリング"); // "Level bed" @@ -173,7 +174,11 @@ namespace LanguageNarrow_jp_kana { LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch ジコシンダン"); // "BLTouch Self-Test" LSTR MSG_BLTOUCH_RESET = _UxGT("BLTouch リセット"); // "Reset BLTouch" LSTR MSG_HOME_FIRST = _UxGT("サキニ %s ヲフッキサセテクダサイ"); // "Home ... first" + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Xオフセット"); // "X Offset" + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Yオフセット"); // "Y Offset" LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Zオフセット"); // "Z Offset" + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("@オフセット"); // "@ Offset" + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("プローブZオフセット"); // "Babystep Probe Z" LSTR MSG_BABYSTEP_X = _UxGT("Xジク ビドウ"); // "Babystep X" LSTR MSG_BABYSTEP_Y = _UxGT("Yジク ビドウ"); // "Babystep Y" LSTR MSG_BABYSTEP_Z = _UxGT("Zジク ビドウ"); // "Babystep Z" diff --git a/firmware/Marlin/src/lcd/language/language_ko_KR.h b/firmware/Marlin/src/lcd/language/language_ko_KR.h index ee53819..f1eece3 100644 --- a/firmware/Marlin/src/lcd/language/language_ko_KR.h +++ b/firmware/Marlin/src/lcd/language/language_ko_KR.h @@ -72,6 +72,8 @@ namespace LanguageNarrow_ko_KR { LSTR MSG_EXTRUDE = _UxGT("밀어내기"); LSTR MSG_RETRACT = _UxGT("당기기"); LSTR MSG_MOVE_AXIS = _UxGT("축 이동"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("프로브 & 레벨링"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Z 값 조정"); LSTR MSG_BED_LEVELING = _UxGT("베드 레벨링"); LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("미러 사본"); LSTR MSG_UBL_DOING_G29 = _UxGT("오토레벨링 하기"); diff --git a/firmware/Marlin/src/lcd/language/language_nl.h b/firmware/Marlin/src/lcd/language/language_nl.h index 2f18506..2c54299 100644 --- a/firmware/Marlin/src/lcd/language/language_nl.h +++ b/firmware/Marlin/src/lcd/language/language_nl.h @@ -76,6 +76,7 @@ namespace LanguageNarrow_nl { LSTR MSG_EXTRUDE = _UxGT("Extrude"); LSTR MSG_RETRACT = _UxGT("Retract"); LSTR MSG_MOVE_AXIS = _UxGT("As verplaatsen"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Z probe & Level"); LSTR MSG_BED_LEVELING = _UxGT("Bed Leveling"); LSTR MSG_LEVEL_BED = _UxGT("Level bed"); @@ -151,7 +152,11 @@ namespace LanguageNarrow_nl { LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch Zelf-Test"); LSTR MSG_BLTOUCH_RESET = _UxGT("Reset BLTouch"); LSTR MSG_HOME_FIRST = _UxGT("Home %s Eerst"); - LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Offset"); // accepted English term in Dutch + LSTR MSG_ZPROBE_XOFFSET = _UxGT("X Offset"); // accepted English term in Dutch + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y Offset"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Offset"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("@ Offset"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Babystep Probe Z"); LSTR MSG_BABYSTEP_X = _UxGT("Babystap X"); LSTR MSG_BABYSTEP_Y = _UxGT("Babystap Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Babystap Z"); diff --git a/firmware/Marlin/src/lcd/language/language_pl.h b/firmware/Marlin/src/lcd/language/language_pl.h index c96da22..64759ee 100644 --- a/firmware/Marlin/src/lcd/language/language_pl.h +++ b/firmware/Marlin/src/lcd/language/language_pl.h @@ -112,6 +112,7 @@ namespace LanguageNarrow_pl { LSTR MSG_EXTRUDE = _UxGT("Ekstruzja"); LSTR MSG_RETRACT = _UxGT("Wycofanie"); LSTR MSG_MOVE_AXIS = _UxGT("Ruch osi"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Sonda/poziomowanie"); LSTR MSG_BED_LEVELING = _UxGT("Poziomowanie stołu"); LSTR MSG_LEVEL_BED = _UxGT("Wypoziomuj stół"); LSTR MSG_BED_TRAMMING = _UxGT("Narożniki poziomowania"); @@ -134,7 +135,7 @@ namespace LanguageNarrow_pl { LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Kopia lustrzana"); LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Pełne sterowanie"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2ga dysza Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2ga dysza @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2ga dysza @"); LSTR MSG_UBL_DOING_G29 = _UxGT("Wykonywanie G29"); LSTR MSG_UBL_TOOLS = _UxGT("Narzędzia UBL"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Punkt pochylenia"); @@ -143,13 +144,10 @@ namespace LanguageNarrow_pl { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Zmierz"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Usuń & Zmierz Stół"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Przesuwanie do następnego"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Aktywacja UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Dezaktywacja UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temperatura stołu"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temperatura stołu"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temperatura dyszy"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temperatura dyszy"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Edycja siatki"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edycja własnej siatki"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Dostrajanie siatki"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Koniec edycji siati"); @@ -210,7 +208,8 @@ namespace LanguageNarrow_pl { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Zapis siatki stołu"); LSTR MSG_LED_CONTROL = _UxGT("Sterowanie LED"); - LSTR MSG_LEDS = _UxGT("Światła"); + LSTR MSG_LIGHTS = _UxGT("Światła"); + LSTR MSG_LIGHT_N = _UxGT("Światło #{"); LSTR MSG_LED_PRESETS = _UxGT("Ustawienia świateł"); LSTR MSG_SET_LEDS_RED = _UxGT("Czerwony"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Pomarańczowy"); @@ -368,7 +367,11 @@ namespace LanguageNarrow_pl { 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"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Offset X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Offset Y"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Offset Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Offset @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Krok Z offsetu"); LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Przesuń dyszę do stołu"); LSTR MSG_BABYSTEP_TOTAL = _UxGT("Łącznie"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Błąd krańcówki"); diff --git a/firmware/Marlin/src/lcd/language/language_pt.h b/firmware/Marlin/src/lcd/language/language_pt.h index 989909e..682ebba 100644 --- a/firmware/Marlin/src/lcd/language/language_pt.h +++ b/firmware/Marlin/src/lcd/language/language_pt.h @@ -75,6 +75,7 @@ namespace LanguageNarrow_pt { LSTR MSG_EXTRUDE = _UxGT("Extrudir"); LSTR MSG_RETRACT = _UxGT("Retrair"); LSTR MSG_MOVE_AXIS = _UxGT("Mover eixo"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Calibrar e nivelar"); LSTR MSG_MOVE_X = _UxGT("Mover X"); LSTR MSG_MOVE_Y = _UxGT("Mover Y"); LSTR MSG_MOVE_Z = _UxGT("Mover Z"); @@ -144,7 +145,11 @@ namespace LanguageNarrow_pt { LSTR MSG_ATTACH_MEDIA = _UxGT("Inici. cartão SD"); LSTR MSG_CHANGE_MEDIA = _UxGT("Trocar cartão SD"); LSTR MSG_ZPROBE_OUT = _UxGT("Sensor fora/base"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Desvio X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Desvio Y"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Desvio Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Desvio @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Passo Z ajuste"); LSTR MSG_ENDSTOP_ABORT = _UxGT("Fim de curso"); LSTR MSG_ERR_HEATING_FAILED = _UxGT("Aquecimento falhou"); LSTR MSG_ERR_MAXTEMP = _UxGT("Err: T Máxima"); diff --git a/firmware/Marlin/src/lcd/language/language_pt_br.h b/firmware/Marlin/src/lcd/language/language_pt_br.h index 17c6ada..f131e06 100644 --- a/firmware/Marlin/src/lcd/language/language_pt_br.h +++ b/firmware/Marlin/src/lcd/language/language_pt_br.h @@ -41,7 +41,6 @@ namespace LanguageNarrow_pt_br { LSTR MSG_MEDIA_ABORTING = _UxGT("Abortando..."); LSTR MSG_MEDIA_INSERTED = _UxGT("Cartão inserido"); LSTR MSG_MEDIA_REMOVED = _UxGT("Cartão removido"); - LSTR MSG_MEDIA_RELEASED = _UxGT("Cartão liberado"); LSTR MSG_MEDIA_WAITING = _UxGT("Aguardando cartão"); LSTR MSG_MEDIA_READ_ERROR = _UxGT("Erro de leitura"); LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB removido"); @@ -91,6 +90,7 @@ namespace LanguageNarrow_pt_br { LSTR MSG_EXTRUDE = _UxGT("Extrusar"); LSTR MSG_RETRACT = _UxGT("Retrair"); LSTR MSG_MOVE_AXIS = _UxGT("Mover eixo"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Sondar e Nivelar"); LSTR MSG_BED_LEVELING = _UxGT("Nivelação Mesa"); LSTR MSG_LEVEL_BED = _UxGT("Nivelar Mesa"); LSTR MSG_BED_TRAMMING = _UxGT("Nivelar Cantos"); @@ -111,7 +111,7 @@ namespace LanguageNarrow_pt_br { LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Cópia espelhada"); LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Controle Total"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2o bico Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2o bico @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2o bico @"); LSTR MSG_UBL_DOING_G29 = _UxGT("Executando G29"); LSTR MSG_UBL_TOOLS = _UxGT("Ferramentas UBL"); LSTR MSG_UBL_MANUAL_MESH = _UxGT("Fazer malha manual"); @@ -119,13 +119,10 @@ namespace LanguageNarrow_pt_br { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Medir"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Remover e calibrar"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Movendo para Próximo"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Ativar UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Desativar UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temp. Mesa"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp. Mesa"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp. Extrusora"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp. Extrusora"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Editar Malha"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Editar Malha Custom"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Ajuste Fino da Malha"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Fim da Edição"); @@ -183,7 +180,8 @@ namespace LanguageNarrow_pt_br { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Salvar Malha"); LSTR MSG_LED_CONTROL = _UxGT("Controle do LED"); - LSTR MSG_LEDS = _UxGT("Luz"); + LSTR MSG_LIGHTS = _UxGT("Luz"); + LSTR MSG_LIGHT_N = _UxGT("Luz #{"); LSTR MSG_LED_PRESETS = _UxGT("Configuração da Luz"); LSTR MSG_SET_LEDS_RED = _UxGT("Luz Vermelha"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Luz Laranja"); @@ -340,6 +338,8 @@ namespace LanguageNarrow_pt_br { LSTR MSG_ZPROBE_XOFFSET = _UxGT("Compensar Sonda em X"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Compensar Sonda em Y"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Compensar Sonda em Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Compensar Sonda em @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Passo Z ajuste"); LSTR MSG_BABYSTEP_X = _UxGT("Passinho X"); LSTR MSG_BABYSTEP_Y = _UxGT("Passinho Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Passinho Z"); diff --git a/firmware/Marlin/src/lcd/language/language_ro.h b/firmware/Marlin/src/lcd/language/language_ro.h index 81f44fe..e45c93e 100644 --- a/firmware/Marlin/src/lcd/language/language_ro.h +++ b/firmware/Marlin/src/lcd/language/language_ro.h @@ -98,6 +98,7 @@ namespace LanguageNarrow_ro { LSTR MSG_EXTRUDE = _UxGT("Extrudeaza"); LSTR MSG_RETRACT = _UxGT("Retracteaza"); LSTR MSG_MOVE_AXIS = _UxGT("Muta Axa"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Probare si Nivelare"); LSTR MSG_BED_LEVELING = _UxGT("Nivelarea Patului"); LSTR MSG_LEVEL_BED = _UxGT("Niveleaza Patul"); LSTR MSG_BED_TRAMMING = _UxGT("Niveleaza Colturile"); @@ -120,7 +121,7 @@ namespace LanguageNarrow_ro { LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Mirrored Copy"); LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Full Control"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2nd Nozzle Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2nd Nozzle @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2nd Nozzle @"); LSTR MSG_UBL_DOING_G29 = _UxGT("Doing G29"); LSTR MSG_UBL_TOOLS = _UxGT("UBL Tools"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Tilting Point"); @@ -129,13 +130,10 @@ namespace LanguageNarrow_ro { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Measure"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Remove & Measure Bed"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Moving to next"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Activate UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Deactivate UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Bed Temp"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bed Temp"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Hotend Temp"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend Temp"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Mesh Edit"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edit Custom Mesh"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Fine Tuning Mesh"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Done Editing Mesh"); @@ -196,7 +194,8 @@ namespace LanguageNarrow_ro { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Save Bed Mesh"); LSTR MSG_LED_CONTROL = _UxGT("LED Control"); - LSTR MSG_LEDS = _UxGT("Lights"); + LSTR MSG_LIGHTS = _UxGT("Lights"); + LSTR MSG_LIGHT_N = _UxGT("Light #{"); LSTR MSG_LED_PRESETS = _UxGT("Light Presets"); LSTR MSG_SET_LEDS_RED = _UxGT("Red"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange"); @@ -419,6 +418,8 @@ namespace LanguageNarrow_ro { LSTR MSG_ZPROBE_XOFFSET = _UxGT("Probe X Offset"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Probe Y Offset"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Probe Z Offset"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Probe @ Offset"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Pas Z ajustare"); LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Babystep Z"); diff --git a/firmware/Marlin/src/lcd/language/language_ru.h b/firmware/Marlin/src/lcd/language/language_ru.h index 430a686..9d6509d 100644 --- a/firmware/Marlin/src/lcd/language/language_ru.h +++ b/firmware/Marlin/src/lcd/language/language_ru.h @@ -58,7 +58,7 @@ namespace LanguageNarrow_ru { LSTR MSG_DEBUG_MENU = _UxGT("Меню отладки"); LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Тест индикатора"); LSTR MSG_AUTO_HOME = _UxGT("Парковка XYZ"); - LSTR MSG_AUTO_HOME_A = _UxGT("Парковка @"); + LSTR MSG_AUTO_HOME_N = _UxGT("Парковка @"); LSTR MSG_AUTO_HOME_X = _UxGT("Парковка X"); LSTR MSG_AUTO_HOME_Y = _UxGT("Парковка Y"); LSTR MSG_AUTO_HOME_Z = _UxGT("Парковка Z"); @@ -119,6 +119,7 @@ namespace LanguageNarrow_ru { LSTR MSG_EXTRUDE = _UxGT("Выдавить"); LSTR MSG_RETRACT = _UxGT("Втянуть"); LSTR MSG_MOVE_AXIS = _UxGT("Движение по осям"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Проба/выравнивание"); LSTR MSG_BED_LEVELING = _UxGT("Выравнивание стола"); LSTR MSG_LEVEL_BED = _UxGT("Выровнять стол"); LSTR MSG_BED_TRAMMING = _UxGT("Выровнять углы"); @@ -150,7 +151,7 @@ namespace LanguageNarrow_ru { LSTR MSG_IDEX_DUPE_GAP = _UxGT("Дублировать X-зазор"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2-е сопло Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2-е сопло @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2-е сопло @"); LSTR MSG_UBL_DOING_G29 = _UxGT("Выполняем G29"); LSTR MSG_UBL_TOOLS = _UxGT("Инструменты UBL"); @@ -161,9 +162,6 @@ namespace LanguageNarrow_ru { LSTR MSG_UBL_MESH_WIZARD = _UxGT("Мастер сеток UBL"); LSTR MSG_UBL_BC_INSERT2 = _UxGT("Измерение"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Двигаемся дальше"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Активировать UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Деактивировать UBL"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Редактор сеток"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Править свою сетку"); 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"); @@ -228,7 +226,8 @@ namespace LanguageNarrow_ru { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Сохранить сетку"); LSTR MSG_LED_CONTROL = _UxGT("Настройка подсветки"); - LSTR MSG_LEDS = _UxGT("Подсветка"); + LSTR MSG_LIGHTS = _UxGT("Подсветка"); + LSTR MSG_LIGHT_N = _UxGT("Свет #{"); LSTR MSG_LED_PRESETS = _UxGT("Предустановки света"); LSTR MSG_SET_LEDS_RED = _UxGT("Красный"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Оранжевый"); @@ -240,7 +239,6 @@ namespace LanguageNarrow_ru { LSTR MSG_SET_LEDS_WHITE = _UxGT("Белый"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Свет по умолчанию"); LSTR MSG_LED_CHANNEL_N = _UxGT("Канал {"); - LSTR MSG_LEDS2 = _UxGT("Свет #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Свет #2 предустан."); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Яркость"); LSTR MSG_CUSTOM_LEDS = _UxGT("Свой цвет подсветки"); @@ -467,6 +465,8 @@ namespace LanguageNarrow_ru { LSTR MSG_ZPROBE_XOFFSET = _UxGT("Смещение X"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Смещение Y"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Смещение Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Смещение @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Шаг Z смещения"); LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Двиг. сопло к столу"); LSTR MSG_BABYSTEP_X = _UxGT("Микрошаг X"); LSTR MSG_BABYSTEP_Y = _UxGT("Микрошаг Y"); @@ -721,10 +721,10 @@ namespace LanguageNarrow_ru { LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN = _UxGT("Коэфф.кулера"); LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("Коэфф.кулер *"); LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping"); - LSTR MSG_SHAPING_ENABLE = _UxGT("Включить шейпинг @"); - LSTR MSG_SHAPING_DISABLE = _UxGT("Выключить шейпинг @"); - LSTR MSG_SHAPING_FREQ = _UxGT("@ частота"); - LSTR MSG_SHAPING_ZETA = _UxGT("@ подавление"); + LSTR MSG_SHAPING_ENABLE_N = _UxGT("Включить шейпинг @"); + LSTR MSG_SHAPING_DISABLE_N = _UxGT("Выключить шейпинг @"); + LSTR MSG_SHAPING_FREQ_N = _UxGT("@ частота"); + LSTR MSG_SHAPING_ZETA_N = _UxGT("@ подавление"); LSTR MSG_FILAMENT_EN = _UxGT("Филамент *"); LSTR MSG_SEGMENTS_PER_SECOND = _UxGT("Сегментов/сек"); LSTR MSG_DRAW_MIN_X = _UxGT("Рисовать мин X"); diff --git a/firmware/Marlin/src/lcd/language/language_sk.h b/firmware/Marlin/src/lcd/language/language_sk.h index 9746329..50729df 100644 --- a/firmware/Marlin/src/lcd/language/language_sk.h +++ b/firmware/Marlin/src/lcd/language/language_sk.h @@ -74,7 +74,7 @@ namespace LanguageNarrow_sk { LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test uk. priebehu"); LSTR MSG_HOMING = _UxGT("Parkovanie"); LSTR MSG_AUTO_HOME = _UxGT("Domovská pozícia"); - LSTR MSG_AUTO_HOME_A = _UxGT("Domov os @"); + LSTR MSG_AUTO_HOME_N = _UxGT("Domov os @"); 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"); @@ -148,6 +148,7 @@ namespace LanguageNarrow_sk { LSTR MSG_EXTRUDE = _UxGT("Vytlačiť (extr.)"); LSTR MSG_RETRACT = _UxGT("Vytiahnuť (retr.)"); LSTR MSG_MOVE_AXIS = _UxGT("Posunúť osy"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Sonda a vyrovnanie"); LSTR MSG_BED_LEVELING = _UxGT("Vyrovnanie podložky"); LSTR MSG_LEVEL_BED = _UxGT("Vyrovnať podložku"); LSTR MSG_BED_TRAMMING = _UxGT("Vyrovnať rohy"); @@ -189,7 +190,7 @@ namespace LanguageNarrow_sk { LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Plná kontrola"); LSTR MSG_IDEX_DUPE_GAP = _UxGT("Duplik. medz.-X"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2. tryska Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2. tryska @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2. tryska @"); LSTR MSG_UBL_DOING_G29 = _UxGT("Vykonávam G29"); LSTR MSG_UBL_TOOLS = _UxGT("Nástroje UBL"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Vyrovnávam bod"); @@ -202,13 +203,10 @@ namespace LanguageNarrow_sk { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Zmerajte"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Odstráňte a zmerajte"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Presun na ďalší"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Aktivovať UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Deaktivovať UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Teplota podložky"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Teplota podložky"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Teplota hotendu"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Teplota hotendu"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Úprava siete bodov"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Upraviť vlastnú sieť"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Doladiť sieť bodov"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Koniec úprav siete"); @@ -273,7 +271,8 @@ namespace LanguageNarrow_sk { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Uložiť sieť bodov"); LSTR MSG_LED_CONTROL = _UxGT("Nastavenie LED"); - LSTR MSG_LEDS = _UxGT("Svetlo"); + LSTR MSG_LIGHTS = _UxGT("Svetlo"); + LSTR MSG_LIGHT_N = _UxGT("Svetlo #{"); LSTR MSG_LED_PRESETS = _UxGT("Predvolby svetla"); LSTR MSG_SET_LEDS_RED = _UxGT("Červená"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Oranžová"); @@ -285,7 +284,6 @@ namespace LanguageNarrow_sk { LSTR MSG_SET_LEDS_WHITE = _UxGT("Biela"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Obnoviť nastavenie"); LSTR MSG_LED_CHANNEL_N = _UxGT("Kanál {"); - LSTR MSG_LEDS2 = _UxGT("Svetlo #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Predvolby svetla #2"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Jas"); LSTR MSG_CUSTOM_LEDS = _UxGT("Vlastná farba"); @@ -394,10 +392,10 @@ namespace LanguageNarrow_sk { 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_SHAPING_ENABLE_N = _UxGT("Povol. tvarov. @"); + LSTR MSG_SHAPING_DISABLE_N = _UxGT("Zakáz. tvarov. @"); + LSTR MSG_SHAPING_FREQ_N = _UxGT("Frekvencia @"); + LSTR MSG_SHAPING_ZETA_N = _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"); @@ -569,6 +567,8 @@ namespace LanguageNarrow_sk { LSTR MSG_ZPROBE_XOFFSET = _UxGT("X ofset"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y ofset"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z ofset"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("@ ofset"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Krok Z posuň"); LSTR MSG_ZPROBE_MARGIN = _UxGT("Hranica sondy"); LSTR MSG_Z_FEED_RATE = _UxGT("Rýchl. posunu Z"); LSTR MSG_ENABLE_HS_MODE = _UxGT("Povoliť rež. HS"); diff --git a/firmware/Marlin/src/lcd/language/language_sv.h b/firmware/Marlin/src/lcd/language/language_sv.h index 4023d13..76cd39f 100644 --- a/firmware/Marlin/src/lcd/language/language_sv.h +++ b/firmware/Marlin/src/lcd/language/language_sv.h @@ -115,6 +115,7 @@ namespace LanguageNarrow_sv { LSTR MSG_EXTRUDE = _UxGT("Extrudera"); LSTR MSG_RETRACT = _UxGT("Dra tillbaka"); LSTR MSG_MOVE_AXIS = _UxGT("Flytta Axel"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Sond och Nivellera"); LSTR MSG_BED_LEVELING = _UxGT("Bädd Nivellering"); LSTR MSG_LEVEL_BED = _UxGT("Nivellera Bädd"); LSTR MSG_BED_TRAMMING = _UxGT("Bädd Justering"); @@ -143,7 +144,7 @@ namespace LanguageNarrow_sv { LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Full Kontroll"); LSTR MSG_IDEX_DUPE_GAP = _UxGT("Duplicera X-Avstånd"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2:a Munstycke Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2:a Munstycke @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2:a Munstycke @"); LSTR MSG_UBL_DOING_G29 = _UxGT("Utför G29"); LSTR MSG_UBL_TOOLS = _UxGT("UBL Verktyg"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Lutningspunkt"); @@ -152,13 +153,10 @@ namespace LanguageNarrow_sv { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Mät"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Ta bort & Mät bädd"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Flyttar till nästa"); - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Aktivera UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Avaktivera UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Bädd Temp"); LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bädd Temp"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Hetände Temp"); LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hetände Temp"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Nät Redigera"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Redigera Anpassat Nät"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Finjustera Nät"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Färdig Redigera Nät"); @@ -219,7 +217,8 @@ namespace LanguageNarrow_sv { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Spara Bädd Nät"); LSTR MSG_LED_CONTROL = _UxGT("LED Kontroll"); - LSTR MSG_LEDS = _UxGT("Ljus"); + LSTR MSG_LIGHTS = _UxGT("Ljus"); + LSTR MSG_LIGHT_N = _UxGT("Ljus #{"); LSTR MSG_LED_PRESETS = _UxGT("Ljus Förinställd"); LSTR MSG_SET_LEDS_RED = _UxGT("Röd"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange"); @@ -231,7 +230,6 @@ namespace LanguageNarrow_sv { LSTR MSG_SET_LEDS_WHITE = _UxGT("Vitt"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Standard"); LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal {"); - LSTR MSG_LEDS2 = _UxGT("Ljus #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Ljus #2 Förinställd"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Ljusstyrka"); LSTR MSG_CUSTOM_LEDS = _UxGT("Anpassat Ljus"); @@ -449,6 +447,8 @@ namespace LanguageNarrow_sv { LSTR MSG_ZPROBE_XOFFSET = _UxGT("Sond X Offset"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Sond Y Offset"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Sond Z Offset"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Sond @ Offset"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Steg Z justering"); LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Flytta Munstycke till Bädd"); LSTR MSG_BABYSTEP_X = _UxGT("Småsteg X"); LSTR MSG_BABYSTEP_Y = _UxGT("Småsteg Y"); diff --git a/firmware/Marlin/src/lcd/language/language_tr.h b/firmware/Marlin/src/lcd/language/language_tr.h index 6b50ddf..e22a4c7 100644 --- a/firmware/Marlin/src/lcd/language/language_tr.h +++ b/firmware/Marlin/src/lcd/language/language_tr.h @@ -76,7 +76,7 @@ namespace LanguageNarrow_tr { LSTR MSG_Z_PROBE = _UxGT("Z Probe"); 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_N = _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"); @@ -150,6 +150,7 @@ namespace LanguageNarrow_tr { LSTR MSG_EXTRUDE = _UxGT("Ekstrüzyon"); LSTR MSG_RETRACT = _UxGT("Geri Çek"); LSTR MSG_MOVE_AXIS = _UxGT("Eksen Hareketleri"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Prob ve Seviyeleme"); LSTR MSG_BED_LEVELING = _UxGT("Tabla Seviyeleme"); LSTR MSG_LEVEL_BED = _UxGT("Tablayı Seviyele"); LSTR MSG_BED_TRAMMING = _UxGT("Tabla Hizalama"); @@ -192,7 +193,7 @@ namespace LanguageNarrow_tr { 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_HOTEND_OFFSET_N = _UxGT("2. nozul @"); LSTR MSG_UBL_DOING_G29 = _UxGT("G29 Çalışıyor"); LSTR MSG_UBL_TOOLS = _UxGT("UBL Araçları"); LSTR MSG_LCD_TILTING_MESH = _UxGT("Eğim Noktası"); @@ -205,13 +206,10 @@ namespace LanguageNarrow_tr { 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'i Aktifleştir"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL'i Pasifleştir"); 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"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Özel Mesh Düzenleme"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("İnce Ayar Mesh"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Mesh Düzenleme Tamam"); @@ -276,7 +274,8 @@ namespace LanguageNarrow_tr { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Tabla Mesh Kaydet"); LSTR MSG_LED_CONTROL = _UxGT("LED Kontrolü"); - LSTR MSG_LEDS = _UxGT("LEDler"); + LSTR MSG_LIGHTS = _UxGT("LEDler"); + LSTR MSG_LIGHT_N = _UxGT("Işıklar #{"); LSTR MSG_LED_PRESETS = _UxGT("LED Hazır Ayarları"); LSTR MSG_SET_LEDS_RED = _UxGT("Kırmızı"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Turuncu"); @@ -288,7 +287,6 @@ namespace LanguageNarrow_tr { 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"); @@ -399,10 +397,10 @@ namespace LanguageNarrow_tr { LSTR MSG_A_RETRACT = _UxGT("G.Çekme Hızı"); LSTR MSG_A_TRAVEL = _UxGT("Gezinme Hızı"); LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping"); - LSTR MSG_SHAPING_ENABLE = _UxGT("@ Biçimlemeyi Aç"); - LSTR MSG_SHAPING_DISABLE = _UxGT("@ Biçimlemeyi Kapat"); - LSTR MSG_SHAPING_FREQ = _UxGT("@ frekans"); - LSTR MSG_SHAPING_ZETA = _UxGT("@ sönümleme"); + LSTR MSG_SHAPING_ENABLE_N = _UxGT("@ Biçimlemeyi Aç"); + LSTR MSG_SHAPING_DISABLE_N = _UxGT("@ Biçimlemeyi Kapat"); + LSTR MSG_SHAPING_FREQ_N = _UxGT("@ frekans"); + LSTR MSG_SHAPING_ZETA_N = _UxGT("@ sönümleme"); LSTR MSG_SHAPING_A_FREQ = STR_A _UxGT(" frekansı"); // ProUI LSTR MSG_SHAPING_B_FREQ = STR_B _UxGT(" frekansı"); // ProUI LSTR MSG_SHAPING_C_FREQ = STR_C _UxGT(" frekansı"); // ProUI @@ -588,6 +586,8 @@ namespace LanguageNarrow_tr { LSTR MSG_ZPROBE_XOFFSET = _UxGT("X Prob Ofseti"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y Prob Ofseti"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Prob Ofseti"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("@ Prob Ofseti"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Z ayarı adımsal"); 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ç"); diff --git a/firmware/Marlin/src/lcd/language/language_uk.h b/firmware/Marlin/src/lcd/language/language_uk.h index 5010aff..63a721f 100644 --- a/firmware/Marlin/src/lcd/language/language_uk.h +++ b/firmware/Marlin/src/lcd/language/language_uk.h @@ -59,7 +59,7 @@ namespace LanguageNarrow_uk { LSTR MSG_DEBUG_MENU = _UxGT("Меню Debug"); LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Тест лінії прогр."); LSTR MSG_AUTO_HOME = _UxGT("Авто паркування"); - LSTR MSG_AUTO_HOME_A = _UxGT("Паркування @"); + LSTR MSG_AUTO_HOME_N = _UxGT("Паркування @"); LSTR MSG_AUTO_HOME_X = _UxGT("Паркування X"); LSTR MSG_AUTO_HOME_Y = _UxGT("Паркування Y"); LSTR MSG_AUTO_HOME_Z = _UxGT("Паркування Z"); @@ -117,6 +117,7 @@ namespace LanguageNarrow_uk { LSTR MSG_EXTRUDE = _UxGT("Екструзія"); LSTR MSG_RETRACT = _UxGT("Втягування"); LSTR MSG_MOVE_AXIS = _UxGT("Рух по осям"); + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Проба/вирівнювання"); LSTR MSG_BED_LEVELING = _UxGT("Вирівнювання столу"); LSTR MSG_LEVEL_BED = _UxGT("Вирівняти стіл"); LSTR MSG_BED_TRAMMING = _UxGT("Вирівняти кути"); @@ -148,7 +149,7 @@ namespace LanguageNarrow_uk { LSTR MSG_IDEX_DUPE_GAP = _UxGT("Дублюв. X-проміжок"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("Друге сопло Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("Друге сопло @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("Друге сопло @"); LSTR MSG_UBL_DOING_G29 = _UxGT("Виконується G29"); LSTR MSG_UBL_TOOLS = _UxGT("Інструменти UBL"); @@ -159,8 +160,6 @@ namespace LanguageNarrow_uk { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Вимірювання"); LSTR MSG_UBL_BC_REMOVE = _UxGT("Видали і вимір. стіл"); 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 _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"); @@ -168,7 +167,6 @@ namespace LanguageNarrow_uk { LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Редагувати свою"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Точне редаг. сітки"); LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Будувати свою"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Редагування сітки"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Сітка побудована"); LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Будувати сітку"); LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Будувати сітку ($)"); @@ -227,7 +225,8 @@ namespace LanguageNarrow_uk { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Зберегти сітку"); LSTR MSG_LED_CONTROL = _UxGT("Керування світлом"); - LSTR MSG_LEDS = _UxGT("Підсвітка"); + LSTR MSG_LIGHTS = _UxGT("Підсвітка"); + LSTR MSG_LIGHT_N = _UxGT("Світло #{"); LSTR MSG_LED_PRESETS = _UxGT("Передустан. світла"); LSTR MSG_SET_LEDS_RED = _UxGT("Червоний"); LSTR MSG_SET_LEDS_ORANGE = _UxGT("Помаранчевий"); @@ -239,7 +238,6 @@ namespace LanguageNarrow_uk { LSTR MSG_SET_LEDS_WHITE = _UxGT("Білий"); LSTR MSG_SET_LEDS_DEFAULT = _UxGT("За умовчанням"); LSTR MSG_LED_CHANNEL_N = _UxGT("Канал {"); - LSTR MSG_LEDS2 = _UxGT("Світло #2"); LSTR MSG_NEO2_PRESETS = _UxGT("Передуст. світла #2"); LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Яскравість"); LSTR MSG_CUSTOM_LEDS = _UxGT("Своє світло"); @@ -477,6 +475,8 @@ namespace LanguageNarrow_uk { LSTR MSG_ZPROBE_XOFFSET = _UxGT("Зміщення по X"); LSTR MSG_ZPROBE_YOFFSET = _UxGT("Зміщення по Y"); LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Зміщення по Z"); + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Зміщення по @"); + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Крок Z зміщення"); LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Рухати сопло до столу"); LSTR MSG_BABYSTEP_X = _UxGT("Мікрокрок X"); LSTR MSG_BABYSTEP_Y = _UxGT("Мікрокрок Y"); diff --git a/firmware/Marlin/src/lcd/language/language_vi.h b/firmware/Marlin/src/lcd/language/language_vi.h index c952416..deed0fd 100644 --- a/firmware/Marlin/src/lcd/language/language_vi.h +++ b/firmware/Marlin/src/lcd/language/language_vi.h @@ -87,6 +87,7 @@ namespace LanguageNarrow_vi { LSTR MSG_EXTRUDE = _UxGT("Ép đùn"); // Extrude LSTR MSG_RETRACT = _UxGT("Rút lại"); // Retract LSTR MSG_MOVE_AXIS = _UxGT("Di chuyển trục"); // Move axis + LSTR MSG_PROBE_AND_LEVEL = _UxGT("Chạm và san lấp"); // Probe and Level LSTR MSG_BED_LEVELING = _UxGT("San Lấp Bàn"); // Bed Leveling LSTR MSG_LEVEL_BED = _UxGT("Làm bằng mặt bàn"); // Level bed LSTR MSG_BED_TRAMMING = _UxGT("Làm bằng góc bàn"); // Level corners @@ -112,13 +113,10 @@ namespace LanguageNarrow_vi { LSTR MSG_UBL_BC_INSERT2 = _UxGT("Đo"); // Measure LSTR MSG_UBL_BC_REMOVE = _UxGT("Tháo và đo bàn"); // Remove & measure bed LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Chuyển sang tiếp theo"); // Moving to next - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Bật UBL"); - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Tắt UBL"); LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Nhiệt độ bàn"); // Bed Temp LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bed Temp"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Nhiệt độ đầu phun"); // Hotend Temp LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend Temp"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("Chỉnh sửa lưới"); // Mesh Edit LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Chỉnh sửa lưới tự chọn"); // Edit Custom Mesh LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Chỉnh lưới chính xác"); // Fine tuning mesh LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Chỉnh sửa xong lưới"); // Done Editing Mesh @@ -172,7 +170,8 @@ namespace LanguageNarrow_vi { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Lưu lưới bàn"); LSTR MSG_LED_CONTROL = _UxGT("Điều khiển LED"); // LED Control - LSTR MSG_LEDS = _UxGT("Đèn"); // Lights + LSTR MSG_LIGHTS = _UxGT("Đèn"); // Lights + LSTR MSG_LIGHT_N = _UxGT("Đèn #{"); // Light #{ LSTR MSG_LED_PRESETS = _UxGT("Đèn định sẵn"); // Light Presets LSTR MSG_SET_LEDS_RED = _UxGT("Đỏ"); // Red LSTR MSG_SET_LEDS_ORANGE = _UxGT("Cam"); // Orange @@ -322,8 +321,12 @@ namespace LanguageNarrow_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 Trước"); + LSTR MSG_HOME_FIRST = _UxGT("Về nhà %s Trước"); // Home %s first + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Đầu Dò Bù Đắp X"); // Probe X Offset + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Đầu Dò Bù Đắp Y"); // Probe Y Offset LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Đầu Dò Bù Đắp Z"); // Probe Z Offset + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("Đầu Dò Bù Đắp @"); // Probe @ Offset + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("Điều chỉnh Z từng"); // Babystep Probe Z LSTR MSG_BABYSTEP_X = _UxGT("Nhít X"); // Babystep X LSTR MSG_BABYSTEP_Y = _UxGT("Nhít Y"); LSTR MSG_BABYSTEP_Z = _UxGT("Nhít Z"); diff --git a/firmware/Marlin/src/lcd/language/language_zh_CN.h b/firmware/Marlin/src/lcd/language/language_zh_CN.h index 75d81f2..120bbdc 100644 --- a/firmware/Marlin/src/lcd/language/language_zh_CN.h +++ b/firmware/Marlin/src/lcd/language/language_zh_CN.h @@ -101,6 +101,7 @@ namespace LanguageNarrow_zh_CN { LSTR MSG_EXTRUDE = _UxGT("挤出"); // "Extrude" LSTR MSG_RETRACT = _UxGT("回抽"); // "Retract" LSTR MSG_MOVE_AXIS = _UxGT("移动轴"); // "Move axis" + LSTR MSG_PROBE_AND_LEVEL = _UxGT("探测并调平"); // "Probe and Level" LSTR MSG_BED_LEVELING = _UxGT("调平热床"); // "Bed leveling" LSTR MSG_LEVEL_BED = _UxGT("调平热床"); // "Level bed" LSTR MSG_BED_TRAMMING = _UxGT("调平边角"); // "Bed Tramming" @@ -124,7 +125,7 @@ namespace LanguageNarrow_zh_CN { LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("镜像复制"); LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("完全控制"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("第二喷头是Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("第二喷头是@"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("第二喷头是@"); LSTR MSG_UBL_DOING_G29 = _UxGT("执行G29"); // "Doing G29" LSTR MSG_UBL_TOOLS = _UxGT("UBL工具"); // "UBL Tools" LSTR MSG_LCD_TILTING_MESH = _UxGT("倾斜點"); @@ -137,13 +138,10 @@ namespace LanguageNarrow_zh_CN { LSTR MSG_UBL_BC_INSERT2 = _UxGT("测量"); // "Measure" LSTR MSG_UBL_BC_REMOVE = _UxGT("移除并测量热床"); // "Remove & measure bed" LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("移动到下一个"); // "Moving to next" - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("激活UBL"); // "Activate UBL" - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("关闭UBL"); // "Deactivate UBL" LSTR MSG_UBL_SET_TEMP_BED = _UxGT("热床温度"); // "Bed Temp" LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("热床温度"); LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("热端温度"); // "Hotend Temp" LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("热端温度"); - LSTR MSG_UBL_MESH_EDIT = _UxGT("网格编辑"); // "Mesh Edit" LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("编辑客户网格"); // "Edit Custom Mesh" LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("细调网格"); // "Fine Tuning Mesh" LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("完成编辑网格"); // "Done Editing Mesh" @@ -206,7 +204,8 @@ namespace LanguageNarrow_zh_CN { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. 保存热床网格"); LSTR MSG_LED_CONTROL = _UxGT("LED控制"); // "LED Control" - LSTR MSG_LEDS = _UxGT("灯"); // "Lights" + LSTR MSG_LIGHTS = _UxGT("灯"); // "Lights" + LSTR MSG_LIGHT_N = _UxGT("灯 #{"); // "Light #{" LSTR MSG_LED_PRESETS = _UxGT("灯预置"); // "Light Presets" LSTR MSG_SET_LEDS_RED = _UxGT("红"); // "Red" LSTR MSG_SET_LEDS_ORANGE = _UxGT("橙"); // "Orange" @@ -426,9 +425,11 @@ namespace LanguageNarrow_zh_CN { LSTR MSG_MANUAL_STOW = _UxGT("收好Z探针"); 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偏移"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("探针X偏移"); // "X Offset" + LSTR MSG_ZPROBE_YOFFSET = _UxGT("探针Y偏移"); // "Y Offset" LSTR MSG_ZPROBE_ZOFFSET = _UxGT("探针Z偏移"); // "Z Offset" + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("探针@偏移"); // "@ Offset" + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("逐步调整Z"); // "Babystep Probe Z" LSTR MSG_BABYSTEP_X = _UxGT("微量调整X轴"); // "Babystep X" lcd_babystep_x, Babystepping enables the user to control the axis in tiny amounts LSTR MSG_BABYSTEP_Y = _UxGT("微量调整Y轴"); // "Babystep Y" LSTR MSG_BABYSTEP_Z = _UxGT("微量调整Z轴"); // "Babystep Z" diff --git a/firmware/Marlin/src/lcd/language/language_zh_TW.h b/firmware/Marlin/src/lcd/language/language_zh_TW.h index e47704d..43378e5 100644 --- a/firmware/Marlin/src/lcd/language/language_zh_TW.h +++ b/firmware/Marlin/src/lcd/language/language_zh_TW.h @@ -94,6 +94,7 @@ namespace LanguageNarrow_zh_TW { LSTR MSG_EXTRUDE = _UxGT("擠出"); // "Extrude" LSTR MSG_RETRACT = _UxGT("回縮"); // "Retract" LSTR MSG_MOVE_AXIS = _UxGT("移動軸"); // "Move axis" + LSTR MSG_PROBE_AND_LEVEL = _UxGT("探測和調平"); // "Probe and Level" LSTR MSG_BED_LEVELING = _UxGT("調平熱床"); // "Bed leveling" LSTR MSG_LEVEL_BED = _UxGT("調平熱床"); // "Level bed" LSTR MSG_BED_TRAMMING = _UxGT("調平邊角"); // "Bed Tramming" @@ -116,7 +117,7 @@ namespace LanguageNarrow_zh_TW { LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Mirrored Copy"); LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Full Control"); LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2nd Nozzle Z"); - LSTR MSG_HOTEND_OFFSET_A = _UxGT("2nd Nozzle @"); + LSTR MSG_HOTEND_OFFSET_N = _UxGT("2nd Nozzle @"); LSTR MSG_UBL_DOING_G29 = _UxGT("執行G29"); // "Doing G29" LSTR MSG_UBL_TOOLS = _UxGT("UBL工具"); // "UBL Tools" LSTR MSG_LCD_TILTING_MESH = _UxGT("傾斜點"); // "Tilting Point" @@ -125,13 +126,10 @@ namespace LanguageNarrow_zh_TW { LSTR MSG_UBL_BC_INSERT2 = _UxGT("測量"); // "Measure" LSTR MSG_UBL_BC_REMOVE = _UxGT("移除並測量熱床"); // "Remove & measure bed" LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("移動到下一個"); // "Moving to next" - LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("啟動UBL"); // "Activate UBL" - LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("關閉UBL"); // "Deactivate UBL" LSTR MSG_UBL_SET_TEMP_BED = _UxGT("置設熱床溫度"); // "Bed Temp" LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("置設熱床溫度"); // "Bed Temp" LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("置設噴嘴溫度"); // "Hotend Temp" LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("熱端溫度"); // "Hotend Temp" - LSTR MSG_UBL_MESH_EDIT = _UxGT("網格編輯"); // "Mesh Edit" LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("編輯客戶網格"); // "Edit Custom Mesh" LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("細調網格"); // "Fine Tuning Mesh" LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("完成編輯網格"); // "Done Editing Mesh" @@ -192,7 +190,8 @@ namespace LanguageNarrow_zh_TW { LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. 保存熱床網格"); LSTR MSG_LED_CONTROL = _UxGT("燈管控制"); // "LED Control" - LSTR MSG_LEDS = _UxGT("燈"); // "Lights" + LSTR MSG_LIGHTS = _UxGT("燈"); // "Lights" + LSTR MSG_LIGHT_N = _UxGT("燈 #{"); // "Light #{" LSTR MSG_LED_PRESETS = _UxGT("燈預置"); // "Light Presets" LSTR MSG_SET_LEDS_RED = _UxGT("红"); // "Red" LSTR MSG_SET_LEDS_ORANGE = _UxGT("橙"); // "Orange" @@ -364,10 +363,12 @@ namespace LanguageNarrow_zh_TW { LSTR MSG_BLTOUCH_DEPLOY = _UxGT("部署BLTouch"); // "Deploy BLTouch" 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 - LSTR MSG_ZPROBE_ZOFFSET = _UxGT("探針Z偏移量"); //Probe Z Offset + 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" + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("探針Z偏移量"); // "Probe Z Offset" + LSTR MSG_ZPROBE_OFFSET_N = _UxGT("探針@偏移量"); // "Probe @ Offset" + LSTR MSG_BABYSTEP_PROBE_Z = _UxGT("逐步調整Z"); // "Babystep Probe Z" LSTR MSG_BABYSTEP_X = _UxGT("微量調整X軸"); // "Babystep X" lcd_babystep_x, Babystepping enables the user to control the axis in tiny amounts LSTR MSG_BABYSTEP_Y = _UxGT("微量調整Y軸"); // "Babystep Y" LSTR MSG_BABYSTEP_Z = _UxGT("微量調整Z軸"); // "Babystep Z" diff --git a/firmware/Marlin/src/lcd/marlinui.cpp b/firmware/Marlin/src/lcd/marlinui.cpp index d618440..c625351 100644 --- a/firmware/Marlin/src/lcd/marlinui.cpp +++ b/firmware/Marlin/src/lcd/marlinui.cpp @@ -50,6 +50,8 @@ MarlinUI ui; #include "e3v2/creality/dwin.h" #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) #include "e3v2/jyersui/dwin.h" +#elif ENABLED(SOVOL_SV06_RTS) + #include "sovol_rts/sovol_rts.h" #endif #if ENABLED(LCD_PROGRESS_BAR) && !IS_TFTGLCD_PANEL @@ -91,7 +93,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #endif #if HAS_MULTI_LANGUAGE - uint8_t MarlinUI::language; // Initialized by settings.load() + uint8_t MarlinUI::language; // Initialized by settings.load void MarlinUI::set_language(const uint8_t lang) { if (lang < NUM_LANGUAGES) { language = lang; @@ -103,7 +105,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #endif #if HAS_LCD_CONTRAST - uint8_t MarlinUI::contrast = LCD_CONTRAST_DEFAULT; // Initialized by settings.load() + uint8_t MarlinUI::contrast = LCD_CONTRAST_DEFAULT; // Initialized by settings.load void MarlinUI::set_contrast(const uint8_t value) { contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX); _set_contrast(); @@ -117,7 +119,9 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; void MarlinUI::set_brightness(const uint8_t value) { backlight = !!value; if (backlight) brightness = constrain(value, LCD_BRIGHTNESS_MIN, LCD_BRIGHTNESS_MAX); - _set_brightness(); + #if DISABLED(SOVOL_SV06_RTS) + _set_brightness(); + #endif } #endif @@ -134,7 +138,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #if HAS_PREHEAT #include "../module/temperature.h" - preheat_t MarlinUI::material_preset[PREHEAT_COUNT]; // Initialized by settings.load() + preheat_t MarlinUI::material_preset[PREHEAT_COUNT]; // Initialized by settings.load FSTR_P MarlinUI::get_preheat_label(const uint8_t m) { #define _PDEF(N) static PGMSTR(preheat_##N##_label, PREHEAT_##N##_LABEL); @@ -185,7 +189,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #if HAS_BACKLIGHT_TIMEOUT #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) - uint8_t MarlinUI::backlight_timeout_minutes; // Initialized by settings.load() + uint8_t MarlinUI::backlight_timeout_minutes; // Initialized by settings.load #else constexpr uint8_t MarlinUI::backlight_timeout_minutes; #endif @@ -205,7 +209,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #elif HAS_DISPLAY_SLEEP #if ENABLED(EDITABLE_DISPLAY_TIMEOUT) - uint8_t MarlinUI::sleep_timeout_minutes; // Initialized by settings.load() + uint8_t MarlinUI::sleep_timeout_minutes; // Initialized by settings.load #else constexpr uint8_t MarlinUI::sleep_timeout_minutes; #endif @@ -953,11 +957,13 @@ void MarlinUI::init() { // If the action button is pressed... static bool wait_for_unclick; // = false + // Set lcd_clicked for most clicks. + // Ignore the click when clearing wait_for_user or waking the screen. auto do_click = [&]{ - wait_for_unclick = true; // - Set debounce flag to ignore continuous clicks - lcd_clicked = !wait_for_user; // - Keep the click if not waiting for a user-click - wait_for_user = false; // - Any click clears wait for user - quick_feedback(); // - Always make a click sound + wait_for_unclick = true; + lcd_clicked = !wait_for_user && !display_is_asleep(); + wait_for_user = false; + quick_feedback(); }; #if HAS_TOUCH_BUTTONS diff --git a/firmware/Marlin/src/lcd/marlinui.h b/firmware/Marlin/src/lcd/marlinui.h index 9648444..64c6402 100644 --- a/firmware/Marlin/src/lcd/marlinui.h +++ b/firmware/Marlin/src/lcd/marlinui.h @@ -232,7 +232,7 @@ public: #endif #if ENABLED(SOUND_MENU_ITEM) - static bool sound_on; // Initialized by settings.load() + static bool sound_on; // Initialized by settings.load #else static constexpr bool sound_on = true; #endif @@ -305,6 +305,7 @@ public: #endif // Sleep or wake the display (e.g., by turning the backlight off/on). + static bool display_is_asleep() IF_DISABLED(HAS_DISPLAY_SLEEP, { return false; }); static void sleep_display(const bool=true) IF_DISABLED(HAS_DISPLAY_SLEEP, {}); static void wake_display() { sleep_display(false); } diff --git a/firmware/Marlin/src/lcd/menu/menu.cpp b/firmware/Marlin/src/lcd/menu/menu.cpp index a85feb5..96e6f6d 100644 --- a/firmware/Marlin/src/lcd/menu/menu.cpp +++ b/firmware/Marlin/src/lcd/menu/menu.cpp @@ -167,65 +167,72 @@ void MenuEditItemBase::goto_edit_screen( * General function to go directly to a screen */ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, const uint8_t top/*=0*/, const uint8_t items/*=0*/) { - if (currentScreen != screen) { + if (currentScreen == screen) return; - wake_display(); + wake_display(); - thermalManager.set_menu_cold_override(false); + thermalManager.set_menu_cold_override(false); - TERN_(IS_DWIN_MARLINUI, did_first_redraw = false); + TERN_(IS_DWIN_MARLINUI, did_first_redraw = false); - TERN_(HAS_TOUCH_BUTTONS, repeat_delay = BUTTON_DELAY_MENU); + TERN_(HAS_TOUCH_BUTTONS, repeat_delay = BUTTON_DELAY_MENU); - TERN_(SET_PROGRESS_PERCENT, progress_reset()); + TERN_(SET_PROGRESS_PERCENT, progress_reset()); - #if ALL(DOUBLECLICK_FOR_Z_BABYSTEPPING, BABYSTEPPING) - static millis_t doubleclick_expire_ms = 0; - // Going to menu_main from status screen? Remember first click time. - // Going back to status screen within a very short time? Go to Z babystepping. - if (screen == menu_main) { - if (on_status_screen()) - doubleclick_expire_ms = millis() + DOUBLECLICK_MAX_INTERVAL; - } - else if (screen == status_screen && currentScreen == menu_main && PENDING(millis(), doubleclick_expire_ms)) { - if (BABYSTEP_ALLOWED()) - screen = TERN(BABYSTEP_ZPROBE_OFFSET, lcd_babystep_zoffset, lcd_babystep_z); - else { - #if ENABLED(MOVE_Z_WHEN_IDLE) - ui.manual_move.menu_scale = MOVE_Z_IDLE_MULTIPLICATOR; - screen = []{ lcd_move_axis(Z_AXIS); }; - #endif - } - } - #endif - - currentScreen = screen; - encoderPosition = encoder; - encoderTopLine = top; - screen_items = items; - if (on_status_screen()) { - defer_status_screen(false); - clear_menu_history(); - TERN_(AUTO_BED_LEVELING_UBL, bedlevel.lcd_map_control = false); + /** + * Double-click on the status screen is a shortcut for one of these: + * - Babystep the Probe Z Offset + * - Babystep the Z axis + * - Move the Z axis + */ + #if ALL(DOUBLECLICK_FOR_Z_BABYSTEPPING, BABYSTEPPING) + static millis_t doubleclick_expire_ms = 0; + if (screen == menu_main) { + if (on_status_screen()) + doubleclick_expire_ms = millis() + DOUBLECLICK_MAX_INTERVAL; } + else if (screen == status_screen && currentScreen == menu_main && PENDING(millis(), doubleclick_expire_ms)) { + if (BABYSTEP_ALLOWED()) + screen = TERN(BABYSTEP_ZPROBE_OFFSET, lcd_babystep_zoffset, lcd_babystep_z); + else { + #if ENABLED(MOVE_Z_WHEN_IDLE) + ui.manual_move.menu_scale = MOVE_Z_IDLE_MULTIPLICATOR; + screen = []{ lcd_move_axis(Z_AXIS); }; + #endif + } + } + #endif - clear_for_drawing(); + // + // Go to the new screen + // - // Re-initialize custom characters that may be re-used - #if HAS_MARLINUI_HD44780 - if (TERN1(AUTO_BED_LEVELING_UBL, !bedlevel.lcd_map_control)) - set_custom_characters(on_status_screen() ? CHARSET_INFO : CHARSET_MENU); - #endif - - refresh(LCDVIEW_CALL_REDRAW_NEXT); - screen_changed = true; - TERN_(HAS_MARLINUI_U8GLIB, drawing_screen = false); - - TERN_(HAS_MARLINUI_MENU, encoder_direction_normal()); - enable_encoder_multiplier(false); - - set_selection(false); + currentScreen = screen; + encoderPosition = encoder; + encoderTopLine = top; + screen_items = items; + if (on_status_screen()) { + defer_status_screen(false); + clear_menu_history(); + TERN_(AUTO_BED_LEVELING_UBL, bedlevel.lcd_map_control = false); } + + clear_for_drawing(); + + // Re-initialize custom characters that may be re-used + #if HAS_MARLINUI_HD44780 + if (TERN1(AUTO_BED_LEVELING_UBL, !bedlevel.lcd_map_control)) + set_custom_characters(on_status_screen() ? CHARSET_INFO : CHARSET_MENU); + #endif + + refresh(LCDVIEW_CALL_REDRAW_NEXT); + screen_changed = true; + TERN_(HAS_MARLINUI_U8GLIB, drawing_screen = false); + + TERN_(HAS_MARLINUI_MENU, encoder_direction_normal()); + enable_encoder_multiplier(false); + + set_selection(false); } //////////////////////////////////////////// @@ -318,7 +325,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) { } if (ui.should_draw()) { if (do_probe) { - MenuEditItemBase::draw_edit_screen(GET_TEXT_F(MSG_ZPROBE_ZOFFSET), BABYSTEP_TO_STR(probe.offset.z)); + MenuEditItemBase::draw_edit_screen(GET_TEXT_F(MSG_BABYSTEP_PROBE_Z), BABYSTEP_TO_STR(probe.offset.z)); TERN_(BABYSTEP_GFX_OVERLAY, ui.zoffset_overlay(probe.offset.z)); } else { @@ -338,7 +345,7 @@ void _lcd_draw_homing() { } } -#if ENABLED(LCD_BED_LEVELING) || (HAS_LEVELING && DISABLED(SLIM_LCD_MENUS)) +#if HAS_LEVELING void _lcd_toggle_bed_leveling() { set_bed_leveling_enabled(!planner.leveling_active); } #endif diff --git a/firmware/Marlin/src/lcd/menu/menu.h b/firmware/Marlin/src/lcd/menu/menu.h index 4e33054..92a2d50 100644 --- a/firmware/Marlin/src/lcd/menu/menu.h +++ b/firmware/Marlin/src/lcd/menu/menu.h @@ -235,7 +235,7 @@ void _lcd_draw_homing(); void menu_advanced_settings(); #endif -#if ENABLED(LCD_BED_LEVELING) || (HAS_LEVELING && DISABLED(SLIM_LCD_MENUS)) +#if HAS_LEVELING void _lcd_toggle_bed_leveling(); #endif diff --git a/firmware/Marlin/src/lcd/menu/menu_advanced.cpp b/firmware/Marlin/src/lcd/menu/menu_advanced.cpp index 903c857..b886902 100644 --- a/firmware/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_advanced.cpp @@ -154,9 +154,12 @@ void menu_backlash(); #if HAS_FILAMENT_RUNOUT_DISTANCE editable.decimal = runout.runout_distance(); - EDIT_ITEM_FAST(float3, MSG_RUNOUT_DISTANCE_MM, &editable.decimal, 1, 999, - []{ runout.set_runout_distance(editable.decimal); }, true - ); + auto set_runout_distance = []{ runout.set_runout_distance(editable.decimal); }; + #if ENABLED(FILAMENT_MOTION_SENSOR) + EDIT_ITEM_FAST(float31, MSG_RUNOUT_DISTANCE_MM, &editable.decimal, 0.1, 10, set_runout_distance, true); + #else + EDIT_ITEM_FAST(float3, MSG_RUNOUT_DISTANCE_MM, &editable.decimal, 1, 999, set_runout_distance, true); + #endif #endif END_MENU(); @@ -559,20 +562,20 @@ void menu_backlash(); BACK_ITEM(MSG_ADVANCED_SETTINGS); // M593 F Frequency and D Damping ratio - #define SHAPING_MENU_FOR_AXIS(AXIS) \ - editable.decimal = stepper.get_shaping_frequency(AXIS); \ - if (editable.decimal) { \ - ACTION_ITEM_N(AXIS, MSG_SHAPING_DISABLE, []{ stepper.set_shaping_frequency(AXIS, 0.0f); ui.refresh(); }); \ - EDIT_ITEM_FAST_N(float41, AXIS, MSG_SHAPING_FREQ, &editable.decimal, min_frequency, 200.0f, []{ stepper.set_shaping_frequency(AXIS, editable.decimal); }); \ - editable.decimal = stepper.get_shaping_damping_ratio(AXIS); \ - EDIT_ITEM_FAST_N(float42_52, AXIS, MSG_SHAPING_ZETA, &editable.decimal, 0.0f, 1.0f, []{ stepper.set_shaping_damping_ratio(AXIS, editable.decimal); }); \ - } \ - else \ - ACTION_ITEM_N(AXIS, MSG_SHAPING_ENABLE, []{ stepper.set_shaping_frequency(AXIS, (SHAPING_FREQ_X) ?: (SHAPING_MIN_FREQ)); ui.refresh(); }); + #define SHAPING_MENU_FOR_AXIS(A) \ + editable.decimal = stepper.get_shaping_frequency(_AXIS(A)); \ + if (editable.decimal) { \ + ACTION_ITEM_N(_AXIS(A), MSG_SHAPING_DISABLE_N, []{ stepper.set_shaping_frequency(_AXIS(A), 0.0f); ui.refresh(); }); \ + EDIT_ITEM_FAST_N(float41, _AXIS(A), MSG_SHAPING_FREQ_N, &editable.decimal, min_frequency, 200.0f, []{ stepper.set_shaping_frequency(_AXIS(A), editable.decimal); }); \ + editable.decimal = stepper.get_shaping_damping_ratio(_AXIS(A)); \ + EDIT_ITEM_FAST_N(float42_52, _AXIS(A), MSG_SHAPING_ZETA_N, &editable.decimal, 0.0f, 1.0f, []{ stepper.set_shaping_damping_ratio(_AXIS(A), editable.decimal); }); \ + } \ + else \ + ACTION_ITEM_N(_AXIS(A), MSG_SHAPING_ENABLE_N, []{ stepper.set_shaping_frequency(_AXIS(A), (SHAPING_FREQ_##A) ?: (SHAPING_MIN_FREQ)); ui.refresh(); }); - TERN_(INPUT_SHAPING_X, SHAPING_MENU_FOR_AXIS(X_AXIS)) - TERN_(INPUT_SHAPING_Y, SHAPING_MENU_FOR_AXIS(Y_AXIS)) - TERN_(INPUT_SHAPING_Z, SHAPING_MENU_FOR_AXIS(Z_AXIS)) + TERN_(INPUT_SHAPING_X, SHAPING_MENU_FOR_AXIS(X)) + TERN_(INPUT_SHAPING_Y, SHAPING_MENU_FOR_AXIS(Y)) + TERN_(INPUT_SHAPING_Z, SHAPING_MENU_FOR_AXIS(Z)) END_MENU(); } @@ -608,29 +611,6 @@ void menu_backlash(); #endif - // M851 - Z Probe Offsets - #if HAS_BED_PROBE - void menu_probe_offsets() { - START_MENU(); - BACK_ITEM(MSG_ADVANCED_SETTINGS); - #if HAS_PROBE_XY_OFFSET - EDIT_ITEM(float31sign, MSG_ZPROBE_XOFFSET, &probe.offset.x, PROBE_OFFSET_XMIN, PROBE_OFFSET_XMAX); - EDIT_ITEM(float31sign, MSG_ZPROBE_YOFFSET, &probe.offset.y, PROBE_OFFSET_YMIN, PROBE_OFFSET_YMAX); - #endif - EDIT_ITEM(LCD_Z_OFFSET_TYPE, MSG_ZPROBE_ZOFFSET, &probe.offset.z, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX); - - #if ENABLED(PROBE_OFFSET_WIZARD) - SUBMENU(MSG_PROBE_WIZARD, goto_probe_offset_wizard); - #endif - - #if ENABLED(X_AXIS_TWIST_COMPENSATION) - SUBMENU(MSG_XATC, xatc_wizard_continue); - #endif - - END_MENU(); - } - #endif - #endif // !SLIM_LCD_MENUS #if ENABLED(EDITABLE_STEPS_PER_UNIT) @@ -712,11 +692,6 @@ void menu_advanced_settings() { ); #endif - // M851 - Z Probe Offsets - #if HAS_BED_PROBE - if (!is_busy) SUBMENU(MSG_ZPROBE_OFFSETS, menu_probe_offsets); - #endif - #endif // !SLIM_LCD_MENUS // M92 - Steps Per mm diff --git a/firmware/Marlin/src/lcd/menu/menu_cancelobject.cpp b/firmware/Marlin/src/lcd/menu/menu_cancelobject.cpp index bcbd90e..f55a95f 100644 --- a/firmware/Marlin/src/lcd/menu/menu_cancelobject.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_cancelobject.cpp @@ -53,13 +53,13 @@ static void lcd_cancel_object_confirm() { } void menu_cancelobject() { - const int8_t ao = cancelable.active_object; + const int8_t ao = cancelable.state.active_object; START_MENU(); BACK_ITEM(MSG_MAIN_MENU); // Draw cancelable items in a loop - for (int8_t i = -1; i < cancelable.object_count; i++) { + for (int8_t i = -1; i < cancelable.state.object_count; i++) { if (i == ao) continue; // Active is drawn on -1 index const int8_t j = i < 0 ? ao : i; // Active or index item if (!cancelable.is_canceled(j)) { // Not canceled already? diff --git a/firmware/Marlin/src/lcd/menu/menu_configuration.cpp b/firmware/Marlin/src/lcd/menu/menu_configuration.cpp index bd5ed49..e0e8ca4 100644 --- a/firmware/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_configuration.cpp @@ -138,7 +138,7 @@ void menu_advanced_settings(); #if HAS_BED_PROBE && !HAS_DELTA_SENSORLESS_PROBING __STOP_ITEM(GET_TEXT_F(MSG_Z_PROBE), Z_MIN_PROBE); #endif - #if ENABLED(FILAMENT_RUNOUT_SENSOR) + #if HAS_FILAMENT_SENSOR REPEAT_1(NUM_RUNOUT_SENSORS, FIL_ITEM) #endif @@ -241,12 +241,12 @@ void menu_advanced_settings(); START_MENU(); BACK_ITEM(MSG_CONFIGURATION); #if ENABLED(DUAL_X_CARRIAGE) - EDIT_ITEM_FAST_N(float42_52, X_AXIS, MSG_HOTEND_OFFSET_A, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets); + EDIT_ITEM_FAST_N(float42_52, X_AXIS, MSG_HOTEND_OFFSET_N, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets); #else - EDIT_ITEM_FAST_N(float42_52, X_AXIS, MSG_HOTEND_OFFSET_A, &hotend_offset[1].x, -99.0f, 99.0f, _recalc_offsets); + EDIT_ITEM_FAST_N(float42_52, X_AXIS, MSG_HOTEND_OFFSET_N, &hotend_offset[1].x, -99.0f, 99.0f, _recalc_offsets); #endif - EDIT_ITEM_FAST_N(float42_52, Y_AXIS, MSG_HOTEND_OFFSET_A, &hotend_offset[1].y, -99.0f, 99.0f, _recalc_offsets); - EDIT_ITEM_FAST_N(float42_52, Z_AXIS, MSG_HOTEND_OFFSET_A, &hotend_offset[1].z, -10.0f, 10.0f, _recalc_offsets); + EDIT_ITEM_FAST_N(float42_52, Y_AXIS, MSG_HOTEND_OFFSET_N, &hotend_offset[1].y, -99.0f, 99.0f, _recalc_offsets); + EDIT_ITEM_FAST_N(float42_52, Z_AXIS, MSG_HOTEND_OFFSET_N, &hotend_offset[1].z, -10.0f, 10.0f, _recalc_offsets); #if ENABLED(EEPROM_SETTINGS) ACTION_ITEM(MSG_STORE_EEPROM, ui.store_settings); #endif @@ -342,7 +342,7 @@ void menu_advanced_settings(); START_MENU(); BACK_ITEM(MSG_CONFIGURATION); GCODES_ITEM(MSG_TOUCHMI_INIT, F("M851 Z0\nG28\nG1 F200 Z0")); - SUBMENU(MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); + SUBMENU(MSG_BABYSTEP_PROBE_Z, lcd_babystep_zoffset); GCODES_ITEM(MSG_TOUCHMI_SAVE, F("M500\nG1 F200 Z10")); GCODES_ITEM(MSG_TOUCHMI_ZTEST, F("G28\nG1 F200 Z0")); END_MENU(); @@ -395,7 +395,40 @@ void menu_advanced_settings(); END_MENU(); } -#endif +#endif // FWRETRACT + +#if ENABLED(EDITABLE_HOMING_FEEDRATE) + + #include "../../module/motion.h" + #include "../../module/planner.h" + #include "../../gcode/parser.h" + + // Edit homing feedrates in inches- or degrees- or mm-per-minute + void menu_homing_feedrate() { + START_MENU(); + BACK_ITEM(MSG_HOMING_FEEDRATE); + + #if ENABLED(MENUS_ALLOW_INCH_UNITS) + #define _EDIT_HOMING_FR(A) do{ \ + const float minfr = MMS_TO_MMM(planner.settings.min_feedrate_mm_s); \ + const float maxfr = MMS_TO_MMM(planner.settings.max_feedrate_mm_s[_AXIS(A)]); \ + editable.decimal = A##_AXIS_UNIT(homing_feedrate_mm_m.A); \ + EDIT_ITEM_FAST_N(float5, _AXIS(A), MSG_HOMING_FEEDRATE_N, &editable.decimal, \ + A##_AXIS_UNIT(minfr), A##_AXIS_UNIT(maxfr), []{ \ + homing_feedrate_mm_m.A = parser.axis_value_to_mm(_AXIS(A), editable.decimal); \ + }); \ + }while(0); + #else + #define _EDIT_HOMING_FR(A) \ + EDIT_ITEM_FAST_N(float5, _AXIS(A), MSG_HOMING_FEEDRATE_N, &homing_feedrate_mm_m.A, MMS_TO_MMM(planner.settings.min_feedrate_mm_s), MMS_TO_MMM(planner.settings.max_feedrate_mm_s[_AXIS(A)])); + #endif + + MAIN_AXIS_MAP(_EDIT_HOMING_FR); + + END_MENU(); + } + +#endif // EDITABLE_HOMING_FEEDRATE #if HAS_PREHEAT && DISABLED(SLIM_LCD_MENUS) @@ -424,7 +457,7 @@ void menu_advanced_settings(); END_MENU(); } -#endif +#endif // HAS_PREHEAT && !SLIM_LCD_MENUS #if ENABLED(CUSTOM_MENU_CONFIG) @@ -562,12 +595,6 @@ void menu_configuration() { SUBMENU(MSG_ADVANCED_SETTINGS, menu_advanced_settings); - #if ENABLED(BABYSTEP_ZPROBE_OFFSET) - SUBMENU(MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); - #elif HAS_BED_PROBE - EDIT_ITEM(LCD_Z_OFFSET_TYPE, MSG_ZPROBE_ZOFFSET, &probe.offset.z, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX); - #endif - // // Set Fan Controller speed // @@ -629,6 +656,10 @@ void menu_configuration() { #endif #endif + #if ENABLED(EDITABLE_HOMING_FEEDRATE) + SUBMENU(MSG_HOMING_FEEDRATE, menu_homing_feedrate); + #endif + #if ENABLED(FWRETRACT) SUBMENU(MSG_RETRACT, menu_config_retract); #endif diff --git a/firmware/Marlin/src/lcd/menu/menu_led.cpp b/firmware/Marlin/src/lcd/menu/menu_led.cpp index 92c3133..f996395 100644 --- a/firmware/Marlin/src/lcd/menu/menu_led.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_led.cpp @@ -34,9 +34,23 @@ #include "../../feature/power.h" #endif +#if ALL(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS) + #include "../../feature/caselight.h" + void menu_case_light() { + START_MENU(); + BACK_ITEM(MSG_CONFIGURATION); + EDIT_ITEM(percent, MSG_CASE_LIGHT_BRIGHTNESS, &caselight.brightness, 0, 255, caselight.update_brightness, true); + EDIT_ITEM(bool, MSG_CASE_LIGHT, &caselight.on, caselight.update_enabled); + END_MENU(); + } +#endif + #if ENABLED(LED_CONTROL_MENU) + #include "../../feature/leds/leds.h" + #define MSG_LIGHT2_PRESETS TERN(BIQU_BX_TFT70, MSG_LIGHT_ENCODER_PRESETS, MSG_NEO2_PRESETS) + #if ENABLED(LED_COLOR_PRESETS) void menu_led_presets() { @@ -56,14 +70,14 @@ END_MENU(); } - #endif + #endif // LED_COLOR_PRESETS #if ENABLED(NEO2_COLOR_PRESETS) void menu_leds2_presets() { START_MENU(); #if LCD_HEIGHT > 2 - STATIC_ITEM(MSG_NEO2_PRESETS, SS_DEFAULT|SS_INVERT); + STATIC_ITEM(MSG_LIGHT2_PRESETS, SS_DEFAULT|SS_INVERT); #endif BACK_ITEM(MSG_LED_CONTROL); ACTION_ITEM(MSG_SET_LEDS_WHITE, leds2.set_white); @@ -77,11 +91,12 @@ END_MENU(); } - #endif + #endif // NEO2_COLOR_PRESETS void menu_led_custom() { START_MENU(); BACK_ITEM(MSG_LED_CONTROL); + #if ENABLED(NEOPIXEL2_SEPARATE) STATIC_ITEM_N(1, MSG_LED_CHANNEL_N, SS_DEFAULT|SS_INVERT); #endif @@ -94,6 +109,7 @@ #if ENABLED(NEOPIXEL_LED) EDIT_ITEM(uint8, MSG_LED_BRIGHTNESS, &leds.color.i, 0, 255, leds.update, true); #endif + #if ENABLED(NEOPIXEL2_SEPARATE) STATIC_ITEM_N(2, MSG_LED_CHANNEL_N, SS_DEFAULT|SS_INVERT); EDIT_ITEM(uint8, MSG_INTENSITY_R, &leds2.color.r, 0, 255, leds2.update, true); @@ -104,65 +120,61 @@ #endif EDIT_ITEM(uint8, MSG_NEO2_BRIGHTNESS, &leds2.color.i, 0, 255, leds2.update, true); #endif + END_MENU(); } -#endif - -#if ENABLED(CASE_LIGHT_MENU) - #include "../../feature/caselight.h" - - - #if CASELIGHT_USES_BRIGHTNESS - void menu_case_light() { - START_MENU(); - BACK_ITEM(MSG_CONFIGURATION); - EDIT_ITEM(percent, MSG_CASE_LIGHT_BRIGHTNESS, &caselight.brightness, 0, 255, caselight.update_brightness, true); - EDIT_ITEM(bool, MSG_CASE_LIGHT, &caselight.on, caselight.update_enabled); - END_MENU(); - } - #endif -#endif - -#if ENABLED(LED_CONTROL_MENU) void menu_led() { + #if ENABLED(CASE_LIGHT_MENU) + const bool has_bright = TERN0(CASELIGHT_USES_BRIGHTNESS, caselight.has_brightness()); + #endif + START_MENU(); BACK_ITEM(MSG_MAIN_MENU); if (TERN1(PSU_CONTROL, powerManager.psu_on)) { editable.state = leds.lights_on; - EDIT_ITEM(bool, MSG_LEDS, &editable.state, leds.toggle); + #if ENABLED(NEOPIXEL2_SEPARATE) && DISABLED(BIQU_BX_TFT70) + EDIT_ITEM_N(bool, 1, MSG_LIGHT_N, &editable.state, leds.toggle); + #else + EDIT_ITEM(bool, MSG_LIGHTS, &editable.state, leds.toggle); + #endif } #if ENABLED(LED_COLOR_PRESETS) ACTION_ITEM(MSG_SET_LEDS_DEFAULT, [] { leds.set_default(); ui.refresh(); } ); + SUBMENU(MSG_LED_PRESETS, menu_led_presets); #endif #if ENABLED(NEOPIXEL2_SEPARATE) editable.state = leds2.lights_on; - EDIT_ITEM(bool, MSG_LEDS2, &editable.state, leds2.toggle); + #if ENABLED(BIQU_BX_TFT70) + EDIT_ITEM(bool, MSG_LIGHT_ENCODER, &editable.state, leds2.toggle); + #else + EDIT_ITEM_N(bool, 2, MSG_LIGHT_N, &editable.state, leds2.toggle); + #endif #if ENABLED(NEO2_COLOR_PRESETS) ACTION_ITEM(MSG_SET_LEDS_DEFAULT, leds2.set_default); + SUBMENU(MSG_LIGHT2_PRESETS, menu_leds2_presets); #endif #endif - #if ENABLED(LED_COLOR_PRESETS) - SUBMENU(MSG_LED_PRESETS, menu_led_presets); - #endif - #if ENABLED(NEO2_COLOR_PRESETS) - SUBMENU(MSG_NEO2_PRESETS, menu_leds2_presets); - #endif + + // + // Directly set RGBW and Brightness + // SUBMENU(MSG_CUSTOM_LEDS, menu_led_custom); // // Set Case light on/off/brightness // #if ENABLED(CASE_LIGHT_MENU) - #if CASELIGHT_USES_BRIGHTNESS - if (caselight.has_brightness()) + if (has_bright) { + #if CASELIGHT_USES_BRIGHTNESS SUBMENU(MSG_CASE_LIGHT, menu_case_light); - else - #endif - EDIT_ITEM(bool, MSG_CASE_LIGHT, &caselight.on, caselight.update_enabled); + #endif + } + else + EDIT_ITEM(bool, MSG_CASE_LIGHT, &caselight.on, caselight.update_enabled); #endif END_MENU(); diff --git a/firmware/Marlin/src/lcd/menu/menu_main.cpp b/firmware/Marlin/src/lcd/menu/menu_main.cpp index 218e377..4da92d5 100644 --- a/firmware/Marlin/src/lcd/menu/menu_main.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_main.cpp @@ -72,6 +72,10 @@ void menu_motion(); void menu_temperature(); void menu_configuration(); +#if ANY(HAS_LEVELING, HAS_BED_PROBE, ASSISTED_TRAMMING_WIZARD, LCD_BED_TRAMMING) + void menu_probe_level(); +#endif + #if HAS_POWER_MONITOR void menu_power_monitor(); #endif @@ -333,6 +337,10 @@ void menu_main() { #endif SUBMENU(MSG_MOTION, menu_motion); + + #if ANY(HAS_LEVELING, HAS_BED_PROBE, ASSISTED_TRAMMING_WIZARD, LCD_BED_TRAMMING) + SUBMENU(MSG_PROBE_AND_LEVEL, menu_probe_level); + #endif } #if HAS_CUTTER @@ -378,7 +386,7 @@ void menu_main() { #endif #if ENABLED(LED_CONTROL_MENU) - SUBMENU(MSG_LEDS, menu_led); + SUBMENU(MSG_LIGHTS, menu_led); #elif ALL(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS) SUBMENU(MSG_CASE_LIGHT, menu_case_light); #elif ENABLED(CASE_LIGHT_MENU) diff --git a/firmware/Marlin/src/lcd/menu/menu_mmu2.cpp b/firmware/Marlin/src/lcd/menu/menu_mmu2.cpp index c1a330c..fccc1a4 100644 --- a/firmware/Marlin/src/lcd/menu/menu_mmu2.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_mmu2.cpp @@ -27,8 +27,8 @@ #include "../../MarlinCore.h" #if HAS_PRUSA_MMU3 - #include "../../feature/mmu3/mmu2.h" - #include "../../feature/mmu3/mmu2_reporting.h" + #include "../../feature/mmu3/mmu3.h" + #include "../../feature/mmu3/mmu3_reporting.h" #include "../../feature/mmu3/SpoolJoin.h" #else #include "../../feature/mmu/mmu2.h" @@ -263,7 +263,7 @@ void menu_mmu3_statistics() { void action_mmu2_reset() { #if HAS_PRUSA_MMU3 - #if PIN_EXISTS(MMU2_RST) + #if PIN_EXISTS(MMU_RST) mmu3.reset(MMU3::MMU3::ResetForm::ResetPin); #else mmu3.reset(MMU3::MMU3::ResetForm::Software); diff --git a/firmware/Marlin/src/lcd/menu/menu_motion.cpp b/firmware/Marlin/src/lcd/menu/menu_motion.cpp index 0e75439..4aa7d78 100644 --- a/firmware/Marlin/src/lcd/menu/menu_motion.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_motion.cpp @@ -39,11 +39,6 @@ #include "../../module/delta.h" #endif -#if HAS_LEVELING - #include "../../module/planner.h" - #include "../../feature/bedlevel/bedlevel.h" -#endif - // Always show configurable options regardless of FT Motion active //#define FT_MOTION_NO_MENU_TOGGLE @@ -296,7 +291,7 @@ void menu_move() { END_MENU(); } -#define _HOME_ITEM(N) GCODES_ITEM_N(N##_AXIS, MSG_AUTO_HOME_A, F("G28" STR_##N)); +#define _HOME_ITEM(N) GCODES_ITEM_N(N##_AXIS, MSG_AUTO_HOME_N, F("G28" STR_##N)); #if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU) // @@ -313,16 +308,6 @@ void menu_move() { } #endif -#if ENABLED(AUTO_BED_LEVELING_UBL) - void _lcd_ubl_level_bed(); -#elif ENABLED(LCD_BED_LEVELING) - void menu_bed_leveling(); -#endif - -#if ENABLED(ASSISTED_TRAMMING_WIZARD) - void goto_tramming_wizard(); -#endif - #if ENABLED(FT_MOTION_MENU) #include "../../module/ft_motion.h" @@ -479,7 +464,7 @@ void menu_move() { #if HAS_EXTRUDERS EDIT_ITEM(bool, MSG_LINEAR_ADVANCE, &c.linearAdvEna); if (c.linearAdvEna || ENABLED(FT_MOTION_NO_MENU_TOGGLE)) - EDIT_ITEM(float42_52, MSG_ADVANCE_K, &c.linearAdvK, 0, 10); + EDIT_ITEM(float62, MSG_ADVANCE_K, &c.linearAdvK, 0.0f, 1000.0f); #endif } END_MENU(); @@ -568,72 +553,6 @@ void menu_motion() { GCODES_ITEM(MSG_MANUAL_PENDOWN, F("M280 P0 S50")); #endif - // - // Level Bed - // - #if ENABLED(AUTO_BED_LEVELING_UBL) - - SUBMENU(MSG_UBL_LEVELING, _lcd_ubl_level_bed); - - #elif ENABLED(LCD_BED_LEVELING) - - if (!g29_in_progress) - SUBMENU(MSG_BED_LEVELING, menu_bed_leveling); - - #elif HAS_LEVELING && DISABLED(SLIM_LCD_MENUS) - - #if DISABLED(PROBE_MANUALLY) - GCODES_ITEM(MSG_LEVEL_BED, F("G29N")); - #endif - - if (all_axes_homed() && leveling_is_valid()) { - bool show_state = planner.leveling_active; - EDIT_ITEM(bool, MSG_BED_LEVELING, &show_state, _lcd_toggle_bed_leveling); - } - - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - editable.decimal = planner.z_fade_height; - EDIT_ITEM_FAST(float3, MSG_Z_FADE_HEIGHT, &editable.decimal, 0, 100, []{ set_z_fade_height(editable.decimal); }); - #endif - - #endif - - // - // Assisted Bed Tramming - // - #if ENABLED(ASSISTED_TRAMMING_WIZARD) - SUBMENU(MSG_TRAMMING_WIZARD, goto_tramming_wizard); - #endif - - // - // Bed Tramming Submenu - // - #if ENABLED(LCD_BED_TRAMMING) && DISABLED(LCD_BED_LEVELING) - SUBMENU(MSG_BED_TRAMMING, _lcd_bed_tramming); - #endif - - // - // Auto Z-Align - // - #if ANY(Z_STEPPER_AUTO_ALIGN, MECHANICAL_GANTRY_CALIBRATION) - GCODES_ITEM(MSG_AUTO_Z_ALIGN, F("G34")); - #endif - - // - // Probe Deploy/Stow - // - #if ENABLED(PROBE_DEPLOY_STOW_MENU) - GCODES_ITEM(MSG_MANUAL_DEPLOY, F("M401")); - GCODES_ITEM(MSG_MANUAL_STOW, F("M402")); - #endif - - // - // Probe Repeatability Test - // - #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) - GCODES_ITEM(MSG_M48_TEST, F("G28O\nM48 P10")); - #endif - // // Auto-calibration with Object // diff --git a/firmware/Marlin/src/lcd/menu/menu_bed_leveling.cpp b/firmware/Marlin/src/lcd/menu/menu_probe_level.cpp similarity index 57% rename from firmware/Marlin/src/lcd/menu/menu_bed_leveling.cpp rename to firmware/Marlin/src/lcd/menu/menu_probe_level.cpp index 6a100de..588a5b2 100644 --- a/firmware/Marlin/src/lcd/menu/menu_bed_leveling.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_probe_level.cpp @@ -21,21 +21,29 @@ */ // -// Bed Leveling Menus +// Probe and Level (Calibrate?) Menu // #include "../../inc/MarlinConfigPre.h" -#if ENABLED(LCD_BED_LEVELING) +#if HAS_MARLINUI_MENU && ANY(HAS_LEVELING, HAS_BED_PROBE, ASSISTED_TRAMMING_WIZARD, LCD_BED_TRAMMING) #include "menu_item.h" -#include "../../module/planner.h" + #include "../../feature/bedlevel/bedlevel.h" -#if HAS_BED_PROBE && DISABLED(BABYSTEP_ZPROBE_OFFSET) +#if HAS_LEVELING + #include "../../module/planner.h" // for leveling_active, z_fade_height +#endif + +#if HAS_BED_PROBE #include "../../module/probe.h" #endif +#if ENABLED(BABYSTEP_ZPROBE_OFFSET) + #include "../../feature/babystep.h" +#endif + #if HAS_GRAPHICAL_TFT #include "../tft/tft.h" #if ENABLED(TOUCH_SCREEN) @@ -43,7 +51,7 @@ #endif #endif -#if ANY(PROBE_MANUALLY, MESH_BED_LEVELING) +#if ENABLED(LCD_BED_LEVELING) && ANY(PROBE_MANUALLY, MESH_BED_LEVELING) #include "../../module/motion.h" #include "../../gcode/queue.h" @@ -201,7 +209,7 @@ queue.inject_P(G28_STR); } -#endif // PROBE_MANUALLY || MESH_BED_LEVELING +#endif // LCD_BED_LEVELING && (PROBE_MANUALLY || MESH_BED_LEVELING) #if ENABLED(MESH_EDIT_MENU) @@ -222,94 +230,184 @@ #endif // MESH_EDIT_MENU -/** - * Step 1: Bed Level entry-point - * - * << Motion - * Auto Home (if homing needed) - * Leveling On/Off (if data exists, and homed) - * Fade Height: --- (Req: ENABLE_LEVELING_FADE_HEIGHT) - * Mesh Z Offset: --- (Req: MESH_BED_LEVELING) - * Z Probe Offset: --- (Req: HAS_BED_PROBE, Opt: BABYSTEP_ZPROBE_OFFSET) - * Level Bed > - * Bed Tramming > (if homed) - * Load Settings (Req: EEPROM_SETTINGS) - * Save Settings (Req: EEPROM_SETTINGS) - */ -void menu_bed_leveling() { - const bool is_homed = all_axes_trusted(), - is_valid = leveling_is_valid(); +#if ENABLED(AUTO_BED_LEVELING_UBL) + void _lcd_ubl_level_bed(); +#endif + +#if ENABLED(ASSISTED_TRAMMING_WIZARD) + void goto_tramming_wizard(); +#endif + +// Include a sub-menu when there's manual probing + +void menu_probe_level() { + const bool can_babystep_z = TERN0(BABYSTEP_ZPROBE_OFFSET, babystep.can_babystep(Z_AXIS)); + + #if HAS_LEVELING + const bool is_homed = all_axes_homed(), + is_valid = leveling_is_valid(); + #endif + + #if NONE(PROBE_MANUALLY, MESH_BED_LEVELING) + const bool is_trusted = all_axes_trusted(); + #endif START_MENU(); - BACK_ITEM(MSG_MOTION); - // Auto Home if not using manual probing - #if NONE(PROBE_MANUALLY, MESH_BED_LEVELING) - if (!is_homed) GCODES_ITEM(MSG_AUTO_HOME, FPSTR(G28_STR)); - #endif + // + // ^ Main + // + BACK_ITEM(MSG_MAIN_MENU); - // Level Bed - #if ANY(PROBE_MANUALLY, MESH_BED_LEVELING) - // Manual leveling uses a guided procedure - SUBMENU(MSG_LEVEL_BED, _lcd_level_bed_continue); - #else - // Automatic leveling can just run the G-code - GCODES_ITEM(MSG_LEVEL_BED, is_homed ? F("G29") : F("G29N")); - #endif + if (!g29_in_progress) { - #if ENABLED(MESH_EDIT_MENU) - if (is_valid) SUBMENU(MSG_EDIT_MESH, menu_edit_mesh); - #endif + // Auto Home if not using manual probing + #if NONE(PROBE_MANUALLY, MESH_BED_LEVELING) + if (!is_trusted) GCODES_ITEM(MSG_AUTO_HOME, FPSTR(G28_STR)); + #endif - // Homed and leveling is valid? Then leveling can be toggled. - if (is_homed && is_valid) { - bool show_state = planner.leveling_active; - EDIT_ITEM(bool, MSG_BED_LEVELING, &show_state, _lcd_toggle_bed_leveling); - } + #if HAS_LEVELING + + // Homed and leveling is valid? Then leveling can be toggled. + if (is_homed && is_valid) { + bool show_state = planner.leveling_active; + EDIT_ITEM(bool, MSG_BED_LEVELING, &show_state, _lcd_toggle_bed_leveling); + } + + // + // Level Bed + // + #if ENABLED(AUTO_BED_LEVELING_UBL) + // UBL uses a guided procedure + SUBMENU(MSG_UBL_LEVELING, _lcd_ubl_level_bed); + #elif ANY(PROBE_MANUALLY, MESH_BED_LEVELING) + #if ENABLED(LCD_BED_LEVELING) + // Manual leveling uses a guided procedure + SUBMENU(MSG_LEVEL_BED, _lcd_level_bed_continue); + #endif + #else + // Automatic leveling can just run the G-code + GCODES_ITEM(MSG_LEVEL_BED, is_homed ? F("G29") : F("G29N")); + #endif + + // + // Edit Mesh (non-UBL) + // + #if ENABLED(MESH_EDIT_MENU) + if (is_valid) SUBMENU(MSG_EDIT_MESH, menu_edit_mesh); + #endif + + // + // Mesh Bed Leveling Z-Offset + // + #if ENABLED(MESH_BED_LEVELING) + #if WITHIN(PROBE_OFFSET_ZMIN, -9, 9) + #define LCD_Z_OFFSET_TYPE float43 // Values from -9.000 to +9.000 + #else + #define LCD_Z_OFFSET_TYPE float42_52 // Values from -99.99 to 99.99 + #endif + EDIT_ITEM(LCD_Z_OFFSET_TYPE, MSG_MESH_Z_OFFSET, &bedlevel.z_offset, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX); + #endif + + #endif + + } // no G29 in progress // Z Fade Height - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(SLIM_LCD_MENUS) // Shadow for editing the fade height editable.decimal = planner.z_fade_height; EDIT_ITEM_FAST(float3, MSG_Z_FADE_HEIGHT, &editable.decimal, 0, 100, []{ set_z_fade_height(editable.decimal); }); #endif - // - // Mesh Bed Leveling Z-Offset - // - #if ENABLED(MESH_BED_LEVELING) - #if WITHIN(PROBE_OFFSET_ZMIN, -9, 9) - #define LCD_Z_OFFSET_TYPE float43 // Values from -9.000 to +9.000 - #else - #define LCD_Z_OFFSET_TYPE float42_52 // Values from -99.99 to 99.99 + if (!g29_in_progress) { + // + // Probe Deploy/Stow + // + #if ENABLED(PROBE_DEPLOY_STOW_MENU) + GCODES_ITEM(MSG_MANUAL_DEPLOY, F("M401")); + GCODES_ITEM(MSG_MANUAL_STOW, F("M402")); #endif - EDIT_ITEM(LCD_Z_OFFSET_TYPE, MSG_MESH_Z_OFFSET, &bedlevel.z_offset, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX); - #endif - #if ENABLED(BABYSTEP_ZPROBE_OFFSET) - SUBMENU(MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); - #elif HAS_BED_PROBE - EDIT_ITEM(LCD_Z_OFFSET_TYPE, MSG_ZPROBE_ZOFFSET, &probe.offset.z, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX); - #endif + // Tare the probe on-demand + #if ENABLED(PROBE_TARE_MENU) + ACTION_ITEM(MSG_TARE_PROBE, probe.tare); + #endif - #if ENABLED(PROBE_OFFSET_WIZARD) - SUBMENU(MSG_PROBE_WIZARD, goto_probe_offset_wizard); - #endif + // + // Probe XY Offsets + // + #if HAS_PROBE_XY_OFFSET + EDIT_ITEM_N(float31sign, X_AXIS, MSG_ZPROBE_OFFSET_N, &probe.offset.x, PROBE_OFFSET_XMIN, PROBE_OFFSET_XMAX); + EDIT_ITEM_N(float31sign, Y_AXIS, MSG_ZPROBE_OFFSET_N, &probe.offset.y, PROBE_OFFSET_YMIN, PROBE_OFFSET_YMAX); + #endif - // Tare the probe on-demand - #if ENABLED(PROBE_TARE_MENU) - ACTION_ITEM(MSG_TARE_PROBE, probe.tare); - #endif + // + // Probe Z Offset - Babystep or Edit + // + if (can_babystep_z) { + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + SUBMENU(MSG_BABYSTEP_PROBE_Z, lcd_babystep_zoffset); + #endif + } + else { + #if HAS_BED_PROBE + EDIT_ITEM_N(LCD_Z_OFFSET_TYPE, Z_AXIS, MSG_ZPROBE_OFFSET_N, &probe.offset.z, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX); + #endif + } - #if ENABLED(LCD_BED_TRAMMING) - SUBMENU(MSG_BED_TRAMMING, _lcd_bed_tramming); - #endif + // + // Probe Z Offset Wizard + // + #if ENABLED(PROBE_OFFSET_WIZARD) + SUBMENU(MSG_PROBE_WIZARD, goto_probe_offset_wizard); + #endif + + // + // Probe Repeatability Test + // + #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) + GCODES_ITEM(MSG_M48_TEST, F("G28O\nM48 P10")); + #endif + + // + // Assisted Bed Tramming + // + #if ENABLED(ASSISTED_TRAMMING_WIZARD) + SUBMENU(MSG_TRAMMING_WIZARD, goto_tramming_wizard); + #endif + + // + // Bed Tramming Submenu + // + #if ENABLED(LCD_BED_TRAMMING) + SUBMENU(MSG_BED_TRAMMING, _lcd_bed_tramming); + #endif + + // + // Auto Z-Align + // + #if ANY(Z_STEPPER_AUTO_ALIGN, MECHANICAL_GANTRY_CALIBRATION) + GCODES_ITEM(MSG_AUTO_Z_ALIGN, F("G34")); + #endif + + // + // Twist Compensation + // + #if ENABLED(X_AXIS_TWIST_COMPENSATION) + SUBMENU(MSG_XATC, xatc_wizard_continue); + #endif + + // + // Store to EEPROM + // + #if ENABLED(EEPROM_SETTINGS) + ACTION_ITEM(MSG_STORE_EEPROM, ui.store_settings); + #endif + + } - #if ENABLED(EEPROM_SETTINGS) - ACTION_ITEM(MSG_LOAD_EEPROM, ui.load_settings); - ACTION_ITEM(MSG_STORE_EEPROM, ui.store_settings); - #endif END_MENU(); } -#endif // LCD_BED_LEVELING +#endif // HAS_MARLINUI_MENU && (HAS_LEVELING || HAS_BED_PROBE || ASSISTED_TRAMMING_WIZARD || LCD_BED_TRAMMING) diff --git a/firmware/Marlin/src/lcd/menu/menu_probe_offset.cpp b/firmware/Marlin/src/lcd/menu/menu_probe_offset.cpp index 13edf0d..fe1f726 100644 --- a/firmware/Marlin/src/lcd/menu/menu_probe_offset.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_probe_offset.cpp @@ -59,7 +59,7 @@ void probe_offset_wizard_menu() { STATIC_ITEM(MSG_MOVE_NOZZLE_TO_BED, SS_CENTER|SS_INVERT); STATIC_ITEM_F(F("Z"), SS_CENTER, ftostr42_52(current_position.z)); - STATIC_ITEM(MSG_ZPROBE_ZOFFSET, SS_FULL, ftostr42_52(calculated_z_offset)); + STATIC_ITEM_N(Z_AXIS, MSG_ZPROBE_OFFSET_N, SS_FULL, ftostr42_52(calculated_z_offset)); SUBMENU_S(F("1.0"), MSG_MOVE_N_MM, []{ _goto_manual_move_z( 1.0f); }); SUBMENU_S(F("0.1"), MSG_MOVE_N_MM, []{ _goto_manual_move_z( 0.1f); }); diff --git a/firmware/Marlin/src/lcd/menu/menu_tmc.cpp b/firmware/Marlin/src/lcd/menu/menu_tmc.cpp index c3503ed..c708bb5 100644 --- a/firmware/Marlin/src/lcd/menu/menu_tmc.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_tmc.cpp @@ -90,7 +90,7 @@ void menu_tmc_current() { #if ENABLED(HYBRID_THRESHOLD) - #define TMC_EDIT_STORED_HYBRID_THRS(ST, STR) EDIT_ITEM_F(uint8, F(STR), &stepper##ST.stored.hybrid_thrs, 0, 255, []{ stepper##ST.refresh_hybrid_thrs(); }); + #define TMC_EDIT_STORED_HYBRID_THRS(ST, STR) EDIT_ITEM_F(uint16_3, F(STR), &stepper##ST.stored.hybrid_thrs, 0, STEPPER_MAX_THRS(ST), []{ stepper##ST.refresh_hybrid_thrs(); }); void menu_tmc_hybrid_thrs() { START_MENU(); diff --git a/firmware/Marlin/src/lcd/menu/menu_tune.cpp b/firmware/Marlin/src/lcd/menu/menu_tune.cpp index ae6c7c1..1f1571d 100644 --- a/firmware/Marlin/src/lcd/menu/menu_tune.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_tune.cpp @@ -233,7 +233,7 @@ void menu_tune() { SUBMENU_N(Y_AXIS, MSG_BABYSTEP_N, []{ _lcd_babystep_go(_lcd_babystep_y); }); #endif #if ENABLED(BABYSTEP_ZPROBE_OFFSET) - SUBMENU(MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset); + SUBMENU_N(Z_AXIS, MSG_ZPROBE_OFFSET_N, lcd_babystep_zoffset); #else SUBMENU_N(Z_AXIS, MSG_BABYSTEP_N, lcd_babystep_z); #endif diff --git a/firmware/Marlin/src/lcd/menu/menu_ubl.cpp b/firmware/Marlin/src/lcd/menu/menu_ubl.cpp index 3b9f0f3..63ad34a 100644 --- a/firmware/Marlin/src/lcd/menu/menu_ubl.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_ubl.cpp @@ -632,10 +632,11 @@ void _menu_ubl_tools() { * UBL System submenu * * << Motion - * - Manually Build Mesh >> - * - Activate UBL >> - * - Deactivate UBL >> + * - Activate / Deactivate UBL + * - Edit Fade Height * - Step-By-Step UBL >> + * - Mesh Wizard >> + * - Mesh Edit >> * - Mesh Storage >> * - Output Map >> * - UBL Tools >> @@ -644,21 +645,24 @@ void _menu_ubl_tools() { void _lcd_ubl_level_bed() { START_MENU(); BACK_ITEM(MSG_MOTION); - if (planner.leveling_active) - GCODES_ITEM(MSG_UBL_DEACTIVATE_MESH, F("G29D")); - else - GCODES_ITEM(MSG_UBL_ACTIVATE_MESH, F("G29A")); + + bool show_state = planner.leveling_active; + EDIT_ITEM(bool, MSG_BED_LEVELING, &show_state, _lcd_toggle_bed_leveling); + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) editable.decimal = planner.z_fade_height; EDIT_ITEM_FAST(float3, MSG_Z_FADE_HEIGHT, &editable.decimal, 0, 100, []{ set_z_fade_height(editable.decimal); }); #endif + #if ENABLED(G26_MESH_VALIDATION) SUBMENU(MSG_UBL_STEP_BY_STEP_MENU, _lcd_ubl_step_by_step); #endif + #if ENABLED(UBL_MESH_WIZARD) SUBMENU(MSG_UBL_MESH_WIZARD, _menu_ubl_mesh_wizard); #endif - ACTION_ITEM(MSG_UBL_MESH_EDIT, _ubl_goto_map_screen); + + ACTION_ITEM(MSG_MESH_EDITOR, _ubl_goto_map_screen); SUBMENU(MSG_UBL_STORAGE_MESH_MENU, _lcd_ubl_storage_mesh); SUBMENU(MSG_UBL_OUTPUT_MAP, _lcd_ubl_output_map); SUBMENU(MSG_UBL_TOOLS, _menu_ubl_tools); diff --git a/firmware/Marlin/src/lcd/menu/menu_x_twist.cpp b/firmware/Marlin/src/lcd/menu/menu_x_twist.cpp index c7e588b..6c2ab70 100644 --- a/firmware/Marlin/src/lcd/menu/menu_x_twist.cpp +++ b/firmware/Marlin/src/lcd/menu/menu_x_twist.cpp @@ -94,7 +94,7 @@ void xatc_wizard_menu() { STATIC_ITEM(MSG_MOVE_NOZZLE_TO_BED, SS_CENTER|SS_INVERT); STATIC_ITEM_F(F("Z="), SS_CENTER, ftostr42_52(current_position.z)); - STATIC_ITEM(MSG_ZPROBE_ZOFFSET, SS_LEFT, ftostr42_52(calculated_z_offset)); + STATIC_ITEM_N(Z_AXIS, MSG_ZPROBE_OFFSET_N, SS_LEFT, ftostr42_52(calculated_z_offset)); SUBMENU_S(F("1.0"), MSG_MOVE_N_MM, []{ _goto_manual_move_z( 1.0f); }); SUBMENU_S(F("0.1"), MSG_MOVE_N_MM, []{ _goto_manual_move_z( 0.1f); }); diff --git a/firmware/Marlin/src/lcd/sovol_rts/sovol_rts.cpp b/firmware/Marlin/src/lcd/sovol_rts/sovol_rts.cpp new file mode 100644 index 0000000..cdffca4 --- /dev/null +++ b/firmware/Marlin/src/lcd/sovol_rts/sovol_rts.cpp @@ -0,0 +1,1772 @@ +/** + * 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 . + * + */ +#include "../../inc/MarlinConfig.h" + +#if ENABLED(SOVOL_SV06_RTS) + +#include "sovol_rts.h" + +DB RTS::recdat; +DB RTS::snddat; +uint8_t RTS::databuf[DATA_BUF_SIZE]; + +uint8_t RTS::print_state = 0; +bool RTS::start_print_flag = false; +bool RTS::dark_mode = false; + +RTS rts; + +#include +#include +#include +#include "../../MarlinCore.h" +#include "../../sd/cardreader.h" +#include "../../module/temperature.h" +#include "../../module/planner.h" +#include "../../module/stepper.h" +#include "../../module/settings.h" +#include "../../module/motion.h" +#include "../../module/printcounter.h" +#include "../../libs/duration_t.h" +#include "../../feature/babystep.h" +#include "../../feature/powerloss.h" +#include "../../feature/bedlevel/bedlevel.h" +#include "../../feature/tmc_util.h" +#include "../../gcode/queue.h" +#include "../../gcode/gcode.h" +#include "../marlinui.h" +#include "../../libs/BL24CXX.h" + +#if ENABLED(FIX_MOUNTED_PROBE) + #include "../../module/endstops.h" +#endif +#if HAS_BED_PROBE + #include "../../module/probe.h" +#endif + +#if HAS_FILAMENT_SENSOR + //#define CHECKFILAMENT + #include "../../feature/runout.h" +#endif + +float zprobe_zoffset; +float last_zoffset = 0.0; + +int16_t startprogress = 0; +CRec cardRec; +bool sdcard_pause_check = true; + +float change_filament_temp_0 = 200; + +int16_t heatway = 0; +millis_t next_rts_update_ms = 0; + +int8_t waitway = 0; +int16_t recnum = 0; + +uint8_t job_percent = 0; + +bool pause_action_flag = false; +bool pause_flag = false; +bool power_off_type_yes = false; + +bool update_sd = false; // Flag to update the file list + +#if HAS_HOTEND + int16_t last_target_temperature[1] = { 0 }; +#endif +#if HAS_HEATED_BED + int16_t last_target_temperature_bed; +#endif + +bool lcd_sd_status; // SD-card status. true = SD available + +int16_t FilenamesCount = 0; +char cmdbuf[20] = { 0 }; +float filament_load_0 = 10.0f; +float XoffsetValue; + +// 0 for 10mm, 1 for 1mm, 2 for 0.1mm +uint8_t AxisUnitMode; +float axis_unit = 10; +int16_t update_time_value = 0; + +bool poweroff_continue = false; +char commandbuf[30]; + +static SovolPage change_page_number = ID_Startup; + +uint32_t remain_time = 0; + +static bool last_card_insert_st; +bool card_insert_st; +bool sd_printing; + +int16_t fan_speed; +char cmd[MAX_CMD_SIZE + 16]; + +inline void RTS_line_to_current(const AxisEnum axis) { + if (!planner.is_full()) + planner.buffer_line(current_position, MMM_TO_MMS(manual_feedrate_mm_m[axis]), active_extruder); +} + +RTS::RTS() { + recdat.head[0] = snddat.head[0] = FHONE; + recdat.head[1] = snddat.head[1] = FHTWO; + ZERO(databuf); +} + +void RTS::sdCardInit() { + if (sdDetected()) card.mount(); + if (card.flag.mounted) { + const int16_t fileCnt = card.get_num_items(); + card.getWorkDirName(); + if (card.filename[0] != '/') card.cdup(); + + int16_t addrnum = 0, num = 0; + for (uint16_t i = 0; i < fileCnt && i < (MAX_NUM_FILES) + addrnum; i++) { + card.selectFileByIndex(fileCnt - 1 - i); + char * const pFilename = card.longest_filename(); + const int16_t filenamelen = strlen(pFilename); + int16_t j = 1; + while (strncmp(&pFilename[j], ".gco", 4) && strncmp(&pFilename[j], ".GCO", 4) && j++ < filenamelen); + if (j >= filenamelen) { addrnum++; continue; } + + if (j >= FILENAME_LEN) { + strncpy(&pFilename[FILENAME_LEN - 3], "..", 2); + pFilename[FILENAME_LEN - 1] = '\0'; + j = FILENAME_LEN - 1; + } + + strncpy(cardRec.display_filename[num], pFilename, j); + + strcpy(cardRec.filename[num], card.filename); + cardRec.addr[num] = FILE1_TEXT_VP + (num * 20); + sendData(cardRec.display_filename[num], cardRec.addr[num]); + cardRec.Filesum = (++num); + } + for (uint16_t j = cardRec.Filesum; j < MAX_NUM_FILES; j++) { + cardRec.addr[j] = FILE1_TEXT_VP + (j * 20); + sendData(0, cardRec.addr[j]); + } + for (uint8_t j = 0; j < 20; j++) { + // Clear the file name displayed in the print interface + sendData(0, PRINT_FILE_TEXT_VP + j); + } + lcd_sd_status = IS_SD_INSERTED(); + } + else { + // Clean all filename Icons + for (uint8_t j = 0; j < MAX_NUM_FILES; j++) + for (uint8_t i = 0; i < FILENAME_LEN; i++) + sendData(0, cardRec.addr[j] + i); + ZERO(&cardRec); + } +} + +bool RTS::sdDetected() { + static bool state = false, stable = false, was_present = false; + static millis_t stable_ms = 0; + + const bool present = IS_SD_INSERTED(); + if (present != was_present) + stable = false; + else if (!stable) { + stable = true; + stable_ms = millis() + 30; + } + + if (stable && ELAPSED(millis(), stable_ms)) + state = present; + + was_present = present; + return state; +} + +void RTS::sdCardUpdate() { + const bool sd_status = sdDetected(); + if (sd_status != lcd_sd_status) { + if (sd_status) { + // SD card power on + card.mount(); + sdCardInit(); + } + else { + card.release(); + + for (uint8_t i = 0; i < cardRec.Filesum; i++) { + for (uint8_t j = 0; j < 20; j++) sendData(0, cardRec.addr[i] + j); + sendData(uint32_t(0x738E), FilenameNature + (i + 1) * 16); + } + + // Clean screen + for (uint8_t j = 0; j < 20; j++) { + sendData(0, PRINT_FILE_TEXT_VP + j); + sendData(0, SELECT_FILE_TEXT_VP + j); + } + ZERO(&cardRec); + } + lcd_sd_status = sd_status; + } + + // Represents to update file list + if (update_sd && lcd_sd_status && sdDetected()) { + for (uint16_t i = 0; i < cardRec.Filesum; i++) { + delay(1); + sendData(cardRec.display_filename[i], cardRec.addr[i]); + sendData(uint32_t(0x738E), FilenameNature + (i + 1) * 16); + } + update_sd = false; + } +} + +void RTS::init() { + dark_mode = BL24CXX::readOneByte(FONT_EEPROM); + AxisUnitMode = 1; + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + bool zig = false; + int8_t inStart, inStop, inInc, showcount; + showcount = 0; + for (int8_t y = 0; y < GRID_MAX_POINTS_Y; y++) { + // Away from origin + if (zig) { + inStart = 0; + inStop = GRID_MAX_POINTS_X; + inInc = 1; + } + else { + // Towards origin + inStart = GRID_MAX_POINTS_X - 1; + inStop = -1; + inInc = -1; + } + zig ^= true; + for (int8_t x = inStart; x != inStop; x += inInc) { + sendData(bedlevel.z_values[x][y] * 100, AUTO_BED_LEVEL_1POINT_VP + showcount * 2); + showcount++; + } + } + queue.enqueue_now(F("M420 S1")); + #endif + last_zoffset = zprobe_zoffset = probe.offset.z; + sendData(probe.offset.z * 100, AUTO_BED_LEVEL_ZOFFSET_VP); + + TERN_(HAS_HOTEND, last_target_temperature[0] = thermalManager.degTargetHotend(0)); + TERN_(HAS_HEATED_BED, last_target_temperature_bed = thermalManager.degTargetBed()); + + feedrate_percentage = 100; + sendData(feedrate_percentage, PRINT_SPEED_RATE_VP); + + /***************turn off motor*****************/ + sendData(1, MOTOR_FREE_ICON_VP); + + /***************transmit temperature to screen*****************/ + updateTempE0(); + updateTempBed(); + + /***************transmit Fan speed to screen*****************/ + // Turn off fans + thermalManager.zero_fan_speeds(); + //queue.enqueue_now(F("M107")); + //sendData(1, HEAD0_FAN_ICON_VP); + updateFan0(); + + delay(5); + + /*********transmit SD card filename to screen***************/ + sdCardInit(); + + /**************************some info init*******************************/ + sendData(0, PRINT_PROCESS_ICON_VP); + change_page_number = card.flag.mounted ? (dark_mode ? ID_Home_D : ID_Home_L) : ID_Startup; +} + +int16_t RTS::receiveData() { + int16_t frame_index = 0, timeout = 0, framelen = 0; + bool frame_flag = false; + if (LCD_SERIAL.available() <= 0) return -1; + do { + if (LCD_SERIAL.available() > 0) { + databuf[frame_index] = LCD_SERIAL.read(); + timeout = 0; + // 0x5A + if (frame_index == 0 && databuf[frame_index] == FHONE) { + frame_index++; + continue; + } + // 0xA5 + else if (frame_index == 1) { + if (databuf[frame_index] == FHTWO) frame_index++; else frame_index = 0; + continue; + } + // 长度 + else if (frame_index == 2) { + framelen = databuf[frame_index]; + frame_index++; + continue; + } + else if (frame_index != 0) { + frame_index++; + // After a frame of data is extracted, the remaining serial data will be processed next time the function will be processed + if (frame_index == (framelen + 3)) { + frame_flag = true; + break; + } + } + } + else { + timeout++; + delay(1); + } + } while (timeout < 50); // Timeout function + + if (frame_flag) { + recdat.head[0] = databuf[0]; + recdat.head[1] = databuf[1]; + recdat.len = databuf[2]; + recdat.command = databuf[3]; + for (uint8_t idx = 0; idx < frame_index; idx++) { } + } + else + return -1; + + // Response for writing byte + if (recdat.len == 0x03 + && (recdat.command == 0x82 || recdat.command == 0x80) + && databuf[4] == 0x4F && databuf[5] == 0x4B + ) { + ZERO(databuf); + recnum = 0; + return -1; + } + else if (recdat.command == 0x83) { + // Response for reading the data from the variate + recdat.addr = databuf[4]; + recdat.addr = (recdat.addr << 8) | databuf[5]; + recdat.bytelen = databuf[6]; + for (uint16_t i = 0; i < recdat.bytelen; i += 2) { + recdat.data[i / 2] = databuf[7 + i]; + recdat.data[i / 2] = (recdat.data[i / 2] << 8) | databuf[8 + i]; + } + } + else if (recdat.command == 0x81) { + // Response for reading the page from the register + recdat.addr = databuf[4]; + recdat.bytelen = databuf[5]; + for (uint16_t i = 0; i < recdat.bytelen; i++) { + recdat.data[i] = databuf[6 + i]; + //recdat.data[i] = (recdat.data[i] << 8 )| databuf[7 + i]; + } + } + else { + ZERO(databuf); + recnum = 0; + // Receive the wrong data + return -1; + } + ZERO(databuf); + recnum = 0; + + return 2; +} + +void RTS::sendData() { + if (snddat.head[0] == FHONE && snddat.head[1] == FHTWO && snddat.len >= 3) { + databuf[0] = snddat.head[0]; + databuf[1] = snddat.head[1]; + databuf[2] = snddat.len; + databuf[3] = snddat.command; + // To write data to the register + if (snddat.command == 0x80) { + databuf[4] = snddat.addr; + for (uint16_t i = 0; i < snddat.len - 2; i++) + databuf[5 + i] = snddat.data[i]; + } + else if (snddat.len == 3 && snddat.command == 0x81) { + // To read data from the register + databuf[4] = snddat.addr; + databuf[5] = snddat.bytelen; + } + else if (snddat.command == 0x82) { + // To write data to the variate + databuf[4] = snddat.addr >> 8; + databuf[5] = snddat.addr & 0xFF; + for (uint16_t i = 0; i < snddat.len - 3; i += 2) { + databuf[6 + i] = snddat.data[i/2] >> 8; + databuf[7 + i] = snddat.data[i/2] & 0xFF; + } + } + else if (snddat.len == 4 && snddat.command == 0x83) { + // To read data from the variate + databuf[4] = snddat.addr >> 8; + databuf[5] = snddat.addr & 0xFF; + databuf[6] = snddat.bytelen; + } + for (uint16_t i = 0; i < snddat.len + 3; i++) + LCD_SERIAL.write(databuf[i]); + + ZERO(&snddat); + ZERO(databuf); + snddat.head[0] = FHONE; + snddat.head[1] = FHTWO; + } +} + +void RTS::sendData(const String &s, const uint32_t addr, const uint8_t cmd/*=VarAddr_W*/) { + if (s.length() < 1) return; + sendData(s.c_str(), addr, cmd); +} + +void RTS::sendData(const char str[], const uint32_t addr, const uint8_t cmd/*=VarAddr_W*/) { + int16_t len = strlen(str); + if (len > 0) { + databuf[0] = FHONE; + databuf[1] = FHTWO; + databuf[2] = 3 + len; + databuf[3] = cmd; + databuf[4] = addr >> 8; + databuf[5] = addr & 0x00FF; + for (int16_t i = 0; i < len; i++) databuf[6 + i] = str[i]; + for (int16_t i = 0; i < len + 6; i++) LCD_SERIAL.write(databuf[i]); + ZERO(databuf); + } +} + +void RTS::sendData(const char c, const uint32_t addr, const uint8_t cmd/*=VarAddr_W*/) { + snddat.command = cmd; + snddat.addr = addr; + snddat.data[0] = uint32_t(c); + snddat.data[0] = snddat.data[0] << 8; + snddat.len = 5; + sendData(); +} + +void RTS::sendData(const int16_t n, const uint32_t addr, const uint8_t cmd/*=VarAddr_W*/) { + if (cmd == VarAddr_W) { + if (n > 0xFFFF) { + snddat.data[0] = n >> 16; + snddat.data[1] = n & 0xFFFF; + snddat.len = 7; + } + else { + snddat.data[0] = n; + snddat.len = 5; + } + } + else if (cmd == RegAddr_W) { + snddat.data[0] = n; + snddat.len = 3; + } + else if (cmd == VarAddr_R) { + snddat.bytelen = n; + snddat.len = 4; + } + snddat.command = cmd; + snddat.addr = addr; + sendData(); +} + +void RTS::sendData(const uint32_t n, const uint32_t addr, const uint8_t cmd/*=VarAddr_W*/) { + if (cmd == VarAddr_W) { + if (n > 0xFFFF) { + snddat.data[0] = n >> 16; + snddat.data[1] = n & 0xFFFF; + snddat.len = 7; + } + else { + snddat.data[0] = n; + snddat.len = 5; + } + } + else if (cmd == VarAddr_R) { + snddat.bytelen = n; + snddat.len = 4; + } + snddat.command = cmd; + snddat.addr = addr; + sendData(); +} + +void RTS::sdCardStop() { + waitway = 7; + change_page_number = ID_Home_D; + card.flag.abort_sd_printing = true; + + IF_DISABLED(SD_ABORT_NO_COOLDOWN, thermalManager.disable_all_heaters()); + print_job_timer.reset(); + + thermalManager.setTargetHotend(0, 0); + thermalManager.setTargetBed(0); + updateTempE0(); + updateTempBed(); + thermalManager.zero_fan_speeds(); + wait_for_heatup = wait_for_user = false; + poweroff_continue = false; + #if ALL(SDSUPPORT, POWER_LOSS_RECOVERY) + if (card.flag.mounted) card.removeJobRecoveryFile(); + #endif + #ifdef EVENT_GCODE_SD_STOP + queue.inject(F(EVENT_GCODE_SD_STOP)); + #endif + + // Shut down the stepper motor. + //queue.enqueue_now(F("M84")); + sendData(0, MOTOR_FREE_ICON_VP); + + sendData(0, PRINT_PROCESS_ICON_VP); + sendData(0, PRINT_PROCESS_VP); + delay(2); + for (uint8_t j = 0; j < 20; j++) { + sendData(0, PRINT_FILE_TEXT_VP + j); // Clean screen + sendData(0, SELECT_FILE_TEXT_VP + j); // Clean filename + } +} + +void RTS::handleData() { + int16_t checkKey = -1; + // For waiting + if (waitway > 0) { + memset(&recdat, 0, sizeof(recdat)); + recdat.head[0] = FHONE; + recdat.head[1] = FHTWO; + return; + } + for (uint16_t i = 0; Addrbuf[i] != 0; i++) { + if (recdat.addr == Addrbuf[i]) { + if (Addrbuf[i] >= ChangePageKey) checkKey = i; + break; + } + } + + if (checkKey < 0) { + ZERO(&recdat); + recdat.head[0] = FHONE; + recdat.head[1] = FHTWO; + return; + } + + switch (checkKey) { + case MainPageKey: // Front page + if (recdat.data[0] == 1) { // Select print file + update_sd = true; + cardRec.recordcount = -1; + if (card.flag.mounted) { + for (uint8_t j = 0; j < 20; j++) sendData(0, SELECT_FILE_TEXT_VP + j); + gotoPage(ID_Page1_L, ID_Page1_D); + } + else + gotoPage(ID_BrowseNoSd_L, ID_BrowseNoSd_D); + } + else if (recdat.data[0] == 2) { // Complete printing + waitway = 7; + card.flag.abort_sd_printing = true; + quickstop_stepper(); + print_job_timer.reset(); + queue.clear(); + sendData(0, MOTOR_FREE_ICON_VP); + sendData(0, PRINT_PROCESS_ICON_VP); + sendData(0, PRINT_PROCESS_VP); + delay(2); + sendData(0, PRINT_TIME_HOUR_VP); + sendData(0, PRINT_TIME_MIN_VP); + sendData(0, PRINT_SURPLUS_TIME_HOUR_VP); + sendData(0, PRINT_SURPLUS_TIME_MIN_VP); + + change_page_number = ID_Home_D; + } + else if (recdat.data[0] == 3) { // Enter the tone interface + waitway = 6; + queue.enqueue_now(F("G28\nG1 F200 Z0.0")); + updateFan0(); + sendData(1, Wait_VP); + gotoPage(ID_AutoHome_L, ID_AutoHome_D); + } + else if (recdat.data[0] == 4) { // Enter the settings interface + gotoPage(ID_Settings_L, ID_Settings_D); + } + else if (recdat.data[0] == 5) { // Enter the temperature interface + updateFan0(); + gotoPage(ID_TempChange_L, ID_TempChange_D); + } + else if (recdat.data[0] == 6) { // Light mode + dark_mode = false; + BL24CXX::writeOneByte(FONT_EEPROM, dark_mode); + gotoPage(ID_Home_L); + change_page_number = ID_Home_L; + settings.save(); + } + else if (recdat.data[0] == 7) { // Dark mode + dark_mode = true; + BL24CXX::writeOneByte(FONT_EEPROM, dark_mode); + gotoPage(ID_Home_D); + change_page_number = ID_Home_D; + settings.save(); + } + break; + + case AdjustmentKey: // Adjust the interface + if (recdat.data[0] == 1) { // Enter the adjustment interface + updateFan0(); + sendData(probe.offset.z * 100, AUTO_BED_LEVEL_ZOFFSET_VP); + gotoPage(ID_PrintAdjust5_L, ID_PrintAdjust5_D); + } + else if (recdat.data[0] == 2) { // Return to print interface + if (start_print_flag) { + gotoPage(ID_PrintHeating_L, ID_PrintHeating_D); + } + else if (!sdcard_pause_check) { + gotoPage(ID_PrintResume_L, ID_PrintResume_D); + } + else { + refreshTime(); + start_print_flag = false; + } + } + else if (recdat.data[0] == 4) { + updateTempE0(); + gcode.process_subcommands_now(F("M600")); + } + break; + + case FanSpeedKey: // Set fan speed + fan_speed = recdat.data[0]; + thermalManager.set_fan_speed(0, fan_speed); + updateFan0(); + break; + + case PrintSpeedKey: // Set the print speed + feedrate_percentage = recdat.data[0]; + sendData(feedrate_percentage, PRINT_SPEED_RATE_VP); + break; + + case StopPrintKey: // Stop printing + if ((recdat.data[0] == 1) || (recdat.data[0] == 0xF1)) { + sendData(1, Wait_VP); + gotoPage(ID_Processing_L, ID_Processing_D); + sendData(0, PRINT_TIME_HOUR_VP); + sendData(0, PRINT_TIME_MIN_VP); + sendData(0, PRINT_SURPLUS_TIME_HOUR_VP); + sendData(0, PRINT_SURPLUS_TIME_MIN_VP); + sdCardStop(); + print_state = 0; + update_time_value = 0; + } + else if (recdat.data[0] == 0xF0) { + if (start_print_flag) + gotoPage(ID_PrintHeating_L, ID_PrintHeating_D); + else if (!sdcard_pause_check) + gotoPage(ID_PrintResume_L, ID_PrintResume_D); + else { + refreshTime(); + start_print_flag = false; + } + } + break; + + case PausePrintKey: // Suspend printing + if (recdat.data[0] == 0xF0) break; + + if (recdat.data[0] == 0xF1) { + sendData(1, Wait_VP); + gotoPage(ID_Processing_L, ID_Processing_D); + // Reject to receive cmd + change_page_number = ID_PrintResume_D; + waitway = 1; + card.pauseSDPrint(); + pause_action_flag = true; + pause_flag = true; + update_time_value = 0; + sdcard_pause_check = false; + print_state = 1; + } + break; + + case ResumePrintKey: // Restore printing + if (recdat.data[0] == 1) { // Portal restoration printing + if (TERN0(CHECKFILAMENT, runout.filament_ran_out)) gotoPage(ID_FilamentOut_L, ID_FilamentOut_D); + //sendData(1, Wait_VP); + //gotoPage(ID_Processing_L, ID_Processing_D); + card.startOrResumeFilePrinting(); + update_time_value = 0; + sdcard_pause_check = true; + pause_action_flag = false; + pause_flag = false; + refreshTime(); + print_state = 2; + } + else if (recdat.data[0] == 2) { + #if ENABLED(CHECKFILAMENT) + if (runout.filament_ran_out) { + gotoPage(ID_FilamentOut_L, ID_FilamentOut_D); + } + else { + sendData(1, Wait_VP); + gotoPage(ID_Processing_L, ID_Processing_D); + card.startOrResumeFilePrinting(); + print_job_timer.start(); + + update_time_value = 0; + pause_action_flag = false; + sdcard_pause_check = true; + refreshTime(); + print_state = 2; + } + #endif + } + else if (recdat.data[0] == 3) { // Electricity disconnection is restored to print + if (poweroff_continue) { + #if ENABLED(CHECKFILAMENT) + sendData(runout.filament_ran_out ? 0 : 1, CHANGE_FILAMENT_ICON_VP); + gotoPage(ID_Change_L, ID_Change_D); + #endif + } + else if (poweroff_continue == false) { + if (TERN0(CHECKFILAMENT, runout.filament_ran_out)) { gotoPage(ID_FilamentOut_L, ID_FilamentOut_D); break; } + + char cmd[30]; + sprintf_P(cmd, M23_STR, cardRec.filename[FilenamesCount]); + for (char *c = &cmd[4]; *c; c++) *c = tolower(*c); + queue.enqueue_one_now(cmd); + delay(20); + queue.enqueue_now_P(M24_STR); + + // Clean screen + for (uint8_t j = 0; j < 20; j++) sendData(0, PRINT_FILE_TEXT_VP + j); + + sendData(cardRec.display_filename[cardRec.recordcount], PRINT_FILE_TEXT_VP); + delay(2); + TERN_(BABYSTEPPING, sendData(0, AUTO_BED_LEVEL_ZOFFSET_VP)); + feedrate_percentage = 100; + sendData(feedrate_percentage, PRINT_SPEED_RATE_VP); + zprobe_zoffset = last_zoffset; + sendData(probe.offset.z * 100, AUTO_BED_LEVEL_ZOFFSET_VP); + poweroff_continue = true; + gotoPage(ID_PrintHeating_L, ID_PrintHeating_D); + sdcard_pause_check = true; + } + } + else if (recdat.data[0] == 4) { // Card withdrawing to print + if (!card.flag.mounted) { + update_sd = true; + sdCardUpdate(); + gotoPage(ID_MediaFail_L, ID_MediaFail_D); + } + else { + if (TERN0(CHECKFILAMENT, runout.filament_ran_out)) gotoPage(ID_FilamentOut_L, ID_FilamentOut_D); + sendData(1, Wait_VP); + gotoPage(ID_Processing_L, ID_Processing_D); + card.startOrResumeFilePrinting(); + update_time_value = 0; + sdcard_pause_check = true; + pause_action_flag = false; + print_state = 2; + for (uint16_t i = 0;i < cardRec.Filesum; i++) + if (!strcmp(cardRec.filename[i], &recovery.info.sd_filename[1])) + sendData(cardRec.display_filename[i], PRINT_FILE_TEXT_VP); + + refreshTime(); + } + } + break; + + case CoolScreenKey: // Temperature interface + if (recdat.data[0] == 1) { // PLA Preheat + thermalManager.setTargetHotend(PREHEAT_1_TEMP_HOTEND, 0); + updateTempE0(); + thermalManager.setTargetBed(PREHEAT_1_TEMP_BED); + updateTempBed(); + } + else if (recdat.data[0] == 2) { // ABS Preheat + thermalManager.setTargetHotend(PREHEAT_2_TEMP_HOTEND, 0); + updateTempE0(); + thermalManager.setTargetBed(PREHEAT_2_TEMP_BED); + updateTempBed(); + } + else if (recdat.data[0] == 3) { // Back to Home page + gotoPage(ID_Home_L, ID_Home_D); + } + else if (recdat.data[0] == 0xF1) { // Cool down + #if FAN_COUNT > 0 + FANS_LOOP(i) thermalManager.set_fan_speed(i, 255); + #endif + updateFan0(); + thermalManager.setTargetHotend(0, 0); + updateTempE0(); delay(1); + + #if HAS_HEATED_BED + thermalManager.setTargetBed(0); + updateTempBed(); delay(1); + #endif + + gotoPage(ID_TempChange_L, ID_TempChange_D); + } + else if (recdat.data[0] == 0xF0) { + gotoPage(ID_TempChange_L, ID_TempChange_D); + } + break; + + #if HAS_HOTEND + case Heater0TempEnterKey: + thermalManager.setTargetHotend(recdat.data[0], 0); + updateTempE0(); + break; + #endif + + #if HAS_HEATED_BED + case HotBedTempEnterKey: + thermalManager.setTargetBed(recdat.data[0]); + updateTempBed(); + break; + #endif + + case Heater0LoadEnterKey: + filament_load_0 = float(recdat.data[0]) / 10.0f; + break; + + case AxisPageSelectKey: // Mobile shaft interface + switch (recdat.data[0]) { + case 1: + AxisUnitMode = 1; + axis_unit = 10.0; + gotoPage(ID_Move10_L, ID_Move10_D); + break; + case 2: + AxisUnitMode = 2; + axis_unit = 1.0; + gotoPage(ID_Move1_L, ID_Move1_D); + break; + case 3: + AxisUnitMode = 3; + axis_unit = 0.1; + gotoPage(ID_Move01_L, ID_Move01_D); + break; + case 4: + waitway = 4; + queue.enqueue_now(F("G28")); + update_time_value = 0; + sendData(1, Wait_VP); + gotoPage(ID_AutoHome_L, ID_AutoHome_D); + sendData(0, MOTOR_FREE_ICON_VP); + break; + case 5: // Unlock motor + queue.enqueue_now(F("M84")); + sendData(1, MOTOR_FREE_ICON_VP); + break; + } + break; + + case SettingScreenKey: // Set interface + switch (recdat.data[0]) { + #if HAS_HOTEND + case 2: // Go to Reload Filament + filament_load_0 = 10.0f; + sendData(filament_load_0 * 10.0f, HEAD0_FILAMENT_LOAD_DATA_VP); + updateTempE0(); + delay(2); + gotoPage(ID_Load_L, ID_Load_D); + break; + #endif + + case 3: // Go to Move Axis + AxisUnitMode = 1; + TERN_(HAS_X_AXIS, sendData(current_position.x * 10.0f, AXIS_X_COORD_VP)); + TERN_(HAS_Y_AXIS, sendData(current_position.y * 10.0f, AXIS_Y_COORD_VP)); + TERN_(HAS_Z_AXIS, sendData(current_position.z * 10.0f, AXIS_Z_COORD_VP)); + gotoPage(ID_Move10_L, ID_Move10_D); + break; + + case 4: // Go to Advanced Settings + TERN_(LIN_ADVANCE, sendData(planner.extruder_advance_K[0] * 100, Advance_K_VP)); + gotoPage(ID_AdvWarn_L, ID_AdvWarn_D); + break; + + case 5: // Information + sendPrinterInfo(); + sendData(MARLINVERSION, MARLIN_VERSION_TEXT_VP); + gotoPage(ID_Info_L, ID_Info_D); + break; + + case 7: // Return + gotoPage(ID_Home_L, ID_Home_D); + break; + } + break; + + case SettingBackKey: // Adjust interface Return button + if (recdat.data[0] == 1) { + update_time_value = RTS_UPDATE_VALUE; + //settings.save(); + gotoPage(ID_Home_L, ID_Home_D); + } + else if (recdat.data[0] == 2) { + if (!planner.has_blocks_queued()) { + gotoPage(ID_Level5_L, ID_Level5_D); + } + } + break; + + case BedLevelFunKey: // Leveling interface + if (recdat.data[0] == 1) { // Save the button + settings.save(); + waitway = 6; + queue.enqueue_now(F("G28Z\nG1 F200 Z0.0")); + } + else if (recdat.data[0] == 4) { + queue.enqueue_now(F("G34\nG1 F200 Z0.0")); + } + else if (recdat.data[0] == 5) { + #if ENABLED(FIX_MOUNTED_PROBE) + waitway = 3; + sendData(1, AUTO_BED_LEVEL_ICON_VP); + queue.enqueue_now(F("G29")); + #endif + } + + if (recdat.data[0] == 11) settings.save(); // Adjust interface saving + + sendData(0, MOTOR_FREE_ICON_VP); + break; + + #if HAS_X_AXIS + case XaxismoveKey: { + waitway = 4; + current_position.x = float(recdat.data[0] >= 32768 ? recdat.data[0] - 65536 : recdat.data[0]) / 10.0f; + LIMIT(current_position.x, X_MIN_POS, X_MAX_POS); + RTS_line_to_current(X_AXIS); + sendData(current_position.x * 10.0f, AXIS_X_COORD_VP); + sendData(0, MOTOR_FREE_ICON_VP); + waitway = 0; + } break; + #endif + + #if HAS_Y_AXIS + case YaxismoveKey: { + waitway = 4; + current_position.y = float(recdat.data[0]) / 10.0f; + LIMIT(current_position.y, Y_MIN_POS, Y_MAX_POS); + RTS_line_to_current(Y_AXIS); + sendData(current_position.y * 10.0f, AXIS_Y_COORD_VP); + sendData(0, MOTOR_FREE_ICON_VP); + waitway = 0; + } break; + #endif + + #if HAS_Z_AXIS + case ZaxismoveKey: { + waitway = 4; + current_position.z = float(recdat.data[0]) / 10.0f; + LIMIT(current_position.z, Z_MIN_POS, Z_MAX_POS); + RTS_line_to_current(Z_AXIS); + sendData(current_position.z * 10.0f, AXIS_Z_COORD_VP); + sendData(0, MOTOR_FREE_ICON_VP); + waitway = 0; + } break; + #endif + + case FilamentLoadKey: // Change + switch (recdat.data[0]) { + case 1: + if (planner.has_blocks_queued()) break; + if (TERN0(CHECKFILAMENT, runout.filament_ran_out)) gotoPage(ID_NoFilament_L, ID_NoFilament_D); + current_position.e -= filament_load_0; + + if (thermalManager.degHotend(0) < change_filament_temp_0 - 5) { + sendData(int16_t(change_filament_temp_0), CHANGE_FILAMENT0_TEMP_VP); + gotoPage(ID_LoadCold_L, ID_LoadCold_D); + } + else { + RTS_line_to_current(E_AXIS); + sendData(filament_load_0 * 10.0f, HEAD0_FILAMENT_LOAD_DATA_VP); + } + break; + + case 2: + if (planner.has_blocks_queued()) break; + if (TERN0(CHECKFILAMENT, runout.filament_ran_out)) gotoPage(ID_NoFilament_L, ID_NoFilament_D); + current_position.e += filament_load_0; + + if (thermalManager.degHotend(0) < change_filament_temp_0 - 5) { + sendData(int16_t(change_filament_temp_0), CHANGE_FILAMENT0_TEMP_VP); + gotoPage(ID_LoadCold_L, ID_LoadCold_D); + } + else { + RTS_line_to_current(E_AXIS); + sendData(filament_load_0 * 10.0f, HEAD0_FILAMENT_LOAD_DATA_VP); + } + break; + + case 3: + updateTempE0(); + sendData(filament_load_0 * 10.0f, HEAD0_FILAMENT_LOAD_DATA_VP); + gotoPage(ID_LoadCancel_L, ID_LoadCancel_D); + break; + + case 4: + if (planner.has_blocks_queued()) break; + thermalManager.setTargetHotend(0, 0); + updateTempE0(); + gotoPage(ID_Load_L, ID_Load_D); + filament_load_0 = 10.0f; + sendData(filament_load_0 * 10.0f, HEAD0_FILAMENT_LOAD_DATA_VP); + break; + + case 5: + if (planner.has_blocks_queued()) break; + thermalManager.setTargetHotend(change_filament_temp_0, 0); + updateTempE0(); + gotoPage(ID_LoadHeating_L, ID_LoadHeating_D); + heatway = 1; + break; + + case 6: + if (planner.has_blocks_queued()) break; + filament_load_0 = 10.0f; + sendData(filament_load_0 * 10.0f, HEAD0_FILAMENT_LOAD_DATA_VP); + gotoPage(ID_Load_L, ID_Load_D); + break; + + case 8: + if (planner.has_blocks_queued()) break; + thermalManager.setTargetHotend(change_filament_temp_0, 0); + updateTempE0(); + gotoPage(ID_LoadHeating_L, ID_LoadHeating_D); + heatway = 1; + break; + } + break; + + case FilamentCheckKey: + switch (recdat.data[0]) { + case 1: + TERN_(CHECKFILAMENT, gotoPage(runout.filament_ran_out ? ID_NoFilament_L : ID_Load_L, runout.filament_ran_out ? ID_NoFilament_D : ID_Load_D)); // TODO: add page enum + break; + case 2: + gotoPage(ID_Settings_L, ID_Settings_D); + filament_load_0 = 10.0f; + break; + } + break; + + case PowerContinuePrintKey: // Power off + switch (recdat.data[0]) { + case 1: + if (!poweroff_continue) break; + power_off_type_yes = true; + update_time_value = 0; + gotoPage(ID_PrintHeating_L, ID_PrintHeating_D); + queue.enqueue_now(F("M1000")); + + poweroff_continue = true; + sdcard_pause_check = true; + zprobe_zoffset = probe.offset.z; + sendData(probe.offset.z * 100, AUTO_BED_LEVEL_ZOFFSET_VP); + sendData(feedrate_percentage, PRINT_SPEED_RATE_VP); + print_state = 2; + break; + + case 2: + update_time_value = RTS_UPDATE_VALUE; + gotoPage(ID_Home_L, ID_Home_D); + poweroff_continue = false; + sdcard_pause_check = true; + queue.clear(); + quickstop_stepper(); + print_job_timer.abort(); + thermalManager.disable_all_heaters(); + print_job_timer.reset(); + + #if ALL(SDSUPPORT, POWER_LOSS_RECOVERY) + if (card.flag.mounted) { + card.removeJobRecoveryFile(); + recovery.info.valid_head = 0; + recovery.info.valid_foot = 0; + recovery.close(); + } + #endif + + wait_for_heatup = wait_for_user = false; + print_state = 0; + break; + } + break; + + case SelectFileKey: + if (!sdDetected()) break; + if (recdat.data[0] > cardRec.Filesum) break; + + cardRec.recordcount = recdat.data[0] - 1; + for (uint8_t j = 0; j < 10; j++) { + sendData(0, SELECT_FILE_TEXT_VP + j); + sendData(0, PRINT_FILE_TEXT_VP + j); + } + sendData(cardRec.display_filename[cardRec.recordcount], SELECT_FILE_TEXT_VP); + sendData(cardRec.display_filename[cardRec.recordcount], PRINT_FILE_TEXT_VP); + delay(2); + + for (uint16_t j = 1; j <= cardRec.Filesum; j++) + sendData(uint32_t(0x738E), FilenameNature + j * 16); + + sendData(uint32_t(0x041F), FilenameNature + recdat.data[0] * 16); + sendData(1, FILE1_SELECT_ICON_VP + (recdat.data[0] - 1)); + break; + + case PrintFileKey: // List of print files + switch (recdat.data[0]) { + case 1: { + if (!sdDetected()) break; + if (cardRec.recordcount < 0) break; + char cmd[30]; + char *c; + sprintf_P(cmd, M23_STR, cardRec.filename[cardRec.recordcount]); + for (c = &cmd[4]; *c; c++) *c = tolower(*c); + + ZERO(cmdbuf); + strncpy(cmdbuf, cmd, 20); + FilenamesCount = cardRec.recordcount; + + #if ENABLED(CHECKFILAMENT) + if (runout.filament_ran_out) { + gotoPage(ID_FilamentOut_L, ID_FilamentOut_D); + sdcard_pause_check = false; + break; + } + #endif + + queue.enqueue_one_now(cmd); delay(20); + queue.enqueue_now_P(M24_STR); + + // Clean screen + for (uint8_t j = 0; j < 20; j++) sendData(0, PRINT_FILE_TEXT_VP + j); + + sendData(cardRec.display_filename[cardRec.recordcount], PRINT_FILE_TEXT_VP); + delay(2); + + TERN_(BABYSTEPPING, sendData(0, AUTO_BED_LEVEL_ZOFFSET_VP)); + + feedrate_percentage = 100; + sendData(feedrate_percentage, PRINT_SPEED_RATE_VP); + #if HAS_BED_PROBE + zprobe_zoffset = last_zoffset; + sendData(probe.offset.z * 100, AUTO_BED_LEVEL_ZOFFSET_VP); + #endif + + poweroff_continue = true; + gotoPage(ID_PrintHeating_L, ID_PrintHeating_D); + change_page_number = ID_PrintStatus_D; + update_time_value = 0; + start_print_flag = true; + print_state = 2; + } break; + + case 2: gotoPage(ID_Page2_L, ID_Page2_D); break; + case 3: gotoPage(ID_Page1_L, ID_Page1_D); break; + case 4: gotoPage(ID_Page3_L, ID_Page3_D); break; + case 5: gotoPage(ID_Page2_L, ID_Page2_D); break; + case 6: gotoPage(ID_Page4_L, ID_Page4_D); break; + case 7: gotoPage(ID_Page3_L, ID_Page3_D); break; + case 8: gotoPage(ID_Home_L, ID_Home_D); break; + } + break; + + case StoreMemoryKey: // Initialization + if (recdat.data[0] == 0xF1) { + settings.init_eeprom(); + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + bool zig = true; + int8_t inStart, inStop, inInc, showcount; + showcount = 0; + for (int8_t y = 0; y < GRID_MAX_POINTS_Y; y++) { + // Away from origin + if (zig) { + inStart = 0; + inStop = GRID_MAX_POINTS_X; + inInc = 1; + } + else { + // Towards origin + inStart = GRID_MAX_POINTS_X - 1; + inStop = -1; + inInc = -1; + } + zig ^= true; + for (int8_t x = inStart; x != inStop; x += inInc) { + sendData(bedlevel.z_values[x][y] * 100, AUTO_BED_LEVEL_1POINT_VP + showcount * 2); + showcount++; + } + } + #endif + sendData(Beep, SoundAddr); + zprobe_zoffset = 0; + last_zoffset = 0; + sendData(probe.offset.z * 100, AUTO_BED_LEVEL_ZOFFSET_VP); + gotoPage(ID_Home_L, ID_Home_D); + } + else if (recdat.data[0] == 0xF0) { + gotoPage(ID_Settings_L, ID_Settings_D); + } + break; + + case AdvancedKey: // Advanced setting interface + switch (recdat.data[0]) { + case 1: { // PID + #if ENABLED(PIDTEMP) + const float hot_p = thermalManager.temp_hotend[0].pid.p() * 100.0f, + hot_i = (thermalManager.temp_hotend[0].pid.i() / 8.0f * 10000.0f) + 0.00001f, + hot_d = thermalManager.temp_hotend[0].pid.d() * 8.0f; + sendData(hot_p, Nozzle_P_VP); + sendData(hot_i, Nozzle_I_VP); + sendData(hot_d, Nozzle_D_VP); + #endif + + #if ENABLED(PIDTEMPBED) + const float bed_p = thermalManager.temp_bed.pid.p() * 100.0f, + bed_i = (thermalManager.temp_bed.pid.i() / 8.0f * 10000.0f) + 0.0001f, + bed_d = thermalManager.temp_bed.pid.d() * 0.8f; + + sendData(bed_p, Hot_Bed_P_VP); + sendData(bed_i, Hot_Bed_I_VP); + sendData(bed_d, Hot_Bed_D_VP); + #endif + gotoPage(ID_TempPID_L, ID_TempPID_D); + } break; + + case 2: // Speed + TERN_(HAS_X_AXIS, sendData(planner.settings.max_feedrate_mm_s[X_AXIS], Vmax_X_VP)); + TERN_(HAS_Y_AXIS, sendData(planner.settings.max_feedrate_mm_s[Y_AXIS], Vmax_Y_VP)); + TERN_(HAS_Z_AXIS, sendData(planner.settings.max_feedrate_mm_s[Z_AXIS], Vmax_Z_VP)); + TERN_(HAS_HOTEND, sendData(planner.settings.max_feedrate_mm_s[E_AXIS], Vmax_E_VP)); + gotoPage(ID_Velocity_L, ID_Velocity_D); + break; + + case 3: // Acceleration + sendData(planner.settings.acceleration, Accel_VP); + sendData(planner.settings.travel_acceleration, A_Travel_VP); + + TERN_(HAS_X_AXIS, sendData(planner.settings.max_acceleration_mm_per_s2[X_AXIS], Amax_X_VP)); + TERN_(HAS_Y_AXIS, sendData(planner.settings.max_acceleration_mm_per_s2[Y_AXIS], Amax_Y_VP)); + TERN_(HAS_Z_AXIS, sendData(planner.settings.max_acceleration_mm_per_s2[Z_AXIS], Amax_Z_VP)); + #if HAS_HOTEND + sendData(planner.settings.retract_acceleration, A_Retract_VP); + sendData(planner.settings.max_acceleration_mm_per_s2[E_AXIS], Amax_E_VP); + #endif + gotoPage(ID_Accel_L, ID_Accel_D); + break; + + #if ENABLED(CLASSIC_JERK) + case 4: // Jerk + TERN_(HAS_X_AXIS, sendData(planner.max_jerk.x * 10.0f, Jerk_X_VP)); + TERN_(HAS_Y_AXIS, sendData(planner.max_jerk.y * 10.0f, Jerk_Y_VP)); + TERN_(HAS_Z_AXIS, sendData(planner.max_jerk.z * 10.0f, Jerk_Z_VP)); + TERN_(HAS_HOTEND, sendData(planner.max_jerk.e * 10.0f, Jerk_E_VP)); + gotoPage(ID_Jerk_L, ID_Jerk_D); + break; + #endif + + case 5: // Steps + TERN_(HAS_X_AXIS, sendData(planner.settings.axis_steps_per_mm[X_AXIS] * 10.0f, Steps_X_VP)); + TERN_(HAS_Y_AXIS, sendData(planner.settings.axis_steps_per_mm[Y_AXIS] * 10.0f, Steps_Y_VP)); + TERN_(HAS_Z_AXIS, sendData(planner.settings.axis_steps_per_mm[Z_AXIS] * 10.0f, Steps_Z_VP)); + TERN_(HAS_HOTEND, sendData(planner.settings.axis_steps_per_mm[E_AXIS] * 10.0f, Steps_E_VP)); + gotoPage(ID_Steps_L, ID_Steps_D); + break; + + case 6: gotoPage(ID_Settings_L, ID_Settings_D); break; // Return + + #if ENABLED(LIN_ADVANCE) + case 7: // Confirm + sendData(planner.extruder_advance_K[0] * 100, Advance_K_VP); + gotoPage(ID_Advanced_L, ID_Advanced_D); + break; + #endif + + case 8: gotoPage(ID_SettingsTMC_L, ID_SettingsTMC_D); break; // TMC + + #if ENABLED(EEPROM_SETTINGS) + case 9: settings.save(); break; // Save Settings + #endif + } + break; + + #if ENABLED(PIDTEMP) + case Nozzle_P: SET_HOTEND_PID(Kp, 0, float(recdat.data[0]) / 100.0f); thermalManager.updatePID(); break; + case Nozzle_I: SET_HOTEND_PID(Ki, 0, float(recdat.data[0]) * 8.0f / 10000.0f); thermalManager.updatePID(); break; + case Nozzle_D: SET_HOTEND_PID(Kd, 0, float(recdat.data[0]) / 8.0f); thermalManager.updatePID(); break; + #endif + + #if ENABLED(PIDTEMPBED) + case Hot_Bed_P: thermalManager.temp_bed.pid.Kp = float(recdat.data[0]) / 100.0f; break; + case Hot_Bed_I: thermalManager.temp_bed.pid.Ki = float(recdat.data[0]) * 8.0f / 10000.0f; break; + case Hot_Bed_D: thermalManager.temp_bed.pid.Kd = float(recdat.data[0]) / 0.8f; break; + #endif + + #if HAS_X_AXIS + case Vmax_X: planner.settings.max_feedrate_mm_s[X_AXIS] = recdat.data[0]; break; + case Amax_X: planner.settings.max_acceleration_mm_per_s2[X_AXIS] = recdat.data[0]; break; + case Steps_X: planner.settings.axis_steps_per_mm[X_AXIS] = float(recdat.data[0]) / 10.0f; break; + #if ENABLED(CLASSIC_JERK) + case Jerk_X: planner.max_jerk.x = float(recdat.data[0]) / 10.0f; break; + #endif + #endif + #if HAS_Y_AXIS + case Vmax_Y: planner.settings.max_feedrate_mm_s[Y_AXIS] = recdat.data[0]; break; + case Amax_Y: planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = recdat.data[0]; break; + case Steps_Y: planner.settings.axis_steps_per_mm[Y_AXIS] = float(recdat.data[0]) / 10.0f; break; + #if ENABLED(CLASSIC_JERK) + case Jerk_Y: planner.max_jerk.y = float(recdat.data[0]) / 10.0f; break; + #endif + #endif + #if HAS_Z_AXIS + case Vmax_Z: planner.settings.max_feedrate_mm_s[Z_AXIS] = recdat.data[0]; break; + case Amax_Z: planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = recdat.data[0]; break; + case Steps_Z: planner.settings.axis_steps_per_mm[Z_AXIS] = float(recdat.data[0]) / 10.0f; break; + #if ENABLED(CLASSIC_JERK) + case Jerk_Z: planner.max_jerk.z = float(recdat.data[0]) / 10.0f; break; + #endif + #endif + #if HAS_HOTEND + case Vmax_E: planner.settings.max_feedrate_mm_s[E_AXIS] = recdat.data[0]; break; + case Amax_E: planner.settings.max_acceleration_mm_per_s2[E_AXIS] = recdat.data[0]; break; + case Steps_E: planner.settings.axis_steps_per_mm[E_AXIS] = float(recdat.data[0]) / 10.0f; break; + #if ENABLED(CLASSIC_JERK) + case Jerk_E: planner.max_jerk.e = float(recdat.data[0]) / 10.0f; break; + #endif + case A_Retract: planner.settings.retract_acceleration = recdat.data[0]; break; + #if ENABLED(LIN_ADVANCE) + case Advance_K: planner.extruder_advance_K[0] = float(recdat.data[0]) / 100.0f; break; + #endif + #endif + case Accel: planner.settings.acceleration = recdat.data[0]; break; + case A_Travel: planner.settings.travel_acceleration = recdat.data[0]; break; + + case AdvancedBackKey: gotoPage(ID_Advanced_L, ID_Advanced_D); break; + + #if HAS_FILAMENT_SENSOR + case FilamentChange: // Automatic material + switch (recdat.data[0]) { + case 1: if (FILAMENT_IS_OUT()) break; + case 2: + updateTempE0(); + wait_for_heatup = wait_for_user = false; + break; + case 3: pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; break; + case 4: pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT; break; + } + break; + #endif + + #if HAS_BED_PROBE + case ZoffsetUnitKey: // Zoffset unit + switch (recdat.data[0]) { + case 1: gotoPage(ID_PrintAdjust5_L, ID_PrintAdjust5_D); break; + case 2: gotoPage(ID_PrintAdjust1_L, ID_PrintAdjust1_D); break; + case 3: gotoPage(ID_Level5_L, ID_Level5_D); break; + case 4: gotoPage(ID_Level1_L, ID_Level1_D); break; + } + break; + + case ZOffsetKey: + last_zoffset = zprobe_zoffset; + zprobe_zoffset = float(recdat.data[0] >= 32767 ? recdat.data[0] - 65537 : recdat.data[0]) / 100.0f + 0.0001f; + if (WITHIN(zprobe_zoffset, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX)) + babystep.add_mm(Z_AXIS, zprobe_zoffset - last_zoffset); + probe.offset.z = zprobe_zoffset; + sendData(probe.offset.z * 100, AUTO_BED_LEVEL_ZOFFSET_VP); + break; + #endif + + #if HAS_TRINAMIC_CONFIG + + case TMCDriver: + switch (recdat.data[0]) { + case 1: // Current + #if AXIS_IS_TMC(X) + sendData(stepperX.getMilliamps(), Current_X_VP); + #endif + #if AXIS_IS_TMC(Y) + sendData(stepperY.getMilliamps(), Current_Y_VP); + #endif + #if AXIS_IS_TMC(Z) + sendData(stepperZ.getMilliamps(), Current_Z_VP); + #endif + #if AXIS_IS_TMC(E0) + sendData(stepperE0.getMilliamps(), Current_E_VP); + #endif + gotoPage(ID_DriverA_L, ID_DriverA_D); + break; + + case 2: // Threshold + TERN_(X_HAS_STEALTHCHOP, sendData(stepperX.get_pwm_thrs(), Threshold_X_VP)); + TERN_(Y_HAS_STEALTHCHOP, sendData(stepperY.get_pwm_thrs(), Threshold_Y_VP)); + TERN_(Z_HAS_STEALTHCHOP, sendData(stepperZ.get_pwm_thrs(), Threshold_Z_VP)); + TERN_(E0_HAS_STEALTHCHOP, sendData(stepperE0.get_pwm_thrs(), Threshold_E_VP)); + gotoPage(ID_DriverTrsh_L, ID_DriverTrsh_D); + break; + + #if ENABLED(SENSORLESS_HOMING) + case 3: // Sensorless + TERN_(X_SENSORLESS, sendData(stepperX.homing_threshold(), Sensorless_X_VP)); + TERN_(Y_SENSORLESS, sendData(stepperY.homing_threshold(), Sensorless_Y_VP)); + gotoPage(ID_DriverSens_L, ID_DriverSens_D); + break; + #endif + + case 4: gotoPage(ID_Advanced_L, ID_Advanced_D); break; + case 5: gotoPage(ID_SettingsTMC_L, ID_SettingsTMC_D); break; + } + break; + + #if AXIS_IS_TMC(X) + case Current_X: sprintf_P(cmd, PSTR("M906 X%i"), recdat.data[0]); queue.inject(cmd); break; + #endif + #if X_HAS_STEALTHCHOP + case Threshold_X: sprintf_P(cmd, PSTR("M913 X%i"), recdat.data[0]); queue.inject(cmd); break; + #endif + #if X_SENSORLESS + case Sensorless_X: sprintf_P(cmd, PSTR("M914 X%i"), recdat.data[0]); queue.inject(cmd); break; + #endif + + #if AXIS_IS_TMC(Y) + case Current_Y: sprintf_P(cmd, PSTR("M906 Y%i"), recdat.data[0]); queue.inject(cmd); break; + #endif + #if Y_HAS_STEALTHCHOP + case Threshold_Y: sprintf_P(cmd, PSTR("M913 Y%i"), recdat.data[0]); queue.inject(cmd); break; + #endif + #if Y_SENSORLESS + case Sensorless_Y: sprintf_P(cmd, PSTR("M914 Y%i"), recdat.data[0]); queue.inject(cmd); break; + #endif + + #if AXIS_IS_TMC(Z) + case Current_Z: sprintf_P(cmd, PSTR("M906 Z%i"), recdat.data[0]); queue.inject(cmd); break; + #endif + #if Z_HAS_STEALTHCHOP + case Threshold_Z: sprintf_P(cmd, PSTR("M913 Z%i"), recdat.data[0]); queue.inject(cmd); break; + #endif + + #if AXIS_IS_TMC(E0) + case Current_E: sprintf_P(cmd, PSTR("M906 E%i"), recdat.data[0]); queue.inject(cmd); break; + #endif + #if E0_HAS_STEALTHCHOP + case Threshold_E: sprintf_P(cmd, PSTR("M913 E%i"), recdat.data[0]); queue.inject(cmd); break; + #endif + + #endif // HAS_TRINAMIC_CONFIG + + case ChangePageKey: + switch (change_page_number) { + case ID_Resume_D: case ID_Settings_L: break; // This makes no sense & change_page_number is never set to those values + + case ID_PrintStatus_D: + refreshTime(); + start_print_flag = false; + break; + + case ID_PrintResume_D: gotoPage(ID_PrintResume_L, ID_PrintResume_D); break; + + default: + if (card.isPrinting()) { + for (uint16_t i = 0;i < cardRec.Filesum; i++) + if (!strcmp(cardRec.filename[i], &recovery.info.sd_filename[1])) + sendData(cardRec.display_filename[i], PRINT_FILE_TEXT_VP); + refreshTime(); + } + else + gotoPage(change_page_number); + break; + } + + for (uint8_t i = 0; i < MAX_NUM_FILES; i++) + for (uint8_t j = 0; j < 20; j++) + sendData(0, FILE1_TEXT_VP + i * 20 + j); + + for (uint16_t i = 0; i < cardRec.Filesum; i++) { + for (uint8_t j = 0; j < 20; j++) sendData(0, cardRec.addr[i] + j); + sendData(uint32_t(0x738E), FilenameNature + (i + 1) * 16); + } + + for (uint8_t j = 0; j < 20; j++) { + sendData(0, PRINT_FILE_TEXT_VP + j); // Clean screen + sendData(0, SELECT_FILE_TEXT_VP + j); // Clean filename + } + + // Clean filename Icon + for (uint8_t j = 0; j < 20; j++) + sendData(10, FILE1_SELECT_ICON_VP + j); + + sendData(cardRec.display_filename[cardRec.recordcount], PRINT_FILE_TEXT_VP); + + // Represents to update file list + if (update_sd && lcd_sd_status && IS_SD_INSERTED()) { + for (uint16_t i = 0; i < cardRec.Filesum; i++) { + delay(3); + sendData(cardRec.display_filename[i], cardRec.addr[i]); + sendData(uint32_t(0x738E), FilenameNature + (i + 1) * 16); + sendData(0, FILE1_SELECT_ICON_VP + i); + } + } + + sendPrinterInfo(); + + updateFan0(); + + job_percent = ui.get_progress_percent(); + if (job_percent <= 100) sendData(uint8_t(job_percent), PRINT_PROCESS_ICON_VP); + + sendData(uint8_t(card.percentDone()), PRINT_PROCESS_VP); + + TERN_(HAS_BED_PROBE, sendData(probe.offset.z * 100.0f, AUTO_BED_LEVEL_ZOFFSET_VP)); + + sendData(feedrate_percentage, PRINT_SPEED_RATE_VP); + updateTempE0(); + updateTempBed(); + + break; + + default: break; + } + ZERO(&recdat); + recdat.head[0] = FHONE; + recdat.head[1] = FHTWO; +} + +void RTS::sendPrinterInfo() { + sendData(MACVERSION, PRINTER_MACHINE_TEXT_VP); + sendData(SOFTVERSION, PRINTER_VERSION_TEXT_VP); + sendData(CORP_WEBSITE_E, PRINTER_WEBSITE_TEXT_VP); + char printarea[20] = { '\0' }; + sprintf_P(printarea, + PSTR(TERN_(HAS_X_AXIS, "%d x") TERN_(HAS_Y_AXIS, " %d x") TERN_(HAS_Z_AXIS, " %d")) + , X_BED_SIZE, Y_BED_SIZE, Z_MAX_POS + ); + sendData(printarea, PRINTER_PRINTSIZE_TEXT_VP); +} + +void RTS::updateTempE0() { + #if HAS_HOTEND + sendData(thermalManager.degHotend(0), HEAD0_CURRENT_TEMP_VP); + sendData(thermalManager.degTargetHotend(0), HEAD0_SET_TEMP_VP); + #endif +} + +void RTS::updateTempBed() { + #if HAS_HEATED_BED + sendData(thermalManager.degBed(), BED_CURRENT_TEMP_VP); + sendData(thermalManager.degTargetBed(), BED_SET_TEMP_VP); + #endif +} + +void RTS::updateFan0() { + TERN_(HAS_FAN, sendData(thermalManager.fan_speed[0], FAN_SPEED_VP)); +} + +void RTS::onIdle() { + const millis_t ms = millis(); + if (PENDING(ms, next_rts_update_ms)) return; + + // Print the file before the power is off. + if (!power_off_type_yes) { + if (!poweroff_continue || (lcd_sd_status && poweroff_continue)) { + sendData(ExchangePageBase, ExchangepageAddr); + if (startprogress < 0) startprogress = 0; + if (startprogress < 56) sendData(startprogress, START1_PROCESS_ICON_VP); + delay(80); + if (++startprogress > 56) { + sendData(StartSoundSet, SoundAddr); + power_off_type_yes = true; + } + } + + if (lcd_sd_status && poweroff_continue && power_off_type_yes) { + for (uint16_t i = 0; i < cardRec.Filesum; i++) { + if (!strcmp(cardRec.filename[i], &recovery.info.sd_filename[1])) { + sendData(cardRec.display_filename[i], PRINT_FILE_TEXT_VP); + gotoPage(ID_Resume_L, ID_Resume_D); + break; + } + } + } + + if (!poweroff_continue && power_off_type_yes) { + update_time_value = RTS_UPDATE_VALUE; + change_page_number = dark_mode ? ID_Home_D : ID_Home_L; + gotoPage(change_page_number); + } + return; + } + + next_rts_update_ms = ms + RTS_UPDATE_INTERVAL + update_time_value; + + // TODO: optimize the following + if (print_job_timer.duration() != 0) { + duration_t elapsed = print_job_timer.duration(); + static uint8_t last_cardpercentValue = 100; + sendData(elapsed.value / 3600, PRINT_TIME_HOUR_VP); + sendData((elapsed.value % 3600) / 60, PRINT_TIME_MIN_VP); + + if (card.isPrinting() && (last_cardpercentValue != card.percentDone())) { + if (card.percentDone() > 0) { + job_percent = ui.get_progress_percent(); + if (job_percent <= 100) sendData(uint8_t(job_percent), PRINT_PROCESS_ICON_VP); + // Estimate remaining time every 20 seconds + static millis_t next_remain_time_update = 0; + if (ELAPSED(ms, next_remain_time_update)) { + if (thermalManager.degHotend(0) >= thermalManager.degTargetHotend(0) - 5) { + remain_time = ui.get_remaining_time(); + next_remain_time_update += 20 * 1000UL; + sendData(remain_time / 3600, PRINT_SURPLUS_TIME_HOUR_VP); + sendData((remain_time % 3600) / 60, PRINT_SURPLUS_TIME_MIN_VP); + } + } + } + else { + sendData(0, PRINT_PROCESS_ICON_VP); + sendData(0, PRINT_SURPLUS_TIME_HOUR_VP); + sendData(0, PRINT_SURPLUS_TIME_MIN_VP); + } + sendData(uint8_t(card.percentDone()), PRINT_PROCESS_VP); + last_cardpercentValue = card.percentDone(); + } + } + + if (pause_action_flag && !sdcard_pause_check && printingIsPaused() && !planner.has_blocks_queued()) { + pause_action_flag = false; + queue.enqueue_now(F("G0 F3000 X0 Y0\nM18 S0")); + } + + TERN_(HAS_Z_AXIS, sendData(current_position.z * 10.0f, AXIS_Z_COORD_VP)); + + #if HAS_HOTEND + if (last_target_temperature[0] != thermalManager.degTargetHotend(0)) + last_target_temperature[0] = thermalManager.degTargetHotend(0); + updateTempE0(); + #endif + + #if HAS_HEATED_BED + if (last_target_temperature_bed != thermalManager.degTargetBed()) + last_target_temperature_bed = thermalManager.degTargetBed(); + updateTempBed(); + #endif + + #if HAS_HOTEND + if (heatway == 1 && !thermalManager.isHeatingHotend(0)) { + heatway = 0; + gotoPage(ID_Load_L, ID_Load_D); + sendData(filament_load_0 * 10.0f, HEAD0_FILAMENT_LOAD_DATA_VP); + } + #endif + + #if HAS_FILAMENT_SENSOR + TERN_(CHECKFILAMENT, sendData(!runout.filament_ran_out, CHANGE_FILAMENT_ICON_VP)); + #endif +} + +// Looping at the loop function +void RTS_Update() { + // Check the status of card + rts.sdCardUpdate(); + + sd_printing = IS_SD_PRINTING(); + card_insert_st = IS_SD_INSERTED(); + + if (!card_insert_st && sd_printing) { + rts.gotoPage(ID_MediaFail_L, ID_MediaFail_D); + rts.sendData(0, CHANGE_SDCARD_ICON_VP); + // Passenger printing so that the nozzle can return to zero + card.pauseSDPrint(); + print_job_timer.pause(); + pause_action_flag = true; + sdcard_pause_check = false; + } + // Update the card withdrawal and card tips icon + if (last_card_insert_st != card_insert_st) { + // The current page is displayed as a card removal page, but the card has been inserted, and the card icon is updated. + rts.sendData(int16_t(card_insert_st), CHANGE_SDCARD_ICON_VP); + last_card_insert_st = card_insert_st; + } + + #if ENABLED(CHECKFILAMENT) + // Check filament status during printing + // The runout class handles the runout threshold + if (card.isPrinting() && poweroff_continue && runout.filament_ran_out) { + rts.sendData(Beep, SoundAddr); + if (TERN0(HAS_HOTEND, thermalManager.still_heating(0)) || TERN0(HAS_HEATED_BED, !thermalManager.isCoolingBed())) { + rts.gotoPage(ID_FilamentOut_L, ID_FilamentOut_D); + } + else { + rts.sendData(1, Wait_VP); + rts.gotoPage(ID_Processing_L, ID_Processing_D); + waitway = 5; + TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true, false)); + } + card.pauseSDPrint(); + print_job_timer.pause(); + pause_action_flag = true; + update_time_value = 0; + sdcard_pause_check = false; + rts.print_state = 1; + } + #endif // CHECKFILAMENT + + rts.onIdle(); + + // Wait to receive massage and response + while (rts.receiveData() > 0) rts.handleData(); +} + +void RTS_PauseMoveAxisPage() { + if (waitway == 1) { + rts.gotoPage(ID_PrintResume_L, ID_PrintResume_D); + waitway = 0; + } + else if (waitway == 5) { + rts.gotoPage(ID_FilamentOut_L, ID_FilamentOut_D); + waitway = 0; + } +} + +void RTS_AutoBedLevelPage() { + if (waitway == 3) { + rts.gotoPage(ID_Level5_L, ID_Level5_D); + waitway = 0; + } +} + +void RTS_MoveAxisHoming() { + if (waitway == 4) { + rts.gotoPage((SovolPage)(ID_Move10_L + AxisUnitMode - 1), (SovolPage)(ID_Move10_D + AxisUnitMode - 1)); + waitway = 0; + } + else if (waitway == 6) { + rts.gotoPage(ID_Level5_L, ID_Level5_D); + waitway = 0; + } + else if (waitway == 7) { + // Click Print finish + rts.gotoPage(ID_Home_L, ID_Home_D); + waitway = 0; + } + + TERN_(HAS_X_AXIS, rts.sendData(current_position.x * 10.0f, AXIS_X_COORD_VP)); + TERN_(HAS_Y_AXIS, rts.sendData(current_position.y * 10.0f, AXIS_Y_COORD_VP)); + TERN_(HAS_Z_AXIS, rts.sendData(current_position.z * 10.0f, AXIS_Z_COORD_VP)); +} + +#endif // SOVOL_SV06_RTS diff --git a/firmware/Marlin/src/lcd/sovol_rts/sovol_rts.h b/firmware/Marlin/src/lcd/sovol_rts/sovol_rts.h new file mode 100644 index 0000000..8713223 --- /dev/null +++ b/firmware/Marlin/src/lcd/sovol_rts/sovol_rts.h @@ -0,0 +1,390 @@ +/** + * 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 + +/*********************************/ +#define FHONE (0x5A) +#define FHTWO (0xA5) +#define FHLENG (0x06) + +#define MAX_NUM_FILES 20 +#define FILENAME_LEN 20 +#define RTS_UPDATE_INTERVAL 2000 +#define RTS_UPDATE_VALUE (2 * RTS_UPDATE_INTERVAL) + +#define DATA_BUF_SIZE 26 + +/*************Register and Variable addr*****************/ +#define RegAddr_W 0x80 +#define RegAddr_R 0x81 +#define VarAddr_W 0x82 +#define VarAddr_R 0x83 +#define ExchangePageBase 0x5A010000UL // the first page ID. other page = first page ID + relevant num; +#define StartSoundSet 0x060480A0UL // 06,start-music; 04, 4 musics; 80, the volume value; 04, return value about music number. +#define Beep 0x02AF0100UL +#define Beep1 0xFFFF0101UL +#define FONT_EEPROM 90 + +/*variable addr*/ +#define ExchangepageAddr 0x0084 +#define SoundAddr 0x00A0 + +#define START1_PROCESS_ICON_VP 0x1000 +#define PRINT_SPEED_RATE_VP 0x1006 +#define PRINT_PROCESS_ICON_VP 0x100E +#define PRINT_TIME_HOUR_VP 0x1010 +#define PRINT_TIME_MIN_VP 0x1012 +#define PRINT_PROCESS_VP 0x1016 +#define HEAD0_FAN_ICON_VP 0x101E +#define CHANGE_FILAMENT0_TEMP_VP 0x1020 +#define AUTO_BED_LEVEL_ZOFFSET_VP 0x1026 + +#define HEAD0_SET_TEMP_VP 0x1034 +#define HEAD0_CURRENT_TEMP_VP 0x1036 +#define BED_SET_TEMP_VP 0x103A +#define BED_CURRENT_TEMP_VP 0x103C +#define AUTO_HOME_DISPLAY_ICON_VP 0x1042 +#define AXIS_X_COORD_VP 0x1048 +#define AXIS_Y_COORD_VP 0x104A +#define AXIS_Z_COORD_VP 0x104C +#define HEAD0_FILAMENT_LOAD_DATA_VP 0x1054 +#define PRINTER_MACHINE_TEXT_VP 0x1060 +#define PRINTER_VERSION_TEXT_VP 0x106A +#define PRINTER_PRINTSIZE_TEXT_VP 0x1074 +#define PRINTER_WEBSITE_TEXT_VP 0x107E +#define MARLIN_VERSION_TEXT_VP 0x1088 +#define AUTO_BED_LEVEL_ICON_VP 0x108D +#define CHANGE_FILAMENT_ICON_VP 0x108E +#define TWO_EXTRUDER_HOTEND_XOFFSET_VP 0x1092 +#define TWO_EXTRUDER_HOTEND_YOFFSET_VP 0x1094 +#define TWO_EXTRUDER_HOTEND_ZOFFSET_VP 0x1096 +#define AUTO_BED_LEVEL_1POINT_VP 0x1100 + +#define PRINT_SURPLUS_TIME_HOUR_VP 0x1162 +#define PRINT_SURPLUS_TIME_MIN_VP 0x1164 +#define SELECT_MODE_ICON_VP 0x1166 +#define CHANGE_SDCARD_ICON_VP 0x1168 + +#define MOTOR_FREE_ICON_VP 0x1200 +#define FILE1_SELECT_ICON_VP 0x1221 +#define FILE2_SELECT_ICON_VP 0x1222 +#define FILE3_SELECT_ICON_VP 0x1223 +#define FILE4_SELECT_ICON_VP 0x1224 +#define FILE5_SELECT_ICON_VP 0x1225 +#define FILE6_SELECT_ICON_VP 0x1226 +#define FILE7_SELECT_ICON_VP 0x1227 +#define FILE8_SELECT_ICON_VP 0x1228 +#define FILE9_SELECT_ICON_VP 0x1229 +#define FILE10_SELECT_ICON_VP 0x122A +#define FILE11_SELECT_ICON_VP 0x122B +#define FILE12_SELECT_ICON_VP 0x122C +#define FILE13_SELECT_ICON_VP 0x122D +#define FILE14_SELECT_ICON_VP 0x122E +#define FILE15_SELECT_ICON_VP 0x122F +#define FILE16_SELECT_ICON_VP 0x1230 +#define FILE17_SELECT_ICON_VP 0x1231 +#define FILE18_SELECT_ICON_VP 0x1232 +#define FILE19_SELECT_ICON_VP 0x1233 +#define FILE20_SELECT_ICON_VP 0x1234 + +#define FILE1_TEXT_VP 0x200A +#define FILE2_TEXT_VP 0x201E +#define FILE3_TEXT_VP 0x2032 +#define FILE4_TEXT_VP 0x2046 +#define FILE5_TEXT_VP 0x205A +#define FILE6_TEXT_VP 0x206E +#define FILE7_TEXT_VP 0x2082 +#define FILE8_TEXT_VP 0x2096 +#define FILE9_TEXT_VP 0x20AA +#define FILE10_TEXT_VP 0x20BE +#define FILE11_TEXT_VP 0x20D2 +#define FILE12_TEXT_VP 0x20E6 +#define FILE13_TEXT_VP 0x20FA +#define FILE14_TEXT_VP 0x210E +#define FILE15_TEXT_VP 0x2122 +#define FILE16_TEXT_VP 0x2136 +#define FILE17_TEXT_VP 0x214A +#define FILE18_TEXT_VP 0x215E +#define FILE19_TEXT_VP 0x2172 +#define FILE20_TEXT_VP 0x2186 + +#define SELECT_FILE_TEXT_VP 0x219A +#define TWO_COLOR_MODE_ICON_VP 0x21B8 +#define COPY_MODE_ICON_VP 0x21B9 +#define MIRROR_MODE_ICON_VP 0x21BA +#define SINGLE_MODE_ICON_VP 0x21BB +#define EXCHANGE_NOZZLE_ICON_VP 0x21BC +#define PRINT_MODE_ICON_VP 0x21BD +#define PRINT_FILE_TEXT_VP 0x21C0 + +#define Nozzle_P_VP 0x2200 +#define Nozzle_I_VP 0x2204 +#define Nozzle_D_VP 0x2208 +#define Hot_Bed_P_VP 0x220C +#define Hot_Bed_I_VP 0x2240 +#define Hot_Bed_D_VP 0x2244 + +#define Vmax_X_VP 0x2210 +#define Vmax_Y_VP 0x2212 +#define Vmax_Z_VP 0x2214 +#define Vmax_E_VP 0x2216 + +#define Accel_VP 0x2220 +#define A_Retract_VP 0x2222 +#define A_Travel_VP 0x2224 +#define Amax_X_VP 0x2226 +#define Amax_Y_VP 0x2228 +#define Amax_Z_VP 0x222A +#define Amax_E_VP 0x222C + +#define Jerk_X_VP 0x2230 +#define Jerk_Y_VP 0x2232 +#define Jerk_Z_VP 0x2234 +#define Jerk_E_VP 0x2236 + +#define Steps_X_VP 0x1130 +#define Steps_Y_VP 0x1132 +#define Steps_Z_VP 0x1134 +#define Steps_E_VP 0x1136 + +#define Advance_K_VP 0x1138 +#define Time_VP 0x2450 +#define Time1_VP 0x2455 +#define FAN_SPEED_VP 0x2460 +#define Wait_VP 0x2480 +#define Zoffset_UNIT_VP 0x2500 +#define Current_X_VP 0x2468 +#define Current_Y_VP 0x246A +#define Current_Z_VP 0x246C +#define Current_E_VP 0x246F +#define Threshold_X_VP 0x2471 +#define Threshold_Y_VP 0x2473 +#define Threshold_Z_VP 0x2475 +#define Threshold_E_VP 0x2477 +#define Sensorless_X_VP 0x2479 +#define Sensorless_Y_VP 0x247B + +#define FilenameNature 0x6003 + +enum SovolPage : uint8_t { + ID_Startup = 0, // Startup screen + ID_Home_D = 1, ID_Home_L = 55 + ID_Home_D, // Home screen + ID_Page1_D = 2, ID_Page1_L = 55 + ID_Page1_D, // File picker page 1 + ID_Page2_D = 3, ID_Page2_L = 55 + ID_Page2_D, // File picker page 2 + ID_Page3_D = 4, ID_Page3_L = 55 + ID_Page3_D, // File picker page 3 + ID_Page4_D = 5, ID_Page4_L = 55 + ID_Page4_D, // File picker page 4 + ID_ChangeWait_D = 6, ID_ChangeWait_L = 55 + ID_ChangeWait_D, // Wait for filament change to start + ID_Cold_D = 7, ID_Cold_L = 55 + ID_Cold_D, // Nozzle heating, please wait + ID_Change_D = 8, ID_Change_L = 55 + ID_Change_D, // Manually change filament dialog + ID_Finish_D = 9, ID_Finish_L = 55 + ID_Finish_D, // Confirm print finish + ID_PrintHeating_D = 10, ID_PrintHeating_L = 55 + ID_PrintHeating_D, // Wait for heating before print starts + ID_PrintStatus_D = 11, ID_PrintStatus_L = 55 + ID_PrintStatus_D, // Printing status progress + ID_PrintResume_D = 12, ID_PrintResume_L = 55 + ID_PrintResume_D, // Resume printing + ID_PrintAdjust1_D = 14, ID_PrintAdjust1_L = 55 + ID_PrintAdjust1_D, // Modify print settings while printing, 0.01mm z offset + ID_TempChange_D = 15, ID_TempChange_L = 55 + ID_TempChange_D, // Temp / fan change and preset menu + ID_Unload_D = 16, ID_Unload_L = 55 + ID_Unload_D, // Wait for filament unload + ID_Insert_D = 17, ID_Insert_L = 55 + ID_Insert_D, // Insert filament + ID_Advanced_D = 18, ID_Advanced_L = 55 + ID_Advanced_D, // Advanced settings + ID_NoFilament_D = 20, ID_NoFilament_L = 55 + ID_NoFilament_D, // No filament + ID_Settings_D = 21, ID_Settings_L = 55 + ID_Settings_D, // Settings screen + ID_Level1_D = 22, ID_Level1_L = 55 + ID_Level1_D, // Leveling screen 0.01mm + ID_Load_D = 23, ID_Load_L = 55 + ID_Load_D, // Filament loading screen, feed / retreat filament + ID_LoadCold_D = 24, ID_LoadCold_L = 55 + ID_LoadCold_D, // Cold nozzle warning on filament load screen + ID_Velocity_D = 25, ID_Velocity_L = 55 + ID_Velocity_D, // Speed limit settings menu + ID_LoadHeating_D = 26, ID_LoadHeating_L = 55 + ID_LoadHeating_D, // Nozzle heating in filament load screen + ID_LoadCancel_D = 27, ID_LoadCancel_L = 55 + ID_LoadCancel_D, // Filament change menu, cancel feed / retreat + ID_PrintAdjust5_D = 28, ID_PrintAdjust5_L = 55 + ID_PrintAdjust5_D, // Modify print settings while printing, 0.05mm z offset + ID_Move10_D = 29, ID_Move10_L = 55 + ID_Move10_D, // Move axis, 10mm + ID_Move1_D = 30, ID_Move1_L = 55 + ID_Move1_D, // Move axis, 1mm + ID_Move01_D = 31, ID_Move01_L = 55 + ID_Move01_D, // Move axis, 0.1mm + ID_AutoHome_D = 32, ID_AutoHome_L = 55 + ID_AutoHome_D, // Auto homing in progress + ID_Info_D = 33, ID_Info_L = 55 + ID_Info_D, // Printer info screen + ID_Accel_D = 34, ID_Accel_L = 55 + ID_Accel_D, // Accelaration settings menu + ID_Jerk_D = 35, ID_Jerk_L = 55 + ID_Jerk_D, // Jerk settings menu + ID_Resume_D = 36, ID_Resume_L = 55 + ID_Resume_D, // Resume print after power loss + ID_Steps_D = 37, ID_Steps_L = 55 + ID_Steps_D, // Steps settings menu + ID_ABL_Wait_D = 38, ID_ABL_Wait_L = 55 + ID_ABL_Wait_D, // Auto leveling, please wait + ID_FilamentOut_D = 39, ID_FilamentOut_L = 55 + ID_FilamentOut_D, // Click yes to heat and change filament + ID_Processing_D = 40, ID_Processing_L = 55 + ID_Processing_D, // Processing please wait + ID_TempPID_D = 41, ID_TempPID_L = 55 + ID_TempPID_D, // PID settings menu + ID_Purge_D = 43, ID_Purge_L = 55 + ID_Purge_D, // Wait for filament purge + ID_PurgeMore_D = 44, ID_PurgeMore_L = 56 + ID_PurgeMore_D, // Purge more or resume screen + ID_HeatNozzle_D = 45, ID_HeatNozzle_L = 54 + ID_HeatNozzle_D, // Heat nozzle after pause + ID_MediaFail_D = 46, ID_MediaFail_L = 55 + ID_MediaFail_D, // Sd card removed + ID_BrowseNoSd_D = 47, ID_BrowseNoSd_L = 55 + ID_BrowseNoSd_D, // No sd card on browse screen + ID_AdvWarn_D = 49, ID_AdvWarn_L = 55 + ID_AdvWarn_D, // Warning when entering advanced settings + ID_KillRunaway_D = 52, ID_KillRunaway_L = 55 + ID_KillRunaway_D, // Thermal runaway + ID_KillHeat_D = 53, ID_KillHeat_L = 55 + ID_KillHeat_D, // Thermistor error + ID_KillBadTemp_D = 54, ID_KillBadTemp_L = 55 + ID_KillBadTemp_D, // Heating failed + ID_KillHome_D = 55, ID_KillHome_L = 55 + ID_KillHome_D, // Auto-home failed + ID_Level5_D = 111, ID_Level5_L = 6 + ID_Level5_D, // Leveling screen 0.05mm + ID_DriverError_D = 112, ID_DriverError_L = 6 + ID_DriverError_D, // Driver error + ID_SettingsTMC_D = 113, ID_SettingsTMC_L = 6 + ID_SettingsTMC_D, // TMC Driver settings + ID_DriverA_D = 114, ID_DriverA_L = 6 + ID_DriverA_D, // TMC Driver current settings + ID_DriverTrsh_D = 115, ID_DriverTrsh_L = 6 + ID_DriverTrsh_D, // TMC Driver hybrid treshold settings + ID_DriverSens_D = 116, ID_DriverSens_L = 6 + ID_DriverSens_D, // TMC Driver sensorless homing settings + ID_ABL_HeatWait_D = 123, ID_ABL_HeatWait_L = 1 + ID_ABL_HeatWait_D, // Wait for nozzle & bed to heat up +}; + +/************struct**************/ + +typedef struct DataBuf { + uint8_t len; + uint8_t head[2]; + uint8_t command; + uint32_t addr; + uint32_t bytelen; + uint16_t data[32]; + uint8_t reserv[4]; +} DB; + +typedef struct CardRecord { + int16_t recordcount; + int16_t Filesum; + uint32_t addr[MAX_NUM_FILES]; + char display_filename[MAX_NUM_FILES][FILENAME_LEN]; + char filename[MAX_NUM_FILES][FILENAME_LEN]; +} CRec; + +class RTS { + public: + RTS(); + static int16_t receiveData(); + static void sdCardInit(); + static bool sdDetected(); + static void sdCardUpdate(); + static void sendData(); + static void sendData(const String&, const uint32_t, const uint8_t=VarAddr_W); + static void sendData(const char[], const uint32_t, const uint8_t=VarAddr_W); + static void sendData(const char, const uint32_t, const uint8_t=VarAddr_W); + static void sendData(const int16_t, const uint32_t, const uint8_t=VarAddr_W); + static void sendData(const uint32_t, const uint32_t, const uint8_t=VarAddr_W); + + static void sendData(const uint8_t str[], const uint32_t addr, const uint8_t cmd=VarAddr_W) { sendData((char *)str, addr, cmd); } + static void sendData(const uint16_t n, const uint32_t addr, const uint8_t cmd=VarAddr_W) { sendData(int16_t(n), addr, cmd); } + static void sendData(const_float_t n, const uint32_t addr, const uint8_t cmd=VarAddr_W) { sendData(int16_t(n), addr, cmd); } //was originally int16 ? + static void sendData(const int32_t n, const uint32_t addr, const uint8_t cmd=VarAddr_W) { sendData(uint32_t(n), addr, cmd); } + static void sendData(const int n, const uint32_t addr, const uint8_t cmd=VarAddr_W) { sendData(int16_t(n), addr, cmd); } + + static void sdCardStop(); + static void handleData(); + static void init(); + + static uint8_t print_state; + static bool start_print_flag; + + static bool dark_mode; + static void gotoPage(SovolPage page) { sendData(ExchangePageBase + page, ExchangepageAddr); } + static void gotoPage(SovolPage p1, SovolPage p2) { gotoPage(dark_mode ? p2 : p1); } + static void gotoPageBeep(SovolPage p1, SovolPage p2) { gotoPage(p1, p2); sendData(Beep1, SoundAddr); } + + static void sendPrinterInfo(); + static void updateTempE0(); + static void updateTempBed(); + static void updateFan0(); + + static void onIdle(); + + static void refreshTime() { sendData(1, dark_mode ? Time_VP : Time1_VP); gotoPage(ID_PrintStatus_L, ID_PrintStatus_D); } + + static DB recdat; + static DB snddat; + private: + static uint8_t databuf[DATA_BUF_SIZE]; +}; + +extern RTS rts; + +enum PROC_COM { + MainPageKey = 0, + AdjustmentKey, + PrintSpeedKey, + StopPrintKey, + PausePrintKey, + ResumePrintKey, + ZOffsetKey, + TempScreenKey, + CoolScreenKey, + Heater0TempEnterKey, Heater1TempEnterKey, + HotBedTempEnterKey, + SettingScreenKey, + SettingBackKey, + BedLevelFunKey, + AxisPageSelectKey, + XaxismoveKey, YaxismoveKey, ZaxismoveKey, + SelectExtruderKey, + Heater0LoadEnterKey, + FilamentLoadKey, + Heater1LoadEnterKey, + SelectLanguageKey, + FilamentCheckKey, + PowerContinuePrintKey, + PrintSelectModeKey, + XhotendOffsetKey, YhotendOffsetKey, ZhotendOffsetKey, + StoreMemoryKey, + PrintFileKey, + SelectFileKey, + AdvancedKey, + Nozzle_P, Nozzle_I, Nozzle_D, + Hot_Bed_P, Hot_Bed_I, Hot_Bed_D, + Vmax_X, Vmax_Y, Vmax_Z, Vmax_E, + Accel, A_Retract, A_Travel, + Amax_X, Amax_Y, Amax_Z, Amax_E, + Jerk_X, Jerk_Y, Jerk_Z, Jerk_E, + Steps_X, Steps_Y, Steps_Z, Steps_E, + Advance_K, + AdvancedBackKey, + FilamentChange, + FanSpeedKey, + ZoffsetUnitKey, + TMCDriver, + Current_X, Current_Y, Current_Z, Current_E, + Threshold_X, Threshold_Y, Threshold_Z, Threshold_E, + Sensorless_X, Sensorless_Y, + ChangePageKey +}; + +const uint32_t Addrbuf[] = { + 0x1002, 0x1004, 0x1006, 0x1008, 0x100A, 0x100C, 0x1026, 0x1030, 0x1032, 0x1034, + 0x1038, 0x103A, 0x103E, 0x1040, 0x1044, 0x1046, 0x1048, 0x104A, 0x104C, 0x104E, + 0x1054, 0x1056, 0x1058, 0x105C, 0x105E, 0x105F, 0x1090, 0x1092, 0x1094, 0x1096, + 0x1098, 0x2198, 0x2199, 0x21E0, 0x2200, 0x2204, 0x2208, 0x220C, 0x2240, 0x2244, + 0x2210, 0x2212, 0x2214, 0x2216, 0x2220, 0x2222, 0x2224, 0x2226, 0x2228, 0x222A, + 0x222C, 0x2230, 0x2232, 0x2234, 0x2236, 0x1130, 0x1132, 0x1134, 0x1136, 0x1138, + 0x2250, 0x2300, 0x2460, 0x2464, 0x2466, 0x2468, 0x246A, 0x246C, 0x246F, 0x2471, + 0x2473, 0x2475, 0x2477, 0x2479, 0x247B, 0x110E, 0 +}; + +extern void RTS_Update(); +extern void RTS_Init(); + +extern int16_t update_time_value; +extern bool poweroff_continue; +extern bool sdcard_pause_check; +extern bool sd_printing_autopause; +extern bool pause_flag; + +void RTS_AutoBedLevelPage(); +void RTS_MoveAxisHoming(); +void RTS_PauseMoveAxisPage(); diff --git a/firmware/Marlin/src/lcd/tft/touch.cpp b/firmware/Marlin/src/lcd/tft/touch.cpp index e48f974..9324183 100644 --- a/firmware/Marlin/src/lcd/tft/touch.cpp +++ b/firmware/Marlin/src/lcd/tft/touch.cpp @@ -313,6 +313,7 @@ bool Touch::get_point(int16_t * const x, int16_t * const y) { next_sleep_ms = ui.sleep_timeout_minutes ? millis() + MIN_TO_MS(ui.sleep_timeout_minutes) : 0; } + bool MarlinUI::display_is_asleep() { return touch.isSleeping(); } void MarlinUI::sleep_display(const bool sleep/*=true*/) { if (!sleep) touch.wakeUp(); } diff --git a/firmware/Marlin/src/lcd/touch/touch_buttons.cpp b/firmware/Marlin/src/lcd/touch/touch_buttons.cpp index f6f4c66..e17fcbb 100644 --- a/firmware/Marlin/src/lcd/touch/touch_buttons.cpp +++ b/firmware/Marlin/src/lcd/touch/touch_buttons.cpp @@ -153,6 +153,9 @@ uint8_t TouchButtons::read_buttons() { next_sleep_ms = ui.sleep_timeout_minutes ? millis() + MIN_TO_MS(ui.sleep_timeout_minutes) : 0; } + bool MarlinUI::display_is_asleep() { + return touchBt.isSleeping(); + } void MarlinUI::sleep_display(const bool sleep/*=true*/) { if (!sleep) touchBt.wakeUp(); } diff --git a/firmware/Marlin/src/libs/hex_print.cpp b/firmware/Marlin/src/libs/hex_print.cpp index 9a35401..9ff3fc6 100644 --- a/firmware/Marlin/src/libs/hex_print.cpp +++ b/firmware/Marlin/src/libs/hex_print.cpp @@ -25,7 +25,6 @@ #if NEED_HEX_PRINT #include "hex_print.h" -#include "../core/serial.h" static char _hex[] = "0x00000000"; // 0:adr32 2:long 4:adr16 6:word 8:byte diff --git a/firmware/Marlin/src/libs/numtostr.cpp b/firmware/Marlin/src/libs/numtostr.cpp index 6f4e4a4..b9503cb 100644 --- a/firmware/Marlin/src/libs/numtostr.cpp +++ b/firmware/Marlin/src/libs/numtostr.cpp @@ -25,6 +25,8 @@ #include "../inc/MarlinConfigPre.h" #include "../core/utility.h" +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" + constexpr char DIGIT(const uint8_t n) { return '0' + n; } template diff --git a/firmware/Marlin/src/module/delta.cpp b/firmware/Marlin/src/module/delta.cpp index 379ef98..aa1bceb 100644 --- a/firmware/Marlin/src/module/delta.cpp +++ b/firmware/Marlin/src/module/delta.cpp @@ -49,7 +49,7 @@ #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../core/debug_out.h" -// Initialized by settings.load() +// Initialized by settings.load float delta_height; abc_float_t delta_endstop_adj{0}; float delta_radius, diff --git a/firmware/Marlin/src/module/endstops.cpp b/firmware/Marlin/src/module/endstops.cpp index cb2a8f2..85e021d 100644 --- a/firmware/Marlin/src/module/endstops.cpp +++ b/firmware/Marlin/src/module/endstops.cpp @@ -30,6 +30,9 @@ #include "../sd/cardreader.h" #include "temperature.h" #include "../lcd/marlinui.h" +#if ENABLED(SOVOL_SV06_RTS) + #include "../lcd/sovol_rts/sovol_rts.h" +#endif #if ENABLED(FT_MOTION) #include "ft_motion.h" @@ -62,7 +65,7 @@ Endstops endstops; // private: -bool Endstops::enabled, Endstops::enabled_globally; // Initialized by settings.load() +bool Endstops::enabled, Endstops::enabled_globally; // Initialized by settings.load volatile Endstops::endstop_mask_t Endstops::hit_state; Endstops::endstop_mask_t Endstops::live_state = 0; @@ -92,7 +95,7 @@ Endstops::endstop_mask_t Endstops::live_state = 0; volatile bool Endstops::calibration_stop_state; #endif -// Initialized by settings.load() +// Initialized by settings.load #if ENABLED(X_DUAL_ENDSTOPS) float Endstops::x2_endstop_adj; #endif @@ -272,8 +275,12 @@ void Endstops::not_homing() { #if ENABLED(VALIDATE_HOMING_ENDSTOPS) // If the last move failed to trigger an endstop, call kill void Endstops::validate_homing_move() { - if (trigger_state()) hit_on_purpose(); - else kill(GET_TEXT_F(MSG_KILL_HOMING_FAILED)); + if (trigger_state()) + hit_on_purpose(); + else { + TERN_(SOVOL_SV06_RTS, rts.gotoPageBeep(ID_KillHome_L, ID_KillHome_D)); + kill(GET_TEXT_F(MSG_KILL_HOMING_FAILED)); + } } #endif diff --git a/firmware/Marlin/src/module/ft_motion.cpp b/firmware/Marlin/src/module/ft_motion.cpp index b999dec..8cfc8f2 100644 --- a/firmware/Marlin/src/module/ft_motion.cpp +++ b/firmware/Marlin/src/module/ft_motion.cpp @@ -92,7 +92,7 @@ uint32_t FTMotion::interpIdx = 0; // Index of current data point b // Shaping variables. #if HAS_FTM_SHAPING FTMotion::shaping_t FTMotion::shaping = { - 0 + zi_idx: 0 #if HAS_X_AXIS , x:{ false, { 0.0f }, { 0.0f }, { 0 }, 0 } // ena, d_zi[], Ai[], Ni[], max_i #endif @@ -607,7 +607,7 @@ void FTMotion::makeVector() { #if HAS_EXTRUDERS if (cfg.linearAdvEna) { float dedt_adj = (traj.e[makeVector_batchIdx] - e_raw_z1) * (FTM_FS); - if (ratio.e > 0.0f) dedt_adj += accel_k * cfg.linearAdvK; + if (ratio.e > 0.0f) dedt_adj += accel_k * cfg.linearAdvK * 0.0001f; e_raw_z1 = traj.e[makeVector_batchIdx]; e_advanced_z1 += dedt_adj * (FTM_TS); diff --git a/firmware/Marlin/src/module/motion.cpp b/firmware/Marlin/src/module/motion.cpp index abac117..820089d 100644 --- a/firmware/Marlin/src/module/motion.cpp +++ b/firmware/Marlin/src/module/motion.cpp @@ -124,7 +124,7 @@ xyze_pos_t destination; // {0} // Extruder offsets #if HAS_HOTEND_OFFSET - xyz_pos_t hotend_offset[HOTENDS]; // Initialized by settings.load() + xyz_pos_t hotend_offset[HOTENDS]; // Initialized by settings.load void reset_hotend_offsets() { constexpr float tmp[XYZ][HOTENDS] = { HOTEND_OFFSET_X, HOTEND_OFFSET_Y, HOTEND_OFFSET_Z }; static_assert( @@ -146,6 +146,9 @@ xyze_pos_t destination; // {0} #endif feedRate_t feedrate_mm_s = MMM_TO_MMS(DEFAULT_FEEDRATE_MM_M); int16_t feedrate_percentage = 100; +#if ENABLED(EDITABLE_HOMING_FEEDRATE) + xyz_feedrate_t homing_feedrate_mm_m = HOMING_FEEDRATE_MM_M; +#endif // Cartesian conversion result goes here: xyz_pos_t cartes; @@ -2679,8 +2682,12 @@ void prepare_line_to_destination() { // // Homing Z with a probe? Raise Z (maybe) and deploy the Z probe. // - if (TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS && probe.deploy())) - return; + #if HOMING_Z_WITH_PROBE + if (axis == Z_AXIS && probe.deploy()) { + probe.stow(); + return; + } + #endif // Set flags for X, Y, Z motor locking #if HAS_EXTRA_ENDSTOPS @@ -2698,8 +2705,16 @@ void prepare_line_to_destination() { // #if HOMING_Z_WITH_PROBE if (axis == Z_AXIS) { - if (TERN0(BLTOUCH, bltouch.deploy())) return; // BLTouch was deployed above, but get the alarm state. - if (TERN0(PROBE_TARE, probe.tare())) return; + #if ENABLED(BLTOUCH) + if (bltouch.deploy()) { // BLTouch was deployed above, but get the alarm state. + bltouch.stow(); + return; + } + #endif + if (TERN0(PROBE_TARE, probe.tare())) { + probe.stow(); + return; + } TERN_(BD_SENSOR, bdl.config_state = BDS_HOMING_Z); } #endif @@ -2781,8 +2796,10 @@ void prepare_line_to_destination() { #endif // DETECT_BROKEN_ENDSTOP #if ALL(HOMING_Z_WITH_PROBE, BLTOUCH) - if (axis == Z_AXIS && !bltouch.high_speed_mode && bltouch.deploy()) + if (axis == Z_AXIS && !bltouch.high_speed_mode && bltouch.deploy()) { + bltouch.stow(); return; // Intermediate DEPLOY (in LOW SPEED MODE) + } #endif // Slow move towards endstop until triggered diff --git a/firmware/Marlin/src/module/motion.h b/firmware/Marlin/src/module/motion.h index 420b18f..6d3bfae 100644 --- a/firmware/Marlin/src/module/motion.h +++ b/firmware/Marlin/src/module/motion.h @@ -79,7 +79,12 @@ extern xyz_pos_t cartes; * Feed rates are often configured with mm/m * but the planner and stepper like mm/s units. */ -constexpr xyz_feedrate_t homing_feedrate_mm_m = HOMING_FEEDRATE_MM_M; +#if ENABLED(EDITABLE_HOMING_FEEDRATE) + extern xyz_feedrate_t homing_feedrate_mm_m; +#else + constexpr xyz_feedrate_t homing_feedrate_mm_m = HOMING_FEEDRATE_MM_M; +#endif + FORCE_INLINE feedRate_t homing_feedrate(const AxisEnum a) { float v = TERN0(HAS_Z_AXIS, homing_feedrate_mm_m.z); #if DISABLED(DELTA) @@ -471,7 +476,7 @@ inline void set_all_homed() { TERN_(HAS_ENDSTOPS, axes inline bool axis_was_homed(const AxisEnum axis) { return TEST(axes_homed, axis); } inline bool axis_is_trusted(const AxisEnum axis) { return TEST(axes_trusted, axis); } -inline bool axis_should_home(const AxisEnum axis) { return (axes_should_home() & _BV(axis)) != 0; } +inline bool axis_should_home(const AxisEnum axis) { return axes_should_home(_BV(axis)) != 0; } inline bool no_axes_homed() { return !axes_homed; } inline bool all_axes_homed() { return main_axes_mask == (axes_homed & main_axes_mask); } inline bool homing_needed() { return !all_axes_homed(); } diff --git a/firmware/Marlin/src/module/planner.cpp b/firmware/Marlin/src/module/planner.cpp index 7c746fa..6305571 100644 --- a/firmware/Marlin/src/module/planner.cpp +++ b/firmware/Marlin/src/module/planner.cpp @@ -135,10 +135,10 @@ uint8_t Planner::delay_before_delivering; // Delay block delivery so initi #if ENABLED(EDITABLE_STEPS_PER_UNIT) float Planner::mm_per_step[DISTINCT_AXES]; // (mm) Millimeters per step #else - constexpr float PlannerSettings::axis_steps_per_mm[DISTINCT_AXES]; - constexpr float Planner::mm_per_step[DISTINCT_AXES]; + constexpr float PlannerSettings::axis_steps_per_mm[DISTINCT_AXES], + Planner::mm_per_step[DISTINCT_AXES]; #endif -planner_settings_t Planner::settings; // Initialized by settings.load() +planner_settings_t Planner::settings; // Initialized by settings.load /** * Set up inline block variables @@ -179,8 +179,8 @@ uint32_t Planner::max_acceleration_steps_per_s2[DISTINCT_AXES]; // (steps/s^2) D #endif #if DISABLED(NO_VOLUMETRICS) + float Planner::volumetric_area_nominal = CIRCLE_AREA(float(DEFAULT_NOMINAL_FILAMENT_DIA) * 0.5f); // Nominal cross-sectional area float Planner::filament_size[EXTRUDERS], // diameter of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder - Planner::volumetric_area_nominal = CIRCLE_AREA(float(DEFAULT_NOMINAL_FILAMENT_DIA) * 0.5f), // Nominal cross-sectional area Planner::volumetric_multiplier[EXTRUDERS]; // Reciprocal of cross-sectional area of filament (in mm^2). Pre-calculated to reduce computation in the planner #endif @@ -199,7 +199,7 @@ uint32_t Planner::max_acceleration_steps_per_s2[DISTINCT_AXES]; // (steps/s^2) D matrix_3x3 Planner::bed_level_matrix; // Transform to compensate for bed level #endif #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - float Planner::z_fade_height, // Initialized by settings.load() + float Planner::z_fade_height, // Initialized by settings.load Planner::inverse_z_fade_height, Planner::last_fade_z; #endif @@ -208,7 +208,7 @@ uint32_t Planner::max_acceleration_steps_per_s2[DISTINCT_AXES]; // (steps/s^2) D #endif #if ENABLED(SKEW_CORRECTION) - skew_factor_t Planner::skew_factor; // Initialized by settings.load() + skew_factor_t Planner::skew_factor; // Initialized by settings.load #endif #if ENABLED(AUTOTEMP) @@ -235,7 +235,7 @@ float Planner::previous_nominal_speed; #endif #if ENABLED(LIN_ADVANCE) - float Planner::extruder_advance_K[DISTINCT_E]; // Initialized by settings.load() + float Planner::extruder_advance_K[DISTINCT_E]; // Initialized by settings.load #endif #if HAS_POSITION_FLOAT @@ -782,9 +782,9 @@ block_t* Planner::get_current_block() { * sqrt(block->acceleration_steps_per_s2 / 2). This is ensured through * minimum_planner_speed_sqr / min_entry_speed_sqr though note there's one * exception in recalculate_trapezoids(). - ** + * * ############ VERY IMPORTANT ############ - * NOTE that the PRECONDITION to call this function is that the block is + * NOTE: The PRECONDITION to call this function is that the block is * NOT BUSY and it is marked as RECALCULATE. That WARRANTIES the Stepper ISR * is not and will not use the block while we modify it. */ @@ -1542,7 +1542,7 @@ void Planner::check_axes_activity() { else if (z_full_fade >= z_fade_height) // Above the fade height? raw.z = z_full_fade; // Nothing more to unapply. else // Within the fade zone? - raw.z = z_no_fade / (1.0f - z_correction * inverse_z_fade_height); // Unapply the faded Z offset + raw.z = z_no_fade / (1.0f - z_correction * inverse_z_fade_height); // Unapply the faded Z offset #else raw.z = z_no_fade; #endif @@ -1570,11 +1570,14 @@ void Planner::check_axes_activity() { void Planner::quick_stop() { - // Remove all the queued blocks. Note that this function is NOT - // called from the Stepper ISR, so we must consider tail as readonly! - // that is why we set head to tail - But there is a race condition that - // must be handled: The tail could change between the read and the assignment - // so this must be enclosed in a critical section + /** + * Remove all the queued blocks. + * NOTE: This function is NOT called from the Stepper ISR, + * so we must consider tail as readonly! + * That is why we set head to tail - But there is a race condition that + * must be handled: The tail could change between the read and the assignment + * so this must be enclosed in a critical section + */ const bool was_enabled = stepper.suspend(); @@ -1703,9 +1706,9 @@ void Planner::synchronize() { while (busy()) idle(); } * @param target Target position in steps units * @param target_float Target position in direct (mm, degrees) units. * @param cart_dist_mm The pre-calculated move lengths for all axes, in mm - * @param fr_mm_s (target) speed of the move - * @param extruder target extruder - * @param hints parameters to aid planner calculations + * @param fr_mm_s (Target) speed of the move + * @param extruder Target extruder + * @param hints Parameters to aid planner calculations * * @return true if movement was properly queued, false otherwise (if cleaning) */ @@ -1765,7 +1768,7 @@ bool Planner::_buffer_steps(const xyze_long_t &target } /** - * @brief Populate a block in preparation for insertion + * @brief Populate a block in preparation for insertion. * @details Populate the fields of a new linear movement block * that will be added to the queue and processed soon * by the Stepper ISR. @@ -1774,9 +1777,9 @@ bool Planner::_buffer_steps(const xyze_long_t &target * @param target Target position in steps units * @param target_float Target position in native mm * @param cart_dist_mm The pre-calculated move lengths for all axes, in mm - * @param fr_mm_s (target) speed of the move - * @param extruder target extruder - * @param hints parameters to aid planner calculations + * @param fr_mm_s (Target) speed of the move + * @param extruder Target extruder + * @param hints Parameters to aid planner calculations * * @return true if movement is acceptable, false otherwise */ @@ -2195,9 +2198,11 @@ bool Planner::_populate_block( const float inverse_millimeters = 1.0f / block->millimeters; // Inverse millimeters to remove multiple divides - // Calculate inverse time for this move. No divide by zero due to previous checks. - // Example: At 120mm/s a 60mm move involving XYZ axes takes 0.5s. So this will give 2.0. - // Example 2: At 120°/s a 60° move involving only rotational axes takes 0.5s. So this will give 2.0. + /** + * Calculate inverse time for this move. No divide by zero due to previous checks. + * EXAMPLE: At 120mm/s a 60mm move involving XYZ axes takes 0.5s. So this will give 2.0. + * EXAMPLE: At 120°/s a 60° move involving only rotational axes takes 0.5s. So this will give 2.0. + */ float inverse_secs = inverse_millimeters * ( #if ALL(HAS_ROTATIONAL_AXES, INCH_MODE_SUPPORT) /** @@ -2766,8 +2771,8 @@ bool Planner::_populate_block( } // _populate_block() /** - * @brief Add a block to the buffer that just updates the position - * Supports LASER_SYNCHRONOUS_M106_M107 and LASER_POWER_SYNC power sync block buffer queueing. + * @brief Add a block to the buffer that just updates the position. + * @details Supports LASER_SYNCHRONOUS_M106_M107 and LASER_POWER_SYNC power sync block buffer queueing. * * @param sync_flag The sync flag to set, determining the type of sync the block will do */ @@ -2813,16 +2818,15 @@ void Planner::buffer_sync_block(const BlockFlagBit sync_flag/*=BLOCK_BIT_SYNC_PO } // buffer_sync_block() /** - * @brief Add a single linear movement - * - * @description Add a new linear movement to the buffer in axis units. - * Leveling and kinematics should be applied before calling this. + * @brief Add a single linear movement. + * @details Add a new linear movement to the buffer in axis units. + * Leveling and kinematics should be applied before calling this. * * @param abce Target position in mm and/or degrees * @param cart_dist_mm The pre-calculated move lengths for all axes, in mm - * @param fr_mm_s (target) speed of the move - * @param extruder optional target extruder (otherwise active_extruder) - * @param hints optional parameters to aid planner calculations + * @param fr_mm_s (Target) speed of the move + * @param extruder Optional target extruder (otherwise active_extruder) + * @param hints Optional parameters to aid planner calculations * * @return false if no segment was queued due to cleaning, cold extrusion, full queue, etc. */ @@ -2867,7 +2871,7 @@ bool Planner::buffer_segment(const abce_pos_t &abce #if HAS_EXTRUDERS // DRYRUN prevents E moves from taking place - if (DEBUGGING(DRYRUN) || TERN0(CANCEL_OBJECTS, cancelable.skipping)) { + if (DEBUGGING(DRYRUN) || TERN0(CANCEL_OBJECTS, cancelable.state.skipping)) { position.e = target.e; TERN_(HAS_POSITION_FLOAT, position_float.e = abce.e); } @@ -2944,14 +2948,14 @@ bool Planner::buffer_segment(const abce_pos_t &abce } // buffer_segment() /** - * Add a new linear movement to the buffer. - * The target is cartesian. It's translated to - * delta/scara if needed. + * @brief Add a new linear movement to the buffer. + * @details The target is cartesian. It's translated to + * delta/scara if needed. * - * cart - target position in mm or degrees - * fr_mm_s - (target) speed of the move (mm/s) - * extruder - optional target extruder (otherwise active_extruder) - * hints - optional parameters to aid planner calculations + * @param cart Target position in mm or degrees + * @param fr_mm_s (Target) speed of the move (mm/s) + * @param extruder Optional target extruder (otherwise active_extruder) + * @param hints Optional parameters to aid planner calculations */ bool Planner::buffer_line(const xyze_pos_t &cart, const_feedRate_t fr_mm_s , const uint8_t extruder/*=active_extruder*/ @@ -3233,7 +3237,7 @@ inline void limit_and_warn(float &val, const AxisEnum axis, FSTR_P const setting } /** - * For the specified 'axis' set the Maximum Acceleration to the given value (mm/s^2) + * For the specified 'axis' set the Maximum Acceleration to the given value (mm/s^2). * The value may be limited with warning feedback, if configured. * Calls refresh_acceleration_rates to precalculate planner terms in steps. * @@ -3257,7 +3261,7 @@ void Planner::set_max_acceleration(const AxisEnum axis, float inMaxAccelMMS2) { } /** - * For the specified 'axis' set the Maximum Feedrate to the given value (mm/s) + * For the specified 'axis' set the Maximum Feedrate to the given value (mm/s). * The value may be limited with warning feedback, if configured. * * This hard limit is applied as a block is being added to the planner queue. @@ -3279,7 +3283,7 @@ void Planner::set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS) { #if ENABLED(CLASSIC_JERK) /** - * For the specified 'axis' set the Maximum Jerk (instant change) to the given value (mm/s) + * For the specified 'axis' set the Maximum Jerk (instant change) to the given value (mm/s). * The value may be limited with warning feedback, if configured. * * This hard limit is applied (to the block start speed) as the block is being added to the planner queue. @@ -3310,7 +3314,7 @@ void Planner::set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS) { uint16_t Planner::block_buffer_runtime() { #ifdef __AVR__ // Protect the access to the variable. Only required for AVR, as - // any 32bit CPU offers atomic access to 32bit variables + // any 32bit CPU offers atomic access to 32bit variables const bool was_enabled = stepper.suspend(); #endif @@ -3332,7 +3336,7 @@ void Planner::set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS) { void Planner::clear_block_buffer_runtime() { #ifdef __AVR__ // Protect the access to the variable. Only required for AVR, as - // any 32bit CPU offers atomic access to 32bit variables + // any 32bit CPU offers atomic access to 32bit variables const bool was_enabled = stepper.suspend(); #endif diff --git a/firmware/Marlin/src/module/planner.h b/firmware/Marlin/src/module/planner.h index 5b37d7f..6438135 100644 --- a/firmware/Marlin/src/module/planner.h +++ b/firmware/Marlin/src/module/planner.h @@ -337,8 +337,8 @@ constexpr uint8_t block_inc_mod(const uint8_t v1, const uint8_t v2) { #endif typedef struct PlannerSettings { - uint32_t max_acceleration_mm_per_s2[DISTINCT_AXES], // (mm/s^2) M201 XYZE - min_segment_time_us; // (µs) M205 B + uint32_t max_acceleration_mm_per_s2[DISTINCT_AXES]; // (mm/s^2) M201 XYZE + uint32_t min_segment_time_us; // (µs) M205 B // (steps) M92 XYZE - Steps per millimeter #if ENABLED(EDITABLE_STEPS_PER_UNIT) @@ -356,12 +356,12 @@ typedef struct PlannerSettings { #undef _DLIM #endif - feedRate_t max_feedrate_mm_s[DISTINCT_AXES]; // (mm/s) M203 XYZE - Max speeds - float acceleration, // (mm/s^2) M204 S - Normal acceleration. DEFAULT ACCELERATION for all printing moves. - retract_acceleration, // (mm/s^2) M204 R - Retract acceleration. Filament pull-back and push-forward while standing still in the other axes - travel_acceleration; // (mm/s^2) M204 T - Travel acceleration. DEFAULT ACCELERATION for all NON printing moves. - feedRate_t min_feedrate_mm_s, // (mm/s) M205 S - Minimum linear feedrate - min_travel_feedrate_mm_s; // (mm/s) M205 T - Minimum travel feedrate + feedRate_t max_feedrate_mm_s[DISTINCT_AXES]; // (mm/s) M203 XYZE - Max speeds + float acceleration, // (mm/s^2) M204 S - Normal acceleration. DEFAULT ACCELERATION for all printing moves. + retract_acceleration, // (mm/s^2) M204 R - Retract acceleration. Filament pull-back and push-forward while standing still in the other axes + travel_acceleration; // (mm/s^2) M204 T - Travel acceleration. DEFAULT ACCELERATION for all NON printing moves. + feedRate_t min_feedrate_mm_s, // (mm/s) M205 S - Minimum linear feedrate + min_travel_feedrate_mm_s; // (mm/s) M205 T - Minimum travel feedrate } planner_settings_t; #if ENABLED(IMPROVE_HOMING_RELIABILITY) @@ -460,8 +460,8 @@ class Planner { #endif #if DISABLED(NO_VOLUMETRICS) + static float volumetric_area_nominal; // (mm^3) Nominal cross-sectional area static float filament_size[EXTRUDERS], // (mm) Diameter of filament, typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder - volumetric_area_nominal, // (mm^3) Nominal cross-sectional area volumetric_multiplier[EXTRUDERS]; // (1/mm^2) Reciprocal of cross-sectional area of filament. Pre-calculated to reduce computation in the planner // May be auto-adjusted by a filament width sensor #endif @@ -811,11 +811,12 @@ class Planner { FORCE_INLINE static uint8_t moves_free() { return (BLOCK_BUFFER_SIZE) - 1 - movesplanned(); } /** - * Planner::get_next_free_block + * @fn Planner::get_next_free_block * - * - Get the next head indices (passed by reference) - * - Wait for the number of spaces to open up in the planner - * - Return the first head block + * @details Get the next head indices (passed by reference) + * Wait for the number of spaces to open up in the planner + * + * @return The first head block */ FORCE_INLINE static block_t* get_next_free_block(uint8_t &next_buffer_head, const uint8_t count=1) { @@ -828,16 +829,18 @@ class Planner { } /** - * Planner::_buffer_steps + * @fn Planner::_buffer_steps * - * Add a new linear movement to the buffer (in terms of steps). + * @brief Add a new linear movement to the planner queue (in terms of steps). * - * target - target position in steps units - * fr_mm_s - (target) speed of the move - * extruder - target extruder - * hints - parameters to aid planner calculations + * @param target Target position in steps units + * @param target_float Target position in direct (mm, degrees) units. + * @param cart_dist_mm The pre-calculated move lengths for all axes, in mm + * @param fr_mm_s (Target) speed of the move + * @param extruder Target extruder + * @param hints Parameters to aid planner calculations * - * Returns true if movement was buffered, false otherwise + * @return true if movement was properly queued, false otherwise (if cleaning) */ static bool _buffer_steps(const xyze_long_t &target OPTARG(HAS_POSITION_FLOAT, const xyze_pos_t &target_float) @@ -846,7 +849,9 @@ class Planner { ); /** - * @brief Populate a block in preparation for insertion + * @fn Planner::_populate_block + * + * @brief Populate a block in preparation for insertion. * @details Populate the fields of a new linear movement block * that will be added to the queue and processed soon * by the Stepper ISR. @@ -855,9 +860,9 @@ class Planner { * @param target Target position in steps units * @param target_float Target position in native mm * @param cart_dist_mm The pre-calculated move lengths for all axes, in mm - * @param fr_mm_s (target) speed of the move - * @param extruder target extruder - * @param hints parameters to aid planner calculations + * @param fr_mm_s (Target) speed of the move + * @param extruder Target extruder + * @param hints Parameters to aid planner calculations * * @return true if movement is acceptable, false otherwise */ @@ -869,31 +874,31 @@ class Planner { ); /** - * Planner::buffer_sync_block - * Add a block to the buffer that just updates the position - * @param sync_flag sets a condition bit to process additional items - * such as sync fan pwm or sync M3/M4 laser power into a queued block + * @fn Planner::buffer_sync_block + * + * @brief Add a block to the buffer that just updates the position. + * @details Supports LASER_SYNCHRONOUS_M106_M107 and LASER_POWER_SYNC power sync block buffer queueing. + * + * @param sync_flag The sync flag to set, determining the type of sync the block will do + * Sets a condition bit to process additional items such as sync fan pwm + * or sync M3/M4 laser power into a queued block */ - static void buffer_sync_block(const BlockFlagBit flag=BLOCK_BIT_SYNC_POSITION); - - #if IS_KINEMATIC - private: - - // Allow do_homing_move to access internal functions, such as buffer_segment. - friend void do_homing_move(const AxisEnum, const float, const feedRate_t, const bool); - #endif + static void buffer_sync_block(const BlockFlagBit flag=BLOCK_BIT_SYNC_POSITION); /** - * Planner::buffer_segment + * @fn Planner::buffer_segment * - * Add a new linear movement to the buffer in axis units. + * @brief Add a single linear movement. + * @details Add a new linear movement to the buffer in axis units. + * Leveling and kinematics should be applied before calling this. * - * Leveling and kinematics should be applied ahead of calling this. + * @param abce Target position in mm and/or degrees + * @param cart_dist_mm The pre-calculated move lengths for all axes, in mm + * @param fr_mm_s (Target) speed of the move + * @param extruder Optional target extruder (otherwise active_extruder) + * @param hints Optional parameters to aid planner calculations * - * a,b,c,e - target positions in mm and/or degrees - * fr_mm_s - (target) speed of the move - * extruder - optional target extruder (otherwise active_extruder) - * hints - optional parameters to aid planner calculations + * @return false if no segment was queued due to cleaning, cold extrusion, full queue, etc... */ static bool buffer_segment(const abce_pos_t &abce OPTARG(HAS_DIST_MM_ARG, const xyze_float_t &cart_dist_mm) @@ -902,17 +907,19 @@ class Planner { , const PlannerHints &hints=PlannerHints() ); - public: - /** - * Add a new linear movement to the buffer. - * The target is cartesian. It's translated to - * delta/scara if needed. + * @fn Planner::buffer_line * - * cart - target position in mm or degrees - * fr_mm_s - (target) speed of the move (mm/s) - * extruder - optional target extruder (otherwise active_extruder) - * hints - optional parameters to aid planner calculations + * @brief Add a new linear movement to the buffer. + * @details The target is cartesian. It's translated to + * delta/scara if needed. + * + * @param cart Target position in mm or degrees + * @param fr_mm_s (Target) speed of the move (mm/s) + * @param extruder Optional target extruder (otherwise active_extruder) + * @param hints Optional parameters to aid planner calculations + * + * @return false if no segment was queued due to cleaning, cold extrusion, full queue, etc... */ static bool buffer_line(const xyze_pos_t &cart, const_feedRate_t fr_mm_s , const uint8_t extruder=active_extruder @@ -1090,6 +1097,11 @@ class Planner { static void recalculate(const_float_t safe_exit_speed_sqr); + #if IS_KINEMATIC + // Allow do_homing_move to access internal functions, such as buffer_segment. + friend void do_homing_move(const AxisEnum, const float, const feedRate_t, const bool); + #endif + #if HAS_JUNCTION_DEVIATION FORCE_INLINE static void normalize_junction_vector(xyze_float_t &vector) { diff --git a/firmware/Marlin/src/module/polargraph.cpp b/firmware/Marlin/src/module/polargraph.cpp index ef6a4c0..534ec17 100644 --- a/firmware/Marlin/src/module/polargraph.cpp +++ b/firmware/Marlin/src/module/polargraph.cpp @@ -37,7 +37,7 @@ #include "../lcd/marlinui.h" #include "../MarlinCore.h" -// Initialized by settings.load() +// Initialized by settings.load float segments_per_second, polargraph_max_belt_len; xy_pos_t draw_area_min, draw_area_max; diff --git a/firmware/Marlin/src/module/probe.cpp b/firmware/Marlin/src/module/probe.cpp index 5e0fb65..a66c11a 100644 --- a/firmware/Marlin/src/module/probe.cpp +++ b/firmware/Marlin/src/module/probe.cpp @@ -103,7 +103,7 @@ Probe probe; -xyz_pos_t Probe::offset; // Initialized by settings.load() +xyz_pos_t Probe::offset; // Initialized by settings.load #if HAS_PROBE_XY_OFFSET const xy_pos_t &Probe::offset_xy = Probe::offset; @@ -961,11 +961,6 @@ float Probe::probe_at_point( DEBUG_POS("", current_position); } - #if ENABLED(BLTOUCH) - // Reset a BLTouch in HS mode if already triggered - if (bltouch.high_speed_mode && bltouch.triggered()) bltouch._reset(); - #endif - // Use a safe Z height for the XY move const float safe_z = _MAX(current_position.z, z_clearance); @@ -1003,6 +998,13 @@ float Probe::probe_at_point( #else // !BD_SENSOR + #if ENABLED(BLTOUCH) + // Now at the safe_z if it is still triggered it may be in an alarm + // condition. Reset to clear alarm has a side effect of stowing the probe, + // which the following deploy will handle. + if (bltouch.triggered()) bltouch._reset(); + #endif + measured_z = deploy() ? NAN : run_z_probe(sanity_check, z_min_point, z_clearance) + offset.z; // Deploy succeeded and a successful measurement was done. diff --git a/firmware/Marlin/src/module/servo.h b/firmware/Marlin/src/module/servo.h index 0286fe9..3b6c33a 100644 --- a/firmware/Marlin/src/module/servo.h +++ b/firmware/Marlin/src/module/servo.h @@ -55,7 +55,7 @@ constexpr uint16_t sasn[2] = { 0 }; #endif - #ifdef Z_PROBE_SERVO_NR + #if HAS_Z_SERVO_PROBE #if ENABLED(BLTOUCH) #include "../feature/bltouch.h" #undef Z_SERVO_ANGLES @@ -76,6 +76,9 @@ #ifndef SWITCHING_NOZZLE_SERVO_NR #define SWITCHING_NOZZLE_SERVO_NR -1 #endif + #ifndef SWITCHING_NOZZLE_E1_SERVO_NR + #define SWITCHING_NOZZLE_E1_SERVO_NR -1 + #endif #ifndef Z_PROBE_SERVO_NR #define Z_PROBE_SERVO_NR -1 #endif @@ -83,12 +86,12 @@ #define SASN(J,I) TERN(SWITCHING_NOZZLE_TWO_SERVOS, sasn[J][I], sasn[I]) #define ASRC(N,I) ( \ - N == SWITCHING_EXTRUDER_SERVO_NR ? sase[I] \ - : N == SWITCHING_EXTRUDER_E23_SERVO_NR ? sase[I+2] \ - : N == SWITCHING_NOZZLE_SERVO_NR ? SASN(0,I) \ - TERN_(SWITCHING_NOZZLE_TWO_SERVOS, : N == SWITCHING_NOZZLE_E1_SERVO_NR ? SASN(1,I)) \ - : N == Z_PROBE_SERVO_NR ? sazp[I] \ - : 0 ) + N == SWITCHING_EXTRUDER_SERVO_NR ? sase[I] \ + : N == SWITCHING_EXTRUDER_E23_SERVO_NR ? sase[I+2] \ + : N == SWITCHING_NOZZLE_SERVO_NR ? SASN(0,I) \ + : N == SWITCHING_NOZZLE_E1_SERVO_NR ? SASN(1,I) \ + : N == Z_PROBE_SERVO_NR ? sazp[I] \ + : 0 ) #if ENABLED(EDITABLE_SERVO_ANGLES) extern uint16_t servo_angles[NUM_SERVOS][2]; @@ -97,24 +100,8 @@ #define CONST_SERVO_ANGLES servo_angles #endif - constexpr uint16_t CONST_SERVO_ANGLES [NUM_SERVOS][2] = { - { ASRC(0,0), ASRC(0,1) } - #if NUM_SERVOS > 1 - , { ASRC(1,0), ASRC(1,1) } - #if NUM_SERVOS > 2 - , { ASRC(2,0), ASRC(2,1) } - #if NUM_SERVOS > 3 - , { ASRC(3,0), ASRC(3,1) } - #if NUM_SERVOS > 4 - , { ASRC(4,0), ASRC(4,1) } - #if NUM_SERVOS > 5 - , { ASRC(5,0), ASRC(5,1) } - #endif - #endif - #endif - #endif - #endif - }; + #define _ASRC_PAIR(N) { ASRC(N,0), ASRC(N,1) }, + constexpr uint16_t CONST_SERVO_ANGLES [NUM_SERVOS][2] = { REPEAT(NUM_SERVOS, _ASRC_PAIR) }; #if HAS_Z_SERVO_PROBE #define DEPLOY_Z_SERVO() servo[Z_PROBE_SERVO_NR].move(servo_angles[Z_PROBE_SERVO_NR][0]) diff --git a/firmware/Marlin/src/module/settings.cpp b/firmware/Marlin/src/module/settings.cpp index 52057ce..51677fd 100644 --- a/firmware/Marlin/src/module/settings.cpp +++ b/firmware/Marlin/src/module/settings.cpp @@ -179,9 +179,9 @@ #endif #if HAS_PRUSA_MMU3 - #include "../feature/mmu3/mmu2.h" + #include "../feature/mmu3/mmu3.h" #include "../feature/mmu3/SpoolJoin.h" - #include "../feature/mmu3/mmu2_reporting.h" + #include "../feature/mmu3/mmu3_reporting.h" #endif #pragma pack(push, 1) // No padding between variables @@ -462,6 +462,13 @@ typedef struct SettingsDataStruct { fwretract_settings_t fwretract_settings; // M207 S F Z W, M208 S F W R bool autoretract_enabled; // M209 S + // + // EDITABLE_HOMING_FEEDRATE + // + #if ENABLED(EDITABLE_HOMING_FEEDRATE) + xyz_feedrate_t homing_feedrate_mm_m; // M210 X Y Z I J K U V W + #endif + // // !NO_VOLUMETRIC // @@ -1333,6 +1340,14 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(TERN(FWRETRACT_AUTORETRACT, fwretract.autoretract_enabled, autoretract_enabled)); } + // + // Homing Feedrate + // + #if ENABLED(EDITABLE_HOMING_FEEDRATE) + _FIELD_TEST(homing_feedrate_mm_m); + EEPROM_WRITE(homing_feedrate_mm_m); + #endif + // // Volumetric & Filament Size // @@ -2421,6 +2436,14 @@ void MarlinSettings::postprocess() { #endif } + // + // Homing Feedrate + // + #if ENABLED(EDITABLE_HOMING_FEEDRATE) + _FIELD_TEST(homing_feedrate_mm_m); + EEPROM_READ(homing_feedrate_mm_m); + #endif + // // Volumetric & Filament Size // @@ -3077,17 +3100,24 @@ void MarlinSettings::postprocess() { #endif // HAS_EARLY_LCD_SETTINGS bool MarlinSettings::load() { + // If the EEPROM data is valid load it if (validate()) { const EEPROM_Error err = _load(); const bool success = (err == ERR_EEPROM_NOERR); TERN_(EXTENSIBLE_UI, ExtUI::onSettingsLoaded(success)); return success; } + + // Otherwise reset settings to default "factory settings" reset(); + + // Options to overwrite the EEPROM on error #if ANY(EEPROM_AUTO_INIT, EEPROM_INIT_NOW) - (void)save(); - SERIAL_ECHO_MSG("EEPROM Initialized"); + (void)init_eeprom(); + LCD_MESSAGE(MSG_EEPROM_INITIALIZED); + SERIAL_ECHO_MSG(STR_EEPROM_INITIALIZED); #endif + return false; } @@ -3649,6 +3679,11 @@ void MarlinSettings::reset() { // TERN_(FWRETRACT, fwretract.reset()); + // + // Homing Feedrate + // + TERN_(EDITABLE_HOMING_FEEDRATE, homing_feedrate_mm_m = xyz_feedrate_t(HOMING_FEEDRATE_MM_M)); + // // Volumetric & Filament Size // @@ -4049,6 +4084,11 @@ void MarlinSettings::reset() { TERN_(FWRETRACT_AUTORETRACT, gcode.M209_report(forReplay)); #endif + // + // Homing Feedrate + // + TERN_(EDITABLE_HOMING_FEEDRATE, gcode.M210_report(forReplay)); + // // Probe Offset // diff --git a/firmware/Marlin/src/module/stepper.cpp b/firmware/Marlin/src/module/stepper.cpp index 81e1d04..b1573f2 100644 --- a/firmware/Marlin/src/module/stepper.cpp +++ b/firmware/Marlin/src/module/stepper.cpp @@ -160,7 +160,7 @@ Stepper stepper; // Singleton #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM bool Stepper::initialized; // = false - uint32_t Stepper::motor_current_setting[MOTOR_CURRENT_COUNT]; // Initialized by settings.load() + uint32_t Stepper::motor_current_setting[MOTOR_CURRENT_COUNT]; // Initialized by settings.load #if HAS_MOTOR_CURRENT_SPI constexpr uint32_t Stepper::digipot_count[]; #endif @@ -212,7 +212,7 @@ uint32_t Stepper::acceleration_time, Stepper::deceleration_time; #if ENABLED(ADAPTIVE_STEP_SMOOTHING) #if ENABLED(ADAPTIVE_STEP_SMOOTHING_TOGGLE) - bool Stepper::adaptive_step_smoothing_enabled; // Initialized by settings.load() + bool Stepper::adaptive_step_smoothing_enabled; // Initialized by settings.load #else constexpr bool Stepper::adaptive_step_smoothing_enabled; // = true #endif @@ -314,131 +314,132 @@ xyze_int8_t Stepper::count_direction{0}; #define MAXDIR(A) (count_direction[_AXIS(A)] > 0) #define STEPTEST(A,M,I) TERN0(USE_##A##I##_##M, !(TEST(endstops.state(), A##I##_##M) && M## DIR(A)) && !locked_ ##A##I##_motor) +#define _STEP_WRITE(A,I,V) A##I##_STEP_WRITE(V) #define DUAL_ENDSTOP_APPLY_STEP(A,V) \ if (separate_multi_axis) { \ if (ENABLED(A##_HOME_TO_MIN)) { \ - if (STEPTEST(A,MIN, )) A## _STEP_WRITE(V); \ - if (STEPTEST(A,MIN,2)) A##2_STEP_WRITE(V); \ + if (STEPTEST(A,MIN, )) _STEP_WRITE(A, ,V); \ + if (STEPTEST(A,MIN,2)) _STEP_WRITE(A,2,V); \ } \ else if (ENABLED(A##_HOME_TO_MAX)) { \ - if (STEPTEST(A,MAX, )) A## _STEP_WRITE(V); \ - if (STEPTEST(A,MAX,2)) A##2_STEP_WRITE(V); \ + if (STEPTEST(A,MAX, )) _STEP_WRITE(A, ,V); \ + if (STEPTEST(A,MAX,2)) _STEP_WRITE(A,2,V); \ } \ } \ else { \ - A##_STEP_WRITE(V); \ - A##2_STEP_WRITE(V); \ + _STEP_WRITE(A, ,V); \ + _STEP_WRITE(A,2,V); \ } #define DUAL_SEPARATE_APPLY_STEP(A,V) \ if (separate_multi_axis) { \ - if (!locked_##A## _motor) A## _STEP_WRITE(V); \ - if (!locked_##A##2_motor) A##2_STEP_WRITE(V); \ + if (!locked_##A## _motor) _STEP_WRITE(A, ,V); \ + if (!locked_##A##2_motor) _STEP_WRITE(A,2,V); \ } \ else { \ - A##_STEP_WRITE(V); \ - A##2_STEP_WRITE(V); \ + _STEP_WRITE(A, ,V); \ + _STEP_WRITE(A,2,V); \ } #define TRIPLE_ENDSTOP_APPLY_STEP(A,V) \ if (separate_multi_axis) { \ if (ENABLED(A##_HOME_TO_MIN)) { \ - if (STEPTEST(A,MIN, )) A## _STEP_WRITE(V); \ - if (STEPTEST(A,MIN,2)) A##2_STEP_WRITE(V); \ - if (STEPTEST(A,MIN,3)) A##3_STEP_WRITE(V); \ + if (STEPTEST(A,MIN, )) _STEP_WRITE(A, ,V); \ + if (STEPTEST(A,MIN,2)) _STEP_WRITE(A,2,V); \ + if (STEPTEST(A,MIN,3)) _STEP_WRITE(A,3,V); \ } \ else if (ENABLED(A##_HOME_TO_MAX)) { \ - if (STEPTEST(A,MAX, )) A## _STEP_WRITE(V); \ - if (STEPTEST(A,MAX,2)) A##2_STEP_WRITE(V); \ - if (STEPTEST(A,MAX,3)) A##3_STEP_WRITE(V); \ + if (STEPTEST(A,MAX, )) _STEP_WRITE(A, ,V); \ + if (STEPTEST(A,MAX,2)) _STEP_WRITE(A,2,V); \ + if (STEPTEST(A,MAX,3)) _STEP_WRITE(A,3,V); \ } \ } \ else { \ - A##_STEP_WRITE(V); \ - A##2_STEP_WRITE(V); \ - A##3_STEP_WRITE(V); \ + _STEP_WRITE(A, ,V); \ + _STEP_WRITE(A,2,V); \ + _STEP_WRITE(A,3,V); \ } #define TRIPLE_SEPARATE_APPLY_STEP(A,V) \ if (separate_multi_axis) { \ - if (!locked_##A## _motor) A## _STEP_WRITE(V); \ - if (!locked_##A##2_motor) A##2_STEP_WRITE(V); \ - if (!locked_##A##3_motor) A##3_STEP_WRITE(V); \ + if (!locked_##A## _motor) _STEP_WRITE(A, ,V); \ + if (!locked_##A##2_motor) _STEP_WRITE(A,2,V); \ + if (!locked_##A##3_motor) _STEP_WRITE(A,3,V); \ } \ else { \ - A## _STEP_WRITE(V); \ - A##2_STEP_WRITE(V); \ - A##3_STEP_WRITE(V); \ + _STEP_WRITE(A, ,V); \ + _STEP_WRITE(A,2,V); \ + _STEP_WRITE(A,3,V); \ } #define QUAD_ENDSTOP_APPLY_STEP(A,V) \ if (separate_multi_axis) { \ if (ENABLED(A##_HOME_TO_MIN)) { \ - if (STEPTEST(A,MIN, )) A## _STEP_WRITE(V); \ - if (STEPTEST(A,MIN,2)) A##2_STEP_WRITE(V); \ - if (STEPTEST(A,MIN,3)) A##3_STEP_WRITE(V); \ - if (STEPTEST(A,MIN,4)) A##4_STEP_WRITE(V); \ + if (STEPTEST(A,MIN, )) _STEP_WRITE(A, ,V); \ + if (STEPTEST(A,MIN,2)) _STEP_WRITE(A,2,V); \ + if (STEPTEST(A,MIN,3)) _STEP_WRITE(A,3,V); \ + if (STEPTEST(A,MIN,4)) _STEP_WRITE(A,4,V); \ } \ else if (ENABLED(A##_HOME_TO_MAX)) { \ - if (STEPTEST(A,MAX, )) A## _STEP_WRITE(V); \ - if (STEPTEST(A,MAX,2)) A##2_STEP_WRITE(V); \ - if (STEPTEST(A,MAX,3)) A##3_STEP_WRITE(V); \ - if (STEPTEST(A,MAX,4)) A##4_STEP_WRITE(V); \ + if (STEPTEST(A,MAX, )) _STEP_WRITE(A, ,V); \ + if (STEPTEST(A,MAX,2)) _STEP_WRITE(A,2,V); \ + if (STEPTEST(A,MAX,3)) _STEP_WRITE(A,3,V); \ + if (STEPTEST(A,MAX,4)) _STEP_WRITE(A,4,V); \ } \ } \ else { \ - A## _STEP_WRITE(V); \ - A##2_STEP_WRITE(V); \ - A##3_STEP_WRITE(V); \ - A##4_STEP_WRITE(V); \ + _STEP_WRITE(A, ,V); \ + _STEP_WRITE(A,2,V); \ + _STEP_WRITE(A,3,V); \ + _STEP_WRITE(A,4,V); \ } #define QUAD_SEPARATE_APPLY_STEP(A,V) \ if (separate_multi_axis) { \ - if (!locked_##A## _motor) A## _STEP_WRITE(V); \ - if (!locked_##A##2_motor) A##2_STEP_WRITE(V); \ - if (!locked_##A##3_motor) A##3_STEP_WRITE(V); \ - if (!locked_##A##4_motor) A##4_STEP_WRITE(V); \ + if (!locked_##A## _motor) _STEP_WRITE(A, ,V); \ + if (!locked_##A##2_motor) _STEP_WRITE(A,2,V); \ + if (!locked_##A##3_motor) _STEP_WRITE(A,3,V); \ + if (!locked_##A##4_motor) _STEP_WRITE(A,4,V); \ } \ else { \ - A## _STEP_WRITE(V); \ - A##2_STEP_WRITE(V); \ - A##3_STEP_WRITE(V); \ - A##4_STEP_WRITE(V); \ + _STEP_WRITE(A, ,V); \ + _STEP_WRITE(A,2,V); \ + _STEP_WRITE(A,3,V); \ + _STEP_WRITE(A,4,V); \ } #if HAS_SYNCED_X_STEPPERS #define X_APPLY_DIR(FWD,Q) do{ X_DIR_WRITE(FWD); X2_DIR_WRITE(INVERT_DIR(X2_VS_X, FWD)); }while(0) #if ENABLED(X_DUAL_ENDSTOPS) - #define X_APPLY_STEP(FWD,Q) DUAL_ENDSTOP_APPLY_STEP(X,FWD) + #define X_APPLY_STEP(STATE,Q) DUAL_ENDSTOP_APPLY_STEP(X,STATE) #else - #define X_APPLY_STEP(FWD,Q) do{ X_STEP_WRITE(FWD); X2_STEP_WRITE(FWD); }while(0) + #define X_APPLY_STEP(STATE,Q) do{ X_STEP_WRITE(STATE); X2_STEP_WRITE(STATE); }while(0) #endif #elif ENABLED(DUAL_X_CARRIAGE) #define X_APPLY_DIR(FWD,ALWAYS) do{ \ if (extruder_duplication_enabled || ALWAYS) { X_DIR_WRITE(FWD); X2_DIR_WRITE((FWD) ^ idex_mirrored_mode); } \ else if (last_moved_extruder) X2_DIR_WRITE(FWD); else X_DIR_WRITE(FWD); \ }while(0) - #define X_APPLY_STEP(FWD,ALWAYS) do{ \ - if (extruder_duplication_enabled || ALWAYS) { X_STEP_WRITE(FWD); X2_STEP_WRITE(FWD); } \ - else if (last_moved_extruder) X2_STEP_WRITE(FWD); else X_STEP_WRITE(FWD); \ + #define X_APPLY_STEP(STATE,ALWAYS) do{ \ + if (extruder_duplication_enabled || ALWAYS) { X_STEP_WRITE(STATE); X2_STEP_WRITE(STATE); } \ + else if (last_moved_extruder) X2_STEP_WRITE(STATE); else X_STEP_WRITE(STATE); \ }while(0) #elif HAS_X_AXIS #define X_APPLY_DIR(FWD,Q) X_DIR_WRITE(FWD) - #define X_APPLY_STEP(FWD,Q) X_STEP_WRITE(FWD) + #define X_APPLY_STEP(STATE,Q) X_STEP_WRITE(STATE) #endif #if HAS_SYNCED_Y_STEPPERS #define Y_APPLY_DIR(FWD,Q) do{ Y_DIR_WRITE(FWD); Y2_DIR_WRITE(INVERT_DIR(Y2_VS_Y, FWD)); }while(0) #if ENABLED(Y_DUAL_ENDSTOPS) - #define Y_APPLY_STEP(FWD,Q) DUAL_ENDSTOP_APPLY_STEP(Y,FWD) + #define Y_APPLY_STEP(STATE,Q) DUAL_ENDSTOP_APPLY_STEP(Y,STATE) #else - #define Y_APPLY_STEP(FWD,Q) do{ Y_STEP_WRITE(FWD); Y2_STEP_WRITE(FWD); }while(0) + #define Y_APPLY_STEP(STATE,Q) do{ Y_STEP_WRITE(STATE); Y2_STEP_WRITE(STATE); }while(0) #endif #elif HAS_Y_AXIS #define Y_APPLY_DIR(FWD,Q) Y_DIR_WRITE(FWD) - #define Y_APPLY_STEP(FWD,Q) Y_STEP_WRITE(FWD) + #define Y_APPLY_STEP(STATE,Q) Y_STEP_WRITE(STATE) #endif #if NUM_Z_STEPPERS == 4 @@ -447,60 +448,60 @@ xyze_int8_t Stepper::count_direction{0}; Z3_DIR_WRITE(INVERT_DIR(Z3_VS_Z, FWD)); Z4_DIR_WRITE(INVERT_DIR(Z4_VS_Z, FWD)); \ }while(0) #if ENABLED(Z_MULTI_ENDSTOPS) - #define Z_APPLY_STEP(FWD,Q) QUAD_ENDSTOP_APPLY_STEP(Z,FWD) + #define Z_APPLY_STEP(STATE,Q) QUAD_ENDSTOP_APPLY_STEP(Z,STATE) #elif ENABLED(Z_STEPPER_AUTO_ALIGN) - #define Z_APPLY_STEP(FWD,Q) QUAD_SEPARATE_APPLY_STEP(Z,FWD) + #define Z_APPLY_STEP(STATE,Q) QUAD_SEPARATE_APPLY_STEP(Z,STATE) #else - #define Z_APPLY_STEP(FWD,Q) do{ Z_STEP_WRITE(FWD); Z2_STEP_WRITE(FWD); Z3_STEP_WRITE(FWD); Z4_STEP_WRITE(FWD); }while(0) + #define Z_APPLY_STEP(STATE,Q) do{ Z_STEP_WRITE(STATE); Z2_STEP_WRITE(STATE); Z3_STEP_WRITE(STATE); Z4_STEP_WRITE(STATE); }while(0) #endif #elif NUM_Z_STEPPERS == 3 #define Z_APPLY_DIR(FWD,Q) do{ \ Z_DIR_WRITE(FWD); Z2_DIR_WRITE(INVERT_DIR(Z2_VS_Z, FWD)); Z3_DIR_WRITE(INVERT_DIR(Z3_VS_Z, FWD)); \ }while(0) #if ENABLED(Z_MULTI_ENDSTOPS) - #define Z_APPLY_STEP(FWD,Q) TRIPLE_ENDSTOP_APPLY_STEP(Z,FWD) + #define Z_APPLY_STEP(STATE,Q) TRIPLE_ENDSTOP_APPLY_STEP(Z,STATE) #elif ENABLED(Z_STEPPER_AUTO_ALIGN) - #define Z_APPLY_STEP(FWD,Q) TRIPLE_SEPARATE_APPLY_STEP(Z,FWD) + #define Z_APPLY_STEP(STATE,Q) TRIPLE_SEPARATE_APPLY_STEP(Z,STATE) #else - #define Z_APPLY_STEP(FWD,Q) do{ Z_STEP_WRITE(FWD); Z2_STEP_WRITE(FWD); Z3_STEP_WRITE(FWD); }while(0) + #define Z_APPLY_STEP(STATE,Q) do{ Z_STEP_WRITE(STATE); Z2_STEP_WRITE(STATE); Z3_STEP_WRITE(STATE); }while(0) #endif #elif NUM_Z_STEPPERS == 2 #define Z_APPLY_DIR(FWD,Q) do{ Z_DIR_WRITE(FWD); Z2_DIR_WRITE(INVERT_DIR(Z2_VS_Z, FWD)); }while(0) #if ENABLED(Z_MULTI_ENDSTOPS) - #define Z_APPLY_STEP(FWD,Q) DUAL_ENDSTOP_APPLY_STEP(Z,FWD) + #define Z_APPLY_STEP(STATE,Q) DUAL_ENDSTOP_APPLY_STEP(Z,STATE) #elif ENABLED(Z_STEPPER_AUTO_ALIGN) - #define Z_APPLY_STEP(FWD,Q) DUAL_SEPARATE_APPLY_STEP(Z,FWD) + #define Z_APPLY_STEP(STATE,Q) DUAL_SEPARATE_APPLY_STEP(Z,STATE) #else - #define Z_APPLY_STEP(FWD,Q) do{ Z_STEP_WRITE(FWD); Z2_STEP_WRITE(FWD); }while(0) + #define Z_APPLY_STEP(STATE,Q) do{ Z_STEP_WRITE(STATE); Z2_STEP_WRITE(STATE); }while(0) #endif #elif HAS_Z_AXIS #define Z_APPLY_DIR(FWD,Q) Z_DIR_WRITE(FWD) - #define Z_APPLY_STEP(FWD,Q) Z_STEP_WRITE(FWD) + #define Z_APPLY_STEP(STATE,Q) Z_STEP_WRITE(STATE) #endif #if HAS_I_AXIS #define I_APPLY_DIR(FWD,Q) I_DIR_WRITE(FWD) - #define I_APPLY_STEP(FWD,Q) I_STEP_WRITE(FWD) + #define I_APPLY_STEP(STATE,Q) I_STEP_WRITE(STATE) #endif #if HAS_J_AXIS #define J_APPLY_DIR(FWD,Q) J_DIR_WRITE(FWD) - #define J_APPLY_STEP(FWD,Q) J_STEP_WRITE(FWD) + #define J_APPLY_STEP(STATE,Q) J_STEP_WRITE(STATE) #endif #if HAS_K_AXIS #define K_APPLY_DIR(FWD,Q) K_DIR_WRITE(FWD) - #define K_APPLY_STEP(FWD,Q) K_STEP_WRITE(FWD) + #define K_APPLY_STEP(STATE,Q) K_STEP_WRITE(STATE) #endif #if HAS_U_AXIS #define U_APPLY_DIR(FWD,Q) U_DIR_WRITE(FWD) - #define U_APPLY_STEP(FWD,Q) U_STEP_WRITE(FWD) + #define U_APPLY_STEP(STATE,Q) U_STEP_WRITE(STATE) #endif #if HAS_V_AXIS #define V_APPLY_DIR(FWD,Q) V_DIR_WRITE(FWD) - #define V_APPLY_STEP(FWD,Q) V_STEP_WRITE(FWD) + #define V_APPLY_STEP(STATE,Q) V_STEP_WRITE(STATE) #endif #if HAS_W_AXIS #define W_APPLY_DIR(FWD,Q) W_DIR_WRITE(FWD) - #define W_APPLY_STEP(FWD,Q) W_STEP_WRITE(FWD) + #define W_APPLY_STEP(STATE,Q) W_STEP_WRITE(STATE) #endif //#define E0_APPLY_DIR(FWD) do{ (FWD) ? FWD_E_DIR(0) : REV_E_DIR(0); }while(0) @@ -515,8 +516,8 @@ xyze_int8_t Stepper::count_direction{0}; #if ENABLED(MIXING_EXTRUDER) #define E_APPLY_DIR(FWD,Q) do{ if (FWD) { MIXER_STEPPER_LOOP(j) FWD_E_DIR(j); } else { MIXER_STEPPER_LOOP(j) REV_E_DIR(j); } }while(0) #else - #define E_APPLY_STEP(FWD,Q) E_STEP_WRITE(stepper_extruder, FWD) #define E_APPLY_DIR(FWD,Q) do{ if (FWD) { FWD_E_DIR(stepper_extruder); } else { REV_E_DIR(stepper_extruder); } }while(0) + #define E_APPLY_STEP(STATE,Q) E_STEP_WRITE(stepper_extruder, STATE) #endif constexpr uint32_t cycles_to_ns(const uint32_t CYC) { return 1000UL * (CYC) / ((F_CPU) / 1000000); } @@ -1780,7 +1781,7 @@ void Stepper::pulse_phase_isr() { do { AxisFlags step_needed{0}; - #define _APPLY_STEP(AXIS, INV, ALWAYS) AXIS ##_APPLY_STEP(INV, ALWAYS) + #define _APPLY_STEP(AXIS, STATE, ALWAYS) AXIS ##_APPLY_STEP(STATE, ALWAYS) #define _STEP_STATE(AXIS) STEP_STATE_## AXIS // Determine if a pulse is needed using Bresenham diff --git a/firmware/Marlin/src/module/stepper.h b/firmware/Marlin/src/module/stepper.h index c678b9d..306b215 100644 --- a/firmware/Marlin/src/module/stepper.h +++ b/firmware/Marlin/src/module/stepper.h @@ -324,7 +324,7 @@ class Stepper { #define MOTOR_CURRENT_COUNT COUNT(Stepper::digipot_count) #endif static bool initialized; - static uint32_t motor_current_setting[MOTOR_CURRENT_COUNT]; // Initialized by settings.load() + static uint32_t motor_current_setting[MOTOR_CURRENT_COUNT]; // Initialized by settings.load #endif // Last-moved extruder, as set when the last movement was fetched from planner diff --git a/firmware/Marlin/src/module/stepper/trinamic.cpp b/firmware/Marlin/src/module/stepper/trinamic.cpp index ce99d87..c0fb083 100644 --- a/firmware/Marlin/src/module/stepper/trinamic.cpp +++ b/firmware/Marlin/src/module/stepper/trinamic.cpp @@ -56,6 +56,7 @@ enum StealthIndex : uint8_t { #else #define TMC_UART_HW_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(&ST##_HARDWARE_SERIAL, float(ST##_RSENSE), ST##_SLAVE_ADDRESS) #endif + #define TMC_UART_SW_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_SERIAL_RX_PIN, ST##_SERIAL_TX_PIN, float(ST##_RSENSE), ST##_SLAVE_ADDRESS) #define _TMC_SPI_DEFINE(IC, ST, AI) __TMC_SPI_DEFINE(IC, ST, TMC_##ST##_LABEL, AI) @@ -292,7 +293,7 @@ enum StealthIndex : uint8_t { // // TMC2208/2209 Driver objects and inits // -#if HAS_TMC220x +#if HAS_TMC_UART #if AXIS_HAS_UART(X) #ifdef X_HARDWARE_SERIAL TMC_UART_DEFINE(HW, X, X); diff --git a/firmware/Marlin/src/module/stepper/trinamic.h b/firmware/Marlin/src/module/stepper/trinamic.h index 3ae784b..bf7eaf7 100644 --- a/firmware/Marlin/src/module/stepper/trinamic.h +++ b/firmware/Marlin/src/module/stepper/trinamic.h @@ -108,7 +108,7 @@ #define CHOPPER_TIMING_E CHOPPER_TIMING #endif -#if HAS_TMC220x +#if HAS_TMC_UART void tmc_serial_begin(); #endif diff --git a/firmware/Marlin/src/module/temperature.cpp b/firmware/Marlin/src/module/temperature.cpp index 5c11df2..96295d7 100644 --- a/firmware/Marlin/src/module/temperature.cpp +++ b/firmware/Marlin/src/module/temperature.cpp @@ -52,6 +52,8 @@ #if ENABLED(DWIN_CREALITY_LCD) #include "../lcd/e3v2/creality/dwin.h" +#elif ENABLED(SOVOL_SV06_RTS) + #include "../lcd/sovol_rts/sovol_rts.h" #endif #if ENABLED(EXTENSIBLE_UI) @@ -695,7 +697,11 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(USE_CONTROLLER_FAN, controllerFan.update()); // Run UI update - ui.update(); + #if ENABLED(SOVOL_SV06_RTS) + RTS_Update(); + #else + ui.update(); + #endif return temp_ready; } @@ -886,11 +892,15 @@ volatile bool Temperature::raw_temps_ready = false; temp_change_ms = ms + SEC_TO_MS(watch_temp_period); // - move the expiration timer up if (current_temp > watch_temp_target) heated = true; // - Flag if target temperature reached } - else if (ELAPSED(ms, temp_change_ms)) // Watch timer expired + else if (ELAPSED(ms, temp_change_ms)) { // Watch timer expired + TERN_(SOVOL_SV06_RTS, rts.gotoPageBeep(ID_KillHeat_L, ID_KillHeat_D)); _TEMP_ERROR(heater_id, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, current_temp); + } } - else if (current_temp < target - (MAX_OVERSHOOT_PID_AUTOTUNE)) // Heated, then temperature fell too far? + else if (current_temp < target - (MAX_OVERSHOOT_PID_AUTOTUNE)) { // Heated, then temperature fell too far? + TERN_(SOVOL_SV06_RTS, rts.gotoPageBeep(ID_KillRunaway_L, ID_KillRunaway_D)); _TEMP_ERROR(heater_id, FPSTR(str_t_thermal_runaway), MSG_ERR_THERMAL_RUNAWAY, current_temp); + } } #endif } // every 2 seconds @@ -903,6 +913,7 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_TUNING_TIMEOUT)); TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_PID_TIMEOUT))); + TERN_(SOVOL_SV06_RTS, rts.gotoPageBeep(ID_KillHeat_L, ID_KillHeat_D)); SERIAL_ECHOPGM(STR_PID_AUTOTUNE); SERIAL_ECHOLNPGM(STR_PID_TIMEOUT); break; } @@ -1580,6 +1591,7 @@ void Temperature::_temp_error( void Temperature::maxtemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_TEMP, const celsius_float_t deg)) { #if HAS_HOTEND || HAS_HEATED_BED + TERN_(SOVOL_SV06_RTS, rts.gotoPageBeep(ID_KillBadTemp_L, ID_KillBadTemp_D)); TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(1)); TERN_(EXTENSIBLE_UI, ExtUI::onMaxTempError(heater_id)); #endif @@ -1588,6 +1600,7 @@ void Temperature::maxtemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_TEMP, const celsius_float_t deg)) { #if HAS_HOTEND || HAS_HEATED_BED + TERN_(SOVOL_SV06_RTS, rts.gotoPageBeep(ID_KillBadTemp_L, ID_KillBadTemp_D)); TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); TERN_(EXTENSIBLE_UI, ExtUI::onMinTempError(heater_id)); #endif @@ -1793,7 +1806,10 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T #if ENABLED(THERMAL_PROTECTION_HOTENDS) { const auto deg = degHotend(e); - if (deg > temp_range[e].maxtemp) MAXTEMP_ERROR(e, deg); + if (deg > temp_range[e].maxtemp) { + TERN_(SOVOL_SV06_RTS, rts.gotoPageBeep(ID_KillBadTemp_L, ID_KillBadTemp_D)); + MAXTEMP_ERROR(e, deg); + } } #endif @@ -1814,6 +1830,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T if (watch_hotend[e].check(temp)) // Increased enough? start_watching_hotend(e); // If temp reached, turn off elapsed check else { + TERN_(SOVOL_SV06_RTS, rts.gotoPageBeep(ID_KillHeat_L, ID_KillHeat_D)); TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(e)); _TEMP_ERROR(e, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, temp); @@ -1833,7 +1850,10 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T #if ENABLED(THERMAL_PROTECTION_BED) { const auto deg = degBed(); - if (deg > BED_MAXTEMP) MAXTEMP_ERROR(H_BED, deg); + if (deg > BED_MAXTEMP) { + TERN_(SOVOL_SV06_RTS, rts.gotoPageBeep(ID_KillBadTemp_L, ID_KillBadTemp_D)); + MAXTEMP_ERROR(H_BED, deg); + } } #endif @@ -1845,6 +1865,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T if (watch_bed.check(deg)) // Increased enough? start_watching_bed(); // If temp reached, turn off elapsed check else { + TERN_(SOVOL_SV06_RTS, rts.gotoPageBeep(ID_KillHeat_L, ID_KillHeat_D)); TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(H_BED)); _TEMP_ERROR(H_BED, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, deg); @@ -1861,7 +1882,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T static bool last_pause_state; #endif - do { + do { // 'break' out of this block #if DISABLED(PIDTEMPBED) if (PENDING(ms, next_bed_check_ms) @@ -1887,39 +1908,64 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T constexpr bool bed_timed_out = false; #endif - if (!bed_timed_out) { - if (is_bed_preheating()) { - temp_bed.soft_pwm_amount = MAX_BED_POWER >> 1; - } - else { - #if ENABLED(PIDTEMPBED) - temp_bed.soft_pwm_amount = WITHIN(temp_bed.celsius, BED_MINTEMP, BED_MAXTEMP) ? (int)get_pid_output_bed() >> 1 : 0; - #else - // Check if temperature is within the correct band - if (WITHIN(temp_bed.celsius, BED_MINTEMP, BED_MAXTEMP)) { - #if ENABLED(BED_LIMIT_SWITCHING) + if (bed_timed_out) break; - // Range-limited "bang-bang" bed heating - if (temp_bed.is_above_target(BED_HYSTERESIS)) - temp_bed.soft_pwm_amount = 0; - else if (temp_bed.is_below_target(BED_HYSTERESIS)) - temp_bed.soft_pwm_amount = MAX_BED_POWER >> 1; - - #else // !PIDTEMPBED && !BED_LIMIT_SWITCHING - - // Simple (noisy) "bang-bang" bed heating - temp_bed.soft_pwm_amount = temp_bed.is_below_target() ? MAX_BED_POWER >> 1 : 0; - - #endif - } - else { - temp_bed.soft_pwm_amount = 0; - WRITE_HEATER_BED(LOW); - } - #endif - } + if (is_bed_preheating()) { + temp_bed.soft_pwm_amount = MAX_BED_POWER >> 1; + break; } + #if ENABLED(PIDTEMPBED) + + // + // PID Bed Heating + // + temp_bed.soft_pwm_amount = WITHIN(temp_bed.celsius, BED_MINTEMP, BED_MAXTEMP) ? (int)get_pid_output_bed() >> 1 : 0; + + #else // !PIDTEMPBED + + // + // Range-limited "bang-bang" bed heating + // + + // Bed Off if the current bed temperature is outside the allowed range + if (!WITHIN(temp_bed.celsius, BED_MINTEMP, BED_MAXTEMP)) { + temp_bed.soft_pwm_amount = 0; + WRITE_HEATER_BED(LOW); + break; + } + + #if ENABLED(PELTIER_BED) + /** + * Peltier bang-bang maintains max bed power but changes + * current direction to switch between heating/cooling. + */ + if (temp_bed.target && temp_bed.is_above_target(BED_HYSTERESIS)) { // Fast Cooling + temp_bed.soft_pwm_amount = MAX_BED_POWER; + temp_bed.peltier_dir_heating = false; + } + else if (temp_bed.is_below_target(BED_HYSTERESIS)) { // Heating + temp_bed.soft_pwm_amount = MAX_BED_POWER; + temp_bed.peltier_dir_heating = true; + } + else + temp_bed.soft_pwm_amount = 0; // Off (ambient cooling) + + #else // !PELTIER_BED + + #if ENABLED(BED_LIMIT_SWITCHING) + if (temp_bed.is_above_target(BED_HYSTERESIS)) // Cooling (implicit off) + temp_bed.soft_pwm_amount = 0; + else if (temp_bed.is_below_target(BED_HYSTERESIS)) // Heating + temp_bed.soft_pwm_amount = MAX_BED_POWER >> 1; + #else // Not bed limit switching + temp_bed.soft_pwm_amount = temp_bed.is_below_target() ? MAX_BED_POWER >> 1 : 0; + #endif + + #endif // !PELTIER_BED + + #endif // !PIDTEMPBED + } while (false); } @@ -2271,7 +2317,7 @@ void Temperature::task() { #if HAS_USER_THERMISTORS - user_thermistor_t Temperature::user_thermistor[USER_THERMISTORS]; // Initialized by settings.load() + user_thermistor_t Temperature::user_thermistor[USER_THERMISTORS]; // Initialized by settings.load void Temperature::reset_user_thermistors() { user_thermistor_t default_user_thermistor[USER_THERMISTORS] = { @@ -2924,6 +2970,10 @@ void Temperature::init() { #endif #if HAS_HEATED_BED + #if ENABLED(PELTIER_BED) + SET_OUTPUT(PELTIER_DIR_PIN); + OUT_WRITE(PELTIER_DIR_PIN, !PELTIER_DIR_HEAT_STATE); + #endif #ifdef BOARD_OPENDRAIN_MOSFETS OUT_WRITE_OD(HEATER_BED_PIN, ENABLED(HEATER_BED_INVERTING)); #else @@ -3298,6 +3348,7 @@ void Temperature::init() { } // fall through case TRRunaway: + TERN_(SOVOL_SV06_RTS, rts.gotoPageBeep(ID_KillRunaway_L, ID_KillRunaway_D)); TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0)); TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(heater_id)); _TEMP_ERROR(heater_id, FPSTR(str_t_thermal_runaway), MSG_ERR_THERMAL_RUNAWAY, current); @@ -3415,13 +3466,14 @@ void Temperature::disable_all_heaters() { #endif // SINGLENOZZLE_STANDBY_TEMP || SINGLENOZZLE_STANDBY_FAN #if HAS_MAX_TC - typedef TERN(HAS_MAX31855, uint32_t, uint16_t) max_tc_temp_t; #ifndef THERMOCOUPLE_MAX_ERRORS #define THERMOCOUPLE_MAX_ERRORS 15 #endif +#endif +#if TEMP_SENSOR_IS_MAX_TC(0) || TEMP_SENSOR_IS_MAX_TC(1) || TEMP_SENSOR_IS_MAX_TC(2) /** * @brief Read MAX Thermocouple temperature. * @@ -3678,7 +3730,7 @@ void Temperature::disable_all_heaters() { #endif // Set thermocouple above max temperature (TMAX) - max_tc_temp = TEMP_SENSOR_BED_MAX_TC_TMAX << (BED_MAX_TC_DISCARD_BITS + 1); + max_tc_temp = max_tc_temp_t(TEMP_SENSOR_BED_MAX_TC_TMAX) << (BED_MAX_TC_DISCARD_BITS + 1); } } else { @@ -3904,6 +3956,9 @@ void Temperature::isr() { #if HAS_HEATED_BED _PWM_MOD(BED, soft_pwm_bed, temp_bed); + #if ENABLED(PELTIER_BED) + WRITE_PELTIER_DIR(temp_bed.peltier_dir_heating); + #endif #endif #if HAS_HEATED_CHAMBER @@ -4370,15 +4425,15 @@ void Temperature::isr() { #if HAS_TEMP_SENSOR /** * Print a single heater state in the form: - * Bed: " B:nnn.nn /nnn.nn" - * Chamber: " C:nnn.nn /nnn.nn" - * Probe: " P:nnn.nn" - * Cooler: " L:nnn.nn /nnn.nn" - * Board: " M:nnn.nn" - * SoC: " S:nnn.nn" - * Redundant: " R:nnn.nn /nnn.nn" - * Extruder: " T0:nnn.nn /nnn.nn" - * With ADC: " T0:nnn.nn /nnn.nn (nnn.nn)" + * Extruder: " T0:nnn.nn /nnn.nn" + * Bed: " B:nnn.nn /nnn.nn" + * Chamber: " C:nnn.nn /nnn.nn" + * Cooler: " L:nnn.nn /nnn.nn" + * Probe: " P:nnn.nn" + * Board: " M:nnn.nn" + * SoC: " S:nnn.nn" + * Redundant: " R:nnn.nn /nnn.nn" + * With ADC: " T0:nnn.nn /nnn.nn (nnn.nn)" */ static void print_heater_state(const heater_id_t e, const_celsius_float_t c, const_celsius_float_t t OPTARG(SHOW_TEMP_ADC_VALUES, const float r) @@ -4396,12 +4451,12 @@ void Temperature::isr() { #if HAS_TEMP_CHAMBER case H_CHAMBER: k = 'C'; break; #endif - #if HAS_TEMP_PROBE - case H_PROBE: k = 'P'; show_t = false; break; - #endif #if HAS_TEMP_COOLER case H_COOLER: k = 'L'; break; #endif + #if HAS_TEMP_PROBE + case H_PROBE: k = 'P'; show_t = false; break; + #endif #if HAS_TEMP_BOARD case H_BOARD: k = 'M'; show_t = false; break; #endif @@ -4428,6 +4483,17 @@ void Temperature::isr() { delay(2); } + /** + * Print all heater states followed by power data on a single line. + * See print_heater_state for heater output strings. + * Power output strings are in the format: + * Extruder: " @:nnn" + * Bed: " B@:nnn" + * Peltier: " P@:H/C" + * Chamber: " C@:nnn" + * Cooler: " L@:nnn" + * Hotends: " @0:nnn @1:nnn ..." + */ void Temperature::print_heater_states(const int8_t target_extruder OPTARG(HAS_TEMP_REDUNDANT, const bool include_r/*=false*/) ) { @@ -4459,15 +4525,10 @@ void Temperature::isr() { HOTEND_LOOP() print_heater_state((heater_id_t)e, degHotend(e), degTargetHotend(e) OPTARG(SHOW_TEMP_ADC_VALUES, rawHotendTemp(e))); #endif SString<100> s(F(" @:"), getHeaterPower((heater_id_t)target_extruder)); - #if HAS_HEATED_BED - s.append(" B@:", getHeaterPower(H_BED)); - #endif - #if HAS_HEATED_CHAMBER - s.append(" C@:", getHeaterPower(H_CHAMBER)); - #endif - #if HAS_COOLER - s.append(" C@:", getHeaterPower(H_COOLER)); - #endif + TERN_(HAS_HEATED_BED, s.append(F(" B@:"), getHeaterPower(H_BED))); + TERN_(PELTIER_BED, s.append(F(" P@:"), temp_bed.peltier_dir_heating ? 'H' : 'C')); + TERN_(HAS_HEATED_CHAMBER, s.append(F(" C@:"), getHeaterPower(H_CHAMBER))); + TERN_(HAS_COOLER, s.append(F(" L@:"), getHeaterPower(H_COOLER))); #if HAS_MULTI_HOTEND HOTEND_LOOP() s.append(F(" @"), e, ':', getHeaterPower((heater_id_t)e)); #endif @@ -4624,6 +4685,10 @@ void Temperature::isr() { hmiFlag.heat_flag = 0; duration_t elapsed = print_job_timer.duration(); // Print timer dwin_heat_time = elapsed.value; + #elif ENABLED(SOVOL_SV06_RTS) + update_time_value = RTS_UPDATE_VALUE; + if (IS_SD_PRINTING()) rts.refreshTime(); + rts.start_print_flag = false; #else ui.reset_status(); #endif diff --git a/firmware/Marlin/src/module/temperature.h b/firmware/Marlin/src/module/temperature.h index bb38922..ffc86eb 100644 --- a/firmware/Marlin/src/module/temperature.h +++ b/firmware/Marlin/src/module/temperature.h @@ -437,12 +437,15 @@ typedef struct HeaterInfo : public TempInfo { uint8_t soft_pwm_amount; bool is_below_target(const celsius_t offs=0) const { return (target - celsius > offs); } // celsius < target - offs bool is_above_target(const celsius_t offs=0) const { return (celsius - target > offs); } // celsius > target + offs + #if ENABLED(PELTIER_BED) + bool peltier_dir_heating; // = false + #endif } heater_info_t; // A heater with PID stabilization template struct PIDHeaterInfo : public HeaterInfo { - T pid; // Initialized by settings.load() + T pid; // Initialized by settings.load }; #if ENABLED(MPCTEMP) @@ -1027,14 +1030,14 @@ class Temperature { #endif #endif - static bool still_heating(const uint8_t e) { - return degTargetHotend(e) > TEMP_HYSTERESIS && ABS(wholeDegHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS; - } - static bool degHotendNear(const uint8_t e, const celsius_t temp) { return ABS(wholeDegHotend(e) - temp) < (TEMP_HYSTERESIS); } + static bool still_heating(const uint8_t e) { + return degTargetHotend(e) > TEMP_HYSTERESIS && !degHotendNear(e, degTargetHotend(e)); + } + // Start watching a Hotend to make sure it's really heating up static void start_watching_hotend(const uint8_t E_NAME) { UNUSED(HOTEND_INDEX); diff --git a/firmware/Marlin/src/module/tool_change.cpp b/firmware/Marlin/src/module/tool_change.cpp index 80ebe71..12aca3f 100644 --- a/firmware/Marlin/src/module/tool_change.cpp +++ b/firmware/Marlin/src/module/tool_change.cpp @@ -37,7 +37,7 @@ //#define DEBUG_TOOLCHANGE_FILAMENT_SWAP #if HAS_MULTI_EXTRUDER - toolchange_settings_t toolchange_settings; // Initialized by settings.load() + toolchange_settings_t toolchange_settings; // Initialized by settings.load #endif #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE) @@ -77,7 +77,7 @@ #endif #if HAS_PRUSA_MMU3 - #include "../feature/mmu3/mmu2.h" + #include "../feature/mmu3/mmu3.h" #elif HAS_PRUSA_MMU2 #include "../feature/mmu/mmu2.h" #elif HAS_PRUSA_MMU1 @@ -1225,8 +1225,6 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { } #endif - TERN_(SWITCHING_NOZZLE_TWO_SERVOS, raise_nozzle(old_tool)); - REMEMBER(fr, feedrate_mm_s, XY_PROBE_FEEDRATE_MM_S); #if HAS_SOFTWARE_ENDSTOPS @@ -1290,20 +1288,23 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { magnetic_switching_toolhead_tool_change(new_tool, no_move); #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) // Magnetic Switching ToolChanger em_switching_toolhead_tool_change(new_tool, no_move); - #elif ENABLED(SWITCHING_NOZZLE) && !SWITCHING_NOZZLE_TWO_SERVOS // Switching Nozzle (single servo) + #elif ENABLED(SWITCHING_NOZZLE) // Switching Nozzle // Raise by a configured distance to avoid workpiece, except with // SWITCHING_NOZZLE_TWO_SERVOS, as both nozzles will lift instead. + TERN_(SWITCHING_NOZZLE_TWO_SERVOS, raise_nozzle(old_tool)); if (!no_move) { const float newz = current_position.z + _MAX(-diff.z, 0.0); - // Check if Z has space to compensate at least z_offset, and if not, just abort now const float maxz = _MIN(TERN(HAS_SOFTWARE_ENDSTOPS, soft_endstop.max.z, Z_MAX_POS), Z_MAX_POS); if (newz > maxz) return; - current_position.z = _MIN(newz + toolchange_settings.z_raise, maxz); fast_line_to_current(Z_AXIS); } - move_nozzle_servo(new_tool); + #if SWITCHING_NOZZLE_TWO_SERVOS // Switching Nozzle with two servos + lower_nozzle(new_tool); + #else + move_nozzle_servo(new_tool); + #endif #elif ANY(MECHANICAL_SWITCHING_EXTRUDER, MECHANICAL_SWITCHING_NOZZLE) if (!no_move) { current_position.z = _MIN(current_position.z + toolchange_settings.z_raise, _MIN(TERN(HAS_SOFTWARE_ENDSTOPS, soft_endstop.max.z, Z_MAX_POS), Z_MAX_POS)); @@ -1372,7 +1373,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { #if ENABLED(TOOLCHANGE_PARK) if (toolchange_settings.enable_park) do_blocking_move_to_xy_z(destination, destination.z, MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE)); #else - do_blocking_move_to_xy(destination, planner.settings.max_feedrate_mm_s[X_AXIS]); + do_blocking_move_to_xy(destination, planner.settings.max_feedrate_mm_s[X_AXIS]* 0.5f); // If using MECHANICAL_SWITCHING extruder/nozzle, set HOTEND_OFFSET in Z axis after running EVENT_GCODE_TOOLCHANGE below. #if NONE(MECHANICAL_SWITCHING_EXTRUDER, MECHANICAL_SWITCHING_NOZZLE) @@ -1405,7 +1406,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { #endif TERN_(DUAL_X_CARRIAGE, idex_set_parked(false)); - } + } // should_move #if HAS_SWITCHING_NOZZLE // Move back down. (Including when the new tool is higher.) @@ -1413,8 +1414,6 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { do_blocking_move_to_z(destination.z, planner.settings.max_feedrate_mm_s[Z_AXIS]); #endif - TERN_(SWITCHING_NOZZLE_TWO_SERVOS, lower_nozzle(new_tool)); - } // (new_tool != old_tool) planner.synchronize(); @@ -1510,7 +1509,8 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { if (TERN1(DUAL_X_CARRIAGE, dual_x_carriage_mode == DXC_AUTO_PARK_MODE)) gcode.process_subcommands_now(F(EVENT_GCODE_AFTER_TOOLCHANGE)); #endif - } + + } // !no_move SERIAL_ECHOLNPGM(STR_ACTIVE_EXTRUDER, active_extruder); diff --git a/firmware/Marlin/src/pins/esp32/pins_FYSETC_E4.h b/firmware/Marlin/src/pins/esp32/pins_FYSETC_E4.h index 4bcffb5..d2a516d 100644 --- a/firmware/Marlin/src/pins/esp32/pins_FYSETC_E4.h +++ b/firmware/Marlin/src/pins/esp32/pins_FYSETC_E4.h @@ -40,18 +40,15 @@ #if HAS_TMC_UART // - // TMC2209 stepper drivers - // - - // - // Hardware serial 1 + // TMC2208/TMC2209 stepper drivers // #define X_HARDWARE_SERIAL Serial1 #define Y_HARDWARE_SERIAL Serial1 #define Z_HARDWARE_SERIAL Serial1 #define E0_HARDWARE_SERIAL Serial1 - - #define TMC_BAUD_RATE 115200 + #ifndef TMC_BAUD_RATE + #define TMC_BAUD_RATE 115200 + #endif #endif /** diff --git a/firmware/Marlin/src/pins/esp32/pins_GODI_CONTROLLER_V1_0.h b/firmware/Marlin/src/pins/esp32/pins_GODI_CONTROLLER_V1_0.h index 6f80469..3099b49 100644 --- a/firmware/Marlin/src/pins/esp32/pins_GODI_CONTROLLER_V1_0.h +++ b/firmware/Marlin/src/pins/esp32/pins_GODI_CONTROLLER_V1_0.h @@ -96,7 +96,7 @@ #if HAS_TMC_UART // - // TMC2209 stepper drivers + // TMC2208/TMC2209 stepper drivers // // diff --git a/firmware/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h b/firmware/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h index 282ac52..4c043fd 100644 --- a/firmware/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h +++ b/firmware/Marlin/src/pins/esp32/pins_MKS_TINYBEE.h @@ -43,7 +43,7 @@ // // Servos // -#define SERVO0_PIN 2 // 3D TOUCH +#define SERVO0_PIN 2 // 3D TOUCH, Pin is level-shifted to 5V, and cannot be used as an INPUT pin! // // Limit Switches @@ -121,14 +121,17 @@ #define ADC_REFERENCE_VOLTAGE 2.565 // 2.5V reference VDDA /** - * ------ ------ - * (BEEPER) 149 | 1 2 | 13 (BTN_ENC) (SPI MISO) 19 | 1 2 | 18 (SPI SCK) - * (LCD_EN) 21 | 3 4 | 4 (LCD_RS) (BTN_EN1) 14 | 3 4 | 5 (SPI CS) - * (LCD_D4) 0 | 5 6 16 (LCD_D5) (BTN_EN2) 12 | 5 6 23 (SPI MOSI) - * (LCD_D6) 15 | 7 8 | 17 (LCD_D7) (SPI_DET) 34 | 7 8 | RESET - * GND | 9 10 | 5V GND | 9 10 | 3.3V - * ------ ------ - * EXP1 EXP2 + * ------ ------ + * (BEEPER) 149 | 1 2 | 13 (BTN_ENC) (SPI MISO) 19 | 1 2 | 18 (SPI SCK) + * (LCD_EN) 21* | 3 4 | 4* (LCD_RS) (BTN_EN1) 14 | 3 4 | 5 (SPI CS) + * (LCD_D4) 0* | 5 6 16* (LCD_D5) (BTN_EN2) 12 | 5 6 23 (SPI MOSI) + * (LCD_D6) 15* | 7 8 | 17* (LCD_D7) (SPI_DET) 34 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | 3.3V + * ------ ------ + * EXP1 EXP2 + * + * * = Note: Pin is level-shifted to 5V. Cannot be used as an INPUT pin! + * Displays like a CR10_STOCKDISPLAY that require inputs on EXP1 cannot be plugged straight into this board. */ #define EXP1_01_PIN 149 diff --git a/firmware/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h b/firmware/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h index 2f6dd12..f8a279c 100644 --- a/firmware/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h +++ b/firmware/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h @@ -51,16 +51,9 @@ */ #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 // Default TMC slave addresses #ifndef X_SLAVE_ADDRESS diff --git a/firmware/Marlin/src/pins/hc32f4/pins_CREALITY_ENDER2P_V24S4.h b/firmware/Marlin/src/pins/hc32f4/pins_CREALITY_ENDER2P_V24S4.h index 1d142d8..2dde4bc 100644 --- a/firmware/Marlin/src/pins/hc32f4/pins_CREALITY_ENDER2P_V24S4.h +++ b/firmware/Marlin/src/pins/hc32f4/pins_CREALITY_ENDER2P_V24S4.h @@ -75,7 +75,7 @@ // Servos // #ifndef SERVO0_PIN - #define SERVO0_PIN PB0 // BLTouch OUT * + #define SERVO0_PIN PB1 #endif // @@ -83,17 +83,17 @@ // #define X_STOP_PIN PA5 #define Y_STOP_PIN PA6 -#define Z_STOP_PIN PB0 // BLTOUCH * +#define Z_STOP_PIN PB0 #ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN PB1 // BLTouch IN * + #define Z_MIN_PROBE_PIN PB2 #endif // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN PC15 // "Pulled-high" * + #define FIL_RUNOUT_PIN PA4 // "Pulled-high" * #endif // diff --git a/firmware/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/firmware/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index 210df06..45b08b0 100644 --- a/firmware/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/firmware/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -44,39 +44,69 @@ // Limit Switches // #ifdef X_STALL_SENSITIVITY - #define X_STOP_PIN X_DIAG_PIN + #ifndef X_STOP_PIN + #define X_STOP_PIN X_DIAG_PIN + #endif #if X_HOME_TO_MIN - #define X_MAX_PIN P1_28 // X+ + #ifndef X_MAX_PIN + #define X_MAX_PIN P1_28 // X+ + #endif #else - #define X_MIN_PIN P1_28 // X+ + #ifndef X_MIN_PIN + #define X_MIN_PIN P1_28 // X+ + #endif #endif #else - #define X_MIN_PIN P1_29 // X- - #define X_MAX_PIN P1_28 // X+ + #ifndef X_MIN_PIN + #define X_MIN_PIN P1_29 // X- + #endif + #ifndef X_MAX_PIN + #define X_MAX_PIN P1_28 // X+ + #endif #endif #ifdef Y_STALL_SENSITIVITY - #define Y_STOP_PIN Y_DIAG_PIN + #ifndef Y_STOP_PIN + #define Y_STOP_PIN Y_DIAG_PIN + #endif #if Y_HOME_TO_MIN - #define Y_MAX_PIN P1_26 // Y+ + #ifndef Y_MAX_PIN + #define Y_MAX_PIN P1_26 // Y+ + #endif #else - #define Y_MIN_PIN P1_26 // Y+ + #ifndef Y_MIN_PIN + #define Y_MIN_PIN P1_26 // Y+ + #endif #endif #else - #define Y_MIN_PIN P1_27 // Y- - #define Y_MAX_PIN P1_26 // Y+ + #ifndef Y_MIN_PIN + #define Y_MIN_PIN P1_27 // Y- + #endif + #ifndef Y_MAX_PIN + #define Y_MAX_PIN P1_26 // Y+ + #endif #endif #ifdef Z_STALL_SENSITIVITY - #define Z_STOP_PIN Z_DIAG_PIN + #ifndef Z_STOP_PIN + #define Z_STOP_PIN Z_DIAG_PIN + #endif #if Z_HOME_TO_MIN - #define Z_MAX_PIN P1_24 // Z+ + #ifndef Z_MAX_PIN + #define Z_MAX_PIN P1_24 // Z+ + #endif #else - #define Z_MIN_PIN P1_24 // Z+ + #ifndef Z_MIN_PIN + #define Z_MIN_PIN P1_24 // Z+ + #endif #endif #else - #define Z_MIN_PIN P1_25 // Z- - #define Z_MAX_PIN P1_24 // Z+ + #ifndef Z_MIN_PIN + #define Z_MIN_PIN P1_25 // Z- + #endif + #ifndef Z_MAX_PIN + #define Z_MAX_PIN P1_24 // Z+ + #endif #endif #define ONBOARD_ENDSTOPPULLUPS // Board has built-in pullups diff --git a/firmware/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/firmware/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 6345001..2de1e45 100644 --- a/firmware/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/firmware/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -234,19 +234,10 @@ //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN P1_10 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN P1_09 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN P1_08 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN P1_04 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN P1_01 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/firmware/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index e6a2abc..f38cab6 100644 --- a/firmware/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/firmware/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -173,7 +173,6 @@ #define E2_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E2_SERIAL_TX_PIN EXP1_06_PIN - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #endif #endif @@ -186,7 +185,6 @@ #define E3_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E3_SERIAL_TX_PIN EXP1_04_PIN - #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN #endif #else #define E3_ENABLE_PIN EXP2_07_PIN @@ -201,7 +199,6 @@ #define E4_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_02_PIN - #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #endif #else #define E4_ENABLE_PIN EXP2_07_PIN diff --git a/firmware/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/firmware/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index f785d3b..4cb8a01 100644 --- a/firmware/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/firmware/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -87,22 +87,11 @@ // #if HAS_TMC_UART #define X_SERIAL_TX_PIN P1_00 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN P1_09 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN P1_16 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN P0_04 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN P2_02 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN P2_06 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/firmware/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index dbacb0f..6bfc4c3 100644 --- a/firmware/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/firmware/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -294,7 +294,7 @@ #endif // HAS_WIRED_LCD /** - * Example for trinamic drivers using the J8 connector on MKs Sbase. + * Example for Trinamic drivers using the J8 connector on MKS Sbase. * 2130s need 1 pin for each driver. 2208/2209s need 2 pins for serial control. * This board does not have enough pins to use hardware serial. */ diff --git a/firmware/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/firmware/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index 6ee1f11..9ca1fb9 100644 --- a/firmware/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/firmware/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -124,30 +124,18 @@ #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN P0_01 #endif - #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN P0_00 #endif - #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN P2_13 #endif - #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN P2_08 #endif - #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #endif // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/firmware/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index 074ee06..4156fd5 100644 --- a/firmware/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/firmware/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -144,19 +144,10 @@ */ #define X_SERIAL_TX_PIN P1_01 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN P1_10 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN P1_17 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN P0_05 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN P0_22 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/lpc1769/pins_FLY_CDY.h b/firmware/Marlin/src/pins/lpc1769/pins_FLY_CDY.h index 9b22214..5a6fd05 100644 --- a/firmware/Marlin/src/pins/lpc1769/pins_FLY_CDY.h +++ b/firmware/Marlin/src/pins/lpc1769/pins_FLY_CDY.h @@ -107,22 +107,11 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN P1_04 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN P1_10 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN P1_16 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN P4_28 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN P2_12 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN P0_10 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h b/firmware/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h index 64abf52..ecddbd2 100644 --- a/firmware/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h +++ b/firmware/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h @@ -36,23 +36,14 @@ #include "../lpc1768/pins_MKS_SBASE.h" #if HAS_TMC_UART - /** - * TMC2208/TMC2209 stepper drivers - */ + // + // TMC2208/TMC2209 stepper drivers + // #define X_SERIAL_TX_PIN P1_22 // J8-2 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN P1_23 // J8-3 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN P2_12 // J8-4 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN P2_11 // J8-5 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN P4_28 // J8-6 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/firmware/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index aec4240..5d7a703 100644 --- a/firmware/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/firmware/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -186,19 +186,10 @@ //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN P1_01 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN P1_08 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN P1_10 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN P1_15 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN P1_17 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/lpc1769/pins_XTLW_CLIMBER_8TH_LPC.h b/firmware/Marlin/src/pins/lpc1769/pins_XTLW_CLIMBER_8TH_LPC.h index 17089b8..f5a23ec 100644 --- a/firmware/Marlin/src/pins/lpc1769/pins_XTLW_CLIMBER_8TH_LPC.h +++ b/firmware/Marlin/src/pins/lpc1769/pins_XTLW_CLIMBER_8TH_LPC.h @@ -99,25 +99,12 @@ #endif #if HAS_TMC_UART - #define X_SERIAL_TX_PIN P1_04 - #define X_SERIAL_RX_PIN P1_04 - #define X2_SERIAL_TX_PIN P0_10 - #define X2_SERIAL_RX_PIN P0_10 - #define Y_SERIAL_TX_PIN P1_10 - #define Y_SERIAL_RX_PIN P1_10 - #define Z_SERIAL_TX_PIN P1_16 - #define Z_SERIAL_RX_PIN P1_16 - #define E0_SERIAL_TX_PIN P4_28 - #define E0_SERIAL_RX_PIN P4_28 - #define E1_SERIAL_TX_PIN P2_12 - #define E1_SERIAL_RX_PIN P2_12 - #endif // diff --git a/firmware/Marlin/src/pins/mega/pins_MINITRONICS.h b/firmware/Marlin/src/pins/mega/pins_MINITRONICS.h index c547c9f..d3a012d 100644 --- a/firmware/Marlin/src/pins/mega/pins_MINITRONICS.h +++ b/firmware/Marlin/src/pins/mega/pins_MINITRONICS.h @@ -44,9 +44,9 @@ // // Limit Switches // -#define X_MIN_PIN 5 -#define Y_MIN_PIN 2 -#define Z_MIN_PIN 6 +#define X_STOP_PIN 5 +#define Y_STOP_PIN 2 +#define Z_STOP_PIN 6 // // Steppers diff --git a/firmware/Marlin/src/pins/pins.h b/firmware/Marlin/src/pins/pins.h index 3f6b26e..eb26103 100644 --- a/firmware/Marlin/src/pins/pins.h +++ b/firmware/Marlin/src/pins/pins.h @@ -202,20 +202,20 @@ #include "ramps/pins_AZTEEG_X3_PRO.h" // ATmega2560 env:mega2560 #elif MB(ULTIMAIN_2) #include "ramps/pins_ULTIMAIN_2.h" // ATmega2560 env:mega2560ext -#elif MB(FORMBOT_RAPTOR) - #include "ramps/pins_FORMBOT_RAPTOR.h" // ATmega2560 env:mega2560 -#elif MB(FORMBOT_RAPTOR2) - #include "ramps/pins_FORMBOT_RAPTOR2.h" // ATmega2560 env:mega2560 -#elif MB(FORMBOT_TREX2PLUS) - #include "ramps/pins_FORMBOT_TREX2PLUS.h" // ATmega2560 env:mega2560 -#elif MB(FORMBOT_TREX3) - #include "ramps/pins_FORMBOT_TREX3.h" // ATmega2560 env:mega2560 #elif MB(RUMBA) #include "ramps/pins_RUMBA.h" // ATmega2560 env:mega2560 #elif MB(RUMBA_RAISE3D) #include "ramps/pins_RUMBA_RAISE3D.h" // ATmega2560 env:mega2560 #elif MB(RL200) #include "ramps/pins_RL200.h" // ATmega2560 env:mega2560 +#elif MB(FORMBOT_TREX2PLUS) + #include "ramps/pins_FORMBOT_TREX2PLUS.h" // ATmega2560 env:mega2560 +#elif MB(FORMBOT_TREX3) + #include "ramps/pins_FORMBOT_TREX3.h" // ATmega2560 env:mega2560 +#elif MB(FORMBOT_RAPTOR) + #include "ramps/pins_FORMBOT_RAPTOR.h" // ATmega2560 env:mega2560 +#elif MB(FORMBOT_RAPTOR2) + #include "ramps/pins_FORMBOT_RAPTOR2.h" // ATmega2560 env:mega2560 #elif MB(BQ_ZUM_MEGA_3D) #include "ramps/pins_BQ_ZUM_MEGA_3D.h" // ATmega2560 env:mega2560ext #elif MB(MAKEBOARD_MINI) @@ -250,6 +250,8 @@ #include "ramps/pins_TANGO.h" // ATmega2560 env:mega2560 #elif MB(MKS_GEN_L_V2) #include "ramps/pins_MKS_GEN_L_V2.h" // ATmega2560 env:mega2560 +#elif MB(MKS_GEN_L_V21) + #include "ramps/pins_MKS_GEN_L_V21.h" // ATmega2560 env:mega2560 #elif MB(COPYMASTER_3D) #include "ramps/pins_COPYMASTER_3D.h" // ATmega2560 env:mega2560 #elif MB(ORTUR_4) @@ -258,8 +260,6 @@ #include "ramps/pins_TENLOG_D3_HERO.h" // ATmega2560 env:mega2560 #elif MB(TENLOG_MB1_V23) #include "ramps/pins_TENLOG_MB1_V23.h" // ATmega2560 env:mega2560 -#elif MB(MKS_GEN_L_V21) - #include "ramps/pins_MKS_GEN_L_V21.h" // ATmega2560 env:mega2560 #elif MB(RAMPS_S_12_EEFB, RAMPS_S_12_EEEB, RAMPS_S_12_EFFB) #include "ramps/pins_RAMPS_S_12.h" // ATmega2560 env:mega2560 #elif MB(LONGER3D_LK1_PRO, LONGER3D_LKx_PRO) @@ -302,12 +302,12 @@ #include "mega/pins_CNCONTROLS_12.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(CNCONTROLS_15) #include "mega/pins_CNCONTROLS_15.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 -#elif MB(MIGHTYBOARD_REVE) - #include "mega/pins_MIGHTYBOARD_REVE.h" // ATmega2560, ATmega1280 env:mega2560ext env:MightyBoard1280 env:MightyBoard2560 #elif MB(CHEAPTRONIC) #include "mega/pins_CHEAPTRONIC.h" // ATmega2560 env:mega2560 #elif MB(CHEAPTRONIC_V2) #include "mega/pins_CHEAPTRONICv2.h" // ATmega2560 env:mega2560 +#elif MB(MIGHTYBOARD_REVE) + #include "mega/pins_MIGHTYBOARD_REVE.h" // ATmega2560, ATmega1280 env:mega2560ext env:MightyBoard1280 env:MightyBoard2560 #elif MB(MEGATRONICS) #include "mega/pins_MEGATRONICS.h" // ATmega2560 env:mega2560 #elif MB(MEGATRONICS_2) @@ -324,18 +324,20 @@ #include "mega/pins_GT2560_REV_A.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(GT2560_REV_A_PLUS) #include "mega/pins_GT2560_REV_A_PLUS.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 -#elif MB(GT2560_V3) - #include "mega/pins_GT2560_V3.h" // ATmega2560 env:mega2560 #elif MB(GT2560_REV_B) #include "mega/pins_GT2560_REV_B.h" // ATmega2560 env:mega2560 -#elif MB(GT2560_V4) - #include "mega/pins_GT2560_V4.h" // ATmega2560 env:mega2560 -#elif MB(GT2560_V4_A20) - #include "mega/pins_GT2560_V4_A20.h" // ATmega2560 env:mega2560 +#elif MB(GT2560_V3) + #include "mega/pins_GT2560_V3.h" // ATmega2560 env:mega2560 #elif MB(GT2560_V3_MC2) #include "mega/pins_GT2560_V3_MC2.h" // ATmega2560 env:mega2560 #elif MB(GT2560_V3_A20) #include "mega/pins_GT2560_V3_A20.h" // ATmega2560 env:mega2560 +#elif MB(GT2560_V4) + #include "mega/pins_GT2560_V4.h" // ATmega2560 env:mega2560 +#elif MB(GT2560_V4_A20) + #include "mega/pins_GT2560_V4_A20.h" // ATmega2560 env:mega2560 +#elif MB(GT2560_V41B) + #include "mega/pins_GT2560_V41b.h" // ATmega2560 env:mega2560ext #elif MB(EINSTART_S) #include "mega/pins_EINSTART-S.h" // ATmega2560, ATmega1280 env:mega2560ext env:mega1280 #elif MB(WANHAO_ONEPLUS) @@ -348,10 +350,10 @@ #include "mega/pins_HJC2560C_REV2.h" // ATmega2560 env:mega2560 #elif MB(LEAPFROG_XEED2015) #include "mega/pins_LEAPFROG_XEED2015.h" // ATmega2560 env:mega2560 -#elif MB(PICA) - #include "mega/pins_PICA.h" // ATmega2560 env:mega2560 #elif MB(PICA_REVB) #include "mega/pins_PICAOLD.h" // ATmega2560 env:mega2560 +#elif MB(PICA) + #include "mega/pins_PICA.h" // ATmega2560 env:mega2560 #elif MB(INTAMSYS40) #include "mega/pins_INTAMSYS40.h" // ATmega2560 env:mega2560 #elif MB(MALYAN_M180) @@ -360,8 +362,6 @@ #include "mega/pins_PROTONEER_CNC_SHIELD_V3.h" // ATmega2560 env:mega2560 #elif MB(WEEDO_62A) #include "mega/pins_WEEDO_62A.h" // ATmega2560 env:mega2560 -#elif MB(GT2560_V41B) - #include "mega/pins_GT2560_V41b.h" // ATmega2560 env:mega2560ext // // ATmega1281, ATmega2561 @@ -398,6 +398,8 @@ #include "sanguino/pins_STB_11.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(AZTEEG_X1) #include "sanguino/pins_AZTEEG_X1.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p +#elif MB(ANET_10) + #include "sanguino/pins_ANET_10.h" // ATmega1284P env:sanguino1284p env:sanguino1284p_optimized env:melzi_optiboot #elif MB(ZMIB_V2) #include "sanguino/pins_ZMIB_V2.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p @@ -425,8 +427,6 @@ #include "sanguino/pins_OMCA_A.h" // ATmega644 env:sanguino644p #elif MB(OMCA) #include "sanguino/pins_OMCA.h" // ATmega644P, ATmega644 env:sanguino644p -#elif MB(ANET_10) - #include "sanguino/pins_ANET_10.h" // ATmega1284P env:sanguino1284p env:sanguino1284p_optimized env:melzi_optiboot #elif MB(SETHI) #include "sanguino/pins_SETHI.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p @@ -459,8 +459,6 @@ #include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768 #elif MB(MKS_SBASE) #include "lpc1768/pins_MKS_SBASE.h" // LPC1768 env:LPC1768 -#elif MB(MKS_SGEN_L) - #include "lpc1768/pins_MKS_SGEN_L.h" // LPC1768 env:LPC1768 #elif MB(AZSMZ_MINI) #include "lpc1768/pins_AZSMZ_MINI.h" // LPC1768 env:LPC1768 #elif MB(BIQU_BQ111_A4) @@ -469,6 +467,8 @@ #include "lpc1768/pins_SELENA_COMPACT.h" // LPC1768 env:LPC1768 #elif MB(BIQU_B300_V1_0) #include "lpc1768/pins_BIQU_B300_V1.0.h" // LPC1768 env:LPC1768 +#elif MB(MKS_SGEN_L) + #include "lpc1768/pins_MKS_SGEN_L.h" // LPC1768 env:LPC1768 #elif MB(GMARSH_X6_REV1) #include "lpc1768/pins_GMARSH_X6_REV1.h" // LPC1768 env:LPC1768 #elif MB(BTT_SKR_V1_1) @@ -512,7 +512,7 @@ #include "lpc1769/pins_XTLW_CLIMBER_8TH_LPC.h" // LPC1769 env:LPC1769 // -// Due (ATSAM) boards +// SAM3X8E ARM Cortex-M3 // #elif MB(DUE3DOM) @@ -521,10 +521,6 @@ #include "sam/pins_DUE3DOM_MINI.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug #elif MB(RADDS) #include "sam/pins_RADDS.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug -#elif MB(RURAMPS4D_11) - #include "sam/pins_RURAMPS4D_11.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug -#elif MB(RURAMPS4D_13) - #include "sam/pins_RURAMPS4D_13.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug #elif MB(RAMPS_FD_V1) #include "sam/pins_RAMPS_FD_V1.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug #elif MB(RAMPS_FD_V2) @@ -535,6 +531,10 @@ #include "sam/pins_RAMPS_DUO.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug #elif MB(RAMPS4DUE_EFB, RAMPS4DUE_EEB, RAMPS4DUE_EFF, RAMPS4DUE_EEF, RAMPS4DUE_SF) #include "sam/pins_RAMPS4DUE.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug +#elif MB(RURAMPS4D_11) + #include "sam/pins_RURAMPS4D_11.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug +#elif MB(RURAMPS4D_13) + #include "sam/pins_RURAMPS4D_13.h" // SAM3X8E env:DUE env:DUE_USB env:DUE_debug #elif MB(ULTRATRONICS_PRO) #include "sam/pins_ULTRATRONICS_PRO.h" // SAM3X8E env:DUE env:DUE_debug #elif MB(ARCHIM1) @@ -547,20 +547,16 @@ #include "sam/pins_CNCONTROLS_15D.h" // SAM3X8E env:DUE env:DUE_USB #elif MB(KRATOS32) #include "sam/pins_KRATOS32.h" // SAM3X8E env:DUE env:DUE_USB + +// +// SAM3X8C ARM Cortex-M3 +// + #elif MB(PRINTRBOARD_G2) #include "sam/pins_PRINTRBOARD_G2.h" // SAM3X8C env:DUE_USB #elif MB(ADSK) #include "sam/pins_ADSK.h" // SAM3X8C env:DUE env:DUE_debug -// -// STM32 ARM Cortex-M0 -// - -#elif MB(MALYAN_M200_V2) - #include "stm32f0/pins_MALYAN_M200_V2.h" // STM32F0 env:STM32F070RB_malyan env:STM32F070CB_malyan -#elif MB(MALYAN_M300) - #include "stm32f0/pins_MALYAN_M300.h" // STM32F0 env:malyan_M300 - // // STM32 ARM Cortex-M0+ // @@ -569,16 +565,27 @@ #include "stm32g0/pins_BTT_EBB42_V1_1.h" // STM32G0 env:BTT_EBB42_V1_1_filament_extruder #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_E3_EZ_V1_0) + #include "stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h" // STM32G0 env:STM32G0B1RE_manta_btt #elif MB(BTT_MANTA_M4P_V2_1) #include "stm32g0/pins_BTT_MANTA_M4P_V2_1.h" // STM32G0 env:STM32G0B1RE_manta_btt #elif MB(BTT_MANTA_M5P_V1_0) #include "stm32g0/pins_BTT_MANTA_M5P_V1_0.h" // STM32G0 env:STM32G0B1RE_manta_btt -#elif MB(BTT_MANTA_E3_EZ_V1_0) - #include "stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h" // STM32G0 env:STM32G0B1RE_manta_btt #elif MB(BTT_MANTA_M8P_V1_0) #include "stm32g0/pins_BTT_MANTA_M8P_V1_0.h" // STM32G0 env:STM32G0B1VE_btt #elif MB(BTT_MANTA_M8P_V1_1) #include "stm32g0/pins_BTT_MANTA_M8P_V1_1.h" // STM32G0 env:STM32G0B1VE_btt +#elif MB(BTT_SKRAT_V1_0) + #include "stm32g0/pins_BTT_SKRAT_V1_0.h" // STM32G0 env:STM32G0B1VE_btt env:STM32G0B1VE_btt_xfer + +// +// STM32 ARM Cortex-M0 +// + +#elif MB(MALYAN_M200_V2) + #include "stm32f0/pins_MALYAN_M200_V2.h" // STM32F0 env:STM32F070RB_malyan env:STM32F070CB_malyan +#elif MB(MALYAN_M300) + #include "stm32f0/pins_MALYAN_M300.h" // STM32F0 env:malyan_M300 // // STM32 ARM Cortex-M3 @@ -662,30 +669,30 @@ #include "stm32f1/pins_CHITU3D_V9.h" // STM32F1 env:chitu_f103 env:chitu_f103_maple #elif MB(CREALITY_V4) #include "stm32f1/pins_CREALITY_V4.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer env:STM32F103RE_creality_maple -#elif MB(CREALITY_V4210) - #include "stm32f1/pins_CREALITY_V4210.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer env:STM32F103RE_creality_maple -#elif MB(CREALITY_V425) - #include "stm32f1/pins_CREALITY_V425.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer env:STM32F103RE_creality_maple #elif MB(CREALITY_V422) #include "stm32f1/pins_CREALITY_V422.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer env:STM32F103RE_creality_maple #elif MB(CREALITY_V423) #include "stm32f1/pins_CREALITY_V423.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer +#elif MB(CREALITY_V425) + #include "stm32f1/pins_CREALITY_V425.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer env:STM32F103RE_creality_maple #elif MB(CREALITY_V427) #include "stm32f1/pins_CREALITY_V427.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer env:STM32F103RE_creality_maple +#elif MB(CREALITY_V4210) + #include "stm32f1/pins_CREALITY_V4210.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer env:STM32F103RE_creality_maple #elif MB(CREALITY_V431, CREALITY_V431_A, CREALITY_V431_B, CREALITY_V431_C, CREALITY_V431_D) #include "stm32f1/pins_CREALITY_V431.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer env:STM32F103RE_creality_maple #elif MB(CREALITY_V452) #include "stm32f1/pins_CREALITY_V452.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer env:STM32F103RE_creality_maple #elif MB(CREALITY_V453) #include "stm32f1/pins_CREALITY_V453.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer env:STM32F103RE_creality_maple +#elif MB(CREALITY_V521) + #include "stm32f1/pins_CREALITY_V521.h" // STM32F1 env:STM32F103VE_creality #elif MB(CREALITY_V24S1) #include "stm32f1/pins_CREALITY_V24S1.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer env:STM32F103RE_creality_maple #elif MB(CREALITY_V24S1_301) #include "stm32f1/pins_CREALITY_V24S1_301.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_xfer env:STM32F103RC_creality env:STM32F103RC_creality_xfer env:STM32F103RE_creality_maple #elif MB(CREALITY_V25S1) #include "stm32f1/pins_CREALITY_V25S1.h" // STM32F1 env:STM32F103RE_creality_smartPro env:STM32F103RE_creality_smartPro_maple -#elif MB(CREALITY_V521) - #include "stm32f1/pins_CREALITY_V521.h" // STM32F1 env:STM32F103VE_creality #elif MB(TRIGORILLA_PRO) #include "stm32f1/pins_TRIGORILLA_PRO.h" // STM32F1 env:trigorilla_pro env:trigorilla_pro_maple env:trigorilla_pro_disk #elif MB(FLY_MINI) @@ -718,8 +725,6 @@ #include "gd32f1/pins_VOXELAB_AQUILA.h" // GD32F1, N32G4, STM32F1 env:GD32F103RC_voxelab_maple env:N32G455RE_voxelab_maple env:STM32F103RE_creality_maple env:STM32F103RE_creality #elif MB(SPRINGER_CONTROLLER) #include "stm32f1/pins_ORCA_3D_SPRINGER.h" // STM32F1 env:STM32F103VC_orca3d -#elif MB(CREALITY_CR4NS) - #include "stm32f1/pins_CREALITY_CR4NS.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_maple // // ARM Cortex-M4F @@ -744,22 +749,24 @@ #include "stm32f4/pins_RUMBA32_BTT.h" // STM32F4 env:rumba32 #elif MB(BLACK_STM32F407VE) #include "stm32f4/pins_BLACK_STM32F407VE.h" // STM32F4 env:STM32F407VE_black +#elif MB(BLACK_STM32F407ZE) + #error "BLACK_STM32F407ZE is not yet supported." +#elif MB(BTT_SKR_MINI_E3_V3_0_1) + #include "stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h" // STM32F4 env:STM32F401RC_btt env:STM32F401RC_btt_xfer #elif MB(BTT_SKR_PRO_V1_1) #include "stm32f4/pins_BTT_SKR_PRO_V1_1.h" // STM32F4 env:BTT_SKR_PRO env:BTT_SKR_PRO_usb_flash_drive #elif MB(BTT_SKR_PRO_V1_2) #include "stm32f4/pins_BTT_SKR_PRO_V1_2.h" // STM32F4 env:BTT_SKR_PRO env:BTT_SKR_PRO_usb_flash_drive -#elif MB(BTT_GTR_V1_0) - #include "stm32f4/pins_BTT_GTR_V1_0.h" // STM32F4 env:BTT_GTR_V1_0 env:BTT_GTR_V1_0_usb_flash_drive #elif MB(BTT_BTT002_V1_0) #include "stm32f4/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BTT_BTT002 env:BTT_BTT002_VET6 #elif MB(BTT_E3_RRF) #include "stm32f4/pins_BTT_E3_RRF.h" // STM32F4 env:BTT_E3_RRF -#elif MB(BTT_SKR_MINI_E3_V3_0_1) - #include "stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h" // STM32F4 env:STM32F401RC_btt env:STM32F401RC_btt_xfer #elif MB(BTT_SKR_V2_0_REV_A) #include "stm32f4/pins_BTT_SKR_V2_0_REV_A.h" // STM32F4 env:STM32F407VG_btt env:STM32F407VG_btt_USB env:STM32F407VG_btt_USB_debug #elif MB(BTT_SKR_V2_0_REV_B) #include "stm32f4/pins_BTT_SKR_V2_0_REV_B.h" // STM32F4 env:STM32F407VG_btt env:STM32F407VG_btt_USB env:STM32F407VG_btt_USB_debug env:STM32F429VG_btt env:STM32F429VG_btt_USB env:STM32F429VG_btt_USB_debug +#elif MB(BTT_GTR_V1_0) + #include "stm32f4/pins_BTT_GTR_V1_0.h" // STM32F4 env:BTT_GTR_V1_0 env:BTT_GTR_V1_0_usb_flash_drive #elif MB(BTT_OCTOPUS_V1_0) #include "stm32f4/pins_BTT_OCTOPUS_V1_0.h" // STM32F4 env:STM32F446ZE_btt env:STM32F446ZE_btt_usb_flash_drive #elif MB(BTT_OCTOPUS_V1_1) @@ -790,6 +797,10 @@ #include "stm32f4/pins_MKS_ROBIN_NANO_V3.h" // STM32F4 env:mks_robin_nano_v3 env:mks_robin_nano_v3_usb_flash_drive env:mks_robin_nano_v3_usb_flash_drive_msc #elif MB(MKS_ROBIN_NANO_V3_1) #include "stm32f4/pins_MKS_ROBIN_NANO_V3.h" // STM32F4 env:mks_robin_nano_v3_1 env:mks_robin_nano_v3_1_usb_flash_drive env:mks_robin_nano_v3_1_usb_flash_drive_msc +#elif MB(MKS_MONSTER8_V1) + #include "stm32f4/pins_MKS_MONSTER8_V1.h" // STM32F4 env:mks_monster8 env:mks_monster8_usb_flash_drive env:mks_monster8_usb_flash_drive_msc +#elif MB(MKS_MONSTER8_V2) + #include "stm32f4/pins_MKS_MONSTER8_V2.h" // STM32F4 env:mks_monster8 env:mks_monster8_usb_flash_drive env:mks_monster8_usb_flash_drive_msc #elif MB(ANET_ET4) #include "stm32f4/pins_ANET_ET4.h" // STM32F4 env:Anet_ET4_no_bootloader env:Anet_ET4_OpenBLT #elif MB(ANET_ET4P) @@ -798,10 +809,6 @@ #include "stm32f4/pins_FYSETC_CHEETAH_V20.h" // STM32F4 env:FYSETC_CHEETAH_V20 #elif MB(FYSETC_CHEETAH_V30) #include "stm32f4/pins_FYSETC_CHEETAH_V30.h" // STM32F4 env:FYSETC_CHEETAH_V30 -#elif MB(MKS_MONSTER8_V1) - #include "stm32f4/pins_MKS_MONSTER8_V1.h" // STM32F4 env:mks_monster8 env:mks_monster8_usb_flash_drive env:mks_monster8_usb_flash_drive_msc -#elif MB(MKS_MONSTER8_V2) - #include "stm32f4/pins_MKS_MONSTER8_V2.h" // STM32F4 env:mks_monster8 env:mks_monster8_usb_flash_drive env:mks_monster8_usb_flash_drive_msc #elif MB(TH3D_EZBOARD_V2) #include "stm32f4/pins_TH3D_EZBOARD_V2.h" // STM32F4 env:TH3D_EZBoard_V2_no_bootloader env:TH3D_EZBoard_V2_OpenBLT #elif MB(OPULO_LUMEN_REV3) @@ -836,6 +843,15 @@ #include "stm32f4/pins_BLACKBEEZMINI.h" // STM32F4 env:BLACKBEEZMINI_V1 #elif MB(XTLW_CLIMBER_8TH) #include "stm32f4/pins_XTLW_CLIMBER_8TH.h" // STM32F4 env:XTLW_CLIMBER_8TH +#elif MB(FLY_RRF_E3_V1) + #include "stm32f4/pins_FLY_RRF_E3_V1.h" // STM32F4 env:FLY_RRF_E3_V1 + +// +// Other ARM Cortex-M4 +// + +#elif MB(CREALITY_CR4NS) + #include "stm32f1/pins_CREALITY_CR4NS.h" // STM32F1 env:STM32F103RE_creality env:STM32F103RE_creality_maple // // ARM Cortex-M7 @@ -924,6 +940,15 @@ #elif MB(CREALITY_ENDER2P_V24S4) #include "hc32f4/pins_CREALITY_ENDER2P_V24S4.h" // HC32F460 env:HC32F460C_e2p24s4 +// +// Raspberry Pi RP2040 +// + +#elif MB(RP2040) + #include "rp2040/pins_RP2040.h" // RP2040 env:RP2040 +#elif MB(BTT_SKR_PICO) + #include "rp2040/pins_BTT_SKR_Pico.h" // RP2040 env:SKR_Pico env:SKR_Pico_UART + // // Custom board (with custom PIO env) // diff --git a/firmware/Marlin/src/pins/pinsDebug_list.h b/firmware/Marlin/src/pins/pinsDebug_list.h index 58f4259..2372382 100644 --- a/firmware/Marlin/src/pins/pinsDebug_list.h +++ b/firmware/Marlin/src/pins/pinsDebug_list.h @@ -161,6 +161,11 @@ REPORT_NAME_ANALOG(__LINE__, TEMP_BOARD_PIN) #endif #endif +#if PIN_EXISTS(TEMP_SOC) + #if ANALOG_OK(TEMP_SOC_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_SOC_PIN) + #endif +#endif #if PIN_EXISTS(ADC_KEYPAD) #if ANALOG_OK(ADC_KEYPAD_PIN) REPORT_NAME_ANALOG(__LINE__, ADC_KEYPAD_PIN) @@ -2180,8 +2185,8 @@ // // MMU2 // -#if PIN_EXISTS(MMU2_RST) - REPORT_NAME_DIGITAL(__LINE__, MMU2_RST_PIN) +#if PIN_EXISTS(MMU_RST) + REPORT_NAME_DIGITAL(__LINE__, MMU_RST_PIN) #endif // diff --git a/firmware/Marlin/src/pins/pins_postprocess.h b/firmware/Marlin/src/pins/pins_postprocess.h index f9814b4..1d3b0eb 100644 --- a/firmware/Marlin/src/pins/pins_postprocess.h +++ b/firmware/Marlin/src/pins/pins_postprocess.h @@ -307,74 +307,167 @@ #define E7_CS_PIN -1 #endif +// If only TX is defined, use the same pin for RX +#if HAS_TMC_UART + #if !defined(X_SERIAL_RX_PIN) && PIN_EXISTS(X_SERIAL_TX) + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #endif + #if !defined(X2_SERIAL_RX_PIN) && PIN_EXISTS(X2_SERIAL_TX) + #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN + #endif + #if !defined(Y_SERIAL_RX_PIN) && PIN_EXISTS(Y_SERIAL_TX) + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #endif + #if !defined(Y2_SERIAL_RX_PIN) && PIN_EXISTS(Y2_SERIAL_TX) + #define Y2_SERIAL_RX_PIN Y2_SERIAL_TX_PIN + #endif + #if !defined(Z_SERIAL_RX_PIN) && PIN_EXISTS(Z_SERIAL_TX) + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + #endif + #if !defined(Z2_SERIAL_RX_PIN) && PIN_EXISTS(Z2_SERIAL_TX) + #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN + #endif + #if !defined(Z3_SERIAL_RX_PIN) && PIN_EXISTS(Z3_SERIAL_TX) + #define Z3_SERIAL_RX_PIN Z3_SERIAL_TX_PIN + #endif + #if !defined(Z4_SERIAL_RX_PIN) && PIN_EXISTS(Z4_SERIAL_TX) + #define Z4_SERIAL_RX_PIN Z4_SERIAL_TX_PIN + #endif + #if !defined(I_SERIAL_RX_PIN) && PIN_EXISTS(I_SERIAL_TX) + #define I_SERIAL_RX_PIN I_SERIAL_TX_PIN + #endif + #if !defined(J_SERIAL_RX_PIN) && PIN_EXISTS(J_SERIAL_TX) + #define J_SERIAL_RX_PIN J_SERIAL_TX_PIN + #endif + #if !defined(K_SERIAL_RX_PIN) && PIN_EXISTS(K_SERIAL_TX) + #define K_SERIAL_RX_PIN K_SERIAL_TX_PIN + #endif + #if !defined(U_SERIAL_RX_PIN) && PIN_EXISTS(U_SERIAL_TX) + #define U_SERIAL_RX_PIN U_SERIAL_TX_PIN + #endif + #if !defined(V_SERIAL_RX_PIN) && PIN_EXISTS(V_SERIAL_TX) + #define V_SERIAL_RX_PIN V_SERIAL_TX_PIN + #endif + #if !defined(W_SERIAL_RX_PIN) && PIN_EXISTS(W_SERIAL_TX) + #define W_SERIAL_RX_PIN W_SERIAL_TX_PIN + #endif + #if !defined(EX_SERIAL_RX_PIN) && PIN_EXISTS(EX_SERIAL_TX) + #define EX_SERIAL_RX_PIN EX_SERIAL_TX_PIN + #endif + #if !defined(E0_SERIAL_RX_PIN) && PIN_EXISTS(E0_SERIAL_TX) + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + #endif + #if !defined(E1_SERIAL_RX_PIN) && PIN_EXISTS(E1_SERIAL_TX) + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + #endif + #if !defined(E2_SERIAL_RX_PIN) && PIN_EXISTS(E2_SERIAL_TX) + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN + #endif + #if !defined(E3_SERIAL_RX_PIN) && PIN_EXISTS(E3_SERIAL_TX) + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN + #endif + #if !defined(E4_SERIAL_RX_PIN) && PIN_EXISTS(E4_SERIAL_TX) + #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN + #endif + #if !defined(E5_SERIAL_RX_PIN) && PIN_EXISTS(E5_SERIAL_TX) + #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN + #endif + #if !defined(E6_SERIAL_RX_PIN) && PIN_EXISTS(E6_SERIAL_TX) + #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN + #endif + #if !defined(E7_SERIAL_RX_PIN) && PIN_EXISTS(E7_SERIAL_TX) + #define E7_SERIAL_RX_PIN E7_SERIAL_TX_PIN + #endif +#endif + // // Destroy stepper driver RX and TX pins when set to -1 +// Some RX depend on TX, so RX needs to be un-defined before TX +// or it breaks "PIN_EXISTS(NAME_OF_UNDEF)". // -#if !PIN_EXISTS(Z2_SERIAL_TX) - #undef Z2_SERIAL_TX_PIN -#endif -#if !PIN_EXISTS(Z2_SERIAL_RX) - #undef Z2_SERIAL_RX_PIN -#endif -#if !PIN_EXISTS(Z3_SERIAL_TX) - #undef Z3_SERIAL_TX_PIN -#endif -#if !PIN_EXISTS(Z3_SERIAL_RX) - #undef Z3_SERIAL_RX_PIN -#endif -#if !PIN_EXISTS(Z4_SERIAL_TX) - #undef Z4_SERIAL_TX_PIN -#endif -#if !PIN_EXISTS(Z4_SERIAL_RX) - #undef Z4_SERIAL_RX_PIN -#endif -#if !PIN_EXISTS(X2_SERIAL_TX) - #undef X2_SERIAL_TX_PIN -#endif -#if !PIN_EXISTS(X2_SERIAL_RX) - #undef X2_SERIAL_RX_PIN -#endif -#if !PIN_EXISTS(Y2_SERIAL_TX) - #undef Y2_SERIAL_TX_PIN -#endif -#if !PIN_EXISTS(Y2_SERIAL_RX) - #undef Y2_SERIAL_RX_PIN -#endif -#if !PIN_EXISTS(I_SERIAL_TX) - #undef I_SERIAL_TX_PIN -#endif -#if !PIN_EXISTS(I_SERIAL_RX) - #undef I_SERIAL_RX_PIN -#endif -#if !PIN_EXISTS(J_SERIAL_TX) - #undef J_SERIAL_TX_PIN -#endif -#if !PIN_EXISTS(J_SERIAL_RX) - #undef J_SERIAL_RX_PIN -#endif -#if !PIN_EXISTS(K_SERIAL_TX) - #undef K_SERIAL_TX_PIN -#endif -#if !PIN_EXISTS(K_SERIAL_RX) - #undef K_SERIAL_RX_PIN -#endif -#if !PIN_EXISTS(U_SERIAL_TX) - #undef U_SERIAL_TX_PIN -#endif -#if !PIN_EXISTS(U_SERIAL_RX) - #undef U_SERIAL_RX_PIN -#endif -#if !PIN_EXISTS(V_SERIAL_TX) - #undef V_SERIAL_TX_PIN -#endif -#if !PIN_EXISTS(V_SERIAL_RX) - #undef V_SERIAL_RX_PIN +#if !PIN_EXISTS(W_SERIAL_RX) + #undef W_SERIAL_RX_PIN #endif #if !PIN_EXISTS(W_SERIAL_TX) #undef W_SERIAL_TX_PIN #endif -#if !PIN_EXISTS(W_SERIAL_RX) - #undef W_SERIAL_RX_PIN +#if !PIN_EXISTS(V_SERIAL_RX) + #undef V_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(V_SERIAL_TX) + #undef V_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(U_SERIAL_RX) + #undef U_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(U_SERIAL_TX) + #undef U_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(K_SERIAL_RX) + #undef K_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(K_SERIAL_TX) + #undef K_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(J_SERIAL_RX) + #undef J_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(J_SERIAL_TX) + #undef J_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(I_SERIAL_RX) + #undef I_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(I_SERIAL_TX) + #undef I_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(Z4_SERIAL_RX) + #undef Z4_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(Z4_SERIAL_TX) + #undef Z4_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(Z3_SERIAL_RX) + #undef Z3_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(Z3_SERIAL_TX) + #undef Z3_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(Z2_SERIAL_RX) + #undef Z2_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(Z2_SERIAL_TX) + #undef Z2_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(Y2_SERIAL_RX) + #undef Y2_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(Y2_SERIAL_TX) + #undef Y2_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(X2_SERIAL_RX) + #undef X2_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(X2_SERIAL_TX) + #undef X2_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(Z_SERIAL_RX) + #undef Z_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(Z_SERIAL_TX) + #undef Z_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(Y_SERIAL_RX) + #undef Y_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(Y_SERIAL_TX) + #undef Y_SERIAL_TX_PIN +#endif +#if !PIN_EXISTS(X_SERIAL_RX) + #undef X_SERIAL_RX_PIN +#endif +#if !PIN_EXISTS(X_SERIAL_TX) + #undef X_SERIAL_TX_PIN #endif #ifndef FAN0_PIN @@ -456,9 +549,13 @@ #define TEMP_BED_PIN -1 #endif -// Use ATEMP if TEMP_SOC_PIN is not defined -#if !defined(TEMP_SOC_PIN) && defined(ATEMP) - #define TEMP_SOC_PIN ATEMP +// Get TEMP_SOC_PIN from the platform, if not defined +#ifndef TEMP_SOC_PIN + #ifdef ATEMP + #define TEMP_SOC_PIN ATEMP + #elif defined(HAL_ADC_MCU_TEMP_DUMMY_PIN) + #define TEMP_SOC_PIN HAL_ADC_MCU_TEMP_DUMMY_PIN + #endif #endif #ifndef SD_DETECT_PIN diff --git a/firmware/Marlin/src/pins/rambo/pins_RAMBO_THINKERV2.h b/firmware/Marlin/src/pins/rambo/pins_RAMBO_THINKERV2.h old mode 100755 new mode 100644 diff --git a/firmware/Marlin/src/pins/ramps/pins_DAGOMA_D6.h b/firmware/Marlin/src/pins/ramps/pins_DAGOMA_D6.h index 2a89647..f44657d 100644 --- a/firmware/Marlin/src/pins/ramps/pins_DAGOMA_D6.h +++ b/firmware/Marlin/src/pins/ramps/pins_DAGOMA_D6.h @@ -75,18 +75,13 @@ // the jumper next to the limit switch socket when using sensorless homing. // #if HAS_TMC_UART - /** - * TMC2208/TMC2209 stepper drivers - */ - #define X_SERIAL_RX_PIN 73 + // + // TMC2208/TMC2209 stepper drivers + // #define X_SERIAL_TX_PIN 73 - #define Y_SERIAL_RX_PIN 73 #define Y_SERIAL_TX_PIN 73 - #define Z_SERIAL_RX_PIN 73 #define Z_SERIAL_TX_PIN 73 - #define E0_SERIAL_RX_PIN 73 #define E0_SERIAL_TX_PIN 73 - #define E1_SERIAL_RX_PIN 12 #define E1_SERIAL_TX_PIN 12 // Default TMC slave addresses diff --git a/firmware/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h b/firmware/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h index 5fdaa19..a21009b 100644 --- a/firmware/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h +++ b/firmware/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h @@ -32,9 +32,9 @@ #define Z_MAX_PIN 2 #if HAS_TMC_UART - /** - * TMC2208/TMC2209 stepper drivers - */ + // + // TMC2208/TMC2209 stepper drivers + // #define X_SERIAL_TX_PIN 71 #define X_SERIAL_RX_PIN 72 diff --git a/firmware/Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h b/firmware/Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h old mode 100755 new mode 100644 diff --git a/firmware/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/firmware/Marlin/src/pins/ramps/pins_TT_OSCAR.h index 0c573f2..a4968ef 100644 --- a/firmware/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/firmware/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -124,33 +124,26 @@ //#define E3_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN -1 // 59 - #define X_SERIAL_RX_PIN -1 // 63 + //#define X_SERIAL_RX_PIN -1 // 63 #define X2_SERIAL_TX_PIN -1 - #define X2_SERIAL_RX_PIN -1 #define Y_SERIAL_TX_PIN -1 // 64 - #define Y_SERIAL_RX_PIN -1 // 40 + //#define Y_SERIAL_RX_PIN -1 // 40 #define Y2_SERIAL_TX_PIN -1 - #define Y2_SERIAL_RX_PIN -1 #define Z_SERIAL_TX_PIN -1 // 44 - #define Z_SERIAL_RX_PIN -1 // 42 + //#define Z_SERIAL_RX_PIN -1 // 42 #define Z2_SERIAL_TX_PIN -1 - #define Z2_SERIAL_RX_PIN -1 #define E0_SERIAL_TX_PIN -1 // 66 - #define E0_SERIAL_RX_PIN -1 // 65 + //#define E0_SERIAL_RX_PIN -1 // 65 #define E1_SERIAL_TX_PIN -1 - #define E1_SERIAL_RX_PIN -1 #define E2_SERIAL_TX_PIN -1 - #define E2_SERIAL_RX_PIN -1 #define E3_SERIAL_TX_PIN -1 - #define E3_SERIAL_RX_PIN -1 #define E4_SERIAL_TX_PIN -1 - #define E4_SERIAL_RX_PIN -1 - #define E5_SERIAL_RX_PIN -1 - #define E6_SERIAL_RX_PIN -1 - #define E7_SERIAL_RX_PIN -1 + #define E5_SERIAL_TX_PIN -1 + #define E6_SERIAL_TX_PIN -1 + #define E7_SERIAL_TX_PIN -1 #endif // diff --git a/firmware/Marlin/src/pins/ramps/pins_ZRIB_V53.h b/firmware/Marlin/src/pins/ramps/pins_ZRIB_V53.h index 85420bd..f2d3b83 100644 --- a/firmware/Marlin/src/pins/ramps/pins_ZRIB_V53.h +++ b/firmware/Marlin/src/pins/ramps/pins_ZRIB_V53.h @@ -187,7 +187,7 @@ #if HAS_TMC_UART /** - * TMC2209 stepper drivers + * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below diff --git a/firmware/Marlin/src/pins/rp2040/env_validate.h b/firmware/Marlin/src/pins/rp2040/env_validate.h new file mode 100644 index 0000000..f409b52 --- /dev/null +++ b/firmware/Marlin/src/pins/rp2040/env_validate.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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(__PLAT_RP2040__) + #error "Oops! Make sure to build with target platform 'RP2040'." +#endif diff --git a/firmware/Marlin/src/pins/rp2040/pins_BTT_SKR_Pico.h b/firmware/Marlin/src/pins/rp2040/pins_BTT_SKR_Pico.h new file mode 100644 index 0000000..0d0807e --- /dev/null +++ b/firmware/Marlin/src/pins/rp2040/pins_BTT_SKR_Pico.h @@ -0,0 +1,157 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2022 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 + +/** + * BigTreeTech SKR Pico + * https://github.com/bigtreetech/SKR-Pico + */ + +#include "env_validate.h" + +#define BOARD_INFO_NAME "BTT SKR Pico" +#define DEFAULT_MACHINE_NAME "BIQU 3D Printer" + +#define USBCON + +#ifndef MARLIN_EEPROM_SIZE + #define MARLIN_EEPROM_SIZE 0x2000 // 8KB +#endif + +// +// Servos +// +#define SERVO0_PIN 29 + +// +// Limit Switches +// +#define X_DIAG_PIN 4 +#define Y_DIAG_PIN 3 +#define Z_DIAG_PIN 25 // probe:z_virtual_endstop + +#define X_STOP_PIN X_DIAG_PIN +#define Y_STOP_PIN Y_DIAG_PIN +#define Z_STOP_PIN Z_DIAG_PIN + +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 16 // E0-STOP +#endif + +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 22 +#endif + +// +// Steppers +// +#define X_STEP_PIN 11 +#define X_DIR_PIN 10 +#define X_ENABLE_PIN 12 + +#define Y_STEP_PIN 6 +#define Y_DIR_PIN 5 +#define Y_ENABLE_PIN 7 + +#define Z_STEP_PIN 19 +#define Z_DIR_PIN 28 +#define Z_ENABLE_PIN 2 + +#define E0_STEP_PIN 14 +#define E0_DIR_PIN 13 +#define E0_ENABLE_PIN 15 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 27 // Analog Input +#define TEMP_BED_PIN 26 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 23 +#define HEATER_BED_PIN 21 + +#define FAN0_PIN 17 +#define FAN1_PIN 18 + +#if HAS_CUTTER + #define SPINDLE_LASER_ENA_PIN 0 + #define SPINDLE_LASER_PWM_PIN 1 +#else + #define FAN2_PIN 20 +#endif + +// +// Misc. Functions +// +#define NEOPIXEL_PIN 24 + +/** + * TMC2208/TMC2209 stepper drivers + */ +#if HAS_TMC_UART + /** + * 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 MSerial1 + //#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 + + /** + * Software serial + */ + #ifndef X_SERIAL_TX_PIN + #define X_SERIAL_TX_PIN 8 + #endif + #ifndef X_SERIAL_RX_PIN + #define X_SERIAL_RX_PIN 9 + #endif + #ifndef Y_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN 8 + #endif + #ifndef Y_SERIAL_RX_PIN + #define Y_SERIAL_RX_PIN 9 + #endif + #ifndef Z_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN 8 + #endif + #ifndef Z_SERIAL_RX_PIN + #define Z_SERIAL_RX_PIN 9 + #endif + #ifndef E0_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN 8 + #endif + #ifndef E0_SERIAL_RX_PIN + #define E0_SERIAL_RX_PIN 9 + #endif +#endif diff --git a/firmware/Marlin/src/pins/rp2040/pins_RP2040.h b/firmware/Marlin/src/pins/rp2040/pins_RP2040.h new file mode 100644 index 0000000..2f4e379 --- /dev/null +++ b/firmware/Marlin/src/pins/rp2040/pins_RP2040.h @@ -0,0 +1,562 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 "RP2040 Test" +#define DEFAULT_MACHINE_NAME "RP2040 Test" + +#ifndef MARLIN_EEPROM_SIZE + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB +#endif + +// +// Servos +// + +#define SERVO0_PIN 14 + +// +// Limit Switches +// +#define X_STOP_PIN 13 +#define Y_STOP_PIN 3 +#define Z_STOP_PIN 2 + +// +// Steppers +// +#define X_STEP_PIN 29 +#define X_DIR_PIN 29 +#define X_ENABLE_PIN 29 +#ifndef X_CS_PIN + #define X_CS_PIN 29 +#endif + +#define Y_STEP_PIN 29 +#define Y_DIR_PIN 29 +#define Y_ENABLE_PIN 29 +#ifndef Y_CS_PIN + #define Y_CS_PIN 29 +#endif + +#define Z_STEP_PIN 5 +#define Z_DIR_PIN 4 +#define Z_ENABLE_PIN 7 +#ifndef Z_CS_PIN + #define Z_CS_PIN 4 +#endif + +#define E0_STEP_PIN 29 +#define E0_DIR_PIN 29 +#define E0_ENABLE_PIN 29 +#ifndef E0_CS_PIN + #define E0_CS_PIN 29 +#endif + +//#define E1_STEP_PIN 36 +//#define E1_DIR_PIN 34 +//#define E1_ENABLE_PIN 30 +//#ifndef E1_CS_PIN +// #define E1_CS_PIN 44 +//#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN A0 // Analog Input +#define TEMP_1_PIN A1 // Analog Input +#define TEMP_2_PIN A2 // Analog Input +#define TEMP_BED_PIN A1 // Analog Input + +#define TEMP_MCU HAL_ADC_MCU_TEMP_DUMMY_PIN // this is a flag value, don´t change + +#define TEMP_CHAMBER_PIN TEMP_1_PIN +#define TEMP_BOARD_PIN TEMP_MCU + +// SPI for MAX Thermocouple +#if DISABLED(SDSUPPORT) + #define TEMP_0_CS_PIN 17 // Don't use 53 if using Display/SD card +#else + #define TEMP_0_CS_PIN 17 // Don't use 49 (SD_DETECT_PIN) +#endif + +// +// Heaters / Fans +// +#define HEATER_0_PIN 24 + + // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") +#define FAN0_PIN 23 +#define HEATER_BED_PIN 25 + +#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) + #define FAN1_PIN 21 +#else + #define HEATER_1_PIN MOSFET_D_PIN +#endif + +#ifndef FAN0_PIN + #define FAN0_PIN 4 // IO pin. Buffer needed +#endif + +// +// Misc. Functions +// +#define SDSS 20 +//#define LED_PIN 13 +#define NEOPIXEL_PIN 15 + +#ifndef FILWIDTH_PIN + #define FILWIDTH_PIN 5 // Analog Input on AUX2 +#endif + +// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 21 +#endif + +#ifndef PS_ON_PIN + #define PS_ON_PIN 12 +#endif + +#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN) + #if NUM_SERVOS <= 1 // Prefer the servo connector + #define CASE_LIGHT_PIN 6 // Hardware PWM + #elif HAS_FREE_AUX2_PINS // try to use AUX 2 + #define CASE_LIGHT_PIN 21 // Hardware PWM + #endif +#endif + +// +// M3/M4/M5 - Spindle/Laser Control +// +#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA) + #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // Prefer the servo connector + #define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown! + #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM + #define SPINDLE_DIR_PIN 5 + #elif HAS_FREE_AUX2_PINS // try to use AUX 2 + #define SPINDLE_LASER_ENA_PIN 22 // Pullup or pulldown! + #define SPINDLE_LASER_PWM_PIN 23 // Hardware PWM + #define SPINDLE_DIR_PIN 24 + #endif +#endif + +// +// Průša i3 MK2 Multiplexer Support +// +#ifndef E_MUX0_PIN + #define E_MUX0_PIN 40 // Z_CS_PIN +#endif +#ifndef E_MUX1_PIN + #define E_MUX1_PIN 42 // E0_CS_PIN +#endif +#ifndef E_MUX2_PIN + #define E_MUX2_PIN 44 // E1_CS_PIN +#endif + +/** + * Default pins for TMC software SPI + */ +#if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI 66 + #endif + #ifndef TMC_SW_MISO + #define TMC_SW_MISO 44 + #endif + #ifndef TMC_SW_SCK + #define TMC_SW_SCK 64 + #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 MSerial1 + //#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 + + /** + * Software serial + */ + + #ifndef X_SERIAL_TX_PIN + #define X_SERIAL_TX_PIN -1 + #endif + #ifndef X2_SERIAL_TX_PIN + #define X2_SERIAL_TX_PIN -1 + #endif + + #ifndef Y_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN -1 + #endif + #ifndef Y2_SERIAL_TX_PIN + #define Y2_SERIAL_TX_PIN -1 + #endif + + #ifndef Z_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN 0 + #endif + #ifndef Z2_SERIAL_TX_PIN + #define Z2_SERIAL_TX_PIN -1 + #endif + + #ifndef E0_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN -1 + #endif + #ifndef E1_SERIAL_TX_PIN + #define E1_SERIAL_TX_PIN -1 + #endif + #ifndef E2_SERIAL_TX_PIN + #define E2_SERIAL_TX_PIN -1 + #endif + #ifndef E3_SERIAL_TX_PIN + #define E3_SERIAL_TX_PIN -1 + #endif + #ifndef E4_SERIAL_TX_PIN + #define E4_SERIAL_TX_PIN -1 + #endif + #ifndef E5_SERIAL_TX_PIN + #define E5_SERIAL_TX_PIN -1 + #endif + #ifndef E6_SERIAL_TX_PIN + #define E6_SERIAL_TX_PIN -1 + #endif + #ifndef E7_SERIAL_TX_PIN + #define E7_SERIAL_TX_PIN -1 + #endif +#endif + +////////////////////////// +// LCDs and Controllers // +////////////////////////// + +#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI) + + #define TFT_A0_PIN 43 + #define TFT_CS_PIN 49 + #define TFT_DC_PIN 43 + #define TFT_SCK_PIN SD_SCK_PIN + #define TFT_MOSI_PIN SD_MOSI_PIN + #define TFT_MISO_PIN SD_MISO_PIN + #define LCD_USE_DMA_SPI + + #define BTN_EN1 40 + #define BTN_EN2 63 + #define BTN_ENC 59 + #define BEEPER_PIN 22 + + #define TOUCH_CS_PIN 33 + #define SD_DETECT_PIN 41 + + #define HAS_SPI_FLASH 1 + #if HAS_SPI_FLASH + #define SPI_DEVICE 1 + #define SPI_FLASH_SIZE 0x1000000 // 16MB + #define SPI_FLASH_CS_PIN 31 + #define SPI_FLASH_MOSI_PIN SD_MOSI_PIN + #define SPI_FLASH_MISO_PIN SD_MISO_PIN + #define SPI_FLASH_SCK_PIN SD_SCK_PIN + #endif + + #define TFT_BUFFER_SIZE 0xFFFF + #ifndef TFT_DRIVER + #define TFT_DRIVER ST7796 + #endif + #ifndef XPT2046_X_CALIBRATION + #define XPT2046_X_CALIBRATION 63934 + #endif + #ifndef XPT2046_Y_CALIBRATION0 + #define XPT2046_Y_CALIBRATION 63598 + #endif + #ifndef XPT2046_X_OFFSET + #define XPT2046_X_OFFSET -1 + #endif + #ifndef XPT2046_Y_OFFSET + #define XPT2046_Y_OFFSET -20 + #endif + + #define BTN_BACK 70 + +#elif HAS_WIRED_LCD + + // + // LCD Display output pins + // + #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + + #define LCD_PINS_RS 49 // CS chip select /SS chip slave select + #define LCD_PINS_ENABLE 51 // SID (MOSI) + #define LCD_PINS_D4 52 // SCK (CLK) clock + + #elif ALL(IS_NEWPANEL, PANEL_ONE) + + #define LCD_PINS_RS 40 + #define LCD_PINS_ENABLE 42 + #define LCD_PINS_D4 65 + #define LCD_PINS_D5 66 + #define LCD_PINS_D6 44 + #define LCD_PINS_D7 64 + + #else + + #if ENABLED(CR10_STOCKDISPLAY) + + #define LCD_PINS_RS 27 + #define LCD_PINS_ENABLE 29 + #define LCD_PINS_D4 25 + + #if !IS_NEWPANEL + #define BEEPER_PIN 37 + #endif + + #elif ENABLED(ZONESTAR_LCD) + + #define LCD_PINS_RS 64 + #define LCD_PINS_ENABLE 44 + #define LCD_PINS_D4 63 + #define LCD_PINS_D5 40 + #define LCD_PINS_D6 42 + #define LCD_PINS_D7 65 + + #else + + #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) + #define LCD_PINS_DC 25 // Set as output on init + #define LCD_PINS_RS 27 // Pull low for 1s to init + // DOGM SPI LCD Support + #define DOGLCD_CS 16 + #define DOGLCD_MOSI 17 + #define DOGLCD_SCK 23 + #define DOGLCD_A0 LCD_PINS_DC + #else + #define LCD_PINS_RS 16 + #define LCD_PINS_ENABLE 17 + #define LCD_PINS_D4 23 + #define LCD_PINS_D5 25 + #define LCD_PINS_D6 27 + #endif + + #define LCD_PINS_D7 29 + + #if !IS_NEWPANEL + #define BEEPER_PIN 33 + #endif + + #endif + + #if !IS_NEWPANEL + // Buttons attached to a shift register + // Not wired yet + //#define SHIFT_CLK_PIN 38 + //#define SHIFT_LD_PIN 42 + //#define SHIFT_OUT_PIN 40 + //#define SHIFT_EN_PIN 17 + #endif + + #endif + + // + // LCD Display input pins + // + #if IS_NEWPANEL + + #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) + + #define BEEPER_PIN 37 + + #if ENABLED(CR10_STOCKDISPLAY) + #define BTN_EN1 17 + #define BTN_EN2 23 + #else + #define BTN_EN1 31 + #define BTN_EN2 33 + #endif + + #define BTN_ENC 35 + #define SD_DETECT_PIN 49 + #define KILL_PIN 41 + + #if ENABLED(BQ_LCD_SMART_CONTROLLER) + #define LCD_BACKLIGHT_PIN 39 + #endif + + #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) + + #define BTN_EN1 64 + #define BTN_EN2 59 + #define BTN_ENC 63 + #define SD_DETECT_PIN 42 + + #elif ENABLED(LCD_I2C_PANELOLU2) + + #define BTN_EN1 47 + #define BTN_EN2 43 + #define BTN_ENC 32 + #define LCD_SDSS SDSS + #define KILL_PIN 41 + + #elif ENABLED(LCD_I2C_VIKI) + + #define BTN_EN1 22 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42. + #define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13. + #define BTN_ENC -1 + + #define LCD_SDSS SDSS + #define SD_DETECT_PIN 49 + + #elif ANY(VIKI2, miniVIKI) + + #define DOGLCD_CS 45 + #define DOGLCD_A0 44 + #define LCD_SCREEN_ROT_180 + + #define BEEPER_PIN 33 + #define STAT_LED_RED_PIN 32 + #define STAT_LED_BLUE_PIN 35 + + #define BTN_EN1 22 + #define BTN_EN2 7 + #define BTN_ENC 39 + + #define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board + #define KILL_PIN 31 + + #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) + + #define DOGLCD_CS 29 + #define DOGLCD_A0 27 + + #define BEEPER_PIN 23 + #define LCD_BACKLIGHT_PIN 33 + + #define BTN_EN1 35 + #define BTN_EN2 37 + #define BTN_ENC 31 + + #define LCD_SDSS SDSS + #define SD_DETECT_PIN 49 + #define KILL_PIN 41 + + #elif ENABLED(MKS_MINI_12864) + + #define DOGLCD_A0 27 + #define DOGLCD_CS 25 + + // GLCD features + // Uncomment screen orientation + //#define LCD_SCREEN_ROT_90 + //#define LCD_SCREEN_ROT_180 + //#define LCD_SCREEN_ROT_270 + + #define BEEPER_PIN 37 + // not connected to a pin + #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 + + #define BTN_EN1 31 + #define BTN_EN2 33 + #define BTN_ENC 35 + + #define SD_DETECT_PIN 49 + #define KILL_PIN 64 + + #elif ENABLED(MINIPANEL) + + #define BEEPER_PIN 42 + // not connected to a pin + #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 + + #define DOGLCD_A0 44 + #define DOGLCD_CS 66 + + // GLCD features + // Uncomment screen orientation + //#define LCD_SCREEN_ROT_90 + //#define LCD_SCREEN_ROT_180 + //#define LCD_SCREEN_ROT_270 + + #define BTN_EN1 40 + #define BTN_EN2 63 + #define BTN_ENC 59 + + #define SD_DETECT_PIN 49 + #define KILL_PIN 64 + + #elif ENABLED(ZONESTAR_LCD) + + #define ADC_KEYPAD_PIN 12 + + #elif ENABLED(AZSMZ_12864) + + // Pins only defined for RAMPS_SMART currently + + #else + + // Beeper on AUX-4 + #define BEEPER_PIN 33 + + // Buttons are directly attached to AUX-2 + #if IS_RRW_KEYPAD + #define SHIFT_OUT_PIN 40 + #define SHIFT_CLK_PIN 44 + #define SHIFT_LD_PIN 42 + #define BTN_EN1 64 + #define BTN_EN2 59 + #define BTN_ENC 63 + #elif ENABLED(PANEL_ONE) + #define BTN_EN1 59 // AUX2 PIN 3 + #define BTN_EN2 63 // AUX2 PIN 4 + #define BTN_ENC 49 // AUX3 PIN 7 + #else + #define BTN_EN1 37 + #define BTN_EN2 35 + #define BTN_ENC 31 + #define SD_DETECT_PIN 41 + #endif + + #if ENABLED(G3D_PANEL) + #define SD_DETECT_PIN 49 + #define KILL_PIN 41 + #endif + #endif + + // CUSTOM SIMULATOR INPUTS + #define BTN_BACK 70 + + #endif // IS_NEWPANEL + +#endif // HAS_WIRED_LCD diff --git a/firmware/Marlin/src/pins/samd/pins_MINITRONICS20.h b/firmware/Marlin/src/pins/samd/pins_MINITRONICS20.h index 2111eb1..12cba80 100644 --- a/firmware/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/firmware/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -22,7 +22,9 @@ #pragma once /** - * ReprapWorld's Minitronics v2.0 + * ReprapWorld Minitronics v2.0 + * https://reprap.org/wiki/Minitronics_20 + * 48MHz Atmel SAMD21J18 ARM Cortex-M0+ */ #if NOT_TARGET(__SAMD21__) @@ -125,6 +127,11 @@ #endif +// Verify that drivers match the hardware +#if (HAS_X_AXIS && !AXIS_DRIVER_TYPE_X(DRV8825)) || (HAS_Y_AXIS && !AXIS_DRIVER_TYPE_Y(DRV8825)) || (HAS_Z_AXIS && !AXIS_DRIVER_TYPE_Z(DRV8825)) || (HAS_EXTRUDER && !AXIS_DRIVER_TYPE_E0(DRV8825)) + #error "Minitronics v2.0 has hard-wired DRV8825 drivers. Comment out this line to continue." +#endif + // // Extruder / Bed // diff --git a/firmware/Marlin/src/pins/samd/pins_RAMPS_144.h b/firmware/Marlin/src/pins/samd/pins_RAMPS_144.h index 6897540..33a45fc 100644 --- a/firmware/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/firmware/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -210,54 +210,30 @@ #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN 47 #endif - #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #endif #ifndef X2_SERIAL_TX_PIN #define X2_SERIAL_TX_PIN -1 #endif - #ifndef X2_SERIAL_RX_PIN - #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN - #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN 45 #endif - #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #endif #ifndef Y2_SERIAL_TX_PIN #define Y2_SERIAL_TX_PIN -1 #endif - #ifndef Y2_SERIAL_RX_PIN - #define Y2_SERIAL_RX_PIN Y2_SERIAL_TX_PIN - #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN 32 #endif - #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #endif #ifndef Z2_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN 22 #endif - #ifndef Z2_SERIAL_RX_PIN - #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN - #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN 43 #endif - #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #endif #ifndef E1_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN -1 #endif - #ifndef E1_SERIAL_RX_PIN - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #endif #endif // diff --git a/firmware/Marlin/src/pins/sanguino/pins_ANET_10.h b/firmware/Marlin/src/pins/sanguino/pins_ANET_10.h index 189b596..708df22 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/firmware/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -51,20 +51,14 @@ */ /** - * Another usable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * - * Once installed select the Sanguino board and then select the CPU. + * Once installed select the SANGUINO board and then select the CPU. */ /** diff --git a/firmware/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h b/firmware/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h index 2fa407d..7befd7f 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h +++ b/firmware/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h @@ -27,26 +27,14 @@ */ /** - * Rev B 26 DEC 2016 - * - * added pointer to a current Arduino IDE extension - */ - -/** - * A useable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * - * Once installed select the Sanguino board and then select the CPU. + * Once installed select the SANGUINO board and then select the CPU. */ #define REQUIRE_MEGA644P diff --git a/firmware/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h b/firmware/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h index 2340bb5..86869fc 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h +++ b/firmware/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h @@ -26,25 +26,13 @@ */ /** - * Rev B 26 DEC 2016 - * - * added pointer to a current Arduino IDE extension - */ - -/** - * A useable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * * Once installed select the SANGUINO board and then select the CPU. */ diff --git a/firmware/Marlin/src/pins/sanguino/pins_GEN6.h b/firmware/Marlin/src/pins/sanguino/pins_GEN6.h index 8ccb311..ad8ef97 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_GEN6.h +++ b/firmware/Marlin/src/pins/sanguino/pins_GEN6.h @@ -26,29 +26,15 @@ * Schematic: https://reprap.org/mediawiki/images/0/0f/GEN6_Mendel_Circuit.pdf */ - /** - * Rev B 26 DEC 2016 - * - * 1) added pointer to a current Arduino IDE extension - * 2) added support for M3, M4 & M5 spindle control commands - * 3) added case light pin definition - */ - /** - * A useable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * - * Once installed select the Sanguino board and then select the CPU. + * Once installed select the SANGUINO board and then select the CPU. */ #define ALLOW_MEGA644P diff --git a/firmware/Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h b/firmware/Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h index caf395f..ffe14e6 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h +++ b/firmware/Marlin/src/pins/sanguino/pins_GEN6_DELUXE.h @@ -26,25 +26,13 @@ */ /** - * Rev B 26 DEC 2016 - * - * added pointer to a current Arduino IDE extension - */ - -/** - * A useable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * * Once installed select the SANGUINO board and then select the CPU. */ diff --git a/firmware/Marlin/src/pins/sanguino/pins_GEN7_12.h b/firmware/Marlin/src/pins/sanguino/pins_GEN7_12.h index 10b9780..691199f 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_GEN7_12.h +++ b/firmware/Marlin/src/pins/sanguino/pins_GEN7_12.h @@ -29,29 +29,15 @@ * Schematic (1.3.1): https://github.com/Traumflug/Generation_7_Electronics/blob/release-1.3.1/release%20documents/Gen7Board%20Schematic.pdf */ - /** - * Rev B 26 DEC 2016 - * - * 1) added pointer to a current Arduino IDE extension - * 2) added support for M3, M4 & M5 spindle control commands - * 3) added case light pin definition - */ - /** - * A useable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * - * Once installed select the Sanguino board and then select the CPU. + * Once installed select the SANGUINO board and then select the CPU. */ #define ALLOW_MEGA644 diff --git a/firmware/Marlin/src/pins/sanguino/pins_GEN7_13.h b/firmware/Marlin/src/pins/sanguino/pins_GEN7_13.h index a7c513c..8ec4d49 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_GEN7_13.h +++ b/firmware/Marlin/src/pins/sanguino/pins_GEN7_13.h @@ -26,26 +26,14 @@ */ /** - * Rev B 26 DEC 2016 - * - * added pointer to a current Arduino IDE extension - */ - -/** - * A useable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * - * Once installed select the Sanguino board and then select the CPU. + * Once installed select the SANGUINO board and then select the CPU. */ #define BOARD_INFO_NAME "Gen7 v1.3" diff --git a/firmware/Marlin/src/pins/sanguino/pins_GEN7_14.h b/firmware/Marlin/src/pins/sanguino/pins_GEN7_14.h index b4e6a5e..2e4cacb 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_GEN7_14.h +++ b/firmware/Marlin/src/pins/sanguino/pins_GEN7_14.h @@ -28,28 +28,14 @@ */ /** - * Rev B 26 DEC 2016 - * - * 1) added pointer to a current Arduino IDE extension - * 2) added support for M3, M4 & M5 spindle control commands - * 3) added case light pin definition - */ - -/** - * A useable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * - * Once installed select the Sanguino board and then select the CPU. + * Once installed select the SANGUINO board and then select the CPU. */ #define ALLOW_MEGA644 diff --git a/firmware/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h b/firmware/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h index 6b4f2b8..c363e52 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h +++ b/firmware/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h @@ -29,28 +29,14 @@ */ /** - * Rev B 26 DEC 2016 - * - * 1) added pointer to a current Arduino IDE extension - * 2) added support for M3, M4 & M5 spindle control commands - * 3) added case light pin definition - */ - -/** - * A useable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * - * Once installed select the Sanguino board and then select the CPU. + * Once installed select the SANGUINO board and then select the CPU. */ #define ALLOW_MEGA644 diff --git a/firmware/Marlin/src/pins/sanguino/pins_OMCA.h b/firmware/Marlin/src/pins/sanguino/pins_OMCA.h index 19f1474..428151e 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_OMCA.h +++ b/firmware/Marlin/src/pins/sanguino/pins_OMCA.h @@ -53,26 +53,14 @@ */ /** - * Rev B 26 DEC 2016 - * - * added pointer to a current Arduino IDE extension - */ - -/** - * A useable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com:443/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * - * Once installed select the Sanguino board and then select the CPU. + * Once installed select the SANGUINO board and then select the CPU. */ #if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega644__) diff --git a/firmware/Marlin/src/pins/sanguino/pins_OMCA_A.h b/firmware/Marlin/src/pins/sanguino/pins_OMCA_A.h index 73a678b..e3a4666 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_OMCA_A.h +++ b/firmware/Marlin/src/pins/sanguino/pins_OMCA_A.h @@ -51,26 +51,14 @@ */ /** - * Rev B 26 DEC 2016 - * - * added pointer to a current Arduino IDE extension - */ - -/** - * A useable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * - * Once installed select the Sanguino board and then select the CPU. + * Once installed select the SANGUINO board and then select the CPU. */ #if NOT_TARGET(__AVR_ATmega644__) diff --git a/firmware/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/firmware/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index d9b3659..50df2c9 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/firmware/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -31,28 +31,14 @@ */ /** - * Rev B 26 DEC 2016 - * - * 1) added pointer to a current Arduino IDE extension - * 2) added support for M3, M4 & M5 spindle control commands - * 3) added case light pin definition - */ - -/** - * A useable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * - * Once installed select the Sanguino board and then select the CPU. + * Once installed select the SANGUINO board and then select the CPU. */ #define ALLOW_MEGA644P diff --git a/firmware/Marlin/src/pins/sanguino/pins_SETHI.h b/firmware/Marlin/src/pins/sanguino/pins_SETHI.h index 9a21e2d..66e7e64 100644 --- a/firmware/Marlin/src/pins/sanguino/pins_SETHI.h +++ b/firmware/Marlin/src/pins/sanguino/pins_SETHI.h @@ -26,27 +26,14 @@ */ /** - * Rev B 26 DEC 2016 - * - * added pointer to a current Arduino IDE extension - * this assumes that this board uses the Sanguino pin map - */ - -/** - * A useable Arduino IDE extension (Boards Manager) can be found at + * Requires this Arduino IDE extension for Boards Manager: * https://github.com/Lauszus/Sanguino * - * This extension has been tested on Arduino 1.6.12 & 1.8.0 - * - * Here's the JSON path: + * Follow the installation instructions at https://learn.sparkfun.com/pages/CustomBoardsArduino + * Just use this JSON URL instead of Sparkfun's: * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json * - * When installing select 1.0.2 - * - * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino - * Just use the above JSON URL instead of Sparkfun's JSON. - * - * Once installed select the Sanguino board and then select the CPU. + * Once installed select the SANGUINO board and then select the CPU. */ #define ALLOW_MEGA644 diff --git a/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index 725a3f9..7693aa6 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -136,7 +136,7 @@ #if HAS_TMC_UART /** - * TMC2209 stepper drivers + * TMC2208/TMC2209 stepper drivers * Hardware serial communication ports. */ #define X_HARDWARE_SERIAL MSerial4 diff --git a/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index 3b42a09..de7ded7 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -126,16 +126,9 @@ //#define E0_HARDWARE_SERIAL MSerial1 #define X_SERIAL_TX_PIN PC10 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PC11 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PC12 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PD2 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h b/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h index 9209515..37e7ac8 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h @@ -34,16 +34,9 @@ */ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PB15 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PC6 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PC10 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PC11 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index d0bd294..70f3f85 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -81,16 +81,9 @@ #if HAS_TMC_UART // Shared with EXP1 #define X_SERIAL_TX_PIN PC10 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PC11 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PC12 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PC14 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h b/firmware/Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h old mode 100755 new mode 100644 diff --git a/firmware/Marlin/src/pins/stm32f1/pins_CREALITY_CR4NS.h b/firmware/Marlin/src/pins/stm32f1/pins_CREALITY_CR4NS.h index 5ff033e..95bd5e9 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_CREALITY_CR4NS.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_CREALITY_CR4NS.h @@ -33,11 +33,6 @@ #error "CR4NS200320C13 only supports one hotend / E-stepper." #endif -// Validate stepper driver selections. -//#if !AXIS_DRIVER_TYPE_X(TMC2208) || !AXIS_DRIVER_TYPE_Y(TMC2208) || !AXIS_DRIVER_TYPE_Z(TMC2208) || !AXIS_DRIVER_TYPE_E0(TMC2208) -// #error "This board has onboard TMC2208 drivers for X, Y, Z, and E0." -//#endif - #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "CR4NS200320C13" #endif @@ -46,23 +41,28 @@ #endif #define BOARD_WEBSITE_URL "www.creality.com" +// +// EEPROM +// +#define IIC_EEPROM_SDA PA7 +#define IIC_EEPROM_SCL PA8 + // // Servos // #ifndef SERVO0_PIN - #define SERVO0_PIN PC14 + #define SERVO0_PIN PC13 #endif - #ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN PC13 // BLTouch IN + #define Z_MIN_PROBE_PIN PC14 #endif // // Limit Switches // -//#ifndef Z_STOP_PIN -// #define Z_STOP_PIN PA15 // else PA7 -//#endif +#ifndef Z_STOP_PIN + #define Z_STOP_PIN PC14 +#endif // // Filament Runout Sensor @@ -76,31 +76,31 @@ // #define HEATER_BED_PIN PB2 // HOT BED #define FAN1_PIN PC1 // extruder fan -//#define FAN2_PIN PB1 // Controller fan FET // -// Auto fans +// Steppers // -//#ifndef CONTROLLER_FAN_PIN -// #define CONTROLLER_FAN_PIN FAN2_PIN -//#endif - #if HAS_TMC_UART + // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 // Software serial #define X_SERIAL_TX_PIN PB12 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #define X_DIAG_PIN PB10 #define Y_SERIAL_TX_PIN PB13 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #define Y_DIAG_PIN PB11 #define Z_SERIAL_TX_PIN PB14 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #endif // HAS_TMC_UART +// +// SD Card +// +#define ONBOARD_SPI_DEVICE 1 // SPI1 +#define ONBOARD_SD_CS_PIN PA4 // SDSS + #if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI) /** @@ -118,18 +118,10 @@ #define EXP3_03_PIN PA2 #define EXP3_04_PIN PA3 #define EXP3_05_PIN PB1 - #define EXP3_06_PIN -1 + #define EXP3_06_PIN PB0 #define EXP3_07_PIN PA12 #define EXP3_08_PIN PA11 - #ifndef BEEPER_PIN - #define BEEPER_PIN EXP1_06_PIN // BEEP - #endif - - #define BTN_ENC EXP1_05_PIN // EN - #define BTN_EN1 EXP1_08_PIN // A - #define BTN_EN2 EXP1_07_PIN // B - #endif #include "pins_CREALITY_V4.h" diff --git a/firmware/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/firmware/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index 9ae858f..38959a4 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -57,8 +57,12 @@ #endif #if ENABLED(IIC_BL24CXX_EEPROM) - #define IIC_EEPROM_SDA PA11 - #define IIC_EEPROM_SCL PA12 + #ifndef IIC_EEPROM_SDA + #define IIC_EEPROM_SDA PA11 + #endif + #ifndef IIC_EEPROM_SCL + #define IIC_EEPROM_SCL PA12 + #endif #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16) #elif ENABLED(SDCARD_EEPROM_EMULATION) #define MARLIN_EEPROM_SIZE 0x800 // 2K @@ -193,14 +197,30 @@ * 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 + #ifndef EXP3_01_PIN + #define EXP3_01_PIN PC6 + #endif + #ifndef EXP3_02_PIN + #define EXP3_02_PIN PB2 + #endif + #ifndef EXP3_03_PIN + #define EXP3_03_PIN PB10 + #endif + #ifndef EXP3_04_PIN + #define EXP3_04_PIN PB11 + #endif + #ifndef EXP3_05_PIN + #define EXP3_05_PIN PB14 + #endif + #ifndef EXP3_06_PIN + #define EXP3_06_PIN PB13 + #endif + #ifndef EXP3_07_PIN + #define EXP3_07_PIN PB12 + #endif + #ifndef EXP3_08_PIN + #define EXP3_08_PIN PB15 + #endif #elif ANY(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD) diff --git a/firmware/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/firmware/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index 55100b1..fa757d2 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -125,13 +125,10 @@ */ #if HAS_TMC_UART // SoftwareSerial with one pin per driver - // Compatible with TMC2208 and TMC2209 drivers + // Compatible with TMC2208/TMC2209 drivers #define X_SERIAL_TX_PIN PA10 // RXD1 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PA9 // TXD1 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PC7 // IO1 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif @@ -172,9 +169,8 @@ // // EXTRUDER // -#if AXIS_DRIVER_TYPE_E0(TMC2208) || AXIS_DRIVER_TYPE_E0(TMC2209) +#if AXIS_HAS_UART(E0) #define E0_SERIAL_TX_PIN PA8 // IO0 - #define E0_SERIAL_RX_PIN PA8 // IO0 #else // Motor current PWM pins #define MOTOR_CURRENT_PWM_E_PIN PB0 // VREF1 CONTROL E diff --git a/firmware/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/firmware/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index e31d11f..22c977d 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -95,13 +95,9 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PB0 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PA7 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PA4 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PC2 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif // diff --git a/firmware/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h b/firmware/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h index fc9e24b..d324792 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h @@ -85,9 +85,9 @@ #define E0_ENABLE_PIN PC13 #if HAS_TMC_UART - /** - * TMC2208/TMC2209 stepper drivers - */ + // + // TMC2208/TMC2209 stepper drivers + // // Hardware serial with switch #define X_HARDWARE_SERIAL MSerial2 diff --git a/firmware/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h b/firmware/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h index 96e90b7..43bd850 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h @@ -38,9 +38,9 @@ #if HAS_TMC_UART - /** - * TMC2208/TMC2209 stepper drivers - */ + // + // TMC2208/TMC2209 stepper drivers + // #define X_SERIAL_TX_PIN PA11 #define X_SERIAL_RX_PIN PA12 diff --git a/firmware/Marlin/src/pins/stm32f1/pins_KEDI_CONTROLLER_V1_2.h b/firmware/Marlin/src/pins/stm32f1/pins_KEDI_CONTROLLER_V1_2.h index 000548e..b136ef7 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_KEDI_CONTROLLER_V1_2.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_KEDI_CONTROLLER_V1_2.h @@ -94,47 +94,29 @@ #endif // CS Pins (One pin for each driver) -#if HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2160) || HAS_DRIVER(TMC2660) || HAS_DRIVER(TMC5130) || HAS_DRIVER(TMC5160) - #ifndef X_CS_PIN - #define X_CS_PIN PC10 - #endif - #ifndef Y_CS_PIN - #define Y_CS_PIN PC11 - #endif - #ifndef Z_CS_PIN - #define Z_CS_PIN PC12 - #endif - #ifndef E0_CS_PIN - #define E0_CS_PIN PC14 - #endif +#if HAS_TMC_SPI + #ifndef X_CS_PIN + #define X_CS_PIN PC10 + #endif + #ifndef Y_CS_PIN + #define Y_CS_PIN PC11 + #endif + #ifndef Z_CS_PIN + #define Z_CS_PIN PC12 + #endif + #ifndef E0_CS_PIN + #define E0_CS_PIN PC14 + #endif #endif -// TMC2208 or TMC2209 on UART -#if HAS_DRIVER(TMC2208) || HAS_DRIVER(TMC2209) - -// UART Pins (Single pin for both RX & TX) - #ifndef X_PIN_UART - #define X_PIN_UART PC10 - #endif - #ifndef Y_PIN_UART - #define Y_PIN_UART PC11 - #endif - #ifndef Z_PIN_UART - #define Z_PIN_UART PC12 - #endif - #ifndef E0_PIN_UART - #define E0_PIN_UART PC14 - #endif - -// Configurating Pins -#define X_SERIAL_TX_PIN X_PIN_UART -#define X_SERIAL_RX_PIN X_PIN_UART -#define Y_SERIAL_TX_PIN Y_PIN_UART -#define Y_SERIAL_RX_PIN Y_PIN_UART -#define Z_SERIAL_TX_PIN Z_PIN_UART -#define Z_SERIAL_RX_PIN Z_PIN_UART -#define E0_SERIAL_TX_PIN E0_PIN_UART -#define E0_SERIAL_RX_PIN E0_PIN_UART +/** + * TMC2208/TMC2209 stepper drivers + */ +#if HAS_TMC_UART + #define X_SERIAL_TX_PIN PC10 + #define Y_SERIAL_TX_PIN PC11 + #define Z_SERIAL_TX_PIN PC12 + #define E0_SERIAL_TX_PIN PC14 #endif // @@ -225,7 +207,7 @@ #define FORCE_SOFT_SPI // SPI MODE3 - #define LED_PIN EXP1_05_PIN // red pwm + #define LED_PIN EXP1_05_PIN // red pwm //#define LED_PIN EXP1_04_PIN // green //#define LED_PIN EXP1_03_PIN // blue diff --git a/firmware/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/firmware/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index 222698f..37ac753 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -154,6 +154,13 @@ #define LCD_BRIGHTNESS_DEFAULT TFT_BACKLIGHT_PWM #endif +// +// SD Support +// +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + #if SD_CONNECTION_IS(ONBOARD) #define ONBOARD_SDIO #define SD_SS_PIN -1 // else SDSS set to PA4 in M43 (spi_pins.h) diff --git a/firmware/Marlin/src/pins/stm32f1/pins_MD_D301.h b/firmware/Marlin/src/pins/stm32f1/pins_MD_D301.h index 1944599..5d7a2db 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_MD_D301.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_MD_D301.h @@ -120,19 +120,10 @@ // Software serial // #define X_SERIAL_TX_PIN PD6 - #define X_SERIAL_RX_PIN PD6 - #define Y_SERIAL_TX_PIN PC11 - #define Y_SERIAL_RX_PIN PC11 - #define Z_SERIAL_TX_PIN PA8 - #define Z_SERIAL_RX_PIN PA8 - #define E0_SERIAL_TX_PIN PG2 - #define E0_SERIAL_RX_PIN PG2 - #define Z2_SERIAL_TX_PIN PG6 - #define Z2_SERIAL_RX_PIN PG6 // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index b9ab65e..4e9a06f 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -232,7 +232,7 @@ #endif // -// Trinamic TMC2208/2209 UART +// Trinamic TMC2208/TMC2209 UART // #if HAS_TMC_UART /** @@ -261,13 +261,9 @@ //#define TMC_SOFTWARE_SERIAL #if ENABLED(TMC_SOFTWARE_SERIAL) #define X_SERIAL_TX_PIN PF8 // SERVO3_PIN -- XS2 - 6 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PF9 // SERVO2_PIN -- XS2 - 5 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PA1 // SERVO1_PIN -- XS1 - 6 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PC3 // SERVO0_PIN -- XS1 - 5 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define TMC_BAUD_RATE 19200 #endif #endif diff --git a/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index b7aaac1..01be779 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -151,16 +151,9 @@ //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PD5 - #define X_SERIAL_RX_PIN PD5 - #define Y_SERIAL_TX_PIN PD7 - #define Y_SERIAL_RX_PIN PD7 - #define Z_SERIAL_TX_PIN PD4 - #define Z_SERIAL_RX_PIN PD4 - #define E0_SERIAL_TX_PIN PD9 - #define E0_SERIAL_RX_PIN PD9 // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 49f1486..31ef7f5 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -107,16 +107,9 @@ //#define E0_HARDWARE_SERIAL MSerial1 #define X_SERIAL_TX_PIN PC7 - #define X_SERIAL_RX_PIN PC7 - #define Y_SERIAL_TX_PIN PD2 - #define Y_SERIAL_RX_PIN PD2 - #define Z_SERIAL_TX_PIN PC12 - #define Z_SERIAL_RX_PIN PC12 - #define E0_SERIAL_TX_PIN PC11 - #define E0_SERIAL_RX_PIN PC11 // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 357960d..67d60a9 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -155,19 +155,10 @@ //#define E1_HARDWARE_SERIAL MSerial1 #define X_SERIAL_TX_PIN PD5 - #define X_SERIAL_RX_PIN PD5 - #define Y_SERIAL_TX_PIN PD7 - #define Y_SERIAL_RX_PIN PD7 - #define Z_SERIAL_TX_PIN PD4 - #define Z_SERIAL_RX_PIN PD4 - #define E0_SERIAL_TX_PIN PD9 - #define E0_SERIAL_RX_PIN PD9 - #define E1_SERIAL_TX_PIN PD8 - #define E1_SERIAL_RX_PIN PD8 // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h b/firmware/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h index a376feb..5c0c9ae 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_ORCA_3D_SPRINGER.h @@ -137,25 +137,12 @@ //#define E1_HARDWARE_SERIAL MSerial1 #define X_SERIAL_TX_PIN PE3 - #define X_SERIAL_RX_PIN PE3 - #define Y_SERIAL_TX_PIN PE4 - #define Y_SERIAL_RX_PIN PE4 - #define Z_SERIAL_TX_PIN PB3 - #define Z_SERIAL_RX_PIN PB3 - #define E0_SERIAL_TX_PIN PB7 - #define E0_SERIAL_RX_PIN PB7 - #define E1_SERIAL_TX_PIN PD15 - #define E1_SERIAL_RX_PIN PD15 - #define E2_SERIAL_TX_PIN PD11 - #define E2_SERIAL_RX_PIN PD11 - #define E3_SERIAL_TX_PIN PD8 - #define E3_SERIAL_RX_PIN PD8 // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h b/firmware/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h index 8be9f5d..f2b903e 100644 --- a/firmware/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h +++ b/firmware/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h @@ -113,16 +113,9 @@ //#define E0_HARDWARE_SERIAL MSerial1 #define X_SERIAL_TX_PIN PC10 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PC11 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PC12 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PD2 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f4/pins_ARMED.h b/firmware/Marlin/src/pins/stm32f4/pins_ARMED.h index b466122..027faf8 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_ARMED.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_ARMED.h @@ -206,21 +206,10 @@ #if HAS_TMC_UART // TMC2208/TMC2209 stepper drivers #define X_SERIAL_TX_PIN EXT0_PIN - #define X_SERIAL_RX_PIN EXT0_PIN - #define Y_SERIAL_TX_PIN EXT1_PIN - #define Y_SERIAL_RX_PIN EXT1_PIN - #define Z_SERIAL_TX_PIN EXT2_PIN - #define Z_SERIAL_RX_PIN EXT2_PIN - #define E0_SERIAL_TX_PIN EXT3_PIN - #define E0_SERIAL_RX_PIN EXT3_PIN - - #define E1_SERIAL_RX_PIN EXT4_PIN #define E1_SERIAL_TX_PIN EXT4_PIN - - #define Z2_SERIAL_RX_PIN EXT4_PIN #define Z2_SERIAL_TX_PIN EXT4_PIN #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h b/firmware/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h index 502ec19..3fe629a 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h @@ -33,7 +33,7 @@ #define FLASH_EEPROM_EMULATION //#define I2C_EEPROM #endif -//#define E2END 0xFFF // 4K +#define MARLIN_EEPROM_SIZE 0x1000 // 4K #define HAL_TIMER_RATE F_CPU diff --git a/firmware/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h b/firmware/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h index 64cce56..2117820 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h @@ -21,14 +21,12 @@ */ #pragma once -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 #error "STM32F401CCU6 boards support one hotend / E-steppers only." #endif -#include "env_validate.h" - #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "I3DBEE BP_01" #endif diff --git a/firmware/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/firmware/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index 2abbf34..42cc304 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -140,16 +140,9 @@ //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PE2 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PE4 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PD7 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/firmware/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index 1ec7e75..cd198b7 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BTT E3 RRF" @@ -118,23 +116,12 @@ */ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PD6 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PD1 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PD15 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PD11 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #if ENABLED(BTT_E3_RRF_IDEX_BOARD) #define X2_SERIAL_TX_PIN FPC12_PIN // X2UART - #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN FPC6_PIN // E1UART - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #endif // Reduce baud rate to improve software serial reliability @@ -225,33 +212,33 @@ CONTROLLER_WARNING("BTT_E3_RRF", "LCD_FOR_MELZI") - /** LCD_FOR_MELZI display pinout - * - * BTT E3 RRF Display Ribbon - * ------ ------ - * (BEEPER) PE8 | 1 2 | PE9 (BTN_ENC) GND |10 9 | 5V - * (BTN_EN1) PE7 | 3 4 | RESET BEEPER | 8 7 | ESTOP (RESET) - * (BTN_EN2) PB2 5 6 | PE10 (LCD_D4) (BTN_ENC) ENC_BTN | 6 5 | LCD_SCLK (LCD_D4) - * (LCD_RS) PB1 | 7 8 | PE11 (LCD_EN) (BTN_EN2) ENC_A | 4 3 | LCD_DATA (LCD_EN) - * GND | 9 10 | 5V (BTN_EN1) ENC_B | 2 1 | LCD_CS (LCD_RS) - * ------ ------ - * EXP1 LCD - * - * Needs custom cable: - * - * Board Adapter Display Ribbon (coming from display) - * ---------------------------------- - * EXP1-10 ---------- LCD-9 5V - * EXP1-9 ----------- LCD-10 GND - * EXP1-8 ----------- LCD-3 LCD_EN - * EXP1-7 ----------- LCD-1 LCD_RS - * EXP1-6 ----------- LCD-5 LCD_D4 - * EXP1-5 ----------- LCD-4 EN2 - * EXP1-4 ----------- LCD-7 RESET - * EXP1-3 ----------- LCD-2 EN1 - * EXP1-2 ----------- LCD-6 BTN - * EXP1-1 ----------- LCD-8 BEEPER - */ + /** LCD_FOR_MELZI display pinout + * + * BTT E3 RRF Display Ribbon + * ------ ------ + * (BEEPER) PE8 | 1 2 | PE9 (BTN_ENC) GND |10 9 | 5V + * (BTN_EN1) PE7 | 3 4 | RESET BEEPER | 8 7 | ESTOP (RESET) + * (BTN_EN2) PB2 5 6 | PE10 (LCD_D4) (BTN_ENC) ENC_BTN | 6 5 | LCD_SCLK (LCD_D4) + * (LCD_RS) PB1 | 7 8 | PE11 (LCD_EN) (BTN_EN2) ENC_A | 4 3 | LCD_DATA (LCD_EN) + * GND | 9 10 | 5V (BTN_EN1) ENC_B | 2 1 | LCD_CS (LCD_RS) + * ------ ------ + * EXP1 LCD + * + * Needs custom cable: + * + * Board Adapter Display Ribbon (coming from display) + * ---------------------------------- + * EXP1-10 ---------- LCD-9 5V + * EXP1-9 ----------- LCD-10 GND + * EXP1-8 ----------- LCD-3 LCD_EN + * EXP1-7 ----------- LCD-1 LCD_RS + * EXP1-6 ----------- LCD-5 LCD_D4 + * EXP1-5 ----------- LCD-4 EN2 + * EXP1-4 ----------- LCD-7 RESET + * EXP1-3 ----------- LCD-2 EN1 + * EXP1-2 ----------- LCD-6 BTN + * EXP1-1 ----------- LCD-8 BEEPER + */ #endif diff --git a/firmware/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/firmware/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index cd57555..de3e026 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -255,38 +255,17 @@ //#define E7_HARDWARE_SERIAL Serial1 // M5 MOTOR 5 #define X_SERIAL_TX_PIN PC14 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PE1 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PB5 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PG10 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PD4 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN PC12 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN - #if ENABLED(M5_EXTENDER) #define E3_SERIAL_TX_PIN PG4 - #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN - #define E4_SERIAL_TX_PIN PE15 - #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN - #define E5_SERIAL_TX_PIN PE7 - #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN - #define E6_SERIAL_TX_PIN PF15 - #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN - #define E7_SERIAL_TX_PIN PH14 - #define E7_SERIAL_RX_PIN E7_SERIAL_TX_PIN #endif // Reduce baud rate to improve software serial reliability diff --git a/firmware/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_0.h b/firmware/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_0.h index c2f02d0..eaea505 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_0.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_0.h @@ -32,4 +32,6 @@ #define TEMP_0_PIN PF4 // TH0 #endif +#define EXP2_10_PIN PC5 + #include "pins_BTT_OCTOPUS_V1_common.h" diff --git a/firmware/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_1.h b/firmware/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_1.h index daa0e8f..e9de6d8 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_1.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_1.h @@ -32,4 +32,6 @@ #define TEMP_0_PIN PF4 // TH0 #endif +#define EXP2_10_PIN PC5 + #include "pins_BTT_OCTOPUS_V1_common.h" diff --git a/firmware/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/firmware/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index 1bfc6c5..53d84e0 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -288,28 +288,13 @@ //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PC4 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PD11 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PC6 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define Z2_SERIAL_TX_PIN PC7 - #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PF2 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PE4 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN PE1 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN - #define E3_SERIAL_TX_PIN PD3 - #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE @@ -390,7 +375,6 @@ #define E4_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_06_PIN - #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #endif // M2 on Driver Expansion Module @@ -401,7 +385,6 @@ #define E5_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E5_SERIAL_TX_PIN EXP1_04_PIN - #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #endif // M3 on Driver Expansion Module @@ -412,7 +395,6 @@ #define E6_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E6_SERIAL_TX_PIN EXP1_02_PIN - #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN #endif #endif // BTT_MOTOR_EXPANSION @@ -549,13 +531,13 @@ /** * ------- * GND | 9 | | 8 | 3.3V - * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) - * 3.3V | 11 | | 6 | PB14 (ESP-MISO) + * (ESP-CS) PB12 | 10 | | 7 | PC3 (ESP-MOSI) + * -- | 11 | | 6 | PC2 (ESP-MISO) * (ESP-IO0) PD7 | 12 | | 5 | PB13 (ESP-CLK) * (ESP-IO4) PD10 | 13 | | 4 | -- - * -- | 14 | | 3 | PE15 (ESP-EN) + * -- | 14 | | 3 | PG8 (ESP-EN) * (ESP-RX) PD8 | 15 | | 2 | -- - * (ESP-TX) PD9 | 16 | | 1 | PE14 (ESP-RST) + * (ESP-TX) PD9 | 16 | | 1 | PG7 (ESP-RST) * ------- * WIFI */ diff --git a/firmware/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/firmware/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index c751f9b..0b8dd71 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -211,22 +211,11 @@ //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PC13 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PE1 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PD4 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PD1 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN PD6 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE @@ -395,7 +384,6 @@ #define E3_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E3_SERIAL_TX_PIN EXP1_06_PIN - #define E3_SERIAL_RX_PIN EXP1_06_PIN #endif #endif @@ -408,7 +396,6 @@ #define E4_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_04_PIN - #define E4_SERIAL_RX_PIN EXP1_04_PIN #endif #else #define E4_ENABLE_PIN EXP2_07_PIN @@ -423,7 +410,6 @@ #define E5_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E5_SERIAL_TX_PIN EXP1_02_PIN - #define E5_SERIAL_RX_PIN EXP1_02_PIN #endif #else #define E5_ENABLE_PIN EXP2_07_PIN diff --git a/firmware/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/firmware/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 4151418..d0d78ed 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -305,19 +305,10 @@ // Software serial // #define X_SERIAL_TX_PIN PE0 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PD3 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PD0 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PC6 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PD12 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE @@ -400,7 +391,6 @@ #define E2_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E2_SERIAL_TX_PIN EXP1_06_PIN - #define E2_SERIAL_RX_PIN EXP1_06_PIN #endif #endif @@ -413,7 +403,6 @@ #define E3_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E3_SERIAL_TX_PIN EXP1_04_PIN - #define E3_SERIAL_RX_PIN EXP1_04_PIN #endif #else #define E3_ENABLE_PIN EXP2_07_PIN @@ -428,7 +417,6 @@ #define E4_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_02_PIN - #define E4_SERIAL_RX_PIN EXP1_02_PIN #endif #else #define E4_ENABLE_PIN EXP2_07_PIN diff --git a/firmware/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h b/firmware/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h index d1077cd..683f680 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h @@ -139,6 +139,7 @@ #endif #if HAS_TMC_UART + // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/firmware/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/firmware/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index d41a6ea..d63c6ea 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -253,31 +253,14 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PG13 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PG10 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PD5 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PD1 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PA14 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN PG6 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN - #define E3_SERIAL_TX_PIN PG3 - #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN - #define E4_SERIAL_TX_PIN PD10 - #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN - #define E5_SERIAL_TX_PIN PB12 - #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #endif // diff --git a/firmware/Marlin/src/pins/stm32f4/pins_FLY_RRF_E3_V1.h b/firmware/Marlin/src/pins/stm32f4/pins_FLY_RRF_E3_V1.h new file mode 100644 index 0000000..2c61211 --- /dev/null +++ b/firmware/Marlin/src/pins/stm32f4/pins_FLY_RRF_E3_V1.h @@ -0,0 +1,322 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 "Fly RRF E3 V1" +#endif + +#define USES_DIAG_JUMPERS // Requires Mellow/Fly TMC2209 with DIAG disable dip switch + +#if NO_EEPROM_SELECTED + #define FLASH_EEPROM_EMULATION +#endif +#define MARLIN_EEPROM_SIZE 0x1000 // 4K + +// +// Servos +// +#define SERVO0_PIN PB0 // SERVOS + +// +// Limit Switches +// +#define X_STOP_PIN PA2 // X-STOP +#define Y_STOP_PIN PA1 // Y-STOP +#define Z_STOP_PIN PC5 // Z-STOP + +// +// Z Probe must be this pin +// +#define Z_MIN_PROBE_PIN PC4 // PROBE + +// +// Steppers +// + +#define X_ENABLE_PIN PC15 +#define X_STEP_PIN PC13 +#define X_DIR_PIN PC14 + +#define Y_ENABLE_PIN PE5 +#define Y_STEP_PIN PE3 +#define Y_DIR_PIN PE4 + +#define Z_ENABLE_PIN PE1 +#define Z_STEP_PIN PB9 +#define Z_DIR_PIN PE0 + +#define E0_ENABLE_PIN PB5 +#define E0_STEP_PIN PB3 +#define E0_DIR_PIN PB4 + +/** + * TMC2208/TMC2209 stepper drivers + */ +#if HAS_TMC_UART + #define X_SERIAL_TX_PIN PE6 + #define Y_SERIAL_TX_PIN PE2 + #define Z_SERIAL_TX_PIN PB8 + #define E0_SERIAL_TX_PIN PD7 + + // Reduce baud rate to improve software serial reliability + #ifndef TMC_BAUD_RATE + #define TMC_BAUD_RATE 19200 + #endif +#endif // HAS_TMC_UART + +// +// Temperature Sensors +// +#define TEMP_BED_PIN PA3 // Analog Input "TB" +#define TEMP_0_PIN PA4 // Analog Input "TH0" +// +// Heaters / Fans +// +#define HEATER_BED_PIN PA0 // "HB" +#define HEATER_0_PIN PA5 // "HE0" + +#define FAN0_PIN PA7 // "FAN0" + +#ifndef CONTROLLER_FAN_PIN + #define CONTROLLER_FAN_PIN PA6 // "FAN1" +#endif + +/** + * ------ + * (BEEPER) PE12 | 1 2 | PE11 (BTN_ENC) + * (BTN_EN1) PE10 | 3 4 | RESET + * (BTN_EN2) PE9 5 6 | PE8 (LCD_D4) + * (LCD_RS) PE7 | 7 8 | PB1 (LCD_EN) + * GND | 9 10 | 5V + * ------ + * EXP1 + */ +#define EXP1_01_PIN PE12 +#define EXP1_02_PIN PE11 +#define EXP1_03_PIN PE10 +#define EXP1_04_PIN -1 // RESET +#define EXP1_05_PIN PE9 +#define EXP1_06_PIN PE8 +#define EXP1_07_PIN PE7 +#define EXP1_08_PIN PB1 + +#if HAS_WIRED_LCD + + #if ANY(CR10_STOCKDISPLAY, LCD_FOR_MELZI) + + #define BEEPER_PIN EXP1_01_PIN + + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_PIN + + #define LCD_PINS_D4 EXP1_06_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_EN EXP1_08_PIN + + #if ENABLED(LCD_FOR_MELZI) + + CONTROLLER_WARNING("FLY_RRF_E3_V1", "LCD_FOR_MELZI") + + /** LCD_FOR_MELZI display pinout + * + * Fly RRF E3 V1 Display Ribbon + * ------ ------ + * (BEEPER) PE12 | 1 2 | PE11 (BTN_ENC) GND |10 9 | 5V + * (BTN_EN1) PE10 | 3 4 | RESET BEEPER | 8 7 | ESTOP (RESET) + * (BTN_EN2) PE9 5 6 | PE8 (LCD_D4) (BTN_ENC) ENC_BTN | 6 5 | LCD_SCLK (LCD_D4) + * (LCD_RS) PE7 | 7 8 | PB1 (LCD_EN) (BTN_EN2) ENC_A | 4 3 | LCD_DATA (LCD_EN) + * GND | 9 10 | 5V (BTN_EN1) ENC_B | 2 1 | LCD_CS (LCD_RS) + * ------ ------ + * EXP1 LCD + * + * Needs custom cable: + * + * Board Adapter Display Ribbon (coming from display) + * ---------------------------------- + * EXP1-10 ---------- LCD-9 5V + * EXP1-9 ----------- LCD-10 GND + * EXP1-8 ----------- LCD-3 LCD_EN + * EXP1-7 ----------- LCD-1 LCD_RS + * EXP1-6 ----------- LCD-5 LCD_D4 + * EXP1-5 ----------- LCD-4 EN2 + * EXP1-4 ----------- LCD-7 RESET + * EXP1-3 ----------- LCD-2 EN1 + * EXP1-2 ----------- LCD-6 BTN + * EXP1-1 ----------- LCD-8 BEEPER + */ + + #endif + + #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! + + CONTROLLER_WARNING("FLY_RRF_E3_V1", "ZONESTAR_LCD") + + #define LCD_PINS_RS EXP1_06_PIN + #define LCD_PINS_EN 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 PB0 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! + + #elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + + #define BTN_ENC EXP1_02_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_05_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 + + #elif IS_TFTGLCD_PANEL + + #if ENABLED(TFTGLCD_PANEL_SPI) + + CONTROLLER_WARNING("FLY_RRF_E3_V1", "TFTGLCD_PANEL_SPI") + + /** + * TFTGLCD_PANEL_SPI display pinout + * + * Board Display + * ------ ------ + * (SD_DET) PE12 | 1 2 | PE11 (BEEPER) 5V |10 9 | GND + * (MOD_RESET) PE10 | 3 4 | RESET -- | 8 7 | (SD_DET) + * (SD_CS) PE9 5 6 | PE8 (MOSI) 6 5 | -- + * (LCD_CS) PE7 | 7 8 | PB1 (SD_CS) | 4 3 | (LCD_CS) + * GND | 9 10 | 5V (SCK) | 2 1 | (MISO) + * ------ ------ + * EXP1 EXP1 + * + * Needs custom cable: + * + * Board Adapter Display + * ---------------------------------- + * EXP1-10 ---------- EXP1-10 5V + * EXP1-9 ----------- EXP1-9 GND + * SPI1-4 ----------- EXP1-6 MOSI + * EXP1-7 ----------- n/c + * SPI1-3 ----------- EXP1-2 SCK + * EXP1-5 ----------- EXP1-4 SD_CS + * EXP1-4 ----------- n/c + * EXP1-3 ----------- EXP1-3 LCD_CS + * SPI1-1 ----------- EXP1-1 MISO + * EXP1-1 ----------- EXP1-7 SD_DET + */ + + #define TFTGLCD_CS EXP1_03_PIN + + #endif + + #else + #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, LCD_FOR_MELZI, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the FLY_RRF_E3_V1." + #endif + + // Alter timing for graphical display + #if ENABLED(LCD_FOR_MELZI) // LCD_FOR_MELZI default timing is too fast. This works but may be reduced. + #define BOARD_ST7920_DELAY_1 200 + #define BOARD_ST7920_DELAY_2 400 + #define BOARD_ST7920_DELAY_3 1200 + #elif IS_U8GLIB_ST7920 + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 + #endif + +#endif // HAS_WIRED_LCD + +#if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) + + CONTROLLER_WARNING("FLY_RRF_E3_V1", "LCD_FYSETC_TFT81050") + + /** FYSETC TFT TFT81050 display pinout + * + * Board Display + * ------ ------ + * (SD_DET) PE12 | 1 2 | PE11 (BEEPER) 5V |10 9 | GND + * (MOD_RESET) PE10 | 3 4 | RESET RESET | 8 7 | (SD_DET) + * (SD_CS) PE9 5 6 | PE8 (MOSI) | 6 5 | (LCD_CS) + * (LCD_CS) PE7 | 7 8 | PB1 (SD_CS) | 4 3 | (MOD_RESET) + * GND | 9 10 | 5V (SCK) | 2 1 | (MISO) + * ------ ------ + * EXP1 EXP1 + * + * Needs custom cable: + * + * Board Adapter Display + * ---------------------------------- + * EXP1-10 ---------- EXP1-10 5V + * EXP1-9 ----------- EXP1-9 GND + * SPI1-4 ----------- EXP1-6 MOSI + * EXP1-7 ----------- EXP1-5 LCD_CS + * SPI1-3 ----------- EXP1-2 SCK + * EXP1-5 ----------- EXP1-4 SD_CS + * EXP1-4 ----------- EXP1-8 RESET + * EXP1-3 ----------- EXP1-3 MOD_RST + * SPI1-1 ----------- EXP1-1 MISO + * EXP1-1 ----------- EXP1-7 SD_DET + */ + + #define CLCD_SPI_BUS 1 // SPI1 connector + + #define BEEPER_PIN EXP1_02_PIN + + #define CLCD_MOD_RESET EXP1_03_PIN + #define CLCD_SPI_CS EXP1_07_PIN + +#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050 + +// +// SD Support +// + +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#if SD_CONNECTION_IS(ONBOARD) + #define ONBOARD_SDIO // Use SDIO for onboard SD + //#define SDIO_CLOCK 48000000 + #define SD_DETECT_PIN PA15 +#elif SD_CONNECTION_IS(CUSTOM_CABLE) + #error "SD CUSTOM_CABLE is not compatible with Fly RRF E3 V1." +#endif + +// +// WIFI +// + +#if ENABLED(WIFISUPPORT) + #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 PE15 + #define ESP_WIFI_MODULE_ENABLE_PIN -1 // EN is constantly pulled up to 3.3V on this board + #define ESP_WIFI_MODULE_GPIO0_PIN PE13 +#endif diff --git a/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V30.h b/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V30.h index 5eb398c..3da978c 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V30.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V30.h @@ -94,29 +94,17 @@ #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN PB3 #endif - #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PB3 #endif - #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PB3 #endif - #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PB3 #endif - #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #endif // Default TMC slave addresses #ifndef X_SLAVE_ADDRESS diff --git a/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h b/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h index a6035c2..9d9eb1d 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h @@ -39,17 +39,11 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PE8 - #define X_SERIAL_RX_PIN PE8 #define Y_SERIAL_TX_PIN PC4 - #define Y_SERIAL_RX_PIN PC4 #define Z_SERIAL_TX_PIN PD12 - #define Z_SERIAL_RX_PIN PD12 #define E0_SERIAL_TX_PIN PA15 - #define E0_SERIAL_RX_PIN PA15 #define E1_SERIAL_TX_PIN PC5 - #define E1_SERIAL_RX_PIN PC5 #define E2_SERIAL_TX_PIN PE0 - #define E2_SERIAL_RX_PIN PE0 #endif // diff --git a/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h b/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h index 368f464..24055cb 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h @@ -76,28 +76,13 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PE7 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define X2_SERIAL_TX_PIN PA15 - #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PE15 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PD10 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define Z2_SERIAL_TX_PIN PD11 - #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PD7 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PC14 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN PC15 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #endif // diff --git a/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h b/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h index 4a19603..2164223 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h @@ -144,37 +144,20 @@ // TMC2208/TMC2209 stepper drivers // #define X_SERIAL_TX_PIN PD2 - #define X_SERIAL_RX_PIN PD2 - #define X2_SERIAL_TX_PIN PE15 - #define X2_SERIAL_RX_PIN PE15 - #define Y_SERIAL_TX_PIN PD8 - #define Y_SERIAL_RX_PIN PD8 - #define Z_SERIAL_TX_PIN PD7 - #define Z_SERIAL_RX_PIN PD7 - #define Z2_SERIAL_TX_PIN PC14 - #define Z2_SERIAL_RX_PIN PC14 - #define E0_SERIAL_TX_PIN PC15 - #define E0_SERIAL_RX_PIN PC15 - #define E1_SERIAL_TX_PIN PG3 - #define E1_SERIAL_RX_PIN PG3 - #define E2_SERIAL_TX_PIN PD9 - #define E2_SERIAL_RX_PIN PD9 - #define E3_SERIAL_TX_PIN PF5 - #define E3_SERIAL_RX_PIN PF5 - #define E4_SERIAL_TX_PIN PG11 - #define E4_SERIAL_RX_PIN PG11 // Reduce baud rate to improve software serial reliability - #define TMC_BAUD_RATE 19200 + #ifndef TMC_BAUD_RATE + #define TMC_BAUD_RATE 19200 + #endif #endif // diff --git a/firmware/Marlin/src/pins/stm32f4/pins_I3DBEEZ9.h b/firmware/Marlin/src/pins/stm32f4/pins_I3DBEEZ9.h index 6cd09d3..79599d5 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_I3DBEEZ9.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_I3DBEEZ9.h @@ -253,31 +253,14 @@ //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PA15 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PB8 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PB9 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PB3 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PG15 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN PG12 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN - #define E3_SERIAL_TX_PIN PE2 - #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN - #define E4_SERIAL_TX_PIN PG11 - #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN - #define E5_SERIAL_TX_PIN PD2 - #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 @@ -443,7 +426,6 @@ #define E6_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E6_SERIAL_TX_PIN EXP1_06_PIN - #define E6_SERIAL_RX_PIN EXP1_06_PIN #endif #endif @@ -456,7 +438,6 @@ #define E7_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E7_SERIAL_TX_PIN EXP1_04_PIN - #define E7_SERIAL_RX_PIN EXP1_04_PIN #endif #else #define E7_ENABLE_PIN EXP2_07_PIN @@ -471,7 +452,6 @@ #define E8_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E8_SERIAL_TX_PIN EXP1_02_PIN - #define E8_SERIAL_RX_PIN EXP1_02_PIN #endif #else #define E8_ENABLE_PIN EXP2_07_PIN diff --git a/firmware/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/firmware/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index 879c318..4b6dc89 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -114,50 +114,31 @@ //#endif #if HAS_TMC_UART - /** - * TMC2208/TMC2209 stepper drivers - */ + // + // TMC2208/TMC2209 stepper drivers + // #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN PB2 #endif - #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE2 #endif - #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PE3 #endif - #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PE4 #endif - #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #endif #ifndef E1_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PE1 #endif - #ifndef E1_SERIAL_RX_PIN - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #endif // Ex-motor can be any... X2/Y2/Z2 or E2 #ifndef EX_SERIAL_TX_PIN #define EX_SERIAL_TX_PIN PE0 #endif - #ifndef EX_SERIAL_RX_PIN - #define EX_SERIAL_RX_PIN EX_SERIAL_TX_PIN - #endif - //#define Z2_SERIAL_RX_PIN EX_SERIAL_RX_PIN //#define Z2_SERIAL_TX_PIN EX_SERIAL_TX_PIN - //#define E2_SERIAL_RX_PIN EX_SERIAL_RX_PIN //#define E2_SERIAL_TX_PIN EX_SERIAL_TX_PIN + // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 diff --git a/firmware/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h b/firmware/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h index 248fc51..f24e61c 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Mellow Fly E3 V2" @@ -204,19 +202,10 @@ // Software serial // #define X_SERIAL_TX_PIN PC15 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PB6 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PD7 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PD4 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PD0 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE @@ -297,7 +286,6 @@ #define E2_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E2_SERIAL_TX_PIN EXP1_06_PIN - #define E2_SERIAL_RX_PIN EXP1_06_PIN #endif #endif @@ -310,7 +298,6 @@ #define E3_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E3_SERIAL_TX_PIN EXP1_04_PIN - #define E3_SERIAL_RX_PIN EXP1_04_PIN #endif #else #define E3_ENABLE_PIN EXP2_07_PIN @@ -325,7 +312,6 @@ #define E4_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_02_PIN - #define E4_SERIAL_RX_PIN EXP1_02_PIN #endif #else #define E4_ENABLE_PIN EXP2_07_PIN diff --git a/firmware/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h b/firmware/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h index b832a14..b15c7d7 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h @@ -158,28 +158,13 @@ // No Hardware serial for steppers // #define X_SERIAL_TX_PIN PE6 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PB7 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PB3 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PD4 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN PD0 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN - #define E3_SERIAL_TX_PIN PD15 - #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN - #define E4_SERIAL_TX_PIN PD11 - #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h b/firmware/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h index 050c8f2..a3f6571 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h @@ -100,19 +100,10 @@ // No Hardware serial for steppers // #define X_SERIAL_TX_PIN PD5 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PD7 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PD4 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PD9 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PD8 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/firmware/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index 5af3cf5..e8b9938 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -152,19 +152,10 @@ //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PD5 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PD7 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PD4 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PD9 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PD8 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h b/firmware/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h index b20477a..a0b088d 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -197,25 +197,12 @@ // #if HAS_TMC_UART #define X_SERIAL_TX_PIN PE6 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PB7 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PB3 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PD4 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN PD0 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN - #define E3_SERIAL_TX_PIN PD15 - #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h b/firmware/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h index cf40033..010ae0e 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h @@ -123,22 +123,11 @@ #elif HAS_TMC_UART #define X_SERIAL_TX_PIN PD8 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PB12 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PE8 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define I_SERIAL_TX_PIN PC5 - #define I_SERIAL_RX_PIN I_SERIAL_TX_PIN - #define J_SERIAL_TX_PIN PE12 - #define J_SERIAL_RX_PIN J_SERIAL_TX_PIN - #define K_SERIAL_TX_PIN PA2 - #define K_SERIAL_RX_PIN K_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h b/firmware/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h index 9c374ea..0f27578 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h @@ -123,22 +123,11 @@ #elif HAS_TMC_UART #define X_SERIAL_TX_PIN PD8 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PB12 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PE8 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define I_SERIAL_TX_PIN PC5 - #define I_SERIAL_RX_PIN I_SERIAL_TX_PIN - #define J_SERIAL_TX_PIN PE12 - #define J_SERIAL_RX_PIN J_SERIAL_TX_PIN - #define K_SERIAL_TX_PIN PA2 - #define K_SERIAL_RX_PIN K_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h b/firmware/Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h index 2f3e121..1712b24 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h @@ -48,20 +48,9 @@ // TMC2208/TMC2209 Software Serial // #define X_SERIAL_TX_PIN PC14 // BTT Rumba32 only uses 1 pin for UART - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PE4 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PE0 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PC13 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PD5 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN PD1 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #endif diff --git a/firmware/Marlin/src/pins/stm32f4/pins_XTLW_CLIMBER_8TH.h b/firmware/Marlin/src/pins/stm32f4/pins_XTLW_CLIMBER_8TH.h index 2ce7548..9ab3331 100644 --- a/firmware/Marlin/src/pins/stm32f4/pins_XTLW_CLIMBER_8TH.h +++ b/firmware/Marlin/src/pins/stm32f4/pins_XTLW_CLIMBER_8TH.h @@ -146,22 +146,11 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PC15 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define X2_SERIAL_TX_PIN PA8 - #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PB6 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PD5 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PD1 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PE9 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/firmware/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h b/firmware/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h index d9c542c..4684086 100644 --- a/firmware/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h +++ b/firmware/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h @@ -130,16 +130,9 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PB9 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PE12 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PG9 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif // diff --git a/firmware/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h b/firmware/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h index ffa644c..2d6cdb7 100644 --- a/firmware/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h +++ b/firmware/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h @@ -97,7 +97,6 @@ //#define TMC_BAUD_RATE 250000 #define E0_SERIAL_TX_PIN PA15 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h b/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h index 3489fe5..ee7ea42 100644 --- a/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h +++ b/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h @@ -155,19 +155,10 @@ #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 #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h b/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h index b7c5a8c..4c4a6ca 100644 --- a/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h +++ b/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h @@ -124,16 +124,9 @@ #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 #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h b/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h index 8d75638..90379e0 100644 --- a/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h +++ b/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h @@ -141,19 +141,10 @@ #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 #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h b/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h index b81dbe0..0b10511 100644 --- a/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h +++ b/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h @@ -55,13 +55,8 @@ #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 #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h b/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h index 36aa389..6507182 100644 --- a/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h +++ b/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h @@ -54,13 +54,8 @@ #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 #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h b/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h index 327c5f1..e007292 100644 --- a/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/firmware/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -177,19 +177,10 @@ #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 #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32g0/pins_BTT_SKRAT_V1_0.h b/firmware/Marlin/src/pins/stm32g0/pins_BTT_SKRAT_V1_0.h new file mode 100644 index 0000000..cbdb8ed --- /dev/null +++ b/firmware/Marlin/src/pins/stm32g0/pins_BTT_SKRAT_V1_0.h @@ -0,0 +1,557 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2024 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 + +/** + * BigTreeTech SKRat 1.0 pin assignments + * Schematic: https://github.com/bigtreetech/SKRat/blob/master/Hardware/BTT_SKRat_V1.0_SCH.pdf + * Pins: https://github.com/bigtreetech/SKRat/blob/master/Hardware/BIGTREETECH%20SKRat%20V1.0-Pin.pdf + */ + +#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 SKRat V1.0" +#endif + +#define USES_DIAG_JUMPERS + +// Ignore temp readings during development. +//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 + +#define LED_PIN PE2 + +// +// EEPROM +// +#if ANY(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 PE6 // SERVOS + +// +// Probe enable +// +#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) + #define PROBE_ENABLE_PIN SERVO0_PIN +#endif + +// +// Trinamic Stallguard pins +// +#define X_DIAG_PIN PB5 // X-STOP +#define Y_DIAG_PIN PC1 // Y-STOP +#define Z_DIAG_PIN PC0 // Z-STOP +#define E0_DIAG_PIN PF4 // E0_DET +#define E1_DIAG_PIN PF5 // E1_DET + +// +// Limit Switches +// +#ifdef X_STALL_SENSITIVITY + #define X_STOP_PIN X_DIAG_PIN + #if X_HOME_TO_MIN + #define X_MAX_PIN PF4 // E0_DET + #else + #define X_MIN_PIN PF4 // E0_DET + #endif +#elif ENABLED(X_DUAL_ENDSTOPS) + #ifndef X_MIN_PIN + #define X_MIN_PIN PB5 // X-STOP + #endif + #ifndef X_MAX_PIN + #define X_MAX_PIN PF4 // E0_DET + #endif +#else + #define X_STOP_PIN PB5 // X-STOP +#endif + +#ifdef Y_STALL_SENSITIVITY + #define Y_STOP_PIN Y_DIAG_PIN + #if Y_HOME_TO_MIN + #define Y_MAX_PIN PF5 // E1_DET + #else + #define Y_MIN_PIN PF5 // E1_DET + #endif +#elif ENABLED(Y_DUAL_ENDSTOPS) + #ifndef Y_MIN_PIN + #define Y_MIN_PIN PC1 // Y-STOP + #endif + #ifndef Y_MAX_PIN + #define Y_MAX_PIN PF5 // E1_DET + #endif +#else + #define Y_STOP_PIN PC1 // Y-STOP +#endif + +#ifdef Z_STALL_SENSITIVITY + #define Z_STOP_PIN Z_DIAG_PIN + #if Z_HOME_TO_MIN + #define Z_MAX_PIN PE12 // PWR_DET + #else + #define Z_MIN_PIN PE12 // PWR_DET + #endif +#elif ENABLED(Z_MULTI_ENDSTOPS) + #ifndef Z_MIN_PIN + #define Z_MIN_PIN PC0 // Z-STOP + #endif + #ifndef Z_MAX_PIN + #define Z_MAX_PIN PE12 // PWR_DET + #endif +#else + #ifndef Z_STOP_PIN + #define Z_STOP_PIN PC0 // Z-STOP + #endif +#endif + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PE5 // Probe +#endif + +// +// Filament Runout Sensor +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN PF4 // E0_DET +#endif +#ifndef FIL_RUNOUT2_PIN + #define FIL_RUNOUT2_PIN PF5 // E1_DET +#endif + +// +// Power Supply Control +// +#ifndef PS_ON_PIN + #define PS_ON_PIN PF6 // PS_ON +#endif + +// +// Power-loss Detection +// +#ifndef POWER_LOSS_PIN + #define POWER_LOSS_PIN PE12 // PWR_DET +#endif + +// +// Steppers +// +#define X_STEP_PIN PF9 // XM +#define X_DIR_PIN PD7 +#define X_ENABLE_PIN PD6 +#ifndef X_CS_PIN + #define X_CS_PIN PF10 +#endif + +#define Y_STEP_PIN PD3 // YM +#define Y_DIR_PIN PD2 +#define Y_ENABLE_PIN PD5 +#ifndef Y_CS_PIN + #define Y_CS_PIN PD4 +#endif + +#define Z_STEP_PIN PA15 // ZMA / ZMB +#define Z_DIR_PIN PF8 +#define Z_ENABLE_PIN PC9 +#ifndef Z_CS_PIN + #define Z_CS_PIN PC8 +#endif + +#define E0_STEP_PIN PC7 // E0M +#define E0_DIR_PIN PC6 +#define E0_ENABLE_PIN PD9 +#ifndef E0_CS_PIN + #define E0_CS_PIN PD8 +#endif + +#define E1_STEP_PIN PB10 // E1M +#define E1_DIR_PIN PE15 +#define E1_ENABLE_PIN PA8 +#ifndef E1_CS_PIN + #define E1_CS_PIN PB11 +#endif + +// +// Temperature Sensors +// +#if TEMP_SENSOR_0_IS_MAX31865 + #define TEMP_0_CS_PIN PA4 // Max31865 CS + #define TEMP_0_SCK_PIN PA5 + #define TEMP_0_MISO_PIN PA6 + #define TEMP_0_MOSI_PIN PA7 + #define SOFTWARE_SPI // Max31865 and LCD SD share a set of SPIs, Set SD to softwareSPI for Max31865 + #define FORCE_SOFT_SPI +#else + #ifndef TEMP_0_PIN + #define TEMP_0_PIN PA3 // TH0 + #endif +#endif +#ifndef TEMP_1_PIN + #define TEMP_1_PIN PA2 // TH1 +#endif +#ifndef TEMP_BED_PIN + #define TEMP_BED_PIN PB2 // TB +#endif +#ifndef TEMP_SENSOR_PROBE + #define TEMP_PROBE_PIN PA1 // TH2 +#endif +#ifndef TEMP_SENSOR_CHAMBER + #define TEMP_CHAMBER_PIN PA0 // TH3 +#endif + +// +// Heaters / Fans +// +#ifndef HEATER_0_PIN + #define HEATER_0_PIN PE11 // HE0 +#endif +#ifndef HEATER_1_PIN + #define HEATER_1_PIN PE13 // HE1 +#endif +#ifndef HEATER_BED_PIN + #define HEATER_BED_PIN PB3 // HB +#endif +#ifndef FAN0_PIN + #define FAN0_PIN PD15 // FAN0 + //#define FAN0_PIN PE9 // "Four-Wire FAN0" +#endif + +#if HAS_CUTTER + #ifndef SPINDLE_LASER_PWM_PIN + #define SPINDLE_LASER_PWM_PIN PD13 // FAN2 + #endif + #ifndef SPINDLE_LASER_ENA_PIN + #define SPINDLE_LASER_ENA_PIN PD14 // FAN1 + #endif +#else + #ifndef FAN1_PIN + #define FAN1_PIN PD14 // FAN1 + //#define FAN1_PIN PE14 // "Four-Wire FAN1" + #endif + #ifndef FAN2_PIN + #define FAN2_PIN PD13 // FAN2 + #endif + #ifndef FAN3_PIN + #define FAN3_PIN PD12 // FAN3 + #endif + + #ifndef E0_FAN_TACHO_PIN + //#define E0_FAN_TACHO_PIN PD10 // "Four-Wire FAN0" + #endif + #ifndef E1_FAN_TACHO_PIN + //#define E1_FAN_TACHO_PIN PA11 // "Four-Wire FAN1" + #endif + +#endif // SPINDLE_FEATURE || LASER_FEATURE + +// +// Default pins for TMC software SPI +// +#if HAS_TMC_SPI + #define TMC_USE_SW_SPI + #ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PC12 + #endif + #ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PC11 + #endif + #ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PC10 + #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 Y_HARDWARE_SERIAL Serial1 + //#define Z_HARDWARE_SERIAL Serial1 + //#define E0_HARDWARE_SERIAL Serial1 + //#define E1_HARDWARE_SERIAL Serial1 + + // + // Software serial + // + #define X_SERIAL_TX_PIN PF10 + #define Y_SERIAL_TX_PIN PD4 + #define Z_SERIAL_TX_PIN PC8 + #define E0_SERIAL_TX_PIN PD8 + #define E1_SERIAL_TX_PIN PB11 + + // Reduce baud rate to improve software serial reliability + #ifndef TMC_BAUD_RATE + #define TMC_BAUD_RATE 19200 + #endif + +#endif + +// +// SD Support +// +#ifndef SDCARD_CONNECTION + #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) + #define SDCARD_CONNECTION LCD + #else + #define SDCARD_CONNECTION ONBOARD + #endif +#endif + +/** + * ------ ------ + * (BEEPER) PC13 | 1 2 | PF3 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) + * (LCD_EN) PC3 | 3 4 | PC2 (LCD_RS) (BTN_EN1) PE7 | 3 4 | PF7 (SD_SS) + * (LCD_D4) PB1 | 5 6 PB0 (LCD_D5) (BTN_EN2) PE8 | 5 6 PA7 (MOSI) + * (LCD_D6) PC5 | 7 8 | PC4 (LCD_D7) (SD_DETECT) PE10 | 7 8 | RESET + * GND | 9 10 | 5V GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_01_PIN PC13 +#define EXP1_02_PIN PF3 +#define EXP1_03_PIN PC3 +#define EXP1_04_PIN PC2 +#define EXP1_05_PIN PB1 +#define EXP1_06_PIN PB0 +#define EXP1_07_PIN PC5 +#define EXP1_08_PIN PC4 + +#define EXP2_01_PIN PA6 +#define EXP2_02_PIN PA5 +#define EXP2_03_PIN PE7 +#define EXP2_04_PIN PF7 +#define EXP2_05_PIN PE8 +#define EXP2_06_PIN PA7 +#define EXP2_07_PIN PE10 +#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) + #define SD_DETECT_PIN PE3 +#elif SD_CONNECTION_IS(LCD) && (ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL) + #define SD_DETECT_PIN EXP1_01_PIN + #define SD_SS_PIN EXP1_05_PIN +#elif SD_CONNECTION_IS(CUSTOM_CABLE) + #error "No custom SD drive cable defined for this board." +#endif + +#define ONBOARD_SPI_DEVICE 1 // SPI1 -> used only by HAL/STM32F1... +#define ONBOARD_SD_CS_PIN PB8 // Chip select for "System" SD card + +#define ENABLE_SPI1 +#define SDSS ONBOARD_SD_CS_PIN +#define SD_SS_PIN ONBOARD_SD_CS_PIN +#define SD_SCK_PIN PA5 +#define SD_MISO_PIN PA6 +#define SD_MOSI_PIN PA7 + +#if ENABLED(BTT_MOTOR_EXPANSION) + /** ------ ------ + * M3DIAG | 1 2 | M3RX M3STP | 1 2 | M3DIR + * M2DIAG | 3 4 | M2RX M2STP | 3 4 | M2DIR + * M1DIAG 5 6 | M1RX M1DIR 5 6 | M1STP + * M3EN | 7 8 | M2EN M1EN | 7 8 | -- + * GND | 9 10 | -- GND | 9 10 | -- + * ------ ------ + * EXP1 EXP2 + * + * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN + */ + + // M1 on Driver Expansion Module + #define E2_STEP_PIN EXP2_06_PIN + #define E2_DIR_PIN EXP2_05_PIN + #define E2_ENABLE_PIN EXP2_07_PIN + #if !EXP_MOT_USE_EXP2_ONLY + #define E2_DIAG_PIN EXP1_05_PIN + #define E2_CS_PIN EXP1_06_PIN + #if HAS_TMC_UART + #define E2_SERIAL_TX_PIN EXP1_06_PIN + #endif + #endif + + // M2 on Driver Expansion Module + #define E3_STEP_PIN EXP2_03_PIN + #define E3_DIR_PIN EXP2_04_PIN + #if !EXP_MOT_USE_EXP2_ONLY + #define E3_ENABLE_PIN EXP1_08_PIN + #define E3_DIAG_PIN EXP1_03_PIN + #define E3_CS_PIN EXP1_04_PIN + #if HAS_TMC_UART + #define E3_SERIAL_TX_PIN EXP1_04_PIN + #endif + #else + #define E3_ENABLE_PIN EXP2_07_PIN + #endif + + // M3 on Driver Expansion Module + #define E4_STEP_PIN EXP2_01_PIN + #define E4_DIR_PIN EXP2_02_PIN + #if !EXP_MOT_USE_EXP2_ONLY + #define E4_ENABLE_PIN EXP1_07_PIN + #define E4_DIAG_PIN EXP1_01_PIN + #define E4_CS_PIN EXP1_02_PIN + #if HAS_TMC_UART + #define E4_SERIAL_TX_PIN EXP1_02_PIN + #endif + #else + #define E4_ENABLE_PIN EXP2_07_PIN + #endif + +#endif // BTT_MOTOR_EXPANSION + +// +// 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_EN 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_EN 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 LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. + #if ANY(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 + +#if HAS_SPI_TFT + // + // e.g., BTT_TFT35_SPI_V1_0 (480x320, 3.5", SPI Stock Display with Rotary Encoder in BIQU B1 SE) + // + #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 BOARD_NEOPIXEL_PIN + #define BOARD_NEOPIXEL_PIN PE4 // RGB +#endif diff --git a/firmware/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h b/firmware/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h index 13bb1b7..9f67c7a 100644 --- a/firmware/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h +++ b/firmware/Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h @@ -426,7 +426,6 @@ #define E4_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_06_PIN - #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #endif // M2 on Driver Expansion Module @@ -437,7 +436,6 @@ #define E5_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E5_SERIAL_TX_PIN EXP1_04_PIN - #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #endif // M3 on Driver Expansion Module @@ -448,7 +446,6 @@ #define E6_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E6_SERIAL_TX_PIN EXP1_02_PIN - #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN #endif #endif // BTT_MOTOR_EXPANSION diff --git a/firmware/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h b/firmware/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h index 2c5c4bc..4966685 100644 --- a/firmware/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h +++ b/firmware/Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h @@ -315,28 +315,13 @@ //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PC13 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PB9 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define Z2_SERIAL_TX_PIN PB5 - #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PG14 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PG10 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN PD5 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN - #define E3_SERIAL_TX_PIN PC6 - #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/firmware/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h index 3ceb956..a6948cd 100644 --- a/firmware/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/firmware/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -301,34 +301,17 @@ //#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 E4_SERIAL_RX_PIN E3_SERIAL_RX_PIN #define E5_SERIAL_TX_PIN PG7 - #define E5_SERIAL_RX_PIN E3_SERIAL_TX_PIN + #define E5_SERIAL_RX_PIN E3_SERIAL_RX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE diff --git a/firmware/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h b/firmware/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h index 113b7ea..45ca3c5 100644 --- a/firmware/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h +++ b/firmware/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h @@ -293,28 +293,13 @@ //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PC4 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PD11 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PC6 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define Z2_SERIAL_TX_PIN PC7 - #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PF2 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PE4 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN PE1 - #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN - #define E3_SERIAL_TX_PIN PD3 - #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE @@ -395,7 +380,6 @@ #define E4_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_06_PIN - #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #endif // M2 on Driver Expansion Module @@ -406,7 +390,6 @@ #define E5_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E5_SERIAL_TX_PIN EXP1_04_PIN - #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #endif // M3 on Driver Expansion Module @@ -417,7 +400,6 @@ #define E6_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E6_SERIAL_TX_PIN EXP1_02_PIN - #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN #endif #endif // BTT_MOTOR_EXPANSION diff --git a/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h b/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h index 7314ccc..f6f8442 100644 --- a/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h +++ b/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h @@ -159,28 +159,18 @@ //#define E7_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PG10 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PD4 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #ifdef BX_SWAP_ZM_E1M #define Z_SERIAL_TX_PIN PC8 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #else #define Z_SERIAL_TX_PIN PD5 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #endif #define E0_SERIAL_TX_PIN PI8 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #ifdef BX_SWAP_ZM_E1M #define E1_SERIAL_TX_PIN PD5 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #else #define E1_SERIAL_TX_PIN PC8 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #endif // Reduce baud rate to improve software serial reliability diff --git a/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0.h b/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0.h index d835486..47c2d1c 100644 --- a/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0.h +++ b/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0.h @@ -21,6 +21,10 @@ */ #pragma once +/** + * BigTreeTech SKR 3 (STM32H743VI / STM32H723VG) + */ + #define BOARD_INFO_NAME "BTT SKR V3" #include "pins_BTT_SKR_V3_0_common.h" diff --git a/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_EZ.h b/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_EZ.h index 003f20f..933ecf2 100644 --- a/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_EZ.h +++ b/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_EZ.h @@ -21,6 +21,10 @@ */ #pragma once +/** + * BigTreeTech SKR 3 EZ (STM32H743VI / STM32H723VG) + */ + #define BOARD_INFO_NAME "BTT SKR V3 EZ" #include "pins_BTT_SKR_V3_0_common.h" diff --git a/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h index b679921..fce16ae 100644 --- a/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h +++ b/firmware/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h @@ -298,19 +298,10 @@ // Software serial // #define X_SERIAL_TX_PIN PD5 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN - #define Y_SERIAL_TX_PIN PD0 - #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN - #define Z_SERIAL_TX_PIN PE1 - #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PC6 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN - #define E1_SERIAL_TX_PIN PD12 - #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE @@ -394,7 +385,6 @@ #define E2_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E2_SERIAL_TX_PIN EXP1_06_PIN - #define E2_SERIAL_RX_PIN EXP1_06_PIN #endif #endif @@ -407,7 +397,6 @@ #define E3_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E3_SERIAL_TX_PIN EXP1_04_PIN - #define E3_SERIAL_RX_PIN EXP1_04_PIN #endif #else #define E3_ENABLE_PIN EXP2_07_PIN @@ -422,7 +411,6 @@ #define E4_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_02_PIN - #define E4_SERIAL_RX_PIN EXP1_02_PIN #endif #else #define E4_ENABLE_PIN EXP2_07_PIN diff --git a/firmware/Marlin/src/sd/cardreader.cpp b/firmware/Marlin/src/sd/cardreader.cpp index 56daa36..facd2d8 100644 --- a/firmware/Marlin/src/sd/cardreader.cpp +++ b/firmware/Marlin/src/sd/cardreader.cpp @@ -38,6 +38,8 @@ #if ENABLED(DWIN_CREALITY_LCD) #include "../lcd/e3v2/creality/dwin.h" +#elif ENABLED(SOVOL_SV06_RTS) + #include "../lcd/sovol_rts/sovol_rts.h" #endif #include "../module/planner.h" // for synchronize @@ -1459,6 +1461,7 @@ void CardReader::fileHasFinished() { if (jobRecoverFileExists()) { recovery.init(); removeFile(recovery.filename); + TERN_(SOVOL_SV06_RTS, poweroff_continue = false); #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) SERIAL_ECHOLN(F("Power-loss file delete"), jobRecoverFileExists() ? F(" failed.") : F("d.")); #endif diff --git a/firmware/README.md b/firmware/README.md index 2b5d817..160c288 100644 --- a/firmware/README.md +++ b/firmware/README.md @@ -9,32 +9,33 @@ CI Status GitHub Sponsors
+ Follow marlinfw.org on Bluesky Follow MarlinFirmware on Mastodon

-Additional documentation can be found at the [Marlin Home Page](https://marlinfw.org/). +Additional documentation can be found at the [Marlin Home Page](//marlinfw.org/). Please test this firmware and let us know if it misbehaves in any way. Volunteers are standing by! ## Marlin 2.1 Bugfix Branch __Not for production use. Use with caution!__ -Marlin 2.1 takes this popular RepRap firmware to the next level by adding support for much faster 32-bit and ARM-based boards while improving support for 8-bit AVR boards. Read about Marlin's decision to use a "Hardware Abstraction Layer" below. +Marlin 2.1 continues to support both 32-bit ARM and 8-bit AVR boards while adding support for up to 9 coordinated axes and to up to 8 extruders. This branch is for patches to the latest 2.1.x release version. Periodically this branch will form the basis for the next minor 2.1.x release. -Download earlier versions of Marlin on the [Releases page](https://github.com/MarlinFirmware/Marlin/releases). +Download earlier versions of Marlin on the [Releases page](//github.com/MarlinFirmware/Marlin/releases). ## Example Configurations -Before you can build Marlin for your machine you'll need a configuration for your specific hardware. Upon request, your vendor will be happy to provide you with the complete source code and configurations for your machine, but you'll need to get updated configuration files if you want to install a newer version of Marlin. Fortunately, Marlin users have contributed dozens of tested configurations to get you started. Visit the [MarlinFirmware/Configurations](https://github.com/MarlinFirmware/Configurations) repository to find the right configuration for your hardware. +Before you can build Marlin for your machine you'll need a configuration for your specific hardware. Upon request, your vendor will be happy to provide you with the complete source code and configurations for your machine, but you'll need to get updated configuration files if you want to install a newer version of Marlin. Fortunately, Marlin users have contributed dozens of tested configurations to get you started. Visit the [MarlinFirmware/Configurations](//github.com/MarlinFirmware/Configurations) repository to find the right configuration for your hardware. ## Building Marlin 2.1 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) +- The free [Visual Studio Code](//code.visualstudio.com/download) using the [Auto Build Marlin](//marlinfw.org/docs/basics/auto_build_marlin.html) extension. +- The free [Arduino IDE](//www.arduino.cc/en/main/software) : See [Building Marlin with Arduino](//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. @@ -53,43 +54,48 @@ Every new HAL opens up a world of hardware. At this time we need HALs for RP2040 Platform|MCU|Example Boards --------|---|------- - [Arduino AVR](https://www.arduino.cc/)|ATmega|RAMPS, Melzi, RAMBo - [Teensy++ 2.0](https://www.microchip.com/en-us/product/AT90USB1286)|AT90USB1286|Printrboard - [Arduino Due](https://www.arduino.cc/en/Guide/ArduinoDue)|SAM3X8E|RAMPS-FD, RADDS, RAMPS4DUE - [ESP32](https://github.com/espressif/arduino-esp32)|ESP32|FYSETC E4, E4d@BOX, MRR - [LPC1768](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/512-kb-flash-64-kb-sram-ethernet-usb-lqfp100-package:LPC1768FBD100)|ARM® Cortex-M3|MKS SBASE, Re-ARM, Selena Compact - [LPC1769](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/512-kb-flash-64-kb-sram-ethernet-usb-lqfp100-package:LPC1769FBD100)|ARM® Cortex-M3|Smoothieboard, Azteeg X5 mini, TH3D EZBoard - [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html)|ARM® Cortex-M3|Malyan M200, GTM32 Pro, MKS Robin, BTT SKR Mini - [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)|ARM® Cortex-M4|ARMED, Rumba32, SKR Pro, Lerdge, FYSETC S6, Artillery Ruby - [STM32F7x6](https://www.st.com/en/microcontrollers-microprocessors/stm32f7x6.html)|ARM® Cortex-M7|The Borg, RemRam V1 - [STM32G0B1RET6](https://www.st.com/en/microcontrollers-microprocessors/stm32g0x1.html)|ARM® Cortex-M0+|BigTreeTech SKR mini E3 V3.0 - [STM32H743xIT6](https://www.st.com/en/microcontrollers-microprocessors/stm32h743-753.html)|ARM® Cortex-M7|BigTreeTech SKR V3.0, SKR EZ V3.0, SKR SE BX V2.0/V3.0 - [SAMD51P20A](https://www.adafruit.com/product/4064)|ARM® Cortex-M4|Adafruit Grand Central M4 - [Teensy 3.5](https://www.pjrc.com/store/teensy35.html)|ARM® Cortex-M4| - [Teensy 3.6](https://www.pjrc.com/store/teensy36.html)|ARM® Cortex-M4| - [Teensy 4.0](https://www.pjrc.com/store/teensy40.html)|ARM® Cortex-M7| - [Teensy 4.1](https://www.pjrc.com/store/teensy41.html)|ARM® Cortex-M7| - Linux Native|x86/ARM/etc.|Raspberry Pi - [All supported boards](https://marlinfw.org/docs/hardware/boards.html#boards-list)|All platforms|All boards + [Arduino AVR](//www.arduino.cc/)|ATmega|RAMPS, Melzi, RAMBo + [Teensy++ 2.0](//www.microchip.com/en-us/product/AT90USB1286)|AT90USB1286|Printrboard + [Arduino Due](//www.arduino.cc/en/Guide/ArduinoDue)|SAM3X8E|RAMPS-FD, RADDS, RAMPS4DUE + [ESP32](//github.com/espressif/arduino-esp32)|ESP32|FYSETC E4, E4d@BOX, MRR + [HC32](//www.huazhoucn.com/)|HC32|Ender-2 Pro, Voxelab Aquila + [LPC1768](//www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/512-kb-flash-64-kb-sram-ethernet-usb-lqfp100-package:LPC1768FBD100)|ARM® Cortex-M3|MKS SBASE, Re-ARM, Selena Compact + [LPC1769](//www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/512-kb-flash-64-kb-sram-ethernet-usb-lqfp100-package:LPC1769FBD100)|ARM® Cortex-M3|Smoothieboard, Azteeg X5 mini, TH3D EZBoard + [STM32F103](//www.st.com/en/microcontrollers-microprocessors/stm32f103.html)|ARM® Cortex-M3|Malyan M200, GTM32 Pro, MKS Robin, BTT SKR Mini + [STM32F401](//www.st.com/en/microcontrollers-microprocessors/stm32f401.html)|ARM® Cortex-M4|ARMED, Rumba32, SKR Pro, Lerdge, FYSETC S6, Artillery Ruby + [Pico RP2040](//www.raspberrypi.com/documentation/microcontrollers/pico-series.html)|Dual Cortex M0+|BigTreeTech SKR Pico + [STM32F7x6](//www.st.com/en/microcontrollers-microprocessors/stm32f7x6.html)|ARM® Cortex-M7|The Borg, RemRam V1 + [STM32G0B1RET6](//www.st.com/en/microcontrollers-microprocessors/stm32g0x1.html)|ARM® Cortex-M0+|BigTreeTech SKR mini E3 V3.0 + [STM32H743xIT6](//www.st.com/en/microcontrollers-microprocessors/stm32h743-753.html)|ARM® Cortex-M7|BigTreeTech SKR V3.0, SKR EZ V3.0, SKR SE BX V2.0/V3.0 + [SAMD21P20A](//www.adafruit.com/product/4064)|ARM® Cortex-M0+|Adafruit Grand Central M4 + [SAMD51P20A](//www.adafruit.com/product/4064)|ARM® Cortex-M4|Adafruit Grand Central M4 + [Teensy 3.2/3.1](//www.pjrc.com/teensy/teensy31.html)|MK20DX256VLH7 ARM® Cortex-M4| + [Teensy 3.5](//www.pjrc.com/store/teensy35.html)|MK64FX512-VMD12 ARM® Cortex-M4| + [Teensy 3.6](//www.pjrc.com/store/teensy36.html)|MK66FX1MB-VMD18 ARM® Cortex-M4| + [Teensy 4.0](//www.pjrc.com/store/teensy40.html)|MIMXRT1062-DVL6B ARM® Cortex-M7| + [Teensy 4.1](//www.pjrc.com/store/teensy41.html)|MIMXRT1062-DVJ6B ARM® Cortex-M7| + Linux Native|x86 / ARM / RISC-V|Raspberry Pi GPIO + Simulator|Windows, macOS, Linux|Desktop OS + [All supported boards](//marlinfw.org/docs/hardware/boards.html#boards-list)|All platforms|All boards ## Marlin Support The Issue Queue is reserved for Bug Reports and Feature Requests. Please use the following resources for help with configuration and troubleshooting: -- [Marlin Documentation](https://marlinfw.org) - Official Marlin documentation -- [Marlin Discord](https://discord.com/servers/marlin-firmware-461605380783472640) - Discuss issues with Marlin users and developers -- Facebook Group ["Marlin Firmware"](https://www.facebook.com/groups/1049718498464482/) -- RepRap.org [Marlin Forum](https://forums.reprap.org/list.php?415) -- Facebook Group ["Marlin Firmware for 3D Printers"](https://www.facebook.com/groups/3Dtechtalk/) -- [Marlin Configuration](https://www.youtube.com/results?search_query=marlin+configuration) on YouTube +- [Marlin Documentation](//marlinfw.org) - Official Marlin documentation +- [Marlin Discord](//discord.com/servers/marlin-firmware-461605380783472640) - Discuss issues with Marlin users and developers +- Facebook Group ["Marlin Firmware"](//www.facebook.com/groups/1049718498464482/) +- RepRap.org [Marlin Forum](//forums.reprap.org/list.php?415) +- Facebook Group ["Marlin Firmware for 3D Printers"](//www.facebook.com/groups/3Dtechtalk/) +- [Marlin Configuration](//www.youtube.com/results?search_query=marlin+configuration) on YouTube ## Contributing Patches -You can contribute patches by submitting a Pull Request to the ([bugfix-2.1.x](https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.1.x)) branch. +You can contribute patches by submitting a Pull Request to the ([bugfix-2.1.x](//github.com/MarlinFirmware/Marlin/tree/bugfix-2.1.x)) branch. - We use branches named with a "bugfix" or "dev" prefix to fix bugs and integrate new features. -- Follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) to gain points with the maintainers. -- Please submit Feature Requests and Bug Reports to the [Issue Queue](https://github.com/MarlinFirmware/Marlin/issues/new/choose). See above for user support. +- Follow the [Coding Standards](//marlinfw.org/docs/development/coding_standards.html) to gain points with the maintainers. +- Please submit Feature Requests and Bug Reports to the [Issue Queue](//github.com/MarlinFirmware/Marlin/issues/new/choose). See above for user support. - Whenever you add new features, be sure to add one or more build tests to `buildroot/tests`. Any tests added to a PR will be run within that PR on GitHub servers as soon as they are pushed. To minimize iteration be sure to run your new tests locally, if possible. - Local build tests: - All: `make tests-config-all-local` @@ -109,21 +115,33 @@ You can contribute patches by submitting a Pull Request to the ([bugfix-2.1.x](h ## Contributors -Marlin is constantly improving thanks to a huge number of contributors from all over the world bringing their specialties and talents. Huge thanks are due to [all the contributors](https://github.com/MarlinFirmware/Marlin/graphs/contributors) who regularly patch up bugs, help direct traffic, and basically keep Marlin from falling apart. Marlin's continued existence would not be possible without them. +Marlin is constantly improving thanks to a huge number of contributors from all over the world bringing their specialties and talents. Huge thanks are due to [all the contributors](//github.com/MarlinFirmware/Marlin/graphs/contributors) who regularly patch up bugs, help direct traffic, and basically keep Marlin from falling apart. Marlin's continued existence would not be possible without them. + +Marlin Firmware original logo design by Ahmet Cem TURAN [@ahmetcemturan](//github.com/ahmetcemturan). ## Project Leadership Name|Role|Link|Donate ----|----|----|---- -🇺🇸 Scott Lahteine|Project Lead|[[@thinkyhead](https://github.com/thinkyhead)]|[💸 Donate](https://marlinfw.org/docs/development/contributing.html#donate) -🇺🇸 Roxanne Neufeld|Admin|[[@Roxy-3D](https://github.com/Roxy-3D)]| -🇺🇸 Keith Bennett|Admin|[[@thisiskeithb](https://github.com/thisiskeithb)]|[💸 Donate](https://github.com/sponsors/thisiskeithb) -🇺🇸 Jason Smith|Admin|[[@sjasonsmith](https://github.com/sjasonsmith)]| -🇧🇷 Victor Oliveira|Admin|[[@rhapsodyv](https://github.com/rhapsodyv)]| -🇬🇧 Chris Pepper|Admin|[[@p3p](https://github.com/p3p)]| -🇳🇿 Peter Ellens|Admin|[[@ellensp](https://github.com/ellensp)]|[💸 Donate](https://ko-fi.com/ellensp) -🇺🇸 Bob Kuhn|Admin|[[@Bob-the-Kuhn](https://github.com/Bob-the-Kuhn)]| -🇳🇱 Erik van der Zalm|Founder|[[@ErikZalm](https://github.com/ErikZalm)]| +🇺🇸 Scott Lahteine|Project Lead|[[@thinkyhead](//github.com/thinkyhead)]|[💸 Donate](//marlinfw.org/docs/development/contributing.html#donate) +🇺🇸 Roxanne Neufeld|Admin|[[@Roxy-3D](//github.com/Roxy-3D)]| +🇺🇸 Keith Bennett|Admin|[[@thisiskeithb](//github.com/thisiskeithb)]|[💸 Donate](//github.com/sponsors/thisiskeithb) +🇺🇸 Jason Smith|Admin|[[@sjasonsmith](//github.com/sjasonsmith)]| +🇧🇷 Victor Oliveira|Admin|[[@rhapsodyv](//github.com/rhapsodyv)]| +🇬🇧 Chris Pepper|Admin|[[@p3p](//github.com/p3p)]| +🇳🇿 Peter Ellens|Admin|[[@ellensp](//github.com/ellensp)]|[💸 Donate](//ko-fi.com/ellensp) +🇺🇸 Bob Kuhn|Admin|[[@Bob-the-Kuhn](//github.com/Bob-the-Kuhn)]| +🇳🇱 Erik van der Zalm|Founder|[[@ErikZalm](//github.com/ErikZalm)]| + +## Star History + + + + + + Star History Chart + + ## License diff --git a/firmware/buildroot/bin/__init__.py b/firmware/buildroot/bin/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/firmware/buildroot/bin/build_all_examples b/firmware/buildroot/bin/build_all_examples old mode 100755 new mode 100644 index 7c4e8cb..c2b0007 --- a/firmware/buildroot/bin/build_all_examples +++ b/firmware/buildroot/bin/build_all_examples @@ -2,47 +2,48 @@ # # Usage: # -# build_all_examples [-b|--branch=] - Branch to fetch from Configurations repo (import-2.1.x) +# build_all_examples [-a|--archive] - Copy the binary to the export location # [-B|--base] - Base path of configurations, overriding -b +# [-b|--branch=] - Branch to fetch from Configurations repo (import-2.1.x) # [-c|--continue] - Continue the paused build -# [-p|--purge] - Purge the status file and start over -# [-s|--skip] - Continue the paused build, skipping one -# [-r|--resume=] - Start at some config in the filesystem order -# [-l|--limit=#] - Limit the number of builds in this run -# [-d|--debug] - Print extra debug output (after) -# [-n|--nobuild] - Don't actually build anything +# [-d|-v|--debug] - Print extra debug output (after) +# [-e|--export=N] - Set CONFIG_EXPORT and export to the export location # [-f|--nofail] - Don't stop on a failed build -# [-e|--export=N] - Set CONFIG_EXPORT and export into each config folder -# [-a|--archive] - Copy the binary to the export location +# [-h|--help] - Print usage and exit +# [-l|--limit=#] - Limit the number of builds in this run +# [-n|--nobuild] - Don't actually build anything # [-o|--output] - Redirect export / archiving to another location # (By default export to origin config folders) -# [-h|--help] - Print usage and exit +# [-p|--purge] - Purge the status file and start over +# [-r|--resume=] - Start at some config in the filesystem order +# [-s|--skip] - Continue the paused build, skipping one # HERE=`dirname $0` +PATH="$HERE:$PATH" -. "$HERE/mfutil" +. mfutil GITREPO=https://github.com/MarlinFirmware/Configurations.git STAT_FILE=./.pio/.buildall usage() { echo "Usage: -build_all_examples [-b|--branch=] - Branch to fetch from Configurations repo (import-2.1.x) +build_all_examples [-a|--archive] - Copy the binary to the export location [-B|--base] - Base path of configurations, overriding -b + [-b|--branch=] - Branch to fetch from Configurations repo (import-2.1.x) [-c|--continue] - Continue the paused build - [-p|--purge] - Purge the status file and start over - [-s|--skip] - Continue the paused build, skipping one - [-r|--resume=] - Start at some config in the filesystem order + [-d|-v|--debug] - Print extra debug output (after) [-e|--export=N] - Set CONFIG_EXPORT and export to the export location - [-a|--archive] - Copy the binary to the export location - [-o|--output] - Redirect export / archiving to another location - (By default export to origin config folders) - [-d|--debug] - Print extra debug output (after) - [-l|--limit=#] - Limit the number of builds in this run - [-n|--nobuild] - Don't actually build anything [-f|--nofail] - Don't stop on a failed build [-h|--help] - Print usage and exit + [-l|--limit=#] - Limit the number of builds in this run + [-n|--nobuild] - Don't actually build anything + [-o|--output] - Redirect export / archiving to another location + (By default export to origin config folders) + [-p|--purge] - Purge the status file and start over + [-r|--resume=] - Start at some config in the filesystem order + [-s|--skip] - Continue the paused build, skipping one " } @@ -52,26 +53,26 @@ unset FIRST_CONF EXIT_USAGE= LIMIT=1000 -while getopts 'aB:b:ce:fdhl:no:pr:sv-:' OFLAG; do +while getopts 'aB:b:cde:fhl:no:pr:sv-:' OFLAG; do case "${OFLAG}" in a) ARCHIVE=1 ; bugout "Archiving" ;; - B) OPATH=${OPTARG%/} ; bugout "Base: $OPATH" ;; + B) CBASE=${OPTARG%/} ; bugout "Base: $CBASE" ;; b) BRANCH=$OPTARG ; bugout "Branch: $BRANCH" ;; - f) NOFAIL=1 ; bugout "Continue on Fail" ;; - r) ISRES=1 ; FIRST_CONF=$OPTARG ; bugout "Resume: $FIRST_CONF" ;; c) CONTINUE=1 ; bugout "Continue" ;; - s) CONTSKIP=1 ; bugout "Continue, skipping" ;; + d|v) DEBUG=1 ; bugout "Debug ON" ;; e) CEXPORT=$OPTARG ; bugout "Export $CEXPORT" ;; - o) OUTBASE="${OPTARG%/}" ; bugout "Archive to $OUTBASE" ;; + f) NOFAIL=1 ; bugout "Continue on Fail" ;; h) EXIT_USAGE=1 ; break ;; l) LIMIT=$OPTARG ; bugout "Limit to $LIMIT build(s)" ;; - d|v) DEBUG=1 ; bugout "Debug ON" ;; n) DRYRUN=1 ; bugout "Dry Run" ;; + o) OUTBASE="${OPTARG%/}" ; bugout "Archive to $OUTBASE" ;; p) PURGE=1 ; bugout "Purge stat file" ;; + r) ISRES=1 ; FIRST_CONF=$OPTARG ; bugout "Resume: $FIRST_CONF" ;; + s) CONTSKIP=1 ; bugout "Continue, skipping" ;; -) ONAM="${OPTARG%%=*}" ; OVAL="${OPTARG#*=}" case "$ONAM" in archive) ARCHIVE=1 ; bugout "Archiving" ;; - base) OPATH=${OVAL%/} ; bugout "Base: $OPATH" ;; + base) CBASE=${OVAL%/} ; bugout "Base: $CBASE" ;; branch) BRANCH=$OVAL ; bugout "Branch: $BRANCH" ;; nofail) NOFAIL=1 ; bugout "Continue on Fail" ;; resume) ISRES=1 ; FIRST_CONF=$OVAL ; bugout "Resume: $FIRST_CONF" ;; @@ -131,45 +132,49 @@ else git diff --quiet || { echo "The working copy is modified. Commit or stash changes before proceeding."; exit ; } fi -# Create a temporary folder inside .pio -if [[ -n $OPATH ]]; then - [[ -d "$OPATH" ]] || { echo "Given base -B $OPATH not found." ; exit ; } +# Check for the given base path +if [[ -n $CBASE ]]; then + CBASE="${CBASE/#\~/$HOME}" + [[ -d "$CBASE" ]] || { echo "Given base -B $CBASE not found." ; exit ; } else # Make a Configurations temporary folder if needed - OPATH=./.pio/build-$BRANCH - [[ -d "$OPATH" ]] || mkdir -p "$OPATH" + CBASE=./.pio/build-$BRANCH + [[ -d "$CBASE" ]] || mkdir -p "$CBASE" # Download the specified Configurations branch if needed - if [[ ! -e "$OPATH/README.md" ]]; then - echo "Fetching Configurations from GitHub to $OPATH" - git clone --depth=1 --single-branch --branch "$BRANCH" $GITREPO "$OPATH" || { echo "Failed to clone the configuration repository"; exit ; } + if [[ ! -e "$CBASE/README.md" ]]; then + echo "Fetching Configurations from GitHub to $CBASE" + git clone --depth=1 --single-branch --branch "$BRANCH" $GITREPO "$CBASE" || { echo "Failed to clone the configuration repository"; exit ; } fi fi # Build echo -e "=====================\nProceed with builds...\n=====================" shopt -s nullglob -shopt -s globstar -IFS=' -' -CONF_TREE=$( ls -d "$OPATH"/config/examples/**/ | grep -vE ".+\.(\w+)$" ) -for CONF in $CONF_TREE ; do + +export PAUSE=1 + +# Get a list of all folders that contain a file matching "Configuration*.h" +find -ds "$CBASE"/config/examples -type d -name 'Configuration.h' -o -name 'Configuration_adv.h' -print0 | while IFS= read -r -d $'\0' CONF; do + + # Remove the file name and slash from the end of the path + CONF=${CONF%/*} # Get a config's directory name - DIR=${CONF#$OPATH/config/examples/} + DIR=${CONF#$CBASE/config/examples/} # If looking for a config, skip others - [[ $FIRST_CONF ]] && [[ $FIRST_CONF != $DIR && "$FIRST_CONF/" != $DIR ]] && continue + [[ $FIRST_CONF ]] && [[ $FIRST_CONF != $DIR && "$FIRST_CONF/" != $DIR ]] && { ((DEBUG)) && echo "[SKIP] $DIR" ; continue ; } # Once found, stop looking unset FIRST_CONF # If skipping, don't build the found one [[ $SKIP_CONF ]] && { unset SKIP_CONF ; continue ; } - # At least one config file is required here - compgen -G "${CONF}Configuration*.h" > /dev/null || continue + # Either Configuration.h or Configuration_adv.h must exist + [[ -f "$CONF"/Configuration.h || -f "$CONF"/Configuration_adv.h ]] || { echo "[NONE] $DIR" ; continue ; } # Command arguments for 'build_example' - CARGS=("-b" "$OPATH" "-c" "$DIR") + CARGS=("-b" "$CBASE" "-c" "$DIR") # Exporting? Add -e argument ((CEXPORT)) && CARGS+=("-e" "$CEXPORT") @@ -189,16 +194,20 @@ for CONF in $CONF_TREE ; do else # Remember where we are in case of failure echo "${BRANCH}*${DIR}" >"$STAT_FILE" - ((DEBUG)) && echo "\"$HERE/build_example\" ${CARGS[@]}" + ((DEBUG)) && echo "build_example ${CARGS[@]}" # Invoke build_example - "$HERE"/build_example "${CARGS[@]}" || { echo "Failed to build $DIR" ; exit ; } + build_example "${CARGS[@]}" || { echo "Failed to build $DIR" ; exit ; } fi - ((--LIMIT)) || { echo "Limit reached" ; PAUSE=1 ; break ; } + echo + ((--LIMIT)) || { echo "Specified limit reached" ; break ; } + echo - echo ; echo + export PAUSE=0 done +echo "Exiting" + # Delete the build state if not paused early -[[ $PAUSE ]] || rm "$STAT_FILE" +((PAUSE)) || rm -f "$STAT_FILE" diff --git a/firmware/buildroot/bin/build_example b/firmware/buildroot/bin/build_example old mode 100755 new mode 100644 index 711346a..566919a --- a/firmware/buildroot/bin/build_example +++ b/firmware/buildroot/bin/build_example @@ -4,7 +4,8 @@ # # build_example -b|--base= - Configurations root folder (e.g., ./.pio/build-BRANCH) # -c|--config= - Sub-path of the configs to build (within config/examples) -# [-e|--export=N] - Set CONFIG_EXPORT before build and export +# [-n|--index=N] - Which environment to build, by index (Based on pins.h comments) +# [-e|--export=N] - Use CONFIG_EXPORT N to export the config to the export location # [-a|--archive] - Archive the build (to the export location) # [-o|--output] - Redirect export / archiving to another location # (By default export to origin config folder) @@ -19,7 +20,8 @@ usage() { echo "Usage: build_example -b|--base= - Configurations root folder (e.g., ./.pio/build-BRANCH) -c|--config= - Sub-path of the configs to build (within config/examples) - [-e|--export=N] - Set CONFIG_EXPORT before build and export + [-n|--index=N] - Which environment to build, by index (Based on pins.h comments) + [-e|--export=N] - Use CONFIG_EXPORT N to export the config to the export location [-a|--archive] - Archive the build (to the export location) [-o|--output] - Redirect export / archiving to another location (By default export to origin config folder) @@ -32,10 +34,12 @@ build_example -b|--base= - Configurations root folder (e.g., ./.pio/bu } HERE=`dirname $0` +PATH="$HERE:$PATH" -source "$HERE/mfutil" +. mfutil annc() { echo -e "\033[0;32m$1\033[0m" ; } +alrt() { echo -e "\033[0;31m$1\033[0m" ; } # Get arguments BUILD=./.pio/build @@ -48,15 +52,18 @@ REVEAL= EXPNUM= NOFAIL= OUTBASE= -while getopts 'ab:c:e:fhio:r-:' OFLAG; do +BUILDINDEX=1 + +while getopts 'ab:c:e:fhn:o:r-:' OFLAG; do case "${OFLAG}" in a) ARCHIVE=1 ;; b) BASE="${OPTARG%/}" ;; c) CONFIG="${OPTARG%/}" ;; e) EXPNUM="$OPTARG" ;; - o) OUTBASE="${OPTARG%/}" ;; - h) EXIT_USAGE=1 ; break ;; f) NOFAIL=1 ;; + h) EXIT_USAGE=1 ; break ;; + n) BUILDINDEX="$OPTARG" ;; + o) OUTBASE="${OPTARG%/}" ;; r) REVEAL=1 ;; -) ONAM="${OPTARG%%=*}" ; OVAL="${OPTARG#*=}" case "$ONAM" in @@ -64,6 +71,7 @@ while getopts 'ab:c:e:fhio:r-:' OFLAG; do allow) ALLOW=1 ;; base) BASE="${OVAL%/}" ;; config) CONFIG="${OVAL%/}" ;; + index) BUILDINDEX="$OVAL" ;; export) EXPNUM="$OVAL" ;; output) OUTBASE="${OVAL%/}" ;; help) EXIT_USAGE=1 ; break ;; @@ -100,7 +108,7 @@ SUB="$SUB1/$CONFIG" [[ -d "$SUB" ]] || { echo "-c|--config $CONFIG doesn't exist" ; exit 1 ; } # ...and contains Configuration.h or Configuration_adv.h -[[ -n $(compgen -G "$SUB/Configuration*.h") ]] || { echo "No configuration files found in $SUB" ; exit 1 ; } +[[ -f "$SUB"/Configuration.h || -f "$SUB"/Configuration_adv.h ]] || { echo "No configuration files found in $SUB" ; exit 1 ; } # Get the location for exports and archives if [[ -n $OUTBASE ]]; then @@ -152,12 +160,12 @@ ENAME=("-name" "marlin_config.json" \ "-o" "-name" "schema.yml") # Possible built firmware names (in the build folder) -BNAME=("-type" "f" \ - "-name" 'firmware*.hex' \ +BNAME=("-name" "firmware*.hex" \ "-o" "-name" "firmware*.bin" \ "-o" "-name" "project*.bin" \ "-o" "-name" "Robin*.bin" \ - "-o" "-name" "main_*.bin") + "-o" "-name" "main_*.bin" \ + "-o" "-name" "MarlinSimulator*") mkdir -p "$BUILD" @@ -165,49 +173,73 @@ mkdir -p "$BUILD" if [[ $EXPNUM ]]; then opt_set CONFIG_EXPORT $EXPNUM # Clean up old exports - find "$BUILD" \( "${ENAME[@]}" \) -exec rm "{}" \; + find "$BUILD" -type f \( "${ENAME[@]}" \) -exec rm "{}" \; fi -((ARCHIVE)) && find "$BUILD" \( "${BNAME[@]}" \) -exec rm "{}" \; +((ARCHIVE)) && find "$BUILD" -type f \( "${BNAME[@]}" \) -exec rm "{}" \; set +e echo "Building example $CONFIG ..." -"$HERE/mftest" -s -a -n1 ; ERR=$? +mftest -s -a -n$BUILDINDEX ; ERR=$? -((ERR)) && echo "Failed" || echo "Success" +((ERR)) && alrt "Failed ($ERR)" || annc "Success" set -e -# Copy exports back to the configs -if [[ -n $EXPNUM ]]; then - annc "Exporting $EXPNUM" - [[ -f Marlin/Config-export.h ]] && { cp Marlin/Config-export.h "$ARCSUB"/Config.h ; } - find "$BUILD" "${ENAME[@]}" -exec cp "{}" "$ARCSUB" \; -fi +if [[ $ERR -gt 0 ]]; then -# Copy potential firmware files into the config folder -# TODO: Consider firmware that needs an STM32F4_UPDATE folder. -# Currently only BOARD_CREALITY_F401RE env:STM32F401RE_creality -if ((ARCHIVE)); then - annc "Archiving" - find "$BUILD" \( "${BNAME[@]}" \) -exec sh -c ' - ARCSUB="$1" - shift 1 - for file in "$@"; do - cd "$(dirname "$file")" - base=$(basename "$file") - tar -czf "$ARCSUB/$base.tar.gz" "$base" - rm "$base" + # Error? For --nofail simply log. Otherwise return the error. + if [[ -n $NOFAIL ]]; then + date +"%F %T [FAIL] $CONFIG" >>./.pio/error-log.txt + else + exit $ERR + fi + +else + + # Copy exports back to the configs + if [[ -n $EXPNUM ]]; then + annc "Exporting $EXPNUM" + [[ -f Marlin/Config-export.h ]] && { cp Marlin/Config-export.h "$ARCSUB"/Config.h ; } + find "$BUILD" -type f \( "${ENAME[@]}" \) -exec cp "{}" "$ARCSUB" \; + fi + + # Copy potential firmware files into the config folder + # TODO: Consider firmware that needs an STM32F4_UPDATE folder. + # Currently only BOARD_CREALITY_F401RE env:STM32F401RE_creality + if ((ARCHIVE)); then + annc "Archiving" + find "$BUILD" -type f \( "${BNAME[@]}" \) -exec sh -c ' + ARCSUB="$1" ; CONFIG="$2" ; FILE="$3" ; shift 3 + NAME=${FILE##*/} ; SHRT=${NAME%.*} ; DIR=${FILE%/*} + ZIPX= + if [[ $CONFIG == *Simulator* ]]; then + case $(uname | tr '[:upper:]' '[:lower:]') in + darwin) SUB="macOS" ; ZIPX="-X" ;; + *linux) SUB="Linux" ;; + win*) SUB="Windows" ;; + msys*) SUB="Windows" ;; + cygwin*) SUB="Windows" ;; + mingw*) SUB="Windows" ;; + *) SUB='Unix' ;; + esac + ARCH=$(uname -m | tr '[:lower:]' '[:upper:]') + ARCSUB="$ARCSUB/$SUB-$ARCH" + fi + mkdir -p "$ARCSUB" + rm -f "$ARCSUB"/*.zip "$ARCSUB"/*.sha256.txt + cd "$DIR" + SHASUM=$(sha256sum "$NAME" | cut -d" " -f1) + echo "$CONFIG\n$SHASUM" > "$ARCSUB/$NAME.sha256.txt" + zip $ZIPX "$ARCSUB/$SHRT.zip" "$NAME" && rm "$NAME" cd - >/dev/null - done - ' sh "$ARCSUB" {} + + ' sh "$ARCSUB" "$CONFIG" {} + + fi + + # Reveal the configs after the build, if requested + ((REVEAL)) && { annc "Revealing $ARCSUB" ; open "$ARCSUB" ; } + fi -# Exit with error unless --nofail is set -[[ $ERR -gt 0 && -z $NOFAIL ]] && exit $ERR - -# Reveal the configs after the build, if requested -((REVEAL)) && { annc "Revealing $ARCSUB" ; open "$ARCSUB" ; } - exit 0 diff --git a/firmware/buildroot/bin/ci_src_filter b/firmware/buildroot/bin/ci_src_filter old mode 100755 new mode 100644 diff --git a/firmware/buildroot/bin/config.py b/firmware/buildroot/bin/config.py new file mode 100644 index 0000000..b1a67ad --- /dev/null +++ b/firmware/buildroot/bin/config.py @@ -0,0 +1,96 @@ +''' +config.py - Helper functions for config manipulation +''' +import re + +FILES = ('Marlin/Configuration.h', 'Marlin/Configuration_adv.h') + +def set(file_path, define_name, value): + ''' + Replaces a define in a file with a new value. + Returns True if the define was found and replaced, False otherwise. + ''' + # Read the contents of the file + with open(file_path, 'r') as f: + content = f.readlines() + + modified = False + for i in range(len(content)): + # Regex to match the desired pattern + match = re.match(r'^(\s*)(/*)(\s*)(#define\s+{})\s+(.*)$'.format(re.escape(define_name)), content[i]) + if match: + new_line = f"{match[1]}{match[3]}{match[4]} {value} // {match[5]}\n" + content[i] = new_line + modified = True + + # Write the modified content back to the file only if changes were made + if modified: + with open(file_path, 'w') as f: + f.writelines(content) + return True + + return False + +def add(file_path, define_name, value=""): + ''' + Insert a define on the first blank line in a file. + Returns True if the define was found and replaced, False otherwise. + ''' + with open(file_path, 'r') as f: + content = f.readlines() + + # Prepend a space to the value if it's not empty + if value != "": + value = " " + value + + # Find the first blank line to insert the new define + for i in range(len(content)): + if content[i].strip() == '': + # Insert the define at the first blank line + content.insert(i, f"#define {define_name}{value}\n") + break + else: + # If no blank line is found, append to the end + content.append(f"#define {define_name}{value}\n") + + with open(file_path, 'w') as f: + f.writelines(content) + +def enable(file_path, define_name, enable=True): + ''' + Uncomment or comment the named defines in the given file path. + Returns True if the define was found, False otherwise. + ''' + # Read the contents of the file + with open(file_path, 'r') as f: + content = f.readlines() + + # Prepare the regex + regex = re.compile(r'^(\s*)(/*)(\s*)(#define\s+{}\b.*?)( *//.*)?$'.format(re.escape(define_name))) + + # Find the define in the file and uncomment or comment it + found = False + modified = False + for i in range(len(content)): + match = regex.match(content[i]) + if not match: continue + found = True + if enable: + if match[2]: + modified = True + comment = '' if match[5] is None else ' ' + match[5] + content[i] = f"{match[1]}{match[3]}{match[4]}{comment}\n" + else: + if not match[2]: + modified = True + comment = '' if match[5] is None else match[5] + if comment.startswith(' '): comment = comment[2:] + content[i] = f"{match[1]}//{match[3]}{match[4]}{comment}\n" + break + + # Write the modified content back to the file only if changes were made + if modified: + with open(file_path, 'w') as f: + f.writelines(content) + + return found diff --git a/firmware/buildroot/bin/format_code b/firmware/buildroot/bin/format_code old mode 100755 new mode 100644 diff --git a/firmware/buildroot/bin/generate_version b/firmware/buildroot/bin/generate_version old mode 100755 new mode 100644 index 70a108b..ff85fe7 --- a/firmware/buildroot/bin/generate_version +++ b/firmware/buildroot/bin/generate_version @@ -19,6 +19,7 @@ VERSION="$(git -C "${DIR}" describe --tags --first-parent 2>/dev/null || true)" STRING_DISTRIBUTION_DATE="${STRING_DISTRIBUTION_DATE:-$(date '+%Y-%m-%d %H:%M')}" SHORT_BUILD_VERSION="${SHORT_BUILD_VERSION:-${BRANCH}}" DETAILED_BUILD_VERSION="${DETAILED_BUILD_VERSION:-${BRANCH}-${VERSION}}" +PROTOCOL_VERSION="1.0" # Gets some misc options from their defaults DEFAULT_MACHINE_UUID="${DEFAULT_MACHINE_UUID:-$(awk -F'"' \ @@ -65,68 +66,52 @@ cat > "${WRITE_FILE}" <] [-n|--num=] [-m|--make] [-y|--build=] - mftest [-a|--autobuild] +Usage: mftest [-a|--autobuild] mftest [-r|--rebuild] mftest [-s|--silent] + mftest [-t|--env=] [-n|--num=] [-m|--make] [-y|--build=] mftest [-u|--autoupload] [-n|--num=] OPTIONS - -t --env The environment to apply / run, or the menu index number. - -n --num The index of the test to run. (In file order.) - -m --make Use the make / Docker method for the build. - -y --build Skip 'Do you want to build this test?' and assume YES. - -h --help Print this help. -a --autobuild PIO Build using the MOTHERBOARD environment. + -d --default Restore to defaults before applying configs. + -h --help Print this help. + -m --make Use the make / Docker method for the build. + -n --num The index of the test to run. (In file order.) + -r --rebuild Rebuild previous PIO Build. + -s --silent Silence build output from PlatformIO. + -t --env The environment to apply / run, or the menu index number. -u --autoupload PIO Upload using the MOTHERBOARD environment. -v --verbose Extra output for debugging. - -s --silent Silence build output from PlatformIO. - -d --default Restore to defaults before applying configs. + -y --build Skip 'Do you want to build this test?' and assume YES. env shortcuts: tree due esp lin lp8|lpc8 lp9|lpc9 m128 m256|mega stm|f1 f4 f7 s6 teensy|t31|t32 t35|t36 t40|t41 " @@ -41,7 +42,6 @@ env shortcuts: tree due esp lin lp8|lpc8 lp9|lpc9 m128 m256|mega stm|f1 f4 f7 s6 TESTPATH=buildroot/tests STATE_FILE="./.pio/.mftestrc" -SED=$(which gsed sed | head -n1) shopt -s extglob nocasematch @@ -57,7 +57,7 @@ TESTENV='-' CHOICE=0 DEBUG=0 -while getopts 'abdhmrsuvyn:t:-:' OFLAG; do +while getopts 'adhmn:rst:uvy-:' OFLAG; do case "${OFLAG}" in a) AUTO_BUILD=1 ; bugout "Auto-Build target..." ;; d) DL_DEFAULTS=1 ; bugout "Restore to defaults..." ;; @@ -163,12 +163,10 @@ if ((AUTO_BUILD)); then # # Get the MOTHERBOARD define value from the .h file and strip off the "BOARD_" prefix # - ACODE='/[[:space:]]*#define[[:space:]]MOTHERBOARD[[:space:]]/ { sub(/^BOARD_/, "", $3); print $3 }' + ACODE='/^[[:space:]]*#define[[:space:]]MOTHERBOARD[[:space:]]/ { sub(/^BOARD_/, "", $3); print $3 }' MB=$(awk "$ACODE" Marlin/Configuration.h 2>/dev/null) [[ -z $MB ]] && MB=$(awk "$ACODE" Marlin/Config.h 2>/dev/null) [[ -z $MB ]] && { echo "Error - Can't read MOTHERBOARD setting." ; exit 1 ; } - echo "Got $MB" - exit BLINE=$( grep -E "define\s+BOARD_$MB\b" Marlin/src/core/boards.h ) BNUM=$( sed -E 's/^.+BOARD_[^ ]+ +([0-9]+).+$/\1/' <<<"$BLINE" ) BDESC=$( sed -E 's/^.+\/\/ *(.+)$/\1/' <<<"$BLINE" ) diff --git a/firmware/buildroot/bin/mfutil b/firmware/buildroot/bin/mfutil old mode 100755 new mode 100644 index 1699dd9..e9ee57f --- a/firmware/buildroot/bin/mfutil +++ b/firmware/buildroot/bin/mfutil @@ -4,11 +4,9 @@ # # Check dependencies -which curl 1>/dev/null 2>&1 || { echo "curl not found! Please install it."; exit ; } -which git 1>/dev/null 2>&1 || { echo "git not found! Please install it."; exit ; } - -SED=$(which gsed sed | head -n1) -[[ -z "$SED" ]] && { echo "No sed found, please install sed" ; exit 1 ; } +which curl &>/dev/null || { echo "curl not found! Please install it."; exit 1 ; } +which git &>/dev/null || { echo "git not found! Please install it."; exit 1 ; } +which sed &>/dev/null || { echo "sed not found! Please install it."; exit 1 ; } OPEN=$( which gnome-open xdg-open open | head -n1 ) diff --git a/firmware/buildroot/bin/opt_add b/firmware/buildroot/bin/opt_add old mode 100755 new mode 100644 index 2306ebd..3abe309 --- a/firmware/buildroot/bin/opt_add +++ b/firmware/buildroot/bin/opt_add @@ -1,3 +1,11 @@ -#!/usr/bin/env bash +#!/usr/bin/env python -eval "echo '#define ${@}' | cat - Marlin/Configuration.h > temp && mv temp Marlin/Configuration.h" +import sys, config + +def main(): + args = sys.argv[1:] + for name in args: + config.add(config.FILES[0], name) + +if __name__ == "__main__": + main() diff --git a/firmware/buildroot/bin/opt_disable b/firmware/buildroot/bin/opt_disable old mode 100755 new mode 100644 index 0444e1b..ce0eaa4 --- a/firmware/buildroot/bin/opt_disable +++ b/firmware/buildroot/bin/opt_disable @@ -1,15 +1,21 @@ -#!/usr/bin/env bash +#!/usr/bin/env python -# exit on first failure -set -e +import sys, os, config -SED=$(which gsed sed | head -n1) +def main(): + args = sys.argv[1:] -for opt in "$@" ; do - DID=0 ; FOUND=0 - for FN in Configuration Configuration_adv; do - "${SED}" -i "/^\(\s*\)\(#define\s\+${opt}\b\s\?\)\(\s\s\)\?/{s//\1\/\/\2/;h};\${x;/./{x;q0};x;q9}" Marlin/$FN.h && DID=1 - ((DID||FOUND)) || { grep -E "^\s*//\s*#define\s+${opt}\b" Marlin/$FN.h >/dev/null && FOUND=1 ; } - done - ((DID||FOUND)) || (echo "ERROR: $(basename $0) Can't find ${opt}" >&2 && exit 9) -done + for name in args: + changed = False + + for file in config.FILES: + if os.path.exists(file): + if config.enable(file, name, False): + changed = True + + if not changed: + print(f"ERROR: Can't find {name}") + exit(1) + +if __name__ == "__main__": + main() diff --git a/firmware/buildroot/bin/opt_enable b/firmware/buildroot/bin/opt_enable old mode 100755 new mode 100644 index f9be82c..644edb9 --- a/firmware/buildroot/bin/opt_enable +++ b/firmware/buildroot/bin/opt_enable @@ -1,15 +1,21 @@ -#!/usr/bin/env bash +#!/usr/bin/env python -# exit on first failure -set -e +import sys, os, config -SED=$(which gsed sed | head -n1) +def main(): + args = sys.argv[1:] -for opt in "$@" ; do - DID=0 ; FOUND=0 - for FN in Configuration Configuration_adv; do - "${SED}" -i "/^\(\s*\)\/\/\(\s*\)\(#define\s\+${opt}\b\)\( \?\)/{s//\1\2\3\4\4\4/;h};\${x;/./{x;q0};x;q9}" Marlin/$FN.h && DID=1 - ((DID||FOUND)) || { grep -E "^\s*#define\s+${opt}\b" Marlin/$FN.h >/dev/null && FOUND=1 ; } - done - ((DID||FOUND)) || (echo "ERROR: $(basename $0) Can't find ${opt}" >&2 && exit 9) -done + for name in args: + changed = False + + for file in config.FILES: + if os.path.exists(file): + if config.enable(file, name): + changed = True + + if not changed: + print(f"ERROR: Can't find {name}") + exit(1) + +if __name__ == "__main__": + main() diff --git a/firmware/buildroot/bin/opt_find b/firmware/buildroot/bin/opt_find old mode 100755 new mode 100644 index a7c8fd9..bab9da0 --- a/firmware/buildroot/bin/opt_find +++ b/firmware/buildroot/bin/opt_find @@ -23,8 +23,8 @@ esac while [[ $# > 0 ]]; do DID=0 - for FN in Configuration Configuration_adv; do - FOUND=$( grep -HEn "^\s*${COMM}#define\s+[A-Z0-9_]*${1}" "Marlin/$FN.h" 2>/dev/null ) + for FN in Marlin/Configuration.h Marlin/Configuration_adv.h; do + FOUND=$( grep -HEn "^\s*${COMM}#define\s+[A-Z0-9_]*${1}" $FN 2>/dev/null ) [[ -n "$FOUND" ]] && { echo "$FOUND" ; DID=1 ; } done ((DID)) || { echo "ERROR: ${MYNAME} - No ${TYPE}match for ${1}" ; exit 9; } diff --git a/firmware/buildroot/bin/opt_set b/firmware/buildroot/bin/opt_set old mode 100755 new mode 100644 index b993551..cf8bbb9 --- a/firmware/buildroot/bin/opt_set +++ b/firmware/buildroot/bin/opt_set @@ -1,17 +1,25 @@ -#!/usr/bin/env bash +#!/usr/bin/env python -# exit on first failure -set -e +import sys, os, config -SED=$(which gsed sed | head -n1) +def main(): + args = sys.argv[1:] + if len(args) % 2 != 0: + print("ERROR: Please provide pairs of ") + return -while [[ $# > 1 ]]; do - DID=0 - for FN in Configuration Configuration_adv; do - "${SED}" -i "/^\(\s*\)\/*\s*\(#define\s\+${1}\b\) *\(.*\)$/{s//\1\2 ${2} \/\/ \3/;h};\${x;/./{x;q0};x;q9}" Marlin/$FN.h && DID=1 - done - ((DID)) || - eval "echo '#define ${1} ${2}' >>Marlin/Configuration.h" || - (echo "ERROR: opt_set Can't set or add ${1}" >&2 && exit 9) - shift 2 -done + for i in range(0, len(args), 2): + name = args[i] + value = args[i + 1] + changed = False + + for file in config.FILES: + if os.path.exists(file): + if config.set(file, name, value): + changed = True + + if not changed: + config.add(config.FILES[0], name, value) + +if __name__ == "__main__": + main() diff --git a/firmware/buildroot/bin/pins_set b/firmware/buildroot/bin/pins_set deleted file mode 100755 index 216eabc..0000000 --- a/firmware/buildroot/bin/pins_set +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -IFS='/' read -r -a PINPATH <<< "$1" -DIR=${PINPATH[0]} -NAM=${PINPATH[1]} - -SED=$(which gsed sed | head -n1) - -shift -while [[ $# > 1 ]]; do - PIN=$1 ; VAL=$2 - FOUT="${DIR}/pins_${NAM}.h" - eval "${SED} -i '/^[[:blank:]]*\(\/\/\)*[[:blank:]]*\(#define \+${PIN}\b\).*$/{s//\2 ${VAL}/;h};\${x;/./{x;q0};x;q9}' Marlin/src/pins/${FOUT}" || - (echo "ERROR: pins_set Can't find ${PIN} in ${FOUT}" >&2 && exit 9) - shift 2 -done diff --git a/firmware/buildroot/bin/restore_configs b/firmware/buildroot/bin/restore_configs old mode 100755 new mode 100644 diff --git a/firmware/buildroot/bin/run_tests b/firmware/buildroot/bin/run_tests old mode 100755 new mode 100644 diff --git a/firmware/buildroot/bin/uncrust b/firmware/buildroot/bin/uncrust old mode 100755 new mode 100644 diff --git a/firmware/buildroot/bin/use_example_configs b/firmware/buildroot/bin/use_example_configs old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/boards/marlin_MKS_TinyBee.json b/firmware/buildroot/share/PlatformIO/boards/marlin_MKS_TinyBee.json new file mode 100644 index 0000000..719337f --- /dev/null +++ b/firmware/buildroot/share/PlatformIO/boards/marlin_MKS_TinyBee.json @@ -0,0 +1,38 @@ +{ + "build": { + "arduino":{ + "ldscript": "esp32_out.ld" + }, + "core": "esp32", + "extra_flags": "-DARDUINO_ESP32_DEV", + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "mcu": "esp32", + "variant": "esp32" + }, + "connectivity": [ + "wifi", + "bluetooth", + "ethernet", + "can" + ], + "debug": { + "openocd_board": "esp-wroom-32.cfg" + }, + "frameworks": [ + "arduino", + "espidf" + ], + "name": "MKS TinyBee V1.0", + "upload": { + "flash_size": "8MB", + "maximum_ram_size": 524288, + "maximum_size": 8388608, + "require_upload_port": true, + "speed": 460800, + "offset_address": 65536 + }, + "url": "https://github.com/makerbase-mks/MKS-TinyBee", + "vendor": "MKS Makerbase" +} diff --git a/firmware/buildroot/share/PlatformIO/boards/marlin_CREALITY_STM32F401RE.json b/firmware/buildroot/share/PlatformIO/boards/marlin_STM32F401RE_creality.json similarity index 96% rename from firmware/buildroot/share/PlatformIO/boards/marlin_CREALITY_STM32F401RE.json rename to firmware/buildroot/share/PlatformIO/boards/marlin_STM32F401RE_creality.json index 31739c3..031d804 100644 --- a/firmware/buildroot/share/PlatformIO/boards/marlin_CREALITY_STM32F401RE.json +++ b/firmware/buildroot/share/PlatformIO/boards/marlin_STM32F401RE_creality.json @@ -16,7 +16,7 @@ ], "ldscript": "ldscript.ld", "mcu": "stm32f401ret6", - "variant": "MARLIN_CREALITY_STM32F401RE" + "variant": "MARLIN_F401RE_CREALITY" }, "debug": { "jlink_device": "STM32F401RE", diff --git a/firmware/buildroot/share/PlatformIO/boards/marlin_STM32F401RE_freeruns.json b/firmware/buildroot/share/PlatformIO/boards/marlin_STM32F401RE_freeruns.json index 3a8848e..96f06b3 100644 --- a/firmware/buildroot/share/PlatformIO/boards/marlin_STM32F401RE_freeruns.json +++ b/firmware/buildroot/share/PlatformIO/boards/marlin_STM32F401RE_freeruns.json @@ -16,7 +16,7 @@ ], "ldscript": "ldscript.ld", "mcu": "stm32f401ret6", - "variant": "MARLIN_STM32F401RE_FREERUNS" + "variant": "MARLIN_F401RE_FREERUNS" }, "debug": { "jlink_device": "STM32F401RE", diff --git a/firmware/buildroot/share/PlatformIO/ldscripts/mks_robin_mini.ld b/firmware/buildroot/share/PlatformIO/ldscripts/mks_robin_mini.ld old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/ldscripts/mks_robin_nano.ld b/firmware/buildroot/share/PlatformIO/ldscripts/mks_robin_nano.ld old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/scripts/STM32F1_build_flags.py b/firmware/buildroot/share/PlatformIO/scripts/STM32F1_build_flags.py old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py b/firmware/buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py index 1ded5b4..6fa53ef 100644 --- a/firmware/buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py +++ b/firmware/buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py @@ -3,28 +3,41 @@ # import pioutil if pioutil.is_pio_build(): - import shutil, marlin from pathlib import Path - env = pioutil.env - platform = env.PioPlatform() - board = env.BoardConfig() - FRAMEWORK_DIR = Path(platform.get_package_dir("framework-arduinoststm32-maple")) - assert FRAMEWORK_DIR.is_dir() - - source_root = Path("buildroot/share/PlatformIO/variants") + source_root_str = "buildroot/share/PlatformIO/variants" + source_root = Path(source_root_str) assert source_root.is_dir() + env = pioutil.env + board = env.BoardConfig() variant = board.get("build.variant") - variant_dir = FRAMEWORK_DIR / "STM32F1/variants" / variant source_dir = source_root / variant assert source_dir.is_dir() - if variant_dir.is_dir(): - shutil.rmtree(variant_dir) + if True: + # Copying to the platform folder is still needed by STM32F1 (Maple). + # The alternative code below comes close. See if you can solve it! + platform = env.PioPlatform() + FRAMEWORK_DIR = Path(platform.get_package_dir("framework-arduinoststm32-maple")) + assert FRAMEWORK_DIR.is_dir() - if not variant_dir.is_dir(): - variant_dir.mkdir() + variant_dir = FRAMEWORK_DIR / "STM32F1/variants" / variant - marlin.copytree(source_dir, variant_dir) + if variant_dir.is_dir(): + import shutil + shutil.rmtree(variant_dir) + + if not variant_dir.is_dir(): + variant_dir.mkdir() + + import marlin + marlin.copytree(source_dir, variant_dir) + + else: + + # The following almost works, but __start__ (from wirish/start.S) is not seen by common.inc + board.update("build.variants_dir", source_root_str); + src = str(source_dir) + env.Append(BUILD_FLAGS=[f"-I{src}", f"-L{src}/ld"]) # Add include path for variant diff --git a/firmware/buildroot/share/PlatformIO/scripts/chitu_crypt.py b/firmware/buildroot/share/PlatformIO/scripts/chitu_crypt.py index 71b1153..7c94ef0 100644 --- a/firmware/buildroot/share/PlatformIO/scripts/chitu_crypt.py +++ b/firmware/buildroot/share/PlatformIO/scripts/chitu_crypt.py @@ -34,7 +34,7 @@ if pioutil.is_pio_build(): for loop_counter in range(0, block_size): # meant to make sure different bits of the key are used. - xor_seed = int(loop_counter / key_length) + xor_seed = loop_counter // key_length # IP is a scratch register / R12 ip = loop_counter - (key_length * xor_seed) @@ -83,7 +83,7 @@ if pioutil.is_pio_build(): output_file.write(struct.pack(")', build_filters) - for d in my_srcs: - # Assume normalized relative paths - plain = d[2:-1] - if d[0] == '+': - def addentry(fullpath, info=None): - relp = os.path.relpath(fullpath, marlinbasedir) - if srcfilepattern.match(relp): - if info: - blab("Added src file %s (%s)" % (relp, str(info)), 3) - else: - blab("Added src file %s " % relp, 3) - cur_srcs.add(relp) - # Special rule: If a direct folder is specified add all files within. - fullplain = os.path.join(marlinbasedir, plain) - if os.path.isdir(fullplain): - blab("Directory content addition for %s " % plain, 3) - gpattern = os.path.join(fullplain, "**") - for fname in glob.glob(gpattern, recursive=True): - addentry(fname, "dca") - else: - # Add all the things from the pattern by GLOB. - def srepl(matchi): - g0 = matchi.group(0) - return r"**" + g0[1:] - gpattern = re.sub(r'[*]($|[^*])', srepl, plain) - gpattern = os.path.join(marlinbasedir, gpattern) - for fname in glob.glob(gpattern, recursive=True): - addentry(fname) - else: - # Special rule: If a direct folder is specified then remove all files within. - def onremove(relp, info=None): + # Build the actual equivalent build_src_filter list based on the inclusions by the features. + # PlatformIO doesn't do it this way, but maybe in the future.... + cur_srcs = set() + # Remove the references to the same folder + my_srcs = re.findall(r'([+-]<.*?>)', build_filters) + for d in my_srcs: + # Assume normalized relative paths + plain = d[2:-1] + if d[0] == '+': + def addentry(fullpath, info=None): + relp = os.path.relpath(fullpath, marlinbasedir) + if srcfilepattern.match(relp): if info: - blab("Removed src file %s (%s)" % (relp, str(info)), 3) + blab("Added src file %s (%s)" % (relp, str(info)), 3) else: - blab("Removed src file %s " % relp, 3) - fullplain = os.path.join(marlinbasedir, plain) - if os.path.isdir(fullplain): - blab("Directory content removal for %s " % plain, 2) - def filt(x): - common = os.path.commonpath([plain, x]) - if not common == os.path.normpath(plain): return True - onremove(x, "dcr") - return False - cur_srcs = set(filter(filt, cur_srcs)) - else: - # Remove matching source entries. - def filt(x): - if not fnmatch.fnmatch(x, plain): return True - onremove(x) - return False - cur_srcs = set(filter(filt, cur_srcs)) - # Transform the resulting set into a string. - for x in cur_srcs: - if build_src_filter != "": build_src_filter += ' ' - build_src_filter += "+<" + x + ">" + blab("Added src file %s " % relp, 3) + cur_srcs.add(relp) + # Special rule: If a direct folder is specified add all files within. + fullplain = os.path.join(marlinbasedir, plain) + if os.path.isdir(fullplain): + blab("Directory content addition for %s " % plain, 3) + gpattern = os.path.join(fullplain, "**") + for fname in glob.glob(gpattern, recursive=True): + addentry(fname, "dca") + else: + # Add all the things from the pattern by GLOB. + def srepl(matchi): + g0 = matchi.group(0) + return r"**" + g0[1:] + gpattern = re.sub(r'[*]($|[^*])', srepl, plain) + gpattern = os.path.join(marlinbasedir, gpattern) - #blab("Final build_src_filter: " + build_src_filter, 3) - else: - build_src_filter = build_filters + for fname in glob.glob(gpattern, recursive=True): + addentry(fname) + else: + # Special rule: If a direct folder is specified then remove all files within. + def onremove(relp, info=None): + if info: + blab("Removed src file %s (%s)" % (relp, str(info)), 3) + else: + blab("Removed src file %s " % relp, 3) + fullplain = os.path.join(marlinbasedir, plain) + if os.path.isdir(fullplain): + blab("Directory content removal for %s " % plain, 2) + def filt(x): + common = os.path.commonpath([plain, x]) + if not common == os.path.normpath(plain): return True + onremove(x, "dcr") + return False + cur_srcs = set(filter(filt, cur_srcs)) + else: + # Remove matching source entries. + def filt(x): + if not fnmatch.fnmatch(x, plain): return True + onremove(x) + return False + cur_srcs = set(filter(filt, cur_srcs)) + # Transform the resulting set into a string. + for x in cur_srcs: + if build_src_filter != "": build_src_filter += ' ' + build_src_filter += "+<" + x + ">" # Update in PlatformIO set_env_field('build_src_filter', [build_src_filter]) env.Replace(SRC_FILTER=build_src_filter) + #blab("Final build_src_filter: " + build_src_filter, 3) + # # Use the compiler to get a list of all enabled features # diff --git a/firmware/buildroot/share/PlatformIO/scripts/configuration.py b/firmware/buildroot/share/PlatformIO/scripts/configuration.py old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/scripts/generic_create_variant.py b/firmware/buildroot/share/PlatformIO/scripts/generic_create_variant.py index db7f2e8..d03e0ba 100644 --- a/firmware/buildroot/share/PlatformIO/scripts/generic_create_variant.py +++ b/firmware/buildroot/share/PlatformIO/scripts/generic_create_variant.py @@ -6,6 +6,7 @@ # will be picked up by PlatformIO just like any other variant. # import pioutil, re + marlin_variant_pattern = re.compile("marlin_.*") if pioutil.is_pio_build(): import shutil, marlin @@ -40,26 +41,19 @@ if pioutil.is_pio_build(): FRAMEWORK_DIR = Path(platform.get_package_dir(platform_name)) assert FRAMEWORK_DIR.is_dir() + # + # Point variants_dir to our variant folder when board_build.variant + # is provided and the variant name begins with "marlin_". + # board = env.BoardConfig() - - #mcu_type = board.get("build.mcu")[:-2] variant = board.get("build.variant") + #mcu_type = board.get("build.mcu")[:-2] #series = mcu_type[:7].upper() + "xx" - # Only prepare a new variant if the PlatformIO configuration provides it (board_build.variant). - # This check is important to avoid deleting official board config variants. + # Make sure the local variant sub-folder exists if marlin_variant_pattern.match(str(variant).lower()): - # Prepare a new empty folder at the destination - variant_dir = FRAMEWORK_DIR / "variants" / variant - if variant_dir.is_dir(): - shutil.rmtree(variant_dir) - if not variant_dir.is_dir(): - variant_dir.mkdir() - - # Source dir is a local variant sub-folder - source_dir = Path("buildroot/share/PlatformIO/variants", variant) + here = Path.cwd() + variants_dir = here / 'buildroot' / 'share' / 'PlatformIO' / 'variants' + source_dir = variants_dir / variant assert source_dir.is_dir() - - print("Copying variant " + str(variant) + " to framework directory...") - - marlin.copytree(source_dir, variant_dir) + board.update("build.variants_dir", str(variants_dir)) diff --git a/firmware/buildroot/share/PlatformIO/scripts/mc-apply.py b/firmware/buildroot/share/PlatformIO/scripts/mc-apply.py old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/scripts/offset_and_rename.py b/firmware/buildroot/share/PlatformIO/scripts/offset_and_rename.py index 3535186..c7bb002 100644 --- a/firmware/buildroot/share/PlatformIO/scripts/offset_and_rename.py +++ b/firmware/buildroot/share/PlatformIO/scripts/offset_and_rename.py @@ -24,7 +24,7 @@ if pioutil.is_pio_build(): marlin.relocate_vtab(LD_FLASH_OFFSET) # Flash size - maximum_flash_size = int(board.get("upload.maximum_size") / 1024) + maximum_flash_size = board.get("upload.maximum_size") // 1024 marlin.replace_define('STM32_FLASH_SIZE', maximum_flash_size) # Get upload.maximum_ram_size (defined by /buildroot/share/PlatformIO/boards/VARIOUS.json) diff --git a/firmware/buildroot/share/PlatformIO/scripts/preprocessor.py b/firmware/buildroot/share/PlatformIO/scripts/preprocessor.py index b0fec52..bda00df 100644 --- a/firmware/buildroot/share/PlatformIO/scripts/preprocessor.py +++ b/firmware/buildroot/share/PlatformIO/scripts/preprocessor.py @@ -53,12 +53,14 @@ def run_preprocessor(env, fn=None): # Find a compiler, considering the OS # def search_compiler(env): + global nocache from pathlib import Path, PurePath ENV_BUILD_PATH = Path(env['PROJECT_BUILD_DIR'], env['PIOENV']) GCC_PATH_CACHE = ENV_BUILD_PATH / ".gcc_path" + gccpath = None try: gccpath = env.GetProjectOption('custom_gcc') blab("Getting compiler from env") @@ -71,24 +73,40 @@ def search_compiler(env): blab("Getting g++ path from cache") return GCC_PATH_CACHE.read_text() - # Use any item in $PATH corresponding to a platformio toolchain bin folder path_separator = ':' gcc_exe = '*g++' if env['PLATFORM'] == 'win32': path_separator = ';' gcc_exe += ".exe" + envpath = map(Path, env['ENV']['PATH'].split(path_separator)) + # Search for the compiler in PATH - for ppath in map(Path, env['ENV']['PATH'].split(path_separator)): + for ppath in envpath: + # Use any item in $PATH corresponding to a platformio toolchain bin folder if ppath.match(env['PROJECT_PACKAGES_DIR'] + "/**/bin"): for gpath in ppath.glob(gcc_exe): - gccpath = str(gpath.resolve()) - # Cache the g++ path to no search always - if not nocache and ENV_BUILD_PATH.exists(): - blab("Caching g++ for current env") - GCC_PATH_CACHE.write_text(gccpath) - return gccpath + # Skip '*-elf-g++' (crosstool-NG) except for xtensa32 + if not gpath.stem.endswith('-elf-g++') or "xtensa32" in str(gpath): + gccpath = str(gpath.resolve()) + break + + if not gccpath: + for ppath in envpath: + for gpath in ppath.glob(gcc_exe): + # Skip macOS Clang + if not (gpath == 'usr/bin/g++' and env['PLATFORM'] == 'darwin'): + gccpath = str(gpath.resolve()) + break + + if not gccpath: + gccpath = env.get('CXX') + blab("Couldn't find a compiler! Fallback to '%s'" % gccpath) + nocache = 1 + + # Cache the g++ path to speed up the next build + if not nocache and gccpath and ENV_BUILD_PATH.exists(): + blab("Caching g++ for current env") + GCC_PATH_CACHE.write_text(gccpath) - gccpath = env.get('CXX') - blab("Couldn't find a compiler! Fallback to %s" % gccpath) return gccpath diff --git a/firmware/buildroot/share/PlatformIO/scripts/schema.py b/firmware/buildroot/share/PlatformIO/scripts/schema.py old mode 100755 new mode 100644 index 381a786..d5179d4 --- a/firmware/buildroot/share/PlatformIO/scripts/schema.py +++ b/firmware/buildroot/share/PlatformIO/scripts/schema.py @@ -11,7 +11,7 @@ # been extended to evaluate conditions and can determine what options are actually enabled, not just which # options are uncommented. That will be migrated to this script for standalone migration. # -import re,json +import re, json from pathlib import Path def extend_dict(d:dict, k:tuple): @@ -120,15 +120,13 @@ def extract_files(filekey): defgrep = re.compile(r'^(//)?\s*(#define)\s+([A-Za-z0-9_]+)\s*(.*?)\s*(//.+)?$') # Pattern to match a float value flt = r'[-+]?\s*(\d+\.|\d*\.\d+)([eE][-+]?\d+)?[fF]?' - # Defines to ignore - ignore = ('CONFIGURATION_H_VERSION', 'CONFIGURATION_ADV_H_VERSION', 'CONFIG_EXAMPLES_DIR', 'CONFIG_EXPORT') # Start with unknown state state = Parse.NORMAL # Serial ID sid = 0 # Loop through files and parse them line by line for fn, fk in filekey.items(): - with Path("Marlin", fn).open() as fileobj: + with Path("Marlin", fn).open(encoding='utf-8') as fileobj: section = 'none' # Current Settings section line_number = 0 # Counter for the line number of the file conditions = [] # Create a condition stack for the current file @@ -138,7 +136,7 @@ def extract_files(filekey): eol_options = False # The options came from end of line, so only apply once join_line = False # A flag that the line should be joined with the previous one line = '' # A line buffer to handle \ continuation - last_added_ref = None # Reference to the last added item + last_added_ref = {} # Reference to the last added item # Loop through the lines in the file for the_line in fileobj.readlines(): line_number += 1 @@ -220,7 +218,6 @@ def extract_files(filekey): # Temperature sensors are done if state == Parse.GET_SENSORS: options_json = f'[ {options_json[:-2]} ]' - state = Parse.NORMAL # Strip the leading '* ' from block comments @@ -230,7 +227,7 @@ def extract_files(filekey): if state == Parse.GET_SENSORS: sens = re.match(r'^(-?\d+)\s*:\s*(.+)$', cline) if sens: - s2 = sens[2].replace("'","''") + s2 = sens[2].replace("'", "''") options_json += f"{sens[1]}:'{sens[1]} - {s2}', " elif state == Parse.BLOCK_COMMENT: @@ -255,12 +252,11 @@ def extract_files(filekey): comment_buff = [] state = Parse.BLOCK_COMMENT eol_options = False - elif cpos2 != -1 and (cpos2 < cpos1 or cpos1 == -1): cpos = cpos2 # Comment after a define may be continued on the following lines - if defmatch != None and cpos > 10: + if defmatch is not None and cpos > 10: state = Parse.EOL_COMMENT prev_comment = '\n'.join(comment_buff) comment_buff = [] @@ -327,10 +323,10 @@ def extract_files(filekey): conditions.append([ f'!defined({line[7:].strip()})' ]) # Handle a complete #define line - elif defmatch != None: + elif defmatch is not None: # Get the match groups into vars - enabled, define_name, val = defmatch[1] == None, defmatch[3], defmatch[4] + enabled, define_name, val = defmatch[1] is None, defmatch[3], defmatch[4] # Increment the serial ID sid += 1 @@ -347,14 +343,14 @@ def extract_files(filekey): # Type is based on the value value_type = \ 'switch' if val == '' \ - else 'bool' if re.match(r'^(true|false)$', val) \ else 'int' if re.match(r'^[-+]?\s*\d+$', val) \ else 'ints' if re.match(r'^([-+]?\s*\d+)(\s*,\s*[-+]?\s*\d+)+$', val) \ else 'floats' if re.match(rf'({flt}(\s*,\s*{flt})+)', val) \ else 'float' if re.match(f'^({flt})$', val) \ else 'string' if val[0] == '"' \ else 'char' if val[0] == "'" \ - else 'state' if re.match(r'^(LOW|HIGH)$', val) \ + else 'bool' if val in ('true', 'false') \ + else 'state' if val in ('HIGH', 'LOW') \ else 'enum' if re.match(r'^[A-Za-z0-9_]{3,}$', val) \ else 'int[]' if re.match(r'^{\s*[-+]?\s*\d+(\s*,\s*[-+]?\s*\d+)*\s*}$', val) \ else 'float[]' if re.match(r'^{{\s*{flt}(\s*,\s*{flt})*\s*}}$', val) \ @@ -375,7 +371,7 @@ def extract_files(filekey): # If the comment_buff is not empty, add the comment to the info if comment_buff: - full_comment = '\n'.join(comment_buff) + full_comment = '\n'.join(comment_buff).strip() # An EOL comment will be added later # The handling could go here instead of above @@ -389,9 +385,17 @@ def extract_files(filekey): units = re.match(r'^\(([^)]+)\)', full_comment) if units: units = units[1] - if units == 's' or units == 'sec': units = 'seconds' + if units in ('s', 'sec'): units = 'seconds' define_info['units'] = units + if 'comment' not in define_info or define_info['comment'] == '': + if prev_comment: + define_info['comment'] = prev_comment + prev_comment = '' + + if 'comment' in define_info and define_info['comment'] == '': + del define_info['comment'] + # Set the options for the current #define if define_name == "MOTHERBOARD" and boards != '': define_info['options'] = boards @@ -424,12 +428,12 @@ def extract(): return extract_files({ 'Configuration.h':'basic', 'Configuration_adv.h':'advanced' }) def dump_json(schema:dict, jpath:Path): - with jpath.open('w') as jfile: + with jpath.open('w', encoding='utf-8') as jfile: json.dump(schema, jfile, ensure_ascii=False, indent=2) def dump_yaml(schema:dict, ypath:Path): import yaml - with ypath.open('w') as yfile: + with ypath.open('w', encoding='utf-8') as yfile: yaml.dump(schema, yfile, default_flow_style=False, width=120, indent=2) def main(): diff --git a/firmware/buildroot/share/PlatformIO/scripts/signature.py b/firmware/buildroot/share/PlatformIO/scripts/signature.py old mode 100755 new mode 100644 index 046f02d..6ae3793 --- a/firmware/buildroot/share/PlatformIO/scripts/signature.py +++ b/firmware/buildroot/share/PlatformIO/scripts/signature.py @@ -2,9 +2,7 @@ # # signature.py # -import schema - -import subprocess,re,json,hashlib +import schema, subprocess, re, json, hashlib from datetime import datetime from pathlib import Path from functools import reduce diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/hal_conf_custom.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/hal_conf_custom.h index bbce8a1..b6b95a6 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/hal_conf_custom.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_ARTILLERY_RUBY/hal_conf_custom.h @@ -31,57 +31,153 @@ extern "C" { /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -/* #define HAL_CAN_MODULE_ENABLED */ -/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ -/* #define HAL_CRC_MODULE_ENABLED */ -/* #define HAL_CEC_MODULE_ENABLED */ -/* #define HAL_CRYP_MODULE_ENABLED */ -//#define HAL_DAC_MODULE_ENABLED -/* #define HAL_DCMI_MODULE_ENABLED */ -#define HAL_DMA_MODULE_ENABLED -/* #define HAL_DMA2D_MODULE_ENABLED */ -/* #define HAL_ETH_MODULE_ENABLED */ -#define HAL_FLASH_MODULE_ENABLED -/* #define HAL_NAND_MODULE_ENABLED */ -/* #define HAL_NOR_MODULE_ENABLED */ -/* #define HAL_PCCARD_MODULE_ENABLED */ -/* #define HAL_SRAM_MODULE_ENABLED */ -/* #define HAL_SDRAM_MODULE_ENABLED */ -/* #define HAL_HASH_MODULE_ENABLED */ -#define HAL_GPIO_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -/* #define HAL_SMBUS_MODULE_ENABLED */ -/* #define HAL_I2S_MODULE_ENABLED */ -/* #define HAL_IWDG_MODULE_ENABLED */ -/* #define HAL_LTDC_MODULE_ENABLED */ -/* #define HAL_DSI_MODULE_ENABLED */ -#define HAL_PWR_MODULE_ENABLED -/* #define HAL_QSPI_MODULE_ENABLED */ -#define HAL_RCC_MODULE_ENABLED -/* #define HAL_RNG_MODULE_ENABLED */ -/* #define HAL_RTC_MODULE_ENABLED */ -/* #define HAL_SAI_MODULE_ENABLED */ -/* #define HAL_SD_MODULE_ENABLED */ -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -/* #define HAL_UART_MODULE_ENABLED */ -/* #define HAL_USART_MODULE_ENABLED */ -/* #define HAL_IRDA_MODULE_ENABLED */ -/* #define HAL_SMARTCARD_MODULE_ENABLED */ -/* #define HAL_WWDG_MODULE_ENABLED */ -#define HAL_CORTEX_MODULE_ENABLED -#ifndef HAL_PCD_MODULE_ENABLED - #define HAL_PCD_MODULE_ENABLED //Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + //#define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + #define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + //#define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + //#define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + //#define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_PCD_MODULE_ENABLED + #define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED #endif -/* #define HAL_HCD_MODULE_ENABLED */ -/* #define HAL_FMPI2C_MODULE_ENABLED */ -/* #define HAL_SPDIFRX_MODULE_ENABLED */ -/* #define HAL_DFSDM_MODULE_ENABLED */ -/* #define HAL_LPTIM_MODULE_ENABLED */ -/* #define HAL_MMC_MODULE_ENABLED */ /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_BTT002/hal_conf_extra.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_BTT002/hal_conf_extra.h index ef621d5..51782da 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_BTT002/hal_conf_extra.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_BTT002/hal_conf_extra.h @@ -1,52 +1,150 @@ #pragma once -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED // by default -//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED // by default +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#endif -//#define HAL_SD_MODULE_ENABLED -//#define HAL_DAC_MODULE_ENABLED -//#define HAL_FLASH_MODULE_ENABLED -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CAN_LEGACY_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRYP_MODULE_ENABLED -//#define HAL_DCMI_MODULE_ENABLED -//#define HAL_DMA2D_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_SDRAM_MODULE_ENABLED -//#define HAL_HASH_MODULE_ENABLED -//#define HAL_SMBUS_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_IWDG_MODULE_ENABLED -//#define HAL_LTDC_MODULE_ENABLED -//#define HAL_DSI_MODULE_ENABLED -//#define HAL_QSPI_MODULE_ENABLED -//#define HAL_RNG_MODULE_ENABLED -//#define HAL_SAI_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_FMPI2C_MODULE_ENABLED -//#define HAL_SPDIFRX_MODULE_ENABLED -//#define HAL_DFSDM_MODULE_ENABLED -//#define HAL_LPTIM_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_SD_MODULE_ENABLED + //#define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + //#define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + //#define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_E3_RRF/hal_conf_extra.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_E3_RRF/hal_conf_extra.h index b4eb0f9..7bfa39c 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_E3_RRF/hal_conf_extra.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_E3_RRF/hal_conf_extra.h @@ -1,22 +1,56 @@ #pragma once -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED // by default -//#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) -#define HAL_SD_MODULE_ENABLED +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED // by default +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif #undef HAL_DAC_MODULE_ENABLED #undef HAL_FLASH_MODULE_ENABLED diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_EBB42_V1_1/variant_MARLIN_BTT_EBB42_V1_1.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_EBB42_V1_1/variant_MARLIN_BTT_EBB42_V1_1.h index 9373e2f..170f893 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_EBB42_V1_1/variant_MARLIN_BTT_EBB42_V1_1.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_EBB42_V1_1/variant_MARLIN_BTT_EBB42_V1_1.h @@ -167,7 +167,7 @@ #endif // Extra HAL modules -#if !defined(HAL_DAC_MODULE_DISABLED) +#ifndef HAL_DAC_MODULE_DISABLED #define HAL_DAC_MODULE_ENABLED #endif diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_GTR_V1/hal_conf_extra.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_GTR_V1/hal_conf_extra.h index ef621d5..51782da 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_GTR_V1/hal_conf_extra.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_GTR_V1/hal_conf_extra.h @@ -1,52 +1,150 @@ #pragma once -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED // by default -//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED // by default +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#endif -//#define HAL_SD_MODULE_ENABLED -//#define HAL_DAC_MODULE_ENABLED -//#define HAL_FLASH_MODULE_ENABLED -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CAN_LEGACY_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRYP_MODULE_ENABLED -//#define HAL_DCMI_MODULE_ENABLED -//#define HAL_DMA2D_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_SDRAM_MODULE_ENABLED -//#define HAL_HASH_MODULE_ENABLED -//#define HAL_SMBUS_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_IWDG_MODULE_ENABLED -//#define HAL_LTDC_MODULE_ENABLED -//#define HAL_DSI_MODULE_ENABLED -//#define HAL_QSPI_MODULE_ENABLED -//#define HAL_RNG_MODULE_ENABLED -//#define HAL_SAI_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_FMPI2C_MODULE_ENABLED -//#define HAL_SPDIFRX_MODULE_ENABLED -//#define HAL_DFSDM_MODULE_ENABLED -//#define HAL_LPTIM_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_SD_MODULE_ENABLED + //#define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + //#define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + //#define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_OCTOPUS_PRO_V1_F429/hal_conf_extra.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_OCTOPUS_PRO_V1_F429/hal_conf_extra.h index d62c510..8325aba 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_OCTOPUS_PRO_V1_F429/hal_conf_extra.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_OCTOPUS_PRO_V1_F429/hal_conf_extra.h @@ -1,22 +1,56 @@ #pragma once -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED // by default -//#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) -#define HAL_SD_MODULE_ENABLED +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED // by default +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif //#undef HAL_SD_MODULE_ENABLED #undef HAL_DAC_MODULE_ENABLED diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_OCTOPUS_V1/hal_conf_extra.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_OCTOPUS_V1/hal_conf_extra.h index d62c510..8325aba 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_OCTOPUS_V1/hal_conf_extra.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_OCTOPUS_V1/hal_conf_extra.h @@ -1,22 +1,56 @@ #pragma once -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED // by default -//#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) -#define HAL_SD_MODULE_ENABLED +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED // by default +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif //#undef HAL_SD_MODULE_ENABLED #undef HAL_DAC_MODULE_ENABLED diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_PRO_11/hal_conf_extra.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_PRO_11/hal_conf_extra.h index ef621d5..51782da 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_PRO_11/hal_conf_extra.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_PRO_11/hal_conf_extra.h @@ -1,52 +1,150 @@ #pragma once -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED // by default -//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED // by default +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#endif -//#define HAL_SD_MODULE_ENABLED -//#define HAL_DAC_MODULE_ENABLED -//#define HAL_FLASH_MODULE_ENABLED -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CAN_LEGACY_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRYP_MODULE_ENABLED -//#define HAL_DCMI_MODULE_ENABLED -//#define HAL_DMA2D_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_SDRAM_MODULE_ENABLED -//#define HAL_HASH_MODULE_ENABLED -//#define HAL_SMBUS_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_IWDG_MODULE_ENABLED -//#define HAL_LTDC_MODULE_ENABLED -//#define HAL_DSI_MODULE_ENABLED -//#define HAL_QSPI_MODULE_ENABLED -//#define HAL_RNG_MODULE_ENABLED -//#define HAL_SAI_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_FMPI2C_MODULE_ENABLED -//#define HAL_SPDIFRX_MODULE_ENABLED -//#define HAL_DFSDM_MODULE_ENABLED -//#define HAL_LPTIM_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_SD_MODULE_ENABLED + //#define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + //#define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + //#define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h index f355549..1519ca3 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h @@ -37,61 +37,171 @@ extern "C" { /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CEC_MODULE_ENABLED -#define HAL_COMP_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_CRYP_MODULE_ENABLED -#define HAL_DAC_MODULE_ENABLED -#define HAL_DCMI_MODULE_ENABLED -#define HAL_DFSDM_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_DMA2D_MODULE_ENABLED -#define HAL_DSI_MODULE_ENABLED -#define HAL_ETH_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_FDCAN_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED -#define HAL_HASH_MODULE_ENABLED -#define HAL_HCD_MODULE_ENABLED -#define HAL_HRTIM_MODULE_ENABLED -#define HAL_HSEM_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_I2S_MODULE_ENABLED -#define HAL_IRDA_MODULE_ENABLED -#define HAL_IWDG_MODULE_ENABLED -#define HAL_JPEG_MODULE_ENABLED -#define HAL_LPTIM_MODULE_ENABLED -#define HAL_LTDC_MODULE_ENABLED -#define HAL_MDIOS_MODULE_ENABLED -#define HAL_MDMA_MODULE_ENABLED -#define HAL_MMC_MODULE_ENABLED -#define HAL_NAND_MODULE_ENABLED -#define HAL_NOR_MODULE_ENABLED -#define HAL_OPAMP_MODULE_ENABLED -#define HAL_PCD_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_QSPI_MODULE_ENABLED -#define HAL_RAMECC_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_RNG_MODULE_ENABLED -#define HAL_RTC_MODULE_ENABLED -#define HAL_SAI_MODULE_ENABLED -#define HAL_SD_MODULE_ENABLED -#define HAL_SDRAM_MODULE_ENABLED -#define HAL_SMARTCARD_MODULE_ENABLED -#define HAL_SMBUS_MODULE_ENABLED -#define HAL_SPDIFRX_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_SRAM_MODULE_ENABLED -#define HAL_SWPMI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_UART_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_WWDG_MODULE_ENABLED +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + #define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_COMP_MODULE_ENABLED + #define HAL_COMP_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + #define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + #define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + #define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + #define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + #define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + #define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + #define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_FDCAN_MODULE_ENABLED + #define HAL_FDCAN_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + #define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + #define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + #define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_HRTIM_MODULE_ENABLED + #define HAL_HRTIM_MODULE_ENABLED +#endif +#ifndef HAL_HSEM_MODULE_ENABLED + #define HAL_HSEM_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + #define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + #define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + #define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_JPEG_MODULE_ENABLED + #define HAL_JPEG_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + #define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + #define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_MDIOS_MODULE_ENABLED + #define HAL_MDIOS_MODULE_ENABLED +#endif +#ifndef HAL_MDMA_MODULE_ENABLED + #define HAL_MDMA_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + #define HAL_MMC_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + #define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + #define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_OPAMP_MODULE_ENABLED + #define HAL_OPAMP_MODULE_ENABLED +#endif +#ifndef HAL_PCD_MODULE_ENABLED + #define HAL_PCD_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + #define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RAMECC_MODULE_ENABLED + #define HAL_RAMECC_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + #define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + #define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + #define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + #define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + #define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + #define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + #define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + #define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SWPMI_MODULE_ENABLED + #define HAL_SWPMI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + #define HAL_UART_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + #define HAL_WWDG_MODULE_ENABLED +#endif #endif /* ########################## Oscillator Values adaptation ####################*/ diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h index f03ba32..1d15d32 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h @@ -188,9 +188,15 @@ extern "C" { // #define USE_USB_FS /* Extra HAL modules */ -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_DAC_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif #ifdef __cplusplus } // extern "C" diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h index 7452020..d3e9e08 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h @@ -142,7 +142,9 @@ extern "C" { // Extra HAL modules #if defined(STM32F103xE) || defined(STM32F103xG) -#define HAL_DAC_MODULE_ENABLED + #ifndef HAL_DAC_MODULE_ENABLED + #define HAL_DAC_MODULE_ENABLED + #endif #endif #ifdef __cplusplus diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h index b684a09..f674c0d 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h @@ -30,8 +30,12 @@ extern "C" { #undef HAL_HCD_MODULE_ENABLED // USB Host #endif -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_IWDG_MODULE_ENABLED // USE_WATCHDOG +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + #define HAL_IWDG_MODULE_ENABLED // USE_WATCHDOG +#endif #undef HAL_PWR_MODULE_ENABLED #define HAL_PWR_MODULE_ONLY // disable low power & PA0 wakeup pin (its T°c pin) @@ -44,39 +48,105 @@ extern "C" { /** * @brief List of modules in the framework (first ones enabled by default) */ -//#define HAL_MODULE_ENABLED -//#define HAL_ADC_MODULE_ENABLED -//#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_DAC_MODULE_ENABLED -//#define HAL_DMA_MODULE_ENABLED -//#define HAL_FLASH_MODULE_ENABLED -//#define HAL_GPIO_MODULE_ENABLED -//#define HAL_I2C_MODULE_ENABLED -//#define HAL_PCD_MODULE_ENABLED -//#define HAL_PWR_MODULE_ENABLED -//#define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED -//#define HAL_SD_MODULE_ENABLED -//#define HAL_SPI_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_TIM_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CAN_LEGACY_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRC_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_IWDG_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_USART_MODULE_ENABLED // Useless.... UART_MODULE does it -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_MODULE_ENABLED + //#define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + //#define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + //#define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + //#define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + //#define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + //#define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + //#define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + //#define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + //#define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + //#define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + //#define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + //#define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED +#endif +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + //#define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + //#define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + //#define HAL_USART_MODULE_ENABLED // Useless.... UART_MODULE does it +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif /* ########################## Oscillator Values adaptation ####################*/ /** diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h index 3fac649..05ce716 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h @@ -140,9 +140,15 @@ extern "C" { // Extra HAL modules #ifdef STM32F103xE -//#define HAL_DAC_MODULE_ENABLED (unused or maybe for the eeprom write?) -#define HAL_SD_MODULE_ENABLED -#define HAL_SRAM_MODULE_ENABLED +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED (unused or maybe for the eeprom write?) +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + #define HAL_SRAM_MODULE_ENABLED +#endif #endif #ifdef __cplusplus diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h index 4061db4..8ed0025 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h @@ -145,9 +145,15 @@ extern "C" { // Extra HAL modules #if defined(STM32F103xE) || defined(STM32F103xG) -#define HAL_DAC_MODULE_ENABLED -#define HAL_SD_MODULE_ENABLED -#define HAL_SRAM_MODULE_ENABLED +#ifndef HAL_DAC_MODULE_ENABLED + #define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + #define HAL_SRAM_MODULE_ENABLED +#endif #endif // Default pin used for 'Serial' instance (ex: ST-Link) diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h index a9475db..41d7cad 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h @@ -37,24 +37,60 @@ extern "C" { /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_FLASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_IWDG_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_SRAM_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED // by default -//#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) -#define HAL_SD_MODULE_ENABLED +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + #define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + #define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + #define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED // by default +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif #undef HAL_CAN_MODULE_ENABLED #undef HAL_CAN_LEGACY_MODULE_ENABLED diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h index 8de1e06..1006906 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/variant.h @@ -198,9 +198,15 @@ extern "C" { #define PIN_SERIAL3_TX PB10 /* Extra HAL modules */ -#define HAL_DAC_MODULE_ENABLED -#define HAL_SD_MODULE_ENABLED -#define HAL_SRAM_MODULE_ENABLED +#ifndef HAL_DAC_MODULE_ENABLED + #define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + #define HAL_SRAM_MODULE_ENABLED +#endif #ifdef __cplusplus } // extern "C" diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC/variant_MARLIN_STM32F401RC.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC/variant_MARLIN_STM32F401RC.h index 37d60d9..779ef92 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC/variant_MARLIN_STM32F401RC.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC/variant_MARLIN_STM32F401RC.h @@ -153,7 +153,7 @@ #endif // Extra HAL modules -#if !defined(HAL_SD_MODULE_DISABLED) +#ifndef HAL_SD_MODULE_DISABLED #define HAL_SD_MODULE_ENABLED #endif diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/PeripheralPins.c b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/PeripheralPins.c similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/PeripheralPins.c rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/PeripheralPins.c diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/PinNamesVar.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/PinNamesVar.h similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/PinNamesVar.h rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/PinNamesVar.h diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/hal_conf_custom.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/hal_conf_custom.h similarity index 82% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/hal_conf_custom.h rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/hal_conf_custom.h index 808b558..105f8a4 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/hal_conf_custom.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/hal_conf_custom.h @@ -31,56 +31,154 @@ extern "C" { /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_IWDG_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_RTC_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + #define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + #define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + #define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#endif -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CAN_LEGACY_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRYP_MODULE_ENABLED -//#define HAL_DAC_MODULE_ENABLED -//#define HAL_DCMI_MODULE_ENABLED -//#define HAL_DMA2D_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_SDRAM_MODULE_ENABLED -//#define HAL_HASH_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED -//#define HAL_SMBUS_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_LTDC_MODULE_ENABLED -//#define HAL_DSI_MODULE_ENABLED -//#define HAL_QSPI_MODULE_ENABLED -//#define HAL_RNG_MODULE_ENABLED -//#define HAL_SAI_MODULE_ENABLED -#define HAL_SD_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED -//#define HAL_USART_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_FMPI2C_MODULE_ENABLED -//#define HAL_SPDIFRX_MODULE_ENABLED -//#define HAL_DFSDM_MODULE_ENABLED -//#define HAL_LPTIM_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + //#define HAL_EXTI_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + //#define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/ldscript.ld b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/ldscript.ld similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/ldscript.ld rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/ldscript.ld diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.cpp b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/variant.cpp similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.cpp rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/variant.cpp diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/variant.h similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RC/variant.h rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RC_CREALITY/variant.h diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/PeripheralPins.c b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/PeripheralPins.c similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/PeripheralPins.c rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/PeripheralPins.c diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/PinNamesVar.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/PinNamesVar.h similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/PinNamesVar.h rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/PinNamesVar.h diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/hal_conf_custom.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/hal_conf_custom.h similarity index 82% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/hal_conf_custom.h rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/hal_conf_custom.h index 1dd047b..cd07995 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/hal_conf_custom.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/hal_conf_custom.h @@ -31,56 +31,154 @@ extern "C" { /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_IWDG_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_RTC_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + #define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + #define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + #define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#endif -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CAN_LEGACY_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRYP_MODULE_ENABLED -//#define HAL_DAC_MODULE_ENABLED -//#define HAL_DCMI_MODULE_ENABLED -//#define HAL_DMA2D_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_SDRAM_MODULE_ENABLED -//#define HAL_HASH_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED -//#define HAL_SMBUS_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_LTDC_MODULE_ENABLED -//#define HAL_DSI_MODULE_ENABLED -//#define HAL_QSPI_MODULE_ENABLED -//#define HAL_RNG_MODULE_ENABLED -//#define HAL_SAI_MODULE_ENABLED -#define HAL_SD_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED -//#define HAL_USART_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_FMPI2C_MODULE_ENABLED -//#define HAL_SPDIFRX_MODULE_ENABLED -//#define HAL_DFSDM_MODULE_ENABLED -//#define HAL_LPTIM_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + //#define HAL_EXTI_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + //#define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/ldscript.ld b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/ldscript.ld similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/ldscript.ld rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/ldscript.ld diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/variant.cpp b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/variant.cpp similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/variant.cpp rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/variant.cpp diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/variant.h similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_CREALITY_STM32F401RE/variant.h rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_CREALITY/variant.h diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/PeripheralPins.c b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/PeripheralPins.c similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/PeripheralPins.c rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/PeripheralPins.c diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/PinNamesVar.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/PinNamesVar.h similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/PinNamesVar.h rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/PinNamesVar.h diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/hal_conf_custom.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/hal_conf_custom.h similarity index 82% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/hal_conf_custom.h rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/hal_conf_custom.h index 808b558..105f8a4 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/hal_conf_custom.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/hal_conf_custom.h @@ -31,56 +31,154 @@ extern "C" { /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_IWDG_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_RTC_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + #define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + #define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + #define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#endif -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CAN_LEGACY_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRYP_MODULE_ENABLED -//#define HAL_DAC_MODULE_ENABLED -//#define HAL_DCMI_MODULE_ENABLED -//#define HAL_DMA2D_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_SDRAM_MODULE_ENABLED -//#define HAL_HASH_MODULE_ENABLED -//#define HAL_EXTI_MODULE_ENABLED -//#define HAL_SMBUS_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_LTDC_MODULE_ENABLED -//#define HAL_DSI_MODULE_ENABLED -//#define HAL_QSPI_MODULE_ENABLED -//#define HAL_RNG_MODULE_ENABLED -//#define HAL_SAI_MODULE_ENABLED -#define HAL_SD_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED -//#define HAL_USART_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_FMPI2C_MODULE_ENABLED -//#define HAL_SPDIFRX_MODULE_ENABLED -//#define HAL_DFSDM_MODULE_ENABLED -//#define HAL_LPTIM_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + //#define HAL_EXTI_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + //#define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/ldscript.ld b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/ldscript.ld similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/ldscript.ld rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/ldscript.ld diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.cpp b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/variant.cpp similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.cpp rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/variant.cpp diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/variant.h similarity index 100% rename from firmware/buildroot/share/PlatformIO/variants/MARLIN_STM32F401RE_FREERUNS/variant.h rename to firmware/buildroot/share/PlatformIO/variants/MARLIN_F401RE_FREERUNS/variant.h diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F407VE/hal_conf_custom.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F407VE/hal_conf_custom.h index ea5e2cc..2894696 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F407VE/hal_conf_custom.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F407VE/hal_conf_custom.h @@ -31,56 +31,154 @@ extern "C" { /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DAC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_FLASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_RTC_MODULE_ENABLED -#define HAL_SD_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + #define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + #define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + #define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#endif -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CAN_LEGACY_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRYP_MODULE_ENABLED -//#define HAL_DCMI_MODULE_ENABLED -//#define HAL_DMA2D_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_SDRAM_MODULE_ENABLED -//#define HAL_HASH_MODULE_ENABLED -//#define HAL_SMBUS_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_IWDG_MODULE_ENABLED -//#define HAL_LTDC_MODULE_ENABLED -//#define HAL_DSI_MODULE_ENABLED -//#define HAL_QSPI_MODULE_ENABLED -//#define HAL_RNG_MODULE_ENABLED -//#define HAL_SAI_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED -//#define HAL_USART_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_FMPI2C_MODULE_ENABLED -//#define HAL_SPDIFRX_MODULE_ENABLED -//#define HAL_DFSDM_MODULE_ENABLED -//#define HAL_LPTIM_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + //#define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + //#define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h index df45a5d..3444315 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h @@ -320,8 +320,12 @@ extern "C" { #define PIN_SERIAL_TX PA9 /* Extra HAL modules */ -#define HAL_DAC_MODULE_ENABLED -#define HAL_SD_MODULE_ENABLED +#ifndef HAL_DAC_MODULE_ENABLED + #define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif #ifdef __cplusplus } // extern "C" diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F407ZE/hal_conf_extra.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F407ZE/hal_conf_extra.h index d62c510..8325aba 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F407ZE/hal_conf_extra.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F407ZE/hal_conf_extra.h @@ -1,22 +1,56 @@ #pragma once -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED // by default -//#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) -#define HAL_SD_MODULE_ENABLED +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED // by default +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif //#undef HAL_SD_MODULE_ENABLED #undef HAL_DAC_MODULE_ENABLED diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/hal_conf_custom.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/hal_conf_custom.h index c23d30c..9b03588 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/hal_conf_custom.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F446Zx_TRONXY/hal_conf_custom.h @@ -31,57 +31,153 @@ extern "C" { /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -/* #define HAL_CAN_MODULE_ENABLED */ -/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ -#define HAL_CRC_MODULE_ENABLED -/* #define HAL_CEC_MODULE_ENABLED */ -/* #define HAL_CRYP_MODULE_ENABLED */ -#define HAL_DAC_MODULE_ENABLED -/* #define HAL_DCMI_MODULE_ENABLED */ -#define HAL_DMA_MODULE_ENABLED -/* #define HAL_DMA2D_MODULE_ENABLED */ -/* #define HAL_ETH_MODULE_ENABLED */ -#define HAL_FLASH_MODULE_ENABLED -/* #define HAL_NAND_MODULE_ENABLED */ -/* #define HAL_NOR_MODULE_ENABLED */ -/* #define HAL_PCCARD_MODULE_ENABLED */ -#define HAL_SRAM_MODULE_ENABLED //YSZ-WORK -/* #define HAL_SDRAM_MODULE_ENABLED */ -/* #define HAL_HASH_MODULE_ENABLED */ -#define HAL_GPIO_MODULE_ENABLED -/* #define HAL_EXTI_MODULE_ENABLED */ -#define HAL_I2C_MODULE_ENABLED -/* #define HAL_SMBUS_MODULE_ENABLED */ -/* #define HAL_I2S_MODULE_ENABLED */ -/* #define HAL_IWDG_MODULE_ENABLED */ -/* #define HAL_LTDC_MODULE_ENABLED */ -/* #define HAL_DSI_MODULE_ENABLED */ -#define HAL_PWR_MODULE_ENABLED -/* #define HAL_QSPI_MODULE_ENABLED */ -#define HAL_RCC_MODULE_ENABLED -/* #define HAL_RNG_MODULE_ENABLED */ -#define HAL_RTC_MODULE_ENABLED -/* #define HAL_SAI_MODULE_ENABLED */ -#define HAL_SD_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -/* #define HAL_UART_MODULE_ENABLED */ -/* #define HAL_USART_MODULE_ENABLED */ -/* #define HAL_IRDA_MODULE_ENABLED */ -/* #define HAL_SMARTCARD_MODULE_ENABLED */ -/* #define HAL_WWDG_MODULE_ENABLED */ -#define HAL_CORTEX_MODULE_ENABLED -#ifndef HAL_PCD_MODULE_ENABLED - #define HAL_PCD_MODULE_ENABLED //Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + #define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + #define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + #define HAL_SRAM_MODULE_ENABLED // YSZ-WORK +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + //#define HAL_EXTI_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + //#define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + #define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + //#define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_PCD_MODULE_ENABLED + #define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#endif +#ifndef HAL_HCD_MODULE_ENABLED + #define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED #endif -#define HAL_HCD_MODULE_ENABLED -/* #define HAL_FMPI2C_MODULE_ENABLED */ -/* #define HAL_SPDIFRX_MODULE_ENABLED */ -/* #define HAL_DFSDM_MODULE_ENABLED */ -/* #define HAL_LPTIM_MODULE_ENABLED */ -/* #define HAL_MMC_MODULE_ENABLED */ /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/hal_conf_extra.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/hal_conf_extra.h index f2f4ed3..2b3e239 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/hal_conf_extra.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/hal_conf_extra.h @@ -34,56 +34,154 @@ /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CAN_LEGACY_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DAC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED -//#define HAL_PCD_MODULE_ENABLED +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + #define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + #define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED +#endif -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRYP_MODULE_ENABLED -//#define HAL_DCMI_MODULE_ENABLED -//#define HAL_DMA2D_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_FLASH_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_SDRAM_MODULE_ENABLED -//#define HAL_HASH_MODULE_ENABLED -//#define HAL_SMBUS_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_IWDG_MODULE_ENABLED -//#define HAL_LTDC_MODULE_ENABLED -//#define HAL_DSI_MODULE_ENABLED -//#define HAL_QSPI_MODULE_ENABLED -//#define HAL_RNG_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED -//#define HAL_SAI_MODULE_ENABLED -//#define HAL_SD_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_FMPI2C_MODULE_ENABLED -//#define HAL_SPDIFRX_MODULE_ENABLED -//#define HAL_DFSDM_MODULE_ENABLED -//#define HAL_LPTIM_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + //#define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + //#define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + //#define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h index d6f8e9f..1eec6ba 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h @@ -171,7 +171,9 @@ extern "C" { #define PIN_SERIAL_TX PA2 /* Extra HAL modules */ -#define HAL_DAC_MODULE_ENABLED +#ifndef HAL_DAC_MODULE_ENABLED + #define HAL_DAC_MODULE_ENABLED +#endif #ifdef __cplusplus } // extern "C" diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h index 80d5d3e..2ed2b04 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h @@ -205,8 +205,12 @@ extern "C" { #define PIN_SERIAL_TX PA9 /* Extra HAL modules */ -//#define HAL_DAC_MODULE_ENABLED -#define HAL_SD_MODULE_ENABLED +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif #ifdef __cplusplus } // extern "C" diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h index fb3d21c..f4e9eaa 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h @@ -31,56 +31,154 @@ extern "C" { /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_FLASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_IWDG_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_RTC_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + #define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + #define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + #define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#endif -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CAN_LEGACY_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRYP_MODULE_ENABLED -//#define HAL_DAC_MODULE_ENABLED -//#define HAL_DCMI_MODULE_ENABLED -//#define HAL_DMA2D_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_SDRAM_MODULE_ENABLED -//#define HAL_HASH_MODULE_ENABLED -//#define HAL_SMBUS_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_LTDC_MODULE_ENABLED -//#define HAL_DSI_MODULE_ENABLED -//#define HAL_QSPI_MODULE_ENABLED -//#define HAL_RNG_MODULE_ENABLED -//#define HAL_SAI_MODULE_ENABLED -//#define HAL_SD_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED -//#define HAL_USART_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_FMPI2C_MODULE_ENABLED -//#define HAL_SPDIFRX_MODULE_ENABLED -//#define HAL_DFSDM_MODULE_ENABLED -//#define HAL_LPTIM_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + //#define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + //#define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/variant_MARLIN_STM32G0B1VE.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/variant_MARLIN_STM32G0B1VE.h index e6f2251..0c999d2 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/variant_MARLIN_STM32G0B1VE.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_G0B1VE/variant_MARLIN_STM32G0B1VE.h @@ -225,7 +225,7 @@ #endif // Extra HAL modules -#if !defined(HAL_DAC_MODULE_DISABLED) +#ifndef HAL_DAC_MODULE_DISABLED #define HAL_DAC_MODULE_ENABLED #endif diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_H723VG/variant_MARLIN_STM32H723VG.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_H723VG/variant_MARLIN_STM32H723VG.h index c3e5c78..e5072e8 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_H723VG/variant_MARLIN_STM32H723VG.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_H723VG/variant_MARLIN_STM32H723VG.h @@ -228,16 +228,16 @@ #endif // Extra HAL modules -#if !defined(HAL_DAC_MODULE_DISABLED) +#ifndef HAL_DAC_MODULE_DISABLED #define HAL_DAC_MODULE_ENABLED #endif -#if !defined(HAL_ETH_MODULE_DISABLED) +#ifndef HAL_ETH_MODULE_DISABLED #define HAL_ETH_MODULE_ENABLED #endif -#if !defined(HAL_OSPI_MODULE_DISABLED) +#ifndef HAL_OSPI_MODULE_DISABLED #define HAL_OSPI_MODULE_ENABLED #endif -#if !defined(HAL_SD_MODULE_DISABLED) +#ifndef HAL_SD_MODULE_DISABLED #define HAL_SD_MODULE_ENABLED #endif diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_H723ZE/variant_MARLIN_STM32H723ZE.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_H723ZE/variant_MARLIN_STM32H723ZE.h index c9c6314..ce6f6e7 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_H723ZE/variant_MARLIN_STM32H723ZE.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_H723ZE/variant_MARLIN_STM32H723ZE.h @@ -269,16 +269,16 @@ #endif // Extra HAL modules -#if !defined(HAL_DAC_MODULE_DISABLED) +#ifndef HAL_DAC_MODULE_DISABLED #define HAL_DAC_MODULE_ENABLED #endif -#if !defined(HAL_ETH_MODULE_DISABLED) +#ifndef HAL_ETH_MODULE_DISABLED #define HAL_ETH_MODULE_ENABLED #endif -#if !defined(HAL_OSPI_MODULE_DISABLED) +#ifndef HAL_OSPI_MODULE_DISABLED #define HAL_OSPI_MODULE_ENABLED #endif -#if !defined(HAL_SD_MODULE_DISABLED) +#ifndef HAL_SD_MODULE_DISABLED #define HAL_SD_MODULE_ENABLED #endif diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/variant_MARLIN_STM32H723ZG.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/variant_MARLIN_STM32H723ZG.h index 1b518f0..5174ce0 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/variant_MARLIN_STM32H723ZG.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_H723ZG/variant_MARLIN_STM32H723ZG.h @@ -267,16 +267,16 @@ #endif // Extra HAL modules -#if !defined(HAL_DAC_MODULE_DISABLED) +#ifndef HAL_DAC_MODULE_DISABLED #define HAL_DAC_MODULE_ENABLED #endif -#if !defined(HAL_ETH_MODULE_DISABLED) +#ifndef HAL_ETH_MODULE_DISABLED #define HAL_ETH_MODULE_ENABLED #endif -#if !defined(HAL_OSPI_MODULE_DISABLED) +#ifndef HAL_OSPI_MODULE_DISABLED #define HAL_OSPI_MODULE_ENABLED #endif -#if !defined(HAL_SD_MODULE_DISABLED) +#ifndef HAL_SD_MODULE_DISABLED #define HAL_SD_MODULE_ENABLED #endif diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_I3DBEEZ9/hal_conf_extra.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_I3DBEEZ9/hal_conf_extra.h index ef621d5..51782da 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_I3DBEEZ9/hal_conf_extra.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_I3DBEEZ9/hal_conf_extra.h @@ -1,52 +1,150 @@ #pragma once -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED // by default -//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED // by default +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) +#endif -//#define HAL_SD_MODULE_ENABLED -//#define HAL_DAC_MODULE_ENABLED -//#define HAL_FLASH_MODULE_ENABLED -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CAN_LEGACY_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRYP_MODULE_ENABLED -//#define HAL_DCMI_MODULE_ENABLED -//#define HAL_DMA2D_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_SDRAM_MODULE_ENABLED -//#define HAL_HASH_MODULE_ENABLED -//#define HAL_SMBUS_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_IWDG_MODULE_ENABLED -//#define HAL_LTDC_MODULE_ENABLED -//#define HAL_DSI_MODULE_ENABLED -//#define HAL_QSPI_MODULE_ENABLED -//#define HAL_RNG_MODULE_ENABLED -//#define HAL_SAI_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_FMPI2C_MODULE_ENABLED -//#define HAL_SPDIFRX_MODULE_ENABLED -//#define HAL_DFSDM_MODULE_ENABLED -//#define HAL_LPTIM_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_SD_MODULE_ENABLED + //#define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + //#define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + //#define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h index e71bb1c..0664c5c 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h @@ -210,10 +210,18 @@ extern "C" { #define PIN_SERIAL_TX PA9 /* Extra HAL modules */ -//#define HAL_DAC_MODULE_ENABLED -#define HAL_SD_MODULE_ENABLED -#define HAL_SRAM_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + #define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif #ifdef __cplusplus } // extern "C" diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_MKS_ROBIN2/hal_conf_custom.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_MKS_ROBIN2/hal_conf_custom.h index 3640bd1..c017819 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_MKS_ROBIN2/hal_conf_custom.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_MKS_ROBIN2/hal_conf_custom.h @@ -31,55 +31,153 @@ extern "C" { /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -/* #define HAL_CAN_MODULE_ENABLED */ -/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ -#define HAL_CRC_MODULE_ENABLED -/* #define HAL_CEC_MODULE_ENABLED */ -/* #define HAL_CRYP_MODULE_ENABLED */ -#define HAL_DAC_MODULE_ENABLED -/* #define HAL_DCMI_MODULE_ENABLED */ -#define HAL_DMA_MODULE_ENABLED -/* #define HAL_DMA2D_MODULE_ENABLED */ -/* #define HAL_ETH_MODULE_ENABLED */ -#define HAL_FLASH_MODULE_ENABLED -/* #define HAL_NAND_MODULE_ENABLED */ -/* #define HAL_NOR_MODULE_ENABLED */ -/* #define HAL_PCCARD_MODULE_ENABLED */ -#define HAL_SRAM_MODULE_ENABLED -/* #define HAL_SDRAM_MODULE_ENABLED */ -/* #define HAL_HASH_MODULE_ENABLED */ -#define HAL_GPIO_MODULE_ENABLED -/* #define HAL_EXTI_MODULE_ENABLED */ -#define HAL_I2C_MODULE_ENABLED -/* #define HAL_SMBUS_MODULE_ENABLED */ -/* #define HAL_I2S_MODULE_ENABLED */ -/* #define HAL_IWDG_MODULE_ENABLED */ -/* #define HAL_LTDC_MODULE_ENABLED */ -/* #define HAL_DSI_MODULE_ENABLED */ -#define HAL_PWR_MODULE_ENABLED -/* #define HAL_QSPI_MODULE_ENABLED */ -#define HAL_RCC_MODULE_ENABLED -/* #define HAL_RNG_MODULE_ENABLED */ -#define HAL_RTC_MODULE_ENABLED -/* #define HAL_SAI_MODULE_ENABLED */ -#define HAL_SD_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -/* #define HAL_UART_MODULE_ENABLED */ -/* #define HAL_USART_MODULE_ENABLED */ -/* #define HAL_IRDA_MODULE_ENABLED */ -/* #define HAL_SMARTCARD_MODULE_ENABLED */ -/* #define HAL_WWDG_MODULE_ENABLED */ -#define HAL_CORTEX_MODULE_ENABLED -//#define HAL_PCD_MODULE_ENABLED -/* #define HAL_HCD_MODULE_ENABLED */ -/* #define HAL_FMPI2C_MODULE_ENABLED */ -/* #define HAL_SPDIFRX_MODULE_ENABLED */ -/* #define HAL_DFSDM_MODULE_ENABLED */ -/* #define HAL_LPTIM_MODULE_ENABLED */ -/* #define HAL_MMC_MODULE_ENABLED */ +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + #define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + #define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + #define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + //#define HAL_EXTI_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + //#define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + #define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + #define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + //#define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_PCD_MODULE_ENABLED + //#define HAL_PCD_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/hal_conf_extra.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/hal_conf_extra.h index 2ca9df2..7820beb 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/hal_conf_extra.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_MKS_SKIPR_V1/hal_conf_extra.h @@ -34,56 +34,148 @@ /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_CAN_LEGACY_MODULE_ENABLED -#define HAL_CRC_MODULE_ENABLED -#define HAL_DAC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_GPIO_MODULE_ENABLED -#define HAL_I2C_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + #define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + #define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + #define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + #define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif // #define HAL_UART_MODULE_ENABLED // #define HAL_PCD_MODULE_ENABLED // #define HAL_CAN_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRYP_MODULE_ENABLED -//#define HAL_DCMI_MODULE_ENABLED -//#define HAL_DMA2D_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_FLASH_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_SDRAM_MODULE_ENABLED -//#define HAL_HASH_MODULE_ENABLED -//#define HAL_SMBUS_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_IWDG_MODULE_ENABLED -//#define HAL_LTDC_MODULE_ENABLED -//#define HAL_DSI_MODULE_ENABLED -//#define HAL_QSPI_MODULE_ENABLED -//#define HAL_RNG_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED -//#define HAL_SAI_MODULE_ENABLED -//#define HAL_SD_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_FMPI2C_MODULE_ENABLED -//#define HAL_SPDIFRX_MODULE_ENABLED -//#define HAL_DFSDM_MODULE_ENABLED -//#define HAL_LPTIM_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + //#define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + //#define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + //#define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/hal_conf_extra.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/hal_conf_extra.h old mode 100755 new mode 100644 index 8a04b8b..0626670 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/hal_conf_extra.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/hal_conf_extra.h @@ -34,56 +34,154 @@ /** * @brief This is the list of modules to be used in the HAL driver */ -#define HAL_MODULE_ENABLED -#define HAL_ADC_MODULE_ENABLED -#define HAL_DMA_MODULE_ENABLED -#define HAL_FLASH_MODULE_ENABLED -#define HAL_GPIO_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts -#define HAL_PWR_MODULE_ENABLED -#define HAL_RCC_MODULE_ENABLED -#define HAL_SPI_MODULE_ENABLED -#define HAL_TIM_MODULE_ENABLED -#define HAL_USART_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED -#define HAL_PCD_MODULE_ENABLED -//#define HAL_UART_MODULE_ENABLED // by default +#ifndef HAL_MODULE_ENABLED + #define HAL_MODULE_ENABLED +#endif +#ifndef HAL_ADC_MODULE_ENABLED + #define HAL_ADC_MODULE_ENABLED +#endif +#ifndef HAL_DMA_MODULE_ENABLED + #define HAL_DMA_MODULE_ENABLED +#endif +#ifndef HAL_FLASH_MODULE_ENABLED + #define HAL_FLASH_MODULE_ENABLED +#endif +#ifndef HAL_GPIO_MODULE_ENABLED + #define HAL_GPIO_MODULE_ENABLED +#endif +#ifndef HAL_EXTI_MODULE_ENABLED + #define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#endif +#ifndef HAL_PWR_MODULE_ENABLED + #define HAL_PWR_MODULE_ENABLED +#endif +#ifndef HAL_RCC_MODULE_ENABLED + #define HAL_RCC_MODULE_ENABLED +#endif +#ifndef HAL_SPI_MODULE_ENABLED + #define HAL_SPI_MODULE_ENABLED +#endif +#ifndef HAL_TIM_MODULE_ENABLED + #define HAL_TIM_MODULE_ENABLED +#endif +#ifndef HAL_USART_MODULE_ENABLED + #define HAL_USART_MODULE_ENABLED +#endif +#ifndef HAL_CORTEX_MODULE_ENABLED + #define HAL_CORTEX_MODULE_ENABLED +#endif +#ifndef HAL_PCD_MODULE_ENABLED + #define HAL_PCD_MODULE_ENABLED +#endif +#ifndef HAL_UART_MODULE_ENABLED + //#define HAL_UART_MODULE_ENABLED // by default +#endif -//#define HAL_CAN_MODULE_ENABLED -//#define HAL_CAN_LEGACY_MODULE_ENABLED -//#define HAL_CRC_MODULE_ENABLED -//#define HAL_CEC_MODULE_ENABLED -//#define HAL_CRYP_MODULE_ENABLED -//#define HAL_DAC_MODULE_ENABLED -//#define HAL_DCMI_MODULE_ENABLED -//#define HAL_DMA2D_MODULE_ENABLED -//#define HAL_ETH_MODULE_ENABLED -//#define HAL_NAND_MODULE_ENABLED -//#define HAL_NOR_MODULE_ENABLED -//#define HAL_PCCARD_MODULE_ENABLED -//#define HAL_SRAM_MODULE_ENABLED -//#define HAL_SDRAM_MODULE_ENABLED -//#define HAL_HASH_MODULE_ENABLED -//#define HAL_I2C_MODULE_ENABLED -//#define HAL_SMBUS_MODULE_ENABLED -//#define HAL_I2S_MODULE_ENABLED -//#define HAL_IWDG_MODULE_ENABLED -//#define HAL_LTDC_MODULE_ENABLED -//#define HAL_DSI_MODULE_ENABLED -//#define HAL_QSPI_MODULE_ENABLED -//#define HAL_RNG_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED -//#define HAL_SAI_MODULE_ENABLED -//#define HAL_SD_MODULE_ENABLED -//#define HAL_IRDA_MODULE_ENABLED -//#define HAL_SMARTCARD_MODULE_ENABLED -//#define HAL_WWDG_MODULE_ENABLED -//#define HAL_HCD_MODULE_ENABLED -//#define HAL_FMPI2C_MODULE_ENABLED -//#define HAL_SPDIFRX_MODULE_ENABLED -//#define HAL_DFSDM_MODULE_ENABLED -//#define HAL_LPTIM_MODULE_ENABLED -//#define HAL_MMC_MODULE_ENABLED +#ifndef HAL_CAN_MODULE_ENABLED + //#define HAL_CAN_MODULE_ENABLED +#endif +#ifndef HAL_CAN_LEGACY_MODULE_ENABLED + //#define HAL_CAN_LEGACY_MODULE_ENABLED +#endif +#ifndef HAL_CRC_MODULE_ENABLED + //#define HAL_CRC_MODULE_ENABLED +#endif +#ifndef HAL_CEC_MODULE_ENABLED + //#define HAL_CEC_MODULE_ENABLED +#endif +#ifndef HAL_CRYP_MODULE_ENABLED + //#define HAL_CRYP_MODULE_ENABLED +#endif +#ifndef HAL_DAC_MODULE_ENABLED + //#define HAL_DAC_MODULE_ENABLED +#endif +#ifndef HAL_DCMI_MODULE_ENABLED + //#define HAL_DCMI_MODULE_ENABLED +#endif +#ifndef HAL_DMA2D_MODULE_ENABLED + //#define HAL_DMA2D_MODULE_ENABLED +#endif +#ifndef HAL_ETH_MODULE_ENABLED + //#define HAL_ETH_MODULE_ENABLED +#endif +#ifndef HAL_NAND_MODULE_ENABLED + //#define HAL_NAND_MODULE_ENABLED +#endif +#ifndef HAL_NOR_MODULE_ENABLED + //#define HAL_NOR_MODULE_ENABLED +#endif +#ifndef HAL_PCCARD_MODULE_ENABLED + //#define HAL_PCCARD_MODULE_ENABLED +#endif +#ifndef HAL_SRAM_MODULE_ENABLED + //#define HAL_SRAM_MODULE_ENABLED +#endif +#ifndef HAL_SDRAM_MODULE_ENABLED + //#define HAL_SDRAM_MODULE_ENABLED +#endif +#ifndef HAL_HASH_MODULE_ENABLED + //#define HAL_HASH_MODULE_ENABLED +#endif +#ifndef HAL_I2C_MODULE_ENABLED + //#define HAL_I2C_MODULE_ENABLED +#endif +#ifndef HAL_SMBUS_MODULE_ENABLED + //#define HAL_SMBUS_MODULE_ENABLED +#endif +#ifndef HAL_I2S_MODULE_ENABLED + //#define HAL_I2S_MODULE_ENABLED +#endif +#ifndef HAL_IWDG_MODULE_ENABLED + //#define HAL_IWDG_MODULE_ENABLED +#endif +#ifndef HAL_LTDC_MODULE_ENABLED + //#define HAL_LTDC_MODULE_ENABLED +#endif +#ifndef HAL_DSI_MODULE_ENABLED + //#define HAL_DSI_MODULE_ENABLED +#endif +#ifndef HAL_QSPI_MODULE_ENABLED + //#define HAL_QSPI_MODULE_ENABLED +#endif +#ifndef HAL_RNG_MODULE_ENABLED + //#define HAL_RNG_MODULE_ENABLED +#endif +#ifndef HAL_RTC_MODULE_ENABLED + //#define HAL_RTC_MODULE_ENABLED +#endif +#ifndef HAL_SAI_MODULE_ENABLED + //#define HAL_SAI_MODULE_ENABLED +#endif +#ifndef HAL_SD_MODULE_ENABLED + //#define HAL_SD_MODULE_ENABLED +#endif +#ifndef HAL_IRDA_MODULE_ENABLED + //#define HAL_IRDA_MODULE_ENABLED +#endif +#ifndef HAL_SMARTCARD_MODULE_ENABLED + //#define HAL_SMARTCARD_MODULE_ENABLED +#endif +#ifndef HAL_WWDG_MODULE_ENABLED + //#define HAL_WWDG_MODULE_ENABLED +#endif +#ifndef HAL_HCD_MODULE_ENABLED + //#define HAL_HCD_MODULE_ENABLED +#endif +#ifndef HAL_FMPI2C_MODULE_ENABLED + //#define HAL_FMPI2C_MODULE_ENABLED +#endif +#ifndef HAL_SPDIFRX_MODULE_ENABLED + //#define HAL_SPDIFRX_MODULE_ENABLED +#endif +#ifndef HAL_DFSDM_MODULE_ENABLED + //#define HAL_DFSDM_MODULE_ENABLED +#endif +#ifndef HAL_LPTIM_MODULE_ENABLED + //#define HAL_LPTIM_MODULE_ENABLED +#endif +#ifndef HAL_MMC_MODULE_ENABLED + //#define HAL_MMC_MODULE_ENABLED +#endif /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/firmware/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h b/firmware/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h index c825a6b..17bb2bf 100644 --- a/firmware/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h +++ b/firmware/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h @@ -116,7 +116,9 @@ extern "C" { #define PIN_SERIAL_TX PA9 /* Extra HAL modules */ -#define HAL_DAC_MODULE_ENABLED +#ifndef HAL_DAC_MODULE_ENABLED + #define HAL_DAC_MODULE_ENABLED +#endif #ifdef __cplusplus } // extern "C" diff --git a/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/common.inc b/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/common.inc old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/extra_libs.inc b/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/extra_libs.inc old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103z_dfu.ld b/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103z_dfu.ld old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103zc.ld b/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103zc.ld old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103zd.ld b/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103zd.ld old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103ze.ld b/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/stm32f103ze.ld old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/vector_symbols.inc b/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/ld/vector_symbols.inc old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/start.S b/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/start.S old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/start_c.c b/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/start_c.c old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/syscalls.c b/firmware/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/syscalls.c old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/dwin/bin/DWIN_ICO.py b/firmware/buildroot/share/dwin/bin/DWIN_ICO.py index ff95b8c..d132000 100644 --- a/firmware/buildroot/share/dwin/bin/DWIN_ICO.py +++ b/firmware/buildroot/share/dwin/bin/DWIN_ICO.py @@ -54,8 +54,7 @@ # does not define a name for 39. This is specially handled to # prevent reordering stock icons. -import os -import struct +import os, struct from PIL import Image def getJpegResolution(jpegFile): diff --git a/firmware/buildroot/share/dwin/bin/makeIco.py b/firmware/buildroot/share/dwin/bin/makeIco.py old mode 100755 new mode 100644 index 95d8150..b69b046 --- a/firmware/buildroot/share/dwin/bin/makeIco.py +++ b/firmware/buildroot/share/dwin/bin/makeIco.py @@ -18,9 +18,7 @@ # along with this program. If not, see . #---------------------------------------------------------------- -import os.path -import argparse -import DWIN_ICO +import os.path, argparse, DWIN_ICO version = '2.0.7' diff --git a/firmware/buildroot/share/dwin/bin/splitIco.py b/firmware/buildroot/share/dwin/bin/splitIco.py old mode 100755 new mode 100644 index a96d182..a1a2097 --- a/firmware/buildroot/share/dwin/bin/splitIco.py +++ b/firmware/buildroot/share/dwin/bin/splitIco.py @@ -18,9 +18,7 @@ # along with this program. If not, see . #---------------------------------------------------------------- -import os.path -import argparse -import DWIN_ICO +import os.path, argparse, DWIN_ICO version = '2.0.7' diff --git a/firmware/buildroot/share/dwin/make_jpgs.sh b/firmware/buildroot/share/dwin/make_jpgs.sh old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/fonts/bdf2u8g/bdf2u8g.c b/firmware/buildroot/share/fonts/bdf2u8g/bdf2u8g.c index ea9f17d..6501ead 100644 --- a/firmware/buildroot/share/fonts/bdf2u8g/bdf2u8g.c +++ b/firmware/buildroot/share/fonts/bdf2u8g/bdf2u8g.c @@ -1090,23 +1090,23 @@ void bdf_WriteC(const char *outname, const char *fontname) { capital_ascent = bdf_capital_A_height > 0 ? bdf_capital_A_height : bdf_capital_1_height; - fprintf(out_fp, "/*\n"); - fprintf(out_fp, " Fontname: %s\n", bdf_font); - fprintf(out_fp, " Copyright: %s\n", bdf_copyright); - fprintf(out_fp, " Capital A Height: %d, '1' Height: %d\n", bdf_capital_A_height, bdf_capital_1_height); - fprintf(out_fp, " Calculated Max Values w=%2d h=%2d x=%2d y=%2d dx=%2d dy=%2d ascent=%2d len=%2d\n", + fprintf(out_fp, "/**\n"); + fprintf(out_fp, " * Fontname: %s\n", bdf_font); + fprintf(out_fp, " * Copyright: %s\n", bdf_copyright); + fprintf(out_fp, " * Capital A Height: %d, '1' Height: %d\n", bdf_capital_A_height, bdf_capital_1_height); + fprintf(out_fp, " * Calculated Max Values w=%2d h=%2d x=%2d y=%2d dx=%2d dy=%2d ascent=%2d len=%2d\n", bdf_char_max_width, bdf_char_max_height, bdf_char_max_x, bdf_char_max_y, bdf_delta_max_x, bdf_delta_max_y, bdf_char_max_ascent, bdf_glyph_data_max_len); - fprintf(out_fp, " Font Bounding box w=%2d h=%2d x=%2d y=%2d\n", + fprintf(out_fp, " * Font Bounding box w=%2d h=%2d x=%2d y=%2d\n", bdf_font_width, bdf_font_height, bdf_font_x, bdf_font_y); - fprintf(out_fp, " Calculated Min Values x=%2d y=%2d dx=%2d dy=%2d\n", + fprintf(out_fp, " * Calculated Min Values x=%2d y=%2d dx=%2d dy=%2d\n", bdf_char_min_x, bdf_char_min_y, bdf_delta_min_x, bdf_delta_min_y); - fprintf(out_fp, " Pure Font ascent =%2d descent=%2d\n", capital_ascent, bdf_lower_g_descent); - fprintf(out_fp, " X Font ascent =%2d descent=%2d\n", bdf_char_xascent, bdf_char_xdescent); - fprintf(out_fp, " Max Font ascent =%2d descent=%2d\n", bdf_char_max_ascent, bdf_char_min_y); + fprintf(out_fp, " * Pure Font ascent =%2d descent=%2d\n", capital_ascent, bdf_lower_g_descent); + fprintf(out_fp, " * X Font ascent =%2d descent=%2d\n", bdf_char_xascent, bdf_char_xdescent); + fprintf(out_fp, " * Max Font ascent =%2d descent=%2d\n", bdf_char_max_ascent, bdf_char_min_y); - fprintf(out_fp, "*/\n"); + fprintf(out_fp, " */\n"); fprintf(out_fp, "const u8g_fntpgm_uint8_t %s[%d] U8G_FONT_SECTION(\"%s\") = {\n", fontname, data_pos, fontname); fprintf(out_fp, " "); data_Write(out_fp, " "); diff --git a/firmware/buildroot/share/fonts/buildhzk.py b/firmware/buildroot/share/fonts/buildhzk.py index 185cc14..2b59980 100644 --- a/firmware/buildroot/share/fonts/buildhzk.py +++ b/firmware/buildroot/share/fonts/buildhzk.py @@ -4,8 +4,7 @@ # Author: Taylor Talkington # License: GPL -import bdflib.reader -import math +import bdflib.reader, math def glyph_bits(size_x, size_y, font, glyph_ord): asc = font[b'FONT_ASCENT'] diff --git a/firmware/buildroot/share/fonts/genallfont.sh b/firmware/buildroot/share/fonts/genallfont.sh old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/fonts/make_lang_na.sh b/firmware/buildroot/share/fonts/make_lang_na.sh old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/fonts/uxggenpages.sh b/firmware/buildroot/share/fonts/uxggenpages.sh old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/README.md b/firmware/buildroot/share/git/README.md old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/firstpush b/firmware/buildroot/share/git/firstpush old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/ghpc b/firmware/buildroot/share/git/ghpc old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/ghtp b/firmware/buildroot/share/git/ghtp old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/mfadd b/firmware/buildroot/share/git/mfadd old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/mfclean b/firmware/buildroot/share/git/mfclean old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/mfdoc b/firmware/buildroot/share/git/mfdoc old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/mffp b/firmware/buildroot/share/git/mffp old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/mfhelp b/firmware/buildroot/share/git/mfhelp old mode 100755 new mode 100644 index aff34b8..cbdd6ec --- a/firmware/buildroot/share/git/mfhelp +++ b/firmware/buildroot/share/git/mfhelp @@ -40,7 +40,6 @@ Modify Configuration.h / Configuration_adv.h: Modify pins files: - pins_set ............. Set the value of a pin in a pins file pinsformat.py ........ Python script to format pins files THIS diff --git a/firmware/buildroot/share/git/mfinfo b/firmware/buildroot/share/git/mfinfo old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/mfinit b/firmware/buildroot/share/git/mfinit old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/mfnew b/firmware/buildroot/share/git/mfnew old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/mfpr b/firmware/buildroot/share/git/mfpr old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/mfprep b/firmware/buildroot/share/git/mfprep old mode 100755 new mode 100644 index 7446895..4554bdc --- a/firmware/buildroot/share/git/mfprep +++ b/firmware/buildroot/share/git/mfprep @@ -9,7 +9,6 @@ # so at every release be sure to create a dev- tag and publish it to origin. # -SED=$(which gsed sed | head -n1) SELF=`basename "$0"` DRYRUN=0 diff --git a/firmware/buildroot/share/git/mfpub b/firmware/buildroot/share/git/mfpub old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/mfqp b/firmware/buildroot/share/git/mfqp old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/mfrb b/firmware/buildroot/share/git/mfrb old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/git/mfup b/firmware/buildroot/share/git/mfup old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/pixmaps/logo/marlin-old.svg b/firmware/buildroot/share/pixmaps/logo/marlin-old.svg index d621d3a..a8c9369 100644 --- a/firmware/buildroot/share/pixmaps/logo/marlin-old.svg +++ b/firmware/buildroot/share/pixmaps/logo/marlin-old.svg @@ -1,6 +1,9 @@ - - + - Marlin Firmware - + Marlin Firmware + - - - - image/svg+xml - - Marlin Firmware - - - Ahmet Cem TURAN - - - - - MarlinFirmware - - - - - João Brázio - - - marlin-logo-old - - + + Ahmnet Cem TURAN + https://github.com/ahmetcemturan + CC-BY-NC-SA - - - - - - - - - + + + + image/svg+xml + + Marlin Firmware + + + Ahmet Cem TURAN + + + + + MarlinFirmware + + + + + João Brázio + + + marlin-logo-old + + + + + + + + + + + + diff --git a/firmware/buildroot/share/pixmaps/logo/marlin.svg b/firmware/buildroot/share/pixmaps/logo/marlin.svg index e608a7e..5327c69 100644 --- a/firmware/buildroot/share/pixmaps/logo/marlin.svg +++ b/firmware/buildroot/share/pixmaps/logo/marlin.svg @@ -1,6 +1,9 @@ - - + Marlin Firmware +Marlin Firmware + + Ahmnet Cem TURAN + https://github.com/ahmetcemturan + CC-BY-NC-SA + +image/svg+xmlMarlin Firmware Ahmet Cem TURANJoão BrázioMarlinFirmwaremarlin-logo-newMarlin Firmware Ahmet Cem TURANJoão BrázioMarlinFirmwaremarlin-logo-new + + \ No newline at end of file + d="M 403.52901,561.50203" /> + diff --git a/firmware/buildroot/share/scripts/MarlinBinaryProtocol.py b/firmware/buildroot/share/scripts/MarlinBinaryProtocol.py index 5ec83b1..f759773 100644 --- a/firmware/buildroot/share/scripts/MarlinBinaryProtocol.py +++ b/firmware/buildroot/share/scripts/MarlinBinaryProtocol.py @@ -2,14 +2,9 @@ # MarlinBinaryProtocol.py # Supporting Firmware upload via USB/Serial, saving to the attached media. # -import serial -import math -import time +import serial, math, time, threading, sys, datetime, random from collections import deque -import threading -import sys -import datetime -import random + try: import heatshrink2 as heatshrink heatshrink_exists = True diff --git a/firmware/buildroot/share/scripts/check-urls.sh b/firmware/buildroot/share/scripts/check-urls.sh old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/scripts/createSpeedLookupTable.py b/firmware/buildroot/share/scripts/createSpeedLookupTable.py old mode 100755 new mode 100644 index 70ed953..c5b8a02 --- a/firmware/buildroot/share/scripts/createSpeedLookupTable.py +++ b/firmware/buildroot/share/scripts/createSpeedLookupTable.py @@ -1,7 +1,6 @@ #!/usr/bin/env python -from __future__ import print_function -from __future__ import division +from __future__ import print_function, division """ Generate the stepper delay lookup table for Marlin firmware. """ diff --git a/firmware/buildroot/share/scripts/createTemperatureLookupMarlin.py b/firmware/buildroot/share/scripts/createTemperatureLookupMarlin.py old mode 100755 new mode 100644 index e2441f5..eb8c094 --- a/firmware/buildroot/share/scripts/createTemperatureLookupMarlin.py +++ b/firmware/buildroot/share/scripts/createTemperatureLookupMarlin.py @@ -18,8 +18,7 @@ Options: --num-temps=... the number of temperature points to calculate (default: 36) """ -from __future__ import print_function -from __future__ import division +from __future__ import print_function, division from math import * import sys, getopt diff --git a/firmware/buildroot/share/scripts/findMissingTranslations.sh b/firmware/buildroot/share/scripts/findMissingTranslations.sh old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/scripts/g29_auto.py b/firmware/buildroot/share/scripts/g29_auto.py old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/scripts/image_to_tft.py b/firmware/buildroot/share/scripts/image_to_tft.py old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/scripts/languageExport.py b/firmware/buildroot/share/scripts/languageExport.py old mode 100755 new mode 100644 index 46485aa..ca1998c --- a/firmware/buildroot/share/scripts/languageExport.py +++ b/firmware/buildroot/share/scripts/languageExport.py @@ -1,20 +1,22 @@ #!/usr/bin/env python3 ''' -languageExport.py +languageExport.py [--single] Export LCD language strings to CSV files for easier translation. -Use importTranslations.py to import CSV into the language files. +Use languageImport.py to import CSV into the language files. +Use --single to export all languages to a single CSV file. ''' import re from pathlib import Path +from sys import argv from languageUtil import namebyid LANGHOME = "Marlin/src/lcd/language" # Write multiple sheets if true, otherwise write one giant sheet -MULTISHEET = True +MULTISHEET = '--single' not in argv[1:] OUTDIR = 'out-csv' # Check for the path to the language files @@ -28,7 +30,7 @@ LIMIT = 0 # A dictionary to contain strings for each language. # Init with 'en' so English will always be first. -language_strings = { 'en': 0 } +language_strings = { 'en': {} } # A dictionary to contain all distinct LCD string names names = {} diff --git a/firmware/buildroot/share/scripts/languageImport.py b/firmware/buildroot/share/scripts/languageImport.py old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/scripts/languageUtil.py b/firmware/buildroot/share/scripts/languageUtil.py old mode 100755 new mode 100644 diff --git a/firmware/buildroot/share/scripts/pinsformat.py b/firmware/buildroot/share/scripts/pinsformat.py old mode 100755 new mode 100644 index 7b041c8..0260d31 --- a/firmware/buildroot/share/scripts/pinsformat.py +++ b/firmware/buildroot/share/scripts/pinsformat.py @@ -43,7 +43,7 @@ mexpr = [ re.compile(f'^{m}$') for m in mpatt ] ppad = [ 3, 4, 5, 5 ] # Match a define line -definePatt = re.compile(rf'^\s*(//)?#define\s+[A-Z_][A-Z0-9_]+\s+({mstr})\s*(//.*)?$') +definePinPatt = re.compile(rf'^\s*(//)?#define\s+[A-Z_][A-Z0-9_]+?_PIN\s+({mstr})\s*(//.*)?$') def format_pins(argv): src_file = 'stdin' @@ -93,7 +93,7 @@ def get_pin_pattern(txt): # Find the most common matching pattern match_threshold = 5 for line in txt.split('\n'): - r = definePatt.match(line) + r = definePinPatt.match(line) if r == None: continue ind = -1 for p in mexpr: diff --git a/firmware/buildroot/share/scripts/rle16_compress_cpp_image_data.py b/firmware/buildroot/share/scripts/rle16_compress_cpp_image_data.py old mode 100755 new mode 100644 index 60681ee..ed0c640 --- a/firmware/buildroot/share/scripts/rle16_compress_cpp_image_data.py +++ b/firmware/buildroot/share/scripts/rle16_compress_cpp_image_data.py @@ -5,8 +5,7 @@ # # Usage: rle16_compress_cpp_image_data.py INPUT_FILE.cpp OUTPUT_FILE.cpp # -import sys, struct -import re +import sys, struct, re def addCompressedData(input_file, output_file): ofile = open(output_file, 'wt') diff --git a/firmware/buildroot/share/scripts/rle_compress_bitmap.py b/firmware/buildroot/share/scripts/rle_compress_bitmap.py old mode 100755 new mode 100644 index 8c25204..d33f7be --- a/firmware/buildroot/share/scripts/rle_compress_bitmap.py +++ b/firmware/buildroot/share/scripts/rle_compress_bitmap.py @@ -6,8 +6,7 @@ # # Usage: rle_compress_bitmap.py INPUT_FILE OUTPUT_FILE # -import sys, struct -import re +import sys, struct, re def addCompressedData(input_file, output_file): input_lines = input_file.readlines() diff --git a/firmware/buildroot/share/scripts/validate_boards.py b/firmware/buildroot/share/scripts/validate_boards.py new file mode 100644 index 0000000..a495420 --- /dev/null +++ b/firmware/buildroot/share/scripts/validate_boards.py @@ -0,0 +1,128 @@ +#!/usr/bin/env python3 +# +# buildroot/share/scripts/validate_boards.py +# Assert standards for boards.h and pins.h +# + +import sys, re + +do_log = False +def logmsg(msg, line): + if do_log: print(msg, line) + +# Print a formatted error +def err(board, msg): + print(f'[ERROR] {board:30} {msg}') + +# Print a formatted warning +def warn(board, msg): + print(f'[WARNING] {board:30} {msg}') + +def bshort(board): + return board.replace('BOARD_', '') + +# +# Run standards checks on boards.h and pins.h +# +def boards_checks(argv): + ERRS = 0 + src_file = 'Marlin/src/core/boards.h' + + scnt = 0 + for arg in argv: + if arg == '-v': + global do_log + do_log = True + elif scnt == 0: + src_file = arg + scnt += 1 + + logmsg('Checking boards file:', src_file) + + # Open the file + with open(src_file, 'r') as f: + lines = f.readlines() + + # Get the board names and numbers + boards = [] + for line in lines: + m = re.match(r'^\s*#define\s+(BO\w+)\s+(\d+)(\s+//\s*(.+))?', line) + if not m: continue + board, number, comment = m.group(1), int(m.group(2)), m.group(4) + boards.append((board, number, comment)) + + # + # Examine boards.h to check the formatting of the file + # + last_number, last_groun = (-1, -1) + + for board, number, comment in boards: + logmsg('Checking:', board) + group = int(number / 100) + if not re.match(r'^BOARD_\w+$', board): + err(board, 'is not of the form BOARD_NAME') + ERRS += 1 + if number != last_number + 1: + if int(number / 100) != int(last_number / 100): + if number % 100 != 0 and number < 9900: + err(board, f'is {number} (should be {group * 100}?)') + ERRS += 1 + elif number > 1040: + err(board, f'is {number} but previous board is {last_number}') + ERRS += 1 + if not comment: + err(board, ' has no comment') + ERRS += 1 + else: + cshor = bshort(board) + cbore = cshor.replace('_', '') + if comment == board or comment == cshor or comment == cbore: + warn(board, f'comment needs more detail') + last_number = number + last_group = number % 100 + + # + # Validate that pins.h has all the boards mentioned in it + # + pins_boards = [] + with open('Marlin/src/pins/pins.h', 'r') as f: + lines = f.readlines() + if_count = 0 + for line in lines: + m = re.search(r'#(if|elif)\s+MB\(([^)]+)\)', line) + if not m: continue + if (m.group(1) == 'if'): + if_count += 1 + if if_count == 3: break + if if_count == 2: + mb_items = m.group(2).split(',') + for board in mb_items: + pins_boards.append('BOARD_' + board.strip()) + + # Check that the list from boards.h matches the list from pins.h + boards_boards = [b[0] for b in boards] + if set(pins_boards) != set(boards_boards): + ERRS += 1 + print(f'[ERROR] Boards in pins.h do not match boards.h') + # Show the differences only + for b in boards: + if b[0] not in pins_boards: + print(f' pins.h missing: {b[0]}') + for b in pins_boards: + if b not in boards_boards: + print(f' boards.h missing: {b}') + + # Check that boards_boards and pins_boards are in the same order + for i in range(len(boards_boards)): + if boards_boards[i] != pins_boards[i]: + ERRS += 1 + print(f'[ERROR] Non-matching boards order in pins.h. Expected {bshort(boards_boards[i])} but got {bshort(pins_boards[i])}') + break + + return ERRS; + +if __name__ == '__main__': + ERR_COUNT = boards_checks(sys.argv[1:]) + if ERR_COUNT: + print(f'\nFound {ERR_COUNT} errors') + sys.exit(1) diff --git a/firmware/buildroot/share/sublime/auto_build_sublime_menu/000_read_me.txt b/firmware/buildroot/share/sublime/auto_build_sublime_menu/000_read_me.txt deleted file mode 100644 index 5853977..0000000 --- a/firmware/buildroot/share/sublime/auto_build_sublime_menu/000_read_me.txt +++ /dev/null @@ -1,40 +0,0 @@ -Overview: -1) Install Sublime -2) Install Deviot (?optional?) -3) Install WebDevShell (this will execute the auto-build script) -4) Copy the menu configuration to the proper Sublime directory -5) Add platformio to your path (usually not needed) - - -Sublime with autobuild - Tools - Install Package Control - Tools - Command Palette - Package Control: Install Package - type in deviot and click on it - Tools - Command Palette - Package Control: Install Package - type in WebDevShell and click on it - - in Sublime, open Marlin directory with "platformio.ini" in it - - starting in the top level directory, go to the folder "Buildroot/shared/Sublime" - copy the folder "auto_build_sublime_menu" and contents to: - Windows - \Users\your_user_name\AppData\Roaming\Sublime Text 3\Packages - Linux - /home/your_user_name/.config/sublime-text-3/Packages/User - macOS (Click on the Finder's 'Go' menu and hold down Option to open...) - ~/Library/Application Support/Sublime Text 3/Packages/User - -The menu should now be visible - -If you get an error message that says "file not found" and "subprocess.Popen(['platformio' ... " -then you'll need to add platformio to your path. - macOS - sudo nano /etc/paths - add these to the bottom - /Users/bob/.platformio - /Users/bob/.platformio/penv/bin diff --git a/firmware/buildroot/share/sublime/auto_build_sublime_menu/Main.sublime-menu b/firmware/buildroot/share/sublime/auto_build_sublime_menu/Main.sublime-menu deleted file mode 100644 index 60939d1..0000000 --- a/firmware/buildroot/share/sublime/auto_build_sublime_menu/Main.sublime-menu +++ /dev/null @@ -1,66 +0,0 @@ -[ - - { - "caption": "Auto Build", - "children": [ - { - "caption": "PIO Build", - "command": "webdevshell", - "args": { - "command": "python buildroot/share/vscode/auto_build.py build" - } - }, - { - "caption": "PIO Clean", - "command": "webdevshell", - "args": { - "command": "python buildroot/share/vscode/auto_build.py clean" - } - }, - { - "caption": "PIO Upload", - "command": "webdevshell", - "args": { - "command": "python buildroot/share/vscode/auto_build.py upload" - } - }, - { - "caption": "PIO Upload (traceback)", - "command": "webdevshell", - "args": { - "command": "python buildroot/share/vscode/auto_build.py traceback" - } - }, - { - "caption": "PIO Upload using Programmer", - "command": "webdevshell", - "args": { - "command": "python buildroot/share/vscode/auto_build.py program" - } - }, - { - "caption": "PIO Test", - "command": "webdevshell", - "args": { - "command": "python buildroot/share/vscode/auto_build.py test" - } - }, - { - "caption": "PIO Debug", - "command": "webdevshell", - "args": { - "command": "python buildroot/share/vscode/auto_build.py debug" - } - }, - { - "caption": "PIO Remote", - "command": "webdevshell", - "args": { - "command": "python buildroot/share/vscode/auto_build.py remote" - } - } - ], - "id": "AutoBuild", - "mnemonic": "A" - } -] diff --git a/firmware/buildroot/share/uncrustify/uncrustify.cfg b/firmware/buildroot/share/uncrustify/uncrustify.cfg index 73ccadc..02b74dd 100644 --- a/firmware/buildroot/share/uncrustify/uncrustify.cfg +++ b/firmware/buildroot/share/uncrustify/uncrustify.cfg @@ -3055,7 +3055,7 @@ cmt_multi_first_len_minimum = 4 # unsigned number # Path to a file that contains text to insert at the beginning of a file if # the file doesn't start with a C/C++ comment. If the inserted text contains # '$(filename)', that will be replaced with the current file's name. -cmt_insert_file_header = "./buildroot/share/extras/file_header.h" # string +cmt_insert_file_header = "./buildroot/share/uncrustify/file_header.h" # string # Path to a file that contains text to insert at the end of a file if the # file doesn't end with a C/C++ comment. If the inserted text contains diff --git a/firmware/buildroot/share/vscode/auto_build.py b/firmware/buildroot/share/vscode/auto_build.py deleted file mode 100644 index dcbf119..0000000 --- a/firmware/buildroot/share/vscode/auto_build.py +++ /dev/null @@ -1,1283 +0,0 @@ -#!/usr/bin/env python -####################################### -# -# 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 . -# -####################################### - -####################################### -# -# Revision: 2.1.0 -# -# Description: script to automate PlatformIO builds -# CLI: python auto_build.py build_option -# build_option (required) -# build executes -> platformio run -e target_env -# clean executes -> platformio run --target clean -e target_env -# upload executes -> platformio run --target upload -e target_env -# traceback executes -> platformio run --target upload -e target_env -# program executes -> platformio run --target program -e target_env -# test executes -> platformio test upload -e target_env -# remote executes -> platformio remote run --target upload -e target_env -# debug executes -> platformio debug -e target_env -# -# 'traceback' just uses the debug variant of the target environment if one exists -# -####################################### - -####################################### -# -# General program flow -# -# 1. Scans Configuration.h for the motherboard name and Marlin version. -# 2. Scans pins.h for the motherboard. -# returns the CPU(s) and platformio environment(s) used by the motherboard -# 3. If further info is needed then a popup gets it from the user. -# 4. The OUTPUT_WINDOW class creates a window to display the output of the PlatformIO program. -# 5. A thread is created by the OUTPUT_WINDOW class in order to execute the RUN_PIO function. -# 6. The RUN_PIO function uses a subprocess to run the CLI version of PlatformIO. -# 7. The "iter(pio_subprocess.stdout.readline, '')" function is used to stream the output of -# PlatformIO back to the RUN_PIO function. -# 8. Each line returned from PlatformIO is formatted to match the color coding seen in the -# PlatformIO GUI. -# 9. If there is a color change within a line then the line is broken at each color change -# and sent separately. -# 10. Each formatted segment (could be a full line or a split line) is put into the queue -# IO_queue as it arrives from the platformio subprocess. -# 11. The OUTPUT_WINDOW class periodically samples IO_queue. If data is available then it -# is written to the window. -# 12. The window stays open until the user closes it. -# 13. The OUTPUT_WINDOW class continues to execute as long as the window is open. This allows -# copying, saving, scrolling of the window. A right click popup is available. -# -####################################### - -from __future__ import print_function -from __future__ import division - -import sys, os, re - -pwd = os.getcwd() # make sure we're executing from the correct directory level -pwd = pwd.replace('\\', '/') -if 0 <= pwd.find('buildroot/share/vscode'): - pwd = pwd[:pwd.find('buildroot/share/vscode')] - os.chdir(pwd) -print('pwd: ', pwd) - -num_args = len(sys.argv) -if num_args > 1: - build_type = str(sys.argv[1]) -else: - print('Please specify build type') - exit() - -print('build_type: ', build_type) - -print('\nWorking\n') - -python_ver = sys.version_info[0] # major version - 2 or 3 - -print("python version " + str(sys.version_info[0]) + "." + str(sys.version_info[1]) + "." + str(sys.version_info[2])) - -import platform -current_OS = platform.system() - -#globals -target_env = '' -board_name = '' - -from datetime import datetime - -######### -# Python 2 error messages: -# Can't find a usable init.tcl in the following directories ... -# error "invalid command name "tcl_findLibrary"" -# -# Fix for the above errors on my Win10 system: -# search all init.tcl files for the line "package require -exact Tcl" that has the highest 8.5.x number -# copy it into the first directory listed in the error messages -# set the environmental variables TCLLIBPATH and TCL_LIBRARY to the directory where you found the init.tcl file -# reboot -######### - -########################################################################################## -# -# popup to get input from user -# -########################################################################################## - -def get_answer(board_name, question_txt, options, default_value=1): - - if python_ver == 2: - import Tkinter as tk - else: - import tkinter as tk - - def CPU_exit_3(): # forward declare functions - CPU_exit_3_() - - def got_answer(): - got_answer_() - - def kill_session(): - kill_session_() - - root_get_answer = tk.Tk() - root_get_answer.title('') - #root_get_answer.withdraw() - #root_get_answer.deiconify() - root_get_answer.attributes("-topmost", True) - - def disable_event(): - pass - - root_get_answer.protocol("WM_DELETE_WINDOW", disable_event) - root_get_answer.resizable(False, False) - - global get_answer_val - get_answer_val = default_value # return get_answer_val, set default to match radio_state default - - radio_state = tk.IntVar() - radio_state.set(get_answer_val) - - l1 = tk.Label(text=board_name, fg="light green", bg="dark green", - font="default 14 bold").grid(row=0, columnspan=2, sticky='EW', ipadx=2, ipady=2) - - l2 = tk.Label(text=question_txt).grid(row=1, pady=4, columnspan=2, sticky='EW') - - buttons = [] - - for index, val in enumerate(options): - buttons.append( - tk.Radiobutton( - text=val, - fg="black", - bg="lightgray", - relief=tk.SUNKEN, - selectcolor="green", - variable=radio_state, - value=index + 1, - indicatoron=0, - command=CPU_exit_3 - ).grid(row=index + 2, pady=1, ipady=2, ipadx=10, columnspan=2)) - - b6 = tk.Button(text="Cancel", fg="red", command=kill_session).grid(row=(2 + len(options)), column=0, padx=4, pady=4, ipadx=2, ipady=2) - - b7 = tk.Button(text="Continue", fg="green", command=got_answer).grid(row=(2 + len(options)), column=1, padx=4, pady=4, ipadx=2, ipady=2) - - def got_answer_(): - root_get_answer.destroy() - - def CPU_exit_3_(): - global get_answer_val - get_answer_val = radio_state.get() - - def kill_session_(): - raise SystemExit(0) # kill everything - - root_get_answer.mainloop() - -# end - get answer - - -# -# move custom board definitions from project folder to PlatformIO -# -def resolve_path(path): - import os - - # turn the selection into a partial path - - if 0 <= path.find('"'): - path = path[path.find('"'):] - if 0 <= path.find(', line '): - path = path.replace(', line ', ':') - path = path.replace('"', '') - - # get line and column numbers - line_num = 1 - column_num = 1 - line_start = path.find(':', 2) # use 2 here so don't eat Windows full path - column_start = path.find(':', line_start + 1) - if column_start == -1: - column_start = len(path) - column_end = path.find(':', column_start + 1) - if column_end == -1: - column_end = len(path) - if 0 <= line_start: - line_num = path[line_start + 1:column_start] - if line_num == '': - line_num = 1 - if column_start != column_end: - column_num = path[column_start + 1:column_end] - if column_num == '': - column_num = 0 - - index_end = path.find(',') - if 0 <= index_end: - path = path[:index_end] # delete comma and anything after - index_end = path.find(':', 2) - if 0 <= index_end: - path = path[:path.find(':', 2)] # delete the line number and anything after - - path = path.replace('\\', '/') - - if 1 == path.find(':') and current_OS == 'Windows': - return path, line_num, column_num # found a full path - no need for further processing - elif 0 == path.find('/') and (current_OS == 'Linux' or current_OS == 'Darwin'): - return path, line_num, column_num # found a full path - no need for further processing - - else: - - # resolve as many '../' as we can - while 0 <= path.find('../'): - end = path.find('../') - 1 - start = path.find('/') - while 0 <= path.find('/', start) < end: - start = path.find('/', start) + 1 - path = path[0:start] + path[end + 4:] - - # this is an alternative to the above - it just deletes the '../' section - # start_temp = path.find('../') - # while 0 <= path.find('../',start_temp): - # start = path.find('../',start_temp) - # start_temp = start + 1 - # if 0 <= start: - # path = path[start + 2 : ] - - start = path.find('/') - if start != 0: # make sure path starts with '/' - while 0 == path.find(' '): # eat any spaces at the beginning - path = path[1:] - path = '/' + path - - if current_OS == 'Windows': - search_path = path.replace('/', '\\') # os.walk uses '\' in Windows - else: - search_path = path - - start_path = os.path.abspath('') - - # search project directory for the selection - found = False - full_path = '' - for root, directories, filenames in os.walk(start_path): - for filename in filenames: - if 0 <= root.find('.git'): # don't bother looking in this directory - break - full_path = os.path.join(root, filename) - if 0 <= full_path.find(search_path): - found = True - break - if found: - break - - return full_path, line_num, column_num - -# end - resolve_path - - -# -# Open the file in the preferred editor at the line & column number -# If the preferred editor isn't already running then it tries the next. -# If none are open then the system default is used. -# -# Editor order: -# 1. Notepad++ (Windows only) -# 2. Sublime Text -# 3. Atom -# 4. System default (opens at line 1, column 1 only) -# -def open_file(path): - import subprocess - file_path, line_num, column_num = resolve_path(path) - - if file_path == '': - return - - if current_OS == 'Windows': - - editor_note = subprocess.check_output('wmic process where "name=' + "'notepad++.exe'" + '" get ExecutablePath') - editor_sublime = subprocess.check_output('wmic process where "name=' + "'sublime_text.exe'" + '" get ExecutablePath') - editor_atom = subprocess.check_output('wmic process where "name=' + "'atom.exe'" + '" get ExecutablePath') - - if 0 <= editor_note.find('notepad++.exe'): - start = editor_note.find('\n') + 1 - end = editor_note.find('\n', start + 5) - 4 - editor_note = editor_note[start:end] - command = file_path, ' -n' + str(line_num), ' -c' + str(column_num) - subprocess.Popen([editor_note, command]) - - elif 0 <= editor_sublime.find('sublime_text.exe'): - start = editor_sublime.find('\n') + 1 - end = editor_sublime.find('\n', start + 5) - 4 - editor_sublime = editor_sublime[start:end] - command = file_path + ':' + line_num + ':' + column_num - subprocess.Popen([editor_sublime, command]) - - elif 0 <= editor_atom.find('atom.exe'): - start = editor_atom.find('\n') + 1 - end = editor_atom.find('\n', start + 5) - 4 - editor_atom = editor_atom[start:end] - command = file_path + ':' + str(line_num) + ':' + str(column_num) - subprocess.Popen([editor_atom, command]) - - else: - os.startfile(resolve_path(path)) # open file with default app - - elif current_OS == 'Linux': - - command = file_path + ':' + str(line_num) + ':' + str(column_num) - index_end = command.find(',') - if 0 <= index_end: - command = command[:index_end] # sometimes a comma magically appears, don't want it - running_apps = subprocess.Popen('ps ax -o cmd', stdout=subprocess.PIPE, shell=True) - (output, err) = running_apps.communicate() - temp = output.split('\n') - - def find_editor_linux(name, search_obj): - for line in search_obj: - if 0 <= line.find(name): - path = line - return True, path - return False, '' - - (success_sublime, editor_path_sublime) = find_editor_linux('sublime_text', temp) - (success_atom, editor_path_atom) = find_editor_linux('atom', temp) - - if success_sublime: - subprocess.Popen([editor_path_sublime, command]) - - elif success_atom: - subprocess.Popen([editor_path_atom, command]) - - else: - os.system('xdg-open ' + file_path) - - elif current_OS == 'Darwin': # MAC - - command = file_path + ':' + str(line_num) + ':' + str(column_num) - index_end = command.find(',') - if 0 <= index_end: - command = command[:index_end] # sometimes a comma magically appears, don't want it - running_apps = subprocess.Popen('ps axwww -o command', stdout=subprocess.PIPE, shell=True) - (output, err) = running_apps.communicate() - temp = output.split('\n') - - def find_editor_mac(name, search_obj): - for line in search_obj: - if 0 <= line.find(name): - path = line - if 0 <= path.find('-psn'): - path = path[:path.find('-psn') - 1] - return True, path - return False, '' - - (success_sublime, editor_path_sublime) = find_editor_mac('Sublime', temp) - (success_atom, editor_path_atom) = find_editor_mac('Atom', temp) - - if success_sublime: - subprocess.Popen([editor_path_sublime, command]) - - elif success_atom: - subprocess.Popen([editor_path_atom, command]) - - else: - os.system('open ' + file_path) - -# end - open_file - - -# Get the last build environment -def get_build_last(): - env_last = '' - DIR_PWD = os.listdir('.') - if '.pio' in DIR_PWD: - date_last = 0.0 - DIR__pioenvs = os.listdir('.pio') - for name in DIR__pioenvs: - if 0 <= name.find('.') or 0 <= name.find('-'): # skip files in listing - continue - DIR_temp = os.listdir('.pio/build/' + name) - for names_temp in DIR_temp: - - if 0 == names_temp.find('firmware.'): - date_temp = os.path.getmtime('.pio/build/' + name + '/' + names_temp) - if date_temp > date_last: - date_last = date_temp - env_last = name - return env_last - - -# Get the board being built from the Configuration.h file -# return: board name, major version of Marlin being used (1 or 2) -def get_board_name(): - board_name = '' - # get board name - - with open('Marlin/Configuration.h', 'r') as myfile: - Configuration_h = myfile.read() - - Configuration_h = Configuration_h.split('\n') - Marlin_ver = 0 # set version to invalid number - for lines in Configuration_h: - if 0 == lines.find('#define CONFIGURATION_H_VERSION 01'): - Marlin_ver = 1 - if 0 == lines.find('#define CONFIGURATION_H_VERSION 02'): - Marlin_ver = 2 - board = lines.find(' BOARD_') + 1 - motherboard = lines.find(' MOTHERBOARD ') + 1 - define = lines.find('#define ') - comment = lines.find('//') - if (comment == -1 or comment > board) and \ - board > motherboard and \ - motherboard > define and \ - define >= 0 : - spaces = lines.find(' ', board) # find the end of the board substring - if spaces == -1: - board_name = lines[board:] - else: - board_name = lines[board:spaces] - break - - return board_name, Marlin_ver - - -# extract first environment name found after the start position -# return: environment name and position to start the next search from -def get_env_from_line(line, start_position): - env = '' - next_position = -1 - env_position = line.find('env:', start_position) - if 0 < env_position: - next_position = line.find(' ', env_position + 4) - if 0 < next_position: - env = line[env_position + 4:next_position] - else: - env = line[env_position + 4:] # at the end of the line - return env, next_position - - -def invalid_board(): - print('ERROR - invalid board') - print(board_name) - raise SystemExit(0) # quit if unable to find board - -# scan pins.h for board name and return the environment(s) found -def get_starting_env(board_name_full, version): - # get environment starting point - - if version == 1: - path = 'Marlin/pins.h' - if version == 2: - path = 'Marlin/src/pins/pins.h' - with open(path, 'r') as myfile: - pins_h = myfile.read() - - board_name = board_name_full[6:] # only use the part after "BOARD_" since we're searching the pins.h file - pins_h = pins_h.split('\n') - list_start_found = False - possible_envs = None - for i, line in enumerate(pins_h): - if 0 < line.find("Unknown MOTHERBOARD value set in Configuration.h"): - invalid_board() - if list_start_found == False and 0 < line.find('1280'): - list_start_found = True - elif list_start_found == False: # skip lines until find start of CPU list - continue - - # Use a regex to find the board. Make sure it is surrounded by separators so the full boardname - # will be matched, even if multiple exist in a single MB macro. This avoids problems with boards - # such as MALYAN_M200 and MALYAN_M200_V2 where one board is a substring of the other. - if re.search(r'MB.*[\(, ]' + board_name + r'[, \)]', line): - # need to look at the next line for environment info - possible_envs = re.findall(r'env:([^ ]+)', pins_h[i + 1]) - break - return possible_envs - - -# get environment to be used for the build -# return: environment -def get_env(board_name, ver_Marlin): - - def no_environment(): - print('ERROR - no environment for this board') - print(board_name) - raise SystemExit(0) # no environment so quit - - possible_envs = get_starting_env(board_name, ver_Marlin) - - if not possible_envs: - no_environment() - - # Proceed to ask questions based on the available environments to filter down to a smaller list. - # If more then one remains after this filtering the user will be prompted to choose between - # all remaining options. - - # Filter selection based on CPU choice - CPU_questions = [ - {'options':['1280', '2560'], 'text':'1280 or 2560 CPU?', 'default':2}, - {'options':['644', '1284'], 'text':'644 or 1284 CPU?', 'default':2}, - {'options':['STM32F103RC', 'STM32F103RE'], 'text':'MCU Type?', 'default':1}] - - for question in CPU_questions: - if any(question['options'][0] in env for env in possible_envs) and any(question['options'][1] in env for env in possible_envs): - get_answer(board_name, question['text'], [question['options'][0], question['options'][1]], question['default']) - possible_envs = [env for env in possible_envs if question['options'][get_answer_val - 1] in env] - - # Choose which STM32 framework to use, if both are available - if [env for env in possible_envs if '_maple' in env] and [env for env in possible_envs if '_maple' not in env]: - get_answer(board_name, 'Which STM32 Framework should be used?', ['ST STM32 (Preferred)', 'Maple (Deprecated)']) - if 1 == get_answer_val: - possible_envs = [env for env in possible_envs if '_maple' not in env] - else: - possible_envs = [env for env in possible_envs if '_maple' in env] - - # Both USB and non-USB STM32 options exist, filter based on these - if any('STM32F103R' in env for env in possible_envs) and any('_USB' in env for env in possible_envs) and any('_USB' not in env for env in possible_envs): - get_answer(board_name, 'USB Support?', ['USB', 'No USB']) - if 1 == get_answer_val: - possible_envs = [env for env in possible_envs if '_USB' in env] - else: - possible_envs = [env for env in possible_envs if '_USB' not in env] - - if not possible_envs: - no_environment() - if len(possible_envs) == 1: - return possible_envs[0] # only one environment so finished - - target_env = None - - # A few environments require special behavior - if 'LPC1768' in possible_envs: - if build_type == 'traceback' or (build_type == 'clean' and get_build_last() == 'LPC1768_debug_and_upload'): - target_env = 'LPC1768_debug_and_upload' - else: - target_env = 'LPC1768' - elif 'DUE' in possible_envs: - target_env = 'DUE' - if build_type == 'traceback' or (build_type == 'clean' and get_build_last() == 'DUE_debug'): - target_env = 'DUE_debug' - elif 'DUE_USB' in possible_envs: - get_answer(board_name, 'DUE Download Port?', ['(Native) USB port', 'Programming port']) - if 1 == get_answer_val: - target_env = 'DUE_USB' - else: - target_env = 'DUE' - else: - options = possible_envs - # Perform some substitutions for environment names which follow a consistent - # naming pattern and are very commonly used. This is fragile code, and replacements - # should only be made here for stable environments unlikely to change often. - for i, option in enumerate(options): - if 'melzi' in option: - options[i] = 'Melzi' - elif 'sanguino1284p' in option: - options[i] = 'sanguino1284p' - if 'optiboot' in option: - options[i] = options[i] + ' (Optiboot Bootloader)' - if 'optimized' in option: - options[i] = options[i] + ' (Optimized for Size)' - get_answer(board_name, 'Which environment?', options) - target_env = possible_envs[get_answer_val - 1] - - if build_type == 'traceback' and target_env != 'LPC1768_debug_and_upload' and target_env != 'DUE_debug' and Marlin_ver == 2: - print("ERROR - this board isn't setup for traceback") - print('board_name: ', board_name) - print('target_env: ', target_env) - raise SystemExit(0) - - return target_env - -# end - get_env - - -# puts screen text into queue so that the parent thread can fetch the data from this thread -if python_ver == 2: - import Queue as queue -else: - import queue as queue -IO_queue = queue.Queue() - - -#PIO_queue = queue.Queue() not used! -def write_to_screen_queue(text, format_tag='normal'): - double_in = [text, format_tag] - IO_queue.put(double_in, block=False) - - -# -# send one line to the terminal screen with syntax highlighting -# -# input: unformatted text, flags from previous run -# return: formatted text ready to go to the terminal, flags from this run -# -# This routine remembers the status from call to call because previous -# lines can affect how the current line is highlighted -# - -# 'static' variables - init here and then keep updating them from within print_line -warning = False -warning_FROM = False -error = False -standard = True -prev_line_COM = False -next_line_warning = False -warning_continue = False -line_counter = 0 - - -def line_print(line_input): - - global warning - global warning_FROM - global error - global standard - global prev_line_COM - global next_line_warning - global warning_continue - global line_counter - - # all '0' elements must precede all '1' elements or they'll be skipped - platformio_highlights = [ - ['Environment', 0, 'highlight_blue'], ['[SKIP]', 1, 'warning'], ['[IGNORED]', 1, 'warning'], ['[ERROR]', 1, 'error'], - ['[FAILED]', 1, 'error'], ['[SUCCESS]', 1, 'highlight_green'] - ] - - def write_to_screen_with_replace(text, highlights): # search for highlights & split line accordingly - did_something = False - for highlight in highlights: - found = text.find(highlight[0]) - if did_something == True: - break - if found >= 0: - did_something = True - if 0 == highlight[1]: - found_1 = text.find(' ') - found_tab = text.find('\t') - if not (0 <= found_1 <= found_tab): - found_1 = found_tab - write_to_screen_queue(text[:found_1 + 1]) - for highlight_2 in highlights: - if highlight[0] == highlight_2[0]: - continue - found = text.find(highlight_2[0]) - if found >= 0: - found_space = text.find(' ', found_1 + 1) - found_tab = text.find('\t', found_1 + 1) - if not (0 <= found_space <= found_tab): - found_space = found_tab - found_right = text.find(']', found + 1) - write_to_screen_queue(text[found_1 + 1:found_space + 1], highlight[2]) - write_to_screen_queue(text[found_space + 1:found + 1]) - write_to_screen_queue(text[found + 1:found_right], highlight_2[2]) - write_to_screen_queue(text[found_right:] + '\n') - break - break - if 1 == highlight[1]: - found_right = text.find(']', found + 1) - write_to_screen_queue(text[:found + 1]) - write_to_screen_queue(text[found + 1:found_right], highlight[2]) - write_to_screen_queue(text[found_right:] + '\n' + '\n') - break - if did_something == False: - r_loc = text.find('\r') + 1 - if 0 < r_loc < len(text): # need to split this line - text = text.split('\r') - for line in text: - if line != '': - write_to_screen_queue(line + '\n') - else: - write_to_screen_queue(text + '\n') - - # end - write_to_screen_with_replace - -# scan the line - line_counter = line_counter + 1 - max_search = len(line_input) - if max_search > 3: - max_search = 3 - beginning = line_input[:max_search] - - # set flags - if 0 < line_input.find(': warning: '): # start of warning block - warning = True - warning_FROM = False - error = False - standard = False - prev_line_COM = False - prev_line_COM = False - warning_continue = True - if 0 < line_input.find('Thank you') or 0 < line_input.find('SUMMARY'): - warning = False #standard line found - warning_FROM = False - error = False - standard = True - prev_line_COM = False - warning_continue = False - elif beginning == 'War' or \ - beginning == '#er' or \ - beginning == 'In ' or \ - (beginning != 'Com' and prev_line_COM == True and not(beginning == 'Arc' or beginning == 'Lin' or beginning == 'Ind') or \ - next_line_warning == True): - warning = True #warning found - warning_FROM = False - error = False - standard = False - prev_line_COM = False - elif beginning == 'Com' or \ - beginning == 'Ver' or \ - beginning == ' [E' or \ - beginning == 'Rem' or \ - beginning == 'Bui' or \ - beginning == 'Ind' or \ - beginning == 'PLA': - warning = False #standard line found - warning_FROM = False - error = False - standard = True - prev_line_COM = False - warning_continue = False - elif beginning == '***': - warning = False # error found - warning_FROM = False - error = True - standard = False - prev_line_COM = False - elif 0 < line_input.find(': error:') or \ - 0 < line_input.find(': fatal error:'): # start of warning /error block - warning = False # error found - warning_FROM = False - error = True - standard = False - prev_line_COM = False - warning_continue = True - elif beginning == 'fro' and warning == True or \ - beginning == '.pi' : # start of warning /error block - warning_FROM = True - prev_line_COM = False - warning_continue = True - elif warning_continue == True: - warning = True - warning_FROM = False # keep the warning status going until find a standard line or an error - error = False - standard = False - prev_line_COM = False - warning_continue = True - - else: - warning = False # unknown so assume standard line - warning_FROM = False - error = False - standard = True - prev_line_COM = False - warning_continue = False - - if beginning == 'Com': - prev_line_COM = True - -# print based on flags - if standard == True: - write_to_screen_with_replace(line_input, platformio_highlights) #print white on black with substitutions - if warning == True: - write_to_screen_queue(line_input + '\n', 'warning') - if error == True: - write_to_screen_queue(line_input + '\n', 'error') - -# end - line_print - - -########################################################################## -# # -# run Platformio # -# # -########################################################################## - -# build platformio run -e target_env -# clean platformio run --target clean -e target_env -# upload platformio run --target upload -e target_env -# traceback platformio run --target upload -e target_env -# program platformio run --target program -e target_env -# test platformio test upload -e target_env -# remote platformio remote run --target upload -e target_env -# debug platformio debug -e target_env - - -def sys_PIO(): - - ########################################################################## - # # - # run Platformio inside the same shell as this Python script # - # # - ########################################################################## - - global build_type - global target_env - - import os - - print('build_type: ', build_type) - print('starting platformio') - - if build_type == 'build': - # pio_result = os.system("echo -en '\033c'") - pio_result = os.system('platformio run -e ' + target_env) - elif build_type == 'clean': - pio_result = os.system('platformio run --target clean -e ' + target_env) - elif build_type == 'upload': - pio_result = os.system('platformio run --target upload -e ' + target_env) - elif build_type == 'traceback': - pio_result = os.system('platformio run --target upload -e ' + target_env) - elif build_type == 'program': - pio_result = os.system('platformio run --target program -e ' + target_env) - elif build_type == 'test': - pio_result = os.system('platformio test upload -e ' + target_env) - elif build_type == 'remote': - pio_result = os.system('platformio remote run --target program -e ' + target_env) - elif build_type == 'debug': - pio_result = os.system('platformio debug -e ' + target_env) - else: - print('ERROR - unknown build type: ', build_type) - raise SystemExit(0) # kill everything - - # stream output from subprocess and split it into lines - #for line in iter(pio_subprocess.stdout.readline, ''): - # line_print(line.replace('\n', '')) - - # append info used to run PlatformIO - # write_to_screen_queue('\nBoard name: ' + board_name + '\n') # put build info at the bottom of the screen - # write_to_screen_queue('Build type: ' + build_type + '\n') - # write_to_screen_queue('Environment used: ' + target_env + '\n') - # write_to_screen_queue(str(datetime.now()) + '\n') - -# end - sys_PIO - - -def run_PIO(dummy): - - global build_type - global target_env - global board_name - print('build_type: ', build_type) - - import subprocess - - print('starting platformio') - - if build_type == 'build': - # platformio run -e target_env - # combine stdout & stderr so all compile messages are included - pio_subprocess = subprocess.Popen( - ['platformio', 'run', '-e', target_env], stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - - elif build_type == 'clean': - # platformio run --target clean -e target_env - # combine stdout & stderr so all compile messages are included - pio_subprocess = subprocess.Popen( - ['platformio', 'run', '--target', 'clean', '-e', target_env], stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - - elif build_type == 'upload': - # platformio run --target upload -e target_env - # combine stdout & stderr so all compile messages are included - pio_subprocess = subprocess.Popen( - ['platformio', 'run', '--target', 'upload', '-e', target_env], stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - - elif build_type == 'traceback': - # platformio run --target upload -e target_env - select the debug environment if there is one - # combine stdout & stderr so all compile messages are included - pio_subprocess = subprocess.Popen( - ['platformio', 'run', '--target', 'upload', '-e', target_env], stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - - elif build_type == 'program': - # platformio run --target program -e target_env - # combine stdout & stderr so all compile messages are included - pio_subprocess = subprocess.Popen( - ['platformio', 'run', '--target', 'program', '-e', target_env], stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - - elif build_type == 'test': - #platformio test upload -e target_env - # combine stdout & stderr so all compile messages are included - pio_subprocess = subprocess.Popen( - ['platformio', 'test', 'upload', '-e', target_env], stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - - elif build_type == 'remote': - # platformio remote run --target upload -e target_env - # combine stdout & stderr so all compile messages are included - pio_subprocess = subprocess.Popen( - ['platformio', 'remote', 'run', '--target', 'program', '-e', target_env], - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT - ) - - elif build_type == 'debug': - # platformio debug -e target_env - # combine stdout & stderr so all compile messages are included - pio_subprocess = subprocess.Popen( - ['platformio', 'debug', '-e', target_env], stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - - else: - print('ERROR - unknown build type: ', build_type) - raise SystemExit(0) # kill everything - -# stream output from subprocess and split it into lines - if python_ver == 2: - for line in iter(pio_subprocess.stdout.readline, ''): - line_print(line.replace('\n', '')) - else: - for line in iter(pio_subprocess.stdout.readline, b''): - line = line.decode('utf-8') - line_print(line.replace('\n', '')) - -# append info used to run PlatformIO - write_to_screen_queue('\nBoard name: ' + board_name + '\n') # put build info at the bottom of the screen - write_to_screen_queue('Build type: ' + build_type + '\n') - write_to_screen_queue('Environment used: ' + target_env + '\n') - write_to_screen_queue(str(datetime.now()) + '\n') - -# end - run_PIO - -######################################################################## - -import threading -if python_ver == 2: - import Tkinter as tk - import Queue as queue - import ttk - from Tkinter import Tk, Frame, Text, Scrollbar, Menu - #from tkMessageBox import askokcancel this is not used: removed - import tkFileDialog as fileDialog -else: - import tkinter as tk - import queue as queue - from tkinter import ttk, Tk, Frame, Text, Menu -import sys -que = queue.Queue() -#IO_queue = queue.Queue() - - -class output_window(Text): - # based on Super Text - global continue_updates - continue_updates = True - - global search_position - search_position = '' # start with invalid search position - - global error_found - error_found = False # are there any errors? - - def __init__(self): - - self.root = tk.Tk() - self.root.attributes("-topmost", True) - self.frame = tk.Frame(self.root) - self.frame.pack(fill='both', expand=True) - - # text widget - #self.text = tk.Text(self.frame, borderwidth=3, relief="sunken") - Text.__init__(self, self.frame, borderwidth=3, relief="sunken") - self.config(tabs=(400, )) # configure Text widget tab stops - self.config(background='black', foreground='white', font=("consolas", 12), wrap='word', undo='True') - #self.config(background = 'black', foreground = 'white', font= ("consolas", 12), wrap = 'none', undo = 'True') - self.config(height=24, width=100) - self.config(insertbackground='pale green') # keyboard insertion point - self.pack(side='left', fill='both', expand=True) - - self.tag_config('normal', foreground='white') - self.tag_config('warning', foreground='yellow') - self.tag_config('error', foreground='red') - self.tag_config('highlight_green', foreground='green') - self.tag_config('highlight_blue', foreground='cyan') - self.tag_config('error_highlight_inactive', background='dim gray') - self.tag_config('error_highlight_active', background='light grey') - - self.bind_class("Text", "", self.select_all) # required in windows, works in others - self.bind_all("", self.scroll_errors) - self.bind_class("", self.rebuild) - - # scrollbar - - scrb = tk.Scrollbar(self.frame, orient='vertical', command=self.yview) - self.config(yscrollcommand=scrb.set) - scrb.pack(side='right', fill='y') - - #self.scrb_Y = tk.Scrollbar(self.frame, orient='vertical', command=self.yview) - #self.scrb_Y.config(yscrollcommand=self.scrb_Y.set) - #self.scrb_Y.pack(side='right', fill='y') - - #self.scrb_X = tk.Scrollbar(self.frame, orient='horizontal', command=self.xview) - #self.scrb_X.config(xscrollcommand=self.scrb_X.set) - #self.scrb_X.pack(side='bottom', fill='x') - - #scrb_X = tk.Scrollbar(self, orient=tk.HORIZONTAL, command=self.xview) # tk.HORIZONTAL now have a horizsontal scroll bar BUT... shrinks it to a postage stamp and hides far right behind the vertical scroll bar - #self.config(xscrollcommand=scrb_X.set) - #scrb_X.pack(side='bottom', fill='x') - - #scrb= tk.Scrollbar(self, orient='vertical', command=self.yview) - #self.config(yscrollcommand=scrb.set) - #scrb.pack(side='right', fill='y') - - #self.config(height = 240, width = 1000) # didn't get the size baCK TO NORMAL - #self.pack(side='left', fill='both', expand=True) # didn't get the size baCK TO NORMAL - - # pop-up menu - self.popup = tk.Menu(self, tearoff=0) - - self.popup.add_command(label='Copy', command=self._copy) - self.popup.add_command(label='Paste', command=self._paste) - self.popup.add_separator() - self.popup.add_command(label='Cut', command=self._cut) - self.popup.add_separator() - self.popup.add_command(label='Select All', command=self._select_all) - self.popup.add_command(label='Clear All', command=self._clear_all) - self.popup.add_separator() - self.popup.add_command(label='Save As', command=self._file_save_as) - self.popup.add_separator() - #self.popup.add_command(label='Repeat Build(CTL-shift-r)', command=self._rebuild) - self.popup.add_command(label='Repeat Build', command=self._rebuild) - self.popup.add_separator() - self.popup.add_command(label='Scroll Errors (CTL-shift-e)', command=self._scroll_errors) - self.popup.add_separator() - self.popup.add_command(label='Open File at Cursor', command=self._open_selected_file) - - if current_OS == 'Darwin': # MAC - self.bind('', self._show_popup) # macOS only - else: - self.bind('', self._show_popup) # Windows & Linux - -# threading & subprocess section - - def start_thread(self, ): - global continue_updates - # create then start a secondary thread to run an arbitrary function - # must have at least one argument - self.secondary_thread = threading.Thread(target=lambda q, arg1: q.put(run_PIO(arg1)), args=(que, '')) - self.secondary_thread.start() - continue_updates = True - # check the Queue in 50ms - self.root.after(50, self.check_thread) - self.root.after(50, self.update) - - def check_thread(self): # wait for user to kill the window - global continue_updates - if continue_updates == True: - self.root.after(10, self.check_thread) - - def update(self): - global continue_updates - if continue_updates == True: - self.root.after(10, self.update) #method is called every 50ms - temp_text = ['0', '0'] - if IO_queue.empty(): - if not (self.secondary_thread.is_alive()): - continue_updates = False # queue is exhausted and thread is dead so no need for further updates - else: - try: - temp_text = IO_queue.get(block=False) - except queue.Empty: - continue_updates = False # queue is exhausted so no need for further updates - else: - self.insert('end', temp_text[0], temp_text[1]) - self.see("end") # make the last line visible (scroll text off the top) - -# text editing section - - def _scroll_errors(self): - global search_position - global error_found - if search_position == '': # first time so highlight all errors - countVar = tk.IntVar() - search_position = '1.0' - search_count = 0 - while search_position != '' and search_count < 100: - search_position = self.search("error", search_position, stopindex="end", count=countVar, nocase=1) - search_count = search_count + 1 - if search_position != '': - error_found = True - end_pos = '{}+{}c'.format(search_position, 5) - self.tag_add("error_highlight_inactive", search_position, end_pos) - search_position = '{}+{}c'.format(search_position, 1) # point to the next character for new search - else: - break - - if error_found: - if search_position == '': - search_position = self.search("error", '1.0', stopindex="end", nocase=1) # new search - else: # remove active highlight - end_pos = '{}+{}c'.format(search_position, 5) - start_pos = '{}+{}c'.format(search_position, -1) - self.tag_remove("error_highlight_active", start_pos, end_pos) - search_position = self.search( - "error", search_position, stopindex="end", nocase=1 - ) # finds first occurrence AGAIN on the first time through - if search_position == "": # wrap around - search_position = self.search("error", '1.0', stopindex="end", nocase=1) - end_pos = '{}+{}c'.format(search_position, 5) - self.tag_add("error_highlight_active", search_position, end_pos) # add active highlight - self.see(search_position) - search_position = '{}+{}c'.format(search_position, 1) # point to the next character for new search - - def scroll_errors(self, event): - self._scroll_errors() - - def _rebuild(self): - #global board_name - #global Marlin_ver - #global target_env - #board_name, Marlin_ver = get_board_name() - #target_env = get_env(board_name, Marlin_ver) - self.start_thread() - - def rebuild(self, event): - print("event happened") - self._rebuild() - - def _open_selected_file(self): - current_line = self.index('insert') - line_start = current_line[:current_line.find('.')] + '.0' - line_end = current_line[:current_line.find('.')] + '.200' - self.mark_set("path_start", line_start) - self.mark_set("path_end", line_end) - path = self.get("path_start", "path_end") - from_loc = path.find('from ') - colon_loc = path.find(': ') - if 0 <= from_loc and ((colon_loc == -1) or (from_loc < colon_loc)): - path = path[from_loc + 5:] - if 0 <= colon_loc: - path = path[:colon_loc] - if 0 <= path.find('\\') or 0 <= path.find('/'): # make sure it really contains a path - open_file(path) - - def _file_save_as(self): - self.filename = fileDialog.asksaveasfilename(defaultextension='.txt') - f = open(self.filename, 'w') - f.write(self.get('1.0', 'end')) - f.close() - - def copy(self, event): - try: - selection = self.get(*self.tag_ranges('sel')) - self.clipboard_clear() - self.clipboard_append(selection) - except TypeError: - pass - - def cut(self, event): - try: - selection = self.get(*self.tag_ranges('sel')) - self.clipboard_clear() - self.clipboard_append(selection) - self.delete(*self.tag_ranges('sel')) - except TypeError: - pass - - def _show_popup(self, event): - '''right-click popup menu''' - - if self.root.focus_get() != self: - self.root.focus_set() - - try: - self.popup.tk_popup(event.x_root, event.y_root, 0) - finally: - self.popup.grab_release() - - def _cut(self): - try: - selection = self.get(*self.tag_ranges('sel')) - self.clipboard_clear() - self.clipboard_append(selection) - self.delete(*self.tag_ranges('sel')) - except TypeError: - pass - - def cut(self, event): - self._cut() - - def _copy(self): - - try: - selection = self.get(*self.tag_ranges('sel')) - self.clipboard_clear() - self.clipboard_append(selection) - except TypeError: - pass - - def copy(self, event): - self._copy() - - def _paste(self): - self.insert('insert', self.selection_get(selection='CLIPBOARD')) - - def _select_all(self): - self.tag_add('sel', '1.0', 'end') - - def select_all(self, event): - self.tag_add('sel', '1.0', 'end') - - def _clear_all(self): - #'''erases all text''' - # - #isok = askokcancel('Clear All', 'Erase all text?', frame=self, - # default='ok') - #if isok: - # self.delete('1.0', 'end') - self.delete('1.0', 'end') - -# end - output_window - - -def main(): - - ########################################################################## - # # - # main program # - # # - ########################################################################## - - global build_type - global target_env - global board_name - global Marlin_ver - - board_name, Marlin_ver = get_board_name() - - target_env = get_env(board_name, Marlin_ver) - - # Re-use the VSCode terminal, if possible - if os.environ.get('PLATFORMIO_CALLER', '') == 'vscode': - sys_PIO() - else: - auto_build = output_window() - auto_build.start_thread() # executes the "run_PIO" function - - auto_build.root.mainloop() - - -if __name__ == '__main__': - - main() diff --git a/firmware/buildroot/share/vscode/create_custom_upload_command_CDC.py b/firmware/buildroot/share/vscode/create_custom_upload_command_CDC.py deleted file mode 100644 index b2d4d57..0000000 --- a/firmware/buildroot/share/vscode/create_custom_upload_command_CDC.py +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env python -# -# Builds custom upload command -# 1) Run platformio as a subprocess to find a COM port -# 2) Build the upload command -# 3) Exit and let upload tool do the work -# -# This script runs between completion of the library/dependencies installation and compilation. -# -# Will continue on if a COM port isn't found so that the compilation can be done. -# - -from __future__ import print_function -from __future__ import division - -import subprocess, os, platform -from SCons.Script import DefaultEnvironment - -current_OS = platform.system() - -env = DefaultEnvironment() - -build_type = os.environ.get("BUILD_TYPE", 'Not Set') - - -if not(build_type == 'upload' or build_type == 'traceback' or build_type == 'Not Set') : - env.Replace(UPLOAD_PROTOCOL = 'teensy-gui') # run normal Teensy2 scripts -else: - com_first = '' - com_last = '' - com_CDC = '' - description_first = '' - description_last = '' - description_CDC = '' - - # - # grab the first com port that pops up unless we find one we know for sure - # is a CDC device - # - def get_com_port(com_search_text, descr_search_text, start): - - global com_first - global com_last - global com_CDC - global description_first - global description_last - global description_CDC - - - print('\nLooking for Serial Port\n') - - # stream output from subprocess and split it into lines - pio_subprocess = subprocess.Popen(['platformio', 'device', 'list'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - - looking_for_description = False - for line in iter(pio_subprocess.stdout.readline, ''): - if 0 <= line.find(com_search_text): - looking_for_description = True - com_last = line.replace('\n', '') - if com_first == '': - com_first = com_last - if 0 <= line.find(descr_search_text) and looking_for_description: - looking_for_description = False - description_last = line[ start : ] - if description_first == '': - description_first = description_last - if 0 <= description_last.find('CDC'): - com_CDC = com_last - description_CDC = description_last - - if com_CDC == '' and com_first != '': - com_CDC = com_first - description_CDC = description_first - elif com_CDC == '': - com_CDC = 'COM_PORT_NOT_FOUND' - - while 0 <= com_CDC.find('\n'): - com_CDC = com_CDC.replace('\n', '') - while 0 <= com_CDC.find('\r'): - com_CDC = com_CDC.replace('\r', '') - - if com_CDC == 'COM_PORT_NOT_FOUND': - print(com_CDC, '\n') - else: - print('FOUND: ', com_CDC) - print('DESCRIPTION: ', description_CDC, '\n') - - if current_OS == 'Windows': - - get_com_port('COM', 'Hardware ID:', 13) - - # avrdude_conf_path = env.get("PIOHOME_DIR") + '\\packages\\toolchain-atmelavr\\etc\\avrdude.conf' - avrdude_conf_path = 'buildroot\\share\\vscode\\avrdude.conf' - - avrdude_exe_path = 'buildroot\\share\\vscode\\avrdude_5.10.exe' - - # source_path = env.get("PROJECTBUILD_DIR") + '\\' + env.get("PIOENV") + '\\firmware.hex' - source_path = '.pio\\build\\' + env.get("PIOENV") + '\\firmware.hex' - - upload_string = avrdude_exe_path + ' -p usb1286 -c avr109 -P ' + com_CDC + ' -U flash:w:' + source_path + ':i' - - - if current_OS == 'Darwin': # MAC - - get_com_port('usbmodem', 'Description:', 13) - -# avrdude_conf_path = env.get("PIOHOME_DIR") + '/packages/toolchain-atmelavr/etc/avrdude.conf' - avrdude_conf_path = 'buildroot/share/vscode/avrdude_macOS.conf' - - - avrdude_exe_path = 'buildroot/share/vscode/avrdude_5.10_macOS' - -# source_path = env.get("PROJECTBUILD_DIR") + '/' + env.get("PIOENV") + '/firmware.hex' - source_path = '.pio/build/' + env.get("PIOENV") + '/firmware.hex' - - -# upload_string = 'avrdude -p usb1286 -c avr109 -P ' + com_CDC + ' -U flash:w:' + source_path + ':i' - upload_string = avrdude_exe_path + ' -p usb1286 -c avr109 -P ' + com_CDC + ' -C ' + avrdude_conf_path + ' -U flash:w:' + source_path + ':i' - print('upload_string: ', upload_string) - - - - if current_OS == 'Linux': - - get_com_port('/dev/tty', 'Description:', 13) - -# avrdude_conf_path = env.get("PIOHOME_DIR") + '/packages/toolchain-atmelavr/etc/avrdude.conf' - avrdude_conf_path = 'buildroot/share/vscode/avrdude_linux.conf' - - - avrdude_exe_path = 'buildroot/share/vscode/avrdude_5.10_linux' -# source_path = env.get("PROJECTBUILD_DIR") + '/' + env.get("PIOENV") + '/firmware.hex' - source_path = '.pio/build/' + env.get("PIOENV") + '/firmware.hex' - -# upload_string = 'avrdude -p usb1286 -c avr109 -P ' + com_CDC + ' -U flash:w:' + source_path + ':i' - upload_string = avrdude_exe_path + ' -p usb1286 -c avr109 -P ' + com_CDC + ' -C ' + avrdude_conf_path + ' -U flash:w:' + source_path + ':i' - - - env.Replace( - UPLOADCMD = upload_string, - MAXIMUM_RAM_SIZE = 8192, - MAXIMUM_SIZE = 130048 - ) diff --git a/firmware/buildroot/share/vscode/create_custom_upload_command_DFU.py b/firmware/buildroot/share/vscode/create_custom_upload_command_DFU.py deleted file mode 100644 index 22809e1..0000000 --- a/firmware/buildroot/share/vscode/create_custom_upload_command_DFU.py +++ /dev/null @@ -1,41 +0,0 @@ -# -# Builds custom upload command -# 1) Run platformio as a subprocess to find a COM port -# 2) Build the upload command -# 3) Exit and let upload tool do the work -# -# This script runs between completion of the library/dependencies installation and compilation. -# -# Will continue on if a COM port isn't found so that the compilation can be done. -# - -import os, platform -from SCons.Script import DefaultEnvironment - -current_OS = platform.system() - -env = DefaultEnvironment() - -build_type = os.environ.get("BUILD_TYPE", 'Not Set') -if not(build_type == 'upload' or build_type == 'traceback' or build_type == 'Not Set') : - env.Replace(UPLOAD_PROTOCOL = 'teensy-gui') # run normal Teensy2 scripts -else: - - if current_OS == 'Windows': - avrdude_conf_path = env.get("PIOHOME_DIR") + '\\packages\\toolchain-atmelavr\\etc\\avrdude.conf' - - source_path = env.get("PROJECTBUILD_DIR") + '\\' + env.get("PIOENV") + '\\firmware.hex' - - upload_string = 'avrdude -p usb1286 -c flip1 -C ' + avrdude_conf_path + ' -U flash:w:' + source_path + ':i' - - else: - source_path = env.get("PROJECTBUILD_DIR") + '/' + env.get("PIOENV") + '/firmware.hex' - - upload_string = 'avrdude -p usb1286 -c flip1 -U flash:w:' + source_path + ':i' - - - env.Replace( - UPLOADCMD = upload_string, - MAXIMUM_RAM_SIZE = 8192, - MAXIMUM_SIZE = 130048 - ) diff --git a/firmware/buildroot/tests/ARMED b/firmware/buildroot/tests/ARMED old mode 100755 new mode 100644 index 7b9fef1..e47e101 --- a/firmware/buildroot/tests/ARMED +++ b/firmware/buildroot/tests/ARMED @@ -7,13 +7,10 @@ set -e # -# Build with the default configurations +# Build with modified ArmEd configuration # restore_configs use_example_configs ArmEd opt_set X_DRIVER_TYPE TMC2130 Y_DRIVER_TYPE TMC2208 opt_enable LASER_SYNCHRONOUS_M106_M107 exec_test $1 $2 "ArmEd Example Configuration with mixed TMC Drivers" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/BTT_BTT002 b/firmware/buildroot/tests/BTT_BTT002 old mode 100755 new mode 100644 index 5398d30..121aace --- a/firmware/buildroot/tests/BTT_BTT002 +++ b/firmware/buildroot/tests/BTT_BTT002 @@ -21,6 +21,3 @@ exec_test $1 $2 "BigTreeTech BTT002 Default Configuration plus TMC steppers" "$3 # use_example_configs Prusa/MK3S-BigTreeTech-BTT002 exec_test $1 $2 "BigTreeTech BTT002 with Prusa MK3S and related options" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/BTT_GTR_V1_0 b/firmware/buildroot/tests/BTT_GTR_V1_0 old mode 100755 new mode 100644 index dcfd2b3..c6cb7d5 --- a/firmware/buildroot/tests/BTT_GTR_V1_0 +++ b/firmware/buildroot/tests/BTT_GTR_V1_0 @@ -46,6 +46,3 @@ opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \ opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SWITCHING_TOOLHEAD TOOL_SENSOR MPCTEMP MPC_EDIT_MENU MPC_AUTOTUNE MPC_AUTOTUNE_MENU opt_disable PIDTEMP exec_test $1 $2 "BigTreeTech GTR | MPC | Switching Toolhead | Tool Sensors" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/BTT_GTR_V1_0_usb_flash_drive b/firmware/buildroot/tests/BTT_GTR_V1_0_usb_flash_drive old mode 100755 new mode 100644 index 78aec13..da45592 --- a/firmware/buildroot/tests/BTT_GTR_V1_0_usb_flash_drive +++ b/firmware/buildroot/tests/BTT_GTR_V1_0_usb_flash_drive @@ -19,6 +19,3 @@ opt_set E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 NEOPIXEL_ FIL_RUNOUT4_STATE HIGH FIL_RUNOUT8_STATE HIGH opt_enable FIL_RUNOUT4_PULLUP FIL_RUNOUT8_PULLUP exec_test $1 $2 "GTT GTR | OTG USB Flash Drive | 8 Extruders | Auto-Fan | Mixed TMC Drivers | Runout Sensors (distinct)" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/BTT_SKR_PRO b/firmware/buildroot/tests/BTT_SKR_PRO old mode 100755 new mode 100644 index 3ffc985..f20116d --- a/firmware/buildroot/tests/BTT_SKR_PRO +++ b/firmware/buildroot/tests/BTT_SKR_PRO @@ -28,6 +28,3 @@ opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1 SERIAL_PORT -1 \ TEMP_SENSOR_COOLER 1000 TEMP_COOLER_PIN PD13 opt_enable LASER_FEATURE LASER_SAFETY_TIMEOUT_MS REPRAP_DISCOUNT_SMART_CONTROLLER exec_test $1 $2 "BigTreeTech SKR Pro | HD44780 | Laser (Percent) | Cooling | LCD" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/BTT_SKR_SE_BX b/firmware/buildroot/tests/BTT_SKR_SE_BX old mode 100755 new mode 100644 index 199cff1..8ba87da --- a/firmware/buildroot/tests/BTT_SKR_SE_BX +++ b/firmware/buildroot/tests/BTT_SKR_SE_BX @@ -11,6 +11,3 @@ set -e # use_example_configs BIQU/BX exec_test $1 $2 "BIQU/BX" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/DUE b/firmware/buildroot/tests/DUE old mode 100755 new mode 100644 index 3c4876b..33f6bd5 --- a/firmware/buildroot/tests/DUE +++ b/firmware/buildroot/tests/DUE @@ -37,11 +37,10 @@ exec_test $1 $2 "RAMPS4DUE_EFB with ABL (Bilinear), ExtUI, S-Curve, many options # RADDS with BLTouch, ABL(B), 3 x Z auto-align # restore_configs -opt_set MOTHERBOARD BOARD_RADDS Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z3_DRIVER_TYPE A4988 +opt_set MOTHERBOARD BOARD_RADDS Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z3_DRIVER_TYPE A4988 \ + X_MAX_PIN -1 Y_MAX_PIN -1 opt_enable ENDSTOPPULLUPS BLTOUCH AUTO_BED_LEVELING_BILINEAR \ Z_STEPPER_AUTO_ALIGN Z_STEPPER_ALIGN_STEPPER_XY Z_SAFE_HOMING -pins_set ramps/RAMPS X_MAX_PIN -1 -pins_set ramps/RAMPS Y_MAX_PIN -1 exec_test $1 $2 "RADDS with ABL (Bilinear), Triple Z Axis, Z_STEPPER_AUTO_ALIGN, E_DUAL_STEPPER_DRIVERS" "$3" # @@ -49,5 +48,5 @@ exec_test $1 $2 "RADDS with ABL (Bilinear), Triple Z Axis, Z_STEPPER_AUTO_ALIGN, # restore_configs opt_set MOTHERBOARD BOARD_RAMPS4DUE_EEF LCD_LANGUAGE fi EXTRUDERS 2 TEMP_SENSOR_BED 0 NUM_SERVOS 1 -opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER BEEP_ON_FEEDRATE_CHANGE POWER_LOSS_RECOVERY -exec_test $1 $2 "RAMPS4DUE_EEF with SWITCHING_EXTRUDER, POWER_LOSS_RECOVERY" "$3" +opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER BEEP_ON_FEEDRATE_CHANGE CANCEL_OBJECTS POWER_LOSS_RECOVERY +exec_test $1 $2 "RAMPS4DUE_EEF with SWITCHING_EXTRUDER, CANCEL_OBJECTS, POWER_LOSS_RECOVERY" "$3" diff --git a/firmware/buildroot/tests/DUE_archim b/firmware/buildroot/tests/DUE_archim old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/FLYF407ZG b/firmware/buildroot/tests/FLYF407ZG old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/FYSETC_F6 b/firmware/buildroot/tests/FYSETC_F6 old mode 100755 new mode 100644 index 713408b..6dd7bb6 --- a/firmware/buildroot/tests/FYSETC_F6 +++ b/firmware/buildroot/tests/FYSETC_F6 @@ -73,6 +73,3 @@ opt_enable FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR PAUSE_BEFORE_DEPLOY_STOW FYSETC_242_OLED_12864 EEPROM_SETTINGS EEPROM_CHITCHAT M114_DETAIL Z_SAFE_HOMING \ STEALTHCHOP_XY STEALTHCHOP_Z STEALTHCHOP_E HYBRID_THRESHOLD SENSORLESS_HOMING X_STALL_SENSITIVITY Y_STALL_SENSITIVITY EDGE_STEPPING exec_test $1 $2 "SCARA | Mixed TMC | EEPROM" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/FYSETC_S6 b/firmware/buildroot/tests/FYSETC_S6 old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/HC32F460C_aquila_101 b/firmware/buildroot/tests/HC32F460C_aquila_101 old mode 100755 new mode 100644 index 0544720..00b286f --- a/firmware/buildroot/tests/HC32F460C_aquila_101 +++ b/firmware/buildroot/tests/HC32F460C_aquila_101 @@ -8,7 +8,7 @@ set -e restore_configs opt_set MOTHERBOARD BOARD_AQUILA_V101 SERIAL_PORT 1 -opt_enable EEPROM_SETTINGS SDSUPPORT EMERGENCY_PARSER +opt_enable EEPROM_SETTINGS SDSUPPORT EMERGENCY_PARSER PINS_DEBUGGING exec_test $1 $2 "Default Configuration with Fallback SD EEPROM" "$3" # cleanup diff --git a/firmware/buildroot/tests/I3DBEEZ9_V1 b/firmware/buildroot/tests/I3DBEEZ9_V1 old mode 100755 new mode 100644 index 7c11d2e..8100932 --- a/firmware/buildroot/tests/I3DBEEZ9_V1 +++ b/firmware/buildroot/tests/I3DBEEZ9_V1 @@ -28,6 +28,3 @@ opt_set MOTHERBOARD BOARD_I3DBEEZ9_V1 SERIAL_PORT -1 \ TEMP_SENSOR_COOLER 1000 TEMP_COOLER_PIN PD13 opt_enable LASER_FEATURE LASER_SAFETY_TIMEOUT_MS REPRAP_DISCOUNT_SMART_CONTROLLER exec_test $1 $2 "I3DBEE Z9 Board | HD44780 | Laser (Percent) | Cooling | LCD" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/LERDGEK b/firmware/buildroot/tests/LERDGEK old mode 100755 new mode 100644 index b0806e9..347bdbf --- a/firmware/buildroot/tests/LERDGEK +++ b/firmware/buildroot/tests/LERDGEK @@ -13,6 +13,3 @@ restore_configs opt_set MOTHERBOARD BOARD_LERDGE_K SERIAL_PORT 1 opt_enable TFT_GENERIC TFT_INTERFACE_FSMC TFT_COLOR_UI COMPACT_MARLIN_BOOT_LOGO exec_test $1 $2 "LERDGE K with Generic FSMC TFT with ColorUI" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/LERDGEX b/firmware/buildroot/tests/LERDGEX old mode 100755 new mode 100644 index cf7dfeb..f7851db --- a/firmware/buildroot/tests/LERDGEX +++ b/firmware/buildroot/tests/LERDGEX @@ -12,6 +12,3 @@ set -e restore_configs opt_set MOTHERBOARD BOARD_LERDGE_X SERIAL_PORT 1 exec_test $1 $2 "LERDGE X with Default Configuration" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/LPC1768 b/firmware/buildroot/tests/LPC1768 old mode 100755 new mode 100644 index f932625..3a08af8 --- a/firmware/buildroot/tests/LPC1768 +++ b/firmware/buildroot/tests/LPC1768 @@ -17,7 +17,9 @@ restore_configs opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB SERIAL_PORT_3 3 \ NEOPIXEL_TYPE NEO_RGB RGB_LED_R_PIN P2_12 RGB_LED_G_PIN P1_23 RGB_LED_B_PIN P1_22 RGB_LED_W_PIN P1_24 opt_enable FYSETC_MINI_12864_2_1 SDSUPPORT SDCARD_READONLY SERIAL_PORT_2 RGBW_LED E_DUAL_STEPPER_DRIVERS \ - NEOPIXEL_LED NEOPIXEL_IS_SEQUENTIAL NEOPIXEL_STARTUP_TEST NEOPIXEL_BKGD_INDEX_FIRST NEOPIXEL_BKGD_INDEX_LAST NEOPIXEL_BKGD_COLOR NEOPIXEL_BKGD_TIMEOUT_COLOR NEOPIXEL_BKGD_ALWAYS_ON + NEOPIXEL_LED NEOPIXEL_IS_SEQUENTIAL NEOPIXEL_STARTUP_TEST NEOPIXEL_BKGD_INDEX_FIRST NEOPIXEL_BKGD_INDEX_LAST \ + NEOPIXEL_BKGD_COLOR NEOPIXEL_BKGD_TIMEOUT_COLOR NEOPIXEL_BKGD_ALWAYS_ON \ + PINS_DEBUGGING exec_test $1 $2 "ReARM EFB VIKI2, SDSUPPORT, 2 Serial ports (USB CDC + UART0), NeoPixel" "$3" #restore_configs @@ -74,7 +76,7 @@ opt_set MOTHERBOARD BOARD_BTT_SKR_V1_4 SERIAL_PORT -1 \ Z_STEPPER_ALIGN_XY '{{10,110},{200,110}}' \ Z_STEPPER_ALIGN_ITERATIONS 10 DEFAULT_STEPPER_TIMEOUT_SEC 0 \ SLOWDOWN_DIVISOR 16 SDCARD_CONNECTION ONBOARD BLOCK_BUFFER_SIZE 64 \ - CHOPPER_TIMING CHOPPER_DEFAULT_24V MMU2_SERIAL_PORT 0 + CHOPPER_TIMING CHOPPER_DEFAULT_24V MMU_SERIAL_PORT 0 opt_enable PIDTEMPBED S_CURVE_ACCELERATION \ USE_PROBE_FOR_Z_HOMING BLTOUCH FILAMENT_RUNOUT_SENSOR \ AUTO_BED_LEVELING_BILINEAR RESTORE_LEVELING_AFTER_G28 \ @@ -89,10 +91,7 @@ opt_enable PIDTEMPBED S_CURVE_ACCELERATION \ DOUBLECLICK_FOR_Z_BABYSTEPPING BABYSTEP_DISPLAY_TOTAL LIN_ADVANCE \ BEZIER_CURVE_SUPPORT EMERGENCY_PARSER ADVANCED_PAUSE_FEATURE \ TMC_DEBUG HOST_ACTION_COMMANDS HOST_PAUSE_M76 HOST_PROMPT_SUPPORT \ - HOST_STATUS_NOTIFICATIONS MMU2_DEBUG + HOST_STATUS_NOTIFICATIONS MMU_DEBUG opt_disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN FILAMENT_LOAD_UNLOAD_GCODES \ PARK_HEAD_ON_PAUSE exec_test $1 $2 "BigTreeTech SKR 1.4 | MMU2" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/LPC1769 b/firmware/buildroot/tests/LPC1769 old mode 100755 new mode 100644 index 6cdeb43..ad14e33 --- a/firmware/buildroot/tests/LPC1769 +++ b/firmware/buildroot/tests/LPC1769 @@ -79,7 +79,7 @@ opt_set MOTHERBOARD BOARD_BTT_SKR_V1_4_TURBO SERIAL_PORT -1 \ Z_STEPPER_ALIGN_XY '{{10,110},{200,110}}' \ Z_STEPPER_ALIGN_ITERATIONS 10 DEFAULT_STEPPER_TIMEOUT_SEC 0 \ SLOWDOWN_DIVISOR 16 SDCARD_CONNECTION ONBOARD BLOCK_BUFFER_SIZE 64 \ - CHOPPER_TIMING CHOPPER_DEFAULT_24V MMU2_SERIAL_PORT 0 \ + CHOPPER_TIMING CHOPPER_DEFAULT_24V MMU_SERIAL_PORT 0 \ Z_MIN_ENDSTOP_HIT_STATE HIGH opt_enable PIDTEMPBED S_CURVE_ACCELERATION \ USE_PROBE_FOR_Z_HOMING BLTOUCH FILAMENT_RUNOUT_SENSOR \ @@ -95,9 +95,6 @@ opt_enable PIDTEMPBED S_CURVE_ACCELERATION \ DOUBLECLICK_FOR_Z_BABYSTEPPING BABYSTEP_DISPLAY_TOTAL LIN_ADVANCE \ BEZIER_CURVE_SUPPORT EMERGENCY_PARSER ADVANCED_PAUSE_FEATURE \ TMC_DEBUG HOST_ACTION_COMMANDS HOST_PAUSE_M76 HOST_PROMPT_SUPPORT HOST_STATUS_NOTIFICATIONS \ - MMU_SPOOL_JOIN_CONSUMES_ALL_FILAMENT MMU_MENUS MMU2_DEBUG + MMU3_SPOOL_JOIN_CONSUMES_ALL_FILAMENT MMU_MENUS MMU_DEBUG opt_disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN FILAMENT_LOAD_UNLOAD_GCODES PARK_HEAD_ON_PAUSE exec_test $1 $2 "BigTreeTech SKR 1.4 Turbo | MMU3" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/NUCLEO_F767ZI b/firmware/buildroot/tests/NUCLEO_F767ZI old mode 100755 new mode 100644 index a331618..9f4e332 --- a/firmware/buildroot/tests/NUCLEO_F767ZI +++ b/firmware/buildroot/tests/NUCLEO_F767ZI @@ -13,6 +13,3 @@ restore_configs opt_set MOTHERBOARD BOARD_NUCLEO_F767ZI SERIAL_PORT -1 X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2208 opt_enable BLTOUCH Z_SAFE_HOMING REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SPEAKER STARTUP_TUNE SOFTWARE_DRIVER_ENABLE exec_test $1 $2 "Mixed timer usage" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/Opulo_Lumen_REV3 b/firmware/buildroot/tests/Opulo_Lumen_REV3 old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/PANDA_PI_V29 b/firmware/buildroot/tests/PANDA_PI_V29 old mode 100755 new mode 100644 index a176e57..14f8671 --- a/firmware/buildroot/tests/PANDA_PI_V29 +++ b/firmware/buildroot/tests/PANDA_PI_V29 @@ -14,6 +14,3 @@ opt_set MOTHERBOARD BOARD_PANDA_PI_V29 SERIAL_PORT -1 \ Z_CLEARANCE_DEPLOY_PROBE 0 Z_CLEARANCE_BETWEEN_PROBES 1 Z_CLEARANCE_MULTI_PROBE 1 opt_enable BD_SENSOR AUTO_BED_LEVELING_BILINEAR Z_SAFE_HOMING BABYSTEPPING exec_test $1 $2 "Panda Pi V29 | BD Sensor | ABL-B" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/REMRAM_V1 b/firmware/buildroot/tests/REMRAM_V1 old mode 100755 new mode 100644 index f5944ff..4ea63fa --- a/firmware/buildroot/tests/REMRAM_V1 +++ b/firmware/buildroot/tests/REMRAM_V1 @@ -13,6 +13,3 @@ restore_configs opt_set MOTHERBOARD BOARD_REMRAM_V1 opt_set SERIAL_PORT 1 exec_test $1 $2 "Default Configuration" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/SAMD21_minitronics20 b/firmware/buildroot/tests/SAMD21_minitronics20 old mode 100755 new mode 100644 index ae9fa55..fb23e90 --- a/firmware/buildroot/tests/SAMD21_minitronics20 +++ b/firmware/buildroot/tests/SAMD21_minitronics20 @@ -27,6 +27,3 @@ opt_enable ENDSTOP_INTERRUPTS_FEATURE BLTOUCH Z_MIN_PROBE_REPEATABILITY_TEST \ MOVE_Z_WHEN_IDLE BABYSTEP_ZPROBE_OFFSET BABYSTEP_GFX_OVERLAY \ LIN_ADVANCE ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE MONITOR_DRIVER_STATUS exec_test $1 $2 "Minitronics 2.0 with assorted features" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/SAMD51_grandcentral_m4 b/firmware/buildroot/tests/SAMD51_grandcentral_m4 old mode 100755 new mode 100644 index 312bd62..d4c4cea --- a/firmware/buildroot/tests/SAMD51_grandcentral_m4 +++ b/firmware/buildroot/tests/SAMD51_grandcentral_m4 @@ -27,8 +27,5 @@ opt_enable ENDSTOP_INTERRUPTS_FEATURE S_CURVE_ACCELERATION BLTOUCH Z_MIN_PROBE_R MOVE_Z_WHEN_IDLE BABYSTEP_ZPROBE_OFFSET BABYSTEP_GFX_OVERLAY \ LIN_ADVANCE ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE MONITOR_DRIVER_STATUS \ SENSORLESS_HOMING X_STALL_SENSITIVITY Y_STALL_SENSITIVITY Z_STALL_SENSITIVITY Z2_STALL_SENSITIVITY \ - EDGE_STEPPING TMC_DEBUG + EDGE_STEPPING TMC_DEBUG PINS_DEBUGGING exec_test $1 $2 "Grand Central M4 with assorted features" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/SKR_Pico b/firmware/buildroot/tests/SKR_Pico new file mode 100644 index 0000000..1564a2c --- /dev/null +++ b/firmware/buildroot/tests/SKR_Pico @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Build tests for BTT SKR Pico +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_BTT_SKR_PICO NUM_SERVOS 1 +opt_enable Z_PROBE_SERVO_NR Z_SERVO_ANGLES Z_SAFE_HOMING M114_DETAIL +exec_test $1 $2 "Default Configuration" "$3" + +# clean up +restore_configs diff --git a/firmware/buildroot/tests/STM32F070CB_malyan b/firmware/buildroot/tests/STM32F070CB_malyan old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/STM32F070RB_malyan b/firmware/buildroot/tests/STM32F070RB_malyan old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/STM32F103CB_malyan b/firmware/buildroot/tests/STM32F103CB_malyan old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/STM32F103RC_btt b/firmware/buildroot/tests/STM32F103RC_btt old mode 100755 new mode 100644 index b9fff2b..62ef7d9 --- a/firmware/buildroot/tests/STM32F103RC_btt +++ b/firmware/buildroot/tests/STM32F103RC_btt @@ -14,6 +14,3 @@ opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V1_0 SERIAL_PORT 1 SERIAL_PORT_2 -1 \ X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 Z_DRIVER_TYPE TMC2209 E0_DRIVER_TYPE TMC2209 opt_enable CR10_STOCKDISPLAY PINS_DEBUGGING Z_IDLE_HEIGHT FT_MOTION FT_MOTION_MENU ADAPTIVE_STEP_SMOOTHING NONLINEAR_EXTRUSION exec_test $1 $2 "BigTreeTech SKR Mini E3 1.0 - TMC2209 HW Serial, FT_MOTION" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/STM32F103RC_btt_USB b/firmware/buildroot/tests/STM32F103RC_btt_USB old mode 100755 new mode 100644 index c8ee4f7..922b8f8 --- a/firmware/buildroot/tests/STM32F103RC_btt_USB +++ b/firmware/buildroot/tests/STM32F103RC_btt_USB @@ -12,6 +12,3 @@ set -e restore_configs opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_V1_1 SERIAL_PORT 1 SERIAL_PORT_2 -1 TEMP_SENSOR_SOC 100 exec_test $1 $2 "BigTreeTech SKR Mini v1.1 - SOC Temperature" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/STM32F103RC_btt_USB_maple b/firmware/buildroot/tests/STM32F103RC_btt_USB_maple old mode 100755 new mode 100644 index eeb4609..e9ce166 --- a/firmware/buildroot/tests/STM32F103RC_btt_USB_maple +++ b/firmware/buildroot/tests/STM32F103RC_btt_USB_maple @@ -12,6 +12,3 @@ set -e restore_configs opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_V1_1 SERIAL_PORT 1 SERIAL_PORT_2 -1 BAUDRATE_2 115200 exec_test $1 $2 "BigTreeTech SKR Mini v1.1 - Basic Configuration" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/STM32F103RC_btt_maple b/firmware/buildroot/tests/STM32F103RC_btt_maple old mode 100755 new mode 100644 index 90e33ab..1ede07f --- a/firmware/buildroot/tests/STM32F103RC_btt_maple +++ b/firmware/buildroot/tests/STM32F103RC_btt_maple @@ -14,6 +14,3 @@ opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V1_0 SERIAL_PORT 1 SERIAL_PORT_2 -1 \ X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 Z_DRIVER_TYPE TMC2209 E0_DRIVER_TYPE TMC2209 opt_enable PINS_DEBUGGING Z_IDLE_HEIGHT exec_test $1 $2 "BigTreeTech SKR Mini E3 1.0 - Basic Config with TMC2209 HW Serial" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/STM32F103RC_fysetc b/firmware/buildroot/tests/STM32F103RC_fysetc old mode 100755 new mode 100644 index 93b0fed..6a19e01 --- a/firmware/buildroot/tests/STM32F103RC_fysetc +++ b/firmware/buildroot/tests/STM32F103RC_fysetc @@ -11,6 +11,3 @@ set -e # use_example_configs "Creality/Ender-3/FYSETC Cheetah 1.2/BLTouch" exec_test $1 $2 "Ender-3 with Cheetah 1.2 | BLTouch" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/STM32F103RC_fysetc_maple b/firmware/buildroot/tests/STM32F103RC_fysetc_maple old mode 100755 new mode 100644 index 09dba7e..f401d1c --- a/firmware/buildroot/tests/STM32F103RC_fysetc_maple +++ b/firmware/buildroot/tests/STM32F103RC_fysetc_maple @@ -11,6 +11,3 @@ set -e # use_example_configs "Creality/Ender-3/FYSETC Cheetah 1.2/base" exec_test $1 $2 "Maple build of Cheetah 1.2 Configuration" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/STM32F103RC_meeb_maple b/firmware/buildroot/tests/STM32F103RC_meeb_maple old mode 100755 new mode 100644 index 3a191b4..f2a05ab --- a/firmware/buildroot/tests/STM32F103RC_meeb_maple +++ b/firmware/buildroot/tests/STM32F103RC_meeb_maple @@ -13,6 +13,3 @@ restore_configs opt_set MOTHERBOARD BOARD_CCROBOT_MEEB_3DP SERIAL_PORT 1 SERIAL_PORT_2 -1 \ X_DRIVER_TYPE TMC2208 Y_DRIVER_TYPE TMC2208 Z_DRIVER_TYPE TMC2208 E0_DRIVER_TYPE TMC2208 exec_test $1 $2 "MEEB_3DP - Basic Config with TMC2208 SW Serial" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/STM32F103RE b/firmware/buildroot/tests/STM32F103RE old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/STM32F103RE_btt b/firmware/buildroot/tests/STM32F103RE_btt old mode 100755 new mode 100644 index 197ca77..fdf1580 --- a/firmware/buildroot/tests/STM32F103RE_btt +++ b/firmware/buildroot/tests/STM32F103RE_btt @@ -15,6 +15,3 @@ opt_set MOTHERBOARD BOARD_BTT_SKR_E3_DIP \ X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2130 opt_enable SERIAL_DMA exec_test $1 $2 "BTT SKR E3 DIP 1.0 | Mixed TMC Drivers" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/STM32F103RE_btt_USB b/firmware/buildroot/tests/STM32F103RE_btt_USB old mode 100755 new mode 100644 index 0bf5f61..ddf1903 --- a/firmware/buildroot/tests/STM32F103RE_btt_USB +++ b/firmware/buildroot/tests/STM32F103RE_btt_USB @@ -22,6 +22,3 @@ opt_enable CR10_STOCKDISPLAY SDSUPPORT EMERGENCY_PARSER FAN_SOFT_PWM \ PROBING_HEATERS_OFF PREHEAT_BEFORE_PROBING opt_disable NOZZLE_TO_PROBE_OFFSET exec_test $1 $2 "BigTreeTech SKR CR6 PROBE_ACTIVATION_SWITCH, Probe Tare" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/STM32F103RE_creality b/firmware/buildroot/tests/STM32F103RE_creality old mode 100755 new mode 100644 index 44d818b..d08b82f --- a/firmware/buildroot/tests/STM32F103RE_creality +++ b/firmware/buildroot/tests/STM32F103RE_creality @@ -47,6 +47,3 @@ opt_enable NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE LCD_BED_TRAMMING CLASSIC_J opt_add NO_CREALITY_422_DRIVER_WARNING opt_add NO_AUTO_ASSIGN_WARNING exec_test $1 $2 "Creality V4.2.2 with IA_CREALITY" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple b/firmware/buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/STM32F103VE_longer b/firmware/buildroot/tests/STM32F103VE_longer old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/STM32F103VE_longer_maple b/firmware/buildroot/tests/STM32F103VE_longer_maple old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/STM32F401RC_creality b/firmware/buildroot/tests/STM32F401RC_creality old mode 100755 new mode 100644 index 61b8d2e..185599e --- a/firmware/buildroot/tests/STM32F401RC_creality +++ b/firmware/buildroot/tests/STM32F401RC_creality @@ -11,6 +11,3 @@ opt_enable AUTO_BED_LEVELING_BILINEAR Z_SAFE_HOMING opt_set MOTHERBOARD BOARD_CREALITY_V24S1_301F4 opt_add SDCARD_EEPROM_EMULATION exec_test $1 $2 "Ender-3 v2 with MarlinUI" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/STM32F407VE_black b/firmware/buildroot/tests/STM32F407VE_black old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/STM32G0B1RE_btt b/firmware/buildroot/tests/STM32G0B1RE_btt old mode 100755 new mode 100644 index 35ccf0f..04f740d --- a/firmware/buildroot/tests/STM32G0B1RE_btt +++ b/firmware/buildroot/tests/STM32G0B1RE_btt @@ -11,6 +11,3 @@ set -e # use_example_configs "Creality/Ender-3/BigTreeTech SKR Mini E3 3.0" exec_test $1 $2 "Creality/Ender-3/BigTreeTech SKR Mini E3 3.0" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/STM32H743VI_btt b/firmware/buildroot/tests/STM32H743VI_btt old mode 100755 new mode 100644 index b77cdb0..e73a786 --- a/firmware/buildroot/tests/STM32H743VI_btt +++ b/firmware/buildroot/tests/STM32H743VI_btt @@ -37,7 +37,7 @@ opt_set MOTHERBOARD BOARD_BTT_SKR_V3_0_EZ SERIAL_PORT -1 \ Z_STEPPER_ALIGN_XY '{{10,110},{200,110}}' \ Z_STEPPER_ALIGN_ITERATIONS 10 DEFAULT_STEPPER_TIMEOUT_SEC 0 \ SLOWDOWN_DIVISOR 16 SDCARD_CONNECTION ONBOARD BLOCK_BUFFER_SIZE 64 \ - CHOPPER_TIMING CHOPPER_DEFAULT_24V MMU2_SERIAL_PORT 2 + CHOPPER_TIMING CHOPPER_DEFAULT_24V MMU_SERIAL_PORT 2 opt_enable PIDTEMPBED ENDSTOP_INTERRUPTS_FEATURE S_CURVE_ACCELERATION \ USE_PROBE_FOR_Z_HOMING BLTOUCH FILAMENT_RUNOUT_SENSOR \ AUTO_BED_LEVELING_BILINEAR RESTORE_LEVELING_AFTER_G28 \ @@ -52,7 +52,7 @@ opt_enable PIDTEMPBED ENDSTOP_INTERRUPTS_FEATURE S_CURVE_ACCELERATION \ DOUBLECLICK_FOR_Z_BABYSTEPPING BABYSTEP_DISPLAY_TOTAL LIN_ADVANCE \ BEZIER_CURVE_SUPPORT EMERGENCY_PARSER ADVANCED_PAUSE_FEATURE \ TMC_DEBUG HOST_ACTION_COMMANDS HOST_PAUSE_M76 HOST_PROMPT_SUPPORT HOST_STATUS_NOTIFICATIONS \ - MMU2_DEBUG + MMU_DEBUG opt_disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN FILAMENT_LOAD_UNLOAD_GCODES PARK_HEAD_ON_PAUSE exec_test $1 $2 "BigTreeTech SKR 3 EZ | MMU2" "$3" @@ -71,7 +71,7 @@ opt_set MOTHERBOARD BOARD_BTT_SKR_V3_0_EZ SERIAL_PORT -1 \ Z_STEPPER_ALIGN_XY '{{10,110},{200,110}}' \ Z_STEPPER_ALIGN_ITERATIONS 10 DEFAULT_STEPPER_TIMEOUT_SEC 0 \ SLOWDOWN_DIVISOR 16 SDCARD_CONNECTION ONBOARD BLOCK_BUFFER_SIZE 64 \ - CHOPPER_TIMING CHOPPER_DEFAULT_24V MMU2_SERIAL_PORT 2 + CHOPPER_TIMING CHOPPER_DEFAULT_24V MMU_SERIAL_PORT 2 opt_enable PIDTEMPBED ENDSTOP_INTERRUPTS_FEATURE S_CURVE_ACCELERATION \ USE_PROBE_FOR_Z_HOMING BLTOUCH FILAMENT_RUNOUT_SENSOR \ AUTO_BED_LEVELING_BILINEAR RESTORE_LEVELING_AFTER_G28 \ @@ -86,9 +86,6 @@ opt_enable PIDTEMPBED ENDSTOP_INTERRUPTS_FEATURE S_CURVE_ACCELERATION \ DOUBLECLICK_FOR_Z_BABYSTEPPING BABYSTEP_DISPLAY_TOTAL LIN_ADVANCE \ BEZIER_CURVE_SUPPORT EMERGENCY_PARSER ADVANCED_PAUSE_FEATURE \ TMC_DEBUG HOST_ACTION_COMMANDS HOST_PAUSE_M76 HOST_PROMPT_SUPPORT HOST_STATUS_NOTIFICATIONS \ - MMU_MENUS MMU_SPOOL_JOIN_CONSUMES_ALL_FILAMENT MMU2_DEBUG + MMU_MENUS MMU3_SPOOL_JOIN_CONSUMES_ALL_FILAMENT MMU_DEBUG opt_disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN FILAMENT_LOAD_UNLOAD_GCODES PARK_HEAD_ON_PAUSE exec_test $1 $2 "BigTreeTech SKR 3 EZ | MMU3" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/at90usb1286_cdc b/firmware/buildroot/tests/at90usb1286_cdc old mode 100755 new mode 100644 index 7dcf8d5..5f775ad --- a/firmware/buildroot/tests/at90usb1286_cdc +++ b/firmware/buildroot/tests/at90usb1286_cdc @@ -12,6 +12,3 @@ set -e restore_configs opt_set MOTHERBOARD BOARD_BRAINWAVE_PRO exec_test $1 $2 "Default Configuration" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/at90usb1286_dfu b/firmware/buildroot/tests/at90usb1286_dfu old mode 100755 new mode 100644 index a753097..e1317ba --- a/firmware/buildroot/tests/at90usb1286_dfu +++ b/firmware/buildroot/tests/at90usb1286_dfu @@ -17,6 +17,3 @@ restore_configs opt_set MOTHERBOARD BOARD_PRINTRBOARD_REVF opt_enable MINIPANEL exec_test $1 $2 "Printrboard RevF with MiniPanel and Stepper DAC (in pins file)" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/chitu_f103 b/firmware/buildroot/tests/chitu_f103 old mode 100755 new mode 100644 index 139c480..d09ddf7 --- a/firmware/buildroot/tests/chitu_f103 +++ b/firmware/buildroot/tests/chitu_f103 @@ -11,6 +11,3 @@ set -e # use_example_configs Tronxy/X5SA exec_test $1 $2 "Tronxy/X5SA" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/esp32 b/firmware/buildroot/tests/esp32 old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/jgaurora_a5s_a1_maple b/firmware/buildroot/tests/jgaurora_a5s_a1_maple old mode 100755 new mode 100644 index e9be89e..d59100e --- a/firmware/buildroot/tests/jgaurora_a5s_a1_maple +++ b/firmware/buildroot/tests/jgaurora_a5s_a1_maple @@ -11,6 +11,3 @@ set -e # use_example_configs JGAurora/A5S exec_test $1 $2 "JGAurora/A5S Configuration" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/linux_native b/firmware/buildroot/tests/linux_native old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/malyan_M300 b/firmware/buildroot/tests/malyan_M300 old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/mega1280 b/firmware/buildroot/tests/mega1280 old mode 100755 new mode 100644 index 7e99ee4..1b1a8f8 --- a/firmware/buildroot/tests/mega1280 +++ b/firmware/buildroot/tests/mega1280 @@ -19,7 +19,7 @@ restore_configs opt_set LCD_LANGUAGE an \ POWER_MONITOR_CURRENT_PIN 14 POWER_MONITOR_VOLTAGE_PIN 15 \ CLOSED_LOOP_ENABLE_PIN 44 CLOSED_LOOP_MOVE_COMPLETE_PIN 45 -opt_enable SPINDLE_FEATURE ULTIMAKERCONTROLLER LCD_BED_LEVELING \ +opt_enable SPINDLE_FEATURE ULTIMAKERCONTROLLER LCD_BED_LEVELING EDITABLE_HOMING_FEEDRATE \ EEPROM_SETTINGS EEPROM_BOOT_SILENT EEPROM_AUTO_INIT \ SENSORLESS_BACKOFF_MM HOMING_BACKOFF_POST_MM HOME_Y_BEFORE_X CODEPENDENT_XY_HOMING \ MESH_BED_LEVELING ENABLE_LEVELING_FADE_HEIGHT MESH_G28_REST_ORIGIN \ @@ -60,6 +60,3 @@ opt_set LCD_LANGUAGE cz \ Z_MIN_ENDSTOP_HIT_STATE HIGH opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR BLTOUCH exec_test $1 $2 "DELTA | RRD LCD | ABL Bilinear | BLTOUCH" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/mega2560 b/firmware/buildroot/tests/mega2560 old mode 100755 new mode 100644 index d61f17b..d7a1490 --- a/firmware/buildroot/tests/mega2560 +++ b/firmware/buildroot/tests/mega2560 @@ -290,6 +290,3 @@ exec_test $1 $2 "MEGA2560 RAMPS | 128x64 LIGHTWEIGHT_UI | progress rotation" "$3 opt_disable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER exec_test $1 $2 "MEGA2560 RAMPS | HD44780 | progress rotation" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/melzi_optiboot b/firmware/buildroot/tests/melzi_optiboot old mode 100755 new mode 100644 index 086fcc9..0d9b87b --- a/firmware/buildroot/tests/melzi_optiboot +++ b/firmware/buildroot/tests/melzi_optiboot @@ -11,6 +11,3 @@ set -e # use_example_configs Creality/Ender-2 exec_test $1 $2 "Ender-2" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/mks_robin b/firmware/buildroot/tests/mks_robin old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/mks_robin_lite_maple b/firmware/buildroot/tests/mks_robin_lite_maple old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/mks_robin_maple b/firmware/buildroot/tests/mks_robin_maple old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/mks_robin_mini b/firmware/buildroot/tests/mks_robin_mini old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/mks_robin_nano_v1_3_f4_usbmod b/firmware/buildroot/tests/mks_robin_nano_v1_3_f4_usbmod old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/mks_robin_nano_v1v2 b/firmware/buildroot/tests/mks_robin_nano_v1v2 old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/mks_robin_nano_v1v2_maple b/firmware/buildroot/tests/mks_robin_nano_v1v2_maple old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/mks_robin_nano_v1v2_usbmod b/firmware/buildroot/tests/mks_robin_nano_v1v2_usbmod old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/mks_robin_pro2 b/firmware/buildroot/tests/mks_robin_pro2 old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/mks_robin_pro_maple b/firmware/buildroot/tests/mks_robin_pro_maple old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/mks_tinybee b/firmware/buildroot/tests/mks_tinybee old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/rambo b/firmware/buildroot/tests/rambo old mode 100755 new mode 100644 index 698765f..13a8e1e --- a/firmware/buildroot/tests/rambo +++ b/firmware/buildroot/tests/rambo @@ -79,7 +79,7 @@ exec_test $1 $2 "Rambo heated bed only" "$3" # restore_configs opt_set MOTHERBOARD BOARD_RAMBO EXTRUDERS 5 MMU_MODEL PRUSA_MMU2 -opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE EMERGENCY_PARSER MMU2_DEBUG +opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE EMERGENCY_PARSER MMU_DEBUG exec_test $1 $2 "Rambo with PRUSA_MMU2 " "$3" # @@ -87,7 +87,7 @@ exec_test $1 $2 "Rambo with PRUSA_MMU2 " "$3" # restore_configs opt_set MOTHERBOARD BOARD_RAMBO EXTRUDERS 5 MMU_MODEL PRUSA_MMU3 -opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER FILAMENT_RUNOUT_SENSOR NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE EMERGENCY_PARSER MMU_MENUS MMU2_DEBUG EEPROM_SETTINGS +opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER FILAMENT_RUNOUT_SENSOR NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE EMERGENCY_PARSER MMU_MENUS MMU_DEBUG EEPROM_SETTINGS exec_test $1 $2 "Rambo with PRUSA_MMU3 " "$3" # @@ -144,6 +144,3 @@ opt_enable COREYX MIXING_EXTRUDER GRADIENT_MIX \ USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_USE_Z_ONLY opt_disable DISABLE_OTHER_EXTRUDERS exec_test $1 $2 "Rambo | CoreXY, Gradient Mix | Endstop Int. | Home Y > X | FW Retract ..." "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/rumba32 b/firmware/buildroot/tests/rumba32 old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/sanguino1284p b/firmware/buildroot/tests/sanguino1284p old mode 100755 new mode 100644 index 7c2aa61..345383c --- a/firmware/buildroot/tests/sanguino1284p +++ b/firmware/buildroot/tests/sanguino1284p @@ -23,6 +23,3 @@ restore_configs opt_set MOTHERBOARD BOARD_MELZI opt_enable ZONESTAR_LCD exec_test $1 $2 "Default Configuration | ZONESTAR_LCD " "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/sanguino644p b/firmware/buildroot/tests/sanguino644p old mode 100755 new mode 100644 index 12910a7..81a202f --- a/firmware/buildroot/tests/sanguino644p +++ b/firmware/buildroot/tests/sanguino644p @@ -12,6 +12,3 @@ set -e restore_configs opt_set MOTHERBOARD BOARD_SANGUINOLOLU_12 exec_test $1 $2 "Default Configuration" "$3" - -# clean up -restore_configs diff --git a/firmware/buildroot/tests/simulator_linux_release b/firmware/buildroot/tests/simulator_linux_release old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/teensy31 b/firmware/buildroot/tests/teensy31 old mode 100755 new mode 100644 diff --git a/firmware/buildroot/tests/teensy35 b/firmware/buildroot/tests/teensy35 old mode 100755 new mode 100644 index c7830ae..0e149e7 --- a/firmware/buildroot/tests/teensy35 +++ b/firmware/buildroot/tests/teensy35 @@ -106,10 +106,6 @@ exec_test $1 $2 "Teensy 3.5/3.6 COREXZ | BACKLASH" "$3" # Enable Dual Z with Dual Z endstops # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY35_36 Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z2_MIN_PIN 2 +opt_set MOTHERBOARD BOARD_TEENSY35_36 Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z2_MIN_PIN 2 X_MAX_PIN -1 opt_enable Z_MULTI_ENDSTOPS -pins_set ramps/RAMPS X_MAX_PIN -1 exec_test $1 $2 "Dual Z with Dual Z endstops" "$3" - -# Clean up -restore_configs diff --git a/firmware/buildroot/tests/teensy41 b/firmware/buildroot/tests/teensy41 old mode 100755 new mode 100644 index 894abc1..6cf3f4a --- a/firmware/buildroot/tests/teensy41 +++ b/firmware/buildroot/tests/teensy41 @@ -28,7 +28,7 @@ opt_enable MAX31865_SENSOR_OHMS_0 MAX31865_CALIBRATION_OHMS_0 \ PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT \ ADVANCED_PAUSE_FEATURE ARC_SUPPORT BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES PARK_HEAD_ON_PAUSE \ PHOTO_GCODE PHOTO_POSITION PHOTO_SWITCH_POSITION PHOTO_SWITCH_MS PHOTO_DELAY_MS PHOTO_RETRACT_MM \ - HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT HOST_STATUS_NOTIFICATIONS + HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT HOST_STATUS_NOTIFICATIONS PINS_DEBUGGING opt_add EXTUI_EXAMPLE exec_test $1 $2 "Teensy4.1 with many features" "$3" @@ -105,10 +105,6 @@ exec_test $1 $2 "Teensy 4.0/4.1 COREXZ" "$3" # Enable Dual Z with Dual Z endstops # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY41 Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z2_MIN_PIN 2 +opt_set MOTHERBOARD BOARD_TEENSY41 Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z2_MIN_PIN 2 X_MAX_PIN -1 opt_enable Z_MULTI_ENDSTOPS -pins_set ramps/RAMPS X_MAX_PIN -1 exec_test $1 $2 "Dual Z with Dual Z endstops" "$3" - -# Clean up -restore_configs diff --git a/firmware/buildroot/web-ui/data/www/chart.min.js b/firmware/buildroot/web-ui/data/www/chart.min.js old mode 100755 new mode 100644 diff --git a/firmware/docs/ConfigEmbedding.md b/firmware/docs/ConfigEmbedding.md index 90075bc..562661e 100644 --- a/firmware/docs/ConfigEmbedding.md +++ b/firmware/docs/ConfigEmbedding.md @@ -3,7 +3,7 @@ Starting with version 2.0.9.3, Marlin can automatically extract the configuration used to generate the firmware and store it in the firmware binary. This is enabled by defining `CONFIGURATION_EMBEDDING` in `Configuration_adv.h`. ## How it's done -At the start of the PlatformIO build process, we create an embedded configuration by extracting all active options from the Configuration files and writing them out as JSON to `marlin_config.json`, which also includes specific build information (like the git revision, the build date, and some version information. The JSON file is then compressed in a ZIP archive called `.pio/build/mc.zip` which is converted into a C array and stored in a C++ file called `mc.h` which is included in the build. +At the start of the PlatformIO build process, we create an embedded configuration by extracting all active options from the Configuration files and writing them out as JSON to `marlin_config.json`, which also includes specific build information (like the git revision, the build date, and some version information). The JSON file is then compressed in a ZIP archive called `.pio/build/mc.zip` which is converted into a C array and stored in a C++ file called `mc.h` which is included in the build. ## Extracting configurations from a Marlin binary To get the configuration out of a binary firmware, you'll need a non-write-protected SD card inserted into the printer while running the firmware. diff --git a/firmware/ini/esp32.ini b/firmware/ini/esp32.ini index 909394e..e60ab81 100644 --- a/firmware/ini/esp32.ini +++ b/firmware/ini/esp32.ini @@ -39,9 +39,14 @@ board_build.partitions = Marlin/src/HAL/ESP32/esp32.csv upload_speed = 115200 monitor_speed = 115200 +# New espressif32 packages require a valid board definition file. [env:mks_tinybee] extends = env:esp32 +board = marlin_MKS_TinyBee +platform = espressif32@~3.5.0 board_build.partitions = default_8MB.csv +build_src_flags = -O3 -Wno-volatile +monitor_filters = esp32_exception_decoder [env:godi_esp32] extends = env:esp32 diff --git a/firmware/ini/features.ini b/firmware/ini/features.ini index a502808..b2e9d68 100644 --- a/firmware/ini/features.ini +++ b/firmware/ini/features.ini @@ -20,7 +20,7 @@ MARLIN_TEST_BUILD = build_src_filter=+ POSTMORTEM_DEBUGGING = build_src_filter=+ + build_flags=-funwind-tables MKS_WIFI_MODULE = QRCode=https://github.com/makerbase-mks/QRCode/archive/261c5a696a.zip -HAS_TRINAMIC_CONFIG = TMCStepper@~0.7.3 +HAS_TRINAMIC_CONFIG = TMCStepper=https://github.com/MarlinFirmware/TMCStepper/archive/marlin-2.1.3.x.zip build_src_filter=+ + + + + HAS_T(RINAMIC_CONFIG|MC_SPI) = build_src_filter=+ SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/6f53c19a8a.zip @@ -40,11 +40,6 @@ HAS_MARLINUI_HD44780 = build_src_filter=+ HAS_MARLINUI_U8GLIB = marlinfirmware/U8glib-HAL@0.5.4 build_src_filter=+ HAS_(FSMC|SPI|LTDC)_TFT = build_src_filter=+ -HAS_LTDC_TFT = build_src_filter=+ -HAS_FSMC_TFT = build_src_filter=+ + -HAS_SPI_TFT = build_src_filter=+ + + -HAS_TFT_XPT2046 = build_src_filter=+ + + -TFT_TOUCH_DEVICE_GT911 = build_src_filter=+ I2C_EEPROM = build_src_filter=+ SOFT_I2C_EEPROM = SlowSoftI2CMaster, SlowSoftWire=https://github.com/felias-fogg/SlowSoftWire/archive/f34d777f39.zip SPI_EEPROM = build_src_filter=+ @@ -53,6 +48,7 @@ DWIN_CREALITY_LCD = build_src_filter=+ DWIN_CREALITY_LCD_JYERSUI = build_src_filter=+ IS_DWIN_MARLINUI = build_src_filter=+ +SOVOL_SV06_RTS = build_src_filter=+ HAS_GRAPHICAL_TFT = build_src_filter=+ - - HAS_UI_320X.+ = build_src_filter=+ HAS_UI_480X.+ = build_src_filter=+ @@ -163,18 +159,19 @@ TFT_FONT_UNIFONT_30_ZH_TW = build_src_filter=+ IS_TFTGLCD_PANEL = build_src_filter=+ HAS_TOUCH_BUTTONS = build_src_filter=+ -HAS_MARLINUI_MENU = build_src_filter=+ - +HAS_MARLINUI_MENU = build_src_filter=+ + + + + + HAS_GAMES = build_src_filter=+ MARLIN_BRICKOUT = build_src_filter=+ MARLIN_INVADERS = build_src_filter=+ MARLIN_MAZE = build_src_filter=+ MARLIN_SNAKE = build_src_filter=+ HAS_MENU_BACKLASH = build_src_filter=+ -LCD_BED_LEVELING = build_src_filter=+ +HAS_MENU_PROBE_LEVEL = build_src_filter=+ HAS_MENU_BED_TRAMMING = build_src_filter=+ HAS_MENU_CANCELOBJECT = build_src_filter=+ HAS_MENU_DELTA_CALIBRATE = build_src_filter=+ HAS_MENU_FILAMENT = build_src_filter=+ +HAS_GAME_MENU = build_src_filter=+ LCD_INFO_MENU = build_src_filter=+ HAS_MENU_JOB_RECOVERY = build_src_filter=+ HAS_MENU_MULTI_LANGUAGE = build_src_filter=+ @@ -185,6 +182,7 @@ HAS_MENU_MMU = build_src_filter=+ + HAS_MENU_PASSWORD = build_src_filter=+ HAS_MENU_POWER_MONITOR = build_src_filter=+ +PROBE_OFFSET_WIZARD = build_src_filter=+ HAS_MENU_CUTTER = build_src_filter=+ HAS_MENU_TEMPERATURE = build_src_filter=+ HAS_MENU_TMC = build_src_filter=+ @@ -287,6 +285,7 @@ SKEW_CORRECTION_GCODE = build_src_filter=+ + PINS_DEBUGGING = build_src_filter=+ EDITABLE_STEPS_PER_UNIT = build_src_filter=+ +EDITABLE_HOMING_FEEDRATE = build_src_filter=+ HAS_MULTI_EXTRUDER = build_src_filter=+ HAS_HOTEND_OFFSET = build_src_filter=+ EDITABLE_SERVO_ANGLES = build_src_filter=+ diff --git a/firmware/ini/hc32.ini b/firmware/ini/hc32.ini index c9533ba..a99614b 100644 --- a/firmware/ini/hc32.ini +++ b/firmware/ini/hc32.ini @@ -27,19 +27,20 @@ # Base Environment for all HC32F460 variants # [HC32F460_base] -platform = https://github.com/shadow578/platform-hc32f46x/archive/1.0.0.zip -board = generic_hc32f460 -build_src_filter = ${common.default_src_filter} + + -build_type = release -build_flags = - -D ARDUINO_ARCH_HC32 - -D PLATFORM_M997_SUPPORT # Enable M997 command - # note: ddl and arduino debug mode are - # automatically enabled with MARLIN_DEV_MODE - #-D __DEBUG # force DDL debug mode - #-D __CORE_DEBUG # force Arduino core debug mode +platform = https://github.com/shadow578/platform-hc32f46x/archive/1.1.0.zip +platform_packages = framework-hc32f46x-ddl@https://github.com/shadow578/framework-hc32f46x-ddl/archive/2.2.2.zip + framework-arduino-hc32f46x@https://github.com/shadow578/framework-arduino-hc32f46x/archive/1.2.0.zip +board = generic_hc32f460 +build_src_filter = ${common.default_src_filter} + + +build_type = release +build_flags = -D ARDUINO_ARCH_HC32 + -D PLATFORM_M997_SUPPORT # Enable M997 command + # NOTE: DDL and Arduino debug mode are + # automatically enabled with MARLIN_DEV_MODE + #-D __DEBUG # force DDL debug mode + #-D __CORE_DEBUG # force Arduino core debug mode -# hc32 app configuration file +# HC32 app configuration file board_build.app_config = Marlin/src/HAL/HC32/app_config.h # Drivers and Middleware required by the HC32 HAL @@ -50,42 +51,40 @@ board_build.ddl.timer0 = true board_build.ddl.timera = true board_build.mw.sd_card = true -# extra build flags -board_build.flags.common = - -g3 # Force emit debug symbols to elf. this does not affect the final binary size - -fno-signed-char # Force unsigned chars. this is required for meatpack to work +# Extra build flags +board_build.flags.common = -g3 # Force emit debug symbols to elf. This does not affect the final binary size + -fno-signed-char # Force unsigned char. This is required for meatpack to work # Additional flags to reduce binary size -board_build.flags.cpp = - -fno-threadsafe-statics # Disable thread-safe statics (only one core anyway) - -fno-exceptions # Disable exceptions (not used by marlin) - -fno-rtti # Disable RTTI (not used by marlin) +board_build.flags.cpp = -fno-threadsafe-statics # Disable thread-safe statics (only one core anyway) + -fno-exceptions # Disable exceptions (not used by Marlin) + -fno-rtti # Disable RTTI (not used by Marlin) # # Base HC32F460xCxx (256K Flash) # [HC32F460C_base] extends = HC32F460_base -board_build.ld_args.flash_size = 256K +board_upload.maximum_size = 262144 # # Base HC32F460xExx (512K Flash) # [HC32F460E_base] extends = HC32F460_base -board_build.ld_args.flash_size = 512K +board_upload.maximum_size = 524288 # # Voxelab Aquila V1.0.0/V1.0.1/V1.0.2/V1.0.3 as found in the Voxelab Aquila X2 & C2 # [env:HC32F460C_aquila_101] extends = HC32F460C_base -board_build.ld_args.flash_start = 0xC000 # Bootloader start address, as logged by the bootloader on boot -board_build.ld_args.boot_mode = secondary # Save ~1.4k of flash by compiling as secondary firmware +board_upload.offset_address = 0xC000 # Bootloader start address, as logged by the bootloader on boot +board_build.boot_mode = secondary # Save ~1.4k of flash by compiling as secondary firmware # # Creality Ender 2 Pro v2.4.S4_170 (HC32f460kcta) (256K Flash, 192K RAM). # [env:HC32F460C_e2p24s4] extends = HC32F460C_base -board_build.ld_args.flash_start = 0x8000 +board_upload.offset_address = 0x8000 diff --git a/firmware/ini/lpc176x.ini b/firmware/ini/lpc176x.ini index 8d5d2fd..28c6546 100644 --- a/firmware/ini/lpc176x.ini +++ b/firmware/ini/lpc176x.ini @@ -14,23 +14,26 @@ # [common_LPC] platform = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.3.zip -platform_packages = framework-arduino-lpc176x@^0.2.8 +platform_packages = framework-arduino-lpc176x@https://github.com/p3p/pio-framework-arduino-lpc176x/archive/ab41696b64.zip toolchain-gccarmnoneeabi@1.100301.220327 board = nxp_lpc1768 lib_ldf_mode = off lib_compat_mode = strict extra_scripts = ${common.extra_scripts} - Marlin/src/HAL/LPC1768/upload_extra_script.py + Marlin/src/HAL/LPC1768/upload_extra_script.py build_src_filter = ${common.default_src_filter} + - + lib_deps = ${common.lib_deps} - Servo -custom_marlin.USES_LIQUIDCRYSTAL = arduino-libraries/LiquidCrystal@~1.0.7 -custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip + Servo build_flags = ${common.build_flags} -DU8G_HAL_LINKS -DPLATFORM_M997_SUPPORT -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g - # debug options for backtrace - #-funwind-tables - #-mpoke-function-name + # debug options for backtrace + #-funwind-tables + #-mpoke-function-name +build_src_flags = -std=gnu++20 -Wno-volatile +custom_marlin.USES_LIQUIDCRYSTAL = arduino-libraries/LiquidCrystal@~1.0.7 +custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip +custom_marlin.HAS_SPI_TFT = build_src_filter=+ +custom_marlin.HAS_TFT_XPT2046 = build_src_filter=+ # # NXP LPC176x ARM Cortex-M3 diff --git a/firmware/ini/native.ini b/firmware/ini/native.ini index 69233cd..5b62c87 100644 --- a/firmware/ini/native.ini +++ b/firmware/ini/native.ini @@ -83,7 +83,7 @@ build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags} # # MacPorts: -# sudo port install gcc14 glm libsdl2 libsdl2_net +# sudo port install gcc14 glm mesa libsdl2 libsdl2_net # # cd /opt/local/bin # sudo rm gcc g++ cc ld @@ -92,24 +92,18 @@ build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags} # cd - # rehash # -# Use 'sudo port install mesa' to get a if no Xcode is installed. -# If Xcode is installed be sure to run `xcode-select --install` first. -# #================================================================================== # # Homebrew: # /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # -# brew install gcc@14 glm sdl2 sdl2_net +# brew install gcc@14 glm mesa sdl2 sdl2_net # # cd /opt/homebrew/bin # sudo rm -f gcc g++ cc # sudo ln -s gcc-14 gcc ; sudo ln -s g++-14 g++ ; sudo ln -s g++ cc # cd - # -# Use 'brew install mesa' to get a if no Xcode is installed. -# If Xcode is installed be sure to run `xcode-select --install` first. -# [simulator_macos] build_unflags = -g3 -lGL -fstack-protector-strong diff --git a/firmware/ini/raspberrypi.ini b/firmware/ini/raspberrypi.ini new file mode 100644 index 0000000..c61b89b --- /dev/null +++ b/firmware/ini/raspberrypi.ini @@ -0,0 +1,37 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# +# See https://arduino-pico.readthedocs.io/en/latest/platformio.html +# + +[env:RP2040] +platform = raspberrypi +board = pico +framework = arduino +#board_build.core = earlephilhower +#lib_ldf_mode = off +#lib_compat_mode = strict +build_src_filter = ${common.default_src_filter} + +lib_deps = ${common.lib_deps} + arduino-libraries/Servo + https://github.com/pkElectronics/SoftwareSerialM#master + #lvgl/lvgl@^8.1.0 +lib_ignore = WiFi +build_flags = ${common.build_flags} -D__PLAT_RP2040__ -DPLATFORM_M997_SUPPORT -Wno-expansion-to-defined -Wno-vla -Wno-ignored-qualifiers +#debug_tool = jlink +#upload_protocol = jlink + +[env:RP2040-alt] +extends = env:RP2040 +platform = https://github.com/maxgerhardt/platform-raspberrypi.git +board_build.core = earlephilhower + +# +# BigTreeTech SKR Pico 1.x +# +[env:SKR_Pico] +extends = env:RP2040 + +[env:SKR_Pico_UART] +extends = env:SKR_Pico diff --git a/firmware/ini/renamed.ini b/firmware/ini/renamed.ini index fb5fce6..f39cbec 100644 --- a/firmware/ini/renamed.ini +++ b/firmware/ini/renamed.ini @@ -102,9 +102,6 @@ extends = renamed [env:STM32G0B1RE_manta_btt_xfer] ;=> STM32G0B1RE_manta_btt extends = renamed -[env:STM32G0B1VE_btt_xfer] ;=> STM32G0B1VE_btt -extends = renamed - [env:BIGTREE_SKR_PRO] ;=> BTT_SKR_PRO extends = renamed diff --git a/firmware/ini/samd21.ini b/firmware/ini/samd21.ini index f2acf82..8652f13 100644 --- a/firmware/ini/samd21.ini +++ b/firmware/ini/samd21.ini @@ -10,7 +10,7 @@ ################################# # -# Adafruit Grand Central M4 (Atmel SAMD51P20A ARM Cortex-M4) +# ReprapWorld Minitronics (Atmel SAMD21J18 ARM Cortex-M0+) # [env:SAMD21_minitronics20] platform = atmelsam diff --git a/firmware/ini/stm32-common.ini b/firmware/ini/stm32-common.ini index e4afaf0..ec058d1 100644 --- a/firmware/ini/stm32-common.ini +++ b/firmware/ini/stm32-common.ini @@ -19,6 +19,12 @@ build_unflags = -std=gnu++11 build_src_filter = ${common.default_src_filter} + - + extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py +custom_marlin.HAS_LTDC_TFT = build_src_filter=+ +custom_marlin.HAS_FSMC_TFT = build_src_filter=+ + build_flags=-DHAL_SRAM_MODULE_ENABLED +custom_marlin.HAS_SPI_TFT = build_src_filter=+ +custom_marlin.HAS_TFT_XPT2046 = build_src_filter=+ +custom_marlin.TFT_TOUCH_DEVICE_GT911 = build_src_filter=+ # # STM32 board based on a variant. diff --git a/firmware/ini/stm32f1-maple.ini b/firmware/ini/stm32f1-maple.ini index db852ca..59150f3 100644 --- a/firmware/ini/stm32f1-maple.ini +++ b/firmware/ini/stm32f1-maple.ini @@ -23,7 +23,7 @@ # HAL/STM32F1 Common Environment values # [STM32F1_maple] -platform = ststm32@~12.1 +platform = ststm32@~15.4.1 board_build.core = maple build_flags = !python buildroot/share/PlatformIO/scripts/STM32F1_build_flags.py ${common.build_flags} -DARDUINO_ARCH_STM32 -DMAPLE_STM32F1 -DPLATFORM_M997_SUPPORT @@ -33,11 +33,15 @@ lib_ignore = SPI, FreeRTOS701, FreeRTOS821 lib_deps = ${common.lib_deps} SoftwareSerialM platform_packages = tool-stm32duino + toolchain-gccarmnoneeabi@1.100301.220327 extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py buildroot/share/PlatformIO/scripts/custom_board.py buildroot/share/PlatformIO/scripts/offset_and_rename.py +custom_marlin.HAS_SPI_TFT = build_src_filter=+ +custom_marlin.HAS_TFT_XPT2046 = build_src_filter=+ +custom_marlin.HAS_FSMC_TFT = build_src_filter=+ # # Generic STM32F103RC environment @@ -61,6 +65,7 @@ monitor_speed = 115200 [env:STM32F103RC_meeb_maple] extends = env:STM32F103RC_maple board = marlin_maple_MEEB_3DP +platform_packages = platformio/tool-dfuutil@~1.11.0 build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 @@ -84,13 +89,14 @@ upload_protocol = dfu # FYSETC STM32F103RC # [env:STM32F103RC_fysetc_maple] -extends = env:STM32F103RC_maple -extra_scripts = ${env:STM32F103RC_maple.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py -build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0 -lib_ldf_mode = chain -debug_tool = stlink -upload_protocol = serial +extends = env:STM32F103RC_maple +extra_scripts = ${env:STM32F103RC_maple.extra_scripts} + buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py +build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0 +platform_packages = toolchain-gccarmnoneeabi@1.90301.200702 +lib_ldf_mode = chain +debug_tool = stlink +upload_protocol = serial # # BigTreeTech SKR Mini V1.1 / SKR Mini E3 & MZ (STM32F103RCT6 ARM Cortex-M3) @@ -103,6 +109,7 @@ extends = env:STM32F103RC_maple board_build.address = 0x08007000 board_build.ldscript = STM32F103RC_SKR_MINI_256K.ld build_flags = ${env:STM32F103RC_maple.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 +platform_packages = toolchain-gccarmnoneeabi@1.90301.200702 monitor_speed = 115200 [env:STM32F103RC_btt_USB_maple] @@ -129,6 +136,7 @@ upload_protocol = jlink [env:STM32F103RC_creality_maple] extends = env:STM32F103RC_maple build_flags = ${env:STM32F103RC_maple.build_flags} -DTEMP_TIMER_CHAN=4 +platform_packages = toolchain-gccarmnoneeabi@1.90301.200702 board_build.address = 0x08007000 board_build.ldscript = creality256k.ld board_build.rename = firmware-{date}-{time}.bin @@ -152,6 +160,7 @@ board_build.ldscript = crealityPro.ld [env:GD32F103RC_voxelab_maple] extends = env:STM32F103RC_maple build_flags = ${env:STM32F103RC_maple.build_flags} -DTEMP_TIMER_CHAN=4 +platform_packages = toolchain-gccarmnoneeabi@1.90301.200702 board_build.address = 0x08007000 board_build.ldscript = creality256k.ld debug_tool = jlink @@ -161,6 +170,7 @@ upload_protocol = jlink extends = env:STM32F103RE_maple build_flags = ${env:STM32F103RE_maple.build_flags} -DTEMP_TIMER_CHAN=4 -DVOXELAB_N32 -DSDCARD_FLASH_LIMIT_256K +platform_packages = toolchain-gccarmnoneeabi@1.90301.200702 board_build.address = 0x08007000 board_build.ldscript = creality.ld debug_tool = jlink @@ -382,11 +392,13 @@ lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED [env:STM32F103RC_ZM3E2_USB_maple] extends = ZONESTAR_ZM3E_maple +platform_packages = toolchain-gccarmnoneeabi@1.90301.200702 board = genericSTM32F103RC board_build.ldscript = ZONESTAR_ZM3E_256K.ld [env:STM32F103VC_ZM3E4_USB_maple] extends = ZONESTAR_ZM3E_maple +platform_packages = toolchain-gccarmnoneeabi@1.90301.200702 board = genericSTM32F103VC board_build.ldscript = ZONESTAR_ZM3E_256K.ld build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2 diff --git a/firmware/ini/stm32f1.ini b/firmware/ini/stm32f1.ini index 3a74b6c..0978b19 100644 --- a/firmware/ini/stm32f1.ini +++ b/firmware/ini/stm32f1.ini @@ -71,7 +71,7 @@ build_flags = ${env:STM32F103RC_btt.build_flags} -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC -build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC +build_unflags = ${env:STM32F103RC_btt.build_unflags} -DUSBD_USE_CDC # # Panda Pi V2.9 - Standalone (STM32F103RC) @@ -83,8 +83,8 @@ build_flags = ${common_STM32F103RC_variant.build_flags} -DTIMER_SERVO=TIM1 board_build.offset = 0x5000 board_upload.offset_address = 0x08005000 -lib_deps = - markyue/Panda_SoftMasterI2C@1.0.3 +lib_deps = markyue/Panda_SoftMasterI2C@1.0.3 + # # MKS Robin (STM32F103ZET6) # Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel @@ -200,7 +200,7 @@ board = genericSTM32F103RC extends = STM32F103Rx_creality board = genericSTM32F103VE board_build.variant = MARLIN_F103Vx -build_flags = ${stm32_variant.build_flags} +build_flags = ${STM32F103Rx_creality.build_flags} -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 # @@ -253,7 +253,7 @@ board = malyanm200_f103cb build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED -build_src_filter = ${common.default_src_filter} + - +build_src_filter = ${common_stm32.build_src_filter} + - # # FLYmaker FLY Mini (STM32F103RCT6) @@ -462,7 +462,7 @@ board_upload.offset_address = 0x08005000 board_build.offset = 0x5000 board_upload.maximum_size = 237568 extra_scripts = ${stm32_variant.extra_scripts} -build_flags = ${common_stm32.build_flags} +build_flags = ${stm32_variant.build_flags} -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC build_unflags = ${stm32_variant.build_unflags} -DUSBD_USE_CDC diff --git a/firmware/ini/stm32f4.ini b/firmware/ini/stm32f4.ini index afa4ef5..7fdbc69 100644 --- a/firmware/ini/stm32f4.ini +++ b/firmware/ini/stm32f4.ini @@ -33,6 +33,7 @@ build_flags = ${common_stm32.build_flags} # [env:FYSETC_CHEETAH_V20] extends = stm32_variant +platform_packages = platformio/tool-dfuutil@~1.11.0 board = marlin_FYSETC_CHEETAH_V20 board_build.offset = 0x8000 build_flags = ${stm32_variant.build_flags} -DSTM32F401xC @@ -43,6 +44,7 @@ upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE" # [env:FYSETC_CHEETAH_V30] extends = stm32_variant +platform_packages = platformio/tool-dfuutil@~1.11.0 board = marlin_FYSETC_CHEETAH_V30 build_flags = ${stm32_variant.build_flags} -DHAL_PCD_MODULE_ENABLED debug_tool = stlink @@ -54,6 +56,7 @@ upload_command = dfu-util -a 0 -s 0x08000000:leave -D "$SOURCE" # [env:FLYF407ZG] extends = stm32_variant +platform_packages = platformio/tool-dfuutil@~1.11.0 board = marlin_STM32F407ZGT6 board_build.variant = MARLIN_FLY_F407ZG board_build.offset = 0x8000 @@ -64,6 +67,7 @@ upload_protocol = dfu # [env:FYSETC_S6] extends = stm32_variant +platform_packages = platformio/tool-dfuutil@~1.11.0 board = marlin_fysetc_s6 board_build.offset = 0x10000 board_upload.offset_address = 0x08010000 @@ -87,6 +91,7 @@ upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE" # [env:FYSETC_SPIDER_KING407] extends = stm32_variant +platform_packages = platformio/tool-dfuutil@~1.11.0 board = marlin_STM32F407ZGT6 board_build.variant = MARLIN_FYSETC_SPIDER_KING407 board_build.offset = 0x8000 @@ -153,7 +158,7 @@ extends = Anet_ET4 board_build.encode = firmware.srec board_build.offset = 0x10000 board_upload.offset_address = 0x08010000 -extra_scripts = ${stm32_variant.extra_scripts} +extra_scripts = ${Anet_ET4.extra_scripts} buildroot/share/PlatformIO/scripts/openblt.py # @@ -189,6 +194,19 @@ build_flags = ${stm32_variant.build_flags} -DMF_RX_BUFFER_SIZE=255 -DMF_TX_BUFFER_SIZE=255 +# +# Mellow/Fly RRF E3 V1 (STM32F407VGT6 ARM Cortex-M4) +# +[env:FLY_RRF_E3_V1] +extends = stm32_variant +board = marlin_STM32F407VGT6_CCM +#board_build.variant = MARLIN_BTT_E3_RRF +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} + -DSTM32F407_5VX + -DMF_RX_BUFFER_SIZE=255 + -DMF_TX_BUFFER_SIZE=255 + # # Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) # @@ -418,6 +436,7 @@ build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags} # [env:rumba32] extends = stm32_variant +platform_packages = platformio/tool-dfuutil@~1.11.0 board = rumba32_f446ve board_build.variant = MARLIN_F446VE board_build.offset = 0x0000 @@ -497,7 +516,8 @@ build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags} extends = env:mks_robin_nano_v3_usb_flash_drive build_flags = ${env:mks_robin_nano_v3_usb_flash_drive.build_flags} -DUSBD_USE_CDC_MSC -build_unflags = -DUSBD_USE_CDC +build_unflags = ${env:mks_robin_nano_v3_usb_flash_drive.build_unflags} + -DUSBD_USE_CDC # # MKS Robin Nano V3_1 @@ -626,7 +646,7 @@ extends = TH3D_EZBoard_V2 board_build.encode = firmware.bin board_build.offset = 0xC000 board_upload.offset_address = 0x0800C000 -extra_scripts = ${stm32_variant.extra_scripts} +extra_scripts = ${TH3D_EZBoard_V2.extra_scripts} buildroot/share/PlatformIO/scripts/openblt.py [mks_robin_nano_v1_3_f4_common] @@ -647,11 +667,11 @@ upload_protocol = jlink # [env:mks_robin_nano_v1_3_f4] extends = mks_robin_nano_v1_3_f4_common -build_flags = ${stm32_variant.build_flags} +build_flags = ${mks_robin_nano_v1_3_f4_common.build_flags} -DMCU_STM32F407VE -DENABLE_HWSERIAL3 -DSTM32_FLASH_SIZE=512 -DTIMER_SERVO=TIM2 -DTIMER_TONE=TIM3 -DSS_TIMER=4 -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED -build_unflags = ${stm32_variant.build_unflags} +build_unflags = ${mks_robin_nano_v1_3_f4_common.build_unflags} -DUSBCON -DUSBD_USE_CDC # @@ -659,7 +679,7 @@ build_unflags = ${stm32_variant.build_unflags} # [env:mks_robin_nano_v1_3_f4_usbmod] extends = mks_robin_nano_v1_3_f4_common -build_flags = ${stm32_variant.build_flags} +build_flags = ${mks_robin_nano_v1_3_f4_common.build_flags} -DMCU_STM32F407VE -DSTM32_FLASH_SIZE=512 -DTIMER_SERVO=TIM2 -DTIMER_TONE=TIM3 -DSS_TIMER=4 -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED @@ -684,7 +704,7 @@ extra_scripts = ${common_stm32.extra_scripts} [STM32F401RC_creality_base] extends = stm32_variant board = genericSTM32F401RC -board_build.variant = MARLIN_CREALITY_STM32F401RC +board_build.variant = MARLIN_F401RC_CREALITY build_flags = ${stm32_variant.build_flags} -DMCU_STM32F401RC -DSTM32F4 -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 @@ -719,7 +739,7 @@ upload_protocol = stlink # [env:STM32F401RE_creality] extends = stm32_variant -board = marlin_CREALITY_STM32F401RE +board = marlin_STM32F401RE_creality board_build.offset = 0x10000 board_upload.offset_address = 0x08010000 board_build.rename = firmware-{date}-{time}.bin @@ -805,6 +825,7 @@ board_build.rename = mks_skipr.bin [env:mks_skipr_v1_nobootloader] extends = env:mks_skipr_v1 +platform_packages = platformio/tool-dfuutil@~1.11.0 board_build.rename = firmware.bin board_build.offset = 0x0000 board_upload.offset_address = 0x08000000 @@ -861,6 +882,7 @@ upload_protocol = stlink # [env:BLACKBEEZMINI_V1] platform = ststm32 +platform_packages = platformio/tool-dfuutil@~1.11.0 extends = common_stm32 board = blackpill_f401cc board_build.offset = 0x0000 @@ -893,7 +915,6 @@ upload_protocol = stlink # XTLW3D Climber-8th-F4 (STM32F407VGT6 ARM Cortex-M4) # [env:XTLW_CLIMBER_8TH] -platform = ${common_stm32.platform} extends = stm32_variant platform_packages = ${stm_flash_drive.platform_packages} board = marlin_STM32F407VGT6_CCM diff --git a/firmware/ini/stm32g0.ini b/firmware/ini/stm32g0.ini index 40493b3..4a9d1e4 100644 --- a/firmware/ini/stm32g0.ini +++ b/firmware/ini/stm32g0.ini @@ -90,6 +90,7 @@ build_flags = ${env:STM32G0B1RE_btt.build_flags} # # BigTreeTech Manta M8P V1.x (STM32G0B1VET6 ARM Cortex-M0+) +# BigTreeTech SKRat V1.0 (STM32G0B1VET6 ARM Cortex-M0+) # [env:STM32G0B1VE_btt] extends = stm32_variant @@ -108,3 +109,14 @@ build_flags = ${stm32_variant.build_flags} -Wl,--no-warn-rwx-segment upload_protocol = stlink debug_tool = stlink + +# +# BigTreeTech SKRat V1.0 (STM32G0B1VET6 ARM Cortex-M0+) +# Custom upload to SD via Marlin with Binary Protocol +# +[env:STM32G0B1VE_btt_xfer] +extends = env:STM32G0B1VE_btt +build_flags = ${env:STM32G0B1VE_btt.build_flags} -DXFER_BUILD +extra_scripts = ${env:STM32G0B1VE_btt.extra_scripts} + pre:buildroot/share/scripts/upload.py +upload_protocol = custom diff --git a/firmware/platformio.ini b/firmware/platformio.ini index 76200cb..ed1670d 100644 --- a/firmware/platformio.ini +++ b/firmware/platformio.ini @@ -36,6 +36,7 @@ extra_configs = ini/stm32g0.ini ini/teensy.ini ini/renamed.ini + ini/raspberrypi.ini # # The 'common' section applies to most Marlin builds. @@ -56,7 +57,7 @@ lib_deps = default_src_filter = + - - ; LCDs and Controllers - - - - - - - - - - + - - - - - - ; Marlin HAL - diff --git a/firmware/process-palette.json b/firmware/process-palette.json deleted file mode 100644 index b3b05b9..0000000 --- a/firmware/process-palette.json +++ /dev/null @@ -1,357 +0,0 @@ -{ - "patterns": { - "P1": { - "expression": "(path):(line)" - }, - "P2": { - "expression": "(path)\\s+(line)", - "path": "(?:\\/[\\w\\.\\-]+)+" - } - }, - "commands": [ - { - "namespace": "process-palette", - "action": "PIO Build", - "command": "python buildroot/share/vscode/auto_build.py build", - "arguments": [], - "cwd": "{projectPath}", - "inputDialogs": [], - "env": {}, - "keystroke": null, - "stream": true, - "outputTarget": "panel", - "outputBufferSize": 80000, - "maxCompleted": 3, - "autoShowOutput": true, - "autoHideOutput": false, - "scrollLockEnabled": false, - "singular": true, - "promptToSave": true, - "saveOption": "none", - "patterns": [ - "default" - ], - "successOutput": "{stdout}", - "errorOutput": "{stdout}\n{stderr}", - "fatalOutput": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "startMessage": "", - "successMessage": "Executed : {fullCommand}", - "errorMessage": "Executed : {fullCommand}\nReturned with code {exitStatus}\n{stderr}", - "fatalMessage": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "menus": [ - "Auto Build" - ], - "startScript": null, - "successScript": null, - "errorScript": null, - "scriptOnStart": false, - "scriptOnSuccess": false, - "scriptOnError": false, - "notifyOnStart": false, - "notifyOnSuccess": true, - "notifyOnError": true, - "input": null - }, - { - "namespace": "process-palette", - "action": "PIO Clean", - "command": "python buildroot/share/vscode/auto_build.py clean", - "arguments": [], - "cwd": "{projectPath}", - "inputDialogs": [], - "env": {}, - "keystroke": null, - "stream": true, - "outputTarget": "panel", - "outputBufferSize": 80000, - "maxCompleted": 3, - "autoShowOutput": true, - "autoHideOutput": false, - "scrollLockEnabled": false, - "singular": false, - "promptToSave": true, - "saveOption": "none", - "patterns": [ - "default" - ], - "successOutput": "{stdout}", - "errorOutput": "{stdout}\n{stderr}", - "fatalOutput": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "startMessage": null, - "successMessage": "Executed : {fullCommand}", - "errorMessage": "Executed : {fullCommand}\nReturned with code {exitStatus}\n{stderr}", - "fatalMessage": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "menus": [ - "Auto Build" - ], - "startScript": null, - "successScript": null, - "errorScript": null, - "scriptOnStart": false, - "scriptOnSuccess": false, - "scriptOnError": false, - "notifyOnStart": false, - "notifyOnSuccess": true, - "notifyOnError": true, - "input": null - }, - { - "namespace": "process-palette", - "action": "PIO Upload", - "command": "python buildroot/share/vscode/auto_build.py upload", - "arguments": [], - "cwd": "{projectPath}", - "inputDialogs": [], - "env": {}, - "keystroke": null, - "stream": true, - "outputTarget": "panel", - "outputBufferSize": 80000, - "maxCompleted": 3, - "autoShowOutput": true, - "autoHideOutput": false, - "scrollLockEnabled": false, - "singular": false, - "promptToSave": true, - "saveOption": "none", - "patterns": [ - "default" - ], - "successOutput": "{stdout}", - "errorOutput": "{stdout}\n{stderr}", - "fatalOutput": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "startMessage": null, - "successMessage": "Executed : {fullCommand}", - "errorMessage": "Executed : {fullCommand}\nReturned with code {exitStatus}\n{stderr}", - "fatalMessage": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "menus": [ - "Auto Build" - ], - "startScript": null, - "successScript": null, - "errorScript": null, - "scriptOnStart": false, - "scriptOnSuccess": false, - "scriptOnError": false, - "notifyOnStart": false, - "notifyOnSuccess": true, - "notifyOnError": true, - "input": null - }, - { - "namespace": "process-palette", - "action": "PIO Upload (traceback)", - "command": "python buildroot/share/vscode/auto_build.py traceback", - "arguments": [], - "cwd": "{projectPath}", - "inputDialogs": [], - "env": {}, - "keystroke": null, - "stream": true, - "outputTarget": "panel", - "outputBufferSize": 80000, - "maxCompleted": 3, - "autoShowOutput": true, - "autoHideOutput": false, - "scrollLockEnabled": false, - "singular": false, - "promptToSave": true, - "saveOption": "none", - "patterns": [ - "default" - ], - "successOutput": "{stdout}", - "errorOutput": "{stdout}\n{stderr}", - "fatalOutput": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "startMessage": null, - "successMessage": "Executed : {fullCommand}", - "errorMessage": "Executed : {fullCommand}\nReturned with code {exitStatus}\n{stderr}", - "fatalMessage": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "menus": [ - "Auto Build" - ], - "startScript": null, - "successScript": null, - "errorScript": null, - "scriptOnStart": false, - "scriptOnSuccess": false, - "scriptOnError": false, - "notifyOnStart": false, - "notifyOnSuccess": true, - "notifyOnError": true, - "input": null - }, - { - "namespace": "process-palette", - "action": "PIO Upload using Programmer", - "command": "python buildroot/share/vscode/auto_build.py program", - "arguments": [], - "cwd": "{projectPath}", - "inputDialogs": [], - "env": {}, - "keystroke": null, - "stream": true, - "outputTarget": "panel", - "outputBufferSize": 80000, - "maxCompleted": 3, - "autoShowOutput": true, - "autoHideOutput": false, - "scrollLockEnabled": false, - "singular": false, - "promptToSave": true, - "saveOption": "none", - "patterns": [ - "default" - ], - "successOutput": "{stdout}", - "errorOutput": "{stdout}\n{stderr}", - "fatalOutput": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "startMessage": null, - "successMessage": "Executed : {fullCommand}", - "errorMessage": "Executed : {fullCommand}\nReturned with code {exitStatus}\n{stderr}", - "fatalMessage": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "menus": [ - "Auto Build" - ], - "startScript": null, - "successScript": null, - "errorScript": null, - "scriptOnStart": false, - "scriptOnSuccess": false, - "scriptOnError": false, - "notifyOnStart": false, - "notifyOnSuccess": true, - "notifyOnError": true, - "input": null - }, - { - "namespace": "process-palette", - "action": "PIO Test", - "command": "python buildroot/share/vscode/auto_build.py test", - "arguments": [], - "cwd": "{projectPath}", - "inputDialogs": [], - "env": {}, - "keystroke": null, - "stream": true, - "outputTarget": "panel", - "outputBufferSize": 80000, - "maxCompleted": 3, - "autoShowOutput": true, - "autoHideOutput": false, - "scrollLockEnabled": false, - "singular": false, - "promptToSave": true, - "saveOption": "none", - "patterns": [ - "default" - ], - "successOutput": "{stdout}", - "errorOutput": "{stdout}\n{stderr}", - "fatalOutput": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "startMessage": null, - "successMessage": "Executed : {fullCommand}", - "errorMessage": "Executed : {fullCommand}\nReturned with code {exitStatus}\n{stderr}", - "fatalMessage": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "menus": [ - "Auto Build" - ], - "startScript": null, - "successScript": null, - "errorScript": null, - "scriptOnStart": false, - "scriptOnSuccess": false, - "scriptOnError": false, - "notifyOnStart": false, - "notifyOnSuccess": true, - "notifyOnError": true, - "input": null - }, - { - "namespace": "process-palette", - "action": "PIO Debug", - "command": "python buildroot/share/vscode/auto_build.py debug", - "arguments": [], - "cwd": "{projectPath}", - "inputDialogs": [], - "env": {}, - "keystroke": null, - "stream": true, - "outputTarget": "panel", - "outputBufferSize": 80000, - "maxCompleted": 3, - "autoShowOutput": true, - "autoHideOutput": false, - "scrollLockEnabled": false, - "singular": false, - "promptToSave": true, - "saveOption": "none", - "patterns": [ - "default" - ], - "successOutput": "{stdout}", - "errorOutput": "{stdout}\n{stderr}", - "fatalOutput": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "startMessage": null, - "successMessage": "Executed : {fullCommand}", - "errorMessage": "Executed : {fullCommand}\nReturned with code {exitStatus}\n{stderr}", - "fatalMessage": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "menus": [ - "Auto Build" - ], - "startScript": null, - "successScript": null, - "errorScript": null, - "scriptOnStart": false, - "scriptOnSuccess": false, - "scriptOnError": false, - "notifyOnStart": false, - "notifyOnSuccess": true, - "notifyOnError": true, - "input": null - }, - { - "namespace": "process-palette", - "action": "PIO Remote", - "command": "python buildroot/share/vscode/auto_build.py remote", - "arguments": [], - "cwd": "{projectPath}", - "inputDialogs": [], - "env": {}, - "keystroke": null, - "stream": true, - "outputTarget": "panel", - "outputBufferSize": 80000, - "maxCompleted": 3, - "autoShowOutput": true, - "autoHideOutput": false, - "scrollLockEnabled": false, - "singular": false, - "promptToSave": true, - "saveOption": "none", - "patterns": [ - "default" - ], - "successOutput": "{stdout}", - "errorOutput": "{stdout}\n{stderr}", - "fatalOutput": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "startMessage": null, - "successMessage": "Executed : {fullCommand}", - "errorMessage": "Executed : {fullCommand}\nReturned with code {exitStatus}\n{stderr}", - "fatalMessage": "Failed to execute : {fullCommand}\n{stdout}\n{stderr}", - "menus": [ - "Auto Build" - ], - "startScript": null, - "successScript": null, - "errorScript": null, - "scriptOnStart": false, - "scriptOnSuccess": false, - "scriptOnError": false, - "notifyOnStart": false, - "notifyOnSuccess": true, - "notifyOnError": true, - "input": null - } - ] -} diff --git a/gcode/home_large_stator.gcode b/gcode/home_large_stator.gcode deleted file mode 100644 index f51c87c..0000000 --- a/gcode/home_large_stator.gcode +++ /dev/null @@ -1,10 +0,0 @@ -G90 -G28 X -G28 Y -G0 Y0 F3000 -G0 Y40 F3000 -G0 Y0 F3000 -G0 X23.3 Y21.2 F3000 -;DISABLE STEPPERS -M17 X Y Z E -G91 \ No newline at end of file diff --git a/gcode/one_coil.gcode b/gcode/one_coil.gcode deleted file mode 100644 index 78d2bce..0000000 --- a/gcode/one_coil.gcode +++ /dev/null @@ -1,313 +0,0 @@ -; Tuple begin -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y9.4 X-0.07 F1000 -G0 E1.43 -G0 Y-18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y9.4 X+0.07 F1000 -G0 E1.43 -G0 Y-18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y9.4 X-0.021 F1000 -G0 E1.43 -G0 Y-18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -M117 Begin transition up -G0 Y-12.1 F300 -G0 X+6.58 F50 -G0 E1.43 F50 -G0 Y+12.1 F50 -M117 End transition up -G90 ; Disable relative positioning - -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y-9.4 X-0.07 F1000 -G0 E1.43 -G0 Y18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y-9.4 X+0.07 F1000 -G0 E1.43 -G0 Y18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y-9.4 X-0.021 F1000 -G0 E1.43 -G0 Y18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -G0 Y-8 F500 -G0 X+6.58 F300 -G0 E7.1 F500 -G0 Y+8 F500 -G90 ; Disable positioning -; Tuple end -; Pause the print -M0 "QUESTION FOR OPERATOR" -; Tuple begin -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y-9.4 X-0.07 F1000 -G0 E1.43 -G0 Y18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y-9.4 X+0.07 F1000 -G0 E1.43 -G0 Y18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y-9.4 X-0.021 F1000 -G0 E1.43 -G0 Y18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -M117 Begin transition up -G0 Y-12.1 F300 -G0 X+6.58 F50 -G0 E1.43 F50 -G0 Y+12.1 F50 -M117 End transition up -G90 ; Disable relative positioning - -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y9.4 X-0.07 F1000 -G0 E1.43 -G0 Y-18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y9.4 X+0.07 F1000 -G0 E1.43 -G0 Y-18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y9.4 X-0.021 F1000 -G0 E1.43 -G0 Y-18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -G0 Y-8 F500 -G0 X+6.58 F300 -G0 E7.1 F500 -G0 Y+8 F500 -G90 ; Disable positioning -; Tuple end -M0 "QUESTION FOR OPERATOR" -; Tuple begin -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y9.4 X-0.07 F1000 -G0 E1.43 -G0 Y-18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y9.4 X+0.07 F1000 -G0 E1.43 -G0 Y-18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y9.4 X-0.021 F1000 -G0 E1.43 -G0 Y-18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -M117 Begin transition up -G0 Y-12.1 F300 -G0 X+6.58 F50 -G0 E1.43 F50 -G0 Y+12.1 F50 -M117 End transition up -G90 ; Disable relative positioning - -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y-9.4 X-0.07 F1000 -G0 E1.43 -G0 Y18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y-9.4 X+0.07 F1000 -G0 E1.43 -G0 Y18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y-9.4 X-0.021 F1000 -G0 E1.43 -G0 Y18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -G0 Y-8 F500 -G0 X+6.58 F300 -G0 E7.1 F500 -G0 Y+8 F500 -G90 ; Disable positioning -; Tuple end -M0 "QUESTION FOR OPERATOR" -; Tuple begin -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y-9.4 X-0.07 F1000 -G0 E1.43 -G0 Y18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y-9.4 X+0.07 F1000 -G0 E1.43 -G0 Y18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y-9.4 X-0.021 F1000 -G0 E1.43 -G0 Y18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -M117 Begin transition up -G0 Y-12.1 F300 -G0 X+6.58 F50 -G0 E1.43 F50 -G0 Y+12.1 F50 -M117 End transition up -G90 ; Disable relative positioning - -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y9.4 X-0.07 F1000 -G0 E1.43 -G0 Y-18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y9.4 X+0.07 F1000 -G0 E1.43 -G0 Y-18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y9.4 X-0.021 F1000 -G0 E1.43 -G0 Y-18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning -; Tuple end \ No newline at end of file diff --git a/gcode/one_phase_large_stator.gcode b/gcode/one_phase_large_stator.gcode deleted file mode 100644 index 1e52780..0000000 --- a/gcode/one_phase_large_stator.gcode +++ /dev/null @@ -1,112 +0,0 @@ -; 1/4 phase of the wire -M808 L4 -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y9.4 X-0.075 F1000 -G0 E1.4 -G0 Y-18.8 X-0.15 F1000 -G0 E-1.4 -G0 Y9.4 X-0.075 F1000 -M808 -; TOTAL COUNT 26 -M808 L19 -G0 Y9.4 X+0.075 F1000 -G0 E1.4 -G0 Y-18.8 X+0.15 F1000 -G0 E-1.4 -G0 Y9.4 X+0.075 F1000 -M808 -M808 L70 -G0 Y9.4 X-0.019 F1000 -G0 E1.4 -G0 Y-18.8 X-0.038 F1000 -G0 E-1.4 -G0 Y9.4 X-0.019 F1000 -M808 -G90 ; Disable relative positioning -; END One cycle of rotation -; -; -; -; -; -G91 -G0 Y9.4 X-0.075 F1000 -G90 -G0 X23.3 -G91 -G0 E1.4 -G0 Y-18.8 X-0.15 F1000 -G0 E-1.4 -G0 Y9.4 X-0.075 F1000 -G90 - -; BEGIN TRANSITIONUP -G91 -G0 Y4.7 F1000 -G0 Y4.7 F3000 -G0 E+1.43 -G0 Y-4.7 F3000 -G0 Y-4.7 F1000 -G0 Y-4.7 F1000 -G0 Y-4.7 F3000 -G0 E-1.43 -G0 Y4.7 F3000 -G0 Y4.7 F1000 -G0 Y4.7 F3000 -G0 Y4.7 F1000 -G0 E+1.43 -G0 Y-4.7 F3000 -G0 Y-4.7 F1000 -G90 -; END TRANSITIONUP - -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y-9.4 X-0.075 F1000 -G0 E1.4 -G0 Y+18.8 X-0.15 F1000 -G0 E-1.4 -G0 Y-9.4 X-0.075 F1000 -M808 -; TOTAL COUNT 26 -M808 L19 -G0 Y-9.4 X+0.075 F1000 -G0 E1.4 -G0 Y+18.8 X+0.15 F1000 -G0 E-1.4 -G0 Y-9.4 X+0.075 F1000 -M808 -M808 L70 -G0 Y-9.4 X-0.019 F1000 -G0 E1.4 -G0 Y+18.8 X-0.038 F1000 -G0 E-1.4 -G0 Y-9.4 X-0.019 F1000 -M808 -G90 ; Disable relative positioning -; END One cycle of rotation -; -; -; -; -; -G91 -G0 Y-9.4 X-0.075 F1000 -G90 -G0 X23.3 -G91 -G0 E1.4 -G0 Y+18.8 X-0.15 F1000 -G0 E-1.4 -G0 Y-9.4 X-0.075 F1000 -G90 - -G91 ; Relative positioning -G0 Y-6.4 F1000 -G0 E7.15 F1000 -G0 Y+6.4 F1000 -G90 -M808 \ No newline at end of file diff --git a/gcode/two_coil_rev.gcode b/gcode/two_coil_rev.gcode deleted file mode 100644 index 860834f..0000000 --- a/gcode/two_coil_rev.gcode +++ /dev/null @@ -1,313 +0,0 @@ -; Tuple begin -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y-9.4 X-0.07 F1000 -G0 E1.43 -G0 Y18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y-9.4 X+0.07 F1000 -G0 E1.43 -G0 Y18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y-9.4 X-0.021 F1000 -G0 E1.43 -G0 Y18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -M117 Begin transition up -G0 Y-12.1 F300 -G0 X+6.58 F50 -G0 E1.43 F50 -G0 Y+12.1 F50 -M117 End transition up -G90 ; Disable relative positioning - -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y9.4 X-0.07 F1000 -G0 E1.43 -G0 Y-18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y9.4 X+0.07 F1000 -G0 E1.43 -G0 Y-18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y+9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y9.4 X-0.021 F1000 -G0 E1.43 -G0 Y-18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -G0 Y-8 F500 -G0 X+6.58 F300 -G0 E7.1 F500 -G0 Y+8 F500 -G90 ; Disable positioning -; Tuple end -; Pause the print -M0 "QUESTION FOR OPERATOR" -; Tuple begin -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y9.4 X-0.07 F1000 -G0 E1.43 -G0 Y-18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y+9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y9.4 X+0.07 F1000 -G0 E1.43 -G0 Y-18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y9.4 X-0.021 F1000 -G0 E1.43 -G0 Y-18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y+9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -M117 Begin transition up -G0 Y-12.1 F300 -G0 X+6.58 F50 -G0 E1.43 F50 -G0 Y+12.1 F50 -M117 End transition up -G90 ; Disable relative positioning - -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y-9.4 X-0.07 F1000 -G0 E1.43 -G0 Y+18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y-9.4 X+0.07 F1000 -G0 E1.43 -G0 Y+18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y-9.4 X-0.021 F1000 -G0 E1.43 -G0 Y+18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -G0 Y-8 F500 -G0 X+6.58 F300 -G0 E7.1 F500 -G0 Y+8 F500 -G90 ; Disable positioning -; Tuple end -M0 "QUESTION FOR OPERATOR" -; Tuple begin -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y-9.4 X-0.07 F1000 -G0 E1.43 -G0 Y+18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y-9.4 X+0.07 F1000 -G0 E1.43 -G0 Y+18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y-9.4 X-0.021 F1000 -G0 E1.43 -G0 Y+18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -M117 Begin transition up -G0 Y-12.1 F300 -G0 X+6.58 F50 -G0 E1.43 F50 -G0 Y+12.1 F50 -M117 End transition up -G90 ; Disable relative positioning - -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y9.4 X-0.07 F1000 -G0 E1.43 -G0 Y-18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y9.4 X+0.07 F1000 -G0 E1.43 -G0 Y-18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y+9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y9.4 X-0.021 F1000 -G0 E1.43 -G0 Y-18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -G0 Y-8 F500 -G0 X+6.58 F300 -G0 E7.1 F500 -G0 Y+8 F500 -G90 ; Disable positioning -; Tuple end -M0 "QUESTION FOR OPERATOR" -; Tuple begin -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y9.4 X-0.07 F1000 -G0 E1.43 -G0 Y-18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y9.4 X+0.07 F1000 -G0 E1.43 -G0 Y-18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y9.4 X-0.021 F1000 -G0 E1.43 -G0 Y-18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning - -G91 ; Relative positioning -M117 Begin transition up -G0 Y-12.1 F300 -G0 X+6.58 F50 -G0 E1.43 F50 -G0 Y+12.1 F50 -M117 End transition up -G90 ; Disable relative positioning - -G91 ; Relative positioning -; BEGIN One cycle of rotation -M808 L26 -G0 Y-9.4 X-0.07 F1000 -G0 E1.43 -G0 Y+18.8 X-0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.07 F1000 -M808 -; Print the coil -M117 26/100 -; TOTAL COUNT 26 -M808 L19 -G0 Y-9.4 X+0.07 F1000 -G0 E1.43 -G0 Y+18.8 X+0.14 F1000 -G0 E-1.43 -G0 Y-9.4 X+0.07 F1000 -M808 -; Print the coil -M117 45/100 -M808 L55 -G0 Y-9.4 X-0.021 F1000 -G0 E1.43 -G0 Y+18.8 X-0.042 F1000 -G0 E-1.43 -G0 Y-9.4 X-0.021 F1000 -M808 -M117 100/100 -G90 ; Disable relative positioning -; Tuple end \ No newline at end of file diff --git a/gcodegenerator/gcodegenerator.lpi b/gcodegenerator/gcodegenerator.lpi new file mode 100644 index 0000000..ee3afdd --- /dev/null +++ b/gcodegenerator/gcodegenerator.lpi @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + <UseAppBundle Value="False"/> + <ResourceType Value="res"/> + </General> + <BuildModes> + <Item Name="Default" Default="True"/> + </BuildModes> + <PublishOptions> + <Version Value="2"/> + <UseFileFilters Value="True"/> + </PublishOptions> + <RunParams> + <FormatVersion Value="2"/> + </RunParams> + <Units> + <Unit> + <Filename Value="gcodegenerator.pas"/> + <IsPartOfProject Value="True"/> + </Unit> + </Units> + </ProjectOptions> + <CompilerOptions> + <Version Value="11"/> + <PathDelim Value="\"/> + <Target> + <Filename Value="gcodegenerator"/> + </Target> + <SearchPaths> + <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> + <Linking> + <Debugging> + <DebugInfoType Value="dsDwarf3"/> + </Debugging> + </Linking> + </CompilerOptions> + <Debugging> + <Exceptions> + <Item> + <Name Value="EAbort"/> + </Item> + <Item> + <Name Value="ECodetoolError"/> + </Item> + <Item> + <Name Value="EFOpenError"/> + </Item> + </Exceptions> + </Debugging> +</CONFIG> diff --git a/gcodegenerator/gcodegenerator.lps b/gcodegenerator/gcodegenerator.lps new file mode 100644 index 0000000..1e3fc6b --- /dev/null +++ b/gcodegenerator/gcodegenerator.lps @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="UTF-8"?> +<CONFIG> + <ProjectSession> + <PathDelim Value="\"/> + <Version Value="12"/> + <BuildModes Active="Default"/> + <Units> + <Unit> + <Filename Value="gcodegenerator.pas"/> + <IsPartOfProject Value="True"/> + <IsVisibleTab Value="True"/> + <TopLine Value="615"/> + <CursorPos X="7" Y="639"/> + <FoldState Value=" TC6B21 PMUB T3iN2{r5 piZm92L]NiejM2 T0tN4U0"/> + <UsageCount Value="220"/> + <Loaded Value="True"/> + </Unit> + </Units> + <JumpHistory HistoryIndex="29"> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="419" Column="18" TopLine="281"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="422" Column="40" TopLine="398"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="418" Column="18" TopLine="398"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="419" Column="20" TopLine="400"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="291" Column="12" TopLine="247"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="419" Column="66" TopLine="400"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="420" Column="18" TopLine="400"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="419" Column="18" TopLine="400"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="432" Column="22" TopLine="403"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="418" Column="62" TopLine="398"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="422" Column="72" TopLine="403"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="409" Column="32" TopLine="375"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="291" Column="12" TopLine="247"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="507" Column="20" TopLine="487"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="446" Column="34" TopLine="412"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="421" Column="63" TopLine="404"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="427" Column="71" TopLine="411"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="424" Column="42" TopLine="405"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="426" Column="52" TopLine="408"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="291" Column="12" TopLine="247"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="425" Column="157" TopLine="406"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="440" Column="48" TopLine="416"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="436" Column="42" TopLine="417"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="437" Column="42" TopLine="417"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="446" Column="69" TopLine="415"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="439" Column="55" TopLine="418"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="382" Column="23" TopLine="361"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="407" Column="11" TopLine="394"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="445" Column="87" TopLine="419"/> + </Position> + <Position> + <Filename Value="gcodegenerator.pas"/> + <Caret Line="582" Column="3" TopLine="621"/> + </Position> + </JumpHistory> + <RunParams> + <FormatVersion Value="2"/> + <Modes ActiveMode="default"> + <Mode Name="default"> + <local> + <CommandLineParams Value="input.txt output.gcode"/> + </local> + </Mode> + </Modes> + </RunParams> + <HistoryLists> + <List Name="LaunchingApplication" Type="File" Count="1"> + <Item1 Value="C:\Windows\system32\cmd.exe /C ${TargetCmdLine}"/> + </List> + <List Name="CommandLineParameters" Count="1"> + <Item1 Value="input.txt output.gcode"/> + </List> + </HistoryLists> + </ProjectSession> +</CONFIG> diff --git a/gcodegenerator/gcodegenerator.pas b/gcodegenerator/gcodegenerator.pas new file mode 100644 index 0000000..0529c25 --- /dev/null +++ b/gcodegenerator/gcodegenerator.pas @@ -0,0 +1,654 @@ +program gcodegenerator; + +uses + SysUtils, StrUtils, Math; + +type + TPoint = record + X, Y: double; + end; + +type + TStatorParams = record + StatorName: String; + BaseDiameter: Double; + BaseRadius: Double; + NumberOfRays: Integer; + RayShape: string; + RayDiameter: Double; + RayWidth: Double; + RayHeight: Double; + RayLength: Double; + + RayTopShape: string; + RayTopDiameter: Double; + RayTopWidth: Double; + RayTopHeight: Double; + + RayCenterOffset: Double; + WireDiameter: Double; + NeedleDiameter: Double; + PathClearance: Double; + + WorkSpeed :integer; + end; + +type + TLayer = record + Turns: Integer; // ���������� ������ + StartZ: double; // ��������� ���������� + EndZ: double; // �������� ���������� + end; + +var + StartTime, EndTime, ExecutionTime: TDateTime; + InputFileName, OutputFileName, CoilGeometryFileName: string; + StatorParams: TStatorParams; + InFile, OutFile, CoilGeometryFile: TextFile; + Line: string; + CoilRadius,CoilWidth,CoilHeight :double; + CurrentZ: double; + coords: TPoint; + normalizecoords: TPoint; + Layers: array[1..10] of TLayer; + i, j, k: Integer; + CoilLength :double; + CurrentCoilTurns, CoilTurnsSum :Integer; + AngleBetweenRays :double; + RequiredSpacing: Double; + LayerNumber :Integer; + MaxLayers :Integer; + angle :double; + MaxDepth,MaxPath :double; + MoveForward:boolean; + OperationMode:string; + + + function ParseLine(Line: string): Boolean; + var + Parts: array of string; + Value: string; + TrimmedLine: string; + begin + TrimmedLine := Trim(Line); // ������� ������� � ������ � ����� ������ + if Length(TrimmedLine) = 0 then + begin + exit(true); // ������ ������ - ���������� + end + else if TrimmedLine[1] in [';','#'] then + begin + exit(true); // ������ ����������� - ���������� + end; + Parts := SplitString(TrimmedLine, '='); // ���������� TrimmedLine + Result := Length(Parts) = 2; + if Result then + begin + Value := LowerCase(Trim(Parts[1])); // �������� � ������� �������� + case Trim(Parts[0]) of + 'stator_name': begin + StatorParams.StatorName := Value; + writeln('StatorName: ', StatorParams.StatorName); + writeln(); + end; + 'Operation_Mode': begin + OperationMode := Value; + writeln('Operation Mode: ', OperationMode); + writeln(); + end; + 'base_dia': begin + StatorParams.BaseDiameter := StrToFloat(Value); + writeln('Base Diameter: ', StatorParams.BaseDiameter:8:2); + writeln(); + StatorParams.BaseRadius := StatorParams.BaseDiameter/2; + writeln('Base Radius: ', StatorParams.BaseRadius:8:2); + writeln(); + + end; + 'num_rays': begin + StatorParams.NumberOfRays := StrToInt(Value); + writeln('Number of Rays: ', StatorParams.NumberOfRays); + AngleBetweenRays := 360/StatorParams.NumberOfRays; + writeln('Angle Between Rays: ', AngleBetweenRays); + writeln(); + end; + 'ray_shape': begin + if Pos(Value, 'circle, rect, superellipse') = 0 then + raise Exception.Create('Invalid value for ray_shape: ' + Value); + StatorParams.RayShape := Value; + writeln('Ray Shape: ', StatorParams.RayShape); + writeln(); + end; + 'ray_dia': begin + StatorParams.RayDiameter := StrToFloat(Value); + writeln('Ray Diameter: ', StatorParams.RayDiameter:8:2); + writeln(); + end; + 'ray_w': begin + StatorParams.RayWidth := StrToFloat(Value); + writeln('Ray Width: ', StatorParams.RayWidth:8:2); + writeln(); + end; + 'ray_h': begin + StatorParams.RayHeight := StrToFloat(Value); + writeln('Ray Height: ', StatorParams.RayHeight:8:2); + writeln(); + end; + 'ray_len': begin + StatorParams.RayLength := StrToFloat(Value); + writeln('Ray Length: ', StatorParams.RayLength:8:2); + writeln(); + end; + + 'raytop_shape': begin + if Pos(Value, 'circle, rect, superellipse') = 0 then + raise Exception.Create('Invalid value for ray_top: ' + Value); + StatorParams.RayTopShape := Value; + writeln('Ray Top Shape: ', StatorParams.RayTopShape); + end; + + 'raytop_dia': begin + StatorParams.RayTopDiameter := StrToFloat(Value); + writeln('Ray Top Diameter: ', StatorParams.RayTopDiameter:8:2); + writeln(); + end; + 'raytop_w': begin + StatorParams.RayTopWidth := StrToFloat(Value); + writeln('Ray Top Width: ', StatorParams.RayTopWidth:8:2); + writeln(); + end; + 'raytop_h': begin + StatorParams.RayTopHeight := StrToFloat(Value); + writeln('Ray Top Height: ', StatorParams.RayTopHeight:8:2); + writeln(); + end; + + 'ray_offset': begin + StatorParams.RayCenterOffset := StrToFloat(Value); + writeln('Ray Center Offset: ', StatorParams.RayCenterOffset:8:2); + writeln(); + end; + 'wire_diameter': begin + StatorParams.WireDiameter := StrToFloat(Value); + writeln('Wire Diameter: ', StatorParams.WireDiameter:8:2); + writeln(); + end; + 'needle_diameter': begin + StatorParams.NeedleDiameter := StrToFloat(Value); + writeln('Needle Diameter: ', StatorParams.NeedleDiameter:8:2); + writeln(); + end; + 'path_clearance': begin + StatorParams.PathClearance := StrToFloat(Value); + writeln('Path Clearance: ', StatorParams.PathClearance:8:2); + writeln(); + end; + 'work_speed': begin + StatorParams.WorkSpeed := StrToInt(Value); + writeln('Work Speed: ', StatorParams.WorkSpeed); + writeln(); + end; + + + else + Result := False; + end; + if not Result then + begin + writeln('Error: Unknown parameter: ', Parts[0]); + exit; + end; + end; + end; + + procedure ReadInputFile(); + Begin + // **Opening the input file** + AssignFile(InFile, InputFileName); + try + Reset(InFile); // **This line opens the file for reading** + while not EOF(InFile) do + begin + ReadLn(InFile, Line); + if Length(Line) > 0 then + if not ParseLine(Line) then + writeln('Error: Invalid line: ', Line); + end; + except + on E: Exception do + begin + writeln('Error opening or reading input file: ', E.Message); + Halt(1); + end; + end; + CloseFile(InFile); + end; + + function CircleCoordinates(diameter, angleDegrees: Double): TPoint; + var + radius: Double; + angleRadians: Double; + begin + radius := diameter / 2; +// angleRadians := -1*angleDegrees * PI / 180; // ������� �������� � ������� + angleRadians := -1 * DegToRad(angleDegrees); + + Result.X := radius * Cos(angleRadians); + Result.Y := radius * Sin(angleRadians); +end; + + function CalculateAngle(opposite, adjacent: Double): Double; + begin + if adjacent = 0 then + raise Exception.Create('Adjacent side cannot be zero'); +// CalculateAngle := ArcTan(opposite / adjacent) * 180 / PI; + CalculateAngle := RadToDeg(ArcTan(opposite / adjacent)); + end; + + function NormalizeZ(radius: Real; thetaDeg: Real): Real; +var + thetaRad, alphaRad, xKas, yKas, mTang, bTang: Real; +begin + // 1. �������������� ���� �� �������� � �������. + thetaRad := DegToRad(thetaDeg); + + // 2. ���������� ��������� ����� ������� �� ���������� (������������ ������ 0,0). + xKas := radius * Cos(thetaRad); + yKas := radius * Sin(thetaRad); + + // 3. ���������� ����, ����������������� ������-������� (�����������). + alphaRad := thetaRad + PI / 2; + + // 4. ���������� �������� ������������ �����������. + mTang := Tan(alphaRad); + + // 5. ���������� ���������� ����� ��������� ����������� (y = mTang * x + bTang). + bTang := yKas - mTang * xKas; + + // 6. ���������� ���������� X ����� ����������� ����������� � ���� X (y = 0). + // 0 = mTang * x + bTang + // x = -bTang / mTang + if mTang = 0 then + begin + // ����������� ����������� ��� X - ��� ����� �����������. ���������� NaN. + NormalizeZ := NaN; + end + else + begin + NormalizeZ := -bTang / mTang; + end; +end; + + function DepthCheck(thickness, lineLength, angleDeg: double): double; + var + xIntersection, distanceToIntersection, radius: double; +begin + xIntersection := (thickness/2 + thickness/2 * cos(DegToRad(angleDeg)))/sin(DegToRad(angleDeg)); + distanceToIntersection := sqrt(sqr(xIntersection) + sqr(1.2)); + radius := lineLength / (2 * tan(DegToRad(angleDeg) / 2)); + DepthCheck := distanceToIntersection + radius; +end; + + function CalculateMaxPath(length, width, angleDegrees: double): double; + //������� ��������� ������������ ���������� ����� ������. ��� ����� �� ������ ������� �� + var + topLeftX, topLeftY, rotatedX, rotatedY, angleRadians, distance: double; +begin + // ��������� ���������� �������� ������ ���� �������������� + topLeftX := -length; + topLeftY := width / 2; + + // ����������� ���� � ������� (� ������ �������� �� ������� �������) + angleRadians := degToRad(-angleDegrees); + + // ��������� ���������� ����������� ������� ������ ���� ������� �������������� + rotatedX := -length * cos(angleRadians) - (-width / 2) * sin(angleRadians); + rotatedY := -length * sin(angleRadians) + (-width / 2) * cos(angleRadians); + + // ��������� ���������� ����� ������� + distance := sqrt(sqr(rotatedX - topLeftX) + sqr(rotatedY - topLeftY)); + + // ���������� ��������� + MaxPath := distance; +end; + + procedure CalculateCoilGeometry(); + var + StartZ, EndZ: double; + begin + writeln('CalculateCoilGeometry'); + AssignFile(CoilGeometryFile, CoilGeometryFileName); + try + Rewrite(CoilGeometryFile); + //�������, ������� ���� ����� ��������. + MaxPath:=CalculateMaxPath((StatorParams.RayLength+StatorParams.BaseRadius), StatorParams.RayWidth, AngleBetweenRays); + //writeln(CoilGeometryFile, ';MaxPath:', MaxPath); + //MaxLayers :=trunc(((MaxPath-RequiredSpacing)/2/StatorParams.WireDiameter)); + MaxLayers :=round((MaxPath-StatorParams.NeedleDiameter)/2/(StatorParams.WireDiameter+RequiredSpacing)); + if (MaxLayers mod 2 <> 0) then writeln(CoilGeometryFile, ';MaxLayers ', MaxLayers) else + begin + dec(MaxLayers); + writeln(CoilGeometryFile, ';�alculations resulted in MaxLayers=', MaxLayers+1, ' because it is even, MaxLayers=MaxLayers-1 and equal ',MaxLayers); + end; + + MoveForward:=true; + for i := 1 to MaxLayers do + begin + write(CoilGeometryFile, ';Lair:', i, ' have '); + //������� ����� ������� � ���������� ������ + //��� ����� ������� ����������� ���������� ����� ������. 2 �������� ������� + ������� ���� + 2 ������ ������������ + RequiredSpacing:=StatorParams.PathClearance*2+(i-1)*StatorParams.WireDiameter*2+StatorParams.NeedleDiameter; + //��������� ����������� ����������, ������������ �� �����, ������������ ������� ����� ����������� ������. (���������� �� ������ �������) + MaxDepth:=DepthCheck(StatorParams.RayWidth, RequiredSpacing, AngleBetweenRays); + //writeln(OutFile, ';RayWidth ', StatorParams.RayWidth:0:5); + //writeln(OutFile, ';RequiredSpacing ', RequiredSpacing:0:5); + //writeln(OutFile, ';AngleBetweenRays ', AngleBetweenRays:0:5); + //writeln(CoilGeometryFile, ';MaxDepth ', MaxDepth:0:5); + //writeln(OutFile); + //���� ���������� ������� ������, ��� ������� ���������, ����� ����� ������� ����� ����� ����. + //���� ���������� ������� ������, ��� ������� + ����� ����, ���������� ����. + //����� ����� ������� ����� "������_��������� + �����_���� - �������) + If (MaxDepth < (StatorParams.BaseRadius)) then CoilLength:=StatorParams.RayLength else if (MaxDepth > (StatorParams.RayLength+StatorParams.BaseRadius)) then break + else CoilLength:=StatorParams.RayLength+StatorParams.BaseRadius-MaxDepth; + //writeln(CoilGeometryFile, '!!!'); + + write(CoilGeometryFile, CoilLength:0:5, 'mm '); + //CurrentCoilTurns := ceil(CoilLength/StatorParams.WireDiameter); + //������ �� ����� ������� ������� ���������� ������. � ���������� ������� ����� ������ �� �������. + CurrentCoilTurns := round(CoilLength/StatorParams.WireDiameter); + write(CoilGeometryFile, CurrentCoilTurns, ' Turns'); + CoilTurnsSum := CoilTurnsSum+CurrentCoilTurns; + + + //����� ������ ����� ����� ����������� ���������� Z + //writeln(CoilGeometryFile,' StartZ=',CurrentZ:0:5); +// if (MoveForward = false) then CurrentZ:=StatorParams.RayLength+StatorParams.BaseRadius-StatorParams.WireDiameter/2 +// else CurrentZ:=StatorParams.RayLength+StatorParams.BaseRadius-StatorParams.WireDiameter*(CurrentCoilTurns-0.5); + if (MoveForward = false) then StartZ:=StatorParams.RayLength+StatorParams.BaseRadius-StatorParams.WireDiameter/2 + else StartZ:=StatorParams.RayLength+StatorParams.BaseRadius-StatorParams.WireDiameter*(CurrentCoilTurns-0.5); + + write(CoilGeometryFile,' NewStartZ=',StartZ:0:5); + + if (MoveForward = true) then EndZ:=StartZ+StatorParams.WireDiameter*CurrentCoilTurns + else EndZ:=StartZ-StatorParams.WireDiameter*CurrentCoilTurns; + writeln(CoilGeometryFile,' EndZ=',EndZ:0:5); + //Inc(LayerNumber); + CoilWidth:=CoilWidth+StatorParams.WireDiameter*2; + MoveForward:= not MoveForward; + //writeln(CoilGeometryFile,';MoveForward: ', MoveForward); + //writeln(CoilGeometryFile); + writeln(CoilGeometryFile, CurrentCoilTurns, ' ',StartZ:0:5, ' ',EndZ:0:5); + Layers[i].Turns := CurrentCoilTurns; + Layers[i].StartZ := StartZ; + Layers[i].EndZ := EndZ; + end; + writeln(CoilGeometryFile); + writeln(CoilGeometryFile,';CoilTurnsSum: ', CoilTurnsSum); + + + + except + on E: Exception do + begin + writeln('Error writing to coil_geometry file: ', E.Message); + Halt(1); + end; + end; + CloseFile(CoilGeometryFile); + end; + + procedure ReadCoilGeometry(); + var +// Parts: array of string; +// Value: string; + TrimmedLine: string; + line: string; + count, i, turns: Integer; + startZ: float; + endZ: float; + spacePos: Integer; + err: Integer; + begin + writeln('ReadCoilGeometry'); + AssignFile(CoilGeometryFile, CoilGeometryFileName); + try + Reset(CoilGeometryFile); // **This line opens the file for reading** + i := 0; + while not EOF(CoilGeometryFile) do + begin + //writeln('!!!'); + ReadLn(CoilGeometryFile, Line); + if Length(Line) > 0 then + begin + TrimmedLine := Trim(Line); // ������� ������� � ������ � ����� ������ + if (Length(TrimmedLine) = 0) then continue //exit() // ������ ������ - ���������� + else if TrimmedLine[1] in [';','#'] then continue; // exit(); // ������ ����������� - ���������� + inc(i); + spacePos := Pos(' ', TrimmedLine); + //writeln(spacePos); + //writeln('!', TrimmedLine); + Val(Copy(TrimmedLine, 1, spacePos - 1), turns, err); + + spacePos := 1 + spacePos; + //writeln('? ',spacePos); + //i:=1; + TrimmedLine:=Copy(TrimmedLine, spacePos, Length(TrimmedLine)); + spacePos := Pos(' ',TrimmedLine); + //writeln(spacePos); + //writeln('!!', TrimmedLine); + Val(Copy(TrimmedLine, 1, spacePos - 1), startZ, err); + + TrimmedLine:=Copy(TrimmedLine, spacePos, Length(TrimmedLine)); + //writeln('!!!', TrimmedLine); + spacePos := Pos(' ',TrimmedLine); + //writeln(spacePos); + Val(Copy(TrimmedLine, 1, Length(TrimmedLine)), endZ, err); + writeln('layer:',i,' turns:', turns,' startX:', startZ:0:3,' endX:', endZ:0:3); + Layers[i].Turns := turns; + Layers[i].StartZ := StartZ; + Layers[i].EndZ := EndZ; + + //for i := 1 to CurrentCoilTurns do + //begin + // writeln(Layers[i].Turns,Layers[i].StartZ,Layers[i].EndZ); + //end; + //MaxLayers + //writeln(); + end; + //if not ParseLine(Line) then + // writeln('Error: Invalid line: ', Line); + end; + MaxLayers:=i; + except + on E: Exception do + begin + writeln('Error opening or reading Coil Geometry File: ', E.Message); + Halt(1); + end; + end; + CloseFile(CoilGeometryFile); + end; + +begin + // Command line argument handling + StartTime := Now; + if ParamCount < 3 then + begin + Writeln('Usage: GCodeGenerator <input_file.txt> <output_file.gcode> <coil_geometry.txt>'); + Halt(1); + end; + InputFileName := ParamStr(1); + OutputFileName := ParamStr(2); + CoilGeometryFileName := ParamStr(3); + + ReadInputFile(); + + // G-code generation + AssignFile(OutFile, OutputFileName); + try + Rewrite(OutFile); + // *** Your G-code generation logic here *** + writeln(OutFile, ';Generate G-code file for ',StatorParams.StatorName,' stator. At ',FormatDateTime('dd.mm.yyyy hh:nn:ss.zzz', StartTime)); + writeln(OutFile, '; G-code for stator winding'); + writeln(OutFile, 'G90 ; Absolute coordinate system'); + writeln(OutFile, 'G1 Y-10'); + writeln(OutFile, 'G28 X Y Z'); + writeln(OutFile, 'G1 X0 Y0'); + //writeln(OutFile, 'G28 O'); //Home all "untrusted" axes + writeln(OutFile); + // Move to center of ray along Y axis and reset coordinate + writeln(OutFile, 'G1 X', StatorParams.RayCenterOffset:0:2); + writeln(OutFile, 'G92 X0'); + + //������� ���� ����� � ���� ������� ���� + CoilRadius:=(StatorParams.RayTopHeight/2+StatorParams.NeedleDiameter/2+StatorParams.PathClearance); + CoilWidth:=(StatorParams.RayTopWidth+StatorParams.NeedleDiameter+StatorParams.PathClearance*2); + CoilHeight:=(StatorParams.RayTopHeight+StatorParams.NeedleDiameter+StatorParams.PathClearance*2); + writeln(OutFile, ';CoilRadius = ', CoilRadius:0:3); + writeln(OutFile, ';CoilWidth = ', CoilWidth:0:3); + writeln(OutFile, ';CoilHeight = ', CoilHeight:0:3); + writeln(OutFile, 'G1 X', -1*CoilHeight/2:0:3, ' Y',-1*AngleBetweenRays/2:0:3); + + //������������ � ��������� �������. + CurrentZ:=(StatorParams.BaseDiameter/2)+StatorParams.PathClearance; + writeln(OutFile, 'G1 Z', CurrentZ:0:2, ' F', StatorParams.WorkSpeed); + //����� �� ����� ��� ����, ����� ��������� ����� ��������� + writeln(OutFile, 'M0'); + + if (OperationMode = 'auto') then CalculateCoilGeometry() else + if (OperationMode = 'manual') then ReadCoilGeometry() else + begin + writeln('Error determining operation mode.'); + writeln('You should use auto or manual.'); + Readln; + Halt(1); + end; + + writeln(); + writeln(OutFile, ';Information about layers'); + writeln(OutFile, ';MaxLayers: ', MaxLayers); + for i := 1 to MaxLayers do + begin + writeln(OutFile, ';', i, ' ',Layers[i].Turns,' ',Layers[i].StartZ:0:5,' ',Layers[i].EndZ:0:5); + end; + Inc(LayerNumber); + //�������� ������ �������. + writeln(OutFile); + writeln(OutFile, ';Start winding'); + //��������� �� ������ � ���� + MoveForward:=true; + if (StatorParams.RayShape = 'circle') then + begin + for j := 0 to CurrentCoilTurns do + begin + for i := 0 to 360 do + begin + coords := CircleCoordinates(CoilRadius*2, i+180); +// writeln(OutFile,'CoilRadius*2= ',CoilRadius*2:0:5,' X=', coords.X:0:3, ' Y=', coords.Y:0:5); + angle := CalculateAngle(coords.Y, CurrentZ); + +// writeln(OutFile, ';G1 X', coords.X:0:3, ' Y', angle:0:5,' Z', CurrentZ:0:5); + writeln(OutFile, 'G1 X', coords.X:0:3, ' Y', angle:0:5,' Z', NormalizeZ(CurrentZ, angle):0:5); +// writeln(OutFile); + + CurrentZ:=CurrentZ+StatorParams.WireDiameter/360; + end; + writeln(OutFile, ';Next coil.'); + end; + writeln(OutFile, ';Second coil'); + Inc(LayerNumber); +// RequiredSpacing:=StatorParams.RayWidth+StatorParams.NeedleDiameter+StatorParams.PathClearance*2+LayerNumber*StatorParams.WireDiameter*2; +// writeln(OutFile, ';RequiredSpacing = ',RequiredSpacing:0:5); + RequiredSpacing:=StatorParams.RayTopWidth; + writeln(OutFile, ';RequiredSpacing = ',RequiredSpacing:0:5); + RequiredSpacing:=RequiredSpacing+StatorParams.NeedleDiameter; + writeln(OutFile, ';RequiredSpacing = ',RequiredSpacing:0:5); + RequiredSpacing:=RequiredSpacing+StatorParams.PathClearance*2+LayerNumber*StatorParams.WireDiameter*2; + writeln(OutFile, ';RequiredSpacing = ',RequiredSpacing:0:5); + + CurrentZ:=RequiredSpacing/(2 * tan(AngleBetweenRays*PI/180/2)); + writeln(OutFile, ';CurrentZ = ',CurrentZ:0:3); + end + else if (StatorParams.RayShape = 'rect') then + begin +// writeln(OutFile, ';Rect? '); + + for LayerNumber := 1 to MaxLayers do + begin + writeln(OutFile, ';Layer ', LayerNumber); + if (Layers[LayerNumber].StartZ > Layers[LayerNumber].EndZ) then CoilLength:=Layers[LayerNumber].StartZ-Layers[LayerNumber].EndZ + else CoilLength:=Layers[LayerNumber].EndZ-Layers[LayerNumber].StartZ; + writeln(OutFile, ';CoilLength ', CoilLength:0:5); + CurrentCoilTurns:=Layers[LayerNumber].Turns; + //writeln(OutFile, ';CurrentCoilTurns ', CurrentCoilTurns); + CoilTurnsSum := CoilTurnsSum+CurrentCoilTurns; + writeln(OutFile, ';CoilTurnsSum ', CoilTurnsSum); + CurrentZ:=Layers[LayerNumber].StartZ; + writeln(OutFile,'; NewZ=',CurrentZ:0:5); + //�������� ������. + writeln(OutFile, ';We make ',CurrentCoilTurns, ' turns on ', LayerNumber, ' layer.' ); + writeln(OutFile); + for j := 1 to CurrentCoilTurns do + begin + writeln(OutFile,';Coil� = ',j); + writeln(OutFile,'M117 ',j); + //angle := CalculateAngle(CoilWidth/2, CurrentZ); + angle := AngleBetweenRays/2; + + //Divide the path into 100 points + //Move from left-down to left-up + for k := 1 to 100 do + begin + angle := AngleBetweenRays/2; + angle := ((-1*angle)+2*(angle/100*k)); + writeln(OutFile, 'G1 X', -1*CoilHeight/2:0:3, ' Y', angle:0:5,' Z', NormalizeZ(CurrentZ, angle):0:5, ' ;CurrentZ= ',CurrentZ:0:5); // Top Left Corner + end; + if MoveForward then CurrentZ:=CurrentZ+StatorParams.WireDiameter/4 else CurrentZ:=CurrentZ-StatorParams.WireDiameter/4; + + // angle := CalculateAngle(CoilWidth/2, CurrentZ); + angle := AngleBetweenRays/2; + writeln(OutFile, 'G1 X', CoilHeight/2:0:3, ' Y', angle:0:5,' Z', NormalizeZ(CurrentZ, angle):0:5, ' ;CurrentZ= ',CurrentZ:0:5); // Top Right Corner + if MoveForward then CurrentZ:=CurrentZ+StatorParams.WireDiameter/4 else CurrentZ:=CurrentZ-StatorParams.WireDiameter/4; + //writeln(OutFile, 'M0'); + + //Divide the path into 100 points + //Move from left-down to rt-up + for k := 1 to 100 do + begin + angle := AngleBetweenRays/2; + angle := (angle-(2*(angle/100*k))); + writeln(OutFile, 'G1 X', CoilHeight/2:0:3, ' Y', angle:0:5,' Z', NormalizeZ(CurrentZ, angle):0:5, ' ;CurrentZ= ',CurrentZ:0:5); // Bottom Right Corner + end; + if MoveForward then CurrentZ:=CurrentZ+StatorParams.WireDiameter/4 else CurrentZ:=CurrentZ-StatorParams.WireDiameter/4; + //writeln(OutFile, 'M0'); + + // angle := CalculateAngle(CoilWidth/2, CurrentZ); + angle := AngleBetweenRays/2; + writeln(OutFile, 'G1 X', -1*CoilHeight/2:0:3, ' Y', -angle:0:5,' Z', NormalizeZ(CurrentZ, angle):0:5, ' ;CurrentZ= ',CurrentZ:0:5); // Bottom Left Corner + if MoveForward then CurrentZ:=CurrentZ+StatorParams.WireDiameter/4 else CurrentZ:=CurrentZ-StatorParams.WireDiameter/4; + //writeln(OutFile, 'M0'); + end; + + writeln(OutFile, 'M0'); +// writeln(OutFile, 'G91'); +// writeln(OutFile, 'G1 Y50'); +// writeln(OutFile, 'G90'); + CoilWidth:=CoilWidth+StatorParams.WireDiameter*2; + MoveForward:= not MoveForward; + writeln(OutFile,';MoveForward: ', MoveForward); + end; + end; + + except + on E: Exception do + begin + writeln('Error writing to output file: ', E.Message); + Halt(1); + end; + end; + CloseFile(OutFile); + EndTime := Now; + ExecutionTime := EndTime - StartTime; + writeln('G-code generated to: ', OutputFileName, ' in ', FormatFloat('0.000', ExecutionTime * 86400), ' seconds.'); + writeln('Press Enter... '); + Readln; +end. diff --git a/gcodegenerator/input.txt b/gcodegenerator/input.txt new file mode 100644 index 0000000..0ccab67 --- /dev/null +++ b/gcodegenerator/input.txt @@ -0,0 +1,36 @@ +# диаметр основания статора +base_dia=37,8 +# количество лучей статора +num_rays=1 + +# форма луча статора (circle, rect, superellipse) +ray_shape=rect +# диаметр луча статора +# ray_dia=5,0 +# ширина луча статора +ray_w=2,4 +# высота луча статора +ray_h=5 +# длина луча статора +ray_len=9,0 + +# форма вершины луча +raytop_shape=circle +# диаметр вершины луча +raytop_dia=8,9 +# ширина вершины луча +raytop_w=5,6 +# высота вершины луча +raytop_h=14,0 + +# смещение центра луча +ray_offset=14,7 +# диаметр провода +wire_diameter=0,25 +# диаметр иглы +needle_diameter=1,25 +# зазор пути +path_clearance=0,2 + +# скорость намотки +work_speed=2000 \ No newline at end of file diff --git a/gcodegenerator/trident_input.txt b/gcodegenerator/trident_input.txt new file mode 100644 index 0000000..9f6e3b3 --- /dev/null +++ b/gcodegenerator/trident_input.txt @@ -0,0 +1,44 @@ +# Имя статора +stator_name=Plastic_72mm +# Режим работы (auto, manual) +Operation_Mode=manual +# диаметр основания статора +base_dia=37,8 +# количество лучей статора +num_rays=24 + +# форма луча статора (circle, rect, superellipse) +ray_shape=rect +# диаметр луча статора +# ray_dia=5,0 +# ширина луча статора +ray_w=2,4 +# высота луча статора +ray_h=5 +# длина луча статора +ray_len=9,0 + +# форма вершины луча +raytop_shape=rect + +# диаметр вершины луча +# raytop_dia=8,9 + +# ширина вершины луча +raytop_w=5,6 +# высота вершины луча +raytop_h=11,0 + +# смещение центра луча +ray_offset=14,7 +# диаметр провода +wire_diameter=0,23 +# диаметр иглы +needle_diameter=1,25 + +# зазор пути +path_clearance=0,2 + +# скорость намотки +work_speed=500 +# work_speed=20000 \ No newline at end of file diff --git a/gcodegenerator/trident_run.bat b/gcodegenerator/trident_run.bat new file mode 100644 index 0000000..90234d3 --- /dev/null +++ b/gcodegenerator/trident_run.bat @@ -0,0 +1 @@ +gcodegenerator_v4.exe trident_input.txt trident_output.gcode trident_coil.txt \ No newline at end of file diff --git a/src/3d_printed_parts/-stator_holder_new_printable.step1.SLDPRT b/src/3d_printed_parts/-stator_holder_new_printable.step1.SLDPRT index a7988c9..774c99c 100644 Binary files a/src/3d_printed_parts/-stator_holder_new_printable.step1.SLDPRT and b/src/3d_printed_parts/-stator_holder_new_printable.step1.SLDPRT differ diff --git a/src/3d_printed_parts/Display_case.STL b/src/3d_printed_parts/Display_case.STL deleted file mode 100644 index b2f6ee3..0000000 Binary files a/src/3d_printed_parts/Display_case.STL and /dev/null differ diff --git a/src/3d_printed_parts/Display_case_for_discount_display.SLDPRT b/src/3d_printed_parts/Display_case_for_discount_display.SLDPRT new file mode 100644 index 0000000..3575197 Binary files /dev/null and b/src/3d_printed_parts/Display_case_for_discount_display.SLDPRT differ diff --git a/src/3d_printed_parts/Display_stand.SLDPRT b/src/3d_printed_parts/Display_stand.SLDPRT index 00aa7f7..ed41535 100644 Binary files a/src/3d_printed_parts/Display_stand.SLDPRT and b/src/3d_printed_parts/Display_stand.SLDPRT differ diff --git a/src/3d_printed_parts/Display_stand.STL b/src/3d_printed_parts/Display_stand.STL deleted file mode 100644 index 95deea6..0000000 Binary files a/src/3d_printed_parts/Display_stand.STL and /dev/null differ diff --git a/src/3d_printed_parts/Electronics_cover.3mf b/src/3d_printed_parts/Electronics_cover.3mf new file mode 100644 index 0000000..39e9003 Binary files /dev/null and b/src/3d_printed_parts/Electronics_cover.3mf differ diff --git a/src/3d_printed_parts/Electronics_cover.SLDPRT b/src/3d_printed_parts/Electronics_cover.SLDPRT index d2519d0..e376f59 100644 Binary files a/src/3d_printed_parts/Electronics_cover.SLDPRT and b/src/3d_printed_parts/Electronics_cover.SLDPRT differ diff --git a/src/3d_printed_parts/Electronics_cover.STL b/src/3d_printed_parts/Electronics_cover.STL deleted file mode 100644 index 3d19270..0000000 Binary files a/src/3d_printed_parts/Electronics_cover.STL and /dev/null differ diff --git a/src/3d_printed_parts/Homing_template.SLDPRT b/src/3d_printed_parts/Homing_template.SLDPRT new file mode 100644 index 0000000..00099dd Binary files /dev/null and b/src/3d_printed_parts/Homing_template.SLDPRT differ diff --git a/src/3d_printed_parts/Nut_spacer.SLDPRT b/src/3d_printed_parts/Nut_spacer.SLDPRT new file mode 100644 index 0000000..5026aa1 Binary files /dev/null and b/src/3d_printed_parts/Nut_spacer.SLDPRT differ diff --git a/src/3d_printed_parts/PCB_spacer.STL b/src/3d_printed_parts/PCB_spacer.STL deleted file mode 100644 index df9e3ac..0000000 Binary files a/src/3d_printed_parts/PCB_spacer.STL and /dev/null differ diff --git a/src/3d_printed_parts/Smart_controller_face_002.SLDPRT b/src/3d_printed_parts/Smart_controller_face_002.SLDPRT new file mode 100644 index 0000000..d0c1dc5 Binary files /dev/null and b/src/3d_printed_parts/Smart_controller_face_002.SLDPRT differ diff --git a/src/3d_printed_parts/Test_piptik.SLDPRT b/src/3d_printed_parts/Test_piptik.SLDPRT new file mode 100644 index 0000000..92f8147 Binary files /dev/null and b/src/3d_printed_parts/Test_piptik.SLDPRT differ diff --git a/src/3d_printed_parts/Test_piptik.STL b/src/3d_printed_parts/Test_piptik.STL new file mode 100644 index 0000000..491b0be Binary files /dev/null and b/src/3d_printed_parts/Test_piptik.STL differ diff --git a/src/3d_printed_parts/a5275.SLDPRT b/src/3d_printed_parts/a5275.SLDPRT index ca8371f..66cb609 100644 Binary files a/src/3d_printed_parts/a5275.SLDPRT and b/src/3d_printed_parts/a5275.SLDPRT differ diff --git a/src/3d_printed_parts/a5275.STL b/src/3d_printed_parts/a5275.STL deleted file mode 100644 index c2470c6..0000000 Binary files a/src/3d_printed_parts/a5275.STL and /dev/null differ diff --git a/src/3d_printed_parts/bearing_holder_large.SLDPRT b/src/3d_printed_parts/bearing_holder_large.SLDPRT index 5c0779c..7403390 100644 Binary files a/src/3d_printed_parts/bearing_holder_large.SLDPRT and b/src/3d_printed_parts/bearing_holder_large.SLDPRT differ diff --git a/src/3d_printed_parts/bearing_holder_large.STL b/src/3d_printed_parts/bearing_holder_large.STL deleted file mode 100644 index f8f5be8..0000000 Binary files a/src/3d_printed_parts/bearing_holder_large.STL and /dev/null differ diff --git a/src/3d_printed_parts/bearing_holder_small_my.STL b/src/3d_printed_parts/bearing_holder_small_my.STL deleted file mode 100644 index 7b7e350..0000000 Binary files a/src/3d_printed_parts/bearing_holder_small_my.STL and /dev/null differ diff --git a/src/3d_printed_parts/brake.STL b/src/3d_printed_parts/brake.STL deleted file mode 100644 index 22e23f0..0000000 Binary files a/src/3d_printed_parts/brake.STL and /dev/null differ diff --git a/src/3d_printed_parts/brake_equipment.SLDPRT b/src/3d_printed_parts/brake_equipment.SLDPRT new file mode 100644 index 0000000..22002ba Binary files /dev/null and b/src/3d_printed_parts/brake_equipment.SLDPRT differ diff --git a/src/3d_printed_parts/brake_handle.SLDPRT b/src/3d_printed_parts/brake_handle.SLDPRT new file mode 100644 index 0000000..a842d46 Binary files /dev/null and b/src/3d_printed_parts/brake_handle.SLDPRT differ diff --git a/src/3d_printed_parts/carrying_handle.STL b/src/3d_printed_parts/carrying_handle.STL deleted file mode 100644 index ea1e5ab..0000000 Binary files a/src/3d_printed_parts/carrying_handle.STL and /dev/null differ diff --git a/src/3d_printed_parts/crews_axis.SLDPRT b/src/3d_printed_parts/crews_axis.SLDPRT index 69eaf8d..b6420d7 100644 Binary files a/src/3d_printed_parts/crews_axis.SLDPRT and b/src/3d_printed_parts/crews_axis.SLDPRT differ diff --git a/src/3d_printed_parts/holder_for_injector_needle.SLDPRT b/src/3d_printed_parts/holder_for_injector_needle.SLDPRT new file mode 100644 index 0000000..ded7c4f Binary files /dev/null and b/src/3d_printed_parts/holder_for_injector_needle.SLDPRT differ diff --git a/src/3d_printed_parts/holder_for_injector_needle.STL b/src/3d_printed_parts/holder_for_injector_needle.STL new file mode 100644 index 0000000..2773b45 Binary files /dev/null and b/src/3d_printed_parts/holder_for_injector_needle.STL differ diff --git a/src/3d_printed_parts/main_carriage.SLDPRT b/src/3d_printed_parts/main_carriage.SLDPRT index 7912ee5..c3a5e99 100644 Binary files a/src/3d_printed_parts/main_carriage.SLDPRT and b/src/3d_printed_parts/main_carriage.SLDPRT differ diff --git a/src/3d_printed_parts/main_carriage.STL b/src/3d_printed_parts/main_carriage.STL index ee2191e..4af3a9d 100644 Binary files a/src/3d_printed_parts/main_carriage.STL and b/src/3d_printed_parts/main_carriage.STL differ diff --git a/src/3d_printed_parts/main_platform_tmp2.SLDPRT b/src/3d_printed_parts/main_platform_tmp2.SLDPRT index cc3b48a..7b84cdf 100644 Binary files a/src/3d_printed_parts/main_platform_tmp2.SLDPRT and b/src/3d_printed_parts/main_platform_tmp2.SLDPRT differ diff --git a/src/3d_printed_parts/main_platform_tmp2.STL b/src/3d_printed_parts/main_platform_tmp2.STL deleted file mode 100644 index 8470027..0000000 Binary files a/src/3d_printed_parts/main_platform_tmp2.STL and /dev/null differ diff --git a/src/3d_printed_parts/main_platform_tmp3.SLDPRT b/src/3d_printed_parts/main_platform_tmp3.SLDPRT new file mode 100644 index 0000000..4528b8c Binary files /dev/null and b/src/3d_printed_parts/main_platform_tmp3.SLDPRT differ diff --git a/src/3d_printed_parts/needle_holder.SLDPRT b/src/3d_printed_parts/needle_holder.SLDPRT index 11bf323..09e7ae8 100644 Binary files a/src/3d_printed_parts/needle_holder.SLDPRT and b/src/3d_printed_parts/needle_holder.SLDPRT differ diff --git a/src/3d_printed_parts/needle_holder.STL b/src/3d_printed_parts/needle_holder.STL deleted file mode 100644 index 610043a..0000000 Binary files a/src/3d_printed_parts/needle_holder.STL and /dev/null differ diff --git a/src/3d_printed_parts/needle_holder_for_075mm_tube.SLDPRT b/src/3d_printed_parts/needle_holder_for_075mm_tube.SLDPRT new file mode 100644 index 0000000..04f5d3d Binary files /dev/null and b/src/3d_printed_parts/needle_holder_for_075mm_tube.SLDPRT differ diff --git a/src/3d_printed_parts/needle_holder_for_075mm_tube_tmp.SLDPRT b/src/3d_printed_parts/needle_holder_for_075mm_tube_tmp.SLDPRT new file mode 100644 index 0000000..909875a Binary files /dev/null and b/src/3d_printed_parts/needle_holder_for_075mm_tube_tmp.SLDPRT differ diff --git a/src/3d_printed_parts/needle_holder_for_075mm_tube_tmp.STL b/src/3d_printed_parts/needle_holder_for_075mm_tube_tmp.STL new file mode 100644 index 0000000..891afb0 Binary files /dev/null and b/src/3d_printed_parts/needle_holder_for_075mm_tube_tmp.STL differ diff --git a/src/3d_printed_parts/needle_holder_spacer.SLDPRT b/src/3d_printed_parts/needle_holder_spacer.SLDPRT new file mode 100644 index 0000000..01a139a Binary files /dev/null and b/src/3d_printed_parts/needle_holder_spacer.SLDPRT differ diff --git a/src/3d_printed_parts/needle_holder_spacer.STL b/src/3d_printed_parts/needle_holder_spacer.STL new file mode 100644 index 0000000..a7b6ec3 Binary files /dev/null and b/src/3d_printed_parts/needle_holder_spacer.STL differ diff --git a/src/3d_printed_parts/needle_holder_tmp.SLDPRT b/src/3d_printed_parts/needle_holder_tmp.SLDPRT new file mode 100644 index 0000000..207c6ff Binary files /dev/null and b/src/3d_printed_parts/needle_holder_tmp.SLDPRT differ diff --git a/src/3d_printed_parts/needle_holder_top.SLDPRT b/src/3d_printed_parts/needle_holder_top.SLDPRT index 5757729..5dae5db 100644 Binary files a/src/3d_printed_parts/needle_holder_top.SLDPRT and b/src/3d_printed_parts/needle_holder_top.SLDPRT differ diff --git a/src/3d_printed_parts/needle_holder_top.STL b/src/3d_printed_parts/needle_holder_top.STL index fa8ea4a..b1b5d2f 100644 Binary files a/src/3d_printed_parts/needle_holder_top.STL and b/src/3d_printed_parts/needle_holder_top.STL differ diff --git a/src/3d_printed_parts/nut_holder.SLDPRT b/src/3d_printed_parts/nut_holder.SLDPRT new file mode 100644 index 0000000..1156057 Binary files /dev/null and b/src/3d_printed_parts/nut_holder.SLDPRT differ diff --git a/src/3d_printed_parts/opto_endstop_holder.SLDPRT b/src/3d_printed_parts/opto_endstop_holder.SLDPRT new file mode 100644 index 0000000..850a141 Binary files /dev/null and b/src/3d_printed_parts/opto_endstop_holder.SLDPRT differ diff --git a/src/3d_printed_parts/organizer_my.SLDPRT b/src/3d_printed_parts/organizer_my.SLDPRT index d6e54ab..de4be81 100644 Binary files a/src/3d_printed_parts/organizer_my.SLDPRT and b/src/3d_printed_parts/organizer_my.SLDPRT differ diff --git a/src/3d_printed_parts/organizer_my.STL b/src/3d_printed_parts/organizer_my.STL deleted file mode 100644 index e4d6e07..0000000 Binary files a/src/3d_printed_parts/organizer_my.STL and /dev/null differ diff --git a/src/3d_printed_parts/organizer_my_2.SLDPRT b/src/3d_printed_parts/organizer_my_2.SLDPRT new file mode 100644 index 0000000..19eb3e7 Binary files /dev/null and b/src/3d_printed_parts/organizer_my_2.SLDPRT differ diff --git a/src/3d_printed_parts/organizer_my_2.STL b/src/3d_printed_parts/organizer_my_2.STL new file mode 100644 index 0000000..817c410 Binary files /dev/null and b/src/3d_printed_parts/organizer_my_2.STL differ diff --git a/src/3d_printed_parts/organizer_tmp.STL b/src/3d_printed_parts/organizer_tmp.STL deleted file mode 100644 index b1a7208..0000000 Binary files a/src/3d_printed_parts/organizer_tmp.STL and /dev/null differ diff --git a/src/3d_printed_parts/pully1_my.SLDPRT b/src/3d_printed_parts/pully1_my.SLDPRT index b4eecb7..6fc5faf 100644 Binary files a/src/3d_printed_parts/pully1_my.SLDPRT and b/src/3d_printed_parts/pully1_my.SLDPRT differ diff --git a/src/3d_printed_parts/pully1_my.STL b/src/3d_printed_parts/pully1_my.STL deleted file mode 100644 index 1fedc08..0000000 Binary files a/src/3d_printed_parts/pully1_my.STL and /dev/null differ diff --git a/src/3d_printed_parts/rotary axis nut.SLDPRT b/src/3d_printed_parts/rotary axis nut.SLDPRT new file mode 100644 index 0000000..8fb41b8 Binary files /dev/null and b/src/3d_printed_parts/rotary axis nut.SLDPRT differ diff --git a/src/3d_printed_parts/rotary axis.SLDPRT b/src/3d_printed_parts/rotary axis.SLDPRT new file mode 100644 index 0000000..5390329 Binary files /dev/null and b/src/3d_printed_parts/rotary axis.SLDPRT differ diff --git a/src/3d_printed_parts/sensorPin240705.STL b/src/3d_printed_parts/sensorPin240705.STL deleted file mode 100644 index 784df9e..0000000 Binary files a/src/3d_printed_parts/sensorPin240705.STL and /dev/null differ diff --git a/src/3d_printed_parts/sensor_key2_240705.SLDPRT b/src/3d_printed_parts/sensor_key2_240705.SLDPRT index 2d9b7fa..20a7f74 100644 Binary files a/src/3d_printed_parts/sensor_key2_240705.SLDPRT and b/src/3d_printed_parts/sensor_key2_240705.SLDPRT differ diff --git a/src/3d_printed_parts/sensor_key2_240705.STL b/src/3d_printed_parts/sensor_key2_240705.STL deleted file mode 100644 index 2498298..0000000 Binary files a/src/3d_printed_parts/sensor_key2_240705.STL and /dev/null differ diff --git a/src/3d_printed_parts/smooth shaft_holder_tmp.STL b/src/3d_printed_parts/smooth shaft_holder_tmp.STL deleted file mode 100644 index ca65625..0000000 Binary files a/src/3d_printed_parts/smooth shaft_holder_tmp.STL and /dev/null differ diff --git a/src/3d_printed_parts/spacer.SLDPRT b/src/3d_printed_parts/spacer.SLDPRT new file mode 100644 index 0000000..9ad0d69 Binary files /dev/null and b/src/3d_printed_parts/spacer.SLDPRT differ diff --git a/src/3d_printed_parts/spring_cap.SLDPRT b/src/3d_printed_parts/spring_cap.SLDPRT new file mode 100644 index 0000000..8c564c9 Binary files /dev/null and b/src/3d_printed_parts/spring_cap.SLDPRT differ diff --git a/src/3d_printed_parts/tension_knob.SLDPRT b/src/3d_printed_parts/tension_knob.SLDPRT new file mode 100644 index 0000000..97032e1 Binary files /dev/null and b/src/3d_printed_parts/tension_knob.SLDPRT differ diff --git a/src/3d_printed_parts/tension_roller.SLDPRT b/src/3d_printed_parts/tension_roller.SLDPRT new file mode 100644 index 0000000..192025b Binary files /dev/null and b/src/3d_printed_parts/tension_roller.SLDPRT differ diff --git a/src/3d_printed_parts/tension_roller_cheek.SLDPRT b/src/3d_printed_parts/tension_roller_cheek.SLDPRT new file mode 100644 index 0000000..17d1cd3 Binary files /dev/null and b/src/3d_printed_parts/tension_roller_cheek.SLDPRT differ diff --git a/src/3d_printed_parts/tension_system_base.SLDPRT b/src/3d_printed_parts/tension_system_base.SLDPRT new file mode 100644 index 0000000..e81a188 Binary files /dev/null and b/src/3d_printed_parts/tension_system_base.SLDPRT differ diff --git a/src/3d_printed_parts/weldroller_holder.SLDPRT b/src/3d_printed_parts/weldroller_holder.SLDPRT index 25d07b1..9f493a0 100644 Binary files a/src/3d_printed_parts/weldroller_holder.SLDPRT and b/src/3d_printed_parts/weldroller_holder.SLDPRT differ diff --git a/src/3d_printed_parts/weldroller_holder.STL b/src/3d_printed_parts/weldroller_holder.STL deleted file mode 100644 index 418a04a..0000000 Binary files a/src/3d_printed_parts/weldroller_holder.STL and /dev/null differ diff --git a/src/3d_printed_parts/x_axis_cariage.SLDPRT b/src/3d_printed_parts/x_axis_cariage.SLDPRT new file mode 100644 index 0000000..967db9b Binary files /dev/null and b/src/3d_printed_parts/x_axis_cariage.SLDPRT differ diff --git a/src/3d_printed_parts/x_axis_cariage.STL b/src/3d_printed_parts/x_axis_cariage.STL new file mode 100644 index 0000000..a48791f Binary files /dev/null and b/src/3d_printed_parts/x_axis_cariage.STL differ diff --git a/src/3d_printed_parts/Еще одна деталь для резинки.SLDPRT b/src/3d_printed_parts/Еще одна деталь для резинки.SLDPRT new file mode 100644 index 0000000..44263bb Binary files /dev/null and b/src/3d_printed_parts/Еще одна деталь для резинки.SLDPRT differ diff --git a/src/3d_printed_parts/Еще одна деталь для резинки.STL b/src/3d_printed_parts/Еще одна деталь для резинки.STL new file mode 100644 index 0000000..b30279e Binary files /dev/null and b/src/3d_printed_parts/Еще одна деталь для резинки.STL differ diff --git a/src/3d_printed_parts/Катушка_для_резинок.SLDPRT b/src/3d_printed_parts/Катушка_для_резинок.SLDPRT new file mode 100644 index 0000000..a5cd0e3 Binary files /dev/null and b/src/3d_printed_parts/Катушка_для_резинок.SLDPRT differ diff --git a/src/3d_printed_parts/Катушка_для_резинок.STL b/src/3d_printed_parts/Катушка_для_резинок.STL new file mode 100644 index 0000000..611ac00 Binary files /dev/null and b/src/3d_printed_parts/Катушка_для_резинок.STL differ diff --git a/src/3d_printed_parts/Крепеж кнопки останова.SLDPRT b/src/3d_printed_parts/Крепеж кнопки останова.SLDPRT new file mode 100644 index 0000000..aa7964a Binary files /dev/null and b/src/3d_printed_parts/Крепеж кнопки останова.SLDPRT differ diff --git a/src/3d_printed_parts/Рычаг.SLDPRT b/src/3d_printed_parts/Рычаг.SLDPRT new file mode 100644 index 0000000..787171f Binary files /dev/null and b/src/3d_printed_parts/Рычаг.SLDPRT differ diff --git a/src/3d_printed_parts/Рычаг.STL b/src/3d_printed_parts/Рычаг.STL new file mode 100644 index 0000000..dd14cfc Binary files /dev/null and b/src/3d_printed_parts/Рычаг.STL differ diff --git a/src/3d_printed_parts/Часть для резинки.SLDPRT b/src/3d_printed_parts/Часть для резинки.SLDPRT new file mode 100644 index 0000000..c554914 Binary files /dev/null and b/src/3d_printed_parts/Часть для резинки.SLDPRT differ diff --git a/src/3d_printed_parts/Часть для резинки.STL b/src/3d_printed_parts/Часть для резинки.STL new file mode 100644 index 0000000..4c471fa Binary files /dev/null and b/src/3d_printed_parts/Часть для резинки.STL differ diff --git a/src/Calc.SLDPRT b/src/Calc.SLDPRT new file mode 100644 index 0000000..40bed2f Binary files /dev/null and b/src/Calc.SLDPRT differ diff --git a/src/Electronic_and_linear_parts/Emergency button 16mm.SLDPRT b/src/Electronic_and_linear_parts/Emergency button 16mm.SLDPRT new file mode 100644 index 0000000..7f26831 Binary files /dev/null and b/src/Electronic_and_linear_parts/Emergency button 16mm.SLDPRT differ diff --git a/src/Electronic_and_linear_parts/Opto_endstop_PCB.SLDPRT b/src/Electronic_and_linear_parts/Opto_endstop_PCB.SLDPRT new file mode 100644 index 0000000..f528da8 Binary files /dev/null and b/src/Electronic_and_linear_parts/Opto_endstop_PCB.SLDPRT differ diff --git a/src/Electronic_and_linear_parts/Opto_endstop_assemble.SLDASM b/src/Electronic_and_linear_parts/Opto_endstop_assemble.SLDASM new file mode 100644 index 0000000..09a9078 Binary files /dev/null and b/src/Electronic_and_linear_parts/Opto_endstop_assemble.SLDASM differ diff --git a/src/Electronic_and_linear_parts/Opto_endstop_main.SLDPRT b/src/Electronic_and_linear_parts/Opto_endstop_main.SLDPRT new file mode 100644 index 0000000..c62d0b6 Binary files /dev/null and b/src/Electronic_and_linear_parts/Opto_endstop_main.SLDPRT differ diff --git a/src/Electronic_and_linear_parts/ReprapDiscountFullGraphicSmartController-Robotale_Dummy.sldprt b/src/Electronic_and_linear_parts/ReprapDiscountFullGraphicSmartController-Robotale_Dummy.sldprt new file mode 100644 index 0000000..327ee60 Binary files /dev/null and b/src/Electronic_and_linear_parts/ReprapDiscountFullGraphicSmartController-Robotale_Dummy.sldprt differ diff --git a/src/Electronic_and_linear_parts/mgn9c rail.SLDPRT b/src/Electronic_and_linear_parts/mgn9c rail.SLDPRT index e576340..e4dd963 100644 Binary files a/src/Electronic_and_linear_parts/mgn9c rail.SLDPRT and b/src/Electronic_and_linear_parts/mgn9c rail.SLDPRT differ diff --git a/src/Electronic_and_linear_parts/rail_spacer.SLDPRT b/src/Electronic_and_linear_parts/rail_spacer.SLDPRT new file mode 100644 index 0000000..4ab46cb Binary files /dev/null and b/src/Electronic_and_linear_parts/rail_spacer.SLDPRT differ diff --git a/src/Electronic_and_linear_parts/rail_spacer.STL b/src/Electronic_and_linear_parts/rail_spacer.STL new file mode 100644 index 0000000..1876b89 Binary files /dev/null and b/src/Electronic_and_linear_parts/rail_spacer.STL differ diff --git a/src/Other/Nut DIN 6923 (EN 1661).SLDPRT b/src/Other/Nut DIN 6923 (EN 1661).SLDPRT new file mode 100644 index 0000000..5a64e1b Binary files /dev/null and b/src/Other/Nut DIN 6923 (EN 1661).SLDPRT differ diff --git a/src/Other/needle.SLDPRT b/src/Other/needle.SLDPRT index 05d2517..45c3a72 100644 Binary files a/src/Other/needle.SLDPRT and b/src/Other/needle.SLDPRT differ diff --git a/src/Other/pump needle.SLDPRT b/src/Other/pump needle.SLDPRT new file mode 100644 index 0000000..b4cc190 Binary files /dev/null and b/src/Other/pump needle.SLDPRT differ diff --git a/src/Other/threaded_stud_M3_150mm.SLDPRT b/src/Other/threaded_stud_M3_150mm.SLDPRT new file mode 100644 index 0000000..b1163ba Binary files /dev/null and b/src/Other/threaded_stud_M3_150mm.SLDPRT differ diff --git a/src/Other/threaded_stud_M8х140mm.SLDPRT b/src/Other/threaded_stud_M8х140mm.SLDPRT new file mode 100644 index 0000000..4a7526f Binary files /dev/null and b/src/Other/threaded_stud_M8х140mm.SLDPRT differ diff --git a/src/Other/wire_spool_2.SLDPRT b/src/Other/wire_spool_2.SLDPRT new file mode 100644 index 0000000..cc9655c Binary files /dev/null and b/src/Other/wire_spool_2.SLDPRT differ diff --git a/src/Secondary_asms/Display_asm_main_001.SLDASM b/src/Secondary_asms/Display_asm_main_001.SLDASM index dfec3cc..3d8caeb 100644 Binary files a/src/Secondary_asms/Display_asm_main_001.SLDASM and b/src/Secondary_asms/Display_asm_main_001.SLDASM differ diff --git a/src/Secondary_asms/_asm_chelnok.SLDASM b/src/Secondary_asms/_asm_chelnok.SLDASM index 6c519aa..7b4a209 100644 Binary files a/src/Secondary_asms/_asm_chelnok.SLDASM and b/src/Secondary_asms/_asm_chelnok.SLDASM differ diff --git a/src/Secondary_asms/_asm_support.SLDASM b/src/Secondary_asms/_asm_support.SLDASM index ed3a70f..012e435 100644 Binary files a/src/Secondary_asms/_asm_support.SLDASM and b/src/Secondary_asms/_asm_support.SLDASM differ diff --git a/src/Secondary_asms/asm_holder.SLDASM b/src/Secondary_asms/asm_holder.SLDASM index fce16a4..33e03e3 100644 Binary files a/src/Secondary_asms/asm_holder.SLDASM and b/src/Secondary_asms/asm_holder.SLDASM differ diff --git a/src/Secondary_asms/asm_small_stator.SLDASM b/src/Secondary_asms/asm_small_stator.SLDASM index 67d9fec..bc1313a 100644 Binary files a/src/Secondary_asms/asm_small_stator.SLDASM and b/src/Secondary_asms/asm_small_stator.SLDASM differ diff --git a/src/Secondary_asms/tension_mechanism_asm.SLDASM b/src/Secondary_asms/tension_mechanism_asm.SLDASM new file mode 100644 index 0000000..693055a Binary files /dev/null and b/src/Secondary_asms/tension_mechanism_asm.SLDASM differ diff --git a/src/Secondary_asms/Статор и подшипник.SLDASM b/src/Secondary_asms/Статор и подшипник.SLDASM index d0b390b..b70aa80 100644 Binary files a/src/Secondary_asms/Статор и подшипник.SLDASM and b/src/Secondary_asms/Статор и подшипник.SLDASM differ diff --git a/src/Test_003.SLDPRT b/src/Test_003.SLDPRT new file mode 100644 index 0000000..956c5d3 Binary files /dev/null and b/src/Test_003.SLDPRT differ diff --git a/src/Tmp/Rotor_for_calculations.SLDPRT b/src/Tmp/Rotor_for_calculations.SLDPRT new file mode 100644 index 0000000..4b301be Binary files /dev/null and b/src/Tmp/Rotor_for_calculations.SLDPRT differ diff --git a/src/Tmp/Wire_path.SLDPRT b/src/Tmp/Wire_path.SLDPRT index f879355..2225668 100644 Binary files a/src/Tmp/Wire_path.SLDPRT and b/src/Tmp/Wire_path.SLDPRT differ diff --git a/src/Tmp/Wire_path_2.SLDPRT b/src/Tmp/Wire_path_2.SLDPRT new file mode 100644 index 0000000..3acfa27 Binary files /dev/null and b/src/Tmp/Wire_path_2.SLDPRT differ diff --git a/src/_main_asm.SLDASM b/src/_main_asm.SLDASM index 048f67a..3c066ab 100644 Binary files a/src/_main_asm.SLDASM and b/src/_main_asm.SLDASM differ diff --git a/src/_main_asm_with_new_tension_mechanism.SLDASM b/src/_main_asm_with_new_tension_mechanism.SLDASM new file mode 100644 index 0000000..6bf2bea Binary files /dev/null and b/src/_main_asm_with_new_tension_mechanism.SLDASM differ diff --git a/src/coils_calculator.SLDPRT b/src/coils_calculator.SLDPRT new file mode 100644 index 0000000..efb1736 Binary files /dev/null and b/src/coils_calculator.SLDPRT differ