Add support for voltage_now, voltage_average, temperature information 92/214092/3 accepted/tizen/unified/20190919.065346 submit/tizen/20190918.071926
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 18 Sep 2019 02:52:33 +0000 (11:52 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Wed, 18 Sep 2019 03:08:12 +0000 (12:08 +0900)
Change-Id: I3a623dd4919354da3ea4fb0a0a023e773aaddeaf
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
hw/battery/battery.c

index 86923ee..184cee0 100644 (file)
@@ -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;