From: Patrick Porlan Date: Thu, 18 Dec 2014 09:04:06 +0000 (+0100) Subject: Tweak a few traces X-Git-Tag: android-x86-7.1-r1~39^2~12 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d554e08;hp=60bf4695484b31d282ee89b03391be50e125d828;p=android-x86%2Fhardware-intel-libsensors.git Tweak a few traces %f -> %g (don't need all these digits) ALOGI -> ALOGV (a matter of taste) Change-Id: Ib65ac6a0fea186cb52da9fa235932b2026bca42b Signed-off-by: Patrick Porlan --- diff --git a/control.c b/control.c index 57bad95..abf9c7c 100644 --- a/control.c +++ b/control.c @@ -1326,10 +1326,9 @@ static int propagate_sensor_report (int s, struct sensors_event_t *data) /* Convert the data into the expected Android-level format */ for (c=0; cdata[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; } @@ -1565,7 +1564,7 @@ int sensor_set_delay (int s, int64_t ns) 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); diff --git a/enumeration.c b/enumeration.c index bb1831d..54467f2 100644 --- a/enumeration.c +++ b/enumeration.c @@ -330,14 +330,14 @@ static void add_sensor (int dev_num, int catalog_index, int use_polling) * 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); } } } @@ -345,7 +345,7 @@ static void add_sensor (int dev_num, int catalog_index, int use_polling) 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; @@ -360,8 +360,8 @@ static void add_sensor (int dev_num, int catalog_index, int use_polling) 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); } }