uConfig
uConfig copied to clipboard
[pdf_extract]Add support for parsing pin directions
Many datasheets present a table with the pin number, pin name and pin direction columns. This patch add support for the pin direction parsing.
Tested with BQ76920 datasheet:
http://www.ti.com/lit/ds/symlink/bq76920.pdf
Example:
Result:

Note: The patch utilize some C++11 only features. If you decide not to use these features let me know in #19 and I will update/downgrade the code.
This is a nice functionnality, but unfortunately that broke well functional extractions. As you can see in Travis Ci or app veyor, test does not pass. You can lauch autotest directly in Qt Creator.
Auhc, I was not aware of the test thus I have not ran them. Let me fix them.
Yes I add it because with this kind of code it's easy to one thing and broke tens others !
Well, I see what is the problem: in the "package views" some pins named N/C.
I look for a third closest string for each found pin name. Having an another N/C pin name in the same line got assigned as pin direction.

I will modify my loop to check all labels (including the pin number label) distance and pick the closest label.
@sebcaux please do not merge it yet. If you have a so sweet testing infrastructure in place let me add some test cases for the pin direction parsing as well.
Hm it looks like we have some encoding/poppler version differences between Linux (at me all tests are passing) and the appveyor Windows builds. I will investigate it.