Skip to content

Commit 3ee3964

Browse files
authored
🐛 Fix ESP32 laser M4 exception (MarlinFirmware#26884)
1 parent aecfb25 commit 3ee3964

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Marlin/src/module/stepper.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2456,7 +2456,8 @@ hal_timer_t Stepper::block_phase_isr() {
24562456
*/
24572457
if (cutter.cutter_mode == CUTTER_MODE_DYNAMIC
24582458
&& planner.laser_inline.status.isPowered // isPowered flag set on any parsed G1, G2, G3, or G5 move; cleared on any others.
2459-
&& cutter.last_block_power != current_block->laser.power // Prevent constant update without change
2459+
&& current_block // Block may not be available if steps completed (see discard_current_block() above)
2460+
&& cutter.last_block_power != current_block->laser.power // Only update if the power changed
24602461
) {
24612462
cutter.apply_power(current_block->laser.power);
24622463
cutter.last_block_power = current_block->laser.power;

0 commit comments

Comments
 (0)