diff options
author | Bill Richardson <wfrichar@chromium.org> | 2014-04-02 12:18:30 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-04-02 23:43:49 +0000 |
commit | a3b41f1ebcd5d279d9b989ca3f341a1b6a6eb47b (patch) | |
tree | ee51e79e95f8d7bc3380836a5d4e3a454ff6c370 | |
parent | 2cd8a20204409b0acb4083c530a58d1ee0a1cac0 (diff) | |
download | chrome-ec-a3b41f1ebcd5d279d9b989ca3f341a1b6a6eb47b.tar.gz |
More info in console messages from charge state v2
Instead of printing "problem 2", print "problem 2 (set current)".
BUG=none
BRANCH=ToT
TEST=manual
Let the battery charge, watch the EC console for problems. Observe the new
messages.
Change-Id: I787c2fba4630421cdbd02050e96d8203b0268b3f
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/192873
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | common/charge_state_v2.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c index 567ec29fa1..4a8d13f4c0 100644 --- a/common/charge_state_v2.c +++ b/common/charge_state_v2.c @@ -64,6 +64,16 @@ enum problem_type { NUM_PROBLEM_TYPES }; +static const char * const prob_text[] = { + "static update", + "set voltage", + "set current", + "post init", + "chg params", + "batt params", + "custom profile", +}; +BUILD_ASSERT(ARRAY_SIZE(prob_text) == NUM_PROBLEM_TYPES); /* * TODO(crosbug.com/p/27639): When do we decide a problem is real and not @@ -71,7 +81,8 @@ enum problem_type { */ static void problem(enum problem_type p, int v) { - ccprintf("[%T %s: problem %d, value 0x%x]\n", __FILE__, p, v); + ccprintf("[%T %s: problem %d (%s), value 0x%x]\n", __FILE__, + p, prob_text[p], v); problems_exist = 1; } |