Browse Source

🎨 Misc. issue review patches

vanilla_fb_2.0.x
Scott Lahteine 3 years ago
committed by Scott Lahteine
parent
commit
7f4a49cc44
  1. 4
      Marlin/src/gcode/feature/pause/M600.cpp
  2. 10
      Marlin/src/gcode/feature/pause/M701_M702.cpp
  3. 2
      Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.h
  4. 6
      Marlin/src/module/temperature.cpp

4
Marlin/src/gcode/feature/pause/M600.cpp

@ -106,7 +106,7 @@ void GcodeSuite::M600() {
// Change toolhead if specified // Change toolhead if specified
const uint8_t active_extruder_before_filament_change = active_extruder; const uint8_t active_extruder_before_filament_change = active_extruder;
if (active_extruder != target_extruder && TERN1(DUAL_X_CARRIAGE, !idex_is_duplicating())) if (active_extruder != target_extruder && TERN1(DUAL_X_CARRIAGE, !idex_is_duplicating()))
tool_change(target_extruder, false); tool_change(target_extruder);
#endif #endif
// Initial retract before move to filament change position // Initial retract before move to filament change position
@ -159,7 +159,7 @@ void GcodeSuite::M600() {
#if HAS_MULTI_EXTRUDER #if HAS_MULTI_EXTRUDER
// Restore toolhead if it was changed // Restore toolhead if it was changed
if (active_extruder_before_filament_change != active_extruder) if (active_extruder_before_filament_change != active_extruder)
tool_change(active_extruder_before_filament_change, false); tool_change(active_extruder_before_filament_change);
#endif #endif
TERN_(MIXING_EXTRUDER, mixer.T(old_mixing_tool)); // Restore original mixing tool TERN_(MIXING_EXTRUDER, mixer.T(old_mixing_tool)); // Restore original mixing tool

10
Marlin/src/gcode/feature/pause/M701_M702.cpp

@ -85,7 +85,7 @@ void GcodeSuite::M701() {
// Change toolhead if specified // Change toolhead if specified
uint8_t active_extruder_before_filament_change = active_extruder; uint8_t active_extruder_before_filament_change = active_extruder;
if (active_extruder != target_extruder) if (active_extruder != target_extruder)
tool_change(target_extruder, false); tool_change(target_extruder);
#endif #endif
auto move_z_by = [](const_float_t zdist) { auto move_z_by = [](const_float_t zdist) {
@ -124,7 +124,7 @@ void GcodeSuite::M701() {
#if HAS_MULTI_EXTRUDER && (HAS_PRUSA_MMU1 || !HAS_MMU) #if HAS_MULTI_EXTRUDER && (HAS_PRUSA_MMU1 || !HAS_MMU)
// Restore toolhead if it was changed // Restore toolhead if it was changed
if (active_extruder_before_filament_change != active_extruder) if (active_extruder_before_filament_change != active_extruder)
tool_change(active_extruder_before_filament_change, false); tool_change(active_extruder_before_filament_change);
#endif #endif
TERN_(MIXING_EXTRUDER, mixer.T(old_mixing_tool)); // Restore original mixing tool TERN_(MIXING_EXTRUDER, mixer.T(old_mixing_tool)); // Restore original mixing tool
@ -188,7 +188,7 @@ void GcodeSuite::M702() {
// Change toolhead if specified // Change toolhead if specified
uint8_t active_extruder_before_filament_change = active_extruder; uint8_t active_extruder_before_filament_change = active_extruder;
if (active_extruder != target_extruder) if (active_extruder != target_extruder)
tool_change(target_extruder, false); tool_change(target_extruder);
#endif #endif
// Lift Z axis // Lift Z axis
@ -202,7 +202,7 @@ void GcodeSuite::M702() {
#if BOTH(HAS_MULTI_EXTRUDER, FILAMENT_UNLOAD_ALL_EXTRUDERS) #if BOTH(HAS_MULTI_EXTRUDER, FILAMENT_UNLOAD_ALL_EXTRUDERS)
if (!parser.seenval('T')) { if (!parser.seenval('T')) {
HOTEND_LOOP() { HOTEND_LOOP() {
if (e != active_extruder) tool_change(e, false); if (e != active_extruder) tool_change(e);
unload_filament(-fc_settings[e].unload_length, true, PAUSE_MODE_UNLOAD_FILAMENT); unload_filament(-fc_settings[e].unload_length, true, PAUSE_MODE_UNLOAD_FILAMENT);
} }
} }
@ -228,7 +228,7 @@ void GcodeSuite::M702() {
#if HAS_MULTI_EXTRUDER && (HAS_PRUSA_MMU1 || !HAS_MMU) #if HAS_MULTI_EXTRUDER && (HAS_PRUSA_MMU1 || !HAS_MMU)
// Restore toolhead if it was changed // Restore toolhead if it was changed
if (active_extruder_before_filament_change != active_extruder) if (active_extruder_before_filament_change != active_extruder)
tool_change(active_extruder_before_filament_change, false); tool_change(active_extruder_before_filament_change);
#endif #endif
TERN_(MIXING_EXTRUDER, mixer.T(old_mixing_tool)); // Restore original mixing tool TERN_(MIXING_EXTRUDER, mixer.T(old_mixing_tool)); // Restore original mixing tool

2
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.h

@ -39,7 +39,7 @@ enum AnycubicMediaPauseState {
AMPAUSESTATE_PARKING, AMPAUSESTATE_PARKING,
AMPAUSESTATE_PARKED, AMPAUSESTATE_PARKED,
AMPAUSESTATE_FILAMENT_OUT, AMPAUSESTATE_FILAMENT_OUT,
AMPAUSESTATE_FIAMENT_PRUGING, AMPAUSESTATE_FILAMENT_PURGING,
AMPAUSESTATE_HEATER_TIMEOUT, AMPAUSESTATE_HEATER_TIMEOUT,
AMPAUSESTATE_REHEATING, AMPAUSESTATE_REHEATING,
AMPAUSESTATE_REHEAT_FINISHED AMPAUSESTATE_REHEAT_FINISHED

6
Marlin/src/module/temperature.cpp

@ -592,7 +592,7 @@ volatile bool Temperature::raw_temps_ready = false;
#define ONHEATINGSTART() C_TERN(ischamber, printerEventLEDs.onChamberHeatingStart(), B_TERN(isbed, printerEventLEDs.onBedHeatingStart(), printerEventLEDs.onHotendHeatingStart())) #define ONHEATINGSTART() C_TERN(ischamber, printerEventLEDs.onChamberHeatingStart(), B_TERN(isbed, printerEventLEDs.onBedHeatingStart(), printerEventLEDs.onHotendHeatingStart()))
#define ONHEATING(S,C,T) C_TERN(ischamber, printerEventLEDs.onChamberHeating(S,C,T), B_TERN(isbed, printerEventLEDs.onBedHeating(S,C,T), printerEventLEDs.onHotendHeating(S,C,T))) #define ONHEATING(S,C,T) C_TERN(ischamber, printerEventLEDs.onChamberHeating(S,C,T), B_TERN(isbed, printerEventLEDs.onBedHeating(S,C,T), printerEventLEDs.onHotendHeating(S,C,T)))
#define WATCH_PID BOTH(WATCH_CHAMBER, PIDTEMPCHAMBER) || BOTH(WATCH_BED, PIDTEMPBED) || BOTH(WATCH_HOTENDS, PIDTEMP) #define WATCH_PID DISABLED(NO_WATCH_PID_TUNING) && (BOTH(WATCH_CHAMBER, PIDTEMPCHAMBER) || BOTH(WATCH_BED, PIDTEMPBED) || BOTH(WATCH_HOTENDS, PIDTEMP))
#if WATCH_PID #if WATCH_PID
#if BOTH(THERMAL_PROTECTION_CHAMBER, PIDTEMPCHAMBER) #if BOTH(THERMAL_PROTECTION_CHAMBER, PIDTEMPCHAMBER)
@ -688,8 +688,8 @@ volatile bool Temperature::raw_temps_ready = false;
if (cycles > 2) { if (cycles > 2) {
const float Ku = (4.0f * d) / (float(M_PI) * (maxT - minT) * 0.5f), const float Ku = (4.0f * d) / (float(M_PI) * (maxT - minT) * 0.5f),
Tu = float(t_low + t_high) * 0.001f, Tu = float(t_low + t_high) * 0.001f,
pf = ischamber ? 0.2f : (isbed ? 0.2f : 0.6f), pf = (ischamber || isbed) ? 0.2f : 0.6f,
df = ischamber ? 1.0f / 3.0f : (isbed ? 1.0f / 3.0f : 1.0f / 8.0f); df = (ischamber || isbed) ? 1.0f / 3.0f : 1.0f / 8.0f;
tune_pid.Kp = Ku * pf; tune_pid.Kp = Ku * pf;
tune_pid.Ki = tune_pid.Kp * 2.0f / Tu; tune_pid.Ki = tune_pid.Kp * 2.0f / Tu;

Loading…
Cancel
Save