case SENSOR_TYPE_ACCELEROMETER:
/* Always consider the accelerometer accurate */
data->acceleration.status = SENSOR_STATUS_ACCURACY_HIGH;
+ if (sensor[s].quirks & QUIRK_BIASED)
+ calibrate_accel(s, data);
denoise(s, data);
break;
/* Acquire a sample value for sensor s / channel c through sysfs */
- if (input_path[0]) {
+ if (sensor[s].channel[c].input_path_present) {
sprintf(sysfs_path, BASE_PATH "%s", dev_num, input_path);
ret = sysfs_read_float(sysfs_path, &val);
if (!ret)
return val * correction;
- };
+ }
- if (!raw_path[0])
+ if (!sensor[s].channel[c].raw_path_present)
return 0;
sprintf(sysfs_path, BASE_PATH "%s", dev_num, raw_path);
/* Acquire a sample value for sensor s / channel c through sysfs */
- if (input_path[0]) {
+ if (sensor[s].channel[c].input_path_present) {
sprintf(sysfs_path, BASE_PATH "%s", dev_num, input_path);
ret = sysfs_read_uint64(sysfs_path, &val);
return val * correction;
};
- if (!raw_path[0])
+ if (!sensor[s].channel[c].raw_path_present)
return 0;
sprintf(sysfs_path, BASE_PATH "%s", dev_num, raw_path);