From: Sarah Fischmann Date: Fri, 31 Aug 2018 14:03:00 +0000 (-0400) Subject: add humidity for lm_sensors version >= 0x431 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1ea6b032ca41766cd4a35e7474715d1d40a99a16;p=collectd.git add humidity for lm_sensors version >= 0x431 --- diff --git a/src/sensors.c b/src/sensors.c index 6d51101c..6106df39 100644 --- a/src/sensors.c +++ b/src/sensors.c @@ -367,6 +367,8 @@ static int sensors_load_conf(void) { (feature->type != SENSORS_FEATURE_TEMP) && #if SENSORS_API_VERSION >= 0x402 (feature->type != SENSORS_FEATURE_CURR) && +#endif +#if SENSORS_API_VERSION >= 0x431 (feature->type != SENSORS_FEATURE_HUMIDITY) && #endif (feature->type != SENSORS_FEATURE_POWER)) { @@ -387,6 +389,8 @@ static int sensors_load_conf(void) { (subfeature->type != SENSORS_SUBFEATURE_TEMP_INPUT) && #if SENSORS_API_VERSION >= 0x402 (subfeature->type != SENSORS_SUBFEATURE_CURR_INPUT) && +#endif +#if SENSORS_API_VERSION >= 0x431 (subfeature->type != SENSORS_SUBFEATURE_HUMIDITY_INPUT) && #endif (subfeature->type != SENSORS_SUBFEATURE_POWER_INPUT)) @@ -522,6 +526,8 @@ static int sensors_read(void) { #if SENSORS_API_VERSION >= 0x402 else if (fl->feature->type == SENSORS_FEATURE_CURR) type = "current"; +#endif +#if SENSORS_API_VERSION >= 0x431 else if (fl->feature->type == SENSORS_FEATURE_HUMIDITY) type = "humidity"; #endif