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 printDriver = require('print3d')
local SUPPORTED_PRINTERS = {
local SUPPORTED_PRINTERS = {
rigidbot = "Rigidbot",
ultimaker = "Ultimaker",
makerbot_replicator2 = "MakerBot Replicator2",
@ -35,7 +35,7 @@ local SUPPORTED_PRINTERS = {
tantillus = "Tantillus",
vision_3d_printer = "Vision 3D Printer"
}
local SUPPORTED_BAUDRATES = {
local SUPPORTED_BAUDRATES = {
["115200"] = "115200 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)
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
if deviceId == nil or deviceId == "" then
printer,msg = printDriver.getPrinter()
else
else
printer,msg = printDriver.getPrinter(deviceId)
end
if not printer then
response:setError("could not open printer driver (" .. msg .. ")")
response:addData('id', deviceId)