#include "Temperature.h" #include #include namespace fs = std::filesystem; namespace { // e.g. 46000 for 46C fs::path temp_path{"/sys/class/thermal/thermal_zone0/temp"}; } Temperature::Temperature() { } int Temperature::read_degree() const { std::string contents {Reichwein::File::getFile(temp_path)}; return std::stoul(contents) / 1000; }