Browse Source

Clean up formatting, wrap macros

Scott Lahteine 4 years ago
parent
commit
3bddbb1110

+ 1
- 1
Marlin/src/HAL/STM32/usb_host.cpp View File

110
 }
110
 }
111
 
111
 
112
 uint8_t BulkStorage::Write(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, const uint8_t * buf) {
112
 uint8_t BulkStorage::Write(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, const uint8_t * buf) {
113
-  return USBH_MSC_Write(&hUsbHost, lun, addr, const_cast <uint8_t*>(buf), blocks) != USBH_OK;
113
+  return USBH_MSC_Write(&hUsbHost, lun, addr, const_cast<uint8_t*>(buf), blocks) != USBH_OK;
114
 }
114
 }
115
 
115
 
116
 #endif // USE_OTG_USB_HOST && USBHOST
116
 #endif // USE_OTG_USB_HOST && USBHOST

+ 1
- 1
Marlin/src/MarlinCore.cpp View File

600
   TERN_(HOTEND_IDLE_TIMEOUT, hotend_idle.check());
600
   TERN_(HOTEND_IDLE_TIMEOUT, hotend_idle.check());
601
 
601
 
602
   #if ENABLED(EXTRUDER_RUNOUT_PREVENT)
602
   #if ENABLED(EXTRUDER_RUNOUT_PREVENT)
603
-    if (thermalManager.degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP
603
+    if (thermalManager.degHotend(active_extruder) > (EXTRUDER_RUNOUT_MINTEMP)
604
       && ELAPSED(ms, gcode.previous_move_ms + SEC_TO_MS(EXTRUDER_RUNOUT_SECONDS))
604
       && ELAPSED(ms, gcode.previous_move_ms + SEC_TO_MS(EXTRUDER_RUNOUT_SECONDS))
605
       && !planner.has_blocks_queued()
605
       && !planner.has_blocks_queued()
606
     ) {
606
     ) {

+ 1
- 1
Marlin/src/feature/hotend_idle.cpp View File

45
   bool do_prot = false;
45
   bool do_prot = false;
46
   HOTEND_LOOP() {
46
   HOTEND_LOOP() {
47
     const bool busy = (TERN0(HAS_RESUME_CONTINUE, wait_for_user) || planner.has_blocks_queued());
47
     const bool busy = (TERN0(HAS_RESUME_CONTINUE, wait_for_user) || planner.has_blocks_queued());
48
-    if (thermalManager.degHotend(e) >= HOTEND_IDLE_MIN_TRIGGER && !busy) {
48
+    if (thermalManager.degHotend(e) >= (HOTEND_IDLE_MIN_TRIGGER) && !busy) {
49
       do_prot = true; break;
49
       do_prot = true; break;
50
     }
50
     }
51
   }
51
   }

+ 1
- 7
Marlin/src/feature/leds/printer_event_leds.h View File

36
     static bool leds_off_after_print;
36
     static bool leds_off_after_print;
37
   #endif
37
   #endif
38
 
38
 
39
-  static inline void set_done() {
40
-    #if ENABLED(LED_COLOR_PRESETS)
41
-      leds.set_default();
42
-    #else
43
-      leds.set_off();
44
-    #endif
45
-  }
39
+  static inline void set_done() { TERN(LED_COLOR_PRESETS, leds.set_default(), leds.set_off()); }
46
 
40
 
47
 public:
41
 public:
48
   #if HAS_TEMP_HOTEND
42
   #if HAS_TEMP_HOTEND

+ 3
- 3
Marlin/src/feature/power.cpp View File

85
   if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0 || thermalManager.temp_bed.soft_pwm_amount > 0)) return true;
85
   if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0 || thermalManager.temp_bed.soft_pwm_amount > 0)) return true;
86
 
86
 
87
   #if HAS_HOTEND && AUTO_POWER_E_TEMP
87
   #if HAS_HOTEND && AUTO_POWER_E_TEMP
88
-    HOTEND_LOOP() if (thermalManager.degHotend(e) >= AUTO_POWER_E_TEMP) return true;
88
+    HOTEND_LOOP() if (thermalManager.degHotend(e) >= (AUTO_POWER_E_TEMP)) return true;
89
   #endif
89
   #endif
90
 
90
 
91
   #if HAS_HEATED_CHAMBER && AUTO_POWER_CHAMBER_TEMP
