From acccd4b706e2a5950be5efe958030c9c39e4014d Mon Sep 17 00:00:00 2001 From: Evgeny Gagua Date: Tue, 25 Feb 2025 15:32:17 +0200 Subject: [PATCH] Some Updates to AutoReset 2 --- lib/App/mojo/mojoKernel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/App/mojo/mojoKernel.cpp b/lib/App/mojo/mojoKernel.cpp index 3ff0a785..99aa3767 100644 --- a/lib/App/mojo/mojoKernel.cpp +++ b/lib/App/mojo/mojoKernel.cpp @@ -183,7 +183,8 @@ bool mojoKernel::create(){ m_bEnableAutoReset = true; m_nAutoResetTime = tVal; sprintf( tBuffer, "App Autoreset Read From Settings: %d", m_nAutoResetTime ); - LOG( tBuffer ); + if ( m_nAutoResetTime == 0 ) m_bEnableAutoReset = false; + LOG(tBuffer); }; #endif } else { @@ -328,6 +329,9 @@ void mojoKernel::startSession(){ m_pEventHeap->broadcast( bEVT ); }; m_bSessionStarted = true; +#ifdef EMBED_AUTORESET + m_nSessionCounter = 0; +#endif }; m_mSessionProtector.unlock(); }; @@ -400,7 +404,6 @@ void mojoKernel::validateSession(){ #ifdef EMBED_AUTORESET if ( m_bEnableAutoReset ) { if( m_nSessionCounter < m_nAutoResetTime ) { - //if ( m_nNoAlarmCounter < 5 ) m_nSessionCounter ++; } else { m_nSessionCounter = 0;