diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 97d2d95f9..16865c487 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -223,16 +223,16 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board + // pins_XXX.h file overrides this one + #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif + //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1029,7 +1029,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index de039330c..3acb1a0d0 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -6354,9 +6354,8 @@ inline void gcode_M42() { #endif SERIAL_PROTOCOLLNPGM(". deploy & stow 4 times"); - pinMode(PROBE_TEST_PIN, INPUT_PULLUP); - bool deploy_state; - bool stow_state; + SET_INPUT_PULLUP(PROBE_TEST_PIN); + bool deploy_state, stow_state; for (uint8_t i = 0; i < 4; i++) { servo[probe_index].move(z_servo_angle[0]); //deploy safe_delay(500); diff --git a/Marlin/boards.h b/Marlin/boards.h index 6594b30fa..24ab48c86 100644 --- a/Marlin/boards.h +++ b/Marlin/boards.h @@ -95,7 +95,7 @@ #define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers #define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers #define BOARD_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D -#define BOARD_ZRIB_V20 504 // zrib V2.0 control board (Chinese knock off RAMPS replica) +#define BOARD_ZRIB_V20 504 // zrib V2.0 control board (Chinese knock off RAMPS replica) #define MB(board) (MOTHERBOARD==BOARD_##board) diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index 4eec94c07..36d2a4366 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1022,7 +1020,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index f3b44a466..8a09f18c0 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1022,7 +1020,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h index 662d679a8..a5fd5c5e6 100644 --- a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1031,7 +1029,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index c4843b6ec..de751085a 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1022,7 +1020,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h index 385adadb9..09e91b5d8 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1006,7 +1004,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 482d89a98..ddb740486 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -236,16 +236,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1035,7 +1033,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/K8400/Configuration_adv.h b/Marlin/example_configurations/K8400/Configuration_adv.h index e3c6ccf26..a52988805 100644 --- a/Marlin/example_configurations/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/K8400/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1022,7 +1020,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/M150/Configuration_adv.h b/Marlin/example_configurations/M150/Configuration_adv.h index 2253ce435..3962f2d40 100644 --- a/Marlin/example_configurations/M150/Configuration_adv.h +++ b/Marlin/example_configurations/M150/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1029,7 +1027,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index 570538c59..f939c4d2c 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1022,7 +1020,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 718a4b90b..7fe55a0b7 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1022,7 +1020,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h index a833712b0..5ee685360 100644 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/TAZ4/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1022,7 +1020,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index 3de9a920c..b6e6175fb 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1025,7 +1023,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index c4843b6ec..de751085a 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1022,7 +1020,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index 1d798fb94..51f95e1f2 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1027,7 +1025,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index 5363cb3f6..c9dc15e7a 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1026,7 +1024,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index 53a86374b..334fba863 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1024,7 +1022,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index 53a86374b..334fba863 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1024,7 +1022,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 5798c53e7..d46820b12 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -228,16 +228,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1029,7 +1027,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index fdc295253..6440d1611 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1024,7 +1022,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h index 4814b7a24..799acd32a 100644 --- a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1031,7 +1029,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index fbbb86690..026e2443a 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1022,7 +1020,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 2a5b63492..249166ca1 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1022,7 +1020,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index f78a297fc..245eeee21 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -223,16 +223,14 @@ /** * M355 Case Light on-off / brightness */ -//#define CASE_LIGHT_ENABLE -#if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 4 // can be defined here or in the pins_XXX.h file for your board - // pins_XXX.h file overrides this one - #define INVERT_CASE_LIGHT false // set to true if case light is ON when pin is at 0 - #define CASE_LIGHT_DEFAULT_ON true // set default power up state to on or off - #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // set power up brightness 0-255 ( only used if on PWM - // and if CASE_LIGHT_DEFAULT is set to on - //#define MENU_ITEM_CASE_LIGHT // Uncomment to have a Case Light entry in main menu -#endif +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu +#endif //=========================================================================== //============================ Mechanical Settings ========================== @@ -1025,7 +1023,7 @@ */ #define TMC2130_ADV() { } -#endif // ENABLED(HAVE_TMC2130) +#endif // HAVE_TMC2130 // @section L6470 diff --git a/Marlin/gcode.cpp b/Marlin/gcode.cpp index 0cb233733..d23db21f7 100644 --- a/Marlin/gcode.cpp +++ b/Marlin/gcode.cpp @@ -183,7 +183,7 @@ void GCodeParser::parse(char *p) { #endif if (PARAM_TEST) { - + while (*p == ' ') p++; // skip spaces vetween parameters & values const bool has_num = DECIMAL_SIGNED(*p); // The parameter has a number [-+0-9.] diff --git a/Marlin/gcode.h b/Marlin/gcode.h index ec5b229bd..506a71878 100644 --- a/Marlin/gcode.h +++ b/Marlin/gcode.h @@ -120,7 +120,7 @@ public: // Code seen bit was set. If not found, value_ptr is unchanged. // This allows "if (seen('A')||seen('B'))" to use the last-found value. - static bool seen(const char c) { + static volatile bool seen(const char c) { const uint8_t ind = c - 'A'; if (ind >= COUNT(param)) return false; // Only A-Z const bool b = TEST(codebits[ind >> 3], ind & 0x7); @@ -132,7 +132,7 @@ public: // Code is found in the string. If not found, value_ptr is unchanged. // This allows "if (seen('A')||seen('B'))" to use the last-found value. - static bool seen(const char c) { + static volatile bool seen(const char c) { const char *p = strchr(command_args, c); const bool b = !!p; if (b) value_ptr = DECIMAL_SIGNED(p[1]) ? &p[1] : (char*)NULL; diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index dc98d6570..0508bca6c 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -1598,7 +1598,6 @@ void kill_screen(const char* lcd_msg) { // // The last G29 will record and enable but not move. - // Since G29 is deferred, // lcd_wait_for_move = true; enqueue_and_echo_commands_P(PSTR("G29 V1")); @@ -2592,16 +2591,9 @@ void kill_screen(const char* lcd_msg) { * */ - /** - * - * Callback for LCD contrast - * - */ #if HAS_LCD_CONTRAST - void lcd_callback_set_contrast() { set_lcd_contrast(lcd_contrast); } - - #endif // HAS_LCD_CONTRAST + #endif static void lcd_factory_settings() { settings.reset(); @@ -2616,7 +2608,7 @@ void kill_screen(const char* lcd_msg) { MENU_ITEM(submenu, MSG_FILAMENT, lcd_control_filament_menu); #if HAS_LCD_CONTRAST - MENU_ITEM_EDIT_CALLBACK(int3, MSG_CONTRAST, (int) &lcd_contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, lcd_callback_set_contrast, true); + MENU_ITEM_EDIT_CALLBACK(int3, MSG_CONTRAST, (int*)&lcd_contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, lcd_callback_set_contrast, true); #endif #if ENABLED(FWRETRACT) MENU_ITEM(submenu, MSG_RETRACT, lcd_control_retract_menu); diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h index fcda9be68..80f2c4a47 100644 --- a/Marlin/ultralcd_impl_DOGM.h +++ b/Marlin/ultralcd_impl_DOGM.h @@ -410,8 +410,8 @@ inline void lcd_implementation_status_message() { const uint8_t slen = lcd_strlen(lcd_status_message); if (slen > LCD_WIDTH) { // Skip any non-printing bytes - while (!PRINTABLE(lcd_status_message[status_scroll_pos])) ++status_scroll_pos; - if (++status_scroll_pos > slen - LCD_WIDTH) status_scroll_pos = 0; + while (!PRINTABLE(lcd_status_message[status_scroll_pos++])) { /* nada */ } + if (status_scroll_pos > slen - LCD_WIDTH) status_scroll_pos = 0; } #else lcd_print_utf(lcd_status_message); diff --git a/Marlin/ultralcd_impl_HD44780.h b/Marlin/ultralcd_impl_HD44780.h index 776ad0aee..9192912a8 100644 --- a/Marlin/ultralcd_impl_HD44780.h +++ b/Marlin/ultralcd_impl_HD44780.h @@ -829,8 +829,8 @@ static void lcd_implementation_status_screen() { const uint8_t slen = lcd_strlen(lcd_status_message); if (slen > LCD_WIDTH) { // Skip any non-printing bytes - while (!PRINTABLE(lcd_status_message[status_scroll_pos])) ++status_scroll_pos; - if (++status_scroll_pos > slen - LCD_WIDTH) status_scroll_pos = 0; + while (!PRINTABLE(lcd_status_message[status_scroll_pos++])) { /* nada */ } + if (status_scroll_pos > slen - LCD_WIDTH) status_scroll_pos = 0; } #else lcd_print_utf(lcd_status_message);