diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-23 10:57:13 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-12-13 15:02:04 +0100 |
commit | 57a37d53461a07eebf391f9f3a8b41d7f6fcbdb5 (patch) | |
tree | 4b875317fb07ecd733f0b298c2b70b8e1f55f0e2 /conf.d/project/lua.d/onload-daemon-01-init.lua | |
parent | 7abfae473d9ecbc7ac5074ef4c443e11852f7c3c (diff) |
Format: Remove spaces at EOL
Change-Id: I50bbf17cfa913b40caf0cb6752a902fb626ec1ad
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'conf.d/project/lua.d/onload-daemon-01-init.lua')
-rw-r--r-- | conf.d/project/lua.d/onload-daemon-01-init.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/conf.d/project/lua.d/onload-daemon-01-init.lua b/conf.d/project/lua.d/onload-daemon-01-init.lua index ebdc678..26ff08a 100644 --- a/conf.d/project/lua.d/onload-daemon-01-init.lua +++ b/conf.d/project/lua.d/onload-daemon-01-init.lua @@ -21,7 +21,7 @@ _Global_Context={} --[[ This function is call during controller init phase as describe in onload-daemon-sample.json It receives two argument 1st one is the source (here on load) second one is the arguments - as expose in config file. + as expose in config file. In this sample we create an event that take the name of args["zzzz"], the resulting handle is save into _Global_Context for further use. @@ -32,17 +32,17 @@ _Global_Context={} function _Sample_Controller_Init(source, control) printf ("[-- Sample_Controller_Init --] source=%d control=%s", source, Dump_Table(control)) - + -- if no argument return now - if (control==nil or control["zzzz"]==nil) then + if (control==nil or control["zzzz"]==nil) then printf ("[-- Sample_Controller_Init --] no event name given") return end -- set a count to make more visible each call _Global_Context["counter"]=0 - + -- just for fun create an event _Global_Context["event"]=AFB:evtmake(control["zzzz"]) -end +end |