|
@@ -143,24 +143,16 @@ void host_action(PGM_P const pstr, const bool eol) {
|
143
|
143
|
// - Dismissal of info
|
144
|
144
|
//
|
145
|
145
|
void host_response_handler(const uint8_t response) {
|
146
|
|
- #ifdef DEBUG_HOST_ACTIONS
|
147
|
|
- static PGMSTR(m876_prefix, "M876 Handle Re");
|
148
|
|
- serialprintPGM(m876_prefix); SERIAL_ECHOLNPAIR("ason: ", host_prompt_reason);
|
149
|
|
- serialprintPGM(m876_prefix); SERIAL_ECHOLNPAIR("sponse: ", response);
|
150
|
|
- #endif
|
151
|
|
- PGM_P msg = PSTR("UNKNOWN STATE");
|
152
|
146
|
const PromptReason hpr = host_prompt_reason;
|
153
|
147
|
host_prompt_reason = PROMPT_NOT_DEFINED; // Reset now ahead of logic
|
154
|
148
|
switch (hpr) {
|
155
|
149
|
case PROMPT_FILAMENT_RUNOUT:
|
156
|
|
- msg = PSTR("FILAMENT_RUNOUT");
|
157
|
150
|
switch (response) {
|
158
|
151
|
|
159
|
152
|
case 0: // "Purge More" button
|
160
|
153
|
#if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE)
|
161
|
154
|
pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; // Simulate menu selection (menu exits, doesn't extrude more)
|
162
|
155
|
#endif
|
163
|
|
- filament_load_host_prompt(); // Initiate another host prompt. (NOTE: The loop in load_filament may also do this!)
|
164
|
156
|
break;
|
165
|
157
|
|
166
|
158
|
case 1: // "Continue" / "Disable Runout" button
|
|
@@ -178,23 +170,17 @@ void host_action(PGM_P const pstr, const bool eol) {
|
178
|
170
|
break;
|
179
|
171
|
case PROMPT_USER_CONTINUE:
|
180
|
172
|
TERN_(HAS_RESUME_CONTINUE, wait_for_user = false);
|
181
|
|
- msg = PSTR("FILAMENT_RUNOUT_CONTINUE");
|
182
|
173
|
break;
|
183
|
174
|
case PROMPT_PAUSE_RESUME:
|
184
|
|
- msg = PSTR("LCD_PAUSE_RESUME");
|
185
|
175
|
#if BOTH(ADVANCED_PAUSE_FEATURE, SDSUPPORT)
|
186
|
176
|
extern const char M24_STR[];
|
187
|
177
|
queue.inject_P(M24_STR);
|
188
|
178
|
#endif
|
189
|
179
|
break;
|
190
|
180
|
case PROMPT_INFO:
|
191
|
|
- msg = PSTR("GCODE_INFO");
|
192
|
181
|
break;
|
193
|
182
|
default: break;
|
194
|
183
|
}
|
195
|
|
- SERIAL_ECHOPGM("M876 Responding PROMPT_");
|
196
|
|
- serialprintPGM(msg);
|
197
|
|
- SERIAL_EOL();
|
198
|
184
|
}
|
199
|
185
|
|
200
|
186
|
#endif // HOST_PROMPT_SUPPORT
|