adafruit / Adafruit_Python_PlatformDetect

MIT License
59 stars 238 forks source link

chip.py returns true for similar strings #178

Closed twa127 closed 3 years ago

twa127 commented 3 years ago

Hi,

In chip.py the python operator 'in' is used for chip detection, but this can cause problems for similar strings e.g.

if self.detector.check_dt_compatible_value("sun50i-h6"): and if self.detector.check_dt_compatible_value("sun50i-h616"): will both be true.

makermelissa commented 3 years ago

Good point. h616 should be checked before h6

twa127 commented 3 years ago

yeah that will do it, shall I commit an update?

makermelissa commented 3 years ago

Please and thank you.

twa127 commented 3 years ago

okay done :-)

makermelissa commented 3 years ago

Thank you!