-
Notifications
You must be signed in to change notification settings - Fork 143
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
Auto generate wire harness based on hardware #1523
Comments
Hey, I would love to help with this. Where should I create the files/code to generate the documentation? I wasn't sure if there was a specific space it should be done at |
I guess this could become a separate command in MPF: https://github.com/missionpinball/mpf/tree/dev/mpf/commands. We can then later refactor code into other parts. Does that make sense? |
This sounds fascinating but how would it work? Just give the pinouts for the headers on the board, or show the ins and outs of every part? That could be a very big diagram? |
For certain hardware (i.e. FAST or Multimorphic) we show the headers for their node boards. Based on that we could generate wire harnesses. I guess we should start simple and then extend from there |
Yeah exactly. We would have to discover the type of node boards for FAST (code exists for that) and then store a mapping for connectors to inputs/outputs. Based on the defined switches and coils we could generate a wire harness description for wirewiz, excel or similar tools |
Sweet. I guess we can think about separating exports later. This is better than what most makers got initially |
I have no idea if it's right though, or what comparable would be for something like PROC. I sure as hell don't want to add something that generates a wiring diagram someone follows and electrocutes themselves. |
We can add a warning. This should only be a starting point. In production machines you will probably also have some additional connectors and you would want to edit the wirewiz by hand anyway. |
Fair. Should I try to autogenerate FAST or start from a different one? Is there a good example using FAST? I see that demo_man uses P_ROC/WPC which would make sense, but I don't know if generating these diagrams is a priority for WPC tables that have existing wiring harnesses? |
Yeah FAST and P3-Roc make the most sense. Demo man is not optimal but it might be easy to modify it for those platforms. I mean just start the command and then we can create (or adjust) unittests in mpf. |
Fair enough. Sorry, one other thing you mentioned above. You said that code exists for discovering node board types for FAST, I have found that code, but it applies only if the boards are already connected, is that the stage at which this would be used? Or would it be run before the boards are set up so they are not there to be tested yet? |
I've been looking at this but there doesn't seem to be any way to populate the machine. values for lights, switches, coil, etc. without calling initialise_mpf() which will try to connect to actual hardware and halt if it fails (obviously there is no point in calculating wiring for the virtual platform!). It would seem wasteful to use an auxiliary parser to translate all the stuff just for wiring but possibly rather disruptive to divide initialization into two parts? |
Sweet. Maybe we have to generate separate images for separate wire harnesses eventually? I think I got a datasheet for the servo boards somewhere. |
I'll tidy what I have to pass prospector for now. |
Is there a good archive of test tables? I was only able to use one of the sample open source tables from the web page, since most of the tables are not open source, and many of the open source ones are for older versions or contain specification errors. |
Have a look at: https://missionpinball.org/projects.html. In the bottom we got a list of machines with source. |
Those are the ones I looked at, but as I said several are obsolete and some will not build. |
Generate wire harness documentation using WireViz (https://github.com/formatc1702/WireViz) based on the hardware definition in MPF (switches, coils, PSUs and specifics for each hardware).
The text was updated successfully, but these errors were encountered: