diff --git a/src/rest/api/api_printer.lua b/src/rest/api/api_printer.lua index 2048dd8..1f3b8c0 100644 --- a/src/rest/api/api_printer.lua +++ b/src/rest/api/api_printer.lua @@ -190,7 +190,8 @@ function M.fetch_POST(request, response) if not printer or not printer:hasSocket() then return end local socket = printer:getId() - io.popen("print-fetch.lua " .. socket) + local remote = settings.get('gcode_server') + io.popen("print-fetch.lua " .. socket .. " " .. remote) end --requires: gcode(string) (the gcode to be appended) diff --git a/src/script/print-fetch.lua b/src/script/print-fetch.lua index 577639e..bba863a 100755 --- a/src/script/print-fetch.lua +++ b/src/script/print-fetch.lua @@ -6,7 +6,7 @@ local p3d = require("print3d") local printer = p3d.getPrinter(arg[1]) -local remote = "10.0.0.212:8080" +local remote = arg[2] local finished = false diff --git a/src/script/wifibox.uci.config b/src/script/wifibox.uci.config index dd8146e..e2f8fe1 100644 --- a/src/script/wifibox.uci.config +++ b/src/script/wifibox.uci.config @@ -10,3 +10,4 @@ config settings 'system' config settings 'general' option printer_type 'ultimaker' + option gcode_server 'tranquil-meadow-94621.herokuapp.com'