Fix review findings in low battery alerts
- Respect the notifications-enabled setting - Notify only the lowest newly crossed threshold - Ignore implausible readings (boards without a battery sensor report 0 mV) - Wait for the device identity so the saved chemistry is used - Require two consecutive low readings before alerting - Re-arm and clear alerts on any link reset, not just explicit disconnect - Cancel stale notifications on re-arm and link reset - Scope notification ids per device and name the device in the body - Use the connector's shared NotificationService
This commit is contained in:
1 parent
7d55bf03df
commit
b6c1d73bf0
22 files changed
+138
-52
No files matched your search
@@ -4742,8 +4742,8 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
String get notification_lowBatteryTitle => 'Low battery';
|
||||
|
||||
@override
|
||||
String notification_lowBatteryBody(int percent) {
|
||||
return 'Device battery is at $percent%';
|
||||
String notification_lowBatteryBody(String deviceName, int percent) {
|
||||
return '$deviceName battery is at $percent%';
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in new issue
Block a user