get rid of macros
This commit is contained in:
@@ -4,10 +4,6 @@
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
|
||||
#define REL_METRICS_PATH "/../../gpu_metrics" // gpu_metrics path relative to hwmon path
|
||||
#define MAX_METRICS_LENGTH 512 // length of the metrics buffer
|
||||
|
||||
/* clean abstraction for gpu_metrics or metrics in filesystem in sane units */
|
||||
|
||||
namespace gpu {
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
namespace gpu {
|
||||
|
||||
const std::string rel_metrics_path = "/../../gpu_metrics"; // gpu_metrics path relative to hwmon path
|
||||
constexpr uint16_t max_metrics_length = 512; // length of the metrics buffer
|
||||
|
||||
/* takes pointer to a target gpu::sensors struct and updates its hwmon path and detects gpu_metrics */
|
||||
void detectHwmon(gpuSensors* target, const std::string& pci) {
|
||||
target->hwmon = utils::getFirstDir("/sys/bus/pci/devices/" + pci + "/hwmon");
|
||||
|
||||
Reference in New Issue
Block a user