0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2025-01-03 08:13:49 +01:00

Disable log message in createPrinterOrFail.

This commit is contained in:
Wouter R 2013-10-14 18:11:15 +02:00
parent 6dae2054c5
commit ba09807859

View File

@ -2,7 +2,7 @@ local log = require('util.logger')
local utils = require('util.utils') local utils = require('util.utils')
local printDriver = require('print3d') local printDriver = require('print3d')
local SUPPORTED_PRINTERS = { local SUPPORTED_PRINTERS = {
rigidbot = "Rigidbot", rigidbot = "Rigidbot",
ultimaker = "Ultimaker", ultimaker = "Ultimaker",
makerbot_replicator2 = "MakerBot Replicator2", makerbot_replicator2 = "MakerBot Replicator2",
@ -35,7 +35,7 @@ local SUPPORTED_PRINTERS = {
tantillus = "Tantillus", tantillus = "Tantillus",
vision_3d_printer = "Vision 3D Printer" vision_3d_printer = "Vision 3D Printer"
} }
local SUPPORTED_BAUDRATES = { local SUPPORTED_BAUDRATES = {
["115200"] = "115200 bps", ["115200"] = "115200 bps",
["2500000"] = "2500000 bps" ["2500000"] = "2500000 bps"
} }
@ -55,15 +55,15 @@ end
--returns a printer instance or nil (and sets error state on response in the latter case) --returns a printer instance or nil (and sets error state on response in the latter case)
function M.createPrinterOrFail(deviceId, response) function M.createPrinterOrFail(deviceId, response)
log:info("API:printer:createPrinterOrFail: "..utils.dump(deviceId)) --log:debug("API:printer:createPrinterOrFail: "..utils.dump(deviceId))
local msg,printer = nil, nil local msg,printer = nil, nil
if deviceId == nil or deviceId == "" then if deviceId == nil or deviceId == "" then
printer,msg = printDriver.getPrinter() printer,msg = printDriver.getPrinter()
else else
printer,msg = printDriver.getPrinter(deviceId) printer,msg = printDriver.getPrinter(deviceId)
end end
if not printer then if not printer then
response:setError("could not open printer driver (" .. msg .. ")") response:setError("could not open printer driver (" .. msg .. ")")
response:addData('id', deviceId) response:addData('id', deviceId)