|
@@ -169,7 +169,7 @@ namespace ExtUI {
|
169
|
169
|
}
|
170
|
170
|
|
171
|
171
|
void enableHeater(const extruder_t extruder) {
|
172
|
|
- #if HOTENDS && HEATER_IDLE_HANDLER
|
|
172
|
+ #if HAS_HOTEND && HEATER_IDLE_HANDLER
|
173
|
173
|
thermalManager.reset_hotend_idle_timer(extruder - E0);
|
174
|
174
|
#else
|
175
|
175
|
UNUSED(extruder);
|
|
@@ -234,7 +234,7 @@ namespace ExtUI {
|
234
|
234
|
|
235
|
235
|
bool isHeaterIdle(const extruder_t extruder) {
|
236
|
236
|
return false
|
237
|
|
- #if HOTENDS && HEATER_IDLE_HANDLER
|
|
237
|
+ #if HAS_HOTEND && HEATER_IDLE_HANDLER
|
238
|
238
|
|| thermalManager.hotend_idle[extruder - E0].timed_out
|
239
|
239
|
#else
|
240
|
240
|
; UNUSED(extruder)
|
|
@@ -746,13 +746,13 @@ namespace ExtUI {
|
746
|
746
|
#endif
|
747
|
747
|
|
748
|
748
|
float getZOffset_mm() {
|
749
|
|
- #if HAS_BED_PROBE
|
750
|
|
- return probe.offset.z;
|
751
|
|
- #elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
752
|
|
- return (planner.steps_to_mm[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)]);
|
753
|
|
- #else
|
754
|
|
- return 0.0;
|
755
|
|
- #endif
|
|
749
|
+ return (0.0f
|
|
750
|
+ #if HAS_BED_PROBE
|
|
751
|
+ + probe.offset.z
|
|
752
|
+ #elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
|
753
|
+ + planner.steps_to_mm[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)]
|
|
754
|
+ #endif
|
|
755
|
+ );
|
756
|
756
|
}
|
757
|
757
|
|
758
|
758
|
void setZOffset_mm(const float value) {
|
|
@@ -857,17 +857,9 @@ namespace ExtUI {
|
857
|
857
|
float getFeedrate_percent() { return feedrate_percentage; }
|
858
|
858
|
|
859
|
859
|
#if ENABLED(PIDTEMP)
|
860
|
|
- float getPIDValues_Kp(const extruder_t tool) {
|
861
|
|
- return PID_PARAM(Kp, tool);
|
862
|
|
- }
|
863
|
|
-
|
864
|
|
- float getPIDValues_Ki(const extruder_t tool) {
|
865
|
|
- return unscalePID_i(PID_PARAM(Ki, tool));
|
866
|
|
- }
|
867
|
|
-
|
868
|
|
- float getPIDValues_Kd(const extruder_t tool) {
|
869
|
|
- return unscalePID_d(PID_PARAM(Kd, tool));
|
870
|
|
- }
|
|
860
|
+ float getPIDValues_Kp(const extruder_t tool) { return PID_PARAM(Kp, tool); }
|
|
861
|
+ float getPIDValues_Ki(const extruder_t tool) { return unscalePID_i(PID_PARAM(Ki, tool)); }
|
|
862
|
+ float getPIDValues_Kd(const extruder_t tool) { return unscalePID_d(PID_PARAM(Kd, tool)); }
|
871
|
863
|
|
872
|
864
|
void setPIDValues(const float p, const float i, const float d, extruder_t tool) {
|
873
|
865
|
thermalManager.temp_hotend[tool].pid.Kp = p;
|
|
@@ -876,23 +868,15 @@ namespace ExtUI {
|
876
|
868
|
thermalManager.updatePID();
|
877
|
869
|
}
|
878
|
870
|
|
879
|
|
- void startPIDTune(const float temp, extruder_t tool){
|
|
871
|
+ void startPIDTune(const float temp, extruder_t tool) {
|
880
|
872
|
thermalManager.PID_autotune(temp, (heater_ind_t)tool, 8, true);
|
881
|
873
|
}
|
882
|
874
|
#endif
|
883
|
875
|
|
884
|
876
|
#if ENABLED(PIDTEMPBED)
|
885
|
|
- float getBedPIDValues_Kp() {
|
886
|
|
- return thermalManager.temp_bed.pid.Kp;
|
887
|
|
- }
|
888
|
|
-
|
889
|
|
- float getBedPIDValues_Ki() {
|
890
|
|
- return unscalePID_i(thermalManager.temp_bed.pid.Ki);
|
891
|
|
- }
|
892
|
|
-
|
893
|
|
- float getBedPIDValues_Kd() {
|
894
|
|
- return unscalePID_d(thermalManager.temp_bed.pid.Kd);
|
895
|
|
- }
|
|
877
|
+ float getBedPIDValues_Kp() { return thermalManager.temp_bed.pid.Kp; }
|
|
878
|
+ float getBedPIDValues_Ki() { return unscalePID_i(thermalManager.temp_bed.pid.Ki); }
|
|
879
|
+ float getBedPIDValues_Kd() { return unscalePID_d(thermalManager.temp_bed.pid.Kd); }
|
896
|
880
|
|
897
|
881
|
void setBedPIDValues(const float p, const float i, const float d) {
|
898
|
882
|
thermalManager.temp_bed.pid.Kp = p;
|
|
@@ -906,20 +890,12 @@ namespace ExtUI {
|
906
|
890
|
}
|
907
|
891
|
#endif
|
908
|
892
|
|
909
|
|
- void injectCommands_P(PGM_P const gcode) {
|
910
|
|
- queue.inject_P(gcode);
|
911
|
|
- }
|
|
893
|
+ void injectCommands_P(PGM_P const gcode) { queue.inject_P(gcode); }
|
912
|
894
|
|
913
|
895
|
bool commandsInQueue() { return (planner.movesplanned() || queue.has_commands_queued()); }
|
914
|
896
|
|
915
|
|
- bool isAxisPositionKnown(const axis_t axis) {
|
916
|
|
- return TEST(axis_known_position, axis);
|
917
|
|
- }
|
918
|
|
-
|
919
|
|
- bool isAxisPositionKnown(const extruder_t) {
|
920
|
|
- return TEST(axis_known_position, E_AXIS);
|
921
|
|
- }
|
922
|
|
-
|
|
897
|
+ bool isAxisPositionKnown(const axis_t axis) { return TEST(axis_known_position, axis); }
|
|
898
|
+ bool isAxisPositionKnown(const extruder_t) { return TEST(axis_known_position, E_AXIS); }
|
923
|
899
|
bool isPositionKnown() { return all_axes_known(); }
|
924
|
900
|
bool isMachineHomed() { return all_axes_homed(); }
|
925
|
901
|
|
|
@@ -1008,17 +984,9 @@ namespace ExtUI {
|
1008
|
984
|
return IFSD(IS_SD_INSERTED() && card.isMounted(), false);
|
1009
|
985
|
}
|
1010
|
986
|
|
1011
|
|
- void pausePrint() {
|
1012
|
|
- ui.pause_print();
|
1013
|
|
- }
|
1014
|
|
-
|
1015
|
|
- void resumePrint() {
|
1016
|
|
- ui.resume_print();
|
1017
|
|
- }
|
1018
|
|
-
|
1019
|
|
- void stopPrint() {
|
1020
|
|
- ui.abort_print();
|
1021
|
|
- }
|
|
987
|
+ void pausePrint() { ui.pause_print(); }
|
|
988
|
+ void resumePrint() { ui.resume_print(); }
|
|
989
|
+ void stopPrint() { ui.abort_print(); }
|
1022
|
990
|
|
1023
|
991
|
void onUserConfirmRequired_P(PGM_P const pstr) {
|
1024
|
992
|
char msg[strlen_P(pstr) + 1];
|