Closed HanYangZhao closed 4 years ago
Yes. It is likely not supported by your reader, or the reader is in some state in which it is not allowed to call that function. I cannot do much about that.
Seems to be a duplicate of #71
That's interesting because with the Universal Reader Assistant software, I was able to get the temperature while the reader is in continuous read
I dug a bit further with the URA assistant by printing the serial log and was able to see the temperature being sent by the reader. So I went to check the doc and found the following
Does this suggest something?
From what I understand, the temperature is collected by the statusListener, It seems to be similar to the ReadListener used for tag reading. I was however unable to find the format of the data that's being passed(something similar to TMR_TagReadData). Seems to be this TMR_Reader_StatsFlag or TMR_Reader_StatsValues
Yeah, it seems that TMR_addStatsListener could be used, but it is not implemented right now. Contributions are welcome :)
I have attempted to add the TMR_addStatsListener on my fork. So far it doesn't return any error, but the callback doesn't seem to get called. Maybe you have some insights?
Unfortunatelly not.
This was fixed by @HanYangZhao in https://github.com/gotthardp/python-mercuryapi/commit/7f493198056824cba9f8b11e89eadf46c4720de2. Function enable_stats
may now be used to retrieve temp (and other stats) during reading. Thanks a lot again!
Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "./thingMagicRead2.py", line 48, in heartbeat temp = reader.get_temperature() RuntimeError: Unimplemented feature
I'm assuming this is an error returned from the MercuryAPI?