I think that the battery level reporting is broken on the HAL side. In lmctl: printf ("\tBattery status: %d ", P5 & 0x07); switch (P5 & 0x07) { case 0: printf ("(unavailable)\n"); break; case 1: case 2: printf ("(critical)\n"); break; case 3: case 4: printf ("(low)\n"); break; case 5: case 6: printf ("(good)\n"); break; case 7: printf ("(full)\n"); break;
in the csr addon: if (current_charge != 0) percentage = (100.0 / 7.0) * current_charge;
0 means unavailable, not empty (well, it might be unavailable because it's
empty, but that would only be useful if the previous level was non-zero). Makes
sense Richard?
I think that the battery level reporting is broken on the HAL side. In lmctl:
printf ("\tBattery status: %d ", P5 & 0x07);
switch (P5 & 0x07) {
case 0: printf ("(unavailable) \n"); break;
case 1:
case 2: printf ("(critical)\n"); break;
case 3:
case 4: printf ("(low)\n"); break;
case 5:
case 6: printf ("(good)\n"); break;
case 7: printf ("(full)\n"); break;
if (current_charge != 0)
percentage = (100.0 / 7.0) * current_charge;
in the csr addon:
0 means unavailable, not empty (well, it might be unavailable because it's
empty, but that would only be useful if the previous level was non-zero). Makes
sense Richard?