91
   #if HAS_HEATED_CHAMBER && AUTO_POWER_CHAMBER_TEMP
92
-    if (thermalManager.degChamber() >= AUTO_POWER_CHAMBER_TEMP) return true;
92
+    if (thermalManager.degChamber() >= (AUTO_POWER_CHAMBER_TEMP)) return true;
93
   #endif
93
   #endif
94
 
94
 
95
   #if HAS_COOLER && AUTO_POWER_COOLER_TEMP
95
   #if HAS_COOLER && AUTO_POWER_COOLER_TEMP
96
-    if (thermalManager.degCooler() >= AUTO_POWER_COOLER_TEMP) return true;
96
+    if (thermalManager.degCooler() >= (AUTO_POWER_COOLER_TEMP)) return true;
97
   #endif
97
   #endif
98
 
98
 
99
   return false;
99
   return false;

+ 1
- 1
Marlin/src/feature/probe_temp_comp.cpp View File

181
   // Linear interpolation
181
   // Linear interpolation
182
   uint8_t idx = static_cast<uint8_t>((temp - start_temp) / res_temp);
182
   uint8_t idx = static_cast<uint8_t>((temp - start_temp) / res_temp);
183
 
183
 
184
-  // offset in um
184
+  // offset in µm
185
   float offset = 0.0f;
185
   float offset = 0.0f;
186
 
186
 
187
   #if !defined(PTC_LINEAR_EXTRAPOLATION) || PTC_LINEAR_EXTRAPOLATION <= 0
187
   #if !defined(PTC_LINEAR_EXTRAPOLATION) || PTC_LINEAR_EXTRAPOLATION <= 0

+ 3
- 3
Marlin/src/feature/probe_temp_comp.h View File

81
 #endif
81
 #endif
82
 
82
 
83
 static constexpr temp_calib_t cali_info_init[TSI_COUNT] = {
83
 static constexpr temp_calib_t cali_info_init[TSI_COUNT] = {
84
-    {  PTC_SAMPLE_COUNT, PTC_SAMPLE_RES, PTC_SAMPLE_START, PTC_SAMPLE_END },       // Probe
85
-    {  BTC_SAMPLE_COUNT, BTC_SAMPLE_RES, BTC_SAMPLE_START, BTC_SAMPLE_END },       // Bed
84
+  { PTC_SAMPLE_COUNT, PTC_SAMPLE_RES, PTC_SAMPLE_START, PTC_SAMPLE_END }, // Probe
85
+  { BTC_SAMPLE_COUNT, BTC_SAMPLE_RES, BTC_SAMPLE_START, BTC_SAMPLE_END }, // Bed
86
   #if ENABLED(USE_TEMP_EXT_COMPENSATION)
86
   #if ENABLED(USE_TEMP_EXT_COMPENSATION)
87
-    {  20,  5, 180, 180 +  5 * 20 }        // Extruder
87
+    { 20,  5, 180, 180 +  5 * 20 }                                        // Extruder
88
   #endif
88
   #endif
89
 };
89
 };
90
 
90
 

+ 1
- 1
Marlin/src/gcode/calibrate/G76_M192_M871.cpp View File

208
         report_temps(next_temp_report);
208
         report_temps(next_temp_report);
209
 
209
 
210
       const float measured_z = g76_probe(TSI_BED, target_bed, noz_pos_xyz);
210
       const float measured_z = g76_probe(TSI_BED, target_bed, noz_pos_xyz);
211
-      if (isnan(measured_z) || target_bed > BED_MAX_TARGET) break;
211
+      if (isnan(measured_z) || target_bed > (BED_MAX_TARGET)) break;
212
     }
212
     }
213
 
213
 
214
     SERIAL_ECHOLNPAIR("Retrieved measurements: ", temp_comp.get_index());
214
     SERIAL_ECHOLNPAIR("Retrieved measurements: ", temp_comp.get_index());

+ 1
- 1
Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp View File

700
 
700
 
