I have been looking at the code and noticed that its was using select is an odd way.
The oddity is that the fd is not set O_NONBLOCK.
The end result of using O_NONBLOCK is that the code will report the temperatures as soon the sensor reports them.
Takes 0.386s vs the old code taking 0.558s. Tested with a TEMPer2.
If you are interest in my refactors let me know and I will raise a PR.
My refactor is in barry-scott@772d8c0.
Testers Needed
Tests Passing
I have been looking at the code and noticed that its was using select is an odd way.
The oddity is that the fd is not set O_NONBLOCK.
The end result of using O_NONBLOCK is that the code will report the temperatures as soon the sensor reports them.
Takes 0.386s vs the old code taking 0.558s. Tested with a TEMPer2.
If you are interest in my refactors let me know and I will raise a PR.
My refactor is in barry-scott@772d8c0.
Testers Needed
Tests Passing