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] Referencing pin labels with '-' when defining connections #139

Closed
17o2 opened this issue Jul 30, 2020 · 0 comments · Fixed by #140
Closed

[bug] Referencing pin labels with '-' when defining connections #139

17o2 opened this issue Jul 30, 2020 · 0 comments · Fixed by #140
Milestone

Comments

@17o2
Copy link
Collaborator

17o2 commented Jul 30, 2020

Discovered on a modified version of the example from #138.

When using the - character in a pin label, and then referencing this pin label in connections, the character is interpreted to be a range of pins, rather than part of the pin label itself.

connectors:
  Molex1:
    type: automotive
    subtype: male
    pincount: 26
    pins: [19,20,21,22,23]
    pinlabels: [GA-NET+, AMP, RCA+, GA-NET-, RCA-]
    notes: GA-NET(BUS) has 68 ohm 1/2 watt resistor

cables:
  Cable1:
    wirecount: 5
    color_code: DIN

connections:
  -
    - Molex1: [GA-NET+, GA-NET-]
    - Cable1: [1-2]

In the second to last line, GA-NET+ is interpreted as a range from GA to NET+, and an error is thrown.

ValueError: invalid literal for int() with base 10: 'GA'

The example works when replacing all - in pinlabels with _ or other.

The parsing should be modified to check for existing labels first, before calling wv_helper.expand()
OR
wv_helper.expand() should be made smarter.

@17o2 17o2 changed the title Referencing pin labels with '-' when defining connections [bug] Referencing pin labels with '-' when defining connections Jul 30, 2020
@17o2 17o2 added this to the v0.2 milestone Aug 2, 2020
@17o2 17o2 closed this as completed Aug 10, 2020
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 a pull request may close this issue.

1 participant