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

Add two options to tweak pin names #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Franck78
Copy link

@Franck78 Franck78 commented Feb 5, 2021

1/ Length of tested string
The default size uConfig uses to test a string extracted from a pdf is
10. Sometimes it is too short. You see some vanishing pins.

2/ Delete a part of the pin name
Sometimes pin names have a prefix like (GPIO)P2[4]
Now you get P2[4] instead.

> ./uconfig
error (1): input file is needed
Utilisation : ./uconfig [options] file
uConfig command line interface.
uconfig datasheet.pdf [-o output.lib] [-r rule.kss] [-d] [-B pageBegin [-E pageEnd]] [-S deleteString]

Options :
  -h, --help                    Afficher cette aide.
  -v, --version                 Afficher les informations de version.
  -o, --out <out>               Output file with pin list.
  -d, --debug                   Debug option to view intermediate steps.
  -r, --rule <rule>             KSS rule file to organize component.
  -B, --pageBegin <N>           Work on pdf pageBegin.
  -E, --pageEnd <N>             Work on pageBegin to pageEnd.
  -S, --deleteString <string>   Delete string from pin names.
  -l, --pinNameLength <length>  Max pin name length (default=10).

make check
********* Start testing of PdfExtract *********
Config: Using QtTest library 5.12.7, Qt 5.12.7 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 7.5.0)
PASS   : PdfExtract::initTestCase()
PASS   : PdfExtract::test_casePIC32MM_GPM()
PASS   : PdfExtract::test_casedsPIC33EPGS()
PASS   : PdfExtract::test_ucc27212a_q1()
PASS   : PdfExtract::test_ATtiny24()
PASS   : PdfExtract::test_IFX9201SG()
PASS   : PdfExtract::test_ticc()
PASS   : PdfExtract::cleanupTestCase()
Totals: 8 passed, 0 failed, 0 skipped, 0 blacklisted, 590ms
********* Finished testing of PdfExtract *********


Almost every pin is skipped because the name is >10 chars
uconfig0
Package complete without the prefix. Note pin7 have a false name extracted from the "Page 15 of 45"
uconfig1

I have problems with Qstring and extracting ascii from it. Maybe some lines can be rewritten.

1/ Length of tested string
The default size uConfig uses to test a string extracted from a pdf is
10. Sometimes it is too short. You see some vanishing pins.

2/ Delete a part of the pin name
Sometimes pin names have a prefix like (GPIO)P2[4]
Now you get P2[4] instead.
@sebcaux
Copy link
Member

sebcaux commented Feb 6, 2021

Thank you very much for your interrest and your contribution.
I do not stop this project, I just have too much work...

You perfectly understand that this parameter (pinNameLength) is a key to remove false positives and need to be tuned between different manufacturers. This one need to be added as a configuration of pdf_extractor. But you should not pass as an argument of the methods extractPins or pinSearch. It should be pass as a setter method or maybe better, inside a struct that contain all theses type of tweak name.

For your second suggestion, I think deleteString cannot be put in pdf_extractor. It's not is role to do that. This parametter maybe added to the pinruler system, after the extraction and moved to kss file rule. What do you think ?

@Franck78
Copy link
Author

Franck78 commented Feb 6, 2021

Hello Seb

I used the "search and replace" deleteString just where you added your "delete notes" regexp. Thus, for me, the tweak is applied at the right moment.
The remaining of the code is "how to pass a string from the GUI to this single line" !
Populate it from the KSS only, annoying I think to have to restart all for editing a KSS prop.
Populate the field in the Wizard from the KSS, yes.

The other tweak (pinNamelength) followed the exact same path. From "15" to GUI.

Now, passing some parameters from the GUI to the core inside of a function, no idea what is best. Passing param as function argument is normal for me.
(tu as mon mail si tu veux écrire en français et oui le temps, problème de tout le monde.)

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 this pull request may close these issues.

None yet

2 participants