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

Port unrecognized when specifying connections using pinout #38

Closed
marsfan opened this issue Jun 28, 2020 · 3 comments
Closed

Port unrecognized when specifying connections using pinout #38

marsfan opened this issue Jun 28, 2020 · 3 comments

Comments

@marsfan
Copy link
Contributor

marsfan commented Jun 28, 2020

Summary

I am trying to set up connections using the pin names specified in pinouts like in #10. It appears to be working properly, however, when I build the diagram, I get the warning.

Warning: node x1, port pGNDr unrecognized

I am not sure what is happening, could you clear this up for me?

Minimal Working Example

YAML File

connectors:
  X2:
    pinnumbers: [1,2]
    pinout: [GND, VCC]
  X1:
    pinnumbers: [1, 2, 3, 4]
    pinout: [GND, VCC, D+, D-]

cables:
  W1:
    wirecount: 2
    color_code: IEC

connections:
  -
    - X1: [GND, VCC]
    - W1: [1-2]
    - X2: [1-2]

Command Line Input/Output

$> wireviz test.yml
Warning: node X1, port pGNDr unrecognized
Warning: node X1, port pVCCr unrecognized
Warning: node X1, port pGNDr unrecognized
Warning: node X1, port pVCCr unrecognized
$>

Output from running on provided YAML file

Output Image

@formatc1702
Copy link
Collaborator

I think there's a misunderstanding. You need to use items from the pinnumbers list in your connections, not from pinouts. The reason is, pinnumbers are unambiguous, whereas your pinout might include, for example, several GND pins; which one should the connection go to? (see this example from the tutorial)

You can make your pinnumbers non-numerical if you want (see X2 in #10), but this is separate from specifying the pin function. Hope it helps!

@marsfan
Copy link
Contributor Author

marsfan commented Jun 29, 2020

Ahh. That makes sense. Thank you very much.

@formatc1702
Copy link
Collaborator

@marsfan you'll be happy to know that the example you provided above now works in the latest version of the dev branch after closing #71. You can now refer to pin names from pinout instead of pinnumbers, provided they are unambiguous. Unconnected pins are not checked for ambiguity, which allows to have, for example, multiple pins named N/C.

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

No branches or pull requests

2 participants