jrgp / linfo

Linfo PHP Server Health Status
MIT License
361 stars 73 forks source link

Add an extensions to collect temp sensor of raspberry pi #65

Closed chraac closed 7 years ago

chraac commented 7 years ago

U

jrgp commented 7 years ago

Thanks for making this PR. One thing though: can you merge this functionality into the getTemps() function in src/Linfo/OS/Linux.php? As in at the end of the function and use Common::getIntFromFile() to get the number rather than using fgets/etc.

The /sys/class/thermal/ tree is likely used by other hardware aside from raspberry pi and it'd be great if that could be included as part of the main Linux class rather than requiring a separate extension.

chraac commented 7 years ago

Thanks for replying, and i will refactrying code according to you suggestion

jrgp commented 7 years ago

nice :) i look forward to your next pr