diff options
Diffstat (limited to 'apps/examples/relays')
-rw-r--r-- | apps/examples/relays/Makefile | 2 | ||||
-rw-r--r-- | apps/examples/relays/relays_main.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/examples/relays/Makefile b/apps/examples/relays/Makefile index 1ab4c8716..e5afd6fbf 100644 --- a/apps/examples/relays/Makefile +++ b/apps/examples/relays/Makefile @@ -68,7 +68,7 @@ STACKSIZE = 512 # Common build -VPATH = +VPATH = all: .built .PHONY: context clean depend distclean diff --git a/apps/examples/relays/relays_main.c b/apps/examples/relays/relays_main.c index c7ad6db0f..941ac2302 100644 --- a/apps/examples/relays/relays_main.c +++ b/apps/examples/relays/relays_main.c @@ -122,15 +122,15 @@ int relays_main(int argc, char *argv[]) printf("usage: relays [ -n <relay id> ] <switch-status>\n"); return -1; } - + if (optind == argc - 1) { stat = argv[optind]; set_stat = (!strcmp(stat,"on") || !strcmp(stat,"ON")) ? true : false ; } - + up_relaysinit(); - + if (n >= 0) { printf("set RELAY ID %d to %s\n", n , set_stat ? "ON" : "OFF"); |