Skip to content

Commit af9f54f

Browse files
committed
zero payload every time
1 parent 570dc08 commit af9f54f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gateware/src/tiliqua/midi.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def elaborate(self, platform):
173173
# If we're halfway through a message and don't get the rest of it
174174
# for this timeout, we give up and ignore the message.
175175
timeout = Signal(24)
176-
timeout_cycles = 60000 # 1msec
176+
timeout_cycles = 2*60000 # 2msec
177177
m.d.sync += timeout.eq(timeout-1)
178178

179179
# Computed MIDI message payload length.
@@ -257,6 +257,7 @@ def elaborate(self, platform):
257257
with m.State('SYSEX'):
258258
m.d.comb += self.i.ready.eq(1),
259259
with m.If(self.i.valid):
260+
m.d.sync += self.o.payload.eq(0)
260261
# Consuming bytes until SYSEX_END, report the SYSEX_END and restart the state machine.
261262
with m.If(self.i.payload == ((Status.SUBCLASS.value << 4) | Subclass.SYSEX_END.value)):
262263
m.d.sync += self.o.payload.as_value()[:8].eq(self.i.payload)

0 commit comments

Comments
 (0)