From 066d0ecf4d2c8d078c597fb4d825048b86d9dc41 Mon Sep 17 00:00:00 2001 From: Samantha Wright Date: Mon, 5 Aug 2024 21:20:21 -0700 Subject: [PATCH] support extra checks from status for battery level changes while powered down (bug #3443) --- ARES/system/power.lsl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ARES/system/power.lsl b/ARES/system/power.lsl index db9811f..40dd5ce 100644 --- a/ARES/system/power.lsl +++ b/ARES/system/power.lsl @@ -266,7 +266,6 @@ main(integer src, integer n, string m, key outs, key ins, key user) { string ann; if(sys == "drainprotect") { - list opt_de = ["disabled", "enabled"]; list opt_standard = ["off", "on", "toggle"]; @@ -503,7 +502,11 @@ main(integer src, integer n, string m, key outs, key ins, key user) { string status = gets(argv, ci + 1); // echo("POWER notify: " + cmd + " " + status); - if(cmd == "wifi") { + if(cmd == "charged") { + // integer charge_bootable = (status == "y"); + // no code required here - will occur automatically + + } else if(cmd == "wifi") { // block non-attached devices wifi_state = (status == "y"); setdbl("status", ["remote-device"], (string)wifi_state);