Skip to content

Commit bc08dac

Browse files
committed
Fix LED autogen code
1 parent de702ff commit bc08dac

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ev3dev/brickpi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class Leds(object):
5050
blue_one = Led(name='brickpi1:blue:ev3dev')
5151
blue_two = Led(name='brickpi2:blue:ev3dev')
5252

53-
ONE = ( blue_one )
54-
TWO = ( blue_two )
53+
BLUE_ONE = ( blue_one )
54+
BLUE_TWO = ( blue_two )
5555

5656
BLUE = ( 1 )
5757

templates/led-colors.liquid

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ endfor %}
1313
endfor %}
1414
{% for color in currentClass.colors %}{%
1515
assign colorName = color.name | upcase | underscore_spaces %}{%
16-
assign mixRatio = '' %}{%
17-
for mix in color.mix %}{%
18-
capture mixRatio %}{{ mixRatio }}, {{ mix.value }}{%
16+
assign mixValues = '' %}{%
17+
for value in color.value %}{%
18+
capture mixValues %}{{ mixValues }}, {{ value }}{%
1919
endcapture %}{%
2020
endfor %}
21-
{{ colorName }} = ( {{ mixRatio | remove_first:', ' }} ){%
21+
{{ colorName }} = ( {{ mixValues | remove_first:', ' }} ){%
2222
endfor %}
2323

2424
@staticmethod

0 commit comments

Comments
 (0)