[fluksod] -d switch will put fluksod.lua in debugging mode

This commit is contained in:
Bart Van Der Meerssche 2011-01-25 15:10:18 +01:00
parent 3d41fba408
commit 33cffa6b79
1 changed files with 2 additions and 2 deletions

View File

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