M73 sets the print time remaining and completion %.
For now I've just set this to 100% at the end of the print which at least makes the UI happy.
A 1/2 way solution would be to add M73 after each chunk of the print with an arbitrary percentage based on a best guess.
A complete solution would involve doing 2 passes over the gcode, one to compute all of moves and another to work out the % of completed moves at every M73 point. This would mean converting from a string accumulator to an object array so it could be traversed a second time.
M73 sets the print time remaining and completion %.
For now I've just set this to 100% at the end of the print which at least makes the UI happy.
A 1/2 way solution would be to add M73 after each chunk of the print with an arbitrary percentage based on a best guess.
A complete solution would involve doing 2 passes over the gcode, one to compute all of moves and another to work out the % of completed moves at every M73 point. This would mean converting from a string accumulator to an object array so it could be traversed a second time.
References:
https://help.prusa3d.com/article/prusa-firmware-specific-g-codes_112173 - supports P and R https://marlinfw.org/docs/gcode/M073.html - supports P and R https://docs.duet3d.com/User_manual/Reference/Gcodes#m73-set-remaining-print-time only supports R = remainig print time https://www.klipper3d.org/G-Codes.html - only supports P = percent