[fluksod] create empty table for arg when not called from the Lua interpreter
This commit is contained in:
parent
4e4f4a8f88
commit
fd51388300
|
@ -26,6 +26,8 @@ local spi = require 'flukso.spi'
|
||||||
local nixio = require 'nixio'
|
local nixio = require 'nixio'
|
||||||
nixio.fs = require 'nixio.fs'
|
nixio.fs = require 'nixio.fs'
|
||||||
|
|
||||||
|
local arg = arg or {} -- needed when this code is not loaded via the interpreter
|
||||||
|
|
||||||
local DEBUG = (arg[1] == '-d')
|
local DEBUG = (arg[1] == '-d')
|
||||||
|
|
||||||
local SPI_DEV = '/dev/spidev0.0'
|
local SPI_DEV = '/dev/spidev0.0'
|
||||||
|
|
Loading…
Reference in New Issue