701
       if (!isPrinting()) { // Ignore request if printing
701
       if (!isPrinting()) { // Ignore request if printing
702
         char MoveCmnd[30];
702
         char MoveCmnd[30];
703
-        sprintf_P(MoveCmnd, PSTR("G91\nG0 %s \nG90"), panel_command+3);
703
+        sprintf_P(MoveCmnd, PSTR("G91\nG0%s\nG90"), panel_command + 3);
704
         #if ACDEBUG(AC_ACTION)
704
         #if ACDEBUG(AC_ACTION)
705
           SERIAL_ECHOLNPAIR("Move: ", MoveCmnd);
705
           SERIAL_ECHOLNPAIR("Move: ", MoveCmnd);
706
         #endif
706
         #endif

+ 6
- 6
Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp View File

700
             unsigned int tempvalue;
700
             unsigned int tempvalue;
701
             if (CodeSeen('S')) {
701
             if (CodeSeen('S')) {
702
               tempvalue = constrain(CodeValue(), 0, 275);
702
               tempvalue = constrain(CodeValue(), 0, 275);
703
-              setTargetTemp_celsius(tempvalue, (extruder_t) E0);
703
+              setTargetTemp_celsius(tempvalue, (extruder_t)E0);
704
             }
704
             }
705
             else if (CodeSeen('C') && !isPrinting()) {
705
             else if (CodeSeen('C') && !isPrinting()) {
706
               if (getAxisPosition_mm(Z) < 10)
706
               if (getAxisPosition_mm(Z) < 10)
707
                 injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS
707
                 injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS
708
               tempvalue = constrain(CodeValue(), 0, 275);
708
               tempvalue = constrain(CodeValue(), 0, 275);
709
-              setTargetTemp_celsius(tempvalue, (extruder_t) E0);
709
+              setTargetTemp_celsius(tempvalue, (extruder_t)E0);
710
             }
710
             }
711
           }
711
           }
712
           break;
712
           break;
832
               if (getAxisPosition_mm(Z) < 10)
832
               if (getAxisPosition_mm(Z) < 10)
833
                 injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS
833
                 injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS
834
 
834
 
835
-              setTargetTemp_celsius(PREHEAT_1_TEMP_BED, (heater_t) BED);
836
-              setTargetTemp_celsius(PREHEAT_1_TEMP_HOTEND, (extruder_t) E0);
835
+              setTargetTemp_celsius(PREHEAT_1_TEMP_BED, (heater_t)BED);
836
+              setTargetTemp_celsius(PREHEAT_1_TEMP_HOTEND, (extruder_t)E0);
837
               SENDLINE_PGM("OK");
837
               SENDLINE_PGM("OK");
838
             }
838
             }
839
             break;
839
             break;
843
               if (getAxisPosition_mm(Z) < 10)
843
               if (getAxisPosition_mm(Z) < 10)
844
                 injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS
844
                 injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS
845
 
845
 
846
-              setTargetTemp_celsius(PREHEAT_2_TEMP_BED, (heater_t) BED);
847
-              setTargetTemp_celsius(PREHEAT_2_TEMP_HOTEND, (extruder_t) E0);
846
+              setTargetTemp_celsius(PREHEAT_2_TEMP_BED, (heater_t)BED);
847
+              setTargetTemp_celsius(PREHEAT_2_TEMP_HOTEND, (extruder_t)E0);
848
               SENDLINE_PGM("OK");
848
               SENDLINE_PGM("OK");
849
             }
849
             }
850
             break;
850
             break;

+ 1
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp View File

236
 }
236
 }
237
 
237
 
238
 void disp_fan_speed() {
238
 void disp_fan_speed() {
239
-  sprintf_P(public_buf_l, PSTR("%d%%"), thermalManager.fanSpeedPercent(0));
239
+  sprintf_P(public_buf_l, PSTR("%d%%"), (int)thermalManager.fanSpeedPercent(0));
240
   lv_label_set_text(labelFan, public_buf_l);
240
   lv_label_set_text(labelFan, public_buf_l);
241
 }
241
 }
242
 
242
 

+ 1
- 5
Marlin/src/lcd/extui/malyan_lcd.cpp View File

178
         #else
178
         #else
179
           0, 0,
179
           0, 0,
180
         #endif
180
         #endif
181
-        #if ENABLED(SDSUPPORT)
182
-          done_pct,
183
-        #else
184
-          0,
185
-        #endif
181
+        TERN(SDSUPPORT, done_pct, 0),
186
         elapsed_buffer
182
         elapsed_buffer
187
       );
183
       );
188
       write_to_lcd(message_buffer);
