ccwienk / temper

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

Add support for recent firmwares #9

Closed corsac-s closed 1 year ago

corsac-s commented 2 years ago

I just received two devices from PCsensor: one TEMPerGold and one TEMPer2, both with updated firmwares. Here's the naive PR to add support for them.

netlore commented 2 years ago

I think it might be better to go with:-

if info['firmware'][:14] == 'TEMPerGold_V3.':

Just assuming that all 3.X firmwares will be compatible, I understand there is a 3.3 out there too?

eode commented 1 year ago

I prefer this as-is -- we'd rather add definitively known cases than assume future versions of the hardware will be sane.

eode commented 1 year ago

Thank you, @corsac-s .

eode commented 1 year ago

@corsac-s Will you please add these to the grid of supported devices in README.md?

corsac-s commented 1 year ago

@corsac-s Will you please add these to the grid of supported devices in README.md?

Here it is. I've added the devices instead of just editing the firmware versions, I hope it's ok for you.

eode commented 1 year ago

@corsac-s Thanks, looks great. I'll release the next version soon.

eode commented 1 year ago

I haven't run into this issue -- how frequent is it? Do you have a repeatable case we can use for testing?

In the mean time, I've created the branch stuck_temp_fix that you can check out.

Please let me know if it helps. If it does, I'll optimize it and include it (at least as a configurable option). It will probably be disabled by default, because it does incur a +50% overhead in run time for each device -- or, if optimized, would still incur a lot of irregularity in the call time.

corsac-s commented 1 year ago

I haven't run into this issue -- how frequent is it? Do you have a repeatable case we can use for testing?

In the mean time, I've created the branch stuck_temp_fix that you can check out.

Please let me know if it helps. If it does, I'll optimize it and include it (at least as a configurable option). It will probably be disabled by default, because it does incur a +50% overhead in run time for each device -- or, if optimized, would still incur a lot of irregularity in the call time.

I guess this is about #13 ? I'll try the branch and report back.