summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lmx2487lib.lua6
-rw-r--r--main.lua2
2 files changed, 5 insertions, 3 deletions
diff --git a/lmx2487lib.lua b/lmx2487lib.lua
index ce504c7..dc36f37 100644
--- a/lmx2487lib.lua
+++ b/lmx2487lib.lua
@@ -29,9 +29,9 @@ end
function send_register_lmx2487( register)
if ( lmx2487_need_update[register +1] ) then
- --print(tmr.now())
- print("sending register " .. register .. " with value " .. get_lmx2487register( register ) )
- --print(tmr.now())
+ if DEBUG then
+ print("sending register " .. register .. " with value " .. get_lmx2487register( register ) )
+ end
-- do hardware talking
microwire_send_data( get_lmx2487register( register ) )
lmx2487_need_update[register+1]=false
diff --git a/main.lua b/main.lua
index f232be5..32d5863 100644
--- a/main.lua
+++ b/main.lua
@@ -7,6 +7,8 @@ startup=nil
abortTest=nil
abortInit=nil
+-- if we want the debug messages set the DEBUG variable
+-- DEBUG=true
dofile("binaryLib.lua")
dofile("microwire.lua")