|
|
@ -242,18 +242,28 @@ namespace ExtUI {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float getTargetFan_percent(const fan_t fan) {
|
|
|
|
float getTargetFan_percent(const fan_t fan) {
|
|
|
|
return thermalManager.fanPercent(thermalManager.fan_speed[fan - FAN0]);
|
|
|
|
#if FAN_COUNT > 0
|
|
|
|
|
|
|
|
return thermalManager.fanPercent(thermalManager.fan_speed[fan - FAN0]);
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
UNUSED(fan);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float getActualFan_percent(const fan_t fan) {
|
|
|
|
float getActualFan_percent(const fan_t fan) {
|
|
|
|
return thermalManager.fanPercent(thermalManager.scaledFanSpeed(fan - FAN0));
|
|
|
|
#if FAN_COUNT > 0
|
|
|
|
|
|
|
|
return thermalManager.fanPercent(thermalManager.scaledFanSpeed(fan - FAN0));
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
UNUSED(fan);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float getAxisPosition_mm(const axis_t axis) {
|
|
|
|
float getAxisPosition_mm(const axis_t axis) {
|
|
|
|
return flags.manual_motion ? destination[axis] : current_position[axis];
|
|
|
|
return flags.manual_motion ? destination[axis] : current_position[axis];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float getAxisPosition_mm(const extruder_t extruder) {
|
|
|
|
float getAxisPosition_mm(const extruder_t) {
|
|
|
|
return flags.manual_motion ? destination[E_AXIS] : current_position[E_AXIS];
|
|
|
|
return flags.manual_motion ? destination[E_AXIS] : current_position[E_AXIS];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -353,6 +363,9 @@ namespace ExtUI {
|
|
|
|
if (e != active_extruder) tool_change(e, no_move);
|
|
|
|
if (e != active_extruder) tool_change(e, no_move);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
active_extruder = e;
|
|
|
|
active_extruder = e;
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
UNUSED(extruder);
|
|
|
|
|
|
|
|
UNUSED(no_move);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -506,6 +519,7 @@ namespace ExtUI {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float getAxisSteps_per_mm(const extruder_t extruder) {
|
|
|
|
float getAxisSteps_per_mm(const extruder_t extruder) {
|
|
|
|
|
|
|
|
UNUSED_E(extruder);
|
|
|
|
return planner.settings.axis_steps_per_mm[E_AXIS_N(extruder - E0)];
|
|
|
|
return planner.settings.axis_steps_per_mm[E_AXIS_N(extruder - E0)];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -514,6 +528,7 @@ namespace ExtUI {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void setAxisSteps_per_mm(const float value, const extruder_t extruder) {
|
|
|
|
void setAxisSteps_per_mm(const float value, const extruder_t extruder) {
|
|
|
|
|
|
|
|
UNUSED_E(extruder);
|
|
|
|
planner.settings.axis_steps_per_mm[E_AXIS_N(axis - E0)] = value;
|
|
|
|
planner.settings.axis_steps_per_mm[E_AXIS_N(axis - E0)] = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -522,6 +537,7 @@ namespace ExtUI {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float getAxisMaxFeedrate_mm_s(const extruder_t extruder) {
|
|
|
|
float getAxisMaxFeedrate_mm_s(const extruder_t extruder) {
|
|
|
|
|
|
|
|
UNUSED_E(extruder);
|
|
|
|
return planner.settings.max_feedrate_mm_s[E_AXIS_N(axis - E0)];
|
|
|
|
return planner.settings.max_feedrate_mm_s[E_AXIS_N(axis - E0)];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -530,6 +546,7 @@ namespace ExtUI {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void setAxisMaxFeedrate_mm_s(const float value, const extruder_t extruder) {
|
|
|
|
void setAxisMaxFeedrate_mm_s(const float value, const extruder_t extruder) {
|
|
|
|
|
|
|
|
UNUSED_E(extruder);
|
|
|
|
planner.settings.max_feedrate_mm_s[E_AXIS_N(axis - E0)] = value;
|
|
|
|
planner.settings.max_feedrate_mm_s[E_AXIS_N(axis - E0)] = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -538,6 +555,7 @@ namespace ExtUI {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float getAxisMaxAcceleration_mm_s2(const extruder_t extruder) {
|
|
|
|
float getAxisMaxAcceleration_mm_s2(const extruder_t extruder) {
|
|
|
|
|
|
|
|
UNUSED_E(extruder);
|
|
|
|
return planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(extruder - E0)];
|
|
|
|
return planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(extruder - E0)];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -546,6 +564,7 @@ namespace ExtUI {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void setAxisMaxAcceleration_mm_s2(const float value, const extruder_t extruder) {
|
|
|
|
void setAxisMaxAcceleration_mm_s2(const float value, const extruder_t extruder) {
|
|
|
|
|
|
|
|
UNUSED_E(extruder);
|
|
|
|
planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(extruder - E0)] = value;
|
|
|
|
planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(extruder - E0)] = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -589,7 +608,7 @@ namespace ExtUI {
|
|
|
|
return planner.max_jerk[axis];
|
|
|
|
return planner.max_jerk[axis];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float getAxisMaxJerk_mm_s(const extruder_t extruder) {
|
|
|
|
float getAxisMaxJerk_mm_s(const extruder_t) {
|
|
|
|
return planner.max_jerk[E_AXIS];
|
|
|
|
return planner.max_jerk[E_AXIS];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -597,7 +616,7 @@ namespace ExtUI {
|
|
|
|
planner.max_jerk[axis] = value;
|
|
|
|
planner.max_jerk[axis] = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void setAxisMaxJerk_mm_s(const float value, const extruder_t extruder) {
|
|
|
|
void setAxisMaxJerk_mm_s(const float value, const extruder_t) {
|
|
|
|
planner.max_jerk[E_AXIS] = value;
|
|
|
|
planner.max_jerk[E_AXIS] = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -780,12 +799,16 @@ namespace ExtUI {
|
|
|
|
queue.inject_P(gcode);
|
|
|
|
queue.inject_P(gcode);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool commandsInQueue() { return (planner.movesplanned() || queue.length); }
|
|
|
|
bool commandsInQueue() { return (planner.movesplanned() || queue.has_commands_queued()); }
|
|
|
|
|
|
|
|
|
|
|
|
bool isAxisPositionKnown(const axis_t axis) {
|
|
|
|
bool isAxisPositionKnown(const axis_t axis) {
|
|
|
|
return TEST(axis_known_position, axis);
|
|
|
|
return TEST(axis_known_position, axis);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isAxisPositionKnown(const extruder_t) {
|
|
|
|
|
|
|
|
return TEST(axis_known_position, E_AXIS);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool isPositionKnown() { return all_axes_known(); }
|
|
|
|
bool isPositionKnown() { return all_axes_known(); }
|
|
|
|
bool isMachineHomed() { return all_axes_homed(); }
|
|
|
|
bool isMachineHomed() { return all_axes_homed(); }
|
|
|
|
|
|
|
|
|
|
|
@ -814,8 +837,13 @@ namespace ExtUI {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void setTargetFan_percent(const float value, const fan_t fan) {
|
|
|
|
void setTargetFan_percent(const float value, const fan_t fan) {
|
|
|
|
if (fan < FAN_COUNT)
|
|
|
|
#if FAN_COUNT > 0
|
|
|
|
thermalManager.set_fan_speed(fan - FAN0, map(clamp(value, 0, 100), 0, 100, 0, 255));
|
|
|
|
if (fan < FAN_COUNT)
|
|
|
|
|
|
|
|
thermalManager.set_fan_speed(fan - FAN0, map(clamp(value, 0, 100), 0, 100, 0, 255));
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
UNUSED(value);
|
|
|
|
|
|
|
|
UNUSED(fan);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void setFeedrate_percent(const float value) {
|
|
|
|
void setFeedrate_percent(const float value) {
|
|
|
|