mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-12-22 11:03:48 +01:00
Report current and maximum size in bytes of gcode buffer in getProgress functions.
This commit is contained in:
parent
4e1a7157ed
commit
f3e9ebf26e
@ -54,7 +54,7 @@ function M.progress(request, response)
|
|||||||
if not printer or not printer:hasSocket() then return end
|
if not printer or not printer:hasSocket() then return end
|
||||||
|
|
||||||
-- NOTE: despite their names, `currentLine` is still the error indicator and `bufferedLines` the message in such case.
|
-- NOTE: despite their names, `currentLine` is still the error indicator and `bufferedLines` the message in such case.
|
||||||
local currentLine,bufferedLines,totalLines = printer:getProgress()
|
local currentLine,bufferedLines,totalLines,bufferSize,maxBufferSize = printer:getProgress()
|
||||||
|
|
||||||
response:addData('id', argId)
|
response:addData('id', argId)
|
||||||
if currentLine then
|
if currentLine then
|
||||||
@ -62,6 +62,8 @@ function M.progress(request, response)
|
|||||||
response:addData('current_line', currentLine)
|
response:addData('current_line', currentLine)
|
||||||
response:addData('buffered_lines', bufferedLines)
|
response:addData('buffered_lines', bufferedLines)
|
||||||
response:addData('total_lines', totalLines)
|
response:addData('total_lines', totalLines)
|
||||||
|
response:addData('buffer_size', bufferSize)
|
||||||
|
response:addData('max_buffer_size', maxBufferSize)
|
||||||
elseif progress == false then
|
elseif progress == false then
|
||||||
response:addData('status', bufferedLines)
|
response:addData('status', bufferedLines)
|
||||||
response:setFail()
|
response:setFail()
|
||||||
|
Loading…
Reference in New Issue
Block a user