From 1101ce4d5e1181c7e1b1e76d48efbb8b97cd4407 Mon Sep 17 00:00:00 2001 From: Guy McSwain Date: Mon, 17 Sep 2018 13:32:43 -0500 Subject: [PATCH] Update reportedLevels prior to monitoring bits --- pigpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pigpio.c b/pigpio.c index 68dab59..427f31a 100644 --- a/pigpio.c +++ b/pigpio.c @@ -6371,6 +6371,7 @@ static void * pthAlertThread(void *x) } alertEmit(sample, reports, changedBits, sTick); + reportedLevel = sample[numSamples -1].level; if (totalSamples > gpioStats.maxSamples) gpioStats.maxSamples = numSamples;