Browse Source

Merge branch '2.0.x' into vanilla_fb_2.0.x

vanilla_fb_2.0.x
Sergey 3 years ago
parent
commit
ecb08b15be
  1. 17
      Marlin/src/gcode/calibrate/G28.cpp
  2. 2
      Marlin/src/gcode/queue.cpp
  3. 5
      Marlin/src/module/motion.cpp
  4. 2
      Marlin/src/module/temperature.cpp

17
Marlin/src/gcode/calibrate/G28.cpp

@ -264,7 +264,7 @@ void GcodeSuite::G28() {
reset_stepper_timeout();
#define HAS_CURRENT_HOME(N) (defined(N##_CURRENT_HOME) && N##_CURRENT_HOME != N##_CURRENT)
#if HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(X2) || HAS_CURRENT_HOME(Y) || HAS_CURRENT_HOME(Y2) || (ENABLED(DELTA) && HAS_CURRENT_HOME(Z))
#if HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(X2) || HAS_CURRENT_HOME(Y) || HAS_CURRENT_HOME(Y2) || HAS_CURRENT_HOME(I) || HAS_CURRENT_HOME(J) || HAS_CURRENT_HOME(K) || (ENABLED(DELTA) && HAS_CURRENT_HOME(Z))
#define HAS_HOMING_CURRENT 1
#endif
@ -292,6 +292,21 @@ void GcodeSuite::G28() {
stepperY2.rms_current(Y2_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(PSTR("Y2"), tmc_save_current_Y2, Y2_CURRENT_HOME);
#endif
#if HAS_CURRENT_HOME(I)
const int16_t tmc_save_current_I = stepperI.getMilliamps();
stepperI.rms_current(I_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(F(AXIS4_STR), tmc_save_current_I, I_CURRENT_HOME);
#endif
#if HAS_CURRENT_HOME(J)
const int16_t tmc_save_current_J = stepperJ.getMilliamps();
stepperJ.rms_current(J_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(F(AXIS5_STR), tmc_save_current_J, J_CURRENT_HOME);
#endif
#if HAS_CURRENT_HOME(K)
const int16_t tmc_save_current_K = stepperK.getMilliamps();
stepperK.rms_current(K_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(F(AXIS6_STR), tmc_save_current_K, K_CURRENT_HOME);
#endif
#if HAS_CURRENT_HOME(Z) && ENABLED(DELTA)
const int16_t tmc_save_current_Z = stepperZ.getMilliamps();
stepperZ.rms_current(Z_CURRENT_HOME);

2
Marlin/src/gcode/queue.cpp

@ -281,7 +281,7 @@ void GCodeQueue::flush_and_request_resend(const serial_index_t serial_ind) {
static bool serial_data_available(serial_index_t index) {
const int a = SERIAL_IMPL.available(index);
#if BOTH(RX_BUFFER_MONITOR, RX_BUFFER_SIZE)
#if ENABLED(RX_BUFFER_MONITOR) && RX_BUFFER_SIZE
if (a > RX_BUFFER_SIZE - 2) {
PORT_REDIRECT(SERIAL_PORTMASK(index));
SERIAL_ERROR_MSG("RX BUF overflow, increase RX_BUFFER_SIZE: ", a);

5
Marlin/src/module/motion.cpp

@ -1194,6 +1194,7 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) {
case DXC_DUPLICATION_MODE:
if (active_extruder == 0) {
// Restore planner to parked head (T1) X position
float x0_pos = current_position.x;
xyze_pos_t pos_now = current_position;
pos_now.x = inactive_extruder_x;
planner.set_position_mm(pos_now);
@ -1201,7 +1202,9 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) {
// Keep the same X or add the duplication X offset
xyze_pos_t new_pos = pos_now;
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE)
new_pos.x += duplicate_extruder_x_offset;
new_pos.x = x0_pos + duplicate_extruder_x_offset;
else
new_pos.x = _MIN(X_BED_SIZE - x0_pos, X_MAX_POS);
// Move duplicate extruder into the correct position
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Set planner X", inactive_extruder_x, " ... Line to X", new_pos.x);

2
Marlin/src/module/temperature.cpp

@ -953,8 +953,8 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) {
inline void loud_kill(PGM_P const lcd_msg, const heater_id_t heater_id) {
marlin_state = MF_KILLED;
#if USE_BEEPER
thermalManager.disable_all_heaters();
#if USE_BEEPER
for (uint8_t i = 20; i--;) {
WRITE(BEEPER_PIN, HIGH);
delay(25);

Loading…
Cancel
Save