Skip to content

Commit

Permalink
Fixes to allow the linting stage to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkl33t committed Jun 19, 2024
1 parent c2b76a9 commit e79a9e9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion modules/firmware_apps/patterninhibit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from events.input import Buttons, BUTTON_TYPES
from system.eventbus import eventbus
from system.patterndisplay.events import *
from system.patterndisplay.events import PatternEnable,PatternDisable

from tildagonos import tildagonos

Expand Down
2 changes: 1 addition & 1 deletion modules/lib/flash_spi.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(
super().__init__(block_size, len(cspins), size * 1024, sec_size)

# Select the correct command set
if (cmd5 is None and size <= 4096) or (cmd5 == False):
if (cmd5 is None and size <= 4096) or (not cmd5):
self._cmds = _CMDS3BA
self._cmdlen = 4
else:
Expand Down
1 change: 0 additions & 1 deletion modules/scratchpad.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from system.notification.app import NotificationService
from tildagonos import tildagonos

from system.scheduler import scheduler as sc
from system.hexpansion.app import HexpansionManagerApp
Expand Down
12 changes: 6 additions & 6 deletions modules/system/patterndisplay/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from tildagonos import tildagonos
import settings
import asyncio
from system.patterndisplay.events import *
from system.patterndisplay.events import PatternEnable, PatternDisable, PatternReload
from system.eventbus import eventbus


Expand All @@ -23,7 +23,7 @@ def load_pattern(self):
_pmodule = __import__(_patternpath, globals(), locals(), [_patternclass])
_pclass = getattr(_pmodule, _patternclass)
self._p = _pclass()
except:
except ModuleNotFoundError:
raise ImportError(f"Pattern {self.pattern} not found!")

async def _enable(self, event: PatternEnable):
Expand All @@ -40,13 +40,13 @@ async def background_task(self):
brightness = settings.get("pattern_brightness", 0.1)
next_frame = self._p.next()
if self.enabled:
for l in range(12):
for led in range(12):
if brightness < 1.0:
tildagonos.leds[l + 1] = tuple(
int(i * brightness) for i in next_frame[l]
tildagonos.leds[led + 1] = tuple(
int(i * brightness) for i in next_frame[led]
)
else:
tildagonos.leds[l + 1] = next_frame[l]
tildagonos.leds[led + 1] = next_frame[led]
tildagonos.leds.write()
if not self._p.fps:
break
Expand Down

0 comments on commit e79a9e9

Please sign in to comment.