added SXMO_LOCK_SCREEN_OFF and SXMO_LOCK_SUSPEND environment variables to set a target stage from the environment

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
master
Maarten van Gompel 4 years ago
parent 642bf1cc27
commit 1b45e7743d
  1. 6
      programs/sxmo_screenlock.c

@ -449,6 +449,12 @@ main(int argc, char **argv) {
const char* rtcwakeinterval = getenv("SXMO_RTCWAKEINTERVAL");
if (rtcwakeinterval != NULL) wakeinterval = atoi(rtcwakeinterval);
const char* screen_off = getenv("SXMO_LOCK_SCREEN_OFF");
if (screen_off != NULL && atoi(screen_off)) target = StateNoInputNoScreen;
const char* suspend = getenv("SXMO_LOCK_SUSPEND");
if (suspend != NULL && atoi(suspend)) target = StateSuspend;
//parse command line arguments
for (i = 1; i < argc; i++) {
if(!strcmp(argv[i], "-h")) {

Loading…
Cancel
Save