General cleanup
This commit is contained in:
parent
e78f19bc87
commit
55e519a06f
|
@ -139,9 +139,7 @@ void lcd_move_z() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Z), Z_AXIS); }
|
||||||
ui.encoderPosition = 0;
|
ui.encoderPosition = 0;
|
||||||
}
|
}
|
||||||
if (ui.should_draw()) {
|
if (ui.should_draw()) {
|
||||||
#if MULTI_MANUAL
|
TERN_(MULTI_MANUAL, MenuItemBase::init(eindex));
|
||||||
MenuItemBase::init(eindex);
|
|
||||||
#endif
|
|
||||||
MenuEditItemBase::draw_edit_screen(
|
MenuEditItemBase::draw_edit_screen(
|
||||||
GET_TEXT(TERN(MULTI_MANUAL, MSG_MOVE_EN, MSG_MOVE_E)),
|
GET_TEXT(TERN(MULTI_MANUAL, MSG_MOVE_EN, MSG_MOVE_E)),
|
||||||
ftostr41sign(current_position.e
|
ftostr41sign(current_position.e
|
||||||
|
|
|
@ -180,10 +180,7 @@ bool Stepper::abort_current_block;
|
||||||
uint32_t Stepper::acceleration_time, Stepper::deceleration_time;
|
uint32_t Stepper::acceleration_time, Stepper::deceleration_time;
|
||||||
uint8_t Stepper::steps_per_isr;
|
uint8_t Stepper::steps_per_isr;
|
||||||
|
|
||||||
#if DISABLED(ADAPTIVE_STEP_SMOOTHING)
|
TERN(ADAPTIVE_STEP_SMOOTHING,,constexpr) uint8_t Stepper::oversampling_factor;
|
||||||
constexpr
|
|
||||||
#endif
|
|
||||||
uint8_t Stepper::oversampling_factor;
|
|
||||||
|
|
||||||
xyze_long_t Stepper::delta_error{0};
|
xyze_long_t Stepper::delta_error{0};
|
||||||
|
|
||||||
|
@ -2099,9 +2096,8 @@ uint32_t Stepper::block_phase_isr() {
|
||||||
// No acceleration / deceleration time elapsed so far
|
// No acceleration / deceleration time elapsed so far
|
||||||
acceleration_time = deceleration_time = 0;
|
acceleration_time = deceleration_time = 0;
|
||||||
|
|
||||||
uint8_t oversampling = 0; // Assume no axis smoothing (via oversampling)
|
|
||||||
|
|
||||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING)
|
#if ENABLED(ADAPTIVE_STEP_SMOOTHING)
|
||||||
|
uint8_t oversampling = 0; // Assume no axis smoothing (via oversampling)
|
||||||
// Decide if axis smoothing is possible
|
// Decide if axis smoothing is possible
|
||||||
uint32_t max_rate = current_block->nominal_rate; // Get the maximum rate (maximum event speed)
|
uint32_t max_rate = current_block->nominal_rate; // Get the maximum rate (maximum event speed)
|
||||||
while (max_rate < MIN_STEP_ISR_FREQUENCY) { // As long as more ISRs are possible...
|
while (max_rate < MIN_STEP_ISR_FREQUENCY) { // As long as more ISRs are possible...
|
||||||
|
@ -2110,6 +2106,8 @@ uint32_t Stepper::block_phase_isr() {
|
||||||
++oversampling; // Increase the oversampling (used for left-shift)
|
++oversampling; // Increase the oversampling (used for left-shift)
|
||||||
}
|
}
|
||||||
oversampling_factor = oversampling; // For all timer interval calculations
|
oversampling_factor = oversampling; // For all timer interval calculations
|
||||||
|
#else
|
||||||
|
constexpr uint8_t oversampling = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Based on the oversampling factor, do the calculations
|
// Based on the oversampling factor, do the calculations
|
||||||
|
|
|
@ -191,7 +191,6 @@
|
||||||
#error "Expected at least one of MINIMUM_STEPPER_PULSE or MAXIMUM_STEPPER_RATE to be defined"
|
#error "Expected at least one of MINIMUM_STEPPER_PULSE or MAXIMUM_STEPPER_RATE to be defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// But the user could be enforcing a minimum time, so the loop time is
|
// But the user could be enforcing a minimum time, so the loop time is
|
||||||
#define ISR_LOOP_CYCLES (ISR_LOOP_BASE_CYCLES + _MAX(MIN_STEPPER_PULSE_CYCLES, MIN_ISR_LOOP_CYCLES))
|
#define ISR_LOOP_CYCLES (ISR_LOOP_BASE_CYCLES + _MAX(MIN_STEPPER_PULSE_CYCLES, MIN_ISR_LOOP_CYCLES))
|
||||||
|
|
||||||
|
@ -558,7 +557,7 @@ class Stepper {
|
||||||
// In case of high-performance processor, it is able to calculate in real-time
|
// In case of high-performance processor, it is able to calculate in real-time
|
||||||
timer = uint32_t(STEPPER_TIMER_RATE) / step_rate;
|
timer = uint32_t(STEPPER_TIMER_RATE) / step_rate;
|
||||||
#else
|
#else
|
||||||
constexpr uint32_t min_step_rate = F_CPU / 500000U;
|
constexpr uint32_t min_step_rate = (F_CPU) / 500000U;
|
||||||
NOLESS(step_rate, min_step_rate);
|
NOLESS(step_rate, min_step_rate);
|
||||||
step_rate -= min_step_rate; // Correct for minimal speed
|
step_rate -= min_step_rate; // Correct for minimal speed
|
||||||
if (step_rate >= (8 * 256)) { // higher step rate
|
if (step_rate >= (8 * 256)) { // higher step rate
|
||||||
|
|
|
@ -907,7 +907,10 @@ void Temperature::min_temp_error(const heater_ind_t heater) {
|
||||||
SERIAL_ECHOPAIR(STR_PID_DEBUG, ee, STR_PID_DEBUG_INPUT, temp_hotend[ee].celsius, STR_PID_DEBUG_OUTPUT, pid_output);
|
SERIAL_ECHOPAIR(STR_PID_DEBUG, ee, STR_PID_DEBUG_INPUT, temp_hotend[ee].celsius, STR_PID_DEBUG_OUTPUT, pid_output);
|
||||||
#if DISABLED(PID_OPENLOOP)
|
#if DISABLED(PID_OPENLOOP)
|
||||||
{
|
{
|
||||||
SERIAL_ECHOPAIR( STR_PID_DEBUG_PTERM, work_pid[ee].Kp, STR_PID_DEBUG_ITERM, work_pid[ee].Ki, STR_PID_DEBUG_DTERM, work_pid[ee].Kd
|
SERIAL_ECHOPAIR(
|
||||||
|
STR_PID_DEBUG_PTERM, work_pid[ee].Kp,
|
||||||
|
STR_PID_DEBUG_ITERM, work_pid[ee].Ki,
|
||||||
|
STR_PID_DEBUG_DTERM, work_pid[ee].Kd
|
||||||
#if ENABLED(PID_EXTRUSION_SCALING)
|
#if ENABLED(PID_EXTRUSION_SCALING)
|
||||||
, STR_PID_DEBUG_CTERM, work_pid[ee].Kc
|
, STR_PID_DEBUG_CTERM, work_pid[ee].Kc
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue