support extra checks from status for battery level changes while powered down (bug #3443)

main
Samantha Wright 2024-08-05 21:20:21 -07:00
parent 250f7da43e
commit 066d0ecf4d
1 changed files with 5 additions and 2 deletions

View File

@ -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);