Skip to content

Commit

Permalink
add midi info to board_info
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Aug 25, 2023
1 parent 5e5a698 commit 41a2f03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/json2daisy/json2daisy.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]':

if 'defines' in target:
if target['defines'].get('OOPSY_TARGET_HAS_MIDI_INPUT'):
target['has_midi'] = True
replacements['midi'] = """daisy::MidiUartHandler midi;
daisy::MidiUsbHandler midiusb;"""

Expand Down Expand Up @@ -321,7 +322,8 @@ def generate_header(board_description_dict: dict) -> 'tuple[str, dict]':
'name': target['name'],
'components': components,
'aliases': target['aliases'],
'channels': audio_channels
'channels': audio_channels,
'has_midi': target.get('has_midi', False)
}

return rendered_header, board_info
Expand Down

0 comments on commit 41a2f03

Please sign in to comment.