Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

75 lines
1.4 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: Kernel.cpp
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Source file of Kernel.cpp
//----------------------------------------------------------------------------
#include "stdafx.h"
#include "BoardReceiver.h"
#include "Kernel.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
CKernel::CKernel()
{
}
CKernel::~CKernel()
{
Destroy();
}
BOOL CKernel::Create()
{
Destroy();
if( !m_Tracker.Create( FALSE, &m_Camera, &m_Relay, &m_AutoReset ) )
return FALSE;
if( !m_Shadow.Create() )
return FALSE;
if( !m_Detector.Create( FALSE, &m_Tracker, &m_Shadow, 0, "init_m.ini" ) )
return FALSE;
if( !m_Calibrator.Create( "lt0.ini" ) )
return FALSE;
return TRUE;
}
void CKernel::Destroy()
{
m_Detector.Destroy();
m_Tracker.Destroy();
m_Shadow.Destroy();
}
void CKernel::Invalidate( BOOL bZero, BOOL bSun, INT nRange )
{
// calibrate range
nRange = m_Calibrator.Calibrate( nRange );
m_Tracker.Invalidate();
m_Detector.Invalidate( bZero, bSun, nRange, TRUE );
}
void CKernel::Reset( BOOL bReset )
{
m_Tracker.Reset();
m_Detector.Reset( bReset );
}