Strona działa najlepiej z włączonym JavaScript.
Strona główna
Odkrywaj
Pomoc
Zaloguj się
rinri
/
slstatus
Obserwuj
1
Polub
0
Forkuj
0
Kod
Zgłoszenia
0
Oczekujące zmiany
0
Wydania
0
Wiki
Aktywność
Przeglądaj źródła
battery_remaining: check for division by zero
master
Aaron Marcher
6 lat temu
rodzic
a546d4b585
commit
aa8654795d
1 zmienionych plików
z
4 dodań
i
0 usunięć
Widok podzielony
Opcje porównania
Pokaż statystyki
Ściągnij plik aktualizacji
Ściągnij plik porównania
+4
-0
components/battery.c
+ 4
- 0
components/battery.c
Wyświetl plik
@@ -107,6 +107,10 @@
return NULL;
}
if (current_now == 0) {
return NULL;
}
timeleft = (double)charge_now / (double)current_now;
h = timeleft;
m = (timeleft - (double)h) * 60;
Napisz
Podgląd
Ładowanie…
Anuluj
Zapisz