From: Guy McSwain Date: Mon, 17 Sep 2018 18:32:43 +0000 (-0500) Subject: Update reportedLevels prior to monitoring bits X-Git-Tag: archive/raspbian/1.68-2+rpi1~34^2^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1101ce4d5e1181c7e1b1e76d48efbb8b97cd4407;p=pigpio.git Update reportedLevels prior to monitoring bits --- 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;