Skip to content

Commit 7616d0e

Browse files
HoverClubthinkyhead
authored andcommitted
🐛 Fix ESP32 laser M4 exception (MarlinFirmware#26884)
1 parent e81b3fe commit 7616d0e

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
@@ -2333,7 +2333,8 @@ uint32_t Stepper::block_phase_isr() {
23332333
*/
23342334
if (cutter.cutter_mode == CUTTER_MODE_DYNAMIC
23352335
&& planner.laser_inline.status.isPowered // isPowered flag set on any parsed G1, G2, G3, or G5 move; cleared on any others.
2336-
&& cutter.last_block_power != current_block->laser.power // Prevent constant update without change
2336+
&& current_block // Block may not be available if steps completed (see discard_current_block() above)
2337+
&& cutter.last_block_power != current_block->laser.power // Only update if the power changed
23372338
) {
23382339
cutter.apply_power(current_block->laser.power);
23392340
cutter.last_block_power = current_block->laser.power;

0 commit comments

Comments
 (0)