From 847c0818467c3ef15bde8cf7c6f6cac979359f69 Mon Sep 17 00:00:00 2001 From: joan Date: Sun, 4 Feb 2018 09:10:22 +0000 Subject: [PATCH] Changes by tateu --- pigpio.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pigpio.c b/pigpio.c index 7c130e5..8328d3a 100644 --- a/pigpio.c +++ b/pigpio.c @@ -6292,7 +6292,10 @@ static void * pthAlertThread(void *x) { stickInited = 1; numSamples = 0; - pthAlertRunning = PI_THREAD_RUNNING; + if (!(gpioCfg.ifFlags & PI_DISABLE_ALERT)) + { + pthAlertRunning = PI_THREAD_RUNNING; + } } } } @@ -8474,7 +8477,11 @@ int gpioInitialise(void) runState = PI_RUNNING; - while (pthAlertRunning != PI_THREAD_RUNNING) myGpioDelay(1000); + if (!(gpioCfg.ifFlags & PI_DISABLE_ALERT)) + { + while (pthAlertRunning != PI_THREAD_RUNNING) myGpioDelay(1000); + } + } return status; -- 2.30.2