MCPcopy Create free account
hub / github.com/MarlinFirmware/Marlin / wait_for_user_response

Function wait_for_user_response

Marlin/src/MarlinCore.cpp:291–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289 bool wait_for_user; // = false
290
291 void wait_for_user_response(millis_t ms/*=0*/, const bool no_sleep/*=false*/) {
292 UNUSED(no_sleep);
293 KEEPALIVE_STATE(PAUSED_FOR_USER);
294 wait_for_user = true;
295 if (ms) ms += millis(); // expire time
296 while (wait_for_user && !(ms && ELAPSED(millis(), ms)))
297 idle(TERN_(ADVANCED_PAUSE_FEATURE, no_sleep));
298 wait_for_user = false;
299 while (ui.button_pressed()) safe_delay(50);
300 }
301
302#endif
303

Callers 7

run_deploy_movesFunction · 0.85
probe_specific_actionFunction · 0.85
M1001Method · 0.85
M0_M1Method · 0.85
lcd_probe_ptFunction · 0.85
wait_for_confirmationFunction · 0.85
eject_filamentMethod · 0.85

Calls 4

idleFunction · 0.85
safe_delayFunction · 0.85
button_pressedMethod · 0.80
millisFunction · 0.50

Tested by

no test coverage detected