This commit is contained in:
OneOfEleven
2023-09-24 00:06:10 +01:00
parent 8ae0b2cc67
commit 8b44428ea5
8 changed files with 114 additions and 126 deletions

15
main.c
View File

@@ -98,16 +98,11 @@ void Main(void)
BATTERY_GetReadings(false);
{ // count the number of menu list items
unsigned int hidden = 0;
gMenuListCount = 0;
while (MenuList[gMenuListCount].name[0] != '\0')
if (MenuList[++gMenuListCount].hidden != 0)
hidden++;
// disable the items marked hidden
gMenuListCount -= 8;
//gMenuListCount -= hidden;
}
// count the number of menu list items
gMenuListCount = 0;
while (MenuList[gMenuListCount].name[0] != '\0')
gMenuListCount++;
gMenuListCount -= 8; // disable the last 'n' items
if (!gChargingWithTypeC && !gBatteryDisplayLevel)
{