From e1b7d8c5088987befa4d08af36d4fafbec572480 Mon Sep 17 00:00:00 2001 From: TheRaspyDev Date: Fri, 19 May 2017 10:01:51 +0200 Subject: [PATCH] Fixing command line arguments for new option -m --- command.c | 2 +- pigpio.3 | 2 +- pigpio.c | 2 +- pigpio.h | 2 +- pigpio.py | 2 +- pigpiod.c | 3 ++- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/command.c b/command.c index 82e1c74..573f59f 100644 --- a/command.c +++ b/command.c @@ -442,7 +442,7 @@ static errInfo_t errInfo[]= {PI_BAD_PATHNAME , "can't open pathname"}, {PI_NO_HANDLE , "no handle available"}, {PI_BAD_HANDLE , "unknown handle"}, - {PI_BAD_IF_FLAGS , "ifFlags > 3"}, + {PI_BAD_IF_FLAGS , "ifFlags > 4"}, {PI_BAD_CHANNEL , "DMA channel not 0-14"}, {PI_BAD_SOCKET_PORT , "socket port not 1024-30000"}, {PI_BAD_FIFO_COMMAND , "unknown fifo command"}, diff --git a/pigpio.3 b/pigpio.3 index e33dde6..b866a98 100644 --- a/pigpio.3 +++ b/pigpio.3 @@ -9796,7 +9796,7 @@ A 16-bit word value. .br #define PI_BAD_HANDLE -25 // unknown handle .br -#define PI_BAD_IF_FLAGS -26 // ifFlags > 3 +#define PI_BAD_IF_FLAGS -26 // ifFlags > 4 .br #define PI_BAD_CHANNEL -27 // DMA channel not 0-14 .br diff --git a/pigpio.c b/pigpio.c index fac0daa..7e34f44 100644 --- a/pigpio.c +++ b/pigpio.c @@ -13328,7 +13328,7 @@ int gpioCfgInterfaces(unsigned ifFlags) CHECK_NOT_INITED; - if (ifFlags > 7) + if (ifFlags > 15) SOFT_ERROR(PI_BAD_IF_FLAGS, "bad ifFlags (%X)", ifFlags); gpioCfg.ifFlags = ifFlags; diff --git a/pigpio.h b/pigpio.h index cb1d76d..b8a95bb 100644 --- a/pigpio.h +++ b/pigpio.h @@ -6143,7 +6143,7 @@ after this command is issued. #define PI_BAD_PATHNAME -23 // can't open pathname #define PI_NO_HANDLE -24 // no handle available #define PI_BAD_HANDLE -25 // unknown handle -#define PI_BAD_IF_FLAGS -26 // ifFlags > 3 +#define PI_BAD_IF_FLAGS -26 // ifFlags > 4 #define PI_BAD_CHANNEL -27 // DMA channel not 0-14 #define PI_BAD_PRIM_CHANNEL -27 // DMA primary channel not 0-14 #define PI_BAD_SOCKET_PORT -28 // socket port not 1024-32000 diff --git a/pigpio.py b/pigpio.py index 517943f..bf45e05 100644 --- a/pigpio.py +++ b/pigpio.py @@ -712,7 +712,7 @@ _errors=[ [_PI_BAD_PATHNAME , "can't open pathname"], [PI_NO_HANDLE , "no handle available"], [PI_BAD_HANDLE , "unknown handle"], - [_PI_BAD_IF_FLAGS , "ifFlags > 3"], + [_PI_BAD_IF_FLAGS , "ifFlags > 4"], [_PI_BAD_CHANNEL , "DMA channel not 0-14"], [_PI_BAD_SOCKET_PORT , "socket port not 1024-30000"], [_PI_BAD_FIFO_COMMAND , "unknown fifo command"], diff --git a/pigpiod.c b/pigpiod.c index 8323380..d680b3b 100644 --- a/pigpiod.c +++ b/pigpiod.c @@ -103,6 +103,7 @@ void usage() " -k, disable socket interface, default enabled\n" \ " -l, localhost socket only default local+remote\n" \ " -n IP addr, allow address, name or dotted, default allow all\n" \ + " -m, disable alerts default enabled\n" \ " -p value, socket port, 1024-32000, default 8888\n" \ " -s value, sample rate, 1, 2, 4, 5, 8, or 10, default 5\n" \ " -t value, clock peripheral, 0=PWM 1=PCM, default PCM\n" \ @@ -162,7 +163,7 @@ static void initOpts(int argc, char *argv[]) uint32_t addr; int64_t mask; - while ((opt = getopt(argc, argv, "a:b:c:d:e:fgkln:p:s:t:x:vV")) != -1) + while ((opt = getopt(argc, argv, "a:b:c:d:e:fgkln:mp:s:t:x:vV")) != -1) { switch (opt) {