Compare commits
150 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b0c433e803 | |||
| 695b3fe303 | |||
| 0f7ef6b586 | |||
| cff395236c | |||
| 904ddf8551 | |||
| 26f96dc7a6 | |||
| 32dcd7f118 | |||
| 1d06fe8e26 | |||
| db5ff20b72 | |||
| 0b473eecbc | |||
| 4b9bb85b12 | |||
| cc31537ae3 | |||
| 0e2837e3e7 | |||
| e053827831 | |||
| 22f370a3fa | |||
| c2572de9f4 | |||
| c63577fd1d | |||
| 33ed748004 | |||
| dee4ef09f8 | |||
| f3f7b1e7e3 | |||
| f0c8c91820 | |||
| e977232735 | |||
| f359f8818a | |||
| c1ced60db0 | |||
| 8b74df0095 | |||
| 3c492793e0 | |||
| 59f30d384c | |||
| 13eab74fb8 | |||
| 593567b440 | |||
| 49911c8f5d | |||
| 41115e0590 | |||
| 31f1a0207f | |||
| 6a8ebddaf6 | |||
| 030559bf7f | |||
| 42cd314d96 | |||
| 894e378702 | |||
| 579833e2a3 | |||
| 20d4b995f7 | |||
| 6084502f80 | |||
| 18601f458f | |||
| 80f0d4ed7c | |||
| 866e7d3128 | |||
| 1068963092 | |||
| 445181fc42 | |||
| db904f1895 | |||
| 03eb9b0582 | |||
| b1f45b384b | |||
| 7552fc8f8d | |||
| acfde4e7e5 | |||
| c5d5c375fd | |||
| f9f6662a8c | |||
| d3527f5de4 | |||
| 44faf5cbab | |||
| 9e42480855 | |||
| e46a50236f | |||
| 5a8883b44f | |||
| 464bb1f149 | |||
| bc450b4582 | |||
| df44424388 | |||
| babd3b0037 | |||
| 122d4a89f6 | |||
| 03a4378670 | |||
| e002f4fd38 | |||
| 0f745468a1 | |||
| 4f212e50b6 | |||
| d67e701b75 | |||
| c950f0f5d1 | |||
| 786c666151 | |||
| 9db5bd000b | |||
| 96bc084f3d | |||
| c68a4c085d | |||
| aa9df38b05 | |||
| 38e6330236 | |||
| 90066e7160 | |||
| d925305b9e | |||
| 196f403dd6 | |||
| fc20533583 | |||
| aacb81ea60 | |||
| 2b86daa30b | |||
| aa8afe90b0 | |||
| 028b11f2ca | |||
| fb480dffe4 | |||
| 4c136c3dad | |||
| c421a2f5dd | |||
| 0ddce13ebe | |||
| db01960a0e | |||
| 58d6b5db0a | |||
| ef3f484d3c | |||
| 8a9de407a1 | |||
| 3cd9599155 | |||
| 339773dcb5 | |||
| a6b677f0ac | |||
| f595878b5b | |||
| 7e79fc5b8e | |||
| 23e2cb0c53 | |||
| 88de52210f | |||
| 842489a5dc | |||
| 88dea487c2 | |||
| 7659f522d6 | |||
| 2bc711ce58 | |||
| 9cbb6b1512 | |||
| 444259da07 | |||
| 218ca05304 | |||
| 08d9cbb930 | |||
| e353c84292 | |||
| 6f4e7d6bb2 | |||
| 7a7485ce71 | |||
| 5e5d22b77a | |||
| c4ac453e37 | |||
| bba892e327 | |||
| 2caaff6b4d | |||
| 25172b3acf | |||
| e9cf02c4d3 | |||
| 0c2ce78246 | |||
| 7c6c7f872f | |||
| c045666820 | |||
| 941458759c | |||
| 9cb2bfcae5 | |||
| 433011fd52 | |||
| 717b52ff28 | |||
| c9fed9303b | |||
| 4d2fd182ee | |||
| 1b65fc5e32 | |||
| 384fec1c25 | |||
| 70f7866b73 | |||
| 74d45c5dd8 | |||
| 815f4854da | |||
| 858448c65a | |||
| cfad2a9406 | |||
| aaaf16593b | |||
| 1f371391b0 | |||
| bebd793a2f | |||
| 465fedff7c | |||
| 34cda524c4 | |||
| f72ac5e09d | |||
| cf2951a6a1 | |||
| 0caccc4991 | |||
| 4fd8d60a8a | |||
| 3165043527 | |||
| cd3bf4c766 | |||
| 30162df320 | |||
| dbcc84ceb6 | |||
| 558df3bb3b | |||
| 5e40f2d84b | |||
| 7573fb4940 | |||
| f9cc460237 | |||
| d86b5bec4f | |||
| 0451bc099d | |||
| 701b238c48 | |||
| f2c62933be |
@@ -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 <your-package-list-here>
|
||||
|
||||
# [Optional] Uncomment this line to install global node packages.
|
||||
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 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}
|
||||
@@ -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"
|
||||
}
|
||||
+3
-3
@@ -21,7 +21,8 @@
|
||||
|
||||
# Generated files
|
||||
_Version.h
|
||||
bdf2u8g
|
||||
bdf2u8g.exe
|
||||
genpages.exe
|
||||
marlin_config.json
|
||||
mczip.h
|
||||
*.gen
|
||||
@@ -111,7 +112,7 @@ tags
|
||||
*.app
|
||||
*.i*86
|
||||
*.x86_64
|
||||
|
||||
*.hex
|
||||
|
||||
# Debug files
|
||||
*.dSYM/
|
||||
@@ -170,4 +171,3 @@ __pycache__
|
||||
|
||||
# IOLogger logs
|
||||
*_log.csv
|
||||
.vscode/extensions.json
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+507
-281
File diff suppressed because it is too large
Load Diff
+223
-206
@@ -300,12 +300,12 @@
|
||||
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
|
||||
#define THERMAL_PROTECTION_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_PERIOD 30 // Seconds
|
||||
#define THERMAL_PROTECTION_HYSTERESIS 15 // Degrees Celsius
|
||||
|
||||
#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
|
||||
#if ENABLED(ADAPTIVE_FAN_SLOWING) && EITHER(MPCTEMP, PIDTEMP)
|
||||
#define TEMP_TUNING_MAINTAIN_FAN // Don't slow fan speed during M303 or M306 T
|
||||
#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
|
||||
#if ENABLED(ADAPTIVE_FAN_SLOWING) && EITHER(MPCTEMP, PIDTEMP)
|
||||
#define TEMP_TUNING_MAINTAIN_FAN // Don't slow fan speed during M303 or M306 T
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -320,7 +320,7 @@
|
||||
* and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
|
||||
* below 2.
|
||||
*/
|
||||
#define WATCH_TEMP_PERIOD 30 // Seconds
|
||||
#define WATCH_TEMP_PERIOD 210 // Seconds
|
||||
#define WATCH_TEMP_INCREASE 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
@@ -328,37 +328,28 @@
|
||||
* Thermal Protection parameters for the bed are just as above for hotends.
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_BED)
|
||||
#if ENABLED(MachineTLD6)
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 60 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
#else
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 40 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 4 // Degrees Celsius
|
||||
#endif
|
||||
#define THERMAL_PROTECTION_BED_PERIOD 300 // Seconds
|
||||
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* As described above, except for the bed (M140/M190/M303).
|
||||
*/
|
||||
#if ENABLED(MachineTLD6)
|
||||
#define WATCH_BED_TEMP_PERIOD 240 // Seconds
|
||||
#else
|
||||
#define WATCH_BED_TEMP_PERIOD 60 // Seconds
|
||||
#endif
|
||||
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
|
||||
#define WATCH_BED_TEMP_PERIOD 60 // Seconds
|
||||
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Thermal Protection parameters for the heated chamber.
|
||||
*/
|
||||
#if ENABLED(THERMAL_PROTECTION_CHAMBER)
|
||||
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds
|
||||
#define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
|
||||
|
||||
/**
|
||||
* Heated chamber watch settings (M141/M191).
|
||||
*/
|
||||
#define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds
|
||||
#define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius
|
||||
#define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds
|
||||
#define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -526,8 +517,8 @@
|
||||
*/
|
||||
#define HOTEND_IDLE_TIMEOUT
|
||||
#if ENABLED(HOTEND_IDLE_TIMEOUT)
|
||||
#define HOTEND_IDLE_TIMEOUT_SEC (20*60) // (seconds) Time without extruder movement to trigger protection
|
||||
#define HOTEND_IDLE_MIN_TRIGGER 140 // (°C) Minimum temperature to enable hotend protection
|
||||
#define HOTEND_IDLE_TIMEOUT_SEC (60*60) // (seconds) Time without extruder movement to trigger protection
|
||||
#define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection
|
||||
#define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout
|
||||
#define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout
|
||||
#endif
|
||||
@@ -548,11 +539,9 @@
|
||||
* The fan turns on automatically whenever any driver is enabled and turns
|
||||
* off (or reduces to idle speed) shortly after drivers are turned off.
|
||||
*/
|
||||
#if ENABLED(BTTSKRPRO)
|
||||
#define USE_CONTROLLER_FAN
|
||||
#endif
|
||||
//#define USE_CONTROLLER_FAN
|
||||
#if ENABLED(USE_CONTROLLER_FAN)
|
||||
#define CONTROLLER_FAN_PIN FAN3_PIN // Set a custom pin for the controller fan
|
||||
//#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
|
||||
//#define CONTROLLER_FAN2_PIN -1 // Set a custom pin for second controller fan
|
||||
//#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered
|
||||
//#define CONTROLLER_FAN_IGNORE_Z // Ignore Z stepper. Useful when stepper timeout is disabled.
|
||||
@@ -564,7 +553,7 @@
|
||||
// Use TEMP_SENSOR_BOARD as a trigger for enabling the controller fan
|
||||
//#define CONTROLLER_FAN_MIN_BOARD_TEMP 40 // (°C) Turn on the fan if the board reaches this temperature
|
||||
|
||||
#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
|
||||
//#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
#define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
|
||||
#endif
|
||||
@@ -654,13 +643,14 @@
|
||||
* Multiple extruders can be assigned to the same pin in which case
|
||||
* the fan will turn on when any selected extruder is above the threshold.
|
||||
*/
|
||||
#if ENABLED(OCTOPUS)
|
||||
#define E0_AUTO_FAN_PIN PA8
|
||||
#define E1_AUTO_FAN_PIN PE5
|
||||
#if ENABLED(Trex3Board) && DISABLED(RaptorFanPins)
|
||||
#define E0_AUTO_FAN_PIN 6
|
||||
#elif ENABLED(RAPTOR2) && DISABLED(SKRBoard)
|
||||
#define E0_AUTO_FAN_PIN 9
|
||||
#else
|
||||
#define E0_AUTO_FAN_PIN FAN2_PIN
|
||||
#define E1_AUTO_FAN_PIN FAN2_PIN
|
||||
#define E0_AUTO_FAN_PIN -1
|
||||
#endif
|
||||
#define E1_AUTO_FAN_PIN -1
|
||||
#define E2_AUTO_FAN_PIN -1
|
||||
#define E3_AUTO_FAN_PIN -1
|
||||
#define E4_AUTO_FAN_PIN -1
|
||||
@@ -718,28 +708,24 @@
|
||||
* The multiplexer is automatically switched at tool-change.
|
||||
* Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
|
||||
*/
|
||||
#if ENABLED(OCTOPUS)
|
||||
#define FANMUX0_PIN PD12
|
||||
#define FANMUX1_PIN PD13
|
||||
#define FANMUX2_PIN -1
|
||||
#else
|
||||
#define FANMUX0_PIN -1
|
||||
#define FANMUX1_PIN -1
|
||||
#define FANMUX2_PIN -1
|
||||
#endif
|
||||
#define FANMUX0_PIN -1
|
||||
#define FANMUX1_PIN -1
|
||||
#define FANMUX2_PIN -1
|
||||
|
||||
/**
|
||||
* M355 Case Light on-off / brightness
|
||||
*/
|
||||
//#define CASE_LIGHT_ENABLE
|
||||
#if DISABLED(SKRBoard)
|
||||
#define CASE_LIGHT_ENABLE
|
||||
#endif
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
//#define CASE_LIGHT_PIN 4 // Override the default pin if needed
|
||||
#define CASE_LIGHT_PIN 5 // Override the default pin if needed
|
||||
#define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
|
||||
#define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
|
||||
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
|
||||
//#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting.
|
||||
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 205 // Set default power-up brightness (0-255, requires PWM pin)
|
||||
#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting.
|
||||
//#define CASE_LIGHT_MAX_PWM 128 // Limit PWM duty cycle (0-255)
|
||||
//#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
|
||||
#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
//#define CASE_LIGHT_USE_NEOPIXEL // Use NeoPixel LED as case light
|
||||
#endif
|
||||
@@ -796,32 +782,13 @@
|
||||
* Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and
|
||||
* follow with M605 S3 to initiate mirrored movement.
|
||||
*/
|
||||
#define DUAL_X_CARRIAGE
|
||||
//#define DUAL_X_CARRIAGE
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
#define X1_MIN_POS -50 // Set to X_MIN_POS
|
||||
#define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS
|
||||
#define X1_MAX_POS X_BED_SIZE // A max coordinate so the X1 carriage can't hit the parked X2 carriage
|
||||
#define X2_MIN_POS 15 // A min coordinate so the X2 carriage can't hit the parked X1 carriage
|
||||
#if ANY(TitanExtruder, H2Extruder)
|
||||
#define X2_OFFSET 12
|
||||
#elif ANY(BMGExtruderV2, BMGExtruderV3)
|
||||
#define X2_OFFSET 0
|
||||
#else
|
||||
#define X2_OFFSET -3
|
||||
#endif
|
||||
#if ENABLED(MachineTLD3P)
|
||||
#define X2_MAX_POS 359 + X2_OFFSET - VULCAN_OFFSET // The max position of the X2 carriage, typically also the home position
|
||||
#elif ENABLED(MachineTLD4)
|
||||
#define X2_MAX_POS 454 + X2_OFFSET - VULCAN_OFFSET
|
||||
#elif ENABLED(MachineTLD5)
|
||||
#define X2_MAX_POS 554 + X2_OFFSET - VULCAN_OFFSET
|
||||
#elif ENABLED(MachineTLD6)
|
||||
#define X2_MAX_POS 654 + X2_OFFSET - VULCAN_OFFSET
|
||||
#elif ENABLED(MachineTLD2P)
|
||||
#define X2_MAX_POS 264 + X2_OFFSET - VULCAN_OFFSET
|
||||
#elif ENABLED(MachineTLH2P)
|
||||
#define X2_MAX_POS 279 + X2_OFFSET - VULCAN_OFFSET
|
||||
#endif
|
||||
#define X2_HOME_DIR 1 // Set to 1. The X2 carriage always homes to the max endstop position
|
||||
#define X2_MIN_POS 80 // A min coordinate so the X2 carriage can't hit the parked X1 carriage
|
||||
#define X2_MAX_POS 353 // The max position of the X2 carriage, typically also the home position
|
||||
#define X2_HOME_DIR 1 // Set to 1. The X2 carriage always homes to the max endstop position
|
||||
#define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS.
|
||||
// NOTE: For Dual X Carriage use M218 T1 Xn to override the X2_HOME_POS.
|
||||
// This allows recalibration of endstops distance without a rebuild.
|
||||
@@ -831,7 +798,7 @@
|
||||
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
|
||||
|
||||
// Default x offset in duplication mode (typically set to half print bed width)
|
||||
#define DEFAULT_DUPLICATION_X_OFFSET X_CENTER
|
||||
#define DEFAULT_DUPLICATION_X_OFFSET 100
|
||||
|
||||
// Default action to execute following M605 mode change commands. Typically G28X to apply new mode.
|
||||
//#define EVENT_GCODE_IDEX_AFTER_MODECHANGE "G28X"
|
||||
@@ -861,7 +828,7 @@
|
||||
//#define INVERT_X2_VS_X_DIR // X2 direction signal is the opposite of X
|
||||
//#define X_DUAL_ENDSTOPS // X2 has its own endstop
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
//#define X2_USE_ENDSTOP _XMAX_ // X2 endstop board plug. Don't forget to enable USE_*_PLUG.
|
||||
#define X2_USE_ENDSTOP _XMAX_ // X2 endstop board plug. Don't forget to enable USE_*_PLUG.
|
||||
#define X2_ENDSTOP_ADJUSTMENT 0 // X2 offset relative to X endstop
|
||||
#endif
|
||||
#endif
|
||||
@@ -881,11 +848,9 @@
|
||||
#ifdef Z2_DRIVER_TYPE
|
||||
//#define INVERT_Z2_VS_Z_DIR // Z2 direction signal is the opposite of Z
|
||||
|
||||
#if DISABLED(BLTOUCH)
|
||||
#define Z_MULTI_ENDSTOPS // Other Z axes have their own endstops
|
||||
#endif
|
||||
//#define Z_MULTI_ENDSTOPS // Other Z axes have their own endstops
|
||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||
#define Z2_USE_ENDSTOP _ZMAX_ // Z2 endstop board plug. Don't forget to enable USE_*_PLUG.
|
||||
#define Z2_USE_ENDSTOP _XMAX_ // Z2 endstop board plug. Don't forget to enable USE_*_PLUG.
|
||||
#define Z2_ENDSTOP_ADJUSTMENT 0 // Z2 offset relative to Z endstop
|
||||
#endif
|
||||
#ifdef Z3_DRIVER_TYPE
|
||||
@@ -927,7 +892,7 @@
|
||||
#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_BACKOFF_POST_MM { 8, 8, 2 } // (linear=mm, rotational=°) Backoff from endstops after homing
|
||||
//#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
|
||||
@@ -1012,7 +977,7 @@
|
||||
* Z Steppers Auto-Alignment
|
||||
* Add the G34 command to align multiple Z steppers using a bed probe.
|
||||
*/
|
||||
#if ENABLED(BL_Touch)
|
||||
#if ANY(SKRBoard, Trex3Board) && ENABLED(DualZ)
|
||||
#define Z_STEPPER_AUTO_ALIGN
|
||||
#endif
|
||||
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
||||
@@ -1060,13 +1025,13 @@
|
||||
#ifndef Z_STEPPER_ALIGN_STEPPER_XY
|
||||
// Amplification factor. Used to scale the correction step up or down in case
|
||||
// the stepper (spindle) position is farther out than the test point.
|
||||
#define Z_STEPPER_ALIGN_AMP 0.5 // Use a value > 1.0 NOTE: This may cause instability!
|
||||
#define Z_STEPPER_ALIGN_AMP 1.0 // Use a value > 1.0 NOTE: This may cause instability!
|
||||
#endif
|
||||
|
||||
// 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 9 // Number of iterations to apply during alignment
|
||||
#define Z_STEPPER_ALIGN_ACC 0.01 // Stop iterating early if the accuracy is better than this
|
||||
#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?
|
||||
// Re-homing might be more precise in reproducing the actual 'G28 Z' homing height, especially on an uneven bed.
|
||||
@@ -1079,7 +1044,7 @@
|
||||
//#define ASSISTED_TRAMMING
|
||||
#if ENABLED(ASSISTED_TRAMMING)
|
||||
|
||||
// Define positions for probe points.
|
||||
// Define from 3 to 9 points to probe.
|
||||
#define TRAMMING_POINT_XY { { 20, 20 }, { 180, 20 }, { 180, 180 }, { 20, 180 } }
|
||||
|
||||
// Define position names for probe points.
|
||||
@@ -1128,10 +1093,8 @@
|
||||
* X<1> Set the given parameters only for the X axis.
|
||||
* Y<1> Set the given parameters only for the Y axis.
|
||||
*/
|
||||
#if ENABLED(MachineLargeROM)
|
||||
#define INPUT_SHAPING_X
|
||||
#define INPUT_SHAPING_Y
|
||||
#endif
|
||||
//#define INPUT_SHAPING_X
|
||||
//#define INPUT_SHAPING_Y
|
||||
#if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y)
|
||||
#if ENABLED(INPUT_SHAPING_X)
|
||||
#define SHAPING_FREQ_X 40 // (Hz) The default dominant resonant frequency on the X axis.
|
||||
@@ -1151,38 +1114,37 @@
|
||||
// Add a Duplicate option for well-separated conjoined nozzles
|
||||
//#define MULTI_NOZZLE_DUPLICATION
|
||||
|
||||
// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
|
||||
#define INVERT_X_STEP_PIN false
|
||||
#define INVERT_Y_STEP_PIN false
|
||||
#define INVERT_Z_STEP_PIN false
|
||||
#define INVERT_I_STEP_PIN false
|
||||
#define INVERT_J_STEP_PIN false
|
||||
#define INVERT_K_STEP_PIN false
|
||||
#define INVERT_U_STEP_PIN false
|
||||
#define INVERT_V_STEP_PIN false
|
||||
#define INVERT_W_STEP_PIN false
|
||||
#define INVERT_E_STEP_PIN false
|
||||
// By default stepper drivers require an active-HIGH signal but some high-power drivers require an active-LOW signal to step.
|
||||
#define STEP_STATE_X HIGH
|
||||
#define STEP_STATE_Y HIGH
|
||||
#define STEP_STATE_Z HIGH
|
||||
#define STEP_STATE_I HIGH
|
||||
#define STEP_STATE_J HIGH
|
||||
#define STEP_STATE_K HIGH
|
||||
#define STEP_STATE_U HIGH
|
||||
#define STEP_STATE_V HIGH
|
||||
#define STEP_STATE_W HIGH
|
||||
#define STEP_STATE_E HIGH
|
||||
|
||||
/**
|
||||
* Idle Stepper Shutdown
|
||||
* Set DISABLE_INACTIVE_? 'true' to shut down axis steppers after an idle period.
|
||||
* Enable DISABLE_INACTIVE_* to shut down axis steppers after an idle period.
|
||||
* The Deactive Time can be overridden with M18 and M84. Set to 0 for No Timeout.
|
||||
*/
|
||||
#define DEFAULT_STEPPER_DEACTIVE_TIME 120
|
||||
#define DISABLE_INACTIVE_X true
|
||||
#define DISABLE_INACTIVE_Y true
|
||||
#define DISABLE_INACTIVE_Z true // Set 'false' if the nozzle could fall onto your printed part!
|
||||
#define DISABLE_INACTIVE_I true
|
||||
#define DISABLE_INACTIVE_J true
|
||||
#define DISABLE_INACTIVE_K true
|
||||
#define DISABLE_INACTIVE_U true
|
||||
#define DISABLE_INACTIVE_V true
|
||||
#define DISABLE_INACTIVE_W true
|
||||
#define DISABLE_INACTIVE_E true
|
||||
#define DISABLE_INACTIVE_X
|
||||
#define DISABLE_INACTIVE_Y
|
||||
#define DISABLE_INACTIVE_Z // Disable if the nozzle could fall onto your printed part!
|
||||
//#define DISABLE_INACTIVE_I
|
||||
//#define DISABLE_INACTIVE_J
|
||||
//#define DISABLE_INACTIVE_K
|
||||
//#define DISABLE_INACTIVE_U
|
||||
//#define DISABLE_INACTIVE_V
|
||||
//#define DISABLE_INACTIVE_W
|
||||
|
||||
// Default Minimum Feedrates for printing and travel moves
|
||||
#define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s. °/s for rotational-only moves) Minimum feedrate. Set with M205 S.
|
||||
#define DEFAULT_MINTRAVELFEEDRATE 10.0 // (mm/s. °/s for rotational-only moves) Minimum travel feedrate. Set with M205 T.
|
||||
#define DEFAULT_MINTRAVELFEEDRATE 0.0 // (mm/s. °/s for rotational-only moves) 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.
|
||||
@@ -1214,12 +1176,13 @@
|
||||
// Backlash Compensation
|
||||
// Adds extra movement to axes on direction-changes to account for backlash.
|
||||
//
|
||||
//#define BACKLASH_COMPENSATION
|
||||
|
||||
#define BACKLASH_COMPENSATION
|
||||
#if ENABLED(BACKLASH_COMPENSATION)
|
||||
// Define values for backlash distance and correction.
|
||||
// If BACKLASH_GCODE is enabled these values are the defaults.
|
||||
#define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (linear=mm, rotational=°) One value for each linear axis
|
||||
#define BACKLASH_CORRECTION 0.3 // 0.0 = no correction; 1.0 = full correction
|
||||
#define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction
|
||||
|
||||
// Add steps for motor direction changes on CORE kinematics
|
||||
//#define CORE_BACKLASH
|
||||
@@ -1233,7 +1196,7 @@
|
||||
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
// Measure the Z backlash when probing (G29) and set with "M425 Z"
|
||||
//#define MEASURE_BACKLASH_WHEN_PROBING
|
||||
#define MEASURE_BACKLASH_WHEN_PROBING
|
||||
|
||||
#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
|
||||
// When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
|
||||
@@ -1321,7 +1284,9 @@
|
||||
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
|
||||
* lowest stepping frequencies.
|
||||
*/
|
||||
//#define ADAPTIVE_STEP_SMOOTHING
|
||||
#if ENABLED(SKRBoard)
|
||||
#define ADAPTIVE_STEP_SMOOTHING
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Custom Microstepping
|
||||
@@ -1481,7 +1446,7 @@
|
||||
#define SOUND_ON_DEFAULT // Buzzer/speaker default enabled state
|
||||
|
||||
// The timeout to return to the status screen from sub-menus
|
||||
//#define LCD_TIMEOUT_TO_STATUS 15000 // (ms)
|
||||
#define LCD_TIMEOUT_TO_STATUS 15000 // (ms)
|
||||
|
||||
#if ENABLED(SHOW_BOOTSCREEN)
|
||||
#define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s)
|
||||
@@ -1491,7 +1456,7 @@
|
||||
#endif
|
||||
|
||||
// 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)
|
||||
@@ -1502,6 +1467,9 @@
|
||||
// Show the E position (filament used) during printing
|
||||
//#define LCD_SHOW_E_TOTAL
|
||||
|
||||
// Display a negative temperature instead of "err"
|
||||
//#define SHOW_TEMPERATURE_BELOW_ZERO
|
||||
|
||||
/**
|
||||
* LED Control Menu
|
||||
* Add LED Control to the LCD menu
|
||||
@@ -1516,7 +1484,7 @@
|
||||
#define LED_USER_PRESET_BLUE 0 // User defined BLUE value
|
||||
#define LED_USER_PRESET_WHITE 255 // User defined WHITE value
|
||||
#define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
|
||||
#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||
//#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
|
||||
#endif
|
||||
#if ENABLED(NEO2_COLOR_PRESETS)
|
||||
#define NEO2_USER_PRESET_RED 255 // User defined RED value
|
||||
@@ -1546,7 +1514,7 @@
|
||||
#if HAS_DISPLAY && EITHER(SDSUPPORT, SET_PROGRESS_MANUALLY)
|
||||
#define SHOW_PROGRESS_PERCENT // Show print progress percentage (doesn't affect progress bar)
|
||||
#define SHOW_ELAPSED_TIME // Display elapsed printing time (prefix 'E')
|
||||
#define SHOW_REMAINING_TIME // Display estimated time to completion (prefix 'R')
|
||||
//#define SHOW_REMAINING_TIME // Display estimated time to completion (prefix 'R')
|
||||
#if ENABLED(SET_INTERACTION_TIME)
|
||||
#define SHOW_INTERACTION_TIME // Display time until next user interaction ('C' = filament change)
|
||||
#endif
|
||||
@@ -1603,7 +1571,7 @@
|
||||
|
||||
//#define MEDIA_MENU_AT_TOP // Force the media menu to be listed on the top of the main menu
|
||||
|
||||
#define EVENT_GCODE_SD_ABORT "G91\nG1Z5\nG90\nM84\nM104S0\nM140S0" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27")
|
||||
#define EVENT_GCODE_SD_ABORT "G28XY" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27")
|
||||
|
||||
#if ENABLED(PRINTER_EVENT_LEDS)
|
||||
#define PE_LEDS_COMPLETED_TIME (30*60) // (seconds) Time to keep the LED "done" color before restoring normal illumination
|
||||
@@ -1622,8 +1590,10 @@
|
||||
#define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
|
||||
//#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss
|
||||
//#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
|
||||
#define POWER_LOSS_PIN 32 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
|
||||
#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
|
||||
#if ENABLED(SKRBoard)
|
||||
#define POWER_LOSS_PIN -1 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
|
||||
#define POWER_LOSS_STATE LOW // State of pin indicating power loss
|
||||
#endif
|
||||
//#define POWER_LOSS_PULLUP // Set pullup / pulldown as appropriate for your sensor
|
||||
//#define POWER_LOSS_PULLDOWN
|
||||
//#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume
|
||||
@@ -1686,7 +1656,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!)
|
||||
|
||||
@@ -1831,7 +1801,7 @@
|
||||
|
||||
// A bigger font is available for edit items. Costs 3120 bytes of flash.
|
||||
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
|
||||
//#define USE_BIG_EDIT_FONT
|
||||
#define USE_BIG_EDIT_FONT
|
||||
|
||||
// A smaller font may be used on the Info Screen. Costs 2434 bytes of flash.
|
||||
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
|
||||
@@ -1889,12 +1859,14 @@
|
||||
//#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
|
||||
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
|
||||
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
|
||||
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of PROGMEM.
|
||||
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of flash.
|
||||
|
||||
// Frivolous Game Options
|
||||
//#define MARLIN_BRICKOUT
|
||||
//#define MARLIN_INVADERS
|
||||
//#define MARLIN_SNAKE
|
||||
#if ENABLED(SKRBoard)
|
||||
#define MARLIN_BRICKOUT
|
||||
#define MARLIN_INVADERS
|
||||
#define MARLIN_SNAKE
|
||||
#endif
|
||||
//#define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu
|
||||
|
||||
#endif // HAS_MARLINUI_U8GLIB
|
||||
@@ -1907,10 +1879,7 @@
|
||||
//
|
||||
// Additional options for DGUS / DWIN displays
|
||||
//
|
||||
#define DGUS_RX_BUFFER_SIZE 128
|
||||
#define DGUS_TX_BUFFER_SIZE 48
|
||||
#if HAS_DGUS_LCD
|
||||
#define LCD_SERIAL_PORT 3
|
||||
#define LCD_BAUDRATE 115200
|
||||
|
||||
#define DGUS_RX_BUFFER_SIZE 128
|
||||
@@ -2115,16 +2084,16 @@
|
||||
*/
|
||||
#define BABYSTEPPING
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
//#define INTEGRATED_BABYSTEPPING // EXPERIMENTAL integration of babystepping into the Stepper ISR
|
||||
#define INTEGRATED_BABYSTEPPING // EXPERIMENTAL integration of babystepping into the Stepper ISR
|
||||
//#define BABYSTEP_WITHOUT_HOMING
|
||||
#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement).
|
||||
//#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
|
||||
#define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
|
||||
//#define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps
|
||||
#define BABYSTEP_MULTIPLICATOR_Z 40 // (steps or mm) Steps or millimeter distance for each Z babystep
|
||||
#define BABYSTEP_MULTIPLICATOR_Z (Z_STEPSMM / 40) // (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.
|
||||
@@ -2134,14 +2103,12 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if DISABLED(BL_Touch)
|
||||
#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
|
||||
#else
|
||||
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
|
||||
#endif
|
||||
//#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
|
||||
|
||||
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
|
||||
//#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
|
||||
//#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
|
||||
|
||||
@@ -2162,6 +2129,7 @@
|
||||
*
|
||||
* See https://marlinfw.org/docs/features/lin_advance.html for full instructions.
|
||||
*/
|
||||
|
||||
#define LIN_ADVANCE
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
@@ -2394,8 +2362,8 @@
|
||||
*
|
||||
* Override the default value based on the driver type set in Configuration.h.
|
||||
*/
|
||||
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
|
||||
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
|
||||
#define MINIMUM_STEPPER_POST_DIR_DELAY 250
|
||||
#define MINIMUM_STEPPER_PRE_DIR_DELAY 250
|
||||
|
||||
/**
|
||||
* Minimum stepper driver pulse width (in µs)
|
||||
@@ -2408,9 +2376,8 @@
|
||||
*
|
||||
* Override the default value based on the driver type set in Configuration.h.
|
||||
*/
|
||||
#if ENABLED(MachineTLD6)
|
||||
#define MINIMUM_STEPPER_PULSE 5
|
||||
#endif
|
||||
//#define MINIMUM_STEPPER_PULSE 2
|
||||
|
||||
/**
|
||||
* Maximum stepping rate (in Hz) the stepper driver allows
|
||||
* If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
|
||||
@@ -2440,17 +2407,21 @@
|
||||
// The value of BLOCK_BUFFER_SIZE must be a power of 2 (e.g., 8, 16, 32)
|
||||
#if BOTH(SDSUPPORT, DIRECT_STEPPING)
|
||||
#define BLOCK_BUFFER_SIZE 8
|
||||
#elif ENABLED(SDSUPPORT)
|
||||
#define BLOCK_BUFFER_SIZE 16
|
||||
#elif ENABLED(SKRBoard)
|
||||
#define BLOCK_BUFFER_SIZE 32
|
||||
#else
|
||||
#define BLOCK_BUFFER_SIZE 16
|
||||
#define BLOCK_BUFFER_SIZE 8
|
||||
#endif
|
||||
|
||||
// @section serial
|
||||
|
||||
// The ASCII buffer for serial input
|
||||
#define MAX_CMD_SIZE 96
|
||||
#define BUFSIZE 4
|
||||
#if ENABLED(SKRBoard)
|
||||
#define BUFSIZE 16
|
||||
#else
|
||||
#define BUFSIZE 8
|
||||
#endif
|
||||
|
||||
// Transmission to Host Buffer Size
|
||||
// To save 386 bytes of flash (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
|
||||
@@ -2459,8 +2430,11 @@
|
||||
// For debug-echo: 128 bytes for the optimal speed.
|
||||
// Other output doesn't need to be that speedy.
|
||||
// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
|
||||
#define TX_BUFFER_SIZE 64
|
||||
|
||||
#if ENABLED(SKRBoard)
|
||||
#define TX_BUFFER_SIZE 32
|
||||
#else
|
||||
#define TX_BUFFER_SIZE 0
|
||||
#endif
|
||||
// Host Receive Buffer Size
|
||||
// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
|
||||
// To use flow control, set this buffer size to at least 1024 bytes.
|
||||
@@ -2569,7 +2543,9 @@
|
||||
*
|
||||
* Note that M207 / M208 / M209 settings are saved to EEPROM.
|
||||
*/
|
||||
//#define FWRETRACT
|
||||
#if DISABLED(UBL) || ENABLED(SKRBoard)
|
||||
#define FWRETRACT
|
||||
#endif
|
||||
#if ENABLED(FWRETRACT)
|
||||
#define FWRETRACT_AUTORETRACT // Override slicer retractions
|
||||
#if ENABLED(FWRETRACT_AUTORETRACT)
|
||||
@@ -2597,18 +2573,26 @@
|
||||
// Z raise distance for tool-change, as needed for some extruders
|
||||
#define TOOLCHANGE_ZRAISE 2 // (mm)
|
||||
//#define TOOLCHANGE_ZRAISE_BEFORE_RETRACT // Apply raise before swap retraction (if enabled)
|
||||
#define TOOLCHANGE_NO_RETURN // Never return to previous position on tool-change
|
||||
//#define TOOLCHANGE_NO_RETURN // Never return to previous position on tool-change
|
||||
#if ENABLED(TOOLCHANGE_NO_RETURN)
|
||||
#define EVENT_GCODE_AFTER_TOOLCHANGE "G12X" // Extra G-code to run after tool-change
|
||||
//#define EVENT_GCODE_AFTER_TOOLCHANGE "G12X" // Extra G-code to run after tool-change
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Extra G-code to run while executing tool-change commands. Can be used to use an additional
|
||||
* stepper motor (e.g., I axis in Configuration.h) to drive the tool-changer.
|
||||
*/
|
||||
//#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
|
||||
//#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10" // Extra G-code to run while executing tool-change command T1
|
||||
//#define EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN // Always execute above G-code sequences. Use with caution!
|
||||
//#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
|
||||
//#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10" // Extra G-code to run while executing tool-change command T1
|
||||
//#define EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN // Always execute above G-code sequences. Use with caution!
|
||||
|
||||
/**
|
||||
* Consider coordinates for EVENT_GCODE_TOOLCHANGE_Tx as relative to T0
|
||||
* so that moves in the specified axes are the same for all tools.
|
||||
*/
|
||||
//#define TC_GCODE_USE_GLOBAL_X // Use X position relative to Tool 0
|
||||
//#define TC_GCODE_USE_GLOBAL_Y // Use Y position relative to Tool 0
|
||||
//#define TC_GCODE_USE_GLOBAL_Z // Use Z position relative to Tool 0
|
||||
|
||||
/**
|
||||
* Tool Sensors detect when tools have been picked up or dropped.
|
||||
@@ -2620,12 +2604,12 @@
|
||||
* Retract and prime filament on tool-change to reduce
|
||||
* ooze and stringing and to get cleaner transitions.
|
||||
*/
|
||||
#define TOOLCHANGE_FILAMENT_SWAP
|
||||
//#define TOOLCHANGE_FILAMENT_SWAP
|
||||
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
||||
// Load / Unload
|
||||
#define TOOLCHANGE_FS_LENGTH 6 // (mm) Load / Unload length
|
||||
#define TOOLCHANGE_FS_EXTRA_RESUME_LENGTH 1 // (mm) Extra length for better restart. Adjust with LCD or M217 B.
|
||||
#define TOOLCHANGE_FS_RETRACT_SPEED (25*60) // (mm/min) (Unloading)
|
||||
#define TOOLCHANGE_FS_LENGTH 12 // (mm) Load / Unload length
|
||||
#define TOOLCHANGE_FS_EXTRA_RESUME_LENGTH 0 // (mm) Extra length for better restart. Adjust with LCD or M217 B.
|
||||
#define TOOLCHANGE_FS_RETRACT_SPEED (50*60) // (mm/min) (Unloading)
|
||||
#define TOOLCHANGE_FS_UNRETRACT_SPEED (25*60) // (mm/min) (On SINGLENOZZLE or Bowden loading must be slowed down)
|
||||
|
||||
// Longer prime to clean out a SINGLENOZZLE
|
||||
@@ -2704,9 +2688,9 @@
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
|
||||
// 0 to disable start loading and skip to fast load only
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 30 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 75 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 2 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
||||
@@ -2715,8 +2699,8 @@
|
||||
// Set to 0 for manual extrusion.
|
||||
// Filament can be extruded repeatedly from the Filament Change menu
|
||||
// until extrusion is consistent, and to purge old filament.
|
||||
#define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
|
||||
//#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
|
||||
#define ADVANCED_PAUSE_RESUME_PRIME 2 // (mm) Extra distance to prime nozzle after returning from park.
|
||||
#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
|
||||
|
||||
// Filament Unload does a Retract, Delay, and Purge first:
|
||||
#define FILAMENT_UNLOAD_PURGE_RETRACT 13 // (mm) Unload initial retract length.
|
||||
@@ -2731,7 +2715,7 @@
|
||||
//#define PAUSE_REHEAT_FAST_RESUME // Reduce number of waits by not prompting again post-timeout before continuing.
|
||||
|
||||
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
|
||||
#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change
|
||||
#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
|
||||
|
||||
#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
|
||||
#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
|
||||
@@ -3038,9 +3022,28 @@
|
||||
* Set *_SERIAL_TX_PIN and *_SERIAL_RX_PIN to match for all drivers
|
||||
* on the same serial port, either here or in your board's pins file.
|
||||
*/
|
||||
//#define X_SLAVE_ADDRESS 0
|
||||
//#define Y_SLAVE_ADDRESS 0
|
||||
//#define Z_SLAVE_ADDRESS 0
|
||||
#if ENABLED(SKRBoard)
|
||||
#define X_SLAVE_ADDRESS 0
|
||||
#define Y_SLAVE_ADDRESS 0
|
||||
#define Z_SLAVE_ADDRESS 0
|
||||
#define E0_SLAVE_ADDRESS 0
|
||||
#else
|
||||
#define X_SLAVE_ADDRESS 0
|
||||
#define Y_SLAVE_ADDRESS 2
|
||||
#define Z_SLAVE_ADDRESS 1
|
||||
#define E0_SLAVE_ADDRESS 3
|
||||
#define X_SERIAL_TX_PIN 58
|
||||
#define X_SERIAL_RX_PIN 12
|
||||
|
||||
#define Y_SERIAL_TX_PIN 58
|
||||
#define Y_SERIAL_RX_PIN 12
|
||||
|
||||
#define Z_SERIAL_TX_PIN 58
|
||||
#define Z_SERIAL_RX_PIN 12
|
||||
|
||||
#define E0_SERIAL_TX_PIN 58
|
||||
#define E0_SERIAL_RX_PIN 12
|
||||
#endif
|
||||
//#define X2_SLAVE_ADDRESS 0
|
||||
//#define Y2_SLAVE_ADDRESS 0
|
||||
//#define Z2_SLAVE_ADDRESS 0
|
||||
@@ -3142,7 +3145,9 @@
|
||||
* M912 - Clear stepper driver overtemperature pre-warn condition flag.
|
||||
* M122 - Report driver parameters (Requires TMC_DEBUG)
|
||||
*/
|
||||
#define MONITOR_DRIVER_STATUS
|
||||
#if ENABLED(SKRBoard)
|
||||
#define MONITOR_DRIVER_STATUS
|
||||
#endif
|
||||
|
||||
#if ENABLED(MONITOR_DRIVER_STATUS)
|
||||
#define CURRENT_STEP_DOWN 50 // [mA]
|
||||
@@ -3164,9 +3169,9 @@
|
||||
#define X_HYBRID_THRESHOLD 70 // [mm/s]
|
||||
#define X2_HYBRID_THRESHOLD 70
|
||||
#define Y_HYBRID_THRESHOLD 50
|
||||
#define Y2_HYBRID_THRESHOLD 100
|
||||
#define Z_HYBRID_THRESHOLD 8
|
||||
#define Z2_HYBRID_THRESHOLD 8
|
||||
#define Y2_HYBRID_THRESHOLD 50
|
||||
#define Z_HYBRID_THRESHOLD 3
|
||||
#define Z2_HYBRID_THRESHOLD 3
|
||||
#define Z3_HYBRID_THRESHOLD 3
|
||||
#define Z4_HYBRID_THRESHOLD 3
|
||||
#define I_HYBRID_THRESHOLD 3 // [linear=mm/s, rotational=°/s]
|
||||
@@ -3256,7 +3261,7 @@
|
||||
* Enable M122 debugging command for TMC stepper drivers.
|
||||
* M122 S0/1 will enable continuous reporting.
|
||||
*/
|
||||
#define TMC_DEBUG
|
||||
//#define TMC_DEBUG
|
||||
|
||||
/**
|
||||
* You can set your own advanced settings by filling in predefined functions.
|
||||
@@ -3375,11 +3380,13 @@
|
||||
* See https://marlinfw.org/docs/configuration/2.0.9/laser_spindle.html for more config details.
|
||||
*/
|
||||
//#define SPINDLE_FEATURE
|
||||
//#define LASER_FEATURE
|
||||
#if ENABLED(RAPTOR2) && DISABLED(SKRBoard)
|
||||
//#define LASER_FEATURE
|
||||
#endif
|
||||
#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
|
||||
#define SPINDLE_LASER_ACTIVE_STATE LOW // Set to "HIGH" if SPINDLE_LASER_ENA_PIN is active HIGH
|
||||
#define SPINDLE_LASER_ACTIVE_STATE HIGH // Set to "HIGH" if SPINDLE_LASER_ENA_PIN is active HIGH
|
||||
|
||||
#define SPINDLE_LASER_USE_PWM // Enable if your controller supports setting the speed/power
|
||||
//#define SPINDLE_LASER_USE_PWM // Enable if your controller supports setting the speed/power
|
||||
#if ENABLED(SPINDLE_LASER_USE_PWM)
|
||||
#define SPINDLE_LASER_PWM_INVERT false // Set to "true" if the speed/power goes up when you want it to go slower
|
||||
#define SPINDLE_LASER_FREQUENCY 2500 // (Hz) Spindle/laser frequency (only on supported HALs: AVR, ESP32, and LPC)
|
||||
@@ -3430,8 +3437,8 @@
|
||||
#define SPINDLE_CHANGE_DIR_STOP // Enable if the spindle should stop before changing spin direction
|
||||
#define SPINDLE_INVERT_DIR false // Set to "true" if the spin direction is reversed
|
||||
|
||||
#define SPINDLE_LASER_POWERUP_DELAY 5000 // (ms) Delay to allow the spindle/laser to come up to speed/power
|
||||
#define SPINDLE_LASER_POWERDOWN_DELAY 5000 // (ms) Delay to allow the spindle to stop
|
||||
#define SPINDLE_LASER_POWERUP_DELAY 1 // (ms) Delay to allow the spindle/laser to come up to speed/power
|
||||
#define SPINDLE_LASER_POWERDOWN_DELAY 1 // (ms) Delay to allow the spindle to stop
|
||||
|
||||
/**
|
||||
* M3/M4 Power Equation
|
||||
@@ -3547,6 +3554,7 @@
|
||||
*/
|
||||
//#define LASER_SYNCHRONOUS_M106_M107
|
||||
|
||||
|
||||
/**
|
||||
* Coolant Control
|
||||
*
|
||||
@@ -3789,41 +3797,50 @@
|
||||
* Up to 25 may be defined, but the actual number is LCD-dependent.
|
||||
*/
|
||||
|
||||
// Custom Menu: Main Menu
|
||||
#if ENABLED(BLTOUCH)
|
||||
#define DualZComm "\nG34I8"
|
||||
#else
|
||||
#define DualZComm ""
|
||||
#endif
|
||||
#define MAIN_MENU_ITEM_1_GCODE "M190S55\nG28" DualZComm "\nG29\nM400\nM104S215\nG28\nM109S215\nM420S1\nG1X100Y100F5000\nG1Z0\nM500\nM117 Set Z Offset"
|
||||
// @section custom main menu
|
||||
|
||||
//#define CUSTOM_MENU_MAIN
|
||||
// Custom Menu: Main Menu
|
||||
#define CUSTOM_MENU_MAIN
|
||||
#if ENABLED(CUSTOM_MENU_MAIN)
|
||||
//#define CUSTOM_MENU_MAIN_TITLE "Custom Commands"
|
||||
#define CUSTOM_MENU_MAIN_SCRIPT_DONE "M117 User Script Done"
|
||||
#define CUSTOM_MENU_MAIN_TITLE "Leveling Tools"
|
||||
//#define CUSTOM_MENU_MAIN_SCRIPT_DONE "M117 User Script Done"
|
||||
#define CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK
|
||||
//#define CUSTOM_MENU_MAIN_SCRIPT_RETURN // Return to status screen after a script
|
||||
#define CUSTOM_MENU_MAIN_SCRIPT_RETURN // Return to status screen after a script
|
||||
#define CUSTOM_MENU_MAIN_ONLY_IDLE // Only show custom menu when the machine is idle
|
||||
|
||||
#define MAIN_MENU_ITEM_1_DESC "Home & UBL Info"
|
||||
#define MAIN_MENU_ITEM_1_GCODE "G28\nG29 W"
|
||||
//#define MAIN_MENU_ITEM_1_CONFIRM // Show a confirmation dialog before this action
|
||||
#if ENABLED(DualZ)
|
||||
#define DZ_Script "G34I8\n"
|
||||
#else
|
||||
#define DZ_Script
|
||||
#endif
|
||||
#define MAIN_MENU_ITEM_1_DESC "Setup"
|
||||
#if ENABLED(UBL)
|
||||
#define MAIN_MENU_ITEM_1_GCODE "M190S75\nG28\n" DZ_Script "G29P1\nG29P3\nM109S215\nG29S1\nG29S0\nG29F0.0\nG29A\nG28\nG1X150Y150F5000\nG1Z0\nM500\nM400\nM117 Set Z Offset"
|
||||
#else
|
||||
#define MAIN_MENU_ITEM_1_GCODE "M190S75\nG28\n" DZ_Script "G29\nM400\nM109S215\nG28\nM420S1\nG1X100Y100F5000\nG1Z0\nM500\nM117 Set Z Offset"
|
||||
#endif
|
||||
#define MAIN_MENU_ITEM_1_CONFIRM // Show a confirmation dialog before this action
|
||||
|
||||
#define MAIN_MENU_ITEM_2_DESC "Preheat for " PREHEAT_1_LABEL
|
||||
#define MAIN_MENU_ITEM_2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
|
||||
//#define MAIN_MENU_ITEM_2_CONFIRM
|
||||
#define MAIN_MENU_ITEM_2_DESC "PID Hotend"
|
||||
#define MAIN_MENU_ITEM_2_GCODE "G28\nG1X200Y200Z5\nM106S128\nM303C8S215E0U\nM500\nM117 PID Tune Done"
|
||||
#define MAIN_MENU_ITEM_2_CONFIRM
|
||||
|
||||
//#define MAIN_MENU_ITEM_3_DESC "Preheat for " PREHEAT_2_LABEL
|
||||
//#define MAIN_MENU_ITEM_3_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
|
||||
//#define MAIN_MENU_ITEM_3_CONFIRM
|
||||
#define MAIN_MENU_ITEM_3_DESC "PID Bed"
|
||||
#define MAIN_MENU_ITEM_3_GCODE "M303C4S75E-1U\nM500\nM117 PID Tune Done"
|
||||
#define MAIN_MENU_ITEM_3_CONFIRM
|
||||
|
||||
//#define MAIN_MENU_ITEM_4_DESC "Heat Bed/Home/Level"
|
||||
//#define MAIN_MENU_ITEM_4_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
|
||||
//#define MAIN_MENU_ITEM_4_CONFIRM
|
||||
#define MAIN_MENU_ITEM_4_DESC "Prep for Z Adjust"
|
||||
#define MAIN_MENU_ITEM_4_GCODE "M190S75\nM104S215\nG28\nG29L1\nG1 X100Y100F5000\nG1Z0"
|
||||
#define MAIN_MENU_ITEM_4_CONFIRM
|
||||
|
||||
#define MAIN_MENU_ITEM_5_DESC "Store Settings"
|
||||
#define MAIN_MENU_ITEM_5_GCODE "M500\nM117 Settings Stored"
|
||||
#define MAIN_MENU_ITEM_5_CONFIRM
|
||||
|
||||
#define MAIN_MENU_ITEM_6_DESC "Run Mesh Validation"
|
||||
#define MAIN_MENU_ITEM_6_GCODE "G26"
|
||||
#define MAIN_MENU_ITEM_6_CONFIRM
|
||||
|
||||
//#define MAIN_MENU_ITEM_5_DESC "Home & Info"
|
||||
//#define MAIN_MENU_ITEM_5_GCODE "G28\nM503"
|
||||
//#define MAIN_MENU_ITEM_5_CONFIRM
|
||||
#endif
|
||||
|
||||
// @section custom config menu
|
||||
@@ -3914,7 +3931,7 @@
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||
#define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications
|
||||
#endif
|
||||
//#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start
|
||||
#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start
|
||||
//#define HOST_SHUTDOWN_MENU_ITEM // Add a menu item that tells the host to shut down
|
||||
#endif
|
||||
|
||||
|
||||
+11
-59
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
@@ -16,7 +16,7 @@
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
@@ -28,73 +28,25 @@
|
||||
/**
|
||||
* Marlin release version identifier
|
||||
*/
|
||||
#define SHORT_BUILD_VERSION "2.1.2_Beta1"
|
||||
#define SHORT_BUILD_VERSION "bugfix-2.1.x_R01"
|
||||
|
||||
/**
|
||||
* Verbose version identifier which should contain a reference to the location
|
||||
* from where the binary was downloaded or the source code was compiled.
|
||||
*/
|
||||
|
||||
#if(ENABLED(DriverA4988))
|
||||
#define VerChar1 "A"
|
||||
#elif(ENABLED(Driver2209))
|
||||
#define VerChar1 "T"
|
||||
#endif
|
||||
|
||||
#if(ENABLED(BL_Touch))
|
||||
#define VerChar2 "B"
|
||||
#else
|
||||
#define VerChar2 "E"
|
||||
#endif
|
||||
|
||||
#if(ENABLED(LOWRES_DWIN))
|
||||
#define VerChar3 "L"
|
||||
#else
|
||||
#define VerChar3 "H"
|
||||
#endif
|
||||
|
||||
|
||||
#if(ENABLED(ACBed))
|
||||
#define VerChar4 "A"
|
||||
#else
|
||||
#define VerChar4 "D"
|
||||
#endif
|
||||
|
||||
#if(ENABLED(OpticalY))
|
||||
#define VerChar5 "O"
|
||||
#else
|
||||
#define VerChar5 "M"
|
||||
#endif
|
||||
|
||||
#if(ENABLED(TitanExtruder))
|
||||
#define VerChar6 "T"
|
||||
#elif ANY(BMGExtruderV2, BMGExtruderV3)
|
||||
#define VerChar6 "B"
|
||||
#elif ENABLED(BondtechLGX)
|
||||
#define VerChar6 "L"
|
||||
#else
|
||||
#define VerChar6 "S"
|
||||
#endif
|
||||
|
||||
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION "_" VerChar1 VerChar2 VerChar3 VerChar4 VerChar5 VerChar6
|
||||
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " TM3D"
|
||||
|
||||
/**
|
||||
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
#define STRING_DISTRIBUTION_DATE "2023-02-03"
|
||||
#define STRING_DISTRIBUTION_DATE "2023-03-10"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
*/
|
||||
#if(ENABLED(MachineTLD3P))
|
||||
#define CUSTOM_MACHINE_NAME "TL D3P"
|
||||
#elif(ENABLED(MachineTLD5))
|
||||
#define CUSTOM_MACHINE_NAME "TL D5"
|
||||
#elif(ENABLED(MachineTLD6))
|
||||
#define CUSTOM_MACHINE_NAME "TL D6"
|
||||
#endif
|
||||
#define MACHINE_NAME "TM3D Raptor"
|
||||
|
||||
/**
|
||||
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
|
||||
@@ -102,7 +54,7 @@
|
||||
* has a distinct Github fork— the Source Code URL should just be the main
|
||||
* Marlin repository.
|
||||
*/
|
||||
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/Tenlog_DWIN"
|
||||
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/Raptor_2.0.X"
|
||||
|
||||
/**
|
||||
* Default generic printer UUID.
|
||||
@@ -113,12 +65,12 @@
|
||||
* The WEBSITE_URL is the location where users can get more information such as
|
||||
* documentation about a specific Marlin release.
|
||||
*/
|
||||
#define WEBSITE_URL "http://www.lnl3d.com "
|
||||
#define WEBSITE_URL "tinymachines3d.com"
|
||||
|
||||
/**
|
||||
* Set the vendor info the serial USB interface, if changable
|
||||
* Currently only supported by DUE platform
|
||||
*/
|
||||
//#define USB_DEVICE_VENDOR_ID 0x0000
|
||||
//#define USB_DEVICE_PRODUCT_ID 0x0000
|
||||
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
|
||||
//#define USB_DEVICE_VENDOR_ID 0x0000
|
||||
//#define USB_DEVICE_PRODUCT_ID 0x0000
|
||||
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
|
||||
|
||||
+68
-56
@@ -32,62 +32,74 @@
|
||||
|
||||
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
|
||||
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
|
||||
#define CUSTOM_BOOTSCREEN_INVERTED
|
||||
#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
|
||||
|
||||
const unsigned char custom_start_bmp[] PROGMEM = {
|
||||
B11111101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,
|
||||
B11111110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,
|
||||
B11111100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,
|
||||
B11111100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
|
||||
B11111110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
|
||||
B11111100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000000,B00000001,B11110000,B00111111,
|
||||
B11111110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000000,B00000010,B00001000,B00011111,
|
||||
B11111100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000000,B00000101,B00000100,B00111111,
|
||||
B11111110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000000,B00001010,B00000010,B00011111,
|
||||
B11111100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000000,B00010101,B00000001,B00111111,
|
||||
B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000000,B00011000,B00000001,B00011111,
|
||||
B11111100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000000,B00010100,B00000001,B00111111,
|
||||
B11111110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000000,B00011000,B00000001,B00011111,
|
||||
B11111100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B00010101,B00000001,B00111111,
|
||||
B11111110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101010,B00001010,B00000010,B00011111,
|
||||
B11111100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010001,B00000101,B00000100,B00111111,
|
||||
B11111110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100001,B00000010,B10001000,B00011111,
|
||||
B11111100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010001,B00000001,B11110000,B00111111,
|
||||
B11111110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101010,B00000000,B00000000,B00011111,
|
||||
B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00000000,B00000000,B00111111,
|
||||
B11111110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
|
||||
B11111100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
|
||||
B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111111,B11111111,B11111111,B10011111,
|
||||
B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010101,B01010101,B01010101,B10111111,
|
||||
B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
|
||||
B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000001,B00000100,B00010001,B10111111,
|
||||
B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
|
||||
B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000001,B00000100,B00010001,B10111111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010101,B01010101,B01010101,B10111111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111111,B11111111,B11111111,B10011111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
|
||||
B11100000,B00101110,B11111011,B01111101,B11111011,B11111011,B11001111,B11000001,B11011111,B10111011,B00111110,B11000000,B11100001,B11111110,B00111100,B00011111,
|
||||
B11111101,B11101110,B01111011,B00111001,B11111001,B11110011,B11001111,B10011110,B11011111,B10111011,B00111110,B11011111,B11011110,B11111100,B11011101,B11100111,
|
||||
B11111101,B11101110,B00111011,B10111011,B11111001,B11101011,B11010111,B10111111,B01011111,B10111011,B01011110,B11011111,B11011110,B11111101,B11101101,B11110111,
|
||||
B11111101,B11101110,B10111011,B11010011,B11111010,B11101011,B10110111,B00111111,B11011111,B10111011,B01001110,B11011111,B11011111,B11111111,B11001101,B11110011,
|
||||
B11111101,B11101110,B11011011,B11000111,B11111010,B11101011,B10111011,B01111111,B11000000,B00111011,B01101110,B11000000,B11100011,B11111111,B00011101,B11110011,
|
||||
B11111101,B11101110,B11001011,B11101111,B11111010,B11011011,B10111011,B01111111,B11011111,B10111011,B01100110,B11011111,B11111000,B11111111,B11001101,B11110011,
|
||||
B11111101,B11101110,B11101011,B11101111,B11111011,B01011011,B00000011,B00111111,B01011111,B10111011,B01110110,B11011111,B11111110,B01111111,B11101101,B11110011,
|
||||
B11111101,B11101110,B11110011,B11101111,B11111011,B01011011,B01111001,B10111110,B11011111,B10111011,B01111010,B11011111,B11011110,B01111101,B11101101,B11110111,
|
||||
B11111101,B11101110,B11110011,B11101111,B11111011,B10111010,B11111101,B10011110,B11011111,B10111011,B01111100,B11011111,B11011110,B11111101,B11001101,B11100111,
|
||||
B11111101,B11101110,B11111011,B11101111,B11111011,B10111010,B11111101,B11000001,B11011111,B10111011,B01111110,B11000000,B11100000,B11111110,B00011100,B00011111
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFD, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFD, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFE, 0x07, 0xC0, 0x05, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFC, 0x0A, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFE, 0x14, 0x10, 0x05, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFC, 0x28, 0x08, 0x06, 0x07, 0xC0, 0x05, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F, 0xFF, 0xFF, 0xFF,
|
||||
0xFE, 0x54, 0x04, 0x04, 0x0A, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF,
|
||||
0xFC, 0x60, 0x04, 0x06, 0x14, 0x10, 0x05, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFE, 0x50, 0x04, 0x04, 0x28, 0x08, 0x06, 0x07, 0xC0, 0x05, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F,
|
||||
0xFC, 0x60, 0x04, 0x06, 0x54, 0x04, 0x04, 0x0A, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||
0xFE, 0x54, 0x04, 0x1C, 0x60, 0x04, 0x06, 0x14, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
|
||||
0xFC, 0x28, 0x08, 0x2E, 0x50, 0x04, 0x04, 0x28, 0x08, 0x06, 0x07, 0xC0, 0x00, 0x01, 0xF0, 0x3F,
|
||||
0xFE, 0x14, 0x10, 0x54, 0x60, 0x04, 0x06, 0x54, 0x04, 0x04, 0x0A, 0x20, 0x00, 0x02, 0x08, 0x1F,
|
||||
0xFC, 0x0A, 0x20, 0x66, 0x54, 0x04, 0x1C, 0x60, 0x04, 0x06, 0x14, 0x10, 0x00, 0x05, 0x04, 0x3F,
|
||||
0xFE, 0x07, 0xC0, 0x54, 0x28, 0x08, 0x2E, 0x50, 0x04, 0x04, 0x28, 0x08, 0x00, 0x0A, 0x02, 0x1F,
|
||||
0xFC, 0x00, 0x00, 0x2E, 0x14, 0x10, 0x54, 0x60, 0x04, 0x06, 0x54, 0x04, 0x00, 0x15, 0x01, 0x3F,
|
||||
0xFE, 0x00, 0x00, 0x1C, 0x0A, 0x20, 0x66, 0x54, 0x04, 0x1C, 0x60, 0x04, 0x00, 0x18, 0x01, 0x1F,
|
||||
0xFC, 0x00, 0x00, 0x06, 0x07, 0xC0, 0x54, 0x28, 0x08, 0x2E, 0x50, 0x04, 0x00, 0x14, 0x01, 0x3F,
|
||||
0xFE, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2E, 0x14, 0x10, 0x54, 0x60, 0x04, 0x00, 0x18, 0x01, 0x1F,
|
||||
0xFC, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1C, 0x0A, 0x20, 0x66, 0x54, 0x04, 0x1C, 0x15, 0x01, 0x3F,
|
||||
0xFE, 0xD5, 0x55, 0x54, 0x00, 0x00, 0x06, 0x07, 0xC0, 0x54, 0x28, 0x08, 0x2A, 0x0A, 0x02, 0x1F,
|
||||
0xFC, 0x84, 0x10, 0x46, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2E, 0x14, 0x10, 0x51, 0x05, 0x04, 0x3F,
|
||||
0xFE, 0xC4, 0x10, 0x44, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1C, 0x0A, 0x20, 0x61, 0x02, 0x88, 0x1F,
|
||||
0xFC, 0x84, 0x10, 0x46, 0xD5, 0x55, 0x54, 0x00, 0x00, 0x06, 0x07, 0xC0, 0x51, 0x01, 0xF0, 0x3F,
|
||||
0xFE, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x1F,
|
||||
0xFC, 0xC4, 0x10, 0x46, 0xC4, 0x10, 0x44, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x3F,
|
||||
0xFE, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0xD5, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
|
||||
0xFC, 0xD5, 0x55, 0x56, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||
0xFC, 0xFF, 0xFF, 0xFC, 0xC4, 0x10, 0x46, 0xC4, 0x10, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
|
||||
0xFE, 0x00, 0x00, 0x06, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0xD5, 0x55, 0x55, 0x55, 0x55, 0xBF,
|
||||
0xFD, 0x55, 0x55, 0x54, 0xD5, 0x55, 0x56, 0x84, 0x10, 0x44, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
|
||||
0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFC, 0xC4, 0x10, 0x46, 0xC4, 0x10, 0x41, 0x04, 0x11, 0xBF,
|
||||
0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x06, 0x84, 0x10, 0x44, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
|
||||
0xFF, 0xFF, 0xFF, 0xFD, 0x55, 0x55, 0x54, 0xD5, 0x55, 0x56, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFC, 0xC4, 0x10, 0x41, 0x04, 0x11, 0xBF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x06, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x55, 0x55, 0x54, 0xD5, 0x55, 0x55, 0x55, 0x55, 0xBF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xE0, 0x2E, 0xFB, 0x7D, 0xFB, 0xFB, 0xCF, 0xC1, 0xDF, 0xBB, 0x3E, 0xC0, 0xE1, 0xFE, 0x3C, 0x1F,
|
||||
0xFD, 0xEE, 0x7B, 0x39, 0xF9, 0xF3, 0xCF, 0x9E, 0xDF, 0xBB, 0x3E, 0xDF, 0xDE, 0xFC, 0xDD, 0xE7,
|
||||
0xFD, 0xEE, 0x3B, 0xBB, 0xF9, 0xEB, 0xD7, 0xBF, 0x5F, 0xBB, 0x5E, 0xDF, 0xDE, 0xFD, 0xED, 0xF7,
|
||||
0xFD, 0xEE, 0xBB, 0xD3, 0xFA, 0xEB, 0xB7, 0x3F, 0xDF, 0xBB, 0x4E, 0xDF, 0xDF, 0xFF, 0xCD, 0xF3,
|
||||
0xFD, 0xEE, 0xDB, 0xC7, 0xFA, 0xEB, 0xBB, 0x7F, 0xC0, 0x3B, 0x6E, 0xC0, 0xE3, 0xFF, 0x1D, 0xF3,
|
||||
0xFD, 0xEE, 0xCB, 0xEF, 0xFA, 0xDB, 0xBB, 0x7F, 0xDF, 0xBB, 0x66, 0xDF, 0xF8, 0xFF, 0xCD, 0xF3,
|
||||
0xFD, 0xEE, 0xEB, 0xEF, 0xFB, 0x5B, 0x03, 0x3F, 0x5F, 0xBB, 0x76, 0xDF, 0xFE, 0x7F, 0xED, 0xF3,
|
||||
0xFD, 0xEE, 0xF3, 0xEF, 0xFB, 0x5B, 0x79, 0xBE, 0xDF, 0xBB, 0x7A, 0xDF, 0xDE, 0x7D, 0xED, 0xF7,
|
||||
0xFD, 0xEE, 0xF3, 0xEF, 0xFB, 0xBA, 0xFD, 0x9E, 0xDF, 0xBB, 0x7C, 0xDF, 0xDE, 0xFD, 0xCD, 0xE7,
|
||||
0xFD, 0xEE, 0xFB, 0xEF, 0xFB, 0xBA, 0xFD, 0xC1, 0xDF, 0xBB, 0x7E, 0xC0, 0xE0, 0xFE, 0x1C, 0x1F,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
+5
-5
@@ -95,10 +95,10 @@ invert_y_dir = true
|
||||
invert_z_dir = false
|
||||
invert_e0_dir = false
|
||||
|
||||
invert_e_step_pin = false
|
||||
invert_x_step_pin = false
|
||||
invert_y_step_pin = false
|
||||
invert_z_step_pin = false
|
||||
step_state_e = HIGH
|
||||
step_state_x = HIGH
|
||||
step_state_y = HIGH
|
||||
step_state_z = HIGH
|
||||
|
||||
disable_x = false
|
||||
disable_y = false
|
||||
@@ -178,7 +178,7 @@ autotemp_oldweight = 0.98
|
||||
bed_check_interval = 5000
|
||||
default_stepper_deactive_time = 120
|
||||
default_volumetric_extruder_limit = 0.00
|
||||
disable_inactive_e = true
|
||||
disable_inactive_extruder = true
|
||||
disable_inactive_x = true
|
||||
disable_inactive_y = true
|
||||
disable_inactive_z = true
|
||||
|
||||
@@ -139,7 +139,7 @@ typedef Servo hal_servo_t;
|
||||
#error "LCD_SERIAL_PORT must be from 0 to 3."
|
||||
#endif
|
||||
#define LCD_SERIAL lcdSerial
|
||||
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
|
||||
#if HAS_DGUS_LCD
|
||||
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -629,7 +629,7 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
|
||||
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
|
||||
MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser);
|
||||
|
||||
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
|
||||
#if HAS_DGUS_LCD
|
||||
template<typename Cfg>
|
||||
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
|
||||
const ring_buffer_pos_t t = tx_buffer.tail, // next byte to send.
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <WString.h>
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#include "../../core/types.h"
|
||||
#include "../../core/serial_hook.h"
|
||||
|
||||
#ifndef SERIAL_PORT
|
||||
@@ -138,10 +139,6 @@
|
||||
|
||||
#define BYTE 0
|
||||
|
||||
// Templated type selector
|
||||
template<bool b, typename T, typename F> struct TypeSelector { typedef T type;} ;
|
||||
template<typename T, typename F> struct TypeSelector<false, T, F> { typedef F type; };
|
||||
|
||||
template<typename Cfg>
|
||||
class MarlinSerial {
|
||||
protected:
|
||||
@@ -164,7 +161,7 @@
|
||||
static constexpr B_U2Xx<Cfg::PORT> B_U2X = 0;
|
||||
|
||||
// Base size of type on buffer size
|
||||
typedef typename TypeSelector<(Cfg::RX_SIZE>256), uint16_t, uint8_t>::type ring_buffer_pos_t;
|
||||
typedef uvalue_t(Cfg::RX_SIZE - 1) ring_buffer_pos_t;
|
||||
|
||||
struct ring_buffer_r {
|
||||
volatile ring_buffer_pos_t head, tail;
|
||||
@@ -212,7 +209,7 @@
|
||||
static ring_buffer_pos_t available();
|
||||
static void write(const uint8_t c);
|
||||
static void flushTX();
|
||||
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
|
||||
#if HAS_DGUS_LCD
|
||||
static ring_buffer_pos_t get_tx_buffer_free();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
//#define DEBUG_AVR_FAST_PWM
|
||||
#define DEBUG_OUT ENABLED(DEBUG_AVR_FAST_PWM)
|
||||
#include "../../core/debug_out.h"
|
||||
|
||||
struct Timer {
|
||||
volatile uint8_t* TCCRnQ[3]; // max 3 TCCR registers per timer
|
||||
volatile uint16_t* OCRnQ[3]; // max 3 OCR registers per timer
|
||||
@@ -108,12 +112,15 @@ const Timer get_pwm_timer(const pin_t pin) {
|
||||
}
|
||||
|
||||
void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
|
||||
DEBUG_ECHOLNPGM("set_pwm_frequency(pin=", pin, ", freq=", f_desired, ")");
|
||||
const Timer timer = get_pwm_timer(pin);
|
||||
if (timer.isProtected || !timer.isPWM) return; // Don't proceed if protected timer or not recognized
|
||||
|
||||
const bool is_timer2 = timer.n == 2;
|
||||
const uint16_t maxtop = is_timer2 ? 0xFF : 0xFFFF;
|
||||
|
||||
DEBUG_ECHOLNPGM("maxtop=", maxtop);
|
||||
|
||||
uint16_t res = 0xFF; // resolution (TOP value)
|
||||
uint8_t j = CS_NONE; // prescaler index
|
||||
uint8_t wgm = WGM_PWM_PC_8; // waveform generation mode
|
||||
@@ -121,23 +128,29 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
|
||||
// Calculating the prescaler and resolution to use to achieve closest frequency
|
||||
if (f_desired != 0) {
|
||||
constexpr uint16_t prescaler[] = { 1, 8, (32), 64, (128), 256, 1024 }; // (*) are Timer 2 only
|
||||
uint16_t f = (F_CPU) / (2 * 1024 * maxtop) + 1; // Start with the lowest non-zero frequency achievable (1 or 31)
|
||||
uint16_t f = (F_CPU) / (uint32_t(maxtop) << 11) + 1; // Start with the lowest non-zero frequency achievable (for 16MHz, 1 or 31)
|
||||
|
||||
DEBUG_ECHOLNPGM("f=", f);
|
||||
DEBUG_ECHOLNPGM("(prescaler loop)");
|
||||
LOOP_L_N(i, COUNT(prescaler)) { // Loop through all prescaler values
|
||||
const uint16_t p = prescaler[i];
|
||||
const uint32_t p = prescaler[i]; // Extend to 32 bits for calculations
|
||||
DEBUG_ECHOLNPGM("prescaler[", i, "]=", p);
|
||||
uint16_t res_fast_temp, res_pc_temp;
|
||||
if (is_timer2) {
|
||||
#if ENABLED(USE_OCR2A_AS_TOP) // No resolution calculation for TIMER2 unless enabled USE_OCR2A_AS_TOP
|
||||
const uint16_t rft = (F_CPU) / (p * f_desired);
|
||||
res_fast_temp = rft - 1;
|
||||
res_pc_temp = rft / 2;
|
||||
DEBUG_ECHOLNPGM("(Timer2) res_fast_temp=", res_fast_temp, " res_pc_temp=", res_pc_temp);
|
||||
#else
|
||||
res_fast_temp = res_pc_temp = maxtop;
|
||||
DEBUG_ECHOLNPGM("(Timer2) res_fast_temp=", maxtop, " res_pc_temp=", maxtop);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
if (p == 32 || p == 128) continue; // Skip TIMER2 specific prescalers when not TIMER2
|
||||
const uint16_t rft = (F_CPU) / (p * f_desired);
|
||||
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=" STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
|
||||
res_fast_temp = rft - 1;
|
||||
res_pc_temp = rft / 2;
|
||||
}
|
||||
@@ -147,23 +160,27 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
|
||||
|
||||
// Calculate frequencies of test prescaler and resolution values
|
||||
const uint16_t f_fast_temp = (F_CPU) / (p * (1 + res_fast_temp)),
|
||||
f_pc_temp = (F_CPU) / (2 * p * res_pc_temp);
|
||||
const int f_diff = _MAX(f, f_desired) - _MIN(f, f_desired),
|
||||
f_pc_temp = (F_CPU) / ((p * res_pc_temp) << 1),
|
||||
f_diff = _MAX(f, f_desired) - _MIN(f, f_desired),
|
||||
f_fast_diff = _MAX(f_fast_temp, f_desired) - _MIN(f_fast_temp, f_desired),
|
||||
f_pc_diff = _MAX(f_pc_temp, f_desired) - _MIN(f_pc_temp, f_desired);
|
||||
|
||||
DEBUG_ECHOLNPGM("f_fast_temp=", f_fast_temp, " f_pc_temp=", f_pc_temp, " f_diff=", f_diff, " f_fast_diff=", f_fast_diff, " f_pc_diff=", f_pc_diff);
|
||||
|
||||
if (f_fast_diff < f_diff && f_fast_diff <= f_pc_diff) { // FAST values are closest to desired f
|
||||
// Set the Wave Generation Mode to FAST PWM
|
||||
wgm = is_timer2 ? uint8_t(TERN(USE_OCR2A_AS_TOP, WGM2_FAST_PWM_OCR2A, WGM2_FAST_PWM)) : uint8_t(WGM_FAST_PWM_ICRn);
|
||||
// Remember this combination
|
||||
f = f_fast_temp; res = res_fast_temp; j = i + 1;
|
||||
DEBUG_ECHOLNPGM("(FAST) updated f=", f);
|
||||
}
|
||||
else if (f_pc_diff < f_diff) { // PHASE CORRECT values are closes to desired f
|
||||
// Set the Wave Generation Mode to PWM PHASE CORRECT
|
||||
wgm = is_timer2 ? uint8_t(TERN(USE_OCR2A_AS_TOP, WGM2_PWM_PC_OCR2A, WGM2_PWM_PC)) : uint8_t(WGM_PWM_PC_ICRn);
|
||||
f = f_pc_temp; res = res_pc_temp; j = i + 1;
|
||||
DEBUG_ECHOLNPGM("(PHASE) updated f=", f);
|
||||
}
|
||||
}
|
||||
} // prescaler loop
|
||||
}
|
||||
|
||||
_SET_WGMnQ(timer, wgm);
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <WString.h>
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#include "../../core/types.h"
|
||||
#include "../../core/serial_hook.h"
|
||||
|
||||
// Define constants and variables for buffering incoming serial data. We're
|
||||
@@ -52,10 +53,6 @@
|
||||
// #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
|
||||
//#endif
|
||||
|
||||
// Templated type selector
|
||||
template<bool b, typename T, typename F> struct TypeSelector { typedef T type;} ;
|
||||
template<typename T, typename F> struct TypeSelector<false, T, F> { typedef F type; };
|
||||
|
||||
// Templated structure wrapper
|
||||
template<typename S, unsigned int addr> struct StructWrapper {
|
||||
constexpr StructWrapper(int) {}
|
||||
@@ -76,7 +73,7 @@ protected:
|
||||
static constexpr int HWUART_IRQ_ID = IRQ_IDS[Cfg::PORT];
|
||||
|
||||
// Base size of type on buffer size
|
||||
typedef typename TypeSelector<(Cfg::RX_SIZE>256), uint16_t, uint8_t>::type ring_buffer_pos_t;
|
||||
typedef uvalue_t(Cfg::RX_SIZE - 1) ring_buffer_pos_t;
|
||||
|
||||
struct ring_buffer_r {
|
||||
volatile ring_buffer_pos_t head, tail;
|
||||
|
||||
@@ -342,16 +342,16 @@ void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v
|
||||
}
|
||||
else
|
||||
pindata.pwm_duty_ticks = duty; // PWM duty count = # of 4µs ticks per full PWM cycle
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
const int8_t cid = get_pwm_channel(pin, PWM_FREQUENCY, PWM_RESOLUTION);
|
||||
if (cid >= 0) {
|
||||
const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, _BV(PWM_RESOLUTION)-1);
|
||||
ledcWrite(cid, duty);
|
||||
}
|
||||
}
|
||||
|
||||
const int8_t cid = get_pwm_channel(pin, PWM_FREQUENCY, PWM_RESOLUTION);
|
||||
if (cid >= 0) {
|
||||
const uint32_t duty = map(invert ? v_size - v : v, 0, v_size, 0, _BV(PWM_RESOLUTION)-1);
|
||||
ledcWrite(cid, duty);
|
||||
}
|
||||
}
|
||||
|
||||
int8_t MarlinHAL::set_pwm_frequency(const pin_t pin, const uint32_t f_desired) {
|
||||
@@ -360,17 +360,15 @@ int8_t MarlinHAL::set_pwm_frequency(const pin_t pin, const uint32_t f_desired) {
|
||||
pwm_pin_data[pin & 0x7F].pwm_cycle_ticks = 1000000UL / f_desired / 4; // # of 4µs ticks per full PWM cycle
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
const int8_t cid = channel_for_pin(pin);
|
||||
if (cid >= 0) {
|
||||
if (f_desired == ledcReadFreq(cid)) return cid; // no freq change
|
||||
ledcDetachPin(chan_pin[cid]);
|
||||
chan_pin[cid] = 0; // remove old freq channel
|
||||
}
|
||||
return get_pwm_channel(pin, f_desired, PWM_RESOLUTION); // try for new one
|
||||
}
|
||||
|
||||
const int8_t cid = channel_for_pin(pin);
|
||||
if (cid >= 0) {
|
||||
if (f_desired == ledcReadFreq(cid)) return cid; // no freq change
|
||||
ledcDetachPin(chan_pin[cid]);
|
||||
chan_pin[cid] = 0; // remove old freq channel
|
||||
}
|
||||
return get_pwm_channel(pin, f_desired, PWM_RESOLUTION); // try for new one
|
||||
}
|
||||
|
||||
// use hardware PWM if avail, if not then ISR
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
#else
|
||||
#error "LCD_SERIAL_PORT must be from 1 to 6, or -1 for Native USB."
|
||||
#endif
|
||||
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
|
||||
#if HAS_DGUS_LCD
|
||||
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -48,7 +48,7 @@ static char _ALIGN(4) HAL_eeprom_data[MARLIN_EEPROM_SIZE];
|
||||
bool PersistentStore::access_start() {
|
||||
if (!card.isMounted()) return false;
|
||||
|
||||
SdFile file, root = card.getroot();
|
||||
MediaFile file, root = card.getroot();
|
||||
if (!file.open(&root, EEPROM_FILENAME, O_RDONLY))
|
||||
return true;
|
||||
|
||||
@@ -63,7 +63,7 @@ bool PersistentStore::access_start() {
|
||||
bool PersistentStore::access_finish() {
|
||||
if (!card.isMounted()) return false;
|
||||
|
||||
SdFile file, root = card.getroot();
|
||||
MediaFile file, root = card.getroot();
|
||||
int bytes_written = 0;
|
||||
if (file.open(&root, EEPROM_FILENAME, O_CREAT | O_WRITE | O_TRUNC)) {
|
||||
bytes_written = file.write(HAL_eeprom_data, MARLIN_EEPROM_SIZE);
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
#define LCD_SERIAL MSERIAL(1) // dummy port
|
||||
static_assert(false, "LCD_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
|
||||
#endif
|
||||
#if HAS_DGUS_LCD || ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
|
||||
#if HAS_DGUS_LCD
|
||||
#define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -47,7 +47,7 @@ static char _ALIGN(4) HAL_eeprom_data[MARLIN_EEPROM_SIZE];
|
||||
bool PersistentStore::access_start() {
|
||||
if (!card.isMounted()) return false;
|
||||
|
||||
SdFile file, root = card.getroot();
|
||||
MediaFile file, root = card.getroot();
|
||||
if (!file.open(&root, EEPROM_FILENAME, O_RDONLY))
|
||||
return true; // false aborts the save
|
||||
|
||||
@@ -62,7 +62,7 @@ bool PersistentStore::access_start() {
|
||||
bool PersistentStore::access_finish() {
|
||||
if (!card.isMounted()) return false;
|
||||
|
||||
SdFile file, root = card.getroot();
|
||||
MediaFile file, root = card.getroot();
|
||||
int bytes_written = 0;
|
||||
if (file.open(&root, EEPROM_FILENAME, O_CREAT | O_WRITE | O_TRUNC)) {
|
||||
bytes_written = file.write(HAL_eeprom_data, MARLIN_EEPROM_SIZE);
|
||||
|
||||
@@ -39,7 +39,7 @@ inline uint8_t timer_and_index_for_pin(const pin_t pin, timer_dev **timer_ptr) {
|
||||
void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
|
||||
const uint16_t duty = invert ? v_size - v : v;
|
||||
if (PWM_PIN(pin)) {
|
||||
timer_dev *timer; UNUSED(timer);
|
||||
timer_dev *timer;
|
||||
if (timer_freq[timer_and_index_for_pin(pin, &timer)] == 0)
|
||||
set_pwm_frequency(pin, PWM_FREQUENCY);
|
||||
const uint8_t channel = PIN_MAP[pin].timer_channel;
|
||||
@@ -55,7 +55,7 @@ void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v
|
||||
void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
|
||||
if (!PWM_PIN(pin)) return; // Don't proceed if no hardware timer
|
||||
|
||||
timer_dev *timer; UNUSED(timer);
|
||||
timer_dev *timer;
|
||||
timer_freq[timer_and_index_for_pin(pin, &timer)] = f_desired;
|
||||
|
||||
// Protect used timers
|
||||
|
||||
@@ -448,7 +448,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
|
||||
TERN_(DISABLE_INACTIVE_U, stepper.disable_axis(U_AXIS));
|
||||
TERN_(DISABLE_INACTIVE_V, stepper.disable_axis(V_AXIS));
|
||||
TERN_(DISABLE_INACTIVE_W, stepper.disable_axis(W_AXIS));
|
||||
TERN_(DISABLE_INACTIVE_E, stepper.disable_e_steppers());
|
||||
TERN_(DISABLE_INACTIVE_EXTRUDER, stepper.disable_e_steppers());
|
||||
|
||||
TERN_(AUTO_BED_LEVELING_UBL, bedlevel.steppers_were_disabled());
|
||||
}
|
||||
@@ -669,7 +669,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
|
||||
&& ELAPSED(ms, gcode.previous_move_ms + SEC_TO_MS(EXTRUDER_RUNOUT_SECONDS))
|
||||
&& !planner.has_blocks_queued()
|
||||
) {
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#if HAS_SWITCHING_EXTRUDER
|
||||
bool oldstatus;
|
||||
switch (active_extruder) {
|
||||
default: oldstatus = stepper.AXIS_IS_ENABLED(E_AXIS, 0); stepper.ENABLE_EXTRUDER(0); break;
|
||||
@@ -683,7 +683,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
|
||||
#endif // E_STEPPERS > 2
|
||||
#endif // E_STEPPERS > 1
|
||||
}
|
||||
#else // !SWITCHING_EXTRUDER
|
||||
#else // !HAS_SWITCHING_EXTRUDER
|
||||
bool oldstatus;
|
||||
switch (active_extruder) {
|
||||
default:
|
||||
@@ -699,7 +699,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
|
||||
planner.set_e_position_mm(olde);
|
||||
planner.synchronize();
|
||||
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#if HAS_SWITCHING_EXTRUDER
|
||||
switch (active_extruder) {
|
||||
default: if (oldstatus) stepper.ENABLE_EXTRUDER(0); else stepper.DISABLE_EXTRUDER(0); break;
|
||||
#if E_STEPPERS > 1
|
||||
@@ -709,12 +709,12 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
|
||||
#endif // E_STEPPERS > 2
|
||||
#endif // E_STEPPERS > 1
|
||||
}
|
||||
#else // !SWITCHING_EXTRUDER
|
||||
#else // !HAS_SWITCHING_EXTRUDER
|
||||
switch (active_extruder) {
|
||||
#define _CASE_RESTORE(N) case N: if (oldstatus) stepper.ENABLE_EXTRUDER(N); else stepper.DISABLE_EXTRUDER(N); break;
|
||||
REPEAT(E_STEPPERS, _CASE_RESTORE);
|
||||
}
|
||||
#endif // !SWITCHING_EXTRUDER
|
||||
#endif // !HAS_SWITCHING_EXTRUDER
|
||||
|
||||
gcode.reset_stepper_timeout(ms);
|
||||
}
|
||||
|
||||
+156
-146
@@ -221,7 +221,7 @@
|
||||
#define BOARD_5DPRINT 1707 // 5DPrint D8 Driver Board
|
||||
|
||||
//
|
||||
// LPC1768 ARM Cortex M3
|
||||
// LPC1768 ARM Cortex-M3
|
||||
//
|
||||
|
||||
#define BOARD_RAMPS_14_RE_ARM_EFB 2000 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
|
||||
@@ -242,7 +242,7 @@
|
||||
#define BOARD_EMOTRONIC 2015 // eMotion-Tech eMotronic
|
||||
|
||||
//
|
||||
// LPC1769 ARM Cortex M3
|
||||
// LPC1769 ARM Cortex-M3
|
||||
//
|
||||
|
||||
#define BOARD_MKS_SGEN 2500 // MKS-SGen
|
||||
@@ -259,7 +259,7 @@
|
||||
#define BOARD_FLY_CDY 2511 // FLYmaker FLY CDY
|
||||
|
||||
//
|
||||
// SAM3X8E ARM Cortex M3
|
||||
// SAM3X8E ARM Cortex-M3
|
||||
//
|
||||
|
||||
#define BOARD_DUE3DOM 3000 // DUE3DOM for Arduino DUE
|
||||
@@ -292,185 +292,195 @@
|
||||
#define BOARD_KRATOS32 3027 // K.3D Kratos32 (Arduino Due Shield)
|
||||
|
||||
//
|
||||
// SAM3X8C ARM Cortex M3
|
||||
// SAM3X8C ARM Cortex-M3
|
||||
//
|
||||
|
||||
#define BOARD_PRINTRBOARD_G2 3100 // Printrboard G2
|
||||
#define BOARD_ADSK 3101 // Arduino DUE Shield Kit (ADSK)
|
||||
|
||||
//
|
||||
// STM32 ARM Cortex-M0+
|
||||
//
|
||||
|
||||
#define BOARD_BTT_EBB42_V1_1 4000 // BigTreeTech EBB42 V1.1 (STM32G0B1CB)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V3_0 4001 // BigTreeTech SKR Mini E3 V3.0 (STM32G0B1RE)
|
||||
#define BOARD_BTT_MANTA_E3_EZ_V1_0 4002 // BigTreeTech Manta E3 EZ V1.0 (STM32G0B1RE)
|
||||
#define BOARD_BTT_MANTA_M4P_V1_0 4003 // BigTreeTech Manta M4P V1.0 (STM32G0B1RE)
|
||||
#define BOARD_BTT_MANTA_M5P_V1_0 4004 // BigTreeTech Manta M5P V1.0 (STM32G0B1RE)
|
||||
#define BOARD_BTT_MANTA_M8P_V1_0 4005 // BigTreeTech Manta M8P V1.0 (STM32G0B1VE)
|
||||
#define BOARD_BTT_MANTA_M8P_V1_1 4006 // BigTreeTech Manta M8P V1.1 (STM32G0B1VE)
|
||||
|
||||
//
|
||||
// STM32 ARM Cortex-M3
|
||||
//
|
||||
|
||||
#define BOARD_MALYAN_M200_V2 4000 // STM32F070CB controller
|
||||
#define BOARD_MALYAN_M300 4001 // STM32F070-based delta
|
||||
#define BOARD_STM32F103RE 4002 // STM32F103RE Libmaple-based STM32F1 controller
|
||||
#define BOARD_MALYAN_M200 4003 // STM32C8 Libmaple-based STM32F1 controller
|
||||
#define BOARD_STM3R_MINI 4004 // STM32F103RE Libmaple-based STM32F1 controller
|
||||
#define BOARD_GTM32_PRO_VB 4005 // STM32F103VE controller
|
||||
#define BOARD_GTM32_MINI 4006 // STM32F103VE controller
|
||||
#define BOARD_GTM32_MINI_A30 4007 // STM32F103VE controller
|
||||
#define BOARD_GTM32_REV_B 4008 // STM32F103VE controller
|
||||
#define BOARD_MORPHEUS 4009 // STM32F103C8 / STM32F103CB Libmaple-based STM32F1 controller
|
||||
#define BOARD_CHITU3D 4010 // Chitu3D (STM32F103RE)
|
||||
#define BOARD_MKS_ROBIN 4011 // MKS Robin (STM32F103ZE)
|
||||
#define BOARD_MKS_ROBIN_MINI 4012 // MKS Robin Mini (STM32F103VE)
|
||||
#define BOARD_MKS_ROBIN_NANO 4013 // MKS Robin Nano (STM32F103VE)
|
||||
#define BOARD_MKS_ROBIN_NANO_V2 4014 // MKS Robin Nano V2 (STM32F103VE)
|
||||
#define BOARD_MKS_ROBIN_LITE 4015 // MKS Robin Lite/Lite2 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_LITE3 4016 // MKS Robin Lite3 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_PRO 4017 // MKS Robin Pro (STM32F103ZE)
|
||||
#define BOARD_MKS_ROBIN_E3 4018 // MKS Robin E3 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3_V1_1 4019 // MKS Robin E3 V1.1 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3D 4020 // MKS Robin E3D (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3D_V1_1 4021 // MKS Robin E3D V1.1 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3P 4022 // MKS Robin E3p (STM32F103VE)
|
||||
#define BOARD_BTT_EBB42_V1_1 4023 // BigTreeTech EBB42 V1.1 (STM32G0B1CB)
|
||||
#define BOARD_BTT_SKR_MINI_V1_1 4024 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V1_0 4025 // BigTreeTech SKR Mini E3 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V1_2 4026 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V2_0 4027 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V3_0 4028 // BigTreeTech SKR Mini E3 V3.0 (STM32G0B1RE)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V3_0_1 4029 // BigTreeTech SKR Mini E3 V3.0.1 (STM32F401RC)
|
||||
#define BOARD_BTT_SKR_MINI_MZ_V1_0 4030 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_E3_DIP 4031 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_BTT_SKR_CR6 4032 // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
|
||||
#define BOARD_JGAURORA_A5S_A1 4033 // JGAurora A5S A1 (STM32F103ZE)
|
||||
#define BOARD_FYSETC_AIO_II 4034 // FYSETC AIO_II (STM32F103RC)
|
||||
#define BOARD_FYSETC_CHEETAH 4035 // FYSETC Cheetah (STM32F103RC)
|
||||
#define BOARD_FYSETC_CHEETAH_V12 4036 // FYSETC Cheetah V1.2 (STM32F103RC)
|
||||
#define BOARD_LONGER3D_LK 4037 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE)
|
||||
#define BOARD_CCROBOT_MEEB_3DP 4038 // ccrobot-online.com MEEB_3DP (STM32F103RC)
|
||||
#define BOARD_CHITU3D_V5 4039 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE)
|
||||
#define BOARD_CHITU3D_V6 4040 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE)
|
||||
#define BOARD_CHITU3D_V9 4041 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE)
|
||||
#define BOARD_CREALITY_V4 4042 // Creality v4.x (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V422 4043 // Creality v4.2.2 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V423 4044 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V425 4045 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V427 4046 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V4210 4047 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
|
||||
#define BOARD_CREALITY_V431 4048 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_A 4049 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_B 4050 // Creality v4.3.1b (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_C 4051 // Creality v4.3.1c (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_D 4052 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V452 4053 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V453 4054 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V521 4055 // Creality v5.2.1 (STM32F103VE) as found in the SV04
|
||||
#define BOARD_CREALITY_V24S1 4056 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
|
||||
#define BOARD_CREALITY_V24S1_301 4057 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
|
||||
#define BOARD_CREALITY_V25S1 4058 // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
|
||||
#define BOARD_TRIGORILLA_PRO 4059 // Trigorilla Pro (STM32F103ZE)
|
||||
#define BOARD_FLY_MINI 4060 // FLYmaker FLY MINI (STM32F103RC)
|
||||
#define BOARD_FLSUN_HISPEED 4061 // FLSUN HiSpeedV1 (STM32F103VE)
|
||||
#define BOARD_BEAST 4062 // STM32F103RE Libmaple-based controller
|
||||
#define BOARD_MINGDA_MPX_ARM_MINI 4063 // STM32F103ZE Mingda MD-16
|
||||
#define BOARD_GTM32_PRO_VD 4064 // STM32F103VE controller
|
||||
#define BOARD_ZONESTAR_ZM3E2 4065 // Zonestar ZM3E2 (STM32F103RC)
|
||||
#define BOARD_ZONESTAR_ZM3E4 4066 // Zonestar ZM3E4 V1 (STM32F103VC)
|
||||
#define BOARD_ZONESTAR_ZM3E4V2 4067 // Zonestar ZM3E4 V2 (STM32F103VC)
|
||||
#define BOARD_ERYONE_ERY32_MINI 4068 // Eryone Ery32 mini (STM32F103VE)
|
||||
#define BOARD_PANDA_PI_V29 4069 // Panda Pi V2.9 - Standalone (STM32F103RC)
|
||||
#define BOARD_MALYAN_M200_V2 5000 // STM32F070CB controller
|
||||
#define BOARD_MALYAN_M300 5001 // STM32F070-based delta
|
||||
#define BOARD_STM32F103RE 5002 // STM32F103RE Libmaple-based STM32F1 controller
|
||||
#define BOARD_MALYAN_M200 5003 // STM32C8 Libmaple-based STM32F1 controller
|
||||
#define BOARD_STM3R_MINI 5004 // STM32F103RE Libmaple-based STM32F1 controller
|
||||
#define BOARD_GTM32_PRO_VB 5005 // STM32F103VE controller
|
||||
#define BOARD_GTM32_MINI 5006 // STM32F103VE controller
|
||||
#define BOARD_GTM32_MINI_A30 5007 // STM32F103VE controller
|
||||
#define BOARD_GTM32_REV_B 5008 // STM32F103VE controller
|
||||
#define BOARD_MORPHEUS 5009 // STM32F103C8 / STM32F103CB Libmaple-based STM32F1 controller
|
||||
#define BOARD_CHITU3D 5010 // Chitu3D (STM32F103RE)
|
||||
#define BOARD_MKS_ROBIN 5011 // MKS Robin (STM32F103ZE)
|
||||
#define BOARD_MKS_ROBIN_MINI 5012 // MKS Robin Mini (STM32F103VE)
|
||||
#define BOARD_MKS_ROBIN_NANO 5013 // MKS Robin Nano (STM32F103VE)
|
||||
#define BOARD_MKS_ROBIN_NANO_V2 5014 // MKS Robin Nano V2 (STM32F103VE)
|
||||
#define BOARD_MKS_ROBIN_LITE 5015 // MKS Robin Lite/Lite2 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_LITE3 5016 // MKS Robin Lite3 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_PRO 5017 // MKS Robin Pro (STM32F103ZE)
|
||||
#define BOARD_MKS_ROBIN_E3 5018 // MKS Robin E3 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3_V1_1 5019 // MKS Robin E3 V1.1 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3D 5020 // MKS Robin E3D (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3D_V1_1 5021 // MKS Robin E3D V1.1 (STM32F103RC)
|
||||
#define BOARD_MKS_ROBIN_E3P 5022 // MKS Robin E3P (STM32F103VE)
|
||||
#define BOARD_BTT_SKR_MINI_V1_1 5023 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V1_0 5024 // BigTreeTech SKR Mini E3 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V1_2 5025 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V2_0 5026 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_BTT_SKR_MINI_MZ_V1_0 5027 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_E3_DIP 5028 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_BTT_SKR_CR6 5029 // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
|
||||
#define BOARD_JGAURORA_A5S_A1 5030 // JGAurora A5S A1 (STM32F103ZE)
|
||||
#define BOARD_FYSETC_AIO_II 5031 // FYSETC AIO_II (STM32F103RC)
|
||||
#define BOARD_FYSETC_CHEETAH 5032 // FYSETC Cheetah (STM32F103RC)
|
||||
#define BOARD_FYSETC_CHEETAH_V12 5033 // FYSETC Cheetah V1.2 (STM32F103RC)
|
||||
#define BOARD_LONGER3D_LK 5034 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE)
|
||||
#define BOARD_CCROBOT_MEEB_3DP 5035 // ccrobot-online.com MEEB_3DP (STM32F103RC)
|
||||
#define BOARD_CHITU3D_V5 5036 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE)
|
||||
#define BOARD_CHITU3D_V6 5037 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE)
|
||||
#define BOARD_CHITU3D_V9 5038 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE)
|
||||
#define BOARD_CREALITY_V4 5039 // Creality v4.x (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V422 5040 // Creality v4.2.2 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V423 5041 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V425 5042 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V427 5043 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V4210 5044 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
|
||||
#define BOARD_CREALITY_V431 5045 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_A 5046 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_B 5047 // Creality v4.3.1b (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_C 5048 // Creality v4.3.1c (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_D 5049 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V452 5050 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V453 5051 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V521 5052 // Creality v5.2.1 (STM32F103VE) as found in the SV04
|
||||
#define BOARD_CREALITY_V24S1 5053 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
|
||||
#define BOARD_CREALITY_V24S1_301 5054 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
|
||||
#define BOARD_CREALITY_V25S1 5055 // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
|
||||
#define BOARD_TRIGORILLA_PRO 5056 // Trigorilla Pro (STM32F103ZE)
|
||||
#define BOARD_FLY_MINI 5057 // FLYmaker FLY MINI (STM32F103RC)
|
||||
#define BOARD_FLSUN_HISPEED 5058 // FLSUN HiSpeedV1 (STM32F103VE)
|
||||
#define BOARD_BEAST 5059 // STM32F103RE Libmaple-based controller
|
||||
#define BOARD_MINGDA_MPX_ARM_MINI 5060 // STM32F103ZE Mingda MD-16
|
||||
#define BOARD_GTM32_PRO_VD 5061 // STM32F103VE controller
|
||||
#define BOARD_ZONESTAR_ZM3E2 5062 // Zonestar ZM3E2 (STM32F103RC)
|
||||
#define BOARD_ZONESTAR_ZM3E4 5063 // Zonestar ZM3E4 V1 (STM32F103VC)
|
||||
#define BOARD_ZONESTAR_ZM3E4V2 5064 // Zonestar ZM3E4 V2 (STM32F103VC)
|
||||
#define BOARD_ERYONE_ERY32_MINI 5065 // Eryone Ery32 mini (STM32F103VE)
|
||||
#define BOARD_PANDA_PI_V29 5066 // Panda Pi V2.9 - Standalone (STM32F103RC)
|
||||
|
||||
//
|
||||
// ARM Cortex-M4F
|
||||
//
|
||||
|
||||
#define BOARD_TEENSY31_32 4100 // Teensy3.1 and Teensy3.2
|
||||
#define BOARD_TEENSY35_36 4101 // Teensy3.5 and Teensy3.6
|
||||
#define BOARD_TEENSY31_32 5100 // Teensy3.1 and Teensy3.2
|
||||
#define BOARD_TEENSY35_36 5101 // Teensy3.5 and Teensy3.6
|
||||
|
||||
//
|
||||
// STM32 ARM Cortex-M4F
|
||||
//
|
||||
|
||||
#define BOARD_ARMED 4200 // Arm'ed STM32F4-based controller
|
||||
#define BOARD_RUMBA32_V1_0 4201 // RUMBA32 STM32F446VE based controller from Aus3D
|
||||
#define BOARD_RUMBA32_V1_1 4202 // RUMBA32 STM32F446VE based controller from Aus3D
|
||||
#define BOARD_RUMBA32_MKS 4203 // RUMBA32 STM32F446VE based controller from Makerbase
|
||||
#define BOARD_RUMBA32_BTT 4204 // RUMBA32 STM32F446VE based controller from BIGTREETECH
|
||||
#define BOARD_BLACK_STM32F407VE 4205 // BLACK_STM32F407VE
|
||||
#define BOARD_BLACK_STM32F407ZE 4206 // BLACK_STM32F407ZE
|
||||
#define BOARD_BTT_SKR_PRO_V1_1 4207 // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
|
||||
#define BOARD_BTT_SKR_PRO_V1_2 4208 // BigTreeTech SKR Pro v1.2 (STM32F407ZG)
|
||||
#define BOARD_BTT_BTT002_V1_0 4209 // BigTreeTech BTT002 v1.0 (STM32F407VG)
|
||||
#define BOARD_BTT_E3_RRF 4210 // BigTreeTech E3 RRF (STM32F407VG)
|
||||
#define BOARD_BTT_SKR_V2_0_REV_A 4211 // BigTreeTech SKR v2.0 Rev A (STM32F407VG)
|
||||
#define BOARD_BTT_SKR_V2_0_REV_B 4212 // BigTreeTech SKR v2.0 Rev B (STM32F407VG/STM32F429VG)
|
||||
#define BOARD_BTT_GTR_V1_0 4213 // BigTreeTech GTR v1.0 (STM32F407IGT)
|
||||
#define BOARD_BTT_OCTOPUS_V1_0 4214 // BigTreeTech Octopus v1.0 (STM32F446ZE)
|
||||
#define BOARD_BTT_OCTOPUS_V1_1 4215 // BigTreeTech Octopus v1.1 (STM32F446ZE)
|
||||
#define BOARD_BTT_OCTOPUS_PRO_V1_0 4216 // BigTreeTech Octopus Pro v1.0 (STM32F446ZE / STM32F429ZG)
|
||||
#define BOARD_LERDGE_K 4217 // Lerdge K (STM32F407ZG)
|
||||
#define BOARD_LERDGE_S 4218 // Lerdge S (STM32F407VE)
|
||||
#define BOARD_LERDGE_X 4219 // Lerdge X (STM32F407VE)
|
||||
#define BOARD_VAKE403D 4220 // VAkE 403D (STM32F446VE)
|
||||
#define BOARD_FYSETC_S6 4221 // FYSETC S6 (STM32F446VE)
|
||||
#define BOARD_FYSETC_S6_V2_0 4222 // FYSETC S6 v2.0 (STM32F446VE)
|
||||
#define BOARD_FYSETC_SPIDER 4223 // FYSETC Spider (STM32F446VE)
|
||||
#define BOARD_FLYF407ZG 4224 // FLYmaker FLYF407ZG (STM32F407ZG)
|
||||
#define BOARD_MKS_ROBIN2 4225 // MKS_ROBIN2 (STM32F407ZE)
|
||||
#define BOARD_MKS_ROBIN_PRO_V2 4226 // MKS Robin Pro V2 (STM32F407VE)
|
||||
#define BOARD_MKS_ROBIN_NANO_V3 4227 // MKS Robin Nano V3 (STM32F407VG)
|
||||
#define BOARD_MKS_ROBIN_NANO_V3_1 4228 // MKS Robin Nano V3.1 (STM32F407VE)
|
||||
#define BOARD_MKS_MONSTER8_V1 4229 // MKS Monster8 V1 (STM32F407VE)
|
||||
#define BOARD_MKS_MONSTER8_V2 4230 // MKS Monster8 V2 (STM32F407VE)
|
||||
#define BOARD_ANET_ET4 4231 // ANET ET4 V1.x (STM32F407VG)
|
||||
#define BOARD_ANET_ET4P 4232 // ANET ET4P V1.x (STM32F407VG)
|
||||
#define BOARD_FYSETC_CHEETAH_V20 4233 // FYSETC Cheetah V2.0 (STM32F401RC)
|
||||
#define BOARD_TH3D_EZBOARD_V2 4234 // TH3D EZBoard v2.0 (STM32F405RG)
|
||||
#define BOARD_OPULO_LUMEN_REV3 4235 // Opulo Lumen PnP Controller REV3 (STM32F407VE / STM32F407VG)
|
||||
#define BOARD_MKS_ROBIN_NANO_V1_3_F4 4236 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VE)
|
||||
#define BOARD_MKS_EAGLE 4237 // MKS Eagle (STM32F407VE)
|
||||
#define BOARD_ARTILLERY_RUBY 4238 // Artillery Ruby (STM32F401RC)
|
||||
#define BOARD_FYSETC_SPIDER_V2_2 4239 // FYSETC Spider V2.2 (STM32F446VE)
|
||||
#define BOARD_CREALITY_V24S1_301F4 4240 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
|
||||
#define BOARD_OPULO_LUMEN_REV4 4241 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
|
||||
#define BOARD_FYSETC_SPIDER_KING407 4242 // FYSETC Spider King407 (STM32F407ZG)
|
||||
#define BOARD_MKS_SKIPR_V1 4243 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
|
||||
#define BOARD_TRONXY_V10 4244 // TRONXY V10 (STM32F446ZE)
|
||||
#define BOARD_ARMED 5200 // Arm'ed STM32F4-based controller
|
||||
#define BOARD_RUMBA32_V1_0 5201 // RUMBA32 STM32F446VE based controller from Aus3D
|
||||
#define BOARD_RUMBA32_V1_1 5202 // RUMBA32 STM32F446VE based controller from Aus3D
|
||||
#define BOARD_RUMBA32_MKS 5203 // RUMBA32 STM32F446VE based controller from Makerbase
|
||||
#define BOARD_RUMBA32_BTT 5204 // RUMBA32 STM32F446VE based controller from BIGTREETECH
|
||||
#define BOARD_BLACK_STM32F407VE 5205 // BLACK_STM32F407VE
|
||||
#define BOARD_BLACK_STM32F407ZE 5206 // BLACK_STM32F407ZE
|
||||
#define BOARD_BTT_SKR_MINI_E3_V3_0_1 5207 // BigTreeTech SKR Mini E3 V3.0.1 (STM32F401RC)
|
||||
#define BOARD_BTT_SKR_PRO_V1_1 5208 // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
|
||||
#define BOARD_BTT_SKR_PRO_V1_2 5209 // BigTreeTech SKR Pro v1.2 (STM32F407ZG)
|
||||
#define BOARD_BTT_BTT002_V1_0 5210 // BigTreeTech BTT002 v1.0 (STM32F407VG)
|
||||
#define BOARD_BTT_E3_RRF 5211 // BigTreeTech E3 RRF (STM32F407VG)
|
||||
#define BOARD_BTT_SKR_V2_0_REV_A 5212 // BigTreeTech SKR v2.0 Rev A (STM32F407VG)
|
||||
#define BOARD_BTT_SKR_V2_0_REV_B 5213 // BigTreeTech SKR v2.0 Rev B (STM32F407VG/STM32F429VG)
|
||||
#define BOARD_BTT_GTR_V1_0 5214 // BigTreeTech GTR v1.0 (STM32F407IGT)
|
||||
#define BOARD_BTT_OCTOPUS_V1_0 5215 // BigTreeTech Octopus v1.0 (STM32F446ZE)
|
||||
#define BOARD_BTT_OCTOPUS_V1_1 5216 // BigTreeTech Octopus v1.1 (STM32F446ZE)
|
||||
#define BOARD_BTT_OCTOPUS_PRO_V1_0 5217 // BigTreeTech Octopus Pro v1.0 (STM32F446ZE / STM32F429ZG)
|
||||
#define BOARD_LERDGE_K 5218 // Lerdge K (STM32F407ZG)
|
||||
#define BOARD_LERDGE_S 5219 // Lerdge S (STM32F407VE)
|
||||
#define BOARD_LERDGE_X 5220 // Lerdge X (STM32F407VE)
|
||||
#define BOARD_VAKE403D 5221 // VAkE 403D (STM32F446VE)
|
||||
#define BOARD_FYSETC_S6 5222 // FYSETC S6 (STM32F446VE)
|
||||
#define BOARD_FYSETC_S6_V2_0 5223 // FYSETC S6 v2.0 (STM32F446VE)
|
||||
#define BOARD_FYSETC_SPIDER 5224 // FYSETC Spider (STM32F446VE)
|
||||
#define BOARD_FLYF407ZG 5225 // FLYmaker FLYF407ZG (STM32F407ZG)
|
||||
#define BOARD_MKS_ROBIN2 5226 // MKS_ROBIN2 (STM32F407ZE)
|
||||
#define BOARD_MKS_ROBIN_PRO_V2 5227 // MKS Robin Pro V2 (STM32F407VE)
|
||||
#define BOARD_MKS_ROBIN_NANO_V3 5228 // MKS Robin Nano V3 (STM32F407VG)
|
||||
#define BOARD_MKS_ROBIN_NANO_V3_1 5229 // MKS Robin Nano V3.1 (STM32F407VE)
|
||||
#define BOARD_MKS_MONSTER8_V1 5230 // MKS Monster8 V1 (STM32F407VE)
|
||||
#define BOARD_MKS_MONSTER8_V2 5231 // MKS Monster8 V2 (STM32F407VE)
|
||||
#define BOARD_ANET_ET4 5232 // ANET ET4 V1.x (STM32F407VG)
|
||||
#define BOARD_ANET_ET4P 5233 // ANET ET4P V1.x (STM32F407VG)
|
||||
#define BOARD_FYSETC_CHEETAH_V20 5234 // FYSETC Cheetah V2.0 (STM32F401RC)
|
||||
#define BOARD_TH3D_EZBOARD_V2 5235 // TH3D EZBoard v2.0 (STM32F405RG)
|
||||
#define BOARD_OPULO_LUMEN_REV3 5236 // Opulo Lumen PnP Controller REV3 (STM32F407VE / STM32F407VG)
|
||||
#define BOARD_MKS_ROBIN_NANO_V1_3_F4 5237 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VE)
|
||||
#define BOARD_MKS_EAGLE 5238 // MKS Eagle (STM32F407VE)
|
||||
#define BOARD_ARTILLERY_RUBY 5239 // Artillery Ruby (STM32F401RC)
|
||||
#define BOARD_FYSETC_SPIDER_V2_2 5240 // FYSETC Spider V2.2 (STM32F446VE)
|
||||
#define BOARD_CREALITY_V24S1_301F4 5241 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
|
||||
#define BOARD_OPULO_LUMEN_REV4 5242 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
|
||||
#define BOARD_FYSETC_SPIDER_KING407 5243 // FYSETC Spider King407 (STM32F407ZG)
|
||||
#define BOARD_MKS_SKIPR_V1 5244 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
|
||||
#define BOARD_TRONXY_V10 5245 // TRONXY V10 (STM32F446ZE)
|
||||
|
||||
//
|
||||
// ARM Cortex M7
|
||||
// ARM Cortex-M7
|
||||
//
|
||||
|
||||
#define BOARD_REMRAM_V1 5000 // RemRam v1
|
||||
#define BOARD_TEENSY41 5001 // Teensy 4.1
|
||||
#define BOARD_T41U5XBB 5002 // T41U5XBB Teensy 4.1 breakout board
|
||||
#define BOARD_NUCLEO_F767ZI 5003 // ST NUCLEO-F767ZI Dev Board
|
||||
#define BOARD_BTT_SKR_SE_BX_V2 5004 // BigTreeTech SKR SE BX V2.0 (STM32H743II)
|
||||
#define BOARD_BTT_SKR_SE_BX_V3 5005 // BigTreeTech SKR SE BX V3.0 (STM32H743II)
|
||||
#define BOARD_BTT_SKR_V3_0 5006 // BigTreeTech SKR V3.0 (STM32H743VG)
|
||||
#define BOARD_BTT_SKR_V3_0_EZ 5007 // BigTreeTech SKR V3.0 EZ (STM32H743VG)
|
||||
#define BOARD_REMRAM_V1 6000 // RemRam v1
|
||||
#define BOARD_TEENSY41 6001 // Teensy 4.1
|
||||
#define BOARD_T41U5XBB 6002 // T41U5XBB Teensy 4.1 breakout board
|
||||
#define BOARD_NUCLEO_F767ZI 6003 // ST NUCLEO-F767ZI Dev Board
|
||||
#define BOARD_BTT_SKR_SE_BX_V2 6004 // BigTreeTech SKR SE BX V2.0 (STM32H743II)
|
||||
#define BOARD_BTT_SKR_SE_BX_V3 6005 // BigTreeTech SKR SE BX V3.0 (STM32H743II)
|
||||
#define BOARD_BTT_SKR_V3_0 6006 // BigTreeTech SKR V3.0 (STM32H743VG)
|
||||
#define BOARD_BTT_SKR_V3_0_EZ 6007 // BigTreeTech SKR V3.0 EZ (STM32H743VG)
|
||||
|
||||
//
|
||||
// Espressif ESP32 WiFi
|
||||
//
|
||||
|
||||
#define BOARD_ESPRESSIF_ESP32 6000 // Generic ESP32
|
||||
#define BOARD_MRR_ESPA 6001 // MRR ESPA based on ESP32 (native pins only)
|
||||
#define BOARD_MRR_ESPE 6002 // MRR ESPE based on ESP32 (with I2S stepper stream)
|
||||
#define BOARD_E4D_BOX 6003 // E4d@BOX
|
||||
#define BOARD_RESP32_CUSTOM 6004 // Rutilea ESP32 custom board
|
||||
#define BOARD_FYSETC_E4 6005 // FYSETC E4
|
||||
#define BOARD_PANDA_ZHU 6006 // Panda_ZHU
|
||||
#define BOARD_PANDA_M4 6007 // Panda_M4
|
||||
#define BOARD_MKS_TINYBEE 6008 // MKS TinyBee based on ESP32 (with I2S stepper stream)
|
||||
#define BOARD_ENWI_ESPNP 6009 // enwi ESPNP based on ESP32 (with I2S stepper stream)
|
||||
#define BOARD_ESPRESSIF_ESP32 7000 // Generic ESP32
|
||||
#define BOARD_MRR_ESPA 7001 // MRR ESPA based on ESP32 (native pins only)
|
||||
#define BOARD_MRR_ESPE 7002 // MRR ESPE based on ESP32 (with I2S stepper stream)
|
||||
#define BOARD_E4D_BOX 7003 // E4d@BOX
|
||||
#define BOARD_RESP32_CUSTOM 7004 // Rutilea ESP32 custom board
|
||||
#define BOARD_FYSETC_E4 7005 // FYSETC E4
|
||||
#define BOARD_PANDA_ZHU 7006 // Panda_ZHU
|
||||
#define BOARD_PANDA_M4 7007 // Panda_M4
|
||||
#define BOARD_MKS_TINYBEE 7008 // MKS TinyBee based on ESP32 (with I2S stepper stream)
|
||||
#define BOARD_ENWI_ESPNP 7009 // enwi ESPNP based on ESP32 (with I2S stepper stream)
|
||||
|
||||
//
|
||||
// SAMD51 ARM Cortex M4
|
||||
// SAMD51 ARM Cortex-M4
|
||||
//
|
||||
|
||||
#define BOARD_AGCM4_RAMPS_144 6100 // RAMPS 1.4.4
|
||||
#define BOARD_BRICOLEMON_V1_0 6101 // Bricolemon
|
||||
#define BOARD_BRICOLEMON_LITE_V1_0 6102 // Bricolemon Lite
|
||||
#define BOARD_AGCM4_RAMPS_144 7100 // RAMPS 1.4.4
|
||||
#define BOARD_BRICOLEMON_V1_0 7101 // Bricolemon
|
||||
#define BOARD_BRICOLEMON_LITE_V1_0 7102 // Bricolemon Lite
|
||||
|
||||
//
|
||||
// SAMD21 ARM Cortex M4
|
||||
// SAMD21 ARM Cortex-M4
|
||||
//
|
||||
|
||||
#define BOARD_MINITRONICS20 6103 // Minitronics v2.0
|
||||
#define BOARD_MINITRONICS20 7103 // Minitronics v2.0
|
||||
|
||||
//
|
||||
// Custom board
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
// eu Basque-Euskera
|
||||
// fi Finnish
|
||||
// fr French
|
||||
// fr_na French without accents (DWIN T5UID1 touchscreen)
|
||||
// gl Galician
|
||||
// hr Croatian
|
||||
// hu Hungarian
|
||||
|
||||
@@ -634,7 +634,9 @@
|
||||
#define DEFER4(M) M EMPTY EMPTY EMPTY EMPTY()()()()
|
||||
|
||||
// Force define expansion
|
||||
#define EVAL(V...) EVAL16(V)
|
||||
#define EVAL EVAL16
|
||||
#define EVAL4096(V...) EVAL2048(EVAL2048(V))
|
||||
#define EVAL2048(V...) EVAL1024(EVAL1024(V))
|
||||
#define EVAL1024(V...) EVAL512(EVAL512(V))
|
||||
#define EVAL512(V...) EVAL256(EVAL256(V))
|
||||
#define EVAL256(V...) EVAL128(EVAL128(V))
|
||||
@@ -712,10 +714,24 @@
|
||||
( DEFER2(__RREPEAT2)()(ADD1(_RPT_I),SUB1(_RPT_N),_RPT_OP,V) ) \
|
||||
( /* Do nothing */ )
|
||||
#define __RREPEAT2() _RREPEAT2
|
||||
#define RREPEAT_S(S,N,OP) EVAL1024(_RREPEAT(S,SUB##S(N),OP))
|
||||
#define RREPEAT(N,OP) RREPEAT_S(0,N,OP)
|
||||
#define RREPEAT2_S(S,N,OP,V...) EVAL1024(_RREPEAT2(S,SUB##S(N),OP,V))
|
||||
#define RREPEAT2(N,OP,V...) RREPEAT2_S(0,N,OP,V)
|
||||
#define RREPEAT_S(S,N,OP) EVAL1024(_RREPEAT(S,SUB##S(N),OP))
|
||||
#define RREPEAT(N,OP) RREPEAT_S(0,N,OP)
|
||||
#define RREPEAT_1(N,OP) RREPEAT_S(1,INCREMENT(N),OP)
|
||||
#define RREPEAT2_S(S,N,OP,V...) EVAL1024(_RREPEAT2(S,SUB##S(N),OP,V))
|
||||
#define RREPEAT2(N,OP,V...) RREPEAT2_S(0,N,OP,V)
|
||||
|
||||
// Emit a list of N OP(I) items with ascending counter.
|
||||
#define _REPLIST(_RPT_I,_RPT_N,_RPT_OP) \
|
||||
_RPT_OP(_RPT_I) \
|
||||
IF_ELSE(SUB1(_RPT_N)) \
|
||||
( , DEFER2(__REPLIST)()(ADD1(_RPT_I),SUB1(_RPT_N),_RPT_OP) ) \
|
||||
( /* Do nothing */ )
|
||||
#define __REPLIST() _REPLIST
|
||||
|
||||
// Repeat a macro, comma-separated, passing S...N-1.
|
||||
#define REPLIST_S(S,N,OP) EVAL(_REPLIST(S,SUB##S(N),OP))
|
||||
#define REPLIST(N,OP) REPLIST_S(0,N,OP)
|
||||
#define REPLIST_1(N,OP) REPLIST_S(1,INCREMENT(N),OP)
|
||||
|
||||
// Call OP(A) with each item as an argument
|
||||
#define _MAP(_MAP_OP,A,V...) \
|
||||
|
||||
+34
-29
@@ -31,10 +31,8 @@
|
||||
//
|
||||
// typename IF<(MYOPT==12), int, float>::type myvar;
|
||||
//
|
||||
template <bool, class L, class R>
|
||||
struct IF { typedef R type; };
|
||||
template <class L, class R>
|
||||
struct IF<true, L, R> { typedef L type; };
|
||||
template <bool, class L, class R> struct IF { typedef R type; };
|
||||
template <class L, class R> struct IF<true, L, R> { typedef L type; };
|
||||
|
||||
#define ALL_AXIS_NAMES X, X2, Y, Y2, Z, Z2, Z3, Z4, I, J, K, U, V, W, E0, E1, E2, E3, E4, E5, E6, E7
|
||||
|
||||
@@ -44,7 +42,7 @@ struct IF<true, L, R> { typedef L type; };
|
||||
#define NUM_AXIS_LIST_1(V) LIST_N_1(NUM_AXES, V)
|
||||
#define NUM_AXIS_ARRAY(V...) { NUM_AXIS_LIST(V) }
|
||||
#define NUM_AXIS_ARRAY_1(V) { NUM_AXIS_LIST_1(V) }
|
||||
#define NUM_AXIS_ARGS(T...) NUM_AXIS_LIST(T x, T y, T z, T i, T j, T k, T u, T v, T w)
|
||||
#define NUM_AXIS_ARGS(T) NUM_AXIS_LIST(T x, T y, T z, T i, T j, T k, T u, T v, T w)
|
||||
#define NUM_AXIS_ELEM(O) NUM_AXIS_LIST(O.x, O.y, O.z, O.i, O.j, O.k, O.u, O.v, O.w)
|
||||
#define NUM_AXIS_DEFS(T,V) NUM_AXIS_LIST(T x=V, T y=V, T z=V, T i=V, T j=V, T k=V, T u=V, T v=V, T w=V)
|
||||
#define MAIN_AXIS_NAMES NUM_AXIS_LIST(X, Y, Z, I, J, K, U, V, W)
|
||||
@@ -57,7 +55,7 @@ struct IF<true, L, R> { typedef L type; };
|
||||
#define LOGICAL_AXIS_LIST_1(V) NUM_AXIS_LIST_1(V) LIST_ITEM_E(V)
|
||||
#define LOGICAL_AXIS_ARRAY(E,V...) { LOGICAL_AXIS_LIST(E,V) }
|
||||
#define LOGICAL_AXIS_ARRAY_1(V) { LOGICAL_AXIS_LIST_1(V) }
|
||||
#define LOGICAL_AXIS_ARGS(T...) LOGICAL_AXIS_LIST(T e, T x, T y, T z, T i, T j, T k, T u, T v, T w)
|
||||
#define LOGICAL_AXIS_ARGS(T) LOGICAL_AXIS_LIST(T e, T x, T y, T z, T i, T j, T k, T u, T v, T w)
|
||||
#define LOGICAL_AXIS_ELEM(O) LOGICAL_AXIS_LIST(O.e, O.x, O.y, O.z, O.i, O.j, O.k, O.u, O.v, O.w)
|
||||
#define LOGICAL_AXIS_DECL(T,V) LOGICAL_AXIS_LIST(T e=V, T x=V, T y=V, T z=V, T i=V, T j=V, T k=V, T u=V, T v=V, T w=V)
|
||||
#define LOGICAL_AXIS_NAMES LOGICAL_AXIS_LIST(E, X, Y, Z, I, J, K, U, V, W)
|
||||
@@ -86,24 +84,31 @@ struct IF<true, L, R> { typedef L type; };
|
||||
|
||||
#define AXIS_COLLISION(L) (AXIS4_NAME == L || AXIS5_NAME == L || AXIS6_NAME == L || AXIS7_NAME == L || AXIS8_NAME == L || AXIS9_NAME == L)
|
||||
|
||||
// Define types based on largest bit width stored value required
|
||||
#define bits_t(W) typename IF<((W)> 16), uint32_t, typename IF<((W)> 8), uint16_t, uint8_t>::type>::type
|
||||
#define uvalue_t(V) typename IF<((V)>65535), uint32_t, typename IF<((V)>255), uint16_t, uint8_t>::type>::type
|
||||
#define value_t(V) typename IF<((V)>32767), int32_t, typename IF<((V)>127), int16_t, int8_t>::type>::type
|
||||
|
||||
// General Flags for some number of states
|
||||
template<size_t N>
|
||||
struct Flags {
|
||||
typedef typename IF<(N>8), uint16_t, uint8_t>::type bits_t;
|
||||
typedef value_t(N) flagbits_t;
|
||||
typedef struct { bool b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1, b7:1; } N8;
|
||||
typedef struct { bool b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1, b7:1, b8:1, b9:1, b10:1, b11:1, b12:1, b13:1, b14:1, b15:1; } N16;
|
||||
typedef struct { bool b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1, b7:1, b8:1, b9:1, b10:1, b11:1, b12:1, b13:1, b14:1, b15:1,
|
||||
b16:1, b17:1, b18:1, b19:1, b20:1, b21:1, b22:1, b23:1, b24:1, b25:1, b26:1, b27:1, b28:1, b29:1, b30:1, b31:1; } N32;
|
||||
union {
|
||||
bits_t b;
|
||||
typename IF<(N>8), N16, N8>::type flag;
|
||||
flagbits_t b;
|
||||
typename IF<(N>16), N32, typename IF<(N>8), N16, N8>::type>::type flag;
|
||||
};
|
||||
void reset() { b = 0; }
|
||||
void set(const int n, const bool onoff) { onoff ? set(n) : clear(n); }
|
||||
void set(const int n) { b |= (bits_t)_BV(n); }
|
||||
void clear(const int n) { b &= ~(bits_t)_BV(n); }
|
||||
bool test(const int n) const { return TEST(b, n); }
|
||||
bool operator[](const int n) { return test(n); }
|
||||
bool operator[](const int n) const { return test(n); }
|
||||
int size() const { return sizeof(b); }
|
||||
void reset() { b = 0; }
|
||||
void set(const int n, const bool onoff) { onoff ? set(n) : clear(n); }
|
||||
void set(const int n) { b |= (flagbits_t)_BV(n); }
|
||||
void clear(const int n) { b &= ~(flagbits_t)_BV(n); }
|
||||
bool test(const int n) const { return TEST(b, n); }
|
||||
bool operator[](const int n) { return test(n); }
|
||||
bool operator[](const int n) const { return test(n); }
|
||||
int size() const { return sizeof(b); }
|
||||
};
|
||||
|
||||
// Specialization for a single bool flag
|
||||
@@ -129,14 +134,14 @@ typedef struct AxisFlags {
|
||||
struct Flags<LOGICAL_AXES> flags;
|
||||
struct { bool LOGICAL_AXIS_LIST(e:1, x:1, y:1, z:1, i:1, j:1, k:1, u:1, v:1, w:1); };
|
||||
};
|
||||
void reset() { flags.reset(); }
|
||||
void set(const int n) { flags.set(n); }
|
||||
void set(const int n, const bool onoff) { flags.set(n, onoff); }
|
||||
void clear(const int n) { flags.clear(n); }
|
||||
bool test(const int n) const { return flags.test(n); }
|
||||
bool operator[](const int n) { return flags[n]; }
|
||||
bool operator[](const int n) const { return flags[n]; }
|
||||
int size() const { return sizeof(flags); }
|
||||
void reset() { flags.reset(); }
|
||||
void set(const int n) { flags.set(n); }
|
||||
void set(const int n, const bool onoff) { flags.set(n, onoff); }
|
||||
void clear(const int n) { flags.clear(n); }
|
||||
bool test(const int n) const { return flags.test(n); }
|
||||
bool operator[](const int n) { return flags[n]; }
|
||||
bool operator[](const int n) const { return flags[n]; }
|
||||
int size() const { return sizeof(flags); }
|
||||
} axis_flags_t;
|
||||
|
||||
//
|
||||
@@ -182,15 +187,15 @@ enum AxisEnum : uint8_t {
|
||||
, ALL_AXES_ENUM = 0xFE, NO_AXIS_ENUM = 0xFF
|
||||
};
|
||||
|
||||
typedef IF<(NUM_AXIS_ENUMS > 8), uint16_t, uint8_t>::type axis_bits_t;
|
||||
typedef bits_t(NUM_AXIS_ENUMS) axis_bits_t;
|
||||
|
||||
//
|
||||
// Loop over axes
|
||||
//
|
||||
#define LOOP_ABC(VAR) LOOP_S_LE_N(VAR, A_AXIS, C_AXIS)
|
||||
#define LOOP_NUM_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, NUM_AXES)
|
||||
#define LOOP_LOGICAL_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, LOGICAL_AXES)
|
||||
#define LOOP_DISTINCT_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, DISTINCT_AXES)
|
||||
#define LOOP_NUM_AXES(VAR) LOOP_S_L_N(VAR, 0, NUM_AXES)
|
||||
#define LOOP_LOGICAL_AXES(VAR) LOOP_S_L_N(VAR, 0, LOGICAL_AXES)
|
||||
#define LOOP_DISTINCT_AXES(VAR) LOOP_S_L_N(VAR, 0, DISTINCT_AXES)
|
||||
#define LOOP_DISTINCT_E(VAR) LOOP_L_N(VAR, DISTINCT_E)
|
||||
|
||||
//
|
||||
|
||||
@@ -38,12 +38,12 @@ void safe_delay(millis_t ms); // Delay ensuring that temperatures are
|
||||
// 16x16 bit arrays
|
||||
template <int W, int H>
|
||||
struct FlagBits {
|
||||
typename IF<(W>8), uint16_t, uint8_t>::type bits[H];
|
||||
void fill() { memset(bits, 0xFF, sizeof(bits)); }
|
||||
void reset() { memset(bits, 0x00, sizeof(bits)); }
|
||||
void unmark(const uint8_t x, const uint8_t y) { CBI(bits[y], x); }
|
||||
void mark(const uint8_t x, const uint8_t y) { SBI(bits[y], x); }
|
||||
bool marked(const uint8_t x, const uint8_t y) { return TEST(bits[y], x); }
|
||||
bits_t(W) flags[H];
|
||||
void fill() { memset(flags, 0xFF, sizeof(flags)); }
|
||||
void reset() { memset(flags, 0x00, sizeof(flags)); }
|
||||
void unmark(const uint8_t x, const uint8_t y) { CBI(flags[y], x); }
|
||||
void mark(const uint8_t x, const uint8_t y) { SBI(flags[y], x); }
|
||||
bool marked(const uint8_t x, const uint8_t y) { return TEST(flags[y], x); }
|
||||
inline void unmark(const xy_int8_t &xy) { unmark(xy.x, xy.y); }
|
||||
inline void mark(const xy_int8_t &xy) { mark(xy.x, xy.y); }
|
||||
inline bool marked(const xy_int8_t &xy) { return marked(xy.x, xy.y); }
|
||||
|
||||
@@ -153,7 +153,7 @@ void LevelingBilinear::extrapolate_unprobed_bed_level() {
|
||||
}
|
||||
}
|
||||
|
||||
void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values /*= NULL*/) {
|
||||
void LevelingBilinear::print_leveling_grid(const bed_mesh_t* _z_values/*=nullptr*/) {
|
||||
// print internal grid(s) or just the one passed as a parameter
|
||||
SERIAL_ECHOLNPGM("Bilinear Leveling Grid:");
|
||||
print_2d_array(GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y, 3, _z_values ? *_z_values[0] : z_values[0]);
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
static void reset();
|
||||
static void set_grid(const xy_pos_t& _grid_spacing, const xy_pos_t& _grid_start);
|
||||
static void extrapolate_unprobed_bed_level();
|
||||
static void print_leveling_grid(const bed_mesh_t* _z_values = NULL);
|
||||
static void print_leveling_grid(const bed_mesh_t *_z_values=nullptr);
|
||||
static void refresh_bed_level();
|
||||
static bool has_mesh() { return !!grid_spacing.x; }
|
||||
static bool mesh_is_valid() { return has_mesh(); }
|
||||
|
||||
@@ -32,8 +32,8 @@ enum MeshLevelingState : char {
|
||||
MeshReset // G29 S5
|
||||
};
|
||||
|
||||
#define MESH_X_DIST (float(MESH_MAX_X - (MESH_MIN_X)) / (GRID_MAX_CELLS_X))
|
||||
#define MESH_Y_DIST (float(MESH_MAX_Y - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y))
|
||||
#define MESH_X_DIST (float((MESH_MAX_X) - (MESH_MIN_X)) / (GRID_MAX_CELLS_X))
|
||||
#define MESH_Y_DIST (float((MESH_MAX_Y) - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y))
|
||||
|
||||
class mesh_bed_leveling {
|
||||
public:
|
||||
|
||||
@@ -38,8 +38,8 @@ enum MeshPointType : char { INVALID, REAL, SET_IN_BITMAP, CLOSEST };
|
||||
|
||||
struct mesh_index_pair;
|
||||
|
||||
#define MESH_X_DIST (float(MESH_MAX_X - (MESH_MIN_X)) / (GRID_MAX_CELLS_X))
|
||||
#define MESH_Y_DIST (float(MESH_MAX_Y - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y))
|
||||
#define MESH_X_DIST (float((MESH_MAX_X) - (MESH_MIN_X)) / (GRID_MAX_CELLS_X))
|
||||
#define MESH_Y_DIST (float((MESH_MAX_Y) - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y))
|
||||
|
||||
#if ENABLED(OPTIMIZED_MESH_STORAGE)
|
||||
typedef int16_t mesh_store_t[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
|
||||
@@ -264,9 +264,9 @@ public:
|
||||
return UBL_Z_RAISE_WHEN_OFF_MESH;
|
||||
#endif
|
||||
|
||||
const uint8_t mx = _MIN(cx, (GRID_MAX_POINTS_X) - 2) + 1, my = _MIN(cy, (GRID_MAX_POINTS_Y) - 2) + 1,
|
||||
x0 = get_mesh_x(cx), x1 = get_mesh_x(cx + 1);
|
||||
const float z1 = calc_z0(rx0, x0, z_values[cx][cy], x1, z_values[mx][cy]),
|
||||
const uint8_t mx = _MIN(cx, (GRID_MAX_POINTS_X) - 2) + 1, my = _MIN(cy, (GRID_MAX_POINTS_Y) - 2) + 1;
|
||||
const float x0 = get_mesh_x(cx), x1 = get_mesh_x(cx + 1),
|
||||
z1 = calc_z0(rx0, x0, z_values[cx][cy], x1, z_values[mx][cy]),
|
||||
z2 = calc_z0(rx0, x0, z_values[cx][my], x1, z_values[mx][my]);
|
||||
float z0 = calc_z0(ry0, get_mesh_y(cy), z1, get_mesh_y(cy + 1), z2);
|
||||
|
||||
|
||||
@@ -318,9 +318,7 @@ void unified_bed_leveling::G29() {
|
||||
TERN_(HAS_MULTI_HOTEND, if (active_extruder != 0) tool_change(0, true));
|
||||
|
||||
// Position bed horizontally and Z probe vertically.
|
||||
#if defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
|
||||
|| defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
|
||||
|| defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
|
||||
#if HAS_SAFE_BED_LEVELING
|
||||
xyze_pos_t safe_position = current_position;
|
||||
#ifdef SAFE_BED_LEVELING_START_X
|
||||
safe_position.x = SAFE_BED_LEVELING_START_X;
|
||||
@@ -351,7 +349,7 @@ void unified_bed_leveling::G29() {
|
||||
#endif
|
||||
|
||||
do_blocking_move_to(safe_position);
|
||||
#endif
|
||||
#endif // HAS_SAFE_BED_LEVELING
|
||||
}
|
||||
|
||||
// Invalidate one or more nearby mesh points, possibly all.
|
||||
@@ -887,8 +885,32 @@ void set_message_with_feedback(FSTR_P const fstr) {
|
||||
ui.capture();
|
||||
save_ubl_active_state_and_disable(); // Disable bed level correction for probing
|
||||
|
||||
do_blocking_move_to(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)), MANUAL_PROBE_START_Z);
|
||||
//, _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]) * 0.5f);
|
||||
do_blocking_move_to(
|
||||
NUM_AXIS_LIST(
|
||||
0.5f * ((MESH_MAX_X) - (MESH_MIN_X)),
|
||||
0.5f * ((MESH_MAX_Y) - (MESH_MIN_Y)),
|
||||
MANUAL_PROBE_START_Z
|
||||
#ifdef SAFE_BED_LEVELING_START_I
|
||||
, SAFE_BED_LEVELING_START_I
|
||||
#endif
|
||||
#ifdef SAFE_BED_LEVELING_START_J
|
||||
, SAFE_BED_LEVELING_START_J
|
||||
#endif
|
||||
#ifdef SAFE_BED_LEVELING_START_K
|
||||
, SAFE_BED_LEVELING_START_K
|
||||
#endif
|
||||
#ifdef SAFE_BED_LEVELING_START_U
|
||||
, SAFE_BED_LEVELING_START_U
|
||||
#endif
|
||||
#ifdef SAFE_BED_LEVELING_START_V
|
||||
, SAFE_BED_LEVELING_START_V
|
||||
#endif
|
||||
#ifdef SAFE_BED_LEVELING_START_W
|
||||
, SAFE_BED_LEVELING_START_W
|
||||
#endif
|
||||
)
|
||||
//, _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]) * 0.5f
|
||||
);
|
||||
planner.synchronize();
|
||||
|
||||
SERIAL_ECHOPGM("Place shim under nozzle");
|
||||
@@ -1456,9 +1478,17 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
#include "../../../libs/vector_3.h"
|
||||
|
||||
void unified_bed_leveling::tilt_mesh_based_on_probed_grid(const bool do_3_pt_leveling) {
|
||||
const float x_min = probe.min_x(), x_max = probe.max_x(),
|
||||
y_min = probe.min_y(), y_max = probe.max_y(),
|
||||
dx = (x_max - x_min) / (param.J_grid_size - 1),
|
||||
|
||||
#ifdef G29J_MESH_TILT_MARGIN
|
||||
const float x_min = _MAX(probe.min_x() + (G29J_MESH_TILT_MARGIN), X_MIN_POS),
|
||||
x_max = _MIN(probe.max_x() - (G29J_MESH_TILT_MARGIN), X_MAX_POS),
|
||||
y_min = _MAX(probe.min_y() + (G29J_MESH_TILT_MARGIN), Y_MIN_POS),
|
||||
y_max = _MIN(probe.max_y() - (G29J_MESH_TILT_MARGIN), Y_MAX_POS);
|
||||
#else
|
||||
const float x_min = probe.min_x(), x_max = probe.max_x(),
|
||||
y_min = probe.min_y(), y_max = probe.max_y();
|
||||
#endif
|
||||
const float dx = (x_max - x_min) / (param.J_grid_size - 1),
|
||||
dy = (y_max - y_min) / (param.J_grid_size - 1);
|
||||
|
||||
xy_float_t points[3];
|
||||
@@ -1467,7 +1497,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
float measured_z;
|
||||
bool abort_flag = false;
|
||||
|
||||
#ifdef VALIDATE_MESH_TILT
|
||||
#if ENABLED(VALIDATE_MESH_TILT)
|
||||
float z1, z2, z3; // Needed for algorithm validation below
|
||||
#endif
|
||||
|
||||
@@ -1483,9 +1513,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
abort_flag = true;
|
||||
else {
|
||||
measured_z -= get_z_correction(points[0]);
|
||||
#ifdef VALIDATE_MESH_TILT
|
||||
z1 = measured_z;
|
||||
#endif
|
||||
TERN_(VALIDATE_MESH_TILT, z1 = measured_z);
|
||||
if (param.V_verbosity > 3) {
|
||||
serial_spaces(16);
|
||||
SERIAL_ECHOLNPGM("Corrected_Z=", measured_z);
|
||||
@@ -1498,9 +1526,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " 2/3"), GET_TEXT(MSG_LCD_TILTING_MESH)));
|
||||
|
||||
measured_z = probe.probe_at_point(points[1], PROBE_PT_RAISE, param.V_verbosity);
|
||||
#ifdef VALIDATE_MESH_TILT
|
||||
z2 = measured_z;
|
||||
#endif
|
||||
TERN_(VALIDATE_MESH_TILT, z2 = measured_z);
|
||||
if (isnan(measured_z))
|
||||
abort_flag = true;
|
||||
else {
|
||||
@@ -1518,9 +1544,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " 3/3"), GET_TEXT(MSG_LCD_TILTING_MESH)));
|
||||
|
||||
measured_z = probe.probe_at_point(points[2], PROBE_PT_LAST_STOW, param.V_verbosity);
|
||||
#ifdef VALIDATE_MESH_TILT
|
||||
z3 = measured_z;
|
||||
#endif
|
||||
TERN_(VALIDATE_MESH_TILT, z3 = measured_z);
|
||||
if (isnan(measured_z))
|
||||
abort_flag = true;
|
||||
else {
|
||||
@@ -1667,7 +1691,7 @@ void unified_bed_leveling::smart_fill_mesh() {
|
||||
* The Z error between the probed point locations and the get_z_correction()
|
||||
* numbers for those locations should be 0.
|
||||
*/
|
||||
#ifdef VALIDATE_MESH_TILT
|
||||
#if ENABLED(VALIDATE_MESH_TILT)
|
||||
auto d_from = []{ DEBUG_ECHOPGM("D from "); };
|
||||
auto normed = [&](const xy_pos_t &pos, const_float_t zadd) {
|
||||
return normal.x * pos.x + normal.y * pos.y + zadd;
|
||||
|
||||
@@ -80,9 +80,6 @@ namespace DirectStepping {
|
||||
static void set_page_state(const page_idx_t page_idx, const PageState page_state);
|
||||
};
|
||||
|
||||
template<bool b, typename T, typename F> struct TypeSelector { typedef T type;} ;
|
||||
template<typename T, typename F> struct TypeSelector<false, T, F> { typedef F type; };
|
||||
|
||||
template <int num_pages, int num_axes, int bits_segment, bool dir, int segments>
|
||||
struct config_t {
|
||||
static constexpr char CONTROL_CHAR = '!';
|
||||
@@ -98,8 +95,8 @@ namespace DirectStepping {
|
||||
static constexpr int TOTAL_STEPS = SEGMENT_STEPS * SEGMENTS;
|
||||
static constexpr int PAGE_SIZE = (AXIS_COUNT * BITS_SEGMENT * SEGMENTS) / 8;
|
||||
|
||||
typedef typename TypeSelector<(PAGE_SIZE>256), uint16_t, uint8_t>::type write_byte_idx_t;
|
||||
typedef typename TypeSelector<(PAGE_COUNT>256), uint16_t, uint8_t>::type page_idx_t;
|
||||
typedef uvalue_t(PAGE_SIZE - 1) write_byte_idx_t;
|
||||
typedef uvalue_t(PAGE_COUNT - 1) page_idx_t;
|
||||
};
|
||||
|
||||
template <uint8_t num_pages>
|
||||
|
||||
@@ -54,7 +54,15 @@ Adafruit_NeoPixel Marlin_NeoPixel::adaneo1(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEOPIX
|
||||
set_background_color(background_color);
|
||||
}
|
||||
|
||||
#endif
|
||||
void Marlin_NeoPixel::set_background_off() {
|
||||
#ifndef NEOPIXEL_BKGD_TIMEOUT_COLOR
|
||||
#define NEOPIXEL_BKGD_TIMEOUT_COLOR { 0, 0, 0, 0 }
|
||||
#endif
|
||||
constexpr uint8_t background_color_off[4] = NEOPIXEL_BKGD_TIMEOUT_COLOR;
|
||||
set_background_color(background_color_off);
|
||||
}
|
||||
|
||||
#endif // NEOPIXEL_BKGD_INDEX_FIRST
|
||||
|
||||
void Marlin_NeoPixel::set_color(const uint32_t color) {
|
||||
if (neoindex >= 0) {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
// Types
|
||||
// ------------------------
|
||||
|
||||
typedef IF<(TERN0(NEOPIXEL_LED, NEOPIXEL_PIXELS > 127)), int16_t, int8_t>::type pixel_index_t;
|
||||
typedef value_t(TERN0(NEOPIXEL_LED, NEOPIXEL_PIXELS)) pixel_index_t;
|
||||
|
||||
// ------------------------
|
||||
// Classes
|
||||
@@ -91,6 +91,7 @@ public:
|
||||
static void set_background_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w);
|
||||
static void set_background_color(const uint8_t (&rgbw)[4]) { set_background_color(rgbw[0], rgbw[1], rgbw[2], rgbw[3]); }
|
||||
static void reset_background_color();
|
||||
static void set_background_off();
|
||||
#endif
|
||||
|
||||
static void begin() {
|
||||
|
||||
@@ -471,7 +471,7 @@ void Max7219::register_setup() {
|
||||
constexpr millis_t pattern_delay = 4;
|
||||
|
||||
int8_t spiralx, spiraly, spiral_dir;
|
||||
IF<(MAX7219_LEDS > 255), uint16_t, uint8_t>::type spiral_count;
|
||||
uvalue_t(MAX7219_LEDS) spiral_count;
|
||||
|
||||
void Max7219::test_pattern() {
|
||||
constexpr int8_t way[][2] = { { 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 } };
|
||||
|
||||
@@ -293,7 +293,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
|
||||
// Show "Purge More" / "Resume" menu and wait for reply
|
||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||
wait_for_user = false;
|
||||
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, EXTENSIBLE_UI)
|
||||
#if EITHER(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||
ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR
|
||||
#else
|
||||
pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
|
||||
@@ -679,7 +679,7 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_
|
||||
#endif
|
||||
|
||||
// If resume_position is negative
|
||||
//if (resume_position.e < 0) unscaled_e_move(resume_position.e, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
|
||||
if (resume_position.e < 0) unscaled_e_move(resume_position.e, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
|
||||
#ifdef ADVANCED_PAUSE_RESUME_PRIME
|
||||
if (ADVANCED_PAUSE_RESUME_PRIME != 0)
|
||||
unscaled_e_move(ADVANCED_PAUSE_RESUME_PRIME, feedRate_t(ADVANCED_PAUSE_PURGE_FEEDRATE));
|
||||
@@ -688,7 +688,7 @@ void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_
|
||||
// Now all extrusion positions are resumed and ready to be confirmed
|
||||
// Set extruder to saved position
|
||||
planner.set_e_position_mm((destination.e = current_position.e = resume_position.e));
|
||||
sync_plan_position_e();
|
||||
|
||||
ui.pause_show_message(PAUSE_MESSAGE_STATUS);
|
||||
|
||||
#ifdef ACTION_ON_RESUMED
|
||||
|
||||
@@ -31,9 +31,13 @@
|
||||
#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()
|
||||
|
||||
SdFile PrintJobRecovery::file;
|
||||
MediaFile PrintJobRecovery::file;
|
||||
job_recovery_info_t PrintJobRecovery::info;
|
||||
const char PrintJobRecovery::filename[5] = "/PLR";
|
||||
uint8_t PrintJobRecovery::queue_index_r;
|
||||
@@ -78,6 +82,14 @@ PrintJobRecovery recovery;
|
||||
#define POWER_LOSS_RETRACT_LEN 0
|
||||
#endif
|
||||
|
||||
// Allow power-loss recovery to be aborted
|
||||
#define PLR_CAN_ABORT
|
||||
#if ENABLED(PLR_CAN_ABORT)
|
||||
#define PROCESS_SUBCOMMANDS_NOW(cmd) do { if (card.flag.abort_sd_printing) return; gcode.process_subcommands_now(cmd); }while(0)
|
||||
#else
|
||||
#define PROCESS_SUBCOMMANDS_NOW(cmd) gcode.process_subcommands_now(cmd)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Clear the recovery info
|
||||
*/
|
||||
@@ -305,6 +317,9 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=POW
|
||||
// and a flag whether the raise was already done here.
|
||||
if (IS_SD_PRINTING()) save(true, zraise, ENABLED(BACKUP_POWER_SUPPLY));
|
||||
|
||||
// Tell the LCD about the outage, even though it is about to die
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPowerLoss());
|
||||
|
||||
// Disable all heaters to reduce power loss
|
||||
thermalManager.disable_all_heaters();
|
||||
|
||||
@@ -352,12 +367,23 @@ void PrintJobRecovery::resume() {
|
||||
// Apply the dry-run flag if enabled
|
||||
if (info.flag.dryrun) marlin_debug_flags |= MARLIN_DEBUG_DRYRUN;
|
||||
|
||||
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
||||
struct OnExit {
|
||||
uint8_t old_flags;
|
||||
OnExit() {
|
||||
old_flags = marlin_debug_flags;
|
||||
marlin_debug_flags |= MARLIN_DEBUG_ECHO;
|
||||
}
|
||||
~OnExit() { marlin_debug_flags = old_flags; }
|
||||
} on_exit;
|
||||
#endif
|
||||
|
||||
// Restore cold extrusion permission
|
||||
TERN_(PREVENT_COLD_EXTRUSION, thermalManager.allow_cold_extrude = info.flag.allow_cold_extrusion);
|
||||
|
||||
#if HAS_LEVELING
|
||||
// Make sure leveling is off before any G92 and G28
|
||||
gcode.process_subcommands_now(F("M420 S0 Z0"));
|
||||
PROCESS_SUBCOMMANDS_NOW(F("M420S0"));
|
||||
#endif
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
@@ -365,7 +391,7 @@ void PrintJobRecovery::resume() {
|
||||
if (bt) {
|
||||
// Restore the bed temperature
|
||||
sprintf_P(cmd, PSTR("M190S%i"), bt);
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -376,10 +402,10 @@ void PrintJobRecovery::resume() {
|
||||
if (et) {
|
||||
#if HAS_MULTI_HOTEND
|
||||
sprintf_P(cmd, PSTR("T%iS"), e);
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
#endif
|
||||
sprintf_P(cmd, PSTR("M109S%i"), et);
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -393,7 +419,7 @@ void PrintJobRecovery::resume() {
|
||||
// establish the current position as best we can.
|
||||
//
|
||||
|
||||
gcode.process_subcommands_now(F("G92.9E0")); // Reset E to 0
|
||||
PROCESS_SUBCOMMANDS_NOW(F("G92.9E0")); // Reset E to 0
|
||||
|
||||
#if Z_HOME_TO_MAX
|
||||
|
||||
@@ -404,7 +430,7 @@ void PrintJobRecovery::resume() {
|
||||
"G28R0\n" // Home all axes (no raise)
|
||||
"G1Z%sF1200" // Move Z down to (raised) height
|
||||
), dtostrf(z_now, 1, 3, str_1));
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
|
||||
#elif DISABLED(BELTPRINTER)
|
||||
|
||||
@@ -417,18 +443,18 @@ void PrintJobRecovery::resume() {
|
||||
#if !HOMING_Z_DOWN
|
||||
// Set Z to the real position
|
||||
sprintf_P(cmd, PSTR("G92.9Z%s"), dtostrf(z_now, 1, 3, str_1));
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
#endif
|
||||
|
||||
// Does Z need to be raised now? It should be raised before homing XY.
|
||||
if (z_raised > z_now) {
|
||||
z_now = z_raised;
|
||||
sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_now, 1, 3, str_1));
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
}
|
||||
|
||||
// Home XY with no Z raise
|
||||
gcode.process_subcommands_now(F("G28R0XY")); // No raise during G28
|
||||
PROCESS_SUBCOMMANDS_NOW(F("G28R0XY")); // No raise during G28
|
||||
|
||||
#endif
|
||||
|
||||
@@ -436,7 +462,7 @@ void PrintJobRecovery::resume() {
|
||||
// Move to a safe XY position and home Z while avoiding the print.
|
||||
const xy_pos_t p = xy_pos_t(POWER_LOSS_ZHOME_POS) TERN_(HOMING_Z_WITH_PROBE, - probe.offset_xy);
|
||||
sprintf_P(cmd, PSTR("G1X%sY%sF1000\nG28HZ"), dtostrf(p.x, 1, 3, str_1), dtostrf(p.y, 1, 3, str_2));
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
#endif
|
||||
|
||||
// Mark all axes as having been homed (no effect on current_position)
|
||||
@@ -447,12 +473,12 @@ void PrintJobRecovery::resume() {
|
||||
// Leveling may already be enabled due to the ENABLE_LEVELING_AFTER_G28 option.
|
||||
// TODO: Add a G28 parameter to leave leveling disabled.
|
||||
sprintf_P(cmd, PSTR("M420S%cZ%s"), '0' + (char)info.flag.leveling, dtostrf(info.fade, 1, 1, str_1));
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
|
||||
#if !HOMING_Z_DOWN
|
||||
// The physical Z was adjusted at power-off so undo the M420S1 correction to Z with G92.9.
|
||||
sprintf_P(cmd, PSTR("G92.9Z%s"), dtostrf(z_now, 1, 1, str_1));
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -460,7 +486,7 @@ void PrintJobRecovery::resume() {
|
||||
// Z was homed down to the bed, so move up to the raised height.
|
||||
z_now = z_raised;
|
||||
sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_now, 1, 3, str_1));
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
#endif
|
||||
|
||||
// Recover volumetric extrusion state
|
||||
@@ -468,16 +494,16 @@ void PrintJobRecovery::resume() {
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
EXTRUDER_LOOP() {
|
||||
sprintf_P(cmd, PSTR("M200T%iD%s"), e, dtostrf(info.filament_size[e], 1, 3, str_1));
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
}
|
||||
if (!info.flag.volumetric_enabled) {
|
||||
sprintf_P(cmd, PSTR("M200T%iD0"), info.active_extruder);
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
}
|
||||
#else
|
||||
if (info.flag.volumetric_enabled) {
|
||||
sprintf_P(cmd, PSTR("M200D%s"), dtostrf(info.filament_size[0], 1, 3, str_1));
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -489,10 +515,10 @@ void PrintJobRecovery::resume() {
|
||||
if (et) {
|
||||
#if HAS_MULTI_HOTEND
|
||||
sprintf_P(cmd, PSTR("T%iS"), e);
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
#endif
|
||||
sprintf_P(cmd, PSTR("M109S%i"), et);
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -500,7 +526,7 @@ void PrintJobRecovery::resume() {
|
||||
// Restore the previously active tool (with no_move)
|
||||
#if HAS_MULTI_EXTRUDER || HAS_MULTI_HOTEND
|
||||
sprintf_P(cmd, PSTR("T%i S"), info.active_extruder);
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
#endif
|
||||
|
||||
// Restore print cooling fan speeds
|
||||
@@ -509,7 +535,7 @@ void PrintJobRecovery::resume() {
|
||||
const int f = info.fan_speed[i];
|
||||
if (f) {
|
||||
sprintf_P(cmd, PSTR("M106P%iS%i"), i, f);
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -531,17 +557,17 @@ void PrintJobRecovery::resume() {
|
||||
|
||||
// Un-retract if there was a retract at outage
|
||||
#if ENABLED(BACKUP_POWER_SUPPLY) && POWER_LOSS_RETRACT_LEN > 0
|
||||
gcode.process_subcommands_now(F("G1F3000E" STRINGIFY(POWER_LOSS_RETRACT_LEN)));
|
||||
PROCESS_SUBCOMMANDS_NOW(F("G1F3000E" STRINGIFY(POWER_LOSS_RETRACT_LEN)));
|
||||
#endif
|
||||
|
||||
// Additional purge on resume if configured
|
||||
#if POWER_LOSS_PURGE_LEN
|
||||
sprintf_P(cmd, PSTR("G1F3000E%d"), (POWER_LOSS_PURGE_LEN) + (POWER_LOSS_RETRACT_LEN));
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
#endif
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
gcode.process_subcommands_now(F("G12"));
|
||||
PROCESS_SUBCOMMANDS_NOW(F("G12"));
|
||||
#endif
|
||||
|
||||
// Move back over to the saved XY
|
||||
@@ -549,19 +575,19 @@ void PrintJobRecovery::resume() {
|
||||
dtostrf(info.current_position.x, 1, 3, str_1),
|
||||
dtostrf(info.current_position.y, 1, 3, str_2)
|
||||
);
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
|
||||
// Move back down to the saved Z for printing
|
||||
sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_print, 1, 3, str_1));
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
|
||||
// Restore the feedrate
|
||||
sprintf_P(cmd, PSTR("G1F%d"), info.feedrate);
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
|
||||
// Restore E position with G92.9
|
||||
sprintf_P(cmd, PSTR("G92.9E%s"), dtostrf(info.current_position.e, 1, 3, str_1));
|
||||
gcode.process_subcommands_now(cmd);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
|
||||
TERN_(GCODE_REPEAT_MARKERS, repeat = info.stored_repeat);
|
||||
TERN_(HAS_HOME_OFFSET, home_offset = info.home_offset);
|
||||
@@ -573,22 +599,14 @@ void PrintJobRecovery::resume() {
|
||||
// Relative axis modes
|
||||
gcode.axis_relative = info.axis_relative;
|
||||
|
||||
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
||||
const uint8_t old_flags = marlin_debug_flags;
|
||||
marlin_debug_flags |= MARLIN_DEBUG_ECHO;
|
||||
#endif
|
||||
|
||||
// Continue to apply PLR when a file is resumed!
|
||||
enable(true);
|
||||
|
||||
// Resume the SD file from the last position
|
||||
char *fn = info.sd_filename;
|
||||
sprintf_P(cmd, M23_STR, fn);
|
||||
gcode.process_subcommands_now(cmd);
|
||||
sprintf_P(cmd, M23_STR, &info.sd_filename[0]);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
sprintf_P(cmd, PSTR("M24S%ldT%ld"), resume_sdpos, info.print_job_elapsed);
|
||||
gcode.process_subcommands_now(cmd);
|
||||
|
||||
TERN_(DEBUG_POWER_LOSS_RECOVERY, marlin_debug_flags = old_flags);
|
||||
PROCESS_SUBCOMMANDS_NOW(cmd);
|
||||
}
|
||||
|
||||
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
||||
|
||||
@@ -138,7 +138,7 @@ class PrintJobRecovery {
|
||||
public:
|
||||
static const char filename[5];
|
||||
|
||||
static SdFile file;
|
||||
static MediaFile file;
|
||||
static job_recovery_info_t info;
|
||||
|
||||
static uint8_t queue_index_r; //!< Queue index of the active command
|
||||
|
||||
@@ -141,7 +141,7 @@ void SpindleLaser::apply_power(const uint8_t opwr) {
|
||||
else
|
||||
ocr_off();
|
||||
#elif ENABLED(SPINDLE_SERVO)
|
||||
MOVE_SERVO(SPINDLE_SERVO_NR, power);
|
||||
servo[SPINDLE_SERVO_NR].move(opwr);
|
||||
#else
|
||||
WRITE(SPINDLE_LASER_ENA_PIN, enabled() ? SPINDLE_LASER_ACTIVE_STATE : !SPINDLE_LASER_ACTIVE_STATE);
|
||||
isReadyForUI = true;
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef IF<(SPEED_POWER_MAX > 255), uint16_t, uint8_t>::type cutter_cpower_t;
|
||||
typedef uvalue_t(SPEED_POWER_MAX) cutter_cpower_t;
|
||||
|
||||
#if CUTTER_UNIT_IS(RPM) && SPEED_POWER_MAX > 255
|
||||
typedef uint16_t cutter_power_t;
|
||||
|
||||
@@ -29,31 +29,11 @@
|
||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
#include "../core/debug_out.h"
|
||||
|
||||
PGMSTR(point_name_1, TRAMMING_POINT_NAME_1);
|
||||
PGMSTR(point_name_2, TRAMMING_POINT_NAME_2);
|
||||
PGMSTR(point_name_3, TRAMMING_POINT_NAME_3);
|
||||
#ifdef TRAMMING_POINT_NAME_4
|
||||
PGMSTR(point_name_4, TRAMMING_POINT_NAME_4);
|
||||
#ifdef TRAMMING_POINT_NAME_5
|
||||
PGMSTR(point_name_5, TRAMMING_POINT_NAME_5);
|
||||
#ifdef TRAMMING_POINT_NAME_6
|
||||
PGMSTR(point_name_6, TRAMMING_POINT_NAME_6);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#define _TRAM_NAME_DEF(N) PGMSTR(point_name_##N, TRAMMING_POINT_NAME_##N);
|
||||
#define _TRAM_NAME_ITEM(N) point_name_##N
|
||||
REPEAT_1(_NR_TRAM_NAMES, _TRAM_NAME_DEF)
|
||||
|
||||
PGM_P const tramming_point_name[] PROGMEM = {
|
||||
point_name_1, point_name_2, point_name_3
|
||||
#ifdef TRAMMING_POINT_NAME_4
|
||||
, point_name_4
|
||||
#ifdef TRAMMING_POINT_NAME_5
|
||||
, point_name_5
|
||||
#ifdef TRAMMING_POINT_NAME_6
|
||||
, point_name_6
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
PGM_P const tramming_point_name[] PROGMEM = { REPLIST_1(_NR_TRAM_NAMES, _TRAM_NAME_ITEM) };
|
||||
|
||||
#ifdef ASSISTED_TRAMMING_WAIT_POSITION
|
||||
|
||||
|
||||
@@ -31,43 +31,34 @@
|
||||
constexpr xy_pos_t tramming_points[] = TRAMMING_POINT_XY;
|
||||
|
||||
#define G35_PROBE_COUNT COUNT(tramming_points)
|
||||
static_assert(WITHIN(G35_PROBE_COUNT, 3, 6), "TRAMMING_POINT_XY requires between 3 and 6 XY positions.");
|
||||
static_assert(WITHIN(G35_PROBE_COUNT, 3, 9), "TRAMMING_POINT_XY requires between 3 and 9 XY positions.");
|
||||
|
||||
#define VALIDATE_TRAMMING_POINT(N) static_assert(N >= G35_PROBE_COUNT || Probe::build_time::can_reach(tramming_points[N]), \
|
||||
"TRAMMING_POINT_XY point " STRINGIFY(N) " is not reachable with the default NOZZLE_TO_PROBE offset and PROBING_MARGIN.")
|
||||
VALIDATE_TRAMMING_POINT(0); VALIDATE_TRAMMING_POINT(1); VALIDATE_TRAMMING_POINT(2); VALIDATE_TRAMMING_POINT(3); VALIDATE_TRAMMING_POINT(4); VALIDATE_TRAMMING_POINT(5);
|
||||
|
||||
extern const char point_name_1[], point_name_2[], point_name_3[]
|
||||
#ifdef TRAMMING_POINT_NAME_4
|
||||
, point_name_4[]
|
||||
#ifdef TRAMMING_POINT_NAME_5
|
||||
, point_name_5[]
|
||||
#ifdef TRAMMING_POINT_NAME_6
|
||||
, point_name_6[]
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
;
|
||||
|
||||
#define _NR_TRAM_NAMES 2
|
||||
#ifdef TRAMMING_POINT_NAME_3
|
||||
#undef _NR_TRAM_NAMES
|
||||
#ifdef TRAMMING_POINT_NAME_9
|
||||
#define _NR_TRAM_NAMES 9
|
||||
#elif defined(TRAMMING_POINT_NAME_8)
|
||||
#define _NR_TRAM_NAMES 8
|
||||
#elif defined(TRAMMING_POINT_NAME_7)
|
||||
#define _NR_TRAM_NAMES 7
|
||||
#elif defined(TRAMMING_POINT_NAME_6)
|
||||
#define _NR_TRAM_NAMES 6
|
||||
#elif defined(TRAMMING_POINT_NAME_5)
|
||||
#define _NR_TRAM_NAMES 5
|
||||
#elif defined(TRAMMING_POINT_NAME_4)
|
||||
#define _NR_TRAM_NAMES 4
|
||||
#elif defined(TRAMMING_POINT_NAME_3)
|
||||
#define _NR_TRAM_NAMES 3
|
||||
#ifdef TRAMMING_POINT_NAME_4
|
||||
#undef _NR_TRAM_NAMES
|
||||
#define _NR_TRAM_NAMES 4
|
||||
#ifdef TRAMMING_POINT_NAME_5
|
||||
#undef _NR_TRAM_NAMES
|
||||
#define _NR_TRAM_NAMES 5
|
||||
#ifdef TRAMMING_POINT_NAME_6
|
||||
#undef _NR_TRAM_NAMES
|
||||
#define _NR_TRAM_NAMES 6
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#define _NR_TRAM_NAMES 0
|
||||
#endif
|
||||
|
||||
static_assert(_NR_TRAM_NAMES >= G35_PROBE_COUNT, "Define enough TRAMMING_POINT_NAME_s for all TRAMMING_POINT_XY entries.");
|
||||
#undef _NR_TRAM_NAMES
|
||||
|
||||
#define _TRAM_NAME_PTR(N) point_name_##N[]
|
||||
extern const char REPLIST_1(_NR_TRAM_NAMES, _TRAM_NAME_PTR);
|
||||
|
||||
#define _CHECK_TRAM_POINT(N) static_assert(Probe::build_time::can_reach(tramming_points[N]), "TRAMMING_POINT_XY point " STRINGIFY(N) " is not reachable with the default NOZZLE_TO_PROBE offset and PROBING_MARGIN.");
|
||||
REPEAT(_NR_TRAM_NAMES, _CHECK_TRAM_POINT)
|
||||
#undef _CHECK_TRAM_POINT
|
||||
|
||||
extern PGM_P const tramming_point_name[];
|
||||
|
||||
|
||||
@@ -453,9 +453,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
}
|
||||
|
||||
// Position bed horizontally and Z probe vertically.
|
||||
#if defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
|
||||
|| defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
|
||||
|| defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
|
||||
#if HAS_SAFE_BED_LEVELING
|
||||
xyze_pos_t safe_position = current_position;
|
||||
#ifdef SAFE_BED_LEVELING_START_X
|
||||
safe_position.x = SAFE_BED_LEVELING_START_X;
|
||||
@@ -486,14 +484,14 @@ G29_TYPE GcodeSuite::G29() {
|
||||
#endif
|
||||
|
||||
do_blocking_move_to(safe_position);
|
||||
#endif
|
||||
#endif // HAS_SAFE_BED_LEVELING
|
||||
|
||||
// Disable auto bed leveling during G29.
|
||||
// Be formal so G29 can be done successively without G28.
|
||||
if (!no_action) set_bed_leveling_enabled(false);
|
||||
|
||||
// Deploy certain probes before starting probing
|
||||
#if ENABLED(BLTOUCH)
|
||||
#if ENABLED(BLTOUCH) || BOTH(HAS_Z_SERVO_PROBE, Z_SERVO_INTERMEDIATE_STOW)
|
||||
do_z_clearance(Z_CLEARANCE_DEPLOY_PROBE);
|
||||
#elif HAS_BED_PROBE
|
||||
if (probe.deploy()) { // (returns true on deploy failure)
|
||||
@@ -949,8 +947,6 @@ G29_TYPE GcodeSuite::G29() {
|
||||
process_subcommands_now(F(Z_PROBE_END_SCRIPT));
|
||||
#endif
|
||||
|
||||
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_LevelingDone());
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
TERN_(HAS_MULTI_HOTEND, if (abl.tool_index != 0) tool_change(abl.tool_index));
|
||||
|
||||
report_current_position();
|
||||
|
||||
@@ -108,9 +108,7 @@ void GcodeSuite::G29() {
|
||||
TERN_(DWIN_LCD_PROUI, DWIN_LevelingStart());
|
||||
|
||||
// Position bed horizontally and Z probe vertically.
|
||||
#if defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
|
||||
|| defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
|
||||
|| defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
|
||||
#if HAS_SAFE_BED_LEVELING
|
||||
xyze_pos_t safe_position = current_position;
|
||||
#ifdef SAFE_BED_LEVELING_START_X
|
||||
safe_position.x = SAFE_BED_LEVELING_START_X;
|
||||
@@ -141,7 +139,7 @@ void GcodeSuite::G29() {
|
||||
#endif
|
||||
|
||||
do_blocking_move_to(safe_position);
|
||||
#endif
|
||||
#endif // HAS_SAFE_BED_LEVELING
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
NUM_AXIS_LIST(
|
||||
TERN0(X_SENSORLESS, tmc_enable_stallguard(stepperX)),
|
||||
TERN0(Y_SENSORLESS, tmc_enable_stallguard(stepperY)),
|
||||
false, false, false, false
|
||||
false, false, false, false, false, false, false
|
||||
)
|
||||
, TERN0(X2_SENSORLESS, tmc_enable_stallguard(stepperX2))
|
||||
, TERN0(Y2_SENSORLESS, tmc_enable_stallguard(stepperY2))
|
||||
@@ -124,7 +124,7 @@
|
||||
* (Z is already at the right height)
|
||||
*/
|
||||
constexpr xy_float_t safe_homing_xy = { Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT };
|
||||
#if HAS_HOME_OFFSET
|
||||
#if HAS_HOME_OFFSET && DISABLED(Z_SAFE_HOMING_POINT_ABSOLUTE)
|
||||
xy_float_t okay_homing_xy = safe_homing_xy;
|
||||
okay_homing_xy -= home_offset;
|
||||
#else
|
||||
|
||||
@@ -58,7 +58,7 @@ void GcodeSuite::G34() {
|
||||
// Move XY to safe position
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Parking XY");
|
||||
const xy_pos_t safe_pos = GANTRY_CALIBRATION_SAFE_POSITION;
|
||||
do_blocking_move_to(safe_pos, MMM_TO_MMS(GANTRY_CALIBRATION_XY_PARK_FEEDRATE));
|
||||
do_blocking_move_to_xy(safe_pos, MMM_TO_MMS(GANTRY_CALIBRATION_XY_PARK_FEEDRATE));
|
||||
#endif
|
||||
|
||||
const float move_distance = parser.intval('Z', GANTRY_CALIBRATION_EXTRA_HEIGHT),
|
||||
|
||||
@@ -221,9 +221,9 @@ void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
|
||||
/**
|
||||
* M204: Set Accelerations in units/sec^2 (M204 P1200 R3000 T3000)
|
||||
*
|
||||
* P = Printing moves
|
||||
* R = Retract only (no X, Y, Z) moves
|
||||
* T = Travel (non printing) moves
|
||||
* P<accel> Printing moves
|
||||
* R<accel> Retract only (no X, Y, Z) moves
|
||||
* T<accel> Travel (non printing) moves
|
||||
*/
|
||||
void GcodeSuite::M204() {
|
||||
if (!parser.seen("PRST"))
|
||||
@@ -247,24 +247,37 @@ void GcodeSuite::M204_report(const bool forReplay/*=true*/) {
|
||||
);
|
||||
}
|
||||
|
||||
#if AXIS_COLLISION('B')
|
||||
#define M205_MIN_SEG_TIME_PARAM 'D'
|
||||
#define M205_MIN_SEG_TIME_STR "D"
|
||||
#warning "Use 'M205 D' for Minimum Segment Time."
|
||||
#else
|
||||
#define M205_MIN_SEG_TIME_PARAM 'B'
|
||||
#define M205_MIN_SEG_TIME_STR "B"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* M205: Set Advanced Settings
|
||||
*
|
||||
* B = Min Segment Time (µs)
|
||||
* S = Min Feed Rate (units/s)
|
||||
* T = Min Travel Feed Rate (units/s)
|
||||
* X = Max X Jerk (units/sec^2)
|
||||
* Y = Max Y Jerk (units/sec^2)
|
||||
* Z = Max Z Jerk (units/sec^2)
|
||||
* E = Max E Jerk (units/sec^2)
|
||||
* J = Junction Deviation (mm) (If not using CLASSIC_JERK)
|
||||
* B<µs> : Min Segment Time
|
||||
* S<units/s> : Min Feed Rate
|
||||
* T<units/s> : Min Travel Feed Rate
|
||||
*
|
||||
* With CLASSIC_JERK:
|
||||
* X<units/sec^2> : Max X Jerk
|
||||
* Y<units/sec^2> : Max Y Jerk
|
||||
* Z<units/sec^2> : Max Z Jerk
|
||||
* ... : etc
|
||||
* E<units/sec^2> : Max E Jerk
|
||||
*
|
||||
* Without CLASSIC_JERK:
|
||||
* J(mm) : Junction Deviation
|
||||
*/
|
||||
void GcodeSuite::M205() {
|
||||
if (!parser.seen("BST" TERN_(HAS_JUNCTION_DEVIATION, "J") TERN_(HAS_CLASSIC_JERK, "XYZE")))
|
||||
return M205_report();
|
||||
if (!parser.seen_any()) return M205_report();
|
||||
|
||||
//planner.synchronize();
|
||||
if (parser.seenval('B')) planner.settings.min_segment_time_us = parser.value_ulong();
|
||||
if (parser.seenval(M205_MIN_SEG_TIME_PARAM)) planner.settings.min_segment_time_us = parser.value_ulong();
|
||||
if (parser.seenval('S')) planner.settings.min_feedrate_mm_s = parser.value_linear_units();
|
||||
if (parser.seenval('T')) planner.settings.min_travel_feedrate_mm_s = parser.value_linear_units();
|
||||
#if HAS_JUNCTION_DEVIATION
|
||||
@@ -304,7 +317,7 @@ void GcodeSuite::M205() {
|
||||
|
||||
void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, F(
|
||||
"Advanced (B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>"
|
||||
"Advanced (" M205_MIN_SEG_TIME_STR "<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>"
|
||||
TERN_(HAS_JUNCTION_DEVIATION, " J<junc_dev>")
|
||||
#if HAS_CLASSIC_JERK
|
||||
NUM_AXIS_GANG(
|
||||
@@ -317,7 +330,7 @@ void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
|
||||
")"
|
||||
));
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M205 B"), LINEAR_UNIT(planner.settings.min_segment_time_us)
|
||||
PSTR(" M205 " M205_MIN_SEG_TIME_STR), LINEAR_UNIT(planner.settings.min_segment_time_us)
|
||||
, PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s)
|
||||
, SP_T_STR, LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s)
|
||||
#if HAS_JUNCTION_DEVIATION
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
|
||||
#if NUM_AXES == XYZ && EXTRUDERS >= 1
|
||||
#define HAS_M350_B_PARAM 1 // "5th axis" (after E0) for an original XYZEB setup.
|
||||
#if AXIS_COLLISION('B')
|
||||
#error "M350 parameter 'B' collision with axis name."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -128,11 +128,13 @@ void GcodeSuite::M240() {
|
||||
|
||||
if (homing_needed_error()) return;
|
||||
|
||||
const xyz_pos_t old_pos = {
|
||||
const xyz_pos_t old_pos = NUM_AXIS_ARRAY(
|
||||
current_position.x + parser.linearval('A'),
|
||||
current_position.y + parser.linearval('B'),
|
||||
current_position.z
|
||||
};
|
||||
current_position.z,
|
||||
current_position.i, current_position.j, current_position.k,
|
||||
current_position.u, current_position.v, current_position.w
|
||||
);
|
||||
|
||||
#ifdef PHOTO_RETRACT_MM
|
||||
const float rval = parser.linearval('R', _PHOTO_RETRACT_MM);
|
||||
@@ -140,7 +142,7 @@ void GcodeSuite::M240() {
|
||||
e_move_m240(-rval, sval);
|
||||
#endif
|
||||
|
||||
feedRate_t fr_mm_s = MMM_TO_MMS(parser.linearval('F'));
|
||||
feedRate_t fr_mm_s = parser.feedrateval('F');
|
||||
if (fr_mm_s) NOLESS(fr_mm_s, 10.0f);
|
||||
|
||||
constexpr xyz_pos_t photo_position = PHOTO_POSITION;
|
||||
|
||||
@@ -63,22 +63,26 @@ void GcodeSuite::M591() {
|
||||
}
|
||||
}
|
||||
else {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Filament runout ");
|
||||
serialprint_onoff(runout.enabled[active_extruder]);
|
||||
SERIAL_ECHOPGM(" ; Distance ", runout.runout_distance(active_extruder), "mm");
|
||||
SERIAL_ECHOPGM(" ; Mode ", runout.mode[active_extruder]);
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
SERIAL_ECHOPGM(" ; Host handling ");
|
||||
serialprint_onoff(runout.host_handling);
|
||||
#if DISABLED(SLIM_LCD_MENUS)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Filament runout ");
|
||||
serialprint_onoff(runout.enabled[active_extruder]);
|
||||
SERIAL_ECHOPGM(" ; Distance ", runout.runout_distance(active_extruder), "mm");
|
||||
SERIAL_ECHOPGM(" ; Mode ", runout.mode[active_extruder]);
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
SERIAL_ECHOPGM(" ; Host handling ");
|
||||
serialprint_onoff(runout.host_handling);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
#else
|
||||
M591_report(false);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
|
||||
void GcodeSuite::M591_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, F(STR_FILAMENT_RUNOUT_SENSOR));
|
||||
LOOP_S_L_N(e, 0, NUM_RUNOUT_SENSORS)
|
||||
LOOP_S_L_N(e, 1, NUM_RUNOUT_SENSORS)
|
||||
SERIAL_ECHOLNPGM(
|
||||
" M591"
|
||||
#if MULTI_FILAMENT_SENSOR
|
||||
|
||||
@@ -931,9 +931,8 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
case 412: M412(); break; // Alias to M591
|
||||
case 591: M591(); break; // M591 Configure filament runout detection
|
||||
#endif
|
||||
|
||||
case 591: M591(); break;
|
||||
#endif // M591 Configure filament runout detection
|
||||
#if HAS_SHAPING
|
||||
case 593: M593(); break; // M593: Set Input Shaping parameters
|
||||
#endif
|
||||
|
||||
@@ -476,6 +476,9 @@ public:
|
||||
private:
|
||||
|
||||
friend class MarlinSettings;
|
||||
#if ENABLED(ARC_SUPPORT)
|
||||
friend void plan_arc(const xyze_pos_t&, const ab_float_t&, const bool, const uint8_t);
|
||||
#endif
|
||||
|
||||
#if ENABLED(MARLIN_DEV_MODE)
|
||||
static void D(const int16_t dcode);
|
||||
|
||||
@@ -33,9 +33,7 @@
|
||||
/**
|
||||
* M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y
|
||||
*
|
||||
* *** @thinkyhead: I recommend deprecating M206 for SCARA in favor of M665.
|
||||
* *** M206 for SCARA will remain enabled in 1.1.x for compatibility.
|
||||
* *** In the 2.0 release, it will simply be disabled by default.
|
||||
* *** TODO: Deprecate M206 for SCARA in favor of M665.
|
||||
*/
|
||||
void GcodeSuite::M206() {
|
||||
if (!parser.seen_any()) return M206_report();
|
||||
|
||||
@@ -45,91 +45,75 @@ extern xyze_pos_t destination;
|
||||
* G0, G1: Coordinated movement of X Y Z E axes
|
||||
*/
|
||||
void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) {
|
||||
if (!MOTION_CONDITIONS) return;
|
||||
|
||||
if (IsRunning()
|
||||
#if ENABLED(NO_MOTION_BEFORE_HOMING)
|
||||
&& !homing_needed_error(
|
||||
NUM_AXIS_GANG(
|
||||
(parser.seen_test('X') ? _BV(X_AXIS) : 0),
|
||||
| (parser.seen_test('Y') ? _BV(Y_AXIS) : 0),
|
||||
| (parser.seen_test('Z') ? _BV(Z_AXIS) : 0),
|
||||
| (parser.seen_test(AXIS4_NAME) ? _BV(I_AXIS) : 0),
|
||||
| (parser.seen_test(AXIS5_NAME) ? _BV(J_AXIS) : 0),
|
||||
| (parser.seen_test(AXIS6_NAME) ? _BV(K_AXIS) : 0),
|
||||
| (parser.seen_test(AXIS7_NAME) ? _BV(U_AXIS) : 0),
|
||||
| (parser.seen_test(AXIS8_NAME) ? _BV(V_AXIS) : 0),
|
||||
| (parser.seen_test(AXIS9_NAME) ? _BV(W_AXIS) : 0))
|
||||
)
|
||||
#endif
|
||||
) {
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_RUNNING));
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_RUNNING));
|
||||
|
||||
#ifdef G0_FEEDRATE
|
||||
feedRate_t old_feedrate;
|
||||
#if ENABLED(VARIABLE_G0_FEEDRATE)
|
||||
if (fast_move) {
|
||||
old_feedrate = feedrate_mm_s; // Back up the (old) motion mode feedrate
|
||||
feedrate_mm_s = fast_move_feedrate; // Get G0 feedrate from last usage
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
get_destination_from_command(); // Get X Y [Z[I[J[K]]]] [E] F (and set cutter power)
|
||||
|
||||
#ifdef G0_FEEDRATE
|
||||
#ifdef G0_FEEDRATE
|
||||
feedRate_t old_feedrate;
|
||||
#if ENABLED(VARIABLE_G0_FEEDRATE)
|
||||
if (fast_move) {
|
||||
#if ENABLED(VARIABLE_G0_FEEDRATE)
|
||||
fast_move_feedrate = feedrate_mm_s; // Save feedrate for the next G0
|
||||
#else
|
||||
old_feedrate = feedrate_mm_s; // Back up the (new) motion mode feedrate
|
||||
feedrate_mm_s = MMM_TO_MMS(G0_FEEDRATE); // Get the fixed G0 feedrate
|
||||
#endif
|
||||
old_feedrate = feedrate_mm_s; // Back up the (old) motion mode feedrate
|
||||
feedrate_mm_s = fast_move_feedrate; // Get G0 feedrate from last usage
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT)
|
||||
get_destination_from_command(); // Get X Y [Z[I[J[K]]]] [E] F (and set cutter power)
|
||||
|
||||
if (MIN_AUTORETRACT <= MAX_AUTORETRACT) {
|
||||
// When M209 Autoretract is enabled, convert E-only moves to firmware retract/recover moves
|
||||
if (fwretract.autoretract_enabled && parser.seen_test('E')
|
||||
&& !parser.seen(STR_AXES_MAIN)
|
||||
) {
|
||||
const float echange = destination.e - current_position.e;
|
||||
// Is this a retract or recover move?
|
||||
if (WITHIN(ABS(echange), MIN_AUTORETRACT, MAX_AUTORETRACT) && fwretract.retracted[active_extruder] == (echange > 0.0)) {
|
||||
current_position.e = destination.e; // Hide a G1-based retract/recover from calculations
|
||||
sync_plan_position_e(); // AND from the planner
|
||||
return fwretract.retract(echange < 0.0); // Firmware-based retract/recover (double-retract ignored)
|
||||
}
|
||||
#ifdef G0_FEEDRATE
|
||||
if (fast_move) {
|
||||
#if ENABLED(VARIABLE_G0_FEEDRATE)
|
||||
fast_move_feedrate = feedrate_mm_s; // Save feedrate for the next G0
|
||||
#else
|
||||
old_feedrate = feedrate_mm_s; // Back up the (new) motion mode feedrate
|
||||
feedrate_mm_s = MMM_TO_MMS(G0_FEEDRATE); // Get the fixed G0 feedrate
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if BOTH(FWRETRACT, FWRETRACT_AUTORETRACT)
|
||||
|
||||
if (MIN_AUTORETRACT <= MAX_AUTORETRACT) {
|
||||
// When M209 Autoretract is enabled, convert E-only moves to firmware retract/recover moves
|
||||
if (fwretract.autoretract_enabled && parser.seen_test('E')
|
||||
&& !parser.seen(STR_AXES_MAIN)
|
||||
) {
|
||||
const float echange = destination.e - current_position.e;
|
||||
// Is this a retract or recover move?
|
||||
if (WITHIN(ABS(echange), MIN_AUTORETRACT, MAX_AUTORETRACT) && fwretract.retracted[active_extruder] == (echange > 0.0)) {
|
||||
current_position.e = destination.e; // Hide a G1-based retract/recover from calculations
|
||||
sync_plan_position_e(); // AND from the planner
|
||||
return fwretract.retract(echange < 0.0); // Firmware-based retract/recover (double-retract ignored)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // FWRETRACT
|
||||
#endif // FWRETRACT
|
||||
|
||||
#if EITHER(IS_SCARA, POLAR)
|
||||
fast_move ? prepare_fast_move_to_destination() : prepare_line_to_destination();
|
||||
#if EITHER(IS_SCARA, POLAR)
|
||||
fast_move ? prepare_fast_move_to_destination() : prepare_line_to_destination();
|
||||
#else
|
||||
prepare_line_to_destination();
|
||||
#endif
|
||||
|
||||
#ifdef G0_FEEDRATE
|
||||
// Restore the motion mode feedrate
|
||||
if (fast_move) feedrate_mm_s = old_feedrate;
|
||||
#endif
|
||||
|
||||
#if ENABLED(NANODLP_Z_SYNC)
|
||||
#if ENABLED(NANODLP_ALL_AXIS)
|
||||
#define _MOVE_SYNC parser.seenval('X') || parser.seenval('Y') || parser.seenval('Z') // For any move wait and output sync message
|
||||
#else
|
||||
prepare_line_to_destination();
|
||||
#define _MOVE_SYNC parser.seenval('Z') // Only for Z move
|
||||
#endif
|
||||
|
||||
#ifdef G0_FEEDRATE
|
||||
// Restore the motion mode feedrate
|
||||
if (fast_move) feedrate_mm_s = old_feedrate;
|
||||
#endif
|
||||
|
||||
#if ENABLED(NANODLP_Z_SYNC)
|
||||
#if ENABLED(NANODLP_ALL_AXIS)
|
||||
#define _MOVE_SYNC parser.seenval('X') || parser.seenval('Y') || parser.seenval('Z') // For any move wait and output sync message
|
||||
#else
|
||||
#define _MOVE_SYNC parser.seenval('Z') // Only for Z move
|
||||
#endif
|
||||
if (_MOVE_SYNC) {
|
||||
planner.synchronize();
|
||||
SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP);
|
||||
}
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE));
|
||||
#else
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, report_current_grblstate_moving());
|
||||
#endif
|
||||
}
|
||||
if (_MOVE_SYNC) {
|
||||
planner.synchronize();
|
||||
SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP);
|
||||
}
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE));
|
||||
#else
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, report_current_grblstate_moving());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -142,8 +142,8 @@ void plan_arc(
|
||||
part_per_circle = RADIANS(360) / total_angular; // Each circle's part of the total
|
||||
|
||||
ARC_LIJKUVWE_CODE(
|
||||
const float per_circle_L = travel_L * part_per_circle, // L movement per circle
|
||||
const float per_circle_I = travel_I * part_per_circle,
|
||||
const float per_circle_L = travel_L * part_per_circle, // X, Y, or Z movement per circle
|
||||
const float per_circle_I = travel_I * part_per_circle, // The rest are also non-arc
|
||||
const float per_circle_J = travel_J * part_per_circle,
|
||||
const float per_circle_K = travel_K * part_per_circle,
|
||||
const float per_circle_U = travel_U * part_per_circle,
|
||||
@@ -154,9 +154,9 @@ void plan_arc(
|
||||
|
||||
xyze_pos_t temp_position = current_position;
|
||||
for (uint16_t n = circles; n--;) {
|
||||
ARC_LIJKUVWE_CODE( // Destination Linear Axes
|
||||
temp_position[axis_l] += per_circle_L,
|
||||
temp_position.i += per_circle_I,
|
||||
ARC_LIJKUVWE_CODE( // Destination Linear Axes
|
||||
temp_position[axis_l] += per_circle_L, // Linear X, Y, or Z
|
||||
temp_position.i += per_circle_I, // The rest are also non-circular
|
||||
temp_position.j += per_circle_J,
|
||||
temp_position.k += per_circle_K,
|
||||
temp_position.u += per_circle_U,
|
||||
@@ -167,8 +167,8 @@ void plan_arc(
|
||||
plan_arc(temp_position, offset, clockwise, 0); // Plan a single whole circle
|
||||
}
|
||||
ARC_LIJKUVWE_CODE(
|
||||
travel_L = cart[axis_l] - current_position[axis_l],
|
||||
travel_I = cart.i - current_position.i,
|
||||
travel_L = cart[axis_l] - current_position[axis_l], // Linear X, Y, or Z
|
||||
travel_I = cart.i - current_position.i, // The rest are also non-arc
|
||||
travel_J = cart.j - current_position.j,
|
||||
travel_K = cart.k - current_position.k,
|
||||
travel_U = cart.u - current_position.u,
|
||||
@@ -183,16 +183,21 @@ void plan_arc(
|
||||
|
||||
// Return if the move is near zero
|
||||
if (flat_mm < 0.0001f
|
||||
GANG_N(SUB2(NUM_AXES),
|
||||
&& travel_L < 0.0001f,
|
||||
&& travel_I < 0.0001f,
|
||||
&& travel_J < 0.0001f,
|
||||
&& travel_K < 0.0001f,
|
||||
&& travel_U < 0.0001f,
|
||||
&& travel_V < 0.0001f,
|
||||
&& travel_W < 0.0001f
|
||||
GANG_N(SUB2(NUM_AXES), // Two axes for the arc
|
||||
&& NEAR_ZERO(travel_L), // Linear X, Y, or Z
|
||||
&& NEAR_ZERO(travel_I),
|
||||
&& NEAR_ZERO(travel_J),
|
||||
&& NEAR_ZERO(travel_K),
|
||||
&& NEAR_ZERO(travel_U),
|
||||
&& NEAR_ZERO(travel_V),
|
||||
&& NEAR_ZERO(travel_W)
|
||||
)
|
||||
) return;
|
||||
) {
|
||||
#if HAS_EXTRUDERS
|
||||
if (!NEAR_ZERO(travel_E)) gcode.G0_G1(); // Handle retract/recover as G1
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Feedrate for the move, scaled by the feedrate multiplier
|
||||
const feedRate_t scaled_fr_mm_s = MMS_SCALED(feedrate_mm_s);
|
||||
@@ -356,8 +361,6 @@ void plan_arc(
|
||||
planner.apply_leveling(raw);
|
||||
#endif
|
||||
|
||||
hints.curve_radius = i > 1 ? radius : 0;
|
||||
|
||||
// calculate safe speed for stopping by the end of the arc
|
||||
arc_mm_remaining -= segment_mm;
|
||||
hints.safe_exit_speed_sqr = _MIN(limiting_speed_sqr, 2 * limiting_accel * arc_mm_remaining);
|
||||
@@ -428,71 +431,70 @@ void plan_arc(
|
||||
* G3 X20 Y12 R14 ; CCW circle with r=14 ending at X20 Y12
|
||||
*/
|
||||
void GcodeSuite::G2_G3(const bool clockwise) {
|
||||
if (MOTION_CONDITIONS) {
|
||||
if (!MOTION_CONDITIONS) return;
|
||||
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_RUNNING));
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_RUNNING));
|
||||
|
||||
#if ENABLED(SF_ARC_FIX)
|
||||
const bool relative_mode_backup = relative_mode;
|
||||
relative_mode = true;
|
||||
#endif
|
||||
#if ENABLED(SF_ARC_FIX)
|
||||
const bool relative_mode_backup = relative_mode;
|
||||
relative_mode = true;
|
||||
#endif
|
||||
|
||||
get_destination_from_command(); // Get X Y [Z[I[J[K...]]]] [E] F (and set cutter power)
|
||||
get_destination_from_command(); // Get X Y [Z[I[J[K...]]]] [E] F (and set cutter power)
|
||||
|
||||
TERN_(SF_ARC_FIX, relative_mode = relative_mode_backup);
|
||||
TERN_(SF_ARC_FIX, relative_mode = relative_mode_backup);
|
||||
|
||||
ab_float_t arc_offset = { 0, 0 };
|
||||
if (parser.seenval('R')) {
|
||||
const float r = parser.value_linear_units();
|
||||
if (r) {
|
||||
const xy_pos_t p1 = current_position, p2 = destination;
|
||||
if (p1 != p2) {
|
||||
const xy_pos_t d2 = (p2 - p1) * 0.5f; // XY vector to midpoint of move from current
|
||||
const float e = clockwise ^ (r < 0) ? -1 : 1, // clockwise -1/1, counterclockwise 1/-1
|
||||
len = d2.magnitude(), // Distance to mid-point of move from current
|
||||
h2 = (r - len) * (r + len), // factored to reduce rounding error
|
||||
h = (h2 >= 0) ? SQRT(h2) : 0.0f; // Distance to the arc pivot-point from midpoint
|
||||
const xy_pos_t s = { -d2.y, d2.x }; // Perpendicular bisector. (Divide by len for unit vector.)
|
||||
arc_offset = d2 + s / len * e * h; // The calculated offset (mid-point if |r| <= len)
|
||||
}
|
||||
ab_float_t arc_offset = { 0, 0 };
|
||||
if (parser.seenval('R')) {
|
||||
const float r = parser.value_linear_units();
|
||||
if (r) {
|
||||
const xy_pos_t p1 = current_position, p2 = destination;
|
||||
if (p1 != p2) {
|
||||
const xy_pos_t d2 = (p2 - p1) * 0.5f; // XY vector to midpoint of move from current
|
||||
const float e = clockwise ^ (r < 0) ? -1 : 1, // clockwise -1/1, counterclockwise 1/-1
|
||||
len = d2.magnitude(), // Distance to mid-point of move from current
|
||||
h2 = (r - len) * (r + len), // factored to reduce rounding error
|
||||
h = (h2 >= 0) ? SQRT(h2) : 0.0f; // Distance to the arc pivot-point from midpoint
|
||||
const xy_pos_t s = { -d2.y, d2.x }; // Perpendicular bisector. (Divide by len for unit vector.)
|
||||
arc_offset = d2 + s / len * e * h; // The calculated offset (mid-point if |r| <= len)
|
||||
}
|
||||
}
|
||||
else {
|
||||
#if ENABLED(CNC_WORKSPACE_PLANES)
|
||||
char achar, bchar;
|
||||
switch (workspace_plane) {
|
||||
default:
|
||||
case GcodeSuite::PLANE_XY: achar = 'I'; bchar = 'J'; break;
|
||||
case GcodeSuite::PLANE_YZ: achar = 'J'; bchar = 'K'; break;
|
||||
case GcodeSuite::PLANE_ZX: achar = 'K'; bchar = 'I'; break;
|
||||
}
|
||||
#else
|
||||
constexpr char achar = 'I', bchar = 'J';
|
||||
#endif
|
||||
if (parser.seenval(achar)) arc_offset.a = parser.value_linear_units();
|
||||
if (parser.seenval(bchar)) arc_offset.b = parser.value_linear_units();
|
||||
}
|
||||
|
||||
if (arc_offset) {
|
||||
|
||||
#if ENABLED(ARC_P_CIRCLES)
|
||||
// P indicates number of circles to do
|
||||
const int8_t circles_to_do = parser.byteval('P');
|
||||
if (!WITHIN(circles_to_do, 0, 100))
|
||||
SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
|
||||
#else
|
||||
constexpr uint8_t circles_to_do = 0;
|
||||
#endif
|
||||
|
||||
// Send the arc to the planner
|
||||
plan_arc(destination, arc_offset, clockwise, circles_to_do);
|
||||
reset_stepper_timeout();
|
||||
}
|
||||
else
|
||||
SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
|
||||
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE));
|
||||
}
|
||||
else {
|
||||
#if ENABLED(CNC_WORKSPACE_PLANES)
|
||||
char achar, bchar;
|
||||
switch (workspace_plane) {
|
||||
default:
|
||||
case GcodeSuite::PLANE_XY: achar = 'I'; bchar = 'J'; break;
|
||||
case GcodeSuite::PLANE_YZ: achar = 'J'; bchar = 'K'; break;
|
||||
case GcodeSuite::PLANE_ZX: achar = 'K'; bchar = 'I'; break;
|
||||
}
|
||||
#else
|
||||
constexpr char achar = 'I', bchar = 'J';
|
||||
#endif
|
||||
if (parser.seenval(achar)) arc_offset.a = parser.value_linear_units();
|
||||
if (parser.seenval(bchar)) arc_offset.b = parser.value_linear_units();
|
||||
}
|
||||
|
||||
if (arc_offset) {
|
||||
|
||||
#if ENABLED(ARC_P_CIRCLES)
|
||||
// P indicates number of circles to do
|
||||
const int8_t circles_to_do = parser.byteval('P');
|
||||
if (!WITHIN(circles_to_do, 0, 100))
|
||||
SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
|
||||
#else
|
||||
constexpr uint8_t circles_to_do = 0;
|
||||
#endif
|
||||
|
||||
// Send the arc to the planner
|
||||
plan_arc(destination, arc_offset, clockwise, circles_to_do);
|
||||
reset_stepper_timeout();
|
||||
}
|
||||
else
|
||||
SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
|
||||
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE));
|
||||
}
|
||||
|
||||
#endif // ARC_SUPPORT
|
||||
|
||||
@@ -110,13 +110,7 @@ void GcodeSuite::G38(const int8_t subcode) {
|
||||
|
||||
remember_feedrate_scaling_off();
|
||||
|
||||
const bool error_on_fail =
|
||||
#if ENABLED(G38_PROBE_AWAY)
|
||||
!TEST(subcode, 0)
|
||||
#else
|
||||
(subcode == 2)
|
||||
#endif
|
||||
;
|
||||
const bool error_on_fail = TERN(G38_PROBE_AWAY, !TEST(subcode, 0), subcode == 2);
|
||||
|
||||
// If any axis has enough movement, do the move
|
||||
LOOP_NUM_AXES(i)
|
||||
|
||||
@@ -31,11 +31,13 @@
|
||||
/**
|
||||
* M306: MPC settings and autotune
|
||||
*
|
||||
* T Autotune the active extruder.
|
||||
* E<extruder> Extruder index. (Default: Active Extruder)
|
||||
*
|
||||
* T Autotune the specified or active extruder.
|
||||
*
|
||||
* Set MPC values manually for the specified or active extruder:
|
||||
* A<watts/kelvin> Ambient heat transfer coefficient (no fan).
|
||||
* C<joules/kelvin> Block heat capacity.
|
||||
* E<extruder> Extruder number to set. (Default: E0)
|
||||
* F<watts/kelvin> Ambient heat transfer coefficient (fan on full).
|
||||
* H<joules/kelvin/mm> Filament heat capacity per mm.
|
||||
* P<watts> Heater power.
|
||||
@@ -43,16 +45,21 @@
|
||||
*/
|
||||
|
||||
void GcodeSuite::M306() {
|
||||
const uint8_t e = TERN(HAS_MULTI_EXTRUDER, parser.intval('E', active_extruder), 0);
|
||||
if (e >= (EXTRUDERS)) {
|
||||
SERIAL_ECHOLNPGM("?(E)xtruder index out of range (0-", (EXTRUDERS) - 1, ").");
|
||||
return;
|
||||
}
|
||||
|
||||
if (parser.seen_test('T')) {
|
||||
LCD_MESSAGE(MSG_MPC_AUTOTUNE);
|
||||
thermalManager.MPC_autotune();
|
||||
thermalManager.MPC_autotune(e);
|
||||
ui.reset_status();
|
||||
return;
|
||||
}
|
||||
|
||||
if (parser.seen("ACFPRH")) {
|
||||
const heater_id_t hid = (heater_id_t)parser.intval('E', 0);
|
||||
MPC_t &mpc = thermalManager.temp_hotend[hid].mpc;
|
||||
MPC_t &mpc = thermalManager.temp_hotend[e].mpc;
|
||||
if (parser.seenval('P')) mpc.heater_power = parser.value_float();
|
||||
if (parser.seenval('C')) mpc.block_heat_capacity = parser.value_float();
|
||||
if (parser.seenval('R')) mpc.sensor_responsiveness = parser.value_float();
|
||||
|
||||
@@ -485,7 +485,7 @@
|
||||
#endif
|
||||
|
||||
// Extensible UI serial touch screens. (See src/lcd/extui)
|
||||
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT, DGUS_LCD_UI_CREALITY_TOUCH)
|
||||
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT)
|
||||
#define IS_EXTUI 1
|
||||
#define EXTENSIBLE_UI
|
||||
#endif
|
||||
@@ -613,7 +613,9 @@
|
||||
#undef TEMP_SENSOR_7
|
||||
#undef SINGLENOZZLE
|
||||
#undef SWITCHING_EXTRUDER
|
||||
#undef MECHANICAL_SWITCHING_EXTRUDER
|
||||
#undef SWITCHING_NOZZLE
|
||||
#undef MECHANICAL_SWITCHING_NOZZLE
|
||||
#undef MIXING_EXTRUDER
|
||||
#undef HOTEND_IDLE_TIMEOUT
|
||||
#undef DISABLE_E
|
||||
@@ -629,12 +631,19 @@
|
||||
#define E_TERN_(N) TERN_(HAS_MULTI_EXTRUDER, N)
|
||||
#define E_TERN0(N) TERN0(HAS_MULTI_EXTRUDER, N)
|
||||
|
||||
#if EITHER(SWITCHING_EXTRUDER, MECHANICAL_SWITCHING_EXTRUDER)
|
||||
#define HAS_SWITCHING_EXTRUDER 1
|
||||
#endif
|
||||
#if EITHER(SWITCHING_NOZZLE, MECHANICAL_SWITCHING_NOZZLE)
|
||||
#define HAS_SWITCHING_NOZZLE 1
|
||||
#endif
|
||||
|
||||
#if ENABLED(E_DUAL_STEPPER_DRIVERS) // E0/E1 steppers act in tandem as E0
|
||||
|
||||
#define E_STEPPERS 2
|
||||
#define E_MANUAL 1
|
||||
|
||||
#elif ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
|
||||
#elif HAS_SWITCHING_EXTRUDER // One stepper for every two EXTRUDERS
|
||||
|
||||
#if EXTRUDERS > 4
|
||||
#define E_STEPPERS 3
|
||||
@@ -643,7 +652,7 @@
|
||||
#else
|
||||
#define E_STEPPERS 1
|
||||
#endif
|
||||
#if DISABLED(SWITCHING_NOZZLE)
|
||||
#if !HAS_SWITCHING_NOZZLE
|
||||
#define HOTENDS E_STEPPERS
|
||||
#endif
|
||||
|
||||
@@ -668,7 +677,7 @@
|
||||
#endif
|
||||
|
||||
// No inactive extruders with SWITCHING_NOZZLE or Průša MMU1
|
||||
#if ENABLED(SWITCHING_NOZZLE) || HAS_PRUSA_MMU1
|
||||
#if HAS_SWITCHING_NOZZLE || HAS_PRUSA_MMU1
|
||||
#undef DISABLE_INACTIVE_EXTRUDER
|
||||
#endif
|
||||
|
||||
@@ -758,39 +767,31 @@
|
||||
#define HAS_X_AXIS 1
|
||||
#if NUM_AXES >= XY
|
||||
#define HAS_Y_AXIS 1
|
||||
#if NUM_AXES >= XYZ
|
||||
#define HAS_Z_AXIS 1
|
||||
#ifdef Z4_DRIVER_TYPE
|
||||
#define NUM_Z_STEPPERS 4
|
||||
#elif defined(Z3_DRIVER_TYPE)
|
||||
#define NUM_Z_STEPPERS 3
|
||||
#elif defined(Z2_DRIVER_TYPE)
|
||||
#define NUM_Z_STEPPERS 2
|
||||
#else
|
||||
#define NUM_Z_STEPPERS 1
|
||||
#endif
|
||||
#if NUM_AXES >= 4
|
||||
#define HAS_I_AXIS 1
|
||||
#if NUM_AXES >= 5
|
||||
#define HAS_J_AXIS 1
|
||||
#if NUM_AXES >= 6
|
||||
#define HAS_K_AXIS 1
|
||||
#if NUM_AXES >= 7
|
||||
#define HAS_U_AXIS 1
|
||||
#if NUM_AXES >= 8
|
||||
#define HAS_V_AXIS 1
|
||||
#if NUM_AXES >= 9
|
||||
#define HAS_W_AXIS 1
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if NUM_AXES >= XYZ
|
||||
#define HAS_Z_AXIS 1
|
||||
#endif
|
||||
#if NUM_AXES >= 4
|
||||
#define HAS_I_AXIS 1
|
||||
#endif
|
||||
#if NUM_AXES >= 5
|
||||
#define HAS_J_AXIS 1
|
||||
#endif
|
||||
#if NUM_AXES >= 6
|
||||
#define HAS_K_AXIS 1
|
||||
#endif
|
||||
#if NUM_AXES >= 7
|
||||
#define HAS_U_AXIS 1
|
||||
#endif
|
||||
#if NUM_AXES >= 8
|
||||
#define HAS_V_AXIS 1
|
||||
#endif
|
||||
#if NUM_AXES >= 9
|
||||
#define HAS_W_AXIS 1
|
||||
#endif
|
||||
|
||||
#if !HAS_Y_AXIS
|
||||
#undef AVOID_OBSTACLES
|
||||
#undef ENDSTOPPULLUP_YMIN
|
||||
#undef ENDSTOPPULLUP_YMAX
|
||||
#undef Y_MIN_ENDSTOP_INVERTING
|
||||
@@ -807,7 +808,17 @@
|
||||
#undef MAX_SOFTWARE_ENDSTOP_Y
|
||||
#endif
|
||||
|
||||
#if !HAS_Z_AXIS
|
||||
#if HAS_Z_AXIS
|
||||
#ifdef Z4_DRIVER_TYPE
|
||||
#define NUM_Z_STEPPERS 4
|
||||
#elif defined(Z3_DRIVER_TYPE)
|
||||
#define NUM_Z_STEPPERS 3
|
||||
#elif defined(Z2_DRIVER_TYPE)
|
||||
#define NUM_Z_STEPPERS 2
|
||||
#else
|
||||
#define NUM_Z_STEPPERS 1
|
||||
#endif
|
||||
#else
|
||||
#undef ENDSTOPPULLUP_ZMIN
|
||||
#undef ENDSTOPPULLUP_ZMAX
|
||||
#undef Z_MIN_ENDSTOP_INVERTING
|
||||
@@ -822,6 +833,7 @@
|
||||
#undef Z_MIN_POS
|
||||
#undef Z_MAX_POS
|
||||
#undef MANUAL_Z_HOME_POS
|
||||
#undef Z_SAFE_HOMING
|
||||
#undef MIN_SOFTWARE_ENDSTOP_Z
|
||||
#undef MAX_SOFTWARE_ENDSTOP_Z
|
||||
#endif
|
||||
@@ -933,7 +945,7 @@
|
||||
|
||||
/**
|
||||
* Number of Primary Linear Axes (e.g., XYZ)
|
||||
* X, XY, or XYZ axes. Excluding duplicate axes (X2, Y2. Z2. Z3, Z4)
|
||||
* X, XY, or XYZ axes. Excluding duplicate axes (X2, Y2, Z2, Z3, Z4)
|
||||
*/
|
||||
#if NUM_AXES >= 3
|
||||
#define PRIMARY_LINEAR_AXES 3
|
||||
@@ -1061,7 +1073,7 @@
|
||||
#endif
|
||||
|
||||
// Switching extruder has its own servo?
|
||||
#if ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR)
|
||||
#if ENABLED(SWITCHING_EXTRUDER) && (!HAS_SWITCHING_NOZZLE || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR)
|
||||
#define DO_SWITCH_EXTRUDER 1
|
||||
#endif
|
||||
|
||||
|
||||
+177
-112
@@ -30,26 +30,26 @@
|
||||
#define AXIS_RELATIVE_MODES {}
|
||||
#endif
|
||||
|
||||
#ifdef SWITCHING_NOZZLE_E1_SERVO_NR
|
||||
#if defined(SWITCHING_NOZZLE_E1_SERVO_NR) && DISABLED(MECHANICAL_SWITCHING_NOZZLE)
|
||||
#define SWITCHING_NOZZLE_TWO_SERVOS 1
|
||||
#endif
|
||||
|
||||
// Determine NUM_SERVOS if none was supplied
|
||||
#ifndef NUM_SERVOS
|
||||
#define NUM_SERVOS 0
|
||||
#if ANY(HAS_Z_SERVO_PROBE, CHAMBER_VENT, SWITCHING_TOOLHEAD, SWITCHING_EXTRUDER, SWITCHING_NOZZLE, SPINDLE_SERVO)
|
||||
#if NUM_SERVOS <= Z_PROBE_SERVO_NR
|
||||
#undef NUM_SERVOS
|
||||
#define NUM_SERVOS (Z_PROBE_SERVO_NR + 1)
|
||||
#endif
|
||||
#if NUM_SERVOS <= CHAMBER_VENT_SERVO_NR
|
||||
#undef NUM_SERVOS
|
||||
#define NUM_SERVOS (CHAMBER_VENT_SERVO_NR + 1)
|
||||
#endif
|
||||
#if NUM_SERVOS <= SWITCHING_TOOLHEAD_SERVO_NR
|
||||
#undef NUM_SERVOS
|
||||
#define NUM_SERVOS (SWITCHING_TOOLHEAD_SERVO_NR + 1)
|
||||
#endif
|
||||
#if HAS_Z_SERVO_PROBE && NUM_SERVOS <= Z_PROBE_SERVO_NR
|
||||
#undef NUM_SERVOS
|
||||
#define NUM_SERVOS (Z_PROBE_SERVO_NR + 1)
|
||||
#endif
|
||||
#if ENABLED(CHAMBER_VENT) && NUM_SERVOS <= CHAMBER_VENT_SERVO_NR
|
||||
#undef NUM_SERVOS
|
||||
#define NUM_SERVOS (CHAMBER_VENT_SERVO_NR + 1)
|
||||
#endif
|
||||
#if ENABLED(SWITCHING_TOOLHEAD) && NUM_SERVOS <= SWITCHING_TOOLHEAD_SERVO_NR
|
||||
#undef NUM_SERVOS
|
||||
#define NUM_SERVOS (SWITCHING_TOOLHEAD_SERVO_NR + 1)
|
||||
#endif
|
||||
#if ENABLED(SWITCHING_NOZZLE)
|
||||
#if NUM_SERVOS <= SWITCHING_NOZZLE_SERVO_NR
|
||||
#undef NUM_SERVOS
|
||||
#define NUM_SERVOS (SWITCHING_NOZZLE_SERVO_NR + 1)
|
||||
@@ -58,6 +58,8 @@
|
||||
#undef NUM_SERVOS
|
||||
#define NUM_SERVOS (SWITCHING_NOZZLE_E1_SERVO_NR + 1)
|
||||
#endif
|
||||
#endif
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#if NUM_SERVOS <= SWITCHING_EXTRUDER_SERVO_NR
|
||||
#undef NUM_SERVOS
|
||||
#define NUM_SERVOS (SWITCHING_EXTRUDER_SERVO_NR + 1)
|
||||
@@ -66,12 +68,12 @@
|
||||
#undef NUM_SERVOS
|
||||
#define NUM_SERVOS (SWITCHING_EXTRUDER_E23_SERVO_NR + 1)
|
||||
#endif
|
||||
#if NUM_SERVOS <= SPINDLE_SERVO_NR
|
||||
#undef NUM_SERVOS
|
||||
#define NUM_SERVOS (SPINDLE_SERVO_NR + 1)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if ENABLED(SPINDLE_SERVO) && NUM_SERVOS <= SPINDLE_SERVO_NR
|
||||
#undef NUM_SERVOS
|
||||
#define NUM_SERVOS (SPINDLE_SERVO_NR + 1)
|
||||
#endif
|
||||
#endif // !defined(NUM_SERVOS)
|
||||
|
||||
// Convenience override for a BLTouch alone
|
||||
#if ENABLED(BLTOUCH) && NUM_SERVOS == 1
|
||||
@@ -88,56 +90,108 @@
|
||||
|
||||
// Some options are disallowed without required axes
|
||||
#if !HAS_Y_AXIS
|
||||
#undef SAFE_BED_LEVELING_START_Y
|
||||
#undef ARC_SUPPORT
|
||||
#undef CALIBRATION_MEASURE_YMAX
|
||||
#undef CALIBRATION_MEASURE_YMIN
|
||||
#undef DISABLE_INACTIVE_Y
|
||||
#undef HOME_Y_BEFORE_X
|
||||
#undef INPUT_SHAPING_Y
|
||||
#undef SHAPING_FREQ_Y
|
||||
#undef QUICK_HOME
|
||||
#undef SAFE_BED_LEVELING_START_Y
|
||||
#undef SHAPING_BUFFER_Y
|
||||
#undef SHAPING_FREQ_Y
|
||||
#undef STEALTHCHOP_Y
|
||||
#undef STEP_STATE_Y
|
||||
#endif
|
||||
|
||||
#if !HAS_Z_AXIS
|
||||
#undef CALIBRATION_MEASURE_ZMAX
|
||||
#undef CALIBRATION_MEASURE_ZMIN
|
||||
#undef CNC_WORKSPACE_PLANES
|
||||
#undef DISABLE_INACTIVE_Z
|
||||
#undef ENABLE_LEVELING_FADE_HEIGHT
|
||||
#undef HOME_Z_FIRST
|
||||
#undef HOMING_Z_WITH_PROBE
|
||||
#undef NUM_Z_STEPPERS
|
||||
#undef SAFE_BED_LEVELING_START_Z
|
||||
#undef STEALTHCHOP_Z
|
||||
#undef STEP_STATE_Z
|
||||
#undef Z_IDLE_HEIGHT
|
||||
#undef Z_PROBE_SLED
|
||||
#undef Z_SAFE_HOMING
|
||||
#endif
|
||||
|
||||
#if !HAS_I_AXIS
|
||||
#undef CALIBRATION_MEASURE_IMAX
|
||||
#undef CALIBRATION_MEASURE_IMIN
|
||||
#undef DISABLE_INACTIVE_I
|
||||
#undef SAFE_BED_LEVELING_START_I
|
||||
#undef STEALTHCHOP_I
|
||||
#undef STEP_STATE_I
|
||||
#endif
|
||||
|
||||
#if !HAS_J_AXIS
|
||||
#undef CALIBRATION_MEASURE_JMAX
|
||||
#undef CALIBRATION_MEASURE_JMIN
|
||||
#undef DISABLE_INACTIVE_J
|
||||
#undef SAFE_BED_LEVELING_START_J
|
||||
#undef STEALTHCHOP_J
|
||||
#undef STEP_STATE_J
|
||||
#endif
|
||||
|
||||
#if !HAS_K_AXIS
|
||||
#undef CALIBRATION_MEASURE_KMAX
|
||||
#undef CALIBRATION_MEASURE_KMIN
|
||||
#undef DISABLE_INACTIVE_K
|
||||
#undef SAFE_BED_LEVELING_START_K
|
||||
#undef STEALTHCHOP_K
|
||||
#undef STEP_STATE_K
|
||||
#endif
|
||||
|
||||
#if !HAS_U_AXIS
|
||||
#undef CALIBRATION_MEASURE_UMAX
|
||||
#undef CALIBRATION_MEASURE_UMIN
|
||||
#undef DISABLE_INACTIVE_U
|
||||
#undef SAFE_BED_LEVELING_START_U
|
||||
#undef STEALTHCHOP_U
|
||||
#undef STEP_STATE_U
|
||||
#endif
|
||||
|
||||
#if !HAS_V_AXIS
|
||||
#undef CALIBRATION_MEASURE_VMAX
|
||||
#undef CALIBRATION_MEASURE_VMIN
|
||||
#undef DISABLE_INACTIVE_V
|
||||
#undef SAFE_BED_LEVELING_START_V
|
||||
#undef STEALTHCHOP_V
|
||||
#undef STEP_STATE_V
|
||||
#endif
|
||||
|
||||
#if !HAS_W_AXIS
|
||||
#undef CALIBRATION_MEASURE_WMAX
|
||||
#undef CALIBRATION_MEASURE_WMIN
|
||||
#undef DISABLE_INACTIVE_W
|
||||
#undef SAFE_BED_LEVELING_START_W
|
||||
#undef STEALTHCHOP_W
|
||||
#undef STEP_STATE_W
|
||||
#endif
|
||||
|
||||
// Disallowed with no extruders
|
||||
#if !HAS_EXTRUDERS
|
||||
#define NO_VOLUMETRICS
|
||||
#undef FWRETRACT
|
||||
#undef PIDTEMP
|
||||
#undef AUTOTEMP
|
||||
#undef PID_EXTRUSION_SCALING
|
||||
#undef LIN_ADVANCE
|
||||
#undef FILAMENT_RUNOUT_SENSOR
|
||||
#undef FIL_RUNOUT_ENABLED
|
||||
#undef FIL_RUNOUT_MODE
|
||||
#undef FIL_RUNOUT_DISTANCE_MM
|
||||
#undef ADVANCED_PAUSE_FEATURE
|
||||
#undef FILAMENT_LOAD_UNLOAD_GCODES
|
||||
#undef DISABLE_INACTIVE_EXTRUDER
|
||||
#undef AUTOTEMP
|
||||
#undef EXTRUDER_RUNOUT_PREVENT
|
||||
#undef FILAMENT_LOAD_UNLOAD_GCODES
|
||||
#undef FWRETRACT
|
||||
#undef LCD_SHOW_E_TOTAL
|
||||
#undef LIN_ADVANCE
|
||||
#undef MANUAL_E_MOVES_RELATIVE
|
||||
#undef PID_EXTRUSION_SCALING
|
||||
#undef PIDTEMP
|
||||
#undef SHOW_TEMP_ADC_VALUES
|
||||
#undef STEALTHCHOP_E
|
||||
#undef THERMAL_PROTECTION_PERIOD
|
||||
#undef WATCH_TEMP_PERIOD
|
||||
#undef SHOW_TEMP_ADC_VALUES
|
||||
#undef LCD_SHOW_E_TOTAL
|
||||
#undef MANUAL_E_MOVES_RELATIVE
|
||||
#undef STEALTHCHOP_E
|
||||
#endif
|
||||
|
||||
#if HOTENDS <= 7
|
||||
@@ -228,13 +282,12 @@
|
||||
#define TEMP_SENSOR_0_IS_AD8495 1
|
||||
#elif TEMP_SENSOR_0 == -1
|
||||
#define TEMP_SENSOR_0_IS_AD595 1
|
||||
#elif TEMP_SENSOR_0 == 1000
|
||||
#define TEMP_SENSOR_0_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_0 == 998 || TEMP_SENSOR_0 == 999
|
||||
#define TEMP_SENSOR_0_IS_DUMMY 1
|
||||
#elif TEMP_SENSOR_0 > 0
|
||||
#define TEMP_SENSOR_0_IS_THERMISTOR 1
|
||||
#if TEMP_SENSOR_0 == 1000
|
||||
#define TEMP_SENSOR_0_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_0 == 998 || TEMP_SENSOR_0 == 999
|
||||
#define TEMP_SENSOR_0_IS_DUMMY 1
|
||||
#endif
|
||||
#else
|
||||
#undef HEATER_0_MINTEMP
|
||||
#undef HEATER_0_MAXTEMP
|
||||
@@ -274,13 +327,12 @@
|
||||
#define TEMP_SENSOR_1_IS_AD8495 1
|
||||
#elif TEMP_SENSOR_1 == -1
|
||||
#define TEMP_SENSOR_1_IS_AD595 1
|
||||
#elif TEMP_SENSOR_1 == 1000
|
||||
#define TEMP_SENSOR_1_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_1 == 998 || TEMP_SENSOR_1 == 999
|
||||
#define TEMP_SENSOR_1_IS_DUMMY 1
|
||||
#elif TEMP_SENSOR_1 > 0
|
||||
#define TEMP_SENSOR_1_IS_THERMISTOR 1
|
||||
#if TEMP_SENSOR_1 == 1000
|
||||
#define TEMP_SENSOR_1_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_1 == 998 || TEMP_SENSOR_1 == 999
|
||||
#define TEMP_SENSOR_1_IS_DUMMY 1
|
||||
#endif
|
||||
#else
|
||||
#undef HEATER_1_MINTEMP
|
||||
#undef HEATER_1_MAXTEMP
|
||||
@@ -320,18 +372,72 @@
|
||||
#define TEMP_SENSOR_2_IS_AD8495 1
|
||||
#elif TEMP_SENSOR_2 == -1
|
||||
#define TEMP_SENSOR_2_IS_AD595 1
|
||||
#elif TEMP_SENSOR_2 == 1000
|
||||
#define TEMP_SENSOR_2_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999
|
||||
#define TEMP_SENSOR_2_IS_DUMMY 1
|
||||
#elif TEMP_SENSOR_2 > 0
|
||||
#define TEMP_SENSOR_2_IS_THERMISTOR 1
|
||||
#if TEMP_SENSOR_2 == 1000
|
||||
#define TEMP_SENSOR_2_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999
|
||||
#define TEMP_SENSOR_2_IS_DUMMY 1
|
||||
#endif
|
||||
#else
|
||||
#undef HEATER_2_MINTEMP
|
||||
#undef HEATER_2_MAXTEMP
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_3 == 1000
|
||||
#define TEMP_SENSOR_3_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999
|
||||
#define TEMP_SENSOR_3_IS_DUMMY 1
|
||||
#elif TEMP_SENSOR_3 > 0
|
||||
#define TEMP_SENSOR_3_IS_THERMISTOR 1
|
||||
#elif !TEMP_SENSOR_3
|
||||
#undef HEATER_3_MINTEMP
|
||||
#undef HEATER_3_MAXTEMP
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_4 == 1000
|
||||
#define TEMP_SENSOR_4_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999
|
||||
#define TEMP_SENSOR_4_IS_DUMMY 1
|
||||
#elif TEMP_SENSOR_4 > 0
|
||||
#define TEMP_SENSOR_4_IS_THERMISTOR 1
|
||||
#elif !TEMP_SENSOR_4
|
||||
#undef HEATER_4_MINTEMP
|
||||
#undef HEATER_4_MAXTEMP
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_5 == 1000
|
||||
#define TEMP_SENSOR_5_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999
|
||||
#define TEMP_SENSOR_5_IS_DUMMY 1
|
||||
#elif TEMP_SENSOR_5 > 0
|
||||
#define TEMP_SENSOR_5_IS_THERMISTOR 1
|
||||
#elif !TEMP_SENSOR_5
|
||||
#undef HEATER_5_MINTEMP
|
||||
#undef HEATER_5_MAXTEMP
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_6 == 1000
|
||||
#define TEMP_SENSOR_6_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999
|
||||
#define TEMP_SENSOR_6_IS_DUMMY 1
|
||||
#elif TEMP_SENSOR_6 > 0
|
||||
#define TEMP_SENSOR_6_IS_THERMISTOR 1
|
||||
#elif !TEMP_SENSOR_6
|
||||
#undef HEATER_6_MINTEMP
|
||||
#undef HEATER_6_MAXTEMP
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_7 == 1000
|
||||
#define TEMP_SENSOR_7_IS_CUSTOM 1
|
||||
#elif TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999
|
||||
#define TEMP_SENSOR_7_IS_DUMMY 1
|
||||
#elif TEMP_SENSOR_7 > 0
|
||||
#define TEMP_SENSOR_7_IS_THERMISTOR 1
|
||||
#elif !TEMP_SENSOR_7
|
||||
#undef HEATER_7_MINTEMP
|
||||
#undef HEATER_7_MAXTEMP
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_IS_MAX_TC(REDUNDANT)
|
||||
#if TEMP_SENSOR_REDUNDANT == -5
|
||||
#if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) && !REDUNDANT_TEMP_MATCH(SOURCE, E2)
|
||||
@@ -625,19 +731,16 @@
|
||||
#define HAS_SERVICE_INTERVALS 1
|
||||
#endif
|
||||
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
#define HAS_FILAMENT_SENSOR 1
|
||||
#if NUM_RUNOUT_SENSORS > 1
|
||||
#define MULTI_FILAMENT_SENSOR 1
|
||||
#endif
|
||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
#define HAS_FILAMENT_RUNOUT_DISTANCE 1
|
||||
#endif
|
||||
#if ENABLED(MIXING_EXTRUDER)
|
||||
#define WATCH_ALL_RUNOUT_SENSORS
|
||||
#endif
|
||||
// Probe Temperature Compensation
|
||||
#if !TEMP_SENSOR_PROBE
|
||||
#undef PTC_PROBE
|
||||
#endif
|
||||
#if !TEMP_SENSOR_BED
|
||||
#undef PTC_BED
|
||||
#endif
|
||||
#if !HAS_EXTRUDERS
|
||||
#undef PTC_HOTEND
|
||||
#endif
|
||||
|
||||
#if ANY(PTC_PROBE, PTC_BED, PTC_HOTEND)
|
||||
#define HAS_PTC 1
|
||||
#endif
|
||||
@@ -996,51 +1099,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Remove unused STEALTHCHOP flags
|
||||
#if NUM_AXES < 9
|
||||
#undef STEALTHCHOP_W
|
||||
#undef CALIBRATION_MEASURE_WMIN
|
||||
#undef CALIBRATION_MEASURE_WMAX
|
||||
#if NUM_AXES < 8
|
||||
#undef STEALTHCHOP_V
|
||||
#undef CALIBRATION_MEASURE_VMIN
|
||||
#undef CALIBRATION_MEASURE_VMAX
|
||||
#if NUM_AXES < 7
|
||||
#undef STEALTHCHOP_U
|
||||
#undef CALIBRATION_MEASURE_UMIN
|
||||
#undef CALIBRATION_MEASURE_UMAX
|
||||
#if NUM_AXES < 6
|
||||
#undef STEALTHCHOP_K
|
||||
#undef CALIBRATION_MEASURE_KMIN
|
||||
#undef CALIBRATION_MEASURE_KMAX
|
||||
#if NUM_AXES < 5
|
||||
#undef STEALTHCHOP_J
|
||||
#undef CALIBRATION_MEASURE_JMIN
|
||||
#undef CALIBRATION_MEASURE_JMAX
|
||||
#if NUM_AXES < 4
|
||||
#undef STEALTHCHOP_I
|
||||
#undef CALIBRATION_MEASURE_IMIN
|
||||
#undef CALIBRATION_MEASURE_IMAX
|
||||
#if NUM_AXES < 3
|
||||
#undef STEALTHCHOP_Z
|
||||
#undef Z_IDLE_HEIGHT
|
||||
#undef Z_PROBE_SLED
|
||||
#undef Z_SAFE_HOMING
|
||||
#undef HOME_Z_FIRST
|
||||
#undef HOMING_Z_WITH_PROBE
|
||||
#undef ENABLE_LEVELING_FADE_HEIGHT
|
||||
#undef NUM_Z_STEPPERS
|
||||
#undef CNC_WORKSPACE_PLANES
|
||||
#if NUM_AXES < 2
|
||||
#undef STEALTHCHOP_Y
|
||||
#undef QUICK_HOME
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if defined(SAFE_BED_LEVELING_START_X) || defined(SAFE_BED_LEVELING_START_Y) || defined(SAFE_BED_LEVELING_START_Z) \
|
||||
|| defined(SAFE_BED_LEVELING_START_I) || defined(SAFE_BED_LEVELING_START_J) || defined(SAFE_BED_LEVELING_START_K) \
|
||||
|| defined(SAFE_BED_LEVELING_START_U) || defined(SAFE_BED_LEVELING_START_V) || defined(SAFE_BED_LEVELING_START_W)
|
||||
#define HAS_SAFE_BED_LEVELING 1
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -1132,10 +1194,6 @@
|
||||
#define CANNOT_EMBED_CONFIGURATION defined(__AVR__)
|
||||
#endif
|
||||
|
||||
#if ANY(DISABLE_INACTIVE_X, DISABLE_INACTIVE_Y, DISABLE_INACTIVE_Z, DISABLE_INACTIVE_I, DISABLE_INACTIVE_J, DISABLE_INACTIVE_K, DISABLE_INACTIVE_U, DISABLE_INACTIVE_V, DISABLE_INACTIVE_W, DISABLE_INACTIVE_E)
|
||||
#define HAS_DISABLE_INACTIVE_AXIS 1
|
||||
#endif
|
||||
|
||||
// Fan Kickstart
|
||||
#if FAN_KICKSTART_TIME && !defined(FAN_KICKSTART_POWER)
|
||||
#define FAN_KICKSTART_POWER 180
|
||||
@@ -1151,3 +1209,10 @@
|
||||
#if EITHER(INPUT_SHAPING_X, INPUT_SHAPING_Y)
|
||||
#define HAS_SHAPING 1
|
||||
#endif
|
||||
|
||||
// Toolchange Event G-code
|
||||
#if !HAS_MULTI_EXTRUDER || !(defined(EVENT_GCODE_TOOLCHANGE_T0) || defined(EVENT_GCODE_TOOLCHANGE_T1) || defined(EVENT_GCODE_TOOLCHANGE_T2) || defined(EVENT_GCODE_TOOLCHANGE_T3) || defined(EVENT_GCODE_TOOLCHANGE_T4) || defined(EVENT_GCODE_TOOLCHANGE_T5) || defined(EVENT_GCODE_TOOLCHANGE_T6) || defined(EVENT_GCODE_TOOLCHANGE_T7))
|
||||
#undef TC_GCODE_USE_GLOBAL_X
|
||||
#undef TC_GCODE_USE_GLOBAL_Y
|
||||
#undef TC_GCODE_USE_GLOBAL_Z
|
||||
#endif
|
||||
|
||||
@@ -190,22 +190,22 @@
|
||||
#define XY_CENTER { X_CENTER, Y_CENTER }
|
||||
#endif
|
||||
#if HAS_I_AXIS
|
||||
#define I_CENTER TERN(BED_CENTER_AT_0_0, 0, _I_HALF_BED)
|
||||
#define I_CENTER _I_HALF_BED
|
||||
#endif
|
||||
#if HAS_J_AXIS
|
||||
#define J_CENTER TERN(BED_CENTER_AT_0_0, 0, _J_HALF_BED)
|
||||
#define J_CENTER _J_HALF_BED
|
||||
#endif
|
||||
#if HAS_K_AXIS
|
||||
#define K_CENTER TERN(BED_CENTER_AT_0_0, 0, _K_HALF_BED)
|
||||
#define K_CENTER _K_HALF_BED
|
||||
#endif
|
||||
#if HAS_U_AXIS
|
||||
#define U_CENTER TERN(BED_CENTER_AT_0_0, 0, _U_HALF_BED)
|
||||
#define U_CENTER _U_HALF_BED
|
||||
#endif
|
||||
#if HAS_V_AXIS
|
||||
#define V_CENTER TERN(BED_CENTER_AT_0_0, 0, _V_HALF_BED)
|
||||
#define V_CENTER _V_HALF_BED
|
||||
#endif
|
||||
#if HAS_W_AXIS
|
||||
#define W_CENTER TERN(BED_CENTER_AT_0_0, 0, _W_HALF_BED)
|
||||
#define W_CENTER _W_HALF_BED
|
||||
#endif
|
||||
|
||||
// Get the linear boundaries of the bed
|
||||
@@ -1308,9 +1308,6 @@
|
||||
/**
|
||||
* Set defaults for missing (newer) options
|
||||
*/
|
||||
#if !defined(DISABLE_INACTIVE_X) && ENABLED(DISABLE_X)
|
||||
#define DISABLE_INACTIVE_X 1
|
||||
#endif
|
||||
|
||||
#if HAS_Y_AXIS
|
||||
#if PIN_EXISTS(Y_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y))
|
||||
@@ -1338,11 +1335,6 @@
|
||||
#if PIN_EXISTS(Y2_MS1)
|
||||
#define HAS_Y2_MS_PINS 1
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_Y) && ENABLED(DISABLE_Y)
|
||||
#define DISABLE_INACTIVE_Y 1
|
||||
#endif
|
||||
#else
|
||||
#undef DISABLE_INACTIVE_Y
|
||||
#endif
|
||||
|
||||
#if HAS_Z_AXIS
|
||||
@@ -1358,11 +1350,6 @@
|
||||
#if PIN_EXISTS(Z_MS1)
|
||||
#define HAS_Z_MS_PINS 1
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_Z) && ENABLED(DISABLE_Z)
|
||||
#define DISABLE_INACTIVE_Z 1
|
||||
#endif
|
||||
#else
|
||||
#undef DISABLE_INACTIVE_Z
|
||||
#endif
|
||||
|
||||
#if NUM_Z_STEPPERS >= 2
|
||||
@@ -1423,11 +1410,6 @@
|
||||
#if PIN_EXISTS(I_MS1)
|
||||
#define HAS_I_MS_PINS 1
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_I) && ENABLED(DISABLE_I)
|
||||
#define DISABLE_INACTIVE_I 1
|
||||
#endif
|
||||
#else
|
||||
#undef DISABLE_INACTIVE_I
|
||||
#endif
|
||||
|
||||
#if HAS_J_AXIS
|
||||
@@ -1443,11 +1425,6 @@
|
||||
#if PIN_EXISTS(J_MS1)
|
||||
#define HAS_J_MS_PINS 1
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_J) && ENABLED(DISABLE_J)
|
||||
#define DISABLE_INACTIVE_J 1
|
||||
#endif
|
||||
#else
|
||||
#undef DISABLE_INACTIVE_J
|
||||
#endif
|
||||
|
||||
#if HAS_K_AXIS
|
||||
@@ -1463,11 +1440,6 @@
|
||||
#if PIN_EXISTS(K_MS1)
|
||||
#define HAS_K_MS_PINS 1
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_K) && ENABLED(DISABLE_K)
|
||||
#define DISABLE_INACTIVE_K 1
|
||||
#endif
|
||||
#else
|
||||
#undef DISABLE_INACTIVE_K
|
||||
#endif
|
||||
|
||||
#if HAS_U_AXIS
|
||||
@@ -1483,11 +1455,6 @@
|
||||
#if PIN_EXISTS(U_MS1)
|
||||
#define HAS_U_MS_PINS 1
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_U) && ENABLED(DISABLE_U)
|
||||
#define DISABLE_INACTIVE_U 1
|
||||
#endif
|
||||
#else
|
||||
#undef DISABLE_INACTIVE_U
|
||||
#endif
|
||||
|
||||
#if HAS_V_AXIS
|
||||
@@ -1503,11 +1470,6 @@
|
||||
#if PIN_EXISTS(V_MS1)
|
||||
#define HAS_V_MS_PINS 1
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_V) && ENABLED(DISABLE_V)
|
||||
#define DISABLE_INACTIVE_V 1
|
||||
#endif
|
||||
#else
|
||||
#undef DISABLE_INACTIVE_V
|
||||
#endif
|
||||
|
||||
#if HAS_W_AXIS
|
||||
@@ -1523,11 +1485,43 @@
|
||||
#if PIN_EXISTS(W_MS1)
|
||||
#define HAS_W_MS_PINS 1
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_W) && ENABLED(DISABLE_W)
|
||||
#define DISABLE_INACTIVE_W 1
|
||||
#endif
|
||||
#else
|
||||
#undef DISABLE_INACTIVE_W
|
||||
#endif
|
||||
|
||||
#if !defined(DISABLE_INACTIVE_X) && ENABLED(DISABLE_X)
|
||||
#define DISABLE_INACTIVE_X
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_Y) && ENABLED(DISABLE_Y)
|
||||
#define DISABLE_INACTIVE_Y
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_Z) && ENABLED(DISABLE_Z)
|
||||
#define DISABLE_INACTIVE_Z
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_I) && ENABLED(DISABLE_I)
|
||||
#define DISABLE_INACTIVE_I
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_J) && ENABLED(DISABLE_J)
|
||||
#define DISABLE_INACTIVE_J
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_K) && ENABLED(DISABLE_K)
|
||||
#define DISABLE_INACTIVE_K
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_U) && ENABLED(DISABLE_U)
|
||||
#define DISABLE_INACTIVE_U
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_V) && ENABLED(DISABLE_V)
|
||||
#define DISABLE_INACTIVE_V
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_W) && ENABLED(DISABLE_W)
|
||||
#define DISABLE_INACTIVE_W
|
||||
#endif
|
||||
#if !defined(DISABLE_INACTIVE_EXTRUDER) && ENABLED(DISABLE_E)
|
||||
#define DISABLE_INACTIVE_EXTRUDER
|
||||
#endif
|
||||
#if ANY(DISABLE_INACTIVE_X, DISABLE_INACTIVE_Y, DISABLE_INACTIVE_Z, DISABLE_INACTIVE_I, DISABLE_INACTIVE_J, DISABLE_INACTIVE_K, DISABLE_INACTIVE_U, DISABLE_INACTIVE_V, DISABLE_INACTIVE_W, DISABLE_INACTIVE_EXTRUDER)
|
||||
#define HAS_DISABLE_INACTIVE_AXIS 1
|
||||
#endif
|
||||
#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_U, DISABLE_V, DISABLE_W, DISABLE_E)
|
||||
#define HAS_DISABLE_AXIS 1
|
||||
#endif
|
||||
|
||||
// Extruder steppers and solenoids
|
||||
@@ -1651,11 +1645,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(DISABLE_INACTIVE_E) && ENABLED(DISABLE_E)
|
||||
#define DISABLE_INACTIVE_E 1
|
||||
#endif
|
||||
#else
|
||||
#undef DISABLE_INACTIVE_E
|
||||
#endif // HAS_EXTRUDERS
|
||||
|
||||
/**
|
||||
@@ -2256,28 +2245,6 @@
|
||||
#endif
|
||||
#if _HAS_STOP(X,MAX)
|
||||
#define HAS_X_MAX 1
|
||||
#else
|
||||
#if !PIN_EXISTS(X_MAX)
|
||||
#error "X_MAX Pin Doesnt Exist."
|
||||
#endif
|
||||
#if IS_PROBE_PIN(X,MAX)
|
||||
#error "X_MAX Pin Used for Probe."
|
||||
#endif
|
||||
#if IS_X2_ENDSTOP(X,MAX)
|
||||
#error "X_MAX Pin Used for X2 ES."
|
||||
#endif
|
||||
#if IS_Y2_ENDSTOP(X,MAX)
|
||||
#error "X_MAX Pin Used for Y2 ES."
|
||||
#endif
|
||||
#if IS_Z2_ENDSTOP(X,MAX)
|
||||
#error "X_MAX Pin Used for Z2 ES."
|
||||
#endif
|
||||
#if IS_Z3_ENDSTOP(X,MAX)
|
||||
#error "X_MAX Pin Used for Z3 ES."
|
||||
#endif
|
||||
#if IS_Z4_ENDSTOP(X,MAX)
|
||||
#error "X_MAX Pin Used for Z4 ES."
|
||||
#endif
|
||||
#endif
|
||||
#if _HAS_STOP(Y,MIN)
|
||||
#define HAS_Y_MIN 1
|
||||
@@ -2965,7 +2932,7 @@
|
||||
#define HAS_TEMPERATURE 1
|
||||
#endif
|
||||
|
||||
#if HAS_TEMPERATURE && ANY(HAS_MARLINUI_MENU, HAS_DWIN_E3V2, HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_CREALITY_TOUCH)
|
||||
#if HAS_TEMPERATURE && ANY(HAS_MARLINUI_MENU, HAS_DWIN_E3V2, HAS_DGUS_LCD_CLASSIC)
|
||||
#ifdef PREHEAT_10_LABEL
|
||||
#define PREHEAT_COUNT 10
|
||||
#elif defined(PREHEAT_9_LABEL)
|
||||
|
||||
+129
-49
@@ -670,6 +670,12 @@
|
||||
#error "MILLISECONDS_PREHEAT_TIME is now PREHEAT_TIME_HOTEND_MS."
|
||||
#elif defined(EXPERIMENTAL_SCURVE)
|
||||
#error "EXPERIMENTAL_SCURVE is no longer needed and should be removed."
|
||||
#elif defined(BABYSTEP_ZPROBE_GFX_OVERLAY)
|
||||
#error "BABYSTEP_ZPROBE_GFX_OVERLAY is now BABYSTEP_GFX_OVERLAY."
|
||||
#elif defined(DISABLE_INACTIVE_E)
|
||||
#error "DISABLE_INACTIVE_E is now set with DISABLE_INACTIVE_EXTRUDER."
|
||||
#elif defined(INVERT_X_STEP_PIN) || defined(INVERT_Y_STEP_PIN) || defined(INVERT_Z_STEP_PIN) || defined(INVERT_I_STEP_PIN) || defined(INVERT_J_STEP_PIN) || defined(INVERT_K_STEP_PIN) || defined(INVERT_U_STEP_PIN) || defined(INVERT_V_STEP_PIN) || defined(INVERT_W_STEP_PIN) || defined(INVERT_E_STEP_PIN)
|
||||
#error "INVERT_*_STEP_PIN true is now STEP_STATE_* LOW, and INVERT_*_STEP_PIN false is now STEP_STATE_* HIGH."
|
||||
#endif
|
||||
|
||||
// L64xx stepper drivers have been removed
|
||||
@@ -1013,9 +1019,15 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Custom Event G-code
|
||||
*/
|
||||
#if defined(EVENT_GCODE_SD_ABORT) && DISABLED(NOZZLE_PARK_FEATURE)
|
||||
static_assert(nullptr == strstr(EVENT_GCODE_SD_ABORT, "G27"), "NOZZLE_PARK_FEATURE is required to use G27 in EVENT_GCODE_SD_ABORT.");
|
||||
#endif
|
||||
#if ANY(TC_GCODE_USE_GLOBAL_X, TC_GCODE_USE_GLOBAL_Y, TC_GCODE_USE_GLOBAL_Z) && ENABLED(NO_WORKSPACE_OFFSETS)
|
||||
#error "TC_GCODE_USE_GLOBAL_* options are incompatible with NO_WORKSPACE_OFFSETS."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* I2C Position Encoders
|
||||
@@ -1042,10 +1054,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#error "MESH_BED_LEVELING and BABYSTEP_ZPROBE_OFFSET is not a valid combination"
|
||||
#elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE
|
||||
#error "BABYSTEP_ZPROBE_OFFSET requires a probe."
|
||||
#elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && NONE(HAS_MARLINUI_U8GLIB, IS_DWIN_MARLINUI)
|
||||
#error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a Graphical LCD."
|
||||
#elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && DISABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
#error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET."
|
||||
#elif ENABLED(BABYSTEP_GFX_OVERLAY) && NONE(HAS_MARLINUI_U8GLIB, IS_DWIN_MARLINUI)
|
||||
#error "BABYSTEP_GFX_OVERLAY requires a Graphical LCD."
|
||||
#elif ENABLED(BABYSTEP_GFX_OVERLAY) && DISABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
#error "BABYSTEP_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET."
|
||||
#elif ENABLED(BABYSTEP_HOTEND_Z_OFFSET) && !HAS_HOTEND_OFFSET
|
||||
#error "BABYSTEP_HOTEND_Z_OFFSET requires 2 or more HOTENDS."
|
||||
#elif BOTH(BABYSTEP_ALWAYS_AVAILABLE, MOVE_Z_WHEN_IDLE)
|
||||
@@ -1318,20 +1330,34 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
/**
|
||||
* A Dual Nozzle carriage with switching servo
|
||||
*/
|
||||
#if ENABLED(SWITCHING_NOZZLE)
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
#if BOTH(SWITCHING_NOZZLE, MECHANICAL_SWITCHING_NOZZLE)
|
||||
#error "Enable only one of SWITCHING_NOZZLE or MECHANICAL_SWITCHING_NOZZLE."
|
||||
#elif ENABLED(MECHANICAL_SWITCHING_NOZZLE)
|
||||
#if EXTRUDERS != 2
|
||||
#error "MECHANICAL_SWITCHING_NOZZLE requires exactly 2 EXTRUDERS."
|
||||
#elif ENABLED(DUAL_X_CARRIAGE)
|
||||
#error "MECHANICAL_SWITCHING_NOZZLE and DUAL_X_CARRIAGE are incompatible."
|
||||
#elif ENABLED(SINGLENOZZLE)
|
||||
#error "MECHANICAL_SWITCHING_NOZZLE and SINGLENOZZLE are incompatible."
|
||||
#elif HAS_PRUSA_MMU2
|
||||
#error "MECHANICAL_SWITCHING_NOZZLE and PRUSA_MMU2(S) are incompatible."
|
||||
#elif !defined(EVENT_GCODE_TOOLCHANGE_T0)
|
||||
#error "MECHANICAL_SWITCHING_NOZZLE requires EVENT_GCODE_TOOLCHANGE_T0."
|
||||
#elif !defined(EVENT_GCODE_TOOLCHANGE_T1)
|
||||
#error "MECHANICAL_SWITCHING_NOZZLE requires EVENT_GCODE_TOOLCHANGE_T1."
|
||||
#endif
|
||||
#elif ENABLED(SWITCHING_NOZZLE)
|
||||
#if EXTRUDERS != 2
|
||||
#error "SWITCHING_NOZZLE requires exactly 2 EXTRUDERS."
|
||||
#elif ENABLED(DUAL_X_CARRIAGE)
|
||||
#error "SWITCHING_NOZZLE and DUAL_X_CARRIAGE are incompatible."
|
||||
#elif ENABLED(SINGLENOZZLE)
|
||||
#error "SWITCHING_NOZZLE and SINGLENOZZLE are incompatible."
|
||||
#elif HAS_PRUSA_MMU2
|
||||
#error "SWITCHING_NOZZLE and PRUSA_MMU2(S) are incompatible."
|
||||
#elif EXTRUDERS != 2
|
||||
#error "SWITCHING_NOZZLE requires exactly 2 EXTRUDERS."
|
||||
#elif NUM_SERVOS < 1
|
||||
#error "SWITCHING_NOZZLE requires NUM_SERVOS >= 1."
|
||||
#endif
|
||||
|
||||
#ifndef SWITCHING_NOZZLE_SERVO_NR
|
||||
#elif !defined(SWITCHING_NOZZLE_SERVO_NR)
|
||||
#error "SWITCHING_NOZZLE requires SWITCHING_NOZZLE_SERVO_NR."
|
||||
#elif SWITCHING_NOZZLE_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
|
||||
#error "SERVO0_PIN must be defined for your SWITCHING_NOZZLE."
|
||||
@@ -1342,7 +1368,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#elif SWITCHING_NOZZLE_SERVO_NR == 3 && !PIN_EXISTS(SERVO3)
|
||||
#error "SERVO3_PIN must be defined for your SWITCHING_NOZZLE."
|
||||
#endif
|
||||
|
||||
#ifdef SWITCHING_NOZZLE_E1_SERVO_NR
|
||||
#if SWITCHING_NOZZLE_E1_SERVO_NR == SWITCHING_NOZZLE_SERVO_NR
|
||||
#error "SWITCHING_NOZZLE_E1_SERVO_NR must be different from SWITCHING_NOZZLE_SERVO_NR."
|
||||
@@ -1356,14 +1381,26 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#error "SERVO3_PIN must be defined for your SWITCHING_NOZZLE."
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif // SWITCHING_NOZZLE
|
||||
|
||||
/**
|
||||
* Single Stepper Dual Extruder with switching servo
|
||||
*/
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
#if BOTH(SWITCHING_EXTRUDER, MECHANICAL_SWITCHING_EXTRUDER)
|
||||
#error "Enable only one of SWITCHING_EXTRUDER or MECHANICAL_SWITCHING_EXTRUDER."
|
||||
#elif ENABLED(MECHANICAL_SWITCHING_EXTRUDER)
|
||||
#if EXTRUDERS < 2
|
||||
#error "MECHANICAL_SWITCHING_EXTRUDER requires EXTRUDERS >= 2."
|
||||
#elif !defined(EVENT_GCODE_TOOLCHANGE_T0)
|
||||
#error "MECHANICAL_SWITCHING_EXTRUDER requires EVENT_GCODE_TOOLCHANGE_T0."
|
||||
#elif !defined(EVENT_GCODE_TOOLCHANGE_T1)
|
||||
#error "MECHANICAL_SWITCHING_EXTRUDER requires EVENT_GCODE_TOOLCHANGE_T1."
|
||||
#endif
|
||||
#elif ENABLED(SWITCHING_EXTRUDER)
|
||||
#if NUM_SERVOS < 1
|
||||
#error "SWITCHING_EXTRUDER requires NUM_SERVOS >= 1."
|
||||
#elif !defined(SWITCHING_EXTRUDER_SERVO_NR)
|
||||
#error "SWITCHING_EXTRUDER requires SWITCHING_EXTRUDER_SERVO_NR."
|
||||
#elif SWITCHING_EXTRUDER_SERVO_NR == 0 && !PIN_EXISTS(SERVO0)
|
||||
#error "SERVO0_PIN must be defined for your SWITCHING_EXTRUDER."
|
||||
#elif SWITCHING_EXTRUDER_SERVO_NR == 1 && !PIN_EXISTS(SERVO1)
|
||||
@@ -1387,8 +1424,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#elif SWITCHING_EXTRUDER_E23_SERVO_NR == SWITCHING_EXTRUDER_SERVO_NR
|
||||
#error "SWITCHING_EXTRUDER_E23_SERVO_NR should be a different extruder from SWITCHING_EXTRUDER_SERVO_NR."
|
||||
#endif
|
||||
#elif EXTRUDERS < 2
|
||||
#error "SWITCHING_EXTRUDER requires EXTRUDERS >= 2."
|
||||
#endif
|
||||
#endif
|
||||
#endif // SWITCHING_EXTRUDER
|
||||
|
||||
/**
|
||||
* Mixing Extruder requirements
|
||||
@@ -1400,8 +1439,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#error "You must set MIXING_STEPPERS >= 2 for a mixing extruder."
|
||||
#elif ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
#error "MIXING_EXTRUDER is incompatible with FILAMENT_WIDTH_SENSOR. Comment out this line to use it anyway."
|
||||
#elif ENABLED(SWITCHING_EXTRUDER)
|
||||
#error "Please select either MIXING_EXTRUDER or SWITCHING_EXTRUDER, not both."
|
||||
#elif HAS_SWITCHING_EXTRUDER
|
||||
#error "MIXING_EXTRUDER is incompatible with (MECHANICAL_)SWITCHING_EXTRUDER."
|
||||
#elif ENABLED(SINGLENOZZLE)
|
||||
#error "MIXING_EXTRUDER is incompatible with SINGLENOZZLE."
|
||||
#elif ENABLED(DISABLE_INACTIVE_EXTRUDER)
|
||||
@@ -1417,8 +1456,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#error "E_DUAL_STEPPER_DRIVERS can only be used with EXTRUDERS set to 1."
|
||||
#elif ENABLED(MIXING_EXTRUDER)
|
||||
#error "E_DUAL_STEPPER_DRIVERS is incompatible with MIXING_EXTRUDER."
|
||||
#elif ENABLED(SWITCHING_EXTRUDER)
|
||||
#error "E_DUAL_STEPPER_DRIVERS is incompatible with SWITCHING_EXTRUDER."
|
||||
#elif HAS_SWITCHING_EXTRUDER
|
||||
#error "E_DUAL_STEPPER_DRIVERS is incompatible with (MECHANICAL_)SWITCHING_EXTRUDER."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1639,18 +1678,18 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Features that require a min/max/specific NUM_AXES
|
||||
* Features that require a min/max/specific steppers / axes to be enabled.
|
||||
*/
|
||||
#if HAS_LEVELING && !HAS_Z_AXIS
|
||||
#error "Leveling in Marlin requires three or more axes, with Z as the vertical axis."
|
||||
#elif ENABLED(CNC_WORKSPACE_PLANES) && !HAS_Z_AXIS
|
||||
#error "CNC_WORKSPACE_PLANES currently requires NUM_AXES >= 3"
|
||||
#error "CNC_WORKSPACE_PLANES currently requires a Z axis"
|
||||
#elif ENABLED(DIRECT_STEPPING) && NUM_AXES > XYZ
|
||||
#error "DIRECT_STEPPING currently requires NUM_AXES 3"
|
||||
#elif ENABLED(FOAMCUTTER_XYUV) && NUM_AXES < 5
|
||||
#error "FOAMCUTTER_XYUV requires NUM_AXES >= 5."
|
||||
#error "DIRECT_STEPPING does not currently support more than 3 axes (i.e., XYZ)."
|
||||
#elif ENABLED(FOAMCUTTER_XYUV) && !(HAS_I_AXIS && HAS_J_AXIS)
|
||||
#error "FOAMCUTTER_XYUV requires I and J steppers to be enabled."
|
||||
#elif ENABLED(LINEAR_ADVANCE) && HAS_I_AXIS
|
||||
#error "LINEAR_ADVANCE currently requires NUM_AXES <= 3."
|
||||
#error "LINEAR_ADVANCE does not currently support the inclusion of an I axis."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1658,11 +1697,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
*/
|
||||
#if HAS_I_AXIS
|
||||
#if !defined(I_MIN_POS) || !defined(I_MAX_POS)
|
||||
#error "I_MIN_POS and I_MAX_POS are required with NUM_AXES >= 4."
|
||||
#error "I_MIN_POS and I_MAX_POS are required for the I axis."
|
||||
#elif !defined(I_HOME_DIR)
|
||||
#error "I_HOME_DIR is required with NUM_AXES >= 4."
|
||||
#error "I_HOME_DIR is required for the I axis."
|
||||
#elif HAS_I_ENABLE && !defined(I_ENABLE_ON)
|
||||
#error "I_ENABLE_ON is required for your I driver with NUM_AXES >= 4."
|
||||
#error "I_ENABLE_ON is required for the I stepper."
|
||||
#elif !defined(INVERT_I_DIR)
|
||||
#error "INVERT_I_DIR is required for the I stepper."
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_J_AXIS
|
||||
@@ -1671,11 +1712,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#elif ENABLED(AXIS5_ROTATES) && DISABLED(AXIS4_ROTATES)
|
||||
#error "AXIS5_ROTATES requires AXIS4_ROTATES."
|
||||
#elif !defined(J_MIN_POS) || !defined(J_MAX_POS)
|
||||
#error "J_MIN_POS and J_MAX_POS are required with NUM_AXES >= 5."
|
||||
#error "J_MIN_POS and J_MAX_POS are required for the J axis."
|
||||
#elif !defined(J_HOME_DIR)
|
||||
#error "J_HOME_DIR is required with NUM_AXES >= 5."
|
||||
#error "J_HOME_DIR is required for the J axis."
|
||||
#elif HAS_J_ENABLE && !defined(J_ENABLE_ON)
|
||||
#error "J_ENABLE_ON is required for your J driver with NUM_AXES >= 5."
|
||||
#error "J_ENABLE_ON is required for the J stepper."
|
||||
#elif !defined(INVERT_J_DIR)
|
||||
#error "INVERT_J_DIR is required for the J stepper."
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_K_AXIS
|
||||
@@ -1684,11 +1727,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#elif ENABLED(AXIS6_ROTATES) && DISABLED(AXIS5_ROTATES)
|
||||
#error "AXIS6_ROTATES requires AXIS5_ROTATES."
|
||||
#elif !defined(K_MIN_POS) || !defined(K_MAX_POS)
|
||||
#error "K_MIN_POS and K_MAX_POS are required with NUM_AXES >= 6."
|
||||
#error "K_MIN_POS and K_MAX_POS are required for the K axis."
|
||||
#elif !defined(K_HOME_DIR)
|
||||
#error "K_HOME_DIR is required with NUM_AXES >= 6."
|
||||
#error "K_HOME_DIR is required for the K axis."
|
||||
#elif HAS_K_ENABLE && !defined(K_ENABLE_ON)
|
||||
#error "K_ENABLE_ON is required for your K driver with NUM_AXES >= 6."
|
||||
#error "K_ENABLE_ON is required for the K stepper."
|
||||
#elif !defined(INVERT_K_DIR)
|
||||
#error "INVERT_K_DIR is required for the K stepper."
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_U_AXIS
|
||||
@@ -1697,11 +1742,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#elif ENABLED(AXIS7_ROTATES) && DISABLED(AXIS6_ROTATES)
|
||||
#error "AXIS7_ROTATES requires AXIS6_ROTATES."
|
||||
#elif !defined(U_MIN_POS) || !defined(U_MAX_POS)
|
||||
#error "U_MIN_POS and U_MAX_POS are required with NUM_AXES >= 7."
|
||||
#error "U_MIN_POS and U_MAX_POS are required for the U axis."
|
||||
#elif !defined(U_HOME_DIR)
|
||||
#error "U_HOME_DIR is required with NUM_AXES >= 7."
|
||||
#error "U_HOME_DIR is required for the U axis."
|
||||
#elif HAS_U_ENABLE && !defined(U_ENABLE_ON)
|
||||
#error "U_ENABLE_ON is required for your U driver with NUM_AXES >= 7."
|
||||
#error "U_ENABLE_ON is required for the U stepper."
|
||||
#elif !defined(INVERT_U_DIR)
|
||||
#error "INVERT_U_DIR is required for the U stepper."
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_V_AXIS
|
||||
@@ -1710,11 +1757,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#elif ENABLED(AXIS8_ROTATES) && DISABLED(AXIS7_ROTATES)
|
||||
#error "AXIS8_ROTATES requires AXIS7_ROTATES."
|
||||
#elif !defined(V_MIN_POS) || !defined(V_MAX_POS)
|
||||
#error "V_MIN_POS and V_MAX_POS are required with NUM_AXES >= 8."
|
||||
#error "V_MIN_POS and V_MAX_POS are required for the V axis."
|
||||
#elif !defined(V_HOME_DIR)
|
||||
#error "V_HOME_DIR is required with NUM_AXES >= 8."
|
||||
#error "V_HOME_DIR is required for the V axis."
|
||||
#elif HAS_V_ENABLE && !defined(V_ENABLE_ON)
|
||||
#error "V_ENABLE_ON is required for your V driver with NUM_AXES >= 8."
|
||||
#error "V_ENABLE_ON is required for the V stepper."
|
||||
#elif !defined(INVERT_V_DIR)
|
||||
#error "INVERT_V_DIR is required for the V stepper."
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_W_AXIS
|
||||
@@ -1723,11 +1772,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#elif ENABLED(AXIS9_ROTATES) && DISABLED(AXIS8_ROTATES)
|
||||
#error "AXIS9_ROTATES requires AXIS8_ROTATES."
|
||||
#elif !defined(W_MIN_POS) || !defined(W_MAX_POS)
|
||||
#error "W_MIN_POS and W_MAX_POS are required with NUM_AXES >= 9."
|
||||
#error "W_MIN_POS and W_MAX_POS are required for the W axis."
|
||||
#elif !defined(W_HOME_DIR)
|
||||
#error "W_HOME_DIR is required with NUM_AXES >= 9."
|
||||
#error "W_HOME_DIR is required for the W axis."
|
||||
#elif HAS_W_ENABLE && !defined(W_ENABLE_ON)
|
||||
#error "W_ENABLE_ON is required for your W driver with NUM_AXES >= 9."
|
||||
#error "W_ENABLE_ON is required for the W stepper."
|
||||
#elif !defined(INVERT_W_DIR)
|
||||
#error "INVERT_W_DIR is required for the W stepper."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1954,9 +2005,9 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
*/
|
||||
#if ENABLED(SENSORLESS_PROBING)
|
||||
#if ENABLED(DELTA) && !(X_SENSORLESS && Y_SENSORLESS && Z_SENSORLESS)
|
||||
#error "SENSORLESS_PROBING requires TMC2130/2160/2209/5130/5160 drivers on X, Y, and Z."
|
||||
#error "SENSORLESS_PROBING requires TMC2130/2160/2209/5130/5160 drivers on X, Y, and Z and {X|Y|Z}_STALL_SENSITIVITY."
|
||||
#elif !Z_SENSORLESS
|
||||
#error "SENSORLESS_PROBING requires a TMC2130/2160/2209/5130/5160 driver on Z."
|
||||
#error "SENSORLESS_PROBING requires a TMC2130/2160/2209/5130/5160 driver on Z and Z_STALL_SENSITIVITY."
|
||||
#endif
|
||||
#elif ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
|
||||
#if DISABLED(USE_ZMIN_PLUG)
|
||||
@@ -2244,6 +2295,27 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
static_assert(WITHIN(Z_SAFE_HOMING_Y_POINT, Y_MIN_POS, Y_MAX_POS), "Z_SAFE_HOMING_Y_POINT can't be reached by the nozzle.");
|
||||
#endif
|
||||
|
||||
// Check Safe Bed Leveling settings
|
||||
#if HAS_SAFE_BED_LEVELING
|
||||
#if defined(SAFE_BED_LEVELING_START_Y) && !defined(SAFE_BED_LEVELING_START_X)
|
||||
#error "If SAFE_BED_LEVELING_START_Y is defined, SAFE_BED_LEVELING_START_X must also be defined."
|
||||
#elif defined(SAFE_BED_LEVELING_START_Z) && !defined(SAFE_BED_LEVELING_START_Y)
|
||||
#error "If SAFE_BED_LEVELING_START_Z is defined, SAFE_BED_LEVELING_START_Y must also be defined."
|
||||
#elif defined(SAFE_BED_LEVELING_START_I) && !defined(SAFE_BED_LEVELING_START_Z)
|
||||
#error "If SAFE_BED_LEVELING_START_I is defined, SAFE_BED_LEVELING_START_Z must also be defined."
|
||||
#elif defined(SAFE_BED_LEVELING_START_J) && !defined(SAFE_BED_LEVELING_START_I)
|
||||
#error "If SAFE_BED_LEVELING_START_J is defined, SAFE_BED_LEVELING_START_I must also be defined."
|
||||
#elif defined(SAFE_BED_LEVELING_START_K) && !defined(SAFE_BED_LEVELING_START_J)
|
||||
#error "If SAFE_BED_LEVELING_START_K is defined, SAFE_BED_LEVELING_START_J must also be defined."
|
||||
#elif defined(SAFE_BED_LEVELING_START_U) && !defined(SAFE_BED_LEVELING_START_K)
|
||||
#error "If SAFE_BED_LEVELING_START_U is defined, SAFE_BED_LEVELING_START_K must also be defined."
|
||||
#elif defined(SAFE_BED_LEVELING_START_V) && !defined(SAFE_BED_LEVELING_START_U)
|
||||
#error "If SAFE_BED_LEVELING_START_V is defined, SAFE_BED_LEVELING_START_U must also be defined."
|
||||
#elif defined(SAFE_BED_LEVELING_START_W) && !defined(SAFE_BED_LEVELING_START_V)
|
||||
#error "If SAFE_BED_LEVELING_START_W is defined, SAFE_BED_LEVELING_START_V must also be defined."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Make sure DISABLE_[XYZ] compatible with selected homing options
|
||||
*/
|
||||
@@ -2747,8 +2819,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#error "MULTI_NOZZLE_DUPLICATION is incompatible with DUAL_X_CARRIAGE."
|
||||
#elif ENABLED(MIXING_EXTRUDER)
|
||||
#error "MULTI_NOZZLE_DUPLICATION is incompatible with MIXING_EXTRUDER."
|
||||
#elif ENABLED(SWITCHING_EXTRUDER)
|
||||
#error "MULTI_NOZZLE_DUPLICATION is incompatible with SWITCHING_EXTRUDER."
|
||||
#elif HAS_SWITCHING_EXTRUDER
|
||||
#error "MULTI_NOZZLE_DUPLICATION is incompatible with (MECHANICAL_)SWITCHING_EXTRUDER."
|
||||
#elif HOTENDS < 2
|
||||
#error "MULTI_NOZZLE_DUPLICATION requires 2 or more hotends."
|
||||
#endif
|
||||
@@ -3108,7 +3180,7 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
+ COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \
|
||||
+ 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, DGUS_LCD_UI_CREALITY_TOUCH) \
|
||||
+ COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \
|
||||
+ 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) \
|
||||
@@ -3255,8 +3327,14 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
|
||||
#if LCD_BACKLIGHT_TIMEOUT_MINS
|
||||
#if !HAS_ENCODER_ACTION
|
||||
#error "LCD_BACKLIGHT_TIMEOUT_MINS requires an LCD with encoder or keypad."
|
||||
#elif ENABLED(NEOPIXEL_BKGD_INDEX_FIRST)
|
||||
#if PIN_EXISTS(LCD_BACKLIGHT)
|
||||
#error "LCD_BACKLIGHT_PIN and NEOPIXEL_BKGD_INDEX_FIRST are not supported at the same time."
|
||||
#elif ENABLED(NEOPIXEL_BKGD_ALWAYS_ON)
|
||||
#error "LCD_BACKLIGHT_TIMEOUT is not compatible with NEOPIXEL_BKGD_ALWAYS_ON."
|
||||
#endif
|
||||
#elif !PIN_EXISTS(LCD_BACKLIGHT)
|
||||
#error "LCD_BACKLIGHT_TIMEOUT_MINS requires LCD_BACKLIGHT_PIN."
|
||||
#error "LCD_BACKLIGHT_TIMEOUT_MINS requires either LCD_BACKLIGHT_PIN or NEOPIXEL_BKGD_INDEX_FIRST."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -4390,6 +4468,8 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
|
||||
#error "DGUS_LCD_UI RELOADED requires BABYSTEP_ALWAYS_AVAILABLE."
|
||||
#elif DISABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
#error "DGUS_LCD_UI RELOADED requires BABYSTEP_ZPROBE_OFFSET."
|
||||
#elif ENABLED(HOME_AFTER_DEACTIVATE)
|
||||
#error "DGUS_LCD_UI RELOADED requires HOME_AFTER_DEACTIVATE to be disabled."
|
||||
#elif ENABLED(AUTO_BED_LEVELING_UBL) && DISABLED(UBL_SAVE_ACTIVE_ON_M500)
|
||||
#warning "Without UBL_SAVE_ACTIVE_ON_M500, your mesh will not be saved when using the touchscreen."
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2023-02-03"
|
||||
#define STRING_DISTRIBUTION_DATE "2023-03-10"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -537,7 +537,7 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
||||
*/
|
||||
FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char prefix, const bool blink) {
|
||||
#if HAS_HEATED_BED
|
||||
const bool isBed = TERN(HAS_HEATED_CHAMBER, heater_id == H_BED, heater_id < 0);
|
||||
const bool isBed = heater_id == H_BED;
|
||||
const celsius_t t1 = (isBed ? thermalManager.wholeDegBed() : thermalManager.wholeDegHotend(heater_id)),
|
||||
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id));
|
||||
#else
|
||||
@@ -546,7 +546,17 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char pr
|
||||
|
||||
if (prefix >= 0) lcd_put_lchar(prefix);
|
||||
|
||||
lcd_put_u8str(t1 < 0 ? "err" : i16tostr3rj(t1));
|
||||
if (t1 >= 0)
|
||||
lcd_put_u8str(ui16tostr3rj(t1));
|
||||
else {
|
||||
#if ENABLED(SHOW_TEMPERATURE_BELOW_ZERO)
|
||||
char * const str = i16tostr3rj(t1);
|
||||
lcd_put_u8str(&str[1]);
|
||||
#else
|
||||
lcd_put_u8str(F("err"));
|
||||
#endif
|
||||
}
|
||||
|
||||
lcd_put_u8str(F("/"));
|
||||
|
||||
#if !HEATER_IDLE_HANDLER
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
|
||||
* Contents will be REPLACED by future processing!
|
||||
* Use genallfont.sh to generate font data for updated languages.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "langdata.h"
|
||||
|
||||
static const uxg_fontinfo_t g_fontinfo_fr_na[] PROGMEM = {};
|
||||
@@ -7,10 +7,4 @@
|
||||
|
||||
#include "langdata.h"
|
||||
|
||||
const u8g_fntpgm_uint8_t fontpage_2_241_241[31] U8G_FONT_SECTION("fontpage_2_241_241") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF1,0xF1,0x00,0x08,0x00,0x00,
|
||||
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x48,0x90,0x00,0x88,0x88,0x88,0x88,0x70};
|
||||
|
||||
static const uxg_fontinfo_t g_fontinfo_hu[] PROGMEM = {
|
||||
FONTDATA_ITEM(2, 241, 241, fontpage_2_241_241), // 'ű' -- 'ű'
|
||||
};
|
||||
static const uxg_fontinfo_t g_fontinfo_hu[] PROGMEM = {};
|
||||
|
||||
@@ -27,6 +27,9 @@ const u8g_fntpgm_uint8_t fontpage_2_218_219[47] U8G_FONT_SECTION("fontpage_2_218
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDA,0xDB,0x00,0x0A,0x00,0x00,
|
||||
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x88,0x80,0x70,0x08,0x88,
|
||||
0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x78,0x80,0x70,0x08,0xF0};
|
||||
const u8g_fntpgm_uint8_t fontpage_2_250_250[31] U8G_FONT_SECTION("fontpage_2_250_250") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFA,0xFA,0x00,0x08,0x00,0x00,
|
||||
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8};
|
||||
const u8g_fntpgm_uint8_t fontpage_2_252_252[30] U8G_FONT_SECTION("fontpage_2_252_252") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0x00,0x07,0x00,0x00,
|
||||
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8};
|
||||
@@ -37,5 +40,6 @@ static const uxg_fontinfo_t g_fontinfo_pl[] PROGMEM = {
|
||||
FONTDATA_ITEM(2, 153, 153, fontpage_2_153_153), // 'ę' -- 'ę'
|
||||
FONTDATA_ITEM(2, 193, 196, fontpage_2_193_196), // 'Ł' -- 'ń'
|
||||
FONTDATA_ITEM(2, 218, 219, fontpage_2_218_219), // 'Ś' -- 'ś'
|
||||
FONTDATA_ITEM(2, 250, 250, fontpage_2_250_250), // 'ź' -- 'ź'
|
||||
FONTDATA_ITEM(2, 252, 252, fontpage_2_252_252), // 'ż' -- 'ż'
|
||||
};
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
|
||||
* Contents will be REPLACED by future processing!
|
||||
* Use genallfont.sh to generate font data for updated languages.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "langdata.h"
|
||||
|
||||
static const uxg_fontinfo_t g_fontinfo_sv[] PROGMEM = {};
|
||||
@@ -7,9 +7,6 @@
|
||||
|
||||
#include "langdata.h"
|
||||
|
||||
const u8g_fntpgm_uint8_t fontpage_64_157_157[26] U8G_FONT_SECTION("fontpage_64_157_157") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9D,0x9D,0x00,0x07,0x00,0x00,
|
||||
0x00,0x05,0x03,0x03,0x06,0x00,0x04,0xD8,0x48,0x90};
|
||||
const u8g_fntpgm_uint8_t fontpage_69_191_191[28] U8G_FONT_SECTION("fontpage_69_191_191") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBF,0xBF,0x00,0x05,0x00,0x00,
|
||||
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x08,0x18,0x28,0x48,0xF8};
|
||||
@@ -382,10 +379,6 @@ const u8g_fntpgm_uint8_t fontpage_172_232_232[45] U8G_FONT_SECTION("fontpage_172
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE8,0xE8,0x00,0x0A,0xFF,0x00,
|
||||
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x7B,0xC0,0x4A,0x40,0x4A,0x40,0x7B,0xC0,0x04,
|
||||
0x80,0xFF,0xE0,0x11,0x00,0xFB,0xE0,0x4A,0x40,0x4A,0x40,0x7B,0xC0};
|
||||
const u8g_fntpgm_uint8_t fontpage_172_244_244[45] U8G_FONT_SECTION("fontpage_172_244_244") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF4,0xF4,0x00,0x0A,0xFF,0x00,
|
||||
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x01,0x00,0xEF,0xE0,0xA5,0x40,0xAF,0xE0,0xA4,
|
||||
0x40,0xA7,0xC0,0xE4,0x40,0x07,0xC0,0x04,0x40,0x07,0xC0,0x0C,0x60};
|
||||
const u8g_fntpgm_uint8_t fontpage_173_222_222[45] U8G_FONT_SECTION("fontpage_173_222_222") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDE,0xDE,0x00,0x0A,0xFF,0x00,
|
||||
0x00,0x0A,0x0B,0x16,0x0C,0x01,0xFF,0xFF,0xC0,0x80,0x40,0x80,0x40,0x9E,0x40,0x92,
|
||||
@@ -744,10 +737,6 @@ const u8g_fntpgm_uint8_t fontpage_202_244_244[45] U8G_FONT_SECTION("fontpage_202
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF4,0xF4,0x00,0x0A,0xFF,0x00,
|
||||
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x11,0x00,0xFF,0xE0,0x55,0x40,0x7C,0x80,0x39,
|
||||
0x40,0x56,0x20,0x7F,0xC0,0x04,0x00,0x27,0x80,0x24,0x00,0xFF,0xE0};
|
||||
const u8g_fntpgm_uint8_t fontpage_203_135_135[45] U8G_FONT_SECTION("fontpage_203_135_135") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x87,0x87,0x00,0x0A,0xFF,0x00,
|
||||
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x08,0x00,0x04,0x00,0xFF,0xE0,0x11,0x00,0x11,
|
||||
0x00,0x11,0x00,0x0A,0x00,0x0A,0x00,0x04,0x00,0x1B,0x00,0xE0,0xE0};
|
||||
const u8g_fntpgm_uint8_t fontpage_203_153_153[45] U8G_FONT_SECTION("fontpage_203_153_153") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x99,0x99,0x00,0x0A,0xFF,0x00,
|
||||
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x20,0x80,0xAC,0x80,0x72,0x80,0x20,0x80,0xFC,
|
||||
@@ -1050,10 +1039,6 @@ const u8g_fntpgm_uint8_t fontpage_246_201_201[45] U8G_FONT_SECTION("fontpage_246
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC9,0xC9,0x00,0x0A,0xFF,0x00,
|
||||
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x42,0x00,0x7B,0xE0,0x94,0x80,0x7F,0xC0,0x04,
|
||||
0x00,0xFF,0xE0,0x01,0x00,0x7F,0xC0,0x11,0x00,0x09,0x00,0x03,0x00};
|
||||
const u8g_fntpgm_uint8_t fontpage_247_128_128[45] U8G_FONT_SECTION("fontpage_247_128_128") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x0A,0xFF,0x00,
|
||||
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x42,0x00,0x7B,0xE0,0x94,0x80,0x27,0xC0,0x50,
|
||||
0x40,0x4F,0x40,0x49,0x40,0x4F,0x40,0x49,0x40,0x4F,0x40,0x40,0xC0};
|
||||
const u8g_fntpgm_uint8_t fontpage_247_177_177[45] U8G_FONT_SECTION("fontpage_247_177_177") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB1,0xB1,0x00,0x0A,0xFF,0x00,
|
||||
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x21,0x00,0x3D,0xE0,0x4A,0x80,0x94,0x40,0x7F,
|
||||
@@ -1465,7 +1450,6 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510
|
||||
0x00,0x02,0x07,0x07,0x0C,0x06,0x01,0xC0,0xC0,0x00,0x00,0x00,0xC0,0xC0};
|
||||
|
||||
static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = {
|
||||
FONTDATA_ITEM(64, 157, 157, fontpage_64_157_157), // '”' -- '”'
|
||||
FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿'
|
||||
FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一'
|
||||
FONTDATA_ITEM(156, 137, 139, fontpage_156_137_139), // '三' -- '下'
|
||||
@@ -1553,7 +1537,6 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = {
|
||||
FONTDATA_ITEM(171, 183, 183, fontpage_171_183_183), // '喷' -- '喷'
|
||||
FONTDATA_ITEM(172, 180, 180, fontpage_172_180_180), // '嘴' -- '嘴'
|
||||
FONTDATA_ITEM(172, 232, 232, fontpage_172_232_232), // '器' -- '器'
|
||||
FONTDATA_ITEM(172, 244, 244, fontpage_172_244_244), // '噴' -- '噴'
|
||||
FONTDATA_ITEM(173, 222, 222, fontpage_173_222_222), // '回' -- '回'
|
||||
FONTDATA_ITEM(173, 224, 224, fontpage_173_224_224), // '因' -- '因'
|
||||
FONTDATA_ITEM(173, 250, 250, fontpage_173_250_250), // '固' -- '固'
|
||||
@@ -1642,7 +1625,6 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = {
|
||||
FONTDATA_ITEM(202, 240, 240, fontpage_202_240_240), // '数' -- '数'
|
||||
FONTDATA_ITEM(202, 242, 242, fontpage_202_242_242), // '敲' -- '敲'
|
||||
FONTDATA_ITEM(202, 244, 244, fontpage_202_244_244), // '整' -- '整'
|
||||
FONTDATA_ITEM(203, 135, 135, fontpage_203_135_135), // '文' -- '文'
|
||||
FONTDATA_ITEM(203, 153, 153, fontpage_203_153_153), // '料' -- '料'
|
||||
FONTDATA_ITEM(203, 156, 156, fontpage_203_156_156), // '斜' -- '斜'
|
||||
FONTDATA_ITEM(203, 173, 173, fontpage_203_173_173), // '断' -- '断'
|
||||
@@ -1718,7 +1700,6 @@ static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = {
|
||||
FONTDATA_ITEM(245, 239, 239, fontpage_245_239_239), // '端' -- '端'
|
||||
FONTDATA_ITEM(246, 172, 172, fontpage_246_172_172), // '第' -- '第'
|
||||
FONTDATA_ITEM(246, 201, 201, fontpage_246_201_201), // '等' -- '等'
|
||||
FONTDATA_ITEM(247, 128, 128, fontpage_247_128_128), // '简' -- '简'
|
||||
FONTDATA_ITEM(247, 177, 177, fontpage_247_177_177), // '箱' -- '箱'
|
||||
FONTDATA_ITEM(248, 251, 251, fontpage_248_251_251), // '类' -- '类'
|
||||
FONTDATA_ITEM(250, 162, 162, fontpage_250_162_162), // '索' -- '索'
|
||||
|
||||
@@ -343,12 +343,10 @@ const u8g_fntpgm_uint8_t fontpage_178_167_167[45] U8G_FONT_SECTION("fontpage_178
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA7,0xA7,0x00,0x0A,0xFF,0x00,
|
||||
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x04,0x00,0x04,0x00,0x04,0x00,0xFF,0xE0,0x04,
|
||||
0x00,0x04,0x00,0x0A,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0xC0,0x60};
|
||||
const u8g_fntpgm_uint8_t fontpage_178_169_170[73] U8G_FONT_SECTION("fontpage_178_169_170") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA9,0xAA,0x00,0x0A,0xFF,0x00,
|
||||
const u8g_fntpgm_uint8_t fontpage_178_169_169[45] U8G_FONT_SECTION("fontpage_178_169_169") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA9,0xA9,0x00,0x0A,0xFF,0x00,
|
||||
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x7F,0xC0,0x04,0x00,0x04,0x00,0x04,0x00,0xFF,
|
||||
0xE0,0x04,0x00,0x0A,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0xC0,0x60,0x0B,0x0B,0x16,
|
||||
0x0C,0x00,0xFF,0x04,0x00,0x04,0x00,0x04,0x00,0xFF,0xE0,0x04,0x00,0x0A,0x00,0x0A,
|
||||
0x00,0x11,0x00,0x19,0x00,0x24,0x80,0xC4,0x60};
|
||||
0xE0,0x04,0x00,0x0A,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0xC0,0x60};
|
||||
const u8g_fntpgm_uint8_t fontpage_178_177_177[45] U8G_FONT_SECTION("fontpage_178_177_177") = {
|
||||
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB1,0xB1,0x00,0x0A,0xFF,0x00,
|
||||
0x00,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x24,0x00,0x24,0x00,0x3F,0xC0,0x44,0x00,0x04,
|
||||
@@ -1302,7 +1300,7 @@ static const uxg_fontinfo_t g_fontinfo_zh_TW[] PROGMEM = {
|
||||
FONTDATA_ITEM(178, 154, 154, fontpage_178_154_154), // '多' -- '多'
|
||||
FONTDATA_ITEM(178, 160, 160, fontpage_178_160_160), // '夠' -- '夠'
|
||||
FONTDATA_ITEM(178, 167, 167, fontpage_178_167_167), // '大' -- '大'
|
||||
FONTDATA_ITEM(178, 169, 170, fontpage_178_169_170), // '天' -- '太'
|
||||
FONTDATA_ITEM(178, 169, 169, fontpage_178_169_169), // '天' -- '天'
|
||||
FONTDATA_ITEM(178, 177, 177, fontpage_178_177_177), // '失' -- '失'
|
||||
FONTDATA_ITEM(179, 203, 203, fontpage_179_203_203), // '始' -- '始'
|
||||
FONTDATA_ITEM(181, 146, 146, fontpage_181_146_146), // '媒' -- '媒'
|
||||
|
||||
@@ -628,7 +628,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
|
||||
#endif // AUTO_BED_LEVELING_UBL
|
||||
|
||||
#if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
|
||||
#if EITHER(BABYSTEP_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
|
||||
|
||||
//
|
||||
// Draw knob rotation => Z motion key for:
|
||||
@@ -746,7 +746,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
|
||||
#endif // BABYSTEP_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
|
||||
|
||||
#endif // HAS_MARLINUI_MENU
|
||||
|
||||
|
||||
@@ -96,9 +96,10 @@
|
||||
DRAWBIT_HOTEND,
|
||||
DRAWBIT_BED = HOTENDS,
|
||||
DRAWBIT_CHAMBER,
|
||||
DRAWBIT_CUTTER
|
||||
DRAWBIT_CUTTER,
|
||||
DRAWBIT_COUNT
|
||||
};
|
||||
IF<(DRAWBIT_CUTTER > 7), uint16_t, uint8_t>::type draw_bits;
|
||||
bits_t(DRAWBIT_COUNT) draw_bits;
|
||||
#endif
|
||||
|
||||
#if ANIM_HOTEND
|
||||
@@ -192,14 +193,26 @@
|
||||
#define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
|
||||
|
||||
FORCE_INLINE void _draw_centered_temp(const celsius_t temp, const uint8_t tx, const uint8_t ty) {
|
||||
if (temp < 0)
|
||||
lcd_put_u8str(tx - 3 * (INFO_FONT_WIDTH) / 2 + 1, ty, F("err"));
|
||||
else {
|
||||
const char *str = i16tostr3rj(temp);
|
||||
const uint8_t len = str[0] != ' ' ? 3 : str[1] != ' ' ? 2 : 1;
|
||||
lcd_put_u8str(tx - len * (INFO_FONT_WIDTH) / 2 + 1, ty, &str[3-len]);
|
||||
lcd_put_lchar(LCD_STR_DEGREE[0]);
|
||||
const char *str;
|
||||
uint8_t len;
|
||||
if (temp >= 0) {
|
||||
str = i16tostr3left(temp);
|
||||
len = strlen(str);
|
||||
lcd_moveto(tx + 1 - len * (INFO_FONT_WIDTH) / 2, ty);
|
||||
}
|
||||
else {
|
||||
#if ENABLED(SHOW_TEMPERATURE_BELOW_ZERO)
|
||||
str = i16tostr3left((-temp) % 100);
|
||||
len = strlen(str) + 1;
|
||||
lcd_moveto(tx + 1 - len * (INFO_FONT_WIDTH) / 2, ty);
|
||||
lcd_put_lchar('-');
|
||||
#else
|
||||
lcd_put_u8str(tx + 1 - 3 * (INFO_FONT_WIDTH) / 2, ty, F("err"));
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
lcd_put_u8str(str);
|
||||
lcd_put_lchar(LCD_STR_DEGREE[0]);
|
||||
}
|
||||
|
||||
#if DO_DRAW_FLOWMETER
|
||||
@@ -512,7 +525,9 @@ void MarlinUI::draw_status_screen() {
|
||||
|
||||
const bool show_e_total = TERN0(LCD_SHOW_E_TOTAL, printingIsActive());
|
||||
|
||||
static u8g_uint_t progress_bar_solid_width = 0;
|
||||
#if HAS_PRINT_PROGRESS
|
||||
static u8g_uint_t progress_bar_solid_width = 0;
|
||||
#endif
|
||||
|
||||
// At the first page, generate new display values
|
||||
if (first_page) {
|
||||
|
||||
@@ -133,10 +133,8 @@ EncoderState Encoder_ReceiveAnalyze() {
|
||||
// Note that the rate is always calculated between two passes through the
|
||||
// loop and that the abs of the temp_diff value is tracked.
|
||||
const float encoderStepRate = encoderMovementSteps / float(ms - EncoderRate.lastEncoderTime) * 1000;
|
||||
#if defined(ENCODER_100X_STEPS_PER_SEC)
|
||||
if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100;
|
||||
#endif
|
||||
if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10;
|
||||
if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100;
|
||||
else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10;
|
||||
#if ENCODER_5X_STEPS_PER_SEC
|
||||
else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) encoderMultiplier = 5;
|
||||
#endif
|
||||
|
||||
@@ -2944,11 +2944,7 @@ void HMI_Control() {
|
||||
void HMI_Leveling() {
|
||||
Popup_Window_Leveling();
|
||||
DWIN_UpdateLCD();
|
||||
#if defined(MAIN_MENU_ITEM_1_GCODE)
|
||||
queue.inject(F(MAIN_MENU_ITEM_1_GCODE));
|
||||
#else
|
||||
queue.inject(F("G28O\nG29\nG28\nG1Z0"));
|
||||
#endif
|
||||
queue.inject(F("G28O\nG29"));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4059,8 +4055,8 @@ void HMI_Init() {
|
||||
HMI_SDCardInit();
|
||||
|
||||
for (uint16_t t = 0; t <= 100; t += 2) {
|
||||
DWIN_ICON_Show(ICON, ICON_Bar, 15, 450);
|
||||
DWIN_Draw_Rectangle(1, Color_Bg_Black, 15 + t * 242 / 100, 450, 257, 470);
|
||||
DWIN_ICON_Show(ICON, ICON_Bar, 15, 260);
|
||||
DWIN_Draw_Rectangle(1, Color_Bg_Black, 15 + t * 242 / 100, 260, 257, 280);
|
||||
DWIN_UpdateLCD();
|
||||
delay(20);
|
||||
}
|
||||
|
||||
@@ -2734,7 +2734,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
||||
#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_FILSENSORDISTANCE (ADVANCED_FILSENSORENABLED + ENABLED(HAS_FILAMENT_RUNOUT_DISTANCE))
|
||||
#define ADVANCED_FILSENSORDISTANCE (ADVANCED_FILSENSORENABLED + 1)
|
||||
#define ADVANCED_POWER_LOSS (ADVANCED_FILSENSORDISTANCE + ENABLED(POWER_LOSS_RECOVERY))
|
||||
#define ADVANCED_TOTAL ADVANCED_POWER_LOSS
|
||||
|
||||
@@ -2833,24 +2833,22 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
||||
case ADVANCED_FILSENSORENABLED:
|
||||
if (draw) {
|
||||
Draw_Menu_Item(row, ICON_Extruder, F("Filament Sensor"));
|
||||
Draw_Checkbox(row, runout.enabled);
|
||||
Draw_Checkbox(row, runout.enabled[0]);
|
||||
}
|
||||
else {
|
||||
runout.enabled = !runout.enabled;
|
||||
Draw_Checkbox(row, runout.enabled);
|
||||
runout.enabled[0] = !runout.enabled[0];
|
||||
Draw_Checkbox(row, runout.enabled[0]);
|
||||
}
|
||||
break;
|
||||
|
||||
#if ENABLED(HAS_FILAMENT_RUNOUT_DISTANCE)
|
||||
case ADVANCED_FILSENSORDISTANCE:
|
||||
if (draw) {
|
||||
Draw_Menu_Item(row, ICON_MaxAccE, F("Runout Distance"));
|
||||
Draw_Float(runout.runout_distance(), row, false, 10);
|
||||
}
|
||||
else
|
||||
Modify_Value(runout.runout_distance(), 0, 999, 10);
|
||||
break;
|
||||
#endif
|
||||
case ADVANCED_FILSENSORDISTANCE:
|
||||
if (draw) {
|
||||
Draw_Menu_Item(row, ICON_MaxAccE, F("Runout Distance"));
|
||||
Draw_Float(runout.runout_distance(), row, false, 10);
|
||||
}
|
||||
else
|
||||
Modify_Value(runout.runout_distance(), 0, 999, 10);
|
||||
break;
|
||||
#endif // FILAMENT_RUNOUT_SENSOR
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
@@ -3816,11 +3814,11 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
||||
case TUNE_FILSENSORENABLED:
|
||||
if (draw) {
|
||||
Draw_Menu_Item(row, ICON_Extruder, F("Filament Sensor"));
|
||||
Draw_Checkbox(row, runout.enabled);
|
||||
Draw_Checkbox(row, runout.enabled[0]);
|
||||
}
|
||||
else {
|
||||
runout.enabled = !runout.enabled;
|
||||
Draw_Checkbox(row, runout.enabled);
|
||||
runout.enabled = !runout.enabled[0];
|
||||
Draw_Checkbox(row, runout.enabled[0]);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
@@ -4229,8 +4227,7 @@ void CrealityDWINClass::Value_Control() {
|
||||
if (funcpointer) funcpointer();
|
||||
return;
|
||||
}
|
||||
NOLESS(tempvalue, (valuemin * valueunit));
|
||||
NOMORE(tempvalue, (valuemax * valueunit));
|
||||
LIMIT(tempvalue, valuemin * valueunit, valuemax * valueunit);
|
||||
Draw_Float(tempvalue / valueunit, selection - scrollpos, true, valueunit);
|
||||
DWIN_UpdateLCD();
|
||||
if (active_menu == Move && livemove) {
|
||||
@@ -4272,8 +4269,7 @@ void CrealityDWINClass::Option_Control() {
|
||||
DWIN_UpdateLCD();
|
||||
return;
|
||||
}
|
||||
NOLESS(tempvalue, valuemin);
|
||||
NOMORE(tempvalue, valuemax);
|
||||
LIMIT(tempvalue, valuemin, valuemax);
|
||||
Draw_Option(tempvalue, static_cast<const char * const *>(valuepointer), selection - scrollpos, true);
|
||||
DWIN_UpdateLCD();
|
||||
}
|
||||
@@ -4663,7 +4659,7 @@ void CrealityDWINClass::Start_Print(bool sd) {
|
||||
if (sd) {
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
if (recovery.valid()) {
|
||||
SdFile *diveDir = nullptr;
|
||||
MediaFile *diveDir = nullptr;
|
||||
const char * const fname = card.diveToFile(true, diveDir, recovery.info.sd_filename);
|
||||
card.selectFileByName(fname);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ void DWIN_Startup() {
|
||||
DWIN_Frame_Clear(Color_Bg_Black); // MarlinUI handles the bootscreen so just clear here
|
||||
DWIN_JPG_ShowAndCache(3);
|
||||
DWIN_UpdateLCD();
|
||||
DWIN_JPG_ShowAndCache(3);
|
||||
}
|
||||
|
||||
/*---------------------------------------- Picture related functions ----------------------------------------*/
|
||||
|
||||
@@ -109,8 +109,8 @@ void MarlinUI::clear_lcd() {
|
||||
#define INFO_CENTER ((LCD_PIXEL_WIDTH) - 200 / 2)
|
||||
#define VERSION_Y 84
|
||||
#endif
|
||||
DWIN_JPG_ShowAndCache(0); // Ensure DACAI stays on boot screen
|
||||
DWIN_Draw_String(false, font10x20, Color_Yellow, Color_Bg_Black, INFO_CENTER - (dwin_string.length * 10) / 2, 230, S(dwin_string.string()));
|
||||
|
||||
DWIN_Draw_String(false, font10x20, Color_Yellow, Color_Bg_Black, INFO_CENTER - (dwin_string.length * 10) / 2, VERSION_Y, S(dwin_string.string()));
|
||||
TERN_(SHOW_CUSTOM_BOOTSCREEN, safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT));
|
||||
clear_lcd();
|
||||
|
||||
@@ -565,7 +565,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
|
||||
#endif // AUTO_BED_LEVELING_UBL
|
||||
|
||||
#if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
|
||||
#if EITHER(BABYSTEP_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
|
||||
|
||||
void MarlinUI::zoffset_overlay(const int8_t dir) {
|
||||
const int rot_up = TERN(OVERLAY_GFX_REVERSE, ICON_RotateCCW, ICON_RotateCW),
|
||||
@@ -587,7 +587,7 @@ void MarlinUI::draw_status_message(const bool blink) {
|
||||
DWIN_ICON_Show(ICON, rot_up, LCD_PIXEL_WIDTH - 10 - 48, arrow_y);
|
||||
}
|
||||
|
||||
#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
|
||||
#endif // BABYSTEP_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
|
||||
|
||||
#endif // HAS_MARLINUI_MENU
|
||||
|
||||
|
||||
@@ -1271,7 +1271,6 @@ void EachMomentUpdate() {
|
||||
|
||||
if ((Printing() != HMI_flag.printing_flag) && !HMI_flag.home_flag) {
|
||||
HMI_flag.printing_flag = Printing();
|
||||
DEBUG_ECHOLNPGM("printing_flag: ", HMI_flag.printing_flag);
|
||||
if (HMI_flag.printing_flag)
|
||||
DWIN_Print_Started();
|
||||
else if (HMI_flag.abort_flag)
|
||||
@@ -1282,7 +1281,6 @@ void EachMomentUpdate() {
|
||||
|
||||
if ((printingIsPaused() != HMI_flag.pause_flag) && !HMI_flag.home_flag) {
|
||||
HMI_flag.pause_flag = printingIsPaused();
|
||||
DEBUG_ECHOLNPGM("pause_flag: ", HMI_flag.pause_flag);
|
||||
if (HMI_flag.pause_flag)
|
||||
DWIN_Print_Pause();
|
||||
else if (HMI_flag.abort_flag)
|
||||
@@ -1347,7 +1345,7 @@ void EachMomentUpdate() {
|
||||
DWINUI::Draw_Button(BTN_Cancel, 26, 280);
|
||||
DWINUI::Draw_Button(BTN_Continue, 146, 280);
|
||||
}
|
||||
SdFile *dir = nullptr;
|
||||
MediaFile *dir = nullptr;
|
||||
const char * const filename = card.diveToFile(true, dir, recovery.info.sd_filename);
|
||||
card.selectFileByName(filename);
|
||||
DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 207, card.longest_filename());
|
||||
@@ -1628,7 +1626,6 @@ void DWIN_LevelingDone() {
|
||||
|
||||
// Started a Print Job
|
||||
void DWIN_Print_Started() {
|
||||
DEBUG_ECHOLNPGM("DWIN_Print_Started: ", SD_Printing());
|
||||
TERN_(HAS_GCODE_PREVIEW, if (Host_Printing()) Preview_Invalidate());
|
||||
_percent_done = 0;
|
||||
_remain_time = 0;
|
||||
@@ -1642,20 +1639,17 @@ void DWIN_Print_Started() {
|
||||
|
||||
// Pause a print job
|
||||
void DWIN_Print_Pause() {
|
||||
DEBUG_ECHOLNPGM("DWIN_Print_Pause");
|
||||
ICON_ResumeOrPause();
|
||||
}
|
||||
|
||||
// Resume print job
|
||||
void DWIN_Print_Resume() {
|
||||
DEBUG_ECHOLNPGM("DWIN_Print_Resume");
|
||||
ICON_ResumeOrPause();
|
||||
LCD_MESSAGE(MSG_RESUME_PRINT);
|
||||
}
|
||||
|
||||
// Ended print job
|
||||
void DWIN_Print_Finished() {
|
||||
DEBUG_ECHOLNPGM("DWIN_Print_Finished");
|
||||
TERN_(POWER_LOSS_RECOVERY, if (card.isPrinting()) recovery.cancel());
|
||||
HMI_flag.pause_flag = false;
|
||||
wait_for_heatup = false;
|
||||
@@ -1666,7 +1660,6 @@ void DWIN_Print_Finished() {
|
||||
|
||||
// Print was aborted
|
||||
void DWIN_Print_Aborted() {
|
||||
DEBUG_ECHOLNPGM("DWIN_Print_Aborted");
|
||||
DWIN_Print_Finished();
|
||||
}
|
||||
|
||||
@@ -1714,7 +1707,6 @@ void DWIN_SetColorDefaults() {
|
||||
}
|
||||
|
||||
void DWIN_SetDataDefaults() {
|
||||
DEBUG_ECHOLNPGM("DWIN_SetDataDefaults");
|
||||
DWIN_SetColorDefaults();
|
||||
DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color, HMI_data.StatusBg_Color);
|
||||
TERN_(PIDTEMP, HMI_data.HotendPidT = DEF_HOTENDPIDT);
|
||||
@@ -1738,13 +1730,10 @@ void DWIN_SetDataDefaults() {
|
||||
}
|
||||
|
||||
void DWIN_CopySettingsTo(char * const buff) {
|
||||
DEBUG_ECHOLNPGM("DWIN_CopySettingsTo");
|
||||
DEBUG_ECHOLNPGM("HMI_data: ", sizeof(HMI_data_t));
|
||||
memcpy(buff, &HMI_data, eeprom_data_size);
|
||||
}
|
||||
|
||||
void DWIN_CopySettingsFrom(const char * const buff) {
|
||||
DEBUG_ECHOLNPGM("DWIN_CopySettingsFrom");
|
||||
memcpy(&HMI_data, buff, sizeof(HMI_data_t));
|
||||
if (HMI_data.Text_Color == HMI_data.Background_Color) DWIN_SetColorDefaults();
|
||||
DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color, HMI_data.StatusBg_Color);
|
||||
@@ -1764,18 +1753,14 @@ void DWIN_CopySettingsFrom(const char * const buff) {
|
||||
|
||||
// Initialize or re-initialize the LCD
|
||||
void MarlinUI::init_lcd() {
|
||||
DEBUG_ECHOLNPGM("MarlinUI::init_lcd");
|
||||
delay(750); // wait to wakeup screen
|
||||
const bool hs = DWIN_Handshake(); UNUSED(hs);
|
||||
DEBUG_ECHOPGM("DWIN_Handshake ");
|
||||
DEBUG_ECHOLNF(hs ? F("ok.") : F("error."));
|
||||
DWIN_Frame_SetDir(1);
|
||||
DWIN_JPG_CacheTo1(Language_English);
|
||||
Encoder_Configuration();
|
||||
}
|
||||
|
||||
void DWIN_InitScreen() {
|
||||
DEBUG_ECHOLNPGM("DWIN_InitScreen");
|
||||
DWIN_SetColorDefaults();
|
||||
HMI_Init(); // draws boot screen
|
||||
DWINUI::init();
|
||||
@@ -2034,7 +2019,6 @@ void AutoHome() { queue.inject_P(G28_STR); }
|
||||
#if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
|
||||
const_float_t step_zoffset = round((MenuData.Value / 100.0f) * planner.settings.axis_steps_per_mm[Z_AXIS]) - babystep.accum;
|
||||
if (BABYSTEP_ALLOWED()) babystep.add_steps(Z_AXIS, step_zoffset);
|
||||
//DEBUG_ECHOLNF(F("BB Steps: "), step_zoffset);
|
||||
#endif
|
||||
}
|
||||
void SetZOffset() {
|
||||
@@ -2225,9 +2209,7 @@ void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
void SetRunoutEnable() {
|
||||
runout.reset();
|
||||
runout.enabled[0] = !runout.enabled[0];
|
||||
Draw_Chkb_Line(CurrentMenu->line(), runout.enabled[0]);
|
||||
DWIN_UpdateLCD();
|
||||
Toggle_Chkb_Line(runout.enabled[0]);
|
||||
}
|
||||
void ApplyRunoutDistance() { runout.set_runout_distance(MenuData.Value / MINUNITMULT); }
|
||||
void SetRunoutDistance() { SetFloatOnClick(0, 999, UNITFDIGITS, runout.runout_distance(), ApplyRunoutDistance); }
|
||||
@@ -3203,7 +3185,7 @@ void Draw_FilSet_Menu() {
|
||||
if (SET_MENU(FilSetMenu, MSG_FILAMENT_SET, 9)) {
|
||||
BACK_ITEM(Draw_AdvancedSettings_Menu);
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
EDIT_ITEM(ICON_Runout, MSG_RUNOUT_ENABLE, onDrawChkbMenu, SetRunoutEnable, &runout.enabled);
|
||||
EDIT_ITEM(ICON_Runout, MSG_RUNOUT_ENABLE, onDrawChkbMenu, SetRunoutEnable, &runout.enabled[0]);
|
||||
#endif
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
EDIT_ITEM(ICON_Runout, MSG_RUNOUT_DISTANCE_MM, onDrawPFloatMenu, SetRunoutDistance, &runout.runout_distance());
|
||||
@@ -3542,7 +3524,7 @@ void Draw_Steps_Menu() {
|
||||
|
||||
#if ENABLED(MPCTEMP)
|
||||
|
||||
void HotendMPC() { thermalManager.MPC_autotune(); }
|
||||
void HotendMPC() { thermalManager.MPC_autotune(active_extruder); }
|
||||
void SetHeaterPower() { SetPFloatOnClick(1, 200, 1); }
|
||||
void SetBlkHeatCapacity() { SetPFloatOnClick(0, 40, 2); }
|
||||
void SetSensorRespons() { SetPFloatOnClick(0, 1, 4); }
|
||||
|
||||
@@ -135,7 +135,7 @@ bool Has_Preview() {
|
||||
Get_Value(buf, ";MAXZ:", fileprop.height);
|
||||
fileprop.height -= tmp;
|
||||
posptr = strstr(buf, tbstart);
|
||||
if (posptr != NULL) {
|
||||
if (posptr != nullptr) {
|
||||
fileprop.thumbstart = indx + (posptr - &buf[0]);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -70,7 +70,6 @@ char FileNavigator::currentfoldername[MAX_PATH_LEN + 1]; // Current folde
|
||||
FileNavigator::FileNavigator() { reset(); }
|
||||
|
||||
void FileNavigator::reset() {
|
||||
DEBUG_ECHOLNPGM("reset()");
|
||||
currentfoldername[0] = '\0';
|
||||
currentfolderdepth = 0;
|
||||
currentindex = 0;
|
||||
@@ -86,7 +85,6 @@ void FileNavigator::refresh() { filelist.refresh(); }
|
||||
|
||||
void FileNavigator::changeDIR(const char *folder) {
|
||||
if (currentfolderdepth >= MAX_FOLDER_DEPTH) return; // limit the folder depth
|
||||
DEBUG_ECHOLNPGM("FD:" , folderdepth, " FP:",currentindex, " currentfolder:", currentfoldername, " enter:", folder);
|
||||
currentfolderindex[currentfolderdepth] = currentindex;
|
||||
strcat(currentfoldername, folder);
|
||||
strcat(currentfoldername, "/");
|
||||
@@ -96,7 +94,6 @@ void FileNavigator::changeDIR(const char *folder) {
|
||||
}
|
||||
|
||||
void FileNavigator::upDIR() {
|
||||
DEBUG_ECHOLNPGM("upDIR() from D:", currentfolderdepth, " N:", currentfoldername);
|
||||
if (!filelist.isAtRootDir()) {
|
||||
filelist.upDir();
|
||||
currentfolderdepth--;
|
||||
@@ -117,7 +114,6 @@ void FileNavigator::skiptofileindex(uint16_t skip) {
|
||||
if (skip == 0) return;
|
||||
while (skip > 0) {
|
||||
if (filelist.seek(currentindex)) {
|
||||
DEBUG_ECHOLNPGM("CI:", currentindex, " FD:", currentfolderdepth, " N:", skip, " ", filelist.longFilename());
|
||||
if (!filelist.isDir()) {
|
||||
skip--;
|
||||
currentindex++;
|
||||
@@ -151,8 +147,6 @@ void FileNavigator::skiptofileindex(uint16_t skip) {
|
||||
}
|
||||
lastpanelindex = index;
|
||||
|
||||
DEBUG_ECHOLNPGM("index=", index, " currentindex=", currentindex);
|
||||
|
||||
if (currentindex == 0 && currentfolderdepth > 0) { // Add a link to go up a folder
|
||||
// The new panel ignores entries that don't end in .GCO or .gcode so add and pad them.
|
||||
if (paneltype <= AC_panel_new) {
|
||||
@@ -166,12 +160,8 @@ void FileNavigator::skiptofileindex(uint16_t skip) {
|
||||
filesneeded--;
|
||||
}
|
||||
|
||||
for (uint16_t seek = currentindex; seek < currentindex + filesneeded; seek++) {
|
||||
if (filelist.seek(seek)) {
|
||||
sendFile(paneltype);
|
||||
DEBUG_ECHOLNPGM("-", seek, " '", filelist.longFilename(), "' '", currentfoldername, "", filelist.shortFilename(), "'");
|
||||
}
|
||||
}
|
||||
for (uint16_t seek = currentindex; seek < currentindex + filesneeded; seek++)
|
||||
if (filelist.seek(seek)) sendFile(paneltype);
|
||||
}
|
||||
|
||||
void FileNavigator::sendFile(panel_type_t paneltype) {
|
||||
@@ -212,7 +202,6 @@ void FileNavigator::skiptofileindex(uint16_t skip) {
|
||||
#else // Flat file list
|
||||
|
||||
void FileNavigator::getFiles(uint16_t index, panel_type_t paneltype, uint8_t filesneeded) {
|
||||
DEBUG_ECHOLNPGM("getFiles() I:", index," L:", lastpanelindex);
|
||||
// if we're searching backwards, jump back to start and search forward
|
||||
if (index < lastpanelindex) {
|
||||
reset();
|
||||
@@ -248,7 +237,6 @@ void FileNavigator::skiptofileindex(uint16_t skip) {
|
||||
TFTSer.println(filelist.shortFilename());
|
||||
if (currentfolderdepth > 0) TFTSer.print(currentfoldername);
|
||||
TFTSer.println(filelist.longFilename());
|
||||
DEBUG_ECHOLNPGM("/", currentfoldername, "", filelist.shortFilename(), " ", filelist.longFilename());
|
||||
}
|
||||
|
||||
#endif // Flat file list
|
||||
|
||||
@@ -120,6 +120,9 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onPowerLoss() {
|
||||
// Called when power-loss state is detected
|
||||
}
|
||||
// Called on resume from power-loss
|
||||
void onPowerLossResume() { Chiron.PowerLossRecovery(); }
|
||||
#endif
|
||||
|
||||
@@ -80,9 +80,6 @@ void ChironTFT::Startup() {
|
||||
OUT_WRITE(OUTAGECON_PIN, HIGH);
|
||||
#endif
|
||||
|
||||
// Filament runout is handled by Marlin settings in Configuration.h
|
||||
// opt_set FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present.
|
||||
// opt_enable FIL_RUNOUT_PULLUP
|
||||
TFTSer.begin(115200);
|
||||
|
||||
// Wait for the TFT panel to initialize and finish the animation
|
||||
|
||||
@@ -106,6 +106,9 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onPowerLoss() {
|
||||
// Called when power-loss state is detected
|
||||
}
|
||||
void onPowerLossResume() {
|
||||
// Called on resume from power-loss
|
||||
}
|
||||
|
||||
@@ -704,7 +704,7 @@ void AnycubicTFTClass::GetCommandFromTFT() {
|
||||
break;
|
||||
|
||||
case 16: { // A16 set hotend temp
|
||||
unsigned int tempvalue;
|
||||
uint16_t tempvalue;
|
||||
if (CodeSeen('S')) {
|
||||
tempvalue = constrain(CodeValue(), 0, 275);
|
||||
setTargetTemp_celsius(tempvalue, (extruder_t)E0);
|
||||
@@ -719,7 +719,7 @@ void AnycubicTFTClass::GetCommandFromTFT() {
|
||||
break;
|
||||
|
||||
case 17: { // A17 set heated bed temp
|
||||
unsigned int tempbed;
|
||||
uint16_t tempbed;
|
||||
if (CodeSeen('S')) {
|
||||
tempbed = constrain(CodeValue(), 0, 100);
|
||||
setTargetTemp_celsius(tempbed, (heater_t)BED);
|
||||
@@ -777,7 +777,7 @@ void AnycubicTFTClass::GetCommandFromTFT() {
|
||||
case 22: // A22 move X/Y/Z or extrude
|
||||
if (!isPrinting()) {
|
||||
float coorvalue;
|
||||
unsigned int movespeed = 0;
|
||||
uint16_t movespeed = 0;
|
||||
char commandStr[30];
|
||||
char fullCommandStr[38];
|
||||
|
||||
|
||||
@@ -141,7 +141,6 @@ void DGUSDisplay::ProcessRx() {
|
||||
if (!LCD_SERIAL.available() && LCD_SERIAL.buffer_overruns()) {
|
||||
// Overrun, but reset the flag only when the buffer is empty
|
||||
// We want to extract as many as valid datagrams possible...
|
||||
DEBUG_ECHOPGM("OVFL");
|
||||
rx_datagram_state = DGUS_IDLE;
|
||||
//LCD_SERIAL.reset_rx_overun();
|
||||
LCD_SERIAL.flush();
|
||||
@@ -205,17 +204,11 @@ void DGUSDisplay::ProcessRx() {
|
||||
| Command DataLen (in Words) */
|
||||
if (command == DGUS_CMD_READVAR) {
|
||||
const uint16_t vp = tmp[0] << 8 | tmp[1];
|
||||
//const uint8_t dlen = tmp[2] << 1; // Convert to Bytes. (Display works with words)
|
||||
//DEBUG_ECHOPGM(" vp=", vp, " dlen=", dlen);
|
||||
DGUS_VP_Variable ramcopy;
|
||||
if (populate_VPVar(vp, &ramcopy)) {
|
||||
if (ramcopy.set_by_display_handler)
|
||||
ramcopy.set_by_display_handler(ramcopy, &tmp[3]);
|
||||
else
|
||||
DEBUG_ECHOLNPGM(" VPVar found, no handler.");
|
||||
}
|
||||
else
|
||||
DEBUG_ECHOLNPGM(" VPVar not found:", vp);
|
||||
|
||||
rx_datagram_state = DGUS_IDLE;
|
||||
break;
|
||||
@@ -260,9 +253,7 @@ bool DGUSDisplay::Initialized = false,
|
||||
#define sw_barrier() asm volatile("": : :"memory");
|
||||
|
||||
bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy) {
|
||||
//DEBUG_ECHOPGM("populate_VPVar ", VP);
|
||||
const DGUS_VP_Variable *pvp = DGUSLCD_FindVPVar(VP);
|
||||
//DEBUG_ECHOLNPGM(" pvp ", (uint16_t )pvp);
|
||||
if (!pvp) return false;
|
||||
memcpy_P(ramcopy, pvp, sizeof(DGUS_VP_Variable));
|
||||
return true;
|
||||
|
||||
@@ -112,8 +112,6 @@ void DGUSScreenHandler::setstatusmessagePGM(PGM_P const msg) {
|
||||
// Send an 8 bit or 16 bit value to the display.
|
||||
void DGUSScreenHandler::DGUSLCD_SendWordValueToDisplay(DGUS_VP_Variable &var) {
|
||||
if (var.memadr) {
|
||||
//DEBUG_ECHOPGM(" DGUS_LCD_SendWordValueToDisplay ", var.VP);
|
||||
//DEBUG_ECHOLNPGM(" data ", *(uint16_t *)var.memadr);
|
||||
if (var.size > 1)
|
||||
dgusdisplay.WriteVariable(var.VP, *(int16_t*)var.memadr);
|
||||
else
|
||||
@@ -124,8 +122,6 @@ void DGUSScreenHandler::DGUSLCD_SendWordValueToDisplay(DGUS_VP_Variable &var) {
|
||||
// Send an uint8_t between 0 and 255 to the display, but scale to a percentage (0..100)
|
||||
void DGUSScreenHandler::DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var) {
|
||||
if (var.memadr) {
|
||||
//DEBUG_ECHOPGM(" DGUS_LCD_SendWordValueToDisplay ", var.VP);
|
||||
//DEBUG_ECHOLNPGM(" data ", *(uint16_t *)var.memadr);
|
||||
uint16_t tmp = *(uint8_t *) var.memadr + 1; // +1 -> avoid rounding issues for the display.
|
||||
tmp = map(tmp, 0, 255, 0, 100);
|
||||
dgusdisplay.WriteVariable(var.VP, tmp);
|
||||
@@ -134,9 +130,7 @@ void DGUSScreenHandler::DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var) {
|
||||
|
||||
// Send the current print progress to the display.
|
||||
void DGUSScreenHandler::DGUSLCD_SendPrintProgressToDisplay(DGUS_VP_Variable &var) {
|
||||
//DEBUG_ECHOPGM(" DGUSLCD_SendPrintProgressToDisplay ", var.VP);
|
||||
uint16_t tmp = ExtUI::getProgress_percent();
|
||||
//DEBUG_ECHOLNPGM(" data ", tmp);
|
||||
dgusdisplay.WriteVariable(var.VP, tmp);
|
||||
}
|
||||
|
||||
@@ -153,9 +147,7 @@ void DGUSScreenHandler::DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var) {
|
||||
void DGUSScreenHandler::DGUSLCD_PercentageToUint8(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
if (var.memadr) {
|
||||
const uint16_t value = BE16_P(val_ptr);
|
||||
DEBUG_ECHOLNPGM("Got percent:", value);
|
||||
*(uint8_t*)var.memadr = map(constrain(value, 0, 100), 0, 100, 0, 255);
|
||||
DEBUG_ECHOLNPGM("Set uint8:", *(uint8_t*)var.memadr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,8 +228,6 @@ void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) {
|
||||
|
||||
void DGUSScreenHandler::DGUSLCD_SendFanStatusToDisplay(DGUS_VP_Variable &var) {
|
||||
if (var.memadr) {
|
||||
DEBUG_ECHOPGM(" DGUSLCD_SendFanStatusToDisplay ", var.VP);
|
||||
DEBUG_ECHOLNPGM(" data ", *(uint8_t *)var.memadr);
|
||||
uint16_t data_to_send = 0;
|
||||
if (*(uint8_t *) var.memadr) data_to_send = 1;
|
||||
dgusdisplay.WriteVariable(var.VP, data_to_send);
|
||||
@@ -249,8 +239,6 @@ void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) {
|
||||
// Send heater status value to the display.
|
||||
void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) {
|
||||
if (var.memadr) {
|
||||
DEBUG_ECHOPGM(" DGUSLCD_SendHeaterStatusToDisplay ", var.VP);
|
||||
DEBUG_ECHOLNPGM(" data ", *(int16_t *)var.memadr);
|
||||
uint16_t data_to_send = 0;
|
||||
if (*(int16_t *) var.memadr) data_to_send = 1;
|
||||
dgusdisplay.WriteVariable(var.VP, data_to_send);
|
||||
@@ -263,11 +251,8 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var)
|
||||
// In FYSETC UI design there are 10 statuses to loop
|
||||
static uint16_t period = 0;
|
||||
static uint16_t index = 0;
|
||||
//DEBUG_ECHOPGM(" DGUSLCD_SendWaitingStatusToDisplay ", var.VP);
|
||||
//DEBUG_ECHOLNPGM(" data ", BE16_P(&index));
|
||||
if (period++ > DGUS_UI_WAITING_STATUS_PERIOD) {
|
||||
dgusdisplay.WriteVariable(var.VP, index);
|
||||
//DEBUG_ECHOLNPGM(" data ", BE16_P(&index));
|
||||
if (++index >= DGUS_UI_WAITING_STATUS) index = 0;
|
||||
period = 0;
|
||||
}
|
||||
@@ -309,17 +294,14 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var)
|
||||
const int16_t scroll = (int16_t)BE16_P(val_ptr);
|
||||
if (scroll) {
|
||||
top_file += scroll;
|
||||
DEBUG_ECHOPGM("new topfile calculated:", top_file);
|
||||
if (top_file < 0) {
|
||||
top_file = 0;
|
||||
DEBUG_ECHOLNPGM("Top of filelist reached");
|
||||
}
|
||||
else {
|
||||
int16_t max_top = filelist.count() - DGUS_SD_FILESPERSCREEN;
|
||||
NOLESS(max_top, 0);
|
||||
NOMORE(top_file, max_top);
|
||||
}
|
||||
DEBUG_ECHOPGM("new topfile adjusted:", top_file);
|
||||
}
|
||||
else if (!filelist.isAtRootDir()) {
|
||||
IF_DISABLED(DGUS_LCD_UI_MKS, filelist.upDir());
|
||||
@@ -374,7 +356,6 @@ const DGUS_VP_Variable* DGUSLCD_FindVPVar(const uint16_t vp) {
|
||||
++ret;
|
||||
} while (1);
|
||||
|
||||
DEBUG_ECHOLNPGM("FindVPVar NOT FOUND ", vp);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -444,8 +425,6 @@ void DGUSScreenHandler::HandleFlowRateChanged(DGUS_VP_Variable &var, void *val_p
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleManualExtrude");
|
||||
|
||||
const int16_t movevalue = BE16_P(val_ptr);
|
||||
float target = movevalue * 0.01f;
|
||||
ExtUI::extruder_t target_extruder;
|
||||
@@ -467,19 +446,16 @@ void DGUSScreenHandler::HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr
|
||||
|
||||
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
|
||||
void DGUSScreenHandler::HandleManualMoveOption(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleManualMoveOption");
|
||||
*(uint16_t*)var.memadr = BE16_P(val_ptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
void DGUSScreenHandler::HandleMotorLockUnlock(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleMotorLockUnlock");
|
||||
const int16_t lock = BE16_P(val_ptr);
|
||||
queue.enqueue_one_now(lock ? F("M18") : F("M17"));
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleSettings(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleSettings");
|
||||
const uint16_t value = BE16_P(val_ptr);
|
||||
switch (value) {
|
||||
default: break;
|
||||
@@ -495,7 +471,6 @@ void DGUSScreenHandler::HandleSettings(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
void DGUSScreenHandler::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
const uint16_t value_raw = BE16_P(val_ptr);
|
||||
DEBUG_ECHOLNPGM("HandleStepPerMMChanged:", value_raw);
|
||||
const float value = (float)value_raw / 10;
|
||||
ExtUI::axis_t axis;
|
||||
switch (var.VP) {
|
||||
@@ -504,15 +479,12 @@ void DGUSScreenHandler::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_
|
||||
case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break;
|
||||
default: return;
|
||||
}
|
||||
DEBUG_ECHOLNPGM("value:", value);
|
||||
ExtUI::setAxisSteps_per_mm(value, axis);
|
||||
DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(axis));
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
const uint16_t value_raw = BE16_P(val_ptr);
|
||||
DEBUG_ECHOLNPGM("HandleStepPerMMExtruderChanged:", value_raw);
|
||||
const float value = (float)value_raw / 10;
|
||||
ExtUI::extruder_t extruder;
|
||||
switch (var.VP) {
|
||||
@@ -524,16 +496,12 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
DEBUG_ECHOLNPGM("value:", value);
|
||||
ExtUI::setAxisSteps_per_mm(value, extruder);
|
||||
DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(extruder));
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void DGUSScreenHandler::HandlePIDAutotune(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandlePIDAutotune");
|
||||
|
||||
char buf[32] = {0};
|
||||
|
||||
switch (var.VP) {
|
||||
@@ -568,8 +536,6 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
void DGUSScreenHandler::HandleProbeOffsetZChanged(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleProbeOffsetZChanged");
|
||||
|
||||
const float offset = float(int16_t(BE16_P(val_ptr))) / 100.0f;
|
||||
ExtUI::setZOffset_mm(offset);
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
@@ -579,14 +545,11 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo
|
||||
|
||||
#if HAS_FAN
|
||||
void DGUSScreenHandler::HandleFanControl(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleFanControl");
|
||||
*(uint8_t*)var.memadr = *(uint8_t*)var.memadr > 0 ? 0 : 255;
|
||||
}
|
||||
#endif
|
||||
|
||||
void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleHeaterControl");
|
||||
|
||||
uint8_t preheat_temp = 0;
|
||||
switch (var.VP) {
|
||||
#if HAS_HOTEND
|
||||
@@ -614,8 +577,6 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr
|
||||
#if ENABLED(DGUS_PREHEAT_UI)
|
||||
|
||||
void DGUSScreenHandler::HandlePreheat(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandlePreheat");
|
||||
|
||||
const uint16_t preheat_option = BE16_P(val_ptr);
|
||||
switch (preheat_option) {
|
||||
default:
|
||||
@@ -654,7 +615,6 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr
|
||||
#endif
|
||||
|
||||
void DGUSScreenHandler::UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup) {
|
||||
DEBUG_ECHOLNPGM("SetNewScreen: ", newscreen);
|
||||
if (!popup) {
|
||||
memmove(&past_screens[1], &past_screens[0], sizeof(past_screens) - 1);
|
||||
past_screens[0] = current_screen;
|
||||
@@ -665,18 +625,14 @@ void DGUSScreenHandler::UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup) {
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::PopToOldScreen() {
|
||||
DEBUG_ECHOLNPGM("PopToOldScreen s=", past_screens[0]);
|
||||
GotoScreen(past_screens[0], true);
|
||||
memmove(&past_screens[0], &past_screens[1], sizeof(past_screens) - 1);
|
||||
past_screens[sizeof(past_screens) - 1] = DGUSLCD_SCREEN_MAIN;
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::UpdateScreenVPData() {
|
||||
DEBUG_ECHOPGM(" UpdateScreenVPData Screen: ", current_screen);
|
||||
|
||||
const uint16_t *VPList = DGUSLCD_FindScreenVPMapList(current_screen);
|
||||
if (!VPList) {
|
||||
DEBUG_ECHOLNPGM(" NO SCREEN FOR: ", current_screen);
|
||||
ScreenComplete = true;
|
||||
return; // nothing to do, likely a bug or boring screen.
|
||||
}
|
||||
@@ -687,10 +643,8 @@ void DGUSScreenHandler::UpdateScreenVPData() {
|
||||
bool sent_one = false;
|
||||
do {
|
||||
uint16_t VP = pgm_read_word(VPList);
|
||||
DEBUG_ECHOPGM(" VP: ", VP);
|
||||
if (!VP) {
|
||||
update_ptr = 0;
|
||||
DEBUG_ECHOLNPGM(" UpdateScreenVPData done");
|
||||
ScreenComplete = true;
|
||||
return; // Screen completed.
|
||||
}
|
||||
@@ -703,14 +657,10 @@ void DGUSScreenHandler::UpdateScreenVPData() {
|
||||
// Send the VP to the display, but try to avoid overrunning the Tx Buffer.
|
||||
// But send at least one VP, to avoid getting stalled.
|
||||
if (rcpy.send_to_display_handler && (!sent_one || expected_tx <= dgusdisplay.GetFreeTxBuffer())) {
|
||||
//DEBUG_ECHOPGM(" calling handler for ", rcpy.VP);
|
||||
sent_one = true;
|
||||
rcpy.send_to_display_handler(rcpy);
|
||||
}
|
||||
else {
|
||||
// auto x=dgusdisplay.GetFreeTxBuffer();
|
||||
//DEBUG_ECHOLNPGM(" tx almost full: ", x);
|
||||
//DEBUG_ECHOPGM(" update_ptr ", update_ptr);
|
||||
ScreenComplete = false;
|
||||
return; // please call again!
|
||||
}
|
||||
@@ -725,7 +675,6 @@ void DGUSScreenHandler::GotoScreen(DGUSLCD_Screens screen, bool ispopup) {
|
||||
}
|
||||
|
||||
void DGUSDisplay::RequestScreen(DGUSLCD_Screens screen) {
|
||||
DEBUG_ECHOLNPGM("GotoScreen ", screen);
|
||||
const unsigned char gotoscreen[] = { 0x5A, 0x01, (unsigned char) (screen >> 8U), (unsigned char) (screen & 0xFFU) };
|
||||
WriteVariable(0x84, gotoscreen, sizeof(gotoscreen));
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
// Send a float value to the display.
|
||||
// Display will get a 4-byte integer scaled to the number of digits:
|
||||
// Tell the display the number of digits and it cheats by displaying a dot between...
|
||||
template<unsigned int decimals>
|
||||
template<uint16_t decimals>
|
||||
static void DGUSLCD_SendFloatAsLongValueToDisplay(DGUS_VP_Variable &var) {
|
||||
if (var.memadr) {
|
||||
float f = *(float *)var.memadr;
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
// Send a float value to the display.
|
||||
// Display will get a 2-byte integer scaled to the number of digits:
|
||||
// Tell the display the number of digits and it cheats by displaying a dot between...
|
||||
template<unsigned int decimals>
|
||||
template<uint16_t decimals>
|
||||
static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
|
||||
if (var.memadr) {
|
||||
float f = *(float *)var.memadr;
|
||||
|
||||
@@ -126,6 +126,9 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onPowerLoss() {
|
||||
// Called when power-loss state is detected
|
||||
}
|
||||
void onPowerLossResume() {
|
||||
// Called on resume from power-loss
|
||||
IF_DISABLED(DGUS_LCD_UI_MKS, ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POWER_LOSS));
|
||||
|
||||
@@ -258,7 +258,7 @@ constexpr uint16_t VP_BED_STATUS = 0x331C;
|
||||
constexpr uint16_t VP_MOVE_OPTION = 0x3400;
|
||||
|
||||
// Step per mm
|
||||
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , 2 byte unsigned int , 0~1638.4
|
||||
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , uint16_t , 0~1638.4
|
||||
//constexpr uint16_t VP_X2_STEP_PER_MM = 0x3602;
|
||||
constexpr uint16_t VP_Y_STEP_PER_MM = 0x3604;
|
||||
//constexpr uint16_t VP_Y2_STEP_PER_MM = 0x3606;
|
||||
@@ -272,10 +272,10 @@ constexpr uint16_t VP_E1_STEP_PER_MM = 0x3612;
|
||||
//constexpr uint16_t VP_E5_STEP_PER_MM = 0x361A;
|
||||
|
||||
// PIDs
|
||||
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4
|
||||
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , uint16_t , 0~1638.4
|
||||
constexpr uint16_t VP_E0_PID_I = 0x3702;
|
||||
constexpr uint16_t VP_E0_PID_D = 0x3704;
|
||||
constexpr uint16_t VP_E1_PID_P = 0x3706; // at the moment , 2 byte unsigned int , 0~1638.4
|
||||
constexpr uint16_t VP_E1_PID_P = 0x3706; // at the moment , uint16_t , 0~1638.4
|
||||
constexpr uint16_t VP_E1_PID_I = 0x3708;
|
||||
constexpr uint16_t VP_E1_PID_D = 0x370A;
|
||||
constexpr uint16_t VP_BED_PID_P = 0x3710;
|
||||
|
||||
@@ -134,8 +134,6 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
// meaning "return to previous screen"
|
||||
DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1];
|
||||
|
||||
DEBUG_ECHOLNPGM("\n DEBUG target", target);
|
||||
|
||||
if (target == DGUSLCD_SCREEN_POPUP) {
|
||||
// Special handling for popup is to return to previous menu
|
||||
if (current_screen == DGUSLCD_SCREEN_POPUP && confirm_action_cb) confirm_action_cb();
|
||||
@@ -151,8 +149,6 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleManualMove");
|
||||
|
||||
int16_t movevalue = swap16(*(uint16_t*)val_ptr);
|
||||
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
|
||||
if (movevalue) {
|
||||
@@ -161,7 +157,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
#endif
|
||||
char axiscode;
|
||||
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode.
|
||||
uint16_t speed = _mf[X_AXIS]; // Default feedrate for manual moves
|
||||
|
||||
switch (var.VP) {
|
||||
default: return;
|
||||
@@ -171,16 +167,21 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove;
|
||||
break;
|
||||
|
||||
case VP_MOVE_Y:
|
||||
axiscode = 'Y';
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
|
||||
break;
|
||||
#if HAS_Y_AXIS
|
||||
case VP_MOVE_Y:
|
||||
axiscode = 'Y';
|
||||
speed = _mf[Y_AXIS];
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case VP_MOVE_Z:
|
||||
axiscode = 'Z';
|
||||
speed = 300; // default to 5mm/s
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
|
||||
break;
|
||||
#if HAS_Z_AXIS
|
||||
case VP_MOVE_Z:
|
||||
axiscode = 'Z';
|
||||
speed = _mf[Z_AXIS];
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case VP_HOME_ALL: // only used for homing
|
||||
axiscode = '\0';
|
||||
@@ -190,63 +191,42 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
if (!movevalue) {
|
||||
// homing
|
||||
DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode));
|
||||
char buf[6] = "G28 X";
|
||||
buf[4] = axiscode;
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOLNPGM(" ✓");
|
||||
ForceCompleteUpdate();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
// movement
|
||||
DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode));
|
||||
bool old_relative_mode = relative_mode;
|
||||
if (!relative_mode) {
|
||||
//DEBUG_ECHOPGM(" G91");
|
||||
queue.enqueue_now(F("G91"));
|
||||
//DEBUG_ECHOPGM(" ✓ ");
|
||||
}
|
||||
if (!relative_mode) queue.enqueue_now(F("G91"));
|
||||
char buf[32]; // G1 X9999.99 F12345
|
||||
unsigned int backup_speed = MMS_TO_MMM(feedrate_mm_s);
|
||||
const uint16_t backup_speed = MMS_TO_MMM(feedrate_mm_s);
|
||||
char sign[] = "\0";
|
||||
int16_t value = movevalue / 100;
|
||||
if (movevalue < 0) { value = -value; sign[0] = '-'; }
|
||||
int16_t fraction = ABS(movevalue) % 100;
|
||||
snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed);
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOLNPGM(" ✓ ");
|
||||
if (backup_speed != speed) {
|
||||
snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
}
|
||||
// while (!enqueue_and_echo_command(buf)) idle();
|
||||
//DEBUG_ECHOLNPGM(" ✓ ");
|
||||
if (!old_relative_mode) {
|
||||
//DEBUG_ECHOPGM("G90");
|
||||
queue.enqueue_now(F("G90"));
|
||||
//DEBUG_ECHOPGM(" ✓ ");
|
||||
}
|
||||
//while (!enqueue_and_echo_command(buf)) idle();
|
||||
if (!old_relative_mode) queue.enqueue_now(F("G90"));
|
||||
}
|
||||
|
||||
ForceCompleteUpdate();
|
||||
DEBUG_ECHOLNPGM("manmv done.");
|
||||
return;
|
||||
|
||||
cannotmove:
|
||||
DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode));
|
||||
return;
|
||||
}
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
uint16_t rawvalue = swap16(*(uint16_t*)val_ptr);
|
||||
DEBUG_ECHOLNPGM("V1:", rawvalue);
|
||||
float value = (float)rawvalue / 10;
|
||||
DEBUG_ECHOLNPGM("V2:", value);
|
||||
float newvalue = 0;
|
||||
|
||||
switch (var.VP) {
|
||||
@@ -268,7 +248,6 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
#endif
|
||||
}
|
||||
|
||||
DEBUG_ECHOLNPGM("V3:", newvalue);
|
||||
*(float *)var.memadr = newvalue;
|
||||
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
@@ -277,7 +256,6 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
void DGUSScreenHandler::HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleLiveAdjustZ");
|
||||
int16_t flag = swap16(*(uint16_t*)val_ptr),
|
||||
steps = flag ? -20 : 20;
|
||||
ExtUI::smartAdjustAxis_steps(steps, ExtUI::axis_t::Z, true);
|
||||
@@ -288,8 +266,6 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
|
||||
|
||||
void DGUSScreenHandler::HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleFilamentOption");
|
||||
|
||||
uint8_t e_temp = 0;
|
||||
filament_data.heated = false;
|
||||
uint16_t preheat_option = swap16(*(uint16_t*)val_ptr);
|
||||
@@ -360,7 +336,6 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleFilamentLoadUnload(DGUS_VP_Variable &var) {
|
||||
DEBUG_ECHOLNPGM("HandleFilamentLoadUnload");
|
||||
if (filament_data.action <= 0) return;
|
||||
|
||||
// If we close to the target temperature, we can start load or unload the filament
|
||||
|
||||
@@ -257,7 +257,7 @@ constexpr uint16_t VP_BED_STATUS = 0x331C;
|
||||
constexpr uint16_t VP_MOVE_OPTION = 0x3400;
|
||||
|
||||
// Step per mm
|
||||
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , 2 byte unsigned int , 0~1638.4
|
||||
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , uint16_t , 0~1638.4
|
||||
//constexpr uint16_t VP_X2_STEP_PER_MM = 0x3602;
|
||||
constexpr uint16_t VP_Y_STEP_PER_MM = 0x3604;
|
||||
//constexpr uint16_t VP_Y2_STEP_PER_MM = 0x3606;
|
||||
@@ -271,7 +271,7 @@ constexpr uint16_t VP_E0_STEP_PER_MM = 0x3610;
|
||||
//constexpr uint16_t VP_E5_STEP_PER_MM = 0x361A;
|
||||
|
||||
// PIDs
|
||||
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4
|
||||
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , uint16_t , 0~1638.4
|
||||
constexpr uint16_t VP_E0_PID_I = 0x3702;
|
||||
constexpr uint16_t VP_E0_PID_D = 0x3704;
|
||||
constexpr uint16_t VP_BED_PID_P = 0x3710;
|
||||
|
||||
@@ -134,8 +134,6 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
// meaning "return to previous screen"
|
||||
DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1];
|
||||
|
||||
DEBUG_ECHOLNPGM("\n DEBUG target", target);
|
||||
|
||||
if (target == DGUSLCD_SCREEN_POPUP) {
|
||||
// Special handling for popup is to return to previous menu
|
||||
if (current_screen == DGUSLCD_SCREEN_POPUP && confirm_action_cb) confirm_action_cb();
|
||||
@@ -151,8 +149,6 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleManualMove");
|
||||
|
||||
int16_t movevalue = swap16(*(uint16_t*)val_ptr);
|
||||
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
|
||||
if (movevalue) {
|
||||
@@ -161,7 +157,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
#endif
|
||||
char axiscode;
|
||||
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode.
|
||||
uint16_t speed = _mf[X_AXIS]; // Default feedrate for manual moves
|
||||
|
||||
switch (var.VP) {
|
||||
default: return;
|
||||
@@ -171,16 +167,21 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove;
|
||||
break;
|
||||
|
||||
case VP_MOVE_Y:
|
||||
axiscode = 'Y';
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
|
||||
break;
|
||||
#if HAS_Y_AXIS
|
||||
case VP_MOVE_Y:
|
||||
axiscode = 'Y';
|
||||
speed = _mf[Y_AXIS];
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case VP_MOVE_Z:
|
||||
axiscode = 'Z';
|
||||
speed = 300; // default to 5mm/s
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
|
||||
break;
|
||||
#if HAS_Z_AXIS
|
||||
case VP_MOVE_Z:
|
||||
axiscode = 'Z';
|
||||
speed = _mf[Z_AXIS];
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case VP_HOME_ALL: // only used for homing
|
||||
axiscode = '\0';
|
||||
@@ -190,63 +191,42 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
if (!movevalue) {
|
||||
// homing
|
||||
DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode));
|
||||
char buf[6] = "G28 X";
|
||||
buf[4] = axiscode;
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOLNPGM(" ✓");
|
||||
ForceCompleteUpdate();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
// movement
|
||||
DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode));
|
||||
bool old_relative_mode = relative_mode;
|
||||
if (!relative_mode) {
|
||||
//DEBUG_ECHOPGM(" G91");
|
||||
queue.enqueue_now(F("G91"));
|
||||
//DEBUG_ECHOPGM(" ✓ ");
|
||||
}
|
||||
const bool old_relative_mode = relative_mode;
|
||||
if (!relative_mode) queue.enqueue_now(F("G91"));
|
||||
char buf[32]; // G1 X9999.99 F12345
|
||||
unsigned int backup_speed = MMS_TO_MMM(feedrate_mm_s);
|
||||
const uint16_t backup_speed = MMS_TO_MMM(feedrate_mm_s);
|
||||
char sign[] = "\0";
|
||||
int16_t value = movevalue / 100;
|
||||
if (movevalue < 0) { value = -value; sign[0] = '-'; }
|
||||
int16_t fraction = ABS(movevalue) % 100;
|
||||
snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed);
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOLNPGM(" ✓ ");
|
||||
if (backup_speed != speed) {
|
||||
snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
}
|
||||
// while (!enqueue_and_echo_command(buf)) idle();
|
||||
//DEBUG_ECHOLNPGM(" ✓ ");
|
||||
if (!old_relative_mode) {
|
||||
//DEBUG_ECHOPGM("G90");
|
||||
queue.enqueue_now(F("G90"));
|
||||
//DEBUG_ECHOPGM(" ✓ ");
|
||||
}
|
||||
//while (!enqueue_and_echo_command(buf)) idle();
|
||||
if (!old_relative_mode) queue.enqueue_now(F("G90"));
|
||||
}
|
||||
|
||||
ForceCompleteUpdate();
|
||||
DEBUG_ECHOLNPGM("manmv done.");
|
||||
return;
|
||||
|
||||
cannotmove:
|
||||
DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode));
|
||||
return;
|
||||
}
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
uint16_t rawvalue = swap16(*(uint16_t*)val_ptr);
|
||||
DEBUG_ECHOLNPGM("V1:", rawvalue);
|
||||
float value = (float)rawvalue / 10;
|
||||
DEBUG_ECHOLNPGM("V2:", value);
|
||||
float newvalue = 0;
|
||||
|
||||
switch (var.VP) {
|
||||
@@ -268,7 +248,6 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
#endif
|
||||
}
|
||||
|
||||
DEBUG_ECHOLNPGM("V3:", newvalue);
|
||||
*(float *)var.memadr = newvalue;
|
||||
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
@@ -277,7 +256,6 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
void DGUSScreenHandler::HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleLiveAdjustZ");
|
||||
int16_t flag = swap16(*(uint16_t*)val_ptr),
|
||||
steps = flag ? -20 : 20;
|
||||
ExtUI::smartAdjustAxis_steps(steps, ExtUI::axis_t::Z, true);
|
||||
@@ -288,8 +266,6 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
|
||||
|
||||
void DGUSScreenHandler::HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleFilamentOption");
|
||||
|
||||
uint8_t e_temp = 0;
|
||||
filament_data.heated = false;
|
||||
uint16_t preheat_option = swap16(*(uint16_t*)val_ptr);
|
||||
@@ -360,7 +336,6 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleFilamentLoadUnload(DGUS_VP_Variable &var) {
|
||||
DEBUG_ECHOLNPGM("HandleFilamentLoadUnload");
|
||||
if (filament_data.action <= 0) return;
|
||||
|
||||
// If we close to the target temperature, we can start load or unload the filament
|
||||
|
||||
@@ -256,10 +256,10 @@ constexpr uint16_t VP_E1_STATUS = 0x3412;
|
||||
constexpr uint16_t VP_MOVE_OPTION = 0x3500;
|
||||
|
||||
// // PIDs
|
||||
// constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4
|
||||
// constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , uint16_t , 0~1638.4
|
||||
// constexpr uint16_t VP_E0_PID_I = 0x3702;
|
||||
// constexpr uint16_t VP_E0_PID_D = 0x3704;
|
||||
// constexpr uint16_t VP_E1_PID_P = 0x3706; // at the moment , 2 byte unsigned int , 0~1638.4
|
||||
// constexpr uint16_t VP_E1_PID_P = 0x3706; // at the moment , uint16_t , 0~1638.4
|
||||
// constexpr uint16_t VP_E1_PID_I = 0x3708;
|
||||
// constexpr uint16_t VP_E1_PID_D = 0x370A;
|
||||
// constexpr uint16_t VP_BED_PID_P = 0x3710;
|
||||
@@ -414,7 +414,7 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040;
|
||||
constexpr uint16_t VP_FAN3_STATUS = 0x2716;
|
||||
|
||||
// Step per mm
|
||||
constexpr uint16_t VP_X_STEP_PER_MM = 0x2900; // at the moment , 2 byte unsigned int , 0~1638.4
|
||||
constexpr uint16_t VP_X_STEP_PER_MM = 0x2900; // at the moment , uint16_t , 0~1638.4
|
||||
constexpr uint16_t VP_Y_STEP_PER_MM = 0x2904;
|
||||
constexpr uint16_t VP_Z_STEP_PER_MM = 0x2908;
|
||||
constexpr uint16_t VP_E0_STEP_PER_MM = 0x2910;
|
||||
@@ -521,10 +521,10 @@ constexpr uint16_t SP_T_Bed_Set = 0x5040;
|
||||
constexpr uint16_t VP_PrintTime_S = 0x3504;
|
||||
|
||||
// PIDs
|
||||
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4
|
||||
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , uint16_t , 0~1638.4
|
||||
constexpr uint16_t VP_E0_PID_I = 0x3702;
|
||||
constexpr uint16_t VP_E0_PID_D = 0x3704;
|
||||
constexpr uint16_t VP_E1_PID_P = 0x3706; // at the moment , 2 byte unsigned int , 0~1638.4
|
||||
constexpr uint16_t VP_E1_PID_P = 0x3706; // at the moment , uint16_t , 0~1638.4
|
||||
constexpr uint16_t VP_E1_PID_I = 0x3708;
|
||||
constexpr uint16_t VP_E1_PID_D = 0x370A;
|
||||
constexpr uint16_t VP_BED_PID_P = 0x3710;
|
||||
|
||||
@@ -80,8 +80,6 @@ void DGUSScreenHandlerMKS::sendinfoscreen(const void *line1, const void *line2,
|
||||
|
||||
void DGUSScreenHandlerMKS::DGUSLCD_SendFanToDisplay(DGUS_VP_Variable &var) {
|
||||
if (var.memadr) {
|
||||
//DEBUG_ECHOPGM(" DGUS_LCD_SendWordValueToDisplay ", var.VP);
|
||||
//DEBUG_ECHOLNPGM(" data ", *(uint16_t *)var.memadr);
|
||||
uint16_t tmp = *(uint8_t *) var.memadr; // +1 -> avoid rounding issues for the display.
|
||||
// tmp = map(tmp, 0, 255, 0, 100);
|
||||
dgusdisplay.WriteVariable(var.VP, tmp);
|
||||
@@ -90,7 +88,6 @@ void DGUSScreenHandlerMKS::DGUSLCD_SendFanToDisplay(DGUS_VP_Variable &var) {
|
||||
|
||||
void DGUSScreenHandlerMKS::DGUSLCD_SendBabyStepToDisplay(DGUS_VP_Variable &var) {
|
||||
float value = current_position.z;
|
||||
DEBUG_ECHOLNPGM(" >> ", value, 6);
|
||||
value *= cpow(10, 2);
|
||||
dgusdisplay.WriteVariable(VP_SD_Print_Baby, (uint16_t)value);
|
||||
}
|
||||
@@ -106,14 +103,11 @@ void DGUSScreenHandlerMKS::DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var)
|
||||
void DGUSScreenHandlerMKS::DGUSLCD_SetUint8(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
if (var.memadr) {
|
||||
const uint16_t value = BE16_P(val_ptr);
|
||||
DEBUG_ECHOLNPGM("Got uint8:", value);
|
||||
*(uint8_t*)var.memadr = map(constrain(value, 0, 255), 0, 255, 0, 255);
|
||||
DEBUG_ECHOLNPGM("Set uint8:", *(uint8_t*)var.memadr);
|
||||
}
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::DGUSLCD_SendGbkToDisplay(DGUS_VP_Variable &var) {
|
||||
DEBUG_ECHOLNPGM(" data ", *(uint16_t *)var.memadr);
|
||||
uint16_t *tmp = (uint16_t*) var.memadr;
|
||||
dgusdisplay.WriteVariable(var.VP, tmp, var.size, true);
|
||||
}
|
||||
@@ -278,8 +272,6 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
// meaning "return to previous screen"
|
||||
DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1];
|
||||
|
||||
DEBUG_ECHOLNPGM("\n DEBUG target", target);
|
||||
|
||||
// when the dgus had reboot, it will enter the DGUSLCD_SCREEN_MAIN page,
|
||||
// so user can change any page to use this function, an it will check
|
||||
// if robin nano is printing. when it is, dgus will enter the printing
|
||||
@@ -300,7 +292,6 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
// Special handling for popup is to return to previous menu
|
||||
if (current_screen == DGUSLCD_SCREEN_POPUP && confirm_action_cb) confirm_action_cb();
|
||||
setPauseMenuResponse(PAUSE_RESPONSE_RESUME_PRINT);
|
||||
PopToOldScreen();
|
||||
return;
|
||||
}
|
||||
@@ -314,7 +305,6 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
void DGUSScreenHandlerMKS::ScreenBackChange(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
const uint16_t target = BE16_P(val_ptr);
|
||||
DEBUG_ECHOLNPGM(" back = 0x%x", target);
|
||||
switch (target) {
|
||||
}
|
||||
}
|
||||
@@ -328,7 +318,6 @@ void DGUSScreenHandlerMKS::ZoffsetConfirm(DGUS_VP_Variable &var, void *val_ptr)
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::GetTurnOffCtrl(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("GetTurnOffCtrl\n");
|
||||
const uint16_t value = BE16_P(val_ptr);
|
||||
switch (value) {
|
||||
case 0 ... 1: DGUSAutoTurnOff = (bool)value; break;
|
||||
@@ -337,7 +326,6 @@ void DGUSScreenHandlerMKS::GetTurnOffCtrl(DGUS_VP_Variable &var, void *val_ptr)
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::GetMinExtrudeTemp(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("GetMinExtrudeTemp");
|
||||
const uint16_t value = BE16_P(val_ptr);
|
||||
TERN_(PREVENT_COLD_EXTRUSION, thermalManager.extrude_min_temp = value);
|
||||
mks_min_extrusion_temp = value;
|
||||
@@ -345,7 +333,6 @@ void DGUSScreenHandlerMKS::GetMinExtrudeTemp(DGUS_VP_Variable &var, void *val_pt
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::GetZoffsetDistance(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("GetZoffsetDistance");
|
||||
const uint16_t value = BE16_P(val_ptr);
|
||||
float val_distance = 0;
|
||||
switch (value) {
|
||||
@@ -359,7 +346,6 @@ void DGUSScreenHandlerMKS::GetZoffsetDistance(DGUS_VP_Variable &var, void *val_p
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::GetManualMovestep(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("\nGetManualMovestep");
|
||||
*(uint16_t *)var.memadr = BE16_P(val_ptr);
|
||||
}
|
||||
|
||||
@@ -382,8 +368,8 @@ void DGUSScreenHandlerMKS::EEPROM_CTRL(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::Z_offset_select(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
const uint16_t z_value = BE16_P(val_ptr);
|
||||
switch (z_value) {
|
||||
const uint16_t z = BE16_P(val_ptr);
|
||||
switch (z) {
|
||||
case 0: Z_distance = 0.01; break;
|
||||
case 1: Z_distance = 0.1; break;
|
||||
case 2: Z_distance = 0.5; break;
|
||||
@@ -396,7 +382,6 @@ void DGUSScreenHandlerMKS::GetOffsetValue(DGUS_VP_Variable &var, void *val_ptr)
|
||||
#if HAS_BED_PROBE
|
||||
const int32_t value = BE32_P(val_ptr);
|
||||
const float Offset = value / 100.0f;
|
||||
DEBUG_ECHOLNPGM("\nget int6 offset >> ", value, 6);
|
||||
|
||||
switch (var.VP) {
|
||||
default: break;
|
||||
@@ -492,7 +477,7 @@ void DGUSScreenHandlerMKS::MeshLevelDistanceConfig(DGUS_VP_Variable &var, void *
|
||||
|
||||
void DGUSScreenHandlerMKS::MeshLevel(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
#if ENABLED(MESH_BED_LEVELING)
|
||||
const uint16_t mesh_value = BE16_P(val_ptr);
|
||||
const uint16_t mesh_val = BE16_P(val_ptr);
|
||||
// static uint8_t a_first_level = 1;
|
||||
char cmd_buf[30];
|
||||
float offset = mesh_adj_distance;
|
||||
@@ -500,7 +485,7 @@ void DGUSScreenHandlerMKS::MeshLevel(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
if (!queue.ring_buffer.empty()) return;
|
||||
|
||||
switch (mesh_value) {
|
||||
switch (mesh_val) {
|
||||
case 0:
|
||||
offset = mesh_adj_distance;
|
||||
integer = offset; // get int
|
||||
@@ -590,20 +575,19 @@ void DGUSScreenHandlerMKS::SD_FileBack(DGUS_VP_Variable&, void*) {
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::LCD_BLK_Adjust(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
const uint16_t lcd_value = BE16_P(val_ptr);
|
||||
lcd_default_light = constrain(lcd_value, 10, 100);
|
||||
const uint16_t lcd_val = BE16_P(val_ptr);
|
||||
lcd_default_light = constrain(lcd_val, 10, 100);
|
||||
|
||||
const uint16_t lcd_data[2] = { lcd_default_light, lcd_default_light };
|
||||
dgusdisplay.WriteVariable(0x0082, &lcd_data, 5, true);
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::ManualAssistLeveling(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
const int16_t point_value = BE16_P(val_ptr);
|
||||
const int16_t point_val = BE16_P(val_ptr);
|
||||
|
||||
// Insist on leveling first time at this screen
|
||||
static bool first_level_flag = false;
|
||||
if (!first_level_flag || point_value == 0x0001) {
|
||||
if (!first_level_flag || point_val == 0x0001) {
|
||||
queue.enqueue_now_P(G28_STR);
|
||||
first_level_flag = true;
|
||||
}
|
||||
@@ -616,10 +600,10 @@ void DGUSScreenHandlerMKS::ManualAssistLeveling(DGUS_VP_Variable &var, void *val
|
||||
queue.enqueue_one_now(buf_level);
|
||||
};
|
||||
|
||||
if (WITHIN(point_value, 0x0001, 0x0005))
|
||||
if (WITHIN(point_val, 0x0001, 0x0005))
|
||||
queue.enqueue_now(F("G1Z10"));
|
||||
|
||||
switch (point_value) {
|
||||
switch (point_val) {
|
||||
case 0x0001:
|
||||
enqueue_corner_move(X_MIN_POS + ABS(mks_corner_offsets[0].x),
|
||||
Y_MIN_POS + ABS(mks_corner_offsets[0].y), level_speed);
|
||||
@@ -643,7 +627,7 @@ void DGUSScreenHandlerMKS::ManualAssistLeveling(DGUS_VP_Variable &var, void *val
|
||||
break;
|
||||
}
|
||||
|
||||
if (WITHIN(point_value, 0x0002, 0x0005)) {
|
||||
if (WITHIN(point_val, 0x0002, 0x0005)) {
|
||||
//queue.enqueue_now(F("G28Z"));
|
||||
queue.enqueue_now(F("G1Z-10"));
|
||||
}
|
||||
@@ -653,14 +637,14 @@ void DGUSScreenHandlerMKS::ManualAssistLeveling(DGUS_VP_Variable &var, void *val
|
||||
#define mks_max(a, b) ((a) > (b)) ? (a) : (b)
|
||||
void DGUSScreenHandlerMKS::TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
#if EITHER(HAS_TRINAMIC_CONFIG, HAS_STEALTHCHOP)
|
||||
const uint16_t tmc_value = BE16_P(val_ptr);
|
||||
const uint16_t tmc_val = BE16_P(val_ptr);
|
||||
#endif
|
||||
|
||||
switch (var.VP) {
|
||||
case VP_TMC_X_STEP:
|
||||
#if USE_SENSORLESS
|
||||
#if X_HAS_STEALTHCHOP
|
||||
stepperX.homing_threshold(mks_min(tmc_value, 255));
|
||||
stepperX.homing_threshold(mks_min(tmc_val, 255));
|
||||
settings.save();
|
||||
//tmc_step.x = stepperX.homing_threshold();
|
||||
#endif
|
||||
@@ -669,7 +653,7 @@ void DGUSScreenHandlerMKS::TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr
|
||||
case VP_TMC_Y_STEP:
|
||||
#if USE_SENSORLESS
|
||||
#if Y_HAS_STEALTHCHOP
|
||||
stepperY.homing_threshold(mks_min(tmc_value, 255));
|
||||
stepperY.homing_threshold(mks_min(tmc_val, 255));
|
||||
settings.save();
|
||||
//tmc_step.y = stepperY.homing_threshold();
|
||||
#endif
|
||||
@@ -678,7 +662,7 @@ void DGUSScreenHandlerMKS::TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr
|
||||
case VP_TMC_Z_STEP:
|
||||
#if USE_SENSORLESS
|
||||
#if Z_HAS_STEALTHCHOP
|
||||
stepperZ.homing_threshold(mks_min(tmc_value, 255));
|
||||
stepperZ.homing_threshold(mks_min(tmc_val, 255));
|
||||
settings.save();
|
||||
//tmc_step.z = stepperZ.homing_threshold();
|
||||
#endif
|
||||
@@ -686,49 +670,49 @@ void DGUSScreenHandlerMKS::TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr
|
||||
break;
|
||||
case VP_TMC_X_Current:
|
||||
#if AXIS_IS_TMC(X)
|
||||
stepperX.rms_current(tmc_value);
|
||||
stepperX.rms_current(tmc_val);
|
||||
settings.save();
|
||||
#endif
|
||||
break;
|
||||
case VP_TMC_X1_Current:
|
||||
#if AXIS_IS_TMC(X2)
|
||||
stepperX2.rms_current(tmc_value);
|
||||
stepperX2.rms_current(tmc_val);
|
||||
settings.save();
|
||||
#endif
|
||||
break;
|
||||
case VP_TMC_Y_Current:
|
||||
#if AXIS_IS_TMC(Y)
|
||||
stepperY.rms_current(tmc_value);
|
||||
stepperY.rms_current(tmc_val);
|
||||
settings.save();
|
||||
#endif
|
||||
break;
|
||||
case VP_TMC_Y1_Current:
|
||||
#if AXIS_IS_TMC(X2)
|
||||
stepperY2.rms_current(tmc_value);
|
||||
stepperY2.rms_current(tmc_val);
|
||||
settings.save();
|
||||
#endif
|
||||
break;
|
||||
case VP_TMC_Z_Current:
|
||||
#if AXIS_IS_TMC(Z)
|
||||
stepperZ.rms_current(tmc_value);
|
||||
stepperZ.rms_current(tmc_val);
|
||||
settings.save();
|
||||
#endif
|
||||
break;
|
||||
case VP_TMC_Z1_Current:
|
||||
#if AXIS_IS_TMC(Z2)
|
||||
stepperZ2.rms_current(tmc_value);
|
||||
stepperZ2.rms_current(tmc_val);
|
||||
settings.save();
|
||||
#endif
|
||||
break;
|
||||
case VP_TMC_E0_Current:
|
||||
#if AXIS_IS_TMC(E0)
|
||||
stepperE0.rms_current(tmc_value);
|
||||
stepperE0.rms_current(tmc_val);
|
||||
settings.save();
|
||||
#endif
|
||||
break;
|
||||
case VP_TMC_E1_Current:
|
||||
#if AXIS_IS_TMC(E1)
|
||||
stepperE1.rms_current(tmc_value);
|
||||
stepperE1.rms_current(tmc_val);
|
||||
settings.save();
|
||||
#endif
|
||||
break;
|
||||
@@ -744,8 +728,6 @@ void DGUSScreenHandlerMKS::TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleManualMove");
|
||||
|
||||
int16_t movevalue = BE16_P(val_ptr);
|
||||
|
||||
// Choose Move distance
|
||||
@@ -753,69 +735,64 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
else if (manualMoveStep == 0x02) manualMoveStep = 100;
|
||||
else if (manualMoveStep == 0x03) manualMoveStep = 1000;
|
||||
|
||||
DEBUG_ECHOLNPGM("QUEUE LEN:", queue.ring_buffer.length);
|
||||
|
||||
if (!print_job_timer.isPaused() && !queue.ring_buffer.empty())
|
||||
return;
|
||||
|
||||
char axiscode;
|
||||
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode.
|
||||
uint16_t speed = _mf[X_AXIS]; // Default feedrate for manual moves
|
||||
|
||||
switch (var.VP) { // switch X Y Z or Home
|
||||
default: return;
|
||||
case VP_MOVE_X:
|
||||
DEBUG_ECHOLNPGM("X Move");
|
||||
axiscode = 'X';
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove;
|
||||
break;
|
||||
|
||||
case VP_MOVE_Y:
|
||||
DEBUG_ECHOLNPGM("Y Move");
|
||||
axiscode = 'Y';
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
|
||||
break;
|
||||
#if HAS_Y_AXIS
|
||||
case VP_MOVE_Y:
|
||||
axiscode = 'Y';
|
||||
speed = _mf[Y_AXIS];
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case VP_MOVE_Z:
|
||||
DEBUG_ECHOLNPGM("Z Move");
|
||||
axiscode = 'Z';
|
||||
speed = 300; // default to 5mm/s
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
|
||||
break;
|
||||
#if HAS_Z_AXIS
|
||||
case VP_MOVE_Z:
|
||||
axiscode = 'Z';
|
||||
speed = _mf[Z_AXIS];
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case VP_MOTOR_LOCK_UNLOK:
|
||||
DEBUG_ECHOLNPGM("Motor Unlock");
|
||||
movevalue = 5;
|
||||
axiscode = '\0';
|
||||
// return ;
|
||||
break;
|
||||
|
||||
case VP_HOME_ALL: // only used for homing
|
||||
DEBUG_ECHOLNPGM("Home all");
|
||||
axiscode = '\0';
|
||||
axiscode = '\0';
|
||||
movevalue = 0; // ignore value sent from display, this VP is _ONLY_ for homing.
|
||||
//return;
|
||||
break;
|
||||
|
||||
case VP_X_HOME:
|
||||
DEBUG_ECHOLNPGM("X Home");
|
||||
axiscode = 'X';
|
||||
axiscode = 'X';
|
||||
movevalue = 0;
|
||||
break;
|
||||
|
||||
case VP_Y_HOME:
|
||||
DEBUG_ECHOLNPGM("Y Home");
|
||||
axiscode = 'Y';
|
||||
movevalue = 0;
|
||||
break;
|
||||
#if HAS_Y_AXIS
|
||||
case VP_Y_HOME:
|
||||
axiscode = 'Y';
|
||||
movevalue = 0;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case VP_Z_HOME:
|
||||
DEBUG_ECHOLNPGM("Z Home");
|
||||
axiscode = 'Z';
|
||||
movevalue = 0;
|
||||
break;
|
||||
#if HAS_Z_AXIS
|
||||
case VP_Z_HOME:
|
||||
axiscode = 'Z';
|
||||
movevalue = 0;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
DEBUG_ECHOPGM("movevalue = ", movevalue);
|
||||
if (movevalue != 0 && movevalue != 5) { // get move distance
|
||||
switch (movevalue) {
|
||||
case 0x0001: movevalue = manualMoveStep; break;
|
||||
@@ -825,21 +802,16 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
|
||||
if (!movevalue) {
|
||||
// homing
|
||||
DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode));
|
||||
// char buf[6] = "G28 X";
|
||||
// buf[4] = axiscode;
|
||||
|
||||
char buf[6];
|
||||
sprintf(buf, "G28 %c", axiscode);
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOLNPGM(" ✓");
|
||||
ForceCompleteUpdate();
|
||||
return;
|
||||
}
|
||||
else if (movevalue == 5) {
|
||||
DEBUG_ECHOPGM("send M84");
|
||||
char buf[6];
|
||||
snprintf_P(buf,6,PSTR("M84 %c"), axiscode);
|
||||
queue.enqueue_one_now(buf);
|
||||
@@ -848,80 +820,57 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
else {
|
||||
// movement
|
||||
DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode));
|
||||
bool old_relative_mode = relative_mode;
|
||||
|
||||
if (!relative_mode) {
|
||||
//DEBUG_ECHOPGM(" G91");
|
||||
queue.enqueue_now(F("G91"));
|
||||
//DEBUG_ECHOPGM(" ✓ ");
|
||||
}
|
||||
const bool old_relative_mode = relative_mode;
|
||||
if (!relative_mode) queue.enqueue_now(F("G91"));
|
||||
char buf[32]; // G1 X9999.99 F12345
|
||||
// unsigned int backup_speed = MMS_TO_MMM(feedrate_mm_s);
|
||||
//const uint16_t backup_speed = MMS_TO_MMM(feedrate_mm_s);
|
||||
char sign[] = "\0";
|
||||
int16_t value = movevalue / 100;
|
||||
if (movevalue < 0) { value = -value; sign[0] = '-'; }
|
||||
int16_t fraction = ABS(movevalue) % 100;
|
||||
const int16_t fraction = ABS(movevalue) % 100;
|
||||
snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed);
|
||||
queue.enqueue_one_now(buf);
|
||||
|
||||
//if (backup_speed != speed) {
|
||||
// snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed);
|
||||
// queue.enqueue_one_now(buf);
|
||||
// //DEBUG_ECHOPGM(" ", buf);
|
||||
//}
|
||||
|
||||
//while (!enqueue_and_echo_command(buf)) idle();
|
||||
//DEBUG_ECHOLNPGM(" ✓ ");
|
||||
if (!old_relative_mode) {
|
||||
//DEBUG_ECHOPGM("G90");
|
||||
//queue.enqueue_now(F("G90"));
|
||||
queue.enqueue_now(F("G90"));
|
||||
//DEBUG_ECHOPGM(" ✓ ");
|
||||
}
|
||||
|
||||
if (!old_relative_mode) queue.enqueue_now(F("G90"));
|
||||
}
|
||||
|
||||
ForceCompleteUpdate();
|
||||
DEBUG_ECHOLNPGM("manmv done.");
|
||||
return;
|
||||
|
||||
cannotmove:
|
||||
DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode));
|
||||
return;
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::GetParkPos(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
const int16_t value_pos = BE16_P(val_ptr);
|
||||
const int16_t pos = BE16_P(val_ptr);
|
||||
|
||||
switch (var.VP) {
|
||||
case VP_X_PARK_POS: mks_park_pos.x = value_pos; break;
|
||||
case VP_Y_PARK_POS: mks_park_pos.y = value_pos; break;
|
||||
case VP_Z_PARK_POS: mks_park_pos.z = value_pos; break;
|
||||
case VP_X_PARK_POS: mks_park_pos.x = pos; break;
|
||||
case VP_Y_PARK_POS: mks_park_pos.y = pos; break;
|
||||
case VP_Z_PARK_POS: mks_park_pos.z = pos; break;
|
||||
default: break;
|
||||
}
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::HandleChangeLevelPoint(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleChangeLevelPoint");
|
||||
const int16_t raw = BE16_P(val_ptr);
|
||||
|
||||
const int16_t value_raw = BE16_P(val_ptr);
|
||||
DEBUG_ECHOLNPGM("value_raw:", value_raw);
|
||||
|
||||
*(int16_t*)var.memadr = value_raw;
|
||||
*(int16_t*)var.memadr = raw;
|
||||
|
||||
settings.save();
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleStepPerMMChanged");
|
||||
|
||||
const uint16_t value_raw = BE16_P(val_ptr);
|
||||
const float value = (float)value_raw;
|
||||
|
||||
DEBUG_ECHOLNPGM("value_raw:", value_raw);
|
||||
DEBUG_ECHOLNPGM("value:", value);
|
||||
const uint16_t raw = BE16_P(val_ptr);
|
||||
const float value = (float)raw;
|
||||
|
||||
ExtUI::axis_t axis;
|
||||
switch (var.VP) {
|
||||
@@ -931,19 +880,13 @@ void DGUSScreenHandlerMKS::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *v
|
||||
case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break;
|
||||
}
|
||||
ExtUI::setAxisSteps_per_mm(value, axis);
|
||||
DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(axis));
|
||||
settings.save();
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleStepPerMMExtruderChanged");
|
||||
|
||||
const uint16_t value_raw = BE16_P(val_ptr);
|
||||
const float value = (float)value_raw;
|
||||
|
||||
DEBUG_ECHOLNPGM("value_raw:", value_raw);
|
||||
DEBUG_ECHOLNPGM("value:", value);
|
||||
const uint16_t raw = BE16_P(val_ptr);
|
||||
const float value = (float)raw;
|
||||
|
||||
ExtUI::extruder_t extruder;
|
||||
switch (var.VP) {
|
||||
@@ -956,19 +899,13 @@ void DGUSScreenHandlerMKS::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var,
|
||||
#endif
|
||||
}
|
||||
ExtUI::setAxisSteps_per_mm(value, extruder);
|
||||
DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisSteps_per_mm(extruder));
|
||||
settings.save();
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::HandleMaxSpeedChange(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleMaxSpeedChange");
|
||||
|
||||
const uint16_t value_raw = BE16_P(val_ptr);
|
||||
const float value = (float)value_raw;
|
||||
|
||||
DEBUG_ECHOLNPGM("value_raw:", value_raw);
|
||||
DEBUG_ECHOLNPGM("value:", value);
|
||||
const uint16_t raw = BE16_P(val_ptr);
|
||||
const float value = (float)raw;
|
||||
|
||||
ExtUI::axis_t axis;
|
||||
switch (var.VP) {
|
||||
@@ -978,19 +915,13 @@ void DGUSScreenHandlerMKS::HandleMaxSpeedChange(DGUS_VP_Variable &var, void *val
|
||||
default: return;
|
||||
}
|
||||
ExtUI::setAxisMaxFeedrate_mm_s(value, axis);
|
||||
DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisMaxFeedrate_mm_s(axis));
|
||||
settings.save();
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::HandleExtruderMaxSpeedChange(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleExtruderMaxSpeedChange");
|
||||
|
||||
const uint16_t value_raw = BE16_P(val_ptr);
|
||||
const float value = (float)value_raw;
|
||||
|
||||
DEBUG_ECHOLNPGM("value_raw:", value_raw);
|
||||
DEBUG_ECHOLNPGM("value:", value);
|
||||
const uint16_t raw = BE16_P(val_ptr);
|
||||
const float value = (float)raw;
|
||||
|
||||
ExtUI::extruder_t extruder;
|
||||
switch (var.VP) {
|
||||
@@ -1003,19 +934,13 @@ void DGUSScreenHandlerMKS::HandleExtruderMaxSpeedChange(DGUS_VP_Variable &var, v
|
||||
case VP_E1_MAX_SPEED: extruder = ExtUI::extruder_t::E1; break;
|
||||
}
|
||||
ExtUI::setAxisMaxFeedrate_mm_s(value, extruder);
|
||||
DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisMaxFeedrate_mm_s(extruder));
|
||||
settings.save();
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::HandleMaxAccChange(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleMaxAccChange");
|
||||
|
||||
const uint16_t value_raw = BE16_P(val_ptr);
|
||||
const float value = (float)value_raw;
|
||||
|
||||
DEBUG_ECHOLNPGM("value_raw:", value_raw);
|
||||
DEBUG_ECHOLNPGM("value:", value);
|
||||
const uint16_t raw = BE16_P(val_ptr);
|
||||
const float value = (float)raw;
|
||||
|
||||
ExtUI::axis_t axis;
|
||||
switch (var.VP) {
|
||||
@@ -1025,17 +950,13 @@ void DGUSScreenHandlerMKS::HandleMaxAccChange(DGUS_VP_Variable &var, void *val_p
|
||||
case VP_Z_ACC_MAX_SPEED: axis = ExtUI::axis_t::Z; break;
|
||||
}
|
||||
ExtUI::setAxisMaxAcceleration_mm_s2(value, axis);
|
||||
DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisMaxAcceleration_mm_s2(axis));
|
||||
settings.save();
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::HandleExtruderAccChange(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleExtruderAccChange");
|
||||
|
||||
uint16_t value_raw = BE16_P(val_ptr);
|
||||
DEBUG_ECHOLNPGM("value_raw:", value_raw);
|
||||
float value = (float)value_raw;
|
||||
uint16_t raw = BE16_P(val_ptr);
|
||||
float value = (float)raw;
|
||||
ExtUI::extruder_t extruder;
|
||||
switch (var.VP) {
|
||||
default: return;
|
||||
@@ -1046,41 +967,39 @@ void DGUSScreenHandlerMKS::HandleExtruderAccChange(DGUS_VP_Variable &var, void *
|
||||
case VP_E1_ACC_MAX_SPEED: extruder = ExtUI::extruder_t::E1; settings.load(); break;
|
||||
#endif
|
||||
}
|
||||
DEBUG_ECHOLNPGM("value:", value);
|
||||
ExtUI::setAxisMaxAcceleration_mm_s2(value, extruder);
|
||||
DEBUG_ECHOLNPGM("value_set:", ExtUI::getAxisMaxAcceleration_mm_s2(extruder));
|
||||
settings.save();
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::HandleTravelAccChange(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
uint16_t value_travel = BE16_P(val_ptr);
|
||||
planner.settings.travel_acceleration = (float)value_travel;
|
||||
uint16_t travel = BE16_P(val_ptr);
|
||||
planner.settings.travel_acceleration = (float)travel;
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::HandleFeedRateMinChange(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
uint16_t value_t = BE16_P(val_ptr);
|
||||
planner.settings.min_feedrate_mm_s = (float)value_t;
|
||||
uint16_t t = BE16_P(val_ptr);
|
||||
planner.settings.min_feedrate_mm_s = (float)t;
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::HandleMin_T_F(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
uint16_t value_t_f = BE16_P(val_ptr);
|
||||
planner.settings.min_travel_feedrate_mm_s = (float)value_t_f;
|
||||
uint16_t t_f = BE16_P(val_ptr);
|
||||
planner.settings.min_travel_feedrate_mm_s = (float)t_f;
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::HandleAccChange(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
uint16_t value_acc = BE16_P(val_ptr);
|
||||
planner.settings.acceleration = (float)value_acc;
|
||||
uint16_t acc = BE16_P(val_ptr);
|
||||
planner.settings.acceleration = (float)acc;
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void DGUSScreenHandlerMKS::HandleGetExMinTemp(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
const uint16_t value_ex_min_temp = BE16_P(val_ptr);
|
||||
thermalManager.extrude_min_temp = value_ex_min_temp;
|
||||
const uint16_t ex_min_temp = BE16_P(val_ptr);
|
||||
thermalManager.extrude_min_temp = ex_min_temp;
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
#endif
|
||||
@@ -1088,9 +1007,7 @@ void DGUSScreenHandlerMKS::HandleAccChange(DGUS_VP_Variable &var, void *val_ptr)
|
||||
#if HAS_PID_HEATING
|
||||
void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
const uint16_t rawvalue = BE16_P(val_ptr);
|
||||
DEBUG_ECHOLNPGM("V1:", rawvalue);
|
||||
const float value = 1.0f * rawvalue;
|
||||
DEBUG_ECHOLNPGM("V2:", value);
|
||||
const float value = float(rawvalue);
|
||||
float newvalue = 0;
|
||||
|
||||
switch (var.VP) {
|
||||
@@ -1112,7 +1029,6 @@ void DGUSScreenHandlerMKS::HandleAccChange(DGUS_VP_Variable &var, void *val_ptr)
|
||||
#endif
|
||||
}
|
||||
|
||||
DEBUG_ECHOLNPGM("V3:", newvalue);
|
||||
*(float *)var.memadr = newvalue;
|
||||
|
||||
settings.save();
|
||||
@@ -1122,7 +1038,6 @@ void DGUSScreenHandlerMKS::HandleAccChange(DGUS_VP_Variable &var, void *val_ptr)
|
||||
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
void DGUSScreenHandler::HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleLiveAdjustZ");
|
||||
const float step = ZOffset_distance;
|
||||
|
||||
const uint16_t flag = BE16_P(val_ptr);
|
||||
@@ -1164,19 +1079,17 @@ void DGUSScreenHandlerMKS::HandleAccChange(DGUS_VP_Variable &var, void *val_ptr)
|
||||
#endif // BABYSTEPPING
|
||||
|
||||
void DGUSScreenHandlerMKS::GetManualFilament(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
const uint16_t value_len = BE16_P(val_ptr);
|
||||
const float value = (float)value_len;
|
||||
const uint16_t len = BE16_P(val_ptr);
|
||||
const float value = (float)len;
|
||||
|
||||
DEBUG_ECHOLNPGM("GetManualFilament:", value);
|
||||
distanceFilament = value;
|
||||
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::GetManualFilamentSpeed(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
const uint16_t value_len = BE16_P(val_ptr);
|
||||
filamentSpeed_mm_s = value_len;
|
||||
DEBUG_ECHOLNPGM("GetManualFilamentSpeed:", value_len);
|
||||
const uint16_t len = BE16_P(val_ptr);
|
||||
filamentSpeed_mm_s = len;
|
||||
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
}
|
||||
@@ -1265,20 +1178,16 @@ void GcodeSuite::M1002() {
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::FilamentLoad(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("FilamentLoad");
|
||||
FilamentLoadUnload(var, val_ptr, 1);
|
||||
}
|
||||
|
||||
void DGUSScreenHandlerMKS::FilamentUnLoad(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("FilamentUnLoad");
|
||||
FilamentLoadUnload(var, val_ptr, -1);
|
||||
}
|
||||
|
||||
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
|
||||
|
||||
void DGUSScreenHandler::HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleFilamentOption");
|
||||
|
||||
uint8_t e_temp = 0;
|
||||
filament_data.heated = false;
|
||||
uint16_t preheat_option = BE16_P(val_ptr);
|
||||
@@ -1346,7 +1255,6 @@ void DGUSScreenHandlerMKS::FilamentUnLoad(DGUS_VP_Variable &var, void *val_ptr)
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleFilamentLoadUnload(DGUS_VP_Variable &var) {
|
||||
DEBUG_ECHOLNPGM("HandleFilamentLoadUnload");
|
||||
if (filament_data.action <= 0) return;
|
||||
|
||||
// If we close to the target temperature, we can start load or unload the filament
|
||||
|
||||
@@ -247,7 +247,7 @@ constexpr uint16_t VP_BED_STATUS = 0x331C;
|
||||
constexpr uint16_t VP_MOVE_OPTION = 0x3400;
|
||||
|
||||
// Step per mm
|
||||
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , 2 byte unsigned int , 0~1638.4
|
||||
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , uint16_t , 0~1638.4
|
||||
//constexpr uint16_t VP_X2_STEP_PER_MM = 0x3602;
|
||||
constexpr uint16_t VP_Y_STEP_PER_MM = 0x3604;
|
||||
//constexpr uint16_t VP_Y2_STEP_PER_MM = 0x3606;
|
||||
@@ -261,7 +261,7 @@ constexpr uint16_t VP_E0_STEP_PER_MM = 0x3610;
|
||||
//constexpr uint16_t VP_E5_STEP_PER_MM = 0x361A;
|
||||
|
||||
// PIDs
|
||||
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4
|
||||
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , uint16_t , 0~1638.4
|
||||
constexpr uint16_t VP_E0_PID_I = 0x3702;
|
||||
constexpr uint16_t VP_E0_PID_D = 0x3704;
|
||||
constexpr uint16_t VP_BED_PID_P = 0x3710;
|
||||
|
||||
@@ -134,8 +134,6 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
// meaning "return to previous screen"
|
||||
DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1];
|
||||
|
||||
DEBUG_ECHOLNPGM("\n DEBUG target", target);
|
||||
|
||||
if (target == DGUSLCD_SCREEN_POPUP) {
|
||||
// Special handling for popup is to return to previous menu
|
||||
if (current_screen == DGUSLCD_SCREEN_POPUP && confirm_action_cb) confirm_action_cb();
|
||||
@@ -151,8 +149,6 @@ void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleManualMove");
|
||||
|
||||
int16_t movevalue = swap16(*(uint16_t*)val_ptr);
|
||||
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
|
||||
if (movevalue) {
|
||||
@@ -161,7 +157,7 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
#endif
|
||||
char axiscode;
|
||||
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode.
|
||||
uint16_t speed = _mf[X_AXIS]; // Default feedrate for manual moves
|
||||
|
||||
switch (var.VP) {
|
||||
default: return;
|
||||
@@ -171,16 +167,21 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove;
|
||||
break;
|
||||
|
||||
case VP_MOVE_Y:
|
||||
axiscode = 'Y';
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
|
||||
break;
|
||||
#if HAS_Y_AXIS
|
||||
case VP_MOVE_Y:
|
||||
axiscode = 'Y';
|
||||
speed = _mf[Y_AXIS];
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case VP_MOVE_Z:
|
||||
axiscode = 'Z';
|
||||
speed = 300; // default to 5mm/s
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
|
||||
break;
|
||||
#if HAS_Z_AXIS
|
||||
case VP_MOVE_Z:
|
||||
axiscode = 'Z';
|
||||
speed = _mf[Z_AXIS];
|
||||
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case VP_HOME_ALL: // only used for homing
|
||||
axiscode = '\0';
|
||||
@@ -190,63 +191,42 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
if (!movevalue) {
|
||||
// homing
|
||||
DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode));
|
||||
char buf[6] = "G28 X";
|
||||
buf[4] = axiscode;
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOLNPGM(" ✓");
|
||||
ForceCompleteUpdate();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
// movement
|
||||
DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode));
|
||||
bool old_relative_mode = relative_mode;
|
||||
if (!relative_mode) {
|
||||
//DEBUG_ECHOPGM(" G91");
|
||||
queue.enqueue_now(F("G91"));
|
||||
//DEBUG_ECHOPGM(" ✓ ");
|
||||
}
|
||||
const bool old_relative_mode = relative_mode;
|
||||
if (!relative_mode) queue.enqueue_now(F("G91"));
|
||||
char buf[32]; // G1 X9999.99 F12345
|
||||
unsigned int backup_speed = MMS_TO_MMM(feedrate_mm_s);
|
||||
const uint16_t backup_speed = MMS_TO_MMM(feedrate_mm_s);
|
||||
char sign[] = "\0";
|
||||
int16_t value = movevalue / 100;
|
||||
if (movevalue < 0) { value = -value; sign[0] = '-'; }
|
||||
int16_t fraction = ABS(movevalue) % 100;
|
||||
snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed);
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOLNPGM(" ✓ ");
|
||||
if (backup_speed != speed) {
|
||||
snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed);
|
||||
queue.enqueue_one_now(buf);
|
||||
//DEBUG_ECHOPGM(" ", buf);
|
||||
}
|
||||
// while (!enqueue_and_echo_command(buf)) idle();
|
||||
//DEBUG_ECHOLNPGM(" ✓ ");
|
||||
if (!old_relative_mode) {
|
||||
//DEBUG_ECHOPGM("G90");
|
||||
queue.enqueue_now(F("G90"));
|
||||
//DEBUG_ECHOPGM(" ✓ ");
|
||||
}
|
||||
//while (!enqueue_and_echo_command(buf)) idle();
|
||||
if (!old_relative_mode) queue.enqueue_now(F("G90"));
|
||||
}
|
||||
|
||||
ForceCompleteUpdate();
|
||||
DEBUG_ECHOLNPGM("manmv done.");
|
||||
return;
|
||||
|
||||
cannotmove:
|
||||
DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode));
|
||||
return;
|
||||
}
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
uint16_t rawvalue = swap16(*(uint16_t*)val_ptr);
|
||||
DEBUG_ECHOLNPGM("V1:", rawvalue);
|
||||
float value = (float)rawvalue / 10;
|
||||
DEBUG_ECHOLNPGM("V2:", value);
|
||||
float newvalue = 0;
|
||||
|
||||
switch (var.VP) {
|
||||
@@ -268,7 +248,6 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
#endif
|
||||
}
|
||||
|
||||
DEBUG_ECHOLNPGM("V3:", newvalue);
|
||||
*(float *)var.memadr = newvalue;
|
||||
|
||||
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
|
||||
@@ -277,7 +256,6 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
void DGUSScreenHandler::HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleLiveAdjustZ");
|
||||
int16_t flag = swap16(*(uint16_t*)val_ptr),
|
||||
steps = flag ? -20 : 20;
|
||||
ExtUI::smartAdjustAxis_steps(steps, ExtUI::axis_t::Z, true);
|
||||
@@ -288,8 +266,6 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
|
||||
|
||||
void DGUSScreenHandler::HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
DEBUG_ECHOLNPGM("HandleFilamentOption");
|
||||
|
||||
uint8_t e_temp = 0;
|
||||
filament_data.heated = false;
|
||||
uint16_t preheat_option = swap16(*(uint16_t*)val_ptr);
|
||||
@@ -360,7 +336,6 @@ void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
}
|
||||
|
||||
void DGUSScreenHandler::HandleFilamentLoadUnload(DGUS_VP_Variable &var) {
|
||||
DEBUG_ECHOLNPGM("HandleFilamentLoadUnload");
|
||||
if (filament_data.action <= 0) return;
|
||||
|
||||
// If we close to the target temperature, we can start load or unload the filament
|
||||
|
||||
@@ -1,357 +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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/* DGUS implementation written by coldtobi in 2019 for Marlin */
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
|
||||
|
||||
#define DEBUG_ECHOLNPAIR DEBUG_ECHOLNPGM
|
||||
|
||||
#if HOTENDS > 2
|
||||
#error "More than 2 hotends not implemented on the Display UI design."
|
||||
#endif
|
||||
|
||||
#include "../ui_api.h"
|
||||
|
||||
#include "../../../MarlinCore.h"
|
||||
#include "../../../module/temperature.h"
|
||||
#include "../../../module/motion.h"
|
||||
#include "../../../gcode/queue.h"
|
||||
#include "../../../module/planner.h"
|
||||
#include "../../../sd/cardreader.h"
|
||||
#include "../../../libs/duration_t.h"
|
||||
#include "../../../module/printcounter.h"
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
#include "../../../feature/powerloss.h"
|
||||
#endif
|
||||
|
||||
#include "DGUSDisplay.h"
|
||||
#include "DGUSVPVariable.h"
|
||||
#include "DGUSDisplayDef.h"
|
||||
|
||||
// Preamble... 2 Bytes, usually 0x5A 0xA5, but configurable
|
||||
constexpr uint8_t DGUS_HEADER1 = 0x5A;
|
||||
constexpr uint8_t DGUS_HEADER2 = 0xA5;
|
||||
|
||||
constexpr uint8_t DGUS_CMD_WRITEVAR = 0x82;
|
||||
constexpr uint8_t DGUS_CMD_READVAR = 0x83;
|
||||
|
||||
#if ENABLED(DEBUG_DGUSLCD)
|
||||
bool dguslcd_local_debug; // = false;
|
||||
#endif
|
||||
|
||||
#define dgusserial LCD_SERIAL
|
||||
|
||||
void DGUSDisplay::InitDisplay() {
|
||||
dgusserial.begin(LCD_BAUDRATE);
|
||||
|
||||
/*delay(500); // Attempt to fix possible handshake error
|
||||
|
||||
ResetDisplay(); // Reset for firmware update
|
||||
|
||||
delay(500); // Attempt to fix possible handshake error
|
||||
*/
|
||||
if (true
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
&& !recovery.valid()
|
||||
#endif
|
||||
)
|
||||
RequestScreen(
|
||||
#if ENABLED(SHOW_BOOTSCREEN)
|
||||
DGUSLCD_SCREEN_BOOT
|
||||
#else
|
||||
DGUSLCD_SCREEN_MAIN
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
void DGUSDisplay::ResetDisplay() {
|
||||
SERIAL_ECHOLN("ResetDisplay");
|
||||
const unsigned char resetCommand[] = { 0x55, 0xAA, 0x5A, 0xA5 };
|
||||
WriteVariable(0x04, resetCommand, sizeof(resetCommand));
|
||||
}
|
||||
|
||||
void DGUSDisplay::ReadVariable(uint16_t adr) {
|
||||
WriteHeader(adr, DGUS_CMD_READVAR, sizeof(uint8_t));
|
||||
|
||||
// Specify to read one byte
|
||||
dgusserial.write(static_cast<uint8_t>(1));
|
||||
}
|
||||
|
||||
void DGUSDisplay::WriteVariable(uint16_t adr, const void* values, uint8_t valueslen, bool isstr, char fillChar) {
|
||||
const char* myvalues = static_cast<const char*>(values);
|
||||
bool strend = !myvalues;
|
||||
WriteHeader(adr, DGUS_CMD_WRITEVAR, valueslen);
|
||||
while (valueslen--) {
|
||||
char x;
|
||||
if (!strend) x = *myvalues++;
|
||||
if ((isstr && !x) || strend) {
|
||||
strend = true;
|
||||
x = fillChar;
|
||||
}
|
||||
dgusserial.write(x);
|
||||
}
|
||||
}
|
||||
|
||||
void DGUSDisplay::WriteVariable(uint16_t adr, uint16_t value) {
|
||||
value = (value & 0xffU) << 8U | (value >> 8U);
|
||||
WriteVariable(adr, static_cast<const void*>(&value), sizeof(uint16_t));
|
||||
}
|
||||
|
||||
void DGUSDisplay::WriteVariable(uint16_t adr, int16_t value) {
|
||||
union { int16_t l; char lb[2]; } endian;
|
||||
char tmp[2];
|
||||
endian.l = value;
|
||||
tmp[0] = endian.lb[1];
|
||||
tmp[1] = endian.lb[0];
|
||||
|
||||
WriteVariable(adr, static_cast<const void*>(&tmp), sizeof(int16_t));
|
||||
}
|
||||
|
||||
void DGUSDisplay::WriteVariable(uint16_t adr, uint8_t value) {
|
||||
WriteVariable(adr, static_cast<const void*>(&value), sizeof(uint8_t));
|
||||
}
|
||||
|
||||
void DGUSDisplay::WriteVariable(uint16_t adr, int8_t value) {
|
||||
WriteVariable(adr, static_cast<const void*>(&value), sizeof(int8_t));
|
||||
}
|
||||
|
||||
void DGUSDisplay::WriteVariable(uint16_t adr, long value) {
|
||||
union { long l; char lb[4]; } endian;
|
||||
char tmp[4];
|
||||
endian.l = value;
|
||||
tmp[0] = endian.lb[3];
|
||||
tmp[1] = endian.lb[2];
|
||||
tmp[2] = endian.lb[1];
|
||||
tmp[3] = endian.lb[0];
|
||||
WriteVariable(adr, static_cast<const void*>(&tmp), sizeof(long));
|
||||
}
|
||||
|
||||
void DGUSDisplay::WriteVariable(uint16_t adr, float value) {
|
||||
static_assert(sizeof(float) == 4);
|
||||
|
||||
union { float l; char lb[4]; } endian;
|
||||
char tmp[4];
|
||||
endian.l = value;
|
||||
tmp[0] = endian.lb[3];
|
||||
tmp[1] = endian.lb[2];
|
||||
tmp[2] = endian.lb[1];
|
||||
tmp[3] = endian.lb[0];
|
||||
WriteVariable(adr, static_cast<const void*>(&tmp), sizeof(float));
|
||||
}
|
||||
|
||||
void DGUSDisplay::WriteVariablePGM(uint16_t adr, const void* values, uint8_t valueslen, bool isstr, char fillChar) {
|
||||
const char* myvalues = static_cast<const char*>(values);
|
||||
bool strend = !myvalues;
|
||||
WriteHeader(adr, DGUS_CMD_WRITEVAR, valueslen);
|
||||
while (valueslen--) {
|
||||
char x;
|
||||
if (!strend) x = pgm_read_byte(myvalues++);
|
||||
if ((isstr && !x) || strend) {
|
||||
strend = true;
|
||||
x = fillChar;
|
||||
}
|
||||
dgusserial.write(x);
|
||||
}
|
||||
}
|
||||
|
||||
void DGUSDisplay::SetVariableDisplayColor(uint16_t sp, uint16_t color) {
|
||||
WriteVariable(sp + 0x03, color);
|
||||
}
|
||||
|
||||
void DGUSDisplay::ProcessRx() {
|
||||
|
||||
#if ENABLED(DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS)
|
||||
if (!dgusserial.available() && dgusserial.buffer_overruns()) {
|
||||
// Overrun, but reset the flag only when the buffer is empty
|
||||
// We want to extract as many as valid datagrams possible...
|
||||
DEBUG_ECHOPGM("OVFL");
|
||||
rx_datagram_state = DGUS_IDLE;
|
||||
//dgusserial.reset_rx_overun();
|
||||
dgusserial.flush();
|
||||
}
|
||||
#endif
|
||||
|
||||
uint8_t receivedbyte;
|
||||
while (dgusserial.available()) {
|
||||
switch (rx_datagram_state) {
|
||||
|
||||
case DGUS_IDLE: // Waiting for the first header byte
|
||||
receivedbyte = dgusserial.read();
|
||||
//DEBUGLCDCOMM_ECHOPAIR("< ",receivedbyte);
|
||||
if (DGUS_HEADER1 == receivedbyte) rx_datagram_state = DGUS_HEADER1_SEEN;
|
||||
break;
|
||||
|
||||
case DGUS_HEADER1_SEEN: // Waiting for the second header byte
|
||||
receivedbyte = dgusserial.read();
|
||||
//DEBUGLCDCOMM_ECHOPAIR(" ", receivedbyte);
|
||||
rx_datagram_state = (DGUS_HEADER2 == receivedbyte) ? DGUS_HEADER2_SEEN : DGUS_IDLE;
|
||||
break;
|
||||
|
||||
case DGUS_HEADER2_SEEN: // Waiting for the length byte
|
||||
rx_datagram_len = dgusserial.read();
|
||||
//DEBUGLCDCOMM_ECHOPAIR(" (", rx_datagram_len, ") ");
|
||||
|
||||
// Telegram min len is 3 (command and one word of payload)
|
||||
rx_datagram_state = WITHIN(rx_datagram_len, 3, DGUS_RX_BUFFER_SIZE) ? DGUS_WAIT_TELEGRAM : DGUS_IDLE;
|
||||
break;
|
||||
|
||||
case DGUS_WAIT_TELEGRAM: // wait for complete datagram to arrive.
|
||||
if (dgusserial.available() < rx_datagram_len) return;
|
||||
|
||||
Initialized = true; // We've talked to it, so we defined it as initialized.
|
||||
uint8_t command = dgusserial.read();
|
||||
|
||||
// DEBUGLCDCOMM_ECHOPAIR("# ", command);
|
||||
|
||||
uint8_t readlen = rx_datagram_len - 1; // command is part of len.
|
||||
unsigned char tmp[rx_datagram_len - 1];
|
||||
unsigned char *ptmp = tmp;
|
||||
while (readlen--) {
|
||||
receivedbyte = dgusserial.read();
|
||||
//DEBUGLCDCOMM_ECHOPAIR(" ", receivedbyte);
|
||||
*ptmp++ = receivedbyte;
|
||||
}
|
||||
//DEBUGLCDCOMM_ECHOPGM(" # ");
|
||||
// mostly we'll get this: 5A A5 03 82 4F 4B -- ACK on 0x82, so discard it.
|
||||
if (command == DGUS_CMD_WRITEVAR && 'O' == tmp[0] && 'K' == tmp[1]) {
|
||||
//DEBUG_ECHOLNPGM(">");
|
||||
rx_datagram_state = DGUS_IDLE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* AutoUpload, (and answer to) Command 0x83 :
|
||||
| tmp[0 1 2 3 4 ... ]
|
||||
| Example 5A A5 06 83 20 01 01 78 01 ……
|
||||
| / / | | \ / | \ \
|
||||
| Header | | | | \_____\_ DATA (Words!)
|
||||
| DatagramLen / VPAdr |
|
||||
| Command DataLen (in Words) */
|
||||
if (command == DGUS_CMD_READVAR) {
|
||||
const uint16_t vp = tmp[0] << 8 | tmp[1];
|
||||
|
||||
//const uint8_t dlen = tmp[2] << 1; // Convert to Bytes. (Display works with words)
|
||||
//DEBUG_ECHOPAIR(" vp=", vp, " dlen=", dlen);
|
||||
DGUS_VP_Variable ramcopy;
|
||||
DEBUG_ECHOLNPAIR("VP received: ", vp , " - val ", tmp[3]);
|
||||
if (populate_VPVar(vp, &ramcopy)) {
|
||||
if (ramcopy.set_by_display_handler)
|
||||
ramcopy.set_by_display_handler(ramcopy, &tmp[3]);
|
||||
else
|
||||
DEBUG_ECHOLNPGM(" VPVar found, no handler.");
|
||||
}
|
||||
else
|
||||
DEBUG_ECHOLNPAIR(" VPVar not found:", vp);
|
||||
|
||||
rx_datagram_state = DGUS_IDLE;
|
||||
break;
|
||||
}
|
||||
|
||||
// discard anything else
|
||||
rx_datagram_state = DGUS_IDLE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
size_t DGUSDisplay::GetFreeTxBuffer() { return SERIAL_GET_TX_BUFFER_FREE(); }
|
||||
|
||||
void DGUSDisplay::WriteHeader(uint16_t adr, uint8_t cmd, uint8_t payloadlen) {
|
||||
dgusserial.write(DGUS_HEADER1);
|
||||
dgusserial.write(DGUS_HEADER2);
|
||||
dgusserial.write(payloadlen + 3);
|
||||
dgusserial.write(cmd);
|
||||
dgusserial.write(adr >> 8);
|
||||
dgusserial.write(adr & 0xFF);
|
||||
}
|
||||
|
||||
void DGUSDisplay::WritePGM(const char str[], uint8_t len) {
|
||||
while (len--) dgusserial.write(pgm_read_byte(str++));
|
||||
}
|
||||
|
||||
void DGUSDisplay::loop() {
|
||||
// protect against recursion… ProcessRx() may indirectly call idle() when injecting gcode commands.
|
||||
if (!no_reentrance) {
|
||||
no_reentrance = true;
|
||||
ProcessRx();
|
||||
//Because crappy VPHELPER macros cant take calcs or functions, process updated value here. If we handle only in button handler code, we will miss changes over M290
|
||||
dgusdisplay.WriteVariable(VP_Z_OFFSET, (int16_t)(100*ExtUI::getZOffset_mm()));
|
||||
|
||||
no_reentrance = false;
|
||||
}
|
||||
}
|
||||
|
||||
void DGUSDisplay::RequestScreen(DGUSLCD_Screens screen) {
|
||||
displayRequest = screen;
|
||||
|
||||
DEBUG_ECHOLNPAIR("GotoScreen ", screen);
|
||||
const unsigned char gotoscreen[] = { 0x5A, 0x01, (unsigned char) (screen >> 8U), (unsigned char) (screen & 0xFFU) };
|
||||
WriteVariable(0x84, gotoscreen, sizeof(gotoscreen));
|
||||
}
|
||||
|
||||
void DGUSDisplay::SetTouchScreenConfiguration(bool enable_standby, bool enable_sound, uint8_t standby_brightness, uint8_t brightness, uint16_t standbyTimeSeconds) {
|
||||
// Main configuration (System_Config)
|
||||
unsigned char cfg_bits = 0x0;
|
||||
cfg_bits |= 1UL << 5; // 5: load 22 touch file
|
||||
cfg_bits |= 1UL << 4; // 4: auto-upload should always be enabled
|
||||
if (enable_sound) cfg_bits |= 1UL << 3; // 3: audio
|
||||
if (enable_standby) cfg_bits |= 1UL << 2; // 2: backlight on standby
|
||||
cfg_bits |= 1UL << 1; // 1 & 0: 270 degrees orientation of display
|
||||
cfg_bits |= 1UL << 0;
|
||||
|
||||
DEBUG_ECHOLNPAIR("Update touch screen config - standby ", enable_standby);
|
||||
DEBUG_ECHOLNPAIR("Update touch screen config - sound ", enable_sound);
|
||||
|
||||
const unsigned char config_set[] = { 0x5A, 0x00, (unsigned char) (cfg_bits >> 8U), (unsigned char) (cfg_bits & 0xFFU) };
|
||||
WriteVariable(0x80 /*System_Config*/, config_set, sizeof(config_set));
|
||||
|
||||
// Standby brightness (LED_Config)
|
||||
uint16_t dwinStandbyTimeSeconds = 100 * standbyTimeSeconds; /* milliseconds, but divided by 10 (not 5 like the docs say) */
|
||||
const unsigned char brightness_set[] = {
|
||||
brightness /*% active*/,
|
||||
standby_brightness /*% standby*/,
|
||||
static_cast<uint8_t>(dwinStandbyTimeSeconds >> 8),
|
||||
static_cast<uint8_t>(dwinStandbyTimeSeconds)
|
||||
};
|
||||
WriteVariable(0x82 /*LED_Config*/, brightness_set, sizeof(brightness_set));
|
||||
}
|
||||
|
||||
rx_datagram_state_t DGUSDisplay::rx_datagram_state = DGUS_IDLE;
|
||||
uint8_t DGUSDisplay::rx_datagram_len = 0;
|
||||
bool DGUSDisplay::Initialized = false;
|
||||
bool DGUSDisplay::no_reentrance = false;
|
||||
DGUSLCD_Screens DGUSDisplay::displayRequest = DGUSLCD_SCREEN_BOOT;
|
||||
|
||||
// A SW memory barrier, to ensure GCC does not overoptimize loops
|
||||
#define sw_barrier() asm volatile("": : :"memory");
|
||||
|
||||
bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy) {
|
||||
//DEBUG_ECHOLNPAIR("populate_VPVar ", VP);
|
||||
const DGUS_VP_Variable *pvp = DGUSLCD_FindVPVar(VP);
|
||||
// DEBUG_ECHOLNPAIR(" pvp ", (uint16_t )pvp);
|
||||
if (!pvp) return false;
|
||||
memcpy_P(ramcopy, pvp, sizeof(DGUS_VP_Variable));
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // HAS_DGUS_LCD
|
||||
@@ -1,136 +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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
//#define DEBUG_DGUSLCD
|
||||
//#define DEBUG_DGUSLCD_OUTGOING_COMM
|
||||
|
||||
|
||||
/* Creality DGUS implementation written by Sebastiaan Dammann in 2020 for Marlin */
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#include "../../../MarlinCore.h"
|
||||
#if HAS_BED_PROBE
|
||||
#include "../../../module/probe.h"
|
||||
#endif
|
||||
|
||||
#include "DGUSVPVariable.h"
|
||||
|
||||
enum DGUSLCD_Screens : uint8_t;
|
||||
|
||||
#ifndef DEBUG_OUT
|
||||
#define DEBUG_OUT ENABLED(DEBUG_DGUSLCD)
|
||||
#endif
|
||||
|
||||
#include "../../../core/debug_out.h"
|
||||
|
||||
|
||||
typedef enum : uint8_t {
|
||||
DGUS_IDLE, //< waiting for DGUS_HEADER1.
|
||||
DGUS_HEADER1_SEEN, //< DGUS_HEADER1 received
|
||||
DGUS_HEADER2_SEEN, //< DGUS_HEADER2 received
|
||||
DGUS_WAIT_TELEGRAM, //< LEN received, Waiting for to receive all bytes.
|
||||
} rx_datagram_state_t;
|
||||
|
||||
typedef void (*UPDATE_CURRENT_SCREEN_CALLBACK)(DGUSLCD_Screens screen);
|
||||
|
||||
// Low-Level access to the display.
|
||||
class DGUSDisplay {
|
||||
public:
|
||||
|
||||
DGUSDisplay() = default;
|
||||
|
||||
static void InitDisplay();
|
||||
static void ResetDisplay();
|
||||
|
||||
// Variable access.
|
||||
static void WriteVariable(uint16_t adr, const void* values, uint8_t valueslen, bool isstr=false, char fillChar = ' ');
|
||||
static void WriteVariablePGM(uint16_t adr, const void* values, uint8_t valueslen, bool isstr=false, char fillChar = ' ');
|
||||
static void WriteVariable(uint16_t adr, int16_t value);
|
||||
static void WriteVariable(uint16_t adr, uint16_t value);
|
||||
static void WriteVariable(uint16_t adr, uint8_t value);
|
||||
static void WriteVariable(uint16_t adr, int8_t value);
|
||||
static void WriteVariable(uint16_t adr, long value);
|
||||
static void WriteVariable(uint16_t adr, float value);
|
||||
|
||||
static void SetVariableDisplayColor(uint16_t sp, uint16_t color);
|
||||
|
||||
static void ReadVariable(uint16_t adr);
|
||||
|
||||
// Utility functions for bridging ui_api and dgus
|
||||
template<typename T, float(*Getter)(const T), T selector, typename WireType=uint16_t>
|
||||
static void SetVariable(DGUS_VP_Variable &var) {
|
||||
WriteVariable(var.VP, (WireType)Getter(selector));
|
||||
}
|
||||
|
||||
template<typename T, void(*Setter)(const float V, const T), T selector>
|
||||
static void GetVariable(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
uint16_t newvalue = swap16(*(uint16_t*)val_ptr);
|
||||
Setter(newvalue, selector);
|
||||
}
|
||||
|
||||
// Force display into another screen.
|
||||
// (And trigger update of containing VPs)
|
||||
// (to implement a pop up message, which may not be nested)
|
||||
static void RequestScreen(DGUSLCD_Screens screen);
|
||||
|
||||
static void SetTouchScreenConfiguration(bool enable_standby, bool enable_sound, uint8_t standby_brightness, uint8_t active_brightness, uint16_t standbyTimeSeconds);
|
||||
|
||||
// Periodic tasks, eg. Rx-Queue handling.
|
||||
static void loop();
|
||||
|
||||
public:
|
||||
// Helper for users of this class to estimate if an interaction would be blocking.
|
||||
static size_t GetFreeTxBuffer();
|
||||
|
||||
// Checks two things: Can we confirm the presence of the display and has we initiliazed it.
|
||||
// (both boils down that the display answered to our chatting)
|
||||
static inline bool isInitialized() { return Initialized; }
|
||||
|
||||
private:
|
||||
static void WriteHeader(uint16_t adr, uint8_t cmd, uint8_t payloadlen);
|
||||
static void WritePGM(const char str[], uint8_t len);
|
||||
static void ProcessRx();
|
||||
|
||||
static inline uint16_t swap16(const uint16_t value) { return (value & 0xffU) << 8U | (value >> 8U); }
|
||||
static rx_datagram_state_t rx_datagram_state;
|
||||
static uint8_t rx_datagram_len;
|
||||
static bool Initialized, no_reentrance;
|
||||
|
||||
static DGUSLCD_Screens displayRequest;
|
||||
};
|
||||
|
||||
#define GET_VARIABLE(f, t, V...) (&DGUSDisplay::GetVariable<decltype(t), f, t, ##V>)
|
||||
#define SET_VARIABLE(f, t, V...) (&DGUSDisplay::SetVariable<decltype(t), f, t, ##V>)
|
||||
|
||||
extern DGUSDisplay dgusdisplay;
|
||||
|
||||
// compile-time x^y
|
||||
template<typename T>
|
||||
constexpr T cpow(const T x, const int y) { return y == 0 ? 1.0 : x * cpow(x, y - 1); }
|
||||
|
||||
/// Find the flash address of a DGUS_VP_Variable for the VP.
|
||||
const DGUS_VP_Variable* DGUSLCD_FindVPVar(const uint16_t vp);
|
||||
|
||||
/// Helper to populate a DGUS_VP_Variable for a given VP. Return false if not found.
|
||||
bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy);
|
||||
@@ -1,53 +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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/* DGUS implementation written by Sebastiaan Dammann in 2020 for Marlin */
|
||||
|
||||
#include "DGUSVPVariable.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// This file defines the interaction between Marlin and the display firmware.
|
||||
|
||||
// information on which screen which VP is displayed
|
||||
// As this is a sparse table, two arrays are needed:
|
||||
// one to list the VPs of one screen and one to map screens to the lists.
|
||||
// (Strictly this would not be necessary, but allows to only send data the display needs and reducing load on Marlin)
|
||||
struct VPMapping {
|
||||
const uint8_t screen;
|
||||
const uint16_t *VPList; // The list is null-terminated.
|
||||
};
|
||||
|
||||
extern const struct VPMapping VPMap[];
|
||||
|
||||
// List of VPs handled by Marlin / The Display.
|
||||
extern const struct DGUS_VP_Variable ListOfVP[];
|
||||
|
||||
#define DWIN_DEFAULT_FILLER_CHAR ' '
|
||||
#define DWIN_SCROLLER_FILLER_CHAR 0x0
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(DGUS_LCD_UI_CREALITY_TOUCH)
|
||||
#include "creality_touch/DGUSDisplayDef.h"
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user