|
@@ -53,30 +53,39 @@ static char sd_filename[MAXPATHNAMELENGTH];
|
53
|
53
|
SERIAL_PROTOCOLLNPAIR(" valid_foot:", (int)job_recovery_info.valid_foot);
|
54
|
54
|
if (job_recovery_info.valid_head) {
|
55
|
55
|
if (job_recovery_info.valid_head == job_recovery_info.valid_foot) {
|
56
|
|
- SERIAL_PROTOCOLPGM("current_position");
|
57
|
|
- LOOP_XYZE(i) SERIAL_PROTOCOLPAIR(": ", job_recovery_info.current_position[i]);
|
|
56
|
+ SERIAL_PROTOCOLPGM("current_position: ");
|
|
57
|
+ LOOP_XYZE(i) {
|
|
58
|
+ SERIAL_PROTOCOL(job_recovery_info.current_position[i]);
|
|
59
|
+ if (i < E_AXIS) SERIAL_CHAR(',');
|
|
60
|
+ }
|
58
|
61
|
SERIAL_EOL();
|
59
|
62
|
SERIAL_PROTOCOLLNPAIR("feedrate: ", job_recovery_info.feedrate);
|
60
|
|
- SERIAL_PROTOCOLPGM("target_temperature");
|
61
|
|
- HOTEND_LOOP() SERIAL_PROTOCOLPAIR(": ", job_recovery_info.target_temperature[e]);
|
|
63
|
+ SERIAL_PROTOCOLPGM("target_temperature: ");
|
|
64
|
+ HOTEND_LOOP() {
|
|
65
|
+ SERIAL_PROTOCOL(job_recovery_info.target_temperature[e]);
|
|
66
|
+ if (e < HOTENDS - 1) SERIAL_CHAR(',');
|
|
67
|
+ }
|
62
|
68
|
SERIAL_EOL();
|
63
|
|
- SERIAL_PROTOCOLPGM("fanSpeeds");
|
64
|
|
- for(uint8_t i = 0; i < FAN_COUNT; i++) SERIAL_PROTOCOLPAIR(": ", job_recovery_info.fanSpeeds[i]);
|
|
69
|
+ SERIAL_PROTOCOLPGM("fanSpeeds: ");
|
|
70
|
+ for (uint8_t i = 0; i < FAN_COUNT; i++) {
|
|
71
|
+ SERIAL_PROTOCOL(job_recovery_info.fanSpeeds[i]);
|
|
72
|
+ if (i < FAN_COUNT - 1) SERIAL_CHAR(',');
|
|
73
|
+ }
|
65
|
74
|
SERIAL_EOL();
|
|
75
|
+ #if HAS_HEATED_BED
|
|
76
|
+ SERIAL_PROTOCOLLNPAIR("target_temperature_bed: ", job_recovery_info.target_temperature_bed);
|
|
77
|
+ #endif
|
66
|
78
|
#if HAS_LEVELING
|
67
|
79
|
SERIAL_PROTOCOLPAIR("leveling: ", int(job_recovery_info.leveling));
|
68
|
80
|
SERIAL_PROTOCOLLNPAIR(" fade: ", int(job_recovery_info.fade));
|
69
|
81
|
#endif
|
70
|
|
- #if HAS_HEATED_BED
|
71
|
|
- SERIAL_PROTOCOLLNPAIR("target_temperature_bed: ", job_recovery_info.target_temperature_bed);
|
72
|
|
- #endif
|
73
|
82
|
SERIAL_PROTOCOLLNPAIR("cmd_queue_index_r: ", job_recovery_info.cmd_queue_index_r);
|
74
|
83
|
SERIAL_PROTOCOLLNPAIR("commands_in_queue: ", job_recovery_info.commands_in_queue);
|
75
|
84
|
if (recovery)
|
76
|
85
|
for (uint8_t i = 0; i < job_recovery_commands_count; i++) SERIAL_PROTOCOLLNPAIR("> ", job_recovery_commands[i]);
|
77
|
86
|
else
|
78
|
87
|
for (uint8_t i = 0; i < job_recovery_info.commands_in_queue; i++) SERIAL_PROTOCOLLNPAIR("> ", job_recovery_info.command_queue[i]);
|
79
|
|
- SERIAL_PROTOCOLLNPAIR("sd_filename: ", sd_filename);
|
|
88
|
+ SERIAL_PROTOCOLLNPAIR("sd_filename: ", job_recovery_info.sd_filename);
|
80
|
89
|
SERIAL_PROTOCOLLNPAIR("sdpos: ", job_recovery_info.sdpos);
|
81
|
90
|
SERIAL_PROTOCOLLNPAIR("print_job_elapsed: ", job_recovery_info.print_job_elapsed);
|
82
|
91
|
}
|
|
@@ -125,13 +134,15 @@ void do_print_job_recovery() {
|
125
|
134
|
#endif
|
126
|
135
|
));
|
127
|
136
|
|
|
137
|
+ char str_1[16], str_2[16];
|
|
138
|
+
|
128
|
139
|
#if HAS_LEVELING
|
129
|
140
|
// Restore leveling state before G92 sets Z
|
130
|
141
|
// This ensures the steppers correspond to the native Z
|
131
|
|
- sprintf_P(job_recovery_commands[ind++], PSTR("M420 S%i Z%s"), int(job_recovery_info.leveling), job_recovery_info.fade);
|
|
142
|
+ dtostrf(job_recovery_info.fade, 1, 1, str_1);
|
|
143
|
+ sprintf_P(job_recovery_commands[ind++], PSTR("M420 S%i Z%s"), int(job_recovery_info.leveling), str_1);
|
132
|
144
|
#endif
|
133
|
145
|
|
134
|
|
- char str_1[16], str_2[16];
|
135
|
146
|
dtostrf(job_recovery_info.current_position[Z_AXIS] + 2, 1, 3, str_1);
|
136
|
147
|
dtostrf(job_recovery_info.current_position[E_AXIS]
|
137
|
148
|
#if ENABLED(SAVE_EACH_CMD_MODE)
|
|
@@ -156,7 +167,7 @@ void do_print_job_recovery() {
|
156
|
167
|
debug_print_job_recovery(true);
|
157
|
168
|
#endif
|
158
|
169
|
|
159
|
|
- card.openFile(sd_filename, true);
|
|
170
|
+ card.openFile(job_recovery_info.sd_filename, true);
|
160
|
171
|
card.setIndex(job_recovery_info.sdpos);
|
161
|
172
|
}
|
162
|
173
|
else {
|
|
@@ -223,7 +234,7 @@ void save_job_recovery_info() {
|
223
|
234
|
job_recovery_info.print_job_elapsed = print_job_timer.duration() * 1000UL;
|
224
|
235
|
|
225
|
236
|
// SD file position
|
226
|
|
- card.getAbsFilename(sd_filename);
|
|
237
|
+ card.getAbsFilename(job_recovery_info.sd_filename);
|
227
|
238
|
job_recovery_info.sdpos = card.getIndex();
|
228
|
239
|
|
229
|
240
|
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|