Add blank line between declaration and code. Prefer we not assume bool and BOOL are the same. Use if statement and explicit assignment of TRUE to result if all conditions are true. First conditio...
Add blank line between declaration and code.
Prefer we not assume bool and BOOL are the same. Use if statement and explicit assignment of TRUE to result if all conditions are true.
First condition seems backward.
Second and third conditions seem problematic. You will never trigger an AC power loss alarm. Should remove them I think.