bmsd/ispindels.c

changeset 572
7a03181d29a3
parent 568
6f3c24e21deb
child 578
e75ce5bbda73
--- a/bmsd/ispindels.c	Sat Dec 14 21:04:47 2019 +0100
+++ b/bmsd/ispindels.c	Sun Dec 15 15:08:09 2019 +0100
@@ -113,6 +113,11 @@
 	syslog(LOG_NOTICE, "Unknown keyword `%s' from `%s'", key, node);
     }
 
+    if (ispindel->battery < LOWBATT)
+	ispindel->alarm |= ALARM_FLAG_BATTERY;
+    else
+	ispindel->alarm &= ~ALARM_FLAG_BATTERY;
+
     ispindel_dump(ispindel);
 
     if (new_ispindel || do_update) {

mercurial