/* Convert the data into the expected Android-level format */
for (c=0; c<num_fields; c++) {
- data->data[c] = sensor[s].ops.transform
- (s, c, current_sample);
+ data->data[c] = sensor[s].ops.transform (s, c, current_sample);
- ALOGV("\tfield %d: %f\n", c, data->data[c]);
+ ALOGV("\tfield %d: %g\n", c, data->data[c]);
current_sample += sensor[s].channel[c].size;
}
requested_sampling_rate = 1000000000.0 / ns;
- ALOGV("Entering set delay S%d (%s): current rate: %f, requested: %f\n",
+ ALOGV("Entering set delay S%d (%s): current rate: %g, requested: %g\n",
s, sensor[s].friendly_name, sensor[s].sampling_rate,
requested_sampling_rate);
* so try to store it in sensor's scale file
*/
if (sysfs_write_float(sysfs_path, scale) == -1 && errno == ENOENT) {
- ALOGE("Failed to store scale[%f] into %s - file is missing", scale, sysfs_path);
+ ALOGE("Failed to store scale[%g] into %s - file is missing", scale, sysfs_path);
/* Store failed, try to store the scale into channel specific file */
for (c = 0; c < num_channels; c++)
{
sprintf(sysfs_path, BASE_PATH "%s", dev_num,
sensor_catalog[catalog_index].channel[c].scale_path);
if (sysfs_write_float(sysfs_path, scale) == -1)
- ALOGE("Failed to store scale[%f] into %s", scale, sysfs_path);
+ ALOGE("Failed to store scale[%g] into %s", scale, sysfs_path);
}
}
}
sprintf(sysfs_path, SENSOR_SCALE_PATH, dev_num, prefix);
if (!sysfs_read_float(sysfs_path, &scale)) {
sensor[s].scale = scale;
- ALOGI("Scale path:%s scale:%f dev_num:%d\n",
+ ALOGV("Scale path:%s scale:%g dev_num:%d\n",
sysfs_path, scale, dev_num);
} else {
sensor[s].scale = 1;
sensor[s].channel[c].scale = scale;
sensor[s].scale = 0;
- ALOGI( "Scale path:%s "
- "channel scale:%f dev_num:%d\n",
+ ALOGV( "Scale path:%s "
+ "channel scale:%g dev_num:%d\n",
sysfs_path, scale, dev_num);
}
}