Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0eeaa2389f |
@@ -0,0 +1,40 @@
|
||||
#
|
||||
# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app
|
||||
#
|
||||
|
||||
# Number of days of inactivity before a closed issue or pull request is locked
|
||||
daysUntilLock: 60
|
||||
|
||||
# Skip issues and pull requests created before a given timestamp. Timestamp must
|
||||
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
|
||||
skipCreatedBefore: false
|
||||
|
||||
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
|
||||
exemptLabels: [ 'no-locking' ]
|
||||
|
||||
# Label to add before locking, such as `outdated`. Set to `false` to disable
|
||||
lockLabel: false
|
||||
|
||||
# Comment to post before locking. Set to `false` to disable
|
||||
lockComment: >
|
||||
This thread has been automatically locked since there has not been
|
||||
any recent activity after it was closed. Please open a new issue for
|
||||
related bugs.
|
||||
|
||||
# Assign `resolved` as the reason for locking. Set to `false` to disable
|
||||
setLockReason: true
|
||||
|
||||
# Limit to only `issues` or `pulls`
|
||||
# only: issues
|
||||
|
||||
# Optionally, specify configuration settings just for `issues` or `pulls`
|
||||
# issues:
|
||||
# exemptLabels:
|
||||
# - help-wanted
|
||||
# lockLabel: outdated
|
||||
|
||||
# pulls:
|
||||
# daysUntilLock: 30
|
||||
|
||||
# Repository to extend settings from
|
||||
# _extends: repo
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
steps:
|
||||
|
||||
- name: Check out bugfix-2.0.x
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: bugfix-2.0.x
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
exit 0
|
||||
|
||||
- name: Check out bugfix-2.1.x
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: bugfix-2.1.x
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
- "Needs: Work"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: Remove Labels
|
||||
uses: actions-ecosystem/action-remove-labels@v1
|
||||
with:
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: |
|
||||
|
||||
@@ -17,15 +17,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v5
|
||||
- uses: dessant/lock-threads@v2
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
process-only: 'issues'
|
||||
issue-inactive-days: '60'
|
||||
exclude-issue-created-before: ''
|
||||
exclude-any-issue-labels: 'no-locking'
|
||||
add-issue-labels: ''
|
||||
issue-comment: >
|
||||
issue-lock-inactive-days: '60'
|
||||
issue-exclude-created-before: ''
|
||||
issue-exclude-labels: 'no-locking'
|
||||
issue-lock-labels: ''
|
||||
issue-lock-comment: >
|
||||
This issue has been automatically locked since there
|
||||
has not been any recent activity after it was closed.
|
||||
Please open a new issue for related bugs.
|
||||
|
||||
@@ -152,7 +152,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
@@ -160,13 +160,13 @@ jobs:
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
|
||||
- name: Select Python 3.9
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.9'
|
||||
architecture: 'x64'
|
||||
|
||||
+23
-24
@@ -135,9 +135,9 @@
|
||||
* Options: A4988, A5984, DRV8825, LV8729, TB6560, TB6600, TMC2100,
|
||||
* TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE,
|
||||
* TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE,
|
||||
* TMC2660, TMC2660_STANDALONE, TMC5130, TMC5130_STANDALONE,
|
||||
* TMC5160, TMC5160_STANDALONE
|
||||
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
||||
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
|
||||
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
|
||||
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
||||
*/
|
||||
#define X_DRIVER_TYPE A4988
|
||||
#define Y_DRIVER_TYPE A4988
|
||||
@@ -401,18 +401,9 @@
|
||||
//#define PS_OFF_SOUND // Beep 1s when power off
|
||||
#define PSU_ACTIVE_STATE LOW // Set 'LOW' for ATX, 'HIGH' for X-Box
|
||||
|
||||
//#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80
|
||||
//#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power
|
||||
//#define LED_POWEROFF_TIMEOUT 10000 // (ms) Turn off LEDs after power-off, with this amount of delay
|
||||
|
||||
//#define PSU_OFF_REDUNDANT // Second pin for redundant power control
|
||||
//#define PSU_OFF_REDUNDANT_INVERTED // Redundant pin state is the inverse of PSU_ACTIVE_STATE
|
||||
|
||||
//#define PS_ON1_PIN 6 // Redundant pin required to enable power in combination with PS_ON_PIN
|
||||
|
||||
//#define PS_ON_EDM_PIN 8 // External Device Monitoring pins for external power control relay feedback. Fault on mismatch.
|
||||
//#define PS_ON1_EDM_PIN 9
|
||||
#define PS_EDM_RESPONSE 250 // (ms) Time to allow for relay action
|
||||
//#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80
|
||||
//#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power
|
||||
//#define LED_POWEROFF_TIMEOUT 10000 // (ms) Turn off LEDs after power-off, with this amount of delay
|
||||
|
||||
//#define POWER_OFF_TIMER // Enable M81 D<seconds> to power off after a delay
|
||||
//#define POWER_OFF_WAIT_FOR_COOLDOWN // Enable M81 S to power off only after cooldown
|
||||
@@ -1015,6 +1006,9 @@
|
||||
// Radius around the center where the arm cannot reach
|
||||
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
|
||||
|
||||
#define THETA_HOMING_OFFSET 0 // Calculated from Calibration Guide and M360 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/
|
||||
#define PSI_HOMING_OFFSET 0 // Calculated from Calibration Guide and M364 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/
|
||||
|
||||
#elif ENABLED(MP_SCARA)
|
||||
|
||||
#define SCARA_OFFSET_THETA1 12 // degrees
|
||||
@@ -1033,19 +1027,23 @@
|
||||
#define DEFAULT_SEGMENTS_PER_SECOND 200
|
||||
|
||||
// Length of inner and outer support arms. Measure arm lengths precisely.
|
||||
#define TPARA_LINKAGE_1 120 // (mm)
|
||||
#define TPARA_LINKAGE_2 120 // (mm)
|
||||
#define TPARA_LINKAGE_1 120 // (mm)
|
||||
#define TPARA_LINKAGE_2 120 // (mm)
|
||||
|
||||
// TPARA tower offset (position of Tower relative to bed zero position)
|
||||
// This needs to be reasonably accurate as it defines the printbed position in the TPARA space.
|
||||
#define TPARA_OFFSET_X 0 // (mm)
|
||||
#define TPARA_OFFSET_Y 0 // (mm)
|
||||
#define TPARA_OFFSET_Z 0 // (mm)
|
||||
// SCARA tower offset (position of Tower relative to bed zero position)
|
||||
// This needs to be reasonably accurate as it defines the printbed position in the SCARA space.
|
||||
#define TPARA_OFFSET_X 0 // (mm)
|
||||
#define TPARA_OFFSET_Y 0 // (mm)
|
||||
#define TPARA_OFFSET_Z 0 // (mm)
|
||||
|
||||
#define FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly
|
||||
|
||||
// Radius around the center where the arm cannot reach
|
||||
#define MIDDLE_DEAD_ZONE_R 0 // (mm)
|
||||
|
||||
// Calculated from Calibration Guide and M360 / M114. See https://www.morgan3dp.com/morgan-calibration-guide/
|
||||
#define THETA_HOMING_OFFSET 0
|
||||
#define PSI_HOMING_OFFSET 0
|
||||
#endif
|
||||
|
||||
// @section polar
|
||||
@@ -2636,9 +2634,9 @@
|
||||
#define DISPLAY_CHARSET_HD44780 JAPANESE
|
||||
|
||||
/**
|
||||
* Info Screen Style (0:Classic, 1:Průša, 2:CNC)
|
||||
* Info Screen Style (0:Classic, 1:Průša)
|
||||
*
|
||||
* :[0:'Classic', 1:'Průša', 2:'CNC']
|
||||
* :[0:'Classic', 1:'Průša']
|
||||
*/
|
||||
#define LCD_INFO_SCREEN_STYLE 0
|
||||
|
||||
@@ -3416,6 +3414,7 @@
|
||||
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
|
||||
|
||||
//#define DISABLE_ENCODER // Disable the click encoder, if any
|
||||
//#define TOUCH_IDLE_SLEEP_MINS 5 // (minutes) Display Sleep after a period of inactivity. Set with M255 S.
|
||||
|
||||
#define TOUCH_SCREEN_CALIBRATION
|
||||
|
||||
|
||||
+30
-27
@@ -1204,14 +1204,14 @@
|
||||
//#define INPUT_SHAPING_Y
|
||||
#if ANY(INPUT_SHAPING_X, INPUT_SHAPING_Y)
|
||||
#if ENABLED(INPUT_SHAPING_X)
|
||||
#define SHAPING_FREQ_X 40.0 // (Hz) The default dominant resonant frequency on the X axis.
|
||||
#define SHAPING_ZETA_X 0.15 // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping).
|
||||
#define SHAPING_FREQ_X 40 // (Hz) The default dominant resonant frequency on the X axis.
|
||||
#define SHAPING_ZETA_X 0.15f // Damping ratio of the X axis (range: 0.0 = no damping to 1.0 = critical damping).
|
||||
#endif
|
||||
#if ENABLED(INPUT_SHAPING_Y)
|
||||
#define SHAPING_FREQ_Y 40.0 // (Hz) The default dominant resonant frequency on the Y axis.
|
||||
#define SHAPING_ZETA_Y 0.15 // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping).
|
||||
#define SHAPING_FREQ_Y 40 // (Hz) The default dominant resonant frequency on the Y axis.
|
||||
#define SHAPING_ZETA_Y 0.15f // Damping ratio of the Y axis (range: 0.0 = no damping to 1.0 = critical damping).
|
||||
#endif
|
||||
//#define SHAPING_MIN_FREQ 20.0 // (Hz) By default the minimum of the shaping frequencies. Override to affect SRAM usage.
|
||||
//#define SHAPING_MIN_FREQ 20 // By default the minimum of the shaping frequencies. Override to affect SRAM usage.
|
||||
//#define SHAPING_MAX_STEPRATE 10000 // By default the maximum total step rate of the shaped axes. Override to affect SRAM usage.
|
||||
//#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters.
|
||||
#endif
|
||||
@@ -1270,11 +1270,11 @@
|
||||
* XY Frequency limit
|
||||
* Reduce resonance by limiting the frequency of small zigzag infill moves.
|
||||
* See https://hydraraptor.blogspot.com/2010/12/frequency-limit.html
|
||||
* Use M201 F<freq> S<min%> to change limits at runtime.
|
||||
* Use M201 F<freq> G<min%> to change limits at runtime.
|
||||
*/
|
||||
//#define XY_FREQUENCY_LIMIT 10 // (Hz) Maximum frequency of small zigzag infill moves. Set with M201 F<hertz>.
|
||||
#ifdef XY_FREQUENCY_LIMIT
|
||||
#define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 S<min%>.
|
||||
#define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 G<min%>.
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -1970,6 +1970,17 @@
|
||||
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
|
||||
//#define USE_SMALL_INFOFONT
|
||||
|
||||
/**
|
||||
* Graphical Display Sleep
|
||||
*
|
||||
* The U8G library provides sleep / wake functions for SH1106, SSD1306,
|
||||
* SSD1309, and some other DOGM displays.
|
||||
* Enable this option to save energy and prevent OLED pixel burn-in.
|
||||
* Adds the menu item Configuration > LCD Timeout (m) to set a wait period
|
||||
* from 0 (disabled) to 99 minutes.
|
||||
*/
|
||||
//#define DISPLAY_SLEEP_MINUTES 2 // (minutes) Timeout before turning off the screen. Set with M255 S.
|
||||
|
||||
/**
|
||||
* ST7920-based LCDs can emulate a 16 x 4 character display using
|
||||
* the ST7920 character-generator for very fast screen updates.
|
||||
@@ -2218,20 +2229,13 @@
|
||||
//#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Display Sleep
|
||||
* Enable this option to save energy and prevent OLED pixel burn-in.
|
||||
*/
|
||||
//#define DISPLAY_SLEEP_MINUTES 2 // (minutes) Timeout before turning off the screen
|
||||
|
||||
/**
|
||||
* LCD Backlight Timeout
|
||||
* Requires a display with a controllable backlight
|
||||
*/
|
||||
//
|
||||
// LCD Backlight Timeout
|
||||
// Requires a display with a controllable backlight
|
||||
//
|
||||
//#define LCD_BACKLIGHT_TIMEOUT_MINS 1 // (minutes) Timeout before turning off the backlight
|
||||
|
||||
#if defined(DISPLAY_SLEEP_MINUTES) || defined(LCD_BACKLIGHT_TIMEOUT_MINS)
|
||||
#define EDITABLE_DISPLAY_TIMEOUT // Edit sleep / backlight timeout with M255 S<minutes> and a menu item
|
||||
#define EDITABLE_DISPLAY_TIMEOUT // Edit timeout with M255 S<minutes> and a menu item
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -2953,12 +2957,15 @@
|
||||
* Some boards have simple jumper connections! See your board's documentation.
|
||||
* - These drivers can also be used with Hardware Serial.
|
||||
*
|
||||
* The TMC26XStepper library is required for TMC26X stepper drivers.
|
||||
* https://github.com/MarlinFirmware/TMC26XStepper
|
||||
*
|
||||
* The TMCStepper library is required for other TMC stepper drivers.
|
||||
* https://github.com/teemuatlut/TMCStepper
|
||||
*
|
||||
* @section tmc/config
|
||||
*/
|
||||
#if HAS_TRINAMIC_CONFIG
|
||||
#if HAS_TRINAMIC_CONFIG || HAS_TMC26X
|
||||
|
||||
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
|
||||
|
||||
@@ -2972,7 +2979,7 @@
|
||||
#define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
|
||||
#define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing
|
||||
#define X_MICROSTEPS 16 // 0..256
|
||||
#define X_RSENSE 0.11
|
||||
#define X_RSENSE 0.11 // Multiplied x1000 for TMC26X
|
||||
#define X_CHAIN_POS -1 // -1..0: Not chained. 1: MCU MOSI connected. 2: Next in chain, ...
|
||||
//#define X_INTERPOLATE true // Enable to override 'INTERPOLATE' for the X axis
|
||||
//#define X_HOLD_MULTIPLIER 0.5 // Enable to override 'HOLD_MULTIPLIER' for the X axis
|
||||
@@ -3465,7 +3472,7 @@
|
||||
*/
|
||||
#define TMC_ADV() { }
|
||||
|
||||
#endif // HAS_TRINAMIC_CONFIG
|
||||
#endif // HAS_TRINAMIC_CONFIG || HAS_TMC26X
|
||||
|
||||
// @section i2cbus
|
||||
|
||||
@@ -3558,7 +3565,7 @@
|
||||
* Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
|
||||
* to set spindle speed, spindle direction, and laser power.
|
||||
*
|
||||
* SuperPID is a router/spindle speed controller used in the CNC milling community.
|
||||
* SuperPid is a router/spindle speed controller used in the CNC milling community.
|
||||
* Marlin can be used to turn the spindle on and off. It can also be used to set
|
||||
* the spindle speed from 5,000 to 30,000 RPM.
|
||||
*
|
||||
@@ -4308,7 +4315,6 @@
|
||||
// See class CodeProfiler.
|
||||
//#define MAX7219_DEBUG_MULTISTEPPING 6 // Show multi-stepping 1 to 128 on this LED matrix row.
|
||||
//#define MAX7219_DEBUG_SLOWDOWN 6 // Count (mod 16) how many times SLOWDOWN has reduced print speed.
|
||||
//#define MAX7219_REINIT_ON_POWERUP // Re-initialize MAX7129 when power supply turns on
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -4525,6 +4531,3 @@
|
||||
|
||||
// Report uncleaned reset reason from register r2 instead of MCUSR. Supported by Optiboot on AVR.
|
||||
//#define OPTIBOOT_RESET_REASON
|
||||
|
||||
// Shrink the build for smaller boards by sacrificing some serial feedback
|
||||
//#define MARLIN_SMALL_BUILD
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2024-04-07"
|
||||
//#define STRING_DISTRIBUTION_DATE "2024-01-31"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
|
||||
@@ -40,15 +40,9 @@ void endstopIRQHandler() {
|
||||
CHECK(X_MAX);
|
||||
CHECK(X_MIN);
|
||||
|
||||
CHECK(X2_MAX);
|
||||
CHECK(X2_MIN);
|
||||
|
||||
CHECK(Y_MAX);
|
||||
CHECK(Y_MIN);
|
||||
|
||||
CHECK(Y2_MAX);
|
||||
CHECK(Y2_MIN);
|
||||
|
||||
CHECK(Z_MAX);
|
||||
CHECK(Z_MIN);
|
||||
|
||||
@@ -58,9 +52,6 @@ void endstopIRQHandler() {
|
||||
CHECK(Z3_MAX);
|
||||
CHECK(Z3_MIN);
|
||||
|
||||
CHECK(Z4_MAX);
|
||||
CHECK(Z4_MIN);
|
||||
|
||||
CHECK(Z_MIN_PROBE);
|
||||
|
||||
// Update endstops
|
||||
@@ -78,15 +69,9 @@ void setup_endstop_interrupts() {
|
||||
SETUP(X_MAX);
|
||||
SETUP(X_MIN);
|
||||
|
||||
SETUP(X2_MAX);
|
||||
SETUP(X2_MIN);
|
||||
|
||||
SETUP(Y_MAX);
|
||||
SETUP(Y_MIN);
|
||||
|
||||
SETUP(Y2_MAX);
|
||||
SETUP(Y2_MIN);
|
||||
|
||||
SETUP(Z_MAX);
|
||||
SETUP(Z_MIN);
|
||||
|
||||
@@ -96,9 +81,6 @@ void setup_endstop_interrupts() {
|
||||
SETUP(Z3_MAX);
|
||||
SETUP(Z3_MIN);
|
||||
|
||||
SETUP(Z4_MAX);
|
||||
SETUP(Z4_MIN);
|
||||
|
||||
SETUP(Z_MIN_PROBE);
|
||||
|
||||
#undef SETUP
|
||||
@@ -106,7 +88,7 @@ void setup_endstop_interrupts() {
|
||||
|
||||
// Ensure 1 - 10 IRQs are registered
|
||||
// Disable some endstops if you encounter this error
|
||||
#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_X2_MAX, USE_X2_MIN, USE_Y_MAX, USE_Y_MIN, USE_Y2_MAX, USE_Y2_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z4_MAX, USE_Z4_MIN, USE_Z_MIN_PROBE)
|
||||
#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_Y_MAX, USE_Y_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z_MIN_PROBE)
|
||||
#if ENDSTOPS_INTERRUPTS_COUNT > 10
|
||||
#error "Too many endstop interrupts! HC32F460 only supports 10 endstop interrupts."
|
||||
#elif ENDSTOPS_INTERRUPTS_COUNT == 0
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
void serialEvent2() __attribute__((weak));
|
||||
#endif
|
||||
#ifdef USING_HW_SERIAL3
|
||||
HAL_HardwareSerial HSerial3(USART3);
|
||||
HAL_HardwareSerial Serial3(USART3);
|
||||
void serialEvent3() __attribute__((weak));
|
||||
#endif
|
||||
#ifdef USING_HW_SERIAL4
|
||||
@@ -147,11 +147,11 @@
|
||||
#endif
|
||||
#ifdef USING_HW_SERIAL6
|
||||
#ifdef USART6
|
||||
HAL_HardwareSerial HSerial6(USART6);
|
||||
HAL_HardwareSerial HSerial5(USART6);
|
||||
#else
|
||||
HAL_HardwareSerial HSerial6(UART6);
|
||||
HAL_HardwareSerial HSerial5(UART6);
|
||||
#endif
|
||||
void serialEvent6() __attribute__((weak));
|
||||
void serialEvent5() __attribute__((weak));
|
||||
#endif
|
||||
|
||||
// Constructors ////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -58,9 +58,8 @@
|
||||
* Check for common serial pin conflicts
|
||||
*/
|
||||
#define _CHECK_SERIAL_PIN(N) (( \
|
||||
BTN_EN1 == N || BTN_EN2 == N ||DOGLCD_CS == N || HEATER_BED_PIN == N || FAN0_PIN == N || \
|
||||
SDIO_D2_PIN == N || SDIO_D3_PIN == N || SDIO_CK_PIN == N || SDIO_CMD_PIN == N || \
|
||||
Y_STEP_PIN == N || Y_ENABLE_PIN == N || E0_ENABLE_PIN == N || POWER_LOSS_PIN == N \
|
||||
BTN_EN1 == N || DOGLCD_CS == N || HEATER_BED_PIN == N || FAN0_PIN == N || \
|
||||
SDIO_D2_PIN == N || SDIO_D3_PIN == N || SDIO_CK_PIN == N || SDIO_CMD_PIN == N \
|
||||
))
|
||||
#define CHECK_SERIAL_PIN(T,N) defined(UART##N##_##T##_PIN) && _CHECK_SERIAL_PIN(UART##N##_##T##_PIN)
|
||||
#if SERIAL_IN_USE(1)
|
||||
|
||||
@@ -37,61 +37,50 @@ LCD_CONTROLLER_TypeDef *TFT_FSMC::LCD;
|
||||
|
||||
void TFT_FSMC::init() {
|
||||
uint32_t controllerAddress;
|
||||
FMC_OR_FSMC(NORSRAM_TimingTypeDef) timing, extTiming;
|
||||
FSMC_NORSRAM_TimingTypeDef timing, extTiming;
|
||||
|
||||
uint32_t nsBank = (uint32_t)pinmap_peripheral(digitalPinToPinName(TFT_CS_PIN), pinMap_FSMC_CS);
|
||||
|
||||
// Perform the SRAM1 memory initialization sequence
|
||||
SRAMx.Instance = FMC_OR_FSMC(NORSRAM_DEVICE);
|
||||
SRAMx.Extended = FMC_OR_FSMC(NORSRAM_EXTENDED_DEVICE);
|
||||
|
||||
SRAMx.Instance = FSMC_NORSRAM_DEVICE;
|
||||
SRAMx.Extended = FSMC_NORSRAM_EXTENDED_DEVICE;
|
||||
// SRAMx.Init
|
||||
SRAMx.Init.NSBank = nsBank;
|
||||
SRAMx.Init.DataAddressMux = FMC_OR_FSMC(DATA_ADDRESS_MUX_DISABLE);
|
||||
SRAMx.Init.MemoryType = FMC_OR_FSMC(MEMORY_TYPE_SRAM);
|
||||
#ifdef STM32F446xx
|
||||
SRAMx.Init.MemoryDataWidth = TERN(TFT_INTERFACE_FMC_8BIT, FMC_NORSRAM_MEM_BUS_WIDTH_8, FMC_NORSRAM_MEM_BUS_WIDTH_16);
|
||||
#else
|
||||
SRAMx.Init.MemoryDataWidth = TERN(TFT_INTERFACE_FSMC_8BIT, FSMC_NORSRAM_MEM_BUS_WIDTH_8, FSMC_NORSRAM_MEM_BUS_WIDTH_16);
|
||||
SRAMx.Init.DataAddressMux = FSMC_DATA_ADDRESS_MUX_DISABLE;
|
||||
SRAMx.Init.MemoryType = FSMC_MEMORY_TYPE_SRAM;
|
||||
SRAMx.Init.MemoryDataWidth = TERN(TFT_INTERFACE_FSMC_8BIT, FSMC_NORSRAM_MEM_BUS_WIDTH_8, FSMC_NORSRAM_MEM_BUS_WIDTH_16);
|
||||
SRAMx.Init.BurstAccessMode = FSMC_BURST_ACCESS_MODE_DISABLE;
|
||||
SRAMx.Init.WaitSignalPolarity = FSMC_WAIT_SIGNAL_POLARITY_LOW;
|
||||
SRAMx.Init.WrapMode = FSMC_WRAP_MODE_DISABLE;
|
||||
SRAMx.Init.WaitSignalActive = FSMC_WAIT_TIMING_BEFORE_WS;
|
||||
SRAMx.Init.WriteOperation = FSMC_WRITE_OPERATION_ENABLE;
|
||||
SRAMx.Init.WaitSignal = FSMC_WAIT_SIGNAL_DISABLE;
|
||||
SRAMx.Init.ExtendedMode = FSMC_EXTENDED_MODE_ENABLE;
|
||||
SRAMx.Init.AsynchronousWait = FSMC_ASYNCHRONOUS_WAIT_DISABLE;
|
||||
SRAMx.Init.WriteBurst = FSMC_WRITE_BURST_DISABLE;
|
||||
#ifdef STM32F4xx
|
||||
SRAMx.Init.PageSize = FSMC_PAGE_SIZE_NONE;
|
||||
#endif
|
||||
SRAMx.Init.BurstAccessMode = FMC_OR_FSMC(BURST_ACCESS_MODE_DISABLE);
|
||||
SRAMx.Init.WaitSignalPolarity = FMC_OR_FSMC(WAIT_SIGNAL_POLARITY_LOW);
|
||||
SRAMx.Init.WrapMode = FMC_OR_FSMC(WRAP_MODE_DISABLE);
|
||||
SRAMx.Init.WaitSignalActive = FMC_OR_FSMC(WAIT_TIMING_BEFORE_WS);
|
||||
SRAMx.Init.WriteOperation = FMC_OR_FSMC(WRITE_OPERATION_ENABLE);
|
||||
SRAMx.Init.WaitSignal = FMC_OR_FSMC(WAIT_SIGNAL_DISABLE);
|
||||
SRAMx.Init.ExtendedMode = FMC_OR_FSMC(EXTENDED_MODE_ENABLE);
|
||||
SRAMx.Init.AsynchronousWait = FMC_OR_FSMC(ASYNCHRONOUS_WAIT_DISABLE);
|
||||
SRAMx.Init.WriteBurst = FMC_OR_FSMC(WRITE_BURST_DISABLE);
|
||||
#if defined(STM32F446xx) || defined(STM32F4xx)
|
||||
SRAMx.Init.PageSize = FMC_OR_FSMC(PAGE_SIZE_NONE);
|
||||
#endif
|
||||
|
||||
// Read Timing - relatively slow to ensure ID information is correctly read from TFT controller
|
||||
// Can be decreased from 15-15-24 to 4-4-8 with risk of stability loss
|
||||
timing.AddressSetupTime = 15;
|
||||
timing.AddressHoldTime = 15;
|
||||
timing.DataSetupTime = 24;
|
||||
timing.BusTurnAroundDuration = 0;
|
||||
timing.CLKDivision = 16;
|
||||
timing.DataLatency = 17;
|
||||
timing.AccessMode = FMC_OR_FSMC(ACCESS_MODE_A);
|
||||
|
||||
// Can be decreases from 15-15-24 to 4-4-8 with risk of stability loss
|
||||
timing.AddressSetupTime = 15;
|
||||
timing.AddressHoldTime = 15;
|
||||
timing.DataSetupTime = 24;
|
||||
timing.BusTurnAroundDuration = 0;
|
||||
timing.CLKDivision = 16;
|
||||
timing.DataLatency = 17;
|
||||
timing.AccessMode = FSMC_ACCESS_MODE_A;
|
||||
// Write Timing
|
||||
// Can be decreased from 8-15-8 to 0-0-1 with risk of stability loss
|
||||
extTiming.AddressSetupTime = 8;
|
||||
extTiming.AddressHoldTime = 15;
|
||||
extTiming.DataSetupTime = 8;
|
||||
extTiming.BusTurnAroundDuration = 0;
|
||||
extTiming.CLKDivision = 16;
|
||||
extTiming.DataLatency = 17;
|
||||
extTiming.AccessMode = FMC_OR_FSMC(ACCESS_MODE_A);
|
||||
extTiming.AddressSetupTime = 8;
|
||||
extTiming.AddressHoldTime = 15;
|
||||
extTiming.DataSetupTime = 8;
|
||||
extTiming.BusTurnAroundDuration = 0;
|
||||
extTiming.CLKDivision = 16;
|
||||
extTiming.DataLatency = 17;
|
||||
extTiming.AccessMode = FSMC_ACCESS_MODE_A;
|
||||
|
||||
#ifdef STM32F446xx
|
||||
__HAL_RCC_FMC_CLK_ENABLE();
|
||||
#else
|
||||
__HAL_RCC_FSMC_CLK_ENABLE();
|
||||
#endif
|
||||
__HAL_RCC_FSMC_CLK_ENABLE();
|
||||
|
||||
for (uint16_t i = 0; pinMap_FSMC[i].pin != NC; i++)
|
||||
pinmap_pinout(pinMap_FSMC[i].pin, pinMap_FSMC);
|
||||
@@ -101,9 +90,9 @@ void TFT_FSMC::init() {
|
||||
controllerAddress = FSMC_BANK1_1;
|
||||
#ifdef PF0
|
||||
switch (nsBank) {
|
||||
case FMC_OR_FSMC(NORSRAM_BANK2): controllerAddress = FSMC_BANK1_2; break;
|
||||
case FMC_OR_FSMC(NORSRAM_BANK3): controllerAddress = FSMC_BANK1_3; break;
|
||||
case FMC_OR_FSMC(NORSRAM_BANK4): controllerAddress = FSMC_BANK1_4; break;
|
||||
case FSMC_NORSRAM_BANK2: controllerAddress = FSMC_BANK1_2 ; break;
|
||||
case FSMC_NORSRAM_BANK3: controllerAddress = FSMC_BANK1_3 ; break;
|
||||
case FSMC_NORSRAM_BANK4: controllerAddress = FSMC_BANK1_4 ; break;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -111,44 +100,49 @@ void TFT_FSMC::init() {
|
||||
|
||||
HAL_SRAM_Init(&SRAMx, &timing, &extTiming);
|
||||
|
||||
__HAL_RCC_DMA2_CLK_ENABLE();
|
||||
|
||||
#ifdef STM32F1xx
|
||||
DMAtx.Instance = DMA2_Channel1;
|
||||
__HAL_RCC_DMA1_CLK_ENABLE();
|
||||
DMAtx.Instance = DMA1_Channel1;
|
||||
#elif defined(STM32F4xx)
|
||||
DMAtx.Instance = DMA2_Stream0;
|
||||
DMAtx.Init.Channel = DMA_CHANNEL_0;
|
||||
DMAtx.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
|
||||
DMAtx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
|
||||
DMAtx.Init.MemBurst = DMA_MBURST_SINGLE;
|
||||
DMAtx.Init.PeriphBurst = DMA_PBURST_SINGLE;
|
||||
__HAL_RCC_DMA2_CLK_ENABLE();
|
||||
DMAtx.Instance = DMA2_Stream0;
|
||||
DMAtx.Init.Channel = DMA_CHANNEL_0;
|
||||
DMAtx.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
|
||||
DMAtx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
|
||||
DMAtx.Init.MemBurst = DMA_MBURST_SINGLE;
|
||||
DMAtx.Init.PeriphBurst = DMA_PBURST_SINGLE;
|
||||
#endif
|
||||
|
||||
DMAtx.Init.Direction = DMA_MEMORY_TO_MEMORY;
|
||||
DMAtx.Init.MemInc = DMA_MINC_DISABLE;
|
||||
DMAtx.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD;
|
||||
DMAtx.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;
|
||||
DMAtx.Init.Mode = DMA_NORMAL;
|
||||
DMAtx.Init.Priority = DMA_PRIORITY_HIGH;
|
||||
DMAtx.Init.Direction = DMA_MEMORY_TO_MEMORY;
|
||||
DMAtx.Init.MemInc = DMA_MINC_DISABLE;
|
||||
DMAtx.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD;
|
||||
DMAtx.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;
|
||||
DMAtx.Init.Mode = DMA_NORMAL;
|
||||
DMAtx.Init.Priority = DMA_PRIORITY_HIGH;
|
||||
|
||||
LCD = (LCD_CONTROLLER_TypeDef *)controllerAddress;
|
||||
}
|
||||
|
||||
uint32_t TFT_FSMC::getID() {
|
||||
uint32_t id;
|
||||
writeReg(0);
|
||||
uint32_t id = LCD->RAM;
|
||||
if (id == 0) id = readID(LCD_READ_ID);
|
||||
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) id = readID(LCD_READ_ID4);
|
||||
id = LCD->RAM;
|
||||
|
||||
if (id == 0)
|
||||
id = readID(LCD_READ_ID);
|
||||
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF)
|
||||
id = readID(LCD_READ_ID4);
|
||||
return id;
|
||||
}
|
||||
|
||||
uint32_t TFT_FSMC::readID(tft_data_t inReg) {
|
||||
uint32_t TFT_FSMC::readID(const tft_data_t inReg) {
|
||||
uint32_t id;
|
||||
writeReg(inReg);
|
||||
uint32_t id = LCD->RAM; // dummy read
|
||||
id = LCD->RAM; // dummy read
|
||||
id = inReg << 24;
|
||||
id |= (LCD->RAM & 0x00FF) << 16;
|
||||
id |= (LCD->RAM & 0x00FF) << 8;
|
||||
id |= (LCD->RAM & 0x00FF);
|
||||
id |= LCD->RAM & 0x00FF;
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -161,9 +155,7 @@ bool TFT_FSMC::isBusy() {
|
||||
#define __IS_DMA_CONFIGURED(__HANDLE__) ((__HANDLE__)->Instance->PAR != 0)
|
||||
#endif
|
||||
|
||||
#ifdef __IS_DMA_CONFIGURED
|
||||
if (!__IS_DMA_CONFIGURED(&DMAtx)) return false;
|
||||
#endif
|
||||
if (!__IS_DMA_CONFIGURED(&DMAtx)) return false;
|
||||
|
||||
// Check if DMA transfer error or transfer complete flags are set
|
||||
if ((__HAL_DMA_GET_FLAG(&DMAtx, __HAL_DMA_GET_TE_FLAG_INDEX(&DMAtx)) == 0) && (__HAL_DMA_GET_FLAG(&DMAtx, __HAL_DMA_GET_TC_FLAG_INDEX(&DMAtx)) == 0)) return true;
|
||||
@@ -182,6 +174,8 @@ void TFT_FSMC::transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t cou
|
||||
DMAtx.Init.PeriphInc = memoryIncrease;
|
||||
HAL_DMA_Init(&DMAtx);
|
||||
HAL_DMA_Start(&DMAtx, (uint32_t)data, (uint32_t)&(LCD->RAM), count);
|
||||
|
||||
TERN_(TFT_SHARED_IO, while (isBusy()));
|
||||
}
|
||||
|
||||
void TFT_FSMC::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count) {
|
||||
|
||||
@@ -28,7 +28,11 @@
|
||||
#elif defined(STM32F4xx)
|
||||
#include "stm32f4xx_hal.h"
|
||||
#else
|
||||
#error "FSMC/FMC TFT is currently only supported on STM32F1 and STM32F4 hardware."
|
||||
#error "FSMC TFT is currently only supported on STM32F1 and STM32F4 hardware."
|
||||
#endif
|
||||
|
||||
#ifndef HAL_SRAM_MODULE_ENABLED
|
||||
#error "SRAM module disabled for the STM32 framework (HAL_SRAM_MODULE_ENABLED)! Please consult the development team."
|
||||
#endif
|
||||
|
||||
#ifndef LCD_READ_ID
|
||||
@@ -51,12 +55,6 @@ typedef struct {
|
||||
__IO tft_data_t RAM;
|
||||
} LCD_CONTROLLER_TypeDef;
|
||||
|
||||
#ifdef STM32F446xx
|
||||
#define FMC_OR_FSMC(N) _CAT(FMC_, N)
|
||||
#else
|
||||
#define FMC_OR_FSMC(N) _CAT(FSMC_, N)
|
||||
#endif
|
||||
|
||||
class TFT_FSMC {
|
||||
private:
|
||||
static SRAM_HandleTypeDef SRAMx;
|
||||
@@ -64,7 +62,7 @@ class TFT_FSMC {
|
||||
|
||||
static LCD_CONTROLLER_TypeDef *LCD;
|
||||
|
||||
static uint32_t readID(tft_data_t inReg);
|
||||
static uint32_t readID(const tft_data_t reg);
|
||||
static void transmit(tft_data_t data) { LCD->RAM = data; __DSB(); }
|
||||
static void transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count);
|
||||
static void transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t count);
|
||||
@@ -96,11 +94,7 @@ class TFT_FSMC {
|
||||
#ifdef STM32F1xx
|
||||
#define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)
|
||||
#elif defined(STM32F4xx)
|
||||
#ifdef STM32F446xx
|
||||
#define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_FMC)
|
||||
#else
|
||||
#define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_FSMC)
|
||||
#endif
|
||||
#define FSMC_PIN_DATA STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_FSMC)
|
||||
#define FSMC_BANK1_1 0x60000000U
|
||||
#define FSMC_BANK1_2 0x64000000U
|
||||
#define FSMC_BANK1_3 0x68000000U
|
||||
@@ -110,35 +104,35 @@ class TFT_FSMC {
|
||||
#endif
|
||||
|
||||
const PinMap pinMap_FSMC[] = {
|
||||
{PD_14, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D00
|
||||
{PD_15, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D01
|
||||
{PD_0, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D02
|
||||
{PD_1, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D03
|
||||
{PE_7, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D04
|
||||
{PE_8, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D05
|
||||
{PE_9, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D06
|
||||
{PE_10, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D07
|
||||
{PD_14, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D00
|
||||
{PD_15, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D01
|
||||
{PD_0, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D02
|
||||
{PD_1, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D03
|
||||
{PE_7, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D04
|
||||
{PE_8, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D05
|
||||
{PE_9, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D06
|
||||
{PE_10, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D07
|
||||
#if DISABLED(TFT_INTERFACE_FSMC_8BIT)
|
||||
{PE_11, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D08
|
||||
{PE_12, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D09
|
||||
{PE_13, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D10
|
||||
{PE_14, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D11
|
||||
{PE_15, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D12
|
||||
{PD_8, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D13
|
||||
{PD_9, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D14
|
||||
{PD_10, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_D15
|
||||
{PE_11, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D08
|
||||
{PE_12, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D09
|
||||
{PE_13, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D10
|
||||
{PE_14, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D11
|
||||
{PE_15, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D12
|
||||
{PD_8, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D13
|
||||
{PD_9, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D14
|
||||
{PD_10, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D15
|
||||
#endif
|
||||
{PD_4, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_NOE
|
||||
{PD_5, FMC_OR_FSMC(NORSRAM_DEVICE), FSMC_PIN_DATA}, // FSMC_NWE
|
||||
{PD_4, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_NOE
|
||||
{PD_5, FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_NWE
|
||||
{NC, NP, 0}
|
||||
};
|
||||
|
||||
const PinMap pinMap_FSMC_CS[] = {
|
||||
{PD_7, (void *)FMC_OR_FSMC(NORSRAM_BANK1), FSMC_PIN_DATA}, // FSMC_NE1
|
||||
{PD_7, (void *)FSMC_NORSRAM_BANK1, FSMC_PIN_DATA}, // FSMC_NE1
|
||||
#ifdef PF0
|
||||
{PG_9, (void *)FMC_OR_FSMC(NORSRAM_BANK2), FSMC_PIN_DATA}, // FSMC_NE2
|
||||
{PG_10, (void *)FMC_OR_FSMC(NORSRAM_BANK3), FSMC_PIN_DATA}, // FSMC_NE3
|
||||
{PG_12, (void *)FMC_OR_FSMC(NORSRAM_BANK4), FSMC_PIN_DATA}, // FSMC_NE4
|
||||
{PG_9, (void *)FSMC_NORSRAM_BANK2, FSMC_PIN_DATA}, // FSMC_NE2
|
||||
{PG_10, (void *)FSMC_NORSRAM_BANK3, FSMC_PIN_DATA}, // FSMC_NE3
|
||||
{PG_12, (void *)FSMC_NORSRAM_BANK4, FSMC_PIN_DATA}, // FSMC_NE4
|
||||
#endif
|
||||
{NC, NP, 0}
|
||||
};
|
||||
|
||||
@@ -77,6 +77,8 @@
|
||||
#include "lcd/e3v2/common/encoder.h"
|
||||
#if ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "lcd/e3v2/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "lcd/e3v2/proui/dwin.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
#include "lcd/e3v2/jyersui/dwin.h"
|
||||
#endif
|
||||
@@ -474,16 +476,11 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
|
||||
|
||||
#if HAS_KILL
|
||||
|
||||
// Check if the kill button was pressed and wait to ensure the signal is not noise
|
||||
// typically caused by poor insulation and grounding on LCD cables.
|
||||
// Lower numbers here will increase response time and therefore safety rating.
|
||||
// It is recommended to set this as low as possibe without false triggers.
|
||||
// Check if the kill button was pressed and wait just in case it was an accidental
|
||||
// key kill key press
|
||||
// -------------------------------------------------------------------------------
|
||||
#ifndef KILL_DELAY
|
||||
#define KILL_DELAY 250
|
||||
#endif
|
||||
|
||||
static int killCount = 0; // make the inactivity button a bit less responsive
|
||||
const int KILL_DELAY = 750;
|
||||
if (kill_state())
|
||||
killCount++;
|
||||
else if (killCount > 0)
|
||||
@@ -674,12 +671,6 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
|
||||
|
||||
TERN_(HOTEND_IDLE_TIMEOUT, hotend_idle.check());
|
||||
|
||||
#if ANY(PSU_CONTROL, AUTO_POWER_CONTROL) && PIN_EXISTS(PS_ON_EDM)
|
||||
if ( ELAPSED(ms, powerManager.last_state_change_ms + PS_EDM_RESPONSE)
|
||||
&& (READ(PS_ON_PIN) != READ(PS_ON_EDM_PIN) || TERN0(PSU_OFF_REDUNDANT, extDigitalRead(PS_ON1_PIN) != extDigitalRead(PS_ON1_EDM_PIN)))
|
||||
) kill(GET_TEXT_F(MSG_POWER_EDM_FAULT));
|
||||
#endif
|
||||
|
||||
#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
|
||||
if (thermalManager.degHotend(active_extruder) > (EXTRUDER_RUNOUT_MINTEMP)
|
||||
&& ELAPSED(ms, gcode.previous_move_ms + SEC_TO_MS(EXTRUDER_RUNOUT_SECONDS))
|
||||
@@ -1597,11 +1588,11 @@ void setup() {
|
||||
SERIAL_ECHO_TERNARY(err, "BL24CXX Check ", "failed", "succeeded", "!\n");
|
||||
#endif
|
||||
|
||||
#if ENABLED(DWIN_CREALITY_LCD)
|
||||
#if HAS_DWIN_E3V2_BASIC
|
||||
SETUP_RUN(dwinInitScreen());
|
||||
#endif
|
||||
|
||||
#if HAS_SERVICE_INTERVALS && DISABLED(DWIN_CREALITY_LCD)
|
||||
#if HAS_SERVICE_INTERVALS && !HAS_DWIN_E3V2_BASIC
|
||||
SETUP_RUN(ui.reset_status(true)); // Show service messages or keep current status
|
||||
#endif
|
||||
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
#define BOARD_OPULO_LUMEN_REV4 5242 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
|
||||
#define BOARD_FYSETC_SPIDER_KING407 5243 // FYSETC Spider King407 (STM32F407ZG)
|
||||
#define BOARD_MKS_SKIPR_V1 5244 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
|
||||
#define BOARD_TRONXY_CXY_446_V10 5245 // TRONXY CXY-446-V10-220413/CXY-V6-191121 (STM32F446ZE)
|
||||
#define BOARD_TRONXY_V10 5245 // TRONXY V10 (STM32F446ZE)
|
||||
#define BOARD_CREALITY_F401RE 5246 // Creality CR4NS200141C13 (STM32F401RE) as found in the Ender-5 S1
|
||||
#define BOARD_BLACKPILL_CUSTOM 5247 // Custom board based on STM32F401CDU6.
|
||||
#define BOARD_I3DBEEZ9_V1 5248 // I3DBEEZ9 V1 (STM32F407ZG)
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
#define _TMC2208_STANDALONE 0x2208B
|
||||
#define _TMC2209 0x2209A
|
||||
#define _TMC2209_STANDALONE 0x2209B
|
||||
#define _TMC26X 0x2600A
|
||||
#define _TMC26X_STANDALONE 0x2600B
|
||||
#define _TMC2660 0x2660A
|
||||
#define _TMC2660_STANDALONE 0x2660B
|
||||
#define _TMC5130 0x5130A
|
||||
@@ -105,8 +107,8 @@
|
||||
|
||||
#if ( HAS_DRIVER(TMC2130_STANDALONE) || HAS_DRIVER(TMC2160_STANDALONE) \
|
||||
|| HAS_DRIVER(TMC2208_STANDALONE) || HAS_DRIVER(TMC2209_STANDALONE) \
|
||||
|| HAS_DRIVER(TMC2660_STANDALONE) || HAS_DRIVER(TMC5130_STANDALONE) \
|
||||
|| HAS_DRIVER(TMC5160_STANDALONE) )
|
||||
|| HAS_DRIVER(TMC26X_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE) \
|
||||
|| HAS_DRIVER(TMC5130_STANDALONE) || HAS_DRIVER(TMC5160_STANDALONE) )
|
||||
#define HAS_TRINAMIC_STANDALONE 1
|
||||
#endif
|
||||
|
||||
@@ -123,13 +125,13 @@
|
||||
|| AXIS_DRIVER_TYPE(A,TMC2660) \
|
||||
|| AXIS_DRIVER_TYPE(A,TMC5130) || AXIS_DRIVER_TYPE(A,TMC5160) )
|
||||
|
||||
#define AXIS_IS_TMC_CONFIG AXIS_IS_TMC
|
||||
#define AXIS_IS_TMC_CONFIG(A) ( AXIS_IS_TMC(A) || AXIS_DRIVER_TYPE(A,TMC26X) )
|
||||
|
||||
// Test for a driver that uses SPI - this allows checking whether a _CS_ pin
|
||||
// is considered sensitive
|
||||
#define AXIS_HAS_SPI(A) ( AXIS_DRIVER_TYPE(A,TMC2130) || AXIS_DRIVER_TYPE(A,TMC2160) \
|
||||
|| AXIS_DRIVER_TYPE(A,TMC2660) || AXIS_DRIVER_TYPE(A,TMC5130) \
|
||||
|| AXIS_DRIVER_TYPE(A,TMC5160) )
|
||||
|| AXIS_DRIVER_TYPE(A,TMC26X) || AXIS_DRIVER_TYPE(A,TMC2660) \
|
||||
|| AXIS_DRIVER_TYPE(A,TMC5130) || AXIS_DRIVER_TYPE(A,TMC5160) )
|
||||
|
||||
#define AXIS_HAS_UART(A) ( AXIS_DRIVER_TYPE(A,TMC2208) || AXIS_DRIVER_TYPE(A,TMC2209) )
|
||||
|
||||
@@ -182,8 +184,10 @@
|
||||
#if ANY_AXIS_HAS(SPI)
|
||||
#define HAS_TMC_SPI 1
|
||||
#endif
|
||||
#if HAS_STALLGUARD || HAS_DRIVER(TMC2160_STANDALONE) || HAS_DRIVER(TMC2130_STANDALONE) \
|
||||
|| HAS_DRIVER(TMC2209_STANDALONE) || HAS_DRIVER(TMC2660_STANDALONE) \
|
||||
|| HAS_DRIVER(TMC5130_STANDALONE) || HAS_DRIVER(TMC5160_STANDALONE)
|
||||
#define HAS_DIAG_PINS 1
|
||||
|
||||
//
|
||||
// TMC26XX Stepper Drivers
|
||||
//
|
||||
#if HAS_DRIVER(TMC26X)
|
||||
#define HAS_TMC26X 1
|
||||
#endif
|
||||
|
||||
@@ -449,7 +449,7 @@ struct XYval {
|
||||
// Length reduced to one dimension
|
||||
FI constexpr T magnitude() const { return (T)sqrtf(x*x + y*y); }
|
||||
// Pointer to the data as a simple array
|
||||
explicit FI operator T* () { return pos; }
|
||||
FI operator T* () { return pos; }
|
||||
// If any element is true then it's true
|
||||
FI constexpr operator bool() const { return x || y; }
|
||||
// Smallest element
|
||||
@@ -599,7 +599,7 @@ struct XYZval {
|
||||
// Length reduced to one dimension
|
||||
FI constexpr T magnitude() const { return (T)TERN(HAS_X_AXIS, sqrtf(NUM_AXIS_GANG(x*x, + y*y, + z*z, + i*i, + j*j, + k*k, + u*u, + v*v, + w*w)), 0); }
|
||||
// Pointer to the data as a simple array
|
||||
explicit FI operator T* () { return pos; }
|
||||
FI operator T* () { return pos; }
|
||||
// If any element is true then it's true
|
||||
FI constexpr operator bool() const { return 0 NUM_AXIS_GANG(|| x, || y, || z, || i, || j, || k, || u, || v, || w); }
|
||||
// Smallest element
|
||||
@@ -747,7 +747,7 @@ struct XYZEval {
|
||||
// Length reduced to one dimension
|
||||
FI constexpr T magnitude() const { return (T)sqrtf(LOGICAL_AXIS_GANG(+ e*e, + x*x, + y*y, + z*z, + i*i, + j*j, + k*k, + u*u, + v*v, + w*w)); }
|
||||
// Pointer to the data as a simple array
|
||||
explicit FI operator T* () { return pos; }
|
||||
FI operator T* () { return pos; }
|
||||
// If any element is true then it's true
|
||||
FI constexpr operator bool() const { return 0 LOGICAL_AXIS_GANG(|| e, || x, || y, || z, || i, || j, || k, || u, || v, || w); }
|
||||
// Smallest element
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
*/
|
||||
void mesh_bed_leveling::line_to_destination(const_feedRate_t scaled_fr_mm_s, uint8_t x_splits, uint8_t y_splits) {
|
||||
// Get current and destination cells for this line
|
||||
xy_uint8_t scel = cell_indexes(current_position), ecel = cell_indexes(destination);
|
||||
xy_int8_t scel = cell_indexes(current_position), ecel = cell_indexes(destination);
|
||||
NOMORE(scel.x, GRID_MAX_CELLS_X - 1);
|
||||
NOMORE(scel.y, GRID_MAX_CELLS_Y - 1);
|
||||
NOMORE(ecel.x, GRID_MAX_CELLS_X - 1);
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
float normalized_dist;
|
||||
xyze_pos_t dest;
|
||||
const uint8_t gcx = _MAX(scel.x, ecel.x), gcy = _MAX(scel.y, ecel.y);
|
||||
const int8_t gcx = _MAX(scel.x, ecel.x), gcy = _MAX(scel.y, ecel.y);
|
||||
|
||||
// Crosses on the X and not already split on this X?
|
||||
// The x_splits flags are insurance against rounding errors.
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
static void report_current_mesh();
|
||||
static void report_state();
|
||||
static void save_ubl_active_state_and_disable();
|
||||
static void restore_ubl_active_state(const bool is_done=true);
|
||||
static void restore_ubl_active_state_and_leave();
|
||||
static void display_map(const uint8_t) __O0;
|
||||
static mesh_index_pair find_closest_mesh_point_of_type(const MeshPointType, const xy_pos_t&, const bool=false, MeshFlags *done_flags=nullptr) __O0;
|
||||
static mesh_index_pair find_furthest_invalid_mesh_point() __O0;
|
||||
|
||||
@@ -309,7 +309,7 @@ void unified_bed_leveling::G29() {
|
||||
#if ALL(DWIN_LCD_PROUI, ZHOME_BEFORE_LEVELING)
|
||||
save_ubl_active_state_and_disable();
|
||||
gcode.process_subcommands_now(F("G28Z"));
|
||||
restore_ubl_active_state(false); // ...without telling ExtUI "done"
|
||||
restore_ubl_active_state_and_leave();
|
||||
#else
|
||||
// Send 'N' to force homing before G29 (internal only)
|
||||
if (axes_should_home() || parser.seen_test('N')) gcode.home_all_axes();
|
||||
@@ -425,7 +425,7 @@ void unified_bed_leveling::G29() {
|
||||
if (parser.seen_test('J')) {
|
||||
save_ubl_active_state_and_disable();
|
||||
tilt_mesh_based_on_probed_grid(param.J_grid_size == 0); // Zero size does 3-Point
|
||||
restore_ubl_active_state();
|
||||
restore_ubl_active_state_and_leave();
|
||||
#if ENABLED(UBL_G29_J_RECENTER)
|
||||
do_blocking_move_to_xy(0.5f * ((MESH_MIN_X) + (MESH_MAX_X)), 0.5f * ((MESH_MIN_Y) + (MESH_MAX_Y)));
|
||||
#endif
|
||||
@@ -754,6 +754,7 @@ void unified_bed_leveling::shift_mesh_height() {
|
||||
|
||||
TERN_(HAS_MARLINUI_MENU, ui.capture());
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
|
||||
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());
|
||||
|
||||
save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained
|
||||
grid_count_t count = GRID_MAX_POINTS;
|
||||
@@ -767,6 +768,7 @@ void unified_bed_leveling::shift_mesh_height() {
|
||||
SERIAL_ECHOLNPGM("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, ".");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS)));
|
||||
TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout());
|
||||
TERN_(DWIN_LCD_PROUI, dwinRedrawScreen());
|
||||
|
||||
#if HAS_MARLINUI_MENU
|
||||
if (ui.button_pressed()) {
|
||||
@@ -776,7 +778,8 @@ void unified_bed_leveling::shift_mesh_height() {
|
||||
ui.quick_feedback();
|
||||
ui.release();
|
||||
probe.stow(); // Release UI before stow to allow for PAUSE_BEFORE_DEPLOY_STOW
|
||||
return restore_ubl_active_state();
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
return restore_ubl_active_state_and_leave();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -812,12 +815,15 @@ void unified_bed_leveling::shift_mesh_height() {
|
||||
|
||||
probe.move_z_after_probing();
|
||||
|
||||
restore_ubl_active_state_and_leave();
|
||||
|
||||
do_blocking_move_to_xy(
|
||||
constrain(nearby.x - probe.offset_xy.x, MESH_MIN_X, MESH_MAX_X),
|
||||
constrain(nearby.y - probe.offset_xy.y, MESH_MIN_Y, MESH_MAX_Y)
|
||||
);
|
||||
|
||||
restore_ubl_active_state();
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
TERN_(DWIN_LCD_PROUI, dwinLevelingDone());
|
||||
}
|
||||
|
||||
#endif // HAS_BED_PROBE
|
||||
@@ -926,7 +932,7 @@ void set_message_with_feedback(FSTR_P const fstr) {
|
||||
if (param.V_verbosity > 1)
|
||||
SERIAL_ECHOLNPGM("Business Card is ", p_float_t(thickness, 4), "mm thick.");
|
||||
|
||||
restore_ubl_active_state();
|
||||
restore_ubl_active_state_and_leave();
|
||||
|
||||
return thickness;
|
||||
}
|
||||
@@ -981,7 +987,7 @@ void set_message_with_feedback(FSTR_P const fstr) {
|
||||
if (_click_and_hold([]{
|
||||
SERIAL_ECHOLNPGM("\nMesh only partially populated.");
|
||||
do_z_clearance(Z_CLEARANCE_DEPLOY_PROBE);
|
||||
})) return restore_ubl_active_state();
|
||||
})) return restore_ubl_active_state_and_leave();
|
||||
|
||||
// Store the Z position minus the shim height
|
||||
z_values[lpos.x][lpos.y] = current_position.z - thick;
|
||||
@@ -996,8 +1002,10 @@ void set_message_with_feedback(FSTR_P const fstr) {
|
||||
|
||||
if (do_ubl_mesh_map) display_map(param.T_map_type); // show user where we're probing
|
||||
|
||||
restore_ubl_active_state();
|
||||
restore_ubl_active_state_and_leave();
|
||||
do_blocking_move_to_xy_z(pos, Z_CLEARANCE_DEPLOY_PROBE);
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1103,7 +1111,7 @@ void set_message_with_feedback(FSTR_P const fstr) {
|
||||
} while (lpos.x >= 0 && --param.R_repetition > 0);
|
||||
|
||||
if (do_ubl_mesh_map) display_map(param.T_map_type);
|
||||
restore_ubl_active_state();
|
||||
restore_ubl_active_state_and_leave();
|
||||
|
||||
do_blocking_move_to_xy_z(pos, Z_TWEEN_SAFE_CLEARANCE);
|
||||
|
||||
@@ -1255,20 +1263,17 @@ void unified_bed_leveling::save_ubl_active_state_and_disable() {
|
||||
set_bed_leveling_enabled(false);
|
||||
}
|
||||
|
||||
void unified_bed_leveling::restore_ubl_active_state(const bool is_done/*=true*/) {
|
||||
void unified_bed_leveling::restore_ubl_active_state_and_leave() {
|
||||
TERN_(HAS_MARLINUI_MENU, ui.release());
|
||||
#if ENABLED(UBL_DEVEL_DEBUGGING)
|
||||
if (--ubl_state_recursion_chk) {
|
||||
SERIAL_ECHOLNPGM("restore_ubl_active_state() called too many times.");
|
||||
SERIAL_ECHOLNPGM("restore_ubl_active_state_and_leave() called too many times.");
|
||||
set_message_with_feedback(GET_TEXT_F(MSG_UBL_RESTORE_ERROR));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
set_bed_leveling_enabled(ubl_state_at_invocation);
|
||||
|
||||
if (is_done) {
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
}
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
}
|
||||
|
||||
mesh_index_pair unified_bed_leveling::find_furthest_invalid_mesh_point() {
|
||||
|
||||
@@ -212,8 +212,6 @@ void FWRetract::M207() {
|
||||
}
|
||||
|
||||
void FWRetract::M207_report() {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M207 S"), LINEAR_UNIT(settings.retract_length)
|
||||
, PSTR(" W"), LINEAR_UNIT(settings.swap_retract_length)
|
||||
@@ -239,8 +237,6 @@ void FWRetract::M208() {
|
||||
}
|
||||
|
||||
void FWRetract::M208_report() {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
SERIAL_ECHOLNPGM(
|
||||
" M208 S", LINEAR_UNIT(settings.retract_recover_extra)
|
||||
, " W", LINEAR_UNIT(settings.swap_retract_recover_extra)
|
||||
@@ -262,8 +258,6 @@ void FWRetract::M208_report() {
|
||||
}
|
||||
|
||||
void FWRetract::M209_report() {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
SERIAL_ECHOLNPGM(" M209 S", AS_DIGIT(autoretract_enabled));
|
||||
}
|
||||
|
||||
|
||||
@@ -186,13 +186,13 @@ void HostUI::action(FSTR_P const fstr, const bool eol) {
|
||||
switch (response) {
|
||||
|
||||
case 0: // "Purge More" button
|
||||
#if ENABLED(M600_PURGE_MORE_RESUMABLE)
|
||||
#if ALL(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE)
|
||||
pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; // Simulate menu selection (menu exits, doesn't extrude more)
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 1: // "Continue" / "Disable Runout" button
|
||||
#if ENABLED(M600_PURGE_MORE_RESUMABLE)
|
||||
#if ALL(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE)
|
||||
pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT; // Simulate menu selection
|
||||
#endif
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
|
||||
@@ -32,9 +32,7 @@ typedef struct {
|
||||
timeout = HOTEND_IDLE_TIMEOUT_SEC;
|
||||
trigger = HOTEND_IDLE_MIN_TRIGGER;
|
||||
nozzle_target = HOTEND_IDLE_NOZZLE_TARGET;
|
||||
#if HAS_HEATED_BED
|
||||
bed_target = HOTEND_IDLE_BED_TARGET;
|
||||
#endif
|
||||
bed_target = HOTEND_IDLE_BED_TARGET;
|
||||
}
|
||||
} hotend_idle_settings_t;
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
|
||||
#if HAS_TEMP_HOTEND || HAS_HEATED_BED || HAS_HEATED_CHAMBER
|
||||
static void onHeatingDone() { leds.set_white(); }
|
||||
static void onPIDTuningDone(LEDColor c) { leds.set_color(c); }
|
||||
static void onPidTuningDone(LEDColor c) { leds.set_color(c); }
|
||||
#endif
|
||||
|
||||
#if HAS_MEDIA
|
||||
|
||||
@@ -72,26 +72,6 @@
|
||||
uint16_t CodeProfiler::call_count = 0;
|
||||
#endif
|
||||
|
||||
#if defined(MAX7219_DEBUG_PLANNER_HEAD) && defined(MAX7219_DEBUG_PLANNER_TAIL) && MAX7219_DEBUG_PLANNER_HEAD == MAX7219_DEBUG_PLANNER_TAIL
|
||||
static int16_t last_head_cnt = 0xF, last_tail_cnt = 0xF;
|
||||
#else
|
||||
#ifdef MAX7219_DEBUG_PLANNER_HEAD
|
||||
static int16_t last_head_cnt = 0x1;
|
||||
#endif
|
||||
#ifdef MAX7219_DEBUG_PLANNER_TAIL
|
||||
static int16_t last_tail_cnt = 0x1;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef MAX7219_DEBUG_PLANNER_QUEUE
|
||||
static int16_t last_depth = 0;
|
||||
#endif
|
||||
#ifdef MAX7219_DEBUG_PROFILE
|
||||
static uint8_t last_time_fraction = 0;
|
||||
#endif
|
||||
#ifdef MAX7219_DEBUG_MULTISTEPPING
|
||||
static uint8_t last_multistepping = 0;
|
||||
#endif
|
||||
|
||||
Max7219 max7219;
|
||||
|
||||
uint8_t Max7219::led_line[MAX7219_LINES]; // = { 0 };
|
||||
@@ -570,29 +550,6 @@ void Max7219::init() {
|
||||
#if MAX7219_INIT_TEST
|
||||
start_test_pattern();
|
||||
#endif
|
||||
|
||||
#ifdef MAX7219_REINIT_ON_POWERUP
|
||||
#if defined(MAX7219_DEBUG_PLANNER_HEAD) && defined(MAX7219_DEBUG_PLANNER_TAIL) && MAX7219_DEBUG_PLANNER_HEAD == MAX7219_DEBUG_PLANNER_TAIL
|
||||
last_head_cnt = 0xF;
|
||||
last_tail_cnt = 0xF;
|
||||
#else
|
||||
#ifdef MAX7219_DEBUG_PLANNER_HEAD
|
||||
last_head_cnt = 0x1;
|
||||
#endif
|
||||
#ifdef MAX7219_DEBUG_PLANNER_TAIL
|
||||
last_tail_cnt = 0x1;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef MAX7219_DEBUG_PLANNER_QUEUE
|
||||
last_depth = 0;
|
||||
#endif
|
||||
#ifdef MAX7219_DEBUG_PROFILE
|
||||
last_time_fraction = 0;
|
||||
#endif
|
||||
#ifdef MAX7219_DEBUG_MULTISTEPPING
|
||||
last_multistepping = 0;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -719,6 +676,8 @@ void Max7219::idle_tasks() {
|
||||
|
||||
#if defined(MAX7219_DEBUG_PLANNER_HEAD) && defined(MAX7219_DEBUG_PLANNER_TAIL) && MAX7219_DEBUG_PLANNER_HEAD == MAX7219_DEBUG_PLANNER_TAIL
|
||||
|
||||
static int16_t last_head_cnt = 0xF, last_tail_cnt = 0xF;
|
||||
|
||||
if (last_head_cnt != head || last_tail_cnt != tail) {
|
||||
range16(MAX7219_DEBUG_PLANNER_HEAD, last_tail_cnt, tail, last_head_cnt, head, &row_change_mask);
|
||||
last_head_cnt = head;
|
||||
@@ -728,6 +687,7 @@ void Max7219::idle_tasks() {
|
||||
#else
|
||||
|
||||
#ifdef MAX7219_DEBUG_PLANNER_HEAD
|
||||
static int16_t last_head_cnt = 0x1;
|
||||
if (last_head_cnt != head) {
|
||||
mark16(MAX7219_DEBUG_PLANNER_HEAD, last_head_cnt, head, &row_change_mask);
|
||||
last_head_cnt = head;
|
||||
@@ -735,6 +695,7 @@ void Max7219::idle_tasks() {
|
||||
#endif
|
||||
|
||||
#ifdef MAX7219_DEBUG_PLANNER_TAIL
|
||||
static int16_t last_tail_cnt = 0x1;
|
||||
if (last_tail_cnt != tail) {
|
||||
mark16(MAX7219_DEBUG_PLANNER_TAIL, last_tail_cnt, tail, &row_change_mask);
|
||||
last_tail_cnt = tail;
|
||||
@@ -753,6 +714,7 @@ void Max7219::idle_tasks() {
|
||||
#endif
|
||||
|
||||
#ifdef MAX7219_DEBUG_PROFILE
|
||||
static uint8_t last_time_fraction = 0;
|
||||
const uint8_t current_time_fraction = (uint16_t(CodeProfiler::get_time_fraction()) * MAX7219_NUMBER_UNITS + 8) / 16;
|
||||
if (current_time_fraction != last_time_fraction) {
|
||||
quantity(MAX7219_DEBUG_PROFILE, last_time_fraction, current_time_fraction, &row_change_mask);
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
/**
|
||||
* feature/pause.cpp - Pause feature support functions
|
||||
* This may be combined with related G-codes if features are consolidated.
|
||||
*
|
||||
* Note: Calls to ui.pause_show_message are passed to either ExtUI or MarlinUI.
|
||||
*/
|
||||
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
@@ -62,6 +60,8 @@
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#include "../lcd/marlinui.h"
|
||||
@@ -148,7 +148,7 @@ static bool ensure_safe_temperature(const bool wait=true, const PauseMode mode=P
|
||||
thermalManager.setTargetHotend(thermalManager.extrude_min_temp, active_extruder);
|
||||
#endif
|
||||
|
||||
ui.pause_show_message(PAUSE_MESSAGE_HEATING, mode);
|
||||
ui.pause_show_message(PAUSE_MESSAGE_HEATING, mode); UNUSED(mode);
|
||||
|
||||
if (wait) return thermalManager.wait_for_hotend(active_extruder);
|
||||
|
||||
@@ -288,8 +288,8 @@ 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, EXTENSIBLE_UI)
|
||||
ui.pause_show_message(PAUSE_MESSAGE_OPTION); // MarlinUI and MKS UI also set PAUSE_RESPONSE_WAIT_FOR
|
||||
#if ANY(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;
|
||||
#endif
|
||||
|
||||
@@ -52,14 +52,10 @@ enum PauseMessage : char {
|
||||
PAUSE_MESSAGE_RESUME,
|
||||
PAUSE_MESSAGE_HEAT,
|
||||
PAUSE_MESSAGE_HEATING,
|
||||
PAUSE_MESSAGE_STATUS,
|
||||
PAUSE_MESSAGE_COUNT
|
||||
PAUSE_MESSAGE_STATUS
|
||||
};
|
||||
|
||||
#if M600_PURGE_MORE_RESUMABLE
|
||||
/**
|
||||
* Input methods can Purge More, Resume, or request input
|
||||
*/
|
||||
enum PauseMenuResponse : char {
|
||||
PAUSE_RESPONSE_WAIT_FOR,
|
||||
PAUSE_RESPONSE_EXTRUDE_MORE,
|
||||
|
||||
@@ -34,10 +34,6 @@
|
||||
#include "../module/temperature.h"
|
||||
#include "../MarlinCore.h"
|
||||
|
||||
#if ENABLED(MAX7219_REINIT_ON_POWERUP)
|
||||
#include "max7219.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(PS_OFF_SOUND)
|
||||
#include "../libs/buzzer.h"
|
||||
#endif
|
||||
@@ -64,10 +60,6 @@ bool Power::psu_on;
|
||||
millis_t Power::lastPowerOn;
|
||||
#endif
|
||||
|
||||
#if PSU_TRACK_STATE_MS
|
||||
millis_t Power::last_state_change_ms = 0;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initialize pins & state for the power manager.
|
||||
*
|
||||
@@ -95,18 +87,9 @@ void Power::power_on() {
|
||||
#endif
|
||||
|
||||
OUT_WRITE(PS_ON_PIN, PSU_ACTIVE_STATE);
|
||||
#if ENABLED(PSU_OFF_REDUNDANT)
|
||||
OUT_WRITE(PS_ON1_PIN, TERN_(PSU_OFF_REDUNDANT_INVERTED, !)PSU_ACTIVE_STATE);
|
||||
#endif
|
||||
TERN_(PSU_TRACK_STATE_MS, last_state_change_ms = millis());
|
||||
|
||||
psu_on = true;
|
||||
safe_delay(PSU_POWERUP_DELAY);
|
||||
|
||||
restore_stepper_drivers();
|
||||
|
||||
TERN_(MAX7219_REINIT_ON_POWERUP, max7219.init());
|
||||
|
||||
TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY));
|
||||
|
||||
#ifdef PSU_POWERUP_GCODE
|
||||
@@ -134,11 +117,6 @@ void Power::power_off() {
|
||||
#endif
|
||||
|
||||
OUT_WRITE(PS_ON_PIN, !PSU_ACTIVE_STATE);
|
||||
#if ENABLED(PSU_OFF_REDUNDANT)
|
||||
OUT_WRITE(PS_ON1_PIN, IF_DISABLED(PSU_OFF_REDUNDANT_INVERTED, !)PSU_ACTIVE_STATE);
|
||||
#endif
|
||||
TERN_(PSU_TRACK_STATE_MS, last_state_change_ms = millis());
|
||||
|
||||
psu_on = false;
|
||||
|
||||
#if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN)
|
||||
|
||||
@@ -24,11 +24,8 @@
|
||||
/**
|
||||
* power.h - power control
|
||||
*/
|
||||
#if PIN_EXISTS(PS_ON_EDM) || (PIN_EXISTS(PS_ON1_EDM) && ENABLED(PSU_OFF_REDUNDANT))
|
||||
#define PSU_TRACK_STATE_MS 1
|
||||
#endif
|
||||
|
||||
#if ANY(AUTO_POWER_CONTROL, POWER_OFF_TIMER, PSU_TRACK_STATE_MS)
|
||||
#if ANY(AUTO_POWER_CONTROL, POWER_OFF_TIMER)
|
||||
#include "../core/millis_t.h"
|
||||
#endif
|
||||
|
||||
@@ -40,10 +37,6 @@ class Power {
|
||||
static void power_on();
|
||||
static void power_off();
|
||||
|
||||
#if PSU_TRACK_STATE_MS
|
||||
static millis_t last_state_change_ms;
|
||||
#endif
|
||||
|
||||
#if ANY(POWER_OFF_TIMER, POWER_OFF_WAIT_FOR_COOLDOWN)
|
||||
#if ENABLED(POWER_OFF_TIMER)
|
||||
static millis_t power_off_time;
|
||||
|
||||
@@ -48,8 +48,8 @@ uint8_t PrintJobRecovery::queue_index_r;
|
||||
uint32_t PrintJobRecovery::cmd_sdpos, // = 0
|
||||
PrintJobRecovery::sdpos[BUFSIZE];
|
||||
|
||||
#if HAS_PLR_UI_FLAG
|
||||
bool PrintJobRecovery::ui_flag_resume; // = false
|
||||
#if HAS_DWIN_E3V2_BASIC
|
||||
bool PrintJobRecovery::dwin_flag; // = false
|
||||
#endif
|
||||
|
||||
#include "../sd/cardreader.h"
|
||||
|
||||
@@ -151,8 +151,8 @@ class PrintJobRecovery {
|
||||
static uint32_t cmd_sdpos, //!< SD position of the next command
|
||||
sdpos[BUFSIZE]; //!< SD positions of queued commands
|
||||
|
||||
#if HAS_PLR_UI_FLAG
|
||||
static bool ui_flag_resume; //!< Flag the UI to show a dialog to Resume (M1000) or Cancel (M1000C)
|
||||
#if HAS_DWIN_E3V2_BASIC
|
||||
static bool dwin_flag;
|
||||
#endif
|
||||
|
||||
static void init();
|
||||
|
||||
@@ -68,6 +68,8 @@ bool FilamentMonitorBase::enabled = true,
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
void event_filament_runout(const uint8_t extruder) {
|
||||
@@ -86,6 +88,7 @@ void event_filament_runout(const uint8_t extruder) {
|
||||
#endif
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onFilamentRunout(ExtUI::getTool(extruder)));
|
||||
TERN_(DWIN_LCD_PROUI, dwinFilamentRunout(extruder));
|
||||
|
||||
#if ANY(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS, MULTI_FILAMENT_SENSOR)
|
||||
const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, extruder);
|
||||
|
||||
@@ -763,7 +763,7 @@
|
||||
SERIAL_CHAR('\t');
|
||||
st.printLabel();
|
||||
SERIAL_CHAR('\t');
|
||||
print_hex_long(drv_status, ':', true);
|
||||
print_hex_long(drv_status, ':');
|
||||
if (drv_status == 0xFFFFFFFF || drv_status == 0) SERIAL_ECHOPGM("\t Bad response!");
|
||||
SERIAL_EOL();
|
||||
break;
|
||||
|
||||
@@ -144,13 +144,15 @@ class TMCMarlin : public TMC, public TMCStorage<AXIS_LETTER, DRIVER_ID> {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
void refresh_hybrid_thrs() { set_pwm_thrs(this->stored.hybrid_thrs); }
|
||||
#endif
|
||||
#if USE_SENSORLESS
|
||||
void refresh_homing_thrs() { homing_threshold(this->stored.homing_thrs); }
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
void refresh_hybrid_thrs() { set_pwm_thrs(this->stored.hybrid_thrs); }
|
||||
#endif
|
||||
#if USE_SENSORLESS
|
||||
void refresh_homing_thrs() { homing_threshold(this->stored.homing_thrs); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static constexpr int8_t sgt_min = -64,
|
||||
@@ -205,10 +207,12 @@ class TMCMarlin<TMC2208Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC220
|
||||
}
|
||||
#endif
|
||||
|
||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
void refresh_hybrid_thrs() { set_pwm_thrs(this->stored.hybrid_thrs); }
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
void refresh_hybrid_thrs() { set_pwm_thrs(this->stored.hybrid_thrs); }
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -265,13 +269,15 @@ class TMCMarlin<TMC2209Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC220
|
||||
}
|
||||
#endif
|
||||
|
||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
void refresh_hybrid_thrs() { set_pwm_thrs(this->stored.hybrid_thrs); }
|
||||
#endif
|
||||
#if USE_SENSORLESS
|
||||
void refresh_homing_thrs() { homing_threshold(this->stored.homing_thrs); }
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
void refresh_hybrid_thrs() { set_pwm_thrs(this->stored.hybrid_thrs); }
|
||||
#endif
|
||||
#if USE_SENSORLESS
|
||||
void refresh_homing_thrs() { homing_threshold(this->stored.homing_thrs); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static constexpr uint8_t sgt_min = 0,
|
||||
@@ -309,10 +315,12 @@ class TMCMarlin<TMC2660Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC266
|
||||
}
|
||||
#endif
|
||||
|
||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||
|
||||
#if USE_SENSORLESS
|
||||
void refresh_homing_thrs() { homing_threshold(this->stored.homing_thrs); }
|
||||
#if USE_SENSORLESS
|
||||
void refresh_homing_thrs() { homing_threshold(this->stored.homing_thrs); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static constexpr int8_t sgt_min = -64,
|
||||
|
||||
@@ -532,7 +532,7 @@ void GcodeSuite::G26() {
|
||||
|
||||
if (bedtemp) {
|
||||
if (!WITHIN(bedtemp, 40, BED_MAX_TARGET)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C)."));
|
||||
SERIAL_ECHOLNPGM("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C).");
|
||||
return;
|
||||
}
|
||||
g26.bed_temp = bedtemp;
|
||||
@@ -543,7 +543,7 @@ void GcodeSuite::G26() {
|
||||
if (parser.seenval('L')) {
|
||||
g26.layer_height = parser.value_linear_units();
|
||||
if (!WITHIN(g26.layer_height, 0.0, 2.0)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified layer height not plausible."));
|
||||
SERIAL_ECHOLNPGM("?Specified layer height not plausible.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -552,12 +552,12 @@ void GcodeSuite::G26() {
|
||||
if (parser.has_value()) {
|
||||
g26.retraction_multiplier = parser.value_float();
|
||||
if (!WITHIN(g26.retraction_multiplier, 0.05, 15.0)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified Retraction Multiplier not plausible."));
|
||||
SERIAL_ECHOLNPGM("?Specified Retraction Multiplier not plausible.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Retraction Multiplier must be specified."));
|
||||
SERIAL_ECHOLNPGM("?Retraction Multiplier must be specified.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -565,7 +565,7 @@ void GcodeSuite::G26() {
|
||||
if (parser.seenval('S')) {
|
||||
g26.nozzle = parser.value_float();
|
||||
if (!WITHIN(g26.nozzle, 0.1, 2.0)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified nozzle size not plausible."));
|
||||
SERIAL_ECHOLNPGM("?Specified nozzle size not plausible.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -575,7 +575,7 @@ void GcodeSuite::G26() {
|
||||
#if HAS_MARLINUI_MENU
|
||||
g26.prime_flag = -1;
|
||||
#else
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Prime length must be specified when not using an LCD."));
|
||||
SERIAL_ECHOLNPGM("?Prime length must be specified when not using an LCD.");
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
@@ -583,7 +583,7 @@ void GcodeSuite::G26() {
|
||||
g26.prime_flag++;
|
||||
g26.prime_length = parser.value_linear_units();
|
||||
if (!WITHIN(g26.prime_length, 0.0, 25.0)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified prime length not plausible."));
|
||||
SERIAL_ECHOLNPGM("?Specified prime length not plausible.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -592,7 +592,7 @@ void GcodeSuite::G26() {
|
||||
if (parser.seenval('F')) {
|
||||
g26.filament_diameter = parser.value_linear_units();
|
||||
if (!WITHIN(g26.filament_diameter, 1.0, 4.0)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified filament size not plausible."));
|
||||
SERIAL_ECHOLNPGM("?Specified filament size not plausible.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -616,7 +616,7 @@ void GcodeSuite::G26() {
|
||||
// If any preset or temperature was specified
|
||||
if (noztemp) {
|
||||
if (!WITHIN(noztemp, 165, thermalManager.hotend_max_target(active_extruder))) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified nozzle temperature not plausible."));
|
||||
SERIAL_ECHOLNPGM("?Specified nozzle temperature not plausible.");
|
||||
return;
|
||||
}
|
||||
g26.hotend_temp = noztemp;
|
||||
@@ -637,12 +637,12 @@ void GcodeSuite::G26() {
|
||||
if (parser.seen('R'))
|
||||
g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1;
|
||||
else {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(R)epeat must be specified when not using an LCD."));
|
||||
SERIAL_ECHOLNPGM("?(R)epeat must be specified when not using an LCD.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (g26_repeats < 1) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(R)epeat value not plausible; must be at least 1."));
|
||||
SERIAL_ECHOLNPGM("?(R)epeat value not plausible; must be at least 1.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -650,7 +650,7 @@ void GcodeSuite::G26() {
|
||||
g26.xy_pos.set(parser.seenval('X') ? RAW_X_POSITION(parser.value_linear_units()) : current_position.x,
|
||||
parser.seenval('Y') ? RAW_Y_POSITION(parser.value_linear_units()) : current_position.y);
|
||||
if (!position_is_reachable(g26.xy_pos)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Specified X,Y coordinate out of bounds."));
|
||||
SERIAL_ECHOLNPGM("?Specified X,Y coordinate out of bounds.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ void GcodeSuite::G35() {
|
||||
|
||||
const uint8_t screw_thread = parser.byteval('S', TRAMMING_SCREW_THREAD);
|
||||
if (!WITHIN(screw_thread, 30, 51) || screw_thread % 10 > 1) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(S)crew thread must be 30, 31, 40, 41, 50, or 51."));
|
||||
SERIAL_ECHOLNPGM("?(S)crew thread must be 30, 31, 40, 41, 50, or 51.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -95,11 +95,9 @@ void GcodeSuite::G35() {
|
||||
for (uint8_t i = 0; i < G35_PROBE_COUNT; ++i) {
|
||||
const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE);
|
||||
if (isnan(z_probed_height)) {
|
||||
SERIAL_ECHOLN(
|
||||
F("G35 failed at point "), i + 1,
|
||||
F(" ("), FPSTR(pgm_read_ptr(&tramming_point_name[i])), C(')'),
|
||||
FPSTR(SP_X_STR), tramming_points[i].x,
|
||||
FPSTR(SP_Y_STR), tramming_points[i].y
|
||||
SERIAL_ECHO(
|
||||
F("G35 failed at point "), i + 1, F(" ("), FPSTR(pgm_read_ptr(&tramming_point_name[i])), C(')'),
|
||||
FPSTR(SP_X_STR), tramming_points[i].x, FPSTR(SP_Y_STR), tramming_points[i].y
|
||||
);
|
||||
err_break = true;
|
||||
break;
|
||||
|
||||
@@ -105,12 +105,13 @@ void GcodeSuite::M420() {
|
||||
const int16_t a = settings.calc_num_meshes();
|
||||
|
||||
if (!a) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("EEPROM storage not available."));
|
||||
SERIAL_ECHOLNPGM("?EEPROM storage not available.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!WITHIN(storage_slot, 0, a - 1)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Invalid storage slot. Use 0 to ", a - 1));
|
||||
SERIAL_ECHOLNPGM("?Invalid storage slot.");
|
||||
SERIAL_ECHOLNPGM("?Use 0 to ", a - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -119,7 +120,7 @@ void GcodeSuite::M420() {
|
||||
|
||||
#else
|
||||
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("EEPROM storage not available."));
|
||||
SERIAL_ECHOLNPGM("?EEPROM storage not available.");
|
||||
return;
|
||||
|
||||
#endif
|
||||
@@ -244,8 +245,6 @@ void GcodeSuite::M420() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M420_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(
|
||||
TERN(MESH_BED_LEVELING, "Mesh Bed Leveling", TERN(AUTO_BED_LEVELING_UBL, "Unified Bed Leveling", "Auto Bed Leveling"))
|
||||
));
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
#include "../../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "../../../lcd/e3v2/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
@@ -75,7 +77,7 @@ static void pre_g29_return(const bool retry, const bool did) {
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE, false));
|
||||
}
|
||||
if (did) {
|
||||
TERN_(DWIN_CREALITY_LCD, dwinLevelingDone());
|
||||
TERN_(HAS_DWIN_E3V2_BASIC, dwinLevelingDone());
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
}
|
||||
}
|
||||
@@ -342,7 +344,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
|
||||
abl.verbose_level = parser.intval('V');
|
||||
if (!WITHIN(abl.verbose_level, 0, 4)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(V)erbose level implausible (0-4)."));
|
||||
SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4).");
|
||||
G29_RETURN(false, false);
|
||||
}
|
||||
|
||||
@@ -363,11 +365,11 @@ G29_TYPE GcodeSuite::G29() {
|
||||
if (parser.seenval('P')) abl.grid_points.x = abl.grid_points.y = parser.value_int();
|
||||
|
||||
if (!WITHIN(abl.grid_points.x, 2, GRID_MAX_POINTS_X)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Probe points (X) implausible (2-" STRINGIFY(GRID_MAX_POINTS_X) ")."));
|
||||
SERIAL_ECHOLNPGM("?Probe points (X) implausible (2-" STRINGIFY(GRID_MAX_POINTS_X) ").");
|
||||
G29_RETURN(false, false);
|
||||
}
|
||||
if (!WITHIN(abl.grid_points.y, 2, GRID_MAX_POINTS_Y)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Probe points (Y) implausible (2-" STRINGIFY(GRID_MAX_POINTS_Y) ")."));
|
||||
SERIAL_ECHOLNPGM("?Probe points (Y) implausible (2-" STRINGIFY(GRID_MAX_POINTS_Y) ").");
|
||||
G29_RETURN(false, false);
|
||||
}
|
||||
|
||||
@@ -402,7 +404,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
DEBUG_ECHOLNPGM("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x,
|
||||
" F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y);
|
||||
}
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG(" (L,R,F,B) out of bounds."));
|
||||
SERIAL_ECHOLNPGM("? (L,R,F,B) out of bounds.");
|
||||
G29_RETURN(false, false);
|
||||
}
|
||||
|
||||
@@ -423,6 +425,8 @@ G29_TYPE GcodeSuite::G29() {
|
||||
#if ENABLED(AUTO_BED_LEVELING_3POINT)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
|
||||
points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points
|
||||
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());
|
||||
#endif
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
|
||||
@@ -432,7 +436,11 @@ G29_TYPE GcodeSuite::G29() {
|
||||
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP,
|
||||
TERN(EXTENSIBLE_UI, ExtUI::getLevelingBedTemp(), LEVELING_BED_TEMP)
|
||||
#if ALL(DWIN_LCD_PROUI, HAS_HEATED_BED)
|
||||
hmiData.bedLevT
|
||||
#else
|
||||
LEVELING_BED_TEMP
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
@@ -142,6 +144,7 @@ void GcodeSuite::G29() {
|
||||
queue.inject(F("G29S2"));
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
|
||||
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -167,6 +170,7 @@ void GcodeSuite::G29() {
|
||||
// Save Z for the previous mesh position
|
||||
bedlevel.set_zigzag_z(mbl_probe_index - 1, current_position.z);
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, current_position.z));
|
||||
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(_MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS), current_position.z));
|
||||
SET_SOFT_ENDSTOP_LOOSE(false);
|
||||
}
|
||||
// If there's another point to sample, move there with optional lift.
|
||||
@@ -233,6 +237,7 @@ void GcodeSuite::G29() {
|
||||
if (parser.seenval('Z')) {
|
||||
bedlevel.z_values[ix][iy] = parser.value_linear_units();
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, bedlevel.z_values[ix][iy]));
|
||||
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(ix, iy, bedlevel.z_values[ix][iy]));
|
||||
}
|
||||
else
|
||||
return echo_not_entered('Z');
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -67,6 +69,7 @@ void GcodeSuite::M421() {
|
||||
float &zval = bedlevel.z_values[ij.x][ij.y]; // Altering this Mesh Point
|
||||
zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0); // N=NAN, Z=NEWVAL, or Q=ADDVAL
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ij.x, ij.y, zval)); // Ping ExtUI in case it's showing the mesh
|
||||
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(ij.x, ij.y, zval));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "../../lcd/e3v2/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(LASER_FEATURE)
|
||||
@@ -221,7 +223,7 @@ void GcodeSuite::G28() {
|
||||
set_and_report_grblstate(M_HOMING);
|
||||
#endif
|
||||
|
||||
TERN_(DWIN_CREALITY_LCD, dwinHomingStart());
|
||||
TERN_(HAS_DWIN_E3V2_BASIC, dwinHomingStart());
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart());
|
||||
|
||||
planner.synchronize(); // Wait for planner moves to finish!
|
||||
@@ -650,7 +652,7 @@ void GcodeSuite::G28() {
|
||||
|
||||
ui.refresh();
|
||||
|
||||
TERN_(DWIN_CREALITY_LCD, dwinHomingDone());
|
||||
TERN_(HAS_DWIN_E3V2_BASIC, dwinHomingDone());
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onHomingDone());
|
||||
|
||||
report_current_position();
|
||||
|
||||
@@ -390,7 +390,7 @@ void GcodeSuite::G33() {
|
||||
|
||||
const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS);
|
||||
if (!WITHIN(probe_points, 0, 10)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(P)oints implausible (0-10)."));
|
||||
SERIAL_ECHOLNPGM("?(P)oints implausible (0-10).");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -409,19 +409,19 @@ void GcodeSuite::G33() {
|
||||
|
||||
const float calibration_precision = parser.floatval('C', 0.0f);
|
||||
if (calibration_precision < 0) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(C)alibration precision implausible (>=0)."));
|
||||
SERIAL_ECHOLNPGM("?(C)alibration precision implausible (>=0).");
|
||||
return;
|
||||
}
|
||||
|
||||
const int8_t force_iterations = parser.intval('F', 0);
|
||||
if (!WITHIN(force_iterations, 0, 30)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(F)orce iteration implausible (0-30)."));
|
||||
SERIAL_ECHOLNPGM("?(F)orce iteration implausible (0-30).");
|
||||
return;
|
||||
}
|
||||
|
||||
const int8_t verbose_level = parser.byteval('V', 1);
|
||||
if (!WITHIN(verbose_level, 0, 3)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(V)erbose level implausible (0-3)."));
|
||||
SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-3).");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,19 +110,19 @@ void GcodeSuite::G34() {
|
||||
|
||||
const int8_t z_auto_align_iterations = parser.intval('I', Z_STEPPER_ALIGN_ITERATIONS);
|
||||
if (!WITHIN(z_auto_align_iterations, 1, 30)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(I)teration out of bounds (1-30)."));
|
||||
SERIAL_ECHOLNPGM("?(I)teration out of bounds (1-30).");
|
||||
break;
|
||||
}
|
||||
|
||||
const float z_auto_align_accuracy = parser.floatval('T', Z_STEPPER_ALIGN_ACC);
|
||||
if (!WITHIN(z_auto_align_accuracy, 0.001f, 1.0f)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(T)arget accuracy out of bounds (0.001-1.0)."));
|
||||
if (!WITHIN(z_auto_align_accuracy, 0.01f, 1.0f)) {
|
||||
SERIAL_ECHOLNPGM("?(T)arget accuracy out of bounds (0.01-1.0).");
|
||||
break;
|
||||
}
|
||||
|
||||
const float z_auto_align_amplification = TERN(HAS_Z_STEPPER_ALIGN_STEPPER_XY, Z_STEPPER_ALIGN_AMP, parser.floatval('A', Z_STEPPER_ALIGN_AMP));
|
||||
if (!WITHIN(ABS(z_auto_align_amplification), 0.5f, 2.0f)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(A)mplification out of bounds (0.5-2.0)."));
|
||||
SERIAL_ECHOLNPGM("?(A)mplification out of bounds (0.5-2.0).");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ void GcodeSuite::M422() {
|
||||
const bool is_probe_point = parser.seen_test('S');
|
||||
|
||||
if (TERN0(HAS_Z_STEPPER_ALIGN_STEPPER_XY, is_probe_point && parser.seen_test('W'))) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(S) and (W) may not be combined."));
|
||||
SERIAL_ECHOLNPGM("?(S) and (W) may not be combined.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ void GcodeSuite::M422() {
|
||||
);
|
||||
|
||||
if (!is_probe_point && TERN1(HAS_Z_STEPPER_ALIGN_STEPPER_XY, !parser.seen_test('W'))) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(S)" TERN_(HAS_Z_STEPPER_ALIGN_STEPPER_XY, " or (W)") " is required."));
|
||||
SERIAL_ECHOLNPGM("?(S)" TERN_(HAS_Z_STEPPER_ALIGN_STEPPER_XY, " or (W)") " is required.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -490,11 +490,11 @@ void GcodeSuite::M422() {
|
||||
|
||||
if (is_probe_point) {
|
||||
if (!probe.can_reach(pos.x, Y_CENTER)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(X) out of bounds."));
|
||||
SERIAL_ECHOLNPGM("?(X) out of bounds.");
|
||||
return;
|
||||
}
|
||||
if (!probe.can_reach(pos)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(Y) out of bounds."));
|
||||
SERIAL_ECHOLNPGM("?(Y) out of bounds.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -503,8 +503,6 @@ void GcodeSuite::M422() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading(forReplay, F(STR_Z_AUTO_ALIGN));
|
||||
for (uint8_t i = 0; i < NUM_Z_STEPPERS; ++i) {
|
||||
report_echo_start(forReplay);
|
||||
|
||||
@@ -106,8 +106,6 @@ void GcodeSuite::M425() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M425_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_BACKLASH_COMPENSATION));
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M425 F"), backlash.get_correction()
|
||||
|
||||
@@ -62,13 +62,13 @@ void GcodeSuite::M48() {
|
||||
|
||||
const int8_t verbose_level = parser.byteval('V', 1);
|
||||
if (!WITHIN(verbose_level, 0, 4)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(V)erbose level implausible (0-4)."));
|
||||
SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4).");
|
||||
return;
|
||||
}
|
||||
|
||||
const int8_t n_samples = parser.byteval('P', 10);
|
||||
if (!WITHIN(n_samples, 4, 50)) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Sample size not plausible (4-50)."));
|
||||
SERIAL_ECHOLNPGM("?Sample size not plausible (4-50).");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ void GcodeSuite::M48() {
|
||||
|
||||
if (!probe.can_reach(test_position)) {
|
||||
LCD_MESSAGE_MAX(MSG_M48_OUT_OF_BOUNDS);
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG(" (X,Y) out of bounds."));
|
||||
SERIAL_ECHOLNPGM("? (X,Y) out of bounds.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ void GcodeSuite::M48() {
|
||||
bool seen_L = parser.seen('L');
|
||||
uint8_t n_legs = seen_L ? parser.value_byte() : 0;
|
||||
if (n_legs > 15) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Legs of movement implausible (0-15)."));
|
||||
SERIAL_ECHOLNPGM("?Legs of movement implausible (0-15).");
|
||||
return;
|
||||
}
|
||||
if (n_legs == 1) n_legs = 2;
|
||||
|
||||
@@ -62,8 +62,6 @@
|
||||
}
|
||||
|
||||
void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_DELTA_SETTINGS));
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M665 L"), LINEAR_UNIT(delta_diagonal_rod)
|
||||
@@ -134,8 +132,6 @@
|
||||
}
|
||||
|
||||
void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_SCARA_SETTINGS " (" STR_S_SEG_PER_SEC TERN_(HAS_SCARA_OFFSET, " " STR_SCARA_P_T_Z) ")"));
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M665 S"), segments_per_second
|
||||
@@ -174,8 +170,6 @@
|
||||
}
|
||||
|
||||
void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_POLARGRAPH_SETTINGS));
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M665 S"), LINEAR_UNIT(segments_per_second),
|
||||
@@ -202,11 +196,10 @@
|
||||
}
|
||||
|
||||
void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
report_heading_etc(forReplay, F(STR_POLAR_SETTINGS));
|
||||
SERIAL_ECHOLNPGM_P(PSTR(" M665 S"), segments_per_second);
|
||||
}
|
||||
|
||||
#endif // POLAR
|
||||
#endif
|
||||
|
||||
#endif // IS_KINEMATIC
|
||||
|
||||
@@ -56,13 +56,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_err) SERIAL_ECHOLNPGM(GCODE_ERR_MSG("M666 offsets must be <= 0"));
|
||||
if (is_err) SERIAL_ECHOLNPGM("?M666 offsets must be <= 0");
|
||||
if (!is_set) M666_report();
|
||||
}
|
||||
|
||||
void GcodeSuite::M666_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_ENDSTOP_ADJUSTMENT));
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a)
|
||||
@@ -107,8 +105,6 @@
|
||||
}
|
||||
|
||||
void GcodeSuite::M666_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_ENDSTOP_ADJUSTMENT));
|
||||
SERIAL_ECHOPGM(" M666");
|
||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||
|
||||
@@ -92,8 +92,6 @@ void GcodeSuite::M852() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M852_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_SKEW_FACTOR));
|
||||
SERIAL_ECHOPGM(" M852 I", p_float_t(planner.skew_factor.xy, 6));
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
if (WITHIN(lval, 0, VOLUMETRIC_EXTRUDER_LIMIT_MAX))
|
||||
planner.set_volumetric_extruder_limit(target_extruder, lval);
|
||||
else
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("L value out of range (0-" STRINGIFY(VOLUMETRIC_EXTRUDER_LIMIT_MAX) ")."));
|
||||
SERIAL_ECHOLNPGM("?L value out of range (0-" STRINGIFY(VOLUMETRIC_EXTRUDER_LIMIT_MAX) ").");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -75,8 +75,6 @@
|
||||
}
|
||||
|
||||
void GcodeSuite::M200_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
if (!forReplay) {
|
||||
report_heading(forReplay, F(STR_FILAMENT_SETTINGS), false);
|
||||
if (!parser.volumetric_enabled) SERIAL_ECHOPGM(" (Disabled):");
|
||||
@@ -144,8 +142,6 @@ void GcodeSuite::M201() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M201_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_MAX_ACCELERATION));
|
||||
#if NUM_AXES
|
||||
SERIAL_ECHOPGM_P(
|
||||
@@ -202,8 +198,6 @@ void GcodeSuite::M203() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_MAX_FEEDRATES));
|
||||
#if NUM_AXES
|
||||
SERIAL_ECHOPGM_P(
|
||||
@@ -261,8 +255,6 @@ void GcodeSuite::M204() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M204_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_ACCELERATION_P_R_T));
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
PSTR(" M204 P"), LINEAR_UNIT(planner.settings.acceleration)
|
||||
@@ -337,8 +329,6 @@ void GcodeSuite::M205() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(
|
||||
"Advanced (" M205_MIN_SEG_TIME_STR "<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>"
|
||||
TERN_(HAS_JUNCTION_DEVIATION, " J<junc_dev>")
|
||||
|
||||
@@ -164,8 +164,6 @@ void GcodeSuite::M217() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M217_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_TOOL_CHANGING));
|
||||
|
||||
SERIAL_ECHOPGM(" M217");
|
||||
|
||||
@@ -63,8 +63,6 @@ void GcodeSuite::M218() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M218_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_HOTEND_OFFSETS));
|
||||
for (uint8_t e = 1; e < HOTENDS; ++e) {
|
||||
report_echo_start(forReplay);
|
||||
|
||||
@@ -55,8 +55,6 @@ void GcodeSuite::M281() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M281_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_SERVO_ANGLES));
|
||||
for (uint8_t i = 0; i < NUM_SERVOS; ++i) {
|
||||
switch (i) {
|
||||
|
||||
@@ -78,8 +78,6 @@ void GcodeSuite::M301() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M301_report(const bool forReplay/*=true*/ E_OPTARG(const int8_t eindex/*=-1*/)) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading(forReplay, F(STR_HOTEND_PID));
|
||||
IF_DISABLED(HAS_MULTI_EXTRUDER, constexpr int8_t eindex = -1);
|
||||
HOTEND_LOOP() {
|
||||
|
||||
@@ -25,13 +25,12 @@
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
|
||||
#include "../gcode.h"
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#endif
|
||||
|
||||
#include "../../module/temperature.h"
|
||||
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* M302: Allow cold extrudes, or set the minimum extrude temperature
|
||||
*
|
||||
@@ -51,14 +50,13 @@ void GcodeSuite::M302() {
|
||||
const bool seen_S = parser.seen('S');
|
||||
if (seen_S) {
|
||||
thermalManager.extrude_min_temp = parser.value_celsius();
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onSetMinExtrusionTemp(thermalManager.extrude_min_temp));
|
||||
thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0);
|
||||
TERN_(DWIN_LCD_PROUI, hmiData.extMinT = thermalManager.extrude_min_temp);
|
||||
}
|
||||
|
||||
const bool seen_P = parser.seen('P');
|
||||
if (seen_P || seen_S) {
|
||||
thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0) || (seen_P && parser.value_bool());
|
||||
}
|
||||
else {
|
||||
if (parser.seen('P'))
|
||||
thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0) || parser.value_bool();
|
||||
else if (!seen_S) {
|
||||
// Report current state
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLN(F("Cold extrudes are "), thermalManager.allow_cold_extrude ? F("en") : F("dis"), F("abled (min temp "), thermalManager.extrude_min_temp, F("C)"));
|
||||
|
||||
@@ -42,8 +42,6 @@ void GcodeSuite::M304() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M304_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_BED_PID));
|
||||
SERIAL_ECHOLNPGM(" M304"
|
||||
" P", thermalManager.temp_bed.pid.p()
|
||||
|
||||
@@ -42,8 +42,6 @@ void GcodeSuite::M309() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M309_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_CHAMBER_PID));
|
||||
SERIAL_ECHOLNPGM(" M309"
|
||||
" P", thermalManager.temp_chamber.pid.p()
|
||||
|
||||
@@ -96,8 +96,6 @@ void GcodeSuite::M92() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_STEPS_PER_UNIT));
|
||||
#if NUM_AXES
|
||||
#define PRINT_EOL
|
||||
|
||||
@@ -40,8 +40,6 @@ void GcodeSuite::M211() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M211_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_SOFT_ENDSTOPS));
|
||||
SERIAL_ECHOPGM(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; ");
|
||||
serialprintln_onoff(soft_endstop._enabled);
|
||||
|
||||
@@ -79,7 +79,7 @@ void GcodeSuite::M42() {
|
||||
#ifdef OUTPUT_OPEN_DRAIN
|
||||
case 5: pinMode(pin, OUTPUT_OPEN_DRAIN); break;
|
||||
#endif
|
||||
default: SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Invalid Pin Mode")); return;
|
||||
default: SERIAL_ECHOLNPGM("Invalid Pin Mode"); return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ void GcodeSuite::M42() {
|
||||
#endif
|
||||
|
||||
if (avoidWrite) {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Cannot write to INPUT"));
|
||||
SERIAL_ECHOLNPGM("?Cannot write to INPUT");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,16 +32,11 @@ void GcodeSuite::M85() {
|
||||
const millis_t ms = parser.value_millis_from_seconds();
|
||||
#if LASER_SAFETY_TIMEOUT_MS > 0
|
||||
if (ms && ms <= LASER_SAFETY_TIMEOUT_MS) {
|
||||
SERIAL_ECHO_MSG(GCODE_ERR_MSG("M85 timeout must be > ", MS_TO_SEC(LASER_SAFETY_TIMEOUT_MS + 999), " s for laser safety."));
|
||||
SERIAL_ECHO_MSG("M85 timeout must be > ", MS_TO_SEC(LASER_SAFETY_TIMEOUT_MS + 999), " s for laser safety.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
max_inactive_time = ms;
|
||||
}
|
||||
else {
|
||||
#if DISABLED(MARLIN_SMALL_BUILD)
|
||||
SERIAL_ECHOLNPGM("Inactivity timeout ", MS_TO_SEC(max_inactive_time), " s.");
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -33,7 +33,7 @@
|
||||
*/
|
||||
void GcodeSuite::M997() {
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onFirmwareFlash());
|
||||
TERN_(DWIN_LCD_PROUI, dwinRebootScreen());
|
||||
|
||||
flashFirmware(parser.intval('S'));
|
||||
|
||||
|
||||
@@ -141,8 +141,6 @@ void GcodeSuite::M900() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M900_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading(forReplay, F(STR_LINEAR_ADVANCE));
|
||||
#if DISTINCT_E < 2
|
||||
report_echo_start(forReplay);
|
||||
|
||||
@@ -67,8 +67,6 @@ void GcodeSuite::M710() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M710_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_CONTROLLER_FAN));
|
||||
SERIAL_ECHOLNPGM(" M710"
|
||||
" S", int(controllerFan.settings.active_speed),
|
||||
|
||||
@@ -126,16 +126,12 @@ void GcodeSuite::M907() {
|
||||
#if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM
|
||||
|
||||
void GcodeSuite::M907_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_STEPPER_MOTOR_CURRENTS));
|
||||
#if HAS_MOTOR_CURRENT_PWM
|
||||
SERIAL_ECHOLNPGM_P( // PWM-based has 3 values:
|
||||
PSTR(" M907 X"), stepper.motor_current_setting[0] // X, Y, (I, J, K, U, V, W)
|
||||
, SP_Z_STR, stepper.motor_current_setting[1] // Z
|
||||
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
|
||||
, SP_E_STR, stepper.motor_current_setting[2] // E
|
||||
#endif
|
||||
, SP_E_STR, stepper.motor_current_setting[2] // E
|
||||
);
|
||||
#elif HAS_MOTOR_CURRENT_SPI
|
||||
SERIAL_ECHOPGM(" M907"); // SPI-based has 5 values:
|
||||
|
||||
@@ -104,8 +104,6 @@ void say_shaping() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M493_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_FT_MOTION));
|
||||
const ft_config_t &c = ftMotion.cfg;
|
||||
SERIAL_ECHOPGM(" M493 S", c.mode);
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
void GcodeSuite::M207() { fwretract.M207(); }
|
||||
|
||||
void GcodeSuite::M207_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_RETRACT_S_F_Z));
|
||||
fwretract.M207_report();
|
||||
}
|
||||
@@ -55,8 +53,6 @@ void GcodeSuite::M207_report(const bool forReplay/*=true*/) {
|
||||
void GcodeSuite::M208() { fwretract.M208(); }
|
||||
|
||||
void GcodeSuite::M208_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_RECOVER_S_F));
|
||||
fwretract.M208_report();
|
||||
}
|
||||
@@ -72,8 +68,6 @@ void GcodeSuite::M208_report(const bool forReplay/*=true*/) {
|
||||
void GcodeSuite::M209() { fwretract.M209(); }
|
||||
|
||||
void GcodeSuite::M209_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_AUTO_RETRACT_S));
|
||||
fwretract.M209_report();
|
||||
}
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include "../../../module/stepper.h"
|
||||
|
||||
void GcodeSuite::M593_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F("Input Shaping"));
|
||||
#if ENABLED(INPUT_SHAPING_X)
|
||||
SERIAL_ECHOLNPGM(" M593 X"
|
||||
@@ -80,7 +78,7 @@ void GcodeSuite::M593() {
|
||||
if (for_Y) stepper.set_shaping_frequency(Y_AXIS, freq);
|
||||
}
|
||||
else
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Frequency (F) must be greater than ", min_freq, " or 0 to disable"));
|
||||
SERIAL_ECHOLNPGM("?Frequency (F) must be greater than ", min_freq, " or 0 to disable");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,6 @@ void GcodeSuite::M552() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M552_report() {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
ip_report(552, F("ip address"), Ethernet.linkStatus() == LinkON ? Ethernet.localIP() : ethernet.ip);
|
||||
}
|
||||
|
||||
@@ -112,7 +111,6 @@ void GcodeSuite::M553() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M553_report() {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
ip_report(553, F("subnet mask"), Ethernet.linkStatus() == LinkON ? Ethernet.subnetMask() : ethernet.subnet);
|
||||
}
|
||||
|
||||
@@ -127,7 +125,6 @@ void GcodeSuite::M554() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M554_report() {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
ip_report(554, F("gateway"), Ethernet.linkStatus() == LinkON ? Ethernet.gatewayIP() : ethernet.gateway);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "../../../module/stepper.h"
|
||||
|
||||
void GcodeSuite::M592_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
report_heading(forReplay, F(STR_NONLINEAR_EXTRUSION));
|
||||
SERIAL_ECHOLNPGM(" M592 A", stepper.ne.A, " B", stepper.ne.B, " C", stepper.ne.C);
|
||||
}
|
||||
|
||||
@@ -61,8 +61,6 @@ void GcodeSuite::M603() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M603_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading(forReplay, F(STR_FILAMENT_LOAD_UNLOAD));
|
||||
|
||||
#if EXTRUDERS == 1
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "../../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "../../../lcd/e3v2/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../../lcd/e3v2/proui/dwin.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
#include "../../../lcd/e3v2/jyersui/dwin.h" // Temporary fix until it can be better implemented
|
||||
#endif
|
||||
@@ -74,12 +76,12 @@ void GcodeSuite::M1000() {
|
||||
if (!force_resume && parser.seen_test('S')) {
|
||||
#if HAS_MARLINUI_MENU
|
||||
ui.goto_screen(menu_job_recovery);
|
||||
#elif ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onPowerLossResume();
|
||||
#elif HAS_PLR_UI_FLAG
|
||||
recovery.ui_flag_resume = true;
|
||||
#elif HAS_DWIN_E3V2_BASIC
|
||||
recovery.dwin_flag = true;
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) // Temporary fix until it can be better implemented
|
||||
jyersDWIN.popupHandler(Popup_Resume);
|
||||
#elif ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onPowerLossResume();
|
||||
#else
|
||||
SERIAL_ECHO_MSG("Resume requires LCD.");
|
||||
#endif
|
||||
|
||||
@@ -64,8 +64,6 @@ void GcodeSuite::M413() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M413_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_POWER_LOSS_RECOVERY));
|
||||
SERIAL_ECHOPGM(" M413 S", AS_DIGIT(recovery.enabled)
|
||||
#if HAS_PLR_BED_THRESHOLD
|
||||
|
||||
@@ -67,8 +67,6 @@ void GcodeSuite::M412() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M412_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_FILAMENT_RUNOUT_SENSOR));
|
||||
SERIAL_ECHOPGM(
|
||||
" M412 S", runout.enabled
|
||||
|
||||
@@ -155,8 +155,6 @@ void GcodeSuite::M569() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M569_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading(forReplay, F(STR_DRIVER_STEPPING_MODE));
|
||||
|
||||
auto say_M569 = [](const bool forReplay, FSTR_P const etc=nullptr, const bool eol=false) {
|
||||
|
||||
@@ -231,8 +231,6 @@ void GcodeSuite::M906() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M906_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading(forReplay, F(STR_STEPPER_DRIVER_CURRENT));
|
||||
|
||||
auto say_M906 = [](const bool forReplay) {
|
||||
|
||||
@@ -378,8 +378,6 @@
|
||||
}
|
||||
|
||||
void GcodeSuite::M913_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading(forReplay, F(STR_HYBRID_THRESHOLD));
|
||||
|
||||
auto say_M913 = [](const bool forReplay) {
|
||||
@@ -567,8 +565,6 @@
|
||||
}
|
||||
|
||||
void GcodeSuite::M914_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading(forReplay, F(STR_STALLGUARD_THRESHOLD));
|
||||
|
||||
auto say_M914 = [](const bool forReplay) {
|
||||
|
||||
@@ -64,7 +64,7 @@ void GcodeSuite::M919() {
|
||||
if (WITHIN(toff, 1, 15))
|
||||
DEBUG_ECHOLNPGM(".toff: ", toff);
|
||||
else {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("O out of range (1..15)"));
|
||||
SERIAL_ECHOLNPGM("?O out of range (1..15)");
|
||||
err = true;
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ void GcodeSuite::M919() {
|
||||
if (WITHIN(hend, -3, 12))
|
||||
DEBUG_ECHOLNPGM(".hend: ", hend);
|
||||
else {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("P out of range (-3..12)"));
|
||||
SERIAL_ECHOLNPGM("?P out of range (-3..12)");
|
||||
err = true;
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ void GcodeSuite::M919() {
|
||||
if (WITHIN(hstrt, 1, 8))
|
||||
DEBUG_ECHOLNPGM(".hstrt: ", hstrt);
|
||||
else {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("S out of range (1..8)"));
|
||||
SERIAL_ECHOLNPGM("?S out of range (1..8)");
|
||||
err = true;
|
||||
}
|
||||
}
|
||||
@@ -118,7 +118,7 @@ void GcodeSuite::M919() {
|
||||
// Get the chopper timing for the specified axis and index
|
||||
switch (i) {
|
||||
default: // A specified axis isn't Trinamic
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Axis ", C(AXIS_CHAR(i)), " has no TMC drivers."));
|
||||
SERIAL_ECHOLNPGM("?Axis ", C(AXIS_CHAR(i)), " has no TMC drivers.");
|
||||
break;
|
||||
|
||||
#if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2)
|
||||
|
||||
@@ -341,12 +341,6 @@
|
||||
#define HAS_FAST_MOVES 1
|
||||
#endif
|
||||
|
||||
#if ENABLED(MARLIN_SMALL_BUILD)
|
||||
#define GCODE_ERR_MSG(V...) "?"
|
||||
#else
|
||||
#define GCODE_ERR_MSG(V...) "?" V
|
||||
#endif
|
||||
|
||||
enum AxisRelative : uint8_t {
|
||||
LOGICAL_AXIS_LIST(REL_E, REL_X, REL_Y, REL_Z, REL_I, REL_J, REL_K, REL_U, REL_V, REL_W)
|
||||
#if HAS_EXTRUDERS
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* G92 : Modify Workspace Offsets so the reported position shows the given X [Y [Z [A [B [C [U [V [W ]]]]]]]] [E].
|
||||
* G92.1 : Zero XYZ Workspace Offsets (so the reported position = the native position).
|
||||
*
|
||||
* With POWER_LOSS_RECOVERY or with AXISn_ROTATES:
|
||||
* With POWER_LOSS_RECOVERY:
|
||||
* G92.9 : Set NATIVE Current Position to the given X [Y [Z [A [B [C [U [V [W ]]]]]]]] [E].
|
||||
*/
|
||||
void GcodeSuite::G92() {
|
||||
@@ -67,7 +67,7 @@ void GcodeSuite::G92() {
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if ANY(POWER_LOSS_RECOVERY, HAS_ROTATIONAL_AXES)
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
case 9: // G92.9 - Set Current Position directly (like Marlin 1.0)
|
||||
LOOP_LOGICAL_AXES(i) {
|
||||
if (parser.seenval(AXIS_CHAR(i))) {
|
||||
|
||||
@@ -48,8 +48,6 @@ void GcodeSuite::M206() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M206_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_HOME_OFFSET));
|
||||
SERIAL_ECHOLNPGM_P(
|
||||
#if IS_CARTESIAN
|
||||
|
||||
@@ -63,25 +63,11 @@
|
||||
*/
|
||||
void GcodeSuite::M115() {
|
||||
|
||||
// Hosts should match one of these
|
||||
#define MACHINE_KINEMATICS "" \
|
||||
TERN_(COREXY, "COREXY") TERN_(COREYX, "COREYX") \
|
||||
TERN_(COREXZ, "COREXZ") TERN_(COREZX, "COREZX") \
|
||||
TERN_(COREYZ, "COREYZ") TERN_(COREZY, "COREZY") \
|
||||
TERN_(MARKFORGED_XY, "MARKFORGED_XY") TERN_(MARKFORGED_YX, "MARKFORGED_YX") \
|
||||
TERN_(POLARGRAPH, "POLARGRAPH") \
|
||||
TERN_(POLAR, "POLAR") \
|
||||
TERN_(DELTA, "DELTA") \
|
||||
TERN_(IS_SCARA, "SCARA") \
|
||||
TERN_(IS_CARTESIAN, "Cartesian") \
|
||||
TERN_(BELTPRINTER, " BELTPRINTER")
|
||||
|
||||
SERIAL_ECHOPGM("FIRMWARE_NAME:Marlin"
|
||||
" " DETAILED_BUILD_VERSION " (" __DATE__ " " __TIME__ ")"
|
||||
" SOURCE_CODE_URL:" SOURCE_CODE_URL
|
||||
" PROTOCOL_VERSION:" PROTOCOL_VERSION
|
||||
" MACHINE_TYPE:" MACHINE_NAME
|
||||
" KINEMATICS:" MACHINE_KINEMATICS
|
||||
" EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS)
|
||||
#if NUM_AXES != XYZ
|
||||
" AXIS_COUNT:" STRINGIFY(NUM_AXES)
|
||||
@@ -102,15 +88,14 @@ void GcodeSuite::M115() {
|
||||
* This code should work on all STM32-based boards.
|
||||
*/
|
||||
#if ENABLED(STM32_UID_SHORT_FORM)
|
||||
const uint32_t * const UID = (uint32_t*)UID_BASE;
|
||||
for (uint8_t i = 0; i < 3; i++) print_hex_long(UID[i]);
|
||||
uint32_t * const UID = (uint32_t*)UID_BASE;
|
||||
SERIAL_ECHO(hex_long(UID[0]), hex_long(UID[1]), hex_long(UID[2]));
|
||||
#else
|
||||
const uint16_t * const UID = (uint16_t*)UID_BASE; // Little-endian!
|
||||
SERIAL_ECHO(F("CEDE2A2F-"));
|
||||
for (uint8_t i = 1; i <= 6; i++) {
|
||||
print_hex_word(UID[(i % 2) ? i : i - 2]); // 1111-0000-3333-222255554444
|
||||
if (i <= 3) SERIAL_ECHO(C('-'));
|
||||
}
|
||||
uint16_t * const UID = (uint16_t*)UID_BASE;
|
||||
SERIAL_ECHO(
|
||||
F("CEDE2A2F-"), hex_word(UID[0]), C('-'), hex_word(UID[1]), C('-'), hex_word(UID[2]), C('-'),
|
||||
hex_word(UID[3]), hex_word(UID[4]), hex_word(UID[5])
|
||||
);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
#include "../../lcd/marlinui.h"
|
||||
#elif ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/e3v2/proui/dwin_popup.h"
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||
@@ -63,20 +66,16 @@ void GcodeSuite::M0_M1() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif ENABLED(DWIN_LCD_PROUI) // ExtUI with icon, string, button title
|
||||
|
||||
if (parser.string_arg)
|
||||
ExtUI::onUserConfirmRequired(ICON_Continue_1, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
|
||||
else
|
||||
ExtUI::onUserConfirmRequired(ICON_Stop_1, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));
|
||||
|
||||
#elif ENABLED(EXTENSIBLE_UI)
|
||||
|
||||
if (parser.string_arg)
|
||||
ExtUI::onUserConfirmRequired(parser.string_arg); // String in an SRAM buffer
|
||||
else
|
||||
ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_USERWAIT));
|
||||
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
if (parser.string_arg)
|
||||
dwinPopupConfirm(ICON_BLTouch, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
|
||||
else
|
||||
dwinPopupConfirm(ICON_BLTouch, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));
|
||||
#else
|
||||
|
||||
if (parser.string_arg) {
|
||||
|
||||
@@ -61,8 +61,6 @@ void GcodeSuite::M145() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M145_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading(forReplay, F(STR_MATERIAL_HEATUP));
|
||||
for (uint8_t i = 0; i < PREHEAT_COUNT; ++i) {
|
||||
report_echo_start(forReplay);
|
||||
|
||||
@@ -38,7 +38,6 @@ void GcodeSuite::M250() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M250_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
report_heading_etc(forReplay, F(STR_LCD_CONTRAST));
|
||||
SERIAL_ECHOLNPGM(" M250 C", ui.contrast);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ void GcodeSuite::M255() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M255_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
report_heading_etc(forReplay, F(STR_DISPLAY_SLEEP));
|
||||
SERIAL_ECHOLNPGM(" M255 S",
|
||||
TERN(HAS_DISPLAY_SLEEP, ui.sleep_timeout_minutes, ui.backlight_timeout_minutes),
|
||||
|
||||
@@ -37,7 +37,6 @@ void GcodeSuite::M256() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M256_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
report_heading_etc(forReplay, F(STR_LCD_BRIGHTNESS));
|
||||
SERIAL_ECHOLNPGM(" M256 B", ui.brightness);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ void GcodeSuite::M414() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M414_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
report_heading_etc(forReplay, F(STR_UI_LANGUAGE));
|
||||
SERIAL_ECHOLNPGM(" M414 S", ui.language);
|
||||
}
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
#include "../../sd/cardreader.h"
|
||||
#include "../../libs/numtostr.h"
|
||||
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* M73: Set percentage complete (for display on LCD)
|
||||
*
|
||||
|
||||
@@ -34,10 +34,6 @@
|
||||
#include "../../feature/probe_temp_comp.h"
|
||||
#endif
|
||||
|
||||
#if ANY(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#define VERBOSE_SINGLE_PROBE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* G30: Do a single Z probe at the given XY (default: current)
|
||||
*
|
||||
@@ -70,7 +66,9 @@ void GcodeSuite::G30() {
|
||||
|
||||
remember_feedrate_scaling_off();
|
||||
|
||||
TERN_(VERBOSE_SINGLE_PROBE, process_subcommands_now(F("G28O")));
|
||||
#if ANY(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
process_subcommands_now(F("G28O"));
|
||||
#endif
|
||||
|
||||
const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
|
||||
|
||||
@@ -85,7 +83,9 @@ void GcodeSuite::G30() {
|
||||
F( " Z:"), p_float_t(measured_z, 3)
|
||||
);
|
||||
msg.echoln();
|
||||
TERN_(VERBOSE_SINGLE_PROBE, ui.set_status(msg));
|
||||
#if ANY(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
ui.set_status(msg);
|
||||
#endif
|
||||
}
|
||||
|
||||
restore_feedrate_and_scaling();
|
||||
|
||||
@@ -72,12 +72,12 @@ void GcodeSuite::M423() {
|
||||
do_report = false;
|
||||
const int8_t x = parser.value_int();
|
||||
if (!WITHIN(x, 0, XATC_MAX_POINTS - 1))
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(X) out of range (0..", XATC_MAX_POINTS - 1, ")."));
|
||||
SERIAL_ECHOLNPGM("?(X) out of range (0..", XATC_MAX_POINTS - 1, ").");
|
||||
else {
|
||||
if (parser.seenval('Z'))
|
||||
xatc.z_offset[x] = parser.value_linear_units();
|
||||
else
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("(Z) required."));
|
||||
SERIAL_ECHOLNPGM("?(Z) required.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,8 +86,6 @@ void GcodeSuite::M423() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M423_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading(forReplay, F("X-Twist Correction"));
|
||||
SERIAL_ECHOLNPGM(" M423 A", xatc.start, " I", xatc.spacing);
|
||||
for (uint8_t x = 0; x < XATC_MAX_POINTS; ++x) {
|
||||
|
||||
@@ -47,11 +47,11 @@ void GcodeSuite::M851() {
|
||||
if (WITHIN(x, PROBE_OFFSET_XMIN, PROBE_OFFSET_XMAX))
|
||||
offs.x = x;
|
||||
else {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("X out of range (", PROBE_OFFSET_XMIN, " to ", PROBE_OFFSET_XMAX, ")"));
|
||||
SERIAL_ECHOLNPGM("?X out of range (", PROBE_OFFSET_XMIN, " to ", PROBE_OFFSET_XMAX, ")");
|
||||
ok = false;
|
||||
}
|
||||
#else
|
||||
if (x) SERIAL_ECHOLNPGM(GCODE_ERR_MSG("X must be 0 (NOZZLE_AS_PROBE).")); // ...but let 'ok' stay true
|
||||
if (x) SERIAL_ECHOLNPGM("?X must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -61,11 +61,11 @@ void GcodeSuite::M851() {
|
||||
if (WITHIN(y, PROBE_OFFSET_YMIN, PROBE_OFFSET_YMAX))
|
||||
offs.y = y;
|
||||
else {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Y out of range (", PROBE_OFFSET_YMIN, " to ", PROBE_OFFSET_YMAX, ")"));
|
||||
SERIAL_ECHOLNPGM("?Y out of range (", PROBE_OFFSET_YMIN, " to ", PROBE_OFFSET_YMAX, ")");
|
||||
ok = false;
|
||||
}
|
||||
#else
|
||||
if (y) SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Y must be 0 (NOZZLE_AS_PROBE).")); // ...but let 'ok' stay true
|
||||
if (y) SERIAL_ECHOLNPGM("?Y must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ void GcodeSuite::M851() {
|
||||
if (WITHIN(z, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX))
|
||||
offs.z = z;
|
||||
else {
|
||||
SERIAL_ECHOLNPGM(GCODE_ERR_MSG("Z out of range (", PROBE_OFFSET_ZMIN, " to ", PROBE_OFFSET_ZMAX, ")"));
|
||||
SERIAL_ECHOLNPGM("?Z out of range (", PROBE_OFFSET_ZMIN, " to ", PROBE_OFFSET_ZMAX, ")");
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
@@ -84,8 +84,6 @@ void GcodeSuite::M851() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M851_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_Z_PROBE_OFFSET));
|
||||
SERIAL_ECHOPGM_P(
|
||||
#if HAS_PROBE_XY_OFFSET
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
#include "../gcode.h"
|
||||
#include "../../sd/cardreader.h"
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/marlinui.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -36,9 +36,9 @@
|
||||
*/
|
||||
void GcodeSuite::M524() {
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
|
||||
ExtUI::stopPrint(); // Calls ui.abort_print() which does the same as below
|
||||
ui.abort_print();
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -35,14 +35,10 @@
|
||||
|
||||
/**
|
||||
* M75: Start print timer
|
||||
*
|
||||
* ProUI: If the print fails to start and any text is
|
||||
* included in the command, print it in the header.
|
||||
*/
|
||||
void GcodeSuite::M75() {
|
||||
startOrResumeJob(); // ... ExtUI::onPrintTimerStarted()
|
||||
startOrResumeJob();
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
// TODO: Remove if M75 <string> is never used
|
||||
if (!IS_SD_PRINTING()) dwinPrintHeader(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
|
||||
#endif
|
||||
}
|
||||
@@ -51,7 +47,7 @@ void GcodeSuite::M75() {
|
||||
* M76: Pause print timer
|
||||
*/
|
||||
void GcodeSuite::M76() {
|
||||
print_job_timer.pause(); // ... ExtUI::onPrintTimerPaused()
|
||||
TERN(DWIN_LCD_PROUI, ui.pause_print(), print_job_timer.pause());
|
||||
TERN_(HOST_PAUSE_M76, hostui.pause());
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(PROUI_PID_TUNE)
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -66,7 +68,8 @@ void GcodeSuite::M303() {
|
||||
default:
|
||||
SERIAL_ECHOPGM(STR_PID_AUTOTUNE);
|
||||
SERIAL_ECHOLNPGM(STR_PID_BAD_HEATER_ID);
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_BAD_HEATER_ID));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_HEATER_ID));
|
||||
TERN_(PROUI_PID_TUNE, dwinPidTuning(PID_BAD_HEATER_ID));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -76,7 +79,7 @@ void GcodeSuite::M303() {
|
||||
const celsius_t temp = seenS ? parser.value_celsius() : default_temp;
|
||||
const bool u = parser.boolval('U');
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onStartM303(c, hid, temp));
|
||||
TERN_(PROUI_PID_TUNE, dwinStartM303(seenC, c, seenS, hid, temp));
|
||||
|
||||
IF_DISABLED(BUSY_WHILE_HEATING, KEEPALIVE_STATE(NOT_BUSY));
|
||||
|
||||
|
||||
@@ -88,8 +88,6 @@ void GcodeSuite::M306() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M306_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading(forReplay, F("Model predictive control"));
|
||||
HOTEND_LOOP() {
|
||||
report_echo_start(forReplay);
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
#include "../../feature/hotend_idle.h"
|
||||
|
||||
void GcodeSuite::M86_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
hotend_idle_settings_t &c = hotend_idle.cfg;
|
||||
report_heading(forReplay, F("Hotend Idle Timeout"));
|
||||
SERIAL_ECHOLNPGM(" M86"
|
||||
|
||||
@@ -37,8 +37,6 @@ void GcodeSuite::M149() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M149_report(const bool forReplay/*=true*/) {
|
||||
TERN_(MARLIN_SMALL_BUILD, return);
|
||||
|
||||
report_heading_etc(forReplay, F(STR_TEMPERATURE_UNITS));
|
||||
SERIAL_ECHOLN(F(" M149 "), C(parser.temp_units_code()), F(" ; Units in "), parser.temp_units_name());
|
||||
}
|
||||
|
||||
@@ -285,11 +285,11 @@
|
||||
#elif defined(MEASURED_LOWER_LIMIT) || defined(MEASURED_UPPER_LIMIT)
|
||||
#error "MEASURED_(UPPER|LOWER)_LIMIT is now FILWIDTH_ERROR_MARGIN."
|
||||
#elif defined(HAVE_TMCDRIVER)
|
||||
#error "HAVE_TMCDRIVER is obsolete."
|
||||
#error "HAVE_TMCDRIVER is now [AXIS]_DRIVER_TYPE TMC26X."
|
||||
#elif defined(STEALTHCHOP)
|
||||
#error "STEALTHCHOP is now STEALTHCHOP_(XY|Z|E)."
|
||||
#elif defined(HAVE_TMC26X)
|
||||
#error "HAVE_TMC26X is now obsolete."
|
||||
#error "HAVE_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X."
|
||||
#elif defined(HAVE_TMC2130)
|
||||
#error "HAVE_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130."
|
||||
#elif defined(HAVE_TMC2208)
|
||||
@@ -298,10 +298,10 @@
|
||||
#error "HAVE_L6470DRIVER is obsolete. L64xx stepper drivers are no longer supported in Marlin."
|
||||
#elif defined(X_IS_TMC) || defined(X2_IS_TMC) || defined(Y_IS_TMC) || defined(Y2_IS_TMC) || defined(Z_IS_TMC) || defined(Z2_IS_TMC) || defined(Z3_IS_TMC) \
|
||||
|| defined(E0_IS_TMC) || defined(E1_IS_TMC) || defined(E2_IS_TMC) || defined(E3_IS_TMC) || defined(E4_IS_TMC) || defined(E5_IS_TMC) || defined(E6_IS_TMC) || defined(E7_IS_TMC)
|
||||
#error "[AXIS]_IS_TMC is now obsolete."
|
||||
#error "[AXIS]_IS_TMC is now [AXIS]_DRIVER_TYPE TMC26X."
|
||||
#elif defined(X_IS_TMC26X) || defined(X2_IS_TMC26X) || defined(Y_IS_TMC26X) || defined(Y2_IS_TMC26X) || defined(Z_IS_TMC26X) || defined(Z2_IS_TMC26X) || defined(Z3_IS_TMC26X) \
|
||||
|| defined(E0_IS_TMC26X) || defined(E1_IS_TMC26X) || defined(E2_IS_TMC26X) || defined(E3_IS_TMC26X) || defined(E4_IS_TMC26X) || defined(E5_IS_TMC26X) || defined(E6_IS_TMC26X) || defined(E7_IS_TMC26X)
|
||||
#error "[AXIS]_IS_TMC26X is now obsolete."
|
||||
#error "[AXIS]_IS_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X."
|
||||
#elif defined(X_IS_TMC2130) || defined(X2_IS_TMC2130) || defined(Y_IS_TMC2130) || defined(Y2_IS_TMC2130) || defined(Z_IS_TMC2130) || defined(Z2_IS_TMC2130) || defined(Z3_IS_TMC2130) \
|
||||
|| defined(E0_IS_TMC2130) || defined(E1_IS_TMC2130) || defined(E2_IS_TMC2130) || defined(E3_IS_TMC2130) || defined(E4_IS_TMC2130) || defined(E5_IS_TMC2130) || defined(E6_IS_TMC2130) || defined(E7_IS_TMC2130)
|
||||
#error "[AXIS]_IS_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130."
|
||||
@@ -600,9 +600,7 @@
|
||||
#elif defined(LEVEL_CENTER_TOO)
|
||||
#error "LEVEL_CENTER_TOO is now BED_TRAMMING_INCLUDE_CENTER."
|
||||
#elif defined(TOUCH_IDLE_SLEEP)
|
||||
#error "TOUCH_IDLE_SLEEP (seconds) is now DISPLAY_SLEEP_MINUTES (minutes)."
|
||||
#elif defined(TOUCH_IDLE_SLEEP_MINS)
|
||||
#error "TOUCH_IDLE_SLEEP_MINS is now DISPLAY_SLEEP_MINUTES."
|
||||
#error "TOUCH_IDLE_SLEEP (seconds) is now TOUCH_IDLE_SLEEP_MINS (minutes)."
|
||||
#elif defined(LCD_BACKLIGHT_TIMEOUT)
|
||||
#error "LCD_BACKLIGHT_TIMEOUT (seconds) is now LCD_BACKLIGHT_TIMEOUT_MINS (minutes)."
|
||||
#elif defined(LCD_SET_PROGRESS_MANUALLY)
|
||||
@@ -691,8 +689,6 @@
|
||||
#error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING is now CTC_A10S_A13."
|
||||
#elif defined(Z_PROBE_END_SCRIPT)
|
||||
#error "Z_PROBE_END_SCRIPT is now EVENT_GCODE_AFTER_G29."
|
||||
#elif defined(WIFI_SERIAL)
|
||||
#error "WIFI_SERIAL is now WIFI_SERIAL_PORT."
|
||||
#endif
|
||||
|
||||
// Changes to Probe Temp Compensation (#17392)
|
||||
@@ -720,8 +716,6 @@
|
||||
#define _L6474 0x6474
|
||||
#define _L6480 0x6480
|
||||
#define _POWERSTEP01 0xF00D
|
||||
#define _TMC26X 0x2600
|
||||
#define _TMC26X_STANDALONE 0x2601
|
||||
#if HAS_DRIVER(L6470)
|
||||
#error "L6470 stepper drivers are no longer supported in Marlin."
|
||||
#elif HAS_DRIVER(L6474)
|
||||
@@ -730,12 +724,8 @@
|
||||
#error "L6480 stepper drivers are no longer supported in Marlin."
|
||||
#elif HAS_DRIVER(POWERSTEP01)
|
||||
#error "POWERSTEP01 stepper drivers are no longer supported in Marlin."
|
||||
#elif HAS_DRIVER(TMC26X) || HAS_DRIVER(TMC26X_STANDALONE)
|
||||
#error "TMC26X stepper drivers are no longer supported in Marlin."
|
||||
#endif
|
||||
#undef _L6470
|
||||
#undef _L6474
|
||||
#undef _L6480
|
||||
#undef _POWERSTEP01
|
||||
#undef _TMC26X
|
||||
#undef _TMC26X_STANDALONE
|
||||
|
||||
@@ -1035,13 +1035,16 @@
|
||||
#endif
|
||||
|
||||
// Extensible UI serial touch screens. (See src/lcd/extui)
|
||||
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT, TOUCH_UI_FTDI_EVE, DWIN_LCD_PROUI)
|
||||
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT, TOUCH_UI_FTDI_EVE)
|
||||
#define IS_EXTUI 1 // Just for sanity check.
|
||||
#define EXTENSIBLE_UI
|
||||
#endif
|
||||
|
||||
// Aliases for LCD features
|
||||
#if ANY(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#if ANY(DWIN_CREALITY_LCD, DWIN_LCD_PROUI)
|
||||
#define HAS_DWIN_E3V2_BASIC 1
|
||||
#endif
|
||||
#if ANY(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#define HAS_DWIN_E3V2 1
|
||||
#endif
|
||||
|
||||
@@ -1055,7 +1058,6 @@
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#define DO_LIST_BIN_FILES 1
|
||||
#define LCD_BRIGHTNESS_DEFAULT 127
|
||||
#define STATUS_DO_CLEAR_EMPTY
|
||||
#endif
|
||||
|
||||
// Serial Controllers require LCD_SERIAL_PORT
|
||||
@@ -1090,7 +1092,6 @@
|
||||
* - draw_kill_screen
|
||||
* - kill_screen
|
||||
* - draw_status_message
|
||||
* (calling advance_status_scroll, status_and_len for a scrolling status message)
|
||||
*/
|
||||
#define HAS_DISPLAY 1
|
||||
#endif
|
||||
@@ -1849,9 +1850,16 @@
|
||||
|
||||
// This emulated DOGM has 'touch/xpt2046', not 'tft/xpt2046'
|
||||
#if ENABLED(TOUCH_SCREEN)
|
||||
#if TOUCH_IDLE_SLEEP_MINS
|
||||
#define HAS_TOUCH_SLEEP 1
|
||||
#endif
|
||||
#if NONE(TFT_TOUCH_DEVICE_GT911, TFT_TOUCH_DEVICE_XPT2046)
|
||||
#define TFT_TOUCH_DEVICE_XPT2046 // ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8
|
||||
#endif
|
||||
#if ENABLED(TFT_TOUCH_DEVICE_GT911) // GT911 Capacitive touch screen such as BIQU_BX_TFT70
|
||||
#undef TOUCH_SCREEN_CALIBRATION
|
||||
#undef TOUCH_CALIBRATION_AUTO_SAVE
|
||||
#endif
|
||||
#if !HAS_GRAPHICAL_TFT
|
||||
#undef TOUCH_SCREEN
|
||||
#if ENABLED(TFT_CLASSIC_UI)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user