Change low battery threshold
This commit is contained in:
parent
6c36abf3fb
commit
54f8758f1f
1 changed files with 1 additions and 1 deletions
2
main.c
2
main.c
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue