It seems the Gauss to uT conversion wasn't done in the case where we have input
paths for magnetometers.
Change-Id: I9c89004d18dff47ee0c2d75df744290c901dc226
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
sprintf(sysfs_path, BASE_PATH "%s", dev_num, input_path);
ret = sysfs_read_float(sysfs_path, &val);
- if (!ret)
+ if (!ret) {
+ if (sensor[s].type == SENSOR_TYPE_MAGNETIC_FIELD)
+ return CONVERT_GAUSS_TO_MICROTESLA (val * correction);
return val * correction;
+ }
}
if (!sensor[s].channel[c].raw_path_present)