Skip to content

Commit

Permalink
Bugfix for Resolume functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
skafreak committed Sep 22, 2023
1 parent 91e1d97 commit d10409a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Software/Production/MIDIState.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def poll_encoders(self):
self.last_volume_position = volume_enc.position

def update(self, machine):
# Listen on USB MIDI, resolves issues with some software
# TODO Make this more elegant
midi_usb.receive()
key_event = keys.events.get()
if key_event:
if key_event.key_number < 8:
Expand Down
4 changes: 2 additions & 2 deletions Software/Production/StartupState.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def update(self, machine):
if self.stage == 0:
text = " DCZia\n Electric Sampler"
if len(text) > self.timer:
text = text[0 : self.timer]
text = text[0: self.timer]
text_area = label.Label(terminalio.FONT, text=text, x=2, y=5)
display.show(text_area)
self.color = (self.timer, self.timer, 0)
Expand All @@ -44,7 +44,7 @@ def update(self, machine):
elif self.stage == 1:
text = "Fueled by Green Chile\n and Solder"
if len(text) > self.timer:
text = text[0 : self.timer]
text = text[0: self.timer]
text_area = label.Label(terminalio.FONT, text=text, x=2, y=10)
display.show(text_area)
if self.timer > (len(text) * 1.5):
Expand Down
4 changes: 3 additions & 1 deletion Software/Production/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
midi_out=midi_uart, out_channel=midi_serial_channel - 1
)

midi_usb = adafruit_midi.MIDI(midi_out=usb_midi.ports[1], out_channel=0)
midi_usb = adafruit_midi.MIDI(
midi_in=usb_midi.ports[0], midi_out=usb_midi.ports[1], out_channel=0
)

# Setup the SD card and mount it as /sd
try:
Expand Down

0 comments on commit d10409a

Please sign in to comment.