[fluksod] enclose dbg.vardump in a DEBUG switch

This commit is contained in:
Bart Van Der Meerssche 2011-01-25 10:32:47 +01:00
parent 769df42192
commit 6084528217
1 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,8 @@ local spi = require 'flukso.spi'
local nixio = require 'nixio'
nixio.fs = require 'nixio.fs'
local DEBUG = 0
local SPI_DEV = '/dev/spidev0.0'
local SPI_MAX_CLK_SPEED_HZ = 10e6
local SPI_MIN_BYTE_DELAY_US = 250
@ -112,7 +114,7 @@ while true do
if poll >= 0 then
msg:rx(spidev)
local dispatch = msg:decode()
-- dbg.vardump(msg)
if DEBUG == 1 then dbg.vardump(msg) end
if dispatch.ctrl then
ctrl.fdout:write(dispatch.ctrl .. '\n')