AnHardt / Marlin

Reprap FW with look ahead. SDcard and LCD support. It works on Gen6, Ultimaker, RAMPS and Sanguinololu
GNU General Public License v3.0
1 stars 1 forks source link

Repair display throttling #91

Closed AnHardt closed 4 years ago

AnHardt commented 4 years ago

Some time ago @thinkyhead asked in a comment if my display throttling code is still working. After a very brief look i answered it would be still in place, but a bit of debug code would show if it still works. I suggested to look at the numbers in https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/lcd/ultralcd.cpp#L986. Since up to now, seemingly no one else did and i was away from my equipment, i did it now. And, who wonders - it did not work. max_display_update_time seems to have realistic values, but during print planner.block_buffer_runtime() grew more and more. Consequently there was always enough time in the planner buffer to allow a display update. The subtraction of the time for the running block did not work because block->segment_time_us was never set. All operations in the planner worked on the local segment_time_us.