summaryrefslogtreecommitdiffstats
path: root/src/lmsensorschip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lmsensorschip.cpp')
-rw-r--r--src/lmsensorschip.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lmsensorschip.cpp b/src/lmsensorschip.cpp
index 1a15493..d78a0a9 100644
--- a/src/lmsensorschip.cpp
+++ b/src/lmsensorschip.cpp
@@ -50,10 +50,15 @@ const sensors_chip_name *LMSensorsChip::getChipName()
void LMSensorsChip::createSensors()
{
if(!chip_name) return;
- const sensors_feature_data *data;
int nr1= 0;
int nr2= 0;
+#if SENSORS_API_VERSION < 0x400 /* libsensor 3 code */
+ const sensors_feature_data *data;
data= sensors_get_all_features(*chip_name, &nr1, &nr2);
+#else
+ const sensors_feature *data;
+ data= sensors_get_features(chip_name, &nr1);
+#endif
while(data) {
LMSensor *sensor= new LMSensor(this);
if( !sensor->init(&data,&nr1,&nr2) )