Closed HanYangZhao closed 4 years ago
Cool, thanks!
Hello, for consistency with the API and clarity I renamed your "start_stats" to "enable_stats". It doesn't start anything-- it really just enables it. https://github.com/gotthardp/python-mercuryapi/commit/03f95e617b8e9cb46c9f2084c437afaee8f8125e
I've added a partial support for the statsListener.
I've added a function called
The callback object has 4 attribute : temperature, antenna, protocol and frequency. There are a few more attribute in the stats that is supported by the C API, but i haven't added themreader.start_stats(callback)
, which enables the statsListener. It must be called before reader.start_reading() or otherwise it doesn't seem to work. The code in the callback can for example :