diff options
author | lokilee73 <changjoo.lee@samsung.com> | 2020-06-23 10:31:33 +0900 |
---|---|---|
committer | lokilee73 <changjoo.lee@samsung.com> | 2020-06-23 11:40:06 +0900 |
commit | 1b0ea452fdc78a1569614d03f6f0e68620b72e4b (patch) | |
tree | 7c66f4e98447b9b341a981d89e35cc0a1fc4fa4b | |
parent | 75249e97ea1c9901030f74a985b993e10445f7d4 (diff) | |
download | device-tm1-1b0ea452fdc78a1569614d03f6f0e68620b72e4b.tar.gz device-tm1-1b0ea452fdc78a1569614d03f6f0e68620b72e4b.tar.bz2 device-tm1-1b0ea452fdc78a1569614d03f6f0e68620b72e4b.zip |
Fix dbus_get_battery_info for info.temperature / 10
(Before)
device_battery_get_property(DEVICE_BATTERY_PROPERTY_TEMPERATURE=286
device_thermal_get_temperature(DEVICE_THERMAL_BATTERY=28
(After)
device_battery_get_property(DEVICE_BATTERY_PROPERTY_TEMPERATURE=28
device_thermal_get_temperature(DEVICE_THERMAL_BATTERY=28
Change-Id: I95ad361a0193f635ae57f93ba4d07c18f730afbd
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
-rwxr-xr-x[-rw-r--r--] | hw/battery/battery.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/battery/battery.c b/hw/battery/battery.c index 8be3580..b82897e 100644..100755 --- a/hw/battery/battery.c +++ b/hw/battery/battery.c @@ -148,7 +148,7 @@ static void uevent_delivered(struct udev_device *dev) val = (char *)udev_device_get_property_value(dev, "POWER_SUPPLY_TEMP"); if (!val) return; - info.temperature = atoi(val); + info.temperature = atoi(val) / 10; udata.updated_cb(&info, udata.data); } @@ -294,7 +294,7 @@ static int battery_get_current_state( _E("Failed to get value of (%s, %d)", path, ret); return ret; } - info.temperature = val; + info.temperature = val / 10; updated_cb(&info, data); |