|
@@ -5775,7 +5775,14 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
|
|
#ifdef TMC2130
|
|
#ifdef TMC2130
|
|
uint8_t tmc2130_current_r_bckp = tmc2130_current_r[E_AXIS];
|
|
uint8_t tmc2130_current_r_bckp = tmc2130_current_r[E_AXIS];
|
|
tmc2130_set_current_r(E_AXIS, TMC2130_UNLOAD_CURRENT_R);
|
|
tmc2130_set_current_r(E_AXIS, TMC2130_UNLOAD_CURRENT_R);
|
|
|
|
+#else
|
|
|
|
+
|
|
|
|
+ digipot_current(2, 200); //set lower E motor current for unload to protect filament sensor and ptfe tube
|
|
|
|
+ float tmp_motor[3] = DEFAULT_PWM_MOTOR_CURRENT;
|
|
|
|
+ float tmp_motor_loud[3] = DEFAULT_PWM_MOTOR_CURRENT_LOUD;
|
|
|
|
+
|
|
#endif //TMC2130
|
|
#endif //TMC2130
|
|
|
|
+
|
|
target[E_AXIS] -= 45;
|
|
target[E_AXIS] -= 45;
|
|
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 5200 / 60, active_extruder);
|
|
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 5200 / 60, active_extruder);
|
|
st_synchronize();
|
|
st_synchronize();
|
|
@@ -5785,9 +5792,15 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
|
|
target[E_AXIS] -= 20;
|
|
target[E_AXIS] -= 20;
|
|
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 1000 / 60, active_extruder);
|
|
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 1000 / 60, active_extruder);
|
|
st_synchronize();
|
|
st_synchronize();
|
|
|
|
+
|
|
#ifdef TMC2130
|
|
#ifdef TMC2130
|
|
tmc2130_set_current_r(E_AXIS, tmc2130_current_r_bckp);
|
|
tmc2130_set_current_r(E_AXIS, tmc2130_current_r_bckp);
|
|
|
|
+#else
|
|
|
|
+ uint8_t silentMode = eeprom_read_byte((uint8_t*)EEPROM_SILENT);
|
|
|
|
+ if(silentMode) digipot_current(2, tmp_motor[2]); //set E back to normal operation currents
|
|
|
|
+ else digipot_current(2, tmp_motor_loud[2]);
|
|
#endif //TMC2130
|
|
#endif //TMC2130
|
|
|
|
+
|
|
#endif // SNMM
|
|
#endif // SNMM
|
|
|
|
|
|
|
|
|