Skip to content

Commit

Permalink
fix display of analog assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
rreichenbach committed Oct 31, 2024
1 parent f08ae13 commit c86143a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pistomp/lcd320x240.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,11 +678,11 @@ def draw_value_edit_graph(self, parameter, value):
# Analog Assignments (Tweak, Expression Pedal, etc.)
def draw_analog_assignments(self, controllers):
# Quite a few assumptions here
# Expression pedal in first position, then 3 knobs
# Expression pedal in first position, then 3 knobs (for v3)
# Should work for more or fewer but won't likely look great on the LCD

# spacing and scaling of text
num = max(3, len(controllers))
num = max(3, len(controllers) + 1)
width_per_control = int(round(self.display_width / num))
text_per_control = width_per_control - 16 # minus height of control icon

Expand All @@ -695,10 +695,8 @@ def draw_analog_assignments(self, controllers):
for i in range(0, num):
k = None
v = None
print(controllers.items())
for key, value in controllers.items():
id = util.DICT_GET(value, Token.ID)
print(id)
if id is not None and int(id) == i:
k = key
v = value
Expand Down

0 comments on commit c86143a

Please sign in to comment.