Change low battery threshold

This commit is contained in:
Јован Ђокић-Шумарац 2022-05-19 04:52:30 +02:00
parent 6c36abf3fb
commit 54f8758f1f

2
main.c
View file

@ -74,7 +74,7 @@ int main(void) {
fscanf(battery,"%d", &cap);
fscanf(status, "%s", bat_status);
curstate = cap <= 105 && strcmp(bat_status, "Discharging") == 0 ? Alert : Normal;
curstate = cap <= 15 && strcmp(bat_status, "Discharging") == 0 ? Alert : Normal;
if (curstate == Alert && (time(NULL) - lastalert >= 180 || laststate == Normal)) {
alert();
lastalert = time(NULL);