ccwienk / temper

Simple python for accessing TEMPer USB thermometers
MIT License
35 stars 27 forks source link

Fix TEMPerHUM Firmware Selection Bug #18

Closed OwenBrakeParallelSystems closed 1 year ago

OwenBrakeParallelSystems commented 1 year ago

This fixed a bug I was having with the TEMPerHUM where it would intermittently fail to fetch data. It turns out the string "TEMPerHUM_V3.9" is only 14 characters long. The TEMPerHUM device has a total firmware string of "TEMPerHUM_V3.9 TEMPerHUM_V3.9". This leads to the following results:

With the old code info["firmware"][:16] = "TEMPerHUM_V3.9 "

With my change info["firmware"][:14] = "TEMPerHUM_V3.9" Thus it matches the expected behavior, otherwise the firmware version comparison will fail

eode commented 1 year ago

Thank you for your contribution!