184
       write_to_lcd(message_buffer);

+ 4
- 12
Marlin/src/lcd/extui/ui_api.cpp View File

296
   }
296
   }
297
 
297
 
298
   float getTargetFan_percent(const fan_t fan) {
298
   float getTargetFan_percent(const fan_t fan) {
299
-    #if HAS_FAN
300
-      return thermalManager.fanSpeedPercent(fan - FAN0);
301
-    #else
302
-      UNUSED(fan);
303
-      return 0;
304
-    #endif
299
+    UNUSED(fan);
300
+    return TERN0(HAS_FAN, thermalManager.fanSpeedPercent(fan - FAN0));
305
   }
301
   }
306
 
302
 
307
   float getActualFan_percent(const fan_t fan) {
303
   float getActualFan_percent(const fan_t fan) {
308
-    #if HAS_FAN
309
-      return thermalManager.scaledFanSpeedPercent(fan - FAN0);
310
-    #else
311
-      UNUSED(fan);
312
-      return 0;
313
-    #endif
304
+    UNUSED(fan);
305
+    return TERN0(HAS_FAN, thermalManager.scaledFanSpeedPercent(fan - FAN0));
314
   }
306
   }
315
 
307
 
316
   float getAxisPosition_mm(const axis_t axis) {
308
   float getAxisPosition_mm(const axis_t axis) {

+ 21
- 21
Marlin/src/lcd/extui/ui_api.h View File

102
   #if HAS_TRINAMIC_CONFIG
102
   #if HAS_TRINAMIC_CONFIG
103
     float getAxisCurrent_mA(const axis_t);
103
     float getAxisCurrent_mA(const axis_t);
104
     float getAxisCurrent_mA(const extruder_t);
104
     float getAxisCurrent_mA(const extruder_t);
105
-    void  setAxisCurrent_mA(const_float_t , const axis_t);
106
-    void  setAxisCurrent_mA(const_float_t , const extruder_t);
105
+    void  setAxisCurrent_mA(const_float_t, const axis_t);
106
+    void  setAxisCurrent_mA(const_float_t, const extruder_t);
107
 
107
 
108
      int getTMCBumpSensitivity(const axis_t);
108
      int getTMCBumpSensitivity(const axis_t);
109
-    void setTMCBumpSensitivity(const_float_t , const axis_t);
109
+    void setTMCBumpSensitivity(const_float_t, const axis_t);
110
   #endif
110
   #endif
111
 
111
 
112
   celsius_float_t getActualTemp_celsius(const heater_t);
112
   celsius_float_t getActualTemp_celsius(const heater_t);
195
     char* getFilamentUsed_str(char buffer[21]);
195
     char* getFilamentUsed_str(char buffer[21]);
196
   #endif
196
   #endif
197
 
197
 
198
-  void setTargetTemp_celsius(const_float_t , const heater_t);
199
-  void setTargetTemp_celsius(const_float_t , const extruder_t);
200
-  void setTargetFan_percent(const_float_t , const fan_t);
198
+  void setTargetTemp_celsius(const_float_t, const heater_t);
199
+  void setTargetTemp_celsius(const_float_t, const extruder_t);
200
+  void setTargetFan_percent(const_float_t, const fan_t);
201
   void coolDown();
201
   void coolDown();
202
-  void setAxisPosition_mm(const_float_t , const axis_t, const feedRate_t=0);
203
-  void setAxisPosition_mm(const_float_t , const extruder_t, const feedRate_t=0);
204
-  void setAxisSteps_per_mm(const_float_t , const axis_t);
205
-  void setAxisSteps_per_mm(const_float_t , const extruder_t);
202
+  void setAxisPosition_mm(const_float_t, const axis_t, const feedRate_t=0);
203
+  void setAxisPosition_mm(const_float_t, const extruder_t, const feedRate_t=0);
204
+  void setAxisSteps_per_mm(const_float_t, const axis_t);
205
+  void setAxisSteps_per_mm(const_float_t, const extruder_t);
206
   void setAxisMaxFeedrate_mm_s(const feedRate_t, const axis_t);
206
   void setAxisMaxFeedrate_mm_s(const feedRate_t, const axis_t);
207
   void setAxisMaxFeedrate_mm_s(const feedRate_t, const extruder_t);
207
   void setAxisMaxFeedrate_mm_s(const feedRate_t, const extruder_t);
208
-  void setAxisMaxAcceleration_mm_s2(const_float_t , const axis_t);
209
-  void setAxisMaxAcceleration_mm_s2(const_float_t , const extruder_t);
208
+  void setAxisMaxAcceleration_mm_s2(const_float_t, const axis_t);
209
+  void setAxisMaxAcceleration_mm_s2(const_float_t, const extruder_t);
210
   void setFeedrate_mm_s(const feedRate_t);
210
   void setFeedrate_mm_s(const feedRate_t);
211
   void setMinFeedrate_mm_s(const feedRate_t);
211
   void setMinFeedrate_mm_s(const feedRate_t);
212
   void setMinTravelFeedrate_mm_s(const feedRate_t);
212
   void setMinTravelFeedrate_mm_s(const feedRate_t);
220
 
220
 
221
   #if ENABLED(LIN_ADVANCE)
221
   #if ENABLED(LIN_ADVANCE)
222
     float getLinearAdvance_mm_mm_s(const extruder_t);
222
     float getLinearAdvance_mm_mm_s(const extruder_t);
223
-    void setLinearAdvance_mm_mm_s(const_float_t , const extruder_t);
223
+    void setLinearAdvance_mm_mm_s(const_float_t, const extruder_t);
224
   #endif
224
   #endif
225
 
225
 
226
   #if HAS_JUNCTION_DEVIATION
226
   #if HAS_JUNCTION_DEVIATION
229
   #else
229
   #else
230
     float getAxisMaxJerk_mm_s(const axis_t);
230
     float getAxisMaxJerk_mm_s(const axis_t);
231
     float getAxisMaxJerk_mm_s(const extruder_t);
231
     float getAxisMaxJerk_mm_s(const extruder_t);
232
-    void setAxisMaxJerk_mm_s(const_float_t , const axis_t);
233
-    void setAxisMaxJerk_mm_s(const_float_t , const extruder_t);
232
+    void setAxisMaxJerk_mm_s(const_float_t, const axis_t);
233
+    void setAxisMaxJerk_mm_s(const_float_t, const extruder_t);
234
   #endif
234
   #endif
235
 
235
 
236
   extruder_t getTool(const uint8_t extruder);
236
   extruder_t getTool(const uint8_t extruder);
246
 
246
 
247
   #if HAS_HOTEND_OFFSET
247
   #if HAS_HOTEND_OFFSET
248
     float getNozzleOffset_mm(const axis_t, const extruder_t);
248
     float getNozzleOffset_mm(const axis_t, const extruder_t);
249
-    void setNozzleOffset_mm(const_float_t , const axis_t, const extruder_t);
249
+    void setNozzleOffset_mm(const_float_t, const axis_t, const extruder_t);
250
     void normalizeNozzleOffset(const axis_t axis);
250
     void normalizeNozzleOffset(const axis_t axis);
251
   #endif
251
   #endif
252
 
252
 
255
 
255
 
256
   #if HAS_BED_PROBE
256
   #if HAS_BED_PROBE
257
     float getProbeOffset_mm(const axis_t);
257
     float getProbeOffset_mm(const axis_t);
258
-    void setProbeOffset_mm(const_float_t , const axis_t);
258
+    void setProbeOffset_mm(const_float_t, const axis_t);
259
   #endif
259
   #endif
260
 
260
 
261
   #if ENABLED(BACKLASH_GCODE)
261
   #if ENABLED(BACKLASH_GCODE)
262
     float getAxisBacklash_mm(const axis_t);
262
     float getAxisBacklash_mm(const axis_t);
263
-    void setAxisBacklash_mm(const_float_t , const axis_t);
263
+    void setAxisBacklash_mm(const_float_t, const axis_t);
264
 
264
 
265
     float getBacklashCorrection_percent();
265
     float getBacklashCorrection_percent();
266
     void setBacklashCorrection_percent(const_float_t );
266
     void setBacklashCorrection_percent(const_float_t );
297
     float getPIDValues_Kp(const extruder_t);
297
     float getPIDValues_Kp(const extruder_t);
298
     float getPIDValues_Ki(const extruder_t);
298
     float getPIDValues_Ki(const extruder_t);
299
     float getPIDValues_Kd(const extruder_t);
299
     float getPIDValues_Kd(const extruder_t);
300
-    void setPIDValues(const_float_t , const_float_t , const_float_t , extruder_t);
301
-    void startPIDTune(const_float_t , extruder_t);
300
+    void setPIDValues(const_float_t, const_float_t , const_float_t , extruder_t);
301
+    void startPIDTune(const_float_t, extruder_t);
302
   #endif
302
   #endif
303
 
303
 
304
   #if ENABLED(PIDTEMPBED)
304
   #if ENABLED(PIDTEMPBED)
305
     float getBedPIDValues_Kp();
305
     float getBedPIDValues_Kp();
306
     float getBedPIDValues_Ki();
306
     float getBedPIDValues_Ki();
307
     float getBedPIDValues_Kd();
307
     float getBedPIDValues_Kd();
308
-    void setBedPIDValues(const_float_t , const_float_t , const_float_t );
308
+    void setBedPIDValues(const_float_t, const_float_t , const_float_t );
309
     void startBedPIDTune(const_float_t );
309
     void startBedPIDTune(const_float_t );
310
   #endif
310
   #endif
311
 
311
 

+ 2
- 2
Marlin/src/module/temperature.cpp View File

567
     SHV(bias);
567
     SHV(bias);
568
 
568
 
569
     #if ENABLED(PRINTER_EVENT_LEDS)
569
     #if ENABLED(PRINTER_EVENT_LEDS)
570
-      const celsius_float_t start_temp = GHV(temp_chamber.celsius, temp_bed.celsius, temp_hotend[heater_id].celsius);
570
+      const celsius_float_t start_temp = GHV(degChamber(), degBed(), degHotend(heater_id));
571
       LEDColor color = ONHEATINGSTART();
571
       LEDColor color = ONHEATINGSTART();
572
     #endif
572
     #endif
573
 
573
 
583
         updateTemperaturesFromRawValues();
583
         updateTemperaturesFromRawValues();
584
 
584
 
585
         // Get the current temperature and constrain it
585
         // Get the current temperature and constrain it
586
-        current_temp = GHV(temp_chamber.celsius, temp_bed.celsius, temp_hotend[heater_id].celsius);
586
+        current_temp = GHV(degChamber(), degBed(), degHotend(heater_id));
587
         NOLESS(maxT, current_temp);
587
         NOLESS(maxT, current_temp);
588
         NOMORE(minT, current_temp);
588
         NOMORE(minT, current_temp);
589
 
589
 

+ 1
- 3
Marlin/src/module/tool_change.cpp View File

1054
         first_tool_is_primed = true;
1054
         first_tool_is_primed = true;
1055
         TERN_(TOOLCHANGE_FS_INIT_BEFORE_SWAP, toolchange_extruder_ready[old_tool] = true); // Primed and initialized
1055
         TERN_(TOOLCHANGE_FS_INIT_BEFORE_SWAP, toolchange_extruder_ready[old_tool] = true); // Primed and initialized
1056
       }
1056
       }
