|
|
|
@ -399,8 +399,9 @@ void mojoKernel::validateSession(){ |
|
|
|
}; |
|
|
|
#ifdef EMBED_AUTORESET
|
|
|
|
if ( m_bEnableAutoReset ) { |
|
|
|
if (m_nSessionCounter < m_nAutoResetTime && ( m_nNoAlarmCounter < 5 ) ) { |
|
|
|
m_nSessionCounter ++; |
|
|
|
if( m_nSessionCounter < m_nAutoResetTime ) { |
|
|
|
//if ( m_nNoAlarmCounter < 5 )
|
|
|
|
m_nSessionCounter ++; |
|
|
|
} else { |
|
|
|
m_nSessionCounter = 0; |
|
|
|
//Reset All Sensors
|
|
|
|
@ -412,25 +413,6 @@ void mojoKernel::validateSession(){ |
|
|
|
delete( tL ); |
|
|
|
}; |
|
|
|
m_nNoAlarmCounter = NOTARGET_SESSION_CLOSE;//Session will be closed in 1 second
|
|
|
|
//Close Session
|
|
|
|
/*
|
|
|
|
DBC_EVT_RECORD tRecord; |
|
|
|
memset( &tRecord, 0, sizeof(DBC_EVT_RECORD)); |
|
|
|
uint64_t TS_64 = getMilliseconds() + 20; |
|
|
|
tRecord.ts_s = TS_64/ 1000; |
|
|
|
tRecord.ts_ms = TS_64 % 1000; |
|
|
|
tRecord.node_id = m_nServerNodeID; |
|
|
|
tRecord.type = EVT_LRF_END_SESSION_TO; |
|
|
|
CSTR tUUID = getUniqID_UUID( tRecord.ts_s ); |
|
|
|
if( tUUID ) { |
|
|
|
strncpy(tRecord.uuid, tUUID, 64 ); |
|
|
|
free( tUUID ); |
|
|
|
} else { |
|
|
|
memset( tRecord.uuid, 0, 65 ); |
|
|
|
}; |
|
|
|
m_pDBC->addEvent( &tRecord ); |
|
|
|
m_bSessionStarted = false; |
|
|
|
*/ |
|
|
|
}; |
|
|
|
}; |
|
|
|
#endif
|
|
|
|
|