summaryrefslogtreecommitdiff
path: root/apps/gui/gwps-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r--apps/gui/gwps-common.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 3af52b5396..37f4fea310 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -655,11 +655,27 @@ static char* get_tag(struct wps_data* wps_data,
655 655
656 case 'p': /* External power plugged in? */ 656 case 'p': /* External power plugged in? */
657 { 657 {
658 if(charger_inserted()) 658 if(charger_input_state==CHARGER)
659 return "p"; 659 return "p";
660 else 660 else
661 return NULL; 661 return NULL;
662 } 662 }
663#if defined(HAVE_CHARGE_CTRL) || \
664 defined (HAVE_CHARGE_STATE) || \
665 CONFIG_BATTERY == BATT_LIION2200
666 case 'c': /* Charging */
667 {
668 if (charge_state == CHARGING
669#ifdef HAVE_CHARGE_CTRL
670 || charge_state == TOPOFF
671#endif
672 ) {
673 return "c";
674 } else {
675 return NULL;
676 }
677 }
678#endif
663 } 679 }
664 break; 680 break;
665 681