diff options
author | lokilee73 <changjoo.lee@samsung.com> | 2020-06-23 11:36:38 +0900 |
---|---|---|
committer | lokilee73 <changjoo.lee@samsung.com> | 2020-06-23 11:36:42 +0900 |
commit | a1aa0eadc339605f9fa49d0e725614f5987ded76 (patch) | |
tree | 969162d3b66d922c7e9aaa6adea1f1da7d10d1c1 | |
parent | c630720d6614f03436d4c58a23fbd5ca61de841b (diff) | |
download | device-tw3-a1aa0eadc339605f9fa49d0e725614f5987ded76.tar.gz device-tw3-a1aa0eadc339605f9fa49d0e725614f5987ded76.tar.bz2 device-tw3-a1aa0eadc339605f9fa49d0e725614f5987ded76.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: Ia123e143876152b492c67e6f51924e28b550e024
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
-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 b81b730..45ffe8f 100644 --- a/hw/battery/battery.c +++ b/hw/battery/battery.c @@ -150,7 +150,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); } @@ -296,7 +296,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); |