1057
-    #else
1058
-      constexpr bool first_tool_is_primed = true;
1059
     #endif
1057
     #endif
1060
 
1058
 
1061
     if (new_tool != old_tool || TERN0(PARKING_EXTRUDER, extruder_parked)) { // PARKING_EXTRUDER may need to attach old_tool when homing
1059
     if (new_tool != old_tool || TERN0(PARKING_EXTRUDER, extruder_parked)) { // PARKING_EXTRUDER may need to attach old_tool when homing
1092
           }
1090
           }
1093
           else {
1091
           else {
1094
             // For first new tool, change without unloading the old. 'Just prime/init the new'
1092
             // For first new tool, change without unloading the old. 'Just prime/init the new'
1095
-            if (first_tool_is_primed)
1093
+            if (TERN1(TOOLCHANGE_FS_PRIME_FIRST_USED, first_tool_is_primed))
1096
               unscaled_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed));
1094
               unscaled_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed));
1097
             TERN_(TOOLCHANGE_FS_PRIME_FIRST_USED, first_tool_is_primed = true); // The first new tool will be primed by toolchanging
1095
             TERN_(TOOLCHANGE_FS_PRIME_FIRST_USED, first_tool_is_primed = true); // The first new tool will be primed by toolchanging
1098
           }
1096
           }

Loading…
Cancel
Save