TinyCircuits / TinyCircuits-Thumby-Code-Editor

https://code.thumby.us/
GNU General Public License v3.0
30 stars 20 forks source link

Possible API typo: HWID #50

Open ace-dent opened 1 year ago

ace-dent commented 1 year ago

When thumby.py imports thumbyHardware.py, it exposes IDPin. This is likely a typo and should be HWID. There is no reason to make IDPin accessible through the API. Affects both lib and lib-emulator versions (here & here).

ace-dent commented 1 year ago

Follow-up question: if HWID is available, should i2c and spi be accessible through the API? Why is it required to be exposed to third-party code? Should this be part of thumbyGraphics.py where initiation is self-contained just importing HWID (here).

masonova1 commented 1 year ago

None of the software we've ever seen actually uses the ID pin, so I'm fine with deprecating it. We just need to de-duplicate HWID-getting code inside of main from thumbyHardware, and then we can get the HWID straight from thumbyHardware and remove the import. I'll do this soon.