Fix blocking delay in Photo G-code M240 (#15728)
This commit is contained in:
parent
c6f694a247
commit
7c60853219
|
@ -148,7 +148,7 @@ void GcodeSuite::M240() {
|
||||||
#if PIN_EXISTS(CHDK)
|
#if PIN_EXISTS(CHDK)
|
||||||
|
|
||||||
OUT_WRITE(CHDK_PIN, HIGH);
|
OUT_WRITE(CHDK_PIN, HIGH);
|
||||||
chdk_timeout = millis() + PHOTO_SWITCH_MS;
|
chdk_timeout = millis() + parser.intval('D', PHOTO_SWITCH_MS);
|
||||||
|
|
||||||
#elif HAS_PHOTOGRAPH
|
#elif HAS_PHOTOGRAPH
|
||||||
|
|
||||||
|
@ -160,7 +160,8 @@ void GcodeSuite::M240() {
|
||||||
|
|
||||||
#ifdef PHOTO_POSITION
|
#ifdef PHOTO_POSITION
|
||||||
#if PHOTO_DELAY_MS > 0
|
#if PHOTO_DELAY_MS > 0
|
||||||
safe_delay(parser.intval('P', PHOTO_DELAY_MS));
|
const millis_t timeout = millis() + parser.intval('P', PHOTO_DELAY_MS);
|
||||||
|
while (PENDING(millis(), timeout)) idle();
|
||||||
#endif
|
#endif
|
||||||
do_blocking_move_to(old_pos, fr_mm_s);
|
do_blocking_move_to(old_pos, fr_mm_s);
|
||||||
#ifdef PHOTO_RETRACT_MM
|
#ifdef PHOTO_RETRACT_MM
|
||||||
|
|
Loading…
Reference in a new issue