init.lua 432 B

12345678910111213141516171819202122232425
  1. DEBUG = false
  2. function debug_message(message)
  3. if DEBUG then
  4. print(message)
  5. end
  6. --TODO: rolling last 10
  7. end
  8. if DEBUG then
  9. debug_message('1 second startup delay on timer 0 ...')
  10. tmr.alarm(0, 1000, 0, function()
  11. if file.exists('main.lc') then
  12. dofile('main.lc')
  13. else
  14. dofile('main.lua')
  15. end
  16. end)
  17. else
  18. if file.exists('main.lc') then
  19. dofile('main.lc')
  20. else
  21. dofile('main.lua')
  22. end
  23. end