|
@@ -2667,7 +2667,7 @@ void MarlinSettings::reset() {
|
2667
|
2667
|
false
|
2668
|
2668
|
#endif
|
2669
|
2669
|
;
|
2670
|
|
- for (uint8_t q = 0; q < COUNT(planner.filament_size); q++)
|
|
2670
|
+ LOOP_L_N(q, COUNT(planner.filament_size))
|
2671
|
2671
|
planner.filament_size[q] = DEFAULT_NOMINAL_FILAMENT_DIA;
|
2672
|
2672
|
|
2673
|
2673
|
#endif
|
|
@@ -2730,7 +2730,7 @@ void MarlinSettings::reset() {
|
2730
|
2730
|
//
|
2731
|
2731
|
|
2732
|
2732
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
2733
|
|
- for (uint8_t e = 0; e < EXTRUDERS; e++) {
|
|
2733
|
+ LOOP_L_N(e, EXTRUDERS) {
|
2734
|
2734
|
fc_settings[e].unload_length = FILAMENT_CHANGE_UNLOAD_LENGTH;
|
2735
|
2735
|
fc_settings[e].load_length = FILAMENT_CHANGE_FAST_LOAD_LENGTH;
|
2736
|
2736
|
}
|
|
@@ -2842,36 +2842,17 @@ void MarlinSettings::reset() {
|
2842
|
2842
|
SERIAL_ECHOLNPGM(" Disabled");
|
2843
|
2843
|
}
|
2844
|
2844
|
|
2845
|
|
- CONFIG_ECHO_START();
|
2846
|
|
- SERIAL_ECHOLNPAIR(" M200 D", LINEAR_UNIT(planner.filament_size[0]));
|
2847
|
|
- #if EXTRUDERS > 1
|
|
2845
|
+ #if EXTRUDERS == 1
|
2848
|
2846
|
CONFIG_ECHO_START();
|
2849
|
|
- SERIAL_ECHOLNPAIR(" M200 T1 D", LINEAR_UNIT(planner.filament_size[1]));
|
2850
|
|
- #if EXTRUDERS > 2
|
|
2847
|
+ SERIAL_ECHOLNPAIR(" M200 D", LINEAR_UNIT(planner.filament_size[0]));
|
|
2848
|
+ #elif EXTRUDERS
|
|
2849
|
+ LOOP_L_N(i, EXTRUDERS) {
|
2851
|
2850
|
CONFIG_ECHO_START();
|
2852
|
|
- SERIAL_ECHOLNPAIR(" M200 T2 D", LINEAR_UNIT(planner.filament_size[2]));
|
2853
|
|
- #if EXTRUDERS > 3
|
2854
|
|
- CONFIG_ECHO_START();
|
2855
|
|
- SERIAL_ECHOLNPAIR(" M200 T3 D", LINEAR_UNIT(planner.filament_size[3]));
|
2856
|
|
- #if EXTRUDERS > 4
|
2857
|
|
- CONFIG_ECHO_START();
|
2858
|
|
- SERIAL_ECHOLNPAIR(" M200 T4 D", LINEAR_UNIT(planner.filament_size[4]));
|
2859
|
|
- #if EXTRUDERS > 5
|
2860
|
|
- CONFIG_ECHO_START();
|
2861
|
|
- SERIAL_ECHOLNPAIR(" M200 T5 D", LINEAR_UNIT(planner.filament_size[5]));
|
2862
|
|
- #if EXTRUDERS > 6
|
2863
|
|
- CONFIG_ECHO_START();
|
2864
|
|
- SERIAL_ECHOLNPAIR(" M200 T6 D", LINEAR_UNIT(planner.filament_size[6]));
|
2865
|
|
- #if EXTRUDERS > 7
|
2866
|
|
- CONFIG_ECHO_START();
|
2867
|
|
- SERIAL_ECHOLNPAIR(" M200 T7 D", LINEAR_UNIT(planner.filament_size[7]));
|
2868
|
|
- #endif // EXTRUDERS > 7
|
2869
|
|
- #endif // EXTRUDERS > 6
|
2870
|
|
- #endif // EXTRUDERS > 5
|
2871
|
|
- #endif // EXTRUDERS > 4
|
2872
|
|
- #endif // EXTRUDERS > 3
|
2873
|
|
- #endif // EXTRUDERS > 2
|
2874
|
|
- #endif // EXTRUDERS > 1
|
|
2851
|
+ SERIAL_ECHOPGM(" M200");
|
|
2852
|
+ if (i) SERIAL_ECHOPAIR_P(SP_T_STR, int(i));
|
|
2853
|
+ SERIAL_ECHOLNPAIR(" D", LINEAR_UNIT(planner.filament_size[i]));
|
|
2854
|
+ }
|
|
2855
|
+ #endif
|
2875
|
2856
|
|
2876
|
2857
|
if (!parser.volumetric_enabled)
|
2877
|
2858
|
CONFIG_ECHO_MSG(" M200 D0");
|
|
@@ -2893,7 +2874,7 @@ void MarlinSettings::reset() {
|
2893
|
2874
|
);
|
2894
|
2875
|
#if ENABLED(DISTINCT_E_FACTORS)
|
2895
|
2876
|
CONFIG_ECHO_START();
|
2896
|
|
- for (uint8_t i = 0; i < E_STEPPERS; i++) {
|
|
2877
|
+ LOOP_L_N(i, E_STEPPERS) {
|
2897
|
2878
|
SERIAL_ECHOLNPAIR_P(
|
2898
|
2879
|
PSTR(" M203 T"), (int)i
|
2899
|
2880
|
, SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS_N(i)])
|
|
@@ -2913,7 +2894,7 @@ void MarlinSettings::reset() {
|
2913
|
2894
|
);
|
2914
|
2895
|
#if ENABLED(DISTINCT_E_FACTORS)
|
2915
|
2896
|
CONFIG_ECHO_START();
|
2916
|
|
- for (uint8_t i = 0; i < E_STEPPERS; i++)
|
|
2897
|
+ LOOP_L_N(i, E_STEPPERS)
|
2917
|
2898
|
SERIAL_ECHOLNPAIR_P(
|
2918
|
2899
|
PSTR(" M201 T"), (int)i
|
2919
|
2900
|
, SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(i)])
|
|
@@ -3022,8 +3003,8 @@ void MarlinSettings::reset() {
|
3022
|
3003
|
#if ENABLED(MESH_BED_LEVELING)
|
3023
|
3004
|
|
3024
|
3005
|
if (leveling_is_valid()) {
|
3025
|
|
- for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
|
3026
|
|
- for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
|
|
3006
|
+ LOOP_L_N(py, GRID_MAX_POINTS_Y) {
|
|
3007
|
+ LOOP_L_N(px, GRID_MAX_POINTS_X) {
|
3027
|
3008
|
CONFIG_ECHO_START();
|
3028
|
3009
|
SERIAL_ECHOPAIR_P(PSTR(" G29 S3 I"), (int)px, PSTR(" J"), (int)py);
|
3029
|
3010
|
SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(mbl.z_values[px][py]), 5);
|
|
@@ -3047,8 +3028,8 @@ void MarlinSettings::reset() {
|
3047
|
3028
|
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
3048
|
3029
|
|
3049
|
3030
|
if (leveling_is_valid()) {
|
3050
|
|
- for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
|
3051
|
|
- for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
|
|
3031
|
+ LOOP_L_N(py, GRID_MAX_POINTS_Y) {
|
|
3032
|
+ LOOP_L_N(px, GRID_MAX_POINTS_X) {
|
3052
|
3033
|
CONFIG_ECHO_START();
|
3053
|
3034
|
SERIAL_ECHOPAIR(" G29 W I", (int)px, " J", (int)py);
|
3054
|
3035
|
SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(z_values[px][py]), 5);
|
|
@@ -3063,7 +3044,7 @@ void MarlinSettings::reset() {
|
3063
|
3044
|
#if ENABLED(EDITABLE_SERVO_ANGLES)
|
3064
|
3045
|
|
3065
|
3046
|
CONFIG_ECHO_HEADING("Servo Angles:");
|
3066
|
|
- for (uint8_t i = 0; i < NUM_SERVOS; i++) {
|
|
3047
|
+ LOOP_L_N(i, NUM_SERVOS) {
|
3067
|
3048
|
switch (i) {
|
3068
|
3049
|
#if ENABLED(SWITCHING_EXTRUDER)
|
3069
|
3050
|
case SWITCHING_EXTRUDER_SERVO_NR:
|
|
@@ -3146,7 +3127,7 @@ void MarlinSettings::reset() {
|
3146
|
3127
|
#if HOTENDS && HAS_LCD_MENU
|
3147
|
3128
|
|
3148
|
3129
|
CONFIG_ECHO_HEADING("Material heatup parameters:");
|
3149
|
|
- for (uint8_t i = 0; i < COUNT(ui.preheat_hotend_temp); i++) {
|
|
3130
|
+ LOOP_L_N(i, COUNT(ui.preheat_hotend_temp)) {
|
3150
|
3131
|
CONFIG_ECHO_START();
|
3151
|
3132
|
SERIAL_ECHOLNPAIR(
|
3152
|
3133
|
" M145 S", (int)i
|
|
@@ -3200,7 +3181,7 @@ void MarlinSettings::reset() {
|
3200
|
3181
|
|
3201
|
3182
|
#if HAS_USER_THERMISTORS
|
3202
|
3183
|
CONFIG_ECHO_HEADING("User thermistors:");
|
3203
|
|
- for (uint8_t i = 0; i < USER_THERMISTORS; i++)
|
|
3184
|
+ LOOP_L_N(i, USER_THERMISTORS)
|
3204
|
3185
|
thermalManager.log_user_thermistor(i, true);
|
3205
|
3186
|
#endif
|
3206
|
3187
|
|
|
@@ -3596,29 +3577,10 @@ void MarlinSettings::reset() {
|
3596
|
3577
|
say_M603(forReplay);
|
3597
|
3578
|
SERIAL_ECHOLNPAIR("L", LINEAR_UNIT(fc_settings[0].load_length), " U", LINEAR_UNIT(fc_settings[0].unload_length));
|
3598
|
3579
|
#else
|
3599
|
|
- #define _ECHO_603(N) do{ say_M603(forReplay); SERIAL_ECHOLNPAIR("T" STRINGIFY(N) " L", LINEAR_UNIT(fc_settings[N].load_length), " U", LINEAR_UNIT(fc_settings[N].unload_length)); }while(0)
|
3600
|
|
- _ECHO_603(0);
|
3601
|
|
- _ECHO_603(1);
|
3602
|
|
- #if EXTRUDERS > 2
|
3603
|
|
- _ECHO_603(2);
|
3604
|
|
- #if EXTRUDERS > 3
|
3605
|
|
- _ECHO_603(3);
|
3606
|
|
- #if EXTRUDERS > 4
|
3607
|
|
- _ECHO_603(4);
|
3608
|
|
- #if EXTRUDERS > 5
|
3609
|
|
- _ECHO_603(5);
|
3610
|
|
- #if EXTRUDERS > 6
|
3611
|
|
- _ECHO_603(6);
|
3612
|
|
- #if EXTRUDERS > 7
|
3613
|
|
- _ECHO_603(7);
|
3614
|
|
- #endif // EXTRUDERS > 7
|
3615
|
|
- #endif // EXTRUDERS > 6
|
3616
|
|
- #endif // EXTRUDERS > 5
|
3617
|
|
- #endif // EXTRUDERS > 4
|
3618
|
|
- #endif // EXTRUDERS > 3
|
3619
|
|
- #endif // EXTRUDERS > 2
|
3620
|
|
- #endif // EXTRUDERS == 1
|
3621
|
|
- #endif // ADVANCED_PAUSE_FEATURE
|
|
3580
|
+ #define _ECHO_603(N) do{ say_M603(forReplay); SERIAL_ECHOLNPAIR("T" STRINGIFY(N) " L", LINEAR_UNIT(fc_settings[N].load_length), " U", LINEAR_UNIT(fc_settings[N].unload_length)); }while(0);
|
|
3581
|
+ REPEAT(EXTRUDERS, _ECHO_603)
|
|
3582
|
+ #endif
|
|
3583
|
+ #endif
|
3622
|
3584
|
|
3623
|
3585
|
#if EXTRUDERS > 1
|
3624
|
3586
|
CONFIG_ECHO_HEADING("Tool-changing:");
|