Scan Issues - Marlin - Diode laser

SOLVED

taken from v1engeneers forum:

I will summarize the problem. The more recent versions of Marlin the code that updates the settings for the fan was changed. The change caused it to delay the fan updates. Since many of us use the fan to control our lasers that change causes the laser to turn on and off to early or too late. As you can see in your photo and in the photos in the other Thread BT pointed you to.

Here is the offending code. It is located in the Marlin.cpp file.

// Limit check_axes_activity frequency to 10Hz
static millis_t next_check_axes_ms = 0;
if (ELAPSED(ms, next_check_axes_ms)) {
planner.check_axes_activity();
next_check_axes_ms = ms + 100UL;
}

To fix the problem it needs to be changed to this.

// Limit check_axes_activity frequency to 10Hz
//static millis_t next_check_axes_ms = 0;
//if (ELAPSED(ms, next_check_axes_ms)) {
planner.check_axes_activity(); //< THIS IS THE ONLY LINE OF CODE YOU LEAVE UNCOMMENTED
// next_check_axes_ms = ms + 100UL;
//}

If others have similar issues in marlin you know why. Thanks