Merge branch 'FB4S_WIFI' into PR
This commit is contained in:
@@ -120,14 +120,14 @@
|
||||
*
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 115200
|
||||
#define BAUDRATE 250000
|
||||
|
||||
// Enable the Bluetooth serial interface on AT90USB devices
|
||||
//#define BLUETOOTH
|
||||
|
||||
// Choose the name from boards.h that matches your setup
|
||||
#ifndef MOTHERBOARD
|
||||
#define MOTHERBOARD BOARD_MKS_ROBIN_NANO
|
||||
#define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2
|
||||
#endif
|
||||
|
||||
// Name displayed in the LCD "Ready" message and Info menu
|
||||
@@ -415,7 +415,7 @@
|
||||
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
|
||||
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
|
||||
*/
|
||||
#define TEMP_SENSOR_0 1
|
||||
#define TEMP_SENSOR_0 13
|
||||
#define TEMP_SENSOR_1 0
|
||||
#define TEMP_SENSOR_2 0
|
||||
#define TEMP_SENSOR_3 0
|
||||
@@ -425,7 +425,7 @@
|
||||
#define TEMP_SENSOR_7 0
|
||||
#define TEMP_SENSOR_BED 1
|
||||
#define TEMP_SENSOR_PROBE 0
|
||||
#define TEMP_SENSOR_CHAMBER 0
|
||||
#define TEMP_SENSOR_CHAMBER 1
|
||||
|
||||
// Dummy thermistor constant temperature readings, for use with 998 and 999
|
||||
#define DUMMY_THERMISTOR_998_VALUE 25
|
||||
@@ -499,9 +499,10 @@
|
||||
#define DEFAULT_Ki_LIST { 1.08, 1.0 }
|
||||
#define DEFAULT_Kd_LIST { 114.00, 112.0 }
|
||||
#else
|
||||
#define DEFAULT_Kp 17.04
|
||||
#define DEFAULT_Ki 1.31
|
||||
#define DEFAULT_Kd 55.34
|
||||
// 50Вт
|
||||
#define DEFAULT_Kp 11.1
|
||||
#define DEFAULT_Ki 0.55
|
||||
#define DEFAULT_Kd 56.1
|
||||
#endif
|
||||
#endif // PIDTEMP
|
||||
|
||||
@@ -667,7 +668,7 @@
|
||||
#define X_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
|
||||
#define Y_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
|
||||
#define Z_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
|
||||
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe.
|
||||
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.
|
||||
|
||||
/**
|
||||
* Stepper Drivers
|
||||
@@ -685,15 +686,15 @@
|
||||
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
|
||||
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
||||
*/
|
||||
#define X_DRIVER_TYPE A4988
|
||||
#define Y_DRIVER_TYPE A4988
|
||||
#define Z_DRIVER_TYPE A4988
|
||||
#define X_DRIVER_TYPE TMC2209
|
||||
#define Y_DRIVER_TYPE TMC2209
|
||||
#define Z_DRIVER_TYPE TMC2209
|
||||
//#define X2_DRIVER_TYPE A4988
|
||||
//#define Y2_DRIVER_TYPE A4988
|
||||
//#define Z2_DRIVER_TYPE A4988
|
||||
//#define Z3_DRIVER_TYPE A4988
|
||||
//#define Z4_DRIVER_TYPE A4988
|
||||
#define E0_DRIVER_TYPE A4988
|
||||
#define E0_DRIVER_TYPE TMC2209
|
||||
//#define E1_DRIVER_TYPE A4988
|
||||
//#define E2_DRIVER_TYPE A4988
|
||||
//#define E3_DRIVER_TYPE A4988
|
||||
@@ -748,7 +749,7 @@
|
||||
* Override with M92
|
||||
* X, Y, Z, E0 [, E1[, E2...]]
|
||||
*/
|
||||
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 421 }
|
||||
#define DEFAULT_AXIS_STEPS_PER_UNIT { 160.5, 160.5, 400, 205.0 }
|
||||
|
||||
/**
|
||||
* Default Max Feed Rate (mm/s)
|
||||
@@ -768,7 +769,8 @@
|
||||
* Override with M201
|
||||
* X, Y, Z, E0 [, E1[, E2...]]
|
||||
*/
|
||||
#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 3000 }
|
||||
|
||||
#define DEFAULT_MAX_ACCELERATION { 1300, 1300, 100, 800 }
|
||||
|
||||
#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
|
||||
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
|
||||
@@ -784,9 +786,10 @@
|
||||
* M204 T Travel Acceleration
|
||||
*/
|
||||
// @efim-a-efim - decreased E0 acceleration to make it less noisy (yes, even with TMC2208 drivers)
|
||||
#define DEFAULT_ACCELERATION 1500 // X, Y, Z and E acceleration for printing moves
|
||||
|
||||
#define DEFAULT_ACCELERATION 1200 // X, Y, Z and E acceleration for printing moves
|
||||
#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration for retracts
|
||||
#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves
|
||||
#define DEFAULT_TRAVEL_ACCELERATION 1200 // X, Y, Z acceleration for travel (non printing) moves
|
||||
|
||||
/**
|
||||
* Default Jerk limits (mm/s)
|
||||
@@ -798,8 +801,8 @@
|
||||
*/
|
||||
#define CLASSIC_JERK
|
||||
#if ENABLED(CLASSIC_JERK)
|
||||
#define DEFAULT_XJERK 10.0
|
||||
#define DEFAULT_YJERK 10.0
|
||||
#define DEFAULT_XJERK 13.0
|
||||
#define DEFAULT_YJERK 13.0
|
||||
#define DEFAULT_ZJERK 0.5
|
||||
|
||||
//#define TRAVEL_EXTRA_XYJERK 0.0 // Additional jerk allowance for all travel moves
|
||||
@@ -849,7 +852,7 @@
|
||||
* The probe replaces the Z-MIN endstop and is used for Z homing.
|
||||
* (Automatically enables USE_PROBE_FOR_Z_HOMING.)
|
||||
*/
|
||||
//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
|
||||
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
|
||||
|
||||
// Force the use of the probe for Z-axis homing
|
||||
//#define USE_PROBE_FOR_Z_HOMING
|
||||
@@ -998,10 +1001,11 @@
|
||||
|
||||
// Most probes should stay away from the edges of the bed, but
|
||||
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
|
||||
#define PROBING_MARGIN 0
|
||||
#define PROBING_MARGIN 5
|
||||
|
||||
|
||||
// X and Y axis travel speed (mm/min) between probes
|
||||
#define XY_PROBE_SPEED (1000)
|
||||
#define XY_PROBE_SPEED 3000
|
||||
|
||||
// Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
@@ -1035,16 +1039,17 @@
|
||||
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
|
||||
* But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
|
||||
*/
|
||||
#define Z_CLEARANCE_DEPLOY_PROBE 7 // Z Clearance for Deploy/Stow
|
||||
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
|
||||
#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow
|
||||
#define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points
|
||||
#define Z_CLEARANCE_MULTI_PROBE 3 // Z Clearance between multiple probes
|
||||
#define Z_AFTER_PROBING 5 // Z position after probing is done
|
||||
|
||||
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
|
||||
|
||||
// For M851 give a range for adjusting the Z probe offset
|
||||
#define Z_PROBE_OFFSET_RANGE_MIN -3
|
||||
#define Z_PROBE_OFFSET_RANGE_MAX 3
|
||||
|
||||
#define Z_PROBE_OFFSET_RANGE_MIN -5
|
||||
#define Z_PROBE_OFFSET_RANGE_MAX 5
|
||||
|
||||
// Enable the M48 repeatability test to test probe accuracy
|
||||
//#define Z_MIN_PROBE_REPEATABILITY_TEST
|
||||
@@ -1145,7 +1150,7 @@
|
||||
#define Z_HOMING_HEIGHT 2 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
|
||||
// Be sure to have this much clearance over your Z_MAX_POS to prevent grinding.
|
||||
|
||||
#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z
|
||||
//#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z
|
||||
|
||||
// Direction of endstops when homing; 1=MAX, -1=MIN
|
||||
// :[-1,1]
|
||||
@@ -1157,14 +1162,15 @@
|
||||
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 250
|
||||
#define Y_BED_SIZE 210
|
||||
#define Y_BED_SIZE 206
|
||||
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Y_MIN_POS -2
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS X_BED_SIZE+X_MIN_POS
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define X_MAX_POS X_BED_SIZE + X_MIN_POS
|
||||
#define Y_MAX_POS Y_BED_SIZE + Y_MIN_POS
|
||||
#define Z_MAX_POS 200
|
||||
|
||||
/**
|
||||
@@ -1269,8 +1275,8 @@
|
||||
//#define AUTO_BED_LEVELING_3POINT
|
||||
//#define AUTO_BED_LEVELING_LINEAR
|
||||
//#define AUTO_BED_LEVELING_BILINEAR
|
||||
//#define AUTO_BED_LEVELING_UBL
|
||||
#define MESH_BED_LEVELING
|
||||
#define AUTO_BED_LEVELING_UBL
|
||||
//#define MESH_BED_LEVELING
|
||||
|
||||
/**
|
||||
* Normally G28 leaves leveling disabled on completion. Enable
|
||||
@@ -1422,13 +1428,13 @@
|
||||
#define Z_SAFE_HOMING
|
||||
|
||||
#if ENABLED(Z_SAFE_HOMING)
|
||||
#define Z_SAFE_HOMING_X_POINT (0) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT (0) // Y point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
|
||||
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
|
||||
#endif
|
||||
|
||||
// Homing speeds (mm/m)
|
||||
#define HOMING_FEEDRATE_XY (40*60)
|
||||
#define HOMING_FEEDRATE_Z (40*60)
|
||||
#define HOMING_FEEDRATE_XY (60*60)
|
||||
#define HOMING_FEEDRATE_Z (4*60)
|
||||
|
||||
// Validate that endstops are triggered on homing moves
|
||||
#define VALIDATE_HOMING_ENDSTOPS
|
||||
@@ -1568,14 +1574,14 @@ EEPROM_W25Q
|
||||
// @section temperature
|
||||
|
||||
// Preheat Constants
|
||||
#define PREHEAT_1_LABEL "PETG"
|
||||
#define PREHEAT_1_TEMP_HOTEND 235
|
||||
#define PREHEAT_1_TEMP_BED 80
|
||||
#define PREHEAT_1_LABEL "PLA"
|
||||
#define PREHEAT_1_TEMP_HOTEND 190
|
||||
#define PREHEAT_1_TEMP_BED 50
|
||||
#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
#define PREHEAT_2_LABEL "ABS"
|
||||
#define PREHEAT_2_TEMP_HOTEND 250
|
||||
#define PREHEAT_2_TEMP_BED 100
|
||||
#define PREHEAT_2_LABEL "PETG"
|
||||
#define PREHEAT_2_TEMP_HOTEND 235
|
||||
#define PREHEAT_2_TEMP_BED 80
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
/**
|
||||
@@ -1775,7 +1781,7 @@ EEPROM_W25Q
|
||||
*
|
||||
* :['JAPANESE', 'WESTERN', 'CYRILLIC']
|
||||
*/
|
||||
#define DISPLAY_CHARSET_HD44780 JAPANESE
|
||||
#define DISPLAY_CHARSET_HD44780 CYRILLIC
|
||||
|
||||
/**
|
||||
* Info Screen Style (0:Classic, 1:Průša)
|
||||
@@ -1824,7 +1830,7 @@ EEPROM_W25Q
|
||||
// This option overrides the default number of encoder pulses needed to
|
||||
// produce one step. Should be increased for high-resolution encoders.
|
||||
//
|
||||
//#define ENCODER_PULSES_PER_STEP 4
|
||||
#define ENCODER_PULSES_PER_STEP 4
|
||||
|
||||
//
|
||||
// Use this option to override the number of step signals required to
|
||||
@@ -2286,7 +2292,7 @@ EEPROM_W25Q
|
||||
* Resolution: TFT_WIDTH and TFT_HEIGHT
|
||||
* Interface: TFT_INTERFACE_FSMC or TFT_INTERFACE_SPI
|
||||
*/
|
||||
#define MKS_ROBIN_TFT35
|
||||
#define MKS_TS35_V2_0
|
||||
|
||||
/**
|
||||
* TFT UI - User Interface Selection. Enable one of the following options:
|
||||
|
||||
@@ -503,11 +503,11 @@
|
||||
/**
|
||||
* M355 Case Light on-off / brightness
|
||||
*/
|
||||
//#define CASE_LIGHT_ENABLE
|
||||
#define CASE_LIGHT_ENABLE
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
#define CASE_LIGHT_PIN LED_CASE_PIN // Override the default pin if needed
|
||||
#define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
|
||||
#define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
|
||||
#define CASE_LIGHT_DEFAULT_ON false // Set default power-up state on
|
||||
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 255 // Set default power-up brightness (0-255, requires PWM pin)
|
||||
#define CASE_LIGHT_MAX_PWM 255 // Limit pwm
|
||||
#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
|
||||
@@ -1628,7 +1628,7 @@
|
||||
|
||||
//#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
|
||||
|
||||
//#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
|
||||
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
//#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
|
||||
//#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
|
||||
@@ -1703,7 +1703,7 @@
|
||||
|
||||
#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
|
||||
// Override the mesh area if the automatic (max) area is too large
|
||||
#define MESH_MIN_X 0
|
||||
#define MESH_MIN_X MESH_INSET
|
||||
#define MESH_MIN_Y MESH_INSET
|
||||
#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
|
||||
#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
|
||||
@@ -2096,7 +2096,7 @@
|
||||
// This short retract is done immediately, before parking the nozzle.
|
||||
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 710 // (mm) The length of filament for a complete unload.
|
||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
// Set to 0 for manual unloading.
|
||||
@@ -2105,7 +2105,7 @@
|
||||
// 0 to disable start loading and skip to fast load only
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 710 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 100 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
||||
@@ -2268,7 +2268,7 @@
|
||||
#if AXIS_IS_TMC(X)
|
||||
#define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
|
||||
#define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing
|
||||
#define X_MICROSTEPS 16 // 0..256
|
||||
#define X_MICROSTEPS 32 // 0..256
|
||||
#define X_RSENSE 0.11
|
||||
#define X_CHAIN_POS -1 // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ...
|
||||
#endif
|
||||
@@ -2284,7 +2284,7 @@
|
||||
#if AXIS_IS_TMC(Y)
|
||||
#define Y_CURRENT 800
|
||||
#define Y_CURRENT_HOME Y_CURRENT
|
||||
#define Y_MICROSTEPS 16
|
||||
#define Y_MICROSTEPS 32
|
||||
#define Y_RSENSE 0.11
|
||||
#define Y_CHAIN_POS -1
|
||||
#endif
|
||||
@@ -2330,8 +2330,8 @@
|
||||
#endif
|
||||
|
||||
#if AXIS_IS_TMC(E0)
|
||||
#define E0_CURRENT 800
|
||||
#define E0_MICROSTEPS 16
|
||||
#define E0_CURRENT 650
|
||||
#define E0_MICROSTEPS 8
|
||||
#define E0_RSENSE 0.11
|
||||
#define E0_CHAIN_POS -1
|
||||
#endif
|
||||
@@ -3236,17 +3236,23 @@
|
||||
#define USER_DESC_1 "Home & UBL Info"
|
||||
#define USER_GCODE_1 "G28\nG29 W"
|
||||
|
||||
#define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
|
||||
#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
|
||||
#define USER_DESC_2 "Light ON"
|
||||
#define USER_GCODE_2 "M355 S1"
|
||||
|
||||
#define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL
|
||||
#define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
|
||||
#define USER_DESC_3 "Light OFF"
|
||||
#define USER_GCODE_3 "M355 S0"
|
||||
|
||||
#define USER_DESC_4 "Heat Bed/Home/Level"
|
||||
#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
|
||||
// #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
|
||||
// #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
|
||||
|
||||
#define USER_DESC_5 "Power off"
|
||||
#define USER_GCODE_5 "M81"
|
||||
// #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL
|
||||
// #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
|
||||
|
||||
// #define USER_DESC_4 "Heat Bed/Home/Level"
|
||||
// #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
|
||||
|
||||
#define USER_DESC_4 "Power off"
|
||||
#define USER_GCODE_4 "M81"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -268,6 +268,11 @@ bool wait_for_heatup = true;
|
||||
* ******************************** FUNCTIONS ********************************
|
||||
* ***************************************************************************
|
||||
*/
|
||||
#ifdef LED_SW_PIN
|
||||
void setup_LED_SW_pin() {
|
||||
SET_INPUT_PULLDOWN(LED_SW_PIN);
|
||||
}
|
||||
#endif
|
||||
|
||||
void setup_killpin() {
|
||||
#if HAS_KILL
|
||||
@@ -544,7 +549,7 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) {
|
||||
// key kill key press
|
||||
// -------------------------------------------------------------------------------
|
||||
static int killCount = 0; // make the inactivity button a bit less responsive
|
||||
const int KILL_DELAY = 750;
|
||||
const int KILL_DELAY = 100000;
|
||||
if (kill_state())
|
||||
killCount++;
|
||||
else if (killCount > 0)
|
||||
@@ -559,6 +564,20 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LED_SW_PIN
|
||||
static int LedSw_Count = 0; // make the inactivity button a bit less responsive
|
||||
const int LED_SW_DELAY = 1000;
|
||||
bool led_pin_status = READ(LED_SW_PIN);
|
||||
if (LedSw_Count == LED_SW_DELAY && !led_pin_status){
|
||||
caselight.on = !caselight.on;
|
||||
caselight.update(true);
|
||||
}
|
||||
if (led_pin_status && LedSw_Count < LED_SW_DELAY)
|
||||
LedSw_Count++;
|
||||
else if (!led_pin_status)
|
||||
LedSw_Count = 0;
|
||||
#endif
|
||||
|
||||
#if HAS_HOME
|
||||
// Handle a standalone HOME button
|
||||
constexpr millis_t HOME_DEBOUNCE_DELAY = 1000UL;
|
||||
@@ -1005,6 +1024,10 @@ void setup() {
|
||||
#endif
|
||||
|
||||
SETUP_RUN(setup_killpin());
|
||||
|
||||
#ifdef LED_SW_PIN
|
||||
SETUP_RUN(setup_LED_SW_pin());
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
SETUP_RUN(tmc_serial_begin());
|
||||
|
||||
@@ -168,7 +168,12 @@ BlTouch
|
||||
//#define POWER_LOSS_PIN PA2 // PW_DET
|
||||
//#define PS_ON_PIN PB2 // PW_OFF
|
||||
#define FIL_RUNOUT_PIN PA4
|
||||
#define FIL_RUNOUT2_PIN PE6
|
||||
#ifdef CASE_LED_INSTEAD_E1
|
||||
//#define LED_SW_PIN PE6
|
||||
#endif
|
||||
#ifndef LED_SW_PIN
|
||||
#define FIL_RUNOUT2_PIN PE6
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
|
||||
@@ -202,6 +202,14 @@ https://easyeda.com/sst78rust/fb4s-led-control
|
||||
|
||||
#define FAN_PIN PB1 // FAN
|
||||
|
||||
/*
|
||||
Управление питанием
|
||||
*/
|
||||
#define SUICIDE_PIN PB2
|
||||
#define SUICIDE_PIN_INVERTING false
|
||||
#define KILL_PIN PA2 // Enable MKSPWC DET PIN
|
||||
#define KILL_PIN_STATE true // Enable MKSPWC PIN STATE
|
||||
|
||||
//
|
||||
// Thermocouples
|
||||
//
|
||||
@@ -236,7 +244,12 @@ https://easyeda.com/sst78rust/fb4s-led-control
|
||||
//#define POWER_LOSS_PIN PA2 // PW_DET
|
||||
//#define PS_ON_PIN PB2 // PW_OFF
|
||||
#define FIL_RUNOUT_PIN PA4
|
||||
#define FIL_RUNOUT2_PIN PE6
|
||||
#ifdef CASE_LED_INSTEAD_E1
|
||||
#define LED_SW_PIN PA2//PE6
|
||||
#endif
|
||||
#ifndef LED_SW_PIN
|
||||
#define FIL_RUNOUT2_PIN PE6
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define SERVO0_PIN PA8 // Enable BLTOUCH
|
||||
|
||||
Reference in New Issue
Block a user