Skip to content

Commit 52693f7

Browse files
committed
🎨 Clean up some checks & includes
1 parent 991f433 commit 52693f7

File tree

20 files changed

+65
-110
lines changed

20 files changed

+65
-110
lines changed

Marlin/src/MarlinCore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ void idle(const bool no_stepper_sleep/*=false*/) {
776776
if (marlin_state == MF_INITIALIZING) goto IDLE_DONE;
777777

778778
// TODO: Still causing errors
779-
(void)check_tool_sensor_stats(active_extruder, true);
779+
TERN_(TOOL_SENSOR, (void)check_tool_sensor_stats(active_extruder, true));
780780

781781
// Handle filament runout sensors
782782
#if HAS_FILAMENT_SENSOR

Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@
3737
#include "../../../gcode/gcode.h"
3838
#include "../../../libs/least_squares_fit.h"
3939

40-
#if HAS_MULTI_HOTEND
41-
#include "../../../module/tool_change.h"
42-
#endif
43-
4440
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
4541
#include "../../../core/debug_out.h"
4642

Marlin/src/feature/mixing.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@
4343

4444
typedef int8_t mixer_perc_t;
4545

46-
#ifndef MIXING_VIRTUAL_TOOLS
47-
#define MIXING_VIRTUAL_TOOLS 1
48-
#endif
49-
5046
enum MixTool {
5147
FIRST_USER_VIRTUAL_TOOL = 0
5248
, LAST_USER_VIRTUAL_TOOL = MIXING_VIRTUAL_TOOLS - 1

Marlin/src/feature/solenoid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "solenoid.h"
2828

2929
#include "../module/motion.h" // for active_extruder
30-
#include "../module/tool_change.h"
30+
#include "../module/tool_change.h" // for parking_extruder_set_parked
3131

3232
// Used primarily with MANUAL_SOLENOID_CONTROL
3333
static void set_solenoid(const uint8_t num, const uint8_t state) {

Marlin/src/gcode/bedlevel/G35.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929
#include "../../module/probe.h"
3030
#include "../../feature/bedlevel/bedlevel.h"
3131

32-
#if HAS_MULTI_HOTEND
33-
#include "../../module/tool_change.h"
34-
#endif
35-
3632
#if ENABLED(BLTOUCH)
3733
#include "../../feature/bltouch.h"
3834
#endif

Marlin/src/gcode/bedlevel/abl/G29.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@
5555
#include "../../../lcd/e3v2/proui/dwin.h"
5656
#endif
5757

58-
#if HAS_MULTI_HOTEND
59-
#include "../../../module/tool_change.h"
60-
#endif
61-
6258
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
6359
#include "../../../core/debug_out.h"
6460

Marlin/src/gcode/calibrate/G33.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535
#include "../../module/probe.h"
3636
#endif
3737

38-
#if HAS_MULTI_HOTEND
39-
#include "../../module/tool_change.h"
40-
#endif
41-
4238
#if HAS_LEVELING
4339
#include "../../feature/bedlevel/bedlevel.h"
4440
#endif

Marlin/src/gcode/calibrate/G34_M422.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@
3737
#include "../../feature/bedlevel/bedlevel.h"
3838
#endif
3939

40-
#if HAS_MULTI_HOTEND
41-
#include "../../module/tool_change.h"
42-
#endif
43-
4440
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
4541
#include "../../libs/least_squares_fit.h"
4642
#endif

Marlin/src/gcode/calibrate/G425.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@
3333
#include "../../lcd/marlinui.h"
3434
#include "../../module/motion.h"
3535
#include "../../module/planner.h"
36-
#include "../../module/tool_change.h"
3736
#include "../../module/endstops.h"
3837
#include "../../feature/bedlevel/bedlevel.h"
3938

39+
#if HAS_MULTI_HOTEND
40+
#include "../../module/tool_change.h"
41+
#endif
42+
4043
#if !AXIS_CAN_CALIBRATE(X)
4144
#undef CALIBRATION_MEASURE_LEFT
4245
#undef CALIBRATION_MEASURE_RIGHT

Marlin/src/gcode/config/M217.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@
2828
#include "../../module/tool_change.h"
2929

3030
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
31-
#include "../../module/motion.h"
31+
#include "../../module/motion.h" // for active_extruder
3232
#endif
3333

34-
#include "../../MarlinCore.h" // for SP_X_STR, etc.
35-
3634
/**
3735
* M217 - Set toolchange parameters
3836
*

0 commit comments

Comments
 (0)