cr / hx870

Python tools for the Standard Horizon HX870
GNU General Public License v3.0
21 stars 5 forks source link

Strip trailing zero from flash ID #34

Closed trivee closed 1 year ago

trivee commented 1 year ago

HX890 that I purchased just recently has a trailing zero in the flash ID. This was causing a spurious warning in check_flash_id().

cr commented 1 year ago

Heya, sorry for not getting round to this any earlier. Didn't mean to ignore your contribution.

Thanks a lot for catching the issue and providing the patch! I had an HX890 around for development and testing, but didn't keep it. It definitely didn't have the trailing null, but perhaps something about the factory-side programming changed?

Anyway, I have no way of testing whether stripping the trailing null has any averse side effects down the road, but I agree that it's probably safe to strip them just as we strip the ffs.