From ef52c42b1c5e7384f0d1b01af3ce3c31597f744c Mon Sep 17 00:00:00 2001 From: Sorgelig Date: Fri, 1 Jul 2022 04:31:04 +0800 Subject: [PATCH] menu: alternating info between battery and resolution if battery available. --- menu.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/menu.cpp b/menu.cpp index f5c3474..589ae20 100644 --- a/menu.cpp +++ b/menu.cpp @@ -625,6 +625,7 @@ static void printSysInfo() struct battery_data_t bat; int hasbat = getBattery(0, &bat); int n = 2; + static int flip = 0; char str[40]; OsdWrite(n++, info_top, 0, 0); @@ -648,7 +649,8 @@ static void printSysInfo() if (!j) infowrite(n++, "No network"); if (j<2) infowrite(n++, ""); - if (hasbat) + flip = (flip + 1) & 3; + if (hasbat && (flip & 2)) { infowrite(n++, "");