From 0dbe05dd4690e137bff66d81dd5314a6b3cd851b Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 28 Jan 2022 16:33:06 +0800 Subject: [PATCH] document magic constants --- services/status/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/services/status/src/main.rs b/services/status/src/main.rs index 9d087f3c8..55f478d81 100644 --- a/services/status/src/main.rs +++ b/services/status/src/main.rs @@ -358,6 +358,7 @@ fn xmain() -> ! { // have to clear the entire rectangle area, because the SSID has a variable width and can be much wider or shorter than battstats gam.draw_rectangle(status_gid, stats_rect).ok(); + // 0xdddd and 0xffff are what are returned when the EC is too busy to respond/hung, or in reset, respectively if stats.current == -8739 /* 0xdddd */ || stats.voltage == 0xdddd || stats.voltage == 0xffff || stats.soc == 0xdd || stats.soc == 0xff {