projects
/
profile
/
ivi
/
device-manager-plugin-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c05c399
)
implemented fake battery data
author
Kevron Rees
<kevron_m_rees@linux.intel.com>
Tue, 23 Oct 2012 18:19:09 +0000
(11:19 -0700)
committer
Kevron Rees
<kevron_m_rees@linux.intel.com>
Tue, 23 Oct 2012 18:19:09 +0000
(11:19 -0700)
device-manager-plugin-ivi.c
patch
|
blob
|
history
diff --git
a/device-manager-plugin-ivi.c
b/device-manager-plugin-ivi.c
index
191337f
..
41c4e6b
100644
(file)
--- a/
device-manager-plugin-ivi.c
+++ b/
device-manager-plugin-ivi.c
@@
-120,7
+120,9
@@
int OEM_sys_get_battery_present(int *value)
{
int ret = -1;
{
int ret = -1;
- ret = sys_get_int(BATTERY_PRESENT_PATH, value);
+ *value = 1;
+ ret = 0;
+// ret = sys_get_int(BATTERY_PRESENT_PATH, value);
DBG("path[%s], value[%d]", BATTERY_PRESENT_PATH, *value);
return ret;
DBG("path[%s], value[%d]", BATTERY_PRESENT_PATH, *value);
return ret;
@@
-133,9
+135,9
@@
int OEM_sys_get_battery_capacity(int *value)
static int charge_full = 0;
static int unit = 0;
int charge_now;
static int charge_full = 0;
static int unit = 0;
int charge_now;
- int capacity = 0;
+ int capacity =
10
0;
- if(charge_full == 0)
+
/*
if(charge_full == 0)
{
ret = sys_get_int(BATTERY_CHARGE_FULL_PATH, &charge_full);
if(ret != 0)
{
ret = sys_get_int(BATTERY_CHARGE_FULL_PATH, &charge_full);
if(ret != 0)
@@
-155,6
+157,7
@@
int OEM_sys_get_battery_capacity(int *value)
}
DEVIDE(charge_now, unit, capacity);
}
DEVIDE(charge_now, unit, capacity);
+ */
*value = capacity;
DBG("battery capacity value[%d]", *value);
*value = capacity;
DBG("battery capacity value[%d]", *value);
@@
-185,10
+188,10
@@
int OEM_sys_get_battery_charge_full(int *value)
int OEM_sys_get_battery_charge_now(int *value)
{
char* buf = NULL;
int OEM_sys_get_battery_charge_now(int *value)
{
char* buf = NULL;
- int ret =
-1
;
+ int ret =
0
;
int len = strlen("Charging\n");
int len = strlen("Charging\n");
- buf = sys_get_str(BATTERY_CHARGE_STATUS_PATH);
+
/*
buf = sys_get_str(BATTERY_CHARGE_STATUS_PATH);
if(buf){
if(0 == strncmp(buf, "Charging\n", len )){
if(buf){
if(0 == strncmp(buf, "Charging\n", len )){
@@
-200,7
+203,9
@@
int OEM_sys_get_battery_charge_now(int *value)
free(buf);
ret = 0;
free(buf);
ret = 0;
- }
+ }*/
+
+ *value = 1;
return ret;
}
return ret;
}
@@
-310,11
+315,11
@@
static const OEM_sys_devman_plugin_interface devman_plugin_interface_pinetrail
OEM_sys_set_null_1, //int (*OEM_sys_set_haptic_vibetones_enable) (int value);
OEM_sys_set_null_1, //int (*OEM_sys_set_haptic_vibetones_oneshot) (int value);
OEM_sys_set_null_1, //int (*OEM_sys_set_haptic_vibetones_enable) (int value);
OEM_sys_set_null_1, //int (*OEM_sys_set_haptic_vibetones_oneshot) (int value);
-
OEM_sys_get_null_1
, //int (*OEM_sys_get_battery_capacity) (int *value);
+
OEM_sys_get_battery_capacity
, //int (*OEM_sys_get_battery_capacity) (int *value);
OEM_sys_get_null_1, //int (*OEM_sys_get_battery_capacity_raw) (int *value);
OEM_sys_get_null_1, //int (*OEM_sys_get_battery_capacity_raw) (int *value);
-
OEM_sys_get_null_1
, //int (*OEM_sys_get_battery_charge_full) (int *value);
-
OEM_sys_get_null_1
, //int (*OEM_sys_get_battery_charge_now) (int *value);
-
OEM_sys_get_null_1
, //int (*OEM_sys_get_battery_present) (int *value);
+
OEM_sys_get_battery_charge_full
, //int (*OEM_sys_get_battery_charge_full) (int *value);
+
OEM_sys_get_battery_charge_now
, //int (*OEM_sys_get_battery_charge_now) (int *value);
+
OEM_sys_get_battery_present
, //int (*OEM_sys_get_battery_present) (int *value);
OEM_sys_get_null_1, //int (*OEM_sys_get_battery_health) (int *value);
OEM_sys_get_null_1, //int (*OEM_sys_get_battery_polling_required) (int *value);
OEM_sys_get_null_1, //int (*OEM_sys_get_battery_health) (int *value);
OEM_sys_get_null_1, //int (*OEM_sys_get_battery_polling_required) (int *value);