V67: #201 allow space for watchdog/event reports
authorjoan <joan@abyz.co.uk>
Thu, 1 Mar 2018 20:49:48 +0000 (20:49 +0000)
committerjoan <joan@abyz.co.uk>
Thu, 1 Mar 2018 20:49:48 +0000 (20:49 +0000)
pigpio.c
pigpio.h

index 710d20f642433dcf2127a527d6db6c3498aedfc5..3fc6402a13b8c9a34ab5d27a2076e43606765dff 100644 (file)
--- a/pigpio.c
+++ b/pigpio.c
@@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 For more information, please refer to <http://unlicense.org/>
 */
 
-/* pigpio version 66 */
+/* pigpio version 67 */
 
 /* include ------------------------------------------------------- */
 
@@ -770,7 +770,7 @@ Assumes two counters per block.  Each counter 4 * 16 (16^4=65536)
 
 #define BPD 4
 
-#define MAX_REPORT 120
+#define MAX_REPORT 250
 #define MAX_SAMPLE 4000
 
 #define DEFAULT_PWM_IDX 5
@@ -5713,7 +5713,8 @@ static void alertEmit(
    int err;
    int max_emits;
    char fifo[32];
-   gpioReport_t report[MAX_REPORT];
+   /* ensure space for maximum number of watchdog and event notifications */
+   gpioReport_t report[MAX_REPORT+PI_MAX_USER_GPIO+1+PI_MAX_EVENT+1];
 
    if (changedBits)
    {
index 2779b6c3e7442e9136002c9c2cb28f6f30b5e77b..65dc90276d10bceb9800b16fb55ebeab0cb2843a 100644 (file)
--- a/pigpio.h
+++ b/pigpio.h
@@ -31,7 +31,7 @@ For more information, please refer to <http://unlicense.org/>
 #include <stdint.h>
 #include <pthread.h>
 
-#define PIGPIO_VERSION 66
+#define PIGPIO_VERSION 6701
 
 /*TEXT