Beispiel #1
0
void Pir::loop() {
	if (mPirHigh != mPirPrev) {
		if (mEventHandler)
			mEventHandler(mPirHigh);
	}
	mPirPrev = mPirHigh;
}
void Device::update()
{
	lock_guard<mutex> lock( mMutex );
	if ( mListener.mConnected && mListener.mInitialized && mListener.mNewFrame ) {
		mEventHandler( mListener.mFrame );
		mListener.mNewFrame = false;
	}
}