Browse Source

Apply HAS_HOTEND_OFFSET where needed

pull/1/head
Scott Lahteine 6 years ago
parent
commit
d94e077901
  1. 4
      Marlin/src/gcode/calibrate/G34_M422.cpp
  2. 4
      Marlin/src/gcode/calibrate/G425.cpp
  3. 2
      Marlin/src/gcode/gcode.cpp
  4. 2
      Marlin/src/gcode/gcode.h
  5. 2
      Marlin/src/inc/Conditionals_post.h
  6. 7
      Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp
  7. 4
      Marlin/src/lcd/extensible_ui/ui_api.cpp
  8. 2
      Marlin/src/lcd/extensible_ui/ui_api.h
  9. 38
      Marlin/src/lcd/menu/menu_advanced.cpp

4
Marlin/src/gcode/calibrate/G34_M422.cpp

@ -230,13 +230,13 @@ void GcodeSuite::G34() {
// Restore the active tool after homing
#if HOTENDS > 1
tool_change(old_tool_index, 0,
tool_change(old_tool_index, 0, (
#if ENABLED(PARKING_EXTRUDER)
false // Fetch the previous toolhead
#else
true
#endif
);
));
#endif
#if HAS_LEVELING

4
Marlin/src/gcode/calibrate/G425.cpp

@ -418,7 +418,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
SERIAL_EOL();
}
#if HOTENDS > 1
#if HAS_HOTEND_OFFSET
//
// This function requires normalize_hotend_offsets() to be called
//
@ -642,7 +642,7 @@ void GcodeSuite::G425() {
report_measured_backlash(m);
report_measured_nozzle_dimensions(m);
report_measured_positional_error(m);
#if HOTENDS > 1
#if HAS_HOTEND_OFFSET
normalize_hotend_offsets();
report_hotend_offsets();
#endif

2
Marlin/src/gcode/gcode.cpp

@ -516,7 +516,7 @@ void GcodeSuite::process_parsed_command(
case 217: M217(); break; // M217: Set filament swap parameters
#endif
#if HOTENDS > 1
#if HAS_HOTEND_OFFSET
case 218: M218(); break; // M218: Set a tool offset
#endif

2
Marlin/src/gcode/gcode.h

@ -637,7 +637,7 @@ private:
static void M217();
#endif
#if HOTENDS > 1
#if HAS_HOTEND_OFFSET
static void M218();
#endif

2
Marlin/src/inc/Conditionals_post.h

@ -431,7 +431,7 @@
/**
* Default hotend offsets, if not defined
*/
#if HOTENDS > 1
#if HAS_HOTEND_OFFSET
#ifndef HOTEND_OFFSET_X
#define HOTEND_OFFSET_X { 0 } // X offsets for each extruder
#endif

7
Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp

@ -580,12 +580,7 @@ void ST7920_Lite_Status_Screen::draw_extruder_2_temp(const int16_t temp, const i
#if HAS_HEATED_BED
void ST7920_Lite_Status_Screen::draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate) {
const bool show_target = target && FAR(temp, target);
draw_temps(1
#if HOTENDS > 1
+ 1
#endif
, temp, target, show_target, display_state.bed_show_target != show_target || forceUpdate
);
draw_temps(HOTENDS > 1 ? 2 : 1, temp, target, show_target, display_state.bed_show_target != show_target || forceUpdate);
display_state.bed_show_target = show_target;
}
#endif

4
Marlin/src/lcd/extensible_ui/ui_api.cpp

@ -530,7 +530,7 @@ namespace ExtUI {
}
#endif // HAS_BED_PROBE
#if HOTENDS > 1
#if HAS_HOTEND_OFFSET
float getNozzleOffset_mm(const axis_t axis, const extruder_t extruder) {
if (extruder - E0 >= HOTENDS) return 0;
@ -552,7 +552,7 @@ namespace ExtUI {
HOTEND_LOOP() hotend_offset[axis][e] -= offs;
}
#endif // HOTENDS > 1
#endif // HAS_HOTEND_OFFSET
#if ENABLED(BACKLASH_GCODE)
float getAxisBacklash_mm(const axis_t axis) { return backlash_distance_mm[axis]; }

2
Marlin/src/lcd/extensible_ui/ui_api.h

@ -144,7 +144,7 @@ namespace ExtUI {
void smartAdjustAxis_steps(const int16_t steps, const axis_t axis, bool linked_nozzles);
#endif
#if HOTENDS > 1
#if HAS_HOTEND_OFFSET
float getNozzleOffset_mm(const axis_t, const extruder_t);
void setNozzleOffset_mm(const float, const axis_t, const extruder_t);
void normalizeNozzleOffset(const axis_t axis);

38
Marlin/src/lcd/menu/menu_advanced.cpp

@ -300,24 +300,26 @@ void menu_tmc();
#define DEFINE_PIDTEMP_FUNCS(N) _DEFINE_PIDTEMP_BASE_FUNCS(N); //
#endif
DEFINE_PIDTEMP_FUNCS(0);
#if ENABLED(PID_PARAMS_PER_HOTEND)
#if HOTENDS > 1
DEFINE_PIDTEMP_FUNCS(1);
#if HOTENDS > 2
DEFINE_PIDTEMP_FUNCS(2);
#if HOTENDS > 3
DEFINE_PIDTEMP_FUNCS(3);
#if HOTENDS > 4
DEFINE_PIDTEMP_FUNCS(4);
#if HOTENDS > 5
DEFINE_PIDTEMP_FUNCS(5);
#endif // HOTENDS > 5
#endif // HOTENDS > 4
#endif // HOTENDS > 3
#endif // HOTENDS > 2
#endif // HOTENDS > 1
#endif // PID_PARAMS_PER_HOTEND
#if HOTENDS
DEFINE_PIDTEMP_FUNCS(0);
#if ENABLED(PID_PARAMS_PER_HOTEND)
#if HOTENDS > 1
DEFINE_PIDTEMP_FUNCS(1);
#if HOTENDS > 2
DEFINE_PIDTEMP_FUNCS(2);
#if HOTENDS > 3
DEFINE_PIDTEMP_FUNCS(3);
#if HOTENDS > 4
DEFINE_PIDTEMP_FUNCS(4);
#if HOTENDS > 5
DEFINE_PIDTEMP_FUNCS(5);
#endif // HOTENDS > 5
#endif // HOTENDS > 4
#endif // HOTENDS > 3
#endif // HOTENDS > 2
#endif // HOTENDS > 1
#endif // PID_PARAMS_PER_HOTEND
#endif // HOTENDS
#define SHOW_MENU_ADVANCED_TEMPERATURE ((ENABLED(AUTOTEMP) && HAS_TEMP_HOTEND) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(PID_EDIT_MENU))

Loading…
Cancel
Save