diff options
-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; } |