|
|
@ -359,24 +359,22 @@ bool CKernel::Create(){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DETECTION_MULTI_PROFILES
|
|
|
#ifdef DETECTION_MULTI_PROFILES
|
|
|
//printf("Multiprofiles\n");
|
|
|
|
|
|
char APFN[32]; |
|
|
|
|
|
|
|
|
char APFN[32]; |
|
|
FILE *APFD; |
|
|
FILE *APFD; |
|
|
sprintf( APFN, "%c:\\profile.ini", (char)( 65+BoardSettings.nHID ) ); |
|
|
sprintf( APFN, "%c:\\profile.ini", (char)( 65+BoardSettings.nHID ) ); |
|
|
APFD = fopen( APFN, "r" ); |
|
|
APFD = fopen( APFN, "r" ); |
|
|
if( APFD!=NULL ){ |
|
|
if( APFD!=NULL ){ |
|
|
uint8_t profileID; |
|
|
uint8_t profileID; |
|
|
fscanf( APFD, "%d\n", &m_bActiveMasterDetectionProfile ); |
|
|
fscanf( APFD, "%d\n", &m_bActiveMasterDetectionProfile ); |
|
|
m_bActiveSlaveDetectionProfile = m_bActiveMasterDetectionProfile+3; |
|
|
|
|
|
|
|
|
m_bActiveSlaveDetectionProfile = m_bActiveMasterDetectionProfile+3; |
|
|
fclose( APFD ); |
|
|
fclose( APFD ); |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
m_bActiveMasterDetectionProfile = 0; // to ensure no to exit from next function
|
|
|
setActiveDetectionProfile( 1 ); |
|
|
setActiveDetectionProfile( 1 ); |
|
|
}; |
|
|
}; |
|
|
//printf("Done\n");
|
|
|
|
|
|
//printf("Create Detectors\n");
|
|
|
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
if( !m_Detector[0].Create( BoardSettings.M_LRFDisable, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], &m_WatchDog, LRF_ID_MASTER ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[0].Create( BoardSettings.M_LRFDisable, &m_Tracker[0], m_pShadow, 0, /*_T("init_m.ini")*/( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], &m_WatchDog, LRF_ID_MASTER ) ) { |
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[0].Create( BoardSettings.M_LRFDisable, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], LRF_ID_MASTER ) ) { |
|
|
if( !m_Detector[0].Create( BoardSettings.M_LRFDisable, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], LRF_ID_MASTER ) ) { |
|
|
#endif
|
|
|
#endif
|
|
|
@ -385,8 +383,16 @@ bool CKernel::Create(){ |
|
|
#endif
|
|
|
#endif
|
|
|
#else
|
|
|
#else
|
|
|
//printf("Singleprofiles Detector\n");
|
|
|
//printf("Singleprofiles Detector\n");
|
|
|
|
|
|
|
|
|
if( !m_Detector[0].Create( BoardSettings.M_LRFDisable, &m_Tracker[0], m_pShadow, 0, _T("init_m.ini") ) ) { |
|
|
|
|
|
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
|
|
|
if( !m_Detector[0].Create( BoardSettings.M_LRFDisable, &m_Tracker[0], m_pShadow, 0, _T("init_m.ini"), &m_WatchDog, LRF_ID_MASTER ) ) { |
|
|
|
|
|
#else
|
|
|
|
|
|
if( !m_Detector[0].Create( BoardSettings.M_LRFDisable, &m_Tracker[0], m_pShadow, 0, _T("init_m.ini"), LRF_ID_MASTER ) ) { |
|
|
|
|
|
#endif
|
|
|
|
|
|
#else
|
|
|
|
|
|
if( !m_Detector[0].Create( BoardSettings.M_LRFDisable, &m_Tracker[0], m_pShadow, 0, _T("init_m.ini") ) ) { |
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
#endif
|
|
|
#endif
|
|
|
return false; |
|
|
return false; |
|
|
}; |
|
|
}; |
|
|
@ -399,12 +405,12 @@ bool CKernel::Create(){ |
|
|
#ifdef DETECTION_MULTI_PROFILES
|
|
|
#ifdef DETECTION_MULTI_PROFILES
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], &m_WatchDog, LRF_ID_SLAVE ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile], &m_WatchDog, LRF_ID_SLAVE ) ) { |
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], LRF_ID_SLAVE ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile], LRF_ID_SLAVE ) ) { |
|
|
#endif
|
|
|
#endif
|
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bMaster, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile] ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bMaster, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile] ) ) { |
|
|
#endif
|
|
|
#endif
|
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, "init_s.ini" ) ){ |
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, "init_s.ini" ) ){ |
|
|
@ -414,27 +420,27 @@ bool CKernel::Create(){ |
|
|
#ifdef DETECTION_MULTI_PROFILES
|
|
|
#ifdef DETECTION_MULTI_PROFILES
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
if( !m_Detector[2].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], &m_WatchDog, LRF_ID_SLAVE ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[2].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile], &m_WatchDog, LRF_ID_SLAVE ) ) { |
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[2].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], LRF_ID_SLAVE ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[2].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile], LRF_ID_SLAVE ) ) { |
|
|
#endif
|
|
|
#endif
|
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[2].Create( m_LRFDisable.bMaster, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile] ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[2].Create( m_LRFDisable.bMaster, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile] ) ) { |
|
|
#endif
|
|
|
#endif
|
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[2].Create( m_LRFDisable.bMaster, &m_Tracker[0], m_pShadow, 0, "init_m.ini" ) ){ |
|
|
|
|
|
|
|
|
if( !m_Detector[2].Create( m_LRFDisable.bMaster, &m_Tracker[0], m_pShadow, 0, "init_s.ini" ) ){ |
|
|
#endif
|
|
|
#endif
|
|
|
return false; |
|
|
return false; |
|
|
}; |
|
|
}; |
|
|
#ifdef DETECTION_MULTI_PROFILES
|
|
|
#ifdef DETECTION_MULTI_PROFILES
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
if( !m_Detector[3].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], &m_WatchDog, LRF_ID_SLAVE ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[3].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile], &m_WatchDog, LRF_ID_SLAVE ) ) { |
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[3].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], LRF_ID_SLAVE ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[3].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile], LRF_ID_SLAVE ) ) { |
|
|
#endif
|
|
|
#endif
|
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[3].Create( m_LRFDisable.bMaster, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile] ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[3].Create( m_LRFDisable.bMaster, &m_Tracker[0], m_pShadow, 0, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile] ) ) { |
|
|
#endif
|
|
|
#endif
|
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[3].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, "init_s.ini" ) ){ |
|
|
if( !m_Detector[3].Create( m_LRFDisable.bSlave, &m_Tracker[0], m_pShadow, 0, "init_s.ini" ) ){ |
|
|
@ -448,19 +454,19 @@ bool CKernel::Create(){ |
|
|
#ifdef ALS_300
|
|
|
#ifdef ALS_300
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
if( !m_Detector[1].Create( BoardSettings.S_LRFDisable, &m_Tracker[1], m_pShadowS, LGS_MAX_DETECTOR_ANGLES / 2, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], &m_WatchDog, LRF_ID_SLAVE ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[1].Create( BoardSettings.S_LRFDisable, &m_Tracker[1], m_pShadowS, LGS_MAX_DETECTOR_ANGLES / 2, /*_T("init_s.ini")*/( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile], &m_WatchDog, LRF_ID_SLAVE ) ) { |
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[1].Create( BoardSettings.S_LRFDisable, &m_Tracker[1], m_pShadowS, LGS_MAX_DETECTOR_ANGLES / 2, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], LRF_ID_SLAVE ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[1].Create( BoardSettings.S_LRFDisable, &m_Tracker[1], m_pShadowS, LGS_MAX_DETECTOR_ANGLES / 2, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile], LRF_ID_SLAVE ) ) { |
|
|
#endif
|
|
|
#endif
|
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[1].Create( BoardSettings.S_LRFDisable, &m_Tracker[1], m_pShadowS, LGS_MAX_DETECTOR_ANGLES / 2, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile] ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[1].Create( BoardSettings.S_LRFDisable, &m_Tracker[1], m_pShadowS, LGS_MAX_DETECTOR_ANGLES / 2, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile] ) ) { |
|
|
#endif
|
|
|
#endif
|
|
|
#else
|
|
|
#else
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[1], m_pShadow, LGS_MAX_DETECTOR_ANGLES / 2, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], &m_WatchDog, LRF_ID_SLAVE ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[1], m_pShadow, LGS_MAX_DETECTOR_ANGLES / 2, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile], &m_WatchDog, LRF_ID_SLAVE ) ) { |
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[1], m_pShadow, LGS_MAX_DETECTOR_ANGLES / 2, ( PCHAR )m_pDetectionProfiles[m_bActiveMasterDetectionProfile], LRF_ID_SLAVE ) ) { |
|
|
|
|
|
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[1], m_pShadow, LGS_MAX_DETECTOR_ANGLES / 2, ( PCHAR )m_pDetectionProfiles[m_bActiveSlaveDetectionProfile], LRF_ID_SLAVE ) ) { |
|
|
#endif
|
|
|
#endif
|
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[1], m_pShadow, LGS_MAX_DETECTOR_ANGLES / 2, ( PCHAR ) m_pDetectionProfiles[m_bActiveSlaveDetectionProfile] ) ) { |
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[1], m_pShadow, LGS_MAX_DETECTOR_ANGLES / 2, ( PCHAR ) m_pDetectionProfiles[m_bActiveSlaveDetectionProfile] ) ) { |
|
|
@ -468,7 +474,15 @@ bool CKernel::Create(){ |
|
|
#endif
|
|
|
#endif
|
|
|
#else
|
|
|
#else
|
|
|
#ifdef ALS_300
|
|
|
#ifdef ALS_300
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[1], m_pShadowS, LGS_MAX_DETECTOR_ANGLES / 2, _T("init_s.ini") ) ){ |
|
|
|
|
|
|
|
|
#ifdef STORE_FIRST_SAF
|
|
|
|
|
|
#ifdef WATCHDOG_ENABLED
|
|
|
|
|
|
if( !m_Detector[1].Create( BoardSettings.S_LRFDisable, &m_Tracker[1], m_pShadowS, LGS_MAX_DETECTOR_ANGLES / 2, _T("init_s.ini"), &m_WatchDog, LRF_ID_SLAVE ) ) { |
|
|
|
|
|
#else
|
|
|
|
|
|
if( !m_Detector[1].Create( BoardSettings.S_LRFDisable, &m_Tracker[1], m_pShadowS, LGS_MAX_DETECTOR_ANGLES / 2, _T("init_s.ini"), LRF_ID_SLAVE ) ) { |
|
|
|
|
|
#endif
|
|
|
|
|
|
#else
|
|
|
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[1], m_pShadowS, LGS_MAX_DETECTOR_ANGLES / 2, _T("init_s.ini") ) ){ |
|
|
|
|
|
#endif
|
|
|
#else
|
|
|
#else
|
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[1], m_pShadow, LGS_MAX_DETECTOR_ANGLES / 2, _T("init_s.ini") ) ){ |
|
|
if( !m_Detector[1].Create( m_LRFDisable.bSlave, &m_Tracker[1], m_pShadow, LGS_MAX_DETECTOR_ANGLES / 2, _T("init_s.ini") ) ){ |
|
|
#endif
|
|
|
#endif
|
|
|
|