diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 0be4249251..1911e0726f 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -103,7 +103,7 @@ #else #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds #endif - + #define THERMAL_PROTECTION_BED_HYSTERESIS 4 // Degrees Celsius /** @@ -1367,19 +1367,21 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE +#if ENABLED(TREX3) +#define SPINDLE_LASER_ENABLE +#endif #if ENABLED(SPINDLE_LASER_ENABLE) -#define SPINDLE_LASER_ENABLE_PIN 0 - #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM false // set to true if your controller supports setting the speed/power - #define SPINDLE_LASER_PWM_INVERT false // set to "true" if the speed/power goes up when you want it to go slower - #define SPINDLE_LASER_POWERUP_DELAY 5 // delay in milliseconds to allow the spindle/laser to come up to speed/power - #define SPINDLE_LASER_POWERDOWN_DELAY 5 // delay in milliseconds to allow the spindle to stop - #define SPINDLE_DIR_CHANGE false // set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction - /** +#define SPINDLE_LASER_ENABLE_INVERT true // set to "true" if the on/off function is reversed +#define SPINDLE_LASER_PWM false // set to true if your controller supports setting the speed/power +#define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower +#define SPINDLE_LASER_POWERUP_DELAY 1 // delay in milliseconds to allow the spindle/laser to come up to speed/power +#define SPINDLE_LASER_POWERDOWN_DELAY 1 // delay in milliseconds to allow the spindle to stop +#define SPINDLE_DIR_CHANGE false // set to true if your spindle controller supports changing spindle direction +#define SPINDLE_INVERT_DIR false +#define SPINDLE_STOP_ON_DIR_CHANGE false // set to true if Marlin should stop the spindle before changing rotation direction + +/** * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power * * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT @@ -1388,26 +1390,17 @@ * set the following for your controller (ALL MUST BE SET) */ - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM +#define SPEED_POWER_SLOPE 118.4 +#define SPEED_POWER_INTERCEPT 0 +#define SPEED_POWER_MIN 5000 +#define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% +//#define SPEED_POWER_SLOPE 0.3922 +//#define SPEED_POWER_INTERCEPT 0 +//#define SPEED_POWER_MIN 10 +//#define SPEED_POWER_MAX 100 // 0-100% #endif -#if(!ENABLED(FilamentSensor)) - #define FAN_AS_LASER -#endif -#if ENABLED(FAN_AS_LASER) - #define FAN_NUM_AS_LASER 1 - #define LASER_PIN_DEDICATED true - #else - #define FAN_NUM_AS_LASER -1 -#endif /** * Filament Width Sensor * @@ -1529,10 +1522,10 @@ #define USER_GCODE_1 "M502 \n M500 \n M501 \n M190 S60 \n T0 \n G28 \n G29 P1 \n G29 S1 \n G29 S0 \n G29 F 10.0 \n G29 A \n M500 \n G28 \n G29 L1 \n " COMMFANNSPEED " M109 S225 \n G1 X150 Y 150 \n G1 Z0 \n M77 \n M117 Set Z Offset" #define USER_GCODE_2 "M190 S60 \n " COMMFANNSPEED " M104 235 \n G28 \n G29 L1 \n G1 X100 Y 100 \n G1 Z0" #endif - + #define USER_DESC_3 "Store Settings" #define USER_GCODE_3 "M500" - + #define USER_DESC_5 "PID Tune Bed" #define USER_GCODE_5 "M303E-1S75U \n M500 \n M117 PID Bed Done" diff --git a/Marlin/language_en.h b/Marlin/language_en.h index a4c3598516..ef499cfad9 100644 --- a/Marlin/language_en.h +++ b/Marlin/language_en.h @@ -1044,6 +1044,13 @@ #ifndef MSG_M600_TOO_COLD #define MSG_M600_TOO_COLD _UxGT("M600: Too cold") #endif +#ifndef MSG_LASER_ON + #define MSG_LASER_ON _UxGT("Laser on") +#endif + +#ifndef MSG_LASER_OFF + #define MSG_LASER_OFF _UxGT("Laser off") +#endif // // Filament Change screens show up to 3 lines on a 4-line display diff --git a/Marlin/pins_FORMBOT_TREX3.h b/Marlin/pins_FORMBOT_TREX3.h index 8ff09f47c5..03343f9597 100644 --- a/Marlin/pins_FORMBOT_TREX3.h +++ b/Marlin/pins_FORMBOT_TREX3.h @@ -144,7 +144,7 @@ #endif #define SPINDLE_LASER_PWM_PIN -1 // MUST BE HARDWARE PWM -#define SPINDLE_LASER_ENA_PIN 4 // Pin should have a pullup! +#define SPINDLE_LASER_ENABLE_PIN 4 // Pin should have a pullup! // Use the RAMPS 1.4 Analog input 5 on the AUX2 connector #define FILWIDTH_PIN 5 // Analog Input diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 0f30b61261..c65366d875 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -1139,13 +1139,14 @@ void lcd_quick_feedback(const bool clear_buttons) { // Set Case light on/off/brightness // #if ENABLED(MENU_ITEM_CASE_LIGHT) - if (USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) { - MENU_ITEM(submenu, MSG_CASE_LIGHT, case_light_menu); - } - else MENU_ITEM_EDIT_CALLBACK(bool, MSG_CASE_LIGHT, (bool*)&case_light_on, update_case_light); #endif + #if ENABLED(SPINDLE_LASER_ENABLE) + MENU_ITEM(gcode, MSG_LASER_ON, PSTR("M3")); + MENU_ITEM(gcode, MSG_LASER_OFF, PSTR("M5")); + #endif + if (planner.movesplanned() || IS_SD_PRINTING()) MENU_ITEM(submenu, MSG_TUNE, lcd_tune_menu); else