uConfig icon indicating copy to clipboard operation
uConfig copied to clipboard

[pdf_extract]Add support for parsing pin directions

Open martonmiklos opened this issue 6 years ago • 6 comments

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: kep Result: kep

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.

martonmiklos avatar Jan 08 '19 19:01 martonmiklos

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.

sebcaux avatar Jan 08 '19 21:01 sebcaux

Auhc, I was not aware of the test thus I have not ran them. Let me fix them.

martonmiklos avatar Jan 08 '19 21:01 martonmiklos

Yes I add it because with this kind of code it's easy to one thing and broke tens others !

sebcaux avatar Jan 08 '19 21:01 sebcaux

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. kep

I will modify my loop to check all labels (including the pin number label) distance and pick the closest label.

martonmiklos avatar Jan 08 '19 21:01 martonmiklos

@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.

martonmiklos avatar Jan 08 '19 22:01 martonmiklos

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.

martonmiklos avatar Mar 23 '19 09:03 martonmiklos