|
@@ -148,7 +148,7 @@ void GcodeSuite::M240() {
|
148
|
148
|
#if PIN_EXISTS(CHDK)
|
149
|
149
|
|
150
|
150
|
OUT_WRITE(CHDK_PIN, HIGH);
|
151
|
|
- chdk_timeout = millis() + PHOTO_SWITCH_MS;
|
|
151
|
+ chdk_timeout = millis() + parser.intval('D', PHOTO_SWITCH_MS);
|
152
|
152
|
|
153
|
153
|
#elif HAS_PHOTOGRAPH
|
154
|
154
|
|
|
@@ -160,7 +160,8 @@ void GcodeSuite::M240() {
|
160
|
160
|
|
161
|
161
|
#ifdef PHOTO_POSITION
|
162
|
162
|
#if PHOTO_DELAY_MS > 0
|
163
|
|
- safe_delay(parser.intval('P', PHOTO_DELAY_MS));
|
|
163
|
+ const millis_t timeout = millis() + parser.intval('P', PHOTO_DELAY_MS);
|
|
164
|
+ while (PENDING(millis(), timeout)) idle();
|
164
|
165
|
#endif
|
165
|
166
|
do_blocking_move_to(old_pos, fr_mm_s);
|
166
|
167
|
#ifdef PHOTO_RETRACT_MM
|