summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoungjae Cho <y0.cho@samsung.com>2019-09-18 11:52:33 +0900
committerYoungjae Cho <y0.cho@samsung.com>2019-09-18 12:08:12 +0900
commit6d3732762f4b2c2a331bacf4c82c206a2454b32f (patch)
treec1003872a26060e2eb6d3ceec9eb6434ea2d7e8b
parentc710dd5b58bbb4800becf67529bce32fca63f8ed (diff)
downloaddevice-manager-plugin-emul-6d3732762f4b2c2a331bacf4c82c206a2454b32f.tar.gz
device-manager-plugin-emul-6d3732762f4b2c2a331bacf4c82c206a2454b32f.tar.bz2
device-manager-plugin-emul-6d3732762f4b2c2a331bacf4c82c206a2454b32f.zip
Add support for voltage_now, voltage_average, temperature informationsubmit/tizen/20190918.071926accepted/tizen/unified/20190919.065346
Change-Id: I3a623dd4919354da3ea4fb0a0a023e773aaddeaf Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
-rw-r--r--hw/battery/battery.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/battery/battery.c b/hw/battery/battery.c
index 86923ee..184cee0 100644
--- a/hw/battery/battery.c
+++ b/hw/battery/battery.c
@@ -230,6 +230,16 @@ static int battery_get_current_state(
info.current_average = -1000; /* uA */
}
+ /* Since there are no nodes for
+ * voltage_now, voltage_average, temperature
+ * in the emulator,
+ * use values similar to TM1.
+ */
+ info.voltage_now = 4000000;
+ info.voltage_average = 4000000;
+
+ info.temperature = 300;
+
ret = get_power_source(info.online, &val);
if (ret < 0)
return ret;