Merge branch 'CrealityDwin2.0_Bleeding' into Tenlog_DWIN
This commit is contained in:
+5
-1
@@ -14,6 +14,10 @@ end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[{*.py,*.conf,*.sublime-project}]
|
||||
[{*.py}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[{*.conf,*.sublime-project}]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
@@ -34,8 +34,11 @@ This project and everyone participating in it is governed by the [Marlin Code of
|
||||
|
||||
We have a Message Board and a Facebook group where our knowledgable user community can provide helpful advice if you have questions.
|
||||
|
||||
* [Marlin RepRap forum](https://reprap.org/forum/list.php?415)
|
||||
* [MarlinFirmware on Facebook](https://www.facebook.com/groups/1049718498464482/)
|
||||
- [Marlin Documentation](https://marlinfw.org) - Official Marlin documentation
|
||||
- Facebook Group ["Marlin Firmware"](https://www.facebook.com/groups/1049718498464482/)
|
||||
- RepRap.org [Marlin Forum](https://forums.reprap.org/list.php?415)
|
||||
- Facebook Group ["Marlin Firmware for 3D Printers"](https://www.facebook.com/groups/3Dtechtalk/)
|
||||
- [Marlin Configuration](https://www.youtube.com/results?search_query=marlin+configuration) on YouTube
|
||||
|
||||
If chat is more your speed, you can join the MarlinFirmware Discord server:
|
||||
|
||||
|
||||
@@ -31,4 +31,4 @@ jobs:
|
||||
|
||||
It may help to set your fork's default branch to `bugfix-2.0.x`.
|
||||
|
||||
See [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.
|
||||
See [this page](https://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.
|
||||
|
||||
@@ -25,4 +25,4 @@ jobs:
|
||||
days-before-close: 10
|
||||
stale-issue-label: 'stale-closing-soon'
|
||||
exempt-all-assignees: true
|
||||
exempt-issue-labels: 'Bug: Confirmed !,T: Feature Request,Needs: Discussion,Needs: Documentation,Needs: Patch,Needs: Work,Needs: Testing,help wanted,no-locking'
|
||||
exempt-issue-labels: 'Bug: Confirmed !,T: Feature Request,Needs: More Data,Needs: Discussion,Needs: Documentation,Needs: Patch,Needs: Work,Needs: Testing,help wanted,no-locking'
|
||||
|
||||
@@ -8,7 +8,6 @@ name: CI
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- bugfix-2.0.x
|
||||
- bugfix-2.1.x
|
||||
paths-ignore:
|
||||
- config/**
|
||||
@@ -17,7 +16,6 @@ on:
|
||||
- '**/*.md'
|
||||
push:
|
||||
branches:
|
||||
- bugfix-2.0.x
|
||||
- bugfix-2.1.x
|
||||
paths-ignore:
|
||||
- config/**
|
||||
@@ -47,6 +45,7 @@ jobs:
|
||||
- teensy35
|
||||
- teensy41
|
||||
- SAMD51_grandcentral_m4
|
||||
- PANDA_PI_V29
|
||||
|
||||
# Extended AVR Environments
|
||||
|
||||
@@ -67,7 +66,7 @@ jobs:
|
||||
#- mks_robin_maple
|
||||
- mks_robin_lite_maple
|
||||
- mks_robin_pro_maple
|
||||
#- mks_robin_nano35_maple
|
||||
#- mks_robin_nano_v1v2_maple
|
||||
#- STM32F103RE_creality_maple
|
||||
- STM32F103VE_ZM3E4V2_USB_maple
|
||||
|
||||
@@ -94,13 +93,18 @@ jobs:
|
||||
- rumba32
|
||||
- LERDGEX
|
||||
- LERDGEK
|
||||
- mks_robin_nano35
|
||||
- mks_robin_nano_v1v2
|
||||
#- mks_robin_nano_v1v2_usbmod
|
||||
#- mks_robin_nano_v1_3_f4_usbmod
|
||||
- NUCLEO_F767ZI
|
||||
- REMRAM_V1
|
||||
- BTT_SKR_SE_BX
|
||||
- chitu_f103
|
||||
- Opulo_Lumen_REV3
|
||||
|
||||
# ESP32 environments
|
||||
- mks_tinybee
|
||||
|
||||
# Put lengthy tests last
|
||||
|
||||
- LPC1768
|
||||
|
||||
+100
-34
@@ -40,7 +40,7 @@
|
||||
*
|
||||
* Advanced settings can be found in Configuration_adv.h
|
||||
*/
|
||||
#define CONFIGURATION_H_VERSION 02010100
|
||||
#define CONFIGURATION_H_VERSION 02010200
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
@@ -145,7 +145,7 @@
|
||||
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
*/
|
||||
//#define SERIAL_PORT_2 -1
|
||||
//#define BAUDRATE_2 250000 // Enable to override BAUDRATE
|
||||
//#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
|
||||
|
||||
/**
|
||||
* Select a third serial port on the board to use for communication with the host.
|
||||
@@ -153,7 +153,7 @@
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
*/
|
||||
//#define SERIAL_PORT_3 1
|
||||
//#define BAUDRATE_3 250000 // Enable to override BAUDRATE
|
||||
//#define BAUDRATE_3 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
|
||||
|
||||
// Enable the Bluetooth serial interface on AT90USB devices
|
||||
//#define BLUETOOTH
|
||||
@@ -165,6 +165,8 @@
|
||||
// Choose your own or use a service like https://www.uuidgenerator.net/version4
|
||||
//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
|
||||
|
||||
// @section stepper drivers
|
||||
|
||||
/**
|
||||
* Stepper Drivers
|
||||
*
|
||||
@@ -279,6 +281,8 @@
|
||||
//#define SINGLENOZZLE_STANDBY_FAN
|
||||
#endif
|
||||
|
||||
// @section multi-material
|
||||
|
||||
/**
|
||||
* Multi-Material Unit
|
||||
* Set to one of these predefined models:
|
||||
@@ -291,6 +295,7 @@
|
||||
*
|
||||
* Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
|
||||
* See additional options in Configuration_adv.h.
|
||||
* :["PRUSA_MMU1", "PRUSA_MMU2", "PRUSA_MMU2S", "EXTENDABLE_EMU_MMU2", "EXTENDABLE_EMU_MMU2S"]
|
||||
*/
|
||||
//#define MMU_MODEL PRUSA_MMU2
|
||||
|
||||
@@ -310,6 +315,7 @@
|
||||
#define SWITCHING_NOZZLE_SERVO_NR 0
|
||||
//#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
|
||||
#define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
|
||||
#define SWITCHING_NOZZLE_SERVO_DWELL 2500 // Dwell time to wait for servo to make physical move
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -426,7 +432,7 @@
|
||||
//#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle
|
||||
//#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle
|
||||
|
||||
// @section machine
|
||||
// @section psu control
|
||||
|
||||
/**
|
||||
* Power Supply Control
|
||||
@@ -592,10 +598,14 @@
|
||||
#define DUMMY_THERMISTOR_999_VALUE 100
|
||||
|
||||
// Resistor values when using MAX31865 sensors (-5) on TEMP_SENSOR_0 / 1
|
||||
//#define MAX31865_SENSOR_OHMS_0 100 // (Ω) Typically 100 or 1000 (PT100 or PT1000)
|
||||
//#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for Adafruit PT100; 4300 for Adafruit PT1000
|
||||
//#define MAX31865_SENSOR_OHMS_1 100
|
||||
//#define MAX31865_CALIBRATION_OHMS_1 430
|
||||
#if TEMP_SENSOR_IS_MAX_TC(0)
|
||||
#define MAX31865_SENSOR_OHMS_0 100 // (Ω) Typically 100 or 1000 (PT100 or PT1000)
|
||||
#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for Adafruit PT100; 4300 for Adafruit PT1000
|
||||
#endif
|
||||
#if TEMP_SENSOR_IS_MAX_TC(1)
|
||||
#define MAX31865_SENSOR_OHMS_1 100
|
||||
#define MAX31865_CALIBRATION_OHMS_1 430
|
||||
#endif
|
||||
|
||||
#define TEMP_RESIDENCY_TIME 5 // (seconds) Time to wait for hotend to "settle" in M109
|
||||
#define TEMP_WINDOW 3 // (°C) Temperature proximity for the "temperature reached" timer
|
||||
@@ -666,6 +676,8 @@
|
||||
//============================= PID Settings ================================
|
||||
//===========================================================================
|
||||
|
||||
// @section hotend temp
|
||||
|
||||
// Enable PIDTEMP for PID control or MPCTEMP for Predictive Model.
|
||||
// temperature control. Disable both for bang-bang heating.
|
||||
#define PIDTEMP // See the PID Tuning Guide at https://reprap.org/wiki/PID_Tuning
|
||||
@@ -699,7 +711,8 @@
|
||||
*
|
||||
* Use a physical model of the hotend to control temperature. When configured correctly
|
||||
* this gives better responsiveness and stability than PID and it also removes the need
|
||||
* for PID_EXTRUSION_SCALING and PID_FAN_SCALING. Use M306 to autotune the model.
|
||||
* for PID_EXTRUSION_SCALING and PID_FAN_SCALING. Use M306 T to autotune the model.
|
||||
* @section mpctemp
|
||||
*/
|
||||
#if ENABLED(MPCTEMP)
|
||||
//#define MPC_EDIT_MENU // Add MPC editing to the "Advanced Settings" menu. (~1300 bytes of flash)
|
||||
@@ -752,6 +765,7 @@
|
||||
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
|
||||
* heater. If your configuration is significantly different than this and you don't understand
|
||||
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
|
||||
* @section bed temp
|
||||
*/
|
||||
#define PIDTEMPBED
|
||||
|
||||
@@ -767,7 +781,7 @@
|
||||
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
//#define MIN_BED_POWER 0
|
||||
//#define PID_BED_DEBUG // Sends debug data to the serial port.
|
||||
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
|
||||
|
||||
// 120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
|
||||
// from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
|
||||
@@ -795,6 +809,7 @@
|
||||
* impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 200W
|
||||
* heater. If your configuration is significantly different than this and you don't understand
|
||||
* the issues involved, don't use chamber PID until someone else verifies that your hardware works.
|
||||
* @section chamber temp
|
||||
*/
|
||||
//#define PIDTEMPCHAMBER
|
||||
//#define CHAMBER_LIMIT_SWITCHING
|
||||
@@ -809,7 +824,7 @@
|
||||
|
||||
#if ENABLED(PIDTEMPCHAMBER)
|
||||
#define MIN_CHAMBER_POWER 0
|
||||
//#define PID_CHAMBER_DEBUG // Sends debug data to the serial port.
|
||||
//#define PID_CHAMBER_DEBUG // Print Chamber PID debug data to the serial port.
|
||||
|
||||
// Lasko "MyHeat Personal Heater" (200w) modified with a Fotek SSR-10DA to control only the heating element
|
||||
// and placed inside the small Creality printer enclosure tent.
|
||||
@@ -823,7 +838,6 @@
|
||||
#endif // PIDTEMPCHAMBER
|
||||
|
||||
#if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER)
|
||||
//#define PID_DEBUG // Sends debug data to the serial port. Use 'M303 D' to toggle activation.
|
||||
//#define PID_OPENLOOP // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
|
||||
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
|
||||
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
|
||||
@@ -833,7 +847,7 @@
|
||||
//#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of flash)
|
||||
#endif
|
||||
|
||||
// @section extruder
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
* Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
|
||||
@@ -901,6 +915,8 @@
|
||||
#define POLAR_SEGMENTS_PER_SECOND 5
|
||||
#endif
|
||||
|
||||
// @section delta
|
||||
|
||||
// Enable for DELTA kinematics and configure below
|
||||
//#define DELTA
|
||||
#if ENABLED(DELTA)
|
||||
@@ -960,6 +976,8 @@
|
||||
//#define DELTA_DIAGONAL_ROD_TRIM_TOWER { 0.0, 0.0, 0.0 }
|
||||
#endif
|
||||
|
||||
// @section scara
|
||||
|
||||
/**
|
||||
* MORGAN_SCARA was developed by QHARLEY in South Africa in 2012-2013.
|
||||
* Implemented and slightly reworked by JCERNY in June, 2014.
|
||||
@@ -1003,6 +1021,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
// @section tpara
|
||||
|
||||
// Enable for TPARA kinematics and configure below
|
||||
//#define AXEL_TPARA
|
||||
#if ENABLED(AXEL_TPARA)
|
||||
@@ -1029,6 +1049,8 @@
|
||||
#define PSI_HOMING_OFFSET 0
|
||||
#endif
|
||||
|
||||
// @section machine
|
||||
|
||||
// Articulated robot (arm). Joints are directly mapped to axes with no kinematics.
|
||||
//#define ARTICULATED_ROBOT_ARM
|
||||
|
||||
@@ -1040,7 +1062,7 @@
|
||||
//============================== Endstop Settings ===========================
|
||||
//===========================================================================
|
||||
|
||||
// @section homing
|
||||
// @section endstops
|
||||
|
||||
// Specify here all the endstop connectors that are connected to any endstop or probe.
|
||||
// Almost all printers will be using one per axis. Probes will use one or more of the
|
||||
@@ -1680,7 +1702,7 @@
|
||||
#define DISABLE_E false // Disable the extruder when not stepping
|
||||
#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled
|
||||
|
||||
// @section machine
|
||||
// @section motion
|
||||
|
||||
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
|
||||
#if ENABLED(DriverA4988)
|
||||
@@ -1746,7 +1768,7 @@
|
||||
//#define V_HOME_DIR -1
|
||||
//#define W_HOME_DIR -1
|
||||
|
||||
// @section machine
|
||||
// @section geometry
|
||||
|
||||
// The size of the printable area
|
||||
#if ANY(TitanExtruder, H2Extruder)
|
||||
@@ -1979,6 +2001,15 @@
|
||||
#define LEVELING_BED_TEMP 50
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Bed Distance Sensor
|
||||
*
|
||||
* Measures the distance from bed to nozzle with accuracy of 0.01mm.
|
||||
* For information about this sensor https://github.com/markniu/Bed_Distance_sensor
|
||||
* Uses I2C port, so it requires I2C library markyue/Panda_SoftMasterI2C.
|
||||
*/
|
||||
//#define BD_SENSOR
|
||||
|
||||
/**
|
||||
* Enable detailed logging of G28, G29, M48, etc.
|
||||
* Turn on with the command 'M111 S32'.
|
||||
@@ -2218,9 +2249,8 @@
|
||||
#define XY_DIAG_BD 282.8427124746
|
||||
#define XY_SIDE_AD 200
|
||||
|
||||
// Or, set the default skew factors directly here
|
||||
// to override the above measurements:
|
||||
#define XY_SKEW_FACTOR 0.0
|
||||
// Or, set the XY skew factor directly:
|
||||
//#define XY_SKEW_FACTOR 0.0
|
||||
|
||||
//#define SKEW_CORRECTION_FOR_Z
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
@@ -2229,8 +2259,10 @@
|
||||
#define YZ_DIAG_AC 282.8427124746
|
||||
#define YZ_DIAG_BD 282.8427124746
|
||||
#define YZ_SIDE_AD 200
|
||||
#define XZ_SKEW_FACTOR 0.0
|
||||
#define YZ_SKEW_FACTOR 0.0
|
||||
|
||||
// Or, set the Z skew factors directly:
|
||||
//#define XZ_SKEW_FACTOR 0.0
|
||||
//#define YZ_SKEW_FACTOR 0.0
|
||||
#endif
|
||||
|
||||
// Enable this option for M852 to set skew at runtime
|
||||
@@ -2241,7 +2273,7 @@
|
||||
//============================= Additional Features ===========================
|
||||
//=============================================================================
|
||||
|
||||
// @section extras
|
||||
// @section eeprom
|
||||
|
||||
/**
|
||||
* EEPROM
|
||||
@@ -2261,6 +2293,8 @@
|
||||
//#define EEPROM_INIT_NOW // Init EEPROM on first boot after a new build.
|
||||
#endif
|
||||
|
||||
// @section host
|
||||
|
||||
//
|
||||
// Host Keepalive
|
||||
//
|
||||
@@ -2284,7 +2318,7 @@
|
||||
// @section temperature
|
||||
|
||||
//
|
||||
// Preheat Constants - Up to 6 are supported without changes
|
||||
// Preheat Constants - Up to 10 are supported without changes
|
||||
//
|
||||
#define PREHEAT_1_LABEL "PLA"
|
||||
#define PREHEAT_1_TEMP_HOTEND 180
|
||||
@@ -2298,6 +2332,8 @@
|
||||
#define PREHEAT_2_TEMP_CHAMBER 35
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
// @section motion
|
||||
|
||||
/**
|
||||
* Nozzle Park
|
||||
*
|
||||
@@ -2396,6 +2432,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
// @section host
|
||||
|
||||
/**
|
||||
* Print Job Timer
|
||||
*
|
||||
@@ -2439,6 +2477,8 @@
|
||||
#define PRINTCOUNTER_SAVE_INTERVAL 60 // (minutes) EEPROM save interval during print
|
||||
#endif
|
||||
|
||||
// @section security
|
||||
|
||||
/**
|
||||
* Password
|
||||
*
|
||||
@@ -2474,7 +2514,7 @@
|
||||
//============================= LCD and SD support ============================
|
||||
//=============================================================================
|
||||
|
||||
// @section lcd
|
||||
// @section interface
|
||||
|
||||
/**
|
||||
* LCD LANGUAGE
|
||||
@@ -2590,6 +2630,16 @@
|
||||
//
|
||||
//#define REVERSE_SELECT_DIRECTION
|
||||
|
||||
//
|
||||
// Encoder EMI Noise Filter
|
||||
//
|
||||
// This option increases encoder samples to filter out phantom encoder clicks caused by EMI noise.
|
||||
//
|
||||
//#define ENCODER_NOISE_FILTER
|
||||
#if ENABLED(ENCODER_NOISE_FILTER)
|
||||
#define ENCODER_SAMPLES 10
|
||||
#endif
|
||||
|
||||
//
|
||||
// Individual Axis Homing
|
||||
//
|
||||
@@ -2620,6 +2670,7 @@
|
||||
//======================== LCD / Controller Selection =========================
|
||||
//======================== (Character-based LCDs) =========================
|
||||
//=============================================================================
|
||||
// @section lcd
|
||||
|
||||
//
|
||||
// RepRapDiscount Smart Controller.
|
||||
@@ -3208,6 +3259,7 @@
|
||||
//
|
||||
//#define DWIN_CREALITY_LCD // Creality UI
|
||||
//#define DWIN_LCD_PROUI // Pro UI by MRiscoC
|
||||
//#define DWIN_CREALITY_LCD_JYERSUI // Jyers UI by Jacob Myers
|
||||
//#define DWIN_MARLINUI_PORTRAIT // MarlinUI (portrait orientation)
|
||||
//#define DWIN_MARLINUI_LANDSCAPE // MarlinUI (landscape orientation)
|
||||
|
||||
@@ -3216,10 +3268,11 @@
|
||||
//
|
||||
//#define TOUCH_SCREEN
|
||||
#if ENABLED(TOUCH_SCREEN)
|
||||
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
|
||||
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
|
||||
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
|
||||
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
|
||||
|
||||
//#define TOUCH_IDLE_SLEEP 300 // (s) Turn off the TFT backlight if set (5mn)
|
||||
//#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
|
||||
|
||||
@@ -3254,7 +3307,7 @@
|
||||
//=============================== Extra Features ==============================
|
||||
//=============================================================================
|
||||
|
||||
// @section extras
|
||||
// @section fans
|
||||
|
||||
// Set number of user-controlled fans. Disable to use all board-defined fans.
|
||||
// :[1,2,3,4,5,6,7,8]
|
||||
@@ -3278,14 +3331,18 @@
|
||||
// duty cycle is attained.
|
||||
//#define SOFT_PWM_DITHER
|
||||
|
||||
// @section extras
|
||||
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
// @section lights
|
||||
|
||||
// Temperature status LEDs that display the hotend and bed temperature.
|
||||
// If all hotends, bed temperature, and target temperature are under 54C
|
||||
// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
|
||||
//#define TEMP_STAT_LEDS
|
||||
|
||||
// Support for the BariCUDA Paste Extruder
|
||||
//#define BARICUDA
|
||||
|
||||
// Support for BlinkM/CyzRgb
|
||||
//#define BLINKM
|
||||
|
||||
@@ -3306,16 +3363,19 @@
|
||||
* luminance values can be set from 0 to 255.
|
||||
* For NeoPixel LED an overall brightness parameter is also available.
|
||||
*
|
||||
* *** CAUTION ***
|
||||
* === CAUTION ===
|
||||
* LED Strips require a MOSFET Chip between PWM lines and LEDs,
|
||||
* as the Arduino cannot handle the current the LEDs will require.
|
||||
* Failure to follow this precaution can destroy your Arduino!
|
||||
*
|
||||
* NOTE: A separate 5V power supply is required! The NeoPixel LED needs
|
||||
* more current than the Arduino 5V linear regulator can produce.
|
||||
* *** CAUTION ***
|
||||
*
|
||||
* LED Type. Enable only one of the following two options.
|
||||
* Requires PWM frequency between 50 <> 100Hz (Check HAL or variant)
|
||||
* Use FAST_PWM_FAN, if possible, to reduce fan noise.
|
||||
*/
|
||||
|
||||
// LED Type. Enable only one of the following two options:
|
||||
//#define RGB_LED
|
||||
//#define RGBW_LED
|
||||
|
||||
@@ -3324,6 +3384,10 @@
|
||||
//#define RGB_LED_G_PIN 43
|
||||
//#define RGB_LED_B_PIN 35
|
||||
//#define RGB_LED_W_PIN -1
|
||||
//#define RGB_STARTUP_TEST // For PWM pins, fade between all colors
|
||||
#if ENABLED(RGB_STARTUP_TEST)
|
||||
#define RGB_STARTUP_TEST_INNER_MS 10 // (ms) Reduce or increase fading speed
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Support for Adafruit NeoPixel LED driver
|
||||
@@ -3370,6 +3434,8 @@
|
||||
#define PRINTER_EVENT_LEDS
|
||||
#endif
|
||||
|
||||
// @section servos
|
||||
|
||||
/**
|
||||
* Number of servos
|
||||
*
|
||||
|
||||
+126
-38
@@ -30,7 +30,25 @@
|
||||
*
|
||||
* Basic settings can be found in Configuration.h
|
||||
*/
|
||||
#define CONFIGURATION_ADV_H_VERSION 02010100
|
||||
#define CONFIGURATION_ADV_H_VERSION 02010200
|
||||
|
||||
// @section develop
|
||||
|
||||
/**
|
||||
* Configuration Export
|
||||
*
|
||||
* Export the configuration as part of the build. (See signature.py)
|
||||
* Output files are saved with the build (e.g., .pio/build/mega2560).
|
||||
*
|
||||
* See `build_all_examples --ini` as an example of config.ini archiving.
|
||||
*
|
||||
* 1 = marlin_config.json - Dictionary containing the configuration.
|
||||
* This file is also generated for CONFIGURATION_EMBEDDING.
|
||||
* 2 = config.ini - File format for PlatformIO preprocessing.
|
||||
* 3 = schema.json - The entire configuration schema. (13 = pattern groups)
|
||||
* 4 = schema.yml - The entire configuration schema.
|
||||
*/
|
||||
//#define CONFIG_EXPORT 2 // :[1:'JSON', 2:'config.ini', 3:'schema.json', 4:'schema.yml']
|
||||
|
||||
//===========================================================================
|
||||
//============================= Thermal Settings ============================
|
||||
@@ -463,18 +481,22 @@
|
||||
// before a min_temp_error is triggered. (Shouldn't be more than 10.)
|
||||
//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
|
||||
|
||||
// The number of milliseconds a hotend will preheat before starting to check
|
||||
// the temperature. This value should NOT be set to the time it takes the
|
||||
// hot end to reach the target temperature, but the time it takes to reach
|
||||
// the minimum temperature your thermistor can read. The lower the better/safer.
|
||||
// This shouldn't need to be more than 30 seconds (30000)
|
||||
/**
|
||||
* The number of milliseconds a hotend will preheat before starting to check
|
||||
* the temperature. This value should NOT be set to the time it takes the
|
||||
* hot end to reach the target temperature, but the time it takes to reach
|
||||
* the minimum temperature your thermistor can read. The lower the better/safer.
|
||||
* This shouldn't need to be more than 30 seconds (30000)
|
||||
*/
|
||||
//#define MILLISECONDS_PREHEAT_TIME 0
|
||||
|
||||
// @section extruder
|
||||
|
||||
// Extruder runout prevention.
|
||||
// If the machine is idle and the temperature over MINTEMP
|
||||
// then extrude some filament every couple of SECONDS.
|
||||
/**
|
||||
* Extruder runout prevention.
|
||||
* If the machine is idle and the temperature over MINTEMP
|
||||
* then extrude some filament every couple of SECONDS.
|
||||
*/
|
||||
//#define EXTRUDER_RUNOUT_PREVENT
|
||||
#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
|
||||
#define EXTRUDER_RUNOUT_MINTEMP 190
|
||||
@@ -885,7 +907,8 @@
|
||||
#define HOMING_BUMP_MM { 5, 5, 2 } // (linear=mm, rotational=°) Backoff from endstops after first bump
|
||||
#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
|
||||
|
||||
//#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (linear=mm, rotational=°) Backoff from endstops after homing
|
||||
//#define HOMING_BACKOFF_POST_MM { 8, 8, 2 } // (linear=mm, rotational=°) Backoff from endstops after homing
|
||||
//#define XY_COUNTERPART_BACKOFF_MM 0 // (mm) Backoff X after homing Y, and vice-versa
|
||||
|
||||
#define QUICK_HOME // If G28 contains XY do a diagonal move first
|
||||
//#define HOME_Y_BEFORE_X // If G28 contains XY home Y before X
|
||||
@@ -973,9 +996,12 @@
|
||||
#define Z_STEPPER_AUTO_ALIGN
|
||||
#endif
|
||||
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
||||
// Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]]
|
||||
// If not defined, probe limits will be used.
|
||||
// Override with 'M422 S<index> X<pos> Y<pos>'
|
||||
/**
|
||||
* Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]]
|
||||
* These positions are machine-relative and do not shift with the M206 home offset!
|
||||
* If not defined, probe limits will be used.
|
||||
* Override with 'M422 S<index> X<pos> Y<pos>'.
|
||||
*/
|
||||
//#define Z_STEPPER_ALIGN_XY { { 10, 190 }, { 100, 10 }, { 190, 190 } }
|
||||
|
||||
/**
|
||||
@@ -1336,7 +1362,7 @@
|
||||
//
|
||||
// LCD Backlight Timeout
|
||||
//
|
||||
//#define LCD_BACKLIGHT_TIMEOUT 30 // (s) Timeout before turning off the backlight
|
||||
//#define LCD_BACKLIGHT_TIMEOUT_MINS 1 // (minutes) Timeout before turning off the backlight
|
||||
|
||||
#if HAS_BED_PROBE && EITHER(HAS_MARLINUI_MENU, HAS_TFT_LVGL_UI)
|
||||
//#define PROBE_OFFSET_WIZARD // Add a Probe Z Offset calibration option to the LCD menu
|
||||
@@ -1388,7 +1414,7 @@
|
||||
|
||||
#endif // HAS_MARLINUI_MENU
|
||||
|
||||
#if EITHER(HAS_DISPLAY, DWIN_LCD_PROUI)
|
||||
#if ANY(HAS_DISPLAY, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
//#define SOUND_MENU_ITEM // Add a mute option to the LCD menu
|
||||
#define SOUND_ON_DEFAULT // Buzzer/speaker default enabled state
|
||||
#endif
|
||||
@@ -1593,6 +1619,7 @@
|
||||
|
||||
#define LONG_FILENAME_HOST_SUPPORT // Get the long filename of a file/folder with 'M33 <dosname>' and list long filenames with 'M20 L'
|
||||
//#define LONG_FILENAME_WRITE_SUPPORT // Create / delete files with long filenames via M28, M30, and Binary Transfer Protocol
|
||||
//#define M20_TIMESTAMP_SUPPORT // Include timestamps by adding the 'T' flag to M20 commands
|
||||
|
||||
//#define SCROLL_LONG_FILENAMES // Scroll long filenames in the SD card menu
|
||||
|
||||
@@ -1604,6 +1631,9 @@
|
||||
* Endstops must be activated for this option to work.
|
||||
*/
|
||||
//#define SD_ABORT_ON_ENDSTOP_HIT
|
||||
#if ENABLED(SD_ABORT_ON_ENDSTOP_HIT)
|
||||
//#define SD_ABORT_ON_ENDSTOP_HIT_GCODE "G28XY" // G-code to run on endstop hit (e.g., "G28XY" or "G27")
|
||||
#endif
|
||||
|
||||
//#define SD_REPRINT_LAST_SELECTED_FILE // On print completion open the LCD Menu and select the same file
|
||||
|
||||
@@ -1638,6 +1668,8 @@
|
||||
//#define USE_UHS2_USB
|
||||
//#define USE_UHS3_USB
|
||||
|
||||
#define DISABLE_DUE_SD_MMC // Disable USB Host access to USB Drive to prevent hangs on block access for DUE platform
|
||||
|
||||
/**
|
||||
* Native USB Host supported by some boards (USB OTG)
|
||||
*/
|
||||
@@ -1749,7 +1781,7 @@
|
||||
* 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
|
||||
//#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
|
||||
@@ -2071,15 +2103,14 @@
|
||||
*
|
||||
* See https://marlinfw.org/docs/features/lin_advance.html for full instructions.
|
||||
*/
|
||||
#if DISABLED(Driver2208)
|
||||
#define LIN_ADVANCE
|
||||
#endif
|
||||
#define LIN_ADVANCE
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
//#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants
|
||||
//#define EXTRA_LIN_ADVANCE_K // Add a second linear advance constant, configurable with M900.
|
||||
#define LIN_ADVANCE_K 0.0 // Unit: mm compression per 1mm/s extruder speed
|
||||
//#define LA_DEBUG // If enabled, this will generate debug information output over USB.
|
||||
//#define EXPERIMENTAL_SCURVE // Enable this option to permit S-Curve Acceleration
|
||||
//#define LA_DEBUG // Print debug information to serial during operation. Disable for production use.
|
||||
#define EXPERIMENTAL_SCURVE // Allow S-Curve Acceleration to be used with LA.
|
||||
#define ALLOW_LOW_EJERK // Allow a DEFAULT_EJERK value of <10. Recommended for direct drive hotends.
|
||||
//#define EXPERIMENTAL_I2S_LA // Allow I2S_STEPPER_STREAM to be used with LA. Performance degrades as the LA step rate reaches ~20kHz.
|
||||
#endif
|
||||
|
||||
// @section leveling
|
||||
@@ -2537,7 +2568,7 @@
|
||||
// Longer prime to clean out a SINGLENOZZLE
|
||||
#define TOOLCHANGE_FS_EXTRA_PRIME 0 // (mm) Extra priming length
|
||||
#define TOOLCHANGE_FS_PRIME_SPEED (4.6*60) // (mm/min) Extra priming feedrate
|
||||
#define TOOLCHANGE_FS_WIPE_RETRACT 0 // (mm) Retract before cooling for less stringing, better wipe, etc.
|
||||
#define TOOLCHANGE_FS_WIPE_RETRACT 0 // (mm) Cutting retraction out of park, for less stringing, better wipe, etc. Adjust with LCD or M217 G.
|
||||
|
||||
// Cool after prime to reduce stringing
|
||||
#define TOOLCHANGE_FS_FAN -1 // Fan index or -1 to skip
|
||||
@@ -2583,6 +2614,8 @@
|
||||
#endif
|
||||
#endif // HAS_MULTI_EXTRUDER
|
||||
|
||||
// @section advanced pause
|
||||
|
||||
/**
|
||||
* Advanced Pause for Filament Change
|
||||
* - Adds the G-code M600 Filament Change to initiate a filament change.
|
||||
@@ -2641,13 +2674,12 @@
|
||||
#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
|
||||
#endif
|
||||
|
||||
// @section tmc
|
||||
|
||||
/**
|
||||
* TMC26X Stepper Driver options
|
||||
*
|
||||
* The TMC26XStepper library is required for this stepper driver.
|
||||
* https://github.com/trinamic/TMC26XStepper
|
||||
* @section tmc/tmc26x
|
||||
*/
|
||||
#if HAS_DRIVER(TMC26X)
|
||||
|
||||
@@ -2785,8 +2817,6 @@
|
||||
|
||||
#endif // TMC26X
|
||||
|
||||
// @section tmc_smart
|
||||
|
||||
/**
|
||||
* To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
|
||||
* connect your SPI pins to the hardware SPI interface on your board and define
|
||||
@@ -2802,6 +2832,7 @@
|
||||
*
|
||||
* TMCStepper library is required to use TMC stepper drivers.
|
||||
* https://github.com/teemuatlut/TMCStepper
|
||||
* @section tmc/config
|
||||
*/
|
||||
#if HAS_TRINAMIC_CONFIG
|
||||
|
||||
@@ -3025,6 +3056,8 @@
|
||||
//#define E7_HOLD_MULTIPLIER 0.5
|
||||
#endif
|
||||
|
||||
// @section tmc/spi
|
||||
|
||||
/**
|
||||
* Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
|
||||
* The default pins can be found in your board's pins file.
|
||||
@@ -3062,6 +3095,8 @@
|
||||
//#define TMC_SW_MISO -1
|
||||
//#define TMC_SW_SCK -1
|
||||
|
||||
// @section tmc/serial
|
||||
|
||||
/**
|
||||
* Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses.
|
||||
* Set the address using jumpers on pins MS1 and MS2.
|
||||
@@ -3097,6 +3132,8 @@
|
||||
//#define E6_SLAVE_ADDRESS 0
|
||||
//#define E7_SLAVE_ADDRESS 0
|
||||
|
||||
// @section tmc/smart
|
||||
|
||||
/**
|
||||
* Software enable
|
||||
*
|
||||
@@ -3105,6 +3142,8 @@
|
||||
*/
|
||||
//#define SOFTWARE_DRIVER_ENABLE
|
||||
|
||||
// @section tmc/stealthchop
|
||||
|
||||
/**
|
||||
* TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only
|
||||
* Use Trinamic's ultra quiet stepping mode.
|
||||
@@ -3159,6 +3198,8 @@
|
||||
//#define CHOPPER_TIMING_E6 CHOPPER_TIMING_E
|
||||
//#define CHOPPER_TIMING_E7 CHOPPER_TIMING_E
|
||||
|
||||
// @section tmc/status
|
||||
|
||||
/**
|
||||
* Monitor Trinamic drivers
|
||||
* for error conditions like overtemperature and short to ground.
|
||||
@@ -3178,6 +3219,8 @@
|
||||
#define STOP_ON_ERROR
|
||||
#endif
|
||||
|
||||
// @section tmc/hybrid
|
||||
|
||||
/**
|
||||
* TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only
|
||||
* The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
|
||||
@@ -3234,6 +3277,7 @@
|
||||
* homing and adds a guard period for endstop triggering.
|
||||
*
|
||||
* Comment *_STALL_SENSITIVITY to disable sensorless homing for that axis.
|
||||
* @section tmc/stallguard
|
||||
*/
|
||||
//#define SENSORLESS_HOMING // StallGuard capable drivers only
|
||||
|
||||
@@ -3257,6 +3301,8 @@
|
||||
//#define IMPROVE_HOMING_RELIABILITY
|
||||
#endif
|
||||
|
||||
// @section tmc/config
|
||||
|
||||
/**
|
||||
* TMC Homing stepper phase.
|
||||
*
|
||||
@@ -3296,7 +3342,6 @@
|
||||
|
||||
#endif // HAS_TRINAMIC_CONFIG
|
||||
|
||||
|
||||
// @section i2cbus
|
||||
|
||||
//
|
||||
@@ -3338,7 +3383,7 @@
|
||||
#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
|
||||
#endif
|
||||
|
||||
// @section extras
|
||||
// @section photo
|
||||
|
||||
/**
|
||||
* Photo G-code
|
||||
@@ -3381,6 +3426,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// @section cnc
|
||||
|
||||
/**
|
||||
* Spindle & Laser control
|
||||
*
|
||||
@@ -3584,6 +3631,8 @@
|
||||
#define COOLANT_FLOOD_INVERT false // Set "true" if the on/off function is reversed
|
||||
#endif
|
||||
|
||||
// @section filament width
|
||||
|
||||
/**
|
||||
* Filament Width Sensor
|
||||
*
|
||||
@@ -3617,6 +3666,8 @@
|
||||
//#define FILAMENT_LCD_DISPLAY
|
||||
#endif
|
||||
|
||||
// @section power
|
||||
|
||||
/**
|
||||
* Power Monitor
|
||||
* Monitor voltage (V) and/or current (A), and -when possible- power (W)
|
||||
@@ -3640,6 +3691,8 @@
|
||||
#define POWER_MONITOR_VOLTAGE_OFFSET 0 // Offset (in volts) applied to the calculated voltage
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
* Stepper Driver Anti-SNAFU Protection
|
||||
*
|
||||
@@ -3649,6 +3702,8 @@
|
||||
*/
|
||||
//#define DISABLE_DRIVER_SAFE_POWER_PROTECT
|
||||
|
||||
// @section cnc
|
||||
|
||||
/**
|
||||
* CNC Coordinate Systems
|
||||
*
|
||||
@@ -3657,6 +3712,8 @@
|
||||
*/
|
||||
//#define CNC_COORDINATE_SYSTEMS
|
||||
|
||||
// @section reporting
|
||||
|
||||
/**
|
||||
* Auto-report fan speed with M123 S<seconds>
|
||||
* Requires fans with tachometer pins
|
||||
@@ -3684,6 +3741,8 @@
|
||||
//#define M115_GEOMETRY_REPORT
|
||||
#endif
|
||||
|
||||
// @section security
|
||||
|
||||
/**
|
||||
* Expected Printer Check
|
||||
* Add the M16 G-code to compare a string to the MACHINE_NAME.
|
||||
@@ -3691,6 +3750,8 @@
|
||||
*/
|
||||
//#define EXPECTED_PRINTER_CHECK
|
||||
|
||||
// @section volumetrics
|
||||
|
||||
/**
|
||||
* Disable all Volumetric extrusion options
|
||||
*/
|
||||
@@ -3719,14 +3780,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Enable this option for a leaner build of Marlin that removes all
|
||||
* workspace offsets, simplifying coordinate transformations, leveling, etc.
|
||||
*
|
||||
* - M206 and M428 are disabled.
|
||||
* - G92 will revert to its behavior from Marlin 1.0.
|
||||
*/
|
||||
//#define NO_WORKSPACE_OFFSETS
|
||||
// @section reporting
|
||||
|
||||
// Extra options for the M114 "Current Position" report
|
||||
//#define M114_DETAIL // Use 'M114` for details to check planner calculations
|
||||
@@ -3735,6 +3789,8 @@
|
||||
|
||||
//#define REPORT_FAN_CHANGE // Report the new fan speed when changed by M106 (and others)
|
||||
|
||||
// @section gcode
|
||||
|
||||
/**
|
||||
* Spend 28 bytes of SRAM to optimize the G-code parser
|
||||
*/
|
||||
@@ -3752,6 +3808,15 @@
|
||||
|
||||
//#define REPETIER_GCODE_M360 // Add commands originally from Repetier FW
|
||||
|
||||
/**
|
||||
* Enable this option for a leaner build of Marlin that removes all
|
||||
* workspace offsets, simplifying coordinate transformations, leveling, etc.
|
||||
*
|
||||
* - M206 and M428 are disabled.
|
||||
* - G92 will revert to its behavior from Marlin 1.0.
|
||||
*/
|
||||
//#define NO_WORKSPACE_OFFSETS
|
||||
|
||||
/**
|
||||
* CNC G-code options
|
||||
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
|
||||
@@ -3767,6 +3832,8 @@
|
||||
//#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
|
||||
#endif
|
||||
|
||||
// @section gcode
|
||||
|
||||
/**
|
||||
* Startup commands
|
||||
*
|
||||
@@ -3828,6 +3895,8 @@
|
||||
//#define MAIN_MENU_ITEM_5_CONFIRM
|
||||
#endif
|
||||
|
||||
// @section custom config menu
|
||||
|
||||
// Custom Menu: Configuration Menu
|
||||
//#define CUSTOM_MENU_CONFIG
|
||||
#if ENABLED(CUSTOM_MENU_CONFIG)
|
||||
@@ -3858,6 +3927,8 @@
|
||||
//#define CONFIG_MENU_ITEM_5_CONFIRM
|
||||
#endif
|
||||
|
||||
// @section custom buttons
|
||||
|
||||
/**
|
||||
* User-defined buttons to run custom G-code.
|
||||
* Up to 25 may be defined.
|
||||
@@ -3889,6 +3960,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// @section host
|
||||
|
||||
/**
|
||||
* Host Action Commands
|
||||
*
|
||||
@@ -3914,6 +3987,8 @@
|
||||
//#define HOST_SHUTDOWN_MENU_ITEM // Add a menu item that tells the host to shut down
|
||||
#endif
|
||||
|
||||
// @section extras
|
||||
|
||||
/**
|
||||
* Cancel Objects
|
||||
*
|
||||
@@ -3935,6 +4010,7 @@
|
||||
* Alternative Supplier: https://reliabuild3d.com/
|
||||
*
|
||||
* Reliabuild encoders have been modified to improve reliability.
|
||||
* @section i2c encoders
|
||||
*/
|
||||
|
||||
//#define I2C_POSITION_ENCODERS
|
||||
@@ -4006,6 +4082,7 @@
|
||||
|
||||
/**
|
||||
* Analog Joystick(s)
|
||||
* @section joystick
|
||||
*/
|
||||
//#define JOYSTICK
|
||||
#if ENABLED(JOYSTICK)
|
||||
@@ -4030,6 +4107,7 @@
|
||||
* Modern replacement for the Prusa TMC_Z_CALIBRATION.
|
||||
* Adds capability to work with any adjustable current drivers.
|
||||
* Implemented as G34 because M915 is deprecated.
|
||||
* @section calibrate
|
||||
*/
|
||||
//#define MECHANICAL_GANTRY_CALIBRATION
|
||||
#if ENABLED(MECHANICAL_GANTRY_CALIBRATION)
|
||||
@@ -4047,6 +4125,7 @@
|
||||
/**
|
||||
* Instant freeze / unfreeze functionality
|
||||
* Potentially useful for emergency stop that allows being resumed.
|
||||
* @section interface
|
||||
*/
|
||||
//#define FREEZE_FEATURE
|
||||
#if ENABLED(FREEZE_FEATURE)
|
||||
@@ -4059,6 +4138,7 @@
|
||||
*
|
||||
* Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
|
||||
* Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
|
||||
* @section debug matrix
|
||||
*/
|
||||
//#define MAX7219_DEBUG
|
||||
#if ENABLED(MAX7219_DEBUG)
|
||||
@@ -4097,6 +4177,7 @@
|
||||
* Support for Synchronized Z moves when used with NanoDLP. G0/G1 axis moves will
|
||||
* output a "Z_move_comp" string to enable synchronization with DLP projector exposure.
|
||||
* This feature allows you to use [[WaitForDoneMessage]] instead of M400 commands.
|
||||
* @section nanodlp
|
||||
*/
|
||||
//#define NANODLP_Z_SYNC
|
||||
#if ENABLED(NANODLP_Z_SYNC)
|
||||
@@ -4105,6 +4186,7 @@
|
||||
|
||||
/**
|
||||
* Ethernet. Use M552 to enable and set the IP address.
|
||||
* @section network
|
||||
*/
|
||||
#if HAS_ETHERNET
|
||||
#define MAC_ADDRESS { 0xDE, 0xAD, 0xBE, 0xEF, 0xF0, 0x0D } // A MAC address unique to your network
|
||||
@@ -4113,7 +4195,7 @@
|
||||
/**
|
||||
* WiFi Support (Espressif ESP32 WiFi)
|
||||
*/
|
||||
//#define WIFISUPPORT // Marlin embedded WiFi managenent
|
||||
//#define WIFISUPPORT // Marlin embedded WiFi management
|
||||
//#define ESP3D_WIFISUPPORT // ESP3D Library WiFi management (https://github.com/luc-github/ESP3DLib)
|
||||
|
||||
#if EITHER(WIFISUPPORT, ESP3D_WIFISUPPORT)
|
||||
@@ -4132,6 +4214,8 @@
|
||||
//#include "Configuration_Secure.h" // External file with WiFi SSID / Password
|
||||
#endif
|
||||
|
||||
// @section multi-material
|
||||
|
||||
/**
|
||||
* Průša Multi-Material Unit (MMU)
|
||||
* Enable in Configuration.h
|
||||
@@ -4237,6 +4321,7 @@
|
||||
|
||||
/**
|
||||
* Advanced Print Counter settings
|
||||
* @section stats
|
||||
*/
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
#define SERVICE_WARNING_BUZZES 3
|
||||
@@ -4266,6 +4351,9 @@
|
||||
//
|
||||
//#define PINS_DEBUGGING
|
||||
|
||||
// Enable Tests that will run at startup and produce a report
|
||||
//#define MARLIN_TEST_BUILD
|
||||
|
||||
// Enable Marlin dev mode which adds some special commands
|
||||
//#define MARLIN_DEV_MODE
|
||||
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
#define STRING_DISTRIBUTION_DATE "2022-07-17"
|
||||
#define STRING_DISTRIBUTION_DATE "2022-09-14"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
#
|
||||
# Marlin Firmware
|
||||
# config.ini - Options to apply before the build
|
||||
#
|
||||
[config:base]
|
||||
ini_use_config = none
|
||||
|
||||
# Load all config: sections in this file
|
||||
;ini_use_config = all
|
||||
# Load config file relative to Marlin/
|
||||
;ini_use_config = another.ini
|
||||
# Download configurations from GitHub
|
||||
;ini_use_config = example/Creality/Ender-5 Plus @ bugfix-2.1.x
|
||||
# Download configurations from your server
|
||||
;ini_use_config = https://me.myserver.com/path/to/configs
|
||||
# Evaluate config:base and do a config dump
|
||||
;ini_use_config = base
|
||||
;config_export = 2
|
||||
|
||||
[config:minimal]
|
||||
motherboard = BOARD_RAMPS_14_EFB
|
||||
serial_port = 0
|
||||
baudrate = 250000
|
||||
|
||||
use_watchdog = on
|
||||
thermal_protection_hotends = on
|
||||
thermal_protection_hysteresis = 4
|
||||
thermal_protection_period = 40
|
||||
|
||||
bufsize = 4
|
||||
block_buffer_size = 16
|
||||
max_cmd_size = 96
|
||||
|
||||
extruders = 1
|
||||
temp_sensor_0 = 1
|
||||
|
||||
temp_hysteresis = 3
|
||||
heater_0_mintemp = 5
|
||||
heater_0_maxtemp = 275
|
||||
preheat_1_temp_hotend = 180
|
||||
|
||||
bang_max = 255
|
||||
pidtemp = on
|
||||
pid_k1 = 0.95
|
||||
pid_max = BANG_MAX
|
||||
pid_functional_range = 10
|
||||
|
||||
default_kp = 22.20
|
||||
default_ki = 1.08
|
||||
default_kd = 114.00
|
||||
|
||||
x_driver_type = A4988
|
||||
y_driver_type = A4988
|
||||
z_driver_type = A4988
|
||||
e0_driver_type = A4988
|
||||
|
||||
x_bed_size = 200
|
||||
x_min_pos = 0
|
||||
x_max_pos = X_BED_SIZE
|
||||
|
||||
y_bed_size = 200
|
||||
y_min_pos = 0
|
||||
y_max_pos = Y_BED_SIZE
|
||||
|
||||
z_min_pos = 0
|
||||
z_max_pos = 200
|
||||
|
||||
x_home_dir = -1
|
||||
y_home_dir = -1
|
||||
z_home_dir = -1
|
||||
|
||||
use_xmin_plug = on
|
||||
use_ymin_plug = on
|
||||
use_zmin_plug = on
|
||||
|
||||
x_min_endstop_inverting = false
|
||||
y_min_endstop_inverting = false
|
||||
z_min_endstop_inverting = false
|
||||
|
||||
default_axis_steps_per_unit = { 80, 80, 400, 500 }
|
||||
axis_relative_modes = { false, false, false, false }
|
||||
default_max_feedrate = { 300, 300, 5, 25 }
|
||||
default_max_acceleration = { 3000, 3000, 100, 10000 }
|
||||
|
||||
homing_feedrate_mm_m = { (50*60), (50*60), (4*60) }
|
||||
homing_bump_divisor = { 2, 2, 4 }
|
||||
|
||||
x_enable_on = 0
|
||||
y_enable_on = 0
|
||||
z_enable_on = 0
|
||||
e_enable_on = 0
|
||||
|
||||
invert_x_dir = false
|
||||
invert_y_dir = true
|
||||
invert_z_dir = false
|
||||
invert_e0_dir = false
|
||||
|
||||
invert_e_step_pin = false
|
||||
invert_x_step_pin = false
|
||||
invert_y_step_pin = false
|
||||
invert_z_step_pin = false
|
||||
|
||||
disable_x = false
|
||||
disable_y = false
|
||||
disable_z = false
|
||||
disable_e = false
|
||||
|
||||
proportional_font_ratio = 1.0
|
||||
default_nominal_filament_dia = 1.75
|
||||
|
||||
junction_deviation_mm = 0.013
|
||||
|
||||
default_acceleration = 3000
|
||||
default_travel_acceleration = 3000
|
||||
default_retract_acceleration = 3000
|
||||
|
||||
default_minimumfeedrate = 0.0
|
||||
default_mintravelfeedrate = 0.0
|
||||
|
||||
minimum_planner_speed = 0.05
|
||||
min_steps_per_segment = 6
|
||||
default_minsegmenttime = 20000
|
||||
|
||||
[config:basic]
|
||||
bed_overshoot = 10
|
||||
busy_while_heating = on
|
||||
default_ejerk = 5.0
|
||||
default_keepalive_interval = 2
|
||||
default_leveling_fade_height = 0.0
|
||||
disable_inactive_extruder = on
|
||||
display_charset_hd44780 = JAPANESE
|
||||
eeprom_boot_silent = on
|
||||
eeprom_chitchat = on
|
||||
endstoppullups = on
|
||||
extrude_maxlength = 200
|
||||
extrude_mintemp = 170
|
||||
host_keepalive_feature = on
|
||||
hotend_overshoot = 15
|
||||
jd_handle_small_segments = on
|
||||
lcd_info_screen_style = 0
|
||||
lcd_language = en
|
||||
max_bed_power = 255
|
||||
mesh_inset = 0
|
||||
min_software_endstops = on
|
||||
max_software_endstops = on
|
||||
min_software_endstop_x = on
|
||||
min_software_endstop_y = on
|
||||
min_software_endstop_z = on
|
||||
max_software_endstop_x = on
|
||||
max_software_endstop_y = on
|
||||
max_software_endstop_z = on
|
||||
preheat_1_fan_speed = 0
|
||||
preheat_1_label = "PLA"
|
||||
preheat_1_temp_bed = 70
|
||||
prevent_cold_extrusion = on
|
||||
prevent_lengthy_extrude = on
|
||||
printjob_timer_autostart = on
|
||||
probing_margin = 10
|
||||
show_bootscreen = on
|
||||
soft_pwm_scale = 0
|
||||
string_config_h_author = "(none, default config)"
|
||||
temp_bed_hysteresis = 3
|
||||
temp_bed_residency_time = 10
|
||||
temp_bed_window = 1
|
||||
temp_residency_time = 10
|
||||
temp_window = 1
|
||||
validate_homing_endstops = on
|
||||
xy_probe_feedrate = (133*60)
|
||||
z_clearance_between_probes = 5
|
||||
z_clearance_deploy_probe = 10
|
||||
z_clearance_multi_probe = 5
|
||||
|
||||
[config:advanced]
|
||||
arc_support = on
|
||||
auto_report_temperatures = on
|
||||
autotemp = on
|
||||
autotemp_oldweight = 0.98
|
||||
bed_check_interval = 5000
|
||||
default_stepper_deactive_time = 120
|
||||
default_volumetric_extruder_limit = 0.00
|
||||
disable_inactive_e = true
|
||||
disable_inactive_x = true
|
||||
disable_inactive_y = true
|
||||
disable_inactive_z = true
|
||||
e0_auto_fan_pin = -1
|
||||
encoder_100x_steps_per_sec = 80
|
||||
encoder_10x_steps_per_sec = 30
|
||||
encoder_rate_multiplier = on
|
||||
extended_capabilities_report = on
|
||||
extruder_auto_fan_speed = 255
|
||||
extruder_auto_fan_temperature = 50
|
||||
fanmux0_pin = -1
|
||||
fanmux1_pin = -1
|
||||
fanmux2_pin = -1
|
||||
faster_gcode_parser = on
|
||||
homing_bump_mm = { 5, 5, 2 }
|
||||
max_arc_segment_mm = 1.0
|
||||
min_arc_segment_mm = 0.1
|
||||
min_circle_segments = 72
|
||||
n_arc_correction = 25
|
||||
serial_overrun_protection = on
|
||||
slowdown = on
|
||||
slowdown_divisor = 2
|
||||
temp_sensor_bed = 0
|
||||
thermal_protection_bed_hysteresis = 2
|
||||
thermocouple_max_errors = 15
|
||||
tx_buffer_size = 0
|
||||
watch_bed_temp_increase = 2
|
||||
watch_bed_temp_period = 60
|
||||
watch_temp_increase = 2
|
||||
watch_temp_period = 20
|
||||
@@ -35,11 +35,19 @@
|
||||
|| X_STEP_PIN == N || Y_STEP_PIN == N || Z_STEP_PIN == N \
|
||||
|| X_DIR_PIN == N || Y_DIR_PIN == N || Z_DIR_PIN == N \
|
||||
|| X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \
|
||||
|| BTN_EN1 == N || BTN_EN2 == N \
|
||||
)
|
||||
#if CONF_SERIAL_IS(0) // D0-D1. No known conflicts.
|
||||
#if CONF_SERIAL_IS(0)
|
||||
// D0-D1. No known conflicts.
|
||||
#endif
|
||||
#if CONF_SERIAL_IS(1) && (CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19))
|
||||
#error "Serial Port 1 pin D18 and/or D19 conflicts with another pin on the board."
|
||||
#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__)
|
||||
#if CONF_SERIAL_IS(1) && (CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19))
|
||||
#error "Serial Port 1 pin D18 and/or D19 conflicts with another pin on the board."
|
||||
#endif
|
||||
#else
|
||||
#if CONF_SERIAL_IS(1) && (CHECK_SERIAL_PIN(10) || CHECK_SERIAL_PIN(11))
|
||||
#error "Serial Port 1 pin D10 and/or D11 conflicts with another pin on the board."
|
||||
#endif
|
||||
#endif
|
||||
#if CONF_SERIAL_IS(2) && (CHECK_SERIAL_PIN(16) || CHECK_SERIAL_PIN(17))
|
||||
#error "Serial Port 2 pin D16 and/or D17 conflicts with another pin on the board."
|
||||
|
||||
@@ -139,22 +139,40 @@ static void IRAM_ATTR i2s_intr_handler_default(void *arg) {
|
||||
}
|
||||
|
||||
void stepperTask(void *parameter) {
|
||||
uint32_t remaining = 0;
|
||||
uint32_t nextMainISR = 0;
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
uint32_t nextAdvanceISR = Stepper::LA_ADV_NEVER;
|
||||
#endif
|
||||
|
||||
while (1) {
|
||||
for (;;) {
|
||||
xQueueReceive(dma.queue, &dma.current, portMAX_DELAY);
|
||||
dma.rw_pos = 0;
|
||||
|
||||
while (dma.rw_pos < DMA_SAMPLE_COUNT) {
|
||||
// Fill with the port data post pulse_phase until the next step
|
||||
if (remaining) {
|
||||
if (nextMainISR && TERN1(LIN_ADVANCE, nextAdvanceISR))
|
||||
i2s_push_sample();
|
||||
remaining--;
|
||||
}
|
||||
else {
|
||||
|
||||
// i2s_push_sample() is also called from Stepper::pulse_phase_isr() and Stepper::advance_isr()
|
||||
// in a rare case where both are called, we need to double decrement the counters
|
||||
const uint8_t push_count = 1 + (!nextMainISR && TERN0(LIN_ADVANCE, !nextAdvanceISR));
|
||||
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
if (!nextAdvanceISR) {
|
||||
Stepper::advance_isr();
|
||||
nextAdvanceISR = Stepper::la_interval;
|
||||
}
|
||||
else if (nextAdvanceISR == Stepper::LA_ADV_NEVER)
|
||||
nextAdvanceISR = Stepper::la_interval;
|
||||
#endif
|
||||
|
||||
if (!nextMainISR) {
|
||||
Stepper::pulse_phase_isr();
|
||||
remaining = Stepper::block_phase_isr();
|
||||
nextMainISR = Stepper::block_phase_isr();
|
||||
}
|
||||
|
||||
nextMainISR -= push_count;
|
||||
TERN_(LIN_ADVANCE, nextAdvanceISR -= push_count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,10 +45,14 @@
|
||||
#error "FAST_PWM_FAN is not available on TinyBee."
|
||||
#endif
|
||||
|
||||
#if BOTH(I2S_STEPPER_STREAM, BABYSTEPPING) && DISABLED(INTEGRATED_BABYSTEPPING)
|
||||
#error "BABYSTEPPING on I2S stream requires INTEGRATED_BABYSTEPPING."
|
||||
#endif
|
||||
|
||||
#if USING_PULLDOWNS
|
||||
#error "PULLDOWN pin mode is not available on ESP32 boards."
|
||||
#endif
|
||||
|
||||
#if BOTH(I2S_STEPPER_STREAM, LIN_ADVANCE)
|
||||
#if BOTH(I2S_STEPPER_STREAM, LIN_ADVANCE) && DISABLED(EXPERIMENTAL_I2S_LA)
|
||||
#error "I2S stream is currently incompatible with LIN_ADVANCE."
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,13 @@
|
||||
#include "HAL.h"
|
||||
#include "SPI.h"
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#include "../../sd/cardreader.h"
|
||||
#if ENABLED(ESP3D_WIFISUPPORT)
|
||||
#include "sd_ESP32.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static SPISettings spiConfig;
|
||||
|
||||
|
||||
@@ -45,6 +52,11 @@ static SPISettings spiConfig;
|
||||
|
||||
uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
|
||||
static uint8_t msgInitCount = 2; // Ignore all messages until 2nd U8G_COM_MSG_INIT
|
||||
|
||||
#if ENABLED(PAUSE_LCD_FOR_BUSY_SD)
|
||||
if (card.flag.saving || card.flag.logging || TERN0(ESP3D_WIFISUPPORT, sd_busy_lock == true)) return 0;
|
||||
#endif
|
||||
|
||||
if (msgInitCount) {
|
||||
if (msg == U8G_COM_MSG_INIT) msgInitCount--;
|
||||
if (msgInitCount) return -1;
|
||||
|
||||
@@ -29,6 +29,6 @@
|
||||
|
||||
// LPC1768 boards seem to lose steps when saving to EEPROM during print (issue #20785)
|
||||
// TODO: Which other boards are incompatible?
|
||||
#if defined(MCU_LPC1768) && PRINTCOUNTER_SAVE_INTERVAL > 0
|
||||
#if defined(MCU_LPC1768) && ENABLED(FLASH_EEPROM_EMULATION) && PRINTCOUNTER_SAVE_INTERVAL > 0
|
||||
#define PRINTCOUNTER_SYNC 1
|
||||
#endif
|
||||
|
||||
@@ -9,119 +9,127 @@ from __future__ import print_function
|
||||
import pioutil
|
||||
if pioutil.is_pio_build():
|
||||
|
||||
target_filename = "FIRMWARE.CUR"
|
||||
target_drive = "REARM"
|
||||
target_filename = "FIRMWARE.CUR"
|
||||
target_drive = "REARM"
|
||||
|
||||
import os,getpass,platform
|
||||
import platform
|
||||
|
||||
current_OS = platform.system()
|
||||
Import("env")
|
||||
current_OS = platform.system()
|
||||
Import("env")
|
||||
|
||||
def print_error(e):
|
||||
print('\nUnable to find destination disk (%s)\n' \
|
||||
'Please select it in platformio.ini using the upload_port keyword ' \
|
||||
'(https://docs.platformio.org/en/latest/projectconf/section_env_upload.html) ' \
|
||||
'or copy the firmware (.pio/build/%s/firmware.bin) manually to the appropriate disk\n' \
|
||||
%(e, env.get('PIOENV')))
|
||||
def print_error(e):
|
||||
print('\nUnable to find destination disk (%s)\n' \
|
||||
'Please select it in platformio.ini using the upload_port keyword ' \
|
||||
'(https://docs.platformio.org/en/latest/projectconf/section_env_upload.html) ' \
|
||||
'or copy the firmware (.pio/build/%s/firmware.bin) manually to the appropriate disk\n' \
|
||||
%(e, env.get('PIOENV')))
|
||||
|
||||
def before_upload(source, target, env):
|
||||
try:
|
||||
#
|
||||
# Find a disk for upload
|
||||
#
|
||||
upload_disk = 'Disk not found'
|
||||
target_file_found = False
|
||||
target_drive_found = False
|
||||
if current_OS == 'Windows':
|
||||
#
|
||||
# platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:'
|
||||
# Windows - doesn't care about the disk's name, only cares about the drive letter
|
||||
import subprocess,string
|
||||
from ctypes import windll
|
||||
def before_upload(source, target, env):
|
||||
try:
|
||||
from pathlib import Path
|
||||
#
|
||||
# Find a disk for upload
|
||||
#
|
||||
upload_disk = 'Disk not found'
|
||||
target_file_found = False
|
||||
target_drive_found = False
|
||||
if current_OS == 'Windows':
|
||||
#
|
||||
# platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:'
|
||||
# Windows - doesn't care about the disk's name, only cares about the drive letter
|
||||
import subprocess,string
|
||||
from ctypes import windll
|
||||
from pathlib import PureWindowsPath
|
||||
|
||||
# getting list of drives
|
||||
# https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python
|
||||
drives = []
|
||||
bitmask = windll.kernel32.GetLogicalDrives()
|
||||
for letter in string.ascii_uppercase:
|
||||
if bitmask & 1:
|
||||
drives.append(letter)
|
||||
bitmask >>= 1
|
||||
# getting list of drives
|
||||
# https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python
|
||||
drives = []
|
||||
bitmask = windll.kernel32.GetLogicalDrives()
|
||||
for letter in string.ascii_uppercase:
|
||||
if bitmask & 1:
|
||||
drives.append(letter)
|
||||
bitmask >>= 1
|
||||
|
||||
for drive in drives:
|
||||
final_drive_name = drive + ':\\'
|
||||
# print ('disc check: {}'.format(final_drive_name))
|
||||
try:
|
||||
volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT))
|
||||
except Exception as e:
|
||||
print ('error:{}'.format(e))
|
||||
continue
|
||||
else:
|
||||
if target_drive in volume_info and not target_file_found: # set upload if not found target file yet
|
||||
target_drive_found = True
|
||||
upload_disk = final_drive_name
|
||||
if target_filename in volume_info:
|
||||
if not target_file_found:
|
||||
upload_disk = final_drive_name
|
||||
target_file_found = True
|
||||
for drive in drives:
|
||||
final_drive_name = drive + ':'
|
||||
# print ('disc check: {}'.format(final_drive_name))
|
||||
try:
|
||||
volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT))
|
||||
except Exception as e:
|
||||
print ('error:{}'.format(e))
|
||||
continue
|
||||
else:
|
||||
if target_drive in volume_info and not target_file_found: # set upload if not found target file yet
|
||||
target_drive_found = True
|
||||
upload_disk = PureWindowsPath(final_drive_name)
|
||||
if target_filename in volume_info:
|
||||
if not target_file_found:
|
||||
upload_disk = PureWindowsPath(final_drive_name)
|
||||
target_file_found = True
|
||||
|
||||
elif current_OS == 'Linux':
|
||||
#
|
||||
# platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive'
|
||||
#
|
||||
drives = os.listdir(os.path.join(os.sep, 'media', getpass.getuser()))
|
||||
if target_drive in drives: # If target drive is found, use it.
|
||||
target_drive_found = True
|
||||
upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), target_drive) + os.sep
|
||||
else:
|
||||
for drive in drives:
|
||||
try:
|
||||
files = os.listdir(os.path.join(os.sep, 'media', getpass.getuser(), drive))
|
||||
except:
|
||||
continue
|
||||
else:
|
||||
if target_filename in files:
|
||||
upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), drive) + os.sep
|
||||
target_file_found = True
|
||||
break
|
||||
#
|
||||
# set upload_port to drive if found
|
||||
#
|
||||
elif current_OS == 'Linux':
|
||||
#
|
||||
# platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive'
|
||||
#
|
||||
import getpass
|
||||
user = getpass.getuser()
|
||||
mpath = Path('media', user)
|
||||
drives = [ x for x in mpath.iterdir() if x.is_dir() ]
|
||||
if target_drive in drives: # If target drive is found, use it.
|
||||
target_drive_found = True
|
||||
upload_disk = mpath / target_drive
|
||||
else:
|
||||
for drive in drives:
|
||||
try:
|
||||
fpath = mpath / drive
|
||||
filenames = [ x.name for x in fpath.iterdir() if x.is_file() ]
|
||||
except:
|
||||
continue
|
||||
else:
|
||||
if target_filename in filenames:
|
||||
upload_disk = mpath / drive
|
||||
target_file_found = True
|
||||
break
|
||||
#
|
||||
# set upload_port to drive if found
|
||||
#
|
||||
|
||||
if target_file_found or target_drive_found:
|
||||
env.Replace(
|
||||
UPLOAD_FLAGS="-P$UPLOAD_PORT"
|
||||
)
|
||||
if target_file_found or target_drive_found:
|
||||
env.Replace(
|
||||
UPLOAD_FLAGS="-P$UPLOAD_PORT"
|
||||
)
|
||||
|
||||
elif current_OS == 'Darwin': # MAC
|
||||
#
|
||||
# platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive'
|
||||
#
|
||||
drives = os.listdir('/Volumes') # human readable names
|
||||
if target_drive in drives and not target_file_found: # set upload if not found target file yet
|
||||
target_drive_found = True
|
||||
upload_disk = '/Volumes/' + target_drive + '/'
|
||||
for drive in drives:
|
||||
try:
|
||||
filenames = os.listdir('/Volumes/' + drive + '/') # will get an error if the drive is protected
|
||||
except:
|
||||
continue
|
||||
else:
|
||||
if target_filename in filenames:
|
||||
if not target_file_found:
|
||||
upload_disk = '/Volumes/' + drive + '/'
|
||||
target_file_found = True
|
||||
elif current_OS == 'Darwin': # MAC
|
||||
#
|
||||
# platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive'
|
||||
#
|
||||
dpath = Path('/Volumes') # human readable names
|
||||
drives = [ x for x in dpath.iterdir() if x.is_dir() ]
|
||||
if target_drive in drives and not target_file_found: # set upload if not found target file yet
|
||||
target_drive_found = True
|
||||
upload_disk = dpath / target_drive
|
||||
for drive in drives:
|
||||
try:
|
||||
fpath = dpath / drive # will get an error if the drive is protected
|
||||
filenames = [ x.name for x in fpath.iterdir() if x.is_file() ]
|
||||
except:
|
||||
continue
|
||||
else:
|
||||
if target_filename in filenames:
|
||||
upload_disk = dpath / drive
|
||||
target_file_found = True
|
||||
break
|
||||
|
||||
#
|
||||
# Set upload_port to drive if found
|
||||
#
|
||||
if target_file_found or target_drive_found:
|
||||
env.Replace(UPLOAD_PORT=upload_disk)
|
||||
print('\nUpload disk: ', upload_disk, '\n')
|
||||
else:
|
||||
print_error('Autodetect Error')
|
||||
#
|
||||
# Set upload_port to drive if found
|
||||
#
|
||||
if target_file_found or target_drive_found:
|
||||
env.Replace(UPLOAD_PORT=str(upload_disk))
|
||||
print('\nUpload disk: ', upload_disk, '\n')
|
||||
else:
|
||||
print_error('Autodetect Error')
|
||||
|
||||
except Exception as e:
|
||||
print_error(str(e))
|
||||
except Exception as e:
|
||||
print_error(str(e))
|
||||
|
||||
env.AddPreAction("upload", before_upload)
|
||||
env.AddPreAction("upload", before_upload)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
*
|
||||
* Now you can simply SET_OUTPUT(STEP); WRITE(STEP, HIGH); WRITE(STEP, LOW);
|
||||
*
|
||||
* Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html
|
||||
* Why double up on these macros? see https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
|
||||
*/
|
||||
|
||||
/// Read a pin
|
||||
|
||||
@@ -51,7 +51,7 @@ enum XPTCoordinate : uint8_t {
|
||||
XPT2046_Z2 = 0x40 | XPT2046_CONTROL | XPT2046_DFR_MODE,
|
||||
};
|
||||
|
||||
#if !defined(XPT2046_Z1_THRESHOLD)
|
||||
#ifndef XPT2046_Z1_THRESHOLD
|
||||
#define XPT2046_Z1_THRESHOLD 10
|
||||
#endif
|
||||
|
||||
|
||||
@@ -27,3 +27,8 @@
|
||||
#elif EITHER(I2C_EEPROM, SPI_EEPROM)
|
||||
#define USE_SHARED_EEPROM 1
|
||||
#endif
|
||||
|
||||
// Some STM32F4 boards may lose steps when saving to EEPROM during print (PR #17946)
|
||||
#if defined(STM32F4xx) && ENABLED(FLASH_EEPROM_EMULATION) && PRINTCOUNTER_SAVE_INTERVAL > 0
|
||||
#define PRINTCOUNTER_SYNC 1
|
||||
#endif
|
||||
|
||||
@@ -37,11 +37,6 @@
|
||||
#error "SDCARD_EEPROM_EMULATION requires SDSUPPORT. Enable SDSUPPORT or choose another EEPROM emulation."
|
||||
#endif
|
||||
|
||||
#if defined(STM32F4xx) && BOTH(PRINTCOUNTER, FLASH_EEPROM_EMULATION)
|
||||
#warning "FLASH_EEPROM_EMULATION may cause long delays when writing and should not be used while printing."
|
||||
#error "Disable PRINTCOUNTER or choose another EEPROM emulation."
|
||||
#endif
|
||||
|
||||
#if !defined(STM32F4xx) && ENABLED(FLASH_EEPROM_LEVELING)
|
||||
#error "FLASH_EEPROM_LEVELING is currently only supported on STM32F4 hardware."
|
||||
#endif
|
||||
|
||||
@@ -147,7 +147,7 @@ uint32_t TFT_FSMC::ReadID(tft_data_t Reg) {
|
||||
}
|
||||
|
||||
bool TFT_FSMC::isBusy() {
|
||||
#if defined(STM32F1xx)
|
||||
#ifdef STM32F1xx
|
||||
volatile bool dmaEnabled = (DMAtx.Instance->CCR & DMA_CCR_EN) != RESET;
|
||||
#elif defined(STM32F4xx)
|
||||
volatile bool dmaEnabled = DMAtx.Instance->CR & DMA_SxCR_EN;
|
||||
|
||||
@@ -372,9 +372,9 @@ void TFT_LTDC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou
|
||||
if (MemoryIncrease == DMA_PINC_ENABLE) {
|
||||
DrawImage(x_min, y_cur, x_min + width, y_cur + height, Data);
|
||||
Data += width * height;
|
||||
} else {
|
||||
DrawRect(x_min, y_cur, x_min + width, y_cur + height, *Data);
|
||||
}
|
||||
else
|
||||
DrawRect(x_min, y_cur, x_min + width, y_cur + height, *Data);
|
||||
y_cur += height;
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ uint32_t TFT_SPI::ReadID(uint16_t Reg) {
|
||||
}
|
||||
|
||||
bool TFT_SPI::isBusy() {
|
||||
#if defined(STM32F1xx)
|
||||
#ifdef STM32F1xx
|
||||
volatile bool dmaEnabled = (DMAtx.Instance->CCR & DMA_CCR_EN) != RESET;
|
||||
#elif defined(STM32F4xx)
|
||||
volatile bool dmaEnabled = DMAtx.Instance->CR & DMA_SxCR_EN;
|
||||
|
||||
+27
-10
@@ -39,17 +39,13 @@
|
||||
#endif
|
||||
#include <math.h>
|
||||
|
||||
#include "core/utility.h"
|
||||
|
||||
#include "module/endstops.h"
|
||||
#include "module/motion.h"
|
||||
#include "module/planner.h"
|
||||
#include "module/endstops.h"
|
||||
#include "module/temperature.h"
|
||||
#include "module/settings.h"
|
||||
#include "module/printcounter.h" // PrintCounter or Stopwatch
|
||||
|
||||
#include "module/settings.h"
|
||||
#include "module/stepper.h"
|
||||
#include "module/stepper/indirection.h"
|
||||
#include "module/temperature.h"
|
||||
|
||||
#include "gcode/gcode.h"
|
||||
#include "gcode/parser.h"
|
||||
@@ -76,6 +72,8 @@
|
||||
#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
|
||||
#endif
|
||||
|
||||
@@ -123,6 +121,10 @@
|
||||
#include "feature/bltouch.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BD_SENSOR)
|
||||
#include "feature/bedlevel/bdl/bdl.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(POLL_JOG)
|
||||
#include "feature/joystick.h"
|
||||
#endif
|
||||
@@ -246,6 +248,10 @@
|
||||
#include "feature/easythreed_ui.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(MARLIN_TEST_BUILD)
|
||||
#include "tests/marlin_tests.h"
|
||||
#endif
|
||||
|
||||
PGMSTR(M112_KILL_STR, "M112 Shutdown");
|
||||
|
||||
MarlinState marlin_state = MF_INITIALIZING;
|
||||
@@ -482,7 +488,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_FREEZE_PIN
|
||||
#if ENABLED(FREEZE_FEATURE)
|
||||
stepper.frozen = READ(FREEZE_PIN) == FREEZE_STATE;
|
||||
#endif
|
||||
|
||||
@@ -777,6 +783,9 @@ void idle(bool no_stepper_sleep/*=false*/) {
|
||||
if (++idle_depth > 5) SERIAL_ECHOLNPGM("idle() call depth: ", idle_depth);
|
||||
#endif
|
||||
|
||||
// Bed Distance Sensor task
|
||||
TERN_(BD_SENSOR, bdl.process());
|
||||
|
||||
// Core Marlin activities
|
||||
manage_inactivity(no_stepper_sleep);
|
||||
|
||||
@@ -1218,10 +1227,10 @@ void setup() {
|
||||
SETUP_RUN(hal.init());
|
||||
|
||||
// Init and disable SPI thermocouples; this is still needed
|
||||
#if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E0))
|
||||
#if TEMP_SENSOR_IS_MAX_TC(0) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E0))
|
||||
OUT_WRITE(TEMP_0_CS_PIN, HIGH); // Disable
|
||||
#endif
|
||||
#if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1))
|
||||
#if TEMP_SENSOR_IS_MAX_TC(1) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E1))
|
||||
OUT_WRITE(TEMP_1_CS_PIN, HIGH);
|
||||
#endif
|
||||
|
||||
@@ -1630,9 +1639,15 @@ void setup() {
|
||||
SETUP_RUN(test_tmc_connection());
|
||||
#endif
|
||||
|
||||
#if ENABLED(BD_SENSOR)
|
||||
SETUP_RUN(bdl.init(I2C_BD_SDA_PIN, I2C_BD_SCL_PIN, I2C_BD_DELAY));
|
||||
#endif
|
||||
|
||||
marlin_state = MF_RUNNING;
|
||||
|
||||
SETUP_LOG("setup() completed.");
|
||||
|
||||
TERN_(MARLIN_TEST_BUILD, runStartupTests());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1667,5 +1682,7 @@ void loop() {
|
||||
|
||||
TERN_(HAS_TFT_LVGL_UI, printer_state_polling());
|
||||
|
||||
TERN_(MARLIN_TEST_BUILD, runPeriodicTests());
|
||||
|
||||
} while (ENABLED(__AVR__)); // Loop forever on slower (AVR) boards
|
||||
}
|
||||
|
||||
+76
-73
@@ -329,45 +329,46 @@
|
||||
#define BOARD_BTT_SKR_MINI_E3_V1_2 4025 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V2_0 4026 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V3_0 4027 // BigTreeTech SKR Mini E3 V3.0 (STM32G0B1RE)
|
||||
#define BOARD_BTT_SKR_MINI_MZ_V1_0 4028 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_E3_DIP 4029 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_BTT_SKR_CR6 4030 // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
|
||||
#define BOARD_JGAURORA_A5S_A1 4031 // JGAurora A5S A1 (STM32F103ZE)
|
||||
#define BOARD_FYSETC_AIO_II 4032 // FYSETC AIO_II (STM32F103RC)
|
||||
#define BOARD_FYSETC_CHEETAH 4033 // FYSETC Cheetah (STM32F103RC)
|
||||
#define BOARD_FYSETC_CHEETAH_V12 4034 // FYSETC Cheetah V1.2 (STM32F103RC)
|
||||
#define BOARD_LONGER3D_LK 4035 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE)
|
||||
#define BOARD_CCROBOT_MEEB_3DP 4036 // ccrobot-online.com MEEB_3DP (STM32F103RC)
|
||||
#define BOARD_CHITU3D_V5 4037 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE)
|
||||
#define BOARD_CHITU3D_V6 4038 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE)
|
||||
#define BOARD_CHITU3D_V9 4039 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE)
|
||||
#define BOARD_CREALITY_V4 4040 // Creality v4.x (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V422 4041 // Creality v4.2.2 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V423 4042 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V425 4043 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V427 4044 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V4210 4045 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
|
||||
#define BOARD_CREALITY_V431 4046 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_A 4047 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_B 4048 // Creality v4.3.1b (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_C 4049 // Creality v4.3.1c (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_D 4050 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V452 4051 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V453 4052 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V24S1 4053 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
|
||||
#define BOARD_CREALITY_V24S1_301 4054 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
|
||||
#define BOARD_CREALITY_V25S1 4055 // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
|
||||
#define BOARD_TRIGORILLA_PRO 4056 // Trigorilla Pro (STM32F103ZE)
|
||||
#define BOARD_FLY_MINI 4057 // FLYmaker FLY MINI (STM32F103RC)
|
||||
#define BOARD_FLSUN_HISPEED 4058 // FLSUN HiSpeedV1 (STM32F103VE)
|
||||
#define BOARD_BEAST 4059 // STM32F103RE Libmaple-based controller
|
||||
#define BOARD_MINGDA_MPX_ARM_MINI 4060 // STM32F103ZE Mingda MD-16
|
||||
#define BOARD_GTM32_PRO_VD 4061 // STM32F103VE controller
|
||||
#define BOARD_ZONESTAR_ZM3E2 4062 // Zonestar ZM3E2 (STM32F103RC)
|
||||
#define BOARD_ZONESTAR_ZM3E4 4063 // Zonestar ZM3E4 V1 (STM32F103VC)
|
||||
#define BOARD_ZONESTAR_ZM3E4V2 4064 // Zonestar ZM3E4 V2 (STM32F103VC)
|
||||
#define BOARD_ERYONE_ERY32_MINI 4065 // Eryone Ery32 mini (STM32F103VE)
|
||||
#define BOARD_PANDA_PI_V29 4066 // Panda Pi V2.9 - Standalone (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_MINI_E3_V3_0_1 4028 // BigTreeTech SKR Mini E3 V3.0.1 (STM32F401RC)
|
||||
#define BOARD_BTT_SKR_MINI_MZ_V1_0 4029 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
|
||||
#define BOARD_BTT_SKR_E3_DIP 4030 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_BTT_SKR_CR6 4031 // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
|
||||
#define BOARD_JGAURORA_A5S_A1 4032 // JGAurora A5S A1 (STM32F103ZE)
|
||||
#define BOARD_FYSETC_AIO_II 4033 // FYSETC AIO_II (STM32F103RC)
|
||||
#define BOARD_FYSETC_CHEETAH 4034 // FYSETC Cheetah (STM32F103RC)
|
||||
#define BOARD_FYSETC_CHEETAH_V12 4035 // FYSETC Cheetah V1.2 (STM32F103RC)
|
||||
#define BOARD_LONGER3D_LK 4036 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE)
|
||||
#define BOARD_CCROBOT_MEEB_3DP 4037 // ccrobot-online.com MEEB_3DP (STM32F103RC)
|
||||
#define BOARD_CHITU3D_V5 4038 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE)
|
||||
#define BOARD_CHITU3D_V6 4039 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE)
|
||||
#define BOARD_CHITU3D_V9 4040 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE)
|
||||
#define BOARD_CREALITY_V4 4041 // Creality v4.x (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V422 4042 // Creality v4.2.2 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V423 4043 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V425 4044 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V427 4045 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V4210 4046 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
|
||||
#define BOARD_CREALITY_V431 4047 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_A 4048 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_B 4049 // Creality v4.3.1b (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_C 4050 // Creality v4.3.1c (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_D 4051 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V452 4052 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V453 4053 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V24S1 4054 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
|
||||
#define BOARD_CREALITY_V24S1_301 4055 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
|
||||
#define BOARD_CREALITY_V25S1 4056 // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
|
||||
#define BOARD_TRIGORILLA_PRO 4057 // Trigorilla Pro (STM32F103ZE)
|
||||
#define BOARD_FLY_MINI 4058 // FLYmaker FLY MINI (STM32F103RC)
|
||||
#define BOARD_FLSUN_HISPEED 4059 // FLSUN HiSpeedV1 (STM32F103VE)
|
||||
#define BOARD_BEAST 4060 // STM32F103RE Libmaple-based controller
|
||||
#define BOARD_MINGDA_MPX_ARM_MINI 4061 // STM32F103ZE Mingda MD-16
|
||||
#define BOARD_GTM32_PRO_VD 4062 // STM32F103VE controller
|
||||
#define BOARD_ZONESTAR_ZM3E2 4063 // Zonestar ZM3E2 (STM32F103RC)
|
||||
#define BOARD_ZONESTAR_ZM3E4 4064 // Zonestar ZM3E4 V1 (STM32F103VC)
|
||||
#define BOARD_ZONESTAR_ZM3E4V2 4065 // Zonestar ZM3E4 V2 (STM32F103VC)
|
||||
#define BOARD_ERYONE_ERY32_MINI 4066 // Eryone Ery32 mini (STM32F103VE)
|
||||
#define BOARD_PANDA_PI_V29 4067 // Panda Pi V2.9 - Standalone (STM32F103RC)
|
||||
|
||||
//
|
||||
// ARM Cortex-M4F
|
||||
@@ -387,40 +388,42 @@
|
||||
#define BOARD_RUMBA32_BTT 4204 // RUMBA32 STM32F446VE based controller from BIGTREETECH
|
||||
#define BOARD_BLACK_STM32F407VE 4205 // BLACK_STM32F407VE
|
||||
#define BOARD_BLACK_STM32F407ZE 4206 // BLACK_STM32F407ZE
|
||||
#define BOARD_BTT_SKR_PRO_V1_1 4208 // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
|
||||
#define BOARD_BTT_SKR_PRO_V1_2 4209 // BigTreeTech SKR Pro v1.2 (STM32F407ZG)
|
||||
#define BOARD_BTT_BTT002_V1_0 4210 // BigTreeTech BTT002 v1.0 (STM32F407VG)
|
||||
#define BOARD_BTT_E3_RRF 4211 // BigTreeTech E3 RRF (STM32F407VG)
|
||||
#define BOARD_BTT_SKR_V2_0_REV_A 4212 // BigTreeTech SKR v2.0 Rev A (STM32F407VG)
|
||||
#define BOARD_BTT_SKR_V2_0_REV_B 4213 // BigTreeTech SKR v2.0 Rev B (STM32F407VG/STM32F429VG)
|
||||
#define BOARD_BTT_GTR_V1_0 4214 // BigTreeTech GTR v1.0 (STM32F407IGT)
|
||||
#define BOARD_BTT_OCTOPUS_V1_0 4215 // BigTreeTech Octopus v1.0 (STM32F446ZE)
|
||||
#define BOARD_BTT_OCTOPUS_V1_1 4216 // BigTreeTech Octopus v1.1 (STM32F446ZE)
|
||||
#define BOARD_BTT_OCTOPUS_PRO_V1_0 4217 // BigTreeTech Octopus Pro v1.0 (STM32F446ZE / STM32F429ZG)
|
||||
#define BOARD_LERDGE_K 4218 // Lerdge K (STM32F407ZG)
|
||||
#define BOARD_LERDGE_S 4219 // Lerdge S (STM32F407VE)
|
||||
#define BOARD_LERDGE_X 4220 // Lerdge X (STM32F407VE)
|
||||
#define BOARD_VAKE403D 4221 // VAkE 403D (STM32F446VE)
|
||||
#define BOARD_FYSETC_S6 4222 // FYSETC S6 (STM32F446VE)
|
||||
#define BOARD_FYSETC_S6_V2_0 4223 // FYSETC S6 v2.0 (STM32F446VE)
|
||||
#define BOARD_FYSETC_SPIDER 4224 // FYSETC Spider (STM32F446VE)
|
||||
#define BOARD_FLYF407ZG 4225 // FLYmaker FLYF407ZG (STM32F407ZG)
|
||||
#define BOARD_MKS_ROBIN2 4226 // MKS_ROBIN2 (STM32F407ZE)
|
||||
#define BOARD_MKS_ROBIN_PRO_V2 4227 // MKS Robin Pro V2 (STM32F407VE)
|
||||
#define BOARD_MKS_ROBIN_NANO_V3 4228 // MKS Robin Nano V3 (STM32F407VG)
|
||||
#define BOARD_MKS_ROBIN_NANO_V3_1 4229 // MKS Robin Nano V3.1 (STM32F407VE)
|
||||
#define BOARD_MKS_MONSTER8_V1 4230 // MKS Monster8 V1 (STM32F407VE)
|
||||
#define BOARD_MKS_MONSTER8_V2 4231 // MKS Monster8 V2 (STM32F407VE)
|
||||
#define BOARD_ANET_ET4 4232 // ANET ET4 V1.x (STM32F407VG)
|
||||
#define BOARD_ANET_ET4P 4233 // ANET ET4P V1.x (STM32F407VG)
|
||||
#define BOARD_FYSETC_CHEETAH_V20 4234 // FYSETC Cheetah V2.0 (STM32F401RC)
|
||||
#define BOARD_TH3D_EZBOARD_V2 4235 // TH3D EZBoard v2.0 (STM32F405RG)
|
||||
#define BOARD_OPULO_LUMEN_REV3 4236 // Opulo Lumen PnP Controller REV3 (STM32F407VE / STM32F407VG)
|
||||
#define BOARD_MKS_ROBIN_NANO_V1_3_F4 4237 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VE)
|
||||
#define BOARD_MKS_EAGLE 4238 // MKS Eagle (STM32F407VE)
|
||||
#define BOARD_ARTILLERY_RUBY 4239 // Artillery Ruby (STM32F401RC)
|
||||
#define BOARD_FYSETC_SPIDER_V2_2 4240 // FYSETC Spider V2.2 (STM32F446VE)
|
||||
#define BOARD_CREALITY_V24S1_301F4 4241 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
|
||||
#define BOARD_BTT_SKR_PRO_V1_1 4207 // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
|
||||
#define BOARD_BTT_SKR_PRO_V1_2 4208 // BigTreeTech SKR Pro v1.2 (STM32F407ZG)
|
||||
#define BOARD_BTT_BTT002_V1_0 4209 // BigTreeTech BTT002 v1.0 (STM32F407VG)
|
||||
#define BOARD_BTT_E3_RRF 4210 // BigTreeTech E3 RRF (STM32F407VG)
|
||||
#define BOARD_BTT_SKR_V2_0_REV_A 4211 // BigTreeTech SKR v2.0 Rev A (STM32F407VG)
|
||||
#define BOARD_BTT_SKR_V2_0_REV_B 4212 // BigTreeTech SKR v2.0 Rev B (STM32F407VG/STM32F429VG)
|
||||
#define BOARD_BTT_GTR_V1_0 4213 // BigTreeTech GTR v1.0 (STM32F407IGT)
|
||||
#define BOARD_BTT_OCTOPUS_V1_0 4214 // BigTreeTech Octopus v1.0 (STM32F446ZE)
|
||||
#define BOARD_BTT_OCTOPUS_V1_1 4215 // BigTreeTech Octopus v1.1 (STM32F446ZE)
|
||||
#define BOARD_BTT_OCTOPUS_PRO_V1_0 4216 // BigTreeTech Octopus Pro v1.0 (STM32F446ZE / STM32F429ZG)
|
||||
#define BOARD_LERDGE_K 4217 // Lerdge K (STM32F407ZG)
|
||||
#define BOARD_LERDGE_S 4218 // Lerdge S (STM32F407VE)
|
||||
#define BOARD_LERDGE_X 4219 // Lerdge X (STM32F407VE)
|
||||
#define BOARD_VAKE403D 4220 // VAkE 403D (STM32F446VE)
|
||||
#define BOARD_FYSETC_S6 4221 // FYSETC S6 (STM32F446VE)
|
||||
#define BOARD_FYSETC_S6_V2_0 4222 // FYSETC S6 v2.0 (STM32F446VE)
|
||||
#define BOARD_FYSETC_SPIDER 4223 // FYSETC Spider (STM32F446VE)
|
||||
#define BOARD_FLYF407ZG 4224 // FLYmaker FLYF407ZG (STM32F407ZG)
|
||||
#define BOARD_MKS_ROBIN2 4225 // MKS_ROBIN2 (STM32F407ZE)
|
||||
#define BOARD_MKS_ROBIN_PRO_V2 4226 // MKS Robin Pro V2 (STM32F407VE)
|
||||
#define BOARD_MKS_ROBIN_NANO_V3 4227 // MKS Robin Nano V3 (STM32F407VG)
|
||||
#define BOARD_MKS_ROBIN_NANO_V3_1 4228 // MKS Robin Nano V3.1 (STM32F407VE)
|
||||
#define BOARD_MKS_MONSTER8_V1 4229 // MKS Monster8 V1 (STM32F407VE)
|
||||
#define BOARD_MKS_MONSTER8_V2 4230 // MKS Monster8 V2 (STM32F407VE)
|
||||
#define BOARD_ANET_ET4 4231 // ANET ET4 V1.x (STM32F407VG)
|
||||
#define BOARD_ANET_ET4P 4232 // ANET ET4P V1.x (STM32F407VG)
|
||||
#define BOARD_FYSETC_CHEETAH_V20 4233 // FYSETC Cheetah V2.0 (STM32F401RC)
|
||||
#define BOARD_TH3D_EZBOARD_V2 4234 // TH3D EZBoard v2.0 (STM32F405RG)
|
||||
#define BOARD_OPULO_LUMEN_REV3 4235 // Opulo Lumen PnP Controller REV3 (STM32F407VE / STM32F407VG)
|
||||
#define BOARD_MKS_ROBIN_NANO_V1_3_F4 4236 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VE)
|
||||
#define BOARD_MKS_EAGLE 4237 // MKS Eagle (STM32F407VE)
|
||||
#define BOARD_ARTILLERY_RUBY 4238 // Artillery Ruby (STM32F401RC)
|
||||
#define BOARD_FYSETC_SPIDER_V2_2 4239 // FYSETC Spider V2.2 (STM32F446VE)
|
||||
#define BOARD_CREALITY_V24S1_301F4 4240 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
|
||||
#define BOARD_OPULO_LUMEN_REV4 4241 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
|
||||
#define BOARD_FYSETC_SPIDER_KING407 4242 // FYSETC Spider King407 (STM32F407ZG)
|
||||
|
||||
//
|
||||
// ARM Cortex M7
|
||||
|
||||
@@ -174,6 +174,7 @@
|
||||
#define STR_SD_VOL_INIT_FAIL "volume.init failed"
|
||||
#define STR_SD_OPENROOT_FAIL "openRoot failed"
|
||||
#define STR_SD_CARD_OK "SD card ok"
|
||||
#define STR_SD_CARD_RELEASED "SD card released"
|
||||
#define STR_SD_WORKDIR_FAIL "workDir open failed"
|
||||
#define STR_SD_OPEN_FILE_FAIL "open failed, File: "
|
||||
#define STR_SD_FILE_OPENED "File opened: "
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if !defined(__has_include)
|
||||
#ifndef __has_include
|
||||
#define __has_include(...) 1
|
||||
#endif
|
||||
|
||||
@@ -730,3 +730,8 @@
|
||||
#define __MAPLIST() _MAPLIST
|
||||
|
||||
#define MAPLIST(OP,V...) EVAL(_MAPLIST(OP,V))
|
||||
|
||||
// Temperature Sensor Config
|
||||
#define _HAS_E_TEMP(N) || (TEMP_SENSOR_##N != 0)
|
||||
#define HAS_E_TEMP_SENSOR (0 REPEAT(EXTRUDERS, _HAS_E_TEMP))
|
||||
#define TEMP_SENSOR_IS_MAX_TC(T) (TEMP_SENSOR_##T == -5 || TEMP_SENSOR_##T == -3 || TEMP_SENSOR_##T == -2)
|
||||
|
||||
@@ -688,7 +688,7 @@ struct XYZEval {
|
||||
FI const T& operator[](const int n) const { return pos[n]; }
|
||||
|
||||
// Assignment operator overrides do the expected thing
|
||||
FI XYZEval<T>& operator= (const T v) { set(LIST_N_1(NUM_AXES, v)); return *this; }
|
||||
FI XYZEval<T>& operator= (const T v) { set(LOGICAL_AXIS_LIST_1(v)); return *this; }
|
||||
FI XYZEval<T>& operator= (const XYval<T> &rs) { set(rs.x, rs.y); return *this; }
|
||||
FI XYZEval<T>& operator= (const XYZval<T> &rs) { set(NUM_AXIS_ELEM(rs)); return *this; }
|
||||
|
||||
@@ -752,8 +752,12 @@ struct XYZEval {
|
||||
// Exact comparisons. For floats a "NEAR" operation may be better.
|
||||
FI bool operator==(const XYZval<T> &rs) { return true NUM_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
|
||||
FI bool operator==(const XYZval<T> &rs) const { return true NUM_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
|
||||
FI bool operator==(const XYZEval<T> &rs) { return true LOGICAL_AXIS_GANG(&& e == rs.e, && x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
|
||||
FI bool operator==(const XYZEval<T> &rs) const { return true LOGICAL_AXIS_GANG(&& e == rs.e, && x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k, && u == rs.u, && v == rs.v, && w == rs.w); }
|
||||
FI bool operator!=(const XYZval<T> &rs) { return !operator==(rs); }
|
||||
FI bool operator!=(const XYZval<T> &rs) const { return !operator==(rs); }
|
||||
FI bool operator!=(const XYZEval<T> &rs) { return !operator==(rs); }
|
||||
FI bool operator!=(const XYZEval<T> &rs) const { return !operator==(rs); }
|
||||
};
|
||||
|
||||
#undef _RECIP
|
||||
|
||||
@@ -51,7 +51,7 @@ void safe_delay(millis_t ms) {
|
||||
|
||||
#include "../module/probe.h"
|
||||
#include "../module/motion.h"
|
||||
#include "../module/stepper.h"
|
||||
#include "../module/planner.h"
|
||||
#include "../libs/numtostr.h"
|
||||
#include "../feature/bedlevel/bedlevel.h"
|
||||
|
||||
@@ -70,6 +70,7 @@ void safe_delay(millis_t ms) {
|
||||
TERN_(NOZZLE_AS_PROBE, "NOZZLE_AS_PROBE")
|
||||
TERN_(FIX_MOUNTED_PROBE, "FIX_MOUNTED_PROBE")
|
||||
TERN_(HAS_Z_SERVO_PROBE, TERN(BLTOUCH, "BLTOUCH", "SERVO PROBE"))
|
||||
TERN_(BD_SENSOR, "BD_SENSOR")
|
||||
TERN_(TOUCH_MI_PROBE, "TOUCH_MI_PROBE")
|
||||
TERN_(Z_PROBE_SLED, "Z_PROBE_SLED")
|
||||
TERN_(Z_PROBE_ALLEN_KEY, "Z_PROBE_ALLEN_KEY")
|
||||
|
||||
@@ -59,6 +59,11 @@ void safe_delay(millis_t ms); // Delay ensuring that temperatures are
|
||||
#define log_machine_info() NOOP
|
||||
#endif
|
||||
|
||||
/**
|
||||
* A restorer instance remembers a variable's value before setting a
|
||||
* new value, then restores the old value when it goes out of scope.
|
||||
* Put operator= on your type to get extended behavior on value change.
|
||||
*/
|
||||
template<typename T>
|
||||
class restorer {
|
||||
T& ref_;
|
||||
|
||||
@@ -54,6 +54,18 @@ void Babystep::add_mm(const AxisEnum axis, const_float_t mm) {
|
||||
add_steps(axis, mm * planner.settings.axis_steps_per_mm[axis]);
|
||||
}
|
||||
|
||||
#if ENABLED(BD_SENSOR)
|
||||
void Babystep::set_mm(const AxisEnum axis, const_float_t mm) {
|
||||
//if (DISABLED(BABYSTEP_WITHOUT_HOMING) && axes_should_home(_BV(axis))) return;
|
||||
const int16_t distance = mm * planner.settings.axis_steps_per_mm[axis];
|
||||
accum = distance; // Count up babysteps for the UI
|
||||
steps[BS_AXIS_IND(axis)] = distance;
|
||||
TERN_(BABYSTEP_DISPLAY_TOTAL, axis_total[BS_TOTAL_IND(axis)] = distance);
|
||||
TERN_(BABYSTEP_ALWAYS_AVAILABLE, gcode.reset_stepper_timeout());
|
||||
TERN_(INTEGRATED_BABYSTEPPING, if (has_steps()) stepper.initiateBabystepping());
|
||||
}
|
||||
#endif
|
||||
|
||||
void Babystep::add_steps(const AxisEnum axis, const int16_t distance) {
|
||||
if (DISABLED(BABYSTEP_WITHOUT_HOMING) && axes_should_home(_BV(axis))) return;
|
||||
|
||||
|
||||
@@ -63,6 +63,10 @@ public:
|
||||
static void add_steps(const AxisEnum axis, const int16_t distance);
|
||||
static void add_mm(const AxisEnum axis, const_float_t mm);
|
||||
|
||||
#if ENABLED(BD_SENSOR)
|
||||
static void set_mm(const AxisEnum axis, const_float_t mm);
|
||||
#endif
|
||||
|
||||
static bool has_steps() {
|
||||
return steps[BS_AXIS_IND(X_AXIS)] || steps[BS_AXIS_IND(Y_AXIS)] || steps[BS_AXIS_IND(Z_AXIS)];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(BD_SENSOR)
|
||||
|
||||
#include "../../../MarlinCore.h"
|
||||
#include "../../../gcode/gcode.h"
|
||||
#include "../../../module/settings.h"
|
||||
#include "../../../module/motion.h"
|
||||
#include "../../../module/planner.h"
|
||||
#include "../../../module/stepper.h"
|
||||
#include "../../../module/probe.h"
|
||||
#include "../../../module/temperature.h"
|
||||
#include "../../../module/endstops.h"
|
||||
#include "../../babystep.h"
|
||||
|
||||
// I2C software Master library for segment bed heating and bed distance sensor
|
||||
#include <Panda_segmentBed_I2C.h>
|
||||
|
||||
#include "bdl.h"
|
||||
BDS_Leveling bdl;
|
||||
|
||||
//#define DEBUG_OUT_BD
|
||||
|
||||
// M102 S-5 Read raw Calibrate data
|
||||
// M102 S-6 Start Calibrate
|
||||
// M102 S4 Set the adjustable Z height value (e.g., 'M102 S4' means it will do adjusting while the Z height <= 0.4mm , disable with 'M102 S0'.)
|
||||
// M102 S-1 Read sensor information
|
||||
|
||||
#define MAX_BD_HEIGHT 4.0f
|
||||
#define CMD_START_READ_CALIBRATE_DATA 1017
|
||||
#define CMD_END_READ_CALIBRATE_DATA 1018
|
||||
#define CMD_START_CALIBRATE 1019
|
||||
#define CMD_END_CALIBRATE 1021
|
||||
#define CMD_READ_VERSION 1016
|
||||
|
||||
I2C_SegmentBED BD_I2C_SENSOR;
|
||||
|
||||
#define BD_SENSOR_I2C_ADDR 0x3C
|
||||
|
||||
int8_t BDS_Leveling::config_state;
|
||||
uint8_t BDS_Leveling::homing;
|
||||
|
||||
void BDS_Leveling::echo_name() { SERIAL_ECHOPGM("Bed Distance Leveling"); }
|
||||
|
||||
void BDS_Leveling::init(uint8_t _sda, uint8_t _scl, uint16_t delay_s) {
|
||||
int ret = BD_I2C_SENSOR.i2c_init(_sda, _scl, BD_SENSOR_I2C_ADDR, delay_s);
|
||||
if (ret != 1) SERIAL_ECHOLNPGM("BD_I2C_SENSOR Init Fail return code:", ret);
|
||||
config_state = 0;
|
||||
}
|
||||
|
||||
float BDS_Leveling::read() {
|
||||
const uint16_t tmp = BD_I2C_SENSOR.BD_i2c_read();
|
||||
float BD_z = NAN;
|
||||
if (BD_I2C_SENSOR.BD_Check_OddEven(tmp) && (tmp & 0x3FF) < 1020)
|
||||
BD_z = (tmp & 0x3FF) / 100.0f;
|
||||
return BD_z;
|
||||
}
|
||||
|
||||
void BDS_Leveling::process() {
|
||||
//if (config_state == 0) return;
|
||||
static millis_t next_check_ms = 0; // starting at T=0
|
||||
static float z_pose = 0.0f;
|
||||
const millis_t ms = millis();
|
||||
if (ELAPSED(ms, next_check_ms)) { // timed out (or first run)
|
||||
next_check_ms = ms + (config_state < 0 ? 1000 : 100); // check at 1Hz or 10Hz
|
||||
|
||||
unsigned short tmp = 0;
|
||||
const float cur_z = planner.get_axis_position_mm(Z_AXIS); //current_position.z
|
||||
static float old_cur_z = cur_z,
|
||||
old_buf_z = current_position.z;
|
||||
|
||||
tmp = BD_I2C_SENSOR.BD_i2c_read();
|
||||
if (BD_I2C_SENSOR.BD_Check_OddEven(tmp) && (tmp & 0x3FF) < 1020) {
|
||||
const float z_sensor = (tmp & 0x3FF) / 100.0f;
|
||||
if (cur_z < 0) config_state = 0;
|
||||
//float abs_z = current_position.z > cur_z ? (current_position.z - cur_z) : (cur_z - current_position.z);
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
if (cur_z < config_state * 0.1f
|
||||
&& config_state > 0
|
||||
&& old_cur_z == cur_z
|
||||
&& old_buf_z == current_position.z
|
||||
&& z_sensor < (MAX_BD_HEIGHT)
|
||||
) {
|
||||
babystep.set_mm(Z_AXIS, cur_z - z_sensor);
|
||||
#if ENABLED(DEBUG_OUT_BD)
|
||||
SERIAL_ECHOLNPGM("BD:", z_sensor, ", Z:", cur_z, "|", current_position.z);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
babystep.set_mm(Z_AXIS, 0); //if (old_cur_z <= cur_z) Z_DIR_WRITE(!INVERT_Z_DIR);
|
||||
stepper.set_directions();
|
||||
}
|
||||
#endif
|
||||
old_cur_z = cur_z;
|
||||
old_buf_z = current_position.z;
|
||||
endstops.bdp_state_update(z_sensor <= 0.01f);
|
||||
//endstops.update();
|
||||
}
|
||||
else
|
||||
stepper.set_directions();
|
||||
|
||||
#if ENABLED(DEBUG_OUT_BD)
|
||||
SERIAL_ECHOLNPGM("BD:", tmp & 0x3FF, ", Z:", cur_z, "|", current_position.z);
|
||||
if (BD_I2C_SENSOR.BD_Check_OddEven(tmp) == 0) SERIAL_ECHOLNPGM("errorCRC");
|
||||
#endif
|
||||
|
||||
if ((tmp & 0x3FF) > 1020) {
|
||||
BD_I2C_SENSOR.BD_i2c_stop();
|
||||
safe_delay(10);
|
||||
}
|
||||
|
||||
// read raw calibrate data
|
||||
if (config_state == -5) {
|
||||
BD_I2C_SENSOR.BD_i2c_write(CMD_START_READ_CALIBRATE_DATA);
|
||||
safe_delay(1000);
|
||||
|
||||
for (int i = 0; i < MAX_BD_HEIGHT * 10; i++) {
|
||||
tmp = BD_I2C_SENSOR.BD_i2c_read();
|
||||
SERIAL_ECHOLNPGM("Calibrate data:", i, ",", tmp & 0x3FF, ", check:", BD_I2C_SENSOR.BD_Check_OddEven(tmp));
|
||||
safe_delay(500);
|
||||
}
|
||||
config_state = 0;
|
||||
BD_I2C_SENSOR.BD_i2c_write(CMD_END_READ_CALIBRATE_DATA);
|
||||
safe_delay(500);
|
||||
}
|
||||
else if (config_state <= -6) { // Start Calibrate
|
||||
safe_delay(100);
|
||||
if (config_state == -6) {
|
||||
//BD_I2C_SENSOR.BD_i2c_write(1019); // begin calibrate
|
||||
//delay(1000);
|
||||
gcode.stepper_inactive_time = SEC_TO_MS(60 * 5);
|
||||
gcode.process_subcommands_now(F("M17 Z"));
|
||||
gcode.process_subcommands_now(F("G1 Z0.0"));
|
||||
z_pose = 0;
|
||||
safe_delay(1000);
|
||||
BD_I2C_SENSOR.BD_i2c_write(CMD_START_CALIBRATE); // Begin calibrate
|
||||
SERIAL_ECHOLNPGM("Begin calibrate");
|
||||
safe_delay(2000);
|
||||
config_state = -7;
|
||||
}
|
||||
else if (planner.get_axis_position_mm(Z_AXIS) < 10.0f) {
|
||||
if (z_pose >= MAX_BD_HEIGHT) {
|
||||
BD_I2C_SENSOR.BD_i2c_write(CMD_END_CALIBRATE); // End calibrate
|
||||
SERIAL_ECHOLNPGM("End calibrate data");
|
||||
z_pose = 7;
|
||||
config_state = 0;
|
||||
safe_delay(1000);
|
||||
}
|
||||
else {
|
||||
float tmp_k = 0;
|
||||
char tmp_1[30];
|
||||
sprintf_P(tmp_1, PSTR("G1 Z%d.%d"), int(z_pose), int(int(z_pose * 10) % 10));
|
||||
gcode.process_subcommands_now(tmp_1);
|
||||
|
||||
SERIAL_ECHO(tmp_1);
|
||||
SERIAL_ECHOLNPGM(" ,Z:", current_position.z);
|
||||
|
||||
while (tmp_k < (z_pose - 0.1f)) {
|
||||
tmp_k = planner.get_axis_position_mm(Z_AXIS);
|
||||
safe_delay(1);
|
||||
}
|
||||
safe_delay(800);
|
||||
tmp = (z_pose + 0.0001f) * 10;
|
||||
BD_I2C_SENSOR.BD_i2c_write(tmp);
|
||||
SERIAL_ECHOLNPGM("w:", tmp, ",Zpose:", z_pose);
|
||||
z_pose += 0.1001f;
|
||||
//queue.enqueue_now_P(PSTR("G90"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // BD_SENSOR
|
||||
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
class BDS_Leveling {
|
||||
public:
|
||||
static int8_t config_state;
|
||||
static uint8_t homing;
|
||||
static void echo_name();
|
||||
static void init(uint8_t _sda, uint8_t _scl, uint16_t delay_s);
|
||||
static void process();
|
||||
static float read();
|
||||
};
|
||||
|
||||
extern BDS_Leveling bdl;
|
||||
@@ -154,7 +154,7 @@ void reset_bed_level() {
|
||||
#endif
|
||||
LOOP_L_N(x, sx) {
|
||||
SERIAL_CHAR(' ');
|
||||
const float offset = values[x * sx + y];
|
||||
const float offset = values[x * sy + y];
|
||||
if (!isnan(offset)) {
|
||||
if (offset >= 0) SERIAL_CHAR('+');
|
||||
SERIAL_ECHO_F(offset, int(precision));
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "../../../libs/hex_print.h"
|
||||
#include "../../../module/settings.h"
|
||||
#include "../../../lcd/marlinui.h"
|
||||
#include "../../../module/stepper.h"
|
||||
#include "../../../module/planner.h"
|
||||
#include "../../../module/motion.h"
|
||||
#include "../../../module/probe.h"
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "../bedlevel.h"
|
||||
#include "../../../module/planner.h"
|
||||
#include "../../../module/stepper.h"
|
||||
#include "../../../module/motion.h"
|
||||
|
||||
#if ENABLED(DELTA)
|
||||
@@ -424,10 +423,12 @@
|
||||
LIMIT(icell.x, 0, GRID_MAX_CELLS_X);
|
||||
LIMIT(icell.y, 0, GRID_MAX_CELLS_Y);
|
||||
|
||||
float z_x0y0 = z_values[icell.x ][icell.y ], // z at lower left corner
|
||||
z_x1y0 = z_values[icell.x+1][icell.y ], // z at upper left corner
|
||||
z_x0y1 = z_values[icell.x ][icell.y+1], // z at lower right corner
|
||||
z_x1y1 = z_values[icell.x+1][icell.y+1]; // z at upper right corner
|
||||
const int8_t ncellx = _MIN(icell.x+1, GRID_MAX_CELLS_X),
|
||||
ncelly = _MIN(icell.y+1, GRID_MAX_CELLS_Y);
|
||||
float z_x0y0 = z_values[icell.x][icell.y], // z at lower left corner
|
||||
z_x1y0 = z_values[ncellx ][icell.y], // z at upper left corner
|
||||
z_x0y1 = z_values[icell.x][ncelly ], // z at lower right corner
|
||||
z_x1y1 = z_values[ncellx ][ncelly ]; // z at upper right corner
|
||||
|
||||
if (isnan(z_x0y0)) z_x0y0 = 0; // ideally activating planner.leveling_active (G29 A)
|
||||
if (isnan(z_x1y0)) z_x1y0 = 0; // should refuse if any invalid mesh points
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "dac_dac084s085.h"
|
||||
|
||||
#include "../../MarlinCore.h"
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../HAL/shared/Delay.h"
|
||||
|
||||
dac084s085::dac084s085() { }
|
||||
|
||||
@@ -143,14 +143,16 @@ namespace DirectStepping {
|
||||
// special case for 8-bit, check if rolled back to 0
|
||||
if (Cfg::DIRECTIONAL || !write_page_size) { // full 256 bytes
|
||||
if (write_byte_idx) return true;
|
||||
} else {
|
||||
if (write_byte_idx < write_page_size) return true;
|
||||
}
|
||||
} else if (Cfg::DIRECTIONAL) {
|
||||
if (write_byte_idx != Cfg::PAGE_SIZE) return true;
|
||||
} else {
|
||||
if (write_byte_idx < write_page_size) return true;
|
||||
else if (write_byte_idx < write_page_size)
|
||||
return true;
|
||||
}
|
||||
else if (Cfg::DIRECTIONAL) {
|
||||
if (write_byte_idx != Cfg::PAGE_SIZE)
|
||||
return true;
|
||||
}
|
||||
else if (write_byte_idx < write_page_size)
|
||||
return true;
|
||||
|
||||
state = State::CHECKSUM;
|
||||
return true;
|
||||
@@ -161,11 +163,10 @@ namespace DirectStepping {
|
||||
return true;
|
||||
}
|
||||
case State::UNFAIL:
|
||||
if (c == 0) {
|
||||
if (c == 0)
|
||||
set_page_state(write_page_idx, PageState::FREE);
|
||||
} else {
|
||||
else
|
||||
fatal_error = true;
|
||||
}
|
||||
state = State::MONITOR;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ FWRetract fwretract; // Single instance - this calls the constructor
|
||||
|
||||
#include "../module/motion.h"
|
||||
#include "../module/planner.h"
|
||||
#include "../module/stepper.h"
|
||||
|
||||
#include "../gcode/gcode.h"
|
||||
|
||||
|
||||
@@ -69,6 +69,44 @@ void LEDLights::setup() {
|
||||
#if ENABLED(RGBW_LED)
|
||||
if (PWM_PIN(RGB_LED_W_PIN)) SET_PWM(RGB_LED_W_PIN); else SET_OUTPUT(RGB_LED_W_PIN);
|
||||
#endif
|
||||
|
||||
#if ENABLED(RGB_STARTUP_TEST)
|
||||
int8_t led_pin_count = 0;
|
||||
if (PWM_PIN(RGB_LED_R_PIN) && PWM_PIN(RGB_LED_G_PIN) && PWM_PIN(RGB_LED_B_PIN)) led_pin_count = 3;
|
||||
#if ENABLED(RGBW_LED)
|
||||
if (PWM_PIN(RGB_LED_W_PIN) && led_pin_count) led_pin_count++;
|
||||
#endif
|
||||
// Startup animation
|
||||
if (led_pin_count) {
|
||||
// blackout
|
||||
if (PWM_PIN(RGB_LED_R_PIN)) hal.set_pwm_duty(pin_t(RGB_LED_R_PIN), 0); else WRITE(RGB_LED_R_PIN, LOW);
|
||||
if (PWM_PIN(RGB_LED_G_PIN)) hal.set_pwm_duty(pin_t(RGB_LED_G_PIN), 0); else WRITE(RGB_LED_G_PIN, LOW);
|
||||
if (PWM_PIN(RGB_LED_B_PIN)) hal.set_pwm_duty(pin_t(RGB_LED_B_PIN), 0); else WRITE(RGB_LED_B_PIN, LOW);
|
||||
#if ENABLED(RGBW_LED)
|
||||
if (PWM_PIN(RGB_LED_W_PIN)) hal.set_pwm_duty(pin_t(RGB_LED_W_PIN), 0);
|
||||
else WRITE(RGB_LED_W_PIN, LOW);
|
||||
#endif
|
||||
delay(200);
|
||||
|
||||
LOOP_L_N(i, led_pin_count) {
|
||||
LOOP_LE_N(b, 200) {
|
||||
const uint16_t led_pwm = b <= 100 ? b : 200 - b;
|
||||
if (i == 0 && PWM_PIN(RGB_LED_R_PIN)) hal.set_pwm_duty(pin_t(RGB_LED_R_PIN), led_pwm); else WRITE(RGB_LED_R_PIN, b < 100 ? HIGH : LOW);
|
||||
if (i == 1 && PWM_PIN(RGB_LED_G_PIN)) hal.set_pwm_duty(pin_t(RGB_LED_G_PIN), led_pwm); else WRITE(RGB_LED_G_PIN, b < 100 ? HIGH : LOW);
|
||||
if (i == 2 && PWM_PIN(RGB_LED_B_PIN)) hal.set_pwm_duty(pin_t(RGB_LED_B_PIN), led_pwm); else WRITE(RGB_LED_B_PIN, b < 100 ? HIGH : LOW);
|
||||
#if ENABLED(RGBW_LED)
|
||||
if (i == 3){
|
||||
if (PWM_PIN(RGB_LED_W_PIN)) hal.set_pwm_duty(pin_t(RGB_LED_W_PIN), led_pwm);
|
||||
else WRITE(RGB_LED_W_PIN, b < 100 ? HIGH : LOW);
|
||||
delay(RGB_STARTUP_TEST_INNER_MS);//More slowing for ending
|
||||
}
|
||||
#endif
|
||||
delay(RGB_STARTUP_TEST_INNER_MS);
|
||||
}
|
||||
}
|
||||
delay(500);
|
||||
}
|
||||
#endif // RGB_STARTUP_TEST
|
||||
#endif
|
||||
TERN_(NEOPIXEL_LED, neo.init());
|
||||
TERN_(PCA9533, PCA9533_init());
|
||||
|
||||
@@ -131,6 +131,13 @@ public:
|
||||
// Accessors
|
||||
static uint16_t pixels() { return adaneo1.numPixels() * TERN1(NEOPIXEL2_INSERIES, 2); }
|
||||
|
||||
static uint32_t pixel_color(const uint16_t n) {
|
||||
#if ENABLED(NEOPIXEL2_INSERIES)
|
||||
if (n >= NEOPIXEL_PIXELS) return adaneo2.getPixelColor(n - (NEOPIXEL_PIXELS));
|
||||
#endif
|
||||
return adaneo1.getPixelColor(n);
|
||||
}
|
||||
|
||||
static uint8_t brightness() { return adaneo1.getBrightness(); }
|
||||
|
||||
static uint32_t Color(uint8_t r, uint8_t g, uint8_t b OPTARG(HAS_WHITE_LED, uint8_t w)) {
|
||||
@@ -174,6 +181,7 @@ extern Marlin_NeoPixel neo;
|
||||
|
||||
// Accessors
|
||||
static uint16_t pixels() { return adaneo.numPixels();}
|
||||
static uint32_t pixel_color(const uint16_t n) { return adaneo.getPixelColor(n); }
|
||||
static uint8_t brightness() { return adaneo.getBrightness(); }
|
||||
static uint32_t Color(uint8_t r, uint8_t g, uint8_t b OPTARG(HAS_WHITE_LED2, uint8_t w)) {
|
||||
return adaneo.Color(r, g, b OPTARG(HAS_WHITE_LED2, w));
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
#include "max7219.h"
|
||||
|
||||
#include "../module/planner.h"
|
||||
#include "../module/stepper.h"
|
||||
#include "../MarlinCore.h"
|
||||
#include "../HAL/shared/Delay.h"
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@
|
||||
#include "../gcode/gcode.h"
|
||||
#include "../module/motion.h"
|
||||
#include "../module/planner.h"
|
||||
#include "../module/stepper.h"
|
||||
#include "../module/printcounter.h"
|
||||
#include "../module/temperature.h"
|
||||
|
||||
#if HAS_EXTRUDERS
|
||||
#include "../module/stepper.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#include "bedlevel/bedlevel.h"
|
||||
#endif
|
||||
@@ -63,7 +66,7 @@
|
||||
|
||||
#include "../lcd/marlinui.h"
|
||||
|
||||
#if HAS_BUZZER
|
||||
#if HAS_SOUND
|
||||
#include "../libs/buzzer.h"
|
||||
#endif
|
||||
|
||||
@@ -98,7 +101,7 @@ fil_change_settings_t fc_settings[EXTRUDERS];
|
||||
#define _PMSG(L) L##_LCD
|
||||
#endif
|
||||
|
||||
#if HAS_BUZZER
|
||||
#if HAS_SOUND
|
||||
static void impatient_beep(const int8_t max_beep_count, const bool restart=false) {
|
||||
|
||||
if (TERN0(HAS_MARLINUI_MENU, pause_mode == PAUSE_MODE_PAUSE_PRINT)) return;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "power.h"
|
||||
#include "../module/planner.h"
|
||||
#include "../module/stepper.h"
|
||||
#include "../module/stepper/indirection.h" // for restore_stepper_drivers
|
||||
#include "../module/temperature.h"
|
||||
#include "../MarlinCore.h"
|
||||
|
||||
@@ -46,6 +46,7 @@ Power powerManager;
|
||||
bool Power::psu_on;
|
||||
|
||||
#if ENABLED(AUTO_POWER_CONTROL)
|
||||
#include "../module/stepper.h"
|
||||
#include "../module/temperature.h"
|
||||
|
||||
#if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)
|
||||
|
||||
@@ -67,7 +67,7 @@ cutter_frequency_t SpindleLaser::frequency; // PWM fre
|
||||
void SpindleLaser::init() {
|
||||
#if ENABLED(SPINDLE_SERVO)
|
||||
servo[SPINDLE_SERVO_NR].move(SPINDLE_SERVO_MIN);
|
||||
#else
|
||||
#elif PIN_EXISTS(SPINDLE_LASER_ENA)
|
||||
OUT_WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ACTIVE_STATE); // Init spindle to off
|
||||
#endif
|
||||
#if ENABLED(SPINDLE_CHANGE_DIR)
|
||||
@@ -104,12 +104,16 @@ void SpindleLaser::init() {
|
||||
}
|
||||
|
||||
void SpindleLaser::set_ocr(const uint8_t ocr) {
|
||||
WRITE(SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_ACTIVE_STATE); // Cutter ON
|
||||
#if PIN_EXISTS(SPINDLE_LASER_ENA)
|
||||
WRITE(SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_ACTIVE_STATE); // Cutter ON
|
||||
#endif
|
||||
_set_ocr(ocr);
|
||||
}
|
||||
|
||||
void SpindleLaser::ocr_off() {
|
||||
WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ACTIVE_STATE); // Cutter OFF
|
||||
#if PIN_EXISTS(SPINDLE_LASER_ENA)
|
||||
WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ACTIVE_STATE); // Cutter OFF
|
||||
#endif
|
||||
_set_ocr(0);
|
||||
}
|
||||
#endif // SPINDLE_LASER_USE_PWM
|
||||
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
* - For CUTTER_MODE_ERROR set the output enable_state flag directly and set power to 0 for any mode.
|
||||
* This mode allows a global power shutdown action to occur.
|
||||
*/
|
||||
static void set_enabled(const bool enable) {
|
||||
static void set_enabled(bool enable) {
|
||||
switch (cutter_mode) {
|
||||
case CUTTER_MODE_STANDARD:
|
||||
apply_power(enable ? TERN(SPINDLE_LASER_USE_PWM, (power ?: (unitPower ? upower_to_ocr(cpwr_to_upwr(SPEED_POWER_STARTUP)) : 0)), 255) : 0);
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
TERN_(LASER_FEATURE, set_inline_enabled(enable));
|
||||
break;
|
||||
case CUTTER_MODE_ERROR: // Error mode, no enable and kill power.
|
||||
enable_state = false;
|
||||
enable = false;
|
||||
apply_power(0);
|
||||
}
|
||||
#if SPINDLE_LASER_ENA_PIN
|
||||
@@ -279,13 +279,14 @@ public:
|
||||
|
||||
#if ENABLED(LASER_FEATURE)
|
||||
// Toggle the laser on/off with menuPower. Apply SPEED_POWER_STARTUP if it was 0 on entry.
|
||||
static void laser_menu_toggle(const bool state) {
|
||||
static void menu_set_enabled(const bool state) {
|
||||
set_enabled(state);
|
||||
if (state) {
|
||||
if (!menuPower) menuPower = cpwr_to_upwr(SPEED_POWER_STARTUP);
|
||||
power = upower_to_ocr(menuPower);
|
||||
apply_power(power);
|
||||
}
|
||||
} else
|
||||
apply_power(0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -294,11 +295,11 @@ public:
|
||||
* If not set defaults to 80% power
|
||||
*/
|
||||
static void test_fire_pulse() {
|
||||
TERN_(HAS_BEEPER, buzzer.tone(30, 3000));
|
||||
cutter_mode = CUTTER_MODE_STANDARD;// Menu needs standard mode.
|
||||
laser_menu_toggle(true); // Laser On
|
||||
delay(testPulse); // Delay for time set by user in pulse ms menu screen.
|
||||
laser_menu_toggle(false); // Laser Off
|
||||
BUZZ(30, 3000);
|
||||
cutter_mode = CUTTER_MODE_STANDARD; // Menu needs standard mode.
|
||||
menu_set_enabled(true); // Laser On
|
||||
delay(testPulse); // Delay for time set by user in pulse ms menu screen.
|
||||
menu_set_enabled(false); // Laser Off
|
||||
}
|
||||
#endif // LASER_FEATURE
|
||||
|
||||
@@ -308,14 +309,14 @@ public:
|
||||
|
||||
// Dynamic mode rate calculation
|
||||
static uint8_t calc_dynamic_power() {
|
||||
if (feedrate_mm_m > 65535) return 255; // Too fast, go always on
|
||||
uint16_t rate = uint16_t(feedrate_mm_m); // 16 bits from the G-code parser float input
|
||||
rate >>= 8; // Take the G-code input e.g. F40000 and shift off the lower bits to get an OCR value from 1-255
|
||||
if (feedrate_mm_m > 65535) return 255; // Too fast, go always on
|
||||
uint16_t rate = uint16_t(feedrate_mm_m); // 16 bits from the G-code parser float input
|
||||
rate >>= 8; // Take the G-code input e.g. F40000 and shift off the lower bits to get an OCR value from 1-255
|
||||
return uint8_t(rate);
|
||||
}
|
||||
|
||||
// Inline modes of all other functions; all enable planner inline power control
|
||||
static void set_inline_enabled(const bool enable) { planner.laser_inline.status.isEnabled = enable;}
|
||||
static void set_inline_enabled(const bool enable) { planner.laser_inline.status.isEnabled = enable; }
|
||||
|
||||
// Set the power for subsequent movement blocks
|
||||
static void inline_power(const cutter_power_t cpwr) {
|
||||
|
||||
@@ -33,17 +33,12 @@
|
||||
#include "../gcode/gcode.h"
|
||||
|
||||
#if ENABLED(TMC_DEBUG)
|
||||
#include "../module/planner.h"
|
||||
#include "../libs/hex_print.h"
|
||||
#if ENABLED(MONITOR_DRIVER_STATUS)
|
||||
static uint16_t report_tmc_status_interval; // = 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MARLINUI_MENU
|
||||
#include "../module/stepper.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check for over temperature or short to ground error flags.
|
||||
* Report and log warning of overtemperature condition.
|
||||
|
||||
@@ -107,7 +107,6 @@
|
||||
|
||||
#include "../../MarlinCore.h"
|
||||
#include "../../module/planner.h"
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/motion.h"
|
||||
#include "../../module/tool_change.h"
|
||||
#include "../../module/temperature.h"
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "../../../feature/bedlevel/bedlevel.h"
|
||||
#include "../../../module/motion.h"
|
||||
#include "../../../module/planner.h"
|
||||
#include "../../../module/stepper.h"
|
||||
#include "../../../module/probe.h"
|
||||
#include "../../queue.h"
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "../../../libs/buzzer.h"
|
||||
#include "../../../lcd/marlinui.h"
|
||||
#include "../../../module/motion.h"
|
||||
#include "../../../module/stepper.h"
|
||||
#include "../../../module/planner.h"
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../../lcd/extui/ui_api.h"
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
|
||||
#include "../gcode.h"
|
||||
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/endstops.h"
|
||||
#include "../../module/planner.h"
|
||||
#include "../../module/stepper.h" // for various
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
#include "../../module/tool_change.h"
|
||||
@@ -35,6 +36,10 @@
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BD_SENSOR)
|
||||
#include "../../feature/bedlevel/bdl/bdl.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(SENSORLESS_HOMING)
|
||||
#include "../../feature/tmc_util.h"
|
||||
#endif
|
||||
@@ -201,7 +206,9 @@ void GcodeSuite::G28() {
|
||||
DEBUG_SECTION(log_G28, "G28", DEBUGGING(LEVELING));
|
||||
if (DEBUGGING(LEVELING)) log_machine_info();
|
||||
|
||||
/*
|
||||
TERN_(BD_SENSOR, bdl.config_state = 0);
|
||||
|
||||
/**
|
||||
* Set the laser power to false to stop the planner from processing the current power setting.
|
||||
*/
|
||||
#if ENABLED(LASER_FEATURE)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "../gcode.h"
|
||||
#include "../../module/delta.h"
|
||||
#include "../../module/motion.h"
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/planner.h"
|
||||
#include "../../module/endstops.h"
|
||||
#include "../../lcd/marlinui.h"
|
||||
|
||||
|
||||
@@ -26,9 +26,12 @@
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/motion.h"
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
#if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_PWM, HAS_TRINAMIC_CONFIG)
|
||||
#include "../../module/stepper.h"
|
||||
#endif
|
||||
|
||||
#if HAS_LEVELING
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
@@ -224,13 +224,15 @@ void GcodeSuite::G34() {
|
||||
// Safe clearance even on an incline
|
||||
if ((iteration == 0 || i > 0) && z_probe > current_position.z) do_blocking_move_to_z(z_probe);
|
||||
|
||||
xy_pos_t &ppos = z_stepper_align.xy[iprobe];
|
||||
|
||||
if (DEBUGGING(LEVELING))
|
||||
DEBUG_ECHOLNPGM_P(PSTR("Probing X"), z_stepper_align.xy[iprobe].x, SP_Y_STR, z_stepper_align.xy[iprobe].y);
|
||||
DEBUG_ECHOLNPGM_P(PSTR("Probing X"), ppos.x, SP_Y_STR, ppos.y);
|
||||
|
||||
// Probe a Z height for each stepper.
|
||||
// Probing sanity check is disabled, as it would trigger even in normal cases because
|
||||
// current_position.z has been manually altered in the "dirty trick" above.
|
||||
const float z_probed_height = probe.probe_at_point(RAW_X_POSITION(z_stepper_align.xy[iprobe].x), RAW_Y_POSITION(z_stepper_align.xy[iprobe].y), raise_after, 0, true, false);
|
||||
const float z_probed_height = probe.probe_at_point(DIFF_TERN(HAS_HOME_OFFSET, ppos, xy_pos_t(home_offset)), raise_after, 0, true, false);
|
||||
if (isnan(z_probed_height)) {
|
||||
SERIAL_ECHOLNPGM("Probing failed");
|
||||
LCD_MESSAGE(MSG_LCD_PROBING_FAILED);
|
||||
|
||||
@@ -43,13 +43,14 @@
|
||||
* S[linear] Swap length
|
||||
* B[linear] Extra Swap resume length
|
||||
* E[linear] Extra Prime length (as used by M217 Q)
|
||||
* P[linear/min] Prime speed
|
||||
* G[linear] Cutting wipe retract length (<=100mm)
|
||||
* R[linear/min] Retract speed
|
||||
* U[linear/min] UnRetract speed
|
||||
* P[linear/min] Prime speed
|
||||
* V[linear] 0/1 Enable auto prime first extruder used
|
||||
* W[linear] 0/1 Enable park & Z Raise
|
||||
* X[linear] Park X (Requires TOOLCHANGE_PARK)
|
||||
* Y[linear] Park Y (Requires TOOLCHANGE_PARK)
|
||||
* Y[linear] Park Y (Requires TOOLCHANGE_PARK and NUM_AXES >= 2)
|
||||
* I[linear] Park I (Requires TOOLCHANGE_PARK and NUM_AXES >= 4)
|
||||
* J[linear] Park J (Requires TOOLCHANGE_PARK and NUM_AXES >= 5)
|
||||
* K[linear] Park K (Requires TOOLCHANGE_PARK and NUM_AXES >= 6)
|
||||
@@ -79,6 +80,7 @@ void GcodeSuite::M217() {
|
||||
if (parser.seenval('B')) { const float v = parser.value_linear_units(); toolchange_settings.extra_resume = constrain(v, -10, 10); }
|
||||
if (parser.seenval('E')) { const float v = parser.value_linear_units(); toolchange_settings.extra_prime = constrain(v, 0, max_extrude); }
|
||||
if (parser.seenval('P')) { const int16_t v = parser.value_linear_units(); toolchange_settings.prime_speed = constrain(v, 10, 5400); }
|
||||
if (parser.seenval('G')) { const int16_t v = parser.value_linear_units(); toolchange_settings.wipe_retract = constrain(v, 0, 100); }
|
||||
if (parser.seenval('R')) { const int16_t v = parser.value_linear_units(); toolchange_settings.retract_speed = constrain(v, 10, 5400); }
|
||||
if (parser.seenval('U')) { const int16_t v = parser.value_linear_units(); toolchange_settings.unretract_speed = constrain(v, 10, 5400); }
|
||||
#if TOOLCHANGE_FS_FAN >= 0 && HAS_FAN
|
||||
@@ -164,21 +166,24 @@ void GcodeSuite::M217_report(const bool forReplay/*=true*/) {
|
||||
SERIAL_ECHOPGM(" M217");
|
||||
|
||||
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
||||
SERIAL_ECHOPGM(" S", LINEAR_UNIT(toolchange_settings.swap_length));
|
||||
SERIAL_ECHOPGM_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume),
|
||||
SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime),
|
||||
SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed));
|
||||
SERIAL_ECHOPGM(" R", LINEAR_UNIT(toolchange_settings.retract_speed),
|
||||
" U", LINEAR_UNIT(toolchange_settings.unretract_speed),
|
||||
" F", toolchange_settings.fan_speed,
|
||||
" D", toolchange_settings.fan_time);
|
||||
SERIAL_ECHOPGM_P(
|
||||
PSTR(" S"), LINEAR_UNIT(toolchange_settings.swap_length),
|
||||
SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume),
|
||||
SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime),
|
||||
SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed),
|
||||
PSTR(" G"), LINEAR_UNIT(toolchange_settings.wipe_retract),
|
||||
PSTR(" R"), LINEAR_UNIT(toolchange_settings.retract_speed),
|
||||
PSTR(" U"), LINEAR_UNIT(toolchange_settings.unretract_speed),
|
||||
PSTR(" F"), toolchange_settings.fan_speed,
|
||||
PSTR(" D"), toolchange_settings.fan_time
|
||||
);
|
||||
|
||||
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
||||
SERIAL_ECHOPGM(" A", migration.automode);
|
||||
SERIAL_ECHOPGM(" L", LINEAR_UNIT(migration.last));
|
||||
SERIAL_ECHOPGM(" A", migration.automode, " L", LINEAR_UNIT(migration.last));
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOOLCHANGE_PARK)
|
||||
{
|
||||
SERIAL_ECHOPGM(" W", LINEAR_UNIT(toolchange_settings.enable_park));
|
||||
SERIAL_ECHOPGM_P(
|
||||
SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x)
|
||||
@@ -196,6 +201,7 @@ void GcodeSuite::M217_report(const bool forReplay/*=true*/) {
|
||||
)
|
||||
#endif
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED)
|
||||
|
||||
@@ -57,19 +57,18 @@ void GcodeSuite::M301() {
|
||||
|
||||
if (e < HOTENDS) { // catch bad input value
|
||||
|
||||
if (parser.seenval('P')) PID_PARAM(Kp, e) = parser.value_float();
|
||||
if (parser.seenval('I')) PID_PARAM(Ki, e) = scalePID_i(parser.value_float());
|
||||
if (parser.seenval('D')) PID_PARAM(Kd, e) = scalePID_d(parser.value_float());
|
||||
if (parser.seenval('P')) SET_HOTEND_PID(Kp, e, parser.value_float());
|
||||
if (parser.seenval('I')) SET_HOTEND_PID(Ki, e, parser.value_float());
|
||||
if (parser.seenval('D')) SET_HOTEND_PID(Kd, e, parser.value_float());
|
||||
|
||||
#if ENABLED(PID_EXTRUSION_SCALING)
|
||||
if (parser.seenval('C')) PID_PARAM(Kc, e) = parser.value_float();
|
||||
if (parser.seenval('C')) SET_HOTEND_PID(Kc, e, parser.value_float());
|
||||
if (parser.seenval('L')) thermalManager.lpq_len = parser.value_int();
|
||||
NOMORE(thermalManager.lpq_len, LPQ_MAX_LEN);
|
||||
NOLESS(thermalManager.lpq_len, 0);
|
||||
LIMIT(thermalManager.lpq_len, 0, LPQ_MAX_LEN);
|
||||
#endif
|
||||
|
||||
#if ENABLED(PID_FAN_SCALING)
|
||||
if (parser.seenval('F')) PID_PARAM(Kf, e) = parser.value_float();
|
||||
if (parser.seenval('F')) SET_HOTEND_PID(Kf, e, parser.value_float());
|
||||
#endif
|
||||
|
||||
thermalManager.updatePID();
|
||||
@@ -83,6 +82,7 @@ void GcodeSuite::M301_report(const bool forReplay/*=true*/ E_OPTARG(const int8_t
|
||||
IF_DISABLED(HAS_MULTI_EXTRUDER, constexpr int8_t eindex = -1);
|
||||
HOTEND_LOOP() {
|
||||
if (e == eindex || eindex == -1) {
|
||||
const hotend_pid_t &pid = thermalManager.temp_hotend[e].pid;
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOPGM_P(
|
||||
#if ENABLED(PID_PARAMS_PER_HOTEND)
|
||||
@@ -90,16 +90,14 @@ void GcodeSuite::M301_report(const bool forReplay/*=true*/ E_OPTARG(const int8_t
|
||||
#else
|
||||
PSTR(" M301 P")
|
||||
#endif
|
||||
, PID_PARAM(Kp, e)
|
||||
, PSTR(" I"), unscalePID_i(PID_PARAM(Ki, e))
|
||||
, PSTR(" D"), unscalePID_d(PID_PARAM(Kd, e))
|
||||
, pid.p(), PSTR(" I"), pid.i(), PSTR(" D"), pid.d()
|
||||
);
|
||||
#if ENABLED(PID_EXTRUSION_SCALING)
|
||||
SERIAL_ECHOPGM_P(SP_C_STR, PID_PARAM(Kc, e));
|
||||
SERIAL_ECHOPGM_P(SP_C_STR, pid.c());
|
||||
if (e == 0) SERIAL_ECHOPGM(" L", thermalManager.lpq_len);
|
||||
#endif
|
||||
#if ENABLED(PID_FAN_SCALING)
|
||||
SERIAL_ECHOPGM(" F", PID_PARAM(Kf, e));
|
||||
SERIAL_ECHOPGM(" F", pid.f());
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
@@ -36,17 +36,17 @@
|
||||
*/
|
||||
void GcodeSuite::M304() {
|
||||
if (!parser.seen("PID")) return M304_report();
|
||||
if (parser.seenval('P')) thermalManager.temp_bed.pid.Kp = parser.value_float();
|
||||
if (parser.seenval('I')) thermalManager.temp_bed.pid.Ki = scalePID_i(parser.value_float());
|
||||
if (parser.seenval('D')) thermalManager.temp_bed.pid.Kd = scalePID_d(parser.value_float());
|
||||
if (parser.seenval('P')) thermalManager.temp_bed.pid.set_Kp(parser.value_float());
|
||||
if (parser.seenval('I')) thermalManager.temp_bed.pid.set_Ki(parser.value_float());
|
||||
if (parser.seenval('D')) thermalManager.temp_bed.pid.set_Kd(parser.value_float());
|
||||
}
|
||||
|
||||
void GcodeSuite::M304_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, F(STR_BED_PID));
|
||||
SERIAL_ECHOLNPGM(
|
||||
" M304 P", thermalManager.temp_bed.pid.Kp
|
||||
, " I", unscalePID_i(thermalManager.temp_bed.pid.Ki)
|
||||
, " D", unscalePID_d(thermalManager.temp_bed.pid.Kd)
|
||||
SERIAL_ECHOLNPGM(" M304"
|
||||
" P", thermalManager.temp_bed.pid.p()
|
||||
, " I", thermalManager.temp_bed.pid.i()
|
||||
, " D", thermalManager.temp_bed.pid.d()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,17 +36,17 @@
|
||||
*/
|
||||
void GcodeSuite::M309() {
|
||||
if (!parser.seen("PID")) return M309_report();
|
||||
if (parser.seen('P')) thermalManager.temp_chamber.pid.Kp = parser.value_float();
|
||||
if (parser.seen('I')) thermalManager.temp_chamber.pid.Ki = scalePID_i(parser.value_float());
|
||||
if (parser.seen('D')) thermalManager.temp_chamber.pid.Kd = scalePID_d(parser.value_float());
|
||||
if (parser.seenval('P')) thermalManager.temp_chamber.pid.set_Kp(parser.value_float());
|
||||
if (parser.seenval('I')) thermalManager.temp_chamber.pid.set_Ki(parser.value_float());
|
||||
if (parser.seenval('D')) thermalManager.temp_chamber.pid.set_Kd(parser.value_float());
|
||||
}
|
||||
|
||||
void GcodeSuite::M309_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, F(STR_CHAMBER_PID));
|
||||
SERIAL_ECHOLNPGM(
|
||||
" M309 P", thermalManager.temp_chamber.pid.Kp
|
||||
, " I", unscalePID_i(thermalManager.temp_chamber.pid.Ki)
|
||||
, " D", unscalePID_d(thermalManager.temp_chamber.pid.Kd)
|
||||
SERIAL_ECHOLNPGM(" M309"
|
||||
" P", thermalManager.temp_chamber.pid.p()
|
||||
, " I", thermalManager.temp_chamber.pid.i()
|
||||
, " D", thermalManager.temp_chamber.pid.d()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#if ENABLED(SD_ABORT_ON_ENDSTOP_HIT)
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/planner.h"
|
||||
|
||||
/**
|
||||
* M540: Set whether SD card print should abort on endstop hit (M540 S<0|1>)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "../../MarlinCore.h" // for stepper_inactive_time, disable_e_steppers
|
||||
#include "../../lcd/marlinui.h"
|
||||
#include "../../module/motion.h" // for e_axis_mask
|
||||
#include "../../module/planner.h"
|
||||
#include "../../module/stepper.h"
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../MarlinCore.h" // for pin_is_protected and idle()
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/planner.h"
|
||||
|
||||
void protected_pin_err();
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../feature/spindle_laser.h"
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/planner.h"
|
||||
|
||||
/**
|
||||
* Laser:
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/planner.h"
|
||||
|
||||
/**
|
||||
* M400: Finish all moves
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/motion.h"
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/tool_change.h"
|
||||
#include "../../module/planner.h"
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#include "../../gcode.h"
|
||||
#include "../../../module/planner.h"
|
||||
#include "../../../module/stepper.h"
|
||||
|
||||
#if ENABLED(EXTRA_LIN_ADVANCE_K)
|
||||
float other_extruder_advance_K[EXTRUDERS];
|
||||
|
||||
@@ -31,11 +31,13 @@
|
||||
* M150: Set Status LED Color - Use R-U-B-W for R-G-B-W
|
||||
* and Brightness - Use P (for NEOPIXEL only)
|
||||
*
|
||||
* Always sets all 3 or 4 components. If a component is left out, set to 0.
|
||||
* If brightness is left out, no value changed
|
||||
* Always sets all 3 or 4 components unless the K flag is specified.
|
||||
* If a component is left out, set to 0.
|
||||
* If brightness is left out, no value changed.
|
||||
*
|
||||
* With NEOPIXEL_LED:
|
||||
* I<index> Set the NeoPixel index to affect. Default: All
|
||||
* K Keep all unspecified values unchanged instead of setting to 0.
|
||||
*
|
||||
* With NEOPIXEL2_SEPARATE:
|
||||
* S<index> The NeoPixel strip to set. Default: All.
|
||||
@@ -51,16 +53,19 @@
|
||||
* M150 P ; Set LED full brightness
|
||||
* M150 I1 R ; Set NEOPIXEL index 1 to red
|
||||
* M150 S1 I1 R ; Set SEPARATE index 1 to red
|
||||
* M150 K R127 ; Set LED red to 50% without changing blue or green
|
||||
*/
|
||||
void GcodeSuite::M150() {
|
||||
int32_t old_color = 0;
|
||||
|
||||
#if ENABLED(NEOPIXEL_LED)
|
||||
const pixel_index_t index = parser.intval('I', -1);
|
||||
#if ENABLED(NEOPIXEL2_SEPARATE)
|
||||
int8_t brightness = neo.brightness(), unit = parser.intval('S', -1);
|
||||
switch (unit) {
|
||||
case -1: neo2.neoindex = index; // fall-thru
|
||||
case 0: neo.neoindex = index; break;
|
||||
case 1: neo2.neoindex = index; brightness = neo2.brightness(); break;
|
||||
case 0: neo.neoindex = index; old_color = parser.seen('K') ? neo.pixel_color(index >= 0 ? index : 0) : 0; break;
|
||||
case 1: neo2.neoindex = index; brightness = neo2.brightness(); old_color = parser.seen('K') ? neo2.pixel_color(index >= 0 ? index : 0) : 0; break;
|
||||
}
|
||||
#else
|
||||
const uint8_t brightness = neo.brightness();
|
||||
@@ -69,10 +74,10 @@ void GcodeSuite::M150() {
|
||||
#endif
|
||||
|
||||
const LEDColor color = LEDColor(
|
||||
parser.seen('R') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
|
||||
parser.seen('U') ? (parser.has_value() ? parser.value_byte() : 255) : 0,
|
||||
parser.seen('B') ? (parser.has_value() ? parser.value_byte() : 255) : 0
|
||||
OPTARG(HAS_WHITE_LED, parser.seen('W') ? (parser.has_value() ? parser.value_byte() : 255) : 0)
|
||||
parser.seen('R') ? (parser.has_value() ? parser.value_byte() : 255) : (old_color >> 16) & 0xFF,
|
||||
parser.seen('U') ? (parser.has_value() ? parser.value_byte() : 255) : (old_color >> 8) & 0xFF,
|
||||
parser.seen('B') ? (parser.has_value() ? parser.value_byte() : 255) : old_color & 0xFF
|
||||
OPTARG(HAS_WHITE_LED, parser.seen('W') ? (parser.has_value() ? parser.value_byte() : 255) : (old_color >> 24) & 0xFF)
|
||||
OPTARG(NEOPIXEL_LED, parser.seen('P') ? (parser.has_value() ? parser.value_byte() : 255) : brightness)
|
||||
);
|
||||
|
||||
|
||||
@@ -71,12 +71,12 @@ void GcodeSuite::M125() {
|
||||
if (parser.seenval('X')) park_point.x = RAW_X_POSITION(parser.linearval('X')),
|
||||
if (parser.seenval('Y')) park_point.y = RAW_Y_POSITION(parser.linearval('Y')),
|
||||
NOOP,
|
||||
if (parser.seenval(AXIS4_NAME)) park_point.i = RAW_X_POSITION(parser.linearval(AXIS4_NAME)),
|
||||
if (parser.seenval(AXIS5_NAME)) park_point.j = RAW_X_POSITION(parser.linearval(AXIS5_NAME)),
|
||||
if (parser.seenval(AXIS6_NAME)) park_point.k = RAW_X_POSITION(parser.linearval(AXIS6_NAME)),
|
||||
if (parser.seenval(AXIS7_NAME)) park_point.u = RAW_X_POSITION(parser.linearval(AXIS7_NAME)),
|
||||
if (parser.seenval(AXIS8_NAME)) park_point.v = RAW_X_POSITION(parser.linearval(AXIS8_NAME)),
|
||||
if (parser.seenval(AXIS9_NAME)) park_point.w = RAW_X_POSITION(parser.linearval(AXIS9_NAME))
|
||||
if (parser.seenval(AXIS4_NAME)) park_point.i = RAW_I_POSITION(parser.linearval(AXIS4_NAME)),
|
||||
if (parser.seenval(AXIS5_NAME)) park_point.j = RAW_J_POSITION(parser.linearval(AXIS5_NAME)),
|
||||
if (parser.seenval(AXIS6_NAME)) park_point.k = RAW_K_POSITION(parser.linearval(AXIS6_NAME)),
|
||||
if (parser.seenval(AXIS7_NAME)) park_point.u = RAW_U_POSITION(parser.linearval(AXIS7_NAME)),
|
||||
if (parser.seenval(AXIS8_NAME)) park_point.v = RAW_V_POSITION(parser.linearval(AXIS8_NAME)),
|
||||
if (parser.seenval(AXIS9_NAME)) park_point.w = RAW_W_POSITION(parser.linearval(AXIS9_NAME))
|
||||
);
|
||||
|
||||
// Lift Z axis
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#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
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
||||
@@ -69,6 +71,8 @@ void GcodeSuite::M1000() {
|
||||
ui.goto_screen(menu_job_recovery);
|
||||
#elif HAS_DWIN_E3V2_BASIC
|
||||
recovery.dwin_flag = true;
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) // Temporary fix until it can be better implemented
|
||||
CrealityDWIN.Popup_Handler(Resume);
|
||||
#elif ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onPowerLossResume();
|
||||
#else
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "../../gcode.h"
|
||||
#include "../../../feature/tmc_util.h"
|
||||
#include "../../../module/stepper/indirection.h"
|
||||
#include "../../../module/stepper/indirection.h" // for restore_stepper_drivers
|
||||
|
||||
/**
|
||||
* M122: Debug TMC drivers
|
||||
|
||||
@@ -294,14 +294,14 @@
|
||||
#if X_HAS_STEALTHCHOP || X2_HAS_STEALTHCHOP
|
||||
case X_AXIS:
|
||||
TERN_(X_HAS_STEALTHCHOP, if (index < 2) TMC_SET_PWMTHRS(X,X));
|
||||
TERN_(X2_HAS_STEALTHCHOP, if (!(index & 1)) TMC_SET_PWMTHRS(X,X2));
|
||||
TERN_(X2_HAS_STEALTHCHOP, if (!index || index == 2) TMC_SET_PWMTHRS(X,X2));
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if Y_HAS_STEALTHCHOP || Y2_HAS_STEALTHCHOP
|
||||
case Y_AXIS:
|
||||
TERN_(Y_HAS_STEALTHCHOP, if (index < 2) TMC_SET_PWMTHRS(Y,Y));
|
||||
TERN_(Y2_HAS_STEALTHCHOP, if (!(index & 1)) TMC_SET_PWMTHRS(Y,Y2));
|
||||
TERN_(Y2_HAS_STEALTHCHOP, if (!index || index == 2) TMC_SET_PWMTHRS(Y,Y2));
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -499,7 +499,6 @@
|
||||
* M914: Set StallGuard sensitivity.
|
||||
*/
|
||||
void GcodeSuite::M914() {
|
||||
|
||||
bool report = true;
|
||||
const uint8_t index = parser.byteval('I');
|
||||
LOOP_NUM_AXES(i) if (parser.seen(AXIS_CHAR(i))) {
|
||||
@@ -509,13 +508,13 @@
|
||||
#if X_SENSORLESS
|
||||
case X_AXIS:
|
||||
if (index < 2) stepperX.homing_threshold(value);
|
||||
TERN_(X2_SENSORLESS, if (!(index & 1)) stepperX2.homing_threshold(value));
|
||||
TERN_(X2_SENSORLESS, if (!index || index == 2) stepperX2.homing_threshold(value));
|
||||
break;
|
||||
#endif
|
||||
#if Y_SENSORLESS
|
||||
case Y_AXIS:
|
||||
if (index < 2) stepperY.homing_threshold(value);
|
||||
TERN_(Y2_SENSORLESS, if (!(index & 1)) stepperY2.homing_threshold(value));
|
||||
TERN_(Y2_SENSORLESS, if (!index || index == 2) stepperY2.homing_threshold(value));
|
||||
break;
|
||||
#endif
|
||||
#if Z_SENSORLESS
|
||||
|
||||
@@ -233,7 +233,7 @@ void GcodeSuite::get_destination_from_command() {
|
||||
if (WITHIN(parser.codenum, 1, TERN(ARC_SUPPORT, 3, 1)) || TERN0(BEZIER_CURVE_SUPPORT, parser.codenum == 5)) {
|
||||
planner.laser_inline.status.isPowered = true;
|
||||
if (parser.seen('I')) cutter.set_enabled(true); // This is set for backward LightBurn compatibility.
|
||||
if (parser.seen('S')) {
|
||||
if (parser.seenval('S')) {
|
||||
const float v = parser.value_float(),
|
||||
u = TERN(LASER_POWER_TRAP, v, cutter.power_to_range(v));
|
||||
cutter.menuPower = cutter.unitPower = u;
|
||||
@@ -577,6 +577,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 100: M100(); break; // M100: Free Memory Report
|
||||
#endif
|
||||
|
||||
#if ENABLED(BD_SENSOR)
|
||||
case 102: M102(); break; // M102: Configure Bed Distance Sensor
|
||||
#endif
|
||||
|
||||
#if HAS_EXTRUDERS
|
||||
case 104: M104(); break; // M104: Set hot end temperature
|
||||
case 109: M109(); break; // M109: Wait for hotend temperature to reach target
|
||||
@@ -765,7 +769,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 290: M290(); break; // M290: Babystepping
|
||||
#endif
|
||||
|
||||
#if HAS_BUZZER
|
||||
#if HAS_SOUND
|
||||
case 300: M300(); break; // M300: Play beep tone
|
||||
#endif
|
||||
|
||||
|
||||
@@ -132,6 +132,8 @@
|
||||
*
|
||||
* M100 - Watch Free Memory (for debugging) (Requires M100_FREE_MEMORY_WATCHER)
|
||||
*
|
||||
* M102 - Configure Bed Distance Sensor. (Requires BD_SENSOR)
|
||||
*
|
||||
* M104 - Set extruder target temp.
|
||||
* M105 - Report current temperatures.
|
||||
* M106 - Set print fan speed.
|
||||
@@ -705,6 +707,11 @@ private:
|
||||
static void M100();
|
||||
#endif
|
||||
|
||||
#if ENABLED(BD_SENSOR)
|
||||
static void M102();
|
||||
static void M102_report(const bool forReplay=true);
|
||||
#endif
|
||||
|
||||
#if HAS_EXTRUDERS
|
||||
static void M104_M109(const bool isM109);
|
||||
FORCE_INLINE static void M104() { M104_M109(false); }
|
||||
@@ -914,7 +921,7 @@ private:
|
||||
static void M290();
|
||||
#endif
|
||||
|
||||
#if HAS_BUZZER
|
||||
#if HAS_SOUND
|
||||
static void M300();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
|
||||
#if ENABLED(CNC_COORDINATE_SYSTEMS)
|
||||
|
||||
#include "../../module/stepper.h"
|
||||
|
||||
//#define DEBUG_M53
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/motion.h"
|
||||
#include "../../module/stepper.h"
|
||||
|
||||
#if ENABLED(I2C_POSITION_ENCODERS)
|
||||
#include "../../feature/encoder_i2c.h"
|
||||
|
||||
@@ -130,6 +130,13 @@ void GcodeSuite::M115() {
|
||||
cap_line(F("TOGGLE_LIGHTS"), ENABLED(CASE_LIGHT_ENABLE));
|
||||
cap_line(F("CASE_LIGHT_BRIGHTNESS"), TERN0(CASE_LIGHT_ENABLE, caselight.has_brightness()));
|
||||
|
||||
// SPINDLE AND LASER CONTROL (M3, M4, M5)
|
||||
#if ENABLED(SPINDLE_FEATURE)
|
||||
cap_line(F("SPINDLE"), true);
|
||||
#elif ENABLED(LASER_FEATURE)
|
||||
cap_line(F("LASER"), true);
|
||||
#endif
|
||||
|
||||
// EMERGENCY_PARSER (M108, M112, M410, M876)
|
||||
cap_line(F("EMERGENCY_PARSER"), ENABLED(EMERGENCY_PARSER));
|
||||
|
||||
|
||||
@@ -32,12 +32,11 @@
|
||||
*/
|
||||
void GcodeSuite::M255() {
|
||||
if (parser.seenval('S')) {
|
||||
const int m = parser.value_int();
|
||||
#if HAS_DISPLAY_SLEEP
|
||||
const int m = parser.value_int();
|
||||
ui.sleep_timeout_minutes = constrain(m, SLEEP_TIMEOUT_MIN, SLEEP_TIMEOUT_MAX);
|
||||
ui.sleep_timeout_minutes = constrain(m, ui.sleep_timeout_min, ui.sleep_timeout_max);
|
||||
#else
|
||||
const unsigned int s = parser.value_ushort() * 60;
|
||||
ui.lcd_backlight_timeout = constrain(s, LCD_BKL_TIMEOUT_MIN, LCD_BKL_TIMEOUT_MAX);
|
||||
ui.backlight_timeout_minutes = constrain(m, ui.backlight_timeout_min, ui.backlight_timeout_max);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@@ -47,11 +46,8 @@ void GcodeSuite::M255() {
|
||||
void GcodeSuite::M255_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, F(STR_DISPLAY_SLEEP));
|
||||
SERIAL_ECHOLNPGM(" M255 S",
|
||||
#if HAS_DISPLAY_SLEEP
|
||||
ui.sleep_timeout_minutes, " ; (minutes)"
|
||||
#else
|
||||
ui.lcd_backlight_timeout, " ; (seconds)"
|
||||
#endif
|
||||
TERN(HAS_DISPLAY_SLEEP, ui.sleep_timeout_minutes, ui.backlight_timeout_minutes),
|
||||
" ; (minutes)"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_BUZZER
|
||||
#if HAS_SOUND
|
||||
|
||||
#include "../gcode.h"
|
||||
|
||||
@@ -42,4 +42,4 @@ void GcodeSuite::M300() {
|
||||
BUZZ(duration, frequency);
|
||||
}
|
||||
|
||||
#endif // HAS_BUZZER
|
||||
#endif // HAS_SOUND
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "../../sd/cardreader.h"
|
||||
|
||||
#if ENABLED(NANODLP_Z_SYNC)
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/planner.h"
|
||||
#endif
|
||||
|
||||
extern xyze_pos_t destination;
|
||||
|
||||
@@ -364,6 +364,8 @@ void plan_arc(
|
||||
|
||||
if (!planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, hints))
|
||||
break;
|
||||
|
||||
hints.curve_radius = radius;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/planner.h"
|
||||
#include "../../lcd/marlinui.h"
|
||||
|
||||
/**
|
||||
|
||||
+12
-14
@@ -256,22 +256,20 @@ public:
|
||||
|
||||
// Float removes 'E' to prevent scientific notation interpretation
|
||||
static float value_float() {
|
||||
if (value_ptr) {
|
||||
char *e = value_ptr;
|
||||
for (;;) {
|
||||
const char c = *e;
|
||||
if (c == '\0' || c == ' ') break;
|
||||
if (c == 'E' || c == 'e') {
|
||||
*e = '\0';
|
||||
const float ret = strtof(value_ptr, nullptr);
|
||||
*e = c;
|
||||
return ret;
|
||||
}
|
||||
++e;
|
||||
if (!value_ptr) return 0;
|
||||
char *e = value_ptr;
|
||||
for (;;) {
|
||||
const char c = *e;
|
||||
if (c == '\0' || c == ' ') break;
|
||||
if (c == 'E' || c == 'e' || c == 'X' || c == 'x') {
|
||||
*e = '\0';
|
||||
const float ret = strtof(value_ptr, nullptr);
|
||||
*e = c;
|
||||
return ret;
|
||||
}
|
||||
return strtof(value_ptr, nullptr);
|
||||
++e;
|
||||
}
|
||||
return 0;
|
||||
return strtof(value_ptr, nullptr);
|
||||
}
|
||||
|
||||
// Code value as a long or ulong
|
||||
|
||||
@@ -33,7 +33,11 @@
|
||||
#include "../../feature/probe_temp_comp.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#if HAS_MULTI_HOTEND
|
||||
#include "../../module/tool_change.h"
|
||||
#endif
|
||||
|
||||
#if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#include "../../lcd/marlinui.h"
|
||||
#endif
|
||||
|
||||
@@ -49,6 +53,11 @@
|
||||
*/
|
||||
void GcodeSuite::G30() {
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
const uint8_t old_tool_index = active_extruder;
|
||||
tool_change(0);
|
||||
#endif
|
||||
|
||||
const xy_pos_t pos = { parser.linearval('X', current_position.x + probe.offset_xy.x),
|
||||
parser.linearval('Y', current_position.y + probe.offset_xy.y) };
|
||||
|
||||
@@ -57,40 +66,45 @@ void GcodeSuite::G30() {
|
||||
SERIAL_ECHOLNF(GET_EN_TEXT_F(MSG_ZPROBE_OUT));
|
||||
LCD_MESSAGE(MSG_ZPROBE_OUT);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
else {
|
||||
// Disable leveling so the planner won't mess with us
|
||||
TERN_(HAS_LEVELING, set_bed_leveling_enabled(false));
|
||||
|
||||
// Disable leveling so the planner won't mess with us
|
||||
TERN_(HAS_LEVELING, set_bed_leveling_enabled(false));
|
||||
remember_feedrate_scaling_off();
|
||||
|
||||
remember_feedrate_scaling_off();
|
||||
|
||||
TERN_(DWIN_LCD_PROUI, process_subcommands_now(F("G28O")));
|
||||
|
||||
const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
|
||||
|
||||
TERN_(HAS_PTC, ptc.set_enabled(!parser.seen('C') || parser.value_bool()));
|
||||
const float measured_z = probe.probe_at_point(pos, raise_after, 1);
|
||||
TERN_(HAS_PTC, ptc.set_enabled(true));
|
||||
if (!isnan(measured_z)) {
|
||||
SERIAL_ECHOLNPGM("Bed X: ", pos.x, " Y: ", pos.y, " Z: ", measured_z);
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
char msg[31], str_1[6], str_2[6], str_3[6];
|
||||
sprintf_P(msg, PSTR("X:%s, Y:%s, Z:%s"),
|
||||
dtostrf(pos.x, 1, 1, str_1),
|
||||
dtostrf(pos.y, 1, 1, str_2),
|
||||
dtostrf(measured_z, 1, 2, str_3)
|
||||
);
|
||||
ui.set_status(msg);
|
||||
#if EITHER(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;
|
||||
|
||||
TERN_(HAS_PTC, ptc.set_enabled(!parser.seen('C') || parser.value_bool()));
|
||||
const float measured_z = probe.probe_at_point(pos, raise_after, 1);
|
||||
TERN_(HAS_PTC, ptc.set_enabled(true));
|
||||
if (!isnan(measured_z)) {
|
||||
SERIAL_ECHOLNPGM("Bed X: ", pos.x, " Y: ", pos.y, " Z: ", measured_z);
|
||||
#if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
char msg[31], str_1[6], str_2[6], str_3[6];
|
||||
sprintf_P(msg, PSTR("X:%s, Y:%s, Z:%s"),
|
||||
dtostrf(pos.x, 1, 1, str_1),
|
||||
dtostrf(pos.y, 1, 1, str_2),
|
||||
dtostrf(measured_z, 1, 2, str_3)
|
||||
);
|
||||
ui.set_status(msg);
|
||||
#endif
|
||||
}
|
||||
|
||||
restore_feedrate_and_scaling();
|
||||
|
||||
if (raise_after == PROBE_PT_STOW)
|
||||
probe.move_z_after_probing();
|
||||
|
||||
report_current_position();
|
||||
}
|
||||
|
||||
restore_feedrate_and_scaling();
|
||||
|
||||
if (raise_after == PROBE_PT_STOW)
|
||||
probe.move_z_after_probing();
|
||||
|
||||
report_current_position();
|
||||
// Restore the active tool
|
||||
TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index));
|
||||
}
|
||||
|
||||
#endif // HAS_BED_PROBE
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "../../module/endstops.h"
|
||||
#include "../../module/motion.h"
|
||||
#include "../../module/stepper.h"
|
||||
#include "../../module/planner.h"
|
||||
#include "../../module/probe.h"
|
||||
|
||||
inline void G38_single_probe(const uint8_t move_value) {
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* M102.cpp - Configure Bed Distance Sensor
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(BD_SENSOR)
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../feature/bedlevel/bdl/bdl.h"
|
||||
|
||||
/**
|
||||
* M102: Configure the Bed Distance Sensor
|
||||
*
|
||||
* M102 S<10ths> : Set adjustable Z height in 10ths of a mm (e.g., 'M102 S4' enables adjusting for Z <= 0.4mm.)
|
||||
* M102 S0 : Disable adjustable Z height.
|
||||
*
|
||||
* Negative S values are commands:
|
||||
* M102 S-1 : Read sensor information
|
||||
* M102 S-5 : Read raw Calibration data
|
||||
* M102 S-6 : Start Calibration
|
||||
*/
|
||||
void GcodeSuite::M102() {
|
||||
if (parser.seenval('S'))
|
||||
bdl.config_state = parser.value_int();
|
||||
else
|
||||
M102_report();
|
||||
}
|
||||
|
||||
void GcodeSuite::M102_report(const bool forReplay/*=true*/) {
|
||||
report_heading(forReplay, F("Bed Distance Sensor"));
|
||||
SERIAL_ECHOLNPGM(" M102 S", bdl.config_state);
|
||||
}
|
||||
|
||||
#endif // BD_SENSOR
|
||||
@@ -28,18 +28,23 @@
|
||||
#include "../../sd/cardreader.h"
|
||||
|
||||
/**
|
||||
* M20: List SD card to serial output
|
||||
* M20: List SD card to serial output in [name] [size] format.
|
||||
*
|
||||
* With CUSTOM_FIRMWARE_UPLOAD:
|
||||
* F<bool> - List BIN files only, for use with firmware upload
|
||||
*
|
||||
* With LONG_FILENAME_HOST_SUPPORT:
|
||||
* L<bool> - List long filenames (instead of DOS8.3 names)
|
||||
*
|
||||
* With M20_TIMESTAMP_SUPPORT:
|
||||
* T<bool> - Include timestamps
|
||||
*/
|
||||
void GcodeSuite::M20() {
|
||||
if (card.flag.mounted) {
|
||||
SERIAL_ECHOLNPGM(STR_BEGIN_FILE_LIST);
|
||||
card.ls(
|
||||
TERN_(CUSTOM_FIRMWARE_UPLOAD, parser.boolval('F'))
|
||||
#if BOTH(CUSTOM_FIRMWARE_UPLOAD, LONG_FILENAME_HOST_SUPPORT)
|
||||
,
|
||||
#endif
|
||||
TERN_(LONG_FILENAME_HOST_SUPPORT, parser.boolval('L'))
|
||||
);
|
||||
card.ls(TERN0(CUSTOM_FIRMWARE_UPLOAD, parser.boolval('F') << LS_ONLY_BIN)
|
||||
| TERN0(LONG_FILENAME_HOST_SUPPORT, parser.boolval('L') << LS_LONG_FILENAME)
|
||||
| TERN0(M20_TIMESTAMP_SUPPORT, parser.boolval('T') << LS_TIMESTAMP));
|
||||
SERIAL_ECHOLNPGM(STR_END_FILE_LIST);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
void GcodeSuite::M303() {
|
||||
|
||||
#if ANY(PID_DEBUG, PID_BED_DEBUG, PID_CHAMBER_DEBUG)
|
||||
#if HAS_PID_DEBUG
|
||||
if (parser.seen_test('D')) {
|
||||
thermalManager.pid_debug_flag ^= true;
|
||||
SERIAL_ECHO_START();
|
||||
|
||||
@@ -373,6 +373,7 @@
|
||||
|
||||
#define LCD_I2C_TYPE_PCF8575 // I2C Character-based 12864 display
|
||||
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
||||
#define IS_ULTIPANEL 1
|
||||
|
||||
#if ENABLED(LCD_SAINSMART_I2C_2004)
|
||||
#define LCD_WIDTH 20
|
||||
@@ -477,6 +478,8 @@
|
||||
// Aliases for LCD features
|
||||
#if EITHER(DWIN_CREALITY_LCD, DWIN_LCD_PROUI)
|
||||
#define HAS_DWIN_E3V2_BASIC 1
|
||||
#endif
|
||||
#if EITHER(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#define HAS_DWIN_E3V2 1
|
||||
#endif
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
@@ -506,7 +509,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_WIRED_LCD, EXTENSIBLE_UI, DWIN_LCD_PROUI)
|
||||
#if ANY(HAS_WIRED_LCD, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#define HAS_DISPLAY 1
|
||||
#endif
|
||||
|
||||
@@ -526,7 +529,7 @@
|
||||
#define HAS_MANUAL_MOVE_MENU 1
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL, IS_DWIN_MARLINUI)
|
||||
#if ANY(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL, IS_DWIN_MARLINUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#define CAN_SHOW_REMAINING_TIME 1
|
||||
#endif
|
||||
|
||||
@@ -666,6 +669,31 @@
|
||||
#define E_MANUAL EXTRUDERS
|
||||
#endif
|
||||
|
||||
#if E_STEPPERS <= 7
|
||||
#undef INVERT_E7_DIR
|
||||
#if E_STEPPERS <= 6
|
||||
#undef INVERT_E6_DIR
|
||||
#if E_STEPPERS <= 5
|
||||
#undef INVERT_E5_DIR
|
||||
#if E_STEPPERS <= 4
|
||||
#undef INVERT_E4_DIR
|
||||
#if E_STEPPERS <= 3
|
||||
#undef INVERT_E3_DIR
|
||||
#if E_STEPPERS <= 2
|
||||
#undef INVERT_E2_DIR
|
||||
#if E_STEPPERS <= 1
|
||||
#undef INVERT_E1_DIR
|
||||
#if E_STEPPERS == 0
|
||||
#undef INVERT_E0_DIR
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Number of Linear Axes (e.g., XYZIJKUVW)
|
||||
* All the logical axes except for the tool (E) axis
|
||||
@@ -766,6 +794,9 @@
|
||||
#undef Y_MIN_POS
|
||||
#undef Y_MAX_POS
|
||||
#undef MANUAL_Y_HOME_POS
|
||||
#undef MIN_SOFTWARE_ENDSTOP_Y
|
||||
#undef MAX_SOFTWARE_ENDSTOP_Y
|
||||
#undef SAFE_BED_LEVELING_START_Y
|
||||
#endif
|
||||
|
||||
#if !HAS_Z_AXIS
|
||||
@@ -783,6 +814,9 @@
|
||||
#undef Z_MIN_POS
|
||||
#undef Z_MAX_POS
|
||||
#undef MANUAL_Z_HOME_POS
|
||||
#undef MIN_SOFTWARE_ENDSTOP_Z
|
||||
#undef MAX_SOFTWARE_ENDSTOP_Z
|
||||
#undef SAFE_BED_LEVELING_START_Z
|
||||
#endif
|
||||
|
||||
#if !HAS_I_AXIS
|
||||
@@ -797,6 +831,9 @@
|
||||
#undef I_MIN_POS
|
||||
#undef I_MAX_POS
|
||||
#undef MANUAL_I_HOME_POS
|
||||
#undef MIN_SOFTWARE_ENDSTOP_I
|
||||
#undef MAX_SOFTWARE_ENDSTOP_I
|
||||
#undef SAFE_BED_LEVELING_START_I
|
||||
#endif
|
||||
|
||||
#if !HAS_J_AXIS
|
||||
@@ -811,6 +848,9 @@
|
||||
#undef J_MIN_POS
|
||||
#undef J_MAX_POS
|
||||
#undef MANUAL_J_HOME_POS
|
||||
#undef MIN_SOFTWARE_ENDSTOP_J
|
||||
#undef MAX_SOFTWARE_ENDSTOP_J
|
||||
#undef SAFE_BED_LEVELING_START_J
|
||||
#endif
|
||||
|
||||
#if !HAS_K_AXIS
|
||||
@@ -825,6 +865,9 @@
|
||||
#undef K_MIN_POS
|
||||
#undef K_MAX_POS
|
||||
#undef MANUAL_K_HOME_POS
|
||||
#undef MIN_SOFTWARE_ENDSTOP_K
|
||||
#undef MAX_SOFTWARE_ENDSTOP_K
|
||||
#undef SAFE_BED_LEVELING_START_K
|
||||
#endif
|
||||
|
||||
#if !HAS_U_AXIS
|
||||
@@ -839,6 +882,9 @@
|
||||
#undef U_MIN_POS
|
||||
#undef U_MAX_POS
|
||||
#undef MANUAL_U_HOME_POS
|
||||
#undef MIN_SOFTWARE_ENDSTOP_U
|
||||
#undef MAX_SOFTWARE_ENDSTOP_U
|
||||
#undef SAFE_BED_LEVELING_START_U
|
||||
#endif
|
||||
|
||||
#if !HAS_V_AXIS
|
||||
@@ -853,6 +899,9 @@
|
||||
#undef V_MIN_POS
|
||||
#undef V_MAX_POS
|
||||
#undef MANUAL_V_HOME_POS
|
||||
#undef MIN_SOFTWARE_ENDSTOP_V
|
||||
#undef MAX_SOFTWARE_ENDSTOP_V
|
||||
#undef SAFE_BED_LEVELING_START_V
|
||||
#endif
|
||||
|
||||
#if !HAS_W_AXIS
|
||||
@@ -867,6 +916,9 @@
|
||||
#undef W_MIN_POS
|
||||
#undef W_MAX_POS
|
||||
#undef MANUAL_W_HOME_POS
|
||||
#undef MIN_SOFTWARE_ENDSTOP_W
|
||||
#undef MAX_SOFTWARE_ENDSTOP_W
|
||||
#undef SAFE_BED_LEVELING_START_W
|
||||
#endif
|
||||
|
||||
#ifdef X2_DRIVER_TYPE
|
||||
@@ -1052,7 +1104,7 @@
|
||||
#if ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, SOLENOID_PROBE, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE)
|
||||
#define HAS_STOWABLE_PROBE 1
|
||||
#endif
|
||||
#if ANY(HAS_STOWABLE_PROBE, HAS_Z_SERVO_PROBE, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE)
|
||||
#if ANY(HAS_STOWABLE_PROBE, HAS_Z_SERVO_PROBE, FIX_MOUNTED_PROBE, BD_SENSOR, NOZZLE_AS_PROBE)
|
||||
#define HAS_BED_PROBE 1
|
||||
#endif
|
||||
|
||||
@@ -1380,6 +1432,10 @@
|
||||
#define EXTRUDE_MINTEMP 170
|
||||
#endif
|
||||
|
||||
#if ANY(PID_DEBUG, PID_BED_DEBUG, PID_CHAMBER_DEBUG)
|
||||
#define HAS_PID_DEBUG 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* TFT Displays
|
||||
*
|
||||
@@ -1451,8 +1507,13 @@
|
||||
#elif ENABLED(TFT_RES_1024x600)
|
||||
#define TFT_WIDTH 1024
|
||||
#define TFT_HEIGHT 600
|
||||
#define GRAPHICAL_TFT_UPSCALE 6
|
||||
#define TFT_PIXEL_OFFSET_X 120
|
||||
#if ENABLED(TOUCH_SCREEN)
|
||||
#define GRAPHICAL_TFT_UPSCALE 6
|
||||
#define TFT_PIXEL_OFFSET_X 120
|
||||
#else
|
||||
#define GRAPHICAL_TFT_UPSCALE 8
|
||||
#define TFT_PIXEL_OFFSET_X 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// FSMC/SPI TFT Panels using standard HAL/tft/tft_(fsmc|spi|ltdc).h
|
||||
@@ -1522,7 +1583,7 @@
|
||||
|
||||
// This emulated DOGM has 'touch/xpt2046', not 'tft/xpt2046'
|
||||
#if ENABLED(TOUCH_SCREEN)
|
||||
#if TOUCH_IDLE_SLEEP
|
||||
#if TOUCH_IDLE_SLEEP_MINS
|
||||
#define HAS_TOUCH_SLEEP 1
|
||||
#endif
|
||||
#if NONE(TFT_TOUCH_DEVICE_GT911, TFT_TOUCH_DEVICE_XPT2046)
|
||||
|
||||
@@ -117,6 +117,31 @@
|
||||
#undef STEALTHCHOP_E
|
||||
#endif
|
||||
|
||||
#if HOTENDS <= 7
|
||||
#undef E7_AUTO_FAN_PIN
|
||||
#if HOTENDS <= 6
|
||||
#undef E6_AUTO_FAN_PIN
|
||||
#if HOTENDS <= 5
|
||||
#undef E5_AUTO_FAN_PIN
|
||||
#if HOTENDS <= 4
|
||||
#undef E4_AUTO_FAN_PIN
|
||||
#if HOTENDS <= 3
|
||||
#undef E3_AUTO_FAN_PIN
|
||||
#if HOTENDS <= 2
|
||||
#undef E2_AUTO_FAN_PIN
|
||||
#if HOTENDS <= 1
|
||||
#undef E1_AUTO_FAN_PIN
|
||||
#if HOTENDS == 0
|
||||
#undef E0_AUTO_FAN_PIN
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Temperature Sensors; define what sensor(s) we have.
|
||||
*/
|
||||
@@ -155,8 +180,7 @@
|
||||
#define REDUNDANT_TEMP_MATCH(...) 0
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_0 == -5 || TEMP_SENSOR_0 == -3 || TEMP_SENSOR_0 == -2
|
||||
#define TEMP_SENSOR_0_IS_MAX_TC 1
|
||||
#if TEMP_SENSOR_IS_MAX_TC(0)
|
||||
#if TEMP_SENSOR_0 == -5
|
||||
#define TEMP_SENSOR_0_IS_MAX31865 1
|
||||
#define TEMP_SENSOR_0_MAX_TC_TMIN 0
|
||||
@@ -192,8 +216,7 @@
|
||||
#undef HEATER_0_MAXTEMP
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_1 == -5 || TEMP_SENSOR_1 == -3 || TEMP_SENSOR_1 == -2
|
||||
#define TEMP_SENSOR_1_IS_MAX_TC 1
|
||||
#if TEMP_SENSOR_IS_MAX_TC(1)
|
||||
#if TEMP_SENSOR_1 == -5
|
||||
#define TEMP_SENSOR_1_IS_MAX31865 1
|
||||
#define TEMP_SENSOR_1_MAX_TC_TMIN 0
|
||||
@@ -239,9 +262,7 @@
|
||||
#undef HEATER_1_MAXTEMP
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_REDUNDANT == -5 || TEMP_SENSOR_REDUNDANT == -3 || TEMP_SENSOR_REDUNDANT == -2
|
||||
#define TEMP_SENSOR_REDUNDANT_IS_MAX_TC 1
|
||||
|
||||
#if TEMP_SENSOR_IS_MAX_TC(REDUNDANT)
|
||||
#if TEMP_SENSOR_REDUNDANT == -5
|
||||
#if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
|
||||
#error "MAX31865 Thermocouples (-5) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)."
|
||||
@@ -283,7 +304,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (TEMP_SENSOR_0_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_0) || (TEMP_SENSOR_1_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_1)
|
||||
#if (TEMP_SENSOR_IS_MAX_TC(0) && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_0) || (TEMP_SENSOR_IS_MAX_TC(1) && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_1)
|
||||
#if TEMP_SENSOR_REDUNDANT == -5
|
||||
#error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match."
|
||||
#elif TEMP_SENSOR_REDUNDANT == -3
|
||||
@@ -305,7 +326,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_0_IS_MAX_TC || TEMP_SENSOR_1_IS_MAX_TC || TEMP_SENSOR_REDUNDANT_IS_MAX_TC
|
||||
#if TEMP_SENSOR_IS_MAX_TC(0) || TEMP_SENSOR_IS_MAX_TC(1) || TEMP_SENSOR_IS_MAX_TC(REDUNDANT)
|
||||
#define HAS_MAX_TC 1
|
||||
#endif
|
||||
#if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675
|
||||
@@ -627,10 +648,10 @@
|
||||
#if ALL(HAS_RESUME_CONTINUE, PRINTER_EVENT_LEDS, SDSUPPORT)
|
||||
#define HAS_LEDS_OFF_FLAG 1
|
||||
#endif
|
||||
#ifdef DISPLAY_SLEEP_MINUTES
|
||||
#if DISPLAY_SLEEP_MINUTES || TOUCH_IDLE_SLEEP_MINS
|
||||
#define HAS_DISPLAY_SLEEP 1
|
||||
#endif
|
||||
#if HAS_DISPLAY_SLEEP || LCD_BACKLIGHT_TIMEOUT
|
||||
#if HAS_DISPLAY_SLEEP || LCD_BACKLIGHT_TIMEOUT_MINS
|
||||
#define HAS_GCODE_M255 1
|
||||
#endif
|
||||
|
||||
@@ -983,7 +1004,7 @@
|
||||
#endif
|
||||
|
||||
// Flag whether hex_print.cpp is used
|
||||
#if ANY(AUTO_BED_LEVELING_UBL, M100_FREE_MEMORY_WATCHER, DEBUG_GCODE_PARSER, TMC_DEBUG, MARLIN_DEV_MODE, DEBUG_CARDREADER)
|
||||
#if ANY(AUTO_BED_LEVELING_UBL, M100_FREE_MEMORY_WATCHER, DEBUG_GCODE_PARSER, TMC_DEBUG, MARLIN_DEV_MODE, DEBUG_CARDREADER, M20_TIMESTAMP_SUPPORT)
|
||||
#define NEED_HEX_PRINT 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -681,7 +681,7 @@
|
||||
#if HAS_MAX_TC
|
||||
|
||||
// Translate old _SS, _CS, _SCK, _DO, _DI, _MISO, and _MOSI PIN defines.
|
||||
#if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1))
|
||||
#if TEMP_SENSOR_IS_MAX_TC(0) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E1))
|
||||
|
||||
#if !PIN_EXISTS(TEMP_0_CS) // SS, CS
|
||||
#if PIN_EXISTS(MAX6675_SS)
|
||||
@@ -748,9 +748,9 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // TEMP_SENSOR_0_IS_MAX_TC
|
||||
#endif // TEMP_SENSOR_IS_MAX_TC(0)
|
||||
|
||||
#if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1))
|
||||
#if TEMP_SENSOR_IS_MAX_TC(1) || (TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E1))
|
||||
|
||||
#if !PIN_EXISTS(TEMP_1_CS) // SS2, CS2
|
||||
#if PIN_EXISTS(MAX6675_SS2)
|
||||
@@ -817,7 +817,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // TEMP_SENSOR_1_IS_MAX_TC
|
||||
#endif // TEMP_SENSOR_IS_MAX_TC(1)
|
||||
|
||||
//
|
||||
// User-defined thermocouple libraries
|
||||
@@ -2656,7 +2656,7 @@
|
||||
//
|
||||
// ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface)
|
||||
//
|
||||
#define HAS_ADC_TEST(P) (PIN_EXISTS(TEMP_##P) && TEMP_SENSOR_##P != 0 && NONE(TEMP_SENSOR_##P##_IS_MAX_TC, TEMP_SENSOR_##P##_IS_DUMMY))
|
||||
#define HAS_ADC_TEST(P) (PIN_EXISTS(TEMP_##P) && TEMP_SENSOR_##P != 0 && !TEMP_SENSOR_IS_MAX_TC(P) && !TEMP_SENSOR_##P##_IS_DUMMY)
|
||||
#if HOTENDS > 0 && HAS_ADC_TEST(0)
|
||||
#define HAS_TEMP_ADC_0 1
|
||||
#endif
|
||||
@@ -2700,7 +2700,7 @@
|
||||
#define HAS_TEMP_ADC_REDUNDANT 1
|
||||
#endif
|
||||
|
||||
#define HAS_TEMP(N) ANY(HAS_TEMP_ADC_##N, TEMP_SENSOR_##N##_IS_MAX_TC, TEMP_SENSOR_##N##_IS_DUMMY)
|
||||
#define HAS_TEMP(N) (TEMP_SENSOR_IS_MAX_TC(N) || EITHER(HAS_TEMP_ADC_##N, TEMP_SENSOR_##N##_IS_DUMMY))
|
||||
#if HAS_HOTEND && HAS_TEMP(0)
|
||||
#define HAS_TEMP_HOTEND 1
|
||||
#endif
|
||||
@@ -3124,73 +3124,6 @@
|
||||
#define HAS_MICROSTEPS 1
|
||||
#endif
|
||||
|
||||
#if HAS_MICROSTEPS
|
||||
|
||||
// MS1 MS2 MS3 Stepper Driver Microstepping mode table
|
||||
#ifndef MICROSTEP1
|
||||
#define MICROSTEP1 LOW,LOW,LOW
|
||||
#endif
|
||||
#if ENABLED(HEROIC_STEPPER_DRIVERS)
|
||||
#ifndef MICROSTEP128
|
||||
#define MICROSTEP128 LOW,HIGH,LOW
|
||||
#endif
|
||||
#else
|
||||
#ifndef MICROSTEP2
|
||||
#define MICROSTEP2 HIGH,LOW,LOW
|
||||
#endif
|
||||
#ifndef MICROSTEP4
|
||||
#define MICROSTEP4 LOW,HIGH,LOW
|
||||
#endif
|
||||
#endif
|
||||
#ifndef MICROSTEP8
|
||||
#define MICROSTEP8 HIGH,HIGH,LOW
|
||||
#endif
|
||||
#ifdef __SAM3X8E__
|
||||
#if MB(ALLIGATOR)
|
||||
#ifndef MICROSTEP16
|
||||
#define MICROSTEP16 LOW,LOW,LOW
|
||||
#endif
|
||||
#ifndef MICROSTEP32
|
||||
#define MICROSTEP32 HIGH,HIGH,LOW
|
||||
#endif
|
||||
#else
|
||||
#ifndef MICROSTEP16
|
||||
#define MICROSTEP16 HIGH,HIGH,LOW
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#ifndef MICROSTEP16
|
||||
#define MICROSTEP16 HIGH,HIGH,LOW
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MICROSTEP1
|
||||
#define HAS_MICROSTEP1 1
|
||||
#endif
|
||||
#ifdef MICROSTEP2
|
||||
#define HAS_MICROSTEP2 1
|
||||
#endif
|
||||
#ifdef MICROSTEP4
|
||||
#define HAS_MICROSTEP4 1
|
||||
#endif
|
||||
#ifdef MICROSTEP8
|
||||
#define HAS_MICROSTEP8 1
|
||||
#endif
|
||||
#ifdef MICROSTEP16
|
||||
#define HAS_MICROSTEP16 1
|
||||
#endif
|
||||
#ifdef MICROSTEP32
|
||||
#define HAS_MICROSTEP32 1
|
||||
#endif
|
||||
#ifdef MICROSTEP64
|
||||
#define HAS_MICROSTEP64 1
|
||||
#endif
|
||||
#ifdef MICROSTEP128
|
||||
#define HAS_MICROSTEP128 1
|
||||
#endif
|
||||
|
||||
#endif // HAS_MICROSTEPS
|
||||
|
||||
/**
|
||||
* Heater signal inversion defaults
|
||||
*/
|
||||
@@ -3306,7 +3239,15 @@
|
||||
#endif
|
||||
|
||||
#if HAS_TEMPERATURE && ANY(HAS_MARLINUI_MENU, HAS_DWIN_E3V2, HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_CREALITY_TOUCH)
|
||||
#ifdef PREHEAT_6_LABEL
|
||||
#ifdef PREHEAT_10_LABEL
|
||||
#define PREHEAT_COUNT 10
|
||||
#elif defined(PREHEAT_9_LABEL)
|
||||
#define PREHEAT_COUNT 9
|
||||
#elif defined(PREHEAT_8_LABEL)
|
||||
#define PREHEAT_COUNT 8
|
||||
#elif defined(PREHEAT_7_LABEL)
|
||||
#define PREHEAT_COUNT 7
|
||||
#elif defined(PREHEAT_6_LABEL)
|
||||
#define PREHEAT_COUNT 6
|
||||
#elif defined(PREHEAT_5_LABEL)
|
||||
#define PREHEAT_COUNT 5
|
||||
@@ -3430,7 +3371,7 @@
|
||||
* Advanced Pause - Filament Change
|
||||
*/
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT)
|
||||
#if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT)
|
||||
#define M600_PURGE_MORE_RESUMABLE 1
|
||||
#endif
|
||||
#ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH
|
||||
@@ -3564,8 +3505,11 @@
|
||||
#if PIN_EXISTS(BEEPER)
|
||||
#define HAS_BEEPER 1
|
||||
#endif
|
||||
#if ANY(HAS_BEEPER, LCD_USE_I2C_BUZZER, PCA9632_BUZZER)
|
||||
#define HAS_BUZZER 1
|
||||
#if ANY(IS_TFTGLCD_PANEL, PCA9632_BUZZER, LCD_USE_I2C_BUZZER)
|
||||
#define USE_MARLINUI_BUZZER 1
|
||||
#endif
|
||||
#if EITHER(HAS_BEEPER, USE_MARLINUI_BUZZER)
|
||||
#define HAS_SOUND 1
|
||||
#endif
|
||||
|
||||
#if ENABLED(LCD_USE_I2C_BUZZER)
|
||||
@@ -3575,7 +3519,7 @@
|
||||
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
|
||||
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
|
||||
#endif
|
||||
#elif HAS_BUZZER
|
||||
#elif HAS_SOUND
|
||||
#ifndef LCD_FEEDBACK_FREQUENCY_HZ
|
||||
#define LCD_FEEDBACK_FREQUENCY_HZ 5000
|
||||
#endif
|
||||
@@ -3584,12 +3528,13 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_BUZZER
|
||||
#if HAS_SOUND
|
||||
#if LCD_FEEDBACK_FREQUENCY_DURATION_MS && LCD_FEEDBACK_FREQUENCY_HZ
|
||||
#define HAS_CHIRP 1
|
||||
#endif
|
||||
#else
|
||||
#undef SOUND_MENU_ITEM // No buzzer menu item without a buzzer
|
||||
#undef SOUND_ON_DEFAULT
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -642,6 +642,10 @@
|
||||
#error "LEVEL_CORNERS_* settings have been renamed BED_TRAMMING_*."
|
||||
#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 TOUCH_IDLE_SLEEP_MINS (minutes)."
|
||||
#elif defined(LCD_BACKLIGHT_TIMEOUT)
|
||||
#error "LCD_BACKLIGHT_TIMEOUT (seconds) is now LCD_BACKLIGHT_TIMEOUT_MINS (minutes)."
|
||||
#endif
|
||||
|
||||
// L64xx stepper drivers have been removed
|
||||
@@ -902,7 +906,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "PROGRESS_MSG_EXPIRE must be greater than or equal to 0."
|
||||
#endif
|
||||
#elif ENABLED(LCD_SET_PROGRESS_MANUALLY) && NONE(HAS_MARLINUI_U8GLIB, HAS_GRAPHICAL_TFT, HAS_MARLINUI_HD44780, EXTENSIBLE_UI, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
|
||||
#error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_MARLINUI_*, OR EXTENSIBLE_UI."
|
||||
#error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_*, OR EXTENSIBLE_UI."
|
||||
#endif
|
||||
|
||||
#if ENABLED(USE_M73_REMAINING_TIME) && DISABLED(LCD_SET_PROGRESS_MANUALLY)
|
||||
@@ -913,6 +917,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "SD_REPRINT_LAST_SELECTED_FILE currently requires a Marlin-native LCD menu."
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_MARLINUI_MENU, TOUCH_UI_FTDI_EVE, EXTENSIBLE_UI) && !defined(MANUAL_FEEDRATE)
|
||||
#error "MANUAL_FEEDRATE is required for MarlinUI, ExtUI, or FTDI EVE Touch UI."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Custom Boot and Status screens
|
||||
*/
|
||||
@@ -1715,8 +1723,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
*/
|
||||
#if 1 < 0 \
|
||||
+ (DISABLED(BLTOUCH) && HAS_Z_SERVO_PROBE) \
|
||||
+ COUNT_ENABLED(PROBE_MANUALLY, BLTOUCH, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE)
|
||||
#error "Please enable only one probe option: PROBE_MANUALLY, SENSORLESS_PROBING, BLTOUCH, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, MAGLEV4, MAG_MOUNTED_PROBE or Z Servo."
|
||||
+ COUNT_ENABLED(PROBE_MANUALLY, BLTOUCH, BD_SENSOR, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE)
|
||||
#error "Please enable only one probe option: PROBE_MANUALLY, SENSORLESS_PROBING, BLTOUCH, BD_SENSOR, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, MAGLEV4, MAG_MOUNTED_PROBE or Z Servo."
|
||||
#endif
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
@@ -2095,6 +2103,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
);
|
||||
#endif
|
||||
|
||||
#define COUNT_SENSORLESS COUNT_ENABLED(Z_SENSORLESS, Z2_SENSORLESS, Z3_SENSORLESS, Z4_SENSORLESS)
|
||||
#if COUNT_SENSORLESS && COUNT_SENSORLESS != NUM_Z_STEPPERS
|
||||
#error "All Z steppers must have *_STALL_SENSITIVITY defined to use Z sensorless homing."
|
||||
#endif
|
||||
#undef COUNT_SENSORLESS
|
||||
|
||||
#ifdef SENSORLESS_BACKOFF_MM
|
||||
constexpr float sbm[] = SENSORLESS_BACKOFF_MM;
|
||||
static_assert(COUNT(sbm) == NUM_AXES, "SENSORLESS_BACKOFF_MM must have " _NUM_AXES_STR "elements (and no others).");
|
||||
@@ -2225,13 +2239,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
*/
|
||||
#if HAS_AUTO_FAN
|
||||
#if HAS_FAN0
|
||||
#if E0_AUTO_FAN_PIN == FAN_PIN
|
||||
#if PIN_EXISTS(E0_AUTO_FAN) && E0_AUTO_FAN_PIN == FAN_PIN
|
||||
#error "You cannot set E0_AUTO_FAN_PIN equal to FAN_PIN."
|
||||
#elif E1_AUTO_FAN_PIN == FAN_PIN
|
||||
#elif PIN_EXISTS(E1_AUTO_FAN) && E1_AUTO_FAN_PIN == FAN_PIN
|
||||
#error "You cannot set E1_AUTO_FAN_PIN equal to FAN_PIN."
|
||||
#elif E2_AUTO_FAN_PIN == FAN_PIN
|
||||
#elif PIN_EXISTS(E2_AUTO_FAN) && E2_AUTO_FAN_PIN == FAN_PIN
|
||||
#error "You cannot set E2_AUTO_FAN_PIN equal to FAN_PIN."
|
||||
#elif E3_AUTO_FAN_PIN == FAN_PIN
|
||||
#elif PIN_EXISTS(E3_AUTO_FAN) && E3_AUTO_FAN_PIN == FAN_PIN
|
||||
#error "You cannot set E3_AUTO_FAN_PIN equal to FAN_PIN."
|
||||
#endif
|
||||
#endif
|
||||
@@ -2248,14 +2262,22 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#if ENABLED(USE_CONTROLLER_FAN)
|
||||
#if !HAS_CONTROLLER_FAN
|
||||
#error "USE_CONTROLLER_FAN requires a CONTROLLER_FAN_PIN. Define in Configuration_adv.h."
|
||||
#elif E0_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
|
||||
#elif PIN_EXISTS(E0_AUTO_FAN) && E0_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
|
||||
#error "You cannot set E0_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
|
||||
#elif E1_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
|
||||
#elif PIN_EXISTS(E1_AUTO_FAN) && E1_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
|
||||
#error "You cannot set E1_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
|
||||
#elif E2_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
|
||||
#elif PIN_EXISTS(E2_AUTO_FAN) && E2_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
|
||||
#error "You cannot set E2_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
|
||||
#elif E3_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
|
||||
#elif PIN_EXISTS(E3_AUTO_FAN) && E3_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
|
||||
#error "You cannot set E3_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
|
||||
#elif PIN_EXISTS(E4_AUTO_FAN) && E4_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
|
||||
#error "You cannot set E4_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
|
||||
#elif PIN_EXISTS(E5_AUTO_FAN) && E5_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
|
||||
#error "You cannot set E5_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
|
||||
#elif PIN_EXISTS(E6_AUTO_FAN) && E6_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
|
||||
#error "You cannot set E6_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
|
||||
#elif PIN_EXISTS(E7_AUTO_FAN) && E7_AUTO_FAN_PIN == CONTROLLER_FAN_PIN
|
||||
#error "You cannot set E7_AUTO_FAN_PIN equal to CONTROLLER_FAN_PIN."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -2331,7 +2353,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
* Redundant temperature sensor config
|
||||
*/
|
||||
#if HAS_TEMP_REDUNDANT
|
||||
#if !defined(TEMP_SENSOR_REDUNDANT_SOURCE)
|
||||
#ifndef TEMP_SENSOR_REDUNDANT_SOURCE
|
||||
#error "TEMP_SENSOR_REDUNDANT requires TEMP_SENSOR_REDUNDANT_SOURCE."
|
||||
#elif !defined(TEMP_SENSOR_REDUNDANT_TARGET)
|
||||
#error "TEMP_SENSOR_REDUNDANT requires TEMP_SENSOR_REDUNDANT_TARGET."
|
||||
@@ -2383,9 +2405,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "TEMP_SENSOR_REDUNDANT_TARGET can't be COOLER without TEMP_COOLER_PIN defined."
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E0) && !PIN_EXISTS(TEMP_0_CS)
|
||||
#if TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E0) && !PIN_EXISTS(TEMP_0_CS)
|
||||
#error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE E0 requires TEMP_0_CS_PIN."
|
||||
#elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1) && !PIN_EXISTS(TEMP_1_CS)
|
||||
#elif TEMP_SENSOR_IS_MAX_TC(REDUNDANT) && REDUNDANT_TEMP_MATCH(SOURCE, E1) && !PIN_EXISTS(TEMP_1_CS)
|
||||
#error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE E1 requires TEMP_1_CS_PIN."
|
||||
#endif
|
||||
#endif
|
||||
@@ -2398,7 +2420,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#error "TEMP_0_PIN or TEMP_0_CS_PIN not defined for this board."
|
||||
#elif HAS_EXTRUDERS && !HAS_HEATER_0
|
||||
#error "HEATER_0_PIN not defined for this board."
|
||||
#elif TEMP_SENSOR_0_IS_MAX_TC && !PIN_EXISTS(TEMP_0_CS)
|
||||
#elif TEMP_SENSOR_IS_MAX_TC(0) && !PIN_EXISTS(TEMP_0_CS)
|
||||
#error "TEMP_SENSOR_0 MAX thermocouple requires TEMP_0_CS_PIN."
|
||||
#elif HAS_HOTEND && !HAS_TEMP_HOTEND && !TEMP_SENSOR_0_IS_DUMMY
|
||||
#error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board."
|
||||
@@ -2407,7 +2429,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
#if TEMP_SENSOR_1_IS_MAX_TC && !PIN_EXISTS(TEMP_1_CS)
|
||||
#if TEMP_SENSOR_IS_MAX_TC(1) && !PIN_EXISTS(TEMP_1_CS)
|
||||
#error "TEMP_SENSOR_1 MAX thermocouple requires TEMP_1_CS_PIN."
|
||||
#elif TEMP_SENSOR_1 == 0
|
||||
#error "TEMP_SENSOR_1 is required with 2 or more HOTENDS."
|
||||
@@ -2941,7 +2963,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
+ COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \
|
||||
+ COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS, DGUS_LCD_UI_RELOADED) \
|
||||
+ COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \
|
||||
+ COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE, DGUS_LCD_UI_CREALITY_TOUCH) \
|
||||
+ COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE, DGUS_LCD_UI_CREALITY_TOUCH) \
|
||||
+ COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_GENERIC_12864_1_1) \
|
||||
+ COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \
|
||||
+ COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \
|
||||
@@ -3030,8 +3052,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 6)
|
||||
#error "GRAPHICAL_TFT_UPSCALE must be between 2 and 6."
|
||||
#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 8)
|
||||
#error "GRAPHICAL_TFT_UPSCALE must be between 2 and 8."
|
||||
#endif
|
||||
|
||||
#if BOTH(CHIRON_TFT_STANDARD, CHIRON_TFT_NEW)
|
||||
@@ -3039,7 +3061,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#endif
|
||||
|
||||
#if ENABLED(ANYCUBIC_LCD_CHIRON)
|
||||
#if !defined(BEEPER_PIN)
|
||||
#ifndef BEEPER_PIN
|
||||
#error "ANYCUBIC_LCD_CHIRON requires BEEPER_PIN"
|
||||
#elif DISABLED(SDSUPPORT)
|
||||
#error "ANYCUBIC_LCD_CHIRON requires SDSUPPORT"
|
||||
@@ -3085,11 +3107,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LCD_BACKLIGHT_TIMEOUT
|
||||
#if LCD_BACKLIGHT_TIMEOUT_MINS
|
||||
#if !HAS_ENCODER_ACTION
|
||||
#error "LCD_BACKLIGHT_TIMEOUT requires an LCD with encoder or keypad."
|
||||
#error "LCD_BACKLIGHT_TIMEOUT_MINS requires an LCD with encoder or keypad."
|
||||
#elif !PIN_EXISTS(LCD_BACKLIGHT)
|
||||
#error "LCD_BACKLIGHT_TIMEOUT requires LCD_BACKLIGHT_PIN."
|
||||
#error "LCD_BACKLIGHT_TIMEOUT_MINS requires LCD_BACKLIGHT_PIN."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -3967,8 +3989,8 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
|
||||
#define _PIN_CONFLICT(P) (PIN_EXISTS(P) && P##_PIN == SPINDLE_LASER_PWM_PIN)
|
||||
#if BOTH(SPINDLE_FEATURE, LASER_FEATURE)
|
||||
#error "Enable only one of SPINDLE_FEATURE or LASER_FEATURE."
|
||||
#elif !PIN_EXISTS(SPINDLE_LASER_ENA) && DISABLED(SPINDLE_SERVO)
|
||||
#error "(SPINDLE|LASER)_FEATURE requires SPINDLE_LASER_ENA_PIN or SPINDLE_SERVO to control the power."
|
||||
#elif NONE(SPINDLE_SERVO, SPINDLE_LASER_USE_PWM) && !PIN_EXISTS(SPINDLE_LASER_ENA)
|
||||
#error "(SPINDLE|LASER)_FEATURE requires SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_USE_PWM, or SPINDLE_SERVO to control the power."
|
||||
#elif ENABLED(SPINDLE_CHANGE_DIR) && !PIN_EXISTS(SPINDLE_DIR)
|
||||
#error "SPINDLE_DIR_PIN is required for SPINDLE_CHANGE_DIR."
|
||||
#elif ENABLED(SPINDLE_LASER_USE_PWM)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2022-07-17"
|
||||
#define STRING_DISTRIBUTION_DATE "2022-09-14"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -52,7 +52,7 @@
|
||||
* to alert users to major changes.
|
||||
*/
|
||||
|
||||
#define MARLIN_HEX_VERSION 02010100
|
||||
#define MARLIN_HEX_VERSION 02010200
|
||||
#ifndef REQUIRED_CONFIGURATION_H_VERSION
|
||||
#define REQUIRED_CONFIGURATION_H_VERSION MARLIN_HEX_VERSION
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
#warning "WARNING! Disable MARLIN_DEV_MODE for the final build!"
|
||||
#endif
|
||||
|
||||
#if ENABLED(LA_DEBUG)
|
||||
#warning "WARNING! Disable LA_DEBUG for the final build!"
|
||||
#endif
|
||||
|
||||
#if NUM_AXES_WARNING
|
||||
#warning "Note: NUM_AXES is now based on the *_DRIVER_TYPE settings so you can remove NUM_AXES from Configuration.h."
|
||||
#endif
|
||||
@@ -707,9 +711,8 @@
|
||||
#warning "Don't forget to update your TFT settings in Configuration.h."
|
||||
#endif
|
||||
|
||||
// Ender 3 Pro (but, apparently all Creality 4.2.2 boards)
|
||||
#if ENABLED(EMIT_CREALITY_422_WARNING) || MB(CREALITY_V4)
|
||||
#warning "Creality 4.2.2 boards come with a variety of stepper drivers. Check the board label and set the correct *_DRIVER_TYPE! (C=HR4988, E=A4988, A=TMC2208, B=TMC2209, H=TMC2225)."
|
||||
#if ENABLED(EMIT_CREALITY_422_WARNING)
|
||||
#warning "Creality 4.2.2 boards come with a variety of stepper drivers. Check the board label and set the correct *_DRIVER_TYPE! (C=HR4988, E=A4988, A=TMC2208, B=TMC2209, H=TMC2225). (Define EMIT_CREALITY_422_WARNING false to suppress this warning.)"
|
||||
#endif
|
||||
|
||||
#if PRINTCOUNTER_SYNC
|
||||
@@ -773,3 +776,10 @@
|
||||
#if MB(BTT_BTT002_V1_0, EINSY_RAMBO) && DISABLED(NO_MK3_FAN_PINS_WARNING)
|
||||
#warning "Define MK3_FAN_PINS to swap hotend and part cooling fan pins. (Define NO_MK3_FAN_PINS_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* BD Sensor should always include BABYSTEPPING
|
||||
*/
|
||||
#if ENABLED(BD_SENSOR) && DISABLED(BABYSTEPPING)
|
||||
#warning "BABYSTEPPING is recommended with BD_SENSOR."
|
||||
#endif
|
||||
|
||||
@@ -120,10 +120,11 @@ static void createChar_P(const char c, const byte * const ptr) {
|
||||
#endif
|
||||
|
||||
#if ENABLED(LCD_USE_I2C_BUZZER)
|
||||
|
||||
void MarlinUI::buzz(const long duration, const uint16_t freq) {
|
||||
if (!sound_on) return;
|
||||
lcd.buzz(duration, freq);
|
||||
if (sound_on) lcd.buzz(duration, freq);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void MarlinUI::set_custom_characters(const HD44780CharSet screen_charset/*=CHARSET_INFO*/) {
|
||||
|
||||
@@ -343,8 +343,7 @@ void MarlinUI::draw_kill_screen() {
|
||||
void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
|
||||
#if HAS_DISPLAY_SLEEP
|
||||
void MarlinUI::sleep_on() { u8g.sleepOn(); }
|
||||
void MarlinUI::sleep_off() { u8g.sleepOff(); }
|
||||
void MarlinUI::sleep_display(const bool sleep) { sleep ? u8g.sleepOn() : u8g.sleepOff(); }
|
||||
#endif
|
||||
|
||||
#if HAS_LCD_BRIGHTNESS
|
||||
|
||||
@@ -234,7 +234,7 @@ void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis,
|
||||
// *string: The string
|
||||
// rlimit: To limit the drawn string length
|
||||
void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit/*=0xFFFF*/) {
|
||||
#if DISABLED(DWIN_LCD_PROUI)
|
||||
#if NONE(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
DWIN_Draw_Rectangle(1, bColor, x, y, x + (fontWidth(size) * strlen_P(string)), y + fontHeight(size));
|
||||
#endif
|
||||
constexpr uint8_t widthAdjust = 0;
|
||||
@@ -266,7 +266,9 @@ void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor,
|
||||
void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color,
|
||||
uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint32_t value) {
|
||||
size_t i = 0;
|
||||
DWIN_Draw_Rectangle(1, bColor, x, y, x + fontWidth(size) * iNum + 1, y + fontHeight(size));
|
||||
#if DISABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
DWIN_Draw_Rectangle(1, bColor, x, y, x + fontWidth(size) * iNum + 1, y + fontHeight(size));
|
||||
#endif
|
||||
DWIN_Byte(i, 0x14);
|
||||
// Bit 7: bshow
|
||||
// Bit 6: 1 = signed; 0 = unsigned number;
|
||||
@@ -314,7 +316,9 @@ void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_
|
||||
uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, int32_t value) {
|
||||
//uint8_t *fvalue = (uint8_t*)&value;
|
||||
size_t i = 0;
|
||||
DWIN_Draw_Rectangle(1, bColor, x, y, x + fontWidth(size) * (iNum+fNum+1), y + fontHeight(size));
|
||||
#if DISABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
DWIN_Draw_Rectangle(1, bColor, x, y, x + fontWidth(size) * (iNum+fNum+1), y + fontHeight(size));
|
||||
#endif
|
||||
DWIN_Byte(i, 0x14);
|
||||
DWIN_Byte(i, (bShow * 0x80) | (zeroFill * 0x20) | (zeroMode * 0x10) | size);
|
||||
DWIN_Word(i, color);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "../../marlinui.h"
|
||||
#include "../../../HAL/shared/Delay.h"
|
||||
|
||||
#if HAS_BUZZER
|
||||
#if HAS_SOUND
|
||||
#include "../../../libs/buzzer.h"
|
||||
#endif
|
||||
|
||||
@@ -50,9 +50,7 @@ ENCODER_Rate EncoderRate;
|
||||
|
||||
// TODO: Replace with ui.quick_feedback
|
||||
void Encoder_tick() {
|
||||
#if PIN_EXISTS(BEEPER)
|
||||
if (ui.sound_on) buzzer.click(10);
|
||||
#endif
|
||||
TERN_(HAS_BEEPER, if (ui.sound_on) buzzer.click(10));
|
||||
}
|
||||
|
||||
// Encoder initialization
|
||||
@@ -66,7 +64,7 @@ void Encoder_Configuration() {
|
||||
#if BUTTON_EXISTS(ENC)
|
||||
SET_INPUT_PULLUP(BTN_ENC);
|
||||
#endif
|
||||
#if PIN_EXISTS(BEEPER)
|
||||
#if HAS_BEEPER
|
||||
SET_OUTPUT(BEEPER_PIN); // TODO: Use buzzer.h which already inits this
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -2625,15 +2625,13 @@ void Draw_HomeOff_Menu() {
|
||||
#include "../../../libs/buzzer.h"
|
||||
|
||||
void HMI_AudioFeedback(const bool success=true) {
|
||||
#if HAS_BUZZER
|
||||
if (success) {
|
||||
buzzer.tone(100, 659);
|
||||
buzzer.tone(10, 0);
|
||||
buzzer.tone(100, 698);
|
||||
}
|
||||
else
|
||||
buzzer.tone(40, 440);
|
||||
#endif
|
||||
if (success) {
|
||||
BUZZ(100, 659);
|
||||
BUZZ(10, 0);
|
||||
BUZZ(100, 698);
|
||||
}
|
||||
else
|
||||
BUZZ(40, 440);
|
||||
}
|
||||
|
||||
// Prepare
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# DWIN for Creality Ender 3 v2
|
||||
|
||||
Marlin's Ender 3 v2 support requires the `DWIN_SET` included with the Ender 3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x/config/examples/Creality/Ender-3%20V2).
|
||||
|
||||
## Easy Install
|
||||
|
||||
Copy the `DWIN_SET` folder onto a Micro-SD card and insert the card into the slot on the DWIN screen. Cycle the machine and wait for the screen to go from blue to orange. Turn the machine off and remove the SD card. When you turn on the machine the screen will display a "Creality" loading screen.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,245 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* lcd/e3v2/jyersui/dwin.h
|
||||
*/
|
||||
|
||||
#include "dwin_lcd.h"
|
||||
#include "../common/dwin_set.h"
|
||||
#include "../common/dwin_font.h"
|
||||
#include "../common/dwin_color.h"
|
||||
#include "../common/encoder.h"
|
||||
#include "../../../libs/BL24CXX.h"
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
//#define DWIN_CREALITY_LCD_CUSTOM_ICONS
|
||||
|
||||
enum processID : uint8_t {
|
||||
Main, Print, Menu, Value, Option, File, Popup, Confirm, Wait
|
||||
};
|
||||
|
||||
enum PopupID : uint8_t {
|
||||
Pause, Stop, Resume, SaveLevel, ETemp, ConfFilChange, PurgeMore, MeshSlot,
|
||||
Level, Home, MoveWait, Heating, FilLoad, FilChange, TempWarn, Runout, PIDWait, Resuming, ManualProbing,
|
||||
FilInsert, HeaterTime, UserInput, LevelError, InvalidMesh, UI, Complete, Custom
|
||||
};
|
||||
|
||||
enum menuID : uint8_t {
|
||||
MainMenu,
|
||||
Prepare,
|
||||
Move,
|
||||
HomeMenu,
|
||||
ManualLevel,
|
||||
ZOffset,
|
||||
Preheat,
|
||||
ChangeFilament,
|
||||
MenuCustom,
|
||||
Control,
|
||||
TempMenu,
|
||||
PID,
|
||||
HotendPID,
|
||||
BedPID,
|
||||
#if HAS_PREHEAT
|
||||
#define _PREHEAT_ID(N) Preheat##N,
|
||||
REPEAT_1(PREHEAT_COUNT, _PREHEAT_ID)
|
||||
#endif
|
||||
Motion,
|
||||
HomeOffsets,
|
||||
MaxSpeed,
|
||||
MaxAcceleration,
|
||||
MaxJerk,
|
||||
Steps,
|
||||
Visual,
|
||||
ColorSettings,
|
||||
Advanced,
|
||||
ProbeMenu,
|
||||
Info,
|
||||
Leveling,
|
||||
LevelManual,
|
||||
LevelView,
|
||||
MeshViewer,
|
||||
LevelSettings,
|
||||
ManualMesh,
|
||||
UBLMesh,
|
||||
InfoMain,
|
||||
Tune,
|
||||
PreheatHotend
|
||||
};
|
||||
|
||||
// Custom icons
|
||||
#if ENABLED(DWIN_CREALITY_LCD_CUSTOM_ICONS)
|
||||
// index of every custom icon should be >= CUSTOM_ICON_START
|
||||
#define CUSTOM_ICON_START ICON_Checkbox_F
|
||||
#define ICON_Checkbox_F 200
|
||||
#define ICON_Checkbox_T 201
|
||||
#define ICON_Fade 202
|
||||
#define ICON_Mesh 203
|
||||
#define ICON_Tilt 204
|
||||
#define ICON_Brightness 205
|
||||
#define ICON_AxisD 249
|
||||
#define ICON_AxisBR 250
|
||||
#define ICON_AxisTR 251
|
||||
#define ICON_AxisBL 252
|
||||
#define ICON_AxisTL 253
|
||||
#define ICON_AxisC 254
|
||||
#else
|
||||
#define ICON_Fade ICON_Version
|
||||
#define ICON_Mesh ICON_Version
|
||||
#define ICON_Tilt ICON_Version
|
||||
#define ICON_Brightness ICON_Version
|
||||
#define ICON_AxisD ICON_Axis
|
||||
#define ICON_AxisBR ICON_Axis
|
||||
#define ICON_AxisTR ICON_Axis
|
||||
#define ICON_AxisBL ICON_Axis
|
||||
#define ICON_AxisTL ICON_Axis
|
||||
#define ICON_AxisC ICON_Axis
|
||||
#endif
|
||||
|
||||
enum colorID : uint8_t {
|
||||
Default, White, Green, Cyan, Blue, Magenta, Red, Orange, Yellow, Brown, Black
|
||||
};
|
||||
|
||||
#define Custom_Colors 10
|
||||
#define Color_Aqua RGB(0x00,0x3F,0x1F)
|
||||
#define Color_Light_White 0xBDD7
|
||||
#define Color_Green RGB(0x00,0x3F,0x00)
|
||||
#define Color_Light_Green 0x3460
|
||||
#define Color_Cyan 0x07FF
|
||||
#define Color_Light_Cyan 0x04F3
|
||||
#define Color_Blue 0x015F
|
||||
#define Color_Light_Blue 0x3A6A
|
||||
#define Color_Magenta 0xF81F
|
||||
#define Color_Light_Magenta 0x9813
|
||||
#define Color_Light_Red 0x8800
|
||||
#define Color_Orange 0xFA20
|
||||
#define Color_Light_Orange 0xFBC0
|
||||
#define Color_Light_Yellow 0x8BE0
|
||||
#define Color_Brown 0xCC27
|
||||
#define Color_Light_Brown 0x6204
|
||||
#define Color_Black 0x0000
|
||||
#define Color_Grey 0x18E3
|
||||
#define Check_Color 0x4E5C // Check-box check color
|
||||
#define Confirm_Color 0x34B9
|
||||
#define Cancel_Color 0x3186
|
||||
|
||||
class CrealityDWINClass {
|
||||
public:
|
||||
static constexpr size_t eeprom_data_size = 48;
|
||||
static struct EEPROM_Settings { // use bit fields to save space, max 48 bytes
|
||||
bool time_format_textual : 1;
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
uint8_t tilt_grid_size : 3;
|
||||
#endif
|
||||
uint16_t corner_pos : 10;
|
||||
uint8_t cursor_color : 4;
|
||||
uint8_t menu_split_line : 4;
|
||||
uint8_t menu_top_bg : 4;
|
||||
uint8_t menu_top_txt : 4;
|
||||
uint8_t highlight_box : 4;
|
||||
uint8_t progress_percent : 4;
|
||||
uint8_t progress_time : 4;
|
||||
uint8_t status_bar_text : 4;
|
||||
uint8_t status_area_text : 4;
|
||||
uint8_t coordinates_text : 4;
|
||||
uint8_t coordinates_split_line : 4;
|
||||
} eeprom_settings;
|
||||
|
||||
static constexpr const char * const color_names[11] = { "Default", "White", "Green", "Cyan", "Blue", "Magenta", "Red", "Orange", "Yellow", "Brown", "Black" };
|
||||
static constexpr const char * const preheat_modes[3] = { "Both", "Hotend", "Bed" };
|
||||
|
||||
static void Clear_Screen(uint8_t e=3);
|
||||
static void Draw_Float(float value, uint8_t row, bool selected=false, uint8_t minunit=10);
|
||||
static void Draw_Option(uint8_t value, const char * const * options, uint8_t row, bool selected=false, bool color=false);
|
||||
static uint16_t GetColor(uint8_t color, uint16_t original, bool light=false);
|
||||
static void Draw_Checkbox(uint8_t row, bool value);
|
||||
static void Draw_Title(const char * title);
|
||||
static void Draw_Title(FSTR_P const title);
|
||||
static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, const char * const label1=nullptr, const char * const label2=nullptr, bool more=false, bool centered=false);
|
||||
static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, FSTR_P const flabel1=nullptr, FSTR_P const flabel2=nullptr, bool more=false, bool centered=false);
|
||||
static void Draw_Menu(uint8_t menu, uint8_t select=0, uint8_t scroll=0);
|
||||
static void Redraw_Menu(bool lastprocess=true, bool lastselection=false, bool lastmenu=false);
|
||||
static void Redraw_Screen();
|
||||
|
||||
static void Main_Menu_Icons();
|
||||
static void Draw_Main_Menu(uint8_t select=0);
|
||||
static void Print_Screen_Icons();
|
||||
static void Draw_Print_Screen();
|
||||
static void Draw_Print_Filename(const bool reset=false);
|
||||
static void Draw_Print_ProgressBar();
|
||||
#if ENABLED(USE_M73_REMAINING_TIME)
|
||||
static void Draw_Print_ProgressRemain();
|
||||
#endif
|
||||
static void Draw_Print_ProgressElapsed();
|
||||
static void Draw_Print_confirm();
|
||||
static void Draw_SD_Item(uint8_t item, uint8_t row);
|
||||
static void Draw_SD_List(bool removed=false);
|
||||
static void Draw_Status_Area(bool icons=false);
|
||||
static void Draw_Popup(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, uint8_t mode, uint8_t icon=0);
|
||||
static void Popup_Select();
|
||||
static void Update_Status_Bar(bool refresh=false);
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
static void Draw_Bed_Mesh(int16_t selected = -1, uint8_t gridline_width = 1, uint16_t padding_x = 8, uint16_t padding_y_top = 40 + 53 - 7);
|
||||
static void Set_Mesh_Viewer_Status();
|
||||
#endif
|
||||
|
||||
static FSTR_P Get_Menu_Title(uint8_t menu);
|
||||
static uint8_t Get_Menu_Size(uint8_t menu);
|
||||
static void Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw=true);
|
||||
|
||||
static void Popup_Handler(PopupID popupid, bool option = false);
|
||||
static void Confirm_Handler(PopupID popupid);
|
||||
|
||||
static void Main_Menu_Control();
|
||||
static void Menu_Control();
|
||||
static void Value_Control();
|
||||
static void Option_Control();
|
||||
static void File_Control();
|
||||
static void Print_Screen_Control();
|
||||
static void Popup_Control();
|
||||
static void Confirm_Control();
|
||||
|
||||
static void Setup_Value(float value, float min, float max, float unit, uint8_t type);
|
||||
static void Modify_Value(float &value, float min, float max, float unit, void (*f)()=nullptr);
|
||||
static void Modify_Value(uint8_t &value, float min, float max, float unit, void (*f)()=nullptr);
|
||||
static void Modify_Value(uint16_t &value, float min, float max, float unit, void (*f)()=nullptr);
|
||||
static void Modify_Value(int16_t &value, float min, float max, float unit, void (*f)()=nullptr);
|
||||
static void Modify_Value(uint32_t &value, float min, float max, float unit, void (*f)()=nullptr);
|
||||
static void Modify_Value(int8_t &value, float min, float max, float unit, void (*f)()=nullptr);
|
||||
static void Modify_Option(uint8_t value, const char * const * options, uint8_t max);
|
||||
|
||||
static void Update_Status(const char * const text);
|
||||
static void Start_Print(bool sd);
|
||||
static void Stop_Print();
|
||||
static void Update();
|
||||
static void State_Update();
|
||||
static void Screen_Update();
|
||||
static void AudioFeedback(const bool success=true);
|
||||
static void Save_Settings(char *buff);
|
||||
static void Load_Settings(const char *buff);
|
||||
static void Reset_Settings();
|
||||
};
|
||||
|
||||
extern CrealityDWINClass CrealityDWIN;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user