Open woutgg opened 8 years ago
Update: the improvements do not actually make this possible, so a new parameter (e.g. total_lines) would have to be added to the printer/print API endpoint in firmware. With that information, the part about possible implementation can be done.
This has been implemented. See: client changes, firmware changes and print3d changes here and here.
With GCode buffering improvements currently being integrated, it becomes possible for clients to set the total of lines to be buffered beforehand. To report more accurate progress (esp. with large prints), it would be good to use this number (if set by client) instead of current behaviour where the number of buffered lines so far is used.
A possible implementation would be to (don't mind the naming proposals):
getTotalAppendedLines()
,getGrandTotalLines
) which returns sequenceTotal_ if set, orgetTotalAppendedLines()
otherwise. The new function would then be used for progress reports.