diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index b2f0cc6394..10aeda5e8a 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -474,14 +474,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 500 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 } @@ -489,7 +489,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 } diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index e470fc88f7..8a174aeb7b 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1298,19 +1298,30 @@ inline bool code_value_bool() { return !code_has_value() || code_value_byte() > #if ENABLED(TEMPERATURE_UNITS_SUPPORT) inline void set_input_temp_units(TempUnit units) { input_temp_units = units; } - float temp_abs(const float &c) { + float to_temp_units(const float &c) { switch (input_temp_units) { case TEMPUNIT_F: - return (c - 32.0) * 0.5555555556; + return c * 0.5555555556 + 32.0; case TEMPUNIT_K: - return c - 273.15; + return c + 273.15; case TEMPUNIT_C: default: return c; } } - int16_t code_value_temp_abs() { return temp_abs(code_value_float()); } + int16_t code_value_temp_abs() { + const float c = code_value_float(); + switch (input_temp_units) { + case TEMPUNIT_F: + return (int16_t)((c - 32.0) * 0.5555555556); + case TEMPUNIT_K: + return (int16_t)(c - 273.15); + case TEMPUNIT_C: + default: + return (int16_t)(c); + } + } int16_t code_value_temp_diff() { switch (input_temp_units) { diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index ef7e040147..99495997b8 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -1257,8 +1257,8 @@ void MarlinSettings::reset() { CONFIG_ECHO_START; #if ENABLED(TEMPERATURE_UNITS_SUPPORT) extern TempUnit input_temp_units; - extern float temp_abs(const float &f); - #define TEMP_UNIT(N) temp_abs(N) + extern float to_temp_units(const float &f); + #define TEMP_UNIT(N) to_temp_units(N) SERIAL_ECHOPGM(" M149 "); SERIAL_CHAR(input_temp_units == TEMPUNIT_K ? 'K' : input_temp_units == TEMPUNIT_F ? 'F' : 'C'); SERIAL_ECHOPGM(" ; Units in "); diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index b029b4b533..39f857d9c8 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -473,14 +473,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 71.128, 71.128, 640, 152 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 200, 200, 20, 20 } @@ -488,7 +488,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 1000, 1000, 100, 10000 } diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index eaf92c943d..bb74b12d1d 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -457,14 +457,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 76.190476, 76.190476, 1600, 164 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 } @@ -472,7 +472,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 5000, 5000, 100, 80000 } diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 506faaf036..14fc25e834 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -457,14 +457,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 76.190476, 76.190476, 1600, 164 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 } @@ -472,7 +472,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 5000, 5000, 100, 80000 } diff --git a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h index 7c39446376..1c473e035c 100644 --- a/Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h +++ b/Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h @@ -480,14 +480,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 52.2 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 250, 250, 2, 17 } @@ -495,7 +495,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 1000, 1000, 4, 750 } diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 43be117b7d..8c611552a9 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -465,14 +465,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 100.47095761381482 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 200, 200, 3.3, 25 } @@ -480,7 +480,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 1100, 1100, 100, 10000 } @@ -1149,7 +1149,7 @@ * IMPORTANT: The U8glib library is required for Full Graphic Display! * https://github.com/olikraus/U8glib_Arduino */ -#define ULTRA_LCD // Character based +//#define ULTRA_LCD // Character based //#define DOGLCD // Full graphics display /** diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index e40dbb7863..35f6aea296 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -468,14 +468,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 160, 160, 8000, 204 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 250, 250, 2, 200 } @@ -483,7 +483,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 800, 800, 20, 1000 } diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index d370fc8a7f..bd79a11a51 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -504,13 +504,13 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 64.25, 64.25, 2560, 600 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 } @@ -518,7 +518,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 9000, 9000, 100, 10000 } diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index 4b11a6a38d..027ad29bc9 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -474,14 +474,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 134.74, 134.74, 4266.66, 148.7 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 160, 160, 10, 10000 } @@ -489,7 +489,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 9000, 9000, 100, 10000 } @@ -1158,7 +1158,7 @@ * IMPORTANT: The U8glib library is required for Full Graphic Display! * https://github.com/olikraus/U8glib_Arduino */ -#define ULTRA_LCD // Character based +//#define ULTRA_LCD // Character based //#define DOGLCD // Full graphics display /** diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index bd27e511b6..2b7a0b3e3b 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -474,14 +474,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 134.74, 134.74, 4266.66, 148.7 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 160, 160, 10, 10000 } @@ -489,7 +489,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 9000, 9000, 100, 10000 } diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index d035246251..fad021c521 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -474,14 +474,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 78.7402*2, 78.7402*2, 5120.00, 760*1*1.5 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 } @@ -489,7 +489,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 } diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 023e01653e..b00a75d8e0 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -471,7 +471,7 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ // default steps per unit for RigidBot with standard hardware #define DEFAULT_AXIS_STEPS_PER_UNIT { 44.3090, 22.1545, 1600, 53.5 } @@ -480,7 +480,7 @@ /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 } @@ -488,7 +488,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 800, 800, 100, 10000 } diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 251b466891..fcaf75b4e7 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -489,14 +489,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 103.69, 106.65, 200/1.25, 1000 } // default steps per unit for SCARA /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 300, 300, 30, 25 } @@ -504,7 +504,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 300, 300, 20, 1000 } diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 117dab65e3..c31994a38e 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -494,14 +494,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 100.5, 100.5, 400, 850 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 800, 800, 8, 50 } @@ -509,7 +509,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 9000, 9000, 100, 10000 } diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index 48f8708ce1..662bd133ed 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -525,14 +525,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 6400, 88.16 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 300, 300, 7, 35 } @@ -540,7 +540,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 } diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index c28c8613da..25ec69ac66 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -465,14 +465,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 600.0*8/3, 102.073 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 350, 350, 7.2, 80 } @@ -480,7 +480,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 1000, 1000, 10, 1000 } diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index e5d040e033..f95dfcc9c1 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -474,14 +474,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 500 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 } @@ -489,7 +489,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 } diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index 42f6b3f3e3..c92671783f 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -542,14 +542,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 100 } // default steps per unit for Kossel (GT2, 20 tooth) /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 200, 200, 200, 25 } @@ -557,7 +557,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 4000, 4000, 4000, 4000 } diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index 09122c2ac3..22e338003f 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -549,14 +549,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 90 } // default steps per unit for Kossel (GT2, 20 tooth) /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 200, 200, 200, 200 } @@ -564,7 +564,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 4000, 4000, 4000, 4000 } diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index aeee57b4dd..996100182f 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -538,14 +538,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 80, 760*1.1 } // default steps per unit for Kossel (GT2, 20 tooth) /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 500, 500, 500, 25 } @@ -553,7 +553,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 9000, 9000, 9000, 10000 } diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 2bfb11415a..0bf14708d3 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -538,14 +538,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 80, 760*1.1 } // default steps per unit for Kossel (GT2, 20 tooth) /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 500, 500, 500, 25 } @@ -553,7 +553,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 9000, 9000, 9000, 10000 } diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index a5d7161edc..bb769b1729 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -532,14 +532,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 184.8 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 200, 200, 200, 200 } @@ -547,7 +547,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 9000, 9000, 9000, 9000 } diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index d35301732d..b8038252eb 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -551,14 +551,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { XYZ_STEPS, XYZ_STEPS, XYZ_STEPS, 158 } // default steps per unit for PowerWasp /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 200, 200, 200, 25 } @@ -566,7 +566,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 9000, 9000, 9000, 10000 } diff --git a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h index 984b225692..1e172d5f9b 100644 --- a/Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h @@ -488,14 +488,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 96 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 500, 500, 25, 25 } @@ -503,7 +503,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 800, 800, 700, 10000 } diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index dbe6e2e093..ea04d61018 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -477,14 +477,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 400, 400, 400, 163 } // default steps per unit for ***** MakiBox A6 ***** /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 60, 60, 20, 45 } @@ -492,7 +492,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 2000, 2000, 30, 10000 } diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 9ce54e88f3..ecbca415f5 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -464,7 +464,7 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 71.1, 71.1, 2560, 600 } // David TVRR @@ -475,7 +475,7 @@ /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 45 } // David TVRR @@ -483,7 +483,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 9000, 9000, 100, 10000 } diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index acf6b11556..5d221d7018 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -479,14 +479,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 71.699959, 71.699959, 71.699959, 100.470955 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_FEEDRATE { 83.333333, 83.333333, 19.5, 26.666666 } @@ -494,7 +494,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2[, E3]]] + * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ #define DEFAULT_MAX_ACCELERATION { 1200, 1200, 100, 10000 } diff --git a/Marlin/ubl.cpp b/Marlin/ubl.cpp index b1d31fe680..0f0c928e25 100644 --- a/Marlin/ubl.cpp +++ b/Marlin/ubl.cpp @@ -136,16 +136,16 @@ void unified_bed_leveling::display_map(const int map_type) { const bool map0 = map_type == 0; - const uint8_t spaces = 11; + constexpr uint8_t spaces = 11 * (GRID_MAX_POINTS_X - 2); if (map0) { SERIAL_PROTOCOLLNPGM("\nBed Topography Report:\n"); serial_echo_xy(0, GRID_MAX_POINTS_Y - 1); - SERIAL_ECHO_SP(spaces * (GRID_MAX_POINTS_X - 2) + 3); + SERIAL_ECHO_SP(spaces + 3); serial_echo_xy(GRID_MAX_POINTS_X - 1, GRID_MAX_POINTS_Y - 1); SERIAL_EOL; serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MAX_Y); - SERIAL_ECHO_SP(spaces * (GRID_MAX_POINTS_X - 2)-3); + SERIAL_ECHO_SP(spaces - 3); serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MAX_Y); SERIAL_EOL; } @@ -190,11 +190,11 @@ if (map0) { serial_echo_xy(UBL_MESH_MIN_X, UBL_MESH_MIN_Y); - SERIAL_ECHO_SP(spaces * (GRID_MAX_POINTS_X - 2) + 1); + SERIAL_ECHO_SP(spaces + 1); serial_echo_xy(UBL_MESH_MAX_X, UBL_MESH_MIN_Y); SERIAL_EOL; serial_echo_xy(0, 0); - SERIAL_ECHO_SP(spaces * (GRID_MAX_POINTS_X - 2) + 5); + SERIAL_ECHO_SP(spaces + 5); serial_echo_xy(GRID_MAX_POINTS_X - 1, 0); SERIAL_EOL; } diff --git a/Marlin/ubl_G29.cpp b/Marlin/ubl_G29.cpp index 414315b2c9..247ae27d65 100644 --- a/Marlin/ubl_G29.cpp +++ b/Marlin/ubl_G29.cpp @@ -389,8 +389,8 @@ } if (code_seen('P')) { - if (WITHIN(phase_value,0,1) && ubl.state.eeprom_storage_slot==-1) { - ubl.state.eeprom_storage_slot=0; + if (WITHIN(phase_value, 0, 1) && ubl.state.eeprom_storage_slot == -1) { + ubl.state.eeprom_storage_slot = 0; SERIAL_PROTOCOLLNPGM("Default storage slot 0 selected.\n"); } diff --git a/buildroot/share/git/mfdoc b/buildroot/share/git/mfdoc index 89bc5a9f17..3880c6dacb 100755 --- a/buildroot/share/git/mfdoc +++ b/buildroot/share/git/mfdoc @@ -37,7 +37,7 @@ opensite() { echo "Previewing MarlinDocumentation..." # wait to open the url for about 8s -( sleep 8; opensite ) & +( sleep 45; opensite ) & bundle exec jekyll serve --watch --incremental diff --git a/buildroot/share/git/mfqp b/buildroot/share/git/mfqp index 2420f48886..67a385c2ef 100755 --- a/buildroot/share/git/mfqp +++ b/buildroot/share/git/mfqp @@ -8,6 +8,10 @@ MFINFO=$(mfinfo) || exit IFS=' ' read -a INFO <<< "$MFINFO" +if [[ ${INFO[4]} == "(no" ]]; then + echo "Branch is unavailable!" ; exit 1 +fi + case "$#" in 0 ) ;; * ) echo "Usage: `basename $0`" 1>&2 ; exit 1 ;; @@ -15,5 +19,14 @@ esac git add * .travis.yml git commit -m "patch" -mfrb -git push -f + +if [[ ${INFO[3]} == ${INFO[4]} ]]; then + if [[ ${INFO[2]} == "MarlinDocumentation" ]]; then + git rebase -i HEAD~2 + else + echo "Don't alter the PR target branch."; exit 1 + fi +else + mfrb + git push -f +fi