Ver código fonte

begin pattern immediately if Q was empty

etisab 10 anos atrás
pai
commit
0cdad01f08
1 arquivos alterados com 4 adições e 4 exclusões
  1. 4 4
      rebuild/led.lua

+ 4 - 4
rebuild/led.lua

@@ -49,10 +49,10 @@ end
 function enqueue(pattern)
 function enqueue(pattern)
   debug_message('enqueue')
   debug_message('enqueue')
   table.insert(Q, pattern)
   table.insert(Q, pattern)
-  -- debug_message('tmr.state ' .. tostring(tmr.state(TIMER)))
-  -- if not tmr.state(TIMER) then
-  --   next_pattern()
-  -- end
+  debug_message('tmr.state ' .. tostring(tmr.state(TIMER)))
+  if not tmr.state(TIMER) then
+    next_pattern()
+  end
 end
 end
 
 
 function next_pattern()
 function next_pattern()