Closed tablatronix closed 4 years ago
Compiling, I cannot test until tomorrow because I have a print going and CORS requires a restart!! booooo
Looking good Chunkystevo!
It works
Code can be reworked to be more compatible with aj 6.x, some things are easier now etc. This just gets it "working"
OctoprintApi::sendGetToOctoprint() CALLED
OctoprintApi::sendRequestToOctoprint() CALLED
.... connected to server
HTTP/1.1 200 OK
Content-Length: 466
X-Robots-Tag: noindex, nofollow, noimageindex
X-Content-Type-Options: nosniff
Cache-Control: max-age=0
X-Clacks-Overhead: GNU Terry Pratchett
Content-Type: application/json
X-Frame-Options: sameorigin
{"job":{"averagePrintTime":9221.544792934,"estimatedPrintTime":7436.001779999472,"filament":{"tool0":{"length":8429.214769999957,"volume":0.0}},"file":{"date":1588386706,"display":"CE3_Single.gcode","name":"CE3_Single.gcode","origin":"local","path":"CE3_Single.gcode","size":5422521},"lastPrintTime":9221.544792934,"user":"_admin"},"progress":{"completion":null,"filepos":null,"printTime":null,"printTimeLeft":null,"printTimeLeftOrigin":null},"state":"Operational"}
Status code to extract: HTTP/1.1 200 OK
httpCode:200
--------------getPrintJob()-------------
Printer current state string:..Operational
----------Job (File information)--------
jobFileDate (Epoch) long:..1588386706
jobFileName String:...CE3_Single.gcode
jobFileOrigin String:...local
jobFileSize (bytes) long:..5422521
jobFilamentTool0Length (mm) long:.0
jobFilamentTool0Volume (cm.) float:.0.00
jobFilamentTool1Length (mm) long:.0
jobFilamentTool1Volume (cm.) float:.0.00
estimatedPrintTime (sec) long:..7436
----------------------------------------
-------Job (Progress information)-------
progressCompletion (%) float:..0.00
progressFilepos (bytes) long:..0
progressPrintTime (sec) long:..0
progressPrintTimeLeft (sec) long:.0
----------------------------------------
---------------Example Use--------------
File:...CE3_Single.gcode
File size:..5.17MB
Uploaded:..2020-05-02 02:31:46
Print time estimate:.02:03:56
Percentage complete:.0.00%
Print time left:.00:00:00
----------------------------------------
Hiya. Thanks for looking into this. I need to give my library some love and getit upto speed. Not needed to use it in ages, so it's been left to rot 😭. Will block out some time to get it upto date with aj 6 and add new features too!! Thanks for your help and efforts!
Now in new PR merge.
It seems this requires old 5.x