Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The pin #7 should be inside list comprehension. #52

Merged
merged 1 commit into from
Nov 10, 2014
Merged

[BUG] The pin #7 should be inside list comprehension. #52

merged 1 commit into from
Nov 10, 2014

Conversation

davivcgarcia
Copy link
Contributor

After code refactoring, the pin number related to the DP segment was left outside the list comprehension call, adding the integer 7 instead of the pin ard.pin[7] object. This bug was not affecting the example because DP (pin 7) was not being used.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 6b725dc on davivcgarcia:master into 41c5950 on garoa:master.

@@ -7,7 +7,7 @@

ard = detect.MyBoard()

display_pins = [ard.pins[i] for i in range(8, 14)] + [7]
display_pins = [ard.pins[i] for i in range(8, 14) + [7]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

display_pins = [ard.pins[i] for i in range(7, 14)]

Would range(7,14) work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately no. This list is ordered according the segments in the display, ordered as: A, B, C, D, E, F, G and DP (pin 7 in the Garoa Shield). This list is then unpacked during SevenSegments object instantiation, which DP segment is the last parameter (optional):

seg_display = parts.led.SevenSegments(*display_pins)

@Vido
Copy link
Contributor

Vido commented Nov 10, 2014

Ok. Thanks @davivcgarcia

Vido added a commit that referenced this pull request Nov 10, 2014
[BUG] The pin #7 should be inside list comprehension.
@Vido Vido merged commit 6f36a46 into pingo-io:master Nov 10, 2014
@ramalho
Copy link
Contributor

ramalho commented Nov 10, 2014

Thanks @davivcgarcia and @Vido!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants