Skip to content
Snippets Groups Projects

flow3r v1.4 forward compat bl00mbox fix

Open moon2 requested to merge moon2/PetalHero:flow3r_v1_4_forward_compat_blm into main
1 file
+ 8
8
Compare changes
  • Side-by-side
  • Inline
+ 8
8
@@ -62,11 +62,11 @@ def petal_leds(petal, val, color = None):
@@ -62,11 +62,11 @@ def petal_leds(petal, val, color = None):
def blm_wake(app, timeout):
def blm_wake(app, timeout):
if not app or not app.loaded: return
if not app or not app.loaded: return
if app.blm_timeout == 0 and sys_bl00mbox.channel_enable:
if app.blm_timeout == 0:
try:
if hasattr(sys_bl00mbox, "channel_enable"):
sys_bl00mbox.channel_enable(app.blm.channel_num)
sys_bl00mbox.channel_enable(app.blm.channel_num)
except Exception as e:
else:
sys.print_exception(e)
app.blm.foreground = True
if timeout > app.blm_timeout:
if timeout > app.blm_timeout:
app.blm_timeout = timeout
app.blm_timeout = timeout
@@ -76,11 +76,11 @@ def blm_timeout(view, delta_ms):
@@ -76,11 +76,11 @@ def blm_timeout(view, delta_ms):
if not view.is_active(): return
if not view.is_active(): return
if app.blm_timeout == 0: return
if app.blm_timeout == 0: return
app.blm_timeout -= delta_ms
app.blm_timeout -= delta_ms
if app.blm_timeout <= 0 and sys_bl00mbox.channel_disable:
if app.blm_timeout <= 0:
try:
if hasattr(sys_bl00mbox, "channel_disable"):
sys_bl00mbox.channel_disable(app.blm.channel_num)
sys_bl00mbox.channel_disable(app.blm.channel_num)
except Exception as e:
else:
sys.print_exception(e)
app.blm.foreground = False
app.blm_timeout = 0
app.blm_timeout = 0
def play_crunch(app):
def play_crunch(app):